functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(t)}functiont(e,t){vari="undefined"!=typeofSymbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeofe)returnn(e,t);vari=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)returnArray.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))returnn(e,t)}(e))||t&&e&&"number"==typeofe.length){i&&(e=i);vara=0,r=function(){};return{s:r,n:function(){returna>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throwe},f:r}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varo,l=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){vare=i.next();returnl=e.done,e},e:function(e){s=!0,o=e},f:function(){try{l||null==i.return||i.return()}finally{if(s)throwo}}}}functionn(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,i=newArray(t);n<t;n++)i[n]=e[n];returni}functioni(t,n){for(vari=0;i<n.length;i++){vara=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(t,(r=a.key,o=void0,o=function(t,n){if("object"!==e(t)||null===t)returnt;vari=t[Symbol.toPrimitive];if(void0!==i){vara=i.call(t,n||"default");if("object"!==e(a))returna;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(r,"string"),"symbol"===e(o)?o:String(o)),a)}varr,o}vara,r=function(e){returndocument.querySelector(e)},o=function(e){returndocument.querySelectorAll(e)||[]},l=function(e){vart=document.createElement("template");returnt.innerHTML=e.trim(),t.content.firstChild},s=function(e){e.classList.contains("is-hidden")?e.classList.remove("is-hidden"):e.classList.add("is-hidden")},c=function(e){returne.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},u=function(){functione(t){varn=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,e),this.element=t,this.tags=[],this.options=n,this.maxTags=n.maxTags||32,this.inputNode=null,this.containerNode=null}varn,a,r;returnn=e,(a=[{key:"attach",value:function(){if(this.element.style.display="none",this.containerNode=l('<div class="tags-input"></div>'),this.inputNode=l('<input class="input" type="text" placeholder="32 tags maximum" value="" />'),this.containerNode.appendChild(this.inputNode),this.element.parentNode.insertBefore(this.containerNode,this.element.nextSibling),this.element.value){vare,n=t(this.element.value.split(","));try{for(n.s();!(e=n.n()).done;){vari=e.value;this.addTag(i)}}catch(e){n.e(e)}finally{n.f()}}this.containerNode.addEventListener("keydown",this._handleInputKeyUp.bind(this)),this.containerNode.addEventListener("click",this._handleContainerClick.bind(this))}},{key:"detach",value:function(){this.tags.clear(),this.containerNode.remove(),this.element.style.display="inline-block"}},{key:"updateHiddenInputValue",value:function(){this.element.value=this.tags.join(",")}},{key:"deleteTagNode",value:function(e){this.tags.splice(this.tags.indexOf(e.dataset.value.toLowerCase()),1),e.remove(),this.tags.length<this.maxTags&&(this.inputNode.disabled=!1)}},{key:"addTag",value:function(e){""!==(e=e.trim())&&-1===this.tags.indexOf(e.toLowerCase())&&(this.tags.push(e.toLowerCase()),this.inputNode.parentNode.insertBefore(l('<span class="tag is-info" data-value="'+c(e)+'">'+c(e)+'<span class="delete is-small" /></span>'),this.inputNode),this.tags.length>=this.maxTags&&(this.inputNode.disabled=!0))}},{key:"_handleInputKeyUp",value:function(e){vart=this.inputNode.value;"Backspace"===e.key&&""===t?this.inputNode.previousSibling&&(this.delete