vue-spear-tip 0.1.8 → 0.1.19
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/README.md +4 -1
- package/dist/.vite/manifest.json +9 -9
- package/dist/{Button-BSqT6EqE.js → Button-CpM8kwiG.js} +2 -2
- package/dist/{Button-DULZIJTn.cjs → Button-Dq7n5Ei4.cjs} +1 -1
- package/dist/{Select-uiCNo0xq.cjs → Select-7GcOxQDE.cjs} +2 -2
- package/dist/{Select-wd8jv4Hc.js → Select-BpwUDYGb.js} +5 -3
- package/dist/builder.d.ts +1 -1
- package/dist/core/VueClassComponent.d.ts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/index-9Trap6Gx.cjs +1 -0
- package/dist/{index-C-sP87op.js → index-DTgMtTpl.js} +60 -60
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.css +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +5 -3
- package/docs/static/Button-B6i4xDJY.js +1 -0
- package/docs/static/Button-BjffoH_F.css +1 -0
- package/docs/static/{Select-DLq57s2p.css → Select-CO-Jp5u7.css} +1 -1
- package/docs/static/{Select-BMAg1nIX.js → Select-WSOW8gaG.js} +2 -2
- package/docs/static/Watch-nc5lWXLk.js +1 -0
- package/docs/static/index-96NPQmfz.js +2 -0
- package/docs/static/index-CvLoMeaz.js +2 -0
- package/docs/static/main-CpyTFA8Y.js +22 -0
- package/docs/static/main-DF1nPNKp.css +1 -0
- package/package.json +3 -2
- package/dist/index-DvD5s6bF.cjs +0 -1
- package/docs/static/BaseComponent.vue_vue_type_script_lang-D7-W6jOy.js +0 -1
- package/docs/static/Button-CjIsGsIK.js +0 -1
- package/docs/static/Button-DjKX9MOI.css +0 -1
- package/docs/static/index-CPQK-KHO.js +0 -2
- package/docs/static/index-DFlq0Rth.js +0 -2
- package/docs/static/main-BxinLzz7.css +0 -1
- package/docs/static/main-KAUrhLkh.js +0 -22
package/README.md
CHANGED
|
@@ -50,6 +50,8 @@ Need keep names in `vite.config.ts`:
|
|
|
50
50
|
#### Add kit components styles
|
|
51
51
|
```ts
|
|
52
52
|
import 'vue-spear-tip/style'
|
|
53
|
+
// If need auto resizable .row .col-* styles
|
|
54
|
+
import 'vue-spear-tip/grid'
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
#### Use
|
|
@@ -96,4 +98,5 @@ import 'vue-spear-tip/style'
|
|
|
96
98
|
@apply bg-red-200
|
|
97
99
|
</style>
|
|
98
100
|
|
|
99
|
-
```
|
|
101
|
+
```
|
|
102
|
+
|
package/dist/.vite/manifest.json
CHANGED
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
"file": "_plugin-vue_export-helper-BaHX9ZKS.cjs",
|
|
8
8
|
"name": "_plugin-vue_export-helper"
|
|
9
9
|
},
|
|
10
|
-
"_index-
|
|
11
|
-
"file": "index-
|
|
10
|
+
"_index-9Trap6Gx.cjs": {
|
|
11
|
+
"file": "index-9Trap6Gx.cjs",
|
|
12
12
|
"name": "index",
|
|
13
13
|
"dynamicImports": [
|
|
14
14
|
"src/components/Elements/Button/Button.vue",
|
|
15
15
|
"src/components/Fields/Select/Select.vue"
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
"_index-
|
|
19
|
-
"file": "index-
|
|
18
|
+
"_index-DTgMtTpl.js": {
|
|
19
|
+
"file": "index-DTgMtTpl.js",
|
|
20
20
|
"name": "index",
|
|
21
21
|
"dynamicImports": [
|
|
22
22
|
"src/components/Elements/Button/Button.vue",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
26
|
"src/components/Elements/Button/Button.vue": {
|
|
27
|
-
"file": "Button-
|
|
27
|
+
"file": "Button-Dq7n5Ei4.cjs",
|
|
28
28
|
"name": "Button",
|
|
29
29
|
"src": "src/components/Elements/Button/Button.vue",
|
|
30
30
|
"isDynamicEntry": true,
|
|
31
31
|
"imports": [
|
|
32
|
-
"_index-
|
|
32
|
+
"_index-9Trap6Gx.cjs",
|
|
33
33
|
"__plugin-vue_export-helper-BaHX9ZKS.cjs"
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"src/components/Fields/Select/Select.vue": {
|
|
37
|
-
"file": "Select-
|
|
37
|
+
"file": "Select-7GcOxQDE.cjs",
|
|
38
38
|
"name": "Select",
|
|
39
39
|
"src": "src/components/Fields/Select/Select.vue",
|
|
40
40
|
"isDynamicEntry": true,
|
|
41
41
|
"imports": [
|
|
42
|
-
"_index-
|
|
42
|
+
"_index-9Trap6Gx.cjs",
|
|
43
43
|
"__plugin-vue_export-helper-BaHX9ZKS.cjs"
|
|
44
44
|
]
|
|
45
45
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"src": "src/index.ts",
|
|
50
50
|
"isEntry": true,
|
|
51
51
|
"imports": [
|
|
52
|
-
"_index-
|
|
52
|
+
"_index-9Trap6Gx.cjs"
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
55
|
"style.css": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var y = Object.defineProperty;
|
|
2
2
|
var f = (e, o) => y(e, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { B as g, V as C } from "./index-
|
|
3
|
+
import { B as g, V as C } from "./index-DTgMtTpl.js";
|
|
4
4
|
import { createElementBlock as r, createCommentVNode as s, openBlock as n, createElementVNode as w, normalizeStyle as b, withKeys as B, normalizeClass as d, renderSlot as T, createBlock as $, toDisplayString as a, resolveDynamicComponent as R, withCtx as H, createTextVNode as p, Fragment as v } from "vue";
|
|
5
5
|
import { _ as M } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
6
6
|
var O = Object.getOwnPropertyDescriptor, S = /* @__PURE__ */ f((e, o, k, m) => {
|
|
@@ -110,7 +110,7 @@ function I(e, o, k, m, l, u) {
|
|
|
110
110
|
], 8, W)) : s("", !0);
|
|
111
111
|
}
|
|
112
112
|
f(I, "render");
|
|
113
|
-
const j = /* @__PURE__ */ M(h, [["render", I], ["__scopeId", "data-v-
|
|
113
|
+
const j = /* @__PURE__ */ M(h, [["render", I], ["__scopeId", "data-v-0ef39eab"]]);
|
|
114
114
|
export {
|
|
115
115
|
j as default
|
|
116
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var i=(e,t)=>p(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-
|
|
1
|
+
"use strict";var p=Object.defineProperty;var i=(e,t)=>p(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-9Trap6Gx.cjs"),o=require("vue"),k=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var f=Object.getOwnPropertyDescriptor,y=i((e,t,u,s)=>{for(var l=s>1?void 0:s?f(t,u):t,a=e.length-1,n;a>=0;a--)(n=e[a])&&(l=n(l)||l);return l},"__decorateClass"),r;let d=(r=class extends m.ButtonInherited{},i(r,"Button"),r);d=y([m.VST],d);const g=["title","data-theme","data-offset","data-placement"],h=["title","data-theme","data-offset","data-placement","disabled","type"],b=["innerHTML"],B=["innerHTML"],v=["href"],C=["href"];function c(e,t,u,s,l,a){return e.showButton?(o.openBlock(),o.createElementBlock("span",{key:0,class:"d-inline-block relative min-h40px",title:e.disabled?e.disabledTitle:"","data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement},[o.createElementVNode("button",{class:o.normalizeClass(["relative w100% h100% flex! items-center! justify-center!",{shine:e.shine,[e.randomClass+(e.isOnHover?" hover":"")]:!0}]),title:e.disabled?"":e.innerTitle,"data-theme":e.dataThemeInner,"data-offset":e.dataOffset,"data-placement":e.dataPlacement,onMouseover:t[0]||(t[0]=n=>e.isOnHover=!0),onMouseout:t[1]||(t[1]=n=>e.isOnHover=!1),onClick:t[2]||(t[2]=(...n)=>e.click&&e.click(...n)),onTouchstart:t[3]||(t[3]=(...n)=>e.touchstart&&e.touchstart(...n)),onTouchend:t[4]||(t[4]=(...n)=>e.touchend&&e.touchend(...n)),onMouseup:t[5]||(t[5]=(...n)=>e.mouseup&&e.mouseup(...n)),onMousedown:t[6]||(t[6]=(...n)=>e.mousedown&&e.mousedown(...n)),onKeydown:t[7]||(t[7]=o.withKeys((...n)=>e.keydownEnter&&e.keydownEnter(...n),["enter"])),onMouseleave:t[8]||(t[8]=n=>e.isButtonActive=!1),disabled:e.disabled,type:e.type,style:o.normalizeStyle({fontSize:e.fontSize,fontFamily:e.fontFamily,borderRadius:e.borderRadius,width:e.width,...e.style}),ref:"button"},[e.badge?(o.openBlock(),o.createElementBlock("div",{key:0,class:"absolute right--9px top--9px bg-lightblue-400 fw-bold rounded-full z-3 px7px",style:o.normalizeStyle({background:e.badgeBg??void 0,color:e.badgeColor??"#ffffff"})},o.toDisplayString(e.badge),5)):o.createCommentVNode("",!0),e.icon?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(["left-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"left-icon":""])},[e.icon?.startsWith("<")?(o.openBlock(),o.createElementBlock("div",{key:0,innerHTML:e.icon},null,8,b)):(o.openBlock(),o.createElementBlock("i",{key:1,class:o.normalizeClass(["fa",e.icon])},null,2))],2)):o.createCommentVNode("",!0),o.renderSlot(e.$slots,"default",{},void 0,!0),e.iconRight?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(["right-icon-animate",e.$slots.default&&e.$refs?.button?.innerText?.trim?.()?.length?"right-icon":""])},[e.iconRight?.startsWith("<")?(o.openBlock(),o.createElementBlock("div",{key:0,innerHTML:e.iconRight},null,8,B)):(o.openBlock(),o.createElementBlock("i",{key:1,class:o.normalizeClass(["fa",e.iconRight])},null,2))],2)):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),null,{default:o.withCtx(()=>[o.createTextVNode("."+o.toDisplayString(e.randomClass)+" { background: "+o.toDisplayString(e.style?.bacground??e.currentBg+"!important")+"; box-shadow: none !important; color: "+o.toDisplayString(e.currentColor)+" !important; border-color: "+o.toDisplayString(e.currentBorderColor)+" !important; }",1),e.currentColorHover?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode("."+o.toDisplayString(e.randomClass)+":hover { color: "+o.toDisplayString(e.style?.color??e.currentColorHover+"!important")+"; }",1)],64)):o.createCommentVNode("",!0),e.disabled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createTextVNode("."+o.toDisplayString(e.randomClass)+":active { background: "+o.toDisplayString(e.currentBgActive)+" !important; border-color: "+o.toDisplayString(e.currentBorderColorActive)+" !important; color: "+o.toDisplayString(e.currentColorActive)+" !important; opacity: 1 !important; "+o.toDisplayString(e.boxShadowCss)+" !important; }",1)],64))]),_:1})),e.link&&e.link?.startsWith("http")||e.link?.startsWith("//")?(o.openBlock(),o.createElementBlock("a",{key:3,class:"d-none",ref:"link",href:e.link,target:"_blank"}," ",8,v)):!e.link&&e.linkRevert&&!e.linkRevert?.startsWith("http")&&!e.linkRevert?.startsWith("//")?(o.openBlock(),o.createElementBlock("a",{key:4,class:"d-none",ref:"link",href:e.linkRevert,target:"_blank"}," ",8,C)):o.createCommentVNode("",!0)],46,h)],8,g)):o.createCommentVNode("",!0)}i(c,"render");const S=k._export_sfc(d,[["render",c],["__scopeId","data-v-0ef39eab"]]);exports.default=S;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var St=Object.defineProperty;var r=(t,e)=>St(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./index-DvD5s6bF.cjs"),K=require("vue"),xt=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var lt="​";function Z(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(Z,"e");function dt(t){return(function(e){if(Array.isArray(e))return Z(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 Z(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(dt,"i");var L={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).log.apply(n,["[Tagify]:"].concat(dt(e)))},"log"),warn:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).warn.apply(n,["[Tagify]:"].concat(dt(e)))},"warn")},z=r(function(t,e,i,n){return t=""+t,e=""+e,n&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"s"),ut=r(function(t,e){return t&&Array.isArray(t)&&t.map((function(i){return rt(i,e)}))},"a");function rt(t,e){var i,n={};for(i in t)e.indexOf(i)<0&&(n[i]=t[i]);return n}r(rt,"o");function tt(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(tt,"r");function ct(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ct,"l");function R(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(R,"d");function E(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(E,"c");function w(t,e,i){var n,s;function a(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(E(l[d])){E(o[d])?a(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(a,"a"),n=t,((s=Object)!=null&&typeof Symbol<"u"&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)||(t={}),a(t,e),i&&a(t,i),t}r(w,"u");function gt(){var t=[],e={},i=!0,n=!1,s=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,d=!0,u=!1,c=void 0;try{for(var g,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var f=g.value;E(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,c=p}finally{try{d||h.return==null||h.return()}finally{if(u)throw c}}}}catch(p){n=!0,s=p}finally{try{i||o.return==null||o.return()}finally{if(n)throw s}}return t}r(gt,"g");function X(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(X,"h");var ht=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function pt(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}r(pt,"f");function H(t){var e,i=wt.call(this,t),n=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&n}r(H,"m");function ft(t){return wt.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(ft,"v");function wt(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(wt,"b");function Tt(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(Tt,"w");function y(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:w({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(L.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(y,"y");function k(t){if(t&&t.parentNode){var e=t,i=window.getSelection(),n=i.getRangeAt(0);i.rangeCount&&(n.setStartAfter(e),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}}r(k,"T");function Ot(t,e){t.forEach((function(i){if(y(i.previousSibling)||!i.previousSibling){var n=document.createTextNode("");i.before(n),e&&k(n)}}))}r(Ot,"O");var et={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},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 Dt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Dt,"x");function It(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Dt(t,s,i[s])}))}return t}r(It,"S");function Nt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);s.push.apply(s,a)}return s})(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})),t}r(Nt,"I");function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(it,"E");function Mt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Mt,"M");function Et(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 n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(Et,"N");function _t(){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(_t,"A");var $,W,At=($=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Mt(t,s,i[s])}))}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)},n=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[n]("scroll",i.position,!0),window[n]("resize",i.position),window[n]("keydown",i.onKeyDown)),this.DOM.dropdown[n]("mouseover",i.onMouseOver),this.DOM.dropdown[n]("mouseleave",i.onMouseLeave),this.DOM.dropdown[n]("mousedown",i.onClick),this.DOM.dropdown.content[n]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,n=i.dropdown.includeSelectedTags,s=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),a=this.dropdown.getSuggestionDataByNode(s),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(),c=t.key=="ArrowUp"||t.key=="Up";s&&(s=e.dropdown.getNextOrPrevOption(s,!c)),s&&s.matches(i.classNames.dropdownItemSelector)||(s=u[c?u.length-1:0]),e.dropdown.highlightOption(s,!0);break;case"PageUp":case"PageDown":var g;t.preventDefault();var h=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=h[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(s){var m=h.indexOf(s),v=p?Math.max(0,m-f):Math.min(h.length-1,m+f);s=h[v]}else s=h[0];e.dropdown.highlightOption(s,!0);break;case"Home":case"End":t.preventDefault();var T=e.dropdown.getAllSuggestionsRefs();s=T[t.key==="Home"?0:T.length-1],e.dropdown.highlightOption(s,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var D=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&s&&D&&!e.state.editing&&a){t.preventDefault();var I=e.dropdown.getMappedValue(a);return e.state.autoCompleteData=a,e.input.autocomplete.set.call(e,I),!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:a,suggestionElm:s}).then((function(){if(s){var b=n?s:e.dropdown.getNextOrPrevOption(s,!c);e.dropdown.selectOption(s,t,(function(){if(b){var C=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(C),e.dropdown.highlightOption(b)}}))}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)})).catch((function(b){return L.warn(b)}));break;case"Backspace":if(o||e.state.editing.scope)return;var N=e.input.raw.call(e);N!=""&&N.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),n=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:n,suggestionElm:i}).then((function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()})).catch((function(s){return L.warn(s)}))}},"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"),n=this.suggestedListItems.length;n--;){if(E(e=this.suggestedListItems[n])&&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(),n=i.findIndex((function(s){return s===t}));return e?i[n+1]:i[n-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,n=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(n),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(n),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 n=this,s=this.settings,a=s.dropdown.includeSelectedTags,o=s.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"),c=u=="noMatch",g=s.mode=="mix",h=this.suggestedListItems.find((function(p){var m;return((m=p.value)!==null&&m!==void 0?m:p)==u}));if(this.trigger("dropdown:select",{data:h,elm:t,event:e}),h||c){if(this.state.editing){var f=this.normalizeTags([h])[0];h=s.transformTag.call(this,f)||f,this.onEditTagDone(null,w({__isValid:!0},h))}else this[g?"addMixTags":"addTags"]([h||this.input.raw.call(this)],l);(g||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),d&&setTimeout(this.dropdown.hide.bind(this)),a?i&&i():(t.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){t.remove(),n.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,n,s,a,o,l,d=r(function(){var b,C,P=void 0,j=void 0;b=p[I],n=((C=Object)!=null&&typeof Symbol<"u"&&C[Symbol.hasInstance]?C[Symbol.hasInstance](b):b instanceof C)?p[I]:{value:p[I]};var O,S=Object.keys(n).some((function(x){return D.includes(x)}))?D:["value"];g.fuzzySearch&&!e.exact?(a=S.reduce((function(x,M){return x+" "+(n[M]||"")}),"").toLowerCase().trim(),g.accentedSearch&&(a=X(a),l=X(l)),P=a.indexOf(l)==0,j=a===l,O=a,s=l.toLowerCase().split(" ").every((function(x){return O.includes(x.toLowerCase())}))):(P=!0,s=S.some((function(x){var M=""+(n[x]||"");return g.accentedSearch&&(M=X(M),l=X(l)),g.caseSensitive||(M=M.toLowerCase()),j=M===l,e.exact?M===l:M.indexOf(l)==0}))),o=!g.includeSelectedTags&&i.isTagDuplicate(E(n)?n.value:n),s&&!o&&(j&&P?f.push(n):g.sortby=="startsWith"&&P?h.unshift(n):h.push(n))},"l"),u=this,c=this.settings,g=c.dropdown,h=(e=e||{},[]),f=[],p=c.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,T=typeof g.sortby=="function",D=g.searchKeys,I=0;if(!(t=c.mode=="select"&&this.value.length&&this.value[0][c.tagTextProp]==t?"":t)||!D.length){h=v?p:p.filter((function(b){return!u.isTagDuplicate(E(b)?b.value:b)}));var N=T?g.sortby(h,l):h.slice(0,m);return this.state.dropdown.suggestions=N,N}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();I<p.length;I++)i=this,d();return this.state.dropdown.suggestions=f.concat(h),N=T?g.sortby(f.concat(h),l):f.concat(h).slice(0,m),this.state.dropdown.suggestions=N,N},"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 w([],t).map((function(i,n){typeof i!="string"&&typeof i!="number"||(i={value:i});var s=e.dropdown.getMappedValue(i);return s=typeof s=="string"&&e.settings.dropdown.escapeHTML?R(s):s,e.settings.templates.dropdownItem.apply(e,[Nt(It({},i),{mappedValue:s}),e])})).join("")},"createListHTML")}),W=(W={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 Et(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,n,s=this,a=this.settings,o=a.mode=="mix"&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,d=a.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!a.templates.dropdownItemNoMatch||a.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),a.templates.dropdownItemNoMatch&&(n=a.templates.dropdownItemNoMatch.call(this,{value:t}))),!n){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!z(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=""+(E(e=this.suggestedListItems[0])?e.value:e),a.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(n),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.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(){s.dropdown.position(),s.dropdown.render()})),setTimeout((function(){s.trigger("dropdown:show",s.DOM.dropdown)}))}},"show"),hide:r(function(t){var e=this,i=this.DOM,n=i.scope,s=i.dropdown,a=this.settings.dropdown.position=="manual"&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),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",s),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,n=this,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings,o=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),o.appendChild(this.DOM.dropdown),setTimeout((function(){return n.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]),n=this.dropdown.getHeaderRef(),s=this.dropdown.getFooterRef();e&&n?.parentNode.replaceChild(e,n),i&&s?.parentNode.replaceChild(i,s)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var n,s,a,o,l,d,u,c,g,h,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,T=m?window.pageYOffset:i.scrollTop,D=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,I=D.clientHeight,N=Math.max(D.clientWidth||0,window.innerWidth||0),b=N>480?e.position:"all",C=this.DOM[b=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(b=="text"?(a=(n=(function(){var O=document.getSelection();if(O.rangeCount){var S,x,M=O.getRangeAt(0),J=M.startContainer,Y=M.startOffset;if(Y>0)return(x=document.createRange()).setStart(J,Y-1),x.setEnd(J,Y),{left:(S=x.getBoundingClientRect()).right,top:S.top,bottom:S.bottom};if(J.getBoundingClientRect)return J.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,s=n.top,o=n.left,l="auto"):(d=(function(O){var S=0,x=0;for(O=O.parentNode;O&&O!=D;)S+=O.offsetTop||0,x+=O.offsetLeft||0,O=O.parentNode;return{top:S,left:x}})(i),n=C.getBoundingClientRect(),s=v?-1:n.top-d.top,a=(v?n.height:n.bottom-d.top)-1,o=v?-1:n.left-d.left,l=n.width+"px"),!m){var P=(function(){for(var O=0,S=e.appendTarget.parentNode;S;)O+=S.scrollTop||0,S=S.parentNode;return O})();s+=P,a+=P}var j;s=Math.floor(s),a=Math.ceil(a),c=N-o<120,g=((u=(j=e.placeAbove)!==null&&j!==void 0?j:I-n.bottom<t)?s:a)+T,h=o+(p&&n.width||0)+window.pageXOffset,h=b=="text"&&c?"right: 0;":"left: ".concat(h,"px;"),f.style.cssText="".concat(h," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",b)}}},"position")})!=null?W:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(W)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i.push.apply(i,n)}return i})(Object(W)).forEach((function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(W,t))})),$),U="@yaireo/tagify/",Ct={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},kt={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 St=Object.defineProperty;var r=(t,e)=>St(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./index-9Trap6Gx.cjs"),K=require("vue"),xt=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var lt="​";function Z(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(Z,"e");function dt(t){return(function(e){if(Array.isArray(e))return Z(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 Z(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Z(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(dt,"i");var L={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).log.apply(n,["[Tagify]:"].concat(dt(e)))},"log"),warn:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).warn.apply(n,["[Tagify]:"].concat(dt(e)))},"warn")},z=r(function(t,e,i,n){return t=""+t,e=""+e,n&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"s"),ut=r(function(t,e){return t&&Array.isArray(t)&&t.map((function(i){return rt(i,e)}))},"a");function rt(t,e){var i,n={};for(i in t)e.indexOf(i)<0&&(n[i]=t[i]);return n}r(rt,"o");function tt(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(tt,"r");function ct(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ct,"l");function R(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(R,"d");function E(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(E,"c");function w(t,e,i){var n,s;function a(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(E(l[d])){E(o[d])?a(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(a,"a"),n=t,((s=Object)!=null&&typeof Symbol<"u"&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)||(t={}),a(t,e),i&&a(t,i),t}r(w,"u");function gt(){var t=[],e={},i=!0,n=!1,s=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,d=!0,u=!1,c=void 0;try{for(var g,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var f=g.value;E(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,c=p}finally{try{d||h.return==null||h.return()}finally{if(u)throw c}}}}catch(p){n=!0,s=p}finally{try{i||o.return==null||o.return()}finally{if(n)throw s}}return t}r(gt,"g");function X(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(X,"h");var ht=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function pt(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}r(pt,"f");function H(t){var e,i=wt.call(this,t),n=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&n}r(H,"m");function ft(t){return wt.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(ft,"v");function wt(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(wt,"b");function Tt(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(Tt,"w");function y(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:w({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(L.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(y,"y");function k(t){if(t&&t.parentNode){var e=t,i=window.getSelection(),n=i.getRangeAt(0);i.rangeCount&&(n.setStartAfter(e),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}}r(k,"T");function Ot(t,e){t.forEach((function(i){if(y(i.previousSibling)||!i.previousSibling){var n=document.createTextNode("");i.before(n),e&&k(n)}}))}r(Ot,"O");var et={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},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 Dt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Dt,"x");function It(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Dt(t,s,i[s])}))}return t}r(It,"S");function Nt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);s.push.apply(s,a)}return s})(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})),t}r(Nt,"I");function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(it,"E");function Mt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Mt,"M");function Et(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 n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(Et,"N");function _t(){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(_t,"A");var $,W,At=($=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Mt(t,s,i[s])}))}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)},n=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[n]("scroll",i.position,!0),window[n]("resize",i.position),window[n]("keydown",i.onKeyDown)),this.DOM.dropdown[n]("mouseover",i.onMouseOver),this.DOM.dropdown[n]("mouseleave",i.onMouseLeave),this.DOM.dropdown[n]("mousedown",i.onClick),this.DOM.dropdown.content[n]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,n=i.dropdown.includeSelectedTags,s=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),a=this.dropdown.getSuggestionDataByNode(s),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(),c=t.key=="ArrowUp"||t.key=="Up";s&&(s=e.dropdown.getNextOrPrevOption(s,!c)),s&&s.matches(i.classNames.dropdownItemSelector)||(s=u[c?u.length-1:0]),e.dropdown.highlightOption(s,!0);break;case"PageUp":case"PageDown":var g;t.preventDefault();var h=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=h[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(s){var m=h.indexOf(s),v=p?Math.max(0,m-f):Math.min(h.length-1,m+f);s=h[v]}else s=h[0];e.dropdown.highlightOption(s,!0);break;case"Home":case"End":t.preventDefault();var T=e.dropdown.getAllSuggestionsRefs();s=T[t.key==="Home"?0:T.length-1],e.dropdown.highlightOption(s,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var D=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&s&&D&&!e.state.editing&&a){t.preventDefault();var I=e.dropdown.getMappedValue(a);return e.state.autoCompleteData=a,e.input.autocomplete.set.call(e,I),!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:a,suggestionElm:s}).then((function(){if(s){var b=n?s:e.dropdown.getNextOrPrevOption(s,!c);e.dropdown.selectOption(s,t,(function(){if(b){var C=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(C),e.dropdown.highlightOption(b)}}))}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)})).catch((function(b){return L.warn(b)}));break;case"Backspace":if(o||e.state.editing.scope)return;var N=e.input.raw.call(e);N!=""&&N.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),n=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:n,suggestionElm:i}).then((function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()})).catch((function(s){return L.warn(s)}))}},"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"),n=this.suggestedListItems.length;n--;){if(E(e=this.suggestedListItems[n])&&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(),n=i.findIndex((function(s){return s===t}));return e?i[n+1]:i[n-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,n=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(n),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(n),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 n=this,s=this.settings,a=s.dropdown.includeSelectedTags,o=s.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"),c=u=="noMatch",g=s.mode=="mix",h=this.suggestedListItems.find((function(p){var m;return((m=p.value)!==null&&m!==void 0?m:p)==u}));if(this.trigger("dropdown:select",{data:h,elm:t,event:e}),h||c){if(this.state.editing){var f=this.normalizeTags([h])[0];h=s.transformTag.call(this,f)||f,this.onEditTagDone(null,w({__isValid:!0},h))}else this[g?"addMixTags":"addTags"]([h||this.input.raw.call(this)],l);(g||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),d&&setTimeout(this.dropdown.hide.bind(this)),a?i&&i():(t.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){t.remove(),n.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,n,s,a,o,l,d=r(function(){var b,C,P=void 0,j=void 0;b=p[I],n=((C=Object)!=null&&typeof Symbol<"u"&&C[Symbol.hasInstance]?C[Symbol.hasInstance](b):b instanceof C)?p[I]:{value:p[I]};var O,S=Object.keys(n).some((function(x){return D.includes(x)}))?D:["value"];g.fuzzySearch&&!e.exact?(a=S.reduce((function(x,M){return x+" "+(n[M]||"")}),"").toLowerCase().trim(),g.accentedSearch&&(a=X(a),l=X(l)),P=a.indexOf(l)==0,j=a===l,O=a,s=l.toLowerCase().split(" ").every((function(x){return O.includes(x.toLowerCase())}))):(P=!0,s=S.some((function(x){var M=""+(n[x]||"");return g.accentedSearch&&(M=X(M),l=X(l)),g.caseSensitive||(M=M.toLowerCase()),j=M===l,e.exact?M===l:M.indexOf(l)==0}))),o=!g.includeSelectedTags&&i.isTagDuplicate(E(n)?n.value:n),s&&!o&&(j&&P?f.push(n):g.sortby=="startsWith"&&P?h.unshift(n):h.push(n))},"l"),u=this,c=this.settings,g=c.dropdown,h=(e=e||{},[]),f=[],p=c.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,T=typeof g.sortby=="function",D=g.searchKeys,I=0;if(!(t=c.mode=="select"&&this.value.length&&this.value[0][c.tagTextProp]==t?"":t)||!D.length){h=v?p:p.filter((function(b){return!u.isTagDuplicate(E(b)?b.value:b)}));var N=T?g.sortby(h,l):h.slice(0,m);return this.state.dropdown.suggestions=N,N}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();I<p.length;I++)i=this,d();return this.state.dropdown.suggestions=f.concat(h),N=T?g.sortby(f.concat(h),l):f.concat(h).slice(0,m),this.state.dropdown.suggestions=N,N},"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 w([],t).map((function(i,n){typeof i!="string"&&typeof i!="number"||(i={value:i});var s=e.dropdown.getMappedValue(i);return s=typeof s=="string"&&e.settings.dropdown.escapeHTML?R(s):s,e.settings.templates.dropdownItem.apply(e,[Nt(It({},i),{mappedValue:s}),e])})).join("")},"createListHTML")}),W=(W={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 Et(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,n,s=this,a=this.settings,o=a.mode=="mix"&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,d=a.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!a.templates.dropdownItemNoMatch||a.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),a.templates.dropdownItemNoMatch&&(n=a.templates.dropdownItemNoMatch.call(this,{value:t}))),!n){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!z(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=""+(E(e=this.suggestedListItems[0])?e.value:e),a.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(n),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.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(){s.dropdown.position(),s.dropdown.render()})),setTimeout((function(){s.trigger("dropdown:show",s.DOM.dropdown)}))}},"show"),hide:r(function(t){var e=this,i=this.DOM,n=i.scope,s=i.dropdown,a=this.settings.dropdown.position=="manual"&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),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",s),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,n=this,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings,o=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),o.appendChild(this.DOM.dropdown),setTimeout((function(){return n.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]),n=this.dropdown.getHeaderRef(),s=this.dropdown.getFooterRef();e&&n?.parentNode.replaceChild(e,n),i&&s?.parentNode.replaceChild(i,s)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var n,s,a,o,l,d,u,c,g,h,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,T=m?window.pageYOffset:i.scrollTop,D=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,I=D.clientHeight,N=Math.max(D.clientWidth||0,window.innerWidth||0),b=N>480?e.position:"all",C=this.DOM[b=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(b=="text"?(a=(n=(function(){var O=document.getSelection();if(O.rangeCount){var S,x,M=O.getRangeAt(0),J=M.startContainer,Y=M.startOffset;if(Y>0)return(x=document.createRange()).setStart(J,Y-1),x.setEnd(J,Y),{left:(S=x.getBoundingClientRect()).right,top:S.top,bottom:S.bottom};if(J.getBoundingClientRect)return J.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,s=n.top,o=n.left,l="auto"):(d=(function(O){var S=0,x=0;for(O=O.parentNode;O&&O!=D;)S+=O.offsetTop||0,x+=O.offsetLeft||0,O=O.parentNode;return{top:S,left:x}})(i),n=C.getBoundingClientRect(),s=v?-1:n.top-d.top,a=(v?n.height:n.bottom-d.top)-1,o=v?-1:n.left-d.left,l=n.width+"px"),!m){var P=(function(){for(var O=0,S=e.appendTarget.parentNode;S;)O+=S.scrollTop||0,S=S.parentNode;return O})();s+=P,a+=P}var j;s=Math.floor(s),a=Math.ceil(a),c=N-o<120,g=((u=(j=e.placeAbove)!==null&&j!==void 0?j:I-n.bottom<t)?s:a)+T,h=o+(p&&n.width||0)+window.pageXOffset,h=b=="text"&&c?"right: 0;":"left: ".concat(h,"px;"),f.style.cssText="".concat(h," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",b)}}},"position")})!=null?W:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(W)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i.push.apply(i,n)}return i})(Object(W)).forEach((function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(W,t))})),$),U="@yaireo/tagify/",Ct={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},kt={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":"",`
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
`);for(var d=s.nextSibling,u="";d;)u+=d.textContent,d=d.nextSibling;u.trim()&&k(s.previousSibling)}else s.previousSibling&&!y(s.previousSibling)||s.before("")}})),n.removedNodes.forEach((function(s){s&&s.nodeName=="BR"&&H.call(e,i)&&(e.removeTags(i),e.fixFirefoxLastTagNoCaret())}))}));var i=this.DOM.input.lastChild;i&&i.nodeValue==""&&i.remove(),i&&i.nodeName=="BR"||this.DOM.input.appendChild(document.createElement("br"))},"onInputDOMChange")}};function at(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(at,"z");function ot(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(ot,"X");function _(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}r(_,"J");function bt(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){ot(t,s,i[s])}))}return t}r(bt,"G");function G(t){return(function(e){if(Array.isArray(e))return at(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 at(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return at(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(G,"$");function Q(t,e){if(!t){L.warn("input element not found",t);var i=new Proxy(this,{get:r(function(){return function(){return i}},"get")});return i}if(t.__tagify)return L.warn("input element is already Tagified - Same instance is returned.",t),t.__tagify;var n;w(this,(function(s){var a=document.createTextNode(""),o={};function l(d,u,c){c&&u.split(/\s+/g).forEach((function(g){return a[d+"EventListener"].call(a,g,c)}))}return r(l,"s"),{removeAllCustomListeners:r(function(){Object.entries(o).forEach((function(d){var u=Lt(d,2),c=u[0];u[1].forEach((function(g){return l("remove",c,g)}))})),o={}},"removeAllCustomListeners"),off:r(function(d,u){return d&&(u?l("remove",d,u):d.split(/\s+/g).forEach((function(c){var g;(g=o[c])===null||g===void 0||g.forEach((function(h){return l("remove",c,h)})),delete o[c]}))),this},"off"),on:r(function(d,u){return u&&typeof u=="function"&&(d.split(/\s+/g).forEach((function(c){Array.isArray(o[c])?o[c].push(u):o[c]=[u]})),l("add",d,u)),this},"on"),trigger:r(function(d,u,c){var g;if(c=c||{cloneData:!0},d)if(s.settings.isJQueryPlugin)d=="remove"&&(d="removeTag"),jQuery(s.DOM.originalInput).triggerHandler(d,[u]);else{try{var h=typeof u=="object"?u:{value:u};if((h=c.cloneData?w({},h):h).tagify=this,u.event&&(h.event=this.cloneEvent(u.event)),vt(u,Object))for(var f in u)vt(u[f],HTMLElement)&&(h[f]=u[f]);g=new CustomEvent(d,{detail:h})}catch(p){L.warn(p)}a.dispatchEvent(g)}},"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(s){var a;if(n){var o,l="/"+s;if(((a=localStorage)===null||a===void 0?void 0:a.getItem(U+n+"/v"))===1)try{o=JSON.parse(localStorage[U+n+l])}catch{}return o}}),this.setPersistedData=(function(s){var a;return s?((a=localStorage)===null||a===void 0||a.setItem(U+s+"/v",1),function(o,l){var d,u="/"+l,c=JSON.stringify(o);o&&l&&((d=localStorage)===null||d===void 0||d.setItem(U+s+u,c),dispatchEvent(new Event("storage")))}):function(){}})(e.id),this.clearPersistedData=(function(s){return function(a){var o=U+"/"+s+"/";if(a)localStorage.removeItem(o+a);else for(var l in localStorage)l.includes(o)&&localStorage.removeItem(l)}})(e.id),this.applySettings(t,e),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(t),_t.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(Q,"Q");Q.prototype={_dropdown:At,placeCaretAfterNode:k,getSetTagData:y,helpers:{sameStr:z,removeCollectionProp:ut,omit:rt,isObject:E,parseHTML:tt,escapeHTML:R,extend:w,concatWithoutDups:gt,getUID:pt,isNodeTag:H},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:tt,templates:kt,parseTemplate:r(function(t,e){return tt((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){var e=r(function(n){var s=n;Object.defineProperty(t,s+"Selector",{get:r(function(){return"."+this[s].split(" ")[0]},"get")})},"e");for(var i in t)e(i)},"generateClassSelectors"),applySettings:r(function(t,e){var i,n;et.templates=this.templates;var s=w({},et,e.mode=="mix"?{dropdown:{position:"text"}}:{}),a=this.settings=w({},s,e);if(a.disabled=t.hasAttribute("disabled"),a.readonly=a.readonly||t.hasAttribute("readonly"),a.placeholder=R(t.getAttribute("placeholder")||a.placeholder||""),a.required=t.hasAttribute("required"),this.generateClassSelectors(a.classNames),this.isIE&&(a.autoComplete=!1),["whitelist","blacklist"].forEach((function(l){var d=t.getAttribute("data-"+l);d&&_(d=d.split(a.delimiters),Array)&&(a[l]=d)})),"autoComplete"in e&&!E(e.autoComplete)&&(a.autoComplete=et.autoComplete,a.autoComplete.enabled=e.autoComplete),a.mode=="mix"&&(a.pattern=a.pattern||/@/,a.autoComplete.rightKey=!0,a.delimiters=e.delimiters||null,a.tagTextProp&&!a.dropdown.searchKeys.includes(a.tagTextProp)&&a.dropdown.searchKeys.push(a.tagTextProp)),t.pattern)try{a.pattern=new RegExp(t.pattern)}catch{}if(a.delimiters){a._delimiters=a.delimiters;try{a.delimiters=new RegExp(this.settings.delimiters,"g")}catch{}}(a.disabled||a.readonly)&&(a.userInput=!1),this.TEXTS=bt({},Ct,a.texts||{}),a.mode=="select"&&(a.dropdown.includeSelectedTags=!0),(a.mode!="select"||!((i=e.dropdown)===null||i===void 0)&&i.enabled)&&a.userInput||(a.dropdown.enabled=0),a.disabled&&(a.dropdown.enabled=!1),a.dropdown.appendTarget=((n=e.dropdown)===null||n===void 0?void 0:n.appendTarget)||document.body,a.dropdown.includeSelectedTags===void 0&&(a.dropdown.includeSelectedTags=a.duplicates);var o=this.getPersistedData("whitelist");Array.isArray(o)&&(this.whitelist=Array.isArray(a.whitelist)?gt(a.whitelist,o):o)},"applySettings"),getAttributes:r(function(t){var e,i=this.getCustomAttributes(t),n="";for(e in i)n+=" "+e+(t[e]!==void 0?'="'.concat(i[e],'"'):"");return n},"getAttributes"),getCustomAttributes:r(function(t){if(!E(t))return"";var e,i={};for(e in t)e.slice(0,2)!="__"&&e!="class"&&t.hasOwnProperty(e)&&t[e]!==void 0&&(i[e]=R(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,n=getComputedStyle(this.DOM.scope,null);this.CSSVars={tagHideTransition:(t=(function(s){if(!s)return{};var a=(s=s.trim().split(" ")[0]).split(/\d+/g).filter((function(o){return o})).pop().trim();return{value:+s.split(a).filter((function(o){return o}))[0].trim(),unit:a}})((i="tag-hide-transition",n.getPropertyValue("--"+i))),e=t.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 n=this.getPersistedData("value");t=n&&!this.DOM.originalInput.value?n: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(s){return s&&s.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:Pt,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(n){return i.getRangeAt(0)["set"+n](e,t||e.length)}))}catch(n){console.warn(n)}}},"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=R(e)},"setTagTextNode"),editTag:r(function(t,e){var i=this;t=t||this.getLastTag(),e=e||{};var n=this.settings,s=this.getTagTextNode(t),a=this.getNodeIndex(t),o=y(t),l=this.events.callbacks,d=!0,u=n.mode=="select";if(!u&&this.dropdown.hide(),s){if(!_(o,Object)||!("editable"in o)||o.editable)return o=y(t,{__originalData:w({},o),__originalHTML:t.cloneNode(!0)}),y(o.__originalHTML,o.__originalData),s.setAttribute("contenteditable",!0),t.classList.add(n.classNames.tagEditing),this.events.callbacks.onEditTagFocus.call(this,t),s.addEventListener("click",l.onEditTagClick.bind(this,t)),s.addEventListener("blur",l.onEditTagBlur.bind(this,this.getTagTextNode(t))),s.addEventListener("input",l.onEditTagInput.bind(this,s)),s.addEventListener("paste",l.onEditTagPaste.bind(this,s)),s.addEventListener("keydown",(function(c){return l.onEditTagkeydown.call(i,c,t)})),s.addEventListener("compositionstart",l.onCompositionStart.bind(this)),s.addEventListener("compositionend",l.onCompositionEnd.bind(this)),e.skipValidation||(d=this.editTagToggleValidity(t)),s.originalIsValid=d,this.trigger("edit:start",{tag:t,index:a,data:o,isValid:d}),s.focus(),!u&&this.setRangeAtStartEnd(!1,s),n.dropdown.enabled===0&&!u&&this.dropdown.show(),this.state.hasFocus=!0,this}else L.warn("Cannot find element in Tag template: .",n.classNames.tagTextSelector)},"editTag"),editTagToggleValidity:r(function(t,e){var i;if(e=e||y(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;L.warn("tag has no data: ",t,e)},"editTagToggleValidity"),onEditTagDone:r(function(t,e){t=t||this.state.editing.scope,e=e||{};var i,n,s=this.settings,a={tag:t,index:this.getNodeIndex(t),previousData:y(t),data:e};this.trigger("edit:beforeUpdate",a,{cloneData:!1}),this.state.editing=!1,delete e.__originalData,delete e.__originalHTML,t&&t.parentNode&&(((n=e[s.tagTextProp])!==void 0?!((i=(n+="").trim)===null||i===void 0)&&i.call(n):!(s.tagTextProp in e)&&e.value)?(t=this.replaceTag(t,e),this.editTagToggleValidity(t,e),s.a11y.focusableTags?t.focus():s.mode!="select"&&k(t)):this.removeTags(t)),this.trigger("edit:updated",a),s.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&&w(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(n){G(n.classList).some((function(s){return i.includes(s)}))||t.value.push(y(n))})),this.update(),this.dropdown.refilter()},"updateValueByDOMTags"),injectAtCaret:r(function(t,e){var i;if(e=e||((i=this.state.selection)===null||i===void 0?void 0:i.range),typeof t=="string"&&(t=document.createTextNode(t)),!e&&t)return this.appendMixTags(t),this;if(!this.DOM.scope.contains(e?.startContainer))return this;var n=Tt(t,e);return this.setRangeAtStartEnd(!1,n),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,n=i.dropdown.closeOnSelect;this.state.inputText=t,e&&(this.DOM.input.innerHTML=R(""+t),t&&this.toggleClass(i.classNames.empty,!this.DOM.input.innerHTML)),!t&&n&&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,n=[];i.childNodes.forEach((function(s){return s.nodeType==3&&n.push(s.nodeValue)})),n=n.join(`
|
|
38
38
|
`);try{n=n.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch{}return n=n.replace(/\s/g," "),e?.trim?this.trim(n):n},"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(),n=e.substr(0,this.state.inputText.length).toLowerCase(),s=e.substring(this.state.inputText.length);e&&this.state.inputText&&n==i?(this.DOM.input.setAttribute("data-suggest",s),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=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n="."+G(this.settings.classNames.tag.split(" ")).concat(G(e)).join(".");return[].slice.call(this.DOM.scope.querySelectorAll(n))},"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 n=0,s=!0,a=!1,o=void 0;try{for(var l,d=this.value[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var u=l.value;z(this.trim(""+t),u.value,e)&&i!=u.__tagId&&n++}}catch(c){a=!0,o=c}finally{try{s||d.return==null||d.return()}finally{if(a)throw o}}return n},"isTagDuplicate"),getTagIndexByValue:r(function(t){var e=this,i=[],n=this.settings.dropdown.caseSensitive;return this.getTagElms().forEach((function(s,a){s.__tagifyTagData&&z(e.trim(s.__tagifyTagData.value),t,n)&&i.push(a)})),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 n,s=this.settings;return(i=i||s.whitelist).some((function(a){var o=typeof a=="object"?a[e]||a.value:a;if(z(o,t,s.dropdown.caseSensitive,s.trim))return n=typeof a=="object"?a:{value:a},!0})),n||e!="value"||s.tagTextProp=="value"||(n=this.getWhitelistItem(t,s.tagTextProp,i)),n},"getWhitelistItem"),validateTag:r(function(t){var e=this.settings,i="value"in t?"value":e.tagTextProp,n=this.trim(t[i]+"");return(t[i]+"").trim()?e.mode!="mix"&&e.pattern&&_(e.pattern,RegExp)&&!e.pattern.test(n)?this.TEXTS.pattern:!e.duplicates&&this.isTagDuplicate(n,e.dropdown.caseSensitive,t.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(n)||e.enforceWhitelist&&!this.isTagWhitelisted(n)?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,n=i.whitelist,s=i.delimiters,a=i.mode,o=i.tagTextProp,l=[],d=!!n&&_(n[0],Object),u=Array.isArray(t),c=u&&t[0].value,g=r(function(h){return(h+"").split(s).reduce((function(f,p){var m,v=e.trim(p);return v&&f.push((ot(m={},o,v),ot(m,"value",v),m)),f}),[])},"h");if(typeof t=="number"&&(t=t.toString()),typeof t=="string"){if(!t.trim())return[];t=g(t)}else u&&(t=t.reduce((function(h,f){if(E(f)){var p=w({},f);o in p||(o="value"),p[o]=e.trim(p[o]),(p[o]||p[o]===0)&&h.push(p)}else if(f!=null&&f!==""&&f!==void 0){var m;(m=h).push.apply(m,G(g(f)))}return h}),[]));return d&&!c&&(t.forEach((function(h){var f=l.map((function(v){return v.value})),p=e.dropdown.filterListItems.call(e,h[o],{exact:!0});e.settings.duplicates||(p=p.filter((function(v){return!f.includes(v.value)})));var m=p.length>1?e.getWhitelistItem(h[o],o,p):p[0];m&&_(m,Object)?l.push(m):a!="mix"&&(h.value==null&&(h.value=h[o]),l.push(h))})),l.length&&(t=l)),t},"normalizeTags"),parseMixTags:r(function(t){var e=this,i=this.settings,n=i.mixTagsInterpolator,s=i.duplicates,a=i.transformTag,o=i.enforceWhitelist,l=i.maxTags,d=i.tagTextProp,u=[];t=t.split(n[0]).map((function(g,h){var f,p,m,v=g.split(n[1]),T=v[0],D=u.length==l;try{if(T==+T)throw Error;p=JSON.parse(T)}catch{p=e.normalizeTags(T)[0]||{value:T}}if(a.call(e,p),D||!(v.length>1)||o&&!e.isTagWhitelisted(p.value)||!s&&e.isTagDuplicate(p.value)){if(g)return h?n[0]+g:g}else p[f=p[d]?d:"value"]=e.trim(p[f]),m=e.createTagElem(p),u.push(p),m.classList.add(e.settings.classNames.tagNoAnimation),v[0]=m.outerHTML,e.value.push(p);return v.join("")})).join(""),this.DOM.input.innerHTML=t,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize();var c=this.getTagElms();return c.forEach((function(g,h){return y(g,u[h])})),this.update({withoutChangeEvent:!0}),Ot(c,this.state.hasFocus),t},"parseMixTags"),replaceTextWithNode:r(function(t,e){if(this.state.tag||e){e=e||this.state.tag.prefix+this.state.tag.value;var i,n,s=this.state.selection||window.getSelection(),a=s.anchorNode,o=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return a.splitText(s.anchorOffset-o),(i=a.nodeValue.lastIndexOf(e))==-1||(n=a.splitText(i),t&&a.parentNode.replaceChild(t,n)),!0}},"replaceTextWithNode"),prepareNewTagNode:r(function(t,e){e=e||{};var i=this.settings,n=[],s={},a=Object.assign({},t,{value:t.value+""});if(t=Object.assign({},a),i.transformTag.call(this,t),t.__isValid=this.hasMaxTags()||this.validateTag(t),t.__isValid!==!0){if(e.skipInvalid)return;if(w(s,this.getInvalidTagAttrs(t,t.__isValid),{__preInvalidData:a}),t.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(t.value)),!i.createInvalidTags)return void n.push(t.value)}return"readonly"in t&&(t.readonly?s["aria-readonly"]=!0:delete t.readonly),{tagElm:this.createTagElem(t,s),tagData:t,aggregatedInvalidInput:n}},"prepareNewTagNode"),postProcessNewTagNode:r(function(t,e){var i=this,n=this.settings,s=e.__isValid;s&&s===!0?this.value.push(e):(this.trigger("invalid",{data:e,index:this.value.length,tag:t,message:s}),n.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 n=this.getLastTag();return n?this.replaceTag(n,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=w({value:""},t||{}),i=this.createTagElem(e);y(i,e),this.appendTag(i),this.editTag(i,{skipValidation:!0}),this.toggleFocusClass(!0)},"addEmptyTag"),addTags:r(function(t,e,i){var n=this,s=[],a=this.settings,o=[],l=document.createDocumentFragment(),d=[];if(!t||t.length==0)return s;switch(t=this.normalizeTags(t),a.mode){case"mix":return this.addMixTags(t);case"select":e=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),t.forEach((function(u){var c=n.prepareNewTagNode(u,{skipInvalid:i||a.skipInvalid});if(c){var g=c.tagElm;if(u=c.tagData,o=c.aggregatedInvalidInput,s.push(g),a.mode=="select")return n.selectTag(g,u);l.appendChild(g),n.postProcessNewTagNode(g,u),d.push({tagElm:g,tagData:u})}})),this.appendTag(l),d.forEach((function(u){var c=u.tagElm,g=u.tagData;return n.trigger("add",{tag:c,index:n.getTagIdx(g),data:g})})),this.update(),t.length&&e&&(this.input.set.call(this,a.createInvalidTags?"":o.join(a._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),this.dropdown.refilter(),s},"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(),n=[];return t.forEach((function(s){var a=e.prepareNewTagNode(s);i.appendChild(a.tagElm),e.insertAfterTag(a.tagElm),e.postProcessNewTagNode(a.tagElm,a.tagData),n.push({tagElm:a.tagElm,tagData:a.tagData})})),this.appendMixTags(i,n),i.children},"addMixTags"),appendMixTags:r(function(t,e){var i=!!this.state.selection;i?this.injectAtCaret(t):(this.DOM.input.focus(),(i=this.setStateSelection()).range.setStart(this.DOM.input,i.range.endOffset),i.range.setEnd(this.DOM.input,i.range.endOffset),this.DOM.input.appendChild(t),this.updateValueByDOMTags(),this.update(),this.trigger("add",{tags:e||t.children}))},"appendMixTags"),prefixedTextToTag:r(function(t){var e,i,n,s=this,a=this.settings,o=(e=this.state.tag)===null||e===void 0?void 0:e.delimiters;if(t.prefix=t.prefix||this.state.tag?this.state.tag.prefix:(a.pattern.source||a.pattern)[0],n=this.prepareNewTagNode(t),i=n.tagElm,this.replaceTextWithNode(i)||this.DOM.input.appendChild(i),setTimeout((function(){return i.classList.add(s.settings.classNames.tagNoAnimation)}),300),this.update(),!o){var l=this.insertAfterTag(i)||i;setTimeout(k,0,l)}return this.state.tag=null,this.postProcessNewTagNode(i,n.tagData),this.trigger("add",{tag:n,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=pt();var i,n=w({},t,bt({value:R(t.value+"")},e));return(function(s){for(var a,o=document.createNodeIterator(s,NodeFilter.SHOW_TEXT,null,!1);a=o.nextNode();)a.textContent.trim()||a.parentNode.removeChild(a)})(i=this.parseTemplate("tag",[n,this])),y(i,t),i},"createTagElem"),reCheckInvalidTags:r(function(){var t=this,e=this.settings;this.getTagElms(e.classNames.tagNotAllowed).forEach((function(i,n){var s=y(i),a=t.hasMaxTags(),o=t.validateTag(s),l=o===!0&&!a;if(e.mode=="select"&&t.toggleScopeValidation(o),l)return s=s.__preInvalidData?s.__preInvalidData:{value:s.value},t.replaceTag(i,s);i.title=a||o}))},"reCheckInvalidTags"),removeTags:r(function(t,e,i){var n,s=this,a=this.settings;if(t=t&&_(t,HTMLElement)?[t]:_(t,Array)?t:t?[t]:[this.getLastTag()].filter((function(o){return o})),n=t.reduce((function(o,l){l&&typeof l=="string"&&(l=s.getTagElmByValue(l));var d=y(l);return l&&d&&!d.readonly&&o.push({node:l,idx:s.getTagIdx(d),data:y(l,{__removed:!0})}),o}),[]),i=typeof i=="number"?i:this.CSSVars.tagHideTransition,a.mode=="select"&&(i=0,this.input.set.call(this)),n.length==1&&a.mode!="select"&&n[0].node.classList.contains(a.classNames.tagNotAllowed)&&(e=!0),n.length)return a.hooks.beforeRemoveTag(n,{tagify:this}).then((function(){var o=r(function(l){l.node.parentNode&&(l.node.parentNode.removeChild(l.node),e?a.keepInvalidTags&&this.trigger("remove",{tag:l.node,index:l.idx}):(this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),a.keepInvalidTags&&this.reCheckInvalidTags(),this.trigger("remove",{tag:l.node,index:l.idx,data:l.data})))},"t");e||(s.removeTagsFromValue(n.map((function(l){return l.node}))),s.update(),a.mode=="select"&&a.userInput&&s.setContentEditable(!0)),i&&i>10&&n.length==1?(function(l){l.node.style.width=parseFloat(window.getComputedStyle(l.node).width)+"px",document.body.clientTop,l.node.classList.add(a.classNames.tagHide),setTimeout(o.bind(this),i,l)}).call(s,n[0]):n.forEach(o.bind(s))})).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 n=y(i),s=e.getTagIdx(n);s>-1&&e.value.splice(s,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)),this.update(t,(function(){e.trigger("remove",{})}))},"removeAllTags"),postUpdate:r(function(){this.state.blockChangeEvent=!1;var t,e,i=this.settings,n=i.classNames,s=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(n.hasMaxTags,this.value.length>=i.maxTags),this.toggleClass(n.hasNoTags,!this.value.length),this.toggleClass(n.empty,!s),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 ut(t||this.value,this.dataProps)},"getCleanValue"),getMixedTagsAsString:r(function(){var t="",e=this,i=this.settings,n=i.originalInputValueFormat||JSON.stringify,s=i.mixTagsInterpolator;return r(function a(o){o.childNodes.forEach((function(l){if(l.nodeType==1){var d=y(l);if(l.tagName=="BR"&&(t+=`\r
|
|
39
39
|
`),d&&H.call(e,l)){if(d.__removed)return;t+=s[0]+n(rt(d,e.dataProps))+s[1]}else l.getAttribute("style")||["B","I","U"].includes(l.tagName)?t+=l.textContent:l.tagName!="DIV"&&l.tagName!="P"||(t+=`\r
|
|
40
|
-
`,a(l))}else t+=l.textContent}))},"i")(this.DOM.input),t},"getMixedTagsAsString")},Q.prototype.removeTag=Q.prototype.removeTags;var jt=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,B=r((t,e,i,n)=>{for(var s=n>1?void 0:n?Ft(e,i):e,a=t.length-1,o;a>=0;a--)(o=t[a])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&jt(e,i,s),s},"__decorateClass"),q;let A=(q=class extends V.FieldComponent{emits=["click"];autofocus=!1;mode="select";items=null;tagify;reactiveValue=null;randomClass="";itemsInner=[];beforeMountParent(){this.randomClass="vst-select-"+Math.random().toString().split(".")[1],this.itemsInner=this.items??[],this._isFirstValueSet=!1,this._isIgnoreSetTags=!1}_isFirstValueSet=!1;_isIgnoreSetTags=!1;mountedParent(){this.tagify=new Q(this.$refs.selectInput,{enforceWhitelist:this.mode=="select"?void 0:this.mode!="tags",mode:this.mode=="select"?"select":void 0,escapeHTML:!1,whitelist:this.itemsInner,editTags:this.mode=="tags",dropdown:{maxTags:5,highlightFirst:!0,clearOnSelect:!0,closeOnSelect:this.mode=="select",enabled:0,maxItems:2e3},onChangeAfterBlur:!1,delimiters:null,placeholder:this.placeholder||"Выберите значение",callbacks:{change:r(e=>{let i="";e.detail?.value?.trim?.()?.length&&e.detail?.value!="null"&&(this.mode=="select"?(i=typeof e.detail?.value=="string"&&(e.detail?.value?.trim?.()?.startsWith("{")||e.detail?.value?.trim?.()?.startsWith("["))?JSON.parse(e.detail?.value)?.[0]?.key:e.detail?.value?.[0]?.key||e.detail?.value?.key,this.nextTick(()=>{const n=JSON.parse(JSON.stringify(this.itemsInner.find(s=>s?.key===i)?.value??null));
|
|
40
|
+
`,a(l))}else t+=l.textContent}))},"i")(this.DOM.input),t},"getMixedTagsAsString")},Q.prototype.removeTag=Q.prototype.removeTags;var jt=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,B=r((t,e,i,n)=>{for(var s=n>1?void 0:n?Ft(e,i):e,a=t.length-1,o;a>=0;a--)(o=t[a])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&jt(e,i,s),s},"__decorateClass"),q;let A=(q=class extends V.FieldComponent{emits=["click"];autofocus=!1;mode="select";items=null;tagify;reactiveValue=null;randomClass="";itemsInner=[];beforeMountParent(){this.randomClass="vst-select-"+Math.random().toString().split(".")[1],this.itemsInner=this.items??[],this._isFirstValueSet=!1,this._isIgnoreSetTags=!1}_isFirstValueSet=!1;_isIgnoreSetTags=!1;mountedParent(){this.tagify=new Q(this.$refs.selectInput,{enforceWhitelist:this.mode=="select"?void 0:this.mode!="tags",mode:this.mode=="select"?"select":void 0,escapeHTML:!1,whitelist:this.itemsInner,editTags:this.mode=="tags",dropdown:{maxTags:5,highlightFirst:!0,clearOnSelect:!0,closeOnSelect:this.mode=="select",enabled:0,maxItems:2e3},onChangeAfterBlur:!1,delimiters:null,placeholder:this.placeholder||"Выберите значение",callbacks:{change:r(e=>{let i="";e.detail?.value?.trim?.()?.length&&e.detail?.value!="null"&&(this.mode=="select"?(i=typeof e.detail?.value=="string"&&(e.detail?.value?.trim?.()?.startsWith("{")||e.detail?.value?.trim?.()?.startsWith("["))?JSON.parse(e.detail?.value)?.[0]?.key:e.detail?.value?.[0]?.key||e.detail?.value?.key,this.nextTick(()=>{const n=JSON.parse(JSON.stringify(this.itemsInner.find(s=>s?.key===i)?.value??null));n&&(this.tagify.addTags(this.reactiveValue=n),this.value=i)},4)):this.mode=="multi"?(this.tagify.removeAllTags(),i=JSON.parse(e.detail?.value),i=Array.isArray(i)?i.map(n=>n.key):[i],this.tagify.addTags(JSON.parse(e.detail?.value)),this.nextTick(()=>{this.value=i,this.reactiveValue=e.detail?.value},4)):this.mode=="tags"&&(this.tagify.removeAllTags(),i=JSON.parse(e.detail?.value),this.tagify.addTags(i),this.nextTick(()=>{this.reactiveValue=e.detail?.value,this.nextTick(()=>{this._isFirstValueSet=!0,this._isIgnoreSetTags=!0,this.$emit("update:modelValue",this.value=i)})},4)))},"change"),remove:r(e=>{this.mode=="select"&&!(e.detail?.tagify?.value??[]).length&&this.value!==null?(this.tagify.removeAllTags(),this.reactiveValue=null,this.value=null):this.mode=="tags"?!JSON.parse(this.reactiveValue)?.filter(n=>n.key!=e.detail?.data?.key)?.length&&this.reactiveValue!="[]"&&(this.tagify.removeAllTags(),this.value=[],this.reactiveValue="[]"):typeof this.reactiveValue=="string"&&(this.reactiveValue?.startsWith("{")||this.reactiveValue?.startsWith("["))&&this.nextTick(()=>{!JSON.parse(this.reactiveValue)?.filter(n=>n.key!=e.detail?.data?.key)?.length&&this.reactiveValue!="[]"&&(this.reactiveValue="[]",this.tagify.removeAllTags(),this.value=[])},4)},"remove")},templates:{}}),this.setTags()}setTags(){if(this.tagify?.removeAllTags?.(),this.mode=="select"){const e=this.itemsInner.find(i=>(i?.key||i?.value)===(this.modelValue||this.inputValue))?.value??null;e&&this.nextTick(()=>{this._isFirstValueSet=!0,this.tagify?.addTags(this.value=e??"")},2)}else if(this.mode=="multi"){const e=this.modelValue||this.inputValue;Array.isArray(e)&&(this._isFirstValueSet=!0,this.value=JSON.parse(JSON.stringify(this.itemsInner))?.filter(i=>e.includes(i?.key)),this.nextTick(()=>{this.tagify?.addTags(this.value??"")},2))}else if(this.mode=="tags"){const e=this.modelValue||this.inputValue;Array.isArray(e)&&(this._isFirstValueSet=!0,this.value=JSON.parse(JSON.stringify(this.itemsInner))?.filter(i=>e?.some(n=>(n?.key||n?.value)==(i?.key||i?.value))),this.nextTick(()=>{this.tagify?.addTags(this.value??"")},2))}}_itemsWatch(e){this.itemsInner=JSON.parse(JSON.stringify(e)),this.tagify&&(this.tagify.whitelist=this.itemsInner)}_valueWatch(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())}},r(q,"Select"),q);B([V.Prop(Boolean)],A.prototype,"autofocus",2);B([V.Prop(String)],A.prototype,"mode",2);B([V.Prop(Array)],A.prototype,"items",2);B([V.Watch("items",!0)],A.prototype,"_itemsWatch",1);B([V.Watch("value",!0)],A.prototype,"_valueWatch",1);B([V.Watch("modelValue",!0)],A.prototype,"_modelValueWatch",1);A=B([V.VST],A);const Rt=["value","autofocus"];function Ht(t,e,i,n,s,a){return K.openBlock(),K.createElementBlock("div",{class:K.normalizeClass(["d-inline-block mx2px my1px",{"vst-select-multi":t.mode=="multi"||t.mode=="tags"}])},[K.createElementVNode("input",{ref:"selectInput",value:t.reactiveValue,autofocus:t.autofocus},null,8,Rt)],2)}r(Ht,"render");const Bt=xt._export_sfc(A,[["render",Ht]]);exports.default=Bt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var St = Object.defineProperty;
|
|
2
2
|
var r = (t, e) => St(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { F as xt, P as rt, W as ot, V as Dt } from "./index-
|
|
3
|
+
import { F as xt, P as rt, W as ot, V as Dt } from "./index-DTgMtTpl.js";
|
|
4
4
|
import { createElementBlock as It, openBlock as Nt, normalizeClass as Et, createElementVNode as Mt } from "vue";
|
|
5
5
|
import { _ as _t } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
6
6
|
var lt = "​";
|
|
@@ -1599,7 +1599,7 @@ let A = (W = class extends xt {
|
|
|
1599
1599
|
const n = JSON.parse(JSON.stringify(this.itemsInner.find(
|
|
1600
1600
|
(s) => s?.key === i
|
|
1601
1601
|
)?.value ?? null));
|
|
1602
|
-
|
|
1602
|
+
n && (this.tagify.addTags(this.reactiveValue = n), this.value = i);
|
|
1603
1603
|
}, 4)) : this.mode == "multi" ? (this.tagify.removeAllTags(), i = JSON.parse(e.detail?.value), i = Array.isArray(i) ? i.map((n) => n.key) : [i], this.tagify.addTags(JSON.parse(e.detail?.value)), this.nextTick(() => {
|
|
1604
1604
|
this.value = i, this.reactiveValue = e.detail?.value;
|
|
1605
1605
|
}, 4)) : this.mode == "tags" && (this.tagify.removeAllTags(), i = JSON.parse(e.detail?.value), this.tagify.addTags(i), this.nextTick(() => {
|
|
@@ -1615,6 +1615,7 @@ let A = (W = class extends xt {
|
|
|
1615
1615
|
}, "remove")
|
|
1616
1616
|
},
|
|
1617
1617
|
templates: {
|
|
1618
|
+
// todo доработать вставку html замену шаблона элементов, идеально если через слоты можно было бы шаблон указать
|
|
1618
1619
|
// tag: (t, i) => {
|
|
1619
1620
|
// let value: any = t.value?.value ?? t.value;
|
|
1620
1621
|
// if (this.mode == 'select' && (value = i?.DOM?.originalInput?.getAttribute?.('value')?.trim?.())?.length) {
|
|
@@ -1634,6 +1635,7 @@ let A = (W = class extends xt {
|
|
|
1634
1635
|
// },
|
|
1635
1636
|
//
|
|
1636
1637
|
// // dropdownItem: (t, i) => {
|
|
1638
|
+
// // todo найти в исходниках tagify оригинальный шаблон
|
|
1637
1639
|
// // return `<div class='tagify__dropdown'>${t.value}</div>`
|
|
1638
1640
|
// // }
|
|
1639
1641
|
}
|
|
@@ -1649,7 +1651,7 @@ let A = (W = class extends xt {
|
|
|
1649
1651
|
const e = this.modelValue || this.inputValue;
|
|
1650
1652
|
Array.isArray(e) && (this._isFirstValueSet = !0, this.value = JSON.parse(JSON.stringify(this.itemsInner))?.filter((i) => e.includes(i?.key)), this.nextTick(() => {
|
|
1651
1653
|
this.tagify?.addTags(this.value ?? "");
|
|
1652
|
-
}, 2)
|
|
1654
|
+
}, 2));
|
|
1653
1655
|
} else if (this.mode == "tags") {
|
|
1654
1656
|
const e = this.modelValue || this.inputValue;
|
|
1655
1657
|
Array.isArray(e) && (this._isFirstValueSet = !0, this.value = JSON.parse(JSON.stringify(this.itemsInner))?.filter((i) => e?.some((n) => (n?.key || n?.value) == (i?.key || i?.value))), this.nextTick(() => {
|
package/dist/builder.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import './kit/styles/grid.sass';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var G=Object.defineProperty;var u=(s,t)=>G(s,"name",{value:t,configurable:!0});const m=require("vue"),k=class k{mixins=[];components={};emits=[];emitsParent=[];inject=[];injectParent=[];provide={};provideParent={};instance=this;$attrs={};$data={};$root;$emit(t,...e){}$forceUpdate(t){}$watch(t,e,n){}$nextTick(t){}$={};beforeCreate(){}created(){}beforeMount(){}mounted(){}beforeUpdate(){}updated(){}beforeUnmount(){}unmounted(){}beforeCreateParent(){}createdParent(){}beforeMountParent(){}mountedParent(){}beforeUpdateParent(){}updatedParent(){}beforeUnmountParent(){}unmountedParent(){}nextTick(t,e=1){}hasExternalHandlerEvent(t){return!1}};u(k,"VueClass");let v=k;const D=["$attrs","$data","$el","$off","$on","$emit","$forceUpdate","$nextTick","$options","$parent","$props","$refs","$root","$slots","$watch"];typeof globalThis.$VST>"u"&&(globalThis.$VST={});typeof globalThis.$VST._vueClassInstances>"u"&&(globalThis.$VST._vueClassInstances={});typeof globalThis.$VST._vueClassProps>"u"&&(globalThis.$VST._vueClassProps={});typeof globalThis.$VST._vueClassWatchers>"u"&&(globalThis.$VST._vueClassWatchers={});typeof globalThis.$VST._vueComputed>"u"&&(globalThis.$VST._vueComputed={});function U(s){return typeof s=="function"?F(s):function(t){return F(t,s)}}u(U,"VueClassComponentDecorator");function F(s,t={}){let e=globalThis.$VST?._vueClassInstances[s.name]??new s;if(!(e instanceof v))throw`Класс ${s.name} должен наследоваться от класса VueClass или его потомков`;globalThis.$VST?._vueClassInstances[s.name]||(globalThis.$VST._vueClassInstances[s.name]=e);const n={},h=new O;for(let d of N(R(e),R(h,!0)))n[d]=e[d];const a={};let f=Object.assign({},globalThis.$VST._vueClassProps[s.name]??{}),b=Object.getPrototypeOf(e);do f=Object.assign(f,globalThis.$VST._vueClassProps[b.constructor.name]??{});while((b=Object.getPrototypeOf(b))instanceof v);for(let d of M(e))f[d]||(a[d]=e[d]);let _=Object.assign({},globalThis.$VST._vueClassWatchers[s.name]??{}),w=Object.getPrototypeOf(e);do _=Object.assign(_,globalThis.$VST._vueClassWatchers[w.constructor.name]??{});while((w=Object.getPrototypeOf(w))instanceof v);let I=Object.assign({},globalThis.$VST._vueComputed[s.name]??{});for(let d in I)delete e[d];let $=[];return m.defineComponent({props:f,watch:_,computed:I,name:e.name??e.instance?.constructor?.name,mixins:e.mixins,components:e.components,emits:e.emits.concat(e.emitsParent),inject:e.inject.concat(e.injectParent),provide:{...e.provideParent,...e.provide},beforeCreate:u(function(){e=new s,e.$options=this.$options,e.$parent=this.$parent,e.$root=this.$root,e.$slots=this.$slots,e.instance=e,this.name=e.name??e.instance?.constructor.name,this.nextTick=e.nextTick=(d,p=1)=>{const g=u(H=>{this.$nextTick(()=>{H>1?g(H-1):typeof d=="function"&&!(d instanceof Promise)&&d?.call?.(this)})},"recursiveNextTick");g(p)},e.beforeCreateParent.call(this),e.beforeCreate.call(this)},"beforeCreate"),created:u(function(){this.name=e.name??e.instance?.constructor.name;for(let d in n)this[d]=e?.[d].bind?.(this);e.createdParent.call(this),e.created.call(this)},"created"),beforeMount:u(function(){e.beforeMountParent.call(this),e.beforeMount.call(this);const d=u(()=>{const p=m.getCurrentInstance();p&&p.vnode.props&&($=Object.keys(p.vnode.props).filter(g=>g.startsWith("on")).map(g=>g.slice(2).toLowerCase()))},"updateEventHandlers");d(),m.nextTick(()=>{d()}),this.hasExternalHandlerEvent=p=>$.includes(p)},"beforeMount"),mounted:u(function(){e.mountedParent.call(this),e.mounted.call(this)},"mounted"),beforeUpdate:u(function(){e.beforeUpdateParent.call(this),e.beforeUpdate.call(this);const d=u(()=>{const p=m.getCurrentInstance();p&&p.vnode.props&&($=Object.keys(p.vnode.props).filter(g=>g.startsWith("on")).map(g=>g.slice(2).toLowerCase()))},"updateEventHandlers");d(),m.nextTick(()=>{d()}),this.hasExternalHandlerEvent=p=>$.includes(p)},"beforeUpdate"),updated:u(function(){e.updatedParent.call(this),e.updated.call(this)},"updated"),beforeUnmount:u(function(){e.beforeUnmountParent.call(this),e.beforeUnmount.call(this)},"beforeUnmount"),unmounted:u(function(){e.unmountedParent.call(this),e.unmounted.call(this)},"unmounted"),data:u(function(){return{...a,__vue_class_instance__:null}},"data")})}u(F,"createComponent");const W=U;function R(s,t=!1){let e=new Set,n=s;do{if(!t&&n.constructor.name=="VueClass")break;Object.getOwnPropertyNames(n).map(h=>e.add(h))}while(n=Object.getPrototypeOf(n));return[...e.keys()].filter(h=>typeof s[h]=="function"&&typeof Object[h]!="function")}u(R,"getMethods");function M(s,t=!1){let e=new Set,n=s;do{if(!t&&n.constructor.name=="VueClass")break;Object.getOwnPropertyNames(n).map(h=>e.add(h))}while(n=Object.getPrototypeOf(n));return[...e.keys()].filter(h=>D.indexOf(h)==-1&&h!="__vue_props__"&&s[h]!=="function"&&typeof Object[h]!="function")}u(M,"getObjProps");function N(s,t){return s.filter(e=>!t.includes(e))}u(N,"arrayDiff");const x=class x extends v{};u(x,"VueClassChild");let O=x;const r=u((s,...t)=>(e,n,h)=>{globalThis.$VST._vueClassInstances[e.constructor.name]||(globalThis.$VST._vueClassInstances[e.constructor.name]=new e.constructor,globalThis.$VST._vueClassInstances[e.constructor.name].name=globalThis.$VST._vueClassInstances[e.constructor.name]?.constructor?.name?.toString()??globalThis.$VST._vueClassInstances[e.constructor.name].name??"");let a=typeof s=="object"?s:{type:[s,...t]};globalThis.$VST._vueClassInstances[e.constructor.name][n]&&(a.default=globalThis.$VST._vueClassInstances[e.constructor.name][n]),globalThis.$VST._vueClassProps[e.constructor.name]||(globalThis.$VST._vueClassProps[e.constructor.name]={}),globalThis.$VST._vueClassProps[e.constructor.name][n]=a},"Prop"),T=u(function(s,t=!1,e=!1){return(n,h,a)=>{globalThis.$VST._vueClassInstances[n.constructor.name]||(globalThis.$VST._vueClassInstances[n.constructor.name]=new n.constructor,globalThis.$VST._vueClassInstances[n.constructor.name].name=globalThis.$VST._vueClassInstances[n.constructor.name]?.constructor?.name?.toString()??globalThis.$VST._vueClassInstances[n.constructor.name].name??""),n?.constructor?.prototype?.__vue_watch__||(n.constructor.prototype.__vue_watch__={}),n?.constructor?.prototype?.__vue_watch__[n.constructor.name]||(n.constructor.prototype.__vue_watch__[n.constructor.name]={}),n.constructor.prototype.__vue_watch__[n.constructor.name][s]=globalThis.$VST._vueClassInstances[n.constructor.name][h],globalThis.$VST._vueClassWatchers[n.constructor.name]||(globalThis.$VST._vueClassWatchers[n.constructor.name]={}),globalThis.$VST._vueClassWatchers[n.constructor.name][s]={handler:globalThis.$VST._vueClassInstances[n.constructor.name][h],deep:t,immediate:e}}},"Watch"),z=u(function(s){return(t,e,n)=>{globalThis.$VST._vueClassInstances[t.constructor.name]||(globalThis.$VST._vueClassInstances[t.constructor.name]=new t.constructor,globalThis.$VST._vueClassInstances[t.constructor.name].name="test",globalThis.$VST._vueClassInstances[t.constructor.name].name=globalThis.$VST._vueClassInstances[t.constructor.name]?.constructor?.name?.toString()??globalThis.$VST._vueClassInstances[t.constructor.name].name??""),t?.constructor?.prototype?.__vue_computed__||(t.constructor.prototype.__vue_computed__={}),t?.constructor?.prototype?.__vue_computed__[t.constructor.name]||(t.constructor.prototype.__vue_computed__[t.constructor.name]={}),t.constructor.prototype.__vue_computed__[t.constructor.name][s??e]=globalThis.$VST._vueClassInstances[t.constructor.name][e],globalThis.$VST._vueComputed[t.constructor.name]||(globalThis.$VST._vueComputed[t.constructor.name]={});let h=globalThis.$VST._vueClassInstances[t.constructor.name][e];globalThis.$VST._vueClassInstances[t.constructor.name][e]=void 0,delete globalThis.$VST._vueClassInstances[t.constructor.name][e],globalThis.$VST._vueComputed[t.constructor.name][s??e]={get:h}}},"Computed");var y;let E=(y=class extends v{emitsParent=["update:modelValue"];constructor(){super()}mountedParent(){}},u(y,"BaseComponent"),y);globalThis.$VST={_vueClassInstances:{},_vueClassProps:{},_vueClassWatchers:{},_vueComputed:{}};const q=W;function i(s,t,e,n){var h=arguments.length,a=h<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,t,e,n);else for(var b=s.length-1;b>=0;b--)(f=s[b])&&(a=(h<3?f(a):h>3?f(t,e,a):f(t,e))||a);return h>3&&a&&Object.defineProperty(t,e,a),a}u(i,"__decorate");function o(s,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(s,t)}u(o,"__metadata");var B;let l=(B=class extends E{emits=["click","touchstart","touchend","mousedown","mouseup","clickTap","clickTouch","clickOrTouchstart","clickOrTouchend","mousedownOrTouchstart","mouseupOrTouchend","keydownEnter"];icon="";iconRight="";badge="";badgeBg=null;badgeColor=null;style={};bg=null;color=null;borderColor=null;bgActive=null;colorActive=null;colorHover=null;borderColorActive=null;boxShadowColor=null;fontSize="1rem";fontFamily=null;bgGradientTop=null;bgGradientBottom=null;disabled=!1;shine=!1;type="button";title=null;disabledTitle=null;dataTheme="black";dataDisabledTheme="gray";dataPlacement="top";dataOffset="top";width="calc(100% - 8px)";borderRadius="3px";link=null;linkRevert=null;theme="default";backgroundCss="";boxShadowCss="";isOnHover=!1;isButtonActive=!1;randomClass="";dataThemeInner="";showButton=!0;currentBg=null;currentColor=null;currentColorHover=null;currentBorderColor=null;currentBgActive=null;currentBorderColorActive=null;currentBoxShadowColor=null;currentColorActive=null;innerTitle=null;hasTouchpad=!1;mountedParent(){this.randomClass="button-c"+Math.random().toString().split(".")[1],this.updateTheme(),this.$refs?.button}updateTheme(){const t="#ccc",e="#000",n="#cacaca",h="#ccc",a="#b6b6b6",f="#5b5a5a";this.currentBgActive,this.currentBorderColor=this.currentColor=this.currentBg=this.currentColorActive=null,this.theme=="primary"&&(this.currentBg="#005bbf",this.currentColor="#fff",this.currentBorderColor="#0367d5",this.currentBgActive="#005fc8",this.currentBorderColorActive="#0871e3",this.currentBoxShadowColor="#065e8d",this.currentColorActive="#fff",this.currentColorHover="#fff"),this.theme=="success"?(this.currentBg="#0aa86d",this.currentColor="#fff",this.currentBorderColor="#24a876",this.currentBgActive="#0b9762",this.currentBorderColorActive="#0b9762",this.currentBoxShadowColor="#31735b",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="danger"?(this.currentBg="#FF3B30",this.currentColor="#fff",this.currentBorderColor="#FF3B30",this.currentBgActive="#FF3B30",this.currentBorderColorActive="#FF3B30",this.currentBoxShadowColor="#ff8179",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="pink"?(this.currentBg="#ff6161",this.currentColor="#fff",this.currentBorderColor="#ff4741c9",this.currentBgActive="#ff6a60",this.currentBorderColorActive="#ff4141",this.currentBoxShadowColor="#ff6a60",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="warning"?(this.currentBg="#FF9500",this.currentColor="#fff",this.currentBorderColor="#FF9500",this.currentBgActive="#ffb546",this.currentBorderColorActive="#ffb546",this.currentBoxShadowColor="#ffbe64",this.currentColorActive="#fdff98",this.currentColorHover="#fff8e8"):this.theme=="info"?(this.currentBg="#78d9ff",this.currentColor="#203464",this.currentColorHover="#34aff1",this.currentBorderColor="#3db0ee",this.currentBgActive="#78d9ff",this.currentBorderColorActive="#78d9ff",this.currentBoxShadowColor="#78d9ff",this.currentColorActive="#fff",this.currentColorHover="#304460"):this.theme=="yellow"?(this.currentBg="#ffd900",this.currentColor="#444",this.currentBorderColor="#ffd900",this.currentBgActive="#ffc400",this.currentBorderColorActive="#f3c922",this.currentBoxShadowColor="#cac838",this.currentColorActive="#fff"):this.theme=="white"?(this.currentBg="#ffffff",this.currentColor="#444",this.currentColorHover="#164205",this.currentBorderColor="#cacaca",this.currentBgActive="#efede7",this.currentBorderColorActive="##cacaca",this.currentBoxShadowColor="#b3b3ab",this.currentColorActive="#164205"):this.theme=="purple"?(this.currentBg="#942cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#a539f3",this.currentBgActive="#b755ff",this.currentBorderColorActive="#b755ff",this.currentBoxShadowColor="#7f18c5",this.currentColorActive="#ffffff"):this.theme=="indigo"?(this.currentBg="#5b2cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#6b39f3",this.currentBgActive="#8855ff",this.currentBorderColorActive="#6f55ff",this.currentBoxShadowColor="#5a18c5",this.currentColorActive="#ffffff"):this.theme=="black"?(this.currentBg="#32383e",this.currentColor="#fff",this.currentColorHover="#ebf8b3",this.currentBorderColor="#32383e",this.currentBgActive="#3b4249",this.currentBorderColorActive="#3b4249",this.currentBoxShadowColor="#32383e",this.currentColorActive="#ffffff"):this.theme=="grey"&&(this.currentBg="#5f6163",this.currentColor="#fff",this.currentColorHover="#cec6c4",this.currentBorderColor="#898d90",this.currentBgActive="#878c92",this.currentBorderColorActive="#686c71",this.currentBoxShadowColor="#626a71",this.currentColorActive="#ffffff"),this.currentBg=this.bg??this.currentBg??t,this.currentColor=this.color??this.currentColor??e,this.currentBorderColor=this.borderColor??this.currentBorderColor??n,this.currentBgActive=this.bgActive??this.currentBgActive??h,this.currentBorderColorActive=this.borderColorActive??this.currentBorderColorActive??a,this.currentBoxShadowColor=this.boxShadowColor??this.currentBoxShadowColor??f,this.currentColorActive=this.colorActive??this.currentColorActive??null,this.boxShadowCss=this.disabled?"box-shadow: none":`box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`,this.dataThemeInner=this.disabled?this.dataDisabledTheme:this.dataTheme,this.backgroundCss="background: "+(this.bgGradientTop&&this.bgGradientBottom?`linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})`:this.bg)}click(t){this.disabled||(this.$emit("click",t,this),this.hasTouchpad||(this.$emit("clickTouch",t,this),this.$emit("clickOrTouchstart",t,this),this.$emit("clickTap",t,this),this.link&&(this.link?.startsWith("http")||this.link?.startsWith("//"))||this.link&&this.linkRevert&&!this.linkRevert?.startsWith("http")&&!this.linkRevert?.startsWith("//")?this.$refs.link?.click():(this.link||this.linkRevert)&&window.pjax(this.link||this.linkRevert)))}touchstart(t){this.disabled||(this.$emit("touchstart",t,this),this.hasTouchpad&&(this.$emit("clickTouch",t,this),this.$emit("clickOrTouchstart",t,this)))}touchend(t){this.disabled||(this.$emit("touchend",t,this),this.hasTouchpad||this.$emit("clickOrTouchend",t,this))}mouseup(t){this.disabled||(this.$emit("mouseup",t,this),this.$emit("mouseupOrTouchend",t,this),this.$emit("clickOrTouchend",t,this))}mousedown(t){this.disabled||(this.$emit("mousedown",t,this),this.$emit("mousedownOrTouchstart",t,this))}keydownEnter(t){this.disabled||this.$emit("keydownEnter",t,this)}focus(){this.$refs?.button?.focus()}_onThemeChanged(){this.updateTheme()}_onTitleChanged(t){this.innerTitle=null,t&&this.nextTick(()=>this.innerTitle=t)}_onDisabledChanged(t){this.dataThemeInner=t?this.dataDisabledTheme:this.dataTheme,this.showButton=!1,this.nextTick(()=>this.showButton=!0)}},u(B,"ButtonInherited"),B);i([r(String),o("design:type",String)],l.prototype,"icon",void 0);i([r(String),o("design:type",String)],l.prototype,"iconRight",void 0);i([r(String),o("design:type",String)],l.prototype,"badge",void 0);i([r(String),o("design:type",Object)],l.prototype,"badgeBg",void 0);i([r(String),o("design:type",Object)],l.prototype,"badgeColor",void 0);i([r(Object),o("design:type",Object)],l.prototype,"style",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"bg",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"color",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"borderColor",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"bgActive",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"colorActive",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"colorHover",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"borderColorActive",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"boxShadowColor",void 0);i([r(String),o("design:type",Object)],l.prototype,"fontSize",void 0);i([r(String),o("design:type",Object)],l.prototype,"fontFamily",void 0);i([r(String),o("design:type",Object)],l.prototype,"bgGradientTop",void 0);i([r(String),o("design:type",Object)],l.prototype,"bgGradientBottom",void 0);i([r(Boolean),o("design:type",Boolean)],l.prototype,"disabled",void 0);i([r(Boolean),o("design:type",Boolean)],l.prototype,"shine",void 0);i([r(String),o("design:type",String)],l.prototype,"type",void 0);i([r(String),o("design:type",Object)],l.prototype,"title",void 0);i([r(String),o("design:type",Object)],l.prototype,"disabledTitle",void 0);i([r(String),o("design:type",String)],l.prototype,"dataTheme",void 0);i([r(String),o("design:type",String)],l.prototype,"dataDisabledTheme",void 0);i([r(String),o("design:type",String)],l.prototype,"dataPlacement",void 0);i([r(String),o("design:type",String)],l.prototype,"dataOffset",void 0);i([r(String),o("design:type",String)],l.prototype,"width",void 0);i([r(String),o("design:type",String)],l.prototype,"borderRadius",void 0);i([r(String),o("design:type",Object)],l.prototype,"link",void 0);i([r(String),o("design:type",Object)],l.prototype,"linkRevert",void 0);i([r(String,null),o("design:type",Object)],l.prototype,"theme",void 0);i([T("theme"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],l.prototype,"_onThemeChanged",null);i([T("title",!1,!0),o("design:type",Function),o("design:paramtypes",[String]),o("design:returntype",void 0)],l.prototype,"_onTitleChanged",null);i([T("disabled"),o("design:type",Function),o("design:paramtypes",[Boolean]),o("design:returntype",void 0)],l.prototype,"_onDisabledChanged",null);const L=m.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./Button-Dq7n5Ei4.cjs"))),j=class j extends v{emitsParent=["update:modelValue"];constructor(){super()}mountedParent(){}};u(j,"BaseComponent");let A=j;const V=class V extends A{emits=["click","touchstart","touchend","mousedown","mouseup","clickTap","clickTouch","clickOrTouchstart","clickOrTouchend","mousedownOrTouchstart","mouseupOrTouchend","keydownEnter"];icon="";iconRight="";badge="";badgeBg=null;badgeColor=null;style={};bg=null;color=null;borderColor=null;bgActive=null;colorActive=null;colorHover=null;borderColorActive=null;boxShadowColor=null;fontSize="1rem";fontFamily=null;bgGradientTop=null;bgGradientBottom=null;disabled=!1;shine=!1;type="button";title=null;disabledTitle=null;dataTheme="black";dataDisabledTheme="gray";dataPlacement="top";dataOffset="top";width="calc(100% - 8px)";borderRadius="3px";link=null;linkRevert=null;theme="default";backgroundCss="";boxShadowCss="";isOnHover=!1;isButtonActive=!1;randomClass="";dataThemeInner="";showButton=!0;currentBg=null;currentColor=null;currentColorHover=null;currentBorderColor=null;currentBgActive=null;currentBorderColorActive=null;currentBoxShadowColor=null;currentColorActive=null;innerTitle=null;hasTouchpad=!1;mountedParent(){this.randomClass="button-c"+Math.random().toString().split(".")[1],this.updateTheme(),this.$refs?.button}updateTheme(){const t="#ccc",e="#000",n="#cacaca",h="#ccc",a="#b6b6b6",f="#5b5a5a";this.currentBgActive,this.currentBorderColor=this.currentColor=this.currentBg=this.currentColorActive=null,this.theme=="primary"&&(this.currentBg="#005bbf",this.currentColor="#fff",this.currentBorderColor="#0367d5",this.currentBgActive="#005fc8",this.currentBorderColorActive="#0871e3",this.currentBoxShadowColor="#065e8d",this.currentColorActive="#fff",this.currentColorHover="#fff"),this.theme=="success"?(this.currentBg="#0aa86d",this.currentColor="#fff",this.currentBorderColor="#24a876",this.currentBgActive="#0b9762",this.currentBorderColorActive="#0b9762",this.currentBoxShadowColor="#31735b",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="danger"?(this.currentBg="#FF3B30",this.currentColor="#fff",this.currentBorderColor="#FF3B30",this.currentBgActive="#FF3B30",this.currentBorderColorActive="#FF3B30",this.currentBoxShadowColor="#ff8179",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="pink"?(this.currentBg="#ff6161",this.currentColor="#fff",this.currentBorderColor="#ff4741c9",this.currentBgActive="#ff6a60",this.currentBorderColorActive="#ff4141",this.currentBoxShadowColor="#ff6a60",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="warning"?(this.currentBg="#FF9500",this.currentColor="#fff",this.currentBorderColor="#FF9500",this.currentBgActive="#ffb546",this.currentBorderColorActive="#ffb546",this.currentBoxShadowColor="#ffbe64",this.currentColorActive="#fdff98",this.currentColorHover="#fff8e8"):this.theme=="info"?(this.currentBg="#78d9ff",this.currentColor="#203464",this.currentColorHover="#34aff1",this.currentBorderColor="#3db0ee",this.currentBgActive="#78d9ff",this.currentBorderColorActive="#78d9ff",this.currentBoxShadowColor="#78d9ff",this.currentColorActive="#fff",this.currentColorHover="#304460"):this.theme=="yellow"?(this.currentBg="#ffd900",this.currentColor="#444",this.currentBorderColor="#ffd900",this.currentBgActive="#ffc400",this.currentBorderColorActive="#f3c922",this.currentBoxShadowColor="#cac838",this.currentColorActive="#fff"):this.theme=="white"?(this.currentBg="#ffffff",this.currentColor="#444",this.currentColorHover="#164205",this.currentBorderColor="#cacaca",this.currentBgActive="#efede7",this.currentBorderColorActive="##cacaca",this.currentBoxShadowColor="#b3b3ab",this.currentColorActive="#164205"):this.theme=="purple"?(this.currentBg="#942cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#a539f3",this.currentBgActive="#b755ff",this.currentBorderColorActive="#b755ff",this.currentBoxShadowColor="#7f18c5",this.currentColorActive="#ffffff"):this.theme=="indigo"?(this.currentBg="#5b2cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#6b39f3",this.currentBgActive="#8855ff",this.currentBorderColorActive="#6f55ff",this.currentBoxShadowColor="#5a18c5",this.currentColorActive="#ffffff"):this.theme=="black"?(this.currentBg="#32383e",this.currentColor="#fff",this.currentColorHover="#ebf8b3",this.currentBorderColor="#32383e",this.currentBgActive="#3b4249",this.currentBorderColorActive="#3b4249",this.currentBoxShadowColor="#32383e",this.currentColorActive="#ffffff"):this.theme=="grey"&&(this.currentBg="#5f6163",this.currentColor="#fff",this.currentColorHover="#cec6c4",this.currentBorderColor="#898d90",this.currentBgActive="#878c92",this.currentBorderColorActive="#686c71",this.currentBoxShadowColor="#626a71",this.currentColorActive="#ffffff"),this.currentBg=this.bg??this.currentBg??t,this.currentColor=this.color??this.currentColor??e,this.currentBorderColor=this.borderColor??this.currentBorderColor??n,this.currentBgActive=this.bgActive??this.currentBgActive??h,this.currentBorderColorActive=this.borderColorActive??this.currentBorderColorActive??a,this.currentBoxShadowColor=this.boxShadowColor??this.currentBoxShadowColor??f,this.currentColorActive=this.colorActive??this.currentColorActive??null,this.boxShadowCss=this.disabled?"box-shadow: none":`box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`,this.dataThemeInner=this.disabled?this.dataDisabledTheme:this.dataTheme,this.backgroundCss="background: "+(this.bgGradientTop&&this.bgGradientBottom?`linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})`:this.bg)}click(t){this.disabled||(this.$emit("click",t,this),this.hasTouchpad||(this.$emit("clickTouch",t,this),this.$emit("clickOrTouchstart",t,this),this.$emit("clickTap",t,this),this.link&&(this.link?.startsWith("http")||this.link?.startsWith("//"))||this.link&&this.linkRevert&&!this.linkRevert?.startsWith("http")&&!this.linkRevert?.startsWith("//")?this.$refs.link?.click():(this.link||this.linkRevert)&&window.pjax(this.link||this.linkRevert)))}touchstart(t){this.disabled||(this.$emit("touchstart",t,this),this.hasTouchpad&&(this.$emit("clickTouch",t,this),this.$emit("clickOrTouchstart",t,this)))}touchend(t){this.disabled||(this.$emit("touchend",t,this),this.hasTouchpad||this.$emit("clickOrTouchend",t,this))}mouseup(t){this.disabled||(this.$emit("mouseup",t,this),this.$emit("mouseupOrTouchend",t,this),this.$emit("clickOrTouchend",t,this))}mousedown(t){this.disabled||(this.$emit("mousedown",t,this),this.$emit("mousedownOrTouchstart",t,this))}keydownEnter(t){this.disabled||this.$emit("keydownEnter",t,this)}focus(){this.$refs?.button?.focus()}_onThemeChanged(){this.updateTheme()}_onTitleChanged(t){this.innerTitle=null,t&&this.nextTick(()=>this.innerTitle=t)}_onDisabledChanged(t){this.dataThemeInner=t?this.dataDisabledTheme:this.dataTheme,this.showButton=!1,this.nextTick(()=>this.showButton=!0)}};u(V,"ButtonInherited");let c=V;i([r(String),o("design:type",String)],c.prototype,"icon",void 0);i([r(String),o("design:type",String)],c.prototype,"iconRight",void 0);i([r(String),o("design:type",String)],c.prototype,"badge",void 0);i([r(String),o("design:type",Object)],c.prototype,"badgeBg",void 0);i([r(String),o("design:type",Object)],c.prototype,"badgeColor",void 0);i([r(Object),o("design:type",Object)],c.prototype,"style",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"bg",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"color",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"borderColor",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"bgActive",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"colorActive",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"colorHover",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"borderColorActive",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"boxShadowColor",void 0);i([r(String),o("design:type",Object)],c.prototype,"fontSize",void 0);i([r(String),o("design:type",Object)],c.prototype,"fontFamily",void 0);i([r(String),o("design:type",Object)],c.prototype,"bgGradientTop",void 0);i([r(String),o("design:type",Object)],c.prototype,"bgGradientBottom",void 0);i([r(Boolean),o("design:type",Boolean)],c.prototype,"disabled",void 0);i([r(Boolean),o("design:type",Boolean)],c.prototype,"shine",void 0);i([r(String),o("design:type",String)],c.prototype,"type",void 0);i([r(String),o("design:type",Object)],c.prototype,"title",void 0);i([r(String),o("design:type",Object)],c.prototype,"disabledTitle",void 0);i([r(String),o("design:type",String)],c.prototype,"dataTheme",void 0);i([r(String),o("design:type",String)],c.prototype,"dataDisabledTheme",void 0);i([r(String),o("design:type",String)],c.prototype,"dataPlacement",void 0);i([r(String),o("design:type",String)],c.prototype,"dataOffset",void 0);i([r(String),o("design:type",String)],c.prototype,"width",void 0);i([r(String),o("design:type",String)],c.prototype,"borderRadius",void 0);i([r(String),o("design:type",Object)],c.prototype,"link",void 0);i([r(String),o("design:type",Object)],c.prototype,"linkRevert",void 0);i([r(String,null),o("design:type",Object)],c.prototype,"theme",void 0);i([T("theme"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],c.prototype,"_onThemeChanged",null);i([T("title",!1,!0),o("design:type",Function),o("design:paramtypes",[String]),o("design:returntype",void 0)],c.prototype,"_onTitleChanged",null);i([T("disabled"),o("design:type",Function),o("design:paramtypes",[Boolean]),o("design:returntype",void 0)],c.prototype,"_onDisabledChanged",null);const J=m.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./Select-7GcOxQDE.cjs")));var Q=Object.defineProperty,S=u((s,t,e,n)=>{for(var h=void 0,a=s.length-1,f;a>=0;a--)(f=s[a])&&(h=f(t,e,h)||h);return h&&Q(t,e,h),h},"__decorateClass");const P=class P extends E{inputValue=null;modelValue=null;default=null;disabled=!1;placeholder="";emitsParent=["update:modelValue"];value=null;constructor(){super()}mountedParent(){}getValue(){return this.value}setValue(t){this.value=t}};u(P,"FieldComponent");let C=P;S([r(String,Number,Array,Object,Boolean)],C.prototype,"inputValue");S([r(String,Number,Array,Object,Boolean)],C.prototype,"modelValue");S([r(String,Number,Array,Object,Boolean)],C.prototype,"default");S([r(Boolean)],C.prototype,"disabled");S([r(String)],C.prototype,"placeholder");exports.BaseComponent=A;exports.ButtonInherited=l;exports.ButtonInherited$1=c;exports.Computed=z;exports.FieldComponent=C;exports.Prop=r;exports.VST=q;exports.VueClass=v;exports.VueClassComponent=W;exports.Watch=T;exports.index=L;exports.index$1=J;
|