Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-tag-input

Package Overview
Dependencies
Maintainers
3
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tag-input - npm Package Compare versions

Comparing version 6.7.1 to 6.7.2

1

dist-modules/components/RemoveComponent.js

@@ -63,2 +63,3 @@ 'use strict';

className: className,
type: 'button',
'aria-label': ariaLabel },

@@ -65,0 +66,0 @@ crossStr

2

dist/ReactTags.min.js

@@ -6,3 +6,3 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDnD"),require("ReactDnDHTML5Backend")):"function"==typeof define&&define.amd?define(["React","ReactDnD","ReactDnDHTML5Backend"],t):"object"==typeof exports?exports.ReactTags=t(require("React"),require("ReactDnD"),require("ReactDnDHTML5Backend")):e.ReactTags=t(e.React,e.ReactDnD,e.ReactDnDHTML5Backend)}(window,(function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=35)}([function(e,t,n){var r=n(18),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){var r=n(50),o=n(56);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(7),o=n(52),a=n(53),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(t,n){t.exports=e},function(e,t,n){var r=n(40),o=n(41),a=n(42),i=n(43),u=n(44);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(16);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(0).Symbol;e.exports=r},function(e,t,n){var r=n(1)(Object,"create");e.exports=r},function(e,t,n){var r=n(65);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){e.exports=n(111)()},function(e,t,n){var r=n(1)(n(0),"Map");e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,n){e.exports=t},function(e,t,n){var r=n(37);e.exports=function(e,t){return r(e,t)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(2),o=n(19);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(51))},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(57),o=n(64),a=n(66),i=n(67),u=n(68);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(23),o=n(71),a=n(24);e.exports=function(e,t,n,i,u,s){var l=1&n,c=e.length,f=t.length;if(c!=f&&!(l&&f>c))return!1;var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=-1,g=!0,v=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var y=e[h],b=t[h];if(i)var _=l?i(b,y,h,t,e,s):i(y,b,h,e,t,s);if(void 0!==_){if(_)continue;g=!1;break}if(v){if(!o(t,(function(e,t){if(!a(v,t)&&(y===e||u(y,e,n,i,s)))return v.push(t)}))){g=!1;break}}else if(y!==b&&!u(y,b,n,i,s)){g=!1;break}}return s.delete(e),s.delete(t),g}},function(e,t,n){var r=n(21),o=n(69),a=n(70);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){(function(e){var r=n(0),o=n(87),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,u=i&&i.exports===a?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(this,n(26)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(89),o=n(90),a=n(91),i=a&&a.isTypedArray,u=i?o(i):r;e.exports=u},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(1)(n(0),"Set");e.exports=r},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(116);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r;

