import{aw as gt,y as bt,B as mt,ax as yt,ay as vt,az as X,aA as ve,aB as xe,aC as St,aD as Ot,aE as wt,aF as $t,aG as Lt,aH as _t,ar as Vt,ao as Tt,o as b,j as v,F as d,f,at as Le,w as P,N as K,ak as x,I as p,H as $,k as _,g as C,t as L,J as _e,K as Ve,D as Je,d as Ue,e as U,av as jt,_ as At,E as ae,G as Pt}from"./Close.BmzKdJYw.js";let le;const Ct=function(e,t){le&&clearTimeout(le),le=setTimeout(e,t)},Nr=(e,t)=>{const s=document.createElement("style");s.innerHTML=`@keyframes ${t} {
			from { opacity: 0.99; }
			to { opacity: 1; }
		}
		${e} {
			animation-duration: 0.001s;
			animation-name: ${t};
		}`,document.head.appendChild(s)};/*!
 * pinia v2.2.0
 * (c) 2024 Eduardo San Martin Morote
 * @license MIT
 */let We;const Se=e=>We=e,Et=Symbol();function de(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var W;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(W||(W={}));const qe=()=>{};function Te(e,t,s,i=qe){e.push(t);const n=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),i())};return!s&&Ot()&&wt(n),n}function N(e,...t){e.slice().forEach(s=>{s(...t)})}const Bt=e=>e(),je=Symbol(),oe=Symbol();function fe(e,t){e instanceof Map&&t instanceof Map?t.forEach((s,i)=>e.set(i,s)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const i=t[s],n=e[s];de(n)&&de(i)&&e.hasOwnProperty(s)&&!X(i)&&!ve(i)?e[s]=fe(n,i):e[s]=i}return e}const kt=Symbol();function Dt(e){return!de(e)||!e.hasOwnProperty(kt)}const{assign:A}=Object;function Mt(e){return!!(X(e)&&e.effect)}function Ft(e,t,s,i){const{state:n,actions:a,getters:r}=t,o=s.state.value[e];let g;function l(){o||(s.state.value[e]=n?n():{});const S=_t(s.state.value[e]);return A(S,a,Object.keys(r||{}).reduce((O,j)=>(O[j]=Vt(Tt(()=>{Se(s);const D=s._s.get(e);return r[j].call(D,D)})),O),{}))}return g=Xe(e,l,t,s,i,!0),g}function Xe(e,t,s={},i,n,a){let r;const o=A({actions:{}},s),g={deep:!0};let l,S,O=[],j=[],D;const M=i.state.value[e];!a&&!M&&(i.state.value[e]={}),bt({});let Oe;function we(c){let u;l=S=!1,typeof c=="function"?(c(i.state.value[e]),u={type:W.patchFunction,storeId:e,events:D}):(fe(i.state.value[e],c),u={type:W.patchObject,payload:c,storeId:e,events:D});const m=Oe=Symbol();$t().then(()=>{Oe===m&&(l=!0)}),S=!0,N(O,u,i.state.value[e])}const ct=a?function(){const{state:u}=s,m=u?u():{};this.$patch(F=>{A(F,m)})}:qe;function ht(){r.stop(),O=[],j=[],i._s.delete(e)}const $e=(c,u="")=>{if(je in c)return c[oe]=u,c;const m=function(){Se(i);const F=Array.from(arguments),G=[],ne=[];function dt(y){G.push(y)}function ft(y){ne.push(y)}N(j,{args:F,name:m[oe],store:w,after:dt,onError:ft});let z;try{z=c.apply(this&&this.$id===e?this:w,F)}catch(y){throw N(ne,y),y}return z instanceof Promise?z.then(y=>(N(G,y),y)).catch(y=>(N(ne,y),Promise.reject(y))):(N(G,z),z)};return m[je]=!0,m[oe]=u,m},pt={_p:i,$id:e,$onAction:Te.bind(null,j),$patch:we,$reset:ct,$subscribe(c,u={}){const m=Te(O,c,u.detached,()=>F()),F=r.run(()=>mt(()=>i.state.value[e],G=>{(u.flush==="sync"?S:l)&&c({storeId:e,type:W.direct,events:D},G)},A({},g,u)));return m},$dispose:ht},w=yt(pt);i._s.set(e,w);const R=(i._a&&i._a.runWithContext||Bt)(()=>i._e.run(()=>(r=vt()).run(()=>t({action:$e}))));for(const c in R){const u=R[c];if(X(u)&&!Mt(u)||ve(u))a||(M&&Dt(u)&&(X(u)?u.value=M[c]:fe(u,M[c])),i.state.value[e][c]=u);else if(typeof u=="function"){const m=$e(u,c);R[c]=m,o.actions[c]=u}}return A(w,R),A(xe(w),R),Object.defineProperty(w,"$state",{get:()=>i.state.value[e],set:c=>{we(u=>{A(u,c)})}}),i._p.forEach(c=>{A(w,r.run(()=>c({store:w,app:i._a,pinia:i,options:o})))}),M&&a&&s.hydrate&&s.hydrate(w.$state,M),l=!0,S=!0,w}function Hr(e,t,s){let i,n;const a=typeof t=="function";typeof e=="string"?(i=e,n=a?s:t):(n=e,i=e.id);function r(o,g){const l=St();return o=o||(l?gt(Et,null):null),o&&Se(o),o=We,o._s.has(i)||(a?Xe(i,t,n,o):Ft(i,n,o)),o._s.get(i)}return r.$id=i,r}function Ir(e){{e=xe(e);const t={};for(const s in e){const i=e[s];(X(i)||ve(i))&&(t[s]=Lt(e,s))}return t}}const Rr=()=>({getJsonValue:(n,a=null)=>{try{n=JSON.parse(n)}catch{n=a}return n},getJsonValues:n=>n.map(a=>JSON.parse(a)),setJsonValue:n=>JSON.stringify(n),setJsonValues:n=>n.map(a=>JSON.stringify(a))});var Ze=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,V=Ze||Nt||Function("return this")(),te=V.Symbol,Ye=Object.prototype,Ht=Ye.hasOwnProperty,It=Ye.toString,J=te?te.toStringTag:void 0;function Rt(e){var t=Ht.call(e,J),s=e[J];try{e[J]=void 0;var i=!0}catch{}var n=It.call(e);return i&&(t?e[J]=s:delete e[J]),n}var Gt=Object.prototype,zt=Gt.toString;function Kt(e){return zt.call(e)}var xt="[object Null]",Jt="[object Undefined]",Ae=te?te.toStringTag:void 0;function Q(e){return e==null?e===void 0?Jt:xt:Ae&&Ae in Object(e)?Rt(e):Kt(e)}function se(e){return e!=null&&typeof e=="object"}var Qe=Array.isArray;function et(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function tt(e){return e}var Ut="[object AsyncFunction]",Wt="[object Function]",qt="[object GeneratorFunction]",Xt="[object Proxy]";function st(e){if(!et(e))return!1;var t=Q(e);return t==Wt||t==qt||t==Ut||t==Xt}var ue=V["__core-js_shared__"],Pe=function(){var e=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Zt(e){return!!Pe&&Pe in e}var Yt=Function.prototype,Qt=Yt.toString;function B(e){if(e!=null){try{return Qt.call(e)}catch{}try{return e+""}catch{}}return""}var es=/[\\^$.*+?()[\]{}|]/g,ts=/^\[object .+?Constructor\]$/,ss=Function.prototype,is=Object.prototype,rs=ss.toString,ns=is.hasOwnProperty,as=RegExp("^"+rs.call(ns).replace(es,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ls(e){if(!et(e)||Zt(e))return!1;var t=st(e)?as:ts;return t.test(B(e))}function os(e,t){return e==null?void 0:e[t]}function k(e,t){var s=os(e,t);return ls(s)?s:void 0}var ge=k(V,"WeakMap");function us(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}var cs=800,hs=16,ps=Date.now;function ds(e){var t=0,s=0;return function(){var i=ps(),n=hs-(i-s);if(s=i,n>0){if(++t>=cs)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function fs(e){return function(){return e}}var Ce=function(){try{var e=k(Object,"defineProperty");return e({},"",{}),e}catch{}}(),gs=Ce?function(e,t){return Ce(e,"toString",{configurable:!0,enumerable:!1,value:fs(t),writable:!0})}:tt,bs=ds(gs),ms=9007199254740991,ys=/^(?:0|[1-9]\d*)$/;function vs(e,t){var s=typeof e;return t=t??ms,!!t&&(s=="number"||s!="symbol"&&ys.test(e))&&e>-1&&e%1==0&&e<t}function Ss(e,t){return e===t||e!==e&&t!==t}var Ee=Math.max;function Os(e,t,s){return t=Ee(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Ee(i.length-t,0),r=Array(a);++n<a;)r[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=s(r),us(e,this,o)}}function Gr(e,t){return bs(Os(e,t,tt),e+"")}var ws=9007199254740991;function it(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ws}function rt(e){return e!=null&&it(e.length)&&!st(e)}var $s=Object.prototype;function Ls(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||$s;return e===s}function _s(e,t){for(var s=-1,i=Array(e);++s<e;)i[s]=t(s);return i}var Vs="[object Arguments]";function Be(e){return se(e)&&Q(e)==Vs}var nt=Object.prototype,Ts=nt.hasOwnProperty,js=nt.propertyIsEnumerable,As=Be(function(){return arguments}())?Be:function(e){return se(e)&&Ts.call(e,"callee")&&!js.call(e,"callee")};function Ps(){return!1}var at=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ke=at&&typeof module=="object"&&module&&!module.nodeType&&module,Cs=ke&&ke.exports===at,De=Cs?V.Buffer:void 0,Es=De?De.isBuffer:void 0,Bs=Es||Ps,ks="[object Arguments]",Ds="[object Array]",Ms="[object Boolean]",Fs="[object Date]",Ns="[object Error]",Hs="[object Function]",Is="[object Map]",Rs="[object Number]",Gs="[object Object]",zs="[object RegExp]",Ks="[object Set]",xs="[object String]",Js="[object WeakMap]",Us="[object ArrayBuffer]",Ws="[object DataView]",qs="[object Float32Array]",Xs="[object Float64Array]",Zs="[object Int8Array]",Ys="[object Int16Array]",Qs="[object Int32Array]",ei="[object Uint8Array]",ti="[object Uint8ClampedArray]",si="[object Uint16Array]",ii="[object Uint32Array]",h={};h[qs]=h[Xs]=h[Zs]=h[Ys]=h[Qs]=h[ei]=h[ti]=h[si]=h[ii]=!0;h[ks]=h[Ds]=h[Us]=h[Ms]=h[Ws]=h[Fs]=h[Ns]=h[Hs]=h[Is]=h[Rs]=h[Gs]=h[zs]=h[Ks]=h[xs]=h[Js]=!1;function ri(e){return se(e)&&it(e.length)&&!!h[Q(e)]}function ni(e){return function(t){return e(t)}}var lt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,q=lt&&typeof module=="object"&&module&&!module.nodeType&&module,ai=q&&q.exports===lt,ce=ai&&Ze.process,Me=function(){try{var e=q&&q.require&&q.require("util").types;return e||ce&&ce.binding&&ce.binding("util")}catch{}}(),Fe=Me&&Me.isTypedArray,li=Fe?ni(Fe):ri,oi=Object.prototype,ui=oi.hasOwnProperty;function ci(e,t){var s=Qe(e),i=!s&&As(e),n=!s&&!i&&Bs(e),a=!s&&!i&&!n&&li(e),r=s||i||n||a,o=r?_s(e.length,String):[],g=o.length;for(var l in e)(t||ui.call(e,l))&&!(r&&(l=="length"||n&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||vs(l,g)))&&o.push(l);return o}function hi(e,t){return function(s){return e(t(s))}}var pi=hi(Object.keys,Object),di=Object.prototype,fi=di.hasOwnProperty;function gi(e){if(!Ls(e))return pi(e);var t=[];for(var s in Object(e))fi.call(e,s)&&s!="constructor"&&t.push(s);return t}function bi(e){return rt(e)?ci(e):gi(e)}var Z=k(Object,"create");function mi(){this.__data__=Z?Z(null):{},this.size=0}function yi(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vi="__lodash_hash_undefined__",Si=Object.prototype,Oi=Si.hasOwnProperty;function wi(e){var t=this.__data__;if(Z){var s=t[e];return s===vi?void 0:s}return Oi.call(t,e)?t[e]:void 0}var $i=Object.prototype,Li=$i.hasOwnProperty;function _i(e){var t=this.__data__;return Z?t[e]!==void 0:Li.call(t,e)}var Vi="__lodash_hash_undefined__";function Ti(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Z&&t===void 0?Vi:t,this}function E(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}E.prototype.clear=mi;E.prototype.delete=yi;E.prototype.get=wi;E.prototype.has=_i;E.prototype.set=Ti;function ji(){this.__data__=[],this.size=0}function ie(e,t){for(var s=e.length;s--;)if(Ss(e[s][0],t))return s;return-1}var Ai=Array.prototype,Pi=Ai.splice;function Ci(e){var t=this.__data__,s=ie(t,e);if(s<0)return!1;var i=t.length-1;return s==i?t.pop():Pi.call(t,s,1),--this.size,!0}function Ei(e){var t=this.__data__,s=ie(t,e);return s<0?void 0:t[s][1]}function Bi(e){return ie(this.__data__,e)>-1}function ki(e,t){var s=this.__data__,i=ie(s,e);return i<0?(++this.size,s.push([e,t])):s[i][1]=t,this}function T(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}T.prototype.clear=ji;T.prototype.delete=Ci;T.prototype.get=Ei;T.prototype.has=Bi;T.prototype.set=ki;var Y=k(V,"Map");function Di(){this.size=0,this.__data__={hash:new E,map:new(Y||T),string:new E}}function Mi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function re(e,t){var s=e.__data__;return Mi(t)?s[typeof t=="string"?"string":"hash"]:s.map}function Fi(e){var t=re(this,e).delete(e);return this.size-=t?1:0,t}function Ni(e){return re(this,e).get(e)}function Hi(e){return re(this,e).has(e)}function Ii(e,t){var s=re(this,e),i=s.size;return s.set(e,t),this.size+=s.size==i?0:1,this}function I(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}I.prototype.clear=Di;I.prototype.delete=Fi;I.prototype.get=Ni;I.prototype.has=Hi;I.prototype.set=Ii;function Ri(e,t){for(var s=-1,i=t.length,n=e.length;++s<i;)e[n+s]=t[s];return e}function Gi(){this.__data__=new T,this.size=0}function zi(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function Ki(e){return this.__data__.get(e)}function xi(e){return this.__data__.has(e)}var Ji=200;function Ui(e,t){var s=this.__data__;if(s instanceof T){var i=s.__data__;if(!Y||i.length<Ji-1)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new I(i)}return s.set(e,t),this.size=s.size,this}function ee(e){var t=this.__data__=new T(e);this.size=t.size}ee.prototype.clear=Gi;ee.prototype.delete=zi;ee.prototype.get=Ki;ee.prototype.has=xi;ee.prototype.set=Ui;function Wi(e,t){for(var s=-1,i=e==null?0:e.length,n=0,a=[];++s<i;){var r=e[s];t(r,s,e)&&(a[n++]=r)}return a}function qi(){return[]}var Xi=Object.prototype,Zi=Xi.propertyIsEnumerable,Ne=Object.getOwnPropertySymbols,Yi=Ne?function(e){return e==null?[]:(e=Object(e),Wi(Ne(e),function(t){return Zi.call(e,t)}))}:qi;function Qi(e,t,s){var i=t(e);return Qe(e)?i:Ri(i,s(e))}function zr(e){return Qi(e,bi,Yi)}var be=k(V,"DataView"),me=k(V,"Promise"),ye=k(V,"Set"),He="[object Map]",er="[object Object]",Ie="[object Promise]",Re="[object Set]",Ge="[object WeakMap]",ze="[object DataView]",tr=B(be),sr=B(Y),ir=B(me),rr=B(ye),nr=B(ge),H=Q;(be&&H(new be(new ArrayBuffer(1)))!=ze||Y&&H(new Y)!=He||me&&H(me.resolve())!=Ie||ye&&H(new ye)!=Re||ge&&H(new ge)!=Ge)&&(H=function(e){var t=Q(e),s=t==er?e.constructor:void 0,i=s?B(s):"";if(i)switch(i){case tr:return ze;case sr:return He;case ir:return Ie;case rr:return Re;case nr:return Ge}return t});var Kr=V.Uint8Array;function xr(e){return se(e)&&rt(e)}function he(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function ar(e){return(...t)=>!e(...t)}function lr(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function ot(e,t,s,i){return t?e.filter(n=>lr(i(n,s),t)).sort((n,a)=>i(n,s).length-i(a,s).length):e}function or(e){return e.filter(t=>!t.$isLabel)}function pe(e,t){return s=>s.reduce((i,n)=>n[e]&&n[e].length?(i.push({$groupLabel:n[t],$isLabel:!0}),i.concat(n[e])):i,[])}function ur(e,t,s,i,n){return a=>a.map(r=>{if(!r[s])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const o=ot(r[s],e,t,n);return o.length?{[i]:r[i],[s]:o}:[]})}const Ke=(...e)=>t=>e.reduce((s,i)=>i(s),t);var cr={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return he(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let s=this.options.concat();return this.internalSearch?s=this.groupValues?this.filterAndFlat(s,t,this.label):ot(s,t,this.label,this.customLabel):s=this.groupValues?pe(this.groupValues,this.groupLabel)(s):s,s=this.hideSelected?s.filter(ar(this.isSelected)):s,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?s.push({isTag:!0,label:e}):s.unshift({isTag:!0,label:e})),s.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,s){return Ke(ur(t,s,this.groupValues,this.groupLabel,this.customLabel),pe(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return Ke(pe(this.groupValues,this.groupLabel),or)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(he(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return he(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(s=>s[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const s=this.trackBy?t[this.groupValues].map(n=>n[this.trackBy]):t[this.groupValues],i=this.internalValue.filter(n=>s.indexOf(this.trackBy?n[this.trackBy]:n)===-1);this.$emit("update:modelValue",i)}else{let s=t[this.groupValues].filter(i=>!(this.isOptionDisabled(i)||this.isSelected(i)));this.max&&s.splice(this.max-this.internalValue.length),this.$emit("select",s,this.id),this.$emit("update:modelValue",this.internalValue.concat(s))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const s=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const i=this.internalValue.slice(0,s).concat(this.internalValue.slice(s+1));this.$emit("update:modelValue",i)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},hr={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const s=this.options.find(i=>i[this.groupLabel]===t.$groupLabel);return s&&!this.wholeGroupDisabled(s)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(s)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},ut={name:"vue-multiselect",mixins:[cr,hr],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const pr={ref:"tags",class:"multiselect__tags"},dr={class:"multiselect__tags-wrap"},fr={class:"multiselect__spinner"},gr={key:0},br={class:"multiselect__option"},mr={class:"multiselect__option"},yr=C("No elements found. Consider changing the search query."),vr={class:"multiselect__option"},Sr=C("List is empty.");function Or(e,t,s,i,n,a){return b(),v("div",{tabindex:e.searchable?-1:s.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":s.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"],onFocus:t[14]||(t[14]=r=>e.activate()),onBlur:t[15]||(t[15]=r=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=$(p(r=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=$(p(r=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=$(p(r=>e.addPointerElement(r),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=$(r=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[d(e.$slots,"caret",{toggle:e.toggle},()=>[f("div",{onMousedown:t[1]||(t[1]=p(r=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),d(e.$slots,"clear",{search:e.search}),f("div",pr,[d(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:a.visibleValues,isOpen:e.isOpen},()=>[K(f("div",dr,[(b(!0),v(_e,null,Ve(a.visibleValues,(r,o)=>d(e.$slots,"tag",{option:r,search:e.search,remove:e.removeElement},()=>[(b(),v("span",{class:"multiselect__tag",key:o},[f("span",{textContent:L(e.getOptionLabel(r))},null,8,["textContent"]),f("i",{tabindex:"1",onKeypress:$(p(g=>e.removeElement(r),["prevent"]),["enter"]),onMousedown:p(g=>e.removeElement(r),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[x,a.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>s.limit?d(e.$slots,"limit",{key:0},()=>[f("strong",{class:"multiselect__strong",textContent:L(s.limitText(e.internalValue.length-s.limit))},null,8,["textContent"])]):_("v-if",!0)]),f(Le,{name:"multiselect__loading"},{default:P(()=>[d(e.$slots,"loading",{},()=>[K(f("div",fr,null,512),[[x,s.loading]])])]),_:3}),e.searchable?(b(),v("input",{key:0,ref:"search",name:s.name,id:e.id,type:"text",autocomplete:"off",spellcheck:!1,placeholder:e.placeholder,style:a.inputStyle,value:e.search,disabled:s.disabled,tabindex:s.tabindex,onInput:t[2]||(t[2]=r=>e.updateSearch(r.target.value)),onFocus:t[3]||(t[3]=p(r=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=p(r=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=$(r=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=$(p(r=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=$(p(r=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=$(p(r=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=$(p(r=>e.addPointerElement(r),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):_("v-if",!0),a.isSingleLabelVisible?(b(),v("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=p((...r)=>e.toggle&&e.toggle(...r),["prevent"]))},[d(e.$slots,"singleLabel",{option:a.singleValue},()=>[C(L(e.currentOptionLabel),1)])],32)):_("v-if",!0),a.isPlaceholderVisible?(b(),v("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=p((...r)=>e.toggle&&e.toggle(...r),["prevent"]))},[d(e.$slots,"placeholder",{},()=>[C(L(e.placeholder),1)])],32)):_("v-if",!0)],512),f(Le,{name:"multiselect"},{default:P(()=>[K(f("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...r)=>e.activate&&e.activate(...r)),tabindex:"-1",onMousedown:t[13]||(t[13]=p(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[f("ul",{class:"multiselect__content",style:a.contentStyle,role:"listbox",id:"listbox-"+e.id},[d(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(b(),v("li",gr,[f("span",br,[d(e.$slots,"maxElements",{},()=>[C("Maximum of "+L(e.max)+" options selected. First remove a selected option to select another.",1)])])])):_("v-if",!0),!e.max||e.internalValue.length<e.max?(b(!0),v(_e,{key:1},Ve(e.filteredOptions,(r,o)=>(b(),v("li",{class:"multiselect__element",key:o,id:e.id+"-"+o,role:r&&(r.$isLabel||r.$isDisabled)?null:"option"},[r&&(r.$isLabel||r.$isDisabled)?_("v-if",!0):(b(),v("span",{key:0,class:[e.optionHighlight(o,r),"multiselect__option"],onClick:p(g=>e.select(r),["stop"]),onMouseenter:p(g=>e.pointerSet(o),["self"]),"data-select":r&&r.isTag?e.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[d(e.$slots,"option",{option:r,search:e.search,index:o},()=>[f("span",null,L(e.getOptionLabel(r)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),r&&(r.$isLabel||r.$isDisabled)?(b(),v("span",{key:1,"data-select":e.groupSelect&&a.selectGroupLabelText,"data-deselect":e.groupSelect&&a.deselectGroupLabelText,class:[e.groupHighlight(o,r),"multiselect__option"],onMouseenter:p(g=>e.groupSelect&&e.pointerSet(o),["self"]),onMousedown:p(g=>e.selectGroup(r),["prevent"])},[d(e.$slots,"option",{option:r,search:e.search,index:o},()=>[f("span",null,L(e.getOptionLabel(r)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):_("v-if",!0)],8,["id","role"]))),128)):_("v-if",!0),K(f("li",null,[f("span",mr,[d(e.$slots,"noResult",{search:e.search},()=>[yr])])],512),[[x,s.showNoResults&&e.filteredOptions.length===0&&e.search&&!s.loading]]),K(f("li",null,[f("span",vr,[d(e.$slots,"noOptions",{},()=>[Sr])])],512),[[x,s.showNoOptions&&(e.options.length===0||a.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!s.loading]]),d(e.$slots,"afterList")],12,["id"])],36),[[x,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}ut.render=Or;const wr={},$r={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-caret"},Lr=U("path",{d:"M16.59 8.29492L12 12.8749L7.41 8.29492L6 9.70492L12 15.7049L18 9.70492L16.59 8.29492Z",fill:"currentColor"},null,-1),_r=[Lr];function Vr(e,t){return b(),Ue("svg",$r,_r)}const Tr=Je(wr,[["render",Vr]]),jr="aioseo-eeat",Ar={emits:["open","close","update:modelValue"],components:{Multiselect:ut,SvgCaret:Tr,SvgClose:jt},props:{options:{type:Array,required:!0},trackBy:{type:String,default(){return"value"}},multiple:Boolean,taggable:Boolean,filterable:Boolean,searchable:{type:Boolean,default(){return!0}},placeholder:{type:String,default(){return""}},customLabel:{type:Function,default:({label:e})=>e},name:String,modelValue:[String,Array,Number,Object],ajaxSearch:Function,noDataText:String,popperClass:String,loading:Boolean,disabled:Boolean,size:String,openDirection:{type:String,default(){return null}},groupValues:String,groupLabel:String,closeOnSelect:{type:Boolean,default(){return!0}},tagPlaceholder:String,allowEmpty:{type:Boolean,default(){return!1}}},data(){return{isLoading:!1,strings:{searchPlaceholder:At("Type to search...",jr)}}},watch:{options(){this.resetFirstLastOption()}},methods:{addTag(e){e.split(",").forEach(t=>{const s={label:t,value:t};this.options.some(i=>i.value===s.value)||this.options.push(s),this.modelValue.some(i=>i.value===s.value)||this.modelValue.push(s)}),this.$emit("update:modelValue",this.modelValue),this.$refs["aioseo-select"].$el.focus()},searchChange(e){e&&this.ajaxSearch&&(this.isLoading=!0,Ct(()=>{this.ajaxSearch(e).then(()=>this.isLoading=!1)},500))},resetFirstLastOption(){this.$nextTick(()=>{var t,s;if(!this.$refs["aioseo-select"])return;const e=((s=(t=this.$refs["aioseo-select"])==null?void 0:t.$el)==null?void 0:s.querySelectorAll("li.multiselect__element"))||[];e.forEach((i,n)=>{i.classList.remove("last"),i.classList.remove("first"),n===0&&i.classList.add("first"),n===e.length-1&&i.classList.add("last")})})}},mounted(){this.resetFirstLastOption()}},Pr={class:"multiselect__tag"},Cr={class:"multiselect__tag-value"},Er=["onClick"],Br=["innerHTML"],kr={class:"multiselect__select"};function Dr(e,t,s,i,n,a){const r=ae("svg-close"),o=ae("svg-caret"),g=ae("multiselect");return b(),v(g,{class:Pt(["aioseo-select",[{[s.size]:s.size},{multiple:s.multiple}]]),modelValue:s.modelValue,"onUpdate:modelValue":t[0]||(t[0]=l=>e.$emit("update:modelValue",l)),options:s.options,multiple:s.multiple,taggable:s.taggable,placeholder:s.placeholder||n.strings.searchPlaceholder,"tag-placeholder":s.tagPlaceholder,"show-labels":!1,"track-by":s.trackBy,"custom-label":s.customLabel,"allow-empty":s.allowEmpty||!!s.multiple,filterable:s.filterable,"internal-search":!0,loading:n.isLoading,searchable:s.searchable,"open-direction":s.openDirection,"group-values":s.groupValues,"group-label":s.groupLabel,disabled:s.disabled,"close-on-select":s.closeOnSelect,onSearchChange:a.searchChange,onTag:a.addTag,onOpen:t[1]||(t[1]=l=>e.$emit("open")),onClose:t[2]||(t[2]=l=>e.$emit("close")),ref:"aioseo-select"},{singleLabel:P(({option:l})=>[d(e.$slots,"singleLabel",{option:l},()=>[C(L(l.label),1)])]),tag:P(({option:l,search:S,remove:O})=>[d(e.$slots,"tag",{option:l,search:S,remove:O},()=>[U("div",Pr,[U("div",Cr,L(l.label),1),U("div",{class:"multiselect__tag-remove",onClick:p(j=>O(l),["stop"])},[f(r,{onClick:p(j=>O(l),["stop"])},null,8,["onClick"])],8,Er)])])]),option:P(({option:l,search:S})=>[d(e.$slots,"option",{option:l,search:S},()=>[C(L(l.$isLabel?l.$groupLabel:l.label)+" ",1),l.docLink?(b(),Ue("span",{key:0,class:"docLink",innerHTML:l.docLink},null,8,Br)):_("",!0)])]),caret:P(({toggle:l})=>[d(e.$slots,"caret",{toggle:l},()=>[U("div",kr,[f(o)])])]),noOptions:P(()=>[d(e.$slots,"noOptions")]),noResult:P(()=>[d(e.$slots,"noResult")]),_:3},8,["class","modelValue","options","multiple","taggable","placeholder","tag-placeholder","track-by","custom-label","allow-empty","filterable","loading","searchable","open-direction","group-values","group-label","disabled","close-on-select","onSearchChange","onTag"])}const Jr=Je(Ar,[["render",Dr]]);export{Ls as A,Jr as B,ci as C,hi as D,V as E,Yi as F,qi as G,Qi as H,Me as I,ni as J,st as K,Hr as L,I as M,Se as N,te as S,Kr as U,Qe as a,Q as b,As as c,Ri as d,Ss as e,H as f,zr as g,Bs as h,se as i,ee as j,li as k,et as l,bi as m,it as n,vs as o,tt as p,ye as q,Gr as r,xr as s,Ir as t,Rr as u,Nr as v,Tr as w,Ct as x,Ce as y,rt as z};
