@dcodegroup-au/dsg-vue
Version:
Front-end Vue/Tailwind DSG for UntitledUI.
12 lines • 499 kB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const F=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-CmNG2Wig.cjs"),c=require("vue"),Ja=require("./DsgColoursConfig-D7UiFGB5.cjs"),zi=require("./DsgLabel.vue_vue_type_style_index_0_lang-DAM6oT0f.cjs"),eo=c.defineComponent({__name:"DsgMiscIcon",props:{theme:{default:"brand"},type:{default:"light-outline"},size:{default:"lg"},icon:{},classes:{default:""}},setup(t){const e=["dsg-misc-icon",`dsg-misc-icon--${t.theme}`,`dsg-misc-icon--${t.type}`,`dsg-misc-icon--${t.size}`,t.classes].join(" ").replace(/\s+/g," ").trim();return(r,n)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(e))},[c.createVNode(F._sfc_main,c.normalizeProps(c.guardReactiveProps(t.icon)),null,16)],2))}}),Ft=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},It=Ft(eo,[["__scopeId","data-v-6f50208c"]]),to={key:0,class:"dsg-accordion--header"},ro={class:"dsg-accordion--row-content"},no={key:0,class:"dsg-accordion--expanded"},io=c.defineComponent({__name:"DsgAccordion",props:{rows:{},class:{},rowKey:{type:Function}},setup(t){const e=t,r=c.ref(null),n=a=>{r.value=r.value===a?null:a},i=e.rowKey??((a,o)=>o);return(a,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["dsg-accordion",t.class])},[a.$slots.header?(c.openBlock(),c.createElementBlock("div",to,[c.renderSlot(a.$slots,"header",{},void 0,!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.rows,(s,l)=>(c.openBlock(),c.createElementBlock("div",{key:c.unref(i)(s,l),class:"dsg-accordion--row"},[c.createElementVNode("div",ro,[c.renderSlot(a.$slots,"row",{row:s,index:l,isExpanded:r.value===l,toggle:()=>n(l)},void 0,!0)]),c.createVNode(c.Transition,{name:"accordion"},{default:c.withCtx(()=>[r.value===l?(c.openBlock(),c.createElementBlock("div",no,[c.renderSlot(a.$slots,"expanded",{row:s,index:l},void 0,!0)])):c.createCommentVNode("",!0)]),_:2},1024)]))),128))])],2))}}),ao=Ft(io,[["__scopeId","data-v-d17346aa"]]),oo=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Size=4xl" clip-path="url(#clip0_3302_422487)">
<path id="Vector" d="M24.711 5.66721C25.0149 6.40224 25.5983 6.98649 26.3328 7.29151L28.9086 8.35843C29.6437 8.66292 30.2277 9.24694 30.5322 9.98202C30.8367 10.7171 30.8367 11.543 30.5322 12.2781L29.466 14.8521C29.1614 15.5875 29.161 16.4142 29.467 17.1493L30.5313 19.7224C30.6822 20.0865 30.76 20.4768 30.76 20.8709C30.7601 21.265 30.6825 21.6553 30.5317 22.0194C30.3808 22.3836 30.1597 22.7144 29.881 22.993C29.6023 23.2717 29.2714 23.4927 28.9072 23.6434L26.3333 24.7096C25.5982 25.0135 25.014 25.5968 24.709 26.3314L23.642 28.9072C23.3376 29.6423 22.7535 30.2263 22.0185 30.5308C21.2834 30.8353 20.4574 30.8353 19.7224 30.5308L17.1484 29.4646C16.4133 29.1609 15.5877 29.1615 14.853 29.4663L12.2773 30.5317C11.5426 30.8355 10.7174 30.8353 9.98289 30.531C9.2484 30.2268 8.6647 29.6435 8.36001 28.9092L7.29277 26.3326C6.98885 25.5976 6.40548 25.0133 5.67091 24.7083L3.09514 23.6414C2.36037 23.337 1.77652 22.7534 1.47193 22.0187C1.16734 21.2841 1.16692 20.4585 1.47078 19.7236L2.53694 17.1496C2.84067 16.4145 2.84005 15.5889 2.53521 14.8542L1.47059 12.2766C1.31964 11.9125 1.24192 11.5223 1.24186 11.1282C1.24179 10.734 1.31939 10.3438 1.47022 9.97962C1.62104 9.6155 1.84214 9.28466 2.12088 9.00601C2.39961 8.72737 2.73052 8.50638 3.09469 8.35567L5.66862 7.28951C6.40301 6.98586 6.98691 6.40322 7.29216 5.6695L8.35908 3.09372C8.66357 2.35864 9.24759 1.77461 9.98267 1.47013C10.7178 1.16565 11.5437 1.16565 12.2788 1.47013L14.8527 2.53629C15.5878 2.84002 16.4134 2.8394 17.1481 2.53456L19.7249 1.47178C20.4599 1.16747 21.2857 1.16754 22.0206 1.47196C22.7556 1.77638 23.3395 2.36023 23.644 3.09513L24.7113 5.67167L24.711 5.66721Z" fill="#0788F5"/>
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M22.2665 11.8058C22.4803 11.4701 22.5519 11.0631 22.4656 10.6746C22.3794 10.286 22.1423 9.94759 21.8065 9.73383C21.4708 9.52006 21.0638 9.44843 20.6753 9.5347C20.2867 9.62097 19.9483 9.85806 19.7345 10.1938L13.8605 19.4238L11.1725 16.0638C10.924 15.753 10.5622 15.5536 10.1667 15.5095C9.77118 15.4655 9.37436 15.5803 9.06352 15.8288C8.75269 16.0773 8.55331 16.4391 8.50923 16.8347C8.46516 17.2302 8.58001 17.627 8.82852 17.9378L12.8285 22.9378C12.9776 23.1244 13.1691 23.2727 13.387 23.3703C13.6049 23.468 13.843 23.5122 14.0815 23.4993C14.32 23.4864 14.5519 23.4167 14.758 23.2961C14.9641 23.1755 15.1385 23.0074 15.2665 22.8058L22.2665 11.8058Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_3302_422487">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>
`,so=["href","title"],lo={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},uo=["src","alt"],co={key:1,class:"dsg-avatar--initials"},fo={class:"dsg-avatar--status"},ho={key:0,class:"dsg-avatar--activity"},vo=["innerHTML"],po={key:2,class:"dsg-avatar--logo"},go=["src","alt"],xo={key:0,class:"dsg-avatar--info"},yo={class:"dsg-avatar--title"},mo={class:"dsg-avatar--subtext"},ar=c.defineComponent({__name:"DsgAvatar",props:{profileUri:{default:""},fullName:{default:""},size:{default:"md"},theme:{default:"activity"},isOnline:{type:Boolean,default:!1},uri:{default:()=>{}},classes:{default:""},companyLogoUri:{default:()=>{}},preventDefault:{type:Boolean,default:!1},title:{default:""},subText:{default:""},noFocus:{type:Boolean,default:!1}},emits:["avatar-clicked","before-change-status","after-change-status"],setup(t,{expose:e,emit:r}){const n=["dsg-avatar",`dsg-avatar--${t.size}`,`dsg-avatar--${t.theme}`,`dsg-avatar--${t.isOnline?"online":"offline"}`,`dsg-avatar--${t.title?.length?"has-info":"no-info"}`,`dsg-avatar--${t.uri?"has-link":"no-link"}`,`dsg-avatar--${t.noFocus?"no-focus":"focus"}`,`dsg-avatar--${["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1?"profile-photo":"non-profile-photo"}`,t.classes].join(" ");["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1&&(["sm","md","lg"].indexOf(t.size)===-1&&new F.DsgPropSyntaxWarning("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."),(t.fullName||t.title||t.subText)&&new F.DsgWarning("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")),t.theme==="logo"&&!t.companyLogoUri&&new F.DsgPropSyntaxWarning("DsgAvatar: The 'logo' theme requires a 'companyLogoUri' prop."),["activity","verified","logo"].indexOf(t.theme)!==-1&&t.title?.length&&t.subText?.length&&["xs","sm","md","lg","xl","2xl"].indexOf(t.size)===-1&&new F.DsgPropSyntaxWarning("DsgAvatar: The 'activity', 'verified', and 'logo' themes only support the 'xs', 'sm', 'md', 'lg', and 'xl' sizes when 'title' and 'subText' are provided."),t.theme==="tile"&&!t.title?.length&&!t.fullName&&new F.DsgPropSyntaxWarning("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."),t.size==="xxs"&&(t.title?.length||t.subText?.length)&&new F.DsgPropSyntaxWarning("DsgAvatar: The 'xxs' size does not support the 'title' or 'subText' props.");const i=v=>{const h=v.split(" ");return(h[0].charAt(0)+h[h.length-1].charAt(0)).toUpperCase()},a=()=>t.fullName?"Avatar of "+t.fullName:"Avatar",o=r,s=c.ref(!1),l=v=>{o("before-change-status",s.value,v),s.value=v,o("after-change-status",s.value)},u=c.useTemplateRef("avatarImageWrapperEl"),f=v=>{t.preventDefault||(o("avatar-clicked",v),u.value&&!t.uri&&u.value.focus())};return e({setUserActiveStatus:l,toggleFocus:v=>{u.value&&(v?u.value.focus():u.value.blur())}}),(v,h)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(c.unref(n))},[c.createElementVNode("a",{class:"dsg-avatar--link",href:t.uri,title:a(),target:"_blank",ref:"avatarLink",onClick:f},[c.createElementVNode("div",lo,[c.renderSlot(v.$slots,"dsg-avatar--background",{},()=>[t.profileUri?(c.openBlock(),c.createElementBlock("img",{key:0,class:"dsg-avatar--profile-image",src:t.profileUri,alt:a()},null,8,uo)):c.createCommentVNode("",!0),!t.profileUri&&t.fullName?(c.openBlock(),c.createElementBlock("span",co,c.toDisplayString(i(t.fullName)),1)):c.createCommentVNode("",!0),!t.profileUri&&!t.fullName?(c.openBlock(),c.createBlock(F._sfc_main,{key:2,class:"dsg-avatar--user-icon",icon:"user-01",color:c.unref(Ja.ColoursConfig).gray[600],size:t.size},null,8,["color","size"])):c.createCommentVNode("",!0)]),["tile"].indexOf(t.theme)===-1?c.renderSlot(v.$slots,"dsg-avatar--status",{key:0},()=>[c.createElementVNode("div",fo,[t.theme==="activity"&&t.isOnline?(c.openBlock(),c.createElementBlock("span",ho)):c.createCommentVNode("",!0),["verified","profile-photo-verified"].indexOf(t.theme)!==-1?(c.openBlock(),c.createElementBlock("span",{key:1,class:"dsg-avatar--verified",innerHTML:c.unref(oo)},null,8,vo)):c.createCommentVNode("",!0),t.theme==="logo"?(c.openBlock(),c.createElementBlock("span",po,[c.createElementVNode("img",{src:t.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,go)])):c.createCommentVNode("",!0)])]):c.createCommentVNode("",!0)],512),t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?(c.openBlock(),c.createElementBlock("div",xo,[t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?c.renderSlot(v.$slots,"dsg-avatar--title",{key:0},()=>[c.createElementVNode("h3",yo,c.toDisplayString(t.title?.length?t.title:t.fullName),1)]):c.createCommentVNode("",!0),t.subText?.length?c.renderSlot(v.$slots,"dsg-avatar--subtext",{key:1},()=>[c.createElementVNode("p",mo,c.toDisplayString(t.subText),1)]):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],8,so)],2))}}),cr={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Dt={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},Se={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},wo={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},Eo={dangerouslyHTMLString:!1,multiple:!0,position:cr.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},Ao={rtl:!1,newestOnTop:!1,toastClassName:""},Wi={...Eo,...Ao};Se.DEFAULT;var j=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(j||{}),xn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(xn||{});const Co={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},_o={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},bo={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},So={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},Qn="Toastify--animate Toastify__none-enter";function Xi(t,e=!1){var r;let n=Co;if(!t||typeof t=="string")switch(t){case"flip":n=So;break;case"zoom":n=bo;break;case"slide":n=_o;break}else n=t;if(e)n.enter=Qn;else if(n.enter===Qn){const i=(r=n.exit.split("__")[1])==null?void 0:r.split("-")[0];n.enter=`Toastify--animate Toastify__${i}-enter`}return n}function Io(t){return t.containerId||String(t.position)}const Hr="will-unmount";function Oo(t=cr.TOP_RIGHT){return!!document.querySelector(`.${j.CSS_NAMESPACE}__toast-container--${t}`)}function To(t=cr.TOP_RIGHT){return`${j.CSS_NAMESPACE}__toast-container--${t}`}function No(t,e,r=!1){const n=[`${j.CSS_NAMESPACE}__toast-container`,`${j.CSS_NAMESPACE}__toast-container--${t}`,r?`${j.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return Nt(e)?e({position:t,rtl:r,defaultClassName:n}):`${n} ${e||""}`}function Do(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=j.CSS_NAMESPACE,s=To(r),l=document.querySelector(`.${o}`),u=document.querySelector(`.${s}`),f=!!u&&!((e=u.className)!=null&&e.includes(Hr)),d=l||document.createElement("div"),v=document.createElement("div");v.className=No(r,n,i),v.dataset.testid=`${j.CSS_NAMESPACE}__toast-container--${r}`,v.id=Io(t);for(const h in a)if(Object.prototype.hasOwnProperty.call(a,h)){const p=a[h];v.style[h]=p}return l||(d.className=j.CSS_NAMESPACE,document.body.appendChild(d)),f||d.appendChild(v),v}function yn(t){var e,r,n;const i=typeof t=="string"?t:((e=t.currentTarget)==null?void 0:e.id)||((r=t.target)==null?void 0:r.id),a=document.getElementById(i);a&&a.removeEventListener("animationend",yn,!1);try{or[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete or[i],delete ge[i]}catch{}}const or=c.reactive({});function Bo(t,e){const r=document.getElementById(String(e));r&&(or[r.id]=t)}function mn(t,e=!0){const r=String(t);if(!or[r])return;const n=document.getElementById(r);n&&n.classList.add(Hr),e?(Po(t),n&&n.addEventListener("animationend",yn,!1)):yn(r),Ve.items=Ve.items.filter(i=>i.containerId!==t)}function Ro(t){for(const e in or)mn(e,t);Ve.items=[]}function ji(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...Xi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function Po(t){for(const e in ge)if(e===t)for(const r of ge[e]||[])ji(r)}function ko(t){const e=Bt().find(r=>r.toastId===t);return e?.containerId}function Vn(t){return document.getElementById(t)}function Mo(t){const e=Vn(t.containerId);return e&&e.classList.contains(Hr)}function Jn(t){var e;const r=c.isVNode(t.content)?c.toRaw(t.content.props):null;return r??c.toRaw((e=t.data)!=null?e:{})}function Lo(t){return t?Ve.items.filter(e=>e.containerId===t).length>0:Ve.items.length>0}function Fo(){if(Ve.items.length>0){const t=Ve.items.shift();Ir(t?.toastContent,t?.toastProps)}}const ge=c.reactive({}),Ve=c.reactive({items:[]});function Bt(){const t=c.toRaw(ge);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function Vo(t){return Bt().find(e=>e.toastId===t)}function Ir(t,e={}){if(Mo(e)){const r=Vn(e.containerId);r&&r.addEventListener("animationend",wn.bind(null,t,e),!1)}else wn(t,e)}function wn(t,e={}){const r=Vn(e.containerId);r&&r.removeEventListener("animationend",wn.bind(null,t,e),!1);const n=ge[e.containerId]||[],i=n.length>0;if(!i&&!Oo(e.position)){const a=Do(e),o=c.createApp(us,e);e.useHandler&&e.useHandler(o),o.mount(a),Bo(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),c.nextTick(()=>{e.updateId?ke.update(e):ke.add(t,e)})}const ke={add(t,e){const{containerId:r=""}=e;r&&(ge[r]=ge[r]||[],ge[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=ge[r])==null||n.unshift(e):(i=ge[r])==null||i.push(e),e.onOpen&&e.onOpen(Jn(e))},e.delay||0))},remove(t){if(t){const e=ko(t);if(e){const r=ge[e];let n=r.find(i=>i.toastId===t);ge[e]=r.filter(i=>i.toastId!==t),!ge[e].length&&!Lo(e)&&mn(e,!1),Fo(),c.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Jn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){ge[e]=ge[e]||[];const r=ge[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};ke.dismissForce(t?.toastId),setTimeout(()=>{te(i.content,i)},t.delay||0)}},clear(t,e=!0){t?mn(t,e):Ro(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",ke.dismissCallback,!1),setTimeout(()=>{ke.remove(r)}))},dismiss(t){if(t){const e=Bt();for(const r of e)if(r.toastId===t){ji(r,n=>{n.addEventListener("animationend",ke.dismissCallback,!1)});break}}},dismissForce(t){if(t){const e=Bt();for(const r of e)if(r.toastId===t){const n=document.getElementById(t);n&&(n.remove(),n.removeEventListener("animationend",ke.dismissCallback,!1),ke.remove(t));break}}}},Uo=c.reactive({useHandler:void 0}),Ki=c.reactive({}),Mr=c.reactive({});function Yi(){return Math.random().toString(36).substring(2,9)}function $o(t){return typeof t=="number"&&!isNaN(t)}function En(t){return typeof t=="string"}function Nt(t){return typeof t=="function"}function Gr(...t){return c.mergeProps(...t)}function Or(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function Ho(t={}){Ki[`${j.CSS_NAMESPACE}-default-options`]=t}function qi(){return Ki[`${j.CSS_NAMESPACE}-default-options`]||Wi}function Go(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Tr=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Tr||{});const Zi={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:cr.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:Dt.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:Se.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},zo={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Se.DEFAULT},theme:{type:String,required:!1,default:Dt.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},Wo=c.defineComponent({name:"ProgressBar",props:zo,setup(t,{attrs:e}){const r=c.ref(),n=c.computed(()=>t.hide?"true":"false"),i=c.computed(()=>({...e.style||{},animationDuration:`${t.autoClose===!0?5e3:t.autoClose}ms`,animationPlayState:t.isRunning?"running":"paused",opacity:t.hide||t.autoClose===!1?0:1,transform:t.controlledProgress?`scaleX(${t.progress})`:"none"})),a=c.computed(()=>[`${j.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${j.CSS_NAMESPACE}__progress-bar--controlled`:`${j.CSS_NAMESPACE}__progress-bar--animated`,`${j.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${j.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${j.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),o=c.computed(()=>`${a.value} ${e?.class||""}`),s=()=>{r.value&&(r.value.onanimationend=null,r.value.ontransitionend=null)},l=()=>{t.isIn&&t.closeToast&&t.autoClose!==!1&&(t.closeToast(),s())},u=c.computed(()=>t.controlledProgress?null:l),f=c.computed(()=>t.controlledProgress?l:null);return c.watchEffect(()=>{r.value&&(s(),r.value.onanimationend=u.value,r.value.ontransitionend=f.value)}),()=>c.createVNode("div",{ref:r,role:"progressbar","aria-hidden":n.value,"aria-label":"notification timer",class:o.value,style:i.value},null)}}),Xo=c.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Dt.AUTO},type:{type:String,required:!1,default:Dt.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>c.createVNode("button",{class:`${j.CSS_NAMESPACE}__close-button ${j.CSS_NAMESPACE}__close-button--${t.theme}`,type:"button",onClick:e=>{e.stopPropagation(),t.closeToast&&t.closeToast(e)},"aria-label":t.ariaLabel},[c.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[c.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),zr=({theme:t,type:e,path:r,...n})=>c.createVNode("svg",c.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",style:{fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`}},n),[c.createVNode("path",{d:r},null)]);function jo(t){return c.createVNode(zr,c.mergeProps(t,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function Ko(t){return c.createVNode(zr,c.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function Yo(t){return c.createVNode(zr,c.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function qo(t){return c.createVNode(zr,c.mergeProps(t,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function Zo(){return c.createVNode("div",{class:`${j.CSS_NAMESPACE}__spinner`},null)}const Nr={info:Ko,warning:jo,success:Yo,error:qo,spinner:Zo},Qo=t=>t in Nr;function Jo({theme:t,type:e,isLoading:r,icon:n}){let i;const a=!!r||e==="loading",o={theme:t,type:e};if(a&&(n===void 0||typeof n=="boolean"))return Nr.spinner();if(n!==!1){if(Or(n))i=c.toRaw(n);else if(Nt(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Nr.spinner():i}else c.isVNode(n)?i=c.cloneVNode(n,o):En(n)||$o(n)?i=n:Qo(e)&&(i=Nr[e](o));return i}}const es=()=>{};function ts(t,e,r=j.COLLAPSE_DURATION){const{scrollHeight:n,style:i}=t,a=r;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition=`all ${a}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,a)})})}function rs(t){const e=c.ref(!1),r=c.ref(!1),n=c.ref(!1),i=c.ref(Tr.Enter),a=c.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||j.COLLAPSE_DURATION}),o=a.done||es,s=c.computed(()=>a.appendPosition?`${a.enter}--${a.position}`:a.enter),l=c.computed(()=>a.appendPosition?`${a.exit}--${a.position}`:a.exit),u=c.computed(()=>t.pauseOnHover?{onMouseenter:y,onMouseleave:g}:{});function f(){const m=s.value.split(" ");v().addEventListener(xn.ENTRANCE_ANIMATION_END,g,{once:!0});const E=S=>{const B=v();S.target===B&&(B.dispatchEvent(new Event(xn.ENTRANCE_ANIMATION_END)),B.removeEventListener("animationend",E),B.removeEventListener("animationcancel",E),i.value===Tr.Enter&&S.type!=="animationcancel"&&B.classList.remove(...m))},C=()=>{const S=v();S.classList.add(...m),S.addEventListener("animationend",E),S.addEventListener("animationcancel",E)};t.pauseOnFocusLoss&&h(),C()}function d(){if(!v())return;const m=()=>{const C=v();C.removeEventListener("animationend",m),a.collapse?ts(C,o,a.collapseDuration):o()},E=()=>{const C=v();i.value=Tr.Exit,C&&(C.className+=` ${l.value}`,C.addEventListener("animationend",m))};r.value||(n.value?m():setTimeout(E))}function v(){return t.toastRef.value}function h(){document.hasFocus()||y(),window.addEventListener("focus",g),window.addEventListener("blur",y)}function p(){window.removeEventListener("focus",g),window.removeEventListener("blur",y)}function g(){(!t.loading.value||t.isLoading===void 0)&&(e.value=!0)}function y(){e.value=!1}function w(m){m&&(m.stopPropagation(),m.preventDefault()),r.value=!1}return c.watchEffect(d),c.watchEffect(()=>{const m=Bt();r.value=m.findIndex(E=>E.toastId===a.toastId)>-1}),c.watchEffect(()=>{t.isLoading!==void 0&&(t.loading.value?y():g())}),c.onMounted(f),c.onUnmounted(()=>{t.pauseOnFocusLoss&&p()}),{isIn:r,isRunning:e,hideToast:w,eventHandlers:u}}function ns(t){if(!t||typeof t!="object"||Array.isArray(t)||t.__v_isVNode)return!1;const e=t;return["title","content"].some(r=>r in e)}const is=c.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Zi,setup(t){const e=c.ref(),r=c.computed(()=>!!t.isLoading),n=c.computed(()=>t.progress!==void 0&&t.progress!==null),i=c.computed(()=>Jo(t)),a=c.computed(()=>[`${j.CSS_NAMESPACE}__toast`,`${j.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${j.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${j.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:o,isIn:s,hideToast:l,eventHandlers:u}=rs({toastRef:e,loading:r,done:()=>{ke.remove(t.toastId)},...Xi(t.transition,t.disabledEnterTransition),...t});function f(){const d=t.content;if(ns(d)){const v=[];return d.title!==void 0&&v.push(c.createVNode("div",{"data-testid":"toast-text-title",class:`${j.CSS_NAMESPACE}__toast-text-title`},[d.title])),d.content!==void 0&&v.push(c.createVNode("div",{"data-testid":"toast-text-content",class:`${j.CSS_NAMESPACE}__toast-text-content`},[d.content])),c.createVNode("div",{"data-testid":"toast-text-content-wrapper",class:`${j.CSS_NAMESPACE}__toast-text`},[v])}return Or(d)?c.h(c.toRaw(d),{toastProps:c.toRaw(t),closeToast:l,data:t.data,...t.expandCustomProps?t.contentProps:{contentProps:t.contentProps||{}}}):Nt(d)?d({toastProps:c.toRaw(t),closeToast:l,data:t.data}):t.dangerouslyHTMLString?c.h("div",{innerHTML:d}):d}return()=>c.createVNode("div",c.mergeProps({id:t.toastId,class:a.value,style:t.toastStyle||{},ref:e,"data-testid":`toast-item-${t.toastId}`,onClick:d=>{t.closeOnClick&&l(),t.onClick&&t.onClick(d)}},u.value),[c.createVNode("div",{role:t.role,"data-testid":"toast-body",class:`${j.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[i.value!=null&&c.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${j.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${j.CSS_NAMESPACE}--animate-icon ${j.CSS_NAMESPACE}__zoom-enter`].join(" ")},[Or(i.value)?c.h(c.toRaw(i.value),{theme:t.theme,type:t.type}):Nt(i.value)?i.value({theme:t.theme,type:t.type}):i.value]),c.createVNode("div",{"data-testid":"toast-content"},[f()])]),(t.closeButton===void 0||t.closeButton===!0)&&c.createVNode(Xo,{theme:t.theme,closeToast:d=>{d.stopPropagation(),d.preventDefault(),l()}},null),Or(t.closeButton)?c.h(c.toRaw(t.closeButton),{closeToast:l,type:t.type,theme:t.theme}):Nt(t.closeButton)?t.closeButton({closeToast:l,type:t.type,theme:t.theme}):null,c.createVNode(Wo,{className:t.progressClassName,style:t.progressStyle,rtl:t.rtl,theme:t.theme,isIn:s.value,type:t.type,hide:t.hideProgressBar,isRunning:o.value,autoClose:t.autoClose,controlledProgress:n.value,progress:t.progress,closeToast:t.isLoading?void 0:l},null)])}}),Lr="vue3-toastify:url-change";let gr=0,nr;function as(){if(!(typeof window>"u")&&Mr.lastUrl!==window.location.href){Mr.lastUrl=window.location.href;const t=r=>typeof r.clearOnUrlChange=="boolean"?r.clearOnUrlChange:qi().clearOnUrlChange!==!1,e=Object.values(ge).reduce((r,n)=>(Array.isArray(n)&&r.push(...n),r),[]);for(const r of e)r.toastId&&t(r)&&ke.dismiss(r.toastId);Ve.items=Ve.items.filter(r=>!t(r.toastProps))}}function os(){const{history:t}=window,e=t.pushState,r=t.replaceState;return t.pushState=function(...n){const i=e.apply(this,n);return window.dispatchEvent(new Event(Lr)),i},t.replaceState=function(...n){const i=r.apply(this,n);return window.dispatchEvent(new Event(Lr)),i},()=>{t.pushState=e,t.replaceState=r}}function ss(){if(typeof window>"u"||nr)return;const t=os(),e=()=>as();window.addEventListener(Lr,e),window.addEventListener("popstate",e),window.addEventListener("hashchange",e),nr=()=>{t(),window.removeEventListener(Lr,e),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e),nr=void 0}}function ls(){nr&&(nr(),Mr.lastUrl="")}const us=c.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Zi,setup(t){const e=c.computed(()=>t.containerId),r=c.computed(()=>ge[e.value]||[]),n=c.computed(()=>r.value.filter(i=>i.position===t.position));return c.onMounted(()=>{typeof window<"u"&&(gr+=1,ss())}),c.onUnmounted(()=>{typeof window<"u"&&gr>0&&(gr-=1,gr===0&&ls())}),()=>c.createVNode(c.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return c.createVNode(is,c.mergeProps({key:a},i),null)})])}});let qr=!1;const Qi={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Ji(){const t=[];return Bt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Hr)&&t.push(e)}),t}function cs(t){const e=Ji().length,r=t??0;return r>0&&e+Ve.items.length>=r}function fs(t){cs(t.limit)&&!t.updateId&&Ve.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function ct(t,e,r={}){if(qr)return;r=Gr(qi(),{type:e},c.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=Yi()),r={...r,...r.type==="loading"?Qi:{},content:t,containerId:r.containerId||String(r.position)};const n=Number(r?.progress);return!isNaN(n)&&n<0&&(r.progress=0),n>1&&(r.progress=1),r.theme==="auto"&&(r.theme=Go()),fs(r),Mr.lastUrl=window.location.href,r.multiple?Ve.items.length?r.updateId&&Ir(t,r):Ir(t,r):(qr=!0,te.clearAll(void 0,!1),setTimeout(()=>{Ir(t,r)},0),setTimeout(()=>{qr=!1},390)),r.toastId}const te=(t,e)=>ct(t,Se.DEFAULT,e);te.info=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.INFO});te.error=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.ERROR});te.warning=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.WARNING});te.warn=te.warning;te.success=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.SUCCESS});te.loading=(t,e)=>ct(t,Se.DEFAULT,Gr(e,Qi));te.dark=(t,e)=>ct(t,Se.DEFAULT,Gr(e,{theme:Dt.DARK}));te.remove=t=>{t?ke.dismiss(t):ke.clear()};te.clearAll=(t,e)=>{c.nextTick(()=>{ke.clear(t,e)})};te.isActive=t=>{let e=!1;return e=Ji().findIndex(r=>r.toastId===t)>-1,e};te.update=(t,e={})=>{setTimeout(()=>{const r=Vo(t);if(r){const n=c.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:Yi()},o=a.render||i;delete a.render,ct(o,a.type,a)}},0)};te.done=t=>{te.update(t,{isLoading:!1,progress:1})};te.promise=ds;function ds(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const u={...i||{},autoClose:!1};e&&(l=En(e)?te.loading(e,u):te.loading(e.render,{...u,...e}));const f={autoClose:(a=i?.autoClose)!=null?a:!0,closeOnClick:(o=i?.closeOnClick)!=null?o:!0,closeButton:(s=i?.autoClose)!=null?s:null,isLoading:void 0,draggable:null,delay:100},d=(h,p,g)=>{if(p==null){te.remove(l);return}const y={type:h,...f,...i,data:g},w=En(p)?{render:p}:p;return l?te.update(l,{...y,...w,isLoading:!1}):te(w.render,{...y,...w,isLoading:!1}),g},v=Nt(t)?t():t;return v.then(h=>{d("success",n,h)}).catch(h=>{d("error",r,h)}),v}te.POSITION=cr;te.THEME=Dt;te.TYPE=Se;te.TRANSITIONS=wo;const hs={install(t,e={}){Uo.useHandler=e.useHandler||(()=>{}),vs(e)}};typeof window<"u"&&(window.Vue3Toastify=hs);function vs(t={}){const e=Gr(Wi,t);Ho(e)}const ps={class:"dsg-alert__wrapper"},gs=["innerHTML"],ea=c.defineComponent({__name:"DsgAlertComponent",props:{contentProps:{default:()=>({title:"",message:"",type:"gray",hasCloseButton:!0,useToast:!0,timeout:!1})}},setup(t){const e=["dsg-alert","dsg-alert--"+t.contentProps.type,t.contentProps.hasCloseButton?"dsg-alert--has-close":"dsg-alert--no-close"],n=c.useAttrs().closeToast,i=c.ref(!1);let a=null;const o=()=>{t.contentProps.useToast?n():i.value=!0};return c.onMounted(()=>{t.contentProps.timeout&&t.contentProps.timeout>0&&(a=setTimeout(()=>{o()},t.contentProps.timeout))}),c.onBeforeUnmount(()=>{a&&(clearTimeout(a),a=null)}),(s,l)=>i.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(e)},[t.contentProps.type==="gray"?(c.openBlock(),c.createBlock(It,{key:0,icon:{icon:"info-circle"},type:"outline",theme:"gray",size:"lg"})):c.createCommentVNode("",!0),t.contentProps.type==="error"?(c.openBlock(),c.createBlock(It,{key:1,icon:{icon:"alert-circle"},type:"outline",theme:"error",size:"lg"})):c.createCommentVNode("",!0),t.contentProps.type==="warning"?(c.openBlock(),c.createBlock(It,{key:2,icon:{icon:"alert-circle"},type:"outline",theme:"warning",size:"lg"})):c.createCommentVNode("",!0),t.contentProps.type==="success"?(c.openBlock(),c.createBlock(It,{key:3,icon:{icon:"check-circle"},type:"outline",theme:"success",size:"lg"})):c.createCommentVNode("",!0),c.createElementVNode("div",ps,[c.createElementVNode("p",{class:c.normalizeClass(["dsg-alert__title",{"dsg-alert__title--with-close-button":t.contentProps.hasCloseButton}])},c.toDisplayString(t.contentProps.title),3),t.contentProps.message?(c.openBlock(),c.createElementBlock("p",{key:0,innerHTML:t.contentProps.message,class:"dsg-alert__message"},null,8,gs)):c.createCommentVNode("",!0)]),t.contentProps.hasCloseButton?(c.openBlock(),c.createElementBlock("button",{key:4,onClick:o,class:"dsg-alert__close-button"},[c.createVNode(F._sfc_main,{icon:"x-close",size:"sm"})])):c.createCommentVNode("",!0)]))}}),xs=new class qt{info(e="",r="",n={}){qt.showToast("gray",e,r,n)}error(e="",r="",n={}){qt.showToast("error",e,r,n)}warning(e="",r="",n={}){qt.showToast("warning",e,r,n)}success(e="",r="",n={}){qt.showToast("success",e,r,n)}static showToast(e,r,n,i){const a={hasCloseButton:!1,timeout:3e3,position:"top-right",maxWidthClass:"",...i};te(ea,{autoClose:a.hasCloseButton?!1:a.timeout,closeButton:!1,hideProgressBar:!0,closeOnClick:!a.hasCloseButton,position:a.position,containerClassName:`dsg-alert-container ${a.maxWidthClass}`,toastClassName:"dsg-alert",bodyClassName:"dsg-alert--body",contentProps:{title:r,message:n,type:e,hasCloseButton:a.hasCloseButton,useToast:!0,timeout:a.timeout},onClick:()=>{}})}};function Zr(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function ys(t){return(...e)=>!t(...e)}function ms(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function ws(t){return t.filter(e=>!e.$isLabel)}function Qr(t,e){return r=>r.reduce((n,i)=>i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n,[])}const ei=(...t)=>e=>t.reduce((r,n)=>n(r),e);var Es={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(t,e){return Zr(t)?"":e?t[e]:t}},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},filteringSortFunc:{type:Function,default:null}},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 t=this.search||"",e=t.toLowerCase().trim();let r=this.options.concat();return this.internalSearch?r=this.groupValues?this.filterAndFlat(r,e,this.label):this.filterOptions(r,e,this.label,this.customLabel):r=this.groupValues?Qr(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(ys(this.isSelected)):r,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?r.push({isTag:!0,label:t}):r.unshift({isTag:!0,label:t})),r.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,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(t,e,r){return ei(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),Qr(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return ei(Qr(this.groupValues,this.groupLabel),ws)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(Zr(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return Zr(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const r=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],n=this.internalValue.filter(i=>r.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",n)}else{const r=e[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&r.splice(this.max-this.internalValue.length),this.$emit("select",r,this.id),this.$emit("update:modelValue",this.internalValue.concat(r))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const r=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const n=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&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 t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,r,n){return e?t.filter(i=>ms(n(i,r),e)).sort((i,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,a):n(i,r).length-n(a,r).length):t},filterGroups(t,e,r,n,i){return a=>a.map(o=>{if(!o[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const s=this.filterOptions(o[r],t,e,i);return s.length?{[n]:o[n],[r]:s}:[]})}}},As={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(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const r=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),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]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},Un={name:"vue-multiselect",mixins:[Es,As],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:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1},teleportTarget:{type:[String,Object],default:"body"},contentWrapperClass:{type:[String,Array,Object],default:""}},data(){return{dropdownStyles:{},ready:!1}},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)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}},watch:{isOpen(t){t&&(this.useTeleport?(this.ready=!1,this.$nextTick(()=>{const e=this.$el.getBoundingClientRect();this.dropdownStyles={position:"absolute",top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`,width:`${e.width}px`,zIndex:9999},this.ready=!0})):this.ready=!0)}}};const Cs=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],_s={ref:"tags",class:"multiselect__tags"},bs={class:"multiselect__tags-wrap"},Ss=["textContent"],Is=["onKeydown","onMousedown"],Os=["textContent"],Ts={class:"multiselect__spinner"},Ns=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],Ds=["id","aria-multiselectable"],Bs={key:0},Rs={class:"multiselect__option"},Ps=["aria-selected","id","role"],ks=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Ms=["data-select","data-deselect","onMouseenter","onMousedown"],Ls={class:"multiselect__option"},Fs={class:"multiselect__option"};function Vs(t,e,r,n,i,a){return c.openBlock(),c.createElementBlock("div",{tabindex:t.searchable?-1:r.tabindex,class:c.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":r.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=o=>t.activate()),onBlur:e[15]||(e[15]=o=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=c.withKeys(c.withModifiers(o=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=c.withKeys(c.withModifiers(o=>t.pointerBackward(),["self","prevent"]),["up"])),e[18]||(e[18]=c.withKeys(c.withModifiers(o=>t.addPointerElement(o),["stop","self"]),["enter","tab"]))],onKeyup:e[19]||(e[19]=c.withKeys(o=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[c.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[c.createElementVNode("div",{onMousedown:e[0]||(e[0]=c.withModifiers(o=>t