vue-spear-tip 0.6.19 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +41 -41
- package/dist/{Button-pCNS2zU_.cjs → Button-DL8dzhLs.cjs} +1 -1
- package/dist/{Button-C8TgZIb0.js → Button-mNgrIBt0.js} +1 -1
- package/dist/{CodeHighlight-BtIZI4bR.cjs → CodeHighlight-CWT9ljxW.cjs} +1 -1
- package/dist/{CodeHighlight-BRxQqnpA.js → CodeHighlight-eMrWWqjO.js} +1 -1
- package/dist/{DateField-DchBLOyR.cjs → DateField-276tU7dR.cjs} +1 -1
- package/dist/{DateField-f7KPonnO.js → DateField-DJgLEfuJ.js} +2 -2
- package/dist/{Draggable-t9YiMTH7.cjs → Draggable-D9K46teR.cjs} +1 -1
- package/dist/{Draggable-5iUEhvqP.js → Draggable-xSaOZkIc.js} +1 -1
- package/dist/{Droppable-ZB7XSm7P.js → Droppable-DGc3gGXX.js} +1 -1
- package/dist/{Droppable-Bngj5bOY.cjs → Droppable-ozHn_LH7.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-CYT8CYt1.js → FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-Bbdo4olJ.cjs → FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs} +1 -1
- package/dist/{FilesArea-RivTz8Kc.js → FilesArea-C9z4gTb0.js} +2 -2
- package/dist/{FilesArea-D3T2h-W1.cjs → FilesArea-DZiv8wBT.cjs} +1 -1
- package/dist/{Scrollbar-Ocdwgu7q.js → Scrollbar-CBCuild6.js} +1 -1
- package/dist/{Scrollbar-CcoknXXp.cjs → Scrollbar-DpX61NhD.cjs} +1 -1
- package/dist/{SelectField-lNu4v9cs.js → SelectField-BN765HUF.js} +154 -148
- package/dist/{SelectField-CoX17KKw.cjs → SelectField-BTQ-c5YW.cjs} +3 -3
- package/dist/{StringField-BbygO1Co.cjs → StringField-D4k0FAo8.cjs} +1 -1
- package/dist/{StringField-NZ1i2QQ3.js → StringField-DXuKHlpt.js} +2 -2
- package/dist/{SwitchField-CtRl0F19.js → SwitchField-BdKQGeSb.js} +2 -2
- package/dist/{SwitchField-_G48VVZT.cjs → SwitchField-Dj2QpW85.cjs} +1 -1
- package/dist/{Tabs-eTgdVZbO.js → Tabs-CAbUgriG.js} +1 -1
- package/dist/{Tabs-HEDRRUS3.cjs → Tabs-Dm8Aj2Y8.cjs} +1 -1
- package/dist/{TextField-cBCKI0cn.js → TextField-BTofkhCU.js} +2 -2
- package/dist/{TextField-Bd-lZTSW.cjs → TextField-DJkk40xg.cjs} +1 -1
- package/dist/{index-DNKvxD16.js → index-Cd_DL4JD.js} +3 -3
- package/dist/{index-8tGGISA9.cjs → index-DZjDh7FL.cjs} +1 -1
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +1 -1
- package/docs/static/{Button-DefvS2tb.js → Button-8C6MeUM7.js} +1 -1
- package/docs/static/{CodeHighlight-BVIlCbbZ.js → CodeHighlight-DFeMy3ki.js} +1 -1
- package/docs/static/{DateField-DWZSZHD8.js → DateField-Cf48x5xH.js} +1 -1
- package/docs/static/{Draggable-Bm-4m4gO.js → Draggable-CS4w2yK4.js} +1 -1
- package/docs/static/{Droppable-Cnqe7Gg7.js → Droppable-wLX0xjMl.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-wRSTrf2p.js → FieldComponent.vue_vue_type_script_lang-Ig4MpRH0.js} +1 -1
- package/docs/static/{FilesArea-3G-jGZpj.js → FilesArea-Cl92W6MM.js} +1 -1
- package/docs/static/{NoSymbolIcon-CYY6lnSa.js → NoSymbolIcon-NizHqgdb.js} +1 -1
- package/docs/static/{Scrollbar-DFH9Klrw.js → Scrollbar-l6hENTT0.js} +1 -1
- package/docs/static/{SelectField-CLO6Fxfz.js → SelectField-CC7fBKuR.js} +8 -8
- package/docs/static/{StringField-BuCcwPUS.js → StringField-2LaMICQ8.js} +1 -1
- package/docs/static/{SwitchField-CyGjl8KD.js → SwitchField-DaP3PVMB.js} +1 -1
- package/docs/static/{Tabs-D1sUGHr1.js → Tabs-CBsULMP9.js} +1 -1
- package/docs/static/{TextField-BVkaf8OT.js → TextField-DUq1jGAW.js} +1 -1
- package/docs/static/index-DpXxVeQv.js +2 -0
- package/docs/static/{main-DjEys_aT.js → main-BIpS3Kki.js} +3 -3
- package/package.json +1 -1
- package/docs/static/index-DK4vwxii.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var It=Object.defineProperty;var r=(t,e)=>It(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index-8tGGISA9.cjs"),Nt=require("./FieldComponent.vue_vue_type_script_lang-Bbdo4olJ.cjs"),y=require("vue");var gt="​";function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(it,"e");function ht(t){return(function(e){if(Array.isArray(e))return it(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return it(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?it(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(ht,"i");var K={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).log.apply(t,["[Tagify]:"].concat(ht(i)))},"log"),warn:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).warn.apply(t,["[Tagify]:"].concat(ht(i)))},"warn")},Q=r(function(t,e,i,s){return t=""+t,e=""+e,s&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"a"),pt=r(function(t,e){return t&&Array.isArray(t)&&t.map(function(i){return ut(i,e)})},"s");function ut(t,e){var i,s={};for(i in t)0>e.indexOf(i)&&(s[i]=t[i]);return s}r(ut,"o");function st(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(st,"r");function ft(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ft,"l");function H(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(H,"d");function L(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(L,"c");function I(t,e,i){var s,a;function n(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(L(l[d])){L(o[d])?n(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(n,"ts"),s=t,((a=Object)!=null&&typeof Symbol<"u"&&a[Symbol.hasInstance]?a[Symbol.hasInstance](s):s instanceof a)||(t={}),n(t,e),i&&n(t,i),t}r(I,"u");function mt(){var t=[],e={},i=!0,s=!1,a=void 0;try{for(var n,o=arguments[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var l=n.value,d=!0,u=!1,h=void 0;try{for(var g,c=l[Symbol.iterator]();!(d=(g=c.next()).done);d=!0){var f=g.value;L(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,h=p}finally{try{d||c.return==null||c.return()}finally{if(u)throw h}}}}catch(p){s=!0,a=p}finally{try{i||o.return==null||o.return()}finally{if(s)throw a}}return t}r(mt,"g");function Y(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(Y,"h");var vt=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function yt(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}r(yt,"f");function z(t){var e,i=St.call(this,t),s=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&s}r(z,"v");function bt(t){return St.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(bt,"m");function St(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(St,"b");function xt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(xt,"y");function T(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:I({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(K.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(T,"w");function F(t){if(t&&t.parentNode){var e=window.getSelection(),i=e.getRangeAt(0);e.rangeCount&&(i.setStartAfter(t),i.collapse(!0),e.removeAllRanges(),e.addRange(i))}}r(F,"T");function ct(t,e){t.forEach(function(i){if(T(i.previousSibling)||!i.previousSibling){var s=document.createTextNode("");i.before(s),e&&F(s)}})}r(ct,"O");var at={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1,inputAriaLabel:"Tags input field"},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function Et(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Et,"D");function Mt(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){Et(t,a,i[a])})}return t}r(Mt,"S");function At(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);a.push.apply(a,n)}return a})(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}r(At,"I");function nt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(nt,"E");function _t(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(_t,"M");function kt(t){return(function(e){if(Array.isArray(e))return nt(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return nt(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?nt(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(kt,"N");function Ct(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Ct,"A");var Z,X,Vt=(Z=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){_t(t,a,i[a])})}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},s=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[s]("scroll",i.position,!0),window[s]("resize",i.position),window[s]("keydown",i.onKeyDown)),this.DOM.dropdown[s]("mouseover",i.onMouseOver),this.DOM.dropdown[s]("mouseleave",i.onMouseLeave),this.DOM.dropdown[s]("mousedown",i.onClick),this.DOM.dropdown.content[s]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,s=i.dropdown.includeSelectedTags,a=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),n=this.dropdown.getSuggestionDataByNode(a),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then(function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),h=t.key=="ArrowUp"||t.key=="Up";a&&(a=e.dropdown.getNextOrPrevOption(a,!h)),a&&a.matches(i.classNames.dropdownItemSelector)||(a=u[h?u.length-1:0]),e.dropdown.highlightOption(a,!0);break;case"PageUp":case"PageDown":t.preventDefault();var g,c=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=c[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(a){var m=c.indexOf(a);a=c[p?Math.max(0,m-f):Math.min(c.length-1,m+f)]}else a=c[0];e.dropdown.highlightOption(a,!0);break;case"Home":case"End":t.preventDefault();var v=e.dropdown.getAllSuggestionsRefs();a=v[t.key==="Home"?0:v.length-1],e.dropdown.highlightOption(a,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var b=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&a&&b&&!e.state.editing&&n){t.preventDefault();var x=e.dropdown.getMappedValue(n);return e.state.autoCompleteData=n,e.input.autocomplete.set.call(e,x),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),i.hooks.suggestionClick(t,{tagify:e,tagData:n,suggestionElm:a}).then(function(){if(a){var w=s?a:e.dropdown.getNextOrPrevOption(a,!h);e.dropdown.selectOption(a,t,function(){if(w){var D=w.getAttribute("value");w=e.dropdown.getSuggestionNodeByValue(D),e.dropdown.highlightOption(w)}})}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)}).catch(function(w){return K.warn(w)});break;case"Backspace":if(o||e.state.editing.scope)return;var O=e.input.raw.call(e);O!=""&&O.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}})}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),s=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:s,suggestionElm:i}).then(function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()}).catch(function(a){return K.warn(a)})}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),s=this.suggestedListItems.length;s--;){if(L(e=this.suggestedListItems[s])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find(function(e){return e.getAttribute("value")===t})},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),s=i.findIndex(function(a){return a===t});return e?i[s+1]:i[s-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,s=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(s),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(s),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var s=this,a=this.settings,n=a.dropdown.includeSelectedTags,o=a.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),h=a.mode=="mix",g=this.suggestedListItems.find(function(f){var p;return((p=f.value)!==null&&p!==void 0?p:f)==u});if(this.trigger("dropdown:select",{data:g,elm:t,event:e}),g||u=="noMatch"){if(this.state.editing){var c=this.normalizeTags([g])[0];g=a.transformTag.call(this,c)||c,this.onEditTagDone(null,I({__isValid:!0},g))}else this[h?"addMixTags":"addTags"]([g||this.input.raw.call(this)],l);(h||this.DOM.input.parentNode)&&(setTimeout(function(){s.DOM.input.focus(),s.toggleFocusClass(!0)}),d&&setTimeout(this.dropdown.hide.bind(this)),n?i&&i():(t.addEventListener("transitionend",function(){s.dropdown.fillHeaderFooter(),setTimeout(function(){t.remove(),s.dropdown.refilter(),i&&i()},100)},{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,s,a,n,o,l,d=r(function(){var D,P,k=void 0,j=void 0;D=p[O];var S,N=Object.keys(s=((P=Object)!=null&&typeof Symbol<"u"&&P[Symbol.hasInstance]?P[Symbol.hasInstance](D):D instanceof P)?p[O]:{value:p[O]}).some(function(E){return x.includes(E)})?x:["value"];g.fuzzySearch&&!e.exact?(n=N.reduce(function(E,M){return E+" "+(s[M]||"")},"").toLowerCase().trim(),g.accentedSearch&&(n=Y(n),l=Y(l)),k=n.indexOf(l)==0,j=n===l,S=n,a=l.toLowerCase().split(" ").every(function(E){return S.includes(E.toLowerCase())})):(k=!0,a=N.some(function(E){var M=""+(s[E]||"");return g.accentedSearch&&(M=Y(M),l=Y(l)),g.caseSensitive||(M=M.toLowerCase()),j=M===l,e.exact?M===l:M.indexOf(l)==0})),o=!g.includeSelectedTags&&i.isTagDuplicate(L(s)?s.value:s),a&&!o&&(j&&k?f.push(s):g.sortby=="startsWith"&&k?c.unshift(s):c.push(s))},"tr"),u=this,h=this.settings,g=h.dropdown,c=(e=e||{},[]),f=[],p=h.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,b=typeof g.sortby=="function",x=g.searchKeys,O=0;if(!(t=h.mode=="select"&&this.value.length&&this.value[0][h.tagTextProp]==t?"":t)||!x.length){c=v?p:p.filter(function(D){return!u.isTagDuplicate(L(D)?D.value:D)});var w=b?g.sortby(c,l):c.slice(0,m);return this.state.dropdown.suggestions=w,w}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();O<p.length;O++)i=this,d();return this.state.dropdown.suggestions=f.concat(c),w=b?g.sortby(f.concat(c),l):f.concat(c).slice(0,m),this.state.dropdown.suggestions=w,w},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return I([],t).map(function(i,s){typeof i!="string"&&typeof i!="number"||(i={value:i});var a=e.dropdown.getMappedValue(i);return a=typeof a=="string"&&e.settings.dropdown.escapeHTML?H(a):a,e.settings.templates.dropdownItem.apply(e,[At(Mt({},i),{mappedValue:a}),e])}).join("")},"createListHTML")}),X=X={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return kt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,s,a=this,n=this.settings,o=n.mode=="mix"&&!n.enforceWhitelist,l=!n.whitelist||!n.whitelist.length,d=n.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!n.templates.dropdownItemNoMatch||n.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),n.templates.dropdownItemNoMatch&&(s=n.templates.dropdownItemNoMatch.call(this,{value:t}))),!s){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!Q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(L(e=this.suggestedListItems[0])?e.value:e),n.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(s),n.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(n.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout(function(){a.dropdown.position(),a.dropdown.render()}),setTimeout(function(){a.trigger("dropdown:show",a.DOM.dropdown)})}},"show"),hide:r(function(t){var e=this,i=this.DOM,s=i.scope,a=i.dropdown,n=this.settings.dropdown.position=="manual"&&!t;if(a&&document.body.contains(a)&&!n)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),s.setAttribute("aria-expanded",!1),a.parentNode.removeChild(a),setTimeout(function(){e.state.dropdown.visible=!1},100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",a),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i=this,s=((e=this.DOM.dropdown.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(e),t=e.clientHeight,e.parentNode.removeChild(e),t),a=this.settings,n=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),n.appendChild(this.DOM.dropdown),setTimeout(function(){return i.DOM.dropdown.classList.remove(a.classNames.dropdownInital)}))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),s=this.dropdown.getHeaderRef(),a=this.dropdown.getFooterRef();e&&s?.parentNode.replaceChild(e,s),i&&a?.parentNode.replaceChild(i,a)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var s,a,n,o,l,d,u,h,g,c,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,b=m?window.pageYOffset:i.scrollTop,x=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,O=x.clientHeight,w=Math.max(x.clientWidth||0,window.innerWidth||0),D=w>480?e.position:"all",P=this.DOM[D=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(D=="text"?(n=(s=(function(){var S=document.getSelection();if(S.rangeCount){var N,E,M=S.getRangeAt(0),R=M.startContainer,V=M.startOffset;if(V>0)return(E=document.createRange()).setStart(R,V-1),E.setEnd(R,V),{left:(N=E.getBoundingClientRect()).right,top:N.top,bottom:N.bottom};if(R.getBoundingClientRect)return R.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,a=s.top,o=s.left,l="auto"):(d=(function(S){var N=0,E=0;for(S=S.parentNode;S&&S!=x;)N+=S.offsetTop||0,E+=S.offsetLeft||0,S=S.parentNode;return{top:N,left:E}})(i),s=P.getBoundingClientRect(),a=v?-1:s.top-d.top,n=(v?s.height:s.bottom-d.top)-1,o=v?-1:s.left-d.left,l=s.width+"px"),!m){var k,j=(function(){for(var S=0,N=e.appendTarget.parentNode;N;)S+=N.scrollTop||0,N=N.parentNode;return S})();a+=j,n+=j}a=Math.floor(a),n=Math.ceil(n),h=w-o<120,g=((u=(k=e.placeAbove)!==null&&k!==void 0?k:O-s.bottom<t)?a:n)+b,c=o+(p&&s.width||0)+window.pageXOffset,c=D=="text"&&h?"right: 0;":"left: ".concat(c,"px;"),f.style.cssText="".concat(c," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",D)}}},"position")},Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(X)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i.push.apply(i,s)}return i})(Object(X)).forEach(function(t){Object.defineProperty(Z,t,Object.getOwnPropertyDescriptor(X,t))}),Z),G="@yaireo/tagify/",Lt={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},Pt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
1
|
+
"use strict";var It=Object.defineProperty;var r=(t,e)=>It(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index-DZjDh7FL.cjs"),Nt=require("./FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs"),y=require("vue");var gt="​";function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(it,"e");function ht(t){return(function(e){if(Array.isArray(e))return it(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return it(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?it(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(ht,"i");var K={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).log.apply(t,["[Tagify]:"].concat(ht(i)))},"log"),warn:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).warn.apply(t,["[Tagify]:"].concat(ht(i)))},"warn")},Q=r(function(t,e,i,s){return t=""+t,e=""+e,s&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"a"),pt=r(function(t,e){return t&&Array.isArray(t)&&t.map(function(i){return ut(i,e)})},"s");function ut(t,e){var i,s={};for(i in t)0>e.indexOf(i)&&(s[i]=t[i]);return s}r(ut,"o");function st(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(st,"r");function ft(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ft,"l");function H(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(H,"d");function L(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(L,"c");function I(t,e,i){var s,a;function n(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(L(l[d])){L(o[d])?n(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(n,"ts"),s=t,((a=Object)!=null&&typeof Symbol<"u"&&a[Symbol.hasInstance]?a[Symbol.hasInstance](s):s instanceof a)||(t={}),n(t,e),i&&n(t,i),t}r(I,"u");function mt(){var t=[],e={},i=!0,s=!1,a=void 0;try{for(var n,o=arguments[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var l=n.value,d=!0,u=!1,h=void 0;try{for(var g,c=l[Symbol.iterator]();!(d=(g=c.next()).done);d=!0){var f=g.value;L(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,h=p}finally{try{d||c.return==null||c.return()}finally{if(u)throw h}}}}catch(p){s=!0,a=p}finally{try{i||o.return==null||o.return()}finally{if(s)throw a}}return t}r(mt,"g");function Y(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(Y,"h");var vt=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function yt(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}r(yt,"f");function z(t){var e,i=St.call(this,t),s=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&s}r(z,"v");function bt(t){return St.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(bt,"m");function St(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(St,"b");function xt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(xt,"y");function T(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:I({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(K.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(T,"w");function F(t){if(t&&t.parentNode){var e=window.getSelection(),i=e.getRangeAt(0);e.rangeCount&&(i.setStartAfter(t),i.collapse(!0),e.removeAllRanges(),e.addRange(i))}}r(F,"T");function ct(t,e){t.forEach(function(i){if(T(i.previousSibling)||!i.previousSibling){var s=document.createTextNode("");i.before(s),e&&F(s)}})}r(ct,"O");var at={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1,inputAriaLabel:"Tags input field"},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function Et(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Et,"D");function Mt(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){Et(t,a,i[a])})}return t}r(Mt,"S");function At(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);a.push.apply(a,n)}return a})(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}r(At,"I");function nt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(nt,"E");function kt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(kt,"M");function _t(t){return(function(e){if(Array.isArray(e))return nt(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return nt(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?nt(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(_t,"N");function Ct(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Ct,"A");var Z,X,Vt=(Z=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){kt(t,a,i[a])})}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},s=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[s]("scroll",i.position,!0),window[s]("resize",i.position),window[s]("keydown",i.onKeyDown)),this.DOM.dropdown[s]("mouseover",i.onMouseOver),this.DOM.dropdown[s]("mouseleave",i.onMouseLeave),this.DOM.dropdown[s]("mousedown",i.onClick),this.DOM.dropdown.content[s]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,s=i.dropdown.includeSelectedTags,a=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),n=this.dropdown.getSuggestionDataByNode(a),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then(function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),h=t.key=="ArrowUp"||t.key=="Up";a&&(a=e.dropdown.getNextOrPrevOption(a,!h)),a&&a.matches(i.classNames.dropdownItemSelector)||(a=u[h?u.length-1:0]),e.dropdown.highlightOption(a,!0);break;case"PageUp":case"PageDown":t.preventDefault();var g,c=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=c[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(a){var m=c.indexOf(a);a=c[p?Math.max(0,m-f):Math.min(c.length-1,m+f)]}else a=c[0];e.dropdown.highlightOption(a,!0);break;case"Home":case"End":t.preventDefault();var v=e.dropdown.getAllSuggestionsRefs();a=v[t.key==="Home"?0:v.length-1],e.dropdown.highlightOption(a,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var b=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&a&&b&&!e.state.editing&&n){t.preventDefault();var x=e.dropdown.getMappedValue(n);return e.state.autoCompleteData=n,e.input.autocomplete.set.call(e,x),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),i.hooks.suggestionClick(t,{tagify:e,tagData:n,suggestionElm:a}).then(function(){if(a){var w=s?a:e.dropdown.getNextOrPrevOption(a,!h);e.dropdown.selectOption(a,t,function(){if(w){var D=w.getAttribute("value");w=e.dropdown.getSuggestionNodeByValue(D),e.dropdown.highlightOption(w)}})}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)}).catch(function(w){return K.warn(w)});break;case"Backspace":if(o||e.state.editing.scope)return;var O=e.input.raw.call(e);O!=""&&O.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}})}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),s=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:s,suggestionElm:i}).then(function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()}).catch(function(a){return K.warn(a)})}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),s=this.suggestedListItems.length;s--;){if(L(e=this.suggestedListItems[s])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find(function(e){return e.getAttribute("value")===t})},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),s=i.findIndex(function(a){return a===t});return e?i[s+1]:i[s-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,s=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(s),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(s),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var s=this,a=this.settings,n=a.dropdown.includeSelectedTags,o=a.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),h=a.mode=="mix",g=this.suggestedListItems.find(function(f){var p;return((p=f.value)!==null&&p!==void 0?p:f)==u});if(this.trigger("dropdown:select",{data:g,elm:t,event:e}),g||u=="noMatch"){if(this.state.editing){var c=this.normalizeTags([g])[0];g=a.transformTag.call(this,c)||c,this.onEditTagDone(null,I({__isValid:!0},g))}else this[h?"addMixTags":"addTags"]([g||this.input.raw.call(this)],l);(h||this.DOM.input.parentNode)&&(setTimeout(function(){s.DOM.input.focus(),s.toggleFocusClass(!0)}),d&&setTimeout(this.dropdown.hide.bind(this)),n?i&&i():(t.addEventListener("transitionend",function(){s.dropdown.fillHeaderFooter(),setTimeout(function(){t.remove(),s.dropdown.refilter(),i&&i()},100)},{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,s,a,n,o,l,d=r(function(){var D,P,_=void 0,j=void 0;D=p[O];var S,N=Object.keys(s=((P=Object)!=null&&typeof Symbol<"u"&&P[Symbol.hasInstance]?P[Symbol.hasInstance](D):D instanceof P)?p[O]:{value:p[O]}).some(function(E){return x.includes(E)})?x:["value"];g.fuzzySearch&&!e.exact?(n=N.reduce(function(E,M){return E+" "+(s[M]||"")},"").toLowerCase().trim(),g.accentedSearch&&(n=Y(n),l=Y(l)),_=n.indexOf(l)==0,j=n===l,S=n,a=l.toLowerCase().split(" ").every(function(E){return S.includes(E.toLowerCase())})):(_=!0,a=N.some(function(E){var M=""+(s[E]||"");return g.accentedSearch&&(M=Y(M),l=Y(l)),g.caseSensitive||(M=M.toLowerCase()),j=M===l,e.exact?M===l:M.indexOf(l)==0})),o=!g.includeSelectedTags&&i.isTagDuplicate(L(s)?s.value:s),a&&!o&&(j&&_?f.push(s):g.sortby=="startsWith"&&_?c.unshift(s):c.push(s))},"tr"),u=this,h=this.settings,g=h.dropdown,c=(e=e||{},[]),f=[],p=h.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,b=typeof g.sortby=="function",x=g.searchKeys,O=0;if(!(t=h.mode=="select"&&this.value.length&&this.value[0][h.tagTextProp]==t?"":t)||!x.length){c=v?p:p.filter(function(D){return!u.isTagDuplicate(L(D)?D.value:D)});var w=b?g.sortby(c,l):c.slice(0,m);return this.state.dropdown.suggestions=w,w}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();O<p.length;O++)i=this,d();return this.state.dropdown.suggestions=f.concat(c),w=b?g.sortby(f.concat(c),l):f.concat(c).slice(0,m),this.state.dropdown.suggestions=w,w},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return I([],t).map(function(i,s){typeof i!="string"&&typeof i!="number"||(i={value:i});var a=e.dropdown.getMappedValue(i);return a=typeof a=="string"&&e.settings.dropdown.escapeHTML?H(a):a,e.settings.templates.dropdownItem.apply(e,[At(Mt({},i),{mappedValue:a}),e])}).join("")},"createListHTML")}),X=X={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return _t(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,s,a=this,n=this.settings,o=n.mode=="mix"&&!n.enforceWhitelist,l=!n.whitelist||!n.whitelist.length,d=n.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!n.templates.dropdownItemNoMatch||n.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),n.templates.dropdownItemNoMatch&&(s=n.templates.dropdownItemNoMatch.call(this,{value:t}))),!s){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!Q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(L(e=this.suggestedListItems[0])?e.value:e),n.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(s),n.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(n.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout(function(){a.dropdown.position(),a.dropdown.render()}),setTimeout(function(){a.trigger("dropdown:show",a.DOM.dropdown)})}},"show"),hide:r(function(t){var e=this,i=this.DOM,s=i.scope,a=i.dropdown,n=this.settings.dropdown.position=="manual"&&!t;if(a&&document.body.contains(a)&&!n)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),s.setAttribute("aria-expanded",!1),a.parentNode.removeChild(a),setTimeout(function(){e.state.dropdown.visible=!1},100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",a),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i=this,s=((e=this.DOM.dropdown.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(e),t=e.clientHeight,e.parentNode.removeChild(e),t),a=this.settings,n=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),n.appendChild(this.DOM.dropdown),setTimeout(function(){return i.DOM.dropdown.classList.remove(a.classNames.dropdownInital)}))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),s=this.dropdown.getHeaderRef(),a=this.dropdown.getFooterRef();e&&s?.parentNode.replaceChild(e,s),i&&a?.parentNode.replaceChild(i,a)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var s,a,n,o,l,d,u,h,g,c,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,b=m?window.pageYOffset:i.scrollTop,x=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,O=x.clientHeight,w=Math.max(x.clientWidth||0,window.innerWidth||0),D=w>480?e.position:"all",P=this.DOM[D=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(D=="text"?(n=(s=(function(){var S=document.getSelection();if(S.rangeCount){var N,E,M=S.getRangeAt(0),R=M.startContainer,V=M.startOffset;if(V>0)return(E=document.createRange()).setStart(R,V-1),E.setEnd(R,V),{left:(N=E.getBoundingClientRect()).right,top:N.top,bottom:N.bottom};if(R.getBoundingClientRect)return R.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,a=s.top,o=s.left,l="auto"):(d=(function(S){var N=0,E=0;for(S=S.parentNode;S&&S!=x;)N+=S.offsetTop||0,E+=S.offsetLeft||0,S=S.parentNode;return{top:N,left:E}})(i),s=P.getBoundingClientRect(),a=v?-1:s.top-d.top,n=(v?s.height:s.bottom-d.top)-1,o=v?-1:s.left-d.left,l=s.width+"px"),!m){var _,j=(function(){for(var S=0,N=e.appendTarget.parentNode;N;)S+=N.scrollTop||0,N=N.parentNode;return S})();a+=j,n+=j}a=Math.floor(a),n=Math.ceil(n),h=w-o<120,g=((u=(_=e.placeAbove)!==null&&_!==void 0?_:O-s.bottom<t)?a:n)+b,c=o+(p&&s.width||0)+window.pageXOffset,c=D=="text"&&h?"right: 0;":"left: ".concat(c,"px;"),f.style.cssText="".concat(c," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",D)}}},"position")},Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(X)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i.push.apply(i,s)}return i})(Object(X)).forEach(function(t){Object.defineProperty(Z,t,Object.getOwnPropertyDescriptor(X,t))}),Z),G="@yaireo/tagify/",Lt={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},Pt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
2
2
|
`).concat(e.readonly?"readonly":"",`
|
|
3
3
|
`).concat(e.disabled?"disabled":"",`
|
|
4
4
|
`).concat(e.required?"required":"",`
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</footer>`):""},"dropdownFooter"),dropdownItemNoMatch:null};function wt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(wt,"V");function Tt(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}r(Tt,"R");function jt(t,e){return(function(i){if(Array.isArray(i))return i})(t)||(function(i,s){var a=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(a!=null){var n,o,l=[],d=!0,u=!1;try{for(a=a.call(i);!(d=(n=a.next()).done)&&(l.push(n.value),!s||l.length!==s);d=!0);}catch(h){u=!0,o=h}finally{try{d||a.return==null||a.return()}finally{if(u)throw o}}return l}})(t,e)||(function(i,s){if(i){if(typeof i=="string")return wt(i,s);var a=Object.prototype.toString.call(i).slice(8,-1);return a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set"?Array.from(a):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?wt(i,s):void 0}})(t,e)||(function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(jt,"F");function rt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(rt,"H");function q(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(q,"B");function Ot(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}r(Ot,"W");function Ft(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);a.push.apply(a,n)}return a})(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}r(Ft,"q");function ot(t){return(function(e){if(Array.isArray(e))return rt(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return rt(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?rt(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(ot,"U");var Rt={customBinding:r(function(){var t=this;this.customEventsList.forEach(function(e){t.on(e,t.settings.callbacks[e])})},"customBinding"),binding:r(function(){var t,e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],i=this.settings,s=this.events.callbacks,a=e?"addEventListener":"removeEventListener";if(!(this.state.mainEvents&&e||i.disabled||i.readonly)){for(var n in this.state.mainEvents=e,e&&!this.listeners.main&&(this.events.bindGlobal.call(this),this.settings.isJQueryPlugin&&jQuery(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),t=this.listeners.main=this.listeners.main||{keydown:["input",s.onKeydown.bind(this)],click:["scope",s.onClickScope.bind(this)],dblclick:i.mode!="select"&&["scope",s.onDoubleClickScope.bind(this)],paste:["input",s.onPaste.bind(this)],drop:["input",s.onDrop.bind(this)],compositionstart:["input",s.onCompositionStart.bind(this)],compositionend:["input",s.onCompositionEnd.bind(this)]})t[n]&&this.DOM[t[n][0]][a](n,t[n][1]);var o=this.listeners.main.inputMutationObserver||new MutationObserver(s.onInputDOMChange.bind(this));o.disconnect(),i.mode=="mix"&&o.observe(this.DOM.input,{childList:!0}),this.events.bindOriginaInputListener.call(this),e&&(this.listeners.main=void 0)}},"binding"),bindOriginaInputListener:r(function(t){this.listeners.main&&(clearInterval(this.listeners.main.originalInputValueObserverInterval),this.listeners.main.originalInputValueObserverInterval=setInterval(this.events.callbacks.observeOriginalInputValue.bind(this),(t||0)+500))},"bindOriginaInputListener"),bindGlobal:r(function(t){var e,i=this.events.callbacks,s=t?"removeEventListener":"addEventListener";if(this.listeners&&(t||!this.listeners.global)){this.listeners.global=this.listeners.global||[{type:this.isIE?"keydown":"input",target:this.DOM.input,cb:i[this.isIE?"onInputIE":"onInput"].bind(this)},{type:"keydown",target:window,cb:i.onWindowKeyDown.bind(this)},{type:"focusin",target:this.DOM.scope,cb:i.onFocusBlur.bind(this)},{type:"focusout",target:this.DOM.scope,cb:i.onFocusBlur.bind(this)},{type:"click",target:document,cb:i.onClickAnywhere.bind(this),useCapture:!0}];var a=!0,n=!1,o=void 0;try{for(var l,d=this.listeners.global[Symbol.iterator]();!(a=(l=d.next()).done);a=!0)(e=l.value).target[s](e.type,e.cb,!!e.useCapture)}catch(u){n=!0,o=u}finally{try{a||d.return==null||d.return()}finally{if(n)throw o}}t&&(this.listeners.global=void 0)}},"bindGlobal"),unbindGlobal:r(function(){this.events.bindGlobal.call(this,!0)},"unbindGlobal"),callbacks:{onFocusBlur:r(function(t){var e,i,s=this.settings,a=bt.call(this,t.relatedTarget),n=z.call(this,t.target),o=t.target.classList.contains(s.classNames.tagX),l=t.type=="focusin",d=t.type=="focusout";o&&s.mode!="mix"&&s.focusInputOnRemove&&this.DOM.input.focus(),a&&l&&!n&&!o&&this.toggleFocusClass(this.state.hasFocus=+new Date);var u=t.target?this.trim(this.DOM.input.textContent):"",h=(i=this.value)===null||i===void 0||(e=i[0])===null||e===void 0?void 0:e[s.tagTextProp],g=s.dropdown.enabled>=0,c={relatedTarget:t.relatedTarget},f=this.state.actions.selectOption&&(g||!s.dropdown.closeOnSelect),p=this.state.actions.addNew&&g;if(d){if(t.relatedTarget===this.DOM.scope)return this.dropdown.hide(),void this.DOM.input.focus();this.postUpdate(),s.onChangeAfterBlur&&this.triggerChangeEvent()}if(!(f||p||o))if(this.state.hasFocus=!(!l&&!a)&&+new Date,this.toggleFocusClass(this.state.hasFocus),s.mode!="mix"){if(l){if(!s.focusable)return;var m=s.dropdown.enabled===0&&!this.state.dropdown.visible,v=this.DOM.scope.querySelector(this.settings.classNames.tagTextSelector);return this.trigger("focus",c),void(m&&!n&&(this.dropdown.show(this.value.length?"":void 0),s.mode==="select"&&this.setRangeAtStartEnd(!1,v)))}if(d){if(this.trigger("blur",c),this.loading(!1),s.mode=="select"){if(this.value.length){var b=this.getTagElms()[0];u=this.trim(b.textContent)}h===u&&(u="")}u&&!this.state.actions.selectOption&&s.addTagOnBlur&&s.addTagOn.includes("blur")&&this.addTags(u,!0)}a||(this.DOM.input.removeAttribute("style"),this.dropdown.hide())}else l?this.trigger("focus",c):d&&(this.trigger("blur",c),this.loading(!1),this.dropdown.hide(),this.state.dropdown.visible=void 0,this.setStateSelection())},"onFocusBlur"),onCompositionStart:r(function(t){this.state.composing=!0},"onCompositionStart"),onCompositionEnd:r(function(t){this.state.composing=!1},"onCompositionEnd"),onWindowKeyDown:r(function(t){var e,i=this.settings,s=document.activeElement,a=bt.call(this,s)&&this.DOM.scope.contains(s),n=s===this.DOM.input,o=a&&s.hasAttribute("readonly"),l=this.DOM.scope.querySelector(this.settings.classNames.tagTextSelector),d=this.state.dropdown.visible;if((t.key==="Tab"&&d||this.state.hasFocus||a&&!o)&&!n){e=s.nextElementSibling;var u=t.target.classList.contains(i.classNames.tagX);switch(t.key){case"Backspace":i.readonly||this.state.editing||(this.removeTags(s),(e||this.DOM.input).focus());break;case"Enter":if(u)return void this.removeTags(t.target.parentNode);i.a11y.focusableTags&&z.call(this,s)&&setTimeout(this.editTag.bind(this),0,s);break;case"ArrowDown":this.state.dropdown.visible||i.mode=="mix"||this.dropdown.show();break;case"Tab":l?.focus()}}},"onWindowKeyDown"),onKeydown:r(function(t){var e=this,i=this.settings;if(!this.state.composing&&i.userInput){i.mode=="select"&&i.enforceWhitelist&&this.value.length&&t.key!="Tab"&&t.preventDefault();var s=this.trim(t.target.textContent);this.trigger("keydown",{event:t}),i.hooks.beforeKeyDown(t,{tagify:this}).then(function(a){if(i.mode=="mix"){switch(t.key){case"Left":case"ArrowLeft":e.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":if(e.state.editing)return;var n=document.getSelection(),o=t.key=="Delete"&&n.anchorOffset==(n.anchorNode.length||0),l=n.anchorNode.previousSibling,d=n.anchorNode.nodeType==1||!n.anchorOffset&&l&&l.nodeType==1&&n.anchorNode.previousSibling;(function(x){var O=document.createElement("div");x.replace(/\&#?[0-9a-z]+;/gi,function(w){return O.innerHTML=w,O.innerText})})(e.DOM.input.innerHTML);var u,h,g,c=e.getTagElms(),f=n.anchorNode.length===1&&n.anchorNode.nodeValue=="";if(i.backspace=="edit"&&d)return u=n.anchorNode.nodeType==1?null:n.anchorNode.previousElementSibling,setTimeout(e.editTag.bind(e),0,u),void t.preventDefault();if(vt()&&Ot(d,Element))return g=ft(d),d.hasAttribute("readonly")||d.remove(),e.DOM.input.focus(),void setTimeout(function(){F(g),e.DOM.input.click()});if(n.anchorNode.nodeName=="BR")return;if((o||d)&&n.anchorNode.nodeType==1?h=n.anchorOffset==0?o?c[0]:null:c[Math.min(c.length,n.anchorOffset)-1]:o?h=n.anchorNode.nextElementSibling:Ot(d,Element)&&(h=d),n.anchorNode.nodeType==3&&!n.anchorNode.nodeValue&&n.anchorNode.previousElementSibling&&t.preventDefault(),(d||o)&&!i.backspace||n.type!="Range"&&!n.anchorOffset&&n.anchorNode==e.DOM.input&&t.key!="Delete")return void t.preventDefault();if(n.type!="Range"&&h&&h.hasAttribute("readonly"))return void F(ft(h));t.key=="Delete"&&f&&T(n.anchorNode.nextSibling)&&e.removeTags(n.anchorNode.nextSibling);break;case"Enter":if(t.preventDefault(),e.state.tag)return;var p=window.getSelection();p.getRangeAt(0).insertNode(document.createElement("br")),p.collapseToEnd()}return!0}var m=i.dropdown.position=="manual";switch(t.key){case"Backspace":i.mode=="select"&&i.enforceWhitelist&&e.value.length?e.removeTags():e.state.dropdown.visible&&i.dropdown.position!="manual"||t.target.textContent!=""&&s.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0));break;case"Esc":case"Escape":if(e.state.dropdown.visible)return;t.target.blur();break;case"Down":case"ArrowDown":e.state.dropdown.visible||e.dropdown.show();break;case"ArrowRight":var v=e.state.inputSuggestion||e.state.ddItemData;if(v&&i.autoComplete.rightKey)return void e.addTags([v],!0);break;case"Tab":if(!i.addTagOn.includes(t.key.toLowerCase()))break;case"Enter":if(e.state.dropdown.visible&&!m)return;var b=e.state.autoCompleteData||s;if(!b&&t.key==="Tab")return!0;t.preventDefault(),setTimeout(function(){e.state.dropdown.visible&&!m||e.state.actions.selectOption||!i.addTagOn.includes(t.key.toLowerCase())||(e.addTags([b],!0),e.state.autoCompleteData=null)})}}).catch(function(a){return a})}},"onKeydown"),onInput:r(function(t){this.postUpdate();var e=this.settings;if(e.mode=="mix")return this.events.callbacks.onMixTagsInput.call(this,t);var i=this.input.normalize.call(this,void 0,{trim:!1}),s=i.length>=e.dropdown.enabled,a={value:i,inputElm:this.DOM.input},n=this.validateTag({value:i});e.mode=="select"&&this.toggleScopeValidation(n),a.isValid=n,this.state.inputText!=i&&(this.input.set.call(this,i,!1),i.search(e.delimiters)!=-1?this.addTags(i)&&this.input.set.call(this):e.dropdown.enabled>=0&&this.dropdown[s?"show":"hide"](i),this.trigger("input",a))},"onInput"),onMixTagsInput:r(function(t){var e,i,s,a,n,o,l,d,u=this,h=this.settings,g=this.value.length,c=this.getTagElms(),f=document.createDocumentFragment(),p=window.getSelection().getRangeAt(0),m=[].map.call(c,function(v){return T(v).value});if(t.inputType=="deleteContentBackward"&&vt()&&this.events.callbacks.onKeydown.call(this,{target:t.target,key:"Backspace"}),ct(this.getTagElms()),this.value.slice().forEach(function(v){v.readonly&&!m.includes(v.value)&&f.appendChild(u.createTagElem(v))}),f.childNodes.length&&(p.insertNode(f),this.setRangeAtStartEnd(!1,f.lastChild)),c.length!=g)return this.value=[].map.call(this.getTagElms(),function(v){return T(v)}),void this.update({withoutChangeEvent:!0});if(this.hasMaxTags())return!0;if(window.getSelection&&(o=window.getSelection()).rangeCount>0&&o.anchorNode.nodeType==3){if((p=o.getRangeAt(0).cloneRange()).collapse(!0),p.setStart(o.focusNode,0),s=(e=p.toString().slice(0,p.endOffset)).split(h.pattern).length-1,(i=e.match(h.pattern))&&(a=e.slice(e.lastIndexOf(i[i.length-1]))),a){if(this.state.actions.ArrowLeft=!1,this.state.tag={prefix:a.match(h.pattern)[0],value:a.replace(h.pattern,"")},this.state.tag.baseOffset=o.baseOffset-this.state.tag.value.length,d=this.state.tag.value.match(h.delimiters))return this.state.tag.value=this.state.tag.value.replace(h.delimiters,""),this.state.tag.delimiters=d[0],this.addTags(this.state.tag.value,h.dropdown.clearOnSelect),void this.dropdown.hide();n=this.state.tag.value.length>=h.dropdown.enabled;try{l=(l=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&l.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch{}(l||s<this.state.mixMode.matchedPatternCount)&&(n=!1)}else this.state.flaggedTags={};this.state.mixMode.matchedPatternCount=s}setTimeout(function(){u.update({withoutChangeEvent:!0}),u.trigger("input",I({},u.state.tag,{textContent:u.DOM.input.textContent})),u.state.tag&&u.dropdown[n?"show":"hide"](u.state.tag.value)},10)},"onMixTagsInput"),onInputIE:r(function(t){var e=this;setTimeout(function(){e.events.callbacks.onInput.call(e,t)})},"onInputIE"),observeOriginalInputValue:r(function(){this.DOM.originalInput.parentNode||this.destroy(),this.DOM.originalInput.value!=this.DOM.originalInput.tagifyValue&&this.loadOriginalValues()},"observeOriginalInputValue"),onClickAnywhere:r(function(t){if(t.target!=this.DOM.scope&&!this.DOM.scope.contains(t.target)){this.toggleFocusClass(!1),this.state.hasFocus=!1;var e=t.target.closest(this.settings.classNames.dropdownSelector);e?.__tagify!=this&&this.dropdown.hide()}},"onClickAnywhere"),onClickScope:r(function(t){var e=this.settings,i=t.target.closest("."+e.classNames.tag);t.target,this.DOM.scope;var s=+new Date-this.state.hasFocus;if(!t.target.classList.contains(e.classNames.tagX))return i&&!this.state.editing?(this.trigger("click",{tag:i,index:this.getNodeIndex(i),data:T(i),event:t}),void(e.editTags!==1&&e.editTags.clicks!==1&&e.mode!="select"||this.events.callbacks.onDoubleClickScope.call(this,t))):void(t.target==this.DOM.input&&(e.mode=="mix"&&this.fixFirefoxLastTagNoCaret(),s>500||!e.focusable)?this.state.dropdown.visible?this.dropdown.hide():e.dropdown.enabled===0&&e.mode!="mix"&&this.dropdown.show(this.value.length?"":void 0):e.mode!="select"||e.dropdown.enabled!==0||this.state.dropdown.visible||(this.events.callbacks.onDoubleClickScope.call(this,Ft((function(a){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{},l=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(o).filter(function(d){return Object.getOwnPropertyDescriptor(o,d).enumerable}))),l.forEach(function(d){q(a,d,o[d])})}return a})({},t),{target:this.getTagElms()[0]})),e.userInput||this.dropdown.show()));this.removeTags(t.target.parentNode)},"onClickScope"),onPaste:r(function(t){var e=this;t.preventDefault();var i,s,a,n=this.settings;if(!n.userInput)return!1;n.readonly||(a=(s=t.clipboardData||window.clipboardData).getData("Text"),n.hooks.beforePaste(t,{tagify:this,pastedText:a,clipboardData:s}).then(function(o){if(o===void 0&&(o=a),o)if(e.settings.mode=="mix"){if(e.settings.pasteAsTags){var l=e.convertPastedTextToMixTags(o),d=e.parseMixTags(l,{skipDOM:!0}),u=d.__tagifyTagsData||[];e.injectAtCaret(d,window.getSelection().getRangeAt(0)),u.forEach(function(g){return e.value.push(g)});var h=e.getTagElms().slice(-u.length);h.forEach(function(g,c){return T(g,u[c])}),e.update(),ct(h)}else e.injectAtCaret(o,window.getSelection().getRangeAt(0));e.events.callbacks.onMixTagsInput.call(e,t)}else e.injectAtCaret(o,window.getSelection().getRangeAt(0)),e.settings.pasteAsTags?i=e.addTags(e.state.inputText+o,!0):(e.state.inputText=o,e.dropdown.show(o));e.trigger("paste",{event:t,pastedText:a,clipboardData:s,tagsElems:i})}).catch(function(o){return o}))},"onPaste"),onDrop:r(function(t){t.preventDefault()},"onDrop"),onEditTagInput:r(function(t,e){var i,s=t.closest("."+this.settings.classNames.tag),a=this.getNodeIndex(s),n=T(s),o=this.input.normalize.call(this,t),l=(q(i={},this.settings.tagTextProp,o),q(i,"__tagId",n.__tagId),i),d=this.validateTag(l);this.editTagChangeDetected(I(n,l))||t.originalIsValid!==!0||(d=!0),s.classList.toggle(this.settings.classNames.tagInvalid,d!==!0),n.__isValid=d,s.title=d===!0?n.title||n.value:d,o.length>=this.settings.dropdown.enabled&&(this.state.editing&&(this.state.editing.value=o),this.dropdown.show(o)),this.trigger("edit:input",{tag:s,index:a,data:I({},this.value[a],{newValue:o}),event:e})},"onEditTagInput"),onEditTagPaste:r(function(t,e){var i=(e.clipboardData||window.clipboardData).getData("Text");e.preventDefault();var s=xt(i);this.setRangeAtStartEnd(!1,s)},"onEditTagPaste"),onEditTagClick:r(function(t,e){this.events.callbacks.onClickScope.call(this,e)},"onEditTagClick"),onEditTagFocus:r(function(t){this.state.editing={scope:t,input:t.querySelector("[contenteditable]")}},"onEditTagFocus"),onEditTagBlur:r(function(t,e){var i=z.call(this,e.relatedTarget);if(this.settings.mode=="select"&&i&&e.relatedTarget.contains(e.target))this.dropdown.hide();else if(this.state.editing&&(this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(document.activeElement)||this.trigger("blur",{}),this.DOM.scope.contains(t))){var s,a,n,o,l=this.settings,d=t.closest("."+l.classNames.tag),u=T(d),h=this.input.normalize.call(this,t),g=(q(a={},l.tagTextProp,h),q(a,"__tagId",u.__tagId),a),c=u.__originalData,f=this.editTagChangeDetected(I(u,g)),p=this.validateTag(g);if(h)if(f){if(n=this.hasMaxTags(),o=I({},c,(q(s={},l.tagTextProp,this.trim(h)),q(s,"__isValid",p),s)),l.transformTag.call(this,o,c),(p=(!n||c.__isValid===!0)&&this.validateTag(o))!==!0){if(this.trigger("invalid",{data:o,tag:d,message:p}),l.editTags.keepInvalid)return;l.keepInvalidTags?o.__isValid=p:o=c}else l.keepInvalidTags&&(delete o.title,delete o["aria-invalid"],delete o.class);this.onEditTagDone(d,o)}else this.onEditTagDone(d,c);else this.onEditTagDone(d)}},"onEditTagBlur"),onEditTagkeydown:r(function(t,e){if(!this.state.composing)switch(this.trigger("edit:keydown",{event:t}),t.key){case"Esc":case"Escape":this.state.editing=!1,e.__tagifyTagData.__originalData.value?e.parentNode.replaceChild(e.__tagifyTagData.__originalHTML,e):e.remove();break;case"Enter":case"Tab":t.preventDefault(),setTimeout(function(){return t.target.blur()},0)}},"onEditTagkeydown"),onDoubleClickScope:r(function(t){if(t.target){var e=t.target.closest("."+this.settings.classNames.tag);if(e){var i,s,a=T(e),n=this.settings;a?.editable!==!1&&(i=e.classList.contains(this.settings.classNames.tagEditing),s=e.hasAttribute("readonly"),n.readonly||i||s||!this.settings.editTags||!n.userInput||(this.events.callbacks.onEditTagFocus.call(this,e),this.editTag(e)),this.toggleFocusClass(!0),n.mode!="select"&&this.trigger("dblclick",{tag:e,index:this.getNodeIndex(e),data:T(e)}))}}},"onDoubleClickScope"),onInputDOMChange:r(function(t){var e=this,i=this.DOM.input.lastChild;t.forEach(function(s){s.addedNodes.forEach(function(a){if(a.outerHTML=="<div><br></div>")a.replaceWith(document.createElement("br"));else if(a.nodeType==1&&a.querySelector(e.settings.classNames.tagSelector)){var n,o,l=document.createTextNode("");a.childNodes[0].nodeType==3&&a.previousSibling.nodeName!="BR"&&(l=document.createTextNode(`
|
|
37
37
|
`)),(o=a).replaceWith.apply(o,ot([l].concat(ot(ot(a.childNodes).slice(0,-1))))),F(l)}else if(z.call(e,a))if(((n=a.previousSibling)===null||n===void 0?void 0:n.nodeType)!=3||a.previousSibling.textContent||a.previousSibling.remove(),a.previousSibling&&a.previousSibling.nodeName=="BR"){a.previousSibling.replaceWith(`
|
|
38
38
|
`);for(var d=a.nextSibling,u="";d;)u+=d.textContent,d=d.nextSibling;u.trim()&&F(a.previousSibling)}else a.previousSibling&&!T(a.previousSibling)||a.before("")}),s.removedNodes.forEach(function(a){a&&a.nodeName=="BR"&&z.call(e,i)&&(e.removeTags(i),e.fixFirefoxLastTagNoCaret())})}),i&&i.nodeValue==""&&i.remove(),i&&i.nodeName=="BR"||this.DOM.input.appendChild(document.createElement("br"))},"onInputDOMChange")}};function lt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(lt,"z");function U(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(U,"X");function $(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}r($,"J");function dt(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){U(t,a,i[a])})}return t}r(dt,"G");function Bt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);a.push.apply(a,n)}return a})(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}r(Bt,"$");function tt(t){return(function(e){if(Array.isArray(e))return lt(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return lt(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?lt(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(tt,"Q");function et(t,e){if(!t){K.warn("input element not found",t);var i,s,a,n,o=new Proxy(this,{get:r(function(){return function(){return o}},"get")});return o}if(t.__tagify)return K.warn("input element is already Tagified - Same instance is returned.",t),t.__tagify;I(this,(function(l){var d=document.createTextNode(""),u={};function h(g,c,f){f&&c.split(/\s+/g).forEach(function(p){return d[g+"EventListener"].call(d,p,f)})}return r(h,"ti"),{removeAllCustomListeners:r(function(){Object.entries(u).forEach(function(g){var c=jt(g,2),f=c[0];c[1].forEach(function(p){return h("remove",f,p)})}),u={}},"removeAllCustomListeners"),off:r(function(g,c){return g&&(c?h("remove",g,c):g.split(/\s+/g).forEach(function(f){var p;(p=u[f])===null||p===void 0||p.forEach(function(m){return h("remove",f,m)}),delete u[f]})),this},"off"),on:r(function(g,c){return c&&typeof c=="function"&&(g.split(/\s+/g).forEach(function(f){Array.isArray(u[f])?u[f].push(c):u[f]=[c]}),h("add",g,c)),this},"on"),trigger:r(function(g,c,f){var p;if(f=f||{cloneData:!0},g)if(l.settings.isJQueryPlugin)g=="remove"&&(g="removeTag"),jQuery(l.DOM.originalInput).triggerHandler(g,[c]);else{try{var m=typeof c=="object"?c:{value:c};if((m=f.cloneData?I({},m):m).tagify=this,c.event&&(m.event=this.cloneEvent(c.event)),Tt(c,Object))for(var v in c)Tt(c[v],HTMLElement)&&(m[v]=c[v]);p=new CustomEvent(g,{detail:m})}catch(b){K.warn(b)}d.dispatchEvent(p)}},"trigger")}})(this)),this.isFirefox=/firefox|fxios/i.test(navigator.userAgent)&&!/seamonkey/i.test(navigator.userAgent),this.isIE=window.document.documentMode,e=e||{},this.getPersistedData=(n=e.id,function(l){var d,u;if(n){if(((d=localStorage)===null||d===void 0?void 0:d.getItem(G+n+"/v"))===1)try{u=JSON.parse(localStorage[G+n+"/"+l])}catch{}return u}}),this.setPersistedData=(i=e.id)?((s=localStorage)===null||s===void 0||s.setItem(G+i+"/v",1),function(l,d){var u,h=JSON.stringify(l);l&&d&&((u=localStorage)===null||u===void 0||u.setItem(G+i+"/"+d,h),dispatchEvent(new Event("storage")))}):function(){},this.clearPersistedData=(a=e.id,function(l){var d=G+"/"+a+"/";if(l)localStorage.removeItem(d+l);else for(var u in localStorage)u.includes(d)&&localStorage.removeItem(u)}),this.applySettings(t,e),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(t),Ct.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),t.autofocus&&this.DOM.input.focus(),t.__tagify=this}r(et,"Y");et.prototype={_dropdown:Vt,placeCaretAfterNode:F,getSetTagData:T,helpers:{sameStr:Q,removeCollectionProp:pt,omit:ut,isObject:L,parseHTML:st,escapeHTML:H,extend:I,concatWithoutDups:mt,getUID:yt,isNodeTag:z},customEventsList:["change","add","remove","invalid","input","paste","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:noMatch","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim:r(function(t){return this.settings.trim&&t&&typeof t=="string"?t.trim():t},"trim"),parseHTML:st,templates:Pt,parseTemplate:r(function(t,e){return st((t=this.settings.templates[t]||t).apply(this,e))},"parseTemplate"),set whitelist(t){var e=t&&Array.isArray(t);this.settings.whitelist=e?t:[],this.setPersistedData(e?t:[],"whitelist")},get whitelist(){return this.settings.whitelist},set userInput(t){this.settings.userInput=!!t,this.setContentEditable(!!t)},get userInput(){return this.settings.userInput},generateClassSelectors:r(function(t){for(var e in t)(function(i){var s=i;Object.defineProperty(t,s+"Selector",{get:r(function(){return"."+this[s].split(" ")[0]},"get")})})(e)},"generateClassSelectors"),applySettings:r(function(t,e){at.templates=this.templates;var i,s,a=I({},at,e.mode=="mix"?{pasteAsTags:!1,dropdown:{position:"text"}}:{}),n=this.settings=I({},a,e);if(n.disabled=t.hasAttribute("disabled"),n.readonly=n.readonly||t.hasAttribute("readonly"),n.placeholder=H(t.getAttribute("placeholder")||n.placeholder||""),n.required=t.hasAttribute("required"),this.generateClassSelectors(n.classNames),this.isIE&&(n.autoComplete=!1),["whitelist","blacklist"].forEach(function(l){var d=t.getAttribute("data-"+l);d&&$(d=d.split(n.delimiters),Array)&&(n[l]=d)}),"autoComplete"in e&&!L(e.autoComplete)&&(n.autoComplete=at.autoComplete,n.autoComplete.enabled=e.autoComplete),n.mode=="mix"&&(n.pattern=n.pattern||/@/,n.autoComplete.rightKey=!0,n.delimiters=e.delimiters||null,n.tagTextProp&&!n.dropdown.searchKeys.includes(n.tagTextProp)&&n.dropdown.searchKeys.push(n.tagTextProp)),t.pattern)try{n.pattern=RegExp(t.pattern)}catch{}if(n.delimiters){n._delimiters=n.delimiters;try{n.delimiters=RegExp(this.settings.delimiters,"g")}catch{}}(n.disabled||n.readonly)&&(n.userInput=!1),this.TEXTS=dt({},Lt,n.texts||{}),n.mode=="select"&&(n.dropdown.includeSelectedTags=!0),(n.mode!="select"||!((i=e.dropdown)===null||i===void 0)&&i.enabled)&&n.userInput||(n.dropdown.enabled=0),n.disabled&&(n.dropdown.enabled=!1),n.dropdown.appendTarget=((s=e.dropdown)===null||s===void 0?void 0:s.appendTarget)||document.body,n.dropdown.includeSelectedTags===void 0&&(n.dropdown.includeSelectedTags=n.duplicates);var o=this.getPersistedData("whitelist");Array.isArray(o)&&(this.whitelist=Array.isArray(n.whitelist)?mt(n.whitelist,o):o)},"applySettings"),getAttributes:r(function(t){var e,i=this.getCustomAttributes(t),s="";for(e in i)s+=" "+e+(t[e]!==void 0?'="'.concat(i[e],'"'):"");return s},"getAttributes"),getCustomAttributes:r(function(t){if(!L(t))return"";var e,i={};for(e in t)e.slice(0,2)!="__"&&e!="class"&&t.hasOwnProperty(e)&&t[e]!==void 0&&(i[e]=H(t[e]));return i},"getCustomAttributes"),setStateSelection:r(function(){var t=window.getSelection(),e={anchorOffset:t.anchorOffset,anchorNode:t.anchorNode,range:t.getRangeAt&&t.rangeCount&&t.getRangeAt(0)};return this.state.selection=e,e},"setStateSelection"),getCSSVars:r(function(){var t,e,i,s=getComputedStyle(this.DOM.scope,null);this.CSSVars={tagHideTransition:(e=(t=(function(a){if(!a)return{};var n=(a=a.trim().split(" ")[0]).split(/\d+/g).filter(function(o){return o}).pop().trim();return{value:+a.split(n).filter(function(o){return o})[0].trim(),unit:n}})((i="tag-hide-transition",s.getPropertyValue("--"+i)))).value,t.unit=="s"?1e3*e:e)}},"getCSSVars"),build:r(function(t){var e=this.DOM,i=t.closest("label");this.settings.mixMode.integrated?(e.originalInput=null,e.scope=t,e.input=t):(e.originalInput=t,e.originalInput_tabIndex=t.tabIndex,e.scope=this.parseTemplate("wrapper",[t,this.settings]),e.input=e.scope.querySelector(this.settings.classNames.inputSelector),t.parentNode.insertBefore(e.scope,t),t.tabIndex=-1),i&&i.setAttribute("for","")},"build"),destroy:r(function(){var t,e,i;this.events.unbindGlobal.call(this),(t=this.DOM.scope.parentNode)===null||t===void 0||t.removeChild(this.DOM.scope),this.DOM.originalInput.tabIndex=this.DOM.originalInput_tabIndex,delete this.DOM.originalInput.__tagify,this.dropdown.hide(!0),this.removeAllCustomListeners(),clearTimeout(this.dropdownHide__bindEventsTimeout),clearInterval((i=this.listeners)===null||i===void 0||(e=i.main)===null||e===void 0?void 0:e.originalInputValueObserverInterval)},"destroy"),loadOriginalValues:r(function(t){var e,i=this.settings;if(this.state.blockChangeEvent=!0,t===void 0){var s=this.getPersistedData("value");t=s&&!this.DOM.originalInput.value?s:i.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value}if(this.removeAllTags(),t)if(i.mode=="mix")this.parseMixTags(t),(e=this.DOM.input.lastChild)&&e.tagName=="BR"||this.DOM.input.insertAdjacentHTML("beforeend","<br>");else{try{$(JSON.parse(t),Array)&&(t=JSON.parse(t))}catch{}this.addTags(t,!0).forEach(function(a){return a&&a.classList.add(i.classNames.tagNoAnimation)})}else this.postUpdate();this.state.lastOriginalValueReported=i.mixMode.integrated?"":this.DOM.originalInput.value},"loadOriginalValues"),cloneEvent:r(function(t){var e={};for(var i in t)i!="path"&&(e[i]=t[i]);return e},"cloneEvent"),loading:r(function(t){return this.state.isLoading=t,this.DOM.scope.classList[t?"add":"remove"](this.settings.classNames.scopeLoading),this},"loading"),tagLoading:r(function(t,e){return t&&t.classList[e?"add":"remove"](this.settings.classNames.tagLoading),this},"tagLoading"),toggleClass:r(function(t,e){typeof t=="string"&&this.DOM.scope.classList.toggle(t,e)},"toggleClass"),toggleScopeValidation:r(function(t){var e=t===!0||t===void 0;!this.settings.required&&t&&t===this.TEXTS.empty&&(e=!0),this.toggleClass(this.settings.classNames.tagInvalid,!e),this.DOM.scope.title=e?"":t},"toggleScopeValidation"),toggleFocusClass:r(function(t){this.toggleClass(this.settings.classNames.focus,!!t)},"toggleFocusClass"),setPlaceholder:r(function(t){var e=this;["data","aria"].forEach(function(i){return e.DOM.input.setAttribute("".concat(i,"-placeholder"),t)})},"setPlaceholder"),triggerChangeEvent:r(function(){if(!this.settings.mixMode.integrated){var t=this.DOM.originalInput,e=this.state.lastOriginalValueReported!==t.value,i=new CustomEvent("change",{bubbles:!0});e&&(this.state.lastOriginalValueReported=t.value,i.simulated=!0,t._valueTracker&&t._valueTracker.setValue(Math.random()),t.dispatchEvent(i),this.trigger("change",this.state.lastOriginalValueReported),t.value=this.state.lastOriginalValueReported)}},"triggerChangeEvent"),events:Rt,fixFirefoxLastTagNoCaret:r(function(){},"fixFirefoxLastTagNoCaret"),setRangeAtStartEnd:r(function(t,e){if(e){t=typeof t=="number"?t:!!t,e=e.lastChild||e;var i=document.getSelection();if($(i.focusNode,Element)&&!this.DOM.input.contains(i.focusNode))return!0;try{i.rangeCount>=1&&["Start","End"].forEach(function(s){return i.getRangeAt(0)["set"+s](e,t||e.length)})}catch(s){console.warn(s)}}},"setRangeAtStartEnd"),insertAfterTag:r(function(t,e){if(e=e||this.settings.mixMode.insertAfterTag,t&&t.parentNode&&e)return e=typeof e=="string"?document.createTextNode(e):e,t.parentNode.insertBefore(e,t.nextSibling),e},"insertAfterTag"),editTagChangeDetected:r(function(t){var e=t.__originalData;for(var i in e)if(!this.dataProps.includes(i)&&t[i]!=e[i])return!0;return!1},"editTagChangeDetected"),getTagTextNode:r(function(t){return t.querySelector(this.settings.classNames.tagTextSelector)},"getTagTextNode"),setTagTextNode:r(function(t,e){this.getTagTextNode(t).innerHTML=H(e)},"setTagTextNode"),editTag:r(function(t,e){var i=this;t=t||this.getLastTag(),e=e||{};var s=this.settings,a=this.getTagTextNode(t),n=this.getNodeIndex(t),o=T(t),l=this.events.callbacks,d=!0,u=s.mode=="select";if(u||this.dropdown.hide(),a){if(!$(o,Object)||!("editable"in o)||o.editable)return o=T(t,{__originalData:I({},o),__originalHTML:t.cloneNode(!0)}),T(o.__originalHTML,o.__originalData),a.setAttribute("contenteditable",!0),t.classList.add(s.classNames.tagEditing),this.events.callbacks.onEditTagFocus.call(this,t),a.addEventListener("click",l.onEditTagClick.bind(this,t)),a.addEventListener("blur",l.onEditTagBlur.bind(this,this.getTagTextNode(t))),a.addEventListener("input",l.onEditTagInput.bind(this,a)),a.addEventListener("paste",l.onEditTagPaste.bind(this,a)),a.addEventListener("keydown",function(h){return l.onEditTagkeydown.call(i,h,t)}),a.addEventListener("compositionstart",l.onCompositionStart.bind(this)),a.addEventListener("compositionend",l.onCompositionEnd.bind(this)),e.skipValidation||(d=this.editTagToggleValidity(t)),a.originalIsValid=d,this.trigger("edit:start",{tag:t,index:n,data:o,isValid:d}),a.focus(),u||this.setRangeAtStartEnd(!1,a),s.dropdown.enabled!==0||u||this.dropdown.show(),this.state.hasFocus=!0,this}else K.warn("Cannot find element in Tag template: .",s.classNames.tagTextSelector)},"editTag"),editTagToggleValidity:r(function(t,e){var i;if(e=e||T(t))return(i=!("__isValid"in e)||e.__isValid===!0)||this.removeTagsFromValue(t),this.update(),t.classList.toggle(this.settings.classNames.tagNotAllowed,!i),e.__isValid=i,e.__isValid;K.warn("tag has no data: ",t,e)},"editTagToggleValidity"),onEditTagDone:r(function(t,e){t=t||this.state.editing.scope,e=e||{};var i,s,a=this.settings,n={tag:t,index:this.getNodeIndex(t),previousData:T(t),data:e};this.trigger("edit:beforeUpdate",n,{cloneData:!1}),this.state.editing=!1,delete e.__originalData,delete e.__originalHTML,t&&t.parentNode&&(((s=e[a.tagTextProp])!==void 0?!((i=(s+="").trim)===null||i===void 0)&&i.call(s):!(a.tagTextProp in e)&&e.value)?(t=this.replaceTag(t,e),this.editTagToggleValidity(t,e),a.a11y.focusableTags?t.focus():a.mode!="select"&&F(t)):this.removeTags(t)),this.trigger("edit:updated",n),a.dropdown.closeOnSelect&&this.dropdown.hide(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()},"onEditTagDone"),replaceTag:r(function(t,e){e&&e.value!==""&&e.value!==void 0||(e=t.__tagifyTagData),e.__isValid&&e.__isValid!=1&&I(e,this.getInvalidTagAttrs(e,e.__isValid));var i=this.createTagElem(e);return t.parentNode.replaceChild(i,t),this.updateValueByDOMTags(),i},"replaceTag"),updateValueByDOMTags:r(function(){var t=this;this.value.length=0;var e=this.settings.classNames,i=[e.tagNotAllowed.split(" ")[0],e.tagHide];[].forEach.call(this.getTagElms(),function(s){tt(s.classList).some(function(a){return i.includes(a)})||t.value.push(T(s))}),this.update(),this.dropdown.refilter()},"updateValueByDOMTags"),injectAtCaret:r(function(t,e){if(e=e||((i=this.state.selection)===null||i===void 0?void 0:i.range),typeof t=="string"&&(t=document.createTextNode(t)),!t)return this;var i,s=t.nodeType===11?Array.prototype.slice.call(t.childNodes):[t];if(!s.length)return this;if(!e)return this.appendMixTags(t),this;if(!this.DOM.scope.contains(e?.startContainer))return this;xt(t,e);var a=s[s.length-1]||t;return a?.parentNode&&F(a),this.setStateSelection(),this.updateValueByDOMTags(),this.update(),this},"injectAtCaret"),input:{set:r(function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.settings,s=i.dropdown.closeOnSelect;this.state.inputText=t,e&&(this.DOM.input.innerHTML=H(""+t),t&&this.toggleClass(i.classNames.empty,!this.DOM.input.innerHTML)),!t&&s&&this.dropdown.hide.bind(this),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},"set"),raw:r(function(){return this.DOM.input.textContent},"raw"),validate:r(function(){var t=!this.state.inputText||this.validateTag({value:this.state.inputText})===!0;return this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid,!t),t},"validate"),normalize:r(function(t,e){var i=t||this.DOM.input,s=[];i.childNodes.forEach(function(a){return a.nodeType==3&&s.push(a.nodeValue)}),s=s.join(`
|
|
39
|
-
`);try{s=s.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch{}return s=s.replace(/\s/g," "),e?.trim?this.trim(s):s},"normalize"),autocomplete:{suggest:r(function(t){if(this.settings.autoComplete.enabled){typeof(t=t||{value:""})!="object"&&(t={value:t});var e=this.dropdown.getMappedValue(t);if(typeof e!="number"){var i=this.state.inputText.toLowerCase(),s=e.substr(0,this.state.inputText.length).toLowerCase(),a=e.substring(this.state.inputText.length);e&&this.state.inputText&&s==i?(this.DOM.input.setAttribute("data-suggest",a),this.state.inputSuggestion=t):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}}},"suggest"),set:r(function(t){var e=this.DOM.input.getAttribute("data-suggest"),i=t||(e?this.state.inputText+e:null);return!!i&&(this.settings.mode=="mix"?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+i)):(this.input.set.call(this,i),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)},"set")}},getTagIdx:r(function(t){return this.value.findIndex(function(e){return e.__tagId==(t||{}).__tagId})},"getTagIdx"),getNodeIndex:r(function(t){var e=0;if(t)for(;t=t.previousElementSibling;)e++;return e},"getNodeIndex"),getTagElms:r(function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];var s="."+tt(this.settings.classNames.tag.split(" ")).concat(tt(e)).join(".");return[].slice.call(this.DOM.scope.querySelectorAll(s))},"getTagElms"),getLastTag:r(function(){var t=this.settings.classNames,e=this.DOM.scope.querySelectorAll("".concat(t.tagSelector,":not(.").concat(t.tagHide,"):not([readonly])"));return e[e.length-1]},"getLastTag"),isTagDuplicate:r(function(t,e,i){var s=0,a=!0,n=!1,o=void 0;try{for(var l,d=this.value[Symbol.iterator]();!(a=(l=d.next()).done);a=!0){var u=l.value;Q(this.trim(""+t),u.value,e)&&i!=u.__tagId&&s++}}catch(h){n=!0,o=h}finally{try{a||d.return==null||d.return()}finally{if(n)throw o}}return s},"isTagDuplicate"),getTagIndexByValue:r(function(t){var e=this,i=[],s=this.settings.dropdown.caseSensitive;return this.getTagElms().forEach(function(a,n){a.__tagifyTagData&&Q(e.trim(a.__tagifyTagData.value),t,s)&&i.push(n)}),i},"getTagIndexByValue"),getTagElmByValue:r(function(t){var e=this.getTagIndexByValue(t)[0];return this.getTagElms()[e]},"getTagElmByValue"),flashTag:r(function(t){var e=this;t&&(t.classList.add(this.settings.classNames.tagFlash),setTimeout(function(){t.classList.remove(e.settings.classNames.tagFlash)},100))},"flashTag"),isTagBlacklisted:r(function(t){return t=this.trim(t.toLowerCase()),this.settings.blacklist.filter(function(e){return(""+e).toLowerCase()==t}).length},"isTagBlacklisted"),isTagWhitelisted:r(function(t){return!!this.getWhitelistItem(t)},"isTagWhitelisted"),getWhitelistItem:r(function(t,e,i){e=e||"value";var s,a=this.settings;return(i=i||a.whitelist).some(function(n){if(Q(typeof n=="object"?n[e]||n.value:n,t,a.dropdown.caseSensitive,a.trim))return s=typeof n=="object"?n:{value:n},!0}),s||e!="value"||a.tagTextProp=="value"||(s=this.getWhitelistItem(t,a.tagTextProp,i)),s},"getWhitelistItem"),validateTag:r(function(t){var e=this.settings,i="value"in t?"value":e.tagTextProp,s=this.trim(t[i]+"");return(t[i]+"").trim()?e.mode!="mix"&&e.pattern&&$(e.pattern,RegExp)&&!e.pattern.test(s)?this.TEXTS.pattern:!e.duplicates&&this.isTagDuplicate(s,e.dropdown.caseSensitive,t.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(s)||e.enforceWhitelist&&!this.isTagWhitelisted(s)?this.TEXTS.notAllowed:!e.validate||e.validate(t):this.TEXTS.empty},"validateTag"),getInvalidTagAttrs:r(function(t,e){return{"aria-invalid":!0,class:"".concat(t.class||""," ").concat(this.settings.classNames.tagNotAllowed).trim(),title:e}},"getInvalidTagAttrs"),hasMaxTags:r(function(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},"hasMaxTags"),setReadonly:r(function(t,e){var i=this.settings;this.DOM.scope.contains(document.activeElement)&&document.activeElement.blur(),i[e||"readonly"]=t,this.DOM.scope[(t?"set":"remove")+"Attribute"](e||"readonly",!0),this.settings.userInput=!0,this.setContentEditable(!t),t||(this.events.binding.call(this,!0),this.events.binding.call(this))},"setReadonly"),setContentEditable:r(function(t){this.DOM.scope.querySelectorAll("[data-can-editable]").forEach(function(e){e.contentEditable=t,e.tabIndex=t?0:-1})},"setContentEditable"),setDisabled:r(function(t){this.setReadonly(t,"disabled")},"setDisabled"),normalizeTags:r(function(t){var e=this,i=this.settings,s=i.whitelist,a=i.delimiters,n=i.mode,o=i.tagTextProp,l=[],d=!!s&&$(s[0],Object),u=Array.isArray(t),h=u&&t[0].value,g=r(function(c){return(c+"").split(a).reduce(function(f,p){var m,v=e.trim(p);return v&&f.push((U(m={},o,v),U(m,"value",v),m)),f},[])},"tc");if(typeof t=="number"&&(t=t.toString()),typeof t=="string"){if(!t.trim())return[];t=g(t)}else u&&(t=t.reduce(function(c,f){if(L(f)){var p,m=I({},f);o in m||(o="value"),m[o]=e.trim(m[o]),(m[o]||m[o]===0)&&c.push(m)}else f!=null&&f!==""&&f!==void 0&&(p=c).push.apply(p,tt(g(f)));return c},[]));return d&&!h&&(t.forEach(function(c){var f=l.map(function(v){return v.value}),p=e.dropdown.filterListItems.call(e,c[o],{exact:!0});e.settings.duplicates||(p=p.filter(function(v){return!f.includes(v.value)}));var m=p.length>1?e.getWhitelistItem(c[o],o,p):p[0];m&&$(m,Object)?l.push(m):n!="mix"&&(c.value==null&&(c.value=c[o]),l.push(c))}),l.length&&(t=l)),t},"normalizeTags"),parseMixTags:r(function(t,e){var i=this,s=this.settings,a=s.mixTagsInterpolator,n=s.duplicates,o=s.transformTag,l=s.enforceWhitelist,d=s.maxTags,u=s.tagTextProp,h=e?.skipDOM,g=h?document.createDocumentFragment():null,c=[];if(t=t.split(a[0]).map(function(p,m){var v,b,x,O=p.split(a[1]),w=O[0],D=c.length==d;if(h&&m==0&&p)return g.appendChild(document.createTextNode(p)),"";try{if(w==+w)throw Error;b=JSON.parse(w)}catch{b=i.normalizeTags(w)[0]||{value:w}}if(o.call(i,b),D||!(O.length>1)||l&&!i.isTagWhitelisted(b.value)||!n&&i.isTagDuplicate(b.value)){if(p)return h?(g.appendChild(document.createTextNode(a[0]+p)),""):m?a[0]+p:p}else{if(b[v=b[u]?u:"value"]=i.trim(b[v]),x=i.createTagElem(b),c.push(b),x.classList.add(i.settings.classNames.tagNoAnimation),h)return g.appendChild(x),O[1]&&g.appendChild(document.createTextNode(O[1])),"";O[0]=x.outerHTML,i.value.push(b)}return O.join("")}).join(""),h)return g.__tagifyTagsData=c,g;this.DOM.input.innerHTML=t,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize();var f=this.getTagElms();return f.forEach(function(p,m){return T(p,c[m])}),this.update({withoutChangeEvent:!0}),ct(f,this.state.hasFocus),t},"parseMixTags"),convertPastedTextToMixTags:r(function(t){var e=this.settings,i=e.pattern,s=e.whitelist,a=e.mixTagsInterpolator,n=e.mixTagsAllowedAfter,o=e.tagTextProp;if(!i||!s?.length)return t;var l=i.source?i.source.split("|"):[i],d={};l.forEach(function(V){d[V.replace(/\\/g,"")]=s.map(function(B){var W;return W=typeof B=="string"?B:B[o]||B.value,{originalItem:B,value:W=String(W),searchValue:W.toLowerCase()}}).sort(function(B,W){return W.value.length-B.value.length})});for(var u,h=RegExp(i.source,"g"),g=[];(u=h.exec(t))!==null;){var c=u[0],f=u.index,p=f+c.length,m=t.slice(p),v=d[c];if(v){var b=null,x=0,O=!0,w=!1,D=void 0;try{for(var P,k=v[Symbol.iterator]();!(O=(P=k.next()).done);O=!0){var j=P.value,S=j.value.length;if(m.slice(0,S).toLowerCase()===j.searchValue){var N=m[S];if(!N||n.test(N)){b=j,x=S;break}}}}catch(V){w=!0,D=V}finally{try{O||k.return==null||k.return()}finally{if(w)throw D}}if(b){var E=typeof b.originalItem=="string"?{value:b.value,prefix:c}:Bt(dt({},b.originalItem),{prefix:c});if(this.validateTag(E)===!0){var M="".concat(a[0]).concat(JSON.stringify(E)).concat(a[1]);g.push({start:f,end:p+x,replacement:M}),h.lastIndex=p+x}}}}var R=t;return g.reverse().forEach(function(V){var B=V.start,W=V.end,Dt=V.replacement;R=R.slice(0,B)+Dt+R.slice(W)}),R},"convertPastedTextToMixTags"),replaceTextWithNode:r(function(t,e){if(this.state.tag||e){e=e||this.state.tag.prefix+this.state.tag.value;var i,s,a=this.state.selection||window.getSelection(),n=a.anchorNode,o=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return n.splitText(a.anchorOffset-o),(i=n.nodeValue.lastIndexOf(e))==-1||(s=n.splitText(i),t&&n.parentNode.replaceChild(t,s),!0)}},"replaceTextWithNode"),prepareNewTagNode:r(function(t,e){e=e||{};var i=this.settings,s=[],a={},n=Object.assign({},t,{value:t.value+""});if(t=Object.assign({},n),i.transformTag.call(this,t),t.__isValid=this.hasMaxTags()||this.validateTag(t),t.__isValid!==!0){if(e.skipInvalid)return;if(I(a,this.getInvalidTagAttrs(t,t.__isValid),{__preInvalidData:n}),t.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(t.value)),!i.createInvalidTags)return void s.push(t.value)}return"readonly"in t&&(t.readonly?a["aria-readonly"]=!0:delete t.readonly),{tagElm:this.createTagElem(t,a),tagData:t,aggregatedInvalidInput:s}},"prepareNewTagNode"),postProcessNewTagNode:r(function(t,e){var i=this,s=this.settings,a=e.__isValid;a&&a===!0?this.value.push(e):(this.trigger("invalid",{data:e,index:this.value.length,tag:t,message:a}),s.keepInvalidTags||setTimeout(function(){return i.removeTags(t,!0)},1e3)),this.dropdown.position()},"postProcessNewTagNode"),selectTag:r(function(t,e){var i=this;if(!this.settings.enforceWhitelist||this.isTagWhitelisted(e.value)){this.state.actions.selectOption&&setTimeout(function(){return i.setRangeAtStartEnd(!1,i.DOM.input)});var s=this.getLastTag();return s?this.replaceTag(s,e):this.appendTag(t),this.value[0]=e,this.update(),this.trigger("add",{tag:t,data:e}),[t]}},"selectTag"),addEmptyTag:r(function(t){var e=I({value:""},t||{}),i=this.createTagElem(e);T(i,e),this.appendTag(i),this.editTag(i,{skipValidation:!0}),this.toggleFocusClass(!0)},"addEmptyTag"),addTags:r(function(t,e,i){var s=this,a=[],n=this.settings,o=[],l=document.createDocumentFragment(),d=[];if(!t||t.length==0)return a;switch(t=this.normalizeTags(t),n.mode){case"mix":return this.addMixTags(t);case"select":e=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),t.forEach(function(u){var h=s.prepareNewTagNode(u,{skipInvalid:i||n.skipInvalid});if(h){var g=h.tagElm;if(u=h.tagData,o=h.aggregatedInvalidInput,a.push(g),n.mode=="select")return s.selectTag(g,u);l.appendChild(g),s.postProcessNewTagNode(g,u),d.push({tagElm:g,tagData:u})}}),this.appendTag(l),d.forEach(function(u){var h=u.tagElm,g=u.tagData;return s.trigger("add",{tag:h,index:s.getTagIdx(g),data:g})}),this.update(),t.length&&e&&(this.input.set.call(this,n.createInvalidTags?"":o.join(n._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),this.dropdown.refilter(),a},"addTags"),addMixTags:r(function(t){var e=this;if((t=this.normalizeTags(t))[0].prefix||this.state.tag)return this.prefixedTextToTag(t[0]);var i=document.createDocumentFragment(),s=[];return t.forEach(function(a){var n=e.prepareNewTagNode(a);i.appendChild(n.tagElm),e.insertAfterTag(n.tagElm),e.postProcessNewTagNode(n.tagElm,n.tagData),s.push({tagElm:n.tagElm,tagData:n.tagData})}),this.appendMixTags(i,s),i.children},"addMixTags"),appendMixTags:r(function(t,e){var i,s=(i=this.state.selection)===null||i===void 0?void 0:i.range,a=!!s&&this.DOM.scope.contains(s.startContainer),n=t?t.nodeType===11?Array.prototype.slice.call(t.childNodes):[t]:[];if(a)this.injectAtCaret(t);else{this.DOM.input.focus();var o=this.setStateSelection();o?.range&&(o.range.setStart(this.DOM.input,o.range.endOffset),o.range.setEnd(this.DOM.input,o.range.endOffset)),this.DOM.input.appendChild(t),this.updateValueByDOMTags(),this.update();var l=n[n.length-1];l?.parentNode&&F(l),this.setStateSelection()}var d=e?.length?e:n.filter(function(u){return u.nodeType===1});d?.length&&this.trigger("add",{tags:d})},"appendMixTags"),prefixedTextToTag:r(function(t){var e,i,s,a=this,n=this.settings,o=(e=this.state.tag)===null||e===void 0?void 0:e.delimiters;return t.prefix=t.prefix||this.state.tag?this.state.tag.prefix:(n.pattern.source||n.pattern)[0],i=(s=this.prepareNewTagNode(t)).tagElm,this.replaceTextWithNode(i)||this.DOM.input.appendChild(i),setTimeout(function(){return i.classList.add(a.settings.classNames.tagNoAnimation)},300),this.update(),!o&&setTimeout(F,0,this.insertAfterTag(i)||i),this.state.tag=null,this.postProcessNewTagNode(i,s.tagData),this.trigger("add",{tag:s,data:t}),i},"prefixedTextToTag"),appendTag:r(function(t){var e=this.DOM,i=e.input;e.scope.insertBefore(t,i)},"appendTag"),createTagElem:r(function(t,e){t.__tagId=yt();var i,s,a=I({},t,dt((U(i={},this.settings.tagTextProp,H((t[this.settings.tagTextProp]||t.value)+"")),U(i,"title",H((t.title||"")+"")),U(i,"value",H(t.value+"")),i),e));return(function(n){for(var o,l=document.createNodeIterator(n,NodeFilter.SHOW_TEXT,null,!1);o=l.nextNode();)o.textContent.trim()||o.parentNode.removeChild(o)})(s=this.parseTemplate("tag",[a,this])),T(s,t),s},"createTagElem"),reCheckInvalidTags:r(function(){var t=this,e=this.settings;this.getTagElms(e.classNames.tagNotAllowed).forEach(function(i,s){var a=T(i),n=t.hasMaxTags(),o=t.validateTag(a);if(e.mode=="select"&&t.toggleScopeValidation(o),o===!0&&!n)return a=a.__preInvalidData?a.__preInvalidData:{value:a.value},t.replaceTag(i,a);i.title=n||o})},"reCheckInvalidTags"),removeTags:r(function(t,e,i){var s,a=this,n=this.settings;if(s=(t=t&&$(t,HTMLElement)?[t]:$(t,Array)?t:t?[t]:[this.getLastTag()].filter(function(o){return o})).reduce(function(o,l){l&&typeof l=="string"&&(l=a.getTagElmByValue(l));var d=T(l);return l&&d&&!d.readonly&&o.push({node:l,idx:a.getTagIdx(d),data:T(l,{__removed:!0})}),o},[]),i=typeof i=="number"?i:this.CSSVars.tagHideTransition,n.mode=="select"&&(i=0,this.input.set.call(this)),s.length==1&&n.mode!="select"&&s[0].node.classList.contains(n.classNames.tagNotAllowed)&&(e=!0),s.length)return n.hooks.beforeRemoveTag(s,{tagify:this}).then(function(){var o=r(function(l){l.node.parentNode&&(l.node.parentNode.removeChild(l.node),e?n.keepInvalidTags&&this.trigger("remove",{tag:l.node,index:l.idx}):(this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),n.keepInvalidTags&&this.reCheckInvalidTags(),this.trigger("remove",{tag:l.node,index:l.idx,data:l.data})))},"Z");e||(a.removeTagsFromValue(s.map(function(l){return l.node})),a.update(),n.mode=="select"&&n.userInput&&a.setContentEditable(!0)),i&&i>10&&s.length==1?(function(l){l.node.style.width=parseFloat(window.getComputedStyle(l.node).width)+"px",document.body.clientTop,l.node.classList.add(n.classNames.tagHide),setTimeout(o.bind(this),i,l)}).call(a,s[0]):s.forEach(o.bind(a))}).catch(function(o){})},"removeTags"),removeTagsFromDOM:r(function(){this.getTagElms().forEach(function(t){return t.remove()})},"removeTagsFromDOM"),removeTagsFromValue:r(function(t){var e=this;(t=Array.isArray(t)?t:[t]).forEach(function(i){var s=T(i),a=e.getTagIdx(s);a>-1&&e.value.splice(a,1)})},"removeTagsFromValue"),removeAllTags:r(function(t){var e=this;t=t||{},this.value=[],this.settings.mode=="mix"?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.refilter(),this.dropdown.position(),this.state.dropdown.visible&&setTimeout(function(){e.DOM.input.focus()}),this.settings.mode=="select"&&(this.input.set.call(this),this.settings.userInput&&this.setContentEditable(!0));var i=this.state.blockChangeEvent?void 0:function(){e.state.blockChangeEvent||e.trigger("remove",{})};this.update(t,i)},"removeAllTags"),postUpdate:r(function(){this.state.blockChangeEvent=!1;var t,e,i=this.settings,s=i.classNames,a=i.mode=="mix"?i.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value.trim():this.value.length+this.input.raw.call(this).length;this.toggleClass(s.hasMaxTags,this.value.length>=i.maxTags),this.toggleClass(s.hasNoTags,!this.value.length),this.toggleClass(s.empty,!a),i.mode=="select"&&this.toggleScopeValidation((e=this.value)===null||e===void 0||(t=e[0])===null||t===void 0?void 0:t.__isValid)},"postUpdate"),setOriginalInputValue:r(function(t){var e=this.DOM.originalInput;this.settings.mixMode.integrated||(e.value=t,e.tagifyValue=e.value)},"setOriginalInputValue"),update:r(function(t,e){clearTimeout(this.debouncedUpdateTimeout),this.debouncedUpdateTimeout=setTimeout((function(){this.setPersistedData(i,"value"),this.settings.onChangeAfterBlur&&(t||{}).withoutChangeEvent||this.state.blockChangeEvent||this.triggerChangeEvent(),this.postUpdate(),e?.()}).bind(this),100),this.events.bindOriginaInputListener.call(this,100);var i=this.getInputValue();this.setOriginalInputValue(i)},"update"),getInputValue:r(function(){var t=this.getCleanValue();return this.settings.mode=="mix"?this.getMixedTagsAsString(t):t.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(t):JSON.stringify(t):""},"getInputValue"),getCleanValue:r(function(t){return pt(t||this.value,this.dataProps)},"getCleanValue"),getMixedTagsAsString:r(function(){var t="",e=this,i=this.settings,s=i.originalInputValueFormat||JSON.stringify,a=i.mixTagsInterpolator;return r(function n(o){o.childNodes.forEach(function(l){if(l.nodeType==1){var d=T(l);if(l.tagName=="BR"&&(t+=`\r
|
|
39
|
+
`);try{s=s.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch{}return s=s.replace(/\s/g," "),e?.trim?this.trim(s):s},"normalize"),autocomplete:{suggest:r(function(t){if(this.settings.autoComplete.enabled){typeof(t=t||{value:""})!="object"&&(t={value:t});var e=this.dropdown.getMappedValue(t);if(typeof e!="number"){var i=this.state.inputText.toLowerCase(),s=e.substr(0,this.state.inputText.length).toLowerCase(),a=e.substring(this.state.inputText.length);e&&this.state.inputText&&s==i?(this.DOM.input.setAttribute("data-suggest",a),this.state.inputSuggestion=t):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}}},"suggest"),set:r(function(t){var e=this.DOM.input.getAttribute("data-suggest"),i=t||(e?this.state.inputText+e:null);return!!i&&(this.settings.mode=="mix"?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+i)):(this.input.set.call(this,i),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)},"set")}},getTagIdx:r(function(t){return this.value.findIndex(function(e){return e.__tagId==(t||{}).__tagId})},"getTagIdx"),getNodeIndex:r(function(t){var e=0;if(t)for(;t=t.previousElementSibling;)e++;return e},"getNodeIndex"),getTagElms:r(function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];var s="."+tt(this.settings.classNames.tag.split(" ")).concat(tt(e)).join(".");return[].slice.call(this.DOM.scope.querySelectorAll(s))},"getTagElms"),getLastTag:r(function(){var t=this.settings.classNames,e=this.DOM.scope.querySelectorAll("".concat(t.tagSelector,":not(.").concat(t.tagHide,"):not([readonly])"));return e[e.length-1]},"getLastTag"),isTagDuplicate:r(function(t,e,i){var s=0,a=!0,n=!1,o=void 0;try{for(var l,d=this.value[Symbol.iterator]();!(a=(l=d.next()).done);a=!0){var u=l.value;Q(this.trim(""+t),u.value,e)&&i!=u.__tagId&&s++}}catch(h){n=!0,o=h}finally{try{a||d.return==null||d.return()}finally{if(n)throw o}}return s},"isTagDuplicate"),getTagIndexByValue:r(function(t){var e=this,i=[],s=this.settings.dropdown.caseSensitive;return this.getTagElms().forEach(function(a,n){a.__tagifyTagData&&Q(e.trim(a.__tagifyTagData.value),t,s)&&i.push(n)}),i},"getTagIndexByValue"),getTagElmByValue:r(function(t){var e=this.getTagIndexByValue(t)[0];return this.getTagElms()[e]},"getTagElmByValue"),flashTag:r(function(t){var e=this;t&&(t.classList.add(this.settings.classNames.tagFlash),setTimeout(function(){t.classList.remove(e.settings.classNames.tagFlash)},100))},"flashTag"),isTagBlacklisted:r(function(t){return t=this.trim(t.toLowerCase()),this.settings.blacklist.filter(function(e){return(""+e).toLowerCase()==t}).length},"isTagBlacklisted"),isTagWhitelisted:r(function(t){return!!this.getWhitelistItem(t)},"isTagWhitelisted"),getWhitelistItem:r(function(t,e,i){e=e||"value";var s,a=this.settings;return(i=i||a.whitelist).some(function(n){if(Q(typeof n=="object"?n[e]||n.value:n,t,a.dropdown.caseSensitive,a.trim))return s=typeof n=="object"?n:{value:n},!0}),s||e!="value"||a.tagTextProp=="value"||(s=this.getWhitelistItem(t,a.tagTextProp,i)),s},"getWhitelistItem"),validateTag:r(function(t){var e=this.settings,i="value"in t?"value":e.tagTextProp,s=this.trim(t[i]+"");return(t[i]+"").trim()?e.mode!="mix"&&e.pattern&&$(e.pattern,RegExp)&&!e.pattern.test(s)?this.TEXTS.pattern:!e.duplicates&&this.isTagDuplicate(s,e.dropdown.caseSensitive,t.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(s)||e.enforceWhitelist&&!this.isTagWhitelisted(s)?this.TEXTS.notAllowed:!e.validate||e.validate(t):this.TEXTS.empty},"validateTag"),getInvalidTagAttrs:r(function(t,e){return{"aria-invalid":!0,class:"".concat(t.class||""," ").concat(this.settings.classNames.tagNotAllowed).trim(),title:e}},"getInvalidTagAttrs"),hasMaxTags:r(function(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},"hasMaxTags"),setReadonly:r(function(t,e){var i=this.settings;this.DOM.scope.contains(document.activeElement)&&document.activeElement.blur(),i[e||"readonly"]=t,this.DOM.scope[(t?"set":"remove")+"Attribute"](e||"readonly",!0),this.settings.userInput=!0,this.setContentEditable(!t),t||(this.events.binding.call(this,!0),this.events.binding.call(this))},"setReadonly"),setContentEditable:r(function(t){this.DOM.scope.querySelectorAll("[data-can-editable]").forEach(function(e){e.contentEditable=t,e.tabIndex=t?0:-1})},"setContentEditable"),setDisabled:r(function(t){this.setReadonly(t,"disabled")},"setDisabled"),normalizeTags:r(function(t){var e=this,i=this.settings,s=i.whitelist,a=i.delimiters,n=i.mode,o=i.tagTextProp,l=[],d=!!s&&$(s[0],Object),u=Array.isArray(t),h=u&&t[0].value,g=r(function(c){return(c+"").split(a).reduce(function(f,p){var m,v=e.trim(p);return v&&f.push((U(m={},o,v),U(m,"value",v),m)),f},[])},"tc");if(typeof t=="number"&&(t=t.toString()),typeof t=="string"){if(!t.trim())return[];t=g(t)}else u&&(t=t.reduce(function(c,f){if(L(f)){var p,m=I({},f);o in m||(o="value"),m[o]=e.trim(m[o]),(m[o]||m[o]===0)&&c.push(m)}else f!=null&&f!==""&&f!==void 0&&(p=c).push.apply(p,tt(g(f)));return c},[]));return d&&!h&&(t.forEach(function(c){var f=l.map(function(v){return v.value}),p=e.dropdown.filterListItems.call(e,c[o],{exact:!0});e.settings.duplicates||(p=p.filter(function(v){return!f.includes(v.value)}));var m=p.length>1?e.getWhitelistItem(c[o],o,p):p[0];m&&$(m,Object)?l.push(m):n!="mix"&&(c.value==null&&(c.value=c[o]),l.push(c))}),l.length&&(t=l)),t},"normalizeTags"),parseMixTags:r(function(t,e){var i=this,s=this.settings,a=s.mixTagsInterpolator,n=s.duplicates,o=s.transformTag,l=s.enforceWhitelist,d=s.maxTags,u=s.tagTextProp,h=e?.skipDOM,g=h?document.createDocumentFragment():null,c=[];if(t=t.split(a[0]).map(function(p,m){var v,b,x,O=p.split(a[1]),w=O[0],D=c.length==d;if(h&&m==0&&p)return g.appendChild(document.createTextNode(p)),"";try{if(w==+w)throw Error;b=JSON.parse(w)}catch{b=i.normalizeTags(w)[0]||{value:w}}if(o.call(i,b),D||!(O.length>1)||l&&!i.isTagWhitelisted(b.value)||!n&&i.isTagDuplicate(b.value)){if(p)return h?(g.appendChild(document.createTextNode(a[0]+p)),""):m?a[0]+p:p}else{if(b[v=b[u]?u:"value"]=i.trim(b[v]),x=i.createTagElem(b),c.push(b),x.classList.add(i.settings.classNames.tagNoAnimation),h)return g.appendChild(x),O[1]&&g.appendChild(document.createTextNode(O[1])),"";O[0]=x.outerHTML,i.value.push(b)}return O.join("")}).join(""),h)return g.__tagifyTagsData=c,g;this.DOM.input.innerHTML=t,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize();var f=this.getTagElms();return f.forEach(function(p,m){return T(p,c[m])}),this.update({withoutChangeEvent:!0}),ct(f,this.state.hasFocus),t},"parseMixTags"),convertPastedTextToMixTags:r(function(t){var e=this.settings,i=e.pattern,s=e.whitelist,a=e.mixTagsInterpolator,n=e.mixTagsAllowedAfter,o=e.tagTextProp;if(!i||!s?.length)return t;var l=i.source?i.source.split("|"):[i],d={};l.forEach(function(V){d[V.replace(/\\/g,"")]=s.map(function(B){var W;return W=typeof B=="string"?B:B[o]||B.value,{originalItem:B,value:W=String(W),searchValue:W.toLowerCase()}}).sort(function(B,W){return W.value.length-B.value.length})});for(var u,h=RegExp(i.source,"g"),g=[];(u=h.exec(t))!==null;){var c=u[0],f=u.index,p=f+c.length,m=t.slice(p),v=d[c];if(v){var b=null,x=0,O=!0,w=!1,D=void 0;try{for(var P,_=v[Symbol.iterator]();!(O=(P=_.next()).done);O=!0){var j=P.value,S=j.value.length;if(m.slice(0,S).toLowerCase()===j.searchValue){var N=m[S];if(!N||n.test(N)){b=j,x=S;break}}}}catch(V){w=!0,D=V}finally{try{O||_.return==null||_.return()}finally{if(w)throw D}}if(b){var E=typeof b.originalItem=="string"?{value:b.value,prefix:c}:Bt(dt({},b.originalItem),{prefix:c});if(this.validateTag(E)===!0){var M="".concat(a[0]).concat(JSON.stringify(E)).concat(a[1]);g.push({start:f,end:p+x,replacement:M}),h.lastIndex=p+x}}}}var R=t;return g.reverse().forEach(function(V){var B=V.start,W=V.end,Dt=V.replacement;R=R.slice(0,B)+Dt+R.slice(W)}),R},"convertPastedTextToMixTags"),replaceTextWithNode:r(function(t,e){if(this.state.tag||e){e=e||this.state.tag.prefix+this.state.tag.value;var i,s,a=this.state.selection||window.getSelection(),n=a.anchorNode,o=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return n.splitText(a.anchorOffset-o),(i=n.nodeValue.lastIndexOf(e))==-1||(s=n.splitText(i),t&&n.parentNode.replaceChild(t,s),!0)}},"replaceTextWithNode"),prepareNewTagNode:r(function(t,e){e=e||{};var i=this.settings,s=[],a={},n=Object.assign({},t,{value:t.value+""});if(t=Object.assign({},n),i.transformTag.call(this,t),t.__isValid=this.hasMaxTags()||this.validateTag(t),t.__isValid!==!0){if(e.skipInvalid)return;if(I(a,this.getInvalidTagAttrs(t,t.__isValid),{__preInvalidData:n}),t.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(t.value)),!i.createInvalidTags)return void s.push(t.value)}return"readonly"in t&&(t.readonly?a["aria-readonly"]=!0:delete t.readonly),{tagElm:this.createTagElem(t,a),tagData:t,aggregatedInvalidInput:s}},"prepareNewTagNode"),postProcessNewTagNode:r(function(t,e){var i=this,s=this.settings,a=e.__isValid;a&&a===!0?this.value.push(e):(this.trigger("invalid",{data:e,index:this.value.length,tag:t,message:a}),s.keepInvalidTags||setTimeout(function(){return i.removeTags(t,!0)},1e3)),this.dropdown.position()},"postProcessNewTagNode"),selectTag:r(function(t,e){var i=this;if(!this.settings.enforceWhitelist||this.isTagWhitelisted(e.value)){this.state.actions.selectOption&&setTimeout(function(){return i.setRangeAtStartEnd(!1,i.DOM.input)});var s=this.getLastTag();return s?this.replaceTag(s,e):this.appendTag(t),this.value[0]=e,this.update(),this.trigger("add",{tag:t,data:e}),[t]}},"selectTag"),addEmptyTag:r(function(t){var e=I({value:""},t||{}),i=this.createTagElem(e);T(i,e),this.appendTag(i),this.editTag(i,{skipValidation:!0}),this.toggleFocusClass(!0)},"addEmptyTag"),addTags:r(function(t,e,i){var s=this,a=[],n=this.settings,o=[],l=document.createDocumentFragment(),d=[];if(!t||t.length==0)return a;switch(t=this.normalizeTags(t),n.mode){case"mix":return this.addMixTags(t);case"select":e=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),t.forEach(function(u){var h=s.prepareNewTagNode(u,{skipInvalid:i||n.skipInvalid});if(h){var g=h.tagElm;if(u=h.tagData,o=h.aggregatedInvalidInput,a.push(g),n.mode=="select")return s.selectTag(g,u);l.appendChild(g),s.postProcessNewTagNode(g,u),d.push({tagElm:g,tagData:u})}}),this.appendTag(l),d.forEach(function(u){var h=u.tagElm,g=u.tagData;return s.trigger("add",{tag:h,index:s.getTagIdx(g),data:g})}),this.update(),t.length&&e&&(this.input.set.call(this,n.createInvalidTags?"":o.join(n._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),this.dropdown.refilter(),a},"addTags"),addMixTags:r(function(t){var e=this;if((t=this.normalizeTags(t))[0].prefix||this.state.tag)return this.prefixedTextToTag(t[0]);var i=document.createDocumentFragment(),s=[];return t.forEach(function(a){var n=e.prepareNewTagNode(a);i.appendChild(n.tagElm),e.insertAfterTag(n.tagElm),e.postProcessNewTagNode(n.tagElm,n.tagData),s.push({tagElm:n.tagElm,tagData:n.tagData})}),this.appendMixTags(i,s),i.children},"addMixTags"),appendMixTags:r(function(t,e){var i,s=(i=this.state.selection)===null||i===void 0?void 0:i.range,a=!!s&&this.DOM.scope.contains(s.startContainer),n=t?t.nodeType===11?Array.prototype.slice.call(t.childNodes):[t]:[];if(a)this.injectAtCaret(t);else{this.DOM.input.focus();var o=this.setStateSelection();o?.range&&(o.range.setStart(this.DOM.input,o.range.endOffset),o.range.setEnd(this.DOM.input,o.range.endOffset)),this.DOM.input.appendChild(t),this.updateValueByDOMTags(),this.update();var l=n[n.length-1];l?.parentNode&&F(l),this.setStateSelection()}var d=e?.length?e:n.filter(function(u){return u.nodeType===1});d?.length&&this.trigger("add",{tags:d})},"appendMixTags"),prefixedTextToTag:r(function(t){var e,i,s,a=this,n=this.settings,o=(e=this.state.tag)===null||e===void 0?void 0:e.delimiters;return t.prefix=t.prefix||this.state.tag?this.state.tag.prefix:(n.pattern.source||n.pattern)[0],i=(s=this.prepareNewTagNode(t)).tagElm,this.replaceTextWithNode(i)||this.DOM.input.appendChild(i),setTimeout(function(){return i.classList.add(a.settings.classNames.tagNoAnimation)},300),this.update(),!o&&setTimeout(F,0,this.insertAfterTag(i)||i),this.state.tag=null,this.postProcessNewTagNode(i,s.tagData),this.trigger("add",{tag:s,data:t}),i},"prefixedTextToTag"),appendTag:r(function(t){var e=this.DOM,i=e.input;e.scope.insertBefore(t,i)},"appendTag"),createTagElem:r(function(t,e){t.__tagId=yt();var i,s,a=I({},t,dt((U(i={},this.settings.tagTextProp,H((t[this.settings.tagTextProp]||t.value)+"")),U(i,"title",H((t.title||"")+"")),U(i,"value",H(t.value+"")),i),e));return(function(n){for(var o,l=document.createNodeIterator(n,NodeFilter.SHOW_TEXT,null,!1);o=l.nextNode();)o.textContent.trim()||o.parentNode.removeChild(o)})(s=this.parseTemplate("tag",[a,this])),T(s,t),s},"createTagElem"),reCheckInvalidTags:r(function(){var t=this,e=this.settings;this.getTagElms(e.classNames.tagNotAllowed).forEach(function(i,s){var a=T(i),n=t.hasMaxTags(),o=t.validateTag(a);if(e.mode=="select"&&t.toggleScopeValidation(o),o===!0&&!n)return a=a.__preInvalidData?a.__preInvalidData:{value:a.value},t.replaceTag(i,a);i.title=n||o})},"reCheckInvalidTags"),removeTags:r(function(t,e,i){var s,a=this,n=this.settings;if(s=(t=t&&$(t,HTMLElement)?[t]:$(t,Array)?t:t?[t]:[this.getLastTag()].filter(function(o){return o})).reduce(function(o,l){l&&typeof l=="string"&&(l=a.getTagElmByValue(l));var d=T(l);return l&&d&&!d.readonly&&o.push({node:l,idx:a.getTagIdx(d),data:T(l,{__removed:!0})}),o},[]),i=typeof i=="number"?i:this.CSSVars.tagHideTransition,n.mode=="select"&&(i=0,this.input.set.call(this)),s.length==1&&n.mode!="select"&&s[0].node.classList.contains(n.classNames.tagNotAllowed)&&(e=!0),s.length)return n.hooks.beforeRemoveTag(s,{tagify:this}).then(function(){var o=r(function(l){l.node.parentNode&&(l.node.parentNode.removeChild(l.node),e?n.keepInvalidTags&&this.trigger("remove",{tag:l.node,index:l.idx}):(this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),n.keepInvalidTags&&this.reCheckInvalidTags(),this.trigger("remove",{tag:l.node,index:l.idx,data:l.data})))},"Z");e||(a.removeTagsFromValue(s.map(function(l){return l.node})),a.update(),n.mode=="select"&&n.userInput&&a.setContentEditable(!0)),i&&i>10&&s.length==1?(function(l){l.node.style.width=parseFloat(window.getComputedStyle(l.node).width)+"px",document.body.clientTop,l.node.classList.add(n.classNames.tagHide),setTimeout(o.bind(this),i,l)}).call(a,s[0]):s.forEach(o.bind(a))}).catch(function(o){})},"removeTags"),removeTagsFromDOM:r(function(){this.getTagElms().forEach(function(t){return t.remove()})},"removeTagsFromDOM"),removeTagsFromValue:r(function(t){var e=this;(t=Array.isArray(t)?t:[t]).forEach(function(i){var s=T(i),a=e.getTagIdx(s);a>-1&&e.value.splice(a,1)})},"removeTagsFromValue"),removeAllTags:r(function(t){var e=this;t=t||{},this.value=[],this.settings.mode=="mix"?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.refilter(),this.dropdown.position(),this.state.dropdown.visible&&setTimeout(function(){e.DOM.input.focus()}),this.settings.mode=="select"&&(this.input.set.call(this),this.settings.userInput&&this.setContentEditable(!0));var i=this.state.blockChangeEvent?void 0:function(){e.state.blockChangeEvent||e.trigger("remove",{})};this.update(t,i)},"removeAllTags"),postUpdate:r(function(){this.state.blockChangeEvent=!1;var t,e,i=this.settings,s=i.classNames,a=i.mode=="mix"?i.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value.trim():this.value.length+this.input.raw.call(this).length;this.toggleClass(s.hasMaxTags,this.value.length>=i.maxTags),this.toggleClass(s.hasNoTags,!this.value.length),this.toggleClass(s.empty,!a),i.mode=="select"&&this.toggleScopeValidation((e=this.value)===null||e===void 0||(t=e[0])===null||t===void 0?void 0:t.__isValid)},"postUpdate"),setOriginalInputValue:r(function(t){var e=this.DOM.originalInput;this.settings.mixMode.integrated||(e.value=t,e.tagifyValue=e.value)},"setOriginalInputValue"),update:r(function(t,e){clearTimeout(this.debouncedUpdateTimeout),this.debouncedUpdateTimeout=setTimeout((function(){this.setPersistedData(i,"value"),this.settings.onChangeAfterBlur&&(t||{}).withoutChangeEvent||this.state.blockChangeEvent||this.triggerChangeEvent(),this.postUpdate(),e?.()}).bind(this),100),this.events.bindOriginaInputListener.call(this,100);var i=this.getInputValue();this.setOriginalInputValue(i)},"update"),getInputValue:r(function(){var t=this.getCleanValue();return this.settings.mode=="mix"?this.getMixedTagsAsString(t):t.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(t):JSON.stringify(t):""},"getInputValue"),getCleanValue:r(function(t){return pt(t||this.value,this.dataProps)},"getCleanValue"),getMixedTagsAsString:r(function(){var t="",e=this,i=this.settings,s=i.originalInputValueFormat||JSON.stringify,a=i.mixTagsInterpolator;return r(function n(o){o.childNodes.forEach(function(l){if(l.nodeType==1){var d=T(l);if(l.tagName=="BR"&&(t+=`\r
|
|
40
40
|
`),d&&z.call(e,l)){if(d.__removed)return;t+=a[0]+s(ut(d,e.dataProps))+a[1]}else l.getAttribute("style")||["B","I","U"].includes(l.tagName)?t+=l.textContent:l.tagName!="DIV"&&l.tagName!="P"||(t+=`\r
|
|
41
41
|
`,n(l))}else t+=l.textContent})},"te")(this.DOM.input),t},"getMixedTagsAsString")},et.prototype.removeTag=et.prototype.removeTags;var $t=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,C=r((t,e,i,s)=>{for(var a=s>1?void 0:s?Ht(e,i):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(a=(s?o(e,i,a):o(a))||a);return s&&a&&$t(e,i,a),a},"__decorateClass"),J;let A=(J=class extends Nt.FieldComponentUnoCss{emits=["input","change","reset"];loading=!1;autofocus=!1;inputValidatePattern=null;mode="select";items=null;placeholder={en:"Select value",ru:"Выберите значение"};tagify;reactiveValue=null;itemsInner=[];randKey="";maxPlaceholderWidth=0;createdParent(){super.createdParent(),this.value=this.inputValue||this.modelValue||null,this.randKey="vst-select-"+this.VST.generateRandomKey()}beforeMountParent(){this.isFirstValueSet=!1,this.isIgnoreSetTags=!1}isFirstValueSet=!1;isIgnoreSetTags=!1;currentSearchValue="";mountedParent(){let e={mode:this.mode=="select"?"select":void 0,addTagOnBlur:!1,onChangeAfterBlur:!1,whitelist:this.itemsInner,dropdown:{highlightFirst:!0,clearOnSelect:!0,closeOnSelect:this.mode=="select",enabled:0,maxItems:2e3},placeholder:typeof this.placeholder=="string"?this.placeholder:this.placeholder?.[this.VST.$reactive.locale]||this.placeholder?.en||"Выберите значение",callbacks:{change:r(i=>{let s="";i.detail?.value?.trim?.()?.length&&i.detail?.value!="null"&&(this.mode=="select"?(s=typeof i.detail?.value=="string"&&(i.detail?.value?.trim?.()?.startsWith("{")||i.detail?.value?.trim?.()?.startsWith("["))?JSON.parse(i.detail?.value)?.[0]?.key:i.detail?.value?.[0]?.key||i.detail?.value?.key,this.nextTick(()=>{const a=JSON.parse(JSON.stringify(this.itemsInner.find(n=>n?.key===s)??null));(a?.key||a?.key===0)&&(this.tagify.addTags(this.reactiveValue=a?.value),this.$emit("change",this.isFirstValueSet?s??null:this.value=s??null))})):this.mode=="multi"?(this.tagify.removeAllTags?.(),s=JSON.parse(i.detail?.value),s=Array.isArray(s)?s.map(a=>a.key):[s],this.tagify.addTags(JSON.parse(i.detail?.value)),this.nextTick(()=>{this.$emit("change",this.isFirstValueSet?s:this.value=s),this.reactiveValue=i.detail?.value})):this.mode=="tags"&&(this.tagify?.removeAllTags?.(),s=JSON.parse(i.detail?.value),this.tagify.addTags(s),this.nextTick(()=>{this.reactiveValue=i.detail?.value,this.nextTick(()=>{this.isIgnoreSetTags=!0,this.$emit("change",this.isFirstValueSet?s??null:this.value=s??null)})})))},"change"),remove:r(i=>{this.disabled||(this.mode=="select"&&!(i.detail?.tagify?.value??[]).length&&this.value!==null?(this.tagify?.removeAllTags(),this.reactiveValue=null,this.$emit("change",this.value=null)):this.mode=="tags"?!JSON.parse(this.reactiveValue)?.filter(a=>(a.key!==void 0?a.key:a.value)!=i.detail?.data?.key)?.length&&this.reactiveValue!="[]"&&(this.tagify.removeAllTags(),this.$emit("change",this.value=[]),this.reactiveValue="[]"):typeof this.reactiveValue=="string"&&(this.reactiveValue?.startsWith("{")||this.reactiveValue?.startsWith("["))&&this.nextTick(()=>{!JSON.parse(this.reactiveValue)?.filter(a=>a.key!=i.detail?.data?.key)?.length&&this.reactiveValue!="[]"&&(this.reactiveValue="[]",this.tagify.removeAllTags(),this.$emit("change",this.value=[]))},4),this.nextTick(()=>()=>this.$el?.querySelector(`#${this.randKey}`)?.focus(),5))},"remove")},templates:{wrapper(i,s){const{classNames:a,mode:n,readonly:o,disabled:l,required:d}=s,u=n?a[`${n}Mode`]:"",h=n==="select";return`
|
|
42
42
|
<tags class="${a.namespace} ${u} ${i.className}"
|
|
@@ -96,4 +96,4 @@
|
|
|
96
96
|
${i.mappedValue||i.value}
|
|
97
97
|
</div>`.replace(/\s+/g," ").trim()},dropdownHeader(i){return`<header data-selector="tagify-suggestions-header" class="${this.settings.classNames.dropdownHeader}"></header>`.replace(/\s+/g," ").trim()},dropdownFooter(i){const s=i.length-this.settings.dropdown.maxItems;return s>0?`<footer data-selector="tagify-suggestions-footer" class="${this.settings.classNames.dropdownFooter}">
|
|
98
98
|
${s} more items. Refine your search.
|
|
99
|
-
</footer>`.replace(/\s+/g," ").trim():""}}};this.mode!=="tags"?e.editTags=!1:this.inputValidatePattern?.trim?.()&&(e.pattern=new RegExp(this.inputValidatePattern.trim(),"i"),e.editTags={clicks:1,keepInvalid:!0}),this.nextTick(()=>{this.tagify=new et(this.$el.querySelector(`#vst-s-${this.randKey}`),e),this.tagify.setDisabled(this.disabled),this.tagify.loading(this.loading),this.tagify.on("input",i=>{this.$emit("input",this.currentSearchValue=i?.detail?.value??"")}),this.tagify.on("blur",i=>{this.nextTick(()=>{this.tagify?.loading?.(this.loading),this.tagify?.setDisabled?.(this.disabled)})}),this.setTags()})}beforeUpdate(){this.$el.__vst_select=this;const e=this.$el.querySelector?.(".tagify__input")?.closest?.(".vst-select-field")?.offsetWidth??0;e&&(this.maxPlaceholderWidth=e-e*.25)}reset(e){if(this.mode=="select")this.tagify?.removeAllTags?.(),this.reactiveValue=null;else if(this.mode=="multi"){const i=e?.parentElement?.getAttribute?.("key");if(i){const s=this.tagify.value.find(a=>a.key==i);s&&this.tagify?.removeTags(s.value),this.nextTick(()=>{if(this.tagify?.value?.length){const a=[];for(const n of this.tagify.value)a.push({key:n.key,value:n.value});this.reactiveValue=JSON.stringify(a)}})}}else this.mode=="tags"&&Array.isArray(this.value)&&this.value.length==1&&(this.nextTick(()=>this.tagify?.removeAllTags?.(),15),this.value=[]);this.nextTick(()=>(this.$el?.querySelector?.(".tagify__input")).focus?.(),3),this.nextTick(()=>{this.$emit("update:modelValue",this.value),this.$emit("change",this.value)},4),this.$emit("reset")}onViewPortResize(){this.setTags()}setTags(e){this.beforeUpdate(),this.nextTick(()=>{if(this.tagify?.removeAllTags?.(),this.mode=="select"){const i=this.itemsInner.find(s=>(s?.key===0?s?.key:s?.key||s?.value)===(e??(this.inputValue||this.modelValue)))
|
|
99
|
+
</footer>`.replace(/\s+/g," ").trim():""}}};this.mode!=="tags"?e.editTags=!1:this.inputValidatePattern?.trim?.()&&(e.pattern=new RegExp(this.inputValidatePattern.trim(),"i"),e.editTags={clicks:1,keepInvalid:!0}),this.nextTick(()=>{this.tagify=new et(this.$el.querySelector(`#vst-s-${this.randKey}`),e),this.tagify.setDisabled(this.disabled),this.tagify.loading(this.loading),this.tagify.on("input",i=>{this.$emit("input",this.currentSearchValue=i?.detail?.value??"")}),this.tagify.on("blur",i=>{this.nextTick(()=>{this.tagify?.loading?.(this.loading),this.tagify?.setDisabled?.(this.disabled)})}),this.setTags()})}beforeUpdate(){this.$el.__vst_select=this;const e=this.$el.querySelector?.(".tagify__input")?.closest?.(".vst-select-field")?.offsetWidth??0;e&&(this.maxPlaceholderWidth=e-e*.25)}reset(e){if(this.mode=="select")this.tagify?.removeAllTags?.(),this.reactiveValue=null;else if(this.mode=="multi"){const i=e?.parentElement?.getAttribute?.("key");if(i){const s=this.tagify.value.find(a=>a.key==i);s&&this.tagify?.removeTags(s.value),this.nextTick(()=>{if(this.tagify?.value?.length){const a=[];for(const n of this.tagify.value)a.push({key:n.key,value:n.value});this.reactiveValue=JSON.stringify(a)}})}}else this.mode=="tags"&&Array.isArray(this.value)&&this.value.length==1&&(this.nextTick(()=>this.tagify?.removeAllTags?.(),15),this.value=[]);this.nextTick(()=>(this.$el?.querySelector?.(".tagify__input")).focus?.(),3),this.nextTick(()=>{this.$emit("update:modelValue",this.value),this.$emit("change",this.value)},4),this.$emit("reset")}onViewPortResize(){this.setTags()}setTags(e){this.beforeUpdate(),this.nextTick(()=>{if(this.tagify?.removeAllTags?.(),this.mode=="select"){const i=this.itemsInner.find(s=>(s?.key===0?s?.key:s?.key||s?.value)===(e??(this.inputValue||this.modelValue)));(i?.key||i?.key===0)&&(this.isFirstValueSet=!0,this.value=i.key??i.value??null,this.tagify?.addTags?.((i.value??i.key??"").toString()))}else if(this.mode=="multi"){const i=e??(this.inputValue||this.modelValue);if(Array.isArray(i)){this.isFirstValueSet=!0;const s=JSON.parse(JSON.stringify(this.itemsInner))?.filter(a=>i.includes(a?.key));this.value=s?.map(a=>a?.key??a),this.nextTick(()=>this.tagify?.addTags(s??[]))}}else if(this.mode=="tags"){const i=e??(this.inputValue||this.modelValue);Array.isArray(i)&&(this.isFirstValueSet=!0,this.value=JSON.parse(JSON.stringify(this.itemsInner))?.filter(s=>i?.some(a=>(a?.key||a?.value)==(s?.key||s?.value))).map(s=>({value:s.value})),this.nextTick(()=>this.tagify?.addTags(this.value??[])))}})}itemsWatch(e){this.itemsInner=JSON.parse(JSON.stringify(e)),this.tagify&&(this.tagify.whitelist=this.itemsInner)}watchValue(e){if(this.isFirstValueSet)return this.isFirstValueSet=!1;this.$emit("update:modelValue",e)}modelValueWatch(e){if(this.isIgnoreSetTags)return this.isIgnoreSetTags=!1;this.nextTick(()=>this.setTags(e),2)}disabledWatch(e){this.tagify?.setDisabled?.(e),e&&!this.value&&(this.inputValue||this.modelValue)&&(this.value=this.inputValue||this.modelValue)&&this.nextTick(()=>this.tagify?.addTags(this.mode=="select"?this.itemsInner?.find?.(i=>i.key==this.value)?.value??"":this.itemsInner?.filter?.(i=>this.value?.includes(i.key))))}watchLoading(e){this.tagify?.loading?.(e),!e&&this.items?.length&&this.nextTick(()=>this.tagify?.dropdown.show(this.currentSearchValue))}},r(J,"SelectField"),J);C([k.Prop(Boolean)],A.prototype,"loading",2);C([k.Prop(Boolean)],A.prototype,"autofocus",2);C([k.Prop(String)],A.prototype,"inputValidatePattern",2);C([k.Prop(String)],A.prototype,"mode",2);C([k.Prop(Array)],A.prototype,"items",2);C([k.Prop(String,Object)],A.prototype,"placeholder",2);C([k.Watch("items",!0,!0)],A.prototype,"itemsWatch",1);C([k.Watch({deep:!0})],A.prototype,"watchValue",1);C([k.Watch("modelValue",!0)],A.prototype,"modelValueWatch",1);C([k.Watch("disabled",!0,!0)],A.prototype,"disabledWatch",1);C([k.Watch],A.prototype,"watchLoading",1);A=C([k.Component],A);const Wt=["id","value","autofocus"];function Kt(t,e,i,s,a,n){return y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(["vst-select-field d-inline-block mx2px my1px w100%",{"vst-select-multi":t.mode=="multi"||t.mode=="tags","min-h45px":t.size=="lg","min-h24px":t.size=="sm","min-h35px":t.size=="md",["vst-select-"+t.randKey]:!0}])},[y.createElementVNode("input",{ref:"selectInput",id:`vst-s-${t.randKey}`,value:t.reactiveValue,autofocus:t.autofocus},null,8,Wt),t.size=="md"||t.size=="sm"?(y.openBlock(),y.createBlock(y.resolveDynamicComponent("style"),{key:0},{default:y.withCtx(()=>[y.createTextVNode(".vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify { "+y.toDisplayString(t.mode!="select"&&t.value&&t.value?.toString?.()?.trim?.()?.length?"min-":"")+"height: 35px !important; min-height: auto !important; padding-left: 12px !important; padding-top: 2px !important; border-color: #a8a29e99 !important; } .vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify__tag { height: 28px !important; } .vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify__input { height: 20px !important; padding: 0 !important; } .vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify__tag-text { padding: 0 0 0 0 !important; } .vst-select-dropdown-"+y.toDisplayString(t.randKey)+" .tagify__dropdown__item { height: 32px !important; line-height: 29px !important; padding: 1px 7px 3px !important; } .vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify--select tag > div, .vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify--select tag, .vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify__tag, { padding: 0 !important; margin: 0 !important; height: 20px !important; }",1)]),_:1})):y.createCommentVNode("",!0),t.mode=="multi"?(y.openBlock(),y.createBlock(y.resolveDynamicComponent("style"),{key:1},{default:y.withCtx(()=>[y.createTextVNode(".vst-select-"+y.toDisplayString(t.randKey)+" .tagify__tag { background: #e5e5e5; }",1)]),_:1})):y.createCommentVNode("",!0),t.mode=="select"?(y.openBlock(),y.createBlock(y.resolveDynamicComponent("style"),{key:2},{default:y.withCtx(()=>[y.createTextVNode(".vst-select-"+y.toDisplayString(t.randKey)+" .tagify__tag-text { white-space: nowrap; position: absolute; top: 5px; left: 3px; width: 75% !important; }",1)]),_:1})):y.createCommentVNode("",!0),(y.openBlock(),y.createBlock(y.resolveDynamicComponent("style"),null,{default:y.withCtx(()=>[y.createTextVNode(".vst-select-field.vst-select-"+y.toDisplayString(t.randKey)+" .tagify--empty .tagify__input:before { max-width: "+y.toDisplayString(t.maxPlaceholderWidth?t.maxPlaceholderWidth+"px":"auto")+"; }",1)]),_:1}))],2)}r(Kt,"render");const qt=k._export_sfc(A,[["render",Kt]]);exports.default=qt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var $t=Object.defineProperty;var g=(x,e)=>$t(x,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const de=require("./index-
|
|
1
|
+
"use strict";var $t=Object.defineProperty;var g=(x,e)=>$t(x,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const de=require("./index-DZjDh7FL.cjs"),Ht=require("./FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs"),Ut=require("./NoSymbolIcon-BoH28Kep.cjs"),K=require("vue");function Gt(x,e){return K.openBlock(),K.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[K.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}g(Gt,"render$2");function zt(x,e){return K.openBlock(),K.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[K.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z","clip-rule":"evenodd"}),K.createElementVNode("path",{"fill-rule":"evenodd",d:"M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375ZM6 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V12Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 15a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V15Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 18a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V18Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}g(zt,"render$1");(function(x,e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t=e();for(var o in t)(typeof exports=="object"?exports:x)[o]=t[o]}})(typeof self<"u"?self:void 0,(function(){return(function(){var x={3976:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0,c.default={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:g(function(){},"oncomplete"),onincomplete:g(function(){},"onincomplete"),oncleared:g(function(){},"oncleared"),repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:g(function(){},"onKeyDown"),onBeforeMask:null,onBeforePaste:g(function(k,C){return typeof C.onBeforeMask=="function"?C.onBeforeMask.call(this,k,C):k},"onBeforePaste"),onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:g(function(){},"onKeyValidation"),skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}}},7392:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0,c.default={9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(k,C,F){if(F===void 0)return k.__data?k.__data[C]:null;k.__data=k.__data||{},k.__data[C]=F}},3776:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.Event=void 0,c.off=function(v,y){var s,p;return A(this[0])&&v&&(s=this[0].eventRegistry,p=this[0],v.split(" ").forEach((function(r){var l=T(r.split("."),2);(function(n,a){var i,u,h=[];if(n.length>0)if(y===void 0)for(i=0,u=s[n][a].length;i<u;i++)h.push({ev:n,namespace:a&&a.length>0?a:"global",handler:s[n][a][i]});else h.push({ev:n,namespace:a&&a.length>0?a:"global",handler:y});else if(a.length>0){for(var m in s)for(var E in s[m])if(E===a)if(y===void 0)for(i=0,u=s[m][E].length;i<u;i++)h.push({ev:m,namespace:E,handler:s[m][E][i]});else h.push({ev:m,namespace:E,handler:y})}return h})(l[0],l[1]).forEach((function(n){var a=n.ev,i=n.handler;(function(u,h,m){if(u in s==1)if(p.removeEventListener?p.removeEventListener(u,m,!1):p.detachEvent&&p.detachEvent("on".concat(u),m),h==="global")for(var E in s[u])s[u][E].splice(s[u][E].indexOf(m),1);else s[u][h].splice(s[u][h].indexOf(m),1)})(a,n.namespace,i)}))}))),this},c.on=function(v,y){if(A(this[0])){var s=this[0].eventRegistry,p=this[0];v.split(" ").forEach((function(r){var l=T(r.split("."),2),n=l[0],a=l[1];(function(i,u){p.addEventListener?p.addEventListener(i,y,!1):p.attachEvent&&p.attachEvent("on".concat(i),y),s[i]=s[i]||{},s[i][u]=s[i][u]||[],s[i][u].push(y)})(n,a===void 0?"global":a)}))}return this},c.trigger=function(v){var y=arguments;if(A(this[0]))for(var s=this[0].eventRegistry,p=this[0],r=typeof v=="string"?v.split(" "):[v.type],l=0;l<r.length;l++){var n=r[l].split("."),a=n[0],i=n[1]||"global";if(S!==void 0&&i==="global"){var u,h={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(S.createEvent){try{a==="input"?(h.inputType="insertText",u=new InputEvent(a,h)):u=new CustomEvent(a,h)}catch{(u=S.createEvent("CustomEvent")).initCustomEvent(a,h.bubbles,h.cancelable,h.detail)}v.type&&(0,F.default)(u,v),p.dispatchEvent(u)}else(u=S.createEventObject()).eventType=a,u.detail=arguments[1],v.type&&(0,F.default)(u,v),p.fireEvent("on"+u.eventType,u)}else if(s[a]!==void 0){arguments[0]=arguments[0].type?arguments[0]:_.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var m=s[a];(i==="global"?Object.values(m).flat():m[i]).forEach((function(E){return E.apply(p,y)}))}}return this};var C=U(k(9380)),F=U(k(600)),_=U(k(4963));function T(v,y){return(function(s){if(Array.isArray(s))return s})(v)||(function(s,p){var r=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(r!=null){var l,n,a,i,u=[],h=!0,m=!1;try{if(a=(r=r.call(s)).next,p!==0)for(;!(h=(l=a.call(r)).done)&&(u.push(l.value),u.length!==p);h=!0);}catch(E){m=!0,n=E}finally{try{if(!h&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(m)throw n}}return u}})(v,y)||(function(s,p){if(s){if(typeof s=="string")return G(s,p);var r=Object.prototype.toString.call(s).slice(8,-1);if(r==="Object"&&s.constructor&&(r=s.constructor.name),r==="Map"||r==="Set")return Array.from(s);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G(s,p)}})(v,y)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}g(T,"o");function G(v,y){(y==null||y>v.length)&&(y=v.length);for(var s=0,p=new Array(y);s<y;s++)p[s]=v[s];return p}g(G,"l");function U(v){return v&&v.__esModule?v:{default:v}}g(U,"s");var S=C.default.document;function A(v){return v instanceof Element}g(A,"u");var w=c.Event=void 0;typeof C.default.CustomEvent=="function"?c.Event=w=C.default.CustomEvent:C.default.Event&&S&&S.createEvent?(c.Event=w=g(function(v,y){y=y||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var s=S.createEvent("CustomEvent");return s.initCustomEvent(v,y.bubbles,y.cancelable,y.detail),s},"f"),w.prototype=C.default.Event.prototype):typeof Event<"u"&&(c.Event=w=Event)},600:function(d,c){function k(C){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(C)}g(k,"n"),Object.defineProperty(c,"__esModule",{value:!0}),c.default=g(function C(){var F,_,T,G,U,S,A=arguments[0]||{},w=1,v=arguments.length,y=!1;for(typeof A=="boolean"&&(y=A,A=arguments[w]||{},w++),k(A)!=="object"&&typeof A!="function"&&(A={});w<v;w++)if((F=arguments[w])!=null)for(_ in F)T=A[_],A!==(G=F[_])&&(y&&G&&(Object.prototype.toString.call(G)==="[object Object]"||(U=Array.isArray(G)))?(U?(U=!1,S=T&&Array.isArray(T)?T:[]):S=T&&Object.prototype.toString.call(T)==="[object Object]"?T:{},A[_]=C(y,S,G)):G!==void 0&&(A[_]=G));return A},"e")},4963:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var C=G(k(9380)),F=G(k(253)),_=k(3776),T=G(k(600));function G(A){return A&&A.__esModule?A:{default:A}}g(G,"l");var U=C.default.document;function S(A){return A instanceof S?A:this instanceof S?void(A!=null&&A!==C.default&&(this[0]=A.nodeName?A:A[0]!==void 0&&A[0].nodeName?A[0]:U.querySelector(A),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new S(A)}g(S,"c"),S.prototype={on:_.on,off:_.off,trigger:_.trigger},S.extend=T.default,S.data=F.default,S.Event=_.Event,c.default=S},9845:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.mobile=c.iphone=c.ie=void 0;var C,F=(C=k(9380))&&C.__esModule?C:{default:C},_=F.default.navigator&&F.default.navigator.userAgent||"";c.ie=_.indexOf("MSIE ")>0||_.indexOf("Trident/")>0,c.mobile=F.default.navigator&&F.default.navigator.userAgentData&&F.default.navigator.userAgentData.mobile||F.default.navigator&&F.default.navigator.maxTouchPoints||"ontouchstart"in F.default,c.iphone=/iphone/i.test(_)},7184:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(C){return C.replace(k,"\\$1")};var k=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(d,c,k){function C(a){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},C(a)}g(C,"i"),Object.defineProperty(c,"__esModule",{value:!0}),c.EventHandlers=void 0;var F,_=k(9845),T=(F=k(9380))&&F.__esModule?F:{default:F},G=k(7760),U=k(2839),S=k(8711),A=k(7215),w=k(4713);function v(){v=g(function(){return i},"p");var a,i={},u=Object.prototype,h=u.hasOwnProperty,m=Object.defineProperty||function(W,V,$){W[V]=$.value},E=typeof Symbol=="function"?Symbol:{},I=E.iterator||"@@iterator",D=E.asyncIterator||"@@asyncIterator",B=E.toStringTag||"@@toStringTag";function O(W,V,$){return Object.defineProperty(W,V,{value:$,enumerable:!0,configurable:!0,writable:!0}),W[V]}g(O,"u");try{O({},"")}catch{O=g(function(V,$,J){return V[$]=J},"u")}function N(W,V,$,J){var Z=V&&V.prototype instanceof q?V:q,re=Object.create(Z.prototype),he=new ge(J||[]);return m(re,"_invoke",{value:ae(W,$,he)}),re}g(N,"f");function f(W,V,$){try{return{type:"normal",arg:W.call(V,$)}}catch(J){return{type:"throw",arg:J}}}g(f,"d"),i.wrap=N;var b="suspendedStart",P="suspendedYield",M="executing",L="completed",j={};function q(){}g(q,"k");function Q(){}g(Q,"b");function R(){}g(R,"x");var H={};O(H,I,(function(){return this}));var te=Object.getPrototypeOf,Y=te&&te(te(be([])));Y&&Y!==u&&h.call(Y,I)&&(H=Y);var z=R.prototype=q.prototype=Object.create(H);function ee(W){["next","throw","return"].forEach((function(V){O(W,V,(function($){return this._invoke(V,$)}))}))}g(ee,"_");function X(W,V){function $(Z,re,he,oe){var le=f(W[Z],W,re);if(le.type!=="throw"){var pe=le.arg,we=pe.value;return we&&C(we)=="object"&&h.call(we,"__await")?V.resolve(we.__await).then((function(ve){$("next",ve,he,oe)}),(function(ve){$("throw",ve,he,oe)})):V.resolve(we).then((function(ve){pe.value=ve,he(pe)}),(function(ve){return $("throw",ve,he,oe)}))}oe(le.arg)}g($,"n");var J;m(this,"_invoke",{value:g(function(Z,re){function he(){return new V((function(oe,le){$(Z,re,oe,le)}))}return g(he,"a"),J=J?J.then(he,he):he()},"value")})}g(X,"M");function ae(W,V,$){var J=b;return function(Z,re){if(J===M)throw new Error("Generator is already running");if(J===L){if(Z==="throw")throw re;return{value:a,done:!0}}for($.method=Z,$.arg=re;;){var he=$.delegate;if(he){var oe=ne(he,$);if(oe){if(oe===j)continue;return oe}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(J===b)throw J=L,$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);J=M;var le=f(W,V,$);if(le.type==="normal"){if(J=$.done?L:P,le.arg===j)continue;return{value:le.arg,done:$.done}}le.type==="throw"&&(J=L,$.method="throw",$.arg=le.arg)}}}g(ae,"E");function ne(W,V){var $=V.method,J=W.iterator[$];if(J===a)return V.delegate=null,$==="throw"&&W.iterator.return&&(V.method="return",V.arg=a,ne(W,V),V.method==="throw")||$!=="return"&&(V.method="throw",V.arg=new TypeError("The iterator does not provide a '"+$+"' method")),j;var Z=f(J,W.iterator,V.arg);if(Z.type==="throw")return V.method="throw",V.arg=Z.arg,V.delegate=null,j;var re=Z.arg;return re?re.done?(V[W.resultName]=re.value,V.next=W.nextLoc,V.method!=="return"&&(V.method="next",V.arg=a),V.delegate=null,j):re:(V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,j)}g(ne,"j");function ce(W){var V={tryLoc:W[0]};1 in W&&(V.catchLoc=W[1]),2 in W&&(V.finallyLoc=W[2],V.afterLoc=W[3]),this.tryEntries.push(V)}g(ce,"T");function ke(W){var V=W.completion||{};V.type="normal",delete V.arg,W.completion=V}g(ke,"A");function ge(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(ce,this),this.reset(!0)}g(ge,"D");function be(W){if(W||W===""){var V=W[I];if(V)return V.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var $=-1,J=g(function Z(){for(;++$<W.length;)if(h.call(W,$))return Z.value=W[$],Z.done=!1,Z;return Z.value=a,Z.done=!0,Z},"n");return J.next=J}}throw new TypeError(C(W)+" is not iterable")}return g(be,"L"),Q.prototype=R,m(z,"constructor",{value:R,configurable:!0}),m(R,"constructor",{value:Q,configurable:!0}),Q.displayName=O(R,B,"GeneratorFunction"),i.isGeneratorFunction=function(W){var V=typeof W=="function"&&W.constructor;return!!V&&(V===Q||(V.displayName||V.name)==="GeneratorFunction")},i.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,R):(W.__proto__=R,O(W,B,"GeneratorFunction")),W.prototype=Object.create(z),W},i.awrap=function(W){return{__await:W}},ee(X.prototype),O(X.prototype,D,(function(){return this})),i.AsyncIterator=X,i.async=function(W,V,$,J,Z){Z===void 0&&(Z=Promise);var re=new X(N(W,V,$,J),Z);return i.isGeneratorFunction(V)?re:re.next().then((function(he){return he.done?he.value:re.next()}))},ee(z),O(z,B,"Generator"),O(z,I,(function(){return this})),O(z,"toString",(function(){return"[object Generator]"})),i.keys=function(W){var V=Object(W),$=[];for(var J in V)$.push(J);return $.reverse(),g(function Z(){for(;$.length;){var re=$.pop();if(re in V)return Z.value=re,Z.done=!1,Z}return Z.done=!0,Z},"e")},i.values=be,ge.prototype={constructor:ge,reset:g(function(W){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(ke),!W)for(var V in this)V.charAt(0)==="t"&&h.call(this,V)&&!isNaN(+V.slice(1))&&(this[V]=a)},"reset"),stop:g(function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},"stop"),dispatchException:g(function(W){if(this.done)throw W;var V=this;function $(le,pe){return re.type="throw",re.arg=W,V.next=le,pe&&(V.method="next",V.arg=a),!!pe}g($,"i");for(var J=this.tryEntries.length-1;J>=0;--J){var Z=this.tryEntries[J],re=Z.completion;if(Z.tryLoc==="root")return $("end");if(Z.tryLoc<=this.prev){var he=h.call(Z,"catchLoc"),oe=h.call(Z,"finallyLoc");if(he&&oe){if(this.prev<Z.catchLoc)return $(Z.catchLoc,!0);if(this.prev<Z.finallyLoc)return $(Z.finallyLoc)}else if(he){if(this.prev<Z.catchLoc)return $(Z.catchLoc,!0)}else{if(!oe)throw new Error("try statement without catch or finally");if(this.prev<Z.finallyLoc)return $(Z.finallyLoc)}}}},"dispatchException"),abrupt:g(function(W,V){for(var $=this.tryEntries.length-1;$>=0;--$){var J=this.tryEntries[$];if(J.tryLoc<=this.prev&&h.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var Z=J;break}}Z&&(W==="break"||W==="continue")&&Z.tryLoc<=V&&V<=Z.finallyLoc&&(Z=null);var re=Z?Z.completion:{};return re.type=W,re.arg=V,Z?(this.method="next",this.next=Z.finallyLoc,j):this.complete(re)},"abrupt"),complete:g(function(W,V){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&V&&(this.next=V),j},"complete"),finish:g(function(W){for(var V=this.tryEntries.length-1;V>=0;--V){var $=this.tryEntries[V];if($.finallyLoc===W)return this.complete($.completion,$.afterLoc),ke($),j}},"finish"),catch:g(function(W){for(var V=this.tryEntries.length-1;V>=0;--V){var $=this.tryEntries[V];if($.tryLoc===W){var J=$.completion;if(J.type==="throw"){var Z=J.arg;ke($)}return Z}}throw new Error("illegal catch attempt")},"catch"),delegateYield:g(function(W,V,$){return this.delegate={iterator:be(W),resultName:V,nextLoc:$},this.method==="next"&&(this.arg=a),j},"delegateYield")},i}g(v,"p");function y(a,i){var u=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!u){if(Array.isArray(a)||(u=(function(B,O){if(B){if(typeof B=="string")return s(B,O);var N=Object.prototype.toString.call(B).slice(8,-1);if(N==="Object"&&B.constructor&&(N=B.constructor.name),N==="Map"||N==="Set")return Array.from(B);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return s(B,O)}})(a))||i){u&&(a=u);var h=0,m=g(function(){},"a");return{s:m,n:g(function(){return h>=a.length?{done:!0}:{done:!1,value:a[h++]}},"n"),e:g(function(B){throw B},"e"),f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E,I=!0,D=!1;return{s:g(function(){u=u.call(a)},"s"),n:g(function(){var B=u.next();return I=B.done,B},"n"),e:g(function(B){D=!0,E=B},"e"),f:g(function(){try{I||u.return==null||u.return()}finally{if(D)throw E}},"f")}}g(y,"d");function s(a,i){(i==null||i>a.length)&&(i=a.length);for(var u=0,h=new Array(i);u<i;u++)h[u]=a[u];return h}g(s,"h");function p(a,i,u,h,m,E,I){try{var D=a[E](I),B=D.value}catch(O){return void u(O)}D.done?i(B):Promise.resolve(B).then(h,m)}g(p,"v");var r,l,n=c.EventHandlers={keyEvent:g(function(a,i,u,h,m){var E=this.inputmask,I=E.opts,D=E.dependencyLib,B=E.maskset,O=this,N=D(O),f=a.key,b=S.caret.call(E,O),P=I.onKeyDown.call(this,a,S.getBuffer.call(E),b,I);if(P!==void 0)return P;if(f===U.keys.Backspace||f===U.keys.Delete||_.iphone&&f===U.keys.BACKSPACE_SAFARI||a.ctrlKey&&f===U.keys.x&&!("oncut"in O))a.preventDefault(),A.handleRemove.call(E,O,f,b),(0,G.writeBuffer)(O,S.getBuffer.call(E,!0),B.p,a,O.inputmask._valueGet()!==S.getBuffer.call(E).join(""));else if(f===U.keys.End||f===U.keys.PageDown){a.preventDefault();var M=S.seekNext.call(E,S.getLastValidPosition.call(E));S.caret.call(E,O,a.shiftKey?b.begin:M,M,!0)}else f===U.keys.Home&&!a.shiftKey||f===U.keys.PageUp?(a.preventDefault(),S.caret.call(E,O,0,a.shiftKey?b.begin:0,!0)):I.undoOnEscape&&f===U.keys.Escape&&a.altKey!==!0?((0,G.checkVal)(O,!0,!1,E.undoValue.split("")),N.trigger("click")):f!==U.keys.Insert||a.shiftKey||a.ctrlKey||E.userOptions.insertMode!==void 0?I.tabThrough===!0&&f===U.keys.Tab?a.shiftKey===!0?(b.end=S.seekPrevious.call(E,b.end,!0),w.getTest.call(E,b.end-1).match.static===!0&&b.end--,b.begin=S.seekPrevious.call(E,b.end,!0),b.begin>=0&&b.end>0&&(a.preventDefault(),S.caret.call(E,O,b.begin,b.end))):(b.begin=S.seekNext.call(E,b.begin,!0),b.end=S.seekNext.call(E,b.begin,!0),b.end<B.maskLength&&b.end--,b.begin<=B.maskLength&&(a.preventDefault(),S.caret.call(E,O,b.begin,b.end))):a.shiftKey||(I.insertModeVisual&&I.insertMode===!1?f===U.keys.ArrowRight?setTimeout((function(){var L=S.caret.call(E,O);S.caret.call(E,O,L.begin)}),0):f===U.keys.ArrowLeft&&setTimeout((function(){var L=S.translatePosition.call(E,O.inputmask.caretPos.begin);S.translatePosition.call(E,O.inputmask.caretPos.end),E.isRTL?S.caret.call(E,O,L+(L===B.maskLength?0:1)):S.caret.call(E,O,L-(L===0?0:1))}),0):E.keyEventHook===void 0||E.keyEventHook(a)):A.isSelection.call(E,b)?I.insertMode=!I.insertMode:(I.insertMode=!I.insertMode,S.caret.call(E,O,b.begin,b.begin));return E.isComposing=f==U.keys.Process||f==U.keys.Unidentified,E.ignorable=f.length>1&&!(O.tagName.toLowerCase()==="textarea"&&f==U.keys.Enter),n.keypressEvent.call(this,a,i,u,h,m)},"keyEvent"),keypressEvent:g(function(a,i,u,h,m){var E=this.inputmask||this,I=E.opts,D=E.dependencyLib,B=E.maskset,O=E.el,N=D(O),f=a.key;if(i===!0||a.ctrlKey&&a.altKey&&!E.ignorable||!(a.ctrlKey||a.metaKey||E.ignorable)){if(f){var b,P=i?{begin:m,end:m}:S.caret.call(E,O);i||(f=I.substitutes[f]||f),B.writeOutBuffer=!0;var M=A.isValid.call(E,P,f,h,void 0,void 0,void 0,i);if(M!==!1&&(S.resetMaskSet.call(E,!0),b=M.caret!==void 0?M.caret:S.seekNext.call(E,M.pos.begin?M.pos.begin:M.pos),B.p=b),b=I.numericInput&&M.caret===void 0?S.seekPrevious.call(E,b):b,u!==!1&&(setTimeout((function(){I.onKeyValidation.call(O,f,M)}),0),B.writeOutBuffer&&M!==!1)){var L=S.getBuffer.call(E);(0,G.writeBuffer)(O,L,b,a,i!==!0)}if(a.preventDefault(),i)return M!==!1&&(M.forwardPosition=b),M}}else f===U.keys.Enter&&E.undoValue!==E._valueGet(!0)&&(E.undoValue=E._valueGet(!0),setTimeout((function(){N.trigger("change")}),0))},"keypressEvent"),pasteEvent:(r=v().mark(g((function a(i){var u,h,m,E,I,D;return v().wrap((function(B){for(;;)switch(B.prev=B.next){case 0:u=g(function(O,N,f,b,P){var M=S.caret.call(O,N,void 0,void 0,!0),L=f.substr(0,M.begin),j=f.substr(M.end,f.length);if(L==(O.isRTL?S.getBufferTemplate.call(O).slice().reverse():S.getBufferTemplate.call(O)).slice(0,M.begin).join("")&&(L=""),j==(O.isRTL?S.getBufferTemplate.call(O).slice().reverse():S.getBufferTemplate.call(O)).slice(M.end).join("")&&(j=""),b=L+b+j,O.isRTL&&E.numericInput!==!0){b=b.split("");var q,Q=y(S.getBufferTemplate.call(O));try{for(Q.s();!(q=Q.n()).done;){var R=q.value;b[0]===R&&b.shift()}}catch(te){Q.e(te)}finally{Q.f()}b=b.reverse().join("")}var H=b;if(typeof P=="function"){if((H=P.call(O,H,E))===!1)return!1;H||(H=f)}(0,G.checkVal)(N,!0,!1,H.toString().split(""),i)},"n"),h=this,m=this.inputmask,E=m.opts,I=m._valueGet(!0),m.skipInputEvent=!0,i.clipboardData&&i.clipboardData.getData?D=i.clipboardData.getData("text/plain"):T.default.clipboardData&&T.default.clipboardData.getData&&(D=T.default.clipboardData.getData("Text")),u(m,h,I,D,E.onBeforePaste),i.preventDefault();case 7:case"end":return B.stop()}}),a,this)}),"e")),l=g(function(){var a=this,i=arguments;return new Promise((function(u,h){var m=r.apply(a,i);function E(D){p(m,u,h,E,I,"next",D)}g(E,"r");function I(D){p(m,u,h,E,I,"throw",D)}g(I,"o"),E(void 0)}))},"g"),function(a){return l.apply(this,arguments)}),inputFallBackEvent:g(function(a){var i=this.inputmask,u=i.opts,h=i.dependencyLib,m,E=this,I=E.inputmask._valueGet(!0),D=(i.isRTL?S.getBuffer.call(i).slice().reverse():S.getBuffer.call(i)).join(""),B=S.caret.call(i,E,void 0,void 0,!0);if(D!==I){if(m=(function(N,f,b){for(var P,M,L,j=N.substr(0,b.begin).split(""),q=N.substr(b.begin).split(""),Q=f.substr(0,b.begin).split(""),R=f.substr(b.begin).split(""),H=j.length>=Q.length?j.length:Q.length,te=q.length>=R.length?q.length:R.length,Y="",z=[],ee="~";j.length<H;)j.push(ee);for(;Q.length<H;)Q.push(ee);for(;q.length<te;)q.unshift(ee);for(;R.length<te;)R.unshift(ee);var X=j.concat(q),ae=Q.concat(R);for(M=0,P=X.length;M<P;M++)switch(L=w.getPlaceholder.call(i,S.translatePosition.call(i,M)),Y){case"insertText":ae[M-1]===X[M]&&b.begin==X.length-1&&z.push(X[M]),M=P;break;case"insertReplacementText":case"deleteContentBackward":X[M]===ee?b.end++:M=P;break;default:X[M]!==ae[M]&&(X[M+1]!==ee&&X[M+1]!==L&&X[M+1]!==void 0||(ae[M]!==L||ae[M+1]!==ee)&&ae[M]!==ee?ae[M+1]===ee&&ae[M]===X[M+1]?(Y="insertText",z.push(X[M]),b.begin--,b.end--):X[M]!==L&&X[M]!==ee&&(X[M+1]===ee||ae[M]!==X[M]&&ae[M+1]===X[M+1])?(Y="insertReplacementText",z.push(X[M]),b.begin--):X[M]===ee?(Y="deleteContentBackward",(S.isMask.call(i,S.translatePosition.call(i,M),!0)||ae[M]===u.radixPoint)&&b.end++):M=P:(Y="insertText",z.push(X[M]),b.begin--,b.end--))}return{action:Y,data:z,caret:b}})(I,D,B),(E.inputmask.shadowRoot||E.ownerDocument).activeElement!==E&&E.focus(),(0,G.writeBuffer)(E,S.getBuffer.call(i)),S.caret.call(i,E,B.begin,B.end,!0),!_.mobile&&i.skipNextInsert&&a.inputType==="insertText"&&m.action==="insertText"&&i.isComposing)return!1;switch(a.inputType==="insertCompositionText"&&m.action==="insertText"&&i.isComposing?i.skipNextInsert=!0:i.skipNextInsert=!1,m.action){case"insertText":case"insertReplacementText":m.data.forEach((function(N,f){var b=new h.Event("keypress");b.key=N,i.ignorable=!1,n.keypressEvent.call(E,b)})),setTimeout((function(){i.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var O=new h.Event("keydown");O.key=U.keys.Backspace,n.keyEvent.call(E,O);break;default:(0,G.applyInputValue)(E,I),S.caret.call(i,E,B.begin,B.end,!0)}a.preventDefault()}},"inputFallBackEvent"),setValueEvent:g(function(a){var i=this.inputmask,u=i.dependencyLib,h=this,m=a&&a.detail?a.detail[0]:arguments[1];m===void 0&&(m=h.inputmask._valueGet(!0)),(0,G.applyInputValue)(h,m,new u.Event("input")),(a.detail&&a.detail[1]!==void 0||arguments[2]!==void 0)&&S.caret.call(i,h,a.detail?a.detail[1]:arguments[2])},"setValueEvent"),focusEvent:g(function(a){var i=this.inputmask,u=i.opts,h=i&&i._valueGet();u.showMaskOnFocus&&h!==S.getBuffer.call(i).join("")&&(0,G.writeBuffer)(this,S.getBuffer.call(i),S.seekNext.call(i,S.getLastValidPosition.call(i))),u.positionCaretOnTab!==!0||i.mouseEnter!==!1||A.isComplete.call(i,S.getBuffer.call(i))&&S.getLastValidPosition.call(i)!==-1||n.clickEvent.apply(this,[a,!0]),i.undoValue=i&&i._valueGet(!0)},"focusEvent"),invalidEvent:g(function(a){this.inputmask.validationEvent=!0},"invalidEvent"),mouseleaveEvent:g(function(){var a=this.inputmask,i=a.opts,u=this;a.mouseEnter=!1,i.clearMaskOnLostFocus&&(u.inputmask.shadowRoot||u.ownerDocument).activeElement!==u&&(0,G.HandleNativePlaceholder)(u,a.originalPlaceholder)},"mouseleaveEvent"),clickEvent:g(function(a,i){var u=this.inputmask;u.clicked++;var h=this;if((h.inputmask.shadowRoot||h.ownerDocument).activeElement===h){var m=S.determineNewCaretPosition.call(u,S.caret.call(u,h),i);m!==void 0&&S.caret.call(u,h,m)}},"clickEvent"),cutEvent:g(function(a){var i=this.inputmask,u=i.maskset,h=this,m=S.caret.call(i,h),E=i.isRTL?S.getBuffer.call(i).slice(m.end,m.begin):S.getBuffer.call(i).slice(m.begin,m.end),I=i.isRTL?E.reverse().join(""):E.join("");T.default.navigator&&T.default.navigator.clipboard?T.default.navigator.clipboard.writeText(I):T.default.clipboardData&&T.default.clipboardData.getData&&T.default.clipboardData.setData("Text",I),A.handleRemove.call(i,h,U.keys.Delete,m),(0,G.writeBuffer)(h,S.getBuffer.call(i),u.p,a,i.undoValue!==i._valueGet(!0))},"cutEvent"),blurEvent:g(function(a){var i=this.inputmask,u=i.opts,h=i.dependencyLib;i.clicked=0;var m=h(this),E=this;if(E.inputmask){(0,G.HandleNativePlaceholder)(E,i.originalPlaceholder);var I=E.inputmask._valueGet(),D=S.getBuffer.call(i).slice();I!==""&&(u.clearMaskOnLostFocus&&(S.getLastValidPosition.call(i)===-1&&I===S.getBufferTemplate.call(i).join("")?D=[]:G.clearOptionalTail.call(i,D)),A.isComplete.call(i,D)===!1&&(setTimeout((function(){m.trigger("incomplete")}),0),u.clearIncomplete&&(S.resetMaskSet.call(i,!1),D=u.clearMaskOnLostFocus?[]:S.getBufferTemplate.call(i).slice())),(0,G.writeBuffer)(E,D,void 0,a)),I=i._valueGet(!0),i.undoValue!==I&&(I!=""||i.undoValue!=S.getBufferTemplate.call(i).join("")||i.undoValue==S.getBufferTemplate.call(i).join("")&&i.maskset.validPositions.length>0)&&(i.undoValue=I,m.trigger("change"))}},"blurEvent"),mouseenterEvent:g(function(){var a=this.inputmask,i=a.opts.showMaskOnHover,u=this;if(a.mouseEnter=!0,(u.inputmask.shadowRoot||u.ownerDocument).activeElement!==u){var h=(a.isRTL?S.getBufferTemplate.call(a).slice().reverse():S.getBufferTemplate.call(a)).join("");i&&(0,G.HandleNativePlaceholder)(u,h)}},"mouseenterEvent"),submitEvent:g(function(){var a=this.inputmask,i=a.opts;a.undoValue!==a._valueGet(!0)&&a.$el.trigger("change"),S.getLastValidPosition.call(a)===-1&&a._valueGet&&a._valueGet()===S.getBufferTemplate.call(a).join("")&&a._valueSet(""),i.clearIncomplete&&A.isComplete.call(a,S.getBuffer.call(a))===!1&&a._valueSet(""),i.removeMaskOnSubmit&&(a._valueSet(a.unmaskedvalue(),!0),setTimeout((function(){(0,G.writeBuffer)(a.el,S.getBuffer.call(a))}),0))},"submitEvent"),resetEvent:g(function(){var a=this.inputmask;a.refreshValue=!0,setTimeout((function(){(0,G.applyInputValue)(a.el,a._valueGet(!0))}),0)},"resetEvent")}},9716:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.EventRuler=void 0;var C,F=k(7760),_=(C=k(2394))&&C.__esModule?C:{default:C},T=k(2839),G=k(8711);c.EventRuler={on:g(function(U,S,A){var w=U.inputmask.dependencyLib,v=g(function(y){y.originalEvent&&(y=y.originalEvent||y,arguments[0]=y);var s,p=this,r=p.inputmask,l=r?r.opts:void 0;if(r===void 0&&this.nodeName!=="FORM"){var n=w.data(p,"_inputmask_opts");w(p).off(),n&&new _.default(n).mask(p)}else{if(["submit","reset","setvalue"].includes(y.type)||this.nodeName==="FORM"||!(p.disabled||p.readOnly&&!(y.type==="keydown"&&y.ctrlKey&&y.key===T.keys.c||l.tabThrough===!1&&y.key===T.keys.Tab))){switch(y.type){case"input":if(r.skipInputEvent===!0)return r.skipInputEvent=!1,y.preventDefault();break;case"click":case"focus":return r.validationEvent?(r.validationEvent=!1,U.blur(),(0,F.HandleNativePlaceholder)(U,(r.isRTL?G.getBufferTemplate.call(r).slice().reverse():G.getBufferTemplate.call(r)).join("")),setTimeout((function(){U.focus()}),l.validationEventTimeOut),!1):(s=arguments,void setTimeout((function(){U.inputmask&&A.apply(p,s)}),0))}var a=A.apply(p,arguments);return a===!1&&(y.preventDefault(),y.stopPropagation()),a}y.preventDefault()}},"s");["submit","reset"].includes(S)?(v=v.bind(U),U.form!==null&&w(U.form).on(S,v)):w(U).on(S,v),U.inputmask.events[S]=U.inputmask.events[S]||[],U.inputmask.events[S].push(v)},"on"),off:g(function(U,S){if(U.inputmask&&U.inputmask.events){var A=U.inputmask.dependencyLib,w=U.inputmask.events;for(var v in S&&((w=[])[S]=U.inputmask.events[S]),w){for(var y=w[v];y.length>0;){var s=y.pop();["submit","reset"].includes(v)?U.form!==null&&A(U.form).off(v,s):A(U).off(v,s)}delete U.inputmask.events[v]}}},"off")}},219:function(d,c,k){var C=v(k(7184)),F=v(k(2394)),_=k(2839),T=k(8711),G=k(4713);function U(f,b){return(function(P){if(Array.isArray(P))return P})(f)||(function(P,M){var L=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(L!=null){var j,q,Q,R,H=[],te=!0,Y=!1;try{if(Q=(L=L.call(P)).next,M!==0)for(;!(te=(j=Q.call(L)).done)&&(H.push(j.value),H.length!==M);te=!0);}catch(z){Y=!0,q=z}finally{try{if(!te&&L.return!=null&&(R=L.return(),Object(R)!==R))return}finally{if(Y)throw q}}return H}})(f,b)||(function(P,M){if(P){if(typeof P=="string")return S(P,M);var L=Object.prototype.toString.call(P).slice(8,-1);if(L==="Object"&&P.constructor&&(L=P.constructor.name),L==="Map"||L==="Set")return Array.from(P);if(L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L))return S(P,M)}})(f,b)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}g(U,"s");function S(f,b){(b==null||b>f.length)&&(b=f.length);for(var P=0,M=new Array(b);P<b;P++)M[P]=f[P];return M}g(S,"c");function A(f){return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},A(f)}g(A,"u");function w(f,b){for(var P=0;P<b.length;P++){var M=b[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(f,(L=M.key,j=void 0,j=(function(q,Q){if(A(q)!=="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var H=R.call(q,Q);if(A(H)!=="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(q)})(L,"string"),A(j)==="symbol"?j:String(j)),M)}var L,j}g(w,"f");function v(f){return f&&f.__esModule?f:{default:f}}g(v,"p"),k(1313);var y=F.default.dependencyLib,s=(function(){function f(M,L,j,q){(function(Q,R){if(!(Q instanceof R))throw new TypeError("Cannot call a class as a function")})(this,f),this.mask=M,this.format=L,this.opts=j,this.inputmask=q,this._date=new Date(1,0,1),this.initDateObject(M,this.opts,this.inputmask)}g(f,"e");var b,P;return b=f,(P=[{key:"date",get:g(function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date},"get")},{key:"initDateObject",value:g(function(M,L,j){var q;for(m(L).lastIndex=0;q=m(L).exec(this.format);){var Q=/\d+$/.exec(q[0]),R=Q?q[0][0]+"x":q[0],H=void 0;if(M!==void 0){if(Q){var te=m(L).lastIndex,Y=N.call(j,q.index,L,j&&j.maskset);m(L).lastIndex=te,H=M.slice(0,M.indexOf(Y.nextMatch[0]))}else{for(var z=q[0][0],ee=q.index;j&&(L.placeholder[G.getTest.call(j,ee).match.placeholder]||G.getTest.call(j,ee).match.placeholder)===z;)ee++;var X=ee-q.index;H=M.slice(0,X||n[R]&&n[R][4]||R.length)}M=M.slice(H.length)}Object.prototype.hasOwnProperty.call(n,R)&&this.setValue(this,H,R,n[R][2],n[R][1])}},"value")},{key:"setValue",value:g(function(M,L,j,q,Q){if(L!==void 0)switch(q){case"ampm":M[q]=L,M["raw"+q]=L.replace(/\s/g,"_");break;case"month":if(j==="mmm"||j==="mmmm"){M[q]=D(j==="mmm"?r.monthNames.slice(0,12).findIndex((function(H){return L.toLowerCase()===H.toLowerCase()}))+1:r.monthNames.slice(12,24).findIndex((function(H){return L.toLowerCase()===H.toLowerCase()}))+1,2),M[q]=M[q]==="00"?"":M[q].toString(),M["raw"+q]=M[q];break}default:M[q]=L.replace(/[^0-9]/g,"0"),M["raw"+q]=L.replace(/\s/g,"_")}if(Q!==void 0){var R=M[q];(q==="day"&&parseInt(R)===29||q==="month"&&parseInt(R)===2)&&(parseInt(M.day)!==29||parseInt(M.month)!==2||M.year!==""&&M.year!==void 0||M._date.setFullYear(2012,1,29)),q==="day"&&(l=!0,parseInt(R)===0&&(R=1)),q==="month"&&(l=!0),q==="year"&&(l=!0,R.length<n[j][4]&&(R=D(R,n[j][4],!0))),(R!==""&&!isNaN(R)||q==="ampm")&&Q.call(M._date,R)}},"value")},{key:"reset",value:g(function(){this._date=new Date(1,0,1)},"value")},{key:"reInit",value:g(function(){this._date=void 0,this.date},"value")}])&&w(b.prototype,P),Object.defineProperty(b,"prototype",{writable:!1}),f})(),p=new Date().getFullYear(),r=F.default.prototype.i18n,l=!1,n={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return D(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(f){var b=f?parseInt(f):0;return b>0&&b--,Date.prototype.setMonth.call(this,b)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(f){var b=f?parseInt(f):0;return b>0&&b--,Date.prototype.setMonth.call(this,b)},"month",function(){return D(Date.prototype.getMonth.call(this)+1,2)}],mmm:[r.monthNames.slice(0,12).join("|"),function(f){var b=r.monthNames.slice(0,12).findIndex((function(P){return f.toLowerCase()===P.toLowerCase()}));return b!==-1&&Date.prototype.setMonth.call(this,b)},"month",function(){return r.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],mmmm:[r.monthNames.slice(12,24).join("|"),function(f){var b=r.monthNames.slice(12,24).findIndex((function(P){return f.toLowerCase()===P.toLowerCase()}));return b!==-1&&Date.prototype.setMonth.call(this,b)},"month",function(){return r.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:["[0-9]{2}",function(f){var b=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,"".concat(b).concat(f))},"year",function(){return D(Date.prototype.getFullYear.call(this),2)},2],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return D(Date.prototype.getFullYear.call(this),4)},4],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return D(Date.prototype.getHours.call(this),2)}],hx:[function(f){return"[0-9]{".concat(f,"}")},Date.prototype.setHours,"hours",function(f){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return D(Date.prototype.getHours.call(this),2)}],Hx:[function(f){return"[0-9]{".concat(f,"}")},Date.prototype.setHours,"hours",function(f){return function(){return D(Date.prototype.getHours.call(this),f)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return D(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return D(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return D(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return D(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",i,"ampm",u,1],tt:["[ap]m",i,"ampm",u,2],T:["[AP]",i,"ampm",u,1],TT:["[AP]M",i,"ampm",u,2],Z:[".*",void 0,"Z",function(){var f=this.toString().match(/\((.+)\)/)[1];return f.includes(" ")&&(f=(f=f.replace("-"," ").toUpperCase()).split(" ").map((function(b){return U(b,1)[0]})).join("")),f}],o:[""],S:[""]},a={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function i(f){var b=this.getHours();f.toLowerCase().includes("p")?this.setHours(b+12):f.toLowerCase().includes("a")&&b>=12&&this.setHours(b-12)}g(i,"b");function u(){var f=this.getHours();return(f=f||12)>=12?"PM":"AM"}g(u,"x");function h(f){var b=/\d+$/.exec(f[0]);if(b&&b[0]!==void 0){var P=n[f[0][0]+"x"].slice("");return P[0]=P[0](b[0]),P[3]=P[3](b[0]),P}if(n[f[0]])return n[f[0]]}g(h,"w");function m(f){if(!f.tokenizer){var b=[],P=[];for(var M in n)if(/\.*x$/.test(M)){var L=M[0]+"\\d+";P.indexOf(L)===-1&&P.push(L)}else b.indexOf(M[0])===-1&&b.push(M[0]);f.tokenizer="("+(P.length>0?P.join("|")+"|":"")+b.join("+|")+")+?|.",f.tokenizer=new RegExp(f.tokenizer,"g")}return f.tokenizer}g(m,"P");function E(f,b,P){if(!l)return!0;if(f.rawday===void 0||!isFinite(f.rawday)&&new Date(f.date.getFullYear(),isFinite(f.rawmonth)?f.month:f.date.getMonth()+1,0).getDate()>=f.day||f.day=="29"&&(!isFinite(f.rawyear)||f.rawyear===void 0||f.rawyear==="")||new Date(f.date.getFullYear(),isFinite(f.rawmonth)?f.month:f.date.getMonth()+1,0).getDate()>=f.day)return b;if(f.day=="29"){var M=N.call(this,b.pos,P,this.maskset);if(M.targetMatch&&M.targetMatch[0]==="yyyy"&&b.pos-M.targetMatchIndex==2)return b.remove=b.pos+1,b}else if(f.date.getMonth()==2&&f.day=="30"&&b.c!==void 0)return f.day="03",f.date.setDate(3),f.date.setMonth(1),b.insert=[{pos:b.pos,c:"0"},{pos:b.pos+1,c:b.c}],b.caret=T.seekNext.call(this,b.pos+1),b;return!1}g(E,"S");function I(f,b,P,M){var L,j,q="",Q=0,R={};for(m(P).lastIndex=0;L=m(P).exec(f);){if(b===void 0)if(j=h(L))q+="("+j[0]+")",P.placeholder&&P.placeholder!==""?(R[Q]=P.placeholder[L.index%P.placeholder.length],R[P.placeholder[L.index%P.placeholder.length]]=L[0].charAt(0)):R[Q]=L[0].charAt(0);else switch(L[0]){case"[":q+="(";break;case"]":q+=")?";break;default:q+=(0,C.default)(L[0]),R[Q]=L[0].charAt(0)}else(j=h(L))?M!==!0&&j[3]?q+=j[3].call(b.date):j[2]?q+=b["raw"+j[2]]:q+=L[0]:q+=L[0];Q++}return b===void 0&&(P.placeholder=R),q}g(I,"O");function D(f,b,P){for(f=String(f),b=b||2;f.length<b;)f=P?f+"0":"0"+f;return f}g(D,"_");function B(f,b,P){return typeof f=="string"?new s(f,b,P,this):f&&A(f)==="object"&&Object.prototype.hasOwnProperty.call(f,"date")?f:void 0}g(B,"M");function O(f,b){return I(b.inputFormat,{date:f},b)}g(O,"E");function N(f,b,P){var M,L,j=this,q=P&&P.tests[f]?b.placeholder[P.tests[f][0].match.placeholder]||P.tests[f][0].match.placeholder:"",Q=0,R=0;for(m(b).lastIndex=0;L=m(b).exec(b.inputFormat);){var H=/\d+$/.exec(L[0]);if(H)R=parseInt(H[0]);else{for(var te=L[0][0],Y=Q;j&&(b.placeholder[G.getTest.call(j,Y).match.placeholder]||G.getTest.call(j,Y).match.placeholder)===te;)Y++;(R=Y-Q)===0&&(R=L[0].length)}if(Q+=R,L[0].indexOf(q)!=-1||Q>=f+1){M=L,L=m(b).exec(b.inputFormat);break}}return{targetMatchIndex:Q-R,nextMatch:L,targetMatch:M}}g(N,"j"),F.default.extendAliases({datetime:{mask:g(function(f){return f.numericInput=!1,n.S=r.ordinalSuffix.join("|"),f.inputFormat=a[f.inputFormat]||f.inputFormat,f.displayFormat=a[f.displayFormat]||f.displayFormat||f.inputFormat,f.outputFormat=a[f.outputFormat]||f.outputFormat||f.inputFormat,f.regex=I(f.inputFormat,void 0,f),f.min=B(f.min,f.inputFormat,f),f.max=B(f.max,f.inputFormat,f),null},"mask"),placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",preValidation:g(function(f,b,P,M,L,j,q,Q){if(Q)return!0;if(isNaN(P)&&f[b]!==P){var R=N.call(this,b,L,j);if(R.nextMatch&&R.nextMatch[0]===P&&R.targetMatch[0].length>1){var H=h(R.targetMatch)[0];if(new RegExp(H).test("0"+f[b-1]))return f[b]=f[b-1],f[b-1]="0",{fuzzy:!0,buffer:f,refreshFromBuffer:{start:b-1,end:b+1},pos:b+1}}}return!0},"preValidation"),postValidation:g(function(f,b,P,M,L,j,q,Q){var R,H,te=this;if(q)return!0;if(M===!1&&(((R=N.call(te,b+1,L,j)).targetMatch&&R.targetMatchIndex===b&&R.targetMatch[0].length>1&&n[R.targetMatch[0]]!==void 0||(R=N.call(te,b+2,L,j)).targetMatch&&R.targetMatchIndex===b+1&&R.targetMatch[0].length>1&&n[R.targetMatch[0]]!==void 0)&&(H=h(R.targetMatch)[0]),H!==void 0&&(j.validPositions[b+1]!==void 0&&new RegExp(H).test(P+"0")?(f[b]=P,f[b+1]="0",M={pos:b+2,caret:b}):new RegExp(H).test("0"+P)&&(f[b]="0",f[b+1]=P,M={pos:b+2})),M===!1))return M;if(M.fuzzy&&(f=M.buffer,b=M.pos),(R=N.call(te,b,L,j)).targetMatch&&R.targetMatch[0]&&n[R.targetMatch[0]]!==void 0){var Y=h(R.targetMatch);H=Y[0];var z=f.slice(R.targetMatchIndex,R.targetMatchIndex+R.targetMatch[0].length);if(new RegExp(H).test(z.join(""))===!1&&R.targetMatch[0].length===2&&j.validPositions[R.targetMatchIndex]&&j.validPositions[R.targetMatchIndex+1]&&(j.validPositions[R.targetMatchIndex+1].input="0"),Y[2]=="year")for(var ee=G.getMaskTemplate.call(te,!1,1,void 0,!0),X=b+1;X<f.length;X++)f[X]=ee[X],j.validPositions.splice(b+1,1)}var ae=M,ne=B.call(te,f.join(""),L.inputFormat,L);return ae&&!isNaN(ne.date.getTime())&&(L.prefillYear&&(ae=(function(ce,ke,ge){if(ce.year!==ce.rawyear){var be=p.toString(),W=ce.rawyear.replace(/[^0-9]/g,""),V=be.slice(0,W.length),$=be.slice(W.length);if(W.length===2&&W===V){var J=new Date(p,ce.month-1,ce.day);ce.day==J.getDate()&&(!ge.max||ge.max.date.getTime()>=J.getTime())&&(ce.date.setFullYear(p),ce.year=be,ke.insert=[{pos:ke.pos+1,c:$[0]},{pos:ke.pos+2,c:$[1]}])}}return ke})(ne,ae,L)),ae=(function(ce,ke,ge,be,W){if(!ke)return ke;if(ke&&ge.min&&!isNaN(ge.min.date.getTime())){var V;for(ce.reset(),m(ge).lastIndex=0;V=m(ge).exec(ge.inputFormat);){var $;if(($=h(V))&&$[3]){for(var J=$[1],Z=ce[$[2]],re=ge.min[$[2]],he=ge.max?ge.max[$[2]]:re+1,oe=[],le=!1,pe=0;pe<re.length;pe++)be.validPositions[pe+V.index]!==void 0||le?(oe[pe]=Z[pe],le=le||Z[pe]>re[pe]):(pe+V.index==0&&Z[pe]<re[pe]?(oe[pe]=Z[pe],le=!0):oe[pe]=re[pe],$[2]==="year"&&Z.length-1==pe&&re!=he&&(oe=(parseInt(oe.join(""))+1).toString().split("")),$[2]==="ampm"&&re!=he&&ge.min.date.getTime()>ce.date.getTime()&&(oe[pe]=he[pe]));J.call(ce._date,oe.join(""))}}ke=ge.min.date.getTime()<=ce.date.getTime(),ce.reInit()}return ke&&ge.max&&(isNaN(ge.max.date.getTime())||(ke=ge.max.date.getTime()>=ce.date.getTime())),ke})(ne,ae=E.call(te,ne,ae,L),L,j)),b!==void 0&&ae&&M.pos!==b?{buffer:I(L.inputFormat,ne,L).split(""),refreshFromBuffer:{start:b,end:M.pos},pos:M.caret||M.pos}:ae},"postValidation"),onKeyDown:g(function(f,b,P,M){f.ctrlKey&&f.key===_.keys.ArrowRight&&(this.inputmask._valueSet(O(new Date,M)),y(this).trigger("setvalue"))},"onKeyDown"),onUnMask:g(function(f,b,P){return b&&I(P.outputFormat,B.call(this,f,P.inputFormat,P),P,!0)},"onUnMask"),casing:g(function(f,b,P,M){if(b.nativeDef.indexOf("[ap]")==0)return f.toLowerCase();if(b.nativeDef.indexOf("[AP]")==0)return f.toUpperCase();var L=G.getTest.call(this,[P-1]);return L.match.def.indexOf("[AP]")==0||P===0||L&&L.input===String.fromCharCode(_.keyCode.Space)||L&&L.match.def===String.fromCharCode(_.keyCode.Space)?f.toUpperCase():f.toLowerCase()},"casing"),onBeforeMask:g(function(f,b){return Object.prototype.toString.call(f)==="[object Date]"&&(f=O(f,b)),f},"onBeforeMask"),insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},1313:function(d,c,k){var C,F=(C=k(2394))&&C.__esModule?C:{default:C};F.default.dependencyLib.extend(!0,F.default.prototype.i18n,{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]})},3851:function(d,c,k){var C,F=(C=k(2394))&&C.__esModule?C:{default:C},_=k(8711),T=k(4713);function G(w){return(function(v){if(Array.isArray(v))return U(v)})(w)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(w)||(function(v,y){if(v){if(typeof v=="string")return U(v,y);var s=Object.prototype.toString.call(v).slice(8,-1);if(s==="Object"&&v.constructor&&(s=v.constructor.name),s==="Map"||s==="Set")return Array.from(v);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return U(v,y)}})(w)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Qt = Object.defineProperty;
|
|
2
2
|
var g = (x, e) => Qt(x, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { P as me, C as Jt, _ as Xt } from "./index-
|
|
4
|
-
import { F as ei } from "./FieldComponent.vue_vue_type_script_lang-
|
|
3
|
+
import { P as me, C as Jt, _ as Xt } from "./index-Cd_DL4JD.js";
|
|
4
|
+
import { F as ei } from "./FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js";
|
|
5
5
|
import { r as ti } from "./NoSymbolIcon-B4SWqT3z.js";
|
|
6
6
|
import { openBlock as be, createElementBlock as _e, createElementVNode as ge, resolveComponent as dt, normalizeClass as Fe, normalizeStyle as ze, createCommentVNode as Ae, renderSlot as $t, withKeys as Re, Fragment as ii, toDisplayString as mt, createBlock as Je, resolveDynamicComponent as ri, withCtx as ai, createTextVNode as si } from "vue";
|
|
7
7
|
function ni(x, e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var V = Object.defineProperty;
|
|
2
2
|
var S = (e, i) => V(e, "name", { value: i, configurable: !0 });
|
|
3
|
-
import { P as a, W as c, C as $, _ as z } from "./index-
|
|
4
|
-
import { F as B } from "./FieldComponent.vue_vue_type_script_lang-
|
|
3
|
+
import { P as a, W as c, C as $, _ as z } from "./index-Cd_DL4JD.js";
|
|
4
|
+
import { F as B } from "./FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js";
|
|
5
5
|
import { openBlock as d, createElementBlock as p, normalizeClass as g, createElementVNode as s, renderSlot as I, withDirectives as T, vModelCheckbox as C, createCommentVNode as b, createBlock as m, resolveDynamicComponent as f, withCtx as y, createTextVNode as v, toDisplayString as l } from "vue";
|
|
6
6
|
var N = Object.defineProperty, W = Object.getOwnPropertyDescriptor, t = /* @__PURE__ */ S((e, i, w, u) => {
|
|
7
7
|
for (var n = u > 1 ? void 0 : u ? W(i, w) : i, k = e.length - 1, r; k >= 0; k--)
|