http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var i=o.apply(null,r);i&&e.push(i)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRegExpFromDelimiters=function(e){var t=e.map((function(e){var t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)})).join(""),n=(0,a.default)(t);return new RegExp("["+n+"]+")},t.canDrag=function(e){var t=e.moveTag,n=e.readOnly,r=e.allowDragDrop;return void 0!==t&&!n&&r},t.canDrop=function(e){var t=e.readOnly,n=e.allowDragDrop;return!t&&n};var r,o=n(120),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.KEYS={ENTER:[10,13],TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,ESCAPE:27,SPACE:32,COMMA:188},t.DEFAULT_PLACEHOLDER="Press enter to add new tag",t.DEFAULT_LABEL_FIELD="text",t.DEFAULT_CLASSNAMES={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion"},t.INPUT_FIELD_POSITIONS={INLINE:"inline",TOP:"top",BOTTOM:"bottom"}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(4),i=b(a),u=n(14),s=n(36),l=b(n(15)),c=b(n(30)),f=b(n(101)),p=b(n(110)),d=b(n(11)),h=b(n(32)),g=b(n(119)),v=n(33),y=n(34);function b(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));x.call(n),e.inline||console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.");var r=e.suggestions;return n.state={suggestions:r,query:"",isFocused:!1,selectedIndex:-1,selectionMode:!1,ariaLiveStatus:""},n.reactTagsRef=(0,a.createRef)(),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleChange=n.handleChange.bind(n),n.moveTag=n.moveTag.bind(n),n.handlePaste=n.handlePaste.bind(n),n.handleSuggestionHover=n.handleSuggestionHover.bind(n),n.handleSuggestionClick=n.handleSuggestionClick.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.autofocus,n=e.readOnly;t&&!n&&this.resetAndFocusInput()}},{key:"componentDidUpdate",value:function(e){(0,l.default)(e.suggestions,this.props.suggestions)||this.updateSuggestions()}},{key:"handleDelete",value:function(e,t){t.preventDefault(),t.stopPropagation();var n=this.props.tags.slice();if(0!==n.length){var r="Tag at index "+e+" with value "+n[e].id+" deleted.";this.props.handleDelete(e,t);var o=this.reactTagsRef.current.querySelectorAll(".ReactTags__remove"),a=void 0,i=void 0,u=void 0;0===e&&n.length>1?(a=o[0],i=0,u=n[1]):(a=o[e-1],u=n[i=e-1]),a||(i=-1,a=this.textInput),r+=i>=0?" Tag at index "+i+" with value "+u.id+" focussed. Press backspace to remove":"Input focussed. Press enter to add a new tag",a.focus(),this.setState({ariaLiveStatus:r})}}},{key:"handleTagClick",value:function(e,t){this.props.handleTagClick&&this.props.handleTagClick(e,t)}},{key:"handleChange",value:function(e){this.props.handleInputChange&&this.props.handleInputChange(e.target.value);var t=e.target.value.trim();this.setState({query:t},this.updateSuggestions)}},{key:"handleFocus",value:function(e){var t=e.target.value;this.props.handleInputFocus&&this.props.handleInputFocus(t),this.setState({isFocused:!0})}},{key:"handleBlur",value:function(e){var t=e.target.value;this.props.handleInputBlur&&(this.props.handleInputBlur(t),this.textInput&&(this.textInput.value="")),this.setState({isFocused:!1})}},{key:"handleKeyDown",value:function(e){var t=this.state,n=t.query,r=t.selectedIndex,o=t.suggestions,a=t.selectionMode;if(e.keyCode===y.KEYS.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.setState({selectedIndex:-1,selectionMode:!1,suggestions:[]})),-1!==this.props.delimiters.indexOf(e.keyCode)&&!e.shiftKey){e.keyCode===y.KEYS.TAB&&""===n||e.preventDefault();var i=a&&-1!==r?o[r]:_({id:n},this.props.labelField,n);""!==i&&this.addTag(i)}e.keyCode===y.KEYS.BACKSPACE&&""===n&&this.props.allowDeleteFromEmptyInput&&this.handleDelete(this.props.tags.length-1,e),e.keyCode===y.KEYS.UP_ARROW&&(e.preventDefault(),this.setState({selectedIndex:r<=0?o.length-1:r-1,selectionMode:!0})),e.keyCode===y.KEYS.DOWN_ARROW&&(e.preventDefault(),this.setState({selectedIndex:0===o.length?-1:(r+1)%o.length,selectionMode:!0}))}},{key:"handlePaste",value:function(e){var t=this;if(this.props.allowAdditionFromPaste){e.preventDefault();var n=e.clipboardData||window.clipboardData,r=n.getData("text"),o=this.props.maxLength,a=void 0===o?r.length:o,i=Math.min(a,r.length),u=n.getData("text").substr(0,i),s=(0,v.buildRegExpFromDelimiters)(this.props.delimiters),l=u.split(s);(0,f.default)(l).forEach((function(e){return t.addTag(_({id:e},t.props.labelField,e))}))}}},{key:"handleSuggestionClick",value:function(e){this.addTag(this.state.suggestions[e])}},{key:"handleSuggestionHover",value:function(e){this.setState({selectedIndex:e,selectionMode:!0})}},{key:"moveTag",value:function(e,t){var n=this.props.tags[e];this.props.handleDrag(n,e,t)}},{key:"render",value:function(){var e=this,t=this.getTagItems(),n=r({},y.DEFAULT_CLASSNAMES,this.props.classNames),o=this.state.query.trim(),a=this.state.selectedIndex,u=this.state.suggestions,s=this.props,l=s.placeholder,c=s.name,f=s.id,d=s.maxLength,g=s.inline,v=s.inputFieldPosition,b=s.inputValue,_=s.inputProps,m=g?v:y.INPUT_FIELD_POSITIONS.BOTTOM,x=this.props.readOnly?null:i.default.createElement("div",{className:n.tagInput},i.default.createElement("input",r({},_,{ref:function(t){e.textInput=t},className:n.tagInputField,type:"text",placeholder:l,"aria-label":l,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,name:c,id:f,maxLength:d,value:b,"data-automation":"input","data-testid":"input"})),i.default.createElement(p.default,{query:o,suggestions:u,labelField:this.props.labelField,selectedIndex:a,handleClick:this.handleSuggestionClick,handleHover:this.handleSuggestionHover,minQueryLength:this.props.minQueryLength,shouldRenderSuggestions:this.props.shouldRenderSuggestions,isFocused:this.state.isFocused,classNames:n,renderSuggestion:this.props.renderSuggestion}));return i.default.createElement("div",{className:(0,h.default)(n.tags,"react-tags-wrapper"),ref:this.reactTagsRef},i.default.createElement("p",{role:"alert",className:"sr-only",style:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",margin:"-1px",padding:0,width:"1px",height:"1px",border:0}},this.state.ariaLiveStatus),m===y.INPUT_FIELD_POSITIONS.TOP&&x,i.default.createElement("div",{className:n.selected},t,m===y.INPUT_FIELD_POSITIONS.INLINE&&x),m===y.INPUT_FIELD_POSITIONS.BOTTOM&&x)}}]),t}(a.Component);m.propTypes={placeholder:d.default.string,labelField:d.default.string,suggestions:d.default.arrayOf(d.default.shape({id:d.default.string.isRequired})),delimiters:d.default.arrayOf(d.default.number),autofocus:d.default.bool,inline:d.default.bool,inputFieldPosition:d.default.oneOf([y.INPUT_FIELD_POSITIONS.INLINE,y.INPUT_FIELD_POSITIONS.TOP,y.INPUT_FIELD_POSITIONS.BOTTOM]),handleDelete:d.default.func,handleAddition:d.default.func,handleDrag:d.default.func,handleFilterSuggestions:d.default.func,handleTagClick:d.default.func,allowDeleteFromEmptyInput:d.default.bool,allowAdditionFromPaste:d.default.bool,allowDragDrop:d.default.bool,handleInputChange:d.default.func,handleInputFocus:d.default.func,handleInputBlur:d.default.func,minQueryLength:d.default.number,shouldRenderSuggestions:d.default.func,removeComponent:d.default.func,autocomplete:d.default.oneOfType([d.default.bool,d.default.number]),readOnly:d.default.bool,classNames:d.default.object,name:d.default.string,id:d.default.string,maxLength:d.default.number,inputValue:d.default.string,tags:d.default.arrayOf(d.default.shape({id:d.default.string.isRequired,className:d.default.string})),allowUnique:d.default.bool,renderSuggestion:d.default.func,inputProps:d.default.object},m.defaultProps={placeholder:y.DEFAULT_PLACEHOLDER,labelField:y.DEFAULT_LABEL_FIELD,suggestions:[],delimiters:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(y.KEYS.ENTER),[y.KEYS.TAB]),autofocus:!0,inline:!0,inputFieldPosition:y.INPUT_FIELD_POSITIONS.INLINE,handleDelete:c.default,handleAddition:c.default,allowDeleteFromEmptyInput:!0,allowAdditionFromPaste:!0,autocomplete:!1,readOnly:!1,allowUnique:!0,allowDragDrop:!0,tags:[],inputProps:{}};var x=function(){var e=this;this.filteredSuggestions=function(t){var n=e.props.suggestions;if(e.props.allowUnique){var r=e.props.tags.map((function(e){return e.id.toLowerCase()}));n=n.filter((function(e){return!r.includes(e.id.toLowerCase())}))}if(e.props.handleFilterSuggestions)return e.props.handleFilterSuggestions(t,n);var o=n.filter((function(n){return 0===e.getQueryIndex(t,n)})),a=n.filter((function(n){return e.getQueryIndex(t,n)>0}));return o.concat(a)},this.getQueryIndex=function(t,n){return n[e.props.labelField].toLowerCase().indexOf(t.toLowerCase())},this.resetAndFocusInput=function(){e.setState({query:""}),e.textInput&&(e.textInput.value="",e.textInput.focus())},this.updateSuggestions=function(){var t=e.state,n=t.query,r=t.selectedIndex,o=e.filteredSuggestions(n);e.setState({suggestions:o,selectedIndex:r>=o.length?o.length-1:r})},this.addTag=function(t){var n=e.props,r=n.tags,o=n.labelField,a=n.allowUnique;if(t.id&&t[o]){var i=r.map((function(e){return e.id.toLowerCase()}));if(!(a&&i.indexOf(t.id.toLowerCase())>=0)){if(e.props.autocomplete){var u=e.filteredSuggestions(t[o]);(1===e.props.autocomplete&&1===u.length||!0===e.props.autocomplete&&u.length)&&(t=u[0])}e.props.handleAddition(t),e.setState({query:"",selectionMode:!1,selectedIndex:-1}),e.resetAndFocusInput()}}},this.getTagItems=function(){var t=e.props,n=t.classNames,o=t.tags,a=t.labelField,u=t.removeComponent,s=t.readOnly,l=t.allowDragDrop,c=l?e.moveTag:null;return o.map((function(t,o){return i.default.createElement(g.default,{key:o,index:o,tag:t,labelField:a,onDelete:e.handleDelete.bind(e,o),moveTag:c,removeComponent:u,onTagClicked:e.handleTagClick.bind(e,o),readOnly:s,classNames:r({},y.DEFAULT_CLASSNAMES,n),allowDragDrop:l})}))}};e.exports={WithContext:function(e){var t=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[]);return i.default.createElement(u.DndProvider,{backend:s.HTML5Backend},i.default.createElement(m,t))},WithOutContext:m,KEYS:y.KEYS}},function(e,t){e.exports=n},function(e,t,n){var r=n(38),o=n(3);e.exports=function e(t,n,a,i,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,a,i,e,u))}},function(e,t,n){var r=n(39),o=n(22),a=n(72),i=n(75),u=n(97),s=n(10),l=n(25),c=n(27),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,g){var v=s(e),y=s(t),b=v?"[object Array]":u(e),_=y?"[object Array]":u(t),m=(b="[object Arguments]"==b?f:b)==f,x=(_="[object Arguments]"==_?f:_)==f,O=b==_;if(O&&l(e)){if(!l(t))return!1;v=!0,m=!1}if(O&&!m)return g||(g=new r),v||c(e)?o(e,t,n,d,h,g):a(e,t,b,n,d,h,g);if(!(1&n)){var S=m&&p.call(e,"__wrapped__"),j=x&&p.call(t,"__wrapped__");if(S||j){var T=S?e.value():e,w=j?t.value():t;return g||(g=new r),h(T,w,n,d,g)}}return!!O&&(g||(g=new r),i(e,t,n,d,h,g))}},function(e,t,n){var r=n(5),o=n(45),a=n(46),i=n(47),u=n(48),s=n(49);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(6),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(6);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(6);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(6);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(5);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(5),o=n(12),a=n(21);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(17),o=n(54),a=n(19),i=n(20),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(7),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(55),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(0)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(58),o=n(5),a=n(12);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(59),o=n(60),a=n(61),i=n(62),u=n(63);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(8);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(8),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(8),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(8);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(9);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(9);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(9);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(9);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(7),o=n(73),a=n(16),i=n(22),u=n(74),s=n(13),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=u;case"[object Set]":var h=1&r;if(d||(d=s),e.size!=t.size&&!h)return!1;var g=p.get(e);if(g)return g==t;r|=2,p.set(e,t);var v=i(d(e),d(t),r,l,f,p);return p.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t,n){var r=n(0).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(76),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,u){var s=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!s)return!1;for(var f=c;f--;){var p=l[f];if(!(s?p in t:o.call(t,p)))return!1}var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var g=!0;u.set(e,t),u.set(t,e);for(var v=s;++f<c;){var y=e[p=l[f]],b=t[p];if(a)var _=s?a(b,y,p,t,e,u):a(y,b,p,e,t,u);if(!(void 0===_?y===b||i(y,b,n,a,u):_)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var m=e.constructor,x=t.constructor;m==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(g=!1)}return u.delete(e),u.delete(t),g}},function(e,t,n){var r=n(77),o=n(79),a=n(82);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(78),o=n(10);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(80),o=n(81),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,u=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return a.call(e,t)})))}:o;e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(83),o=n(92),a=n(96);e.exports=function(e){return a(e)?r(e):o(e)}},function(e,t,n){var r=n(84),o=n(85),a=n(10),i=n(25),u=n(88),s=n(27),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),c=!n&&o(e),f=!n&&!c&&i(e),p=!n&&!c&&!f&&s(e),d=n||c||f||p,h=d?r(e.length,String):[],g=h.length;for(var v in e)!t&&!l.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,g))||h.push(v);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(86),o=n(3),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){var r=n(2),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(2),o=n(28),a=n(3),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(18),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(26)(e))},function(e,t,n){var r=n(93),o=n(94),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(95)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(17),o=n(28);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(98),o=n(12),a=n(99),i=n(29),u=n(100),s=n(2),l=n(20),c=l(r),f=l(o),p=l(a),d=l(i),h=l(u),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=g(new o)||a&&"[object Promise]"!=g(a.resolve())||i&&"[object Set]"!=g(new i)||u&&"[object WeakMap]"!=g(new u))&&(g=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(1)(n(0),"DataView");e.exports=r},function(e,t,n){var r=n(1)(n(0),"Promise");e.exports=r},function(e,t,n){var r=n(1)(n(0),"WeakMap");e.exports=r},function(e,t,n){var r=n(102);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t,n){var r=n(23),o=n(103),a=n(108),i=n(24),u=n(109),s=n(13);e.exports=function(e,t,n){var l=-1,c=o,f=e.length,p=!0,d=[],h=d;if(n)p=!1,c=a;else if(f>=200){var g=t?null:u(e);if(g)return s(g);p=!1,c=i,h=new r}else h=t?[]:d;e:for(;++l<f;){var v=e[l],y=t?t(v):v;if(v=n||0!==v?v:0,p&&y==y){for(var b=h.length;b--;)if(h[b]===y)continue e;t&&h.push(y),d.push(v)}else c(h,y,n)||(h!==d&&h.push(y),d.push(v))}return d}},function(e,t,n){var r=n(104);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(105),o=n(106),a=n(107);e.exports=function(e,t,n){return t==t?a(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(29),o=n(30),a=n(13),i=r&&1/a(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(4),a=l(o),i=l(n(11)),u=l(n(15)),s=l(n(113));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;c(this,t);for(var o=arguments.length,i=Array(o),u=0;u<o;u++)i[u]=arguments[u];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.markIt=function(e,t){var n=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&");return{__html:e[r.props.labelField].replace(RegExp(n,"gi"),(function(e){return"<mark>"+(0,s.default)(e)+"</mark>"}))}},r.shouldRenderSuggestions=function(e){var t=r.props,n=t.minQueryLength,o=t.isFocused;return e.length>=n&&o},r.renderSuggestion=function(e,t){var n=r.props.renderSuggestion;return"function"==typeof n?n(e,t):a.default.createElement("span",{dangerouslySetInnerHTML:r.markIt(e,t)})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.shouldRenderSuggestions||this.shouldRenderSuggestions;return t.isFocused!==e.isFocused||!(0,u.default)(t.suggestions,e.suggestions)||n(e.query)||n(e.query)!==n(t.query)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.selectedIndex,s=i.classNames;if(this.suggestionsContainer&&e.selectedIndex!==u){var l=this.suggestionsContainer.querySelector(s.activeSuggestion);l&&(t=l,n=this.suggestionsContainer,r=n.offsetHeight,o=t.offsetHeight,(a=t.offsetTop-n.scrollTop)+o>=r?n.scrollTop+=a-r+o:a<0&&(n.scrollTop+=a))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions.map(function(e,n){return a.default.createElement("li",{key:n,onMouseDown:t.handleClick.bind(null,n),onTouchStart:t.handleClick.bind(null,n),onMouseOver:t.handleHover.bind(null,n),className:n===t.selectedIndex?t.classNames.activeSuggestion:""},this.renderSuggestion(e,t.query))}.bind(this)),r=t.shouldRenderSuggestions||this.shouldRenderSuggestions;return 0!==n.length&&r(t.query)?a.default.createElement("div",{ref:function(t){e.suggestionsContainer=t},className:this.props.classNames.suggestions},a.default.createElement("ul",null," ",n," ")):null}}]),t}(o.Component);p.propTypes={query:i.default.string.isRequired,selectedIndex:i.default.number.isRequired,suggestions:i.default.array.isRequired,handleClick:i.default.func.isRequired,handleHover:i.default.func.isRequired,minQueryLength:i.default.number,shouldRenderSuggestions:i.default.func,isFocused:i.default.bool.isRequired,classNames:i.default.object,labelField:i.default.string.isRequired,renderSuggestion:i.default.func},p.defaultProps={minQueryLength:2},t.default=p},function(e,t,n){"use strict";var r=n(112);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(114),o=n(31),a=/[&<>"']/g,i=RegExp(a.source);e.exports=function(e){return(e=o(e))&&i.test(e)?e.replace(a,r):e}},function(e,t,n){var r=n(115)({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(7),o=n(117),a=n(10),i=n(118),u=r?r.prototype:void 0,s=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(2),o=n(3);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(4),a=f(o),i=n(14),u=f(n(11)),s=f(n(32)),l=n(33),c=f(n(121));function f(e){return e&&e.__esModule?e:{default:e}}var p="tag",d=function(e){var t=(0,o.useRef)(null),n=e.readOnly,u=e.tag,f=e.classNames,d=e.index,h=(0,i.useDrag)((function(){return{type:p,collect:function(e){return{isDragging:!!e.isDragging()}},item:e,canDrag:function(){return(0,l.canDrag)(e)}}})),g=r(h,2),v=g[0].isDragging,y=g[1],b=(0,i.useDrop)((function(){return{accept:p,drop:function(t,n){var r=t.index,o=d;r!==o&&e.moveTag(r,o)},canDrop:function(e){return(0,l.canDrop)(e)}}}));y((0,r(b,2)[1])(t));var _=e.tag[e.labelField],m=u.className,x=void 0===m?"":m,O=v?0:1;return a.default.createElement("span",{ref:t,className:(0,s.default)("tag-wrapper",f.tag,x),style:{opacity:O,cursor:(0,l.canDrag)(e)?"move":"auto"},onClick:e.onTagClicked,onTouchStart:e.onTagClicked},_,a.default.createElement(c.default,{tag:e.tag,className:f.remove,removeComponent:e.removeComponent,onRemove:e.onDelete,readOnly:n,index:d,onKeyDown:onkeydown}))};d.propTypes={labelField:u.default.string,onDelete:u.default.func.isRequired,tag:u.default.shape({id:u.default.string.isRequired,className:u.default.string,key:u.default.string}),moveTag:u.default.func,removeComponent:u.default.func,onTagClicked:u.default.func,classNames:u.default.object,readOnly:u.default.bool,index:u.default.number.isRequired},d.defaultProps={labelField:"text",readOnly:!1},t.default=d},function(e,t,n){var r=n(31),o=/[\\^$.*+?()[\]{}|]/g,a=RegExp(o.source);e.exports=function(e){return(e=r(e))&&a.test(e)?e.replace(o,"\\$&"):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(4)),o=i(n(11)),a=n(34);function i(e){return e&&e.__esModule?e:{default:e}}var u=String.fromCharCode(215),s=function(e){var t=e.readOnly,n=e.removeComponent,o=e.onRemove,i=e.className,s=e.tag,l=e.index,c=function(e){if(a.KEYS.ENTER.includes(e.keyCode)||e.keyCode===a.KEYS.SPACE)return e.preventDefault(),void e.stopPropagation();e.keyCode===a.KEYS.BACKSPACE&&o(e)};if(t)return r.default.createElement("span",null);var f="Tag at index "+l+" with value "+s.id+" focussed. Press backspace to remove";if(n){var p=n;return r.default.createElement(p,{onRemove:o,onKeyDown:c,className:i,"aria-label":f,tag:s,index:l})}return r.default.createElement("button",{onClick:o,onKeyDown:c,className:i,"aria-label":f},u)};s.propTypes={className:o.default.string,onRemove:o.default.func.isRequired,readOnly:o.default.bool,removeComponent:o.default.func,tag:o.default.shape({id:o.default.string.isRequired,className:o.default.string,key:o.default.string}),index:o.default.number.isRequired},t.default=s}])}));
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var i=o.apply(null,r);i&&e.push(i)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildRegExpFromDelimiters=function(e){var t=e.map((function(e){var t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)})).join(""),n=(0,a.default)(t);return new RegExp("["+n+"]+")},t.canDrag=function(e){var t=e.moveTag,n=e.readOnly,r=e.allowDragDrop;return void 0!==t&&!n&&r},t.canDrop=function(e){var t=e.readOnly,n=e.allowDragDrop;return!t&&n};var r,o=n(120),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.KEYS={ENTER:[10,13],TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,ESCAPE:27,SPACE:32,COMMA:188},t.DEFAULT_PLACEHOLDER="Press enter to add new tag",t.DEFAULT_LABEL_FIELD="text",t.DEFAULT_CLASSNAMES={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion"},t.INPUT_FIELD_POSITIONS={INLINE:"inline",TOP:"top",BOTTOM:"bottom"}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(4),i=b(a),u=n(14),s=n(36),l=b(n(15)),c=b(n(30)),f=b(n(101)),p=b(n(110)),d=b(n(11)),h=b(n(32)),g=b(n(119)),v=n(33),y=n(34);function b(e){return e&&e.__esModule?e:{default:e}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));x.call(n),e.inline||console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.");var r=e.suggestions;return n.state={suggestions:r,query:"",isFocused:!1,selectedIndex:-1,selectionMode:!1,ariaLiveStatus:""},n.reactTagsRef=(0,a.createRef)(),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleChange=n.handleChange.bind(n),n.moveTag=n.moveTag.bind(n),n.handlePaste=n.handlePaste.bind(n),n.handleSuggestionHover=n.handleSuggestionHover.bind(n),n.handleSuggestionClick=n.handleSuggestionClick.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.autofocus,n=e.readOnly;t&&!n&&this.resetAndFocusInput()}},{key:"componentDidUpdate",value:function(e){(0,l.default)(e.suggestions,this.props.suggestions)||this.updateSuggestions()}},{key:"handleDelete",value:function(e,t){t.preventDefault(),t.stopPropagation();var n=this.props.tags.slice();if(0!==n.length){var r="Tag at index "+e+" with value "+n[e].id+" deleted.";this.props.handleDelete(e,t);var o=this.reactTagsRef.current.querySelectorAll(".ReactTags__remove"),a=void 0,i=void 0,u=void 0;0===e&&n.length>1?(a=o[0],i=0,u=n[1]):(a=o[e-1],u=n[i=e-1]),a||(i=-1,a=this.textInput),r+=i>=0?" Tag at index "+i+" with value "+u.id+" focussed. Press backspace to remove":"Input focussed. Press enter to add a new tag",a.focus(),this.setState({ariaLiveStatus:r})}}},{key:"handleTagClick",value:function(e,t){this.props.handleTagClick&&this.props.handleTagClick(e,t)}},{key:"handleChange",value:function(e){this.props.handleInputChange&&this.props.handleInputChange(e.target.value);var t=e.target.value.trim();this.setState({query:t},this.updateSuggestions)}},{key:"handleFocus",value:function(e){var t=e.target.value;this.props.handleInputFocus&&this.props.handleInputFocus(t),this.setState({isFocused:!0})}},{key:"handleBlur",value:function(e){var t=e.target.value;this.props.handleInputBlur&&(this.props.handleInputBlur(t),this.textInput&&(this.textInput.value="")),this.setState({isFocused:!1})}},{key:"handleKeyDown",value:function(e){var t=this.state,n=t.query,r=t.selectedIndex,o=t.suggestions,a=t.selectionMode;if(e.keyCode===y.KEYS.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.setState({selectedIndex:-1,selectionMode:!1,suggestions:[]})),-1!==this.props.delimiters.indexOf(e.keyCode)&&!e.shiftKey){e.keyCode===y.KEYS.TAB&&""===n||e.preventDefault();var i=a&&-1!==r?o[r]:_({id:n},this.props.labelField,n);""!==i&&this.addTag(i)}e.keyCode===y.KEYS.BACKSPACE&&""===n&&this.props.allowDeleteFromEmptyInput&&this.handleDelete(this.props.tags.length-1,e),e.keyCode===y.KEYS.UP_ARROW&&(e.preventDefault(),this.setState({selectedIndex:r<=0?o.length-1:r-1,selectionMode:!0})),e.keyCode===y.KEYS.DOWN_ARROW&&(e.preventDefault(),this.setState({selectedIndex:0===o.length?-1:(r+1)%o.length,selectionMode:!0}))}},{key:"handlePaste",value:function(e){var t=this;if(this.props.allowAdditionFromPaste){e.preventDefault();var n=e.clipboardData||window.clipboardData,r=n.getData("text"),o=this.props.maxLength,a=void 0===o?r.length:o,i=Math.min(a,r.length),u=n.getData("text").substr(0,i),s=(0,v.buildRegExpFromDelimiters)(this.props.delimiters),l=u.split(s);(0,f.default)(l).forEach((function(e){return t.addTag(_({id:e},t.props.labelField,e))}))}}},{key:"handleSuggestionClick",value:function(e){this.addTag(this.state.suggestions[e])}},{key:"handleSuggestionHover",value:function(e){this.setState({selectedIndex:e,selectionMode:!0})}},{key:"moveTag",value:function(e,t){var n=this.props.tags[e];this.props.handleDrag(n,e,t)}},{key:"render",value:function(){var e=this,t=this.getTagItems(),n=r({},y.DEFAULT_CLASSNAMES,this.props.classNames),o=this.state.query.trim(),a=this.state.selectedIndex,u=this.state.suggestions,s=this.props,l=s.placeholder,c=s.name,f=s.id,d=s.maxLength,g=s.inline,v=s.inputFieldPosition,b=s.inputValue,_=s.inputProps,m=g?v:y.INPUT_FIELD_POSITIONS.BOTTOM,x=this.props.readOnly?null:i.default.createElement("div",{className:n.tagInput},i.default.createElement("input",r({},_,{ref:function(t){e.textInput=t},className:n.tagInputField,type:"text",placeholder:l,"aria-label":l,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,name:c,id:f,maxLength:d,value:b,"data-automation":"input","data-testid":"input"})),i.default.createElement(p.default,{query:o,suggestions:u,labelField:this.props.labelField,selectedIndex:a,handleClick:this.handleSuggestionClick,handleHover:this.handleSuggestionHover,minQueryLength:this.props.minQueryLength,shouldRenderSuggestions:this.props.shouldRenderSuggestions,isFocused:this.state.isFocused,classNames:n,renderSuggestion:this.props.renderSuggestion}));return i.default.createElement("div",{className:(0,h.default)(n.tags,"react-tags-wrapper"),ref:this.reactTagsRef},i.default.createElement("p",{role:"alert",className:"sr-only",style:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",margin:"-1px",padding:0,width:"1px",height:"1px",border:0}},this.state.ariaLiveStatus),m===y.INPUT_FIELD_POSITIONS.TOP&&x,i.default.createElement("div",{className:n.selected},t,m===y.INPUT_FIELD_POSITIONS.INLINE&&x),m===y.INPUT_FIELD_POSITIONS.BOTTOM&&x)}}]),t}(a.Component);m.propTypes={placeholder:d.default.string,labelField:d.default.string,suggestions:d.default.arrayOf(d.default.shape({id:d.default.string.isRequired})),delimiters:d.default.arrayOf(d.default.number),autofocus:d.default.bool,inline:d.default.bool,inputFieldPosition:d.default.oneOf([y.INPUT_FIELD_POSITIONS.INLINE,y.INPUT_FIELD_POSITIONS.TOP,y.INPUT_FIELD_POSITIONS.BOTTOM]),handleDelete:d.default.func,handleAddition:d.default.func,handleDrag:d.default.func,handleFilterSuggestions:d.default.func,handleTagClick:d.default.func,allowDeleteFromEmptyInput:d.default.bool,allowAdditionFromPaste:d.default.bool,allowDragDrop:d.default.bool,handleInputChange:d.default.func,handleInputFocus:d.default.func,handleInputBlur:d.default.func,minQueryLength:d.default.number,shouldRenderSuggestions:d.default.func,removeComponent:d.default.func,autocomplete:d.default.oneOfType([d.default.bool,d.default.number]),readOnly:d.default.bool,classNames:d.default.object,name:d.default.string,id:d.default.string,maxLength:d.default.number,inputValue:d.default.string,tags:d.default.arrayOf(d.default.shape({id:d.default.string.isRequired,className:d.default.string})),allowUnique:d.default.bool,renderSuggestion:d.default.func,inputProps:d.default.object},m.defaultProps={placeholder:y.DEFAULT_PLACEHOLDER,labelField:y.DEFAULT_LABEL_FIELD,suggestions:[],delimiters:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(y.KEYS.ENTER),[y.KEYS.TAB]),autofocus:!0,inline:!0,inputFieldPosition:y.INPUT_FIELD_POSITIONS.INLINE,handleDelete:c.default,handleAddition:c.default,allowDeleteFromEmptyInput:!0,allowAdditionFromPaste:!0,autocomplete:!1,readOnly:!1,allowUnique:!0,allowDragDrop:!0,tags:[],inputProps:{}};var x=function(){var e=this;this.filteredSuggestions=function(t){var n=e.props.suggestions;if(e.props.allowUnique){var r=e.props.tags.map((function(e){return e.id.toLowerCase()}));n=n.filter((function(e){return!r.includes(e.id.toLowerCase())}))}if(e.props.handleFilterSuggestions)return e.props.handleFilterSuggestions(t,n);var o=n.filter((function(n){return 0===e.getQueryIndex(t,n)})),a=n.filter((function(n){return e.getQueryIndex(t,n)>0}));return o.concat(a)},this.getQueryIndex=function(t,n){return n[e.props.labelField].toLowerCase().indexOf(t.toLowerCase())},this.resetAndFocusInput=function(){e.setState({query:""}),e.textInput&&(e.textInput.value="",e.textInput.focus())},this.updateSuggestions=function(){var t=e.state,n=t.query,r=t.selectedIndex,o=e.filteredSuggestions(n);e.setState({suggestions:o,selectedIndex:r>=o.length?o.length-1:r})},this.addTag=function(t){var n=e.props,r=n.tags,o=n.labelField,a=n.allowUnique;if(t.id&&t[o]){var i=r.map((function(e){return e.id.toLowerCase()}));if(!(a&&i.indexOf(t.id.toLowerCase())>=0)){if(e.props.autocomplete){var u=e.filteredSuggestions(t[o]);(1===e.props.autocomplete&&1===u.length||!0===e.props.autocomplete&&u.length)&&(t=u[0])}e.props.handleAddition(t),e.setState({query:"",selectionMode:!1,selectedIndex:-1}),e.resetAndFocusInput()}}},this.getTagItems=function(){var t=e.props,n=t.classNames,o=t.tags,a=t.labelField,u=t.removeComponent,s=t.readOnly,l=t.allowDragDrop,c=l?e.moveTag:null;return o.map((function(t,o){return i.default.createElement(g.default,{key:o,index:o,tag:t,labelField:a,onDelete:e.handleDelete.bind(e,o),moveTag:c,removeComponent:u,onTagClicked:e.handleTagClick.bind(e,o),readOnly:s,classNames:r({},y.DEFAULT_CLASSNAMES,n),allowDragDrop:l})}))}};e.exports={WithContext:function(e){var t=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,[]);return i.default.createElement(u.DndProvider,{backend:s.HTML5Backend},i.default.createElement(m,t))},WithOutContext:m,KEYS:y.KEYS}},function(e,t){e.exports=n},function(e,t,n){var r=n(38),o=n(3);e.exports=function e(t,n,a,i,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,a,i,e,u))}},function(e,t,n){var r=n(39),o=n(22),a=n(72),i=n(75),u=n(97),s=n(10),l=n(25),c=n(27),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,g){var v=s(e),y=s(t),b=v?"[object Array]":u(e),_=y?"[object Array]":u(t),m=(b="[object Arguments]"==b?f:b)==f,x=(_="[object Arguments]"==_?f:_)==f,O=b==_;if(O&&l(e)){if(!l(t))return!1;v=!0,m=!1}if(O&&!m)return g||(g=new r),v||c(e)?o(e,t,n,d,h,g):a(e,t,b,n,d,h,g);if(!(1&n)){var S=m&&p.call(e,"__wrapped__"),j=x&&p.call(t,"__wrapped__");if(S||j){var T=S?e.value():e,w=j?t.value():t;return g||(g=new r),h(T,w,n,d,g)}}return!!O&&(g||(g=new r),i(e,t,n,d,h,g))}},function(e,t,n){var r=n(5),o=n(45),a=n(46),i=n(47),u=n(48),s=n(49);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(6),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(6);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(6);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(6);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(5);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(5),o=n(12),a=n(21);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(17),o=n(54),a=n(19),i=n(20),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(7),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(55),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(0)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(58),o=n(5),a=n(12);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(59),o=n(60),a=n(61),i=n(62),u=n(63);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=a,s.prototype.has=i,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(8);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(8),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(8),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(8);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(9);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(9);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(9);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(9);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(7),o=n(73),a=n(16),i=n(22),u=n(74),s=n(13),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=u;case"[object Set]":var h=1&r;if(d||(d=s),e.size!=t.size&&!h)return!1;var g=p.get(e);if(g)return g==t;r|=2,p.set(e,t);var v=i(d(e),d(t),r,l,f,p);return p.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t,n){var r=n(0).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(76),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,u){var s=1&n,l=r(e),c=l.length;if(c!=r(t).length&&!s)return!1;for(var f=c;f--;){var p=l[f];if(!(s?p in t:o.call(t,p)))return!1}var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var g=!0;u.set(e,t),u.set(t,e);for(var v=s;++f<c;){var y=e[p=l[f]],b=t[p];if(a)var _=s?a(b,y,p,t,e,u):a(y,b,p,e,t,u);if(!(void 0===_?y===b||i(y,b,n,a,u):_)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var m=e.constructor,x=t.constructor;m==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(g=!1)}return u.delete(e),u.delete(t),g}},function(e,t,n){var r=n(77),o=n(79),a=n(82);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(78),o=n(10);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(80),o=n(81),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,u=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return a.call(e,t)})))}:o;e.exports=u},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(83),o=n(92),a=n(96);e.exports=function(e){return a(e)?r(e):o(e)}},function(e,t,n){var r=n(84),o=n(85),a=n(10),i=n(25),u=n(88),s=n(27),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),c=!n&&o(e),f=!n&&!c&&i(e),p=!n&&!c&&!f&&s(e),d=n||c||f||p,h=d?r(e.length,String):[],g=h.length;for(var v in e)!t&&!l.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,g))||h.push(v);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(86),o=n(3),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){var r=n(2),o=n(3);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(2),o=n(28),a=n(3),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(18),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(26)(e))},function(e,t,n){var r=n(93),o=n(94),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(95)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(17),o=n(28);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(98),o=n(12),a=n(99),i=n(29),u=n(100),s=n(2),l=n(20),c=l(r),f=l(o),p=l(a),d=l(i),h=l(u),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=g(new o)||a&&"[object Promise]"!=g(a.resolve())||i&&"[object Set]"!=g(new i)||u&&"[object WeakMap]"!=g(new u))&&(g=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(1)(n(0),"DataView");e.exports=r},function(e,t,n){var r=n(1)(n(0),"Promise");e.exports=r},function(e,t,n){var r=n(1)(n(0),"WeakMap");e.exports=r},function(e,t,n){var r=n(102);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t,n){var r=n(23),o=n(103),a=n(108),i=n(24),u=n(109),s=n(13);e.exports=function(e,t,n){var l=-1,c=o,f=e.length,p=!0,d=[],h=d;if(n)p=!1,c=a;else if(f>=200){var g=t?null:u(e);if(g)return s(g);p=!1,c=i,h=new r}else h=t?[]:d;e:for(;++l<f;){var v=e[l],y=t?t(v):v;if(v=n||0!==v?v:0,p&&y==y){for(var b=h.length;b--;)if(h[b]===y)continue e;t&&h.push(y),d.push(v)}else c(h,y,n)||(h!==d&&h.push(y),d.push(v))}return d}},function(e,t,n){var r=n(104);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(105),o=n(106),a=n(107);e.exports=function(e,t,n){return t==t?a(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(29),o=n(30),a=n(13),i=r&&1/a(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(4),a=l(o),i=l(n(11)),u=l(n(15)),s=l(n(113));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;c(this,t);for(var o=arguments.length,i=Array(o),u=0;u<o;u++)i[u]=arguments[u];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.markIt=function(e,t){var n=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&");return{__html:e[r.props.labelField].replace(RegExp(n,"gi"),(function(e){return"<mark>"+(0,s.default)(e)+"</mark>"}))}},r.shouldRenderSuggestions=function(e){var t=r.props,n=t.minQueryLength,o=t.isFocused;return e.length>=n&&o},r.renderSuggestion=function(e,t){var n=r.props.renderSuggestion;return"function"==typeof n?n(e,t):a.default.createElement("span",{dangerouslySetInnerHTML:r.markIt(e,t)})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.shouldRenderSuggestions||this.shouldRenderSuggestions;return t.isFocused!==e.isFocused||!(0,u.default)(t.suggestions,e.suggestions)||n(e.query)||n(e.query)!==n(t.query)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.selectedIndex,s=i.classNames;if(this.suggestionsContainer&&e.selectedIndex!==u){var l=this.suggestionsContainer.querySelector(s.activeSuggestion);l&&(t=l,n=this.suggestionsContainer,r=n.offsetHeight,o=t.offsetHeight,(a=t.offsetTop-n.scrollTop)+o>=r?n.scrollTop+=a-r+o:a<0&&(n.scrollTop+=a))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions.map(function(e,n){return a.default.createElement("li",{key:n,onMouseDown:t.handleClick.bind(null,n),onTouchStart:t.handleClick.bind(null,n),onMouseOver:t.handleHover.bind(null,n),className:n===t.selectedIndex?t.classNames.activeSuggestion:""},this.renderSuggestion(e,t.query))}.bind(this)),r=t.shouldRenderSuggestions||this.shouldRenderSuggestions;return 0!==n.length&&r(t.query)?a.default.createElement("div",{ref:function(t){e.suggestionsContainer=t},className:this.props.classNames.suggestions},a.default.createElement("ul",null," ",n," ")):null}}]),t}(o.Component);p.propTypes={query:i.default.string.isRequired,selectedIndex:i.default.number.isRequired,suggestions:i.default.array.isRequired,handleClick:i.default.func.isRequired,handleHover:i.default.func.isRequired,minQueryLength:i.default.number,shouldRenderSuggestions:i.default.func,isFocused:i.default.bool.isRequired,classNames:i.default.object,labelField:i.default.string.isRequired,renderSuggestion:i.default.func},p.defaultProps={minQueryLength:2},t.default=p},function(e,t,n){"use strict";var r=n(112);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(114),o=n(31),a=/[&<>"']/g,i=RegExp(a.source);e.exports=function(e){return(e=o(e))&&i.test(e)?e.replace(a,r):e}},function(e,t,n){var r=n(115)({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(7),o=n(117),a=n(10),i=n(118),u=r?r.prototype:void 0,s=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(2),o=n(3);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(4),a=f(o),i=n(14),u=f(n(11)),s=f(n(32)),l=n(33),c=f(n(121));function f(e){return e&&e.__esModule?e:{default:e}}var p="tag",d=function(e){var t=(0,o.useRef)(null),n=e.readOnly,u=e.tag,f=e.classNames,d=e.index,h=(0,i.useDrag)((function(){return{type:p,collect:function(e){return{isDragging:!!e.isDragging()}},item:e,canDrag:function(){return(0,l.canDrag)(e)}}})),g=r(h,2),v=g[0].isDragging,y=g[1],b=(0,i.useDrop)((function(){return{accept:p,drop:function(t,n){var r=t.index,o=d;r!==o&&e.moveTag(r,o)},canDrop:function(e){return(0,l.canDrop)(e)}}}));y((0,r(b,2)[1])(t));var _=e.tag[e.labelField],m=u.className,x=void 0===m?"":m,O=v?0:1;return a.default.createElement("span",{ref:t,className:(0,s.default)("tag-wrapper",f.tag,x),style:{opacity:O,cursor:(0,l.canDrag)(e)?"move":"auto"},onClick:e.onTagClicked,onTouchStart:e.onTagClicked},_,a.default.createElement(c.default,{tag:e.tag,className:f.remove,removeComponent:e.removeComponent,onRemove:e.onDelete,readOnly:n,index:d,onKeyDown:onkeydown}))};d.propTypes={labelField:u.default.string,onDelete:u.default.func.isRequired,tag:u.default.shape({id:u.default.string.isRequired,className:u.default.string,key:u.default.string}),moveTag:u.default.func,removeComponent:u.default.func,onTagClicked:u.default.func,classNames:u.default.object,readOnly:u.default.bool,index:u.default.number.isRequired},d.defaultProps={labelField:"text",readOnly:!1},t.default=d},function(e,t,n){var r=n(31),o=/[\\^$.*+?()[\]{}|]/g,a=RegExp(o.source);e.exports=function(e){return(e=r(e))&&a.test(e)?e.replace(o,"\\$&"):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(4)),o=i(n(11)),a=n(34);function i(e){return e&&e.__esModule?e:{default:e}}var u=String.fromCharCode(215),s=function(e){var t=e.readOnly,n=e.removeComponent,o=e.onRemove,i=e.className,s=e.tag,l=e.index,c=function(e){if(a.KEYS.ENTER.includes(e.keyCode)||e.keyCode===a.KEYS.SPACE)return e.preventDefault(),void e.stopPropagation();e.keyCode===a.KEYS.BACKSPACE&&o(e)};if(t)return r.default.createElement("span",null);var f="Tag at index "+l+" with value "+s.id+" focussed. Press backspace to remove";if(n){var p=n;return r.default.createElement(p,{onRemove:o,onKeyDown:c,className:i,"aria-label":f,tag:s,index:l})}return r.default.createElement("button",{onClick:o,onKeyDown:c,className:i,type:"button","aria-label":f},u)};s.propTypes={className:o.default.string,onRemove:o.default.func.isRequired,readOnly:o.default.bool,removeComponent:o.default.func,tag:o.default.shape({id:o.default.string.isRequired,className:o.default.string,key:o.default.string}),index:o.default.number.isRequired},t.default=s}])}));
//# sourceMappingURL=ReactTags.min.js.map
{
"name": "react-tag-input",
"version": "6.7.1",
"version": "6.7.2",
"description": "React tags is a fantastically simple tagging component for your React projects",

@@ -10,2 +10,6 @@ "main": "dist-modules/components/ReactTags.js",

],
"funding": {
"type": "individual",
"url": "https://www.buymeacoffee.com/aakansha"
},
"sideEffects": false,

@@ -45,3 +49,3 @@ "scripts": {

"devDependencies": {
"@testing-library/react": "^11.2.7",
"@testing-library/react": "^12.0.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",

@@ -62,2 +66,3 @@ "babel-cli": "^6.26.0",

"enzyme": "^3.11.0",
"enzyme-to-json": "^3.6.2",
"eslint": "^7.3.1",

@@ -64,0 +69,0 @@ "eslint-plugin-jest": "^24.3.6",

@@ -6,4 +6,3 @@ # React tags

[![npm downloads](https://img.shields.io/npm/dm/react-tag-input.svg?style=flat-square)](https://www.npmjs.com/package/react-tag-input)
[![build status](https://img.shields.io/travis/react-tags/react-tags.svg?style=flat-square)](https://travis-ci.org/react-tags/react-tags)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Build Status](https://travis-ci.com/react-tags/react-tags.svg?branch=master)](https://travis-ci.com/react-tags/react-tags)[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
<a href="https://codeclimate.com/github/react-tags/react-tags/maintainability"><img src="https://api.codeclimate.com/v1/badges/b9edb2810b02bb845d20/maintainability" /></a>

@@ -22,2 +21,6 @@ <a href="https://codeclimate.com/github/react-tags/react-tags/test_coverage"><img src="https://api.codeclimate.com/v1/badges/b9edb2810b02bb845d20/test_coverage" /></a>

## Why
Started by [Prakhar Srivastav](https://github.com/prakhar1989) and later maintained by [Aakansha Doshi](https://github.com/ad1992).
In Prakhar's words here is why he started it👇🏻
Because I was looking for an excuse to build a standalone component and publish it in the wild? To be honest, I needed a tagging component that provided the above features for my [React-Surveyman](http://github.com/prakhar1989/react-surveyman) project. Since I was unable to find one which met my requirements (and the fact that I generally enjoy re-inventing the wheel) this is what I came up with.

@@ -29,4 +32,11 @@

Check it out [here](https://stackblitz.com/edit/react-tag-input-1nelrc)
Check it out [here](http://www.jinno.io/app/6?source=react-tag-input)
## Support
If you like this library, you can support to help it improve:)
<a href="https://www.buymeacoffee.com/aakansha" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-red.png" alt="Buy Me A Coffee" height=40></a>
## Installation

@@ -147,32 +157,33 @@ You can use npm

--- | --- | --- | ---
|[`tags`](#tags) | `Array` | `[]` | An array of tags that are displayed as pre-selected
|[`suggestions`](#suggestions) | `Array` | `[]` | An array of suggestions that are used as basis for showing suggestions
|[`delimiters`](#delimiters) | `Array` | `[ENTER, TAB]` | Specifies which characters should terminate tags input
|[`placeholder`](#placeholder) | `String` | `Add new tag` | The placeholder shown for the input
|[`labelField`](#labelField) | `String` | `text` | Provide an alternative `label` property for the tags
|[`handleAddition`](#handleAddition) | `Function` | `undefined` | Function called when the user wants to add a tag (required)
|[`handleDelete`](#handleDelete) | `Function` | `undefined` | Function called when the user wants to delete a tag (required)
|[`handleDrag`](#handleDrag) | `Function` | `undefined` | Function called when the user drags a tag
|[`handleFilterSuggestions`](#handleFilterSuggestions) | `Function` | `undefined` | Function called when filtering suggestions
|[`handleTagClick`](#handleTagClick) | `Function` | `undefined` | Function called when the user wants to know which tag was clicked
|[`autofocus`](#autofocus) | `Boolean` | `true` | Boolean value to control whether the text-input should be autofocused on mount
|[`allowDeleteFromEmptyInput`](#allowDeleteFromEmptyInput) | `Boolean` | `true` | Boolean value to control whether tags should be deleted when the 'Delete' key is pressed in an empty Input Box
|[`handleInputChange`](#handleInputChange) | `Function` | `undefined` | Event handler for input onChange
|[`handleInputFocus`](#handleInputFocus) | `Function` | `undefined` | Event handler for input onFocus
|[`handleInputBlur`](#handleInputBlur) | `Function` | `undefined` | Event handler for input onBlur
|[`minQueryLength`](#minQueryLength) | `Number` | `2` | How many characters are needed for suggestions to appear
|[`tags`](#tags) | `Array` | `[]` | An array of tags that are displayed as pre-selected. Here is a [demo](http://www.jinno.io/app/6/tags?source=react-tag-input).|
|[`suggestions`](#suggestions) | `Array` | `[]` | An array of suggestions that are used as basis for showing suggestions. Here is a [demo](http://www.jinno.io/app/6/suggestions?source=react-tag-input).
|[`delimiters`](#delimiters) | `Array` | `[ENTER, TAB]` | Specifies which characters should terminate tags input.
|[`placeholder`](#placeholder) | `String` | `Add new tag` | The placeholder shown for the input. Here is a [demo](http://www.jinno.io/app/6/placeholder?source=react-tag-input).
|[`labelField`](#labelField) | `String` | `text` | Provide an alternative `label` property for the tags. Here is a [demo](http://www.jinno.io/app/6/labelField?source=react-tag-input)
|[`handleAddition`](#handleAddition) | `Function` | `undefined` | Function called when the user wants to add a tag (required).
|[`handleDelete`](#handleDelete) | `Function` | `undefined` | Function called when the user wants to delete a tag (required).
|[`handleDrag`](#handleDrag) | `Function` | `undefined` | Function called when the user drags a tag.
|[`handleFilterSuggestions`](#handleFilterSuggestions) | `Function` | `undefined` | Function called when filtering suggestions.
|[`handleTagClick`](#handleTagClick) | `Function` | `undefined` | Function called when the user wants to know which tag was clicked.
|[`autofocus`](#autofocus) | `Boolean` | `true` | Boolean value to control whether the text-input should be autofocused on mount. Here is a [demo](http://www.jinno.io/app/6/autofocus?source=react-tag-input).
|[`allowDeleteFromEmptyInput`](#allowDeleteFromEmptyInput) | `Boolean` | `true` | Boolean value to control whether tags should be deleted when the 'Delete' key is pressed in an empty Input Box. Here is a [demo](http://www.jinno.io/app/6/allowDeleteFromEmptyInput?source=react-tag-input).
|[`handleInputChange`](#handleInputChange) | `Function` | `undefined` | Event handler for input onChange.
|[`handleInputFocus`](#handleInputFocus) | `Function` | `undefined` | Event handler for input onFocus.
|[`handleInputBlur`](#handleInputBlur) | `Function` | `undefined` | Event handler for input onBlur.
|[`minQueryLength`](#minQueryLength) | `Number` | `2` | How many characters are needed for suggestions to appear. Here is a [demo](http://www.jinno.io/app/6/minQueryLength?source=react-tag-input).
|[`removeComponent`](#removeComponent) | `Function` | | Function to render custom remove component for the tags.
|[`autocomplete`](#autocomplete) | `Boolean`/`Number` | `false` | Ensure the first matching suggestion is automatically converted to a tag when a [delimiter](#delimiters) key is pressed
|[`readOnly`](#readOnly) | `Boolean` | `false` | Read-only mode without the input box and `removeComponent` and drag-n-drop features disabled
|[`name`](#name) | `String` | `undefined` | The `name` attribute added to the input
|[`id`](#id) | `String` | `undefined` | The `id` attribute added to the input
|[`maxLength`](#maxLength) | `Number` | `Infinity` | The `maxLength` attribute added to the input
|[`inline`](#inline) | `Boolean` | `true` | Render input field and selected tags in-line
|[`autocomplete`](#autocomplete) | `Boolean`/`Number` | `false` | Ensure the first matching suggestion is automatically converted to a tag when a [delimiter](#delimiters) key is pressed. Here is a [demo](http://www.jinno.io/app/6/autocomplete?source=react-tag-input).
|[`readOnly`](#readOnly) | `Boolean` | `false` | Read-only mode without the input box and `removeComponent` and drag-n-drop features disabled. Here is a [demo](http://www.jinno.io/app/6/readOnly?source=react-tag-input).
|[`name`](#name) | `String` | `undefined` | The `name` attribute added to the input . Here is a [demo](http://www.jinno.io/app/6/name?source=react-tag-input).
|[`id`](#id) | `String` | `undefined` | The `id` attribute added to the input . Here is a [demo](http://www.jinno.io/app/6/id?source=react-tag-input).
|[`maxLength`](#maxLength) | `Number` | `Infinity` | The `maxLength` attribute added to the input. Here is a [demo](http://www.jinno.io/app/6/maxLength?source=react-tag-input).
|[`inline`](#inline) | `Boolean` | `true` | Render input field and selected tags in-line. Here is a [demo](http://www.jinno.io/app/6/inline?source=react-tag-input).
|[`inputFieldPosition`](#inputFieldPosition) | `String` | `inline` | Specify position of input field relative to tags
|[`allowUnique`](#allowUnique) | `Boolean` | `true` | Boolean value to control whether tags should be unqiue
|[`allowDragDrop`](#allowDragDrop) | `Boolean` | `true` | Boolean value to control whether tags should have drag-n-drop features enabled
|[`renderSuggestion`](#renderSuggestion) | `Function` | `undefined` | Render prop for rendering your own suggestions
| [`inputProps`](#inputProps) | Object |`{}` | The extra attributes which are passed to the input field.
|[`allowUnique`](#allowUnique) | `Boolean` | `true` | Boolean value to control whether tags should be unqiue. Here is a [demo](http://www.jinno.io/app/6/allowUnique?source=react-tag-input).
|[`allowDragDrop`](#allowDragDrop) | `Boolean` | `true` | Implies whether tags should have drag-n-drop features enabled. Here is a [demo](http://www.jinno.io/app/6/allowDragDrop?source=react-tag-input).
|[`renderSuggestion`](#renderSuggestion) | `Function` | `undefined` | Render prop for rendering your own suggestions.
| [`inputProps`](#inputProps) | Object |`{}` | The extra attributes which are passed to the input field.
| [`allowAdditionFromPaste`](#allowAdditionFromPaste) | `boolean` | `true` | Implies whether to allow paste action when adding tags. Here is a [demo](http://www.jinno.io/app/6/allowAdditionFromPaste?source=react-tag-input).
### tags
### tags
An array of tags that are displayed as pre-selected. Each tag should have an `id` property, property for the label, which is specified by the [`labelField`](#labelFieldOption) and class for label, which is specified by `className`.

@@ -190,2 +201,3 @@

```
Here is a [demo](http://www.jinno.io/app/6/tags?source=react-tag-input).

@@ -205,2 +217,3 @@ ### suggestions

```
Here is a [demo](http://www.jinno.io/app/6/suggestions?source=react-tag-input).

@@ -221,3 +234,2 @@ ### delimiters

### placeholder

@@ -229,2 +241,3 @@ The placeholder shown for the input.

```
Here is a [demo](http://www.jinno.io/app/6/placeholder?source=react-tag-input).

@@ -244,4 +257,4 @@ ### labelField

This is useful if your data uses the `text` property for something else.
Here is a [demo](http://www.jinno.io/app/6/labelField?source=react-tag-input).
### handleAddition

@@ -255,3 +268,2 @@ Function called when the user wants to add a tag (either a click, a tab press or carriage return)

```
### handleDelete

@@ -265,3 +277,2 @@ Function called when the user wants to delete a tag

```
### handleDrag

@@ -319,2 +330,3 @@ If you want tags to be draggable, you need to provide this function.

```
Here is a [demo](http://www.jinno.io/app/6/autofocus?source=react-tag-input).

@@ -329,2 +341,3 @@ ### allowDeleteFromEmptyInput

```
Here is a [demo](http://www.jinno.io/app/6/allowDeleteFromEmptyInput?source=react-tag-input).

@@ -349,2 +362,3 @@ ### handleInputChange

### handleInputBlur

@@ -362,2 +376,4 @@ Optional event handler for input onBlur

Here is a [demo](http://www.jinno.io/app/6/minQueryLength?source=react-tag-input).
### removeComponent

@@ -398,3 +414,2 @@ If you'd like to supply your own tag delete/remove element, create a React component and pass it as a property to ReactTags using the `removeComponent` option. By default, a simple anchor link with an "x" text node as its only child is rendered, but if you'd like to, say, replace this with a `<button>` element that uses an image instead of text, your markup may look something like this:

### autocomplete

@@ -408,2 +423,3 @@ Useful for enhancing data entry workflows for your users by ensuring the first matching suggestion is automatically converted to a tag when a [delimiter](#delimiters) key is pressed (such as the enter key). This option has three possible values:

This option has no effect if there are no [`suggestions`](#suggestionsOption).
Here is a [demo](http://www.jinno.io/app/6/autocomplete?source=react-tag-input).

@@ -413,2 +429,4 @@ ### readOnly

Here is a [demo](http://www.jinno.io/app/6/readOnly?source=react-tag-input).
### name

@@ -422,2 +440,3 @@ The name attribute added to the input.

```
Here is a [demo](http://www.jinno.io/app/6/name?source=react-tag-input).

@@ -432,3 +451,5 @@ ### id

```
Here is a [demo](http://www.jinno.io/app/6/id?source=react-tag-input).
### maxLength

@@ -442,2 +463,3 @@ The maxLength attribute added to the input. Specifies the maximum number of characters allowed in the input field.

```
Here is a [demo](http://www.jinno.io/app/6/maxLength?source=react-tag-input).

@@ -464,2 +486,3 @@ ### inline

_This attribute is deprecated and will be removed in v7.x.x, see [inputFieldPosition](#inputFieldPosition)._
Here is a [demo](http://www.jinno.io/app/6/inline?source=react-tag-input).

@@ -493,4 +516,7 @@ ### inputFieldPosition

### allowUnique
Here is a [demo](http://www.jinno.io/app/6/inputFieldPosition?source=react-tag-input).
### allowUnique
This prop controls whether tags should be unique.
Here is a [demo](http://www.jinno.io/app/6/allowUnique?source=react-tag-input).

@@ -500,2 +526,4 @@ ### allowDragDrop

Here is a [demo](http://www.jinno.io/app/6/allowDragDrop?source=react-tag-input).
### renderSuggestion

@@ -523,2 +551,8 @@ This props allows to provide your own suggestion renderer and override the default one. It receives the suggestion and the query string as parameters. For example:

### allowAdditionFromPaste
This prop implies whether to allow paste action for adding tags. Defaults to `true`.
Here is a [demo](http://www.jinno.io/app/6/allowAdditionFromPaste?source=react-tag-input).
## Styling

@@ -525,0 +559,0 @@ `<ReactTags>` does not come up with any styles. However, it is very easy to customize the look of the component the way you want it. By default, the component provides the following classes with which you can style -

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc