@useinsider/ab-components 0.0.28 → 0.0.30

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.
@@ -1,2 +1,2 @@
1
- (function(R,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(R=typeof globalThis<"u"?globalThis:R||self,e(R.AbComponents={},R.Vue))})(this,function(R,e){"use strict";const Z={button__size_default:"_button__size_default_vssfh_1",button__size_small:"_button__size_small_vssfh_8",button:"_button_vssfh_1",button__label:"_button__label_vssfh_60","button__solid-primary":"_button__solid-primary_vssfh_72","no-hover-effect":"_no-hover-effect_vssfh_79","button--selected":"_button--selected_vssfh_101","button__solid-subtle-primary":"_button__solid-subtle-primary_vssfh_108","button__solid-secondary":"_button__solid-secondary_vssfh_144","button__solid-danger":"_button__solid-danger_vssfh_180","button__solid-warning":"_button__solid-warning_vssfh_216","button__solid-smart":"_button__solid-smart_vssfh_252","button__ghost-primary":"_button__ghost-primary_vssfh_288","button__ghost-subtle-primary":"_button__ghost-subtle-primary_vssfh_324","button__ghost-secondary":"_button__ghost-secondary_vssfh_360","button__ghost-danger":"_button__ghost-danger_vssfh_396","button__ghost-warning":"_button__ghost-warning_vssfh_432","button__ghost-smart":"_button__ghost-smart_vssfh_468","button__text-primary":"_button__text-primary_vssfh_504","button__text-text":"_button__text-text_vssfh_540","button__text-subtle-primary":"_button__text-subtle-primary_vssfh_576","button__text-secondary":"_button__text-secondary_vssfh_612","button__text-danger":"_button__text-danger_vssfh_648","button__text-warning":"_button__text-warning_vssfh_684","button__text-smart":"_button__text-smart_vssfh_720","button__outline-primary":"_button__outline-primary_vssfh_756","button__outline-subtle-primary":"_button__outline-subtle-primary_vssfh_793","button__outline-secondary":"_button__outline-secondary_vssfh_830","button__outline-danger":"_button__outline-danger_vssfh_867","button__outline-warning":"_button__outline-warning_vssfh_904","button__outline-smart":"_button__outline-smart_vssfh_941",button__solid:"_button__solid_vssfh_72",fill:"_fill_vssfh_992"},Ke=["disabled"],Qe=e.defineComponent({__name:"Button",props:{variant:{},color:{},size:{default:"default"},leftIconName:{},rightIconName:{},loadingStatus:{type:Boolean,default:!1},successStatus:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},fill:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=t,o=n,s=i=>{r.disabled||o("click",i)},a=e.computed(()=>r.loadingStatus?"loading-circle":r.successStatus?"line-check-natural":r.leftIconName);return(i,l)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass([e.unref(Z).button,e.unref(Z)[`button__${i.variant}`],e.unref(Z)[`button__${i.variant}-${i.color}`],e.unref(Z)[`button__size_${i.size}`],{[e.unref(Z).fill]:i.fill}]),disabled:r.disabled,onClick:s},[a.value?(e.openBlock(),e.createBlock(e.unref(J),{key:0,name:a.value},null,8,["name"])):e.createCommentVNode("",!0),i.label?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(Z).button__label)},e.toDisplayString(i.label),3)):e.createCommentVNode("",!0),i.rightIconName?(e.openBlock(),e.createBlock(e.unref(J),{key:2,name:i.rightIconName},null,8,["name"])):e.createCommentVNode("",!0)],10,Ke))}}),Ze={mounted(t,n){t.clickOutsideEvent=r=>{const o=(n.value.exclude||[]).filter(a=>a.value).map(a=>a.value);[t,...o].some(a=>a&&(a===r.target||a.contains(r.target)))||n.value.handler()},document.addEventListener("click",t.clickOutsideEvent)},unmounted(t){t.clickOutsideEvent&&document.removeEventListener("click",t.clickOutsideEvent)}},Je=(t,n)=>{var o;let r=0;for(const s of t)if(s.toLowerCase()===((o=n[r])==null?void 0:o.toLowerCase())&&r++,r===n.length)return!0;return!1},et=(t,n,r)=>{if(!r.trim())return t;const o=r.toLowerCase();return t.filter(s=>{const a=String(s[n]);return Je(a.toLowerCase(),o)}).sort((s,a)=>{const i=String(s[n]).toLowerCase(),l=String(a[n]).toLowerCase();return i===o?-1:l===o?1:i.startsWith(o)&&!l.startsWith(o)?-1:!i.startsWith(o)&&l.startsWith(o)?1:i.length-l.length})},S={menu:"_menu_1sfnf_1",dropdown:"_dropdown_1sfnf_1",dropdown__valueContent:"_dropdown__valueContent_1sfnf_50","dropdown__valueContent--open":"_dropdown__valueContent--open_1sfnf_58",dropdown__label:"_dropdown__label_1sfnf_61",dropdown__value:"_dropdown__value_1sfnf_50",dropdown__placeholder:"_dropdown__placeholder_1sfnf_69",dropdown__arrowIcon:"_dropdown__arrowIcon_1sfnf_77",menu__searchContainer:"_menu__searchContainer_1sfnf_92",menu__searchInputWrap:"_menu__searchInputWrap_1sfnf_96",menu__searchInput:"_menu__searchInput_1sfnf_96","menu__searchInput--error":"_menu__searchInput--error_1sfnf_112",menu__errorMessage:"_menu__errorMessage_1sfnf_115",menu__addButton:"_menu__addButton_1sfnf_122",menu__itemContainer:"_menu__itemContainer_1sfnf_130",menu__item:"_menu__item_1sfnf_130","menu__item--active":"_menu__item--active_1sfnf_169"},tt=["for"],nt=["placeholder"],ot=["onClick"],rt=e.defineComponent({__name:"DropdownMenu",props:{id:{},label:{},modelValue:{default:""},menuHeight:{default:154},placeholder:{},addable:{type:Boolean},addButtonText:{},searchable:{type:Boolean},searchPlaceHolder:{},items:{},validateAddItem:{type:Function,default:()=>null}},emits:["update:modelValue","add-error","item-added","select-item"],setup(t,{emit:n}){const r=Ze,o=t,s=n,a=e.ref(),i=e.ref(),l=e.ref(!1),c=e.ref(null),u=e.ref(""),f=e.ref(null),_=e.ref({x:0,y:0,width:0,shouldOpenUp:!1,height:o.menuHeight}),p=e.reactive([...o.items]),d=e.reactive([...o.items]),m=()=>{if(!a.value)return;const{offsetTop:w,offsetLeft:B,offsetWidth:z}=a.value,A=window.innerHeight,H=w+a.value.offsetHeight,$=H+o.menuHeight>A;_.value={x:B+window.scrollX,y:$?w+window.scrollY:H+window.scrollY,width:z,shouldOpenUp:$,height:o.menuHeight}},g=()=>{m(),l.value=!l.value},b=()=>{f.value=null,u.value="",p.splice(0,p.length,...d)},h=()=>{l.value=!1,b()},x=w=>{c.value=w,s("select-item",w),s("update:modelValue",w.value),h()},k=()=>{const w=u.value.trim(),B=o.validateAddItem(w,d);if(B){f.value=B,s("add-error",B);return}const z={text:w,value:w};d.push(z),b(),s("item-added",z)},E=()=>{const w=et(d,"text",u.value);p.splice(0,p.length,...w)},y=()=>{f.value=""},V=e.computed(()=>({top:_.value.shouldOpenUp?`${_.value.y-10}px`:`${_.value.y}px`,left:`${_.value.x}px`,width:`${_.value.width}px`,height:`${o.menuHeight}px`}));e.onMounted(()=>{if(m(),o.modelValue){const w=d.find(B=>B.value===o.modelValue);w&&(c.value=w)}});const C=e.computed(()=>c.value?c.value.text:"");e.watch(()=>o.modelValue,w=>{var B;if(((B=c.value)==null?void 0:B.value)!==w){const z=d.find(A=>A.value===w);z&&(c.value=z)}}),e.watch(()=>o.items,w=>{d.splice(0,d.length,...w),p.splice(0,p.length,...w)},{deep:!0});const T=e.ref({handler:h,exclude:[a,i]});return(w,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropdownRef",ref:a,class:e.normalizeClass(e.unref(S).dropdown)},[w.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(S).dropdown__label),for:w.id},e.toDisplayString(w.label),11,tt)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass([e.unref(S).dropdown__valueContent,{[e.unref(S)["dropdown__valueContent--open"]]:l.value}]),onClick:g},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(S).dropdown__value)},e.toDisplayString(C.value),3),w.placeholder&&!C.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(S).dropdown__placeholder)},e.toDisplayString(w.placeholder),3)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{fill:"none",height:"17",viewBox:"0 0 16 17",width:"16",xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass(e.unref(S).dropdown__arrowIcon)},B[2]||(B[2]=[e.createElementVNode("path",{d:"M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",fill:"#91949F"},null,-1)]),2))],2)],2),e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"menuRef",ref:i,class:e.normalizeClass(e.unref(S).menu),style:e.normalizeStyle(V.value),onClick:B[1]||(B[1]=e.withModifiers(()=>{},["prevent"]))},[o.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(S).menu__searchContainer)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(S).menu__searchInputWrap)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:e.normalizeClass([e.unref(S).menu__searchInput,{[e.unref(S)["menu__searchInput--error"]]:f.value}]),placeholder:w.searchPlaceHolder,"onUpdate:modelValue":B[0]||(B[0]=z=>u.value=z),onFocus:y,onInput:E},null,42,nt),[[e.vModelText,u.value]]),f.value?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(S).menu__errorMessage)},e.toDisplayString(f.value),3)):e.createCommentVNode("",!0)],2),o.addable?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(S).menu__addButton),onClick:k},e.toDisplayString(w.addButtonText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{class:e.normalizeClass(e.unref(S).menu__itemContainer)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p,(z,A)=>(e.openBlock(),e.createElementBlock("li",{key:`${z.value}-${A}`,class:e.normalizeClass([e.unref(S).menu__item,{[e.unref(S)["menu__item--active"]]:c.value&&z.value===c.value.value}]),onClick:H=>x(z)},e.toDisplayString(z.text),11,ot))),128))],2)],6)),[[e.vShow,l.value],[e.unref(r),T.value]])],64))}}),lt=["fill","height","width"],st=["xlink:href"],J=((t,n)=>{const r=t.__vccOpts||t;for(const[o,s]of n)r[o]=s;return r})(e.defineComponent({__name:"Icon",props:{name:{},size:{default:16},color:{}},setup(t){const n=t,r=e.computed(()=>typeof n.size=="number"?`${n.size}px`:n.size);return(o,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"icon",fill:o.color||"currentColor",height:r.value,width:r.value},[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,st)],8,lt))}}),[["__scopeId","data-v-f04c8857"]]),be={container:"_container_sgker_1",container__text:"_container__text_sgker_52",container__default:"_container__default_sgker_56",container__warning:"_container__warning_sgker_64",container__alert:"_container__alert_sgker_72",container__success:"_container__success_sgker_80"},at=e.defineComponent({__name:"OnPageMessage",props:{variant:{default:"default"},text:{}},setup(t){const n=t,r=e.computed(()=>{switch(n.variant){case"alert":return"icon-info-box-error";case"warning":return"line-caution-triangle";case"success":return"line-check-natural";default:return"filled-info-circle"}});return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(be).container,e.unref(be)[`container__${o.variant}`]])},[e.createVNode(J,{name:r.value,size:24},null,8,["name"]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(be).container__text)},e.toDisplayString(o.text),3)],2))}}),F={button__size_default:"_button__size_default_1663t_1",button__size_small:"_button__size_small_1663t_8",button:"_button_1663t_1",button__label:"_button__label_1663t_58","button--primary":"_button--primary_1663t_75","button--selected":"_button--selected_1663t_85","button--secondary":"_button--secondary_1663t_98","button--danger":"_button--danger_1663t_121","button--warning":"_button--warning_1663t_144","button--smart":"_button--smart_1663t_167",button__solid:"_button__solid_1663t_197",segmentGroup:"_segmentGroup_1663t_204","segmentGroup--vertical":"_segmentGroup--vertical_1663t_207","segmentGroup--horizontal":"_segmentGroup--horizontal_1663t_216",fill:"_fill_1663t_226"},it=["disabled","onClick"],ct=e.defineComponent({__name:"SegmentButton",props:{color:{},size:{default:"default"},align:{default:"horizontal"},disabled:{type:Boolean,default:!1},segments:{},fill:{type:Boolean},modelValue:{}},emits:["update:modelValue","click"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(r.modelValue||""),a=l=>{r.disabled||l.disabled||(s.value=l.value,o("update:modelValue",l.value),o("click",l.value))};e.watch(()=>r.modelValue,l=>{s.value!==l&&(s.value=l||"")});const i=e.ref([...r.segments]);return e.watch(()=>r.segments,l=>{i.value=[...l],l.some(c=>c.value===s.value)||(s.value="",o("update:modelValue",""))},{deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(F).segmentGroup,e.unref(F)[`segmentGroup--${l.align}`],{[e.unref(F).fill]:l.fill}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(u,f)=>(e.openBlock(),e.createElementBlock("button",{key:`${u.value}-${f}`,class:e.normalizeClass([e.unref(F).button,e.unref(F)[`button--${l.color}`],e.unref(F)[`button__size_${l.size}`],e.unref(F).fill,{[e.unref(F)["button--selected"]]:u.value===s.value}]),disabled:u.disabled||r.disabled,onClick:_=>a(u)},[u.icon?(e.openBlock(),e.createBlock(e.unref(J),{key:0,name:u.icon},null,8,["name"])):e.createCommentVNode("",!0),u.label?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(F).button__label)},e.toDisplayString(u.label),3)):e.createCommentVNode("",!0)],10,it))),128))],2))}}),v={wrapper__counter:"_wrapper__counter_rlffg_1",wrapper__errorMessage:"_wrapper__errorMessage_rlffg_1",wrapper__label:"_wrapper__label_rlffg_1",wrapper__field:"_wrapper__field_rlffg_1",wrapper:"_wrapper_rlffg_1",wrapper__bottom:"_wrapper__bottom_rlffg_92","wrapper--error":"_wrapper--error_rlffg_105"},ut=["for"],ft=["id","maxlength","name","placeholder","value"],dt=["id","maxlength","name","placeholder","value"],_t=e.defineComponent({__name:"TextInput",props:{id:{},name:{},modelValue:{default:""},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},maxHeight:{default:void 0},error:{default:""},multiline:{type:Boolean,default:!1},autoGrow:{type:Boolean,default:!1},counter:{type:Boolean}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(null),a=()=>{if(r.autoGrow&&s.value){s.value.style.height="";const l=Math.min(s.value.scrollHeight,r.maxHeight||s.value.scrollHeight);s.value.style.height=`${l}px`}},i=l=>{const c=l.target;o("input",l),o("update:modelValue",c.value),a()};return e.onMounted(()=>{a()}),(l,c)=>{var u;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(v).wrapper)},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(v).wrapper__label),for:l.id},e.toDisplayString(l.label),11,ut)):e.createCommentVNode("",!0),l.multiline?(e.openBlock(),e.createElementBlock("textarea",{key:1,id:l.id,ref_key:"textareaRef",ref:s,class:e.normalizeClass([e.unref(v).wrapper__field,{[e.unref(v)["wrapper--error"]]:l.error}]),maxlength:l.maxLength,name:l.name,placeholder:l.placeholder,style:e.normalizeStyle(l.maxHeight?{maxHeight:`${l.maxHeight}px`}:void 0),value:l.modelValue,onBlur:c[0]||(c[0]=f=>o("blur",f)),onChange:c[1]||(c[1]=f=>l.$emit("change",f)),onFocus:c[2]||(c[2]=f=>o("focus",f)),onInput:i,onPaste:c[3]||(c[3]=f=>o("paste",f))},null,46,ft)):(e.openBlock(),e.createElementBlock("input",{key:2,id:l.id,type:"text",class:e.normalizeClass([e.unref(v).wrapper__field,{[e.unref(v)["wrapper--error"]]:l.error}]),maxlength:l.maxLength,name:l.name,placeholder:l.placeholder,value:l.modelValue,onBlur:c[4]||(c[4]=f=>o("blur",f)),onChange:c[5]||(c[5]=f=>l.$emit("change",f)),onFocus:c[6]||(c[6]=f=>o("focus",f)),onInput:i,onPaste:c[7]||(c[7]=f=>o("paste",f))},null,42,dt)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(v).wrapper__bottom)},[l.error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v).wrapper__errorMessage)},e.toDisplayString(l.error),3)):e.createCommentVNode("",!0),l.counter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(v).wrapper__counter)},e.toDisplayString(((u=l.modelValue)==null?void 0:u.toString().length)||0),3)):e.createCommentVNode("",!0)],2)],2)}}}),j={wrapper__counter:"_wrapper__counter_86wjx_1",wrapper__errorMessage:"_wrapper__errorMessage_86wjx_1",wrapper__label:"_wrapper__label_86wjx_1",wrapper__field:"_wrapper__field_86wjx_8",wrapper:"_wrapper_86wjx_1",wrapper__size_default:"_wrapper__size_default_86wjx_52",wrapper__size_small:"_wrapper__size_small_86wjx_55",wrapper__bottom:"_wrapper__bottom_86wjx_92","wrapper--error":"_wrapper--error_86wjx_105"},pt=["for"],mt=["id","max","maxlength","min","name","placeholder","value"],ht=e.defineComponent({__name:"NumberInput",props:{id:{},name:{},modelValue:{default:void 0},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},error:{default:""},errorStatus:{type:Boolean},counter:{type:Boolean},min:{default:void 0},max:{default:void 0},size:{default:"default"}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(t,{emit:n}){const r=t,o=n,s=l=>{if(l==="")return l;const c=Number(l);return typeof r.min=="number"&&c<r.min?r.min.toString():typeof r.max=="number"&&c>r.max?r.max.toString():c.toString()},a=l=>{const c=l.target,u=s(c.value);c.value=u,o("input",l),o("update:modelValue",Number(u))},i=l=>{const c=l.target,u=c.value,f=s(c.value===""?String(r.min||0):c.value);c.value=f,o("blur",l),u!==f&&o("update:modelValue",Number(f))};return(l,c)=>{var u;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(j).wrapper,e.unref(j)[`wrapper__size_${l.size}`]])},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(j).wrapper__label),for:l.id},e.toDisplayString(l.label),11,pt)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:l.id,type:"number",class:e.normalizeClass([e.unref(j).wrapper__field,{[e.unref(j)["wrapper--error"]]:l.error||l.errorStatus}]),max:l.max,maxlength:l.maxLength,min:l.min,name:l.name,placeholder:l.placeholder,value:l.modelValue,onBlur:i,onChange:c[0]||(c[0]=f=>l.$emit("change",f)),onFocus:c[1]||(c[1]=f=>o("focus",f)),onInput:a,onPaste:c[2]||(c[2]=f=>o("paste",f))},null,42,mt),l.counter||l.error?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(j).wrapper__bottom)},[l.error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(j).wrapper__errorMessage)},e.toDisplayString(l.error),3)):e.createCommentVNode("",!0),l.counter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(j).wrapper__counter)},e.toDisplayString(((u=l.modelValue)==null?void 0:u.toString().length)||0),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2)}}}),se={wrapper:"_wrapper_1hnht_36",wrapper__label:"_wrapper__label_1hnht_43",wrapper__input:"_wrapper__input_1hnht_67",wrapper_checked:"_wrapper_checked_1hnht_77",wrapper_disabled:"_wrapper_disabled_1hnht_84"},wt=["id","checked","disabled","name"],gt=["for"],bt=e.defineComponent({__name:"Toggle",props:{id:{},name:{},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=t,o=n,s=()=>{o("click",!r.checked)};return(a,i)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass([e.unref(se).wrapper,{[e.unref(se).wrapper_checked]:a.checked,[e.unref(se).wrapper_disabled]:a.disabled}])},[e.createElementVNode("input",{id:a.id,type:"checkbox",checked:a.checked,class:e.normalizeClass(e.unref(se).wrapper__input),disabled:a.disabled,name:a.name,onClick:s},null,10,wt),e.createElementVNode("label",{class:e.normalizeClass(e.unref(se).wrapper__label),for:a.id},null,10,gt)],2))}}),ee=Math.min,U=Math.max,de=Math.round,_e=Math.floor,M=t=>({x:t,y:t}),yt={left:"right",right:"left",bottom:"top",top:"bottom"},xt={start:"end",end:"start"};function ye(t,n,r){return U(t,ee(n,r))}function ae(t,n){return typeof t=="function"?t(n):t}function X(t){return t.split("-")[0]}function ie(t){return t.split("-")[1]}function Oe(t){return t==="x"?"y":"x"}function xe(t){return t==="y"?"height":"width"}function te(t){return["top","bottom"].includes(X(t))?"y":"x"}function ke(t){return Oe(te(t))}function kt(t,n,r){r===void 0&&(r=!1);const o=ie(t),s=ke(t),a=xe(s);let i=s==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(i=pe(i)),[i,pe(i)]}function Ct(t){const n=pe(t);return[Ce(t),n,Ce(n)]}function Ce(t){return t.replace(/start|end/g,n=>xt[n])}function Bt(t,n,r){const o=["left","right"],s=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return r?n?s:o:n?o:s;case"left":case"right":return n?a:i;default:return[]}}function Et(t,n,r,o){const s=ie(t);let a=Bt(X(t),r==="start",o);return s&&(a=a.map(i=>i+"-"+s),n&&(a=a.concat(a.map(Ce)))),a}function pe(t){return t.replace(/left|right|bottom|top/g,n=>yt[n])}function zt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ae(t){return typeof t!="number"?zt(t):{top:t,right:t,bottom:t,left:t}}function me(t){const{x:n,y:r,width:o,height:s}=t;return{width:o,height:s,top:r,left:n,right:n+o,bottom:r+s,x:n,y:r}}function Ne(t,n,r){let{reference:o,floating:s}=t;const a=te(n),i=ke(n),l=xe(i),c=X(n),u=a==="y",f=o.x+o.width/2-s.width/2,_=o.y+o.height/2-s.height/2,p=o[l]/2-s[l]/2;let d;switch(c){case"top":d={x:f,y:o.y-s.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:_};break;case"left":d={x:o.x-s.width,y:_};break;default:d={x:o.x,y:o.y}}switch(ie(n)){case"start":d[i]-=p*(r&&u?-1:1);break;case"end":d[i]+=p*(r&&u?-1:1);break}return d}const $t=async(t,n,r)=>{const{placement:o="bottom",strategy:s="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(n));let u=await i.getElementRects({reference:t,floating:n,strategy:s}),{x:f,y:_}=Ne(u,o,c),p=o,d={},m=0;for(let g=0;g<l.length;g++){const{name:b,fn:h}=l[g],{x,y:k,data:E,reset:y}=await h({x:f,y:_,initialPlacement:o,placement:p,strategy:s,middlewareData:d,rects:u,platform:i,elements:{reference:t,floating:n}});f=x??f,_=k??_,d={...d,[b]:{...d[b],...E}},y&&m<=50&&(m++,typeof y=="object"&&(y.placement&&(p=y.placement),y.rects&&(u=y.rects===!0?await i.getElementRects({reference:t,floating:n,strategy:s}):y.rects),{x:f,y:_}=Ne(u,p,c)),g=-1)}return{x:f,y:_,placement:p,strategy:s,middlewareData:d}};async function Ie(t,n){var r;n===void 0&&(n={});const{x:o,y:s,platform:a,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:_="floating",altBoundary:p=!1,padding:d=0}=ae(n,t),m=Ae(d),b=l[p?_==="floating"?"reference":"floating":_],h=me(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),x=_==="floating"?{x:o,y:s,width:i.floating.width,height:i.floating.height}:i.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},y=me(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:k,strategy:c}):x);return{top:(h.top-y.top+m.top)/E.y,bottom:(y.bottom-h.bottom+m.bottom)/E.y,left:(h.left-y.left+m.left)/E.x,right:(y.right-h.right+m.right)/E.x}}const St=t=>({name:"arrow",options:t,async fn(n){const{x:r,y:o,placement:s,rects:a,platform:i,elements:l,middlewareData:c}=n,{element:u,padding:f=0}=ae(t,n)||{};if(u==null)return{};const _=Ae(f),p={x:r,y:o},d=ke(s),m=xe(d),g=await i.getDimensions(u),b=d==="y",h=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",E=a.reference[m]+a.reference[d]-p[d]-a.floating[m],y=p[d]-a.reference[d],V=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let C=V?V[k]:0;(!C||!await(i.isElement==null?void 0:i.isElement(V)))&&(C=l.floating[k]||a.floating[m]);const T=E/2-y/2,w=C/2-g[m]/2-1,B=ee(_[h],w),z=ee(_[x],w),A=B,H=C-g[m]-z,$=C/2-g[m]/2+T,le=ye(A,$,H),W=!c.arrow&&ie(s)!=null&&$!==le&&a.reference[m]/2-($<A?B:z)-g[m]/2<0,P=W?$<A?$-A:$-H:0;return{[d]:p[d]+P,data:{[d]:le,centerOffset:$-le-P,...W&&{alignmentOffset:P}},reset:W}}}),Vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:s,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:f=!0,crossAxis:_=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=ae(t,n);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const h=X(s),x=te(l),k=X(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),y=p||(k||!g?[pe(l)]:Ct(l)),V=m!=="none";!p&&V&&y.push(...Et(l,g,m,E));const C=[l,...y],T=await Ie(n,b),w=[];let B=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&w.push(T[h]),_){const $=kt(s,i,E);w.push(T[$[0]],T[$[1]])}if(B=[...B,{placement:s,overflows:w}],!w.every($=>$<=0)){var z,A;const $=(((z=a.flip)==null?void 0:z.index)||0)+1,le=C[$];if(le)return{data:{index:$,overflows:B},reset:{placement:le}};let W=(A=B.filter(P=>P.overflows[0]<=0).sort((P,q)=>P.overflows[1]-q.overflows[1])[0])==null?void 0:A.placement;if(!W)switch(d){case"bestFit":{var H;const P=(H=B.filter(q=>{if(V){const Y=te(q.placement);return Y===x||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,fn)=>Y+fn,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:H[0];P&&(W=P);break}case"initialPlacement":W=l;break}if(s!==W)return{reset:{placement:W}}}return{}}}};async function Tt(t,n){const{placement:r,platform:o,elements:s}=t,a=await(o.isRTL==null?void 0:o.isRTL(s.floating)),i=X(r),l=ie(r),c=te(r)==="y",u=["left","top"].includes(i)?-1:1,f=a&&c?-1:1,_=ae(n,t);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return l&&typeof m=="number"&&(d=l==="end"?m*-1:m),c?{x:d*f,y:p*u}:{x:p*u,y:d*f}}const Rt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var r,o;const{x:s,y:a,placement:i,middlewareData:l}=n,c=await Tt(n,t);return i===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:i}}}}},Ot=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:s}=n,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:b=>{let{x:h,y:x}=b;return{x:h,y:x}}},...c}=ae(t,n),u={x:r,y:o},f=await Ie(n,c),_=te(X(s)),p=Oe(_);let d=u[p],m=u[_];if(a){const b=p==="y"?"top":"left",h=p==="y"?"bottom":"right",x=d+f[b],k=d-f[h];d=ye(x,d,k)}if(i){const b=_==="y"?"top":"left",h=_==="y"?"bottom":"right",x=m+f[b],k=m-f[h];m=ye(x,m,k)}const g=l.fn({...n,[p]:d,[_]:m});return{...g,data:{x:g.x-r,y:g.y-o,enabled:{[p]:a,[_]:i}}}}}};function he(){return typeof window<"u"}function K(t){return Be(t)?(t.nodeName||"").toLowerCase():"#document"}function O(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function L(t){var n;return(n=(Be(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Be(t){return he()?t instanceof Node||t instanceof O(t).Node:!1}function N(t){return he()?t instanceof Element||t instanceof O(t).Element:!1}function D(t){return he()?t instanceof HTMLElement||t instanceof O(t).HTMLElement:!1}function Me(t){return!he()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof O(t).ShadowRoot}function ce(t){const{overflow:n,overflowX:r,overflowY:o,display:s}=I(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!["inline","contents"].includes(s)}function At(t){return["table","td","th"].includes(K(t))}function we(t){return[":popover-open",":modal"].some(n=>{try{return t.matches(n)}catch{return!1}})}function Ee(t){const n=ze(),r=N(t)?I(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(r.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(r.contain||"").includes(o))}function Nt(t){let n=G(t);for(;D(n)&&!ne(n);){if(Ee(n))return n;if(we(n))return null;n=G(n)}return null}function ze(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ne(t){return["html","body","#document"].includes(K(t))}function I(t){return O(t).getComputedStyle(t)}function ge(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(K(t)==="html")return t;const n=t.assignedSlot||t.parentNode||Me(t)&&t.host||L(t);return Me(n)?n.host:n}function Le(t){const n=G(t);return ne(n)?t.ownerDocument?t.ownerDocument.body:t.body:D(n)&&ce(n)?n:Le(n)}function ue(t,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const s=Le(t),a=s===((o=t.ownerDocument)==null?void 0:o.body),i=O(s);if(a){const l=$e(i);return n.concat(i,i.visualViewport||[],ce(s)?s:[],l&&r?ue(l):[])}return n.concat(s,ue(s,[],r))}function $e(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function De(t){const n=I(t);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const s=D(t),a=s?t.offsetWidth:r,i=s?t.offsetHeight:o,l=de(r)!==a||de(o)!==i;return l&&(r=a,o=i),{width:r,height:o,$:l}}function Se(t){return N(t)?t:t.contextElement}function oe(t){const n=Se(t);if(!D(n))return M(1);const r=n.getBoundingClientRect(),{width:o,height:s,$:a}=De(n);let i=(a?de(r.width):r.width)/o,l=(a?de(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const It=M(0);function Pe(t){const n=O(t);return!ze()||!n.visualViewport?It:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Mt(t,n,r){return n===void 0&&(n=!1),!r||n&&r!==O(t)?!1:n}function Q(t,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),a=Se(t);let i=M(1);n&&(o?N(o)&&(i=oe(o)):i=oe(t));const l=Mt(a,r,o)?Pe(a):M(0);let c=(s.left+l.x)/i.x,u=(s.top+l.y)/i.y,f=s.width/i.x,_=s.height/i.y;if(a){const p=O(a),d=o&&N(o)?O(o):o;let m=p,g=$e(m);for(;g&&o&&d!==m;){const b=oe(g),h=g.getBoundingClientRect(),x=I(g),k=h.left+(g.clientLeft+parseFloat(x.paddingLeft))*b.x,E=h.top+(g.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,_*=b.y,c+=k,u+=E,m=O(g),g=$e(m)}}return me({width:f,height:_,x:c,y:u})}function Ve(t,n){const r=ge(t).scrollLeft;return n?n.left+r:Q(L(t)).left+r}function Fe(t,n,r){r===void 0&&(r=!1);const o=t.getBoundingClientRect(),s=o.left+n.scrollLeft-(r?0:Ve(t,o)),a=o.top+n.scrollTop;return{x:s,y:a}}function Lt(t){let{elements:n,rect:r,offsetParent:o,strategy:s}=t;const a=s==="fixed",i=L(o),l=n?we(n.floating):!1;if(o===i||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=M(1);const f=M(0),_=D(o);if((_||!_&&!a)&&((K(o)!=="body"||ce(i))&&(c=ge(o)),D(o))){const d=Q(o);u=oe(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const p=i&&!_&&!a?Fe(i,c,!0):M(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:r.y*u.y-c.scrollTop*u.y+f.y+p.y}}function Dt(t){return Array.from(t.getClientRects())}function Pt(t){const n=L(t),r=ge(t),o=t.ownerDocument.body,s=U(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),a=U(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let i=-r.scrollLeft+Ve(t);const l=-r.scrollTop;return I(o).direction==="rtl"&&(i+=U(n.clientWidth,o.clientWidth)-s),{width:s,height:a,x:i,y:l}}function Ft(t,n){const r=O(t),o=L(t),s=r.visualViewport;let a=o.clientWidth,i=o.clientHeight,l=0,c=0;if(s){a=s.width,i=s.height;const u=ze();(!u||u&&n==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:a,height:i,x:l,y:c}}function vt(t,n){const r=Q(t,!0,n==="fixed"),o=r.top+t.clientTop,s=r.left+t.clientLeft,a=D(t)?oe(t):M(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,c=s*a.x,u=o*a.y;return{width:i,height:l,x:c,y:u}}function ve(t,n,r){let o;if(n==="viewport")o=Ft(t,r);else if(n==="document")o=Pt(L(t));else if(N(n))o=vt(n,r);else{const s=Pe(t);o={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return me(o)}function He(t,n){const r=G(t);return r===n||!N(r)||ne(r)?!1:I(r).position==="fixed"||He(r,n)}function Ht(t,n){const r=n.get(t);if(r)return r;let o=ue(t,[],!1).filter(l=>N(l)&&K(l)!=="body"),s=null;const a=I(t).position==="fixed";let i=a?G(t):t;for(;N(i)&&!ne(i);){const l=I(i),c=Ee(i);!c&&l.position==="fixed"&&(s=null),(a?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ce(i)&&!c&&He(t,i))?o=o.filter(f=>f!==i):s=l,i=G(i)}return n.set(t,o),o}function Wt(t){let{element:n,boundary:r,rootBoundary:o,strategy:s}=t;const i=[...r==="clippingAncestors"?we(n)?[]:Ht(n,this._c):[].concat(r),o],l=i[0],c=i.reduce((u,f)=>{const _=ve(n,f,s);return u.top=U(_.top,u.top),u.right=ee(_.right,u.right),u.bottom=ee(_.bottom,u.bottom),u.left=U(_.left,u.left),u},ve(n,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function jt(t){const{width:n,height:r}=De(t);return{width:n,height:r}}function Gt(t,n,r){const o=D(n),s=L(n),a=r==="fixed",i=Q(t,!0,a,n);let l={scrollLeft:0,scrollTop:0};const c=M(0);if(o||!o&&!a)if((K(n)!=="body"||ce(s))&&(l=ge(n)),o){const p=Q(n,!0,a,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else s&&(c.x=Ve(s));const u=s&&!o&&!a?Fe(s,l):M(0),f=i.left+l.scrollLeft-c.x-u.x,_=i.top+l.scrollTop-c.y-u.y;return{x:f,y:_,width:i.width,height:i.height}}function Te(t){return I(t).position==="static"}function We(t,n){if(!D(t)||I(t).position==="fixed")return null;if(n)return n(t);let r=t.offsetParent;return L(t)===r&&(r=r.ownerDocument.body),r}function je(t,n){const r=O(t);if(we(t))return r;if(!D(t)){let s=G(t);for(;s&&!ne(s);){if(N(s)&&!Te(s))return s;s=G(s)}return r}let o=We(t,n);for(;o&&At(o)&&Te(o);)o=We(o,n);return o&&ne(o)&&Te(o)&&!Ee(o)?r:o||Nt(t)||r}const qt=async function(t){const n=this.getOffsetParent||je,r=this.getDimensions,o=await r(t.floating);return{reference:Gt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Yt(t){return I(t).direction==="rtl"}const Ut={convertOffsetParentRelativeRectToViewportRelativeRect:Lt,getDocumentElement:L,getClippingRect:Wt,getOffsetParent:je,getElementRects:qt,getClientRects:Dt,getDimensions:jt,getScale:oe,isElement:N,isRTL:Yt};function Ge(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function Xt(t,n){let r=null,o;const s=L(t);function a(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:f,top:_,width:p,height:d}=u;if(l||n(),!p||!d)return;const m=_e(_),g=_e(s.clientWidth-(f+p)),b=_e(s.clientHeight-(_+d)),h=_e(f),k={rootMargin:-m+"px "+-g+"px "+-b+"px "+-h+"px",threshold:U(0,ee(1,c))||1};let E=!0;function y(V){const C=V[0].intersectionRatio;if(C!==c){if(!E)return i();C?i(!1,C):o=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Ge(u,t.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(y,{...k,root:s.ownerDocument})}catch{r=new IntersectionObserver(y,k)}r.observe(t)}return i(!0),a}function Kt(t,n,r,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Se(t),f=s||a?[...u?ue(u):[],...ue(n)]:[];f.forEach(h=>{s&&h.addEventListener("scroll",r,{passive:!0}),a&&h.addEventListener("resize",r)});const _=u&&l?Xt(u,r):null;let p=-1,d=null;i&&(d=new ResizeObserver(h=>{let[x]=h;x&&x.target===u&&d&&(d.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=d)==null||k.observe(n)})),r()}),u&&!c&&d.observe(u),d.observe(n));let m,g=c?Q(t):null;c&&b();function b(){const h=Q(t);g&&!Ge(g,h)&&r(),g=h,m=requestAnimationFrame(b)}return r(),()=>{var h;f.forEach(x=>{s&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),_==null||_(),(h=d)==null||h.disconnect(),d=null,c&&cancelAnimationFrame(m)}}const Qt=Rt,Zt=Ot,Jt=Vt,en=St,tn=(t,n,r)=>{const o=new Map,s={platform:Ut,...r},a={...s.platform,_c:o};return $t(t,n,{...s,platform:a})};function nn(t){return t!=null&&typeof t=="object"&&"$el"in t}function Re(t){if(nn(t)){const n=t.$el;return Be(n)&&K(n)==="#comment"?null:n}return t}function re(t){return typeof t=="function"?t():e.unref(t)}function on(t){return{name:"arrow",options:t,fn(n){const r=Re(re(t.element));return r==null?{}:en({element:r,padding:t.padding}).fn(n)}}}function qe(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ye(t,n){const r=qe(t);return Math.round(n*r)/r}function rn(t,n,r){r===void 0&&(r={});const o=r.whileElementsMounted,s=e.computed(()=>{var C;return(C=re(r.open))!=null?C:!0}),a=e.computed(()=>re(r.middleware)),i=e.computed(()=>{var C;return(C=re(r.placement))!=null?C:"bottom"}),l=e.computed(()=>{var C;return(C=re(r.strategy))!=null?C:"absolute"}),c=e.computed(()=>{var C;return(C=re(r.transform))!=null?C:!0}),u=e.computed(()=>Re(t.value)),f=e.computed(()=>Re(n.value)),_=e.ref(0),p=e.ref(0),d=e.ref(l.value),m=e.ref(i.value),g=e.shallowRef({}),b=e.ref(!1),h=e.computed(()=>{const C={position:d.value,left:"0",top:"0"};if(!f.value)return C;const T=Ye(f.value,_.value),w=Ye(f.value,p.value);return c.value?{...C,transform:"translate("+T+"px, "+w+"px)",...qe(f.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:T+"px",top:w+"px"}});let x;function k(){if(u.value==null||f.value==null)return;const C=s.value;tn(u.value,f.value,{middleware:a.value,placement:i.value,strategy:l.value}).then(T=>{_.value=T.x,p.value=T.y,d.value=T.strategy,m.value=T.placement,g.value=T.middlewareData,b.value=C!==!1})}function E(){typeof x=="function"&&(x(),x=void 0)}function y(){if(E(),o===void 0){k();return}if(u.value!=null&&f.value!=null){x=o(u.value,f.value,k);return}}function V(){s.value||(b.value=!1)}return e.watch([a,i,l,s],k,{flush:"sync"}),e.watch([u,f],y,{flush:"sync"}),e.watch(s,V,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(E),{x:e.shallowReadonly(_),y:e.shallowReadonly(p),strategy:e.shallowReadonly(d),placement:e.shallowReadonly(m),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(b),floatingStyles:h,update:k}}let Ue=!1;const ln=()=>{if(Ue)return;Ue=!0;let t;Object.defineProperty(window,"wasTooltipShown",{get(){return clearTimeout(window.wasTooltipTimeout),window.wasTooltipTimeout=setTimeout(()=>{t=!1},2e3),t},set(n){t=n,clearTimeout(window.wasTooltipTimeout),n&&(window.wasTooltipTimeout=setTimeout(()=>{t=!1},2e3))},configurable:!0})};function sn(t=""){return typeof t=="string"?t.replace(/<\/style>/gi,"").replace(/<(.*?) on(.*?)=['"](.*?)>/gi,"").replace(/(<meta |<style|<\/*script)(.*?)>/gi,"").replace(/(<([^>]+)>)/ig,"").replace(/<(.*?) (href|src)="j(.*)a(.*)v(.*)a(.*)s(.*)c(.*)r(.*)i(.*)p(.*)t(.*):(.*?)>/gi,""):t}const fe={bubble:"_bubble_1qdad_1",trigger:"_trigger_1qdad_43",trigger__icon:"_trigger__icon_1qdad_51",arrow:"_arrow_1qdad_57",bubble__content:"_bubble__content_1qdad_79"},an=["innerHTML"],cn=["id"],Xe=1e3,un=e.defineComponent({__name:"Tooltip",props:{id:{},text:{},placement:{},status:{type:Boolean},preventXss:{type:Boolean},iconName:{}},setup(t){const n={top:"bottom",right:"left",bottom:"top",left:"right"};let r=null,o=null;typeof window<"u"&&window.wasTooltipShown===void 0&&(window.wasTooltipShown=!1);const s=t,a=e.ref(null),i=e.ref(null),l=e.ref(null),c=e.ref(!1),u=e.computed(()=>s.preventXss?sn(s.text):s.text),{floatingStyles:f,update:_,middlewareData:p,placement:d}=rn(i,a,{placement:e.computed(()=>s.placement||"bottom"),strategy:"fixed",whileElementsMounted:Kt,middleware:[Qt(10),Jt(),Zt(),on({element:l,padding:8})]}),m=()=>{r&&clearTimeout(r),o&&clearTimeout(o),window.wasTooltipShown?c.value=!0:r=setTimeout(()=>{c.value=!0,window.wasTooltipShown=!0},Xe)},g=()=>{o&&clearTimeout(o),o=setTimeout(()=>{c.value=!1,window.wasTooltipShown=!0},Xe)},b=()=>{o&&clearTimeout(o)},h=()=>{b(),m()},x=()=>{g()};e.watch(()=>s.placement,_),e.onBeforeMount(ln),e.onMounted(()=>{e.nextTick(_),window.addEventListener("resize",_)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",_)});const k=e.computed(()=>{const[y]=d.value.split("-");return{[n[y]]:"-4px"}}),E=e.computed(()=>{var y,V;return l.value?{left:((y=p.value.arrow)==null?void 0:y.x)!=null?`${p.value.arrow.x}px`:"",top:((V=p.value.arrow)==null?void 0:V.y)!=null?`${p.value.arrow.y}px`:"",right:"",bottom:"",...k.value}:{}});return(y,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[y.status||c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:a,class:e.normalizeClass(e.unref(fe).bubble),style:e.normalizeStyle(e.unref(f)),onMouseenter:h,onMouseleave:x},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(fe).bubble__content)},[e.createElementVNode("div",{innerHTML:u.value},null,8,an),e.renderSlot(y.$slots,"contentSlot")],2),e.createElementVNode("div",{ref_key:"floatingArrowRef",ref:l,class:e.normalizeClass(e.unref(fe).arrow),style:e.normalizeStyle(E.value)},null,6)],38)):e.createCommentVNode("",!0)])),e.createElementVNode("div",{id:y.id,ref_key:"triggerRef",ref:i,class:e.normalizeClass(e.unref(fe).trigger),onMouseenter:h,onMouseleave:x},[y.iconName?(e.openBlock(),e.createBlock(e.unref(J),{key:0,color:e.unref(fe).trigger__icon,name:y.iconName},null,8,["color","name"])):e.renderSlot(y.$slots,"default",{key:1})],42,cn)],64))}});R.Button=Qe,R.DropdownMenu=rt,R.Icon=J,R.NumberInput=ht,R.OnPageMessage=at,R.SegmentButton=ct,R.TextInput=_t,R.Toggle=bt,R.Tooltip=un,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
1
+ (function(R,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(R=typeof globalThis<"u"?globalThis:R||self,e(R.AbComponents={},R.Vue))})(this,function(R,e){"use strict";const Z={button__size_default:"_button__size_default_vssfh_1",button__size_small:"_button__size_small_vssfh_8",button:"_button_vssfh_1",button__label:"_button__label_vssfh_60","button__solid-primary":"_button__solid-primary_vssfh_72","no-hover-effect":"_no-hover-effect_vssfh_79","button--selected":"_button--selected_vssfh_101","button__solid-subtle-primary":"_button__solid-subtle-primary_vssfh_108","button__solid-secondary":"_button__solid-secondary_vssfh_144","button__solid-danger":"_button__solid-danger_vssfh_180","button__solid-warning":"_button__solid-warning_vssfh_216","button__solid-smart":"_button__solid-smart_vssfh_252","button__ghost-primary":"_button__ghost-primary_vssfh_288","button__ghost-subtle-primary":"_button__ghost-subtle-primary_vssfh_324","button__ghost-secondary":"_button__ghost-secondary_vssfh_360","button__ghost-danger":"_button__ghost-danger_vssfh_396","button__ghost-warning":"_button__ghost-warning_vssfh_432","button__ghost-smart":"_button__ghost-smart_vssfh_468","button__text-primary":"_button__text-primary_vssfh_504","button__text-text":"_button__text-text_vssfh_540","button__text-subtle-primary":"_button__text-subtle-primary_vssfh_576","button__text-secondary":"_button__text-secondary_vssfh_612","button__text-danger":"_button__text-danger_vssfh_648","button__text-warning":"_button__text-warning_vssfh_684","button__text-smart":"_button__text-smart_vssfh_720","button__outline-primary":"_button__outline-primary_vssfh_756","button__outline-subtle-primary":"_button__outline-subtle-primary_vssfh_793","button__outline-secondary":"_button__outline-secondary_vssfh_830","button__outline-danger":"_button__outline-danger_vssfh_867","button__outline-warning":"_button__outline-warning_vssfh_904","button__outline-smart":"_button__outline-smart_vssfh_941",button__solid:"_button__solid_vssfh_72",fill:"_fill_vssfh_992"},Ke=["disabled"],Qe=e.defineComponent({__name:"Button",props:{variant:{},color:{},size:{default:"default"},leftIconName:{},rightIconName:{},loadingStatus:{type:Boolean,default:!1},successStatus:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},fill:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=t,o=n,s=a=>{r.disabled||o("click",a)},i=e.computed(()=>r.loadingStatus?"loading-circle":r.successStatus?"line-check-natural":r.leftIconName);return(a,l)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass([e.unref(Z).button,e.unref(Z)[`button__${a.variant}`],e.unref(Z)[`button__${a.variant}-${a.color}`],e.unref(Z)[`button__size_${a.size}`],{[e.unref(Z).fill]:a.fill}]),disabled:r.disabled,onClick:s},[i.value?(e.openBlock(),e.createBlock(e.unref(J),{key:0,name:i.value},null,8,["name"])):e.createCommentVNode("",!0),a.label?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(Z).button__label)},e.toDisplayString(a.label),3)):e.createCommentVNode("",!0),a.rightIconName?(e.openBlock(),e.createBlock(e.unref(J),{key:2,name:a.rightIconName},null,8,["name"])):e.createCommentVNode("",!0)],10,Ke))}}),Ze={mounted(t,n){t.clickOutsideEvent=r=>{const o=(n.value.exclude||[]).filter(i=>i.value).map(i=>i.value);[t,...o].some(i=>i&&(i===r.target||i.contains(r.target)))||n.value.handler()},document.addEventListener("click",t.clickOutsideEvent)},unmounted(t){t.clickOutsideEvent&&document.removeEventListener("click",t.clickOutsideEvent)}},Je=(t,n)=>{var o;let r=0;for(const s of t)if(s.toLowerCase()===((o=n[r])==null?void 0:o.toLowerCase())&&r++,r===n.length)return!0;return!1},et=(t,n,r)=>{if(!r.trim())return t;const o=r.toLowerCase();return t.filter(s=>{const i=String(s[n]);return Je(i.toLowerCase(),o)}).sort((s,i)=>{const a=String(s[n]).toLowerCase(),l=String(i[n]).toLowerCase();return a===o?-1:l===o?1:a.startsWith(o)&&!l.startsWith(o)?-1:!a.startsWith(o)&&l.startsWith(o)?1:a.length-l.length})},S={menu:"_menu_1sfnf_1",dropdown:"_dropdown_1sfnf_1",dropdown__valueContent:"_dropdown__valueContent_1sfnf_50","dropdown__valueContent--open":"_dropdown__valueContent--open_1sfnf_58",dropdown__label:"_dropdown__label_1sfnf_61",dropdown__value:"_dropdown__value_1sfnf_50",dropdown__placeholder:"_dropdown__placeholder_1sfnf_69",dropdown__arrowIcon:"_dropdown__arrowIcon_1sfnf_77",menu__searchContainer:"_menu__searchContainer_1sfnf_92",menu__searchInputWrap:"_menu__searchInputWrap_1sfnf_96",menu__searchInput:"_menu__searchInput_1sfnf_96","menu__searchInput--error":"_menu__searchInput--error_1sfnf_112",menu__errorMessage:"_menu__errorMessage_1sfnf_115",menu__addButton:"_menu__addButton_1sfnf_122",menu__itemContainer:"_menu__itemContainer_1sfnf_130",menu__item:"_menu__item_1sfnf_130","menu__item--active":"_menu__item--active_1sfnf_169"},tt=["for"],nt=["placeholder"],ot=["onClick"],rt=e.defineComponent({__name:"DropdownMenu",props:{id:{},label:{},modelValue:{default:""},menuHeight:{default:154},placeholder:{},addable:{type:Boolean},addButtonText:{},searchable:{type:Boolean},searchPlaceHolder:{},items:{},validateAddItem:{type:Function,default:()=>null}},emits:["update:modelValue","add-error","item-added","select-item"],setup(t,{emit:n}){const r=Ze,o=t,s=n,i=e.ref(),a=e.ref(),l=e.ref(!1),c=e.ref(null),u=e.ref(""),f=e.ref(null),_=e.ref({x:0,y:0,width:0,shouldOpenUp:!1,height:o.menuHeight}),p=e.reactive([...o.items]),d=e.reactive([...o.items]),m=()=>{if(!i.value)return;const{offsetTop:w,offsetLeft:B,offsetWidth:z}=i.value,A=window.innerHeight,H=w+i.value.offsetHeight,$=H+o.menuHeight>A;_.value={x:B+window.scrollX,y:$?w+window.scrollY:H+window.scrollY,width:z,shouldOpenUp:$,height:o.menuHeight}},g=()=>{m(),l.value=!l.value},b=()=>{f.value=null,u.value="",p.splice(0,p.length,...d)},h=()=>{l.value=!1,b()},x=w=>{c.value=w,s("select-item",w),s("update:modelValue",w.value),h()},k=()=>{const w=u.value.trim(),B=o.validateAddItem(w,d);if(B){f.value=B,s("add-error",B);return}const z={text:w,value:w};d.push(z),b(),s("item-added",z)},E=()=>{const w=et(d,"text",u.value);p.splice(0,p.length,...w)},y=()=>{f.value=""},V=e.computed(()=>({top:_.value.shouldOpenUp?`${_.value.y-10}px`:`${_.value.y}px`,left:`${_.value.x}px`,width:`${_.value.width}px`,height:`${o.menuHeight}px`}));e.onMounted(()=>{if(m(),o.modelValue){const w=d.find(B=>B.value===o.modelValue);w&&(c.value=w)}});const C=e.computed(()=>c.value?c.value.text:"");e.watch(()=>o.modelValue,w=>{var B;if(((B=c.value)==null?void 0:B.value)!==w){const z=d.find(A=>A.value===w);z&&(c.value=z)}}),e.watch(()=>o.items,w=>{d.splice(0,d.length,...w),p.splice(0,p.length,...w)},{deep:!0});const T=e.ref({handler:h,exclude:[i,a]});return(w,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"dropdownRef",ref:i,class:e.normalizeClass(e.unref(S).dropdown)},[w.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(S).dropdown__label),for:w.id},e.toDisplayString(w.label),11,tt)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:e.normalizeClass([e.unref(S).dropdown__valueContent,{[e.unref(S)["dropdown__valueContent--open"]]:l.value}]),onClick:g},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(S).dropdown__value)},e.toDisplayString(C.value),3),w.placeholder&&!C.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(S).dropdown__placeholder)},e.toDisplayString(w.placeholder),3)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{fill:"none",height:"17",viewBox:"0 0 16 17",width:"16",xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass(e.unref(S).dropdown__arrowIcon)},B[2]||(B[2]=[e.createElementVNode("path",{d:"M8 11.2021L4.5359 6.70215L11.4641 6.70215L8 11.2021Z",fill:"#91949F"},null,-1)]),2))],2)],2),e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"menuRef",ref:a,class:e.normalizeClass(e.unref(S).menu),style:e.normalizeStyle(V.value),onClick:B[1]||(B[1]=e.withModifiers(()=>{},["prevent"]))},[o.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(S).menu__searchContainer)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(S).menu__searchInputWrap)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:e.normalizeClass([e.unref(S).menu__searchInput,{[e.unref(S)["menu__searchInput--error"]]:f.value}]),placeholder:w.searchPlaceHolder,"onUpdate:modelValue":B[0]||(B[0]=z=>u.value=z),onFocus:y,onInput:E},null,42,nt),[[e.vModelText,u.value]]),f.value?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(S).menu__errorMessage)},e.toDisplayString(f.value),3)):e.createCommentVNode("",!0)],2),o.addable?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(S).menu__addButton),onClick:k},e.toDisplayString(w.addButtonText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{class:e.normalizeClass(e.unref(S).menu__itemContainer)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p,(z,A)=>(e.openBlock(),e.createElementBlock("li",{key:`${z.value}-${A}`,class:e.normalizeClass([e.unref(S).menu__item,{[e.unref(S)["menu__item--active"]]:c.value&&z.value===c.value.value}]),onClick:H=>x(z)},e.toDisplayString(z.text),11,ot))),128))],2)],6)),[[e.vShow,l.value],[e.unref(r),T.value]])],64))}}),lt=["fill","height","width"],st=["xlink:href"],J=((t,n)=>{const r=t.__vccOpts||t;for(const[o,s]of n)r[o]=s;return r})(e.defineComponent({__name:"Icon",props:{name:{},size:{default:16},color:{}},setup(t){const n=t,r=e.computed(()=>typeof n.size=="number"?`${n.size}px`:n.size);return(o,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"icon",fill:o.color||"currentColor",height:r.value,width:r.value},[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,st)],8,lt))}}),[["__scopeId","data-v-f04c8857"]]),be={container:"_container_sgker_1",container__text:"_container__text_sgker_52",container__default:"_container__default_sgker_56",container__warning:"_container__warning_sgker_64",container__alert:"_container__alert_sgker_72",container__success:"_container__success_sgker_80"},it=e.defineComponent({__name:"OnPageMessage",props:{variant:{default:"default"},text:{}},setup(t){const n=t,r=e.computed(()=>{switch(n.variant){case"alert":return"icon-info-box-error";case"warning":return"line-caution-triangle";case"success":return"line-check-natural";default:return"filled-info-circle"}});return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(be).container,e.unref(be)[`container__${o.variant}`]])},[e.createVNode(J,{name:r.value,size:24},null,8,["name"]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(be).container__text)},e.toDisplayString(o.text),3)],2))}}),F={button__size_default:"_button__size_default_1663t_1",button__size_small:"_button__size_small_1663t_8",button:"_button_1663t_1",button__label:"_button__label_1663t_58","button--primary":"_button--primary_1663t_75","button--selected":"_button--selected_1663t_85","button--secondary":"_button--secondary_1663t_98","button--danger":"_button--danger_1663t_121","button--warning":"_button--warning_1663t_144","button--smart":"_button--smart_1663t_167",button__solid:"_button__solid_1663t_197",segmentGroup:"_segmentGroup_1663t_204","segmentGroup--vertical":"_segmentGroup--vertical_1663t_207","segmentGroup--horizontal":"_segmentGroup--horizontal_1663t_216",fill:"_fill_1663t_226"},at=["disabled","onClick"],ct=e.defineComponent({__name:"SegmentButton",props:{color:{},size:{default:"default"},align:{default:"horizontal"},disabled:{type:Boolean,default:!1},segments:{},fill:{type:Boolean},modelValue:{}},emits:["update:modelValue","click"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(r.modelValue||""),i=l=>{r.disabled||l.disabled||(s.value=l.value,o("update:modelValue",l.value),o("click",l.value))};e.watch(()=>r.modelValue,l=>{s.value!==l&&(s.value=l||"")});const a=e.ref([...r.segments]);return e.watch(()=>r.segments,l=>{a.value=[...l],l.some(c=>c.value===s.value)||(s.value="",o("update:modelValue",""))},{deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(F).segmentGroup,e.unref(F)[`segmentGroup--${l.align}`],{[e.unref(F).fill]:l.fill}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,f)=>(e.openBlock(),e.createElementBlock("button",{key:`${u.value}-${f}`,class:e.normalizeClass([e.unref(F).button,e.unref(F)[`button--${l.color}`],e.unref(F)[`button__size_${l.size}`],e.unref(F).fill,{[e.unref(F)["button--selected"]]:u.value===s.value}]),disabled:u.disabled||r.disabled,onClick:_=>i(u)},[u.icon?(e.openBlock(),e.createBlock(e.unref(J),{key:0,name:u.icon},null,8,["name"])):e.createCommentVNode("",!0),u.label?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(F).button__label)},e.toDisplayString(u.label),3)):e.createCommentVNode("",!0)],10,at))),128))],2))}}),v={wrapper__counter:"_wrapper__counter_rlffg_1",wrapper__errorMessage:"_wrapper__errorMessage_rlffg_1",wrapper__label:"_wrapper__label_rlffg_1",wrapper__field:"_wrapper__field_rlffg_1",wrapper:"_wrapper_rlffg_1",wrapper__bottom:"_wrapper__bottom_rlffg_92","wrapper--error":"_wrapper--error_rlffg_105"},ut=["for"],ft=["id","maxlength","name","placeholder","value"],dt=["id","maxlength","name","placeholder","value"],_t=e.defineComponent({__name:"TextInput",props:{id:{},name:{},modelValue:{default:""},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},maxHeight:{default:void 0},error:{default:""},multiline:{type:Boolean,default:!1},autoGrow:{type:Boolean,default:!1},counter:{type:Boolean}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(null),i=()=>{if(r.autoGrow&&s.value){s.value.style.height="";const l=Math.min(s.value.scrollHeight,r.maxHeight||s.value.scrollHeight);s.value.style.height=`${l}px`}},a=l=>{const c=l.target;o("input",l),o("update:modelValue",c.value),i()};return e.onMounted(()=>{i()}),(l,c)=>{var u;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(v).wrapper)},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(v).wrapper__label),for:l.id},e.toDisplayString(l.label),11,ut)):e.createCommentVNode("",!0),l.multiline?(e.openBlock(),e.createElementBlock("textarea",{key:1,id:l.id,ref_key:"textareaRef",ref:s,class:e.normalizeClass([e.unref(v).wrapper__field,{[e.unref(v)["wrapper--error"]]:l.error}]),maxlength:l.maxLength,name:l.name,placeholder:l.placeholder,style:e.normalizeStyle(l.maxHeight?{maxHeight:`${l.maxHeight}px`}:void 0),value:l.modelValue,onBlur:c[0]||(c[0]=f=>o("blur",f)),onChange:c[1]||(c[1]=f=>l.$emit("change",f)),onFocus:c[2]||(c[2]=f=>o("focus",f)),onInput:a,onPaste:c[3]||(c[3]=f=>o("paste",f))},null,46,ft)):(e.openBlock(),e.createElementBlock("input",{key:2,id:l.id,type:"text",class:e.normalizeClass([e.unref(v).wrapper__field,{[e.unref(v)["wrapper--error"]]:l.error}]),maxlength:l.maxLength,name:l.name,placeholder:l.placeholder,value:l.modelValue,onBlur:c[4]||(c[4]=f=>o("blur",f)),onChange:c[5]||(c[5]=f=>l.$emit("change",f)),onFocus:c[6]||(c[6]=f=>o("focus",f)),onInput:a,onPaste:c[7]||(c[7]=f=>o("paste",f))},null,42,dt)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(v).wrapper__bottom)},[l.error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v).wrapper__errorMessage)},e.toDisplayString(l.error),3)):e.createCommentVNode("",!0),l.counter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(v).wrapper__counter)},e.toDisplayString(((u=l.modelValue)==null?void 0:u.toString().length)||0),3)):e.createCommentVNode("",!0)],2)],2)}}}),j={wrapper__counter:"_wrapper__counter_86wjx_1",wrapper__errorMessage:"_wrapper__errorMessage_86wjx_1",wrapper__label:"_wrapper__label_86wjx_1",wrapper__field:"_wrapper__field_86wjx_8",wrapper:"_wrapper_86wjx_1",wrapper__size_default:"_wrapper__size_default_86wjx_52",wrapper__size_small:"_wrapper__size_small_86wjx_55",wrapper__bottom:"_wrapper__bottom_86wjx_92","wrapper--error":"_wrapper--error_86wjx_105"},pt=["for"],mt=["id","max","maxlength","min","name","placeholder","value"],ht=e.defineComponent({__name:"NumberInput",props:{id:{},name:{},modelValue:{default:void 0},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},error:{default:""},errorStatus:{type:Boolean},counter:{type:Boolean},min:{default:void 0},max:{default:void 0},size:{default:"default"}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(t,{emit:n}){const r=t,o=n,s=l=>{if(l==="")return l;const c=Number(l);return typeof r.min=="number"&&c<r.min?r.min.toString():typeof r.max=="number"&&c>r.max?r.max.toString():c.toString()},i=l=>{const c=l.target,u=s(c.value);c.value=u,o("input",l),o("update:modelValue",Number(u))},a=l=>{const c=l.target,u=c.value,f=s(c.value===""?String(r.min||0):c.value);c.value=f,o("blur",l),u!==f&&o("update:modelValue",Number(f))};return(l,c)=>{var u;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(j).wrapper,e.unref(j)[`wrapper__size_${l.size}`]])},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(e.unref(j).wrapper__label),for:l.id},e.toDisplayString(l.label),11,pt)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:l.id,type:"number",class:e.normalizeClass([e.unref(j).wrapper__field,{[e.unref(j)["wrapper--error"]]:l.error||l.errorStatus}]),max:l.max,maxlength:l.maxLength,min:l.min,name:l.name,placeholder:l.placeholder,value:l.modelValue,onBlur:a,onChange:c[0]||(c[0]=f=>l.$emit("change",f)),onFocus:c[1]||(c[1]=f=>o("focus",f)),onInput:i,onPaste:c[2]||(c[2]=f=>o("paste",f))},null,42,mt),l.counter||l.error?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(j).wrapper__bottom)},[l.error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(j).wrapper__errorMessage)},e.toDisplayString(l.error),3)):e.createCommentVNode("",!0),l.counter?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(j).wrapper__counter)},e.toDisplayString(((u=l.modelValue)==null?void 0:u.toString().length)||0),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2)}}}),se={wrapper:"_wrapper_1hnht_36",wrapper__label:"_wrapper__label_1hnht_43",wrapper__input:"_wrapper__input_1hnht_67",wrapper_checked:"_wrapper_checked_1hnht_77",wrapper_disabled:"_wrapper_disabled_1hnht_84"},wt=["id","checked","disabled","name"],gt=["for"],bt=e.defineComponent({__name:"Toggle",props:{id:{},name:{},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=t,o=n,s=()=>{o("click",!r.checked)};return(i,a)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass([e.unref(se).wrapper,{[e.unref(se).wrapper_checked]:i.checked,[e.unref(se).wrapper_disabled]:i.disabled}])},[e.createElementVNode("input",{id:i.id,type:"checkbox",checked:i.checked,class:e.normalizeClass(e.unref(se).wrapper__input),disabled:i.disabled,name:i.name,onClick:s},null,10,wt),e.createElementVNode("label",{class:e.normalizeClass(e.unref(se).wrapper__label),for:i.id},null,10,gt)],2))}}),ee=Math.min,X=Math.max,de=Math.round,_e=Math.floor,M=t=>({x:t,y:t}),yt={left:"right",right:"left",bottom:"top",top:"bottom"},xt={start:"end",end:"start"};function ye(t,n,r){return X(t,ee(n,r))}function ie(t,n){return typeof t=="function"?t(n):t}function q(t){return t.split("-")[0]}function ae(t){return t.split("-")[1]}function Oe(t){return t==="x"?"y":"x"}function xe(t){return t==="y"?"height":"width"}function te(t){return["top","bottom"].includes(q(t))?"y":"x"}function ke(t){return Oe(te(t))}function kt(t,n,r){r===void 0&&(r=!1);const o=ae(t),s=ke(t),i=xe(s);let a=s==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[i]>n.floating[i]&&(a=pe(a)),[a,pe(a)]}function Ct(t){const n=pe(t);return[Ce(t),n,Ce(n)]}function Ce(t){return t.replace(/start|end/g,n=>xt[n])}function Bt(t,n,r){const o=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return r?n?s:o:n?o:s;case"left":case"right":return n?i:a;default:return[]}}function Et(t,n,r,o){const s=ae(t);let i=Bt(q(t),r==="start",o);return s&&(i=i.map(a=>a+"-"+s),n&&(i=i.concat(i.map(Ce)))),i}function pe(t){return t.replace(/left|right|bottom|top/g,n=>yt[n])}function zt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ae(t){return typeof t!="number"?zt(t):{top:t,right:t,bottom:t,left:t}}function me(t){const{x:n,y:r,width:o,height:s}=t;return{width:o,height:s,top:r,left:n,right:n+o,bottom:r+s,x:n,y:r}}function Ne(t,n,r){let{reference:o,floating:s}=t;const i=te(n),a=ke(n),l=xe(a),c=q(n),u=i==="y",f=o.x+o.width/2-s.width/2,_=o.y+o.height/2-s.height/2,p=o[l]/2-s[l]/2;let d;switch(c){case"top":d={x:f,y:o.y-s.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:_};break;case"left":d={x:o.x-s.width,y:_};break;default:d={x:o.x,y:o.y}}switch(ae(n)){case"start":d[a]-=p*(r&&u?-1:1);break;case"end":d[a]+=p*(r&&u?-1:1);break}return d}const $t=async(t,n,r)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(n));let u=await a.getElementRects({reference:t,floating:n,strategy:s}),{x:f,y:_}=Ne(u,o,c),p=o,d={},m=0;for(let g=0;g<l.length;g++){const{name:b,fn:h}=l[g],{x,y:k,data:E,reset:y}=await h({x:f,y:_,initialPlacement:o,placement:p,strategy:s,middlewareData:d,rects:u,platform:a,elements:{reference:t,floating:n}});f=x??f,_=k??_,d={...d,[b]:{...d[b],...E}},y&&m<=50&&(m++,typeof y=="object"&&(y.placement&&(p=y.placement),y.rects&&(u=y.rects===!0?await a.getElementRects({reference:t,floating:n,strategy:s}):y.rects),{x:f,y:_}=Ne(u,p,c)),g=-1)}return{x:f,y:_,placement:p,strategy:s,middlewareData:d}};async function Ie(t,n){var r;n===void 0&&(n={});const{x:o,y:s,platform:i,rects:a,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:_="floating",altBoundary:p=!1,padding:d=0}=ie(n,t),m=Ae(d),b=l[p?_==="floating"?"reference":"floating":_],h=me(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),x=_==="floating"?{x:o,y:s,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),E=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},y=me(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:k,strategy:c}):x);return{top:(h.top-y.top+m.top)/E.y,bottom:(y.bottom-h.bottom+m.bottom)/E.y,left:(h.left-y.left+m.left)/E.x,right:(y.right-h.right+m.right)/E.x}}const St=t=>({name:"arrow",options:t,async fn(n){const{x:r,y:o,placement:s,rects:i,platform:a,elements:l,middlewareData:c}=n,{element:u,padding:f=0}=ie(t,n)||{};if(u==null)return{};const _=Ae(f),p={x:r,y:o},d=ke(s),m=xe(d),g=await a.getDimensions(u),b=d==="y",h=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",E=i.reference[m]+i.reference[d]-p[d]-i.floating[m],y=p[d]-i.reference[d],V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let C=V?V[k]:0;(!C||!await(a.isElement==null?void 0:a.isElement(V)))&&(C=l.floating[k]||i.floating[m]);const T=E/2-y/2,w=C/2-g[m]/2-1,B=ee(_[h],w),z=ee(_[x],w),A=B,H=C-g[m]-z,$=C/2-g[m]/2+T,le=ye(A,$,H),W=!c.arrow&&ae(s)!=null&&$!==le&&i.reference[m]/2-($<A?B:z)-g[m]/2<0,P=W?$<A?$-A:$-H:0;return{[d]:p[d]+P,data:{[d]:le,centerOffset:$-le-P,...W&&{alignmentOffset:P}},reset:W}}}),Vt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:s,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:f=!0,crossAxis:_=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=ie(t,n);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const h=q(s),x=te(l),k=q(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),y=p||(k||!g?[pe(l)]:Ct(l)),V=m!=="none";!p&&V&&y.push(...Et(l,g,m,E));const C=[l,...y],T=await Ie(n,b),w=[];let B=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&w.push(T[h]),_){const $=kt(s,a,E);w.push(T[$[0]],T[$[1]])}if(B=[...B,{placement:s,overflows:w}],!w.every($=>$<=0)){var z,A;const $=(((z=i.flip)==null?void 0:z.index)||0)+1,le=C[$];if(le)return{data:{index:$,overflows:B},reset:{placement:le}};let W=(A=B.filter(P=>P.overflows[0]<=0).sort((P,Y)=>P.overflows[1]-Y.overflows[1])[0])==null?void 0:A.placement;if(!W)switch(d){case"bestFit":{var H;const P=(H=B.filter(Y=>{if(V){const U=te(Y.placement);return U===x||U==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(U=>U>0).reduce((U,fn)=>U+fn,0)]).sort((Y,U)=>Y[1]-U[1])[0])==null?void 0:H[0];P&&(W=P);break}case"initialPlacement":W=l;break}if(s!==W)return{reset:{placement:W}}}return{}}}};async function Tt(t,n){const{placement:r,platform:o,elements:s}=t,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),a=q(r),l=ae(r),c=te(r)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,_=ie(n,t);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return l&&typeof m=="number"&&(d=l==="end"?m*-1:m),c?{x:d*f,y:p*u}:{x:p*u,y:d*f}}const Rt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var r,o;const{x:s,y:i,placement:a,middlewareData:l}=n,c=await Tt(n,t);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},Ot=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:s}=n,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:h,y:x}=b;return{x:h,y:x}}},...c}=ie(t,n),u={x:r,y:o},f=await Ie(n,c),_=te(q(s)),p=Oe(_);let d=u[p],m=u[_];if(i){const b=p==="y"?"top":"left",h=p==="y"?"bottom":"right",x=d+f[b],k=d-f[h];d=ye(x,d,k)}if(a){const b=_==="y"?"top":"left",h=_==="y"?"bottom":"right",x=m+f[b],k=m-f[h];m=ye(x,m,k)}const g=l.fn({...n,[p]:d,[_]:m});return{...g,data:{x:g.x-r,y:g.y-o,enabled:{[p]:i,[_]:a}}}}}};function he(){return typeof window<"u"}function K(t){return Be(t)?(t.nodeName||"").toLowerCase():"#document"}function O(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function L(t){var n;return(n=(Be(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Be(t){return he()?t instanceof Node||t instanceof O(t).Node:!1}function N(t){return he()?t instanceof Element||t instanceof O(t).Element:!1}function D(t){return he()?t instanceof HTMLElement||t instanceof O(t).HTMLElement:!1}function Me(t){return!he()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof O(t).ShadowRoot}function ce(t){const{overflow:n,overflowX:r,overflowY:o,display:s}=I(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!["inline","contents"].includes(s)}function At(t){return["table","td","th"].includes(K(t))}function we(t){return[":popover-open",":modal"].some(n=>{try{return t.matches(n)}catch{return!1}})}function Ee(t){const n=ze(),r=N(t)?I(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(r.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(r.contain||"").includes(o))}function Nt(t){let n=G(t);for(;D(n)&&!ne(n);){if(Ee(n))return n;if(we(n))return null;n=G(n)}return null}function ze(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ne(t){return["html","body","#document"].includes(K(t))}function I(t){return O(t).getComputedStyle(t)}function ge(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(K(t)==="html")return t;const n=t.assignedSlot||t.parentNode||Me(t)&&t.host||L(t);return Me(n)?n.host:n}function Le(t){const n=G(t);return ne(n)?t.ownerDocument?t.ownerDocument.body:t.body:D(n)&&ce(n)?n:Le(n)}function ue(t,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const s=Le(t),i=s===((o=t.ownerDocument)==null?void 0:o.body),a=O(s);if(i){const l=$e(a);return n.concat(a,a.visualViewport||[],ce(s)?s:[],l&&r?ue(l):[])}return n.concat(s,ue(s,[],r))}function $e(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function De(t){const n=I(t);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const s=D(t),i=s?t.offsetWidth:r,a=s?t.offsetHeight:o,l=de(r)!==i||de(o)!==a;return l&&(r=i,o=a),{width:r,height:o,$:l}}function Se(t){return N(t)?t:t.contextElement}function oe(t){const n=Se(t);if(!D(n))return M(1);const r=n.getBoundingClientRect(),{width:o,height:s,$:i}=De(n);let a=(i?de(r.width):r.width)/o,l=(i?de(r.height):r.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const It=M(0);function Pe(t){const n=O(t);return!ze()||!n.visualViewport?It:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Mt(t,n,r){return n===void 0&&(n=!1),!r||n&&r!==O(t)?!1:n}function Q(t,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Se(t);let a=M(1);n&&(o?N(o)&&(a=oe(o)):a=oe(t));const l=Mt(i,r,o)?Pe(i):M(0);let c=(s.left+l.x)/a.x,u=(s.top+l.y)/a.y,f=s.width/a.x,_=s.height/a.y;if(i){const p=O(i),d=o&&N(o)?O(o):o;let m=p,g=$e(m);for(;g&&o&&d!==m;){const b=oe(g),h=g.getBoundingClientRect(),x=I(g),k=h.left+(g.clientLeft+parseFloat(x.paddingLeft))*b.x,E=h.top+(g.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,_*=b.y,c+=k,u+=E,m=O(g),g=$e(m)}}return me({width:f,height:_,x:c,y:u})}function Ve(t,n){const r=ge(t).scrollLeft;return n?n.left+r:Q(L(t)).left+r}function Fe(t,n,r){r===void 0&&(r=!1);const o=t.getBoundingClientRect(),s=o.left+n.scrollLeft-(r?0:Ve(t,o)),i=o.top+n.scrollTop;return{x:s,y:i}}function Lt(t){let{elements:n,rect:r,offsetParent:o,strategy:s}=t;const i=s==="fixed",a=L(o),l=n?we(n.floating):!1;if(o===a||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=M(1);const f=M(0),_=D(o);if((_||!_&&!i)&&((K(o)!=="body"||ce(a))&&(c=ge(o)),D(o))){const d=Q(o);u=oe(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const p=a&&!_&&!i?Fe(a,c,!0):M(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:r.y*u.y-c.scrollTop*u.y+f.y+p.y}}function Dt(t){return Array.from(t.getClientRects())}function Pt(t){const n=L(t),r=ge(t),o=t.ownerDocument.body,s=X(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=X(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+Ve(t);const l=-r.scrollTop;return I(o).direction==="rtl"&&(a+=X(n.clientWidth,o.clientWidth)-s),{width:s,height:i,x:a,y:l}}function Ft(t,n){const r=O(t),o=L(t),s=r.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,c=0;if(s){i=s.width,a=s.height;const u=ze();(!u||u&&n==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:i,height:a,x:l,y:c}}function vt(t,n){const r=Q(t,!0,n==="fixed"),o=r.top+t.clientTop,s=r.left+t.clientLeft,i=D(t)?oe(t):M(1),a=t.clientWidth*i.x,l=t.clientHeight*i.y,c=s*i.x,u=o*i.y;return{width:a,height:l,x:c,y:u}}function ve(t,n,r){let o;if(n==="viewport")o=Ft(t,r);else if(n==="document")o=Pt(L(t));else if(N(n))o=vt(n,r);else{const s=Pe(t);o={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return me(o)}function He(t,n){const r=G(t);return r===n||!N(r)||ne(r)?!1:I(r).position==="fixed"||He(r,n)}function Ht(t,n){const r=n.get(t);if(r)return r;let o=ue(t,[],!1).filter(l=>N(l)&&K(l)!=="body"),s=null;const i=I(t).position==="fixed";let a=i?G(t):t;for(;N(a)&&!ne(a);){const l=I(a),c=Ee(a);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ce(a)&&!c&&He(t,a))?o=o.filter(f=>f!==a):s=l,a=G(a)}return n.set(t,o),o}function Wt(t){let{element:n,boundary:r,rootBoundary:o,strategy:s}=t;const a=[...r==="clippingAncestors"?we(n)?[]:Ht(n,this._c):[].concat(r),o],l=a[0],c=a.reduce((u,f)=>{const _=ve(n,f,s);return u.top=X(_.top,u.top),u.right=ee(_.right,u.right),u.bottom=ee(_.bottom,u.bottom),u.left=X(_.left,u.left),u},ve(n,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function jt(t){const{width:n,height:r}=De(t);return{width:n,height:r}}function Gt(t,n,r){const o=D(n),s=L(n),i=r==="fixed",a=Q(t,!0,i,n);let l={scrollLeft:0,scrollTop:0};const c=M(0);if(o||!o&&!i)if((K(n)!=="body"||ce(s))&&(l=ge(n)),o){const p=Q(n,!0,i,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else s&&(c.x=Ve(s));const u=s&&!o&&!i?Fe(s,l):M(0),f=a.left+l.scrollLeft-c.x-u.x,_=a.top+l.scrollTop-c.y-u.y;return{x:f,y:_,width:a.width,height:a.height}}function Te(t){return I(t).position==="static"}function We(t,n){if(!D(t)||I(t).position==="fixed")return null;if(n)return n(t);let r=t.offsetParent;return L(t)===r&&(r=r.ownerDocument.body),r}function je(t,n){const r=O(t);if(we(t))return r;if(!D(t)){let s=G(t);for(;s&&!ne(s);){if(N(s)&&!Te(s))return s;s=G(s)}return r}let o=We(t,n);for(;o&&At(o)&&Te(o);)o=We(o,n);return o&&ne(o)&&Te(o)&&!Ee(o)?r:o||Nt(t)||r}const Yt=async function(t){const n=this.getOffsetParent||je,r=this.getDimensions,o=await r(t.floating);return{reference:Gt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ut(t){return I(t).direction==="rtl"}const Xt={convertOffsetParentRelativeRectToViewportRelativeRect:Lt,getDocumentElement:L,getClippingRect:Wt,getOffsetParent:je,getElementRects:Yt,getClientRects:Dt,getDimensions:jt,getScale:oe,isElement:N,isRTL:Ut};function Ge(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function qt(t,n){let r=null,o;const s=L(t);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=t.getBoundingClientRect(),{left:f,top:_,width:p,height:d}=u;if(l||n(),!p||!d)return;const m=_e(_),g=_e(s.clientWidth-(f+p)),b=_e(s.clientHeight-(_+d)),h=_e(f),k={rootMargin:-m+"px "+-g+"px "+-b+"px "+-h+"px",threshold:X(0,ee(1,c))||1};let E=!0;function y(V){const C=V[0].intersectionRatio;if(C!==c){if(!E)return a();C?a(!1,C):o=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!Ge(u,t.getBoundingClientRect())&&a(),E=!1}try{r=new IntersectionObserver(y,{...k,root:s.ownerDocument})}catch{r=new IntersectionObserver(y,k)}r.observe(t)}return a(!0),i}function Kt(t,n,r,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Se(t),f=s||i?[...u?ue(u):[],...ue(n)]:[];f.forEach(h=>{s&&h.addEventListener("scroll",r,{passive:!0}),i&&h.addEventListener("resize",r)});const _=u&&l?qt(u,r):null;let p=-1,d=null;a&&(d=new ResizeObserver(h=>{let[x]=h;x&&x.target===u&&d&&(d.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=d)==null||k.observe(n)})),r()}),u&&!c&&d.observe(u),d.observe(n));let m,g=c?Q(t):null;c&&b();function b(){const h=Q(t);g&&!Ge(g,h)&&r(),g=h,m=requestAnimationFrame(b)}return r(),()=>{var h;f.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),_==null||_(),(h=d)==null||h.disconnect(),d=null,c&&cancelAnimationFrame(m)}}const Qt=Rt,Zt=Ot,Jt=Vt,en=St,tn=(t,n,r)=>{const o=new Map,s={platform:Xt,...r},i={...s.platform,_c:o};return $t(t,n,{...s,platform:i})};function nn(t){return t!=null&&typeof t=="object"&&"$el"in t}function Re(t){if(nn(t)){const n=t.$el;return Be(n)&&K(n)==="#comment"?null:n}return t}function re(t){return typeof t=="function"?t():e.unref(t)}function on(t){return{name:"arrow",options:t,fn(n){const r=Re(re(t.element));return r==null?{}:en({element:r,padding:t.padding}).fn(n)}}}function Ye(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ue(t,n){const r=Ye(t);return Math.round(n*r)/r}function rn(t,n,r){r===void 0&&(r={});const o=r.whileElementsMounted,s=e.computed(()=>{var C;return(C=re(r.open))!=null?C:!0}),i=e.computed(()=>re(r.middleware)),a=e.computed(()=>{var C;return(C=re(r.placement))!=null?C:"bottom"}),l=e.computed(()=>{var C;return(C=re(r.strategy))!=null?C:"absolute"}),c=e.computed(()=>{var C;return(C=re(r.transform))!=null?C:!0}),u=e.computed(()=>Re(t.value)),f=e.computed(()=>Re(n.value)),_=e.ref(0),p=e.ref(0),d=e.ref(l.value),m=e.ref(a.value),g=e.shallowRef({}),b=e.ref(!1),h=e.computed(()=>{const C={position:d.value,left:"0",top:"0"};if(!f.value)return C;const T=Ue(f.value,_.value),w=Ue(f.value,p.value);return c.value?{...C,transform:"translate("+T+"px, "+w+"px)",...Ye(f.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:T+"px",top:w+"px"}});let x;function k(){if(u.value==null||f.value==null)return;const C=s.value;tn(u.value,f.value,{middleware:i.value,placement:a.value,strategy:l.value}).then(T=>{_.value=T.x,p.value=T.y,d.value=T.strategy,m.value=T.placement,g.value=T.middlewareData,b.value=C!==!1})}function E(){typeof x=="function"&&(x(),x=void 0)}function y(){if(E(),o===void 0){k();return}if(u.value!=null&&f.value!=null){x=o(u.value,f.value,k);return}}function V(){s.value||(b.value=!1)}return e.watch([i,a,l,s],k,{flush:"sync"}),e.watch([u,f],y,{flush:"sync"}),e.watch(s,V,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(E),{x:e.shallowReadonly(_),y:e.shallowReadonly(p),strategy:e.shallowReadonly(d),placement:e.shallowReadonly(m),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(b),floatingStyles:h,update:k}}let Xe=!1;const ln=()=>{if(Xe)return;Xe=!0;let t;Object.defineProperty(window,"wasTooltipShown",{get(){return clearTimeout(window.wasTooltipTimeout),window.wasTooltipTimeout=setTimeout(()=>{t=!1},2e3),t},set(n){t=n,clearTimeout(window.wasTooltipTimeout),n&&(window.wasTooltipTimeout=setTimeout(()=>{t=!1},2e3))},configurable:!0})};function sn(t=""){return typeof t=="string"?t.replace(/<\/style>/gi,"").replace(/<(.*?) on(.*?)=['"](.*?)>/gi,"").replace(/(<meta |<style|<\/*script)(.*?)>/gi,"").replace(/(<([^>]+)>)/ig,"").replace(/<(.*?) (href|src)="j(.*)a(.*)v(.*)a(.*)s(.*)c(.*)r(.*)i(.*)p(.*)t(.*):(.*?)>/gi,""):t}const fe={bubble:"_bubble_1jxs4_1",trigger:"_trigger_1jxs4_43",trigger__icon:"_trigger__icon_1jxs4_51",arrow:"_arrow_1jxs4_57",bubble__content:"_bubble__content_1jxs4_79"},an=["innerHTML"],cn=["id"],qe=1e3,un=e.defineComponent({__name:"Tooltip",props:{id:{},text:{},placement:{},status:{type:Boolean},preventXss:{type:Boolean},iconName:{}},setup(t){const n={top:"bottom",right:"left",bottom:"top",left:"right"};let r=null,o=null;typeof window<"u"&&window.wasTooltipShown===void 0&&(window.wasTooltipShown=!1);const s=t,i=e.ref(null),a=e.ref(null),l=e.ref(null),c=e.ref(!1),u=e.computed(()=>s.preventXss?sn(s.text):s.text),{floatingStyles:f,update:_,middlewareData:p,placement:d}=rn(a,i,{placement:e.computed(()=>s.placement||"bottom"),strategy:"fixed",whileElementsMounted:Kt,middleware:[Qt(10),Jt(),Zt(),on({element:l,padding:8})]}),m=()=>{r&&clearTimeout(r),o&&clearTimeout(o),window.wasTooltipShown?c.value=!0:r=setTimeout(()=>{c.value=!0,window.wasTooltipShown=!0},qe)},g=()=>{o&&clearTimeout(o),o=setTimeout(()=>{c.value=!1,window.wasTooltipShown=!0},qe)},b=()=>{o&&clearTimeout(o)},h=()=>{b(),m()},x=()=>{g()};e.watch(()=>s.placement,_),e.onBeforeMount(ln),e.onMounted(()=>{e.nextTick(_),window.addEventListener("resize",_)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",_)});const k=e.computed(()=>{const[y]=d.value.split("-");return{[n[y]]:"-4px"}}),E=e.computed(()=>{var y,V;return l.value?{left:((y=p.value.arrow)==null?void 0:y.x)!=null?`${p.value.arrow.x}px`:"",top:((V=p.value.arrow)==null?void 0:V.y)!=null?`${p.value.arrow.y}px`:"",right:"",bottom:"",...k.value}:{}});return(y,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[y.status||c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:i,class:e.normalizeClass(["qa-tooltip",e.unref(fe).bubble]),style:e.normalizeStyle(e.unref(f)),onMouseenter:h,onMouseleave:x},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(fe).bubble__content)},[e.createElementVNode("div",{innerHTML:u.value},null,8,an),e.renderSlot(y.$slots,"contentSlot")],2),e.createElementVNode("div",{ref_key:"floatingArrowRef",ref:l,class:e.normalizeClass(e.unref(fe).arrow),style:e.normalizeStyle(E.value)},null,6)],38)):e.createCommentVNode("",!0)])),e.createElementVNode("div",{id:y.id,ref_key:"triggerRef",ref:a,class:e.normalizeClass(e.unref(fe).trigger),onMouseenter:h,onMouseleave:x},[y.iconName?(e.openBlock(),e.createBlock(e.unref(J),{key:0,color:e.unref(fe).trigger__icon,name:y.iconName},null,8,["color","name"])):e.renderSlot(y.$slots,"default",{key:1})],42,cn)],64))}});R.Button=Qe,R.DropdownMenu=rt,R.Icon=J,R.NumberInput=ht,R.OnPageMessage=it,R.SegmentButton=ct,R.TextInput=_t,R.Toggle=bt,R.Tooltip=un,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=ab-components.umd.js.map