@bagelink/vue 1.15.291 → 1.15.293
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ ${f}}`:p.map(([h,v])=>`${h}: ${typeof v=="object"&&v!==null?l(v,d+1):String(v)}`
|
|
|
18
18
|
}
|
|
19
19
|
`,document.head.appendChild(U)}const c={animation:150,mode:"line",ghostClass:"draggable-ghost",dragClass:"draggable-dragging",dropIndicatorClass:"draggable-drop-indicator",...e};let s=0,u=0,d=0,f=0,m=0,p,h=null,v=-1,y=0;const g=150,L=new Map;function b(U){if(!i)return null;const C=U.cloneNode(!0),A=U.getBoundingClientRect();return C.style.position="fixed",C.style.margin="0",C.style.top=`${A.top}px`,C.style.left=`${A.left}px`,C.style.width=`${A.width}px`,C.style.height=`${A.height}px`,C.style.transform="translate3d(0, 0, 0)",C.style.pointerEvents="none",C.style.zIndex="9999",C.style.cursor="grabbing",C.style.willChange="transform",C.classList.add(c.ghostClass),document.body.appendChild(C),C}function _(U){if(!i)return null;const C=document.createElement("div");C.classList.add(c.dropIndicatorClass),C.style.position="fixed",C.style.pointerEvents="none",C.style.zIndex="9999",C.style.height="2px",C.style.background="var(--primary-color, #0066ff)",C.style.boxShadow="0 0 4px rgba(0, 102, 255, 0.5)",C.style.transition="all 0.15s ease",C.style.display="none";const A=document.createElement("div");return A.style.position="absolute",A.style.left="-4px",A.style.top="-3px",A.style.width="8px",A.style.height="8px",A.style.borderRadius="50%",A.style.background="var(--primary-color, #0066ff)",C.appendChild(A),document.body.appendChild(C),C}function w(U,C){if(!a.value)return;const A=U.getBoundingClientRect();a.value.style.display="block",a.value.style.width=`${A.width}px`,a.value.style.left=`${A.left}px`,C?a.value.style.top=`${A.bottom}px`:a.value.style.top=`${A.top}px`}function S(U){let C=U;for(;C&&(!("__drag_group"in C)||C.dataset.draggable==="false");)C=C.parentElement;return C}function E(U){return U.style.opacity="0.4",U.style.transform="scale(0.95)",U.offsetHeight}function k(U){return U.style.opacity="0.5",2}function B(U){L.clear(),U.forEach((C,A)=>{const W=C.getBoundingClientRect();L.set(A,{top:W.top,bottom:W.bottom})})}function I(U,C,A,W){const F=Date.now();if(F-y<g)return v!==-1?v:A;L.size===0&&B(C);const ne=U.clientY,Q=C.indexOf(W),ce=L.get(Q);if(!ce)return A;const me=ce.bottom-ce.top,le=ne-ce.top,Le=me*.3,X=me*.7;let ae=Q;return Q===A?le>X&&(ae+=1):Q===v?Q>A?le<Le?ae=Q:ae=Q+1:le>X?ae=Q+1:ae=Q:le>me*.6&&(ae+=1),v=ae,y=F,ae}function D(){i&&(document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",$),document.removeEventListener("keydown",V),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",H),document.removeEventListener("touchcancel",H),window.removeEventListener("blur",D),o.value&&(o.value.style.opacity="0",o.value.style.transform+=" scale(0.8)",setTimeout(()=>{o.value?.parentNode?.removeChild(o.value),o.value=null},150)),a.value&&(a.value.style.opacity="0",setTimeout(()=>{a.value?.parentNode?.removeChild(a.value),a.value=null},150)),r.value&&(r.value.__drag_list?.forEach(U=>{U.style.transition="",U.style.transform="",U.style.opacity=""}),r.value.classList.remove(c.dragClass),r.value=null),t.value=!1,l.value=null,i&&(document.body.style.userSelect="",document.body.style.webkitUserSelect="",document.body.style.cursor=""),h&&(cancelAnimationFrame(h),h=null),v=-1,y=0,L.clear())}function V(U){U.key==="Escape"&&t.value&&D()}function O(U){if(!i||c.disabled||U.button!==0||U.ctrlKey||U.metaKey||U.shiftKey||U.altKey)return;const C=S(U.target);if(!C||C.dataset.draggable==="false")return;if(c.handle){const W=U.target.closest(c.handle);if(!W||!C.contains(W))return}U.preventDefault(),t.value=!0,r.value=C,s=U.clientX,u=U.clientY;const A=C.getBoundingClientRect();d=A.left,f=A.top,o.value=b(C),o.value&&(o.value.style.left=`${d}px`,o.value.style.top=`${f}px`),c.mode==="line"&&(a.value=_(C)),C.classList.add(c.dragClass),m=c.mode==="ghost"?E(C):k(C),c.onStart?.(U),i&&(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",document.body.style.cursor="grabbing",window.addEventListener("blur",D),document.addEventListener("mousemove",z),document.addEventListener("mouseup",$),document.addEventListener("keydown",V))}function N(U){let C=U.parentElement;for(;C;){const{overflow:A,overflowY:W}=window.getComputedStyle(C);if(/auto|scroll/.test(A+W))return C;C=C.parentElement}return document.scrollingElement||document.documentElement||document.body}function j(U){r.value&&(h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{const C=N(r.value),A=C.getBoundingClientRect(),W=50,F=Math.min(20,A.height*.1),{scrollTop:ne}=C,Q=C.scrollHeight-C.clientHeight;U.clientY-A.top<W?C.scrollTop=Math.max(0,ne-F):A.bottom-U.clientY<W&&(C.scrollTop=Math.min(Q,ne+F))}))}function z(U){if(!t.value||!r.value)return;if(o.value){const ne=U.clientX-s,Q=U.clientY-u;o.value.style.transform=`translate3d(${ne}px, ${Q}px, 0)`}const C=r.value.__drag_list.filter(ne=>ne.dataset.draggable!=="false"),A=C.indexOf(r.value),W=S(document.elementFromPoint(U.clientX,U.clientY));if(!W||W.__drag_group!==r.value.__drag_group){a.value&&(a.value.style.display="none");return}const F=I(U,C,A,W);if(l.value!==W||l.value.__intended_index!==F){l.value=W,l.value.__intended_index=F,a.value&&c.mode==="line"&&w(W,F>C.indexOf(W));const ne=m;C.forEach(Q=>{if(Q.style.transition=`transform ${c.animation}ms cubic-bezier(0.2, 0, 0, 1)`,Q.style.transform="translate3d(0, 0, 0)",Q===r.value){if(c.mode==="ghost"){const ce=(F-A)*ne;Q.style.transform=`translate3d(0, ${ce}px, 0)`}}else{const ce=C.indexOf(Q);A<F?ce>A&&ce<=F&&(Q.style.transform=`translate3d(0, -${ne}px, 0)`):A>F&&ce>=F&&ce<A&&(Q.style.transform=`translate3d(0, ${ne}px, 0)`)}})}j(U)}function $(U){if(!t.value||!r.value||!l.value){D();return}const C=r.value.__drag_list;if(!C||!C.length){D();return}const A=C.filter(F=>F.dataset.draggable!=="false").indexOf(r.value),W=l.value.__intended_index;if(A!==-1&&W!==-1){C.forEach(ne=>{ne.style.transition="none",ne.style.transform=""}),document.body.offsetHeight;const F=new MouseEvent("mouseup",U);F.oldIndex=A,F.newIndex=W,F.item=r.value.__drag_data,c.onEnd?.(F)}D()}function M(U){if(!i||c.disabled||!U.target)return;const C=U.touches[0];if(!C)return;const A=U.target,W=S(A);if(!W)return;const{handle:F}=c;if(F&&!A.closest(F))return;U.preventDefault(),t.value=!0,r.value=W,s=C.clientX,u=C.clientY;const ne=W.getBoundingClientRect();d=ne.left,f=ne.top,o.value=b(W),o.value&&(o.value.style.left=`${d}px`,o.value.style.top=`${f}px`),c.mode==="line"&&(a.value=_(W)),r.value.classList.add(c.dragClass),m=c.mode==="ghost"?E(r.value):k(r.value),c.onStart?.(U),i&&(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",document.body.style.cursor="grabbing",window.addEventListener("blur",D),document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",H),document.addEventListener("touchcancel",H))}function q(U){U.preventDefault();const C=U.touches[0];if(!C)return;const A={clientX:C.clientX,clientY:C.clientY,target:document.elementFromPoint(C.clientX,C.clientY)};z(A),j(A)}function H(U){const C=U.changedTouches[0];C&&($({clientX:C.clientX,clientY:C.clientY,target:document.elementFromPoint(C.clientX,C.clientY)}),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",H),document.removeEventListener("touchcancel",H))}function K(U){if(!i)return;p?.(),t.value=!1,r.value=null,o.value=null,a.value=null,l.value=null;const C=Array.from(U.children);C.forEach(W=>{delete W.__drag_group,delete W.__drag_index,delete W.__drag_list});let A=0;C.forEach((W,F)=>{W.dataset.draggable!=="false"&&(W.style.userSelect="none",W.style.webkitUserSelect="none",W.__drag_group=e.group,W.__drag_index=A++,W.__drag_list=C.filter(ne=>ne.dataset.draggable!=="false"),e.items&&(W.__drag_data=e.items[F]),W.addEventListener("mousedown",O),W.addEventListener("touchstart",M))}),p=()=>{C.forEach(W=>{W.removeEventListener("mousedown",O),W.removeEventListener("touchstart",M),delete W.__drag_group,delete W.__drag_index,delete W.__drag_list}),D()}}return(0,n.onUnmounted)(()=>{p?.()}),{isDragging:t,dragElement:r,initDraggableContainer:K}}function Ew(e){const t=(0,n.ref)(),r=(0,n.ref)(null),o=(0,n.computed)(()=>e.selectedItems.value),a=(0,n.computed)(()=>e.selectable===!0&&Array.isArray(e.selectedItems.value)),l=(0,n.computed)(()=>e.data.value);function i(){if(t.value===void 0)return;if(!l.value){t.value.indeterminate=e.selectedItems.value.length>0;return}const u=l.value.map(f=>f.id),d=u.length>0&&e.selectedItems.value.length===u.length&&u.every(f=>e.selectedItems.value.includes(f));t.value.checked=d,t.value.indeterminate=!d&&e.selectedItems.value.length>0}function c(u,d){const f=l.value.findIndex(p=>p.id===u.id);if(!e.selectable){e.onSelect(e.cleanData?e.cleanData(u):{...u}),r.value=f;return}if(d?.shiftKey&&r.value!==null&&f!==-1){const p=Math.min(r.value,f),h=Math.max(r.value,f),v=l.value.slice(p,h+1).map(y=>y.id);if(v.every(y=>e.selectedItems.value.includes(y)))e.selectedItems.value=e.selectedItems.value.filter(y=>!v.includes(y));else{const y=v.filter(g=>!e.selectedItems.value.includes(g));e.selectedItems.value.push(...y)}return}if(o.value.length===0){const p=e.cleanData?e.cleanData(u):{...u};e.cleanData||Object.keys(p).forEach(h=>{h.startsWith("_")&&delete p[h]}),e.onSelect(p),r.value=f;return}const m=o.value.indexOf(u.id);m>-1?e.selectedItems.value.splice(m,1):e.selectedItems.value.push(u.id),r.value=f}function s(u){const d=u.target.checked;l.value&&d?e.selectedItems.value=l.value.map(f=>f.id):e.selectedItems.value=[],r.value=null}return{computedSelectedItems:o,isSelectable:a,allSelectorEl:t,updateAllSelectorState:i,toggleSelectItem:c,toggleSelectAll:s}}function Sw(e){const t=(0,n.ref)(null),{list:r,containerProps:o,wrapperProps:a,scrollTo:l}=r_((0,n.computed)(()=>[{__isHeader:!0},...(0,n.toValue)(e.data)]),{itemHeight:e.itemHeight,overscan:10}),i=(0,n.computed)(()=>r.value.filter(s=>!s.data.__isHeader));async function c(){await Yb(()=>t.value).toBeTruthy(),xm(t,([s])=>{const u=(0,n.toValue)(e.data).length||0;s?.isIntersecting&&u>0&&e.onLastItemVisible?.()})}return{list:i,containerProps:o,wrapperProps:a,scrollTo:l,lastItemEl:t,registerLastItemObserver:c}}var Cw={class:"row first-row"},xw={key:0,class:"col-drag"},Tw={key:1,class:"col-check"},Nw=["onClick"],Bw={class:"flex"},Mw=["onClick"],Dw={key:0,class:"col-drag"},Aw={key:1,class:"col-check"},Pw=["value"],Iw={key:1},Vw=(0,n.defineComponent)({__name:"DataTable",props:(0,n.mergeModels)({data:{},schema:{},columns:{},useServerSort:{type:Boolean},selectable:{type:Boolean},sortable:{type:[Boolean,Object]},onLastItemVisible:{type:Function},emptyIcon:{},emptyTitle:{},emptyDescription:{}},{loading:{default:!1},loadingModifiers:{},itemHeight:{default:50},itemHeightModifiers:{},fontSize:{default:void 0},fontSizeModifiers:{},selectedItems:{default:[]},selectedItemsModifiers:{}}),emits:(0,n.mergeModels)(["orderBy","select","reorder","lastItemVisible"],["update:loading","update:itemHeight","update:fontSize","update:selectedItems"]),setup(e,{emit:t}){(0,n.useCssVars)(C=>({v4ac7bae4:U.value,v2db68478:$.value,b1fa463a:K.value}));const r=e,o=t,a=(0,n.useSlots)(),l=(0,n.useModel)(e,"loading"),i=(0,n.useModel)(e,"itemHeight"),c=(0,n.useModel)(e,"fontSize"),s=(0,n.useModel)(e,"selectedItems"),{computedSchema:u,computedData:d,sortField:f,sortDirection:m,toggleSort:p,cleanTransformedData:h}=Om({data:(0,n.computed)(()=>r.data),schema:(0,n.computed)(()=>(0,n.toValue)(r.schema)),columns:(0,n.computed)(()=>(0,n.toValue)(r.columns)),useServerSort:(0,n.computed)(()=>(0,n.toValue)(r.useServerSort)),onSort:(C,A)=>{o("orderBy",`${C.trim()} ${A.trim()}`)}}),{computedSelectedItems:v,isSelectable:y,allSelectorEl:g,updateAllSelectorState:L,toggleSelectItem:b,toggleSelectAll:_}=Ew({data:d,selectable:r.selectable,selectedItems:s,cleanData:h,onSelect:C=>{o("select",C)}}),{list:w,containerProps:S,wrapperProps:E,scrollTo:k,lastItemEl:B,registerLastItemObserver:I}=Sw({data:d,itemHeight:i.value,onLastItemVisible:()=>{o("lastItemVisible"),r.onLastItemVisible?.()}}),D=(0,n.computed)(()=>!!r.sortable),V=(0,n.computed)(()=>typeof r.sortable=="object"&&r.sortable?.handle?r.sortable.handle:".drag-handle-col"),O=(0,n.ref)(),{initDraggableContainer:N}=Na({handle:V.value,mode:"line",items:r.data,onEnd:C=>{if(C.oldIndex===C.newIndex)return;const A=d.value[C.oldIndex],W=h(A);o("reorder",{oldIndex:C.oldIndex,newIndex:C.newIndex,item:W})}});function j(){!D.value||!O.value||(0,n.nextTick)(()=>{O.value&&N(O.value)})}(0,n.watch)(()=>r.data,j,{deep:!0}),(0,n.watch)(D,C=>{C&&(0,n.nextTick)(j)}),(0,n.onMounted)(j);function z(C,A){const{renderField:W}=Vm({mode:"table",getFormData:()=>A});return W({...C,label:""},a)}const $=(0,n.computed)(()=>`${i.value}px`);(0,n.watch)(()=>l.value,async(C,A)=>{C!==A&&(C||(I(),k(0),await(0,n.nextTick)(),k(0)))},{immediate:!0}),(0,n.watch)(()=>v.value.length,()=>{L()}),(0,n.watch)(()=>d.value.length,async(C,A)=>{const W=r.onLastItemVisible!==void 0&&(A??0)>0;C===A||W||(k(0),await(0,n.nextTick)(),k(0))});const M=(0,n.computed)(()=>l.value),q=(0,n.computed)(()=>!M.value&&d.value.length===0),H=(0,n.computed)(()=>{const C=c.value;return C==null||C===""?null:typeof C=="number"?`${C}px`:String(C)}),K=(0,n.computed)(()=>H.value??"0.88em"),U=(0,n.computed)(()=>H.value?`calc(${H.value} * 0.9)`:"0.8rem");return(C,A)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",(0,n.mergeProps)({class:"table-list-wrap h-100p"},(0,n.unref)(S),{class:{overflowHiddenLoading:M.value}}),[M.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Kr),{key:0,class:"absolute inset-1"})):(0,n.createCommentVNode)("",!0),q.value?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",(0,n.mergeProps)({key:1},(0,n.unref)(E),{class:{"pointer-events-none":M.value}}),[(0,n.createElementVNode)("table",{class:(0,n.normalizeClass)(["infinite-wrapper",{selecting:(0,n.unref)(v).length}])},[(0,n.createElementVNode)("thead",Cw,[D.value?((0,n.openBlock)(),(0,n.createElementBlock)("th",xw)):(0,n.createCommentVNode)("",!0),(0,n.unref)(y)?((0,n.openBlock)(),(0,n.createElementBlock)("th",Tw,[(0,n.createElementVNode)("input",{ref_key:"allSelectorEl",ref:g,type:"checkbox",onClick:A[0]||(A[0]=(0,n.withModifiers)(()=>{},["stop"])),onChange:A[1]||(A[1]=W=>(0,n.unref)(_)(W))},null,544)])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(u),W=>((0,n.openBlock)(),(0,n.createElementBlock)("th",{key:W.id,class:"col",onClick:F=>!D.value&&(0,n.unref)(p)(W?.id||"")},[(0,n.createElementVNode)("div",Bw,[(0,n.createTextVNode)((0,n.toDisplayString)(W.label||W.attrs?.label||(0,n.unref)(al)(W?.id))+" ",1),D.value?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:(0,n.normalizeClass)(["list-arrows",{sorted:(0,n.unref)(f)===W?.id}])},[(0,n.createVNode)((0,n.unref)(_e),{class:(0,n.normalizeClass)({desc:(0,n.unref)(m)==="DESC"}),icon:"keyboard_arrow_up"},null,8,["class"])],2))])],8,Nw))),128))]),(0,n.createElementVNode)("tbody",{ref_key:"tbodyRef",ref:O},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(w),({data:W})=>((0,n.openBlock)(),(0,n.createElementBlock)("tr",{key:W?.id||`row-${Math.random()}`,class:(0,n.normalizeClass)(["row row-item position-relative",{selected:W?.id&&(0,n.unref)(v).includes(W.id)}]),onClick:F=>(0,n.unref)(b)(W,F)},[D.value?((0,n.openBlock)(),(0,n.createElementBlock)("td",Dw,[(0,n.createVNode)((0,n.unref)(_e),{icon:"drag_indicator",size:1.2,class:"drag-handle-col grab"})])):(0,n.createCommentVNode)("",!0),(0,n.unref)(y)?((0,n.openBlock)(),(0,n.createElementBlock)("td",Aw,[(0,n.createElementVNode)("div",{onClick:A[3]||(A[3]=(0,n.withModifiers)(()=>{},["stop"]))},[(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":A[2]||(A[2]=F=>s.value=F),type:"checkbox",value:W?.id||""},null,8,Pw),[[n.vModelCheckbox,s.value]])])])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(u),F=>((0,n.openBlock)(),(0,n.createElementBlock)("td",{key:`${F.id}-${W?.id||Math.random()}`,class:"col"},[F.id&&(0,n.unref)(a)?.[F.id]?(0,n.renderSlot)(C.$slots,F.id,{key:0,row:W,field:F},void 0,!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",Iw,[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(z(F,W))))]))]))),128))],10,Mw))),128)),r.onLastItemVisible!==void 0?((0,n.openBlock)(),(0,n.createElementBlock)("tr",{key:0,ref_key:"lastItemEl",ref:B,style:{height:"1px"}},null,512)):(0,n.createCommentVNode)("",!0)],512)],2)],16)),q.value?(0,n.renderSlot)(C.$slots,"empty",{key:2},()=>[(0,n.createVNode)((0,n.unref)(Ju),{icon:r.emptyIcon??"inbox",title:r.emptyTitle??"No results",description:r.emptyDescription,class:"h-60p"},null,8,["icon","title","description"])],!0):(0,n.createCommentVNode)("",!0)],16))}}),Rm=be(Vw,[["__scopeId","data-v-4dc0c02c"]]),Ow=(0,n.defineComponent)({__name:"Draggable",props:{modelValue:{},group:{},handle:{},mode:{default:"line"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","start","end"],setup(e,{emit:t}){const r=e,o=t,a=(0,n.ref)(),{initDraggableContainer:l}=Na({group:r.group,handle:r.handle,mode:r.mode,disabled:r.disabled,items:r.modelValue,onStart:i=>{o("start",i)},onEnd:i=>{const c=[...r.modelValue],[s]=c.splice(i.oldIndex,1);c.splice(i.newIndex,0,s),o("update:modelValue",c),o("end",i),(0,n.nextTick)(()=>{a.value&&l(a.value)})}});return(0,n.watch)(()=>r.modelValue,()=>{a.value&&l(a.value)},{deep:!0}),(0,n.onMounted)(()=>{a.value&&l(a.value)}),(i,c)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{ref_key:"dragContainer",ref:a},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.modelValue,(s,u)=>(0,n.renderSlot)(i.$slots,"default",{key:u,item:s,index:u})),128))],512))}}),Fm=Ow;const Rw={mounted(e,t){const{initDraggableContainer:r}=Na(t.value||{});r(e)},updated(e,t){if(t.value!==t.oldValue){const{initDraggableContainer:r}=Na(t.value||{});r(e)}}};var Fw={key:0,class:"drag-overlay"},zw=(0,n.defineComponent)({__name:"DragOver",props:{multiple:{type:Boolean},accept:{},disabled:{type:Boolean},browse:{type:Boolean}},emits:["addFiles"],setup(e,{emit:t}){const r=e,o=t,a=(0,n.ref)(!1),l=(0,n.ref)(0);function i(f){r.disabled||(f.preventDefault(),f.stopPropagation(),l.value++,a.value=!0)}function c(f){r.disabled||(f.preventDefault(),f.stopPropagation())}function s(f){r.disabled||(f.preventDefault(),f.stopPropagation(),l.value--,l.value===0&&(a.value=!1))}function u(f){if(!r.browse||r.disabled)return;f.preventDefault(),f.stopPropagation();const m=document.createElement("input");m.type="file",m.multiple=!!r.multiple,m.accept=r.accept||"*",m.onchange=p=>{const{files:h}=p.target;h&&o("addFiles",h)},m.click()}function d(f){r.disabled||(f.preventDefault(),f.stopPropagation(),l.value=0,a.value=!1,f.dataTransfer&&o("addFiles",f.dataTransfer.files))}return(f,m)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["drag-over-container",{"is-dragging":a.value,"is-disabled":e.disabled}]),onDragenter:i,onDragover:c,onDragleave:s,onDrop:d,onClick:u},[(0,n.renderSlot)(f.$slots,"default",{},void 0,!0),a.value&&!e.disabled?((0,n.openBlock)(),(0,n.createElementBlock)("div",Fw,[(0,n.createVNode)((0,n.unref)(_e),{name:"download",color:"white",size:"2"})])):(0,n.createCommentVNode)("",!0)],34))}}),Uw=be(zw,[["__scopeId","data-v-0acc58aa"]]),Hw=["top","right","bottom","left"],e1=["start","end"],t1=Hw.reduce((e,t)=>e.concat(t,t+"-"+e1[0],t+"-"+e1[1]),[]),Xr=Math.min,on=Math.max,ti=Math.round,In=e=>({x:e,y:e}),Ww={left:"right",right:"left",bottom:"top",top:"bottom"};function Bc(e,t,r){return on(e,Xr(t,r))}function to(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function zm(e){return e==="x"?"y":"x"}function Yu(e){return e==="y"?"height":"width"}function Jn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zu(e){return zm(Jn(e))}function Um(e,t,r){r===void 0&&(r=!1);const o=bn(e),a=Zu(e),l=Yu(a);let i=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=ri(i)),[i,ri(i)]}function jw(e){const t=ri(e);return[ni(e),t,ni(t)]}function ni(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var n1=["left","right"],r1=["right","left"],Gw=["top","bottom"],qw=["bottom","top"];function Yw(e,t,r){switch(e){case"top":case"bottom":return r?t?r1:n1:t?n1:r1;case"left":case"right":return t?Gw:qw;default:return[]}}function Zw(e,t,r,o){const a=bn(e);let l=Yw(Un(e),r==="start",o);return a&&(l=l.map(i=>i+"-"+a),t&&(l=l.concat(l.map(ni)))),l}function ri(e){const t=Un(e);return Ww[t]+e.slice(t.length)}function Xw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hm(e){return typeof e!="number"?Xw(e):{top:e,right:e,bottom:e,left:e}}function Ur(e){const{x:t,y:r,width:o,height:a}=e;return{width:o,height:a,top:r,left:t,right:t+o,bottom:r+a,x:t,y:r}}function o1(e,t,r){let{reference:o,floating:a}=e;const l=Jn(t),i=Zu(t),c=Yu(i),s=Un(t),u=l==="y",d=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,m=o[c]/2-a[c]/2;let p;switch(s){case"top":p={x:d,y:o.y-a.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-a.width,y:f};break;default:p={x:o.x,y:o.y}}switch(bn(t)){case"start":p[i]-=m*(r&&u?-1:1);break;case"end":p[i]+=m*(r&&u?-1:1);break}return p}async function Kw(e,t){var r;t===void 0&&(t={});const{x:o,y:a,platform:l,rects:i,elements:c,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=to(t,e),h=Hm(p),v=c[m?f==="floating"?"reference":"floating":f],y=Ur(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(v)))==null||r?v:v.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:s})),g=f==="floating"?{x:o,y:a,width:i.floating.width,height:i.floating.height}:i.reference,L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),b=await(l.isElement==null?void 0:l.isElement(L))?await(l.getScale==null?void 0:l.getScale(L))||{x:1,y:1}:{x:1,y:1},_=Ur(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:L,strategy:s}):g);return{top:(y.top-_.top+h.top)/b.y,bottom:(_.bottom-y.bottom+h.bottom)/b.y,left:(y.left-_.left+h.left)/b.x,right:(_.right-y.right+h.right)/b.x}}var Jw=50,Wm=async(e,t,r)=>{const{placement:o="bottom",strategy:a="absolute",middleware:l=[],platform:i}=r,c=i.detectOverflow?i:{...i,detectOverflow:Kw},s=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:f}=o1(u,o,s),m=o,p=0;const h={};for(let v=0;v<l.length;v++){const y=l[v];if(!y)continue;const{name:g,fn:L}=y,{x:b,y:_,data:w,reset:S}=await L({x:d,y:f,initialPlacement:o,placement:m,strategy:a,middlewareData:h,rects:u,platform:c,elements:{reference:e,floating:t}});d=b??d,f=_??f,h[g]={...h[g],...w},S&&p<Jw&&(p++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):S.rects),{x:d,y:f}=o1(u,m,s)),v=-1)}return{x:d,y:f,placement:m,strategy:a,middlewareData:h}},Qw=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:a,rects:l,platform:i,elements:c,middlewareData:s}=t,{element:u,padding:d=0}=to(e,t)||{};if(u==null)return{};const f=Hm(d),m={x:r,y:o},p=Zu(a),h=Yu(p),v=await i.getDimensions(u),y=p==="y",g=y?"top":"left",L=y?"bottom":"right",b=y?"clientHeight":"clientWidth",_=l.reference[h]+l.reference[p]-m[p]-l.floating[h],w=m[p]-l.reference[p],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=S?S[b]:0;(!E||!await(i.isElement==null?void 0:i.isElement(S)))&&(E=c.floating[b]||l.floating[h]);const k=_/2-w/2,B=E/2-v[h]/2-1,I=Xr(f[g],B),D=Xr(f[L],B),V=I,O=E-v[h]-D,N=E/2-v[h]/2+k,j=Bc(V,N,O),z=!s.arrow&&bn(a)!=null&&N!==j&&l.reference[h]/2-(N<V?I:D)-v[h]/2<0,$=z?N<V?N-V:N-O:0;return{[p]:m[p]+$,data:{[p]:j,centerOffset:N-j-$,...z&&{alignmentOffset:$}},reset:z}}});function ek(e,t,r){return(e?[...r.filter(o=>bn(o)===e),...r.filter(o=>bn(o)!==e)]:r.filter(o=>Un(o)===o)).filter(o=>e?bn(o)===e||(t?ni(o)!==o:!1):!0)}var jm=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,o,a;const{rects:l,middlewareData:i,placement:c,platform:s,elements:u}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:m=t1,autoAlignment:p=!0,...h}=to(e,t),v=f!==void 0||m===t1?ek(f||null,p,m):m,y=await s.detectOverflow(t,h),g=((r=i.autoPlacement)==null?void 0:r.index)||0,L=v[g];if(L==null)return{};const b=Um(L,l,await(s.isRTL==null?void 0:s.isRTL(u.floating)));if(c!==L)return{reset:{placement:v[0]}};const _=[y[Un(L)],y[b[0]],y[b[1]]],w=[...((o=i.autoPlacement)==null?void 0:o.overflows)||[],{placement:L,overflows:_}],S=v[g+1];if(S)return{data:{index:g+1,overflows:w},reset:{placement:S}};const E=w.map(B=>{const I=bn(B.placement);return[B.placement,I&&d?B.overflows.slice(0,2).reduce((D,V)=>D+V,0):B.overflows[0],B.overflows]}).sort((B,I)=>B[1]-I[1]),k=((a=E.filter(B=>B[2].slice(0,bn(B[0])?2:3).every(I=>I<=0))[0])==null?void 0:a[0])||E[0][0];return k!==c?{data:{index:g+1,overflows:w},reset:{placement:k}}:{}}}},Gm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:a,middlewareData:l,rects:i,initialPlacement:c,platform:s,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=to(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const g=Un(a),L=Jn(c),b=Un(c)===c,_=await(s.isRTL==null?void 0:s.isRTL(u.floating)),w=m||(b||!v?[ri(c)]:jw(c)),S=h!=="none";!m&&S&&w.push(...Zw(c,v,h,_));const E=[c,...w],k=await s.detectOverflow(t,y),B=[];let I=((o=l.flip)==null?void 0:o.overflows)||[];if(d&&B.push(k[g]),f){const N=Um(a,i,_);B.push(k[N[0]],k[N[1]])}if(I=[...I,{placement:a,overflows:B}],!B.every(N=>N<=0)){var D,V;const N=(((D=l.flip)==null?void 0:D.index)||0)+1,j=E[N];if(j&&(!(f==="alignment"&&L!==Jn(j))||I.every($=>Jn($.placement)===L?$.overflows[0]>0:!0)))return{data:{index:N,overflows:I},reset:{placement:j}};let z=(V=I.filter($=>$.overflows[0]<=0).sort(($,M)=>$.overflows[1]-M.overflows[1])[0])==null?void 0:V.placement;if(!z)switch(p){case"bestFit":{var O;const $=(O=I.filter(M=>{if(S){const q=Jn(M.placement);return q===L||q==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(q=>q>0).reduce((q,H)=>q+H,0)]).sort((M,q)=>M[1]-q[1])[0])==null?void 0:O[0];$&&(z=$);break}case"initialPlacement":z=c;break}if(a!==z)return{reset:{placement:z}}}return{}}}},tk=new Set(["left","top"]);async function nk(e,t){const{placement:r,platform:o,elements:a}=e,l=await(o.isRTL==null?void 0:o.isRTL(a.floating)),i=Un(r),c=bn(r),s=Jn(r)==="y",u=tk.has(i)?-1:1,d=l&&s?-1:1,f=to(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof h=="number"&&(p=c==="end"?h*-1:h),s?{x:p*d,y:m*u}:{x:m*u,y:p*d}}var qm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:a,y:l,placement:i,middlewareData:c}=t,s=await nk(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:a+s.x,y:l+s.y,data:{...s,placement:i}}}}},Ym=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:a,platform:l}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:s={fn:g=>{let{x:L,y:b}=g;return{x:L,y:b}}},...u}=to(e,t),d={x:r,y:o},f=await l.detectOverflow(t,u),m=Jn(Un(a)),p=zm(m);let h=d[p],v=d[m];if(i){const g=p==="y"?"top":"left",L=p==="y"?"bottom":"right",b=h+f[g],_=h-f[L];h=Bc(b,h,_)}if(c){const g=m==="y"?"top":"left",L=m==="y"?"bottom":"right",b=v+f[g],_=v-f[L];v=Bc(b,v,_)}const y=s.fn({...t,[p]:h,[m]:v});return{...y,data:{x:y.x-r,y:y.y-o,enabled:{[p]:i,[m]:c}}}}}},rk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:a,rects:l,platform:i,elements:c}=t,{apply:s=()=>{},...u}=to(e,t),d=await i.detectOverflow(t,u),f=Un(a),m=bn(a),p=Jn(a)==="y",{width:h,height:v}=l.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(g=f,y=m==="end"?"top":"bottom");const L=v-d.top-d.bottom,b=h-d.left-d.right,_=Xr(v-d[y],L),w=Xr(h-d[g],b),S=!t.middlewareData.shift;let E=_,k=w;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=L),S&&!m){const I=on(d.left,0),D=on(d.right,0),V=on(d.top,0),O=on(d.bottom,0);p?k=h-2*(I!==0||D!==0?I+D:on(d.left,d.right)):E=v-2*(V!==0||O!==0?V+O:on(d.top,d.bottom))}await s({...t,availableWidth:k,availableHeight:E});const B=await i.getDimensions(c.floating);return h!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function Ri(){return typeof window<"u"}function Wo(e){return Zm(e)?(e.nodeName||"").toLowerCase():"#document"}function Qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(Zm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zm(e){return Ri()?e instanceof Node||e instanceof Qt(e).Node:!1}function kn(e){return Ri()?e instanceof Element||e instanceof Qt(e).Element:!1}function ur(e){return Ri()?e instanceof HTMLElement||e instanceof Qt(e).HTMLElement:!1}function a1(e){return!Ri()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qt(e).ShadowRoot}function Ka(e){const{overflow:t,overflowX:r,overflowY:o,display:a}=$n(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&a!=="inline"&&a!=="contents"}function ok(e){return/^(table|td|th)$/.test(Wo(e))}function Fi(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var ak=/transform|translate|scale|rotate|perspective|filter/,lk=/paint|layout|strict|content/,Br=e=>!!e&&e!=="none",$s;function Xu(e){const t=kn(e)?$n(e):e;return Br(t.transform)||Br(t.translate)||Br(t.scale)||Br(t.rotate)||Br(t.perspective)||!Ku()&&(Br(t.backdropFilter)||Br(t.filter))||ak.test(t.willChange||"")||lk.test(t.contain||"")}function ik(e){let t=$r(e);for(;ur(t)&&!Ao(t);){if(Xu(t))return t;if(Fi(t))return null;t=$r(t)}return null}function Ku(){return $s==null&&($s=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$s}function Ao(e){return/^(html|body|#document)$/.test(Wo(e))}function $n(e){return Qt(e).getComputedStyle(e)}function zi(e){return kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $r(e){if(Wo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||a1(e)&&e.host||cr(e);return a1(t)?t.host:t}function Xm(e){const t=$r(e);return Ao(t)?e.ownerDocument?e.ownerDocument.body:e.body:ur(t)&&Ka(t)?t:Xm(t)}function Mc(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=Xm(e),l=a===((o=e.ownerDocument)==null?void 0:o.body),i=Qt(a);if(l){const c=Dc(i);return t.concat(i,i.visualViewport||[],Ka(a)?a:[],c&&r?Mc(c):[])}else return t.concat(a,Mc(a,[],r))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Km(e){const t=$n(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const a=ur(e),l=a?e.offsetWidth:r,i=a?e.offsetHeight:o,c=ti(r)!==l||ti(o)!==i;return c&&(r=l,o=i),{width:r,height:o,$:c}}function Jm(e){return kn(e)?e:e.contextElement}function $o(e){const t=Jm(e);if(!ur(t))return In(1);const r=t.getBoundingClientRect(),{width:o,height:a,$:l}=Km(t);let i=(l?ti(r.width):r.width)/o,c=(l?ti(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}var sk=In(0);function Qm(e){const t=Qt(e);return!Ku()||!t.visualViewport?sk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ck(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Qt(e)?!1:t}function Ba(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),l=Jm(e);let i=In(1);t&&(o?kn(o)&&(i=$o(o)):i=$o(e));const c=ck(l,r,o)?Qm(l):In(0);let s=(a.left+c.x)/i.x,u=(a.top+c.y)/i.y,d=a.width/i.x,f=a.height/i.y;if(l){const m=Qt(l),p=o&&kn(o)?Qt(o):o;let h=m,v=Dc(h);for(;v&&o&&p!==h;){const y=$o(v),g=v.getBoundingClientRect(),L=$n(v),b=g.left+(v.clientLeft+parseFloat(L.paddingLeft))*y.x,_=g.top+(v.clientTop+parseFloat(L.paddingTop))*y.y;s*=y.x,u*=y.y,d*=y.x,f*=y.y,s+=b,u+=_,h=Qt(v),v=Dc(h)}}return Ur({width:d,height:f,x:s,y:u})}function Ui(e,t){const r=zi(e).scrollLeft;return t?t.left+r:Ba(cr(e)).left+r}function ep(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ui(e,r),y:r.top+t.scrollTop}}function uk(e){let{elements:t,rect:r,offsetParent:o,strategy:a}=e;const l=a==="fixed",i=cr(o),c=t?Fi(t.floating):!1;if(o===i||c&&l)return r;let s={scrollLeft:0,scrollTop:0},u=In(1);const d=In(0),f=ur(o);if((f||!f&&!l)&&((Wo(o)!=="body"||Ka(i))&&(s=zi(o)),f)){const p=Ba(o);u=$o(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const m=i&&!f&&!l?ep(i,s):In(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-s.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-s.scrollTop*u.y+d.y+m.y}}function dk(e){return Array.from(e.getClientRects())}function fk(e){const t=cr(e),r=zi(e),o=e.ownerDocument.body,a=on(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=on(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-r.scrollLeft+Ui(e);const c=-r.scrollTop;return $n(o).direction==="rtl"&&(i+=on(t.clientWidth,o.clientWidth)-a),{width:a,height:l,x:i,y:c}}var l1=25;function mk(e,t){const r=Qt(e),o=cr(e),a=r.visualViewport;let l=o.clientWidth,i=o.clientHeight,c=0,s=0;if(a){l=a.width,i=a.height;const d=Ku();(!d||d&&t==="fixed")&&(c=a.offsetLeft,s=a.offsetTop)}const u=Ui(o);if(u<=0){const d=o.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-f.clientWidth-p);h<=l1&&(l-=h)}else u<=l1&&(l+=u);return{width:l,height:i,x:c,y:s}}function pk(e,t){const r=Ba(e,!0,t==="fixed"),o=r.top+e.clientTop,a=r.left+e.clientLeft,l=ur(e)?$o(e):In(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:a*l.x,y:o*l.y}}function i1(e,t,r){let o;if(t==="viewport")o=mk(e,r);else if(t==="document")o=fk(cr(e));else if(kn(t))o=pk(t,r);else{const a=Qm(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ur(o)}function tp(e,t){const r=$r(e);return r===t||!kn(r)||Ao(r)?!1:$n(r).position==="fixed"||tp(r,t)}function hk(e,t){const r=t.get(e);if(r)return r;let o=Mc(e,[],!1).filter(c=>kn(c)&&Wo(c)!=="body"),a=null;const l=$n(e).position==="fixed";let i=l?$r(e):e;for(;kn(i)&&!Ao(i);){const c=$n(i),s=Xu(i);!s&&c.position==="fixed"&&(a=null),(l?!s&&!a:!s&&c.position==="static"&&a&&(a.position==="absolute"||a.position==="fixed")||Ka(i)&&!s&&tp(e,i))?o=o.filter(u=>u!==i):a=c,i=$r(i)}return t.set(e,o),o}function gk(e){let{element:t,boundary:r,rootBoundary:o,strategy:a}=e;const l=[...r==="clippingAncestors"?Fi(t)?[]:hk(t,this._c):[].concat(r),o],i=i1(t,l[0],a);let c=i.top,s=i.right,u=i.bottom,d=i.left;for(let f=1;f<l.length;f++){const m=i1(t,l[f],a);c=on(m.top,c),s=Xr(m.right,s),u=Xr(m.bottom,u),d=on(m.left,d)}return{width:s-d,height:u-c,x:d,y:c}}function vk(e){const{width:t,height:r}=Km(e);return{width:t,height:r}}function Lk(e,t,r){const o=ur(t),a=cr(t),l=r==="fixed",i=Ba(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const s=In(0);function u(){s.x=Ui(a)}if(o||!o&&!l)if((Wo(t)!=="body"||Ka(a))&&(c=zi(t)),o){const f=Ba(t,!0,l,t);s.x=f.x+t.clientLeft,s.y=f.y+t.clientTop}else a&&u();l&&!o&&a&&u();const d=a&&!o&&!l?ep(a,c):In(0);return{x:i.left+c.scrollLeft-s.x-d.x,y:i.top+c.scrollTop-s.y-d.y,width:i.width,height:i.height}}function Es(e){return $n(e).position==="static"}function s1(e,t){if(!ur(e)||$n(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return cr(e)===r&&(r=r.ownerDocument.body),r}function np(e,t){const r=Qt(e);if(Fi(e))return r;if(!ur(e)){let a=$r(e);for(;a&&!Ao(a);){if(kn(a)&&!Es(a))return a;a=$r(a)}return r}let o=s1(e,t);for(;o&&ok(o)&&Es(o);)o=s1(o,t);return o&&Ao(o)&&Es(o)&&!Xu(o)?r:o||ik(e)||r}var yk=async function(e){const t=this.getOffsetParent||np,r=this.getDimensions,o=await r(e.floating);return{reference:Lk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bk(e){return $n(e).direction==="rtl"}var _k={convertOffsetParentRelativeRectToViewportRelativeRect:uk,getDocumentElement:cr,getClippingRect:gk,getOffsetParent:np,getElementRects:yk,getClientRects:dk,getDimensions:vk,getScale:$o,isElement:kn,isRTL:bk},wk=qm,kk=jm,$k=Ym,Ek=Gm,Sk=(e,t,r)=>{const o=new Map,a={platform:_k,...r},l={...a.platform,_c:o};return Wm(e,t,{...a,platform:l})},Ck={style:{display:"contents"}},xk=["aria-expanded"],Tk=(0,n.defineComponent)({inheritAttrs:!1,name:"DropDown",__name:"Dropdown",props:(0,n.mergeModels)({value:{},thin:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},disabled:{type:Boolean},icon:{},color:{},triggerClass:{},popupClass:{},iconEnd:{},border:{type:Boolean},outline:{type:Boolean},frame:{type:Boolean},round:{type:Boolean},placement:{default:"bottom-start"},disablePlacement:{type:Boolean,default:!1},noAutoFocus:{type:Boolean},autoHide:{type:Boolean,default:!0},triggers:{default:()=>["click"]},showTriggers:{},hideTriggers:{},popperTriggers:{default:()=>[]},popperShowTriggers:{default:()=>[]},popperHideTriggers:{default:()=>[]},showGroup:{},card:{type:Boolean,default:!0},delay:{},referenceEl:{}},{shown:{type:Boolean,default:!1},shownModifiers:{}}),emits:(0,n.mergeModels)(["show","hide"],["update:shown"]),setup(e,{expose:t,emit:r}){const o=e,a=r,l=(0,n.useModel)(e,"shown"),i=(0,n.ref)(null),c=(0,n.ref)(null);let s=!1;const u=`bgl-dd-${(0,n.useId)()}`,d=(0,n.ref)("body"),{isMobile:f}=qo(),m=(0,n.computed)(()=>o.disablePlacement&&f.value),p=f,h=(0,n.computed)(()=>p.value?o.triggers.map(me=>me==="hover"?"click":me):o.triggers),v=(0,n.computed)(()=>h.value.includes("click")),y=(0,n.computed)(()=>h.value.includes("hover")),g=(0,n.computed)(()=>o.popperTriggers.length>0?o.popperTriggers.includes("hover"):o.triggers.includes("hover")&&!p.value),L=(0,n.computed)(()=>{if(o.icon!==void 0&&o.icon!=="")return o.icon;if(o.value===void 0||o.value==="")return"more_vert"}),b=(0,n.computed)(()=>o.delay!==void 0?typeof o.delay=="number"?{show:o.delay,hide:o.delay}:o.delay:o.triggers.includes("hover")&&!p.value?{show:0,hide:10}:{show:0,hide:0}),_=new Map;async function w(){const me=o.referenceEl??i.value?.firstElementChild;if(!c.value||!me||m.value)return;const le=o.placement==="auto",{x:Le,y:X}=await Sk(me,c.value,{placement:le?void 0:o.placement,strategy:"fixed",middleware:[wk(4),...le?[kk()]:[Ek()],$k({padding:8})]});c.value&&(c.value.style.left=`${Le}px`,c.value.style.top=`${X}px`)}function S(){return!!c.value?.matches(":popover-open")}async function E(){if(o.disabled||S()||(d.value=i.value?.closest("dialog[open]")??"body",o.showGroup&&_.has(o.showGroup)&&_.get(o.showGroup).forEach(le=>le()),await(0,n.nextTick)(),!c.value))return;c.value.dataset.bglId=u;const me=i.value?.closest("[data-bgl-id]");me?.dataset.bglId?c.value.dataset.bglOwner=me.dataset.bglId:delete c.value.dataset.bglOwner,c.value.style.opacity="0",c.value.showPopover(),await w(),c.value.style.opacity="",s&&(V(),s=!1)}function k(me){S()&&((me?.restoreFocus??!0)&&!o.noAutoFocus&&i.value?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')?.focus(),c.value?.hidePopover())}const B=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function I(){return c.value?Array.from(c.value.querySelectorAll(B)).filter(me=>me.offsetParent!==null||me===document.activeElement):[]}function D(me){const le=I();le.length!==0&&le[(me+le.length)%le.length]?.focus()}function V(){o.noAutoFocus||D(0)}function O(me){const le=I();if(le.length===0)return;const Le=le.indexOf(document.activeElement);switch(me.key){case"ArrowDown":me.preventDefault(),D(Le<0?0:Le+1);break;case"ArrowUp":me.preventDefault(),D(Le<0?le.length-1:Le-1);break;case"Home":me.preventDefault(),D(0);break;case"End":me.preventDefault(),D(le.length-1);break}}const N=E;function j(){k()}(0,n.watch)(l,me=>{me&&!S()?E():!me&&S()&&k()});function z(me){me.newState==="open"?(l.value=!0,(0,n.nextTick)(w),a("show")):(l.value=!1,a("hide"))}function $(me){if(!o.autoHide||!S())return;const le=me.target;if(c.value?.contains(le)||i.value?.contains(le)||o.referenceEl instanceof Node&&o.referenceEl.contains(le))return;const Le=document.querySelectorAll("[popover]:popover-open"),X=c.value?.dataset.bglId;for(const ae of Array.from(Le))if(ae!==c.value&&ae.contains(le)&&X&&ae.dataset.bglOwner===X)return;k({restoreFocus:!1})}ts(()=>k(),()=>S());let M,q;function H(){clearTimeout(M),clearTimeout(q)}let K=0;function U(me){const le=Date.now();le-K<50||(K=le,s=me,S()?k():E())}function C(me){v.value&&U(!!me&&me.detail===0)}function A(me){switch(me.key){case"Enter":case" ":case"Spacebar":me.preventDefault(),U(!0);break;case"ArrowDown":me.preventDefault(),s=!0,S()?D(0):E();break;case"ArrowUp":me.preventDefault(),s=!0,S()?D(-1):E();break}}function W(){y.value&&(clearTimeout(q),M=setTimeout(E,b.value.show))}function F(){y.value&&(clearTimeout(M),q=setTimeout(()=>k({restoreFocus:!1}),b.value.hide))}function ne(){g.value&&clearTimeout(q)}function Q(){g.value&&(q=setTimeout(()=>k({restoreFocus:!1}),b.value.hide))}function ce(){S()&&w()}return(0,n.onMounted)(()=>{document.addEventListener("pointerdown",$,!0),document.addEventListener("scroll",ce,{capture:!0,passive:!0}),o.showGroup&&(_.has(o.showGroup)||_.set(o.showGroup,new Set),_.get(o.showGroup).add(k)),l.value&&E()}),(0,n.onBeforeUnmount)(()=>{document.removeEventListener("pointerdown",$,!0),document.removeEventListener("scroll",ce,!0),H(),o.showGroup&&_.get(o.showGroup)?.delete(k),S()&&c.value?.hidePopover()}),t({show:N,hide:j,shown:l}),(me,le)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",Ck,[e.referenceEl?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",(0,n.mergeProps)({key:0,ref_key:"triggerWrapRef",ref:i},me.$attrs,{"aria-haspopup":"menu","aria-expanded":l.value,"aria-controls":u,onMouseenter:W,onMouseleave:F,onFocus:W,onBlur:F,onKeydown:A}),[(0,n.renderSlot)(me.$slots,"trigger",{show:(0,n.unref)(N),hide:j,shown:l.value},()=>[(0,n.createVNode)((0,n.unref)(se),{class:(0,n.normalizeClass)(e.triggerClass),iconEnd:e.iconEnd,icon:L.value,value:e.value,thin:e.thin,flat:e.flat,outline:e.outline,frame:e.frame,round:e.round,color:e.color,disabled:e.disabled,onClick:C},null,8,["class","iconEnd","icon","value","thin","flat","outline","frame","round","color","disabled"])])],16,xk)),((0,n.openBlock)(),(0,n.createBlock)(n.Teleport,{to:d.value},[(0,n.createElementVNode)("div",{id:u,ref_key:"popoverRef",ref:c,popover:"manual",class:(0,n.normalizeClass)(["bgl-dropdown m-0 p-0 border-none",[o.popupClass,{"bgl-dropdown--no-positioning":m.value,"bg-white shadow":o.card}]]),role:"menu",style:{"border-radius":"calc(var(--bgl-card-border-radius) * 0.7)"},onToggle:z,onMouseenter:ne,onMouseleave:Q,onFocus:ne,onBlur:Q,onKeydown:O},[le[0]||(le[0]=(0,n.createElementVNode)("div",{class:"bgl-dropdown__backdrop"},null,-1)),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["bgl-dropdown__content overflow-hidden",{"display-flex column bgl-dropdown__content--card":o.card}]),style:{"border-radius":"calc(var(--bgl-card-border-radius) * 0.7)"}},[(0,n.renderSlot)(me.$slots,"default",{hide:j,show:(0,n.unref)(N),shown:l.value})],2)],34)],8,["to"]))]))}}),Dt=Tk,Nk={key:0,class:"bgl-empty-icon flex-center"},Bk={key:1,class:"bgl-empty-title m-0 opacity-7"},Mk={key:2,class:"bgl-empty-desc m-0"},Dk={key:3,class:"bgl-empty-action"},Ak=(0,n.defineComponent)({name:"BglEmptyState",__name:"EmptyState",props:{icon:{default:"inbox"},title:{default:""},description:{default:""},actionLabel:{default:""},actionIcon:{},to:{},href:{},compact:{type:Boolean,default:!1},class:{default:""}},emits:["action"],setup(e,{emit:t}){const r=t,o=(0,n.useSlots)();return(a,l)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bgl-empty txt-center",[{"bgl-empty--compact":e.compact},e.class]])},[(0,n.unref)(o).icon||e.icon!=="none"?((0,n.openBlock)(),(0,n.createElementBlock)("div",Nk,[(0,n.renderSlot)(a.$slots,"icon",{},()=>[(0,n.createVNode)((0,n.unref)(_e),{icon:e.icon,size:e.compact?1.9:2.4,weight:"300"},null,8,["icon","size"])],!0)])):(0,n.createCommentVNode)("",!0),e.title?((0,n.openBlock)(),(0,n.createElementBlock)("p",Bk,(0,n.toDisplayString)(e.title),1)):(0,n.createCommentVNode)("",!0),e.description||(0,n.unref)(o).default?((0,n.openBlock)(),(0,n.createElementBlock)("p",Mk,[(0,n.renderSlot)(a.$slots,"default",{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.description),1)],!0)])):(0,n.createCommentVNode)("",!0),(0,n.unref)(o).action||e.actionLabel?((0,n.openBlock)(),(0,n.createElementBlock)("div",Dk,[(0,n.renderSlot)(a.$slots,"action",{},()=>[(0,n.createVNode)(se,{color:"primary",thin:e.compact,icon:e.actionIcon,value:e.actionLabel,to:e.to,href:e.href,onClick:l[0]||(l[0]=i=>r("action"))},null,8,["thin","icon","value","to","href"])],!0)])):(0,n.createCommentVNode)("",!0)],2))}}),Ju=be(Ak,[["__scopeId","data-v-37819753"]]),Pk={class:"px-1 pt-025 pb-1"},Ik={class:"ms-1"},Vk=(0,n.defineComponent)({__name:"FieldSetVue",props:{label:{},legend:{}},setup(e){return(t,r)=>((0,n.openBlock)(),(0,n.createElementBlock)("fieldset",Pk,[(0,n.createElementVNode)("legend",Ik,(0,n.toDisplayString)(e.legend||e.label),1),(0,n.renderSlot)(t.$slots,"default",{},void 0,!0)]))}}),Ok=be(Vk,[["__scopeId","data-v-7b2b7aa2"]]);function c1(e,t="px"){if(e===void 0||e==="")return"";if(typeof e=="string"){const r={xs:16,sm:24,md:32,lg:48,xl:64};return e in r?`${r[e]}${t}`:e.endsWith(t)?e:`${e}${t}`}return`${e}${t}`}var Rk=["width","height"],Fk=["r","stroke","stroke-width"],zk=["r","stroke","stroke-width","stroke-dasharray"],Uk={class:"slot-content"},Hk=(0,n.defineComponent)({__name:"Loading",props:{size:{default:50},thickness:{},duration:{default:1.2},type:{default:"ring"},color:{},progress:{}},setup(e){const t=(0,n.computed)(()=>c1(e.size)),r=(0,n.computed)(()=>`${e.duration}s`),o=(0,n.computed)(()=>c1(e.thickness??Math.max(Number.parseInt(t.value,10)/9,2))),a=(0,n.computed)(()=>e.color?e.color.startsWith("#")||e.color.startsWith("rgb")||e.color.startsWith("var(")?e.color:`var(--bgl-${e.color})`:"var(--bgl-text-color)"),l=(0,n.computed)(()=>{const s=Number.parseFloat(o.value),u=Number.parseFloat(t.value);return Math.round(s/u*100)*.9}),i=(0,n.computed)(()=>50-l.value/2),c=(0,n.computed)(()=>Math.PI*2*i.value);return(s,u)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["flex-center loading-container",{progress:e.progress!==void 0}]),style:(0,n.normalizeStyle)({"--progress":e.progress})},[e.type==="bar"?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.renderSlot)(s.$slots,"default",{},void 0,!0),(0,n.createElementVNode)("div",{class:"lds-bar",style:(0,n.normalizeStyle)({animationDuration:r.value,color:a.value})},null,4)],64)):(0,n.createCommentVNode)("",!0),e.type==="ellipsis"?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.renderSlot)(s.$slots,"default",{},void 0,!0),(0,n.createElementVNode)("div",{class:"lds-ellipsis",style:(0,n.normalizeStyle)({"--size":t.value})},[((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(4,d=>(0,n.createElementVNode)("div",{key:d,style:(0,n.normalizeStyle)({color:a.value,"--size":t.value})},null,4)),64))],4)],64)):(0,n.createCommentVNode)("",!0),e.type==="ring"?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:2,class:"lds-ring",style:(0,n.normalizeStyle)({"--size":t.value,"--thickness":o.value})},[e.progress!==void 0?((0,n.openBlock)(),(0,n.createElementBlock)("svg",{key:0,width:t.value,height:t.value,viewBox:"0 0 100 100"},[(0,n.createElementVNode)("circle",{cx:"50",cy:"50",r:i.value,fill:"none",stroke:a.value,"stroke-width":l.value,"stroke-opacity":"0.2"},null,8,Fk),(0,n.createElementVNode)("circle",{cx:"50",cy:"50",r:i.value,fill:"none",stroke:a.value,"stroke-width":l.value,"stroke-linecap":"round","stroke-dasharray":`${e.progress/100*c.value} ${c.value}`,transform:"rotate(-90 50 50)"},null,8,zk)],8,Rk)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},(0,n.renderList)(4,d=>(0,n.createElementVNode)("div",{key:d,class:"ring-segment",style:(0,n.normalizeStyle)({color:a.value,width:t.value,height:t.value,borderWidth:o.value,"--animation-duration":r.value,"--size":t.value,"--thickness":o.value})},null,4)),64)),(0,n.createElementVNode)("div",Uk,[(0,n.renderSlot)(s.$slots,"default",{},void 0,!0)])],4)):(0,n.createCommentVNode)("",!0)],6))}}),Kr=be(Hk,[["__scopeId","data-v-89551186"]]),Wk={class:"bgl-kanban m_pt-075 gap-1 display-flex overflow-x min-h-0 min-w-0"},jk=["onDragover","onDragleave","onDrop"],Gk={class:"bgl-kanban-head gap-05 px-025 flex"},qk={key:1,class:"bgl-kanban-title txt13 semi"},Yk={class:"bgl-kanban-list column display-flex"},Zk=["draggable","onDragstart","onDrop","onClick"],Xk={class:"bgl-kanban-card display-flex column gap-05 border bg-box"},Kk={key:0,class:"bgl-kanban-card-title txt13 semi line-height-13"},Jk={key:1,class:"bgl-kanban-card-sub txt12 opacity-7"},Qk={key:2,class:"bgl-kanban-card-badges gap-025 display-flex flex-wrap"},e$={key:3,class:"bgl-kanban-card-foot1 bg-red txt11 opacity-5 monospace"},t$={key:2,class:"bgl-kanban-foot"},n$=(0,n.defineComponent)({name:"BglKanbanBoard",__name:"KanbanBoard",props:{data:{},groupBy:{},columnsDef:{},columns:{},itemKey:{},cardSchema:{},draggable:{type:Boolean},loadMore:{},emptyText:{default:"Nothing here"}},emits:["move","card-click"],setup(e,{emit:t}){const r=e,o=t,a=(0,n.useSlots)(),l=(0,n.computed)(()=>Array.isArray(r.columns));function i(w,S){if(S!=null)return typeof S=="function"?S(w):w[S]}const c=w=>{const S=r.itemKey;return(S?i(w,S):w.id)??JSON.stringify(w)},s=(0,n.computed)(()=>{if(l.value)return(r.columns??[]).map(k=>({...k,items:k.items??[]}));const w=r.columnsDef??[],S=k=>String(i(k,r.groupBy)??""),E=new Map;for(const k of w)E.set(k.id,[]);for(const k of r.data??[]){const B=S(k);if(!E.has(B))if(!w.length)E.set(B,[]);else continue;E.get(B).push(k)}return w.length?w.map(k=>({...k,items:E.get(k.id)??[]})):[...E.entries()].map(([k,B])=>({id:k,title:k,items:B}))}),u=(0,n.reactive)({});function d(w){return r.loadMore&&typeof w.total=="number"?w.items.length<w.total:!1}async function f(w){const S=(u[w.id]??1)+1;u[w.id]=S,await r.loadMore?.(w.id,S)}const m=(0,n.ref)(null),p=(0,n.ref)(null);function h(w,S){r.draggable&&(m.value={item:w,from:S})}function v(){m.value=null,p.value=null}function y(w,S){if(!r.draggable||!m.value)return;const{item:E,from:k}=m.value,B=S??w.items.length;o("move",{item:E,fromColumn:k,toColumn:w.id,newIndex:B}),v()}function g(w){return i(w,r.cardSchema?.title)}function L(w){return i(w,r.cardSchema?.subtitle)}function b(w){return i(w,r.cardSchema?.id)}function _(w){const S=[];for(const E of r.cardSchema?.badges??[]){const k=i(w,E);k==null||k===""||S.push(typeof k=="object"?k:{label:String(k)})}return S}return(w,S)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",Wk,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.value,E=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:E.id,class:(0,n.normalizeClass)(["bgl-kanban-col column display-flex",{"is-dragover":p.value===E.id}]),onDragover:(0,n.withModifiers)(k=>e.draggable&&(p.value=E.id),["prevent"]),onDragleave:k=>p.value===E.id&&(p.value=null),onDrop:k=>y(E)},[(0,n.createElementVNode)("div",Gk,[(0,n.renderSlot)(w.$slots,"column-header",{column:E,count:E.items.length},()=>[E.color?((0,n.openBlock)(),(0,n.createBlock)(yo,{key:0,dot:"",color:E.color,value:E.title,flat:"",sm:""},null,8,["color","value"])):((0,n.openBlock)(),(0,n.createElementBlock)("span",qk,[E.icon?((0,n.openBlock)(),(0,n.createBlock)(yo,{key:0,icon:E.icon,flat:"",sm:"",value:E.title},null,8,["icon","value"])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createTextVNode)((0,n.toDisplayString)(E.title),1)],64))])),(0,n.createVNode)(yo,{soft:"",color:"gray",sm:"",value:String(typeof E.total=="number"?E.total:E.items.length),class:"ms-auto"},null,8,["value"])],!0)]),(0,n.createElementVNode)("div",Yk,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(E.items,(k,B)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:c(k),class:"bgl-kanban-card-wrap",draggable:e.draggable||void 0,onDragstart:I=>h(k,E.id),onDragend:v,onDrop:(0,n.withModifiers)(I=>y(E,B),["stop"]),onClick:I=>o("card-click",k,E.id)},[(0,n.renderSlot)(w.$slots,"card",{item:k,column:E},()=>[(0,n.createElementVNode)("div",Xk,[g(k)?((0,n.openBlock)(),(0,n.createElementBlock)("div",Kk,(0,n.toDisplayString)(g(k)),1)):(0,n.createCommentVNode)("",!0),L(k)?((0,n.openBlock)(),(0,n.createElementBlock)("div",Jk,(0,n.toDisplayString)(L(k)),1)):(0,n.createCommentVNode)("",!0),_(k).length?((0,n.openBlock)(),(0,n.createElementBlock)("div",Qk,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_(k),(I,D)=>((0,n.openBlock)(),(0,n.createBlock)(yo,{key:D,sm:"",soft:"",color:I.color||"gray",value:I.label},null,8,["color","value"]))),128))])):(0,n.createCommentVNode)("",!0),b(k)?((0,n.openBlock)(),(0,n.createElementBlock)("div",e$,(0,n.toDisplayString)(b(k)),1)):(0,n.createCommentVNode)("",!0)])],!0)],40,Zk))),128)),!E.items.length&&!E.loading?((0,n.openBlock)(),(0,n.createBlock)(Ju,{key:0,compact:"",icon:"inbox",title:e.emptyText,class:"bgl-kanban-empty py-075 opacity-5"},null,8,["title"])):(0,n.createCommentVNode)("",!0),E.loading?((0,n.openBlock)(),(0,n.createBlock)(Kr,{key:1,class:"bgl-kanban-loading p-1 display-flex justify-content-center"})):(0,n.createCommentVNode)("",!0),d(E)||a["column-footer"]?((0,n.openBlock)(),(0,n.createElementBlock)("div",t$,[(0,n.renderSlot)(w.$slots,"column-footer",{column:E},()=>[d(E)?((0,n.openBlock)(),(0,n.createBlock)(se,{key:0,flat:"",thin:"",sm:"","full-width":"",icon:"expand_more",value:"Load more",disabled:E.loading,onClick:k=>f(E)},null,8,["disabled","onClick"])):(0,n.createCommentVNode)("",!0)],!0)])):(0,n.createCommentVNode)("",!0)])],42,jk))),128))]))}}),r$=be(n$,[["__scopeId","data-v-df9f12b7"]]);function rp(e){return e===null?"null":typeof e=="string"?`"${e.replace(/"/g,'\\"')}"`:typeof e=="boolean"?e.toString():String(e)}function fa(e){return`[${e.map(rp).join(", ")}]`}function Ja(e){if(!e||e.length===0)return"";const t=[];for(let r=0;r<e.length;r++){const{field:o,op:a,value:l,connector:i}=e[r];if(r>0&&i&&t.push(i),a==="pr")t.push(`${o} pr`);else if(a==="in"||a==="nin"){const c=Array.isArray(l)?l:l!=null?[l]:[];if(c.length===0)continue;t.push(`${o} ${a} ${fa(c)}`)}else if(a==="between"){const c=Array.isArray(l)?l:[];if(c.length!==2||c[0]==null||c[1]==null)continue;t.push(`${o} between ${fa(c)}`)}else t.push(`${o} ${a} ${rp(l??null)}`)}return t.join(" ")}var o$=class mn{parts=[];eq(t,r){return this.parts.push(`${t} eq ${mn.formatValue(r)}`),this}ne(t,r){return this.parts.push(`${t} ne ${mn.formatValue(r)}`),this}gt(t,r){return this.parts.push(`${t} gt ${mn.formatValue(r)}`),this}ge(t,r){return this.parts.push(`${t} ge ${mn.formatValue(r)}`),this}lt(t,r){return this.parts.push(`${t} lt ${mn.formatValue(r)}`),this}le(t,r){return this.parts.push(`${t} le ${mn.formatValue(r)}`),this}co(t,r){return this.parts.push(`${t} co ${mn.formatValue(r)}`),this}sw(t,r){return this.parts.push(`${t} sw ${mn.formatValue(r)}`),this}ew(t,r){return this.parts.push(`${t} ew ${mn.formatValue(r)}`),this}pr(t){return this.parts.push(`${t} pr`),this}in(t,r){return this.parts.push(`${t} in ${fa(r)}`),this}nin(t,r){return this.parts.push(`${t} nin ${fa(r)}`),this}between(t,r,o){return this.parts.push(`${t} between ${fa([r,o])}`),this}and(){return this.parts.push("and"),this}or(){return this.parts.push("or"),this}not(){return this.parts.push("not"),this}group(t){const r=new mn;t(r);const o=r.build();return o&&this.parts.push(`(${o})`),this}raw(t){return this.parts.push(t),this}clear(){return this.parts=[],this}build(){return this.parts.join(" ")}toString(){return this.build()}[Symbol.toPrimitive](t){return t==="string"?this.build():this.parts.length}static formatValue(t){return t===null?"null":typeof t=="string"?`"${t.replace(/"/g,'\\"')}"`:typeof t=="boolean"?t.toString():String(t)}};function a$(e){const t=new o$;return e&&e.length>0&&t.raw(Ja(e)),t}function l$(e,t){return Ja(e.map((r,o)=>({field:r,op:"eq",value:t,connector:o>0?"or":void 0})))}function i$(e,t,r){return Ja([{field:e,op:"between",value:[t,r]}])}function s$(e,t){return Ja(e.map((r,o)=>({field:r,op:"co",value:t,connector:o>0?"or":void 0})))}function Qu(e,t){if(!e)return!0;try{const r=Ma(e);if(r.length===0)return!0;let o=!0,a=null;for(let l=0;l<r.length;l++){const{field:i,op:c,value:s,connector:u}=r[l],d=c$(t,i);let f=!1;switch(c){case"eq":f=d===s;break;case"ne":f=d!==s;break;case"gt":f=s!=null&&d>s;break;case"ge":f=s!=null&&d>=s;break;case"lt":f=s!=null&&d<s;break;case"le":f=s!=null&&d<=s;break;case"co":f=s!=null&&String(d).includes(String(s));break;case"sw":f=s!=null&&String(d).startsWith(String(s));break;case"ew":f=s!=null&&String(d).endsWith(String(s));break;case"pr":f=d!=null;break;case"in":f=u1(d,s);break;case"nin":f=!u1(d,s);break;case"between":f=u$(d,s);break;default:break}l===0?(o=f,a=f):(o=u==="or"?(a??!1)||f:(a??!1)&&f,a=o)}return o}catch{return!0}}function c$(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function u1(e,t){const r=Array.isArray(t)?t:t!=null?[t]:[];return r.length===0?!1:Array.isArray(e)?e.some(o=>r.includes(o)):r.includes(e)}function u$(e,t){if(!Array.isArray(t)||t.length!==2||e==null)return!1;const[r,o]=t;if(r==null||o==null)return!1;const a=Number(r),l=Number(o),i=Number(e);return!Number.isNaN(a)&&!Number.isNaN(l)&&!Number.isNaN(i)?i>=a&&i<=l:String(e)>=String(r)&&String(e)<=String(o)}var d$=["eq","ne","gt","ge","lt","le","co","sw","ew","pr","in","nin","between"],f$=["and","or"],m$=["in","nin","between"];function op(e){const t=e.trim();if(t==="null")return null;if(t==="true")return!0;if(t==="false")return!1;if(t.startsWith('"')&&t.endsWith('"'))return t.slice(1,-1).replace(/\\"/g,'"');const r=Number(t);return!Number.isNaN(r)&&t!==""?r:t}function p$(e){let t=e.trim();if(t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t.trim()==="")return[];const r=[];let o="",a=!1;for(let l=0;l<t.length;l++){const i=t[l];if(a){if(i==="\\"&&t[l+1]==='"'){o+='\\"',l++;continue}if(i==='"'){o+='"',a=!1;continue}o+=i}else i==='"'?(o+='"',a=!0):i===","?(r.push(o),o=""):o+=i}return o.trim()!==""&&r.push(o),r.map(l=>op(l.trim()))}function Ma(e){if(e==null||e.trim()==="")return[];const t=h$(e);return ap(t,0,t.length).conditions}function ap(e,t,r){const o=[];let a=t;for(;a<r;){let l;if(o.length>0&&f$.includes(e[a]?.toLowerCase())&&(l=e[a].toLowerCase(),a++),a>=r)break;if(e[a]==="("){let d=1,f=a+1;for(;f<r&&d>0;)e[f]==="("?d++:e[f]===")"&&d--,f++;const m=ap(e,a+1,f-1);l&&m.conditions.length>0&&(m.conditions[0].connector=l),o.push(...m.conditions),a=f;continue}if(e[a]===")"){a++;continue}const i=e[a++];if(a>=r)break;const c=e[a++]?.toLowerCase();if(!d$.includes(c))throw new Error(`Invalid operator: ${c}`);let s;if(c!=="pr"){if(a>=r)throw new Error(`Missing value for operator ${c}`);const d=e[a++];s=m$.includes(c)?p$(d):op(d)}const u={field:i,op:c,value:s};l&&(u.connector=l),o.push(u)}return{conditions:o,endIndex:a}}function h$(e){const t=[];let r="",o=!1,a=0;for(;a<e.length;){const l=e[a];if(o){if(l==="\\"&&e[a+1]==='"'){r+='\\"',a+=2;continue}if(l==='"'){r+='"',t.push(r),r="",o=!1,a++;continue}r+=l,a++}else{if(l==='"'){r&&t.push(r),r='"',o=!0,a++;continue}if(l==="["){r&&(t.push(r),r="");let i="[";a++;let c=!1;for(;a<e.length;){const s=e[a];if(c){if(s==="\\"&&e[a+1]==='"'){i+='\\"',a+=2;continue}s==='"'&&(c=!1),i+=s,a++;continue}if(s==='"'){c=!0,i+=s,a++;continue}if(i+=s,a++,s==="]")break}t.push(i);continue}if(l==="("||l===")"){r&&(t.push(r),r=""),t.push(l),a++;continue}if(l===" "||l===" "){r&&(t.push(r),r=""),a++;continue}r+=l,a++}}return r&&t.push(r),t}var g$={class:"p-025 bg-bg radius-1 mb-05 m_max-h-300px m_overflow m_border"},v$={key:0,class:"opacity-3 flex gap-05 p-025 min-w-450px m_min-0"},L$={class:""},y$={key:0,class:"w-fit"},b$={key:1},_$={class:"flex gap-1 space-between m_flex-wrap"},w$={class:"flex gap-05"},k$=(0,n.defineComponent)({__name:"FilterQuery",props:(0,n.mergeModels)({fields:{},placement:{default:"bottom-end"},inline:{type:Boolean,default:!1},desktopLayoutOnMobile:{type:Boolean,default:!1}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:(0,n.mergeModels)(["change","save"],["update:modelValue"]),setup(e,{emit:t}){const r=e,o=t,a=(0,n.useModel)(e,"modelValue"),l=(0,n.ref)(B([...a.value])),{$t:i}=rt(),c=(0,n.getCurrentInstance)(),s=(0,n.computed)(()=>!!c?.vnode.props?.onSave),u=(0,n.computed)(()=>W.value>0?`${v.value.filter} (${W.value})`:v.value.filter),d=(0,n.computed)(()=>r.inline?{}:{flat:!0,placement:r.placement,icon:"filter_alt",value:u.value,thin:!0});function f(X){return!X.field||!X.op?!1:S(X.field)?X.value!==""&&X.value!=null:X.op==="pr"?!0:X.op==="in"||X.op==="nin"?Array.isArray(X.value)&&X.value.length>0:X.op==="between"?Array.isArray(X.value)&&X.value.length===2&&X.value[0]!==""&&X.value[0]!=null&&X.value[1]!==""&&X.value[1]!=null:X.value!==""&&X.value!==null&&X.value!==void 0}const m=Zr(()=>{const X=k(l.value.filter(f));a.value=X,o("change",X)},400);let p=0;function h(){return`cond_${++p}_${Date.now()}`}const v=(0,n.computed)(()=>({filter:i("filter.filter"),noActiveFilters:i("filter.noActiveFilters"),connectors:{and:i("filter.connectors.and"),or:i("filter.connectors.or")},operators:{eq:i("filter.operators.eq"),ne:i("filter.operators.ne"),gt:i("filter.operators.gt"),ge:i("filter.operators.ge"),lt:i("filter.operators.lt"),le:i("filter.operators.le"),co:i("filter.operators.co"),sw:i("filter.operators.sw"),ew:i("filter.operators.ew"),pr:i("filter.operators.pr"),in:i("filter.operators.in"),nin:i("filter.operators.nin"),between:i("filter.operators.between")},placeholders:{selectField:i("filter.placeholders.selectField"),selectOption:i("filter.placeholders.selectOption"),selectDate:i("filter.placeholders.selectDate"),enterValue:i("filter.placeholders.enterValue"),from:i("filter.placeholders.from"),to:i("filter.placeholders.to"),commaSeparated:i("filter.placeholders.commaSeparated")},buttons:{addCondition:i("filter.buttons.addCondition"),clearAll:i("filter.buttons.clearAll")},boolean:{true:i("select.yes"),false:i("select.no")}})),y=new Map,g=(0,n.computed)(()=>(l.value||[]).map((X,ae)=>(y.has(ae)||y.set(ae,h()),{id:y.get(ae),field:X.field,operator:X.op,value:Array.isArray(X.value)?X.value.map(String):X.value===null?"null":X.value===void 0?"":String(X.value),connector:ae>0?X.connector||"and":""}))),L=(0,n.computed)(()=>[{label:v.value.operators.eq,value:"eq"},{label:v.value.operators.ne,value:"ne"},{label:v.value.operators.gt,value:"gt"},{label:v.value.operators.ge,value:"ge"},{label:v.value.operators.lt,value:"lt"},{label:v.value.operators.le,value:"le"},{label:v.value.operators.co,value:"co"},{label:v.value.operators.sw,value:"sw"},{label:v.value.operators.ew,value:"ew"},{label:v.value.operators.pr,value:"pr"},{label:v.value.operators.in,value:"in"},{label:v.value.operators.nin,value:"nin"},{label:v.value.operators.between,value:"between"}]);function b(X,ae,Y){const J=re=>L.value.filter(R=>re.includes(R.value));if(Y&&ae)return J(["in","nin","pr"]);if(ae)return J(["eq","ne","in","nin","pr"]);switch(X){case"boolean":return J(["eq","ne","pr"]);case"number":case"date":return J(["eq","ne","gt","ge","lt","le","between","in","nin","pr"]);default:return J(["eq","ne","co","sw","ew","in","nin","pr"])}}function _(X){return r.fields.find(ae=>ae.value===X)}function w(X){return _(X)?.options}function S(X){const ae=_(X);return!!(ae?.queryOptions&&ae.queryOptions.length>0)}function E(X){const ae=_(X);return!!(ae?.multiple&&ae?.options)}function k(X){const ae=[];for(const Y of X){const J=_(Y.field)?.queryOptions?.find(re=>re.value===Y.value);if(J){const re=Ma(J.query);re.length&&(re[0]={...re[0],connector:Y.connector},ae.push(...re))}else ae.push(Y)}return ae}function B(X){const ae=r.fields.filter(re=>re.queryOptions?.length);if(!ae.length)return X;const Y=[];let J=0;for(;J<X.length;){let re=!1;for(const R of ae){for(const G of R.queryOptions){const de=Ma(G.query),he=de.length;if(!he||J+he>X.length)continue;const Ne=X.slice(J,J+he);if(Ne.every((He,Ae)=>{const fe=de[Ae];return He.field===fe.field&&He.op===fe.op&&He.value===fe.value&&(Ae===0||He.connector===fe.connector)})){Y.push({field:R.value,op:"eq",value:G.value,connector:Ne[0].connector}),J+=he,re=!0;break}}if(re)break}re||(Y.push(X[J]),J++)}return Y}const I=(0,n.computed)(()=>[{label:v.value.boolean.true,value:"true"},{label:v.value.boolean.false,value:"false"}]);function D(X){return typeof X=="number"||typeof X=="boolean"||X===null?X:X==="true"?!0:X==="false"?!1:X==="null"?null:!Number.isNaN(Number(X))&&X.trim()!==""?Number(X):X}function V(X,ae){const Y=[...l.value],J=Y[X];if(!J)return;const re={...J};ae.field!==void 0&&(re.field=ae.field),ae.op!==void 0&&(re.op=ae.op),ae.value!==void 0&&(re.value=Array.isArray(ae.value)?ae.value.map(R=>D(typeof R=="string"?R:String(R))):D(ae.value)),ae.connector!==void 0&&(re.connector=ae.connector),Y[X]=re,l.value=Y,m()}function O(){const X=r.fields[0]?.value||"field",ae=E(X),Y={field:X,op:ae?"in":"eq",value:ae?[]:"",connector:a.value.length>0?"and":void 0};l.value=[...l.value,Y]}function N(X){const ae=[...l.value];ae.splice(X,1),ae.length>0&&ae[0].connector&&(ae[0]={...ae[0],connector:void 0}),y.delete(X),l.value=ae,m()}function j(){y.clear(),l.value=[],a.value=[],o("change",[])}function z(X){return r.fields.find(ae=>ae.value===X)?.type||"string"}function $(X){return X!=="pr"}function M(X){return X==="in"||X==="nin"}function q(X){return X==="between"}function H(X){return M(X.operator)&&!w(X.field)}function K(X){return Array.isArray(X)?X.join(", "):X??""}function U(X){return X.split(",").map(ae=>ae.trim()).filter(ae=>ae!=="")}function C(X,ae){return Array.isArray(X.value)?X.value[ae]??"":""}function A(X,ae,Y){const J=g.value.find(R=>R.id===X),re=J&&Array.isArray(J.value)?[...J.value]:["",""];re[ae]=Y,ce(X,[re[0]??"",re[1]??""])}const W=(0,n.computed)(()=>g.value.filter(X=>!!X.field&&(X.operator==="pr"||!!X.value)).length);function F(X){return g.value.findIndex(ae=>ae.id===X)}function ne(X,ae){const Y=F(X);if(Y<0)return;const J=_(ae);if(J?.queryOptions?.length){V(Y,{field:ae,op:"eq",value:""});return}const re=!!(J?.multiple&&J?.options),R=b(J?.type||"string",!!J?.options,re);V(Y,{field:ae,op:re?"in":R[0]?.value??"eq",value:re?[]:""})}function Q(X,ae){const Y=F(X);if(Y<0)return;const J=g.value[Y]?.operator,re={op:ae},R=J==="in"||J==="nin",G=J==="between",de=ae==="in"||ae==="nin",he=ae==="between";he&&!G?re.value=["",""]:de&&!R?re.value=[]:!de&&!he&&(R||G)&&(re.value=""),V(Y,re)}function ce(X,ae){const Y=F(X);Y>=0&&V(Y,{value:ae})}function me(X,ae){const Y=F(X);Y>=0&&V(Y,{value:ae})}function le(X){return Array.isArray(X.value)?"":X.value}function Le(X,ae){const Y=F(X);Y>=0&&V(Y,{connector:ae})}return(X,ae)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(r.inline?"div":(0,n.unref)(Dt)),(0,n.mergeProps)(d.value,{class:["filter-query-wrap",{"filter-query-inline":r.inline,"filter-query-desktop-mobile":r.inline||r.desktopLayoutOnMobile}]}),{default:(0,n.withCtx)(()=>[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(r.inline?"div":(0,n.unref)(Wn)),{class:(0,n.normalizeClass)({"p-05":!r.inline})},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",g$,[g.value.length===0?((0,n.openBlock)(),(0,n.createElementBlock)("div",v$,[(0,n.createVNode)((0,n.unref)(_e),{name:"info"}),(0,n.createElementVNode)("div",L$,(0,n.toDisplayString)(v.value.noActiveFilters),1)])):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(n.TransitionGroup,{name:"condition"},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(g.value,(Y,J)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:Y.id,class:(0,n.normalizeClass)(["grid gap-025 align-items-center pt-025",{"":J>0&&Y.connector==="or","pt-075 border-top-or":J>0&&Y.connector==="or","first-filter-row":J===0,"filter-row":J>0}])},[J>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",y$,[(0,n.createVNode)((0,n.unref)(Bt),{"model-value":Y.connector||"and",options:[{label:v.value.connectors.and,value:"and"},{label:v.value.connectors.or,value:"or"}],class:"m-0 and-or-select txt-12","onUpdate:modelValue":re=>Le(Y.id,re)},null,8,["model-value","options","onUpdate:modelValue"])])):(0,n.createCommentVNode)("",!0),(0,n.createVNode)((0,n.unref)(Bt),{"model-value":Y.field,options:e.fields,placeholder:v.value.placeholders.selectField,class:(0,n.normalizeClass)(["m-0 light-input borderHover",{"first-filter-field":J===0}]),searchable:"","onUpdate:modelValue":re=>ne(Y.id,re)},null,8,["model-value","options","placeholder","class","onUpdate:modelValue"]),S(Y.field)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Bt),{key:`${Y.id}-${Y.field}-qpreset`,"model-value":le(Y),options:_(Y.field).queryOptions,placeholder:v.value.placeholders.selectOption,class:"m-0 light-input borderHover",style:{"grid-column":"span 2"},"onUpdate:modelValue":re=>me(Y.id,re)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[(0,n.createVNode)((0,n.unref)(Bt),{"model-value":Y.operator,options:b(z(Y.field),!!w(Y.field),E(Y.field)),class:"m-0 light-input borderHover","onUpdate:modelValue":re=>Q(Y.id,re)},null,8,["model-value","options","onUpdate:modelValue"]),$(Y.operator)?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[q(Y.operator)?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:`${Y.id}-${Y.field}-between`,class:"flex gap-025 align-items-center between-inputs"},[z(Y.field)==="date"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Hr),{key:0,"model-value":C(Y,0),placeholder:v.value.placeholders.from,class:"m-0 light-input borderHover","onUpdate:modelValue":re=>A(Y.id,0,String(re))},null,8,["model-value","placeholder","onUpdate:modelValue"])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:1,"model-value":C(Y,0),placeholder:"0",type:z(Y.field)==="number"?"number":"text",class:"m-0 light-input borderHover","onUpdate:modelValue":re=>A(Y.id,0,re)},null,8,["model-value","type","onUpdate:modelValue"])),ae[1]||(ae[1]=(0,n.createElementVNode)("span",{class:"opacity-4 txt-12"},"–",-1)),z(Y.field)==="date"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Hr),{key:2,"model-value":C(Y,1),placeholder:v.value.placeholders.to,class:"m-0 light-input borderHover","onUpdate:modelValue":re=>A(Y.id,1,String(re))},null,8,["model-value","placeholder","onUpdate:modelValue"])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:3,"model-value":C(Y,1),placeholder:"0",type:z(Y.field)==="number"?"number":"text",class:"m-0 light-input borderHover","onUpdate:modelValue":re=>A(Y.id,1,re)},null,8,["model-value","type","onUpdate:modelValue"]))])):w(Y.field)&&M(Y.operator)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Bt),{key:`${Y.id}-${Y.field}-multi`,"model-value":Array.isArray(Y.value)?Y.value:[],options:w(Y.field),placeholder:v.value.placeholders.selectOption,class:"m-0 light-input borderHover",searchable:"",multiselect:"","onUpdate:modelValue":re=>ce(Y.id,re)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):H(Y)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:`${Y.id}-${Y.field}-freelist`,"model-value":K(Y.value),placeholder:v.value.placeholders.commaSeparated,class:"m-0 light-input borderHover","onUpdate:modelValue":re=>ce(Y.id,U(re))},null,8,["model-value","placeholder","onUpdate:modelValue"])):w(Y.field)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Bt),{key:`${Y.id}-${Y.field}-single`,"model-value":Y.value,options:w(Y.field),placeholder:v.value.placeholders.selectOption,class:"m-0 light-input borderHover",searchable:"","onUpdate:modelValue":re=>ce(Y.id,re)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):z(Y.field)==="boolean"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Bt),{key:`${Y.id}-${Y.field}-bool`,"model-value":Y.value,options:I.value,placeholder:v.value.placeholders.selectOption,class:"m-0 light-input borderHover","onUpdate:modelValue":re=>ce(Y.id,re)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):z(Y.field)==="date"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Hr),{key:`${Y.id}-${Y.field}-date`,"model-value":Y.value,placeholder:v.value.placeholders.selectDate,class:"m-0 light-input borderHover","onUpdate:modelValue":re=>ce(Y.id,String(re))},null,8,["model-value","placeholder","onUpdate:modelValue"])):z(Y.field)==="number"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:`${Y.id}-${Y.field}-number`,"model-value":Y.value,placeholder:"0",type:"number",class:"m-0 light-input borderHover","onUpdate:modelValue":re=>ce(Y.id,re)},null,8,["model-value","onUpdate:modelValue"])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:7,"model-value":Y.value,placeholder:v.value.placeholders.enterValue,class:"m-0 light-input borderHover","onUpdate:modelValue":re=>ce(Y.id,re)},null,8,["model-value","placeholder","onUpdate:modelValue"]))],64)):((0,n.openBlock)(),(0,n.createElementBlock)("div",b$))],64)),(0,n.createVNode)((0,n.unref)(se),{icon:"close",thin:"",flat:"",size:"sm",class:(0,n.normalizeClass)({"m_bg-gray-40 m_px-3 m_mx-auto":!r.inline&&!r.desktopLayoutOnMobile}),onClick:re=>N(J)},null,8,["class","onClick"])],2))),128))]),_:1})]),(0,n.createElementVNode)("div",_$,[(0,n.createVNode)((0,n.unref)(se),{icon:"add",flat:"",thin:"",value:v.value.buttons.addCondition,onClick:O},null,8,["value"]),(0,n.createElementVNode)("div",w$,[g.value.length>0?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:0,icon:"delete_sweep",flat:"",thin:"",color:"gray",value:v.value.buttons.clearAll,onClick:j},null,8,["value"])):(0,n.createCommentVNode)("",!0),s.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:1,disabled:g.value.length===0,class:"color-green",icon:"save",thin:"",color:"green-light",value:(0,n.unref)(i)("filter.buttons.save"),onClick:ae[0]||(ae[0]=Y=>o("save",l.value.filter(f)))},null,8,["disabled","value"])):(0,n.createCommentVNode)("",!0)])])]),_:1},8,["class"]))]),_:1},16,["class"]))}}),$$=k$,E$=(0,n.defineComponent)({__name:"Flag",props:{country:{},size:{},circle:{type:Boolean},square:{type:Boolean}},setup(e){const t=e,r=(0,n.computed)(()=>!!(t.circle||t.square)),o=(0,n.computed)(()=>`${t.size??1}rem`),a=(0,n.computed)(()=>{let l=t.country.toLowerCase();l==="ac"&&(l="sh-ac");const i="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/flags";return r.value?`url(${i}/1x1/${l.toLowerCase()}.svg)`:`url(${i}/4x3/${l.toLowerCase()}.svg)`});return(l,i)=>((0,n.openBlock)(),(0,n.createElementBlock)("span",{class:(0,n.normalizeClass)(["fi",{fis:r.value,circle:e.circle}]),style:(0,n.normalizeStyle)({height:o.value,backgroundImage:a.value})},null,6))}}),Ac=be(E$,[["__scopeId","data-v-9f07b0be"]]),S$={class:"floating-panel"},C$={class:"floating-panel-box"},x$={class:"floating-panel-controls flex align-items-center gap-025 p-025 border-bottom"},T$={class:"floating-panel-body"},N$=(0,n.defineComponent)({__name:"FloatingPanel",props:{launcherIcon:{default:"chat"},launcherLabel:{default:""},launcher:{type:Boolean,default:!0},open:{type:Boolean,default:!1}},emits:["update:open"],setup(e,{expose:t,emit:r}){const o=r,a=(0,n.ref)(e.open);(0,n.watch)(()=>e.open,i=>{a.value=i});function l(i){a.value=i,o("update:open",i)}return t({open:()=>l(!0),close:()=>l(!1),toggle:()=>l(!a.value)}),(i,c)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[e.launcher&&!a.value?((0,n.openBlock)(),(0,n.createBlock)(se,{key:0,color:"primary",round:"",icon:e.launcherIcon,value:e.launcherLabel,class:"floating-panel-fab fixed bottom-1-5 end-1-5 z-9 shadow",onClick:c[0]||(c[0]=s=>l(!0))},null,8,["icon","value"])):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(n.Transition,{name:"floating-panel"},{default:(0,n.withCtx)(()=>[(0,n.withDirectives)((0,n.createElementVNode)("div",S$,[(0,n.createElementVNode)("div",C$,[(0,n.createElementVNode)("div",x$,[(0,n.renderSlot)(i.$slots,"controls",{close:()=>l(!1)},()=>[(0,n.createVNode)(se,{icon:"remove",flat:"",thin:"",size:"xs",class:"ms-auto",onClick:c[1]||(c[1]=s=>l(!1))})],!0)]),(0,n.createElementVNode)("div",T$,[(0,n.renderSlot)(i.$slots,"default",{close:()=>l(!1)},void 0,!0)])])],512),[[n.vShow,a.value]])]),_:3})],64))}}),B$=be(N$,[["__scopeId","data-v-6c72ad08"]]);function ht(e){return{shellClass:(0,n.computed)(()=>{const t=(0,n.toValue)(e);return{frame:!!t.frame,"bgl-outline":!!t.outline}}),shellStyle:(0,n.computed)(()=>{const t=(0,n.toValue)(e),r={};return t.minWidth&&(r.minWidth=t.minWidth),t.maxWidth&&(r.maxWidth=t.maxWidth),t.labelColor&&(r["--bgl-input-label-color"]=t.labelColor),t.labelActiveColor&&(r["--bgl-input-label-active-color"]=t.labelActiveColor),Object.keys(r).length>0?r:void 0})}}var M$={key:0,class:"txt12 txt-gray-90 mb-025 block"},D$={key:1,class:"helptext"},A$={class:"border radius-1 overflow-hidden"},P$={class:"grid gap-0 grid-array-line align-items-center pe-025 hover"},I$={key:1},V$={class:"flex align-items-center gap-05 w-100p overflow-hidden"},O$=["src"],R$={class:"ellipsis-1"},F$={key:0,class:"array-input-row grid align-items-center px-05"},z$=(0,n.defineComponent)({__name:"ArrayInput",props:{label:{},helptext:{},modelValue:{},allowAdd:{type:Boolean},allowDelete:{type:Boolean},allowReorder:{type:Boolean},addText:{},deleteTooltip:{},itemLabel:{},collapsible:{type:Boolean},simple:{type:Boolean},createItem:{type:Function},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,{shellClass:o,shellStyle:a}=ht(r),l=t,i=(0,n.useSlots)(),{$t:c}=rt(),s=(0,n.ref)(Array.isArray(r.modelValue)?[...r.modelValue]:[]),u=(0,n.ref)(Array.from({length:s.value.length},()=>!0)),d=(0,n.computed)(()=>s.value.some(D=>D!=null&&D!=="")),f=(0,n.computed)(()=>{const D=$e(r.itemLabel);return typeof D=="string"&&D.length>0?D:c("arrayInput.item")}),m=["title","name","label","displayName","display_name","heading","caption","text"],p=["image","thumbnail","avatar","photo","picture","profilePic","profile_pic","icon","logo"];function h(D){return!D.includes("<")&&!D.includes("&")?D.trim():(new DOMParser().parseFromString(D,"text/html").body.textContent||"").replace(/\s+/g," ").trim()}function v(D){if(typeof D=="string"&&D.trim().length>0){const V=h(D);return V.length>0?V:null}if(D!=null&&typeof D=="object")for(const V of m){const O=D[V];if(typeof O=="string"&&O.trim().length>0){const N=h(O);if(N.length>0)return N}}return null}function y(D){if(D!=null&&typeof D=="object")for(const V of p){const O=D[V];if(typeof O=="string"&&O.trim().length>0)return O.trim()}return null}function g(D){const V=v(s.value[D]);return V!=null?`${D+1}. ${V}`:`${f.value} ${D+1}`}(0,n.watch)(()=>r.modelValue,D=>{Array.isArray(D)&&(s.value=[...D],u.value.length!==D.length&&(u.value=Array.from({length:D.length},(V,O)=>u.value[O]??!0)))});function L(){const D=r.createItem?r.createItem():{};s.value.push(D),u.value.push(!1),E()}function b(D){s.value.splice(D,1),u.value.splice(D,1),E()}function _(D){u.value[D]=!u.value[D]}function w(D,V){if(V<0||V>=s.value.length||D===V)return;const[O]=s.value.splice(D,1);s.value.splice(V,0,O);const[N]=u.value.splice(D,1);u.value.splice(V,0,N),E()}function S(D){w(D.oldIndex,D.newIndex)}function E(){l("update:modelValue",[...s.value])}function k(D,V){s.value[V]=D,E()}const B=(0,n.computed)(()=>{if(r.simple)return!0;if(!i.default)return!1;const D=(0,n.computed)({get:()=>{},set:()=>{}});return i.default({item:D,index:0}).filter(V=>typeof V.type!="symbol").length===1});function I(D){return(0,n.computed)({get:()=>s.value[D],set:V=>{k(V,D)}})}return(D,V)=>{const O=(0,n.resolveDirective)("tooltip");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input array-input testMe1",[(0,n.unref)(o),{"has-value":d.value}]]),style:(0,n.normalizeStyle)((0,n.unref)(a))},[e.label?((0,n.openBlock)(),(0,n.createElementBlock)("label",M$,(0,n.toDisplayString)((0,n.unref)($e)(e.label)),1)):(0,n.createCommentVNode)("",!0),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",D$,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0),e.collapsible?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,{key:2},(0,n.renderList)(s.value,(N,j)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:j,class:(0,n.normalizeClass)(["array-input-row grid align-items-center",{simpleArray:B.value,"pb-1":!B.value}])},[(0,n.renderSlot)(D.$slots,"default",{item:I(j),index:j}),e.allowDelete?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:(0,n.normalizeClass)(["h-100p",{"border-start ps-025 ms-075":!e.simple}])},[(0,n.withDirectives)((0,n.createVNode)((0,n.unref)(se),{flat:"",icon:"delete",onClick:z=>b(j)},null,8,["onClick"]),[[O,(0,n.unref)($e)(e.deleteTooltip||"Delete")]])],2)):(0,n.createCommentVNode)("",!0)],2))),128)),e.collapsible?((0,n.openBlock)(),(0,n.createBlock)(Fm,{key:3,"model-value":s.value,handle:".grab",disabled:!e.allowReorder,class:"grid gap-05 mb-05",onEnd:S},{default:(0,n.withCtx)(({index:N})=>[(0,n.createElementVNode)("div",A$,[(0,n.createElementVNode)("div",P$,[e.allowReorder?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:0,flat:"",thin:"",icon:"drag_indicator",class:"grab"},null,512)),[[O,(0,n.unref)($e)("Drag to reorder")]]):((0,n.openBlock)(),(0,n.createElementBlock)("div",I$)),(0,n.createVNode)((0,n.unref)(se),{"full-width":"","align-txt":"start",class:"px-025 bg-transparent color-inherit w-100p overflow-hidden",ripple:!1,icon:u.value[N]?"expand_more":"expand_less",onClick:j=>_(N)},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",V$,[y(s.value[N])?((0,n.openBlock)(),(0,n.createElementBlock)("img",{key:0,src:(0,n.unref)(an)(y(s.value[N])),class:"array-item-thumb",onError:V[0]||(V[0]=j=>j.target.style.display="none")},null,40,O$)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("p",R$,(0,n.toDisplayString)(g(N)),1)])]),_:2},1032,["icon","onClick"]),e.allowDelete?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:2,flat:"",icon:"delete",thin:"",confirm:(0,n.unref)($e)("Are you sure you want to delete this item?"),onClick:j=>b(N),"icon-size":"0.8"},null,8,["confirm","onClick"])),[[O,(0,n.unref)($e)(e.deleteTooltip||"Delete")]]):(0,n.createCommentVNode)("",!0)]),(0,n.createVNode)(n.Transition,{name:"array-collapse"},{default:(0,n.withCtx)(()=>[u.value[N]?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",F$,[(0,n.renderSlot)(D.$slots,"default",{item:I(N),index:N})]))]),_:2},1024)])]),_:3},8,["model-value","disabled"])):(0,n.createCommentVNode)("",!0),e.allowAdd?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:4,class:"radius-1",thin:"",icon:"add",value:(0,n.unref)($e)(e.addText||"Add"),onClick:L},null,8,["value"])):(0,n.createCommentVNode)("",!0)],6)}}}),ho=z$,U$={class:"primary-checkbox"},H$=(0,n.defineComponent)({name:"BglCheckbox",__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=(0,n.useModel)(e,"modelValue");return(r,o)=>((0,n.openBlock)(),(0,n.createElementBlock)("label",U$,[(0,n.renderSlot)(r.$slots,"label",{},void 0,!0),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>t.value=a),type:"checkbox"},null,512),[[n.vModelCheckbox,t.value]])]))}}),W$=be(H$,[["__scopeId","data-v-2e5bdc80"]]),j$=["title"],G$=["id","disabled","value","required"],q$=["for"],Y$=(0,n.defineComponent)({__name:"CheckInput",props:(0,n.mergeModels)({label:{},id:{},title:{},small:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean},defaultValue:{},value:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{shellClass:r,shellStyle:o}=ht(t),a=Math.random().toString(36).slice(7),l=(0,n.computed)(()=>t.id||a),i=(0,n.useModel)(e,"modelValue"),c=(0,n.computed)(()=>{const s=i.value;return Array.isArray(s)?s.length>0:!!s});return(0,n.onMounted)(()=>{i.value===void 0&&t.defaultValue!==void 0&&(i.value=t.defaultValue)}),(s,u)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input bgl-checkbox align-items-center ps-025",[(0,n.unref)(r),{small:e.small,"has-value":c.value}]]),title:e.title,style:(0,n.normalizeStyle)((0,n.unref)(o))},[(0,n.withDirectives)((0,n.createElementVNode)("input",{id:l.value+e.value,"onUpdate:modelValue":u[0]||(u[0]=d=>i.value=d),disabled:e.disabled,value:e.value,required:e.required,type:"checkbox",class:"me-05"},null,8,G$),[[n.vModelCheckbox,i.value]]),(0,n.createElementVNode)("label",{for:l.value+e.value},[(0,n.renderSlot)(s.$slots,"label",{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label)),1)],!0)],8,q$)],14,j$))}}),Ct=be(Y$,[["__scopeId","data-v-2a832462"]]);function Z$(e="dark"){const t=(0,n.ref)(null),r=(0,n.ref)(!1),o=(0,n.ref)(e),a=m=>m==="dark"?"atom-one-dark":m==="light"?"atom-one-light":m,l=m=>`https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/styles/${m}.min.css`,i=m=>{document.querySelectorAll('link[rel="stylesheet"]').forEach(p=>{p instanceof HTMLLinkElement&&p.href.includes("/styles/")&&p.href.includes("highlight.js")&&p.href!==m&&p.parentElement?.removeChild(p)})},c=async m=>{const p=a(m);try{const h=l(p);await hu(h),i(h),o.value=p}catch{o.value="atom-one-dark";const v=l(o.value);await hu(v),i(v)}},s=async m=>{const p=a(m);p!==o.value&&await c(p)},u=async()=>{if(!r.value)try{await ll("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/highlight.min.js",{id:"hljs-cdn"});const m=await Oa("hljs");await c(o.value),t.value=m,r.value=!0}catch{}},d=m=>m.replace(/[&<>"']/g,p=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[p]||"");return{hljs:t,loaded:r,loadHighlight:u,setTheme:s,currentTheme:o,escapeHtml:d,highlightCode:(m,p,h=!0,v=!0)=>{if(!t.value)return d(m);try{const y=p||"";return y&&!h&&!t.value.getLanguage(y)?d(m):(h?t.value.highlightAuto(m):t.value.highlight(m,{language:y,ignoreIllegals:v})).value||d(m)}catch{return d(m)}}}}var X$={key:0,class:"label"},K$={class:"editor-content-papa"},J$={class:"code-display"},Q$=["innerHTML"],eE={key:0,class:"code-placeholder"},tE=["value"],nE=(0,n.defineComponent)({__name:"Index",props:{language:{type:String,default:"html"},readonly:{type:Boolean,default:!1},modelValue:{type:[String,Object],default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0},label:{type:String,default:""},placeholder:{type:String,default:""},height:{type:String,default:"240px"},disabled:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},singleLine:{type:Boolean,default:!1},theme:{type:String,default:"dark"},frame:{type:Boolean,default:void 0},outline:{type:Boolean,default:void 0},minWidth:{type:String,default:void 0},maxWidth:{type:String,default:void 0},labelColor:{type:String,default:void 0},labelActiveColor:{type:String,default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,{shellClass:a,shellStyle:l}=ht(r),i=(0,n.computed)(()=>typeof r.modelValue=="object");function c(k){return typeof k=="string"?k:typeof k=="object"?JSON.stringify(k,null,2):""}const s=(0,n.ref)(c(r.modelValue)),u=(0,n.computed)(()=>!!s.value?.trim()),d=(0,n.ref)(),f=(0,n.ref)(!1),{loaded:m,loadHighlight:p,highlightCode:h,setTheme:v}=Z$(r.theme),y=(0,n.computed)(()=>{if(r.singleLine)return;const k=r.height;return k.match(/^\d+$/)?`${k}px`:k}),g=(0,n.computed)(()=>{const k=String(r.theme).toLowerCase();return k==="light"?!0:k==="dark"||k.includes("dark")?!1:k.includes("light")||k.includes("dawn")?!0:["github","xcode","vs","docco","default","foundation","googlecode","idea","magula","ascetic","brown-paper","color-brewer","grayscale","school-book","routeros","purebasic"].includes(k)}),L=(0,n.computed)(()=>h(s.value,r.language,r.autodetect,r.ignoreIllegals));function b(k){if(s.value=k.target.value,i.value)try{o("update:modelValue",JSON.parse(s.value))}catch{o("update:modelValue",s.value)}else o("update:modelValue",s.value)}function _(k){if(r.singleLine){k.key==="Enter"&&k.preventDefault();return}w(k)}function w(k){if(k.key!=="Tab")return;k.preventDefault();const B=k.target,I=B.selectionStart,D=B.selectionEnd;if(s.value=`${s.value.substring(0,I)} ${s.value.substring(D)}`,i.value)try{o("update:modelValue",JSON.parse(s.value))}catch{o("update:modelValue",s.value)}else o("update:modelValue",s.value);setTimeout(()=>{B.selectionStart=I+2,B.selectionEnd=I+2},0)}(0,n.onMounted)(async()=>{await p()}),(0,n.watch)(()=>r.theme,k=>{v(k)});function S(){const k=c(r.modelValue);k!==s.value&&(s.value=k)}function E(){f.value=!1,S()}return(0,n.watch)(()=>r.modelValue,()=>{f.value||S()},{immediate:!0}),(k,B)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input code-editor-container ltr",[(0,n.unref)(a),{"mb-2":e.label&&!e.singleLine,"has-value":u.value,"single-line":e.singleLine}]]),style:(0,n.normalizeStyle)([{height:y.value},(0,n.unref)(l)])},[e.label?((0,n.openBlock)(),(0,n.createElementBlock)("label",X$,(0,n.toDisplayString)(e.label),1)):(0,n.createCommentVNode)("",!0),(0,n.unref)(m)?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:1,ref_key:"editorRef",ref:d,class:(0,n.normalizeClass)(["code-editor-grandpa hljs",[g.value?"theme-light":"theme-dark",{"code-wrap":e.wrap}]])},[(0,n.createElementVNode)("div",K$,[(0,n.createElementVNode)("pre",J$,[(0,n.createElementVNode)("code",{innerHTML:L.value},null,8,Q$)]),e.placeholder&&!u.value?((0,n.openBlock)(),(0,n.createElementBlock)("pre",eE,(0,n.toDisplayString)(e.placeholder),1)):(0,n.createCommentVNode)("",!0),!e.readonly&&!e.disabled?((0,n.openBlock)(),(0,n.createElementBlock)("textarea",{key:1,value:s.value,class:"code-input",spellcheck:"false",autocomplete:"off",autocorrect:"off",autocapitalize:"off",onInput:b,onKeydown:_,onFocus:B[0]||(B[0]=I=>f.value=!0),onBlur:E},null,40,tE)):(0,n.createCommentVNode)("",!0)])],2)):(0,n.createCommentVNode)("",!0)],6))}}),ed=be(nE,[["__scopeId","data-v-fe04ec6c"]]),rE=["title"],oE=["id","placeholder","required"],aE=["placeholder"],lE=(0,n.defineComponent)({__name:"ColorInput",props:{label:{},id:{},placeholder:{},modelValue:{},editMode:{type:Boolean,default:!0},small:{type:Boolean},required:{type:Boolean},nativeInputAttrs:{},underlined:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,{shellClass:a,shellStyle:l}=ht(r),i=(0,n.computed)(()=>!!s.value),{$t:c}=rt(),s=(0,n.ref)(r.modelValue);return(0,n.watch)(()=>s.value,u=>{o("update:modelValue",u)}),(u,d)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input testMe1",[(0,n.unref)(a),{small:e.small,underlined:e.underlined,"has-value":i.value}]]),style:(0,n.normalizeStyle)((0,n.unref)(l)),title:e.label},[(0,n.createElementVNode)("label",null,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label))+" ",1),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["flex rounded colorInputPickWrap",{"px-025 bg-input":!e.small&&!e.frame&&!e.underlined,"px-025":!e.small&&(e.frame||e.underlined)}])},[(0,n.withDirectives)((0,n.createElementVNode)("input",(0,n.mergeProps)({id:e.id,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),type:"color",placeholder:(0,n.unref)($e)(e.placeholder)||(0,n.unref)($e)(e.label),class:{"no-edit":!e.editMode,"opacity-1":!s.value},required:e.required},e.nativeInputAttrs),null,16,oE),[[n.vModelText,s.value]]),e.small?(0,n.createCommentVNode)("",!0):(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("input",{key:0,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value=f),class:"flex-grow-1 colorInputPick",type:"text",placeholder:(0,n.unref)(c)("color.placeholder")},null,8,aE)),[[n.vModelText,s.value]]),(0,n.createVNode)((0,n.unref)(se),{class:(0,n.normalizeClass)({"not-allowed opacity-3":!s.value}),round:"",flat:"",thin:"",icon:"clear",onClick:d[2]||(d[2]=f=>s.value="")},null,8,["class"])],2)])],14,rE))}}),Bn=lE;const d1=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/,f1=/^\d{4}-\d{2}-\d{2}$/;let aa=(function(e){return e.REGULAR="regular",e.SHORTENED="shortened",e.FLEXIBLE="flexible",e})({}),m1=(function(e){return e[e.MIDNIGHT=0]="MIDNIGHT",e[e.ONE_AM=100]="ONE_AM",e[e.TWO_AM=200]="TWO_AM",e[e.THREE_AM=300]="THREE_AM",e[e.FOUR_AM=400]="FOUR_AM",e[e.FIVE_AM=500]="FIVE_AM",e[e.SIX_AM=600]="SIX_AM",e[e.SEVEN_AM=700]="SEVEN_AM",e[e.EIGHT_AM=800]="EIGHT_AM",e[e.NINE_AM=900]="NINE_AM",e[e.TEN_AM=1e3]="TEN_AM",e[e.ELEVEN_AM=1100]="ELEVEN_AM",e[e.TWELVE_PM=1200]="TWELVE_PM",e[e.ONE_PM=1300]="ONE_PM",e[e.TWO_PM=1400]="TWO_PM",e[e.THREE_PM=1500]="THREE_PM",e[e.FOUR_PM=1600]="FOUR_PM",e[e.FIVE_PM=1700]="FIVE_PM",e[e.SIX_PM=1800]="SIX_PM",e[e.SEVEN_PM=1900]="SEVEN_PM",e[e.EIGHT_PM=2e3]="EIGHT_PM",e[e.NINE_PM=2100]="NINE_PM",e[e.TEN_PM=2200]="TEN_PM",e[e.ELEVEN_PM=2300]="ELEVEN_PM",e[e.TWELVE_AM=2400]="TWELVE_AM",e})({});var iE=class{static getBrowserNavigatorLocale(){return typeof navigator!="object"?"en-US":navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language}static hasSlotContent(e){return e?e().some(t=>t.type===n.Comment||Array.isArray(t.children)&&!t.children.length?!1:t.type!==n.Text||typeof t.children=="string"&&t.children.trim()!==""):!1}static getEventType(e,t){const r=d1.test(e.time.start)&&d1.test(e.time.end),o=f1.test(e.time.start)&&f1.test(e.time.end);if(r)return this.getTimedEventType(e,t);if(o)return this.getFullDayEventType(e,t);throw new Error("Event has invalid type")}static getTimedEventType(e,t){if(t.dateStringsHaveEqualDates(e.time.start,e.time.end))return"SINGLE_DAY_TIMED";if(t.dayMode===aa.FLEXIBLE){const r=t.setHourInDateTimeString(t.addDaysToDateTimeString(1,t.dateStringFrom(e.time.start)),lp.getHourFromTimePoints(t.DAY_END));if(e.time.end<r)return"SINGLE_HYBRID_DAY_TIMED"}return"MULTI_DAY_TIMED"}static getFullDayEventType(e,t){return t.dateStringsHaveEqualDates(e.time.start,e.time.end)?"SINGLE_DAY_FULL_DAY":"MULTI_DAY_FULL_DAY"}static isUIEventTouchEvent(e){return"touches"in e&&typeof e.touches=="object"}};let oi=(function(e){return e.SUNDAY="sunday",e.MONDAY="monday",e})({});var lp=class Pc{FIRST_DAY_OF_WEEK;CALENDAR_LOCALE;ALL_HOURS=[0,100,200,300,400,500,600,700,800,900,1e3,1100,1200,1300,1400,1500,1600,1700,1800,1900,2e3,2100,2200,2300];DAY_START;DAY_END;HOURS_PER_DAY=24;MS_PER_DAY;constructor(t=oi.MONDAY,r=null,o={start:0,end:2400}){this.FIRST_DAY_OF_WEEK=t,this.CALENDAR_LOCALE=r||iE.getBrowserNavigatorLocale(),this.DAY_START=o.start,this.DAY_END=o.end,this.HOURS_PER_DAY=(()=>{const a=Pc.getHourFromTimePoints(this.DAY_END),l=Pc.getHourFromTimePoints(this.DAY_START);return a>l?a-l:this.HOURS_PER_DAY-l+a})(),this.MS_PER_DAY=864e5}get dayMode(){return this.DAY_START===0&&this.DAY_END===2400?aa.REGULAR:this.DAY_START>=this.DAY_END?aa.FLEXIBLE:aa.SHORTENED}getDatesBetweenTwoDates(t,r){const o=[],a=new Date(t);for(;a<=r;)o.push(new Date(a.getFullYear(),a.getMonth(),a.getDate())),a.setDate(a.getDate()+1);return o}getCalendarWeekDateObjects(t){let r;this.FIRST_DAY_OF_WEEK==="sunday"?r=t.getDay():r=t.getDay()===0?6:t.getDay()-1;const o=t.getDate()-r,a=new Date(t.getFullYear(),t.getMonth(),o);return this.getDatesBetweenTwoDates(a,new Date(a.getFullYear(),a.getMonth(),a.getDate()+6))}getCalendarMonthSplitInWeeks(t,r){const o=[],a=new Date(t,r,1),l=new Date(a.getFullYear(),a.getMonth(),1),i=this.getCalendarWeekDateObjects(l);o.push(i);let c=!0,s=i[0];const u=a.getMonth();for(;c;){const d=new Date(s.getFullYear(),s.getMonth(),s.getDate()+7);d.getMonth()===u?(o.push(this.getCalendarWeekDateObjects(d)),s=d):c=!1}return o}getCalendarYearMonths(t){const r=[];let o=0;for(;o<=11;)r.push(new Date(t,o,1)),o++;return r}getHourAndMinutesFromTimePoints(t){const r=t.toString();let o="0",a="0";return r.length===4?(o=r[0]+r[1],a=r[2]+r[3]):r.length===3&&(o=r[0],a=r[1]+r[2]),{hour:+o,minutes:+a}}getHourLocaleStringFromHourDigits(t){const{hour:r,minutes:o}=this.getHourAndMinutesFromTimePoints(t),a=new Date(2100,0,1,+r,+o,0).toLocaleTimeString(this.CALENDAR_LOCALE,{hour:"2-digit"});return a[0]==="0"?a.substring(1):a}getLocalizedNameOfWeekday(t,r="short"){return t.toLocaleDateString(this.CALENDAR_LOCALE,{weekday:r})}getLocalizedNameOfMonth(t,r="short"){return t.toLocaleDateString(this.CALENDAR_LOCALE,{month:r})}getLocalizedDateString(t){return t.toLocaleDateString(this.CALENDAR_LOCALE)}getDateTimeStringFromDate(t,r){const o=t.getFullYear(),a=t.getMonth()+1,l=t.getDate(),i=`${o}-${a>=10?a:`0${a}`}-${l>=10?l:`0${l}`}`;if(!r){const c=t.getHours(),s=t.getMinutes();return`${i} ${c>=10?c:`0${c}`}:${s>=10?s:`0${s}`}`}return`${i} ${r==="start"?"00:00":"23:59"}`}getLocalizedTime(t){const{year:r,month:o,date:a,hour:l,minutes:i}=this.getAllVariablesFromDateTimeString(t);return new Date(r,o,a,l,i).toLocaleTimeString(this.CALENDAR_LOCALE,{hour:"numeric",minute:"numeric"})}getLocalizedHour(t){return t.toLocaleTimeString(this.CALENDAR_LOCALE,{hour:"2-digit"})}getLocalizedTimeRange(t,r){return`${this.getLocalizedTime(t)} - ${this.getLocalizedTime(r)}`}getAllVariablesFromDateTimeString(t){return{year:+t.substring(0,4),month:+t.substring(5,7)-1,date:+t.substring(8,10),hour:this.hourFrom(t),minutes:this.minutesFrom(t)}}dateIsToday(t){const r=new Date,o=r.getFullYear(),a=r.getMonth(),l=r.getDate(),i=t.getFullYear(),c=t.getMonth(),s=t.getDate();return o===i&&a===c&&l===s}dateIsInWeek(t,r){const o=new Date(t),a=o.getDate(),l=o.getMonth(),i=o.getFullYear();for(const c of r){const s=a===c.getDate(),u=l===c.getMonth(),d=i===c.getFullYear();if(s&&u&&d)return!0}return!1}getDateStringFromDate(t){const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate();return`${r}-${o>=10?o:`0${o}`}-${a>=10?a:`0${a}`}`}addMinutesToDateTimeString(t,r){const{year:o,month:a,date:l,hour:i,minutes:c}=this.getAllVariablesFromDateTimeString(r),s=new Date(o,a,l,i,c),u=new Date(s.getTime()+t*6e4);return this.getDateTimeStringFromDate(u)}addDaysToDateTimeString(t,r){return this.addMinutesToDateTimeString(t*1440,r)}dateStringsHaveEqualDates(t,r){const{year:o,month:a,date:l}=this.getAllVariablesFromDateTimeString(t),{year:i,month:c,date:s}=this.getAllVariablesFromDateTimeString(r);return o===i&&a===c&&l===s}setDateToEndOfDay(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59,999)}turnMinutesIntoPercentageOfHour(t){const r=1.6666666666666667*t;return r<10?`0${r}`:r.toString()}getPercentageOfDayFromDateTimeString(t,r,o){const a=this.hourFrom(t)*100,l=+t.substring(14,16),i=+this.turnMinutesIntoPercentageOfHour(+l);if(o>r){const d=o-r;return(a+i-r)/d*100}const c=m1.TWELVE_AM-r,s=c+o,u=a+i;return(u>=r?u-r:c+u)/s*100}getTimeFromClick(t,r){if(r<=0)throw new Error("weekHeight cannot be a negative number");if(t<0)throw new Error("clickOffsetY cannot be a negative number");const o=this.DAY_START/100,a=r/this.HOURS_PER_DAY,l=Math.floor(t%a/(a/60));if(this.DAY_END<=this.DAY_START){const c=r-this.DAY_END/100*a;if(t>c){const s=Math.floor((t-c)/a);return`${this.doubleDigit(s)}:${this.doubleDigit(l)}`}}const i=Math.floor(t/a)+o;return`${this.doubleDigit(i)}:${this.doubleDigit(l)}`}setSegmentOfDateTimeString(t,r){if(r.hour<0||r.hour>23)throw new Error("Invalid hour");const o=this.doubleDigit(r.hour);return t=t.replace(/\d{2}:/,`${o}:`),t}isTrailingOrLeadingDate(t,r){return r!==new Date(t).getMonth()}static getTimePointsFromHour(t){if(t<0||t>24||t%1!==0)throw new Error("Invalid day boundary");return t===0?t:t*100}static getHourFromTimePoints(t){if(t<0||t>2400||t%100!==0)throw new Error("Invalid time points");return t===0?t:t/100}getTimelineHours(){return this.dayMode!==aa.FLEXIBLE?this.ALL_HOURS.filter(t=>t>=this.DAY_START&&t<this.DAY_END):[...this.ALL_HOURS.filter(t=>t>=this.DAY_START),...this.ALL_HOURS.filter(t=>t<this.DAY_END)]}dateStringFrom(t){return t.substring(0,10)}timeStringFrom(t){return t.substring(11,16)}hourFrom(t){return+t.substring(11,13)}minutesFrom(t){return+t.substring(14,16)}areDaysConsecutive(t,r){return this.dateStringFrom(this.addDaysToDateTimeString(1,t))===this.dateStringFrom(r)}setHourInDateTimeString(t,r){const o=this.doubleDigit(r);return t=t.replace(/\d{2}:/,`${o}:`),t}setMinutesInDateTimeString(t,r){const o=this.doubleDigit(r);return t=t.replace(/:\d{2}/,`:${o}`),t}getDateTimeStringDayBoundariesFrom(t){if(this.DAY_END<=this.DAY_START){const a=this.addDaysToDateTimeString(1,t),l=this.setHourInDateTimeString(a,this.getHourAndMinutesFromTimePoints(this.DAY_END).hour);return{start:this.setHourInDateTimeString(t,this.getHourAndMinutesFromTimePoints(this.DAY_START).hour),end:l}}const r=this.setHourInDateTimeString(t,this.getHourAndMinutesFromTimePoints(this.DAY_START).hour);let o;return this.DAY_END===m1.TWELVE_AM?(o=this.setHourInDateTimeString(t,23),o=this.setMinutesInDateTimeString(o,59)):o=this.setHourInDateTimeString(t,this.getHourAndMinutesFromTimePoints(this.DAY_END).hour),{start:r,end:o}}doubleDigit(t){if(t<0||t>60)throw new Error("Invalid number. This is not a valid hour or minute");return t<10?`0${t}`:String(t)}},sE={class:"calendar-section m_border-none px-05 pb-05 pt-025 m_p-0"},cE={class:"flex space-between pb-1"},uE={class:"flex gap-05"},dE={class:"month-year"},fE={key:0,class:"calendar-grid grid gap-025"},mE=["disabled","onClick","onMouseenter"],pE={key:1,class:"month-grid grid gap-05 p-05"},hE={key:2,class:"year-grid grid gap-05 p-0"},gE={key:0,class:"time-picker border-start flex column gap-1 w-120px px-025"},vE={class:"flex gap-025"},LE=(0,n.defineComponent)({__name:"DatePicker",props:{modelValue:{},min:{},max:{},mode:{default:()=>({mode:"day"})},firstDayOfWeek:{default:oi.SUNDAY},locale:{default:""},enableTime:{type:Boolean,default:!1},range:{type:Boolean,default:!1},highlightedDates:{},disabledDates:{},allowedDates:{},autoSize:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,a=(0,n.ref)(null),l=(0,n.computed)(()=>(0,n.toValue)(r.highlightedDates)),i=(0,n.computed)(()=>(0,n.toValue)(r.disabledDates)),c=(0,n.computed)(()=>(0,n.toValue)(r.allowedDates)),s=(0,n.ref)(new Date),u=(0,n.ref)("days"),d=new lp(r.firstDayOfWeek,r.locale);function f(Y){if(!Y)return null;const J=typeof Y=="string"?new Date(Y):Y;return Number.isNaN(J.getTime())?null:J}function m(){return{isDateDisabled:R=>{if(!R)return!0;const G=f(r.min),de=f(r.max);if(G&&R<G||de&&R>de||Array.isArray(i.value)&&i.value.length>0&&i.value.some(he=>{const Ne=f(he);return Ne?R.getFullYear()===Ne.getFullYear()&&R.getMonth()===Ne.getMonth()&&R.getDate()===Ne.getDate():!1}))return!0;if(Array.isArray(c.value)&&c.value.length>0){const he=`${R.getFullYear()}-${String(R.getMonth()+1).padStart(2,"0")}-${String(R.getDate()).padStart(2,"0")}`;if(!c.value.some(Ne=>typeof Ne=="string"?Ne===he:Ne.getFullYear()===R.getFullYear()&&Ne.getMonth()===R.getMonth()&&Ne.getDate()===R.getDate()))return!0}return!1},isMonthDisabled:(R,G)=>{const de=f(r.min),he=f(r.max),Ne=new Date(R,G+1,0),He=new Date(R,G,1);return!!(de&&Ne<new Date(de.getFullYear(),de.getMonth(),de.getDate())||he&&He>new Date(he.getFullYear(),he.getMonth(),he.getDate()))},isYearDisabled:R=>{const G=f(r.min),de=f(r.max);return!!(G&&R<G.getFullYear()||de&&R>de.getFullYear())}}}function p(){return{selectedDate:(0,n.computed)(()=>f(r.range?void 0:r.modelValue)),rangeStart:(0,n.computed)(()=>r.range?f(r.modelValue?.start):null),rangeEnd:(0,n.computed)(()=>r.range?f(r.modelValue?.end):null)}}const{isDateDisabled:h,isMonthDisabled:v,isYearDisabled:y}=m(),{selectedDate:g,rangeStart:L,rangeEnd:b}=p();function _(Y,J){return!Y||!J?!1:Y.getFullYear()===J.getFullYear()&&Y.getMonth()===J.getMonth()&&Y.getDate()===J.getDate()}function w(){const Y=(0,n.computed)(()=>{const ke=s.value.getFullYear(),Me=s.value.getMonth(),We=d.getCalendarMonthSplitInWeeks(ke,Me);for(;We.length<6;){const ct=We[We.length-1],tt=ct[ct.length-1],Vt=new Date(tt.getFullYear(),tt.getMonth(),tt.getDate()+1),Nr=d.getCalendarWeekDateObjects(Vt);We.push(Nr)}return We.flat()}),J=(0,n.computed)(()=>({month:s.value.getMonth(),year:s.value.getFullYear(),formatted:{month:d.getLocalizedNameOfMonth(s.value,"long"),year:d.getLocalizedDateString(s.value).split("/").pop()}})),re=(0,n.computed)(()=>Array.from({length:12},(ke,Me)=>{const We=new Date(J.value.year,Me,1);return{name:d.getLocalizedNameOfMonth(We,"short"),value:Me,disabled:v(J.value.year,Me)}})),R=(0,n.computed)(()=>{const ke=J.value.year-10;return Array.from({length:18},(Me,We)=>({value:ke+We,disabled:y(ke+We)}))}),G=(0,n.computed)(()=>{const ke=new Date;return ke.setDate(ke.getDate()-ke.getDay()+(r.firstDayOfWeek===oi.MONDAY?1:0)),Array.from({length:7},(Me,We)=>{const ct=new Date(ke);return ct.setDate(ke.getDate()+We),d.getLocalizedNameOfWeekday(ct,"short")})}),de=ke=>ke?r.range?_(ke,L.value)||_(ke,b.value):g.value?_(ke,g.value):!1:!1,he=(0,n.computed)(()=>b.value?b.value:L.value&&a.value?a.value:null);return{currentMonthDays:Y,currentMonthValue:J,months:re,years:R,weekDays:G,isSelected:de,isRangeStart:ke=>r.range&&_(ke,L.value),isRangeEnd:ke=>r.range&&_(ke,b.value),isInRange:ke=>{if(!r.range||!ke||!L.value)return!1;const Me=he.value;if(!Me)return!1;const We=L.value<Me?L.value:Me,ct=L.value<Me?Me:L.value,tt=new Date(ke.getFullYear(),ke.getMonth(),ke.getDate()),Vt=new Date(We.getFullYear(),We.getMonth(),We.getDate()),Nr=new Date(ct.getFullYear(),ct.getMonth(),ct.getDate());return tt>Vt&&tt<Nr},isToday:ke=>ke?d.dateIsToday(ke):!1,isNotInMonth:ke=>d.isTrailingOrLeadingDate(ke,s.value.getMonth()),isHighlighted:(0,n.computed)(()=>ke=>!ke||!Array.isArray(l.value)||!l.value.length?!1:l.value.some(Me=>{const We=f(Me);return We?ke.getFullYear()===We.getFullYear()&&ke.getMonth()===We.getMonth()&&ke.getDate()===We.getDate():!1}))}}function S(){return{selectMonth:he=>{s.value=new Date(s.value.getFullYear(),he,1),u.value="days"},selectYear:he=>{s.value=new Date(he,s.value.getMonth(),1),u.value="months"},previousMonth:()=>{s.value=new Date(s.value.getFullYear(),s.value.getMonth()-1,1)},nextMonth:()=>{s.value=new Date(s.value.getFullYear(),s.value.getMonth()+1,1)},previousYear:()=>{const he=u.value==="months"?1:21;s.value=new Date(s.value.getFullYear()-he,s.value.getMonth(),1)},nextYear:()=>{const he=u.value==="months"?1:21;s.value=new Date(s.value.getFullYear()+he,s.value.getMonth(),1)}}}function E(){const Y=(0,n.computed)(()=>g.value?.getHours()??0),J=(0,n.computed)(()=>g.value?.getMinutes()??0);return{hours:Y,minutes:J,handleHourInput:G=>{if(!g.value)return;const de=new Date(g.value);de.setHours(G),k(de)},handleMinuteInput:G=>{if(!g.value)return;const de=new Date(g.value);de.setMinutes(G),k(de)}}}function k(Y){r.enableTime?o("update:modelValue",Y.toISOString()):o("update:modelValue",To.date(Y))}const{currentMonthDays:B,currentMonthValue:I,months:D,years:V,weekDays:O,isSelected:N,isRangeStart:j,isRangeEnd:z,isInRange:$,isToday:M,isNotInMonth:q,isHighlighted:H}=w(),{selectMonth:K,selectYear:U,previousMonth:C,nextMonth:A,previousYear:W,nextYear:F}=S(),{hours:ne,minutes:Q,handleHourInput:ce,handleMinuteInput:me}=E();function le(Y){return To.date(Y)}function Le(Y){const J=L.value,re=b.value;if(!J||re){o("update:modelValue",{start:le(Y),end:void 0});return}const R=Y<J?Y:J,G=Y<J?J:Y;o("update:modelValue",{start:le(R),end:le(G)}),a.value=null}function X(Y){r.range&&Y&&(a.value=Y)}function ae(Y){if(Y){if(r.range){Le(Y);return}if(r.enableTime){const J=new Date(Y.getFullYear(),Y.getMonth(),Y.getDate()),re=g.value?.getHours()??new Date().getHours(),R=g.value?.getMinutes()??new Date().getMinutes();J.setHours(re),J.setMinutes(R),k(J)}else k(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate()))}}return(Y,J)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["ltr gap-075 m_flex-wrap calendar-container justify-content-center h-100p",{flex:!e.autoSize}])},[(0,n.createElementVNode)("div",sE,[(0,n.createElementVNode)("div",cE,[u.value==="days"?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",icon:"chevron_left",onClick:(0,n.unref)(C)},null,8,["onClick"]),(0,n.createElementVNode)("div",uE,[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",class:"month-btn",onClick:J[0]||(J[0]=re=>u.value="months")},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(I).formatted.month),1)]),_:1}),(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",class:"year-btn",onClick:J[1]||(J[1]=re=>u.value="years")},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(I).formatted.year),1)]),_:1})]),(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",icon:"chevron_right",onClick:(0,n.unref)(A)},null,8,["onClick"])],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",icon:"chevron_left",onClick:(0,n.unref)(W)},null,8,["onClick"]),(0,n.createElementVNode)("span",dE,(0,n.toDisplayString)((0,n.unref)(I).formatted.year),1),(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",icon:"chevron_right",onClick:(0,n.unref)(F)},null,8,["onClick"])],64))]),u.value==="days"?((0,n.openBlock)(),(0,n.createElementBlock)("div",fE,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(O),re=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:re,class:"txt-center txt-12 opacity-6"},(0,n.toDisplayString)(re),1))),128)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(B),re=>((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:re?.toISOString(),type:"button",class:(0,n.normalizeClass)(["day aspect-ratio-1 flex align-items-center justify-content-center pointer round txt14 p-0",{selected:(0,n.unref)(N)(re),"range-start":(0,n.unref)(j)(re),"range-end":(0,n.unref)(z)(re),"in-range":(0,n.unref)($)(re),today:(0,n.unref)(M)(re),disabled:(0,n.unref)(h)(re),"not-in-month":(0,n.unref)(q)(re),highlighted:(0,n.unref)(H)(re)}]),disabled:(0,n.unref)(h)(re),onClick:R=>ae(re),onMouseenter:R=>X(re)},(0,n.toDisplayString)(re?.getDate()),43,mE))),128))])):u.value==="months"?((0,n.openBlock)(),(0,n.createElementBlock)("div",pE,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(D),re=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:re.value,thin:"",flat:re.value!==(0,n.unref)(I).month,disabled:re.disabled,value:re.name,onClick:R=>(0,n.unref)(K)(re.value)},null,8,["flat","disabled","value","onClick"]))),128))])):((0,n.openBlock)(),(0,n.createElementBlock)("div",hE,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(V),re=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:re.value,thin:"",flat:re.value!==(0,n.unref)(I).year,disabled:re.disabled,value:re.value.toString(),onClick:R=>(0,n.unref)(U)(re.value)},null,8,["flat","disabled","value","onClick"]))),128))]))]),e.enableTime&&u.value==="days"?((0,n.openBlock)(),(0,n.createElementBlock)("div",gE,[(0,n.createElementVNode)("div",vE,[(0,n.createVNode)((0,n.unref)(Dn),{center:"",modelValue:(0,n.unref)(ne),disabled:!(0,n.unref)(g),min:0,max:23,layout:"vertical",padZero:2,"onUpdate:modelValue":(0,n.unref)(ce)},null,8,["modelValue","disabled","onUpdate:modelValue"]),J[2]||(J[2]=(0,n.createElementVNode)("p",{class:"pb-075"}," : ",-1)),(0,n.createVNode)((0,n.unref)(Dn),{center:"",modelValue:(0,n.unref)(Q),disabled:!(0,n.unref)(g),min:0,max:59,padZero:2,layout:"vertical","onUpdate:modelValue":(0,n.unref)(me)},null,8,["modelValue","disabled","onUpdate:modelValue"])])])):(0,n.createCommentVNode)("",!0)],2))}}),ip=be(LE,[["__scopeId","data-v-a4bc37e9"]]),yE={key:0,class:"label-text"},bE={key:0},Ss=" - ",_E=(0,n.defineComponent)({__name:"DateInput",props:(0,n.mergeModels)({required:{type:Boolean},label:{},placeholder:{},editMode:{type:Boolean,default:!0},small:{type:Boolean,default:!1},enableTime:{type:Boolean,default:!1},range:{type:Boolean,default:!1},modelValue:{},min:{},max:{},mode:{default:()=>({mode:"day"})},defaultValue:{},firstDayOfWeek:{default:oi.SUNDAY},locale:{default:""},center:{type:Boolean},error:{},underlined:{type:Boolean},disabled:{type:Boolean,default:!1},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=(0,n.computed)(()=>t.editMode&&!t.disabled),{$t:o}=rt(),{shellClass:a,shellStyle:l}=ht(t),i=(0,n.useModel)(e,"modelValue"),c=(0,n.ref)(""),s=(0,n.ref)(!0),u=(0,n.ref)(!1),d=(0,n.ref)(!1);let f=!1;const m=(0,n.ref)(null),p=(0,n.ref)(null);function h(N){return N===void 0||N===""?"":dt(N,{format:t.enableTime?"DD.MM.YY HH:mm":"DD.MM.YY"})}function v(N){if(t.range){const j=N??{},z=h(j.start),$=h(j.end);return!z&&!$?"":`${z}${Ss}${$}`}return h(N)}function y(N){const j=new Date(N);if(!Number.isNaN(j.getTime()))return j;const z=N.split(/[/.-]/);if(z.length===3){const[$,M,q]=z.map(H=>Number.parseInt(H,10));if(!Number.isNaN($)&&!Number.isNaN(M)&&!Number.isNaN(q)){const H=new Date(q,M-1,$);if(H.getFullYear()===q&&H.getMonth()===M-1&&H.getDate()===$)return H}}return null}function g(N){return t.enableTime?N.toISOString():To.date(N)}function L(N){if(t.enableTime||t.range||N==null)return N;if(typeof N=="string"&&N.includes("T")){const j=/^(\d{4}-\d{2}-\d{2})/.exec(N)?.[1];if(j)return j;const z=new Date(N);if(!Number.isNaN(z.getTime()))return To.date(z)}return N instanceof Date?To.date(N):N}function b(){if(t.range){const N=i.value;return!!(N&&(N.start||N.end))}return i.value!==void 0}function _(){u.value||(c.value=b()?v(i.value):"")}function w(N){const j=N.replace(/[^\d.]/g,"").split(".");let z=j.slice(0,3).join(".");return(z.length===2&&!z.includes(".")||z.length===5&&j.length===2)&&(z+="."),z}function S(N){const j=N.target;if(u.value=!0,t.range){E(j);return}const z=w(j.value);c.value=z,j.value!==z&&(j.value=z);const $=y(z);$!==null?(i.value=g($),s.value=!0):z.length===0?(i.value=void 0,s.value=!0):s.value=!1}function E(N){const[j="",z=""]=N.value.split(/\s*-\s*/,2),$=w(j),M=w(z),q=/-/.test(N.value),H=M||q?`${$}${Ss}${M}`:$;c.value=H,N.value!==H&&(N.value=H);const K=j?y($):null,U=z?y(M):null;if(j&&!K||z&&!U){s.value=!1;return}if(s.value=!0,!K&&!U){i.value=void 0;return}let C=K,A=U;K&&U&&U<K&&(C=U,A=K),i.value={start:C?g(C):void 0,end:A?g(A):void 0}}function k(){f||(d.value=!0)}function B(){u.value=!1,c.value.length===0?(i.value=void 0,s.value=!0):b()?(c.value=v(i.value),s.value=!0):s.value=!1,setTimeout(()=>{p.value?.contains(document.activeElement)||(f=!0,d.value=!1,setTimeout(()=>{f=!1},200))},100)}function I(N){const{key:j,shiftKey:z}=N;if(j==="Escape")d.value=!1,u.value=!1,c.value=b()?v(i.value):"",s.value=!0;else if(j==="Enter")u.value=!1,b()&&(c.value=v(i.value)),d.value=!1;else if(!t.range&&(j==="ArrowUp"||j==="ArrowDown")){N.preventDefault();const $=i.value!==void 0?new Date(i.value):new Date,M=j==="ArrowUp"?1:-1;z?$.setMonth($.getMonth()+M):$.setDate($.getDate()+M),i.value=g($),c.value=v($)}}function D(){d.value=!d.value}(0,n.watch)(()=>i.value,N=>{const j=L(N);if(j!==N){i.value=j;return}_()},{immediate:!0});const V=(0,n.computed)(()=>c.value.length>0),O=(0,n.computed)(()=>{const N=t.enableTime?"DD.MM.YY HH:mm":"DD.MM.YY";return t.range?`${N}${Ss}${N}`:N});return Kb(m,()=>{f=!0,d.value=!1,setTimeout(()=>{f=!1},200)},{ignore:[p]}),(0,n.onMounted)(()=>{!t.range&&i.value===void 0&&t.defaultValue!==void 0&&(i.value=t.defaultValue)}),(N,j)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input",[(0,n.unref)(a),{small:e.small,"has-error":!!e.error||!s.value,underlined:e.underlined,"has-value":V.value,open:d.value}]]),style:(0,n.normalizeStyle)((0,n.unref)(l))},[(0,n.createElementVNode)("label",null,[e.label||e.underlined&&e.placeholder?((0,n.openBlock)(),(0,n.createElementBlock)("span",yE,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label||e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",bE," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),(0,n.createVNode)((0,n.unref)(Dt),{shown:d.value,placement:"bottom-start",autoHide:!1,triggers:[],noAutoFocus:""},{trigger:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",{ref_key:"datePickerRef",ref:m,class:"date-picker-container"},[(0,n.createVNode)((0,n.unref)(Ve),{modelValue:c.value,"onUpdate:modelValue":j[0]||(j[0]=z=>c.value=z),iconStart:"calendar",placeholder:e.underlined?" ":(0,n.unref)($e)(e.placeholder)||O.value,required:e.underlined?!1:e.required,disabled:!r.value,error:s.value?e.error:(0,n.unref)(o)("date.invalidFormat"),class:(0,n.normalizeClass)([{"txt-center":e.center},"date-input m-0"]),underlined:e.underlined,frame:e.frame,outline:e.outline,"min-width":e.minWidth,"max-width":e.maxWidth,"label-color":e.labelColor,"label-active-color":e.labelActiveColor,onInput:S,onFocus:k,onBlur:B,onClick:j[1]||(j[1]=(0,n.withModifiers)(()=>{},["stop"])),onKeydown:I,onIconClick:D},null,8,["modelValue","placeholder","required","disabled","error","class","underlined","frame","outline","min-width","max-width","label-color","label-active-color"])],512)]),default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",{ref_key:"calendarRef",ref:p,class:"date-picker-popup",onClick:j[3]||(j[3]=(0,n.withModifiers)(()=>{},["stop"]))},[(0,n.createVNode)(ip,{modelValue:i.value,"onUpdate:modelValue":j[2]||(j[2]=z=>i.value=z),min:e.min,max:e.max,mode:e.mode,firstDayOfWeek:e.firstDayOfWeek,locale:e.locale,enableTime:e.enableTime,range:e.range},null,8,["modelValue","min","max","mode","firstDayOfWeek","locale","enableTime","range"])],512)]),_:1},8,["shown"])])],6))}}),Hr=_E;const wE=910,kE=1280,sp=["jpeg","png","webp","avif","apng","gif","avifs","svg","bmp","jpg","heic","heif","ico","cur","tif","tiff"],ai=new RegExp(`(${sp.join("|")})$`,"i"),cp=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","ts","m3u8"],up=new RegExp(`(${cp.join("|")})$`,"i"),Or=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/i;var $E=["title"],EE=["for"],SE={key:0,class:"label-text"},CE={key:0},xE={key:1,class:"flex"},TE={key:0,class:"helptext"},NE={key:2,class:"validating"},BE=["id","name","title","placeholder","disabled","required"],ME={key:0,class:"error-message"},DE=(0,n.defineComponent)({__name:"EmailInput",props:{id:{},title:{},helptext:{},name:{},placeholder:{},modelValue:{default:""},label:{},small:{type:Boolean},required:{type:Boolean},pattern:{default:"[a-z0-9._%+\\-]+@[a-z0-9.\\-]+\\.[a-z]{2,}"},defaultValue:{},shrink:{type:Boolean},underlined:{type:Boolean},disabled:{type:Boolean},nativeInputAttrs:{},icon:{},iconStart:{},autocomplete:{},autofocus:{type:Boolean},error:{},onFocusout:{},onFocus:{},autocorrect:{type:Boolean,default:!0},serverValidate:{type:Boolean,default:!1},preventFakeEmails:{type:Boolean,default:!1},formatValidation:{type:Boolean,default:!1},validate:{},getFormData:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue","debounce"],setup(e,{expose:t,emit:r}){const o=e,a=r,{shellClass:l,shellStyle:i}=ht(o),{$t:c}=rt(),s=["gmail.com","yahoo.com","hotmail.com","outlook.com","aol.com","icloud.com","protonmail.com","mail.com","zoho.com","yandex.com","gmx.com","live.com","msn.com"],u=["mailinator.com","tempmail.com","10minutemail.com","guerrillamail.com","guerrillamail.info","throwawaymail.com","yopmail.com","tempinbox.com","dispostable.com","mailnesia.com","trashmail.com","sharklasers.com","temp-mail.org","fakeinbox.com","getnada.com","armyspy.com","cuvox.de","dayrep.com","einrot.com","fleckens.hu","gustr.com","jourrapide.com","rhyta.com","superrito.com","teleworm.us","nbmbb.com","poplk.com"],d=(0,n.ref)(""),f=(0,n.ref)(null),m=(0,n.ref)(""),p=(0,n.ref)(!1),h=new Map,v=(0,n.ref)();function y(N){if(N){if(!Or.test(N))return c("email.invalidEmail");if(o.preventFakeEmails&&N.includes("@")){const[,j]=N.split("@");if(j){const z=j.toLowerCase();if(u.includes(z))return c("email.disposableEmail")}}if(m.value)return m.value}}const g=Zr(()=>{a("debounce",d.value)},700);function L(){if(!v.value||(v.value.setCustomValidity(""),!d.value))return;const N=y(d.value);typeof N=="string"&&v.value.setCustomValidity(N)}async function b(N){if(!(!o.serverValidate||!N||!Or.test(N))){if(h.has(N)){h.get(N)||(m.value=c("email.invalidDomain"),v.value?.setCustomValidity(m.value));return}p.value=!0,m.value="";try{const j=await fetch(`https://api.mailcheck.ai/domain/${N.split("@")[1]}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!j.ok)throw new Error("Validation service unavailable");const z=await j.json(),$=z.status==="valid"||z.has_mx===!0;h.set(N,$),$?v.value?.setCustomValidity(""):(m.value=c("email.invalidDomain"),v.value?.setCustomValidity(m.value))}catch{}finally{p.value=!1}}}function _(N){if(!o.autocorrect||!N)return;if(N.includes("@")&&!N.includes(".")){const[M,q]=N.split("@"),H=q.toLowerCase();for(const K of s)if(K.startsWith(H)){f.value=`${M}@${K}`;return}}if(!N.includes("@"))return;const[j,z]=N.split("@"),$=z.toLowerCase();if(s.includes($)){f.value=null;return}for(const M of s)if(S($,M)<=2){f.value=`${j}@${M}`.toLowerCase();return}f.value=null}function w(){f.value&&(d.value=f.value,f.value=null,a("update:modelValue",d.value),g())}function S(N,j){const z=[];for(let $=0;$<=N.length;$++)z[$]=[$];for(let $=0;$<=j.length;$++)z[0][$]=$;for(let $=1;$<=N.length;$++)for(let M=1;M<=j.length;M++){const q=N[$-1]===j[M-1]?0:1;z[$][M]=Math.min(z[$-1][M]+1,z[$][M-1]+1,z[$-1][M-1]+q)}return z[N.length][j.length]}const E=Zr(()=>b(d.value),1e3);function k(){o.disabled||(f.value=null,L(),o.serverValidate&&E(),a("update:modelValue",d.value),g())}function B(N){_(d.value),o.serverValidate&&Or.test(d.value)&&b(d.value),o.onFocusout&&o.onFocusout(N)}(0,n.watch)(()=>o.modelValue,N=>{N!==d.value&&(d.value=N||"")},{immediate:!0}),(0,n.watch)(()=>d.value,()=>{L()},{immediate:!0}),t({focus:()=>v.value?.focus(),hasFocus:()=>document.activeElement===v.value});const V=(0,n.computed)(()=>d.value.length>0),O=(0,n.computed)(()=>o.formatValidation?V.value?Or.test(d.value)?"format-valid":"format-invalid":"format-empty":null);return(0,n.onMounted)(()=>{o.autofocus&&setTimeout(()=>v.value?.focus(),10)}),(N,j)=>{const z=(0,n.resolveDirective)("pattern");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input text-input",[(0,n.unref)(l),O.value,{small:e.small,shrink:e.shrink,underlined:e.underlined,textInputIconWrap:e.icon,txtInputIconStart:e.iconStart,"is-validating":p.value,"has-error":!!e.error,"has-value":V.value}]]),style:(0,n.normalizeStyle)((0,n.unref)(i)),title:e.title},[(0,n.createElementVNode)("label",{for:e.id},[e.label||e.underlined&&e.placeholder?((0,n.openBlock)(),(0,n.createElementBlock)("span",SE,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label)||(0,n.unref)($e)(e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",CE," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),e.underlined?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",xE,[e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("span",TE,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0),f.value?((0,n.openBlock)(),(0,n.createElementBlock)("span",{key:1,class:"pointer nowrap inline-block ms-auto color-red txt-10px p-0",onClick:(0,n.withModifiers)(w,["prevent"])},(0,n.toDisplayString)((0,n.unref)(c)("email.didYouMean",{suggestion:f.value})),1)):(0,n.createCommentVNode)("",!0),p.value?((0,n.openBlock)(),(0,n.createElementBlock)("span",NE,(0,n.toDisplayString)((0,n.unref)(c)("email.validating")),1)):(0,n.createCommentVNode)("",!0)])),(0,n.withDirectives)((0,n.createElementVNode)("input",(0,n.mergeProps)({id:e.id,ref_key:"input",ref:v,"onUpdate:modelValue":j[0]||(j[0]=$=>d.value=$),class:"ltr",name:e.name,title:e.title,autocomplete:"email",type:"email",placeholder:e.underlined?" ":(0,n.unref)($e)(e.placeholder)||(0,n.unref)($e)(e.label),disabled:e.disabled,required:e.required},e.nativeInputAttrs,{onFocusout:B,onFocus:j[1]||(j[1]=(...$)=>e.onFocus&&e.onFocus(...$)),onInput:k}),null,16,BE),[[n.vModelText,d.value],[z,void 0,"lower"]]),e.iconStart?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:2,class:(0,n.normalizeClass)([{" bottom-1-25 ":e.underlined},"iconStart"]),icon:e.iconStart},null,8,["class","icon"])):(0,n.createCommentVNode)("",!0),e.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:3,class:(0,n.normalizeClass)({" bottom-1-25 ":e.underlined}),icon:e.icon},null,8,["class","icon"])):(0,n.createCommentVNode)("",!0)],8,EE),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",ME,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],14,$E)}}}),td=be(DE,[["__scopeId","data-v-27dcfb77"]]),AE={class:"markdown-editor"},PE={key:0,class:"txt10 opacity-6 -mb-1 w100p txt-end"},IE={key:0,class:"flex justify-content-end -mt-025 -mb-05 ltr"},VE=(0,n.defineComponent)({__name:"MarkdownEditor",props:(0,n.mergeModels)({maxLength:{},placeholder:{default:"Enter Text"},label:{default:"Body"},rtl:{type:Boolean},showFormatting:{type:Boolean,default:!0},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const r=e,{maxLength:o,placeholder:a,label:l,showFormatting:i,rtl:c}=r,{shellClass:s,shellStyle:u}=ht(r),d=(0,n.useModel)(e,"modelValue"),f=(0,n.ref)(),m=`markdown-editor-${Math.random().toString(36).substring(2,9)}`,p=(0,n.computed)(()=>d.value.length);function h(v){const y=f.value?.$el.querySelector("textarea"),g=d.value,L=y?.selectionStart??g.length,b=y?.selectionEnd??g.length,_=g.slice(0,L),w=g.slice(b),S=g.slice(L,b);let E="";switch(v){case"bold":E=`*${S||"bold"}*`;break;case"italic":E=`_${S||"italic"}_`;break;case"underline":E=`~${S||"underline"}~`;break;case"code":E=`\`${S||"code"}\``;break;case"pre":E=`\`\`\`${S||"pre"}\`\`\``;break;case"newline":E=`
|
|
20
20
|
`;break;default:E=""}d.value=_+E+w,(0,n.nextTick)(()=>{if(y){const k=_.length+E.length;y.setSelectionRange(k,k),y.focus()}})}return t({html:(0,n.computed)(()=>{let v=d.value.replace(/\{\{([^}]+)\}\}/g,(y,g)=>`{{${g.replace(/_/g,"#####")}}}`);return v=v.replace(/```([\s\S]+?)```/g,"<pre>$1</pre>"),v=v.replace(/`([^`]+)`/g,"<code>$1</code>"),v=v.replace(/\*([^*]+)\*/g,"<b>$1</b>"),v=v.replace(/_([^_]+)_/g,"<i>$1</i>"),v=v.replace(/~([^~]+)~/g,"<u>$1</u>"),v=v.replace(/\n/g,"<br>"),v=v.replace(/\{\{([^}]+)\}\}/g,(y,g)=>`{{${g.replace(/#####/g,"_")}}}`),v})}),(v,y)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",AE,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["bagel-input mb-0",[(0,n.unref)(s),{"has-value":p.value>0}]]),style:(0,n.normalizeStyle)((0,n.unref)(u))},[(0,n.unref)(o)?((0,n.openBlock)(),(0,n.createElementBlock)("div",PE,(0,n.toDisplayString)(p.value)+" / "+(0,n.toDisplayString)((0,n.unref)(o)),1)):(0,n.createCommentVNode)("",!0),(0,n.unref)(l)?((0,n.openBlock)(),(0,n.createElementBlock)("label",{key:1,class:"label",for:m},(0,n.toDisplayString)((0,n.unref)(l)),1)):(0,n.createCommentVNode)("",!0),(0,n.createVNode)((0,n.unref)(Ve),{id:m,ref_key:"textareaRef",ref:f,modelValue:d.value,"onUpdate:modelValue":y[0]||(y[0]=g=>d.value=g),dir:(0,n.unref)(c)?"rtl":"ltr",autoheight:"",placeholder:(0,n.unref)(a),maxlength:(0,n.unref)(o),class:"m-0"},null,8,["modelValue","dir","placeholder","maxlength"])],6),(0,n.unref)(i)?((0,n.openBlock)(),(0,n.createElementBlock)("div",IE,[(0,n.createVNode)((0,n.unref)(se),{thin:"","icon-size":"0.9",flat:"",icon:"format_bold",onClick:y[1]||(y[1]=g=>h("bold"))}),(0,n.createVNode)((0,n.unref)(se),{thin:"","icon-size":"0.9",flat:"",icon:"format_italic",onClick:y[2]||(y[2]=g=>h("italic"))}),(0,n.createVNode)((0,n.unref)(se),{thin:"","icon-size":"0.9",flat:"",icon:"format_underlined",onClick:y[3]||(y[3]=g=>h("underline"))}),(0,n.createVNode)((0,n.unref)(se),{thin:"","icon-size":"0.9",flat:"",icon:"code",onClick:y[4]||(y[4]=g=>h("code"))}),(0,n.createVNode)((0,n.unref)(se),{thin:"","icon-size":"0.9",flat:"",icon:"notes",onClick:y[5]||(y[5]=g=>h("pre"))}),(0,n.createVNode)((0,n.unref)(se),{thin:"","icon-size":"0.9",flat:"",icon:"keyboard_return",onClick:y[6]||(y[6]=g=>h("newline"))})])):(0,n.createCommentVNode)("",!0)]))}}),OE=be(VE,[["__scopeId","data-v-911cd1d1"]]),RE={key:0,class:"block"},FE={class:"label-text"},zE={key:0},UE={class:"input-icon-wrap flex-grow-1"},HE=["id","placeholder","disabled","required","pattern","onKeydown"],WE={key:2,class:"flex column spinner-btns"},jE={key:1,class:"helptext"},GE={key:0,class:"error-message"},qE=(0,n.defineComponent)({__name:"NumberInput",props:{modelValue:{},min:{},max:{},step:{default:1},spinner:{type:Boolean,default:!0},iconStart:{},icon:{},label:{},defaultValue:{},placeholder:{},disabled:{type:Boolean},required:{type:Boolean},id:{},helptext:{},layout:{},center:{type:Boolean},padZero:{default:1},useGrouping:{type:Boolean,default:!0},underlined:{type:Boolean},error:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const{shellClass:r,shellStyle:o}=ht({frame:e.frame,outline:e.outline,minWidth:e.minWidth,maxWidth:e.maxWidth,labelColor:e.labelColor,labelActiveColor:e.labelActiveColor}),a=t,l=(0,n.ref)();(0,n.onMounted)(()=>{const _=e.modelValue!==void 0?Number.parseFloat(`${e.modelValue}`):void 0,w=e.defaultValue!==void 0?Number.parseFloat(`${e.defaultValue}`):void 0;l.value=_??w});const i=["horizontal","vertical"],c=/\.\d*0$/;function s(){return e.step.toString().split(".")[1]?.length||0}function u(..._){const w=_.map(S=>S||0);return Number.parseFloat(w.reduce((S,E)=>S+E,0).toFixed(s()))}function d(..._){const w=_.map(E=>E||0),S=w.shift()||0;return Number.parseFloat(w.reduce((E,k)=>E-k,S).toFixed(s()))}const f=(0,n.computed)(()=>e.max===void 0||u(l.value,e.step)<=e.max),m=(0,n.computed)(()=>e.min===void 0||d(l.value,e.step)>=e.min);function p(){f.value&&(l.value=u(l.value??0,e.step),a("update:modelValue",l.value))}function h(){m.value&&(l.value=d(l.value??0,e.step),a("update:modelValue",l.value))}const v=(0,n.computed)(()=>new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:e.useGrouping}));function y(_){if(Number.isNaN(_))return"";const[w,S]=v.value.format(_).split("."),E=w.replace(/,/g,"").length,k=e.padZero&&e.padZero>E?"0".repeat(e.padZero-E):"";return S?`${k}${w}.${S}`:`${k}${w}`}const g=(0,n.ref)("");function L(){const _=g.value.replace(/[^\d.-]/g,"");if(["","-",".","-."].includes(_)||_.endsWith(".")||c.test(_)){a("update:modelValue",_==="-"?"-":_);return}l.value=Number.parseFloat(_),g.value=y(l.value),a("update:modelValue",l.value)}(0,n.watch)(()=>l.value,()=>{(0,n.nextTick)(()=>{g.value.endsWith(".")||c.test(g.value)||(g.value=l.value!==void 0?y(l.value):"")})}),(0,n.watch)(()=>e.modelValue,_=>{if(_==null||_===""){l.value=void 0,g.value="";return}if(typeof _=="string"&&(_==="-"||_.endsWith("."))){g.value=_;return}const w=Number.parseFloat(`${_}`);if(Number.isNaN(w)){l.value=void 0,g.value="";return}w!==l.value&&(l.value=w)},{immediate:!0});const b=(0,n.computed)(()=>g.value.length>0);return(_,w)=>{const S=(0,n.resolveDirective)("pattern");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input num-input",[(0,n.unref)(r),{underlined:e.underlined,"has-error":!!e.error,"has-value":b.value}]]),style:(0,n.normalizeStyle)((0,n.unref)(o))},[(0,n.createElementVNode)("div",null,[e.label||e.underlined&&e.placeholder?((0,n.openBlock)(),(0,n.createElementBlock)("label",RE,[(0,n.createElementVNode)("span",FE,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label)||(0,n.unref)($e)(e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",zE," *")):(0,n.createCommentVNode)("",!0)])])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["gap-025",{"column display-flex":e.layout==="vertical",flex:e.layout==="horizontal"}])},[e.layout&&i.includes(e.layout)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:0,flat:"",icon:"add",class:(0,n.normalizeClass)(["radius",{"bgl-big-ctrl-num-btn":e.layout==="vertical"}]),tabindex:"-1",onClick:p},null,8,["class"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",UE,[e.iconStart?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,class:"iconStart",size:"0.9",icon:e.iconStart},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.withDirectives)((0,n.createElementVNode)("input",{id:e.id,"onUpdate:modelValue":w[0]||(w[0]=E=>g.value=E),type:"text",class:(0,n.normalizeClass)({"txt-center":e.center,min0:e.layout}),placeholder:e.underlined?" ":(0,n.unref)($e)(e.placeholder)||(0,n.unref)($e)(e.label),disabled:e.disabled,required:e.required,inputmode:"decimal",autocomplete:"off",pattern:e.useGrouping?"^-?\\d{1,3}(,\\d{3})*(.\\d+)?$":"^-?\\d*.?d*$",autocorrect:"off",spellcheck:"false",onInput:L,onKeydown:[(0,n.withKeys)((0,n.withModifiers)(p,["prevent"]),["up"]),(0,n.withKeys)((0,n.withModifiers)(h,["prevent"]),["down"])]},null,42,HE),[[n.vModelText,g.value,void 0,{trim:!0}],[S,void 0,void 0,{number:!0}]]),e.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:1,size:"0.9",icon:e.icon},null,8,["icon"])):(0,n.createCommentVNode)("",!0),e.spinner&&(!e.layout||!i.includes(e.layout))?((0,n.openBlock)(),(0,n.createElementBlock)("div",WE,[(0,n.createVNode)((0,n.unref)(se),{icon:"add",flat:"",thin:"",class:"bgl-ctrl-num-btn ctrl-add top-bgl-ctrl-num-btn",disabled:!f.value,tabindex:"-1",onClick:p},null,8,["disabled"]),(0,n.createVNode)((0,n.unref)(se),{icon:"remove",flat:"",thin:"",class:"bgl-ctrl-num-btn ctrl-remove",disabled:!m.value,tabindex:"-1",onClick:h},null,8,["disabled"])])):(0,n.createCommentVNode)("",!0)]),e.layout&&i.includes(e.layout)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:1,flat:"",icon:"remove",class:(0,n.normalizeClass)(["radius",[{"bgl-big-ctrl-num-btn":e.layout==="vertical"}]]),tabindex:"-1",onClick:h},null,8,["class"])):(0,n.createCommentVNode)("",!0)],2),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",jE,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0)]),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",GE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],6)}}}),Dn=be(qE,[["__scopeId","data-v-181dd2db"]]),YE=["value","maxlength"],ZE={key:0,class:"otp-error-message txt-center txt10 pt-05"},XE=(0,n.defineComponent)({__name:"OTP",props:{digitCount:{},default:{},modelValue:{},error:{},color:{},size:{},mobileSize:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue","complete"],setup(e,{emit:t}){const r=e,o=t,{shellClass:a,shellStyle:l}=ht(r),i=(0,n.computed)(()=>{if(r.color)return/^[a-z-]+$/.test(r.color)?`var(--bgl-${r.color}, ${r.color})`:r.color}),c=(0,n.computed)(()=>{const g={...l.value??{}};return i.value&&(g["--bgl-otp-digit-color"]=i.value),r.size&&(g["--bgl-otp-digit-size"]=r.size),r.mobileSize&&(g["--bgl-otp-digit-mobile-size"]=r.mobileSize),Object.keys(g).length>0?g:void 0}),s=(0,n.ref)(),u=(0,n.ref)((r.default??r.modelValue??"").replace(/\D/g,"").slice(0,r.digitCount));(0,n.watch)(()=>r.modelValue,g=>{const L=(g??"").replace(/\D/g,"").slice(0,r.digitCount);L!==u.value&&(u.value=L)});const d=(0,n.computed)(()=>{const g=u.value.split("");return Array.from({length:r.digitCount},(L,b)=>g[b]??"")}),f=(0,n.computed)(()=>u.value.length>0),m=(0,n.computed)(()=>Math.min(u.value.length,r.digitCount-1)),p=(0,n.ref)(!1);function h(g){const L=g.replace(/\D/g,"").slice(0,r.digitCount);u.value=L,o("update:modelValue",L),L.length===r.digitCount&&o("complete",L)}function v(g){h(g.target.value)}function y(){s.value?.focus()}return(g,L)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["otp-input",[(0,n.unref)(a),{"has-value":f.value}]]),style:(0,n.normalizeStyle)(c.value),tabindex:"-1",onClick:y},[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["otp_wrap ltr",{"has-error":!!e.error}])},[(0,n.createElementVNode)("input",{ref_key:"inputEl",ref:s,class:"otp-hidden-input",value:u.value,type:"text",inputmode:"numeric",autocomplete:"one-time-code",maxlength:e.digitCount,autofocus:!0,name:"one-time-code",pattern:"[0-9]*","aria-label":"verification code",onInput:v,onFocus:L[0]||(L[0]=b=>p.value=!0),onBlur:L[1]||(L[1]=b=>p.value=!1)},null,40,YE),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(d.value,(b,_)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:_,class:(0,n.normalizeClass)(["digit-box",{"is-active":p.value&&_===m.value,"is-filled":b!==""}]),"aria-hidden":"true"},(0,n.toDisplayString)(b),3))),128))],2),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",ZE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],6))}}),KE=be(XE,[["__scopeId","data-v-6314c112"]]),Ic=(e,t)=>e.push.apply(e,t),Po=e=>e.sort((t,r)=>t.i-r.i||t.j-r.j),p1=e=>{const t={};let r=1;return e.forEach(o=>{t[o]=r,r+=1}),t},JE={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};var QE=JE;var eS=1e4;var dp=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,tS=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,nS=/^[A-Z\xbf-\xdf]+$/,fp=/^[^a-z\xdf-\xff]+$/,rS=/^[a-z\xdf-\xff]+$/,oS=/^[^A-Z\xbf-\xdf]+$/,aS=/[a-z\xdf-\xff]/,lS=/[A-Z\xbf-\xdf]/,iS=/[^A-Za-z\xbf-\xdf]/gi,sS=/^\d+$/,nd=new Date().getFullYear(),cS={recentYear:/19\d\d|200\d|201\d|202\d/g},mp=[" ",",",";",":","|","/","\\","_",".","-"],uS=mp.length,dS=class{match({password:e}){const t=[...this.getMatchesWithoutSeparator(e),...this.getMatchesWithSeparator(e)];return Po(this.filterNoise(t))}getMatchesWithSeparator(e){const t=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let o=0;o<=Math.abs(e.length-6);o+=1)for(let a=o+5;a<=o+9&&!(a>=e.length);a+=1){const l=e.slice(o,+a+1||9e9),i=r.exec(l);if(i!=null){const c=this.mapIntegersToDayMonthYear([parseInt(i[1],10),parseInt(i[3],10),parseInt(i[4],10)]);c!=null&&t.push({pattern:"date",token:l,i:o,j:a,separator:i[2],year:c.year,month:c.month,day:c.day})}}return t}getMatchesWithoutSeparator(e){const t=[],r=/^\d{4,8}$/,o=a=>Math.abs(a.year-nd);for(let a=0;a<=Math.abs(e.length-4);a+=1)for(let l=a+3;l<=a+7&&!(l>=e.length);l+=1){const i=e.slice(a,+l+1||9e9);if(r.exec(i)){const c=[];if(QE[i.length].forEach(([s,u])=>{const d=this.mapIntegersToDayMonthYear([parseInt(i.slice(0,s),10),parseInt(i.slice(s,u),10),parseInt(i.slice(u),10)]);d!=null&&c.push(d)}),c.length>0){let s=c[0],u=o(c[0]);c.slice(1).forEach(d=>{const f=o(d);f<u&&(s=d,u=f)}),t.push({pattern:"date",token:i,i:a,j:l,separator:"",year:s.year,month:s.month,day:s.day})}}}return t}filterNoise(e){return e.filter(t=>{let r=!1;const o=e.length;for(let a=0;a<o;a+=1){const l=e[a];if(t!==l&&l.i<=t.i&&l.j>=t.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(e){if(e[1]>31||e[1]<=0)return null;let t=0,r=0,o=0;for(let a=0,l=e.length;a<l;a+=1){const i=e[a];if(i>99&&i<1e3||i>2050)return null;i>31&&(r+=1),i>12&&(t+=1),i<=0&&(o+=1)}return r>=2||t===3||o>=2?null:this.getDayMonth(e)}getDayMonth(e){const t=[[e[2],e.slice(0,2)],[e[0],e.slice(1,3)]],r=t.length;for(let o=0;o<r;o+=1){const[a,l]=t[o];if(1e3<=a&&a<=2050){const i=this.mapIntegersToDayMonth(l);return i!=null?{year:a,month:i.month,day:i.day}:null}}for(let o=0;o<r;o+=1){const[a,l]=t[o],i=this.mapIntegersToDayMonth(l);if(i!=null)return{year:this.twoToFourDigitYear(a),month:i.month,day:i.day}}return null}mapIntegersToDayMonth(e){const t=[e,e.slice().reverse()];for(let r=0;r<t.length;r+=1){const o=t[r],a=o[0],l=o[1];if(a>=1&&a<=31&&l>=1&&l<=12)return{day:a,month:l}}return null}twoToFourDigitYear(e){return e>99?e:e>50?e+1900:e+2e3}},Yn=new Uint32Array(65536),fS=(e,t)=>{const r=e.length,o=t.length,a=1<<r-1;let l=-1,i=0,c=r,s=r;for(;s--;)Yn[e.charCodeAt(s)]|=1<<s;for(s=0;s<o;s++){let u=Yn[t.charCodeAt(s)];const d=u|i;u|=(u&l)+l^l,i|=~(u|l),l&=u,i&a&&c++,l&a&&c--,i=i<<1|1,l=l<<1|~(d|i),i&=d}for(s=r;s--;)Yn[e.charCodeAt(s)]=0;return c},mS=(e,t)=>{const r=t.length,o=e.length,a=[],l=[],i=Math.ceil(r/32),c=Math.ceil(o/32);for(let h=0;h<i;h++)l[h]=-1,a[h]=0;let s=0;for(;s<c-1;s++){let h=0,v=-1;const y=s*32,g=Math.min(32,o)+y;for(let L=y;L<g;L++)Yn[e.charCodeAt(L)]|=1<<L;for(let L=0;L<r;L++){const b=Yn[t.charCodeAt(L)],_=l[L/32|0]>>>L&1,w=a[L/32|0]>>>L&1,S=b|h,E=((b|w)&v)+v^v|b|w;let k=h|~(E|v),B=v&E;k>>>31^_&&(l[L/32|0]^=1<<L),B>>>31^w&&(a[L/32|0]^=1<<L),k=k<<1|_,B=B<<1|w,v=B|~(S|k),h=k&S}for(let L=y;L<g;L++)Yn[e.charCodeAt(L)]=0}let u=0,d=-1;const f=s*32,m=Math.min(32,o-f)+f;for(let h=f;h<m;h++)Yn[e.charCodeAt(h)]|=1<<h;let p=o;for(let h=0;h<r;h++){const v=Yn[t.charCodeAt(h)],y=l[h/32|0]>>>h&1,g=a[h/32|0]>>>h&1,L=v|u,b=((v|g)&d)+d^d|v|g;let _=u|~(b|d),w=d&b;p+=_>>>o-1&1,p-=w>>>o-1&1,_>>>31^y&&(l[h/32|0]^=1<<h),w>>>31^g&&(a[h/32|0]^=1<<h),_=_<<1|y,w=w<<1|g,d=w|~(L|_),u=_&L}for(let h=f;h<m;h++)Yn[e.charCodeAt(h)]=0;return p},pS=(e,t)=>{if(e.length<t.length){const r=t;t=e,e=r}return t.length===0?e.length:e.length<=32?fS(e,t):mS(e,t)},hS=(e,t,r)=>{const o=e.length<=t.length,a=e.length<=r;return o||a?Math.ceil(e.length/4):r},gS=(e,t,r)=>{let o=0;const a=Object.keys(t).find(l=>{const i=hS(e,l,r);if(Math.abs(e.length-l.length)>i)return!1;const c=pS(e,l),s=c<=i;return s&&(o=c),s});return a?{levenshteinDistance:o,levenshteinDistanceEntry:a}:{}},h1={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},Cs={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}},g1=class Vc{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...r){const o=t.charAt(0);this.children.has(o)||this.children.set(o,new Vc([...this.parents,o]));let a=this.children.get(o);for(let l=1;l<t.length;l+=1){const i=t.charAt(l);a.hasChild(i)||a.addChild(i),a=a.getChild(i)}return a.subs=(a.subs||[]).concat(r),this}getChild(t){return this.children.get(t)}isTerminal(){return!!this.subs}addChild(t){this.hasChild(t)||this.children.set(t,new Vc([...this.parents,t]))}hasChild(t){return this.children.has(t)}},v1=((e,t)=>(Object.entries(e).forEach(([r,o])=>{o.forEach(a=>{t.addSub(a,r)})}),t)),vS=class{constructor(){this.matchers={},this.l33tTable=h1,this.trieNodeRoot=v1(h1,new g1),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=Cs,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(e={}){e.l33tTable&&(this.l33tTable=e.l33tTable,this.trieNodeRoot=v1(e.l33tTable,new g1)),e.dictionary&&(this.dictionary=e.dictionary,this.setRankedDictionaries()),e.translations&&this.setTranslations(e.translations),e.graphs&&(this.graphs=e.graphs),e.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=e.useLevenshteinDistance),e.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=e.levenshteinThreshold),e.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=e.l33tMaxSubstitutions),e.maxLength!==void 0&&(this.maxLength=e.maxLength)}setTranslations(e){if(this.checkCustomTranslations(e))this.translations=e;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(e){let t=!0;return Object.keys(Cs).forEach(r=>{if(r in e){const o=r;Object.keys(Cs[o]).forEach(a=>{a in e[o]||(t=!1)})}else t=!1}),t}setRankedDictionaries(){const e={},t={};Object.keys(this.dictionary).forEach(r=>{e[r]=p1(this.dictionary[r]),t[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=e,this.rankedDictionariesMaxWordSize=t}getRankedDictionariesMaxWordSize(e){const t=e.map(r=>typeof r!="string"?r.toString().length:r.length);return t.length===0?0:t.reduce((r,o)=>Math.max(r,o),-1/0)}buildSanitizedRankedDictionary(e){const t=[];return e.forEach(r=>{const o=typeof r;(o==="string"||o==="number"||o==="boolean")&&t.push(r.toString().toLowerCase())}),p1(t)}extendUserInputsDictionary(e){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const t=[...this.dictionary.userInputs,...e];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(t),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(t)}addMatcher(e,t){this.matchers[e]||(this.matchers[e]=t)}},Ee=new vS,LS=class{constructor(e){this.defaultMatch=e}match({password:e}){const t=e.split("").reverse().join("");return this.defaultMatch({password:t}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:e.length-1-r.j,j:e.length-1-r.i}))}},yS=class{constructor({substr:e,limit:t,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=e,this.limit=t,this.trieRoot=r}getAllPossibleSubsAtIndex(e){const t=[];let r=this.trieRoot;for(let o=e;o<this.substr.length;o+=1){const a=this.substr.charAt(o);if(r=r.getChild(a),!r)break;t.push(r)}return t}helper({onlyFullSub:e,isFullSub:t,index:r,subIndex:o,changes:a,lastSubLetter:l,consecutiveSubCount:i}){if(this.finalPasswords.length>=this.limit)return;if(r===this.substr.length){e===t&&this.finalPasswords.push({password:this.buffer.join(""),changes:a});return}const c=[...this.getAllPossibleSubsAtIndex(r)];let s=!1;for(let u=r+c.length-1;u>=r;u-=1){const d=c[u-r];if(d.isTerminal()){if(l===d.parents.join("")&&i>=3)continue;s=!0;const f=d.subs;for(const m of f){this.buffer.push(m);const p=a.concat({i:o,letter:m,substitution:d.parents.join("")});if(this.helper({onlyFullSub:e,isFullSub:t,index:u+1,subIndex:o+m.length,changes:p,lastSubLetter:d.parents.join(""),consecutiveSubCount:l===d.parents.join("")?i+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!e||!s){const u=this.substr.charAt(r);this.buffer.push(u),this.helper({onlyFullSub:e,isFullSub:t&&!s,index:r+1,subIndex:o+1,changes:a,lastSubLetter:l,consecutiveSubCount:i}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}},bS=(e,t,r)=>new yS({substr:e,limit:t,trieRoot:r}).getAll(),_S=(e,t,r)=>{const o=e.changes.filter(s=>s.i<t).reduce((s,u)=>s-u.letter.length+u.substitution.length,t),a=e.changes.filter(s=>s.i>=t&&s.i<=r),l=a.reduce((s,u)=>s-u.letter.length+u.substitution.length,r-t+o),i=[],c=[];return a.forEach(s=>{i.findIndex(u=>u.letter===s.letter&&u.substitution===s.substitution)<0&&(i.push({letter:s.letter,substitution:s.substitution}),c.push(`${s.substitution} -> ${s.letter}`))}),{i:o,j:l,subs:i,subDisplay:c.join(", ")}},wS=class{constructor(e){this.defaultMatch=e}isAlreadyIncluded(e,t){return e.some(r=>Object.entries(r).every(([o,a])=>o==="subs"||a===t[o]))}match({password:e}){const t=[],r=bS(e,Ee.l33tMaxSubstitutions,Ee.trieNodeRoot);let o=!1,a=!0;return r.forEach(l=>{if(o)return;const i=this.defaultMatch({password:l.password,useLevenshtein:a});a=!1,i.forEach(c=>{o||(o=c.i===0&&c.j===e.length-1);const s=_S(l,c.i,c.j),u=e.slice(s.i,+s.j+1||9e9),d={...c,l33t:!0,token:u,...s},f=this.isAlreadyIncluded(t,d);u.toLowerCase()!==c.matchedWord&&!f&&t.push(d)})}),t.filter(l=>l.token.length>1)}},kS=class{constructor(){this.l33t=new wS(this.defaultMatch),this.reverse=new LS(this.defaultMatch)}match({password:e}){return Po([...this.defaultMatch({password:e}),...this.reverse.match({password:e}),...this.l33t.match({password:e})])}defaultMatch({password:e,useLevenshtein:t=!0}){const r=[],o=e.length,a=e.toLowerCase();return Object.keys(Ee.rankedDictionaries).forEach(l=>{const i=Ee.rankedDictionaries[l],c=Ee.rankedDictionariesMaxWordSize[l],s=Math.min(c,o);for(let u=0;u<o;u+=1){const d=Math.min(u+s,o);for(let f=u;f<d;f+=1){const m=a.slice(u,+f+1||9e9),p=m in i;let h={};const v=u===0&&f===o-1;Ee.useLevenshteinDistance&&v&&!p&&t&&(h=gS(m,i,Ee.levenshteinThreshold));const y=Object.keys(h).length!==0;if(p||y){const g=i[y?h.levenshteinDistanceEntry:m];r.push({pattern:"dictionary",i:u,j:f,token:e.slice(u,+f+1||9e9),matchedWord:m,rank:g,dictionaryName:l,reversed:!1,l33t:!1,...h})}}}}),r}},$S=class{match({password:e,regexes:t=cS}){const r=[];return Object.keys(t).forEach(o=>{const a=t[o];a.lastIndex=0;let l;for(;l=a.exec(e);)if(l){const i=l[0];r.push({pattern:"regex",token:i,i:l.index,j:l.index+l[0].length-1,regexName:o,regexMatch:l})}}),Po(r)}},no={nCk(e,t){let r=e;if(t>r)return 0;if(t===0)return 1;let o=1;for(let a=1;a<=t;a+=1)o*=r,o/=a,r-=1;return o},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let r=2;r<=e;r+=1)t*=r;return t}},ES=(({token:e})=>{let t=10**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let r;return e.length===1?r=11:r=51,Math.max(t,r)}),SS=(({year:e,separator:t})=>{let r=Math.max(Math.abs(e-nd),20)*365;return t&&(r*=4),r}),CS=e=>{const t=e.split(""),r=t.filter(i=>i.match(lS)).length,o=t.filter(i=>i.match(aS)).length;let a=0;const l=Math.min(r,o);for(let i=1;i<=l;i+=1)a+=no.nCk(r+o,i);return a},xS=(e=>{const t=e.replace(iS,"");if(t.match(oS)||t.toLowerCase()===t)return 1;const r=[dp,tS,fp],o=r.length;for(let a=0;a<o;a+=1){const l=r[a];if(t.match(l))return 2}return CS(t)}),L1=(e,t)=>{let r=0,o=e.indexOf(t);for(;o>=0;)r+=1,o=e.indexOf(t,o+t.length);return r},TS=({sub:e,token:t})=>{const r=t.toLowerCase();return{subbedCount:L1(r,e.substitution),unsubbedCount:L1(r,e.letter)}},NS=(({l33t:e,subs:t,token:r})=>{if(!e)return 1;let o=1;return t.forEach(a=>{const{subbedCount:l,unsubbedCount:i}=TS({sub:a,token:r});if(l===0||i===0)o*=2;else{const c=Math.min(i,l);let s=0;for(let u=1;u<=c;u+=1)s+=no.nCk(i+l,u);o*=s}}),o}),BS=(({rank:e,reversed:t,l33t:r,subs:o,token:a,dictionaryName:l})=>{const i=e,c=xS(a),s=NS({l33t:r,subs:o,token:a}),u=t&&2||1;let d;return l==="diceware"?d=6**5/2:d=i*c*s*u,{baseGuesses:i,uppercaseVariations:c,l33tVariations:s,calculation:d}}),MS=(({regexName:e,regexMatch:t,token:r})=>{const o={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};return e in o?o[e]**r.length:e==="recentYear"?Math.max(Math.abs(parseInt(t[0],10)-nd),20):0}),DS=(({baseGuesses:e,repeatCount:t})=>e*t),AS=(({token:e,ascending:t})=>{const r=e.charAt(0);let o=0;return["a","A","z","Z","0","1","9"].includes(r)?o=4:r.match(/\d/)?o=10:o=26,t||(o*=2),o*e.length}),PS=e=>{let t=0;return Object.keys(e).forEach(r=>{const o=e[r];t+=o.filter(a=>!!a).length}),t/=Object.entries(e).length,t},IS=({token:e,graph:t,turns:r})=>{const o=Object.keys(Ee.graphs[t]).length,a=PS(Ee.graphs[t]);let l=0;const i=e.length;for(let c=2;c<=i;c+=1){const s=Math.min(r,c-1);for(let u=1;u<=s;u+=1)l+=no.nCk(c-1,u-1)*o*a**u}return l},VS=(({graph:e,token:t,shiftedCount:r,turns:o})=>{let a=IS({token:t,graph:e,turns:o});if(r){const l=t.length-r;if(r===0||l===0)a*=2;else{let i=0;for(let c=1;c<=Math.min(r,l);c+=1)i+=no.nCk(r+l,c);a*=i}}return Math.round(a)}),OS=(()=>uS),RS=(e,t)=>{let r=1;return e.token.length<t.length&&(e.token.length===1?r=10:r=50),r},y1={bruteforce:ES,date:SS,dictionary:BS,regex:MS,repeat:DS,sequence:AS,spatial:VS,separator:OS},FS=(e,t)=>y1[e]?y1[e](t):Ee.matchers[e]&&"scoring"in Ee.matchers[e]?Ee.matchers[e].scoring(t):0,zS=((e,t)=>{const r={};if("guesses"in e&&e.guesses!=null)return e;const o=RS(e,t),a=FS(e.pattern,e);let l=0;typeof a=="number"?l=a:e.pattern==="dictionary"&&(l=a.calculation,r.baseGuesses=a.baseGuesses,r.uppercaseVariations=a.uppercaseVariations,r.l33tVariations=a.l33tVariations);const i=Math.max(l,o);return{...e,...r,guesses:i,guessesLog10:no.log10(i)}}),jt={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const r=[];for(let o=0;o<e;o+=1){let a=[];t==="object"&&(a={}),r.push(a)}return r},makeBruteforceMatch(e,t){return{pattern:"bruteforce",token:this.password.slice(e,+t+1||9e9),i:e,j:t}},update(e,t){const r=e.j,o=zS(e,this.password);let a=o.guesses;t>1&&(a*=this.optimal.pi[o.i-1][t-1]);let l=no.factorial(t)*a;this.excludeAdditive||(l+=eS**(t-1));let i=!1;Object.keys(this.optimal.g[r]).forEach(c=>{const s=this.optimal.g[r][c];parseInt(c,10)<=t&&s<=l&&(i=!0)}),i||(this.optimal.g[r][t]=l,this.optimal.m[r][t]=o,this.optimal.pi[r][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let r=1;r<=e;r+=1){t=this.makeBruteforceMatch(r,e);const o=this.optimal.m[r-1];Object.keys(o).forEach(a=>{o[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let r=e-1,o=0,a=1/0;const l=this.optimal.g[r];for(l&&Object.keys(l).forEach(i=>{const c=l[i];c<a&&(o=parseInt(i,10),a=c)});r>=0;){const i=this.optimal.m[r][o];t.unshift(i),r=i.i-1,o-=1}return t}},Oc={mostGuessableMatchSequence(e,t,r=!1){jt.password=e,jt.excludeAdditive=r;const o=e.length;let a=jt.fillArray(o,"array");t.forEach(s=>{a[s.j].push(s)}),a=a.map(s=>s.sort((u,d)=>u.i-d.i)),jt.optimal={m:jt.fillArray(o,"object"),pi:jt.fillArray(o,"object"),g:jt.fillArray(o,"object")};for(let s=0;s<o;s+=1)a[s].forEach(u=>{u.i>0?Object.keys(jt.optimal.m[u.i-1]).forEach(d=>{jt.update(u,parseInt(d,10)+1)}):jt.update(u,1)}),jt.bruteforceUpdate(s);const l=jt.unwind(o),i=l.length,c=this.getGuesses(e,i);return{password:e,guesses:c,guessesLog10:no.log10(c),sequence:l}},getGuesses(e,t){const r=e.length;let o=0;return e.length===0?o=1:o=jt.optimal.g[r-1][t],o}},US=class{match({password:e,omniMatch:t}){const r=[];let o=0;for(;o<e.length;){const a=this.getGreedyMatch(e,o),l=this.getLazyMatch(e,o);if(a==null)break;const{match:i,baseToken:c}=this.setMatchToken(a,l);if(i){const s=i.index+i[0].length-1,u=this.getBaseGuesses(c,t);r.push(this.normalizeMatch(c,s,i,u)),o=s+1}}return r.some(a=>a instanceof Promise)?Promise.all(r):r}normalizeMatch(e,t,r,o){const a={pattern:"repeat",i:r.index,j:t,token:r[0],baseToken:e,baseGuesses:0,repeatCount:r[0].length/e.length};return o instanceof Promise?o.then(l=>({...a,baseGuesses:l})):{...a,baseGuesses:o}}getGreedyMatch(e,t){const r=/(.+)\1+/g;return r.lastIndex=t,r.exec(e)}getLazyMatch(e,t){const r=/(.+?)\1+/g;return r.lastIndex=t,r.exec(e)}setMatchToken(e,t){const r=/^(.+?)\1+$/;let o,a="";if(t&&e[0].length>t[0].length){o=e;const l=r.exec(o[0]);l&&(a=l[1])}else o=t,o&&(a=o[1]);return{match:o,baseToken:a}}getBaseGuesses(e,t){const r=t.match(e);return r instanceof Promise?r.then(o=>Oc.mostGuessableMatchSequence(e,o).guesses):Oc.mostGuessableMatchSequence(e,r).guesses}},HS=class{constructor(){this.MAX_DELTA=5}match({password:e}){const t=[];if(e.length===1)return[];let r=0,o=null;const a=e.length;for(let l=1;l<a;l+=1){const i=e.charCodeAt(l)-e.charCodeAt(l-1);if(o==null&&(o=i),i!==o){const c=l-1;this.update({i:r,j:c,delta:o,password:e,result:t}),r=c,o=i}}return this.update({i:r,j:a-1,delta:o,password:e,result:t}),t}update({i:e,j:t,delta:r,password:o,result:a}){if(t-e>1||Math.abs(r)===1){const l=Math.abs(r);if(l>0&&l<=this.MAX_DELTA){const i=o.slice(e,+t+1||9e9),{sequenceName:c,sequenceSpace:s}=this.getSequence(i);return a.push({pattern:"sequence",i:e,j:t,token:o.slice(e,+t+1||9e9),sequenceName:c,sequenceSpace:s,ascending:r>0})}}return null}getSequence(e){let t="unicode",r=26;return rS.test(e)?(t="lower",r=26):nS.test(e)?(t="upper",r=26):sS.test(e)&&(t="digits",r=10),{sequenceName:t,sequenceSpace:r}}},WS=class{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:e}){const t=[];return Object.keys(Ee.graphs).forEach(r=>{const o=Ee.graphs[r];Ic(t,this.helper(e,o,r))}),Po(t)}checkIfShifted(e,t,r){return!e.includes("keypad")&&this.SHIFTED_RX.test(t.charAt(r))?1:0}helper(e,t,r){let o;const a=[];let l=0;const i=e.length;for(;l<i-1;){let c=l+1,s=null,u=0;for(o=this.checkIfShifted(r,e,l);;){const d=t[e.charAt(c-1)]||[];let f=!1,m=-1,p=-1;if(c<i){const h=e.charAt(c),v=d.length;for(let y=0;y<v;y+=1){const g=d[y];if(p+=1,g){const L=g.indexOf(h);if(L!==-1){f=!0,m=p,L===1&&(o+=1),s!==m&&(u+=1,s=m);break}}}}if(f)c+=1;else{c-l>2&&a.push({pattern:"spatial",i:l,j:c-1,token:e.slice(l,c),graph:r,turns:u,shiftedCount:o}),l=c;break}}}return a}},jS=new RegExp(`[${mp.join("")}]`),GS=class Rc{static getMostUsedSeparatorChar(t){const r=[...t.split("").filter(a=>jS.test(a)).reduce((a,l)=>{const i=a.get(l);return i?a.set(l,i+1):a.set(l,1),a},new Map).entries()].sort(([a,l],[i,c])=>c-l);if(!r.length)return;const o=r[0];if(!(o[1]<2))return o[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
|
|
21
|
-
])(${t})(?!${t})`,"g")}match({password:t}){const r=[];if(t.length===0)return r;const o=Rc.getMostUsedSeparatorChar(t);if(o===void 0)return r;const a=Rc.getSeparatorRegex(o);for(const l of t.matchAll(a)){if(l.index===void 0)continue;const i=l.index+1;r.push({pattern:"separator",token:o,i,j:i})}return r}},qS=class{constructor(){this.matchers={date:dS,dictionary:kS,regex:$S,repeat:US,sequence:HS,spatial:WS,separator:GS}}match(e){const t=[],r=[];return[...Object.keys(this.matchers),...Object.keys(Ee.matchers)].forEach(o=>{if(!this.matchers[o]&&!Ee.matchers[o])return;const a=new(this.matchers[o]?this.matchers[o]:Ee.matchers[o].Matching)().match({password:e,omniMatch:this});a instanceof Promise?(a.then(l=>{Ic(t,l)}),r.push(a)):Ic(t,a)}),r.length>0?new Promise((o,a)=>{Promise.all(r).then(()=>{o(Po(t))}).catch(l=>{a(l)})}):Po(t)}},pp=1,hp=pp*60,gp=hp*60,vp=gp*24,Lp=vp*31,b1=Lp*12,xs={second:pp,minute:hp,hour:gp,day:vp,month:Lp,year:b1,century:b1*100},YS=class{translate(e,t){let r=e;t!==void 0&&t!==1&&(r+="s");const{timeEstimation:o}=Ee.translations;return o[r].replace("{base}",`${t}`)}estimateAttackTimes(e){const t={onlineThrottling100PerHour:e/.027777777777777776,onlineNoThrottling10PerSecond:e/10,offlineSlowHashing1e4PerSecond:e/1e4,offlineFastHashing1e10PerSecond:e/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(t).forEach(o=>{const a=t[o];r[o]=this.displayTime(a)}),{crackTimesSeconds:t,crackTimesDisplay:r,score:this.guessesToScore(e)}}guessesToScore(e){return e<1005?0:e<1000005?1:e<100000005?2:e<1e10+5?3:4}displayTime(e){let t="centuries",r;const o=Object.keys(xs),a=o.findIndex(l=>e<xs[l]);return a>-1&&(t=o[a-1],a!==0?r=Math.round(e/xs[t]):t="ltSecond"),this.translate(t,r)}},ZS=(()=>null),XS=(()=>({warning:Ee.translations.warnings.dates,suggestions:[Ee.translations.suggestions.dates]})),KS=(e,t)=>{let r=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?r=Ee.translations.warnings.topTen:e.rank<=100?r=Ee.translations.warnings.topHundred:r=Ee.translations.warnings.common:e.guessesLog10<=4&&(r=Ee.translations.warnings.similarToCommon),r},JS=(e,t)=>{let r=null;return t&&(r=Ee.translations.warnings.wordByItself),r},QS=(e,t)=>t?Ee.translations.warnings.namesByThemselves:Ee.translations.warnings.commonNames,eC=(e,t)=>{let r=null;const o=e.dictionaryName,a=o==="lastnames"||o.toLowerCase().includes("firstnames");return o==="passwords"?r=KS(e,t):o.includes("wikipedia")?r=JS(e,t):a?r=QS(e,t):o==="userInputs"&&(r=Ee.translations.warnings.userInputs),r},tC=((e,t)=>{const r=eC(e,t),o=[],a=e.token;return a.match(dp)?o.push(Ee.translations.suggestions.capitalization):a.match(fp)&&a.toLowerCase()!==a&&o.push(Ee.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&o.push(Ee.translations.suggestions.reverseWords),e.l33t&&o.push(Ee.translations.suggestions.l33t),{warning:r,suggestions:o}}),nC=(e=>e.regexName==="recentYear"?{warning:Ee.translations.warnings.recentYears,suggestions:[Ee.translations.suggestions.recentYears,Ee.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]}),rC=(e=>{let t=Ee.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Ee.translations.warnings.simpleRepeat),{warning:t,suggestions:[Ee.translations.suggestions.repeated]}}),oC=(()=>({warning:Ee.translations.warnings.sequences,suggestions:[Ee.translations.suggestions.sequences]})),aC=(e=>{let t=Ee.translations.warnings.keyPattern;return e.turns===1&&(t=Ee.translations.warnings.straightRow),{warning:t,suggestions:[Ee.translations.suggestions.longerKeyboardPattern]}}),lC=(()=>null),_1={warning:null,suggestions:[]},iC=class{constructor(){this.matchers={bruteforce:ZS,date:XS,dictionary:tC,regex:nC,repeat:rC,sequence:oC,spatial:aC,separator:lC},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Ee.translations.suggestions.useWords,Ee.translations.suggestions.noNeed)}getFeedback(e,t){if(t.length===0)return this.defaultFeedback;if(e>2)return _1;const r=Ee.translations.suggestions.anotherWord,o=this.getLongestMatch(t);let a=this.getMatchFeedback(o,t.length===1);return a!=null?a.suggestions.unshift(r):a={warning:null,suggestions:[r]},a}getLongestMatch(e){let t=e[0];return e.slice(1).forEach(r=>{r.token.length>t.token.length&&(t=r)}),t}getMatchFeedback(e,t){return this.matchers[e.pattern]?this.matchers[e.pattern](e,t):Ee.matchers[e.pattern]&&"feedback"in Ee.matchers[e.pattern]?Ee.matchers[e.pattern].feedback(e,t):_1}},yp=()=>new Date().getTime(),sC=(e,t,r)=>{const o=new iC,a=new YS,l=Oc.mostGuessableMatchSequence(t,e),i=yp()-r,c=a.estimateAttackTimes(l.guesses);return{calcTime:i,...l,...c,feedback:o.getFeedback(c.score,l.sequence)}},cC=(e,t)=>(t&&Ee.extendUserInputsDictionary(t),new qS().match(e)),uC=(e,t)=>{const r=yp(),o=cC(e,t);if(o instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return sC(o,e,r)},dC={class:"m-password position-bottom-end flex column justify-content-center"},fC={key:0,class:"password-strength-container absolute start end -bottom-1-5"},mC={class:"password-strength-bar pointer overflow-hidden round"},pC=(0,n.defineComponent)({__name:"PasswordInput",props:(0,n.mergeModels)({strengthMeter:{type:Boolean,default:!1},id:{},title:{},helptext:{},name:{},placeholder:{},modelValue:{},label:{default:""},small:{type:Boolean},dense:{type:Boolean},required:{type:Boolean},pattern:{},defaultValue:{},shrink:{type:Boolean},underlined:{type:Boolean},disabled:{type:Boolean},type:{},nativeInputAttrs:{},icon:{},iconStart:{},multiline:{type:Boolean},autoheight:{type:Boolean},code:{type:Boolean},rows:{},autocomplete:{default:"current-password"},autofocus:{type:Boolean},error:{},onFocusout:{},onFocus:{},validate:{},getFormData:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{},modelModifiers:{},showPwd:{type:Boolean,default:!1},showPwdModifiers:{}}),emits:["update:modelValue","update:showPwd"],setup(e){const t=e,{$t:r}=rt(),o=(0,n.computed)(()=>{const{strengthMeter:h,modelValue:v,...y}=t;return y}),a=(0,n.useModel)(e,"modelValue"),l=(0,n.useModel)(e,"showPwd"),i=(0,n.computed)(()=>l.value?"visibility_off":"visibility"),c=(0,n.computed)(()=>l.value?"text":"password"),s=(0,n.computed)(()=>{const h=a.value;return!t.strengthMeter||h==null||h.length===0?null:uC(h)}),u=(0,n.computed)(()=>a.value==null||a.value.length===0?null:s.value?.score??0),d=(0,n.computed)(()=>{const h=u.value;return h==null?"var(--bgl-input-bg)":h<=1?"var(--bgl-red)":h===2?"var(--bgl-orange)":h===3?"var(--bgl-yellow)":"var(--bgl-green)"}),f=(0,n.computed)(()=>{const h=u.value;return h==null?"":r(h===0?"password.veryWeak":h===1?"password.weak":h===2?"password.fair":h===3?"password.good":"password.strong")}),m=(0,n.computed)(()=>{const h=u.value;return h==null?0:(h+1)/5*100}),p=(0,n.computed)(()=>{const h=s.value;if(!h)return"";const{feedback:{warning:v,suggestions:y}}=h;return[...v?[v]:[],...y].join(" ")});return(h,v)=>{const y=(0,n.resolveDirective)("tooltip");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["relative passwordInput",{"relative mb-2":t.strengthMeter,"has-error":!!t.error,underlined:t.underlined}])},[(0,n.createVNode)((0,n.unref)(Ve),(0,n.mergeProps)({modelValue:a.value,"onUpdate:modelValue":v[0]||(v[0]=g=>a.value=g)},o.value,{type:c.value,class:"mb-0"}),null,16,["modelValue","type"]),(0,n.createElementVNode)("div",dC,[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",class:"mx-05",icon:i.value,onClick:v[1]||(v[1]=g=>l.value=!l.value)},null,8,["icon"])]),t.strengthMeter?((0,n.openBlock)(),(0,n.createElementBlock)("div",fC,[(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("div",mC,[(0,n.createElementVNode)("div",{class:"password-strength-fill h-100p round",style:(0,n.normalizeStyle)({width:`${m.value}%`,backgroundColor:d.value})},null,4)])),[[y,p.value||`Password strength: ${f.value}`]]),(0,n.createElementVNode)("span",{class:"password-strength-label txt10 light white-space",style:(0,n.normalizeStyle)({color:d.value})},(0,n.toDisplayString)(f.value),5)])):(0,n.createCommentVNode)("",!0)],2)}}}),bp=pC;function Eo(e){return e==null?"":typeof e=="object"?e.label??String(e.value??""):String(e)}function vr(e){if(e!=null)return typeof e=="object"?e.value:e}function Fc(e){if(e==null||typeof e!="object")return;const t=e.subtitle;return typeof t=="string"&&t?t:void 0}function Rr(e){if(!(e==null||typeof e!="object"))return e.icon}function _p(e){if(typeof e=="object"&&e!==null){const t=e;return{...t,label:t.label??String(t.value??""),value:t.value}}return{label:String(e),value:e}}var hC=["aria-labelledby"],gC=["id"],vC={key:0},LC=["for"],yC=["id","disabled","tabindex","name","value","required"],bC=["src","alt"],_C={class:""},wC=["innerHTML"],kC={key:1,class:"txt-gray txt-12 m-0 pt-025"},$C=(0,n.defineComponent)({__name:"RadioGroup",props:(0,n.mergeModels)({id:{},label:{},groupName:{},options:{},deletable:{type:Boolean},required:{type:Boolean},error:{},disabled:{type:Boolean},size:{},thin:{type:Boolean},flat:{type:Boolean},invertedActive:{type:Boolean},align:{default:"center"},hideRadio:{type:Boolean},bgColor:{},activeBgColor:{},activeTextColor:{},borderColor:{},textColor:{},textAlign:{},wrapperClass:{},inline:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)(["delete","focus","blur","change"],["update:modelValue"]),setup(e,{emit:t}){const r=e,o=t,{shellClass:a,shellStyle:l}=ht(r);function i(S,E){const k=s.value===S.value;return d.value.some(B=>B.value===s.value)?k?0:-1:E===d.value.findIndex(B=>!(r.disabled||B.disabled))?0:-1}const c=(0,n.computed)(()=>r.groupName||r.id||Math.random().toString(36).substring(2,15)),s=(0,n.useModel)(e,"modelValue"),u=(0,n.ref)([]),d=(0,n.computed)(()=>(Array.isArray(r.options)?r.options:u.value).map(S=>_p(S))),f=(0,n.ref)(null),m=(0,n.ref)("90px");let p;function h(){const S=f.value,E=d.value.length;if(!r.inline||!S||!E)return;const k=Number.parseFloat(getComputedStyle(S).columnGap)||0,B=Math.max(1,Math.min(E,Math.floor((S.clientWidth+k)/(100+k)))),I=Math.ceil(E/B),D=Math.ceil(E/I);m.value=`calc((100% - ${k*(D-1)}px) / ${D})`}(0,n.onMounted)(()=>{p=new ResizeObserver(h),f.value&&p.observe(f.value),h()}),(0,n.onBeforeUnmount)(()=>p?.disconnect()),(0,n.watch)([()=>d.value.length,()=>r.inline],async()=>{await(0,n.nextTick)(),h()});async function v(){if(typeof r.options=="function")try{u.value=await r.options()}catch{u.value=[]}}(0,n.watch)(()=>r.options,()=>{u.value=[],v()},{immediate:!0,deep:!0});const y=(0,n.ref)(!1),g=(0,n.computed)(()=>({"bagel-input":!0,"radio-group":!0,...a.value,"has-error":!!r.error,"is-disabled":r.disabled,"is-focused":y.value,"has-value":s.value!=null&&s.value!=="",open:y.value,[`radio-group--${r.size}`]:!!r.size&&r.size!=="m"})),L=(0,n.computed)(()=>({...l.value,"--rg-active-bg":r.activeBgColor||"var(--bgl-primary-light)","--rg-active-color":r.activeTextColor||"var(--bgl-input-label-active-color, var(--bgl-primary))"}));function b(){y.value=!0,o("focus")}function _(){y.value=!1,o("blur")}function w(){o("change",s.value)}return(S,E)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(g.value),style:(0,n.normalizeStyle)(L.value),role:"radiogroup","aria-labelledby":e.label?`${c.value}-label`:void 0},[e.label?((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:0,id:`${c.value}-label`,class:"group-label"},[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label))+" ",1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",vC,"*")):(0,n.createCommentVNode)("",!0)],8,gC)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",{ref_key:"inlineWrapper",ref:f,class:(0,n.normalizeClass)(["radio-group-wrap",[e.wrapperClass,{"radio-group-wrap--inline":e.inline}]]),style:(0,n.normalizeStyle)(e.inline?{"--rg-item-basis":m.value}:void 0)},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(d.value,(k,B)=>((0,n.openBlock)(),(0,n.createElementBlock)("label",{key:k.id||`${c.value}-${B}`,class:(0,n.normalizeClass)(["border rounded flex active-list-item hover mb-05",{"p-05 gap-025":e.thin,"py-1 gap-075":!e.thin,"ps-05":!e.hideRadio,"px-1":e.hideRadio&&!e.thin,"bg-gray-light":!e.bgColor&&!e.flat,"align-items-start":e.align==="start"||e.align==="top","align-items-center":e.align==="center","align-items-end":e.align==="end"||e.align==="bottom",invertedActive:e.invertedActive,"is-option-disabled":e.disabled||k.disabled}]),for:k.id||`${c.value}-${B}`,style:(0,n.normalizeStyle)({backgroundColor:e.bgColor,borderColor:e.borderColor})},[(0,n.withDirectives)((0,n.createElementVNode)("input",{id:k.id||`${c.value}-${B}`,"onUpdate:modelValue":E[0]||(E[0]=I=>s.value=I),disabled:e.disabled||k.disabled,tabindex:i(k,B),class:(0,n.normalizeClass)(["radio-input-list",{"mt-025":e.align==="start"||e.align==="top","mb-025":e.align==="end"||e.align==="bottom",hideRadio:e.hideRadio}]),type:"radio",name:c.value,value:k.value,required:e.required,onFocus:b,onBlur:_,onChange:w},null,42,yC),[[n.vModelRadio,s.value]]),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025",{"txt-center justify-content-center mx-auto":e.textAlign==="center","radio-option-content--centered-image":e.textAlign==="center"&&k.imgSrc,"txt-end justify-content-end":e.textAlign==="right","txt-start justify-content-start":e.textAlign==="left"}]),style:(0,n.normalizeStyle)({color:e.textColor})},[k.imgSrc?((0,n.openBlock)(),(0,n.createElementBlock)("img",{key:0,class:"py-025 radius-05 m_w40 object-fit",height:"40",width:"40",src:k.imgSrc,alt:k.imgAlt||k.label||""},null,8,bC)):k.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:1,icon:k.icon,size:1},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",_C,[k.label?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:"m-0 m_txt-14 line-height-14",innerHTML:(0,n.unref)(X3)(k.label)},null,8,wC)):(0,n.createCommentVNode)("",!0),k.subLabel?((0,n.openBlock)(),(0,n.createElementBlock)("p",kC,(0,n.toDisplayString)(k.subLabel),1)):(0,n.createCommentVNode)("",!0)]),(0,n.renderSlot)(S.$slots,"radioItem",(0,n.mergeProps)({ref_for:!0},k),void 0,!0)],6),e.deletable?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:0,class:"ms-auto",flat:"",thin:"",icon:"delete",onClick:I=>S.$emit("delete",k)},null,8,["onClick"])):(0,n.createCommentVNode)("",!0)],14,LC))),128))],6)],14,hC))}}),wp=be($C,[["__scopeId","data-v-af8bc932"]]),EC=["dir"],SC={key:0,class:"label"},CC={class:"range-slider relative w-100"},xC=["id","value","min","max","step","required","disabled","aria-label"],TC=["value","min","max","step","required","disabled"],NC={key:1,class:"txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05"},BC=(0,n.defineComponent)({__name:"RangeInput",props:{modelValue:{},min:{},max:{},step:{},required:{type:Boolean},label:{},disabled:{type:Boolean},id:{},rtl:{type:Boolean},multiRange:{type:Boolean},formatValue:{type:Function},trackColor:{},activeColor:{},size:{},hideMinMax:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,{min:a=0,max:l=100,step:i=1,multiRange:c=!1,formatValue:s=w=>w.toString()}=r,u=(0,n.ref)(null),d=(0,n.ref)(!1);(0,n.onMounted)(()=>{r.rtl===void 0&&u.value&&(d.value=getComputedStyle(u.value).direction==="rtl")});const f=(0,n.ref)(Array.isArray(r.modelValue)?r.modelValue[0]:r.modelValue??a),m=(0,n.ref)(Array.isArray(r.modelValue)?r.modelValue[1]:l),p=(0,n.computed)(()=>Math.min(Math.max(f.value,a),c?m.value:l)),h=(0,n.computed)(()=>Math.max(Math.min(m.value,l),f.value)),v=(0,n.computed)(()=>(p.value-a)/(l-a)*100),y=(0,n.computed)(()=>(h.value-a)/(l-a)*100);(0,n.watch)(()=>r.modelValue,w=>{Array.isArray(w)&&c?(f.value=w[0]??a,m.value=w[1]??l):Array.isArray(w)||(f.value=w??a,m.value=l)},{immediate:!0});function g(w,S){S?f.value=w:m.value=w,o("update:modelValue",c?[p.value,h.value]:p.value)}const L=(0,n.computed)(()=>c?{insetInlineStart:`${v.value}%`,width:`${y.value-v.value}%`}:{insetInlineStart:"0",width:`${v.value}%`}),b=(0,n.computed)(()=>s(p.value)),_=(0,n.computed)(()=>s(h.value));return(w,S)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{ref_key:"rootEl",ref:u,dir:e.rtl===void 0?void 0:e.rtl?"rtl":"ltr",class:(0,n.normalizeClass)({"range-sm":e.size==="sm"}),style:(0,n.normalizeStyle)([e.minWidth?{minWidth:e.minWidth}:{},e.maxWidth?{maxWidth:e.maxWidth}:{},e.activeColor?{"--bgl-range-thumb-color":e.activeColor}:{},e.activeColor?{"--bgl-input-label-active-color":e.activeColor}:{},e.labelActiveColor?{"--bgl-input-label-active-color":e.labelActiveColor}:{}])},[r.label?((0,n.openBlock)(),(0,n.createElementBlock)("label",SC,(0,n.toDisplayString)((0,n.unref)($e)(r.label)),1)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",CC,[(0,n.createElementVNode)("input",{id:e.id,value:p.value,class:"from",type:"range",min:(0,n.unref)(a),max:(0,n.unref)(l),step:(0,n.unref)(i),required:e.required,disabled:e.disabled,"aria-label":(0,n.unref)(c)?"Minimum value":"Value",onInput:S[0]||(S[0]=E=>g(+E.target.value,!0))},null,40,xC),(0,n.unref)(c)?((0,n.openBlock)(),(0,n.createElementBlock)("input",{key:0,value:h.value,class:"to",type:"range",min:(0,n.unref)(a),max:(0,n.unref)(l),step:(0,n.unref)(i),required:e.required,disabled:e.disabled,"aria-label":"Maximum value",onInput:S[1]||(S[1]=E=>g(+E.target.value,!1))},null,40,TC)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",{class:"track absolute pointer-events-none overflow-hidden round",style:(0,n.normalizeStyle)(e.trackColor?{background:e.trackColor}:{})},[(0,n.createElementVNode)("div",{class:"active-range absolute h-100 pointer-events-none",style:(0,n.normalizeStyle)({...L.value,background:e.activeColor||"var(--bgl-input-label-active-color, var(--bgl-primary))"})},null,4)],4),p.value!==(0,n.unref)(a)?((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:1,class:"txt-center txt-12 range-slider-position-txt absolute line-height-1",style:(0,n.normalizeStyle)({"--progress":`${v.value}`})},[(0,n.unref)(c)?(0,n.createCommentVNode)("",!0):(0,n.renderSlot)(w.$slots,"progress",{key:0,progress:b.value,min:(0,n.unref)(s)((0,n.unref)(a)),max:(0,n.unref)(s)((0,n.unref)(l))},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(b.value),1)],!0),(0,n.unref)(c)?(0,n.renderSlot)(w.$slots,"from",{key:1,from:b.value,to:_.value,min:(0,n.unref)(s)((0,n.unref)(a)),max:(0,n.unref)(s)((0,n.unref)(l))},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(b.value),1)],!0):(0,n.createCommentVNode)("",!0)],4)):(0,n.createCommentVNode)("",!0),(0,n.unref)(c)&&h.value!==(0,n.unref)(l)?((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:2,class:"txt-center txt-12 range-slider-position-txt line-height-1 absolute",style:(0,n.normalizeStyle)({"--progress":`${y.value}`})},[(0,n.renderSlot)(w.$slots,"to",{to:_.value,from:b.value,min:(0,n.unref)(s)((0,n.unref)(a)),max:(0,n.unref)(s)((0,n.unref)(l))},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(_.value),1)],!0)],4)):(0,n.createCommentVNode)("",!0)]),e.hideMinMax?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("p",NC,[(0,n.renderSlot)(w.$slots,"min",{max:(0,n.unref)(s)((0,n.unref)(l)),min:(0,n.unref)(s)((0,n.unref)(a)),from:b.value,to:_.value,progress:b.value},()=>[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)((0,n.unref)(s)((0,n.unref)(a))),1)],!0),(0,n.renderSlot)(w.$slots,"max",{max:(0,n.unref)(s)((0,n.unref)(l)),min:(0,n.unref)(s)((0,n.unref)(a)),from:b.value,to:_.value,progress:b.value},()=>[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)((0,n.unref)(s)((0,n.unref)(l))),1)],!0)]))],14,EC))}}),rd=be(BC,[["__scopeId","data-v-38ba2d44"]]),MC={key:0,class:"label-text"},DC={key:0},AC={class:"flex gap-05"},PC=["disabled"],IC={key:2,class:"ms-auto ps-05 me-05"},VC=["value"],OC={key:1,class:"error-message"},RC={key:0,class:"helptext"},FC=["aria-selected","onClick","onKeydown"],zC={class:"flex gap-05 min-w-0"},UC={class:"block min-w-0"},HC={class:"block"},WC={key:0,class:"block txt12 opacity-6"},jC={key:0,class:"selectinput-option opacity-3 pointer-events-none"},GC=(0,n.defineComponent)({__name:"SelectInput",props:{options:{},placeholder:{},disabled:{type:Boolean},modelValue:{},searchable:{type:Boolean},required:{type:Boolean},label:{},fullWidth:{type:Boolean},multiselect:{type:Boolean},icon:{},hideLabel:{type:Boolean},defaultValue:{},helptext:{},clearable:{type:Boolean},placement:{default:"bottom-start"},searchPlaceholder:{},error:{},underlined:{type:Boolean},size:{},border:{type:Boolean},thin:{type:Boolean},round:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,{$t:a}=rt(),{shellClass:l,shellStyle:i}=ht(r),c=z=>typeof z=="function",s=(0,n.ref)(),u=(0,n.ref)(),d=(0,n.ref)([]),f=z=>vr(z),m=(0,n.computed)(()=>d.value.length),p=(0,n.ref)(""),h=(0,n.ref)(),v=(0,n.ref)(!1),y=(0,n.ref)(!1),g=(0,n.computed)(()=>$e(r.placeholder)??a("select.placeholder")),L=(0,n.computed)(()=>({"selectinput-btn--xs":r.size==="xs","selectinput-btn--s":r.size==="s","selectinput-btn--l":r.size==="l","selectinput-btn--xl":r.size==="xl","selectinput-btn--round":r.round,"selectinput-btn--thin":r.thin,outline:r.outline,border:r.border})),b=(0,n.computed)(()=>m.value===0?g.value:m.value>4?`${d.value.slice(0,4).map(z=>Eo(z)).join(", ")}... +${m.value-4}`:d.value.map(z=>Eo(z)).join(", ")),_=(0,n.computed)(()=>r.searchPlaceholder??b.value??a("select.search")),{results:w,isLoading:S}=qh({searchTerm:()=>p.value,serverSearch:c(r.options)?r.options:void 0,items:()=>Array.isArray(r.options)?r.options:[],keysToSearch:["label","subtitle","value"],minChars:c(r.options)?0:2}),E=(0,n.ref)(-1),k=(0,n.ref)();function B(z){if(!y.value){y.value=!0,setTimeout(()=>{B(z)},210);return}z==="up"?E.value=E.value>0?E.value-1:w.value.length-1:z==="down"&&(E.value=E.value<w.value.length-1?E.value+1:0),setTimeout(()=>{const $=k.value?.children[E.value];$?$.focus():E.value=-1},10)}const I=z=>d.value.find($=>f(z)===f($))!==void 0;function D(){if(!k.value||m.value===0)return;const z=w.value.findIndex(M=>I(M));if(z===-1)return;const $=k.value.children[z];$&&$.scrollIntoView({block:"center",behavior:"instant"})}function V(){y.value=!0}function O(z){v.value=!0;const $=d.value.findIndex(q=>f(q)===f(z));if($>-1)d.value.splice($,1);else if(r.multiselect){const q=[...d.value];q.push(z),d.value=q}else d.value.splice(0,m.value,z);const M=document.activeElement;M&&k.value?.contains(M)&&M.blur(),r.multiselect||(y.value=!1,setTimeout(()=>{u.value?.focus()},0)),N()}function N(){if(r.multiselect)o("update:modelValue",d.value.map(f).filter(z=>z!=null));else{const[z]=d.value;o("update:modelValue",f(z))}}function j(z,$){if(z.length!==$.length)return!1;const M=z.map(f).filter(H=>H!=null).map(String).sort(),q=$.map(f).filter(H=>H!=null).map(String).sort();return M.every((H,K)=>H===q[K])}return(0,n.watch)(()=>r.modelValue,z=>{if(r.multiselect){const $=Array.isArray(z)?z:z!=null?[z]:[];j($,d.value)||d.value.splice(0,m.value,...$)}else if(z==null)d.value.length>0&&(d.value=[]);else{const $=Array.isArray(z)?z[0]:z,M=Array.isArray(r.options)?r.options.find(q=>f(q)===f($))??$:$;M!=null&&!I(M)&&(d.value=[M])}},{immediate:!0}),(0,n.watch)(()=>y.value,z=>{z&&(E.value=-1,setTimeout(()=>{D()},10))}),(0,n.watch)(()=>r.options,()=>{const z=r.options;Array.isArray(z)&&d.value.forEach(($,M)=>{const q=z.find(H=>f(H)===f($));q===void 0?d.value.splice(M,1):d.value.splice(M,1,q)})},{deep:!0,immediate:!0}),(0,n.watch)(()=>w.value,z=>{c(r.options)&&z.length>0&&d.value.forEach(($,M)=>{const q=f($);if(typeof $!="object"||!$.label){const H=z.find(K=>f(K)===q);H!==void 0&&d.value.splice(M,1,H)}})},{deep:!0,immediate:!0}),(0,n.onMounted)(()=>{const z=r.options;if(r.modelValue==null&&r.defaultValue!==void 0&&Array.isArray(z)){const $=z.find(M=>f(M)===f(r.defaultValue));if($===void 0)return;d.value=[$]}}),(z,$)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Dt),{ref_key:"dropdown",ref:h,shown:y.value,"onUpdate:shown":$[11]||($[11]=M=>y.value=M),placement:e.placement,class:(0,n.normalizeClass)(["bagel-input selectinput",[(0,n.unref)(l),{"has-error":!!e.error,underlined:e.underlined,open:y.value,"has-value":m.value>0}]]),style:(0,n.normalizeStyle)((0,n.unref)(i)),"no-auto-focus":"",onClick:$[12]||($[12]=(0,n.withModifiers)(()=>{},["stop"]))},{trigger:(0,n.withCtx)(()=>[(0,n.createElementVNode)("label",null,[e.label||e.underlined&&e.placeholder?((0,n.openBlock)(),(0,n.createElementBlock)("span",MC,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label)||(0,n.unref)($e)(e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",DC," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",AC,[e.searchable&&y.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:0,ref_key:"searchInput",ref:s,modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=M=>p.value=M),class:"mb-0",placeholder:_.value,icon:"search",onInput:$[1]||($[1]=M=>v.value=!1),onClick:V,onKeydown:[$[2]||($[2]=(0,n.withKeys)((0,n.withModifiers)(M=>B("down"),["prevent"]),["down"])),$[3]||($[3]=(0,n.withKeys)((0,n.withModifiers)(M=>B("up"),["prevent"]),["up"]))]},null,8,["modelValue","placeholder"])):((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,ref_key:"triggerBtn",ref:u,disabled:e.disabled,type:"button",class:(0,n.normalizeClass)(["selectinput-btn",[{isEmpty:m.value===0},L.value]]),onClick:$[5]||($[5]=M=>y.value=!y.value),onKeydown:[$[6]||($[6]=(0,n.withKeys)((0,n.withModifiers)(M=>B("down"),["prevent"]),["down"])),$[7]||($[7]=(0,n.withKeys)((0,n.withModifiers)(M=>B("up"),["prevent"]),["up"]))]},[e.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,icon:e.icon},null,8,["icon"])):(0,n.createCommentVNode)("",!0),e.hideLabel?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:1,class:(0,n.normalizeClass)({"me-auto ms-05":e.icon})},(0,n.toDisplayString)(m.value>0?b.value:e.underlined?"":(0,n.unref)($e)(e.placeholder)||"Select..."),3)),e.clearable&&m.value>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",IC,[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",icon:"clear",class:"color-gray",onClick:$[4]||($[4]=M=>{d.value=[],N()})})])):(0,n.createCommentVNode)("",!0),e.disabled?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:3,thin:"",transition:"scale",icon:y.value?e.underlined?"expand_less":"unfold_less":e.underlined?"expand_more":"unfold_more"},null,8,["icon"]))],42,PC)),e.required&&!e.underlined?((0,n.openBlock)(),(0,n.createElementBlock)("input",{key:2,tabindex:"-1",style:{width:"0",height:"0",position:"absolute",opacity:"0","z-index":"-1"},value:d.value,required:""},null,8,VC)):(0,n.createCommentVNode)("",!0)]),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",OC,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)]),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",RC,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0)]),default:(0,n.withCtx)(()=>[(0,n.unref)(S)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(La),{key:0,count:6,width:"200px",height:"25px",class:"mx-1 my-1"})):(0,n.createCommentVNode)("",!0),(0,n.createVNode)((0,n.unref)(Wn),{class:"p-05",frame:"",style:(0,n.normalizeStyle)({width:e.fullWidth?"100%":"auto"}),onClick:$[10]||($[10]=(0,n.withModifiers)(()=>{},["stop"]))},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",{ref_key:"selectOptions",ref:k,class:(0,n.normalizeClass)(["selectinput-options",{multiselect:e.multiselect}])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(w),(M,q)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:`${String(f(M))}-${q}`,class:(0,n.normalizeClass)(["selectinput-option hover gap-1 align-items-center",{selected:I(M)}]),role:"option",tabindex:"0","aria-selected":I(M),onClick:H=>O(M),onKeydown:[(0,n.withKeys)(H=>O(M),["enter"]),$[8]||($[8]=(0,n.withKeys)((0,n.withModifiers)(H=>B("down"),["prevent"]),["down"])),$[9]||($[9]=(0,n.withKeys)((0,n.withModifiers)(H=>B("up"),["prevent"]),["up"]))]},[e.multiselect?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[I(M)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,size:1.1,icon:"select_check_box"})):(0,n.createCommentVNode)("",!0),I(M)?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:1,class:"opacity-3",icon:"check_box_outline_blank",size:1.1}))],64)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",zC,[(0,n.unref)(Rr)(M)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,icon:(0,n.unref)(Rr)(M),size:1},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("span",UC,[(0,n.createElementVNode)("span",HC,(0,n.toDisplayString)((0,n.unref)(Eo)(M)),1),(0,n.unref)(Fc)(M)?((0,n.openBlock)(),(0,n.createElementBlock)("span",WC,(0,n.toDisplayString)((0,n.unref)(Fc)(M)),1)):(0,n.createCommentVNode)("",!0)])])],42,FC))),128)),(0,n.unref)(w).length===0?((0,n.openBlock)(),(0,n.createElementBlock)("p",jC," No options found ")):(0,n.createCommentVNode)("",!0)],2),(0,n.renderSlot)(z.$slots,"last",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["shown","placement","class","style"]))}}),Bt=be(GC,[["__scopeId","data-v-5c4a6ec5"]]),qC=["title"],YC=["for"],ZC={key:0,class:"label-text"},XC={key:0},KC={class:"input-field"},JC=["id","name","title","autocomplete","type","placeholder","disabled","required","pattern"],QC=["id","name","title","type","rows","placeholder","disabled","required","pattern"],ex={key:0,class:"helptext"},tx={key:1,class:"error-message"},nx=(0,n.defineComponent)({__name:"TextInput",props:{id:{},title:{},helptext:{},name:{},placeholder:{},modelValue:{default:""},label:{},small:{type:Boolean},thin:{type:Boolean},dense:{type:Boolean},required:{type:Boolean},pattern:{},defaultValue:{},shrink:{type:Boolean},underlined:{type:Boolean},flat:{type:Boolean},disabled:{type:Boolean},type:{default:"text"},nativeInputAttrs:{},icon:{},iconStart:{},iconColor:{},multiline:{type:Boolean},autoheight:{type:Boolean},code:{type:Boolean},rows:{},autocomplete:{},autofocus:{type:Boolean},error:{},onFocusout:{},onFocus:{},validate:{},getFormData:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue","debounce"],setup(e,{expose:t,emit:r}){const o=e,a=r,{shellClass:l,shellStyle:i}=ht(o),c=(0,n.computed)(()=>{if(!o.pattern)return;let{pattern:g}=o;g=g.replace(/^\^/,"").replace(/\$$/,"");try{return new RegExp(g,"v"),g}catch{try{return new RegExp(g),g}catch{return}}}),s=(0,n.ref)(),u=(0,n.ref)();o5(()=>s.value,()=>u.value,o.validate,o.getFormData);const d=(0,n.computed)(()=>{let g=Number(o.rows)||1;return o.autoheight&&(g=Math.max(g,String(s.value).split(`
|
|
21
|
+
])(${t})(?!${t})`,"g")}match({password:t}){const r=[];if(t.length===0)return r;const o=Rc.getMostUsedSeparatorChar(t);if(o===void 0)return r;const a=Rc.getSeparatorRegex(o);for(const l of t.matchAll(a)){if(l.index===void 0)continue;const i=l.index+1;r.push({pattern:"separator",token:o,i,j:i})}return r}},qS=class{constructor(){this.matchers={date:dS,dictionary:kS,regex:$S,repeat:US,sequence:HS,spatial:WS,separator:GS}}match(e){const t=[],r=[];return[...Object.keys(this.matchers),...Object.keys(Ee.matchers)].forEach(o=>{if(!this.matchers[o]&&!Ee.matchers[o])return;const a=new(this.matchers[o]?this.matchers[o]:Ee.matchers[o].Matching)().match({password:e,omniMatch:this});a instanceof Promise?(a.then(l=>{Ic(t,l)}),r.push(a)):Ic(t,a)}),r.length>0?new Promise((o,a)=>{Promise.all(r).then(()=>{o(Po(t))}).catch(l=>{a(l)})}):Po(t)}},pp=1,hp=pp*60,gp=hp*60,vp=gp*24,Lp=vp*31,b1=Lp*12,xs={second:pp,minute:hp,hour:gp,day:vp,month:Lp,year:b1,century:b1*100},YS=class{translate(e,t){let r=e;t!==void 0&&t!==1&&(r+="s");const{timeEstimation:o}=Ee.translations;return o[r].replace("{base}",`${t}`)}estimateAttackTimes(e){const t={onlineThrottling100PerHour:e/.027777777777777776,onlineNoThrottling10PerSecond:e/10,offlineSlowHashing1e4PerSecond:e/1e4,offlineFastHashing1e10PerSecond:e/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(t).forEach(o=>{const a=t[o];r[o]=this.displayTime(a)}),{crackTimesSeconds:t,crackTimesDisplay:r,score:this.guessesToScore(e)}}guessesToScore(e){return e<1005?0:e<1000005?1:e<100000005?2:e<1e10+5?3:4}displayTime(e){let t="centuries",r;const o=Object.keys(xs),a=o.findIndex(l=>e<xs[l]);return a>-1&&(t=o[a-1],a!==0?r=Math.round(e/xs[t]):t="ltSecond"),this.translate(t,r)}},ZS=(()=>null),XS=(()=>({warning:Ee.translations.warnings.dates,suggestions:[Ee.translations.suggestions.dates]})),KS=(e,t)=>{let r=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?r=Ee.translations.warnings.topTen:e.rank<=100?r=Ee.translations.warnings.topHundred:r=Ee.translations.warnings.common:e.guessesLog10<=4&&(r=Ee.translations.warnings.similarToCommon),r},JS=(e,t)=>{let r=null;return t&&(r=Ee.translations.warnings.wordByItself),r},QS=(e,t)=>t?Ee.translations.warnings.namesByThemselves:Ee.translations.warnings.commonNames,eC=(e,t)=>{let r=null;const o=e.dictionaryName,a=o==="lastnames"||o.toLowerCase().includes("firstnames");return o==="passwords"?r=KS(e,t):o.includes("wikipedia")?r=JS(e,t):a?r=QS(e,t):o==="userInputs"&&(r=Ee.translations.warnings.userInputs),r},tC=((e,t)=>{const r=eC(e,t),o=[],a=e.token;return a.match(dp)?o.push(Ee.translations.suggestions.capitalization):a.match(fp)&&a.toLowerCase()!==a&&o.push(Ee.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&o.push(Ee.translations.suggestions.reverseWords),e.l33t&&o.push(Ee.translations.suggestions.l33t),{warning:r,suggestions:o}}),nC=(e=>e.regexName==="recentYear"?{warning:Ee.translations.warnings.recentYears,suggestions:[Ee.translations.suggestions.recentYears,Ee.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]}),rC=(e=>{let t=Ee.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Ee.translations.warnings.simpleRepeat),{warning:t,suggestions:[Ee.translations.suggestions.repeated]}}),oC=(()=>({warning:Ee.translations.warnings.sequences,suggestions:[Ee.translations.suggestions.sequences]})),aC=(e=>{let t=Ee.translations.warnings.keyPattern;return e.turns===1&&(t=Ee.translations.warnings.straightRow),{warning:t,suggestions:[Ee.translations.suggestions.longerKeyboardPattern]}}),lC=(()=>null),_1={warning:null,suggestions:[]},iC=class{constructor(){this.matchers={bruteforce:ZS,date:XS,dictionary:tC,regex:nC,repeat:rC,sequence:oC,spatial:aC,separator:lC},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Ee.translations.suggestions.useWords,Ee.translations.suggestions.noNeed)}getFeedback(e,t){if(t.length===0)return this.defaultFeedback;if(e>2)return _1;const r=Ee.translations.suggestions.anotherWord,o=this.getLongestMatch(t);let a=this.getMatchFeedback(o,t.length===1);return a!=null?a.suggestions.unshift(r):a={warning:null,suggestions:[r]},a}getLongestMatch(e){let t=e[0];return e.slice(1).forEach(r=>{r.token.length>t.token.length&&(t=r)}),t}getMatchFeedback(e,t){return this.matchers[e.pattern]?this.matchers[e.pattern](e,t):Ee.matchers[e.pattern]&&"feedback"in Ee.matchers[e.pattern]?Ee.matchers[e.pattern].feedback(e,t):_1}},yp=()=>new Date().getTime(),sC=(e,t,r)=>{const o=new iC,a=new YS,l=Oc.mostGuessableMatchSequence(t,e),i=yp()-r,c=a.estimateAttackTimes(l.guesses);return{calcTime:i,...l,...c,feedback:o.getFeedback(c.score,l.sequence)}},cC=(e,t)=>(t&&Ee.extendUserInputsDictionary(t),new qS().match(e)),uC=(e,t)=>{const r=yp(),o=cC(e,t);if(o instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return sC(o,e,r)},dC={class:"m-password position-bottom-end flex column justify-content-center"},fC={key:0,class:"password-strength-container absolute start end -bottom-1-5"},mC={class:"password-strength-bar pointer overflow-hidden round"},pC=(0,n.defineComponent)({__name:"PasswordInput",props:(0,n.mergeModels)({strengthMeter:{type:Boolean,default:!1},id:{},title:{},helptext:{},name:{},placeholder:{},modelValue:{},label:{default:""},small:{type:Boolean},dense:{type:Boolean},required:{type:Boolean},pattern:{},defaultValue:{},shrink:{type:Boolean},underlined:{type:Boolean},disabled:{type:Boolean},type:{},nativeInputAttrs:{},icon:{},iconStart:{},multiline:{type:Boolean},autoheight:{type:Boolean},code:{type:Boolean},rows:{},autocomplete:{default:"current-password"},autofocus:{type:Boolean},error:{},onFocusout:{},onFocus:{},validate:{},getFormData:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{},modelModifiers:{},showPwd:{type:Boolean,default:!1},showPwdModifiers:{}}),emits:["update:modelValue","update:showPwd"],setup(e){const t=e,{$t:r}=rt(),o=(0,n.computed)(()=>{const{strengthMeter:h,modelValue:v,...y}=t;return y}),a=(0,n.useModel)(e,"modelValue"),l=(0,n.useModel)(e,"showPwd"),i=(0,n.computed)(()=>l.value?"visibility_off":"visibility"),c=(0,n.computed)(()=>l.value?"text":"password"),s=(0,n.computed)(()=>{const h=a.value;return!t.strengthMeter||h==null||h.length===0?null:uC(h)}),u=(0,n.computed)(()=>a.value==null||a.value.length===0?null:s.value?.score??0),d=(0,n.computed)(()=>{const h=u.value;return h==null?"var(--bgl-input-bg)":h<=1?"var(--bgl-red)":h===2?"var(--bgl-orange)":h===3?"var(--bgl-yellow)":"var(--bgl-green)"}),f=(0,n.computed)(()=>{const h=u.value;return h==null?"":r(h===0?"password.veryWeak":h===1?"password.weak":h===2?"password.fair":h===3?"password.good":"password.strong")}),m=(0,n.computed)(()=>{const h=u.value;return h==null?0:(h+1)/5*100}),p=(0,n.computed)(()=>{const h=s.value;if(!h)return"";const{feedback:{warning:v,suggestions:y}}=h;return[...v?[v]:[],...y].join(" ")});return(h,v)=>{const y=(0,n.resolveDirective)("tooltip");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["relative passwordInput",{"relative mb-2":t.strengthMeter,"has-error":!!t.error,underlined:t.underlined}])},[(0,n.createVNode)((0,n.unref)(Ve),(0,n.mergeProps)({modelValue:a.value,"onUpdate:modelValue":v[0]||(v[0]=g=>a.value=g)},o.value,{type:c.value,class:"mb-0"}),null,16,["modelValue","type"]),(0,n.createElementVNode)("div",dC,[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",class:"mx-05",icon:i.value,onClick:v[1]||(v[1]=g=>l.value=!l.value)},null,8,["icon"])]),t.strengthMeter?((0,n.openBlock)(),(0,n.createElementBlock)("div",fC,[(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("div",mC,[(0,n.createElementVNode)("div",{class:"password-strength-fill h-100p round",style:(0,n.normalizeStyle)({width:`${m.value}%`,backgroundColor:d.value})},null,4)])),[[y,p.value||`Password strength: ${f.value}`]]),(0,n.createElementVNode)("span",{class:"password-strength-label txt10 light white-space",style:(0,n.normalizeStyle)({color:d.value})},(0,n.toDisplayString)(f.value),5)])):(0,n.createCommentVNode)("",!0)],2)}}}),bp=pC;function Eo(e){return e==null?"":typeof e=="object"?e.label??String(e.value??""):String(e)}function vr(e){if(e!=null)return typeof e=="object"?e.value:e}function Fc(e){if(e==null||typeof e!="object")return;const t=e.subtitle;return typeof t=="string"&&t?t:void 0}function Rr(e){if(!(e==null||typeof e!="object"))return e.icon}function _p(e){if(typeof e=="object"&&e!==null){const t=e;return{...t,label:t.label??String(t.value??""),value:t.value}}return{label:String(e),value:e}}var hC=["aria-labelledby"],gC=["id"],vC={key:0},LC=["for"],yC=["id","disabled","tabindex","name","value","required"],bC=["src","alt"],_C={class:""},wC=["innerHTML"],kC={key:1,class:"txt-gray txt-12 m-0 pt-025"},$C=(0,n.defineComponent)({__name:"RadioGroup",props:(0,n.mergeModels)({id:{},label:{},groupName:{},options:{},deletable:{type:Boolean},required:{type:Boolean},error:{},disabled:{type:Boolean},size:{},thin:{type:Boolean},flat:{type:Boolean},invertedActive:{type:Boolean},align:{default:"center"},hideRadio:{type:Boolean},bgColor:{},activeBgColor:{},activeTextColor:{},borderColor:{},textColor:{},textAlign:{},wrapperClass:{},inline:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)(["delete","focus","blur","change"],["update:modelValue"]),setup(e,{emit:t}){const r=e,o=t,{shellClass:a,shellStyle:l}=ht(r);function i(S,E){const k=s.value===S.value;return d.value.some(B=>B.value===s.value)?k?0:-1:E===d.value.findIndex(B=>!(r.disabled||B.disabled))?0:-1}const c=(0,n.computed)(()=>r.groupName||r.id||Math.random().toString(36).substring(2,15)),s=(0,n.useModel)(e,"modelValue"),u=(0,n.ref)([]),d=(0,n.computed)(()=>(Array.isArray(r.options)?r.options:u.value).map(S=>_p(S))),f=(0,n.ref)(null),m=(0,n.ref)("90px");let p;function h(){const S=f.value,E=d.value.length;if(!r.inline||!S||!E)return;const k=Number.parseFloat(getComputedStyle(S).columnGap)||0,B=Math.max(1,Math.min(E,Math.floor((S.clientWidth+k)/(100+k)))),I=Math.ceil(E/B),D=Math.ceil(E/I);m.value=`calc((100% - ${k*(D-1)}px) / ${D})`}(0,n.onMounted)(()=>{p=new ResizeObserver(h),f.value&&p.observe(f.value),h()}),(0,n.onBeforeUnmount)(()=>p?.disconnect()),(0,n.watch)([()=>d.value.length,()=>r.inline],async()=>{await(0,n.nextTick)(),h()});async function v(){if(typeof r.options=="function")try{u.value=await r.options()}catch{u.value=[]}}(0,n.watch)(()=>r.options,()=>{u.value=[],v()},{immediate:!0,deep:!0});const y=(0,n.ref)(!1),g=(0,n.computed)(()=>({"bagel-input":!0,"radio-group":!0,...a.value,"has-error":!!r.error,"is-disabled":r.disabled,"is-focused":y.value,"has-value":s.value!=null&&s.value!=="",open:y.value,[`radio-group--${r.size}`]:!!r.size&&r.size!=="m"})),L=(0,n.computed)(()=>({...l.value,"--rg-active-bg":r.activeBgColor||"var(--bgl-primary-light)","--rg-active-color":r.activeTextColor||"var(--bgl-input-label-active-color, var(--bgl-primary))"}));function b(){y.value=!0,o("focus")}function _(){y.value=!1,o("blur")}function w(){o("change",s.value)}return(S,E)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(g.value),style:(0,n.normalizeStyle)(L.value),role:"radiogroup","aria-labelledby":e.label?`${c.value}-label`:void 0},[e.label?((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:0,id:`${c.value}-label`,class:"group-label"},[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label))+" ",1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",vC,"*")):(0,n.createCommentVNode)("",!0)],8,gC)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",{ref_key:"inlineWrapper",ref:f,class:(0,n.normalizeClass)(["radio-group-wrap",[e.wrapperClass,{"radio-group-wrap--inline":e.inline}]]),style:(0,n.normalizeStyle)(e.inline?{"--rg-item-basis":m.value}:void 0)},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(d.value,(k,B)=>((0,n.openBlock)(),(0,n.createElementBlock)("label",{key:k.id||`${c.value}-${B}`,class:(0,n.normalizeClass)(["border rounded flex active-list-item hover mb-05",{"p-05 gap-025":e.thin,"py-1 gap-075":!e.thin,"ps-05":!e.hideRadio,"px-1":e.hideRadio&&!e.thin,"bg-gray-light":!e.bgColor&&!e.flat,"align-items-start":e.align==="start"||e.align==="top","align-items-center":e.align==="center","align-items-end":e.align==="end"||e.align==="bottom",invertedActive:e.invertedActive,"is-option-disabled":e.disabled||k.disabled}]),for:k.id||`${c.value}-${B}`,style:(0,n.normalizeStyle)({backgroundColor:e.bgColor,borderColor:e.borderColor})},[(0,n.withDirectives)((0,n.createElementVNode)("input",{id:k.id||`${c.value}-${B}`,"onUpdate:modelValue":E[0]||(E[0]=I=>s.value=I),disabled:e.disabled||k.disabled,tabindex:i(k,B),class:(0,n.normalizeClass)(["radio-input-list",{"mt-025":e.align==="start"||e.align==="top","mb-025":e.align==="end"||e.align==="bottom",hideRadio:e.hideRadio}]),type:"radio",name:c.value,value:k.value,required:e.required,onFocus:b,onBlur:_,onChange:w},null,42,yC),[[n.vModelRadio,s.value]]),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025",{"txt-center justify-content-center mx-auto":e.textAlign==="center","radio-option-content--centered-image":e.textAlign==="center"&&k.imgSrc,"txt-end justify-content-end":e.textAlign==="right","txt-start justify-content-start":e.textAlign==="left"}]),style:(0,n.normalizeStyle)({color:e.textColor})},[k.imgSrc?((0,n.openBlock)(),(0,n.createElementBlock)("img",{key:0,class:"py-025 radius-05 m_w40 object-fit",height:"40",width:"40",src:k.imgSrc,alt:k.imgAlt||k.label||""},null,8,bC)):k.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:1,icon:k.icon,size:1},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",_C,[k.label?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:"m-0 m_txt-14 line-height-14",innerHTML:(0,n.unref)(X3)(k.label)},null,8,wC)):(0,n.createCommentVNode)("",!0),k.subLabel?((0,n.openBlock)(),(0,n.createElementBlock)("p",kC,(0,n.toDisplayString)(k.subLabel),1)):(0,n.createCommentVNode)("",!0)]),(0,n.renderSlot)(S.$slots,"radioItem",(0,n.mergeProps)({ref_for:!0},k),void 0,!0)],6),e.deletable?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(se),{key:0,class:"ms-auto",flat:"",thin:"",icon:"delete",onClick:I=>S.$emit("delete",k)},null,8,["onClick"])):(0,n.createCommentVNode)("",!0)],14,LC))),128))],6)],14,hC))}}),wp=be($C,[["__scopeId","data-v-af8bc932"]]),EC=["dir"],SC={key:0,class:"label"},CC={class:"range-slider relative w-100"},xC=["id","value","min","max","step","required","disabled","aria-label"],TC=["value","min","max","step","required","disabled"],NC={key:1,class:"txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05"},BC=(0,n.defineComponent)({__name:"RangeInput",props:{modelValue:{},min:{},max:{},step:{},required:{type:Boolean},label:{},disabled:{type:Boolean},id:{},rtl:{type:Boolean},multiRange:{type:Boolean},formatValue:{type:Function},trackColor:{},activeColor:{},size:{},hideMinMax:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,{min:a=0,max:l=100,step:i=1,multiRange:c=!1,formatValue:s=w=>w.toString()}=r,u=(0,n.ref)(null),d=(0,n.ref)(!1);(0,n.onMounted)(()=>{r.rtl===void 0&&u.value&&(d.value=getComputedStyle(u.value).direction==="rtl")});const f=(0,n.ref)(Array.isArray(r.modelValue)?r.modelValue[0]:r.modelValue??a),m=(0,n.ref)(Array.isArray(r.modelValue)?r.modelValue[1]:l),p=(0,n.computed)(()=>Math.min(Math.max(f.value,a),c?m.value:l)),h=(0,n.computed)(()=>Math.max(Math.min(m.value,l),f.value)),v=(0,n.computed)(()=>(p.value-a)/(l-a)*100),y=(0,n.computed)(()=>(h.value-a)/(l-a)*100);(0,n.watch)(()=>r.modelValue,w=>{Array.isArray(w)&&c?(f.value=w[0]??a,m.value=w[1]??l):Array.isArray(w)||(f.value=w??a,m.value=l)},{immediate:!0});function g(w,S){S?f.value=w:m.value=w,o("update:modelValue",c?[p.value,h.value]:p.value)}const L=(0,n.computed)(()=>c?{insetInlineStart:`${v.value}%`,width:`${y.value-v.value}%`}:{insetInlineStart:"0",width:`${v.value}%`}),b=(0,n.computed)(()=>s(p.value)),_=(0,n.computed)(()=>s(h.value));return(w,S)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{ref_key:"rootEl",ref:u,dir:e.rtl===void 0?void 0:e.rtl?"rtl":"ltr",class:(0,n.normalizeClass)({"range-sm":e.size==="sm"}),style:(0,n.normalizeStyle)([e.minWidth?{minWidth:e.minWidth}:{},e.maxWidth?{maxWidth:e.maxWidth}:{},e.activeColor?{"--bgl-range-thumb-color":e.activeColor}:{},e.activeColor?{"--bgl-input-label-active-color":e.activeColor}:{},e.labelActiveColor?{"--bgl-input-label-active-color":e.labelActiveColor}:{}])},[r.label?((0,n.openBlock)(),(0,n.createElementBlock)("label",SC,(0,n.toDisplayString)((0,n.unref)($e)(r.label)),1)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",CC,[(0,n.createElementVNode)("input",{id:e.id,value:p.value,class:"from",type:"range",min:(0,n.unref)(a),max:(0,n.unref)(l),step:(0,n.unref)(i),required:e.required,disabled:e.disabled,"aria-label":(0,n.unref)(c)?"Minimum value":"Value",onInput:S[0]||(S[0]=E=>g(+E.target.value,!0))},null,40,xC),(0,n.unref)(c)?((0,n.openBlock)(),(0,n.createElementBlock)("input",{key:0,value:h.value,class:"to",type:"range",min:(0,n.unref)(a),max:(0,n.unref)(l),step:(0,n.unref)(i),required:e.required,disabled:e.disabled,"aria-label":"Maximum value",onInput:S[1]||(S[1]=E=>g(+E.target.value,!1))},null,40,TC)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",{class:"track absolute pointer-events-none overflow-hidden round",style:(0,n.normalizeStyle)(e.trackColor?{background:e.trackColor}:{})},[(0,n.createElementVNode)("div",{class:"active-range absolute h-100 pointer-events-none",style:(0,n.normalizeStyle)({...L.value,background:e.activeColor||"var(--bgl-input-label-active-color, var(--bgl-primary))"})},null,4)],4),p.value!==(0,n.unref)(a)?((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:1,class:"txt-center txt-12 range-slider-position-txt absolute line-height-1",style:(0,n.normalizeStyle)({"--progress":`${v.value}`})},[(0,n.unref)(c)?(0,n.createCommentVNode)("",!0):(0,n.renderSlot)(w.$slots,"progress",{key:0,progress:b.value,min:(0,n.unref)(s)((0,n.unref)(a)),max:(0,n.unref)(s)((0,n.unref)(l))},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(b.value),1)],!0),(0,n.unref)(c)?(0,n.renderSlot)(w.$slots,"from",{key:1,from:b.value,to:_.value,min:(0,n.unref)(s)((0,n.unref)(a)),max:(0,n.unref)(s)((0,n.unref)(l))},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(b.value),1)],!0):(0,n.createCommentVNode)("",!0)],4)):(0,n.createCommentVNode)("",!0),(0,n.unref)(c)&&h.value!==(0,n.unref)(l)?((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:2,class:"txt-center txt-12 range-slider-position-txt line-height-1 absolute",style:(0,n.normalizeStyle)({"--progress":`${y.value}`})},[(0,n.renderSlot)(w.$slots,"to",{to:_.value,from:b.value,min:(0,n.unref)(s)((0,n.unref)(a)),max:(0,n.unref)(s)((0,n.unref)(l))},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(_.value),1)],!0)],4)):(0,n.createCommentVNode)("",!0)]),e.hideMinMax?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("p",NC,[(0,n.renderSlot)(w.$slots,"min",{max:(0,n.unref)(s)((0,n.unref)(l)),min:(0,n.unref)(s)((0,n.unref)(a)),from:b.value,to:_.value,progress:b.value},()=>[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)((0,n.unref)(s)((0,n.unref)(a))),1)],!0),(0,n.renderSlot)(w.$slots,"max",{max:(0,n.unref)(s)((0,n.unref)(l)),min:(0,n.unref)(s)((0,n.unref)(a)),from:b.value,to:_.value,progress:b.value},()=>[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)((0,n.unref)(s)((0,n.unref)(l))),1)],!0)]))],14,EC))}}),rd=be(BC,[["__scopeId","data-v-38ba2d44"]]),MC={key:0,class:"label-text"},DC={key:0},AC={class:"flex gap-05"},PC=["disabled"],IC={key:2,class:"ms-auto ps-05 me-05"},VC=["value"],OC={key:1,class:"error-message"},RC={key:0,class:"helptext"},FC=["aria-selected","onClick","onKeydown"],zC={class:"flex gap-05 min-w-0"},UC={class:"block min-w-0"},HC={class:"block"},WC={key:0,class:"block txt12 opacity-6"},jC={key:0,class:"selectinput-option opacity-3 pointer-events-none"},GC=(0,n.defineComponent)({__name:"SelectInput",props:{options:{},placeholder:{},disabled:{type:Boolean},modelValue:{},searchable:{type:Boolean},required:{type:Boolean},label:{},fullWidth:{type:Boolean},multiselect:{type:Boolean},icon:{},hideLabel:{type:Boolean},defaultValue:{},helptext:{},clearable:{type:Boolean},placement:{default:"bottom-start"},searchPlaceholder:{},error:{},underlined:{type:Boolean},size:{},border:{type:Boolean},thin:{type:Boolean},round:{type:Boolean},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,o=t,{$t:a}=rt(),{shellClass:l,shellStyle:i}=ht(r),c=z=>typeof z=="function",s=(0,n.ref)(),u=(0,n.ref)(),d=(0,n.ref)([]),f=z=>vr(z),m=(0,n.computed)(()=>d.value.length),p=(0,n.ref)(""),h=(0,n.ref)(),v=(0,n.ref)(!1),y=(0,n.ref)(!1),g=(0,n.computed)(()=>$e(r.placeholder)??a("select.placeholder")),L=(0,n.computed)(()=>({"selectinput-btn--xs":r.size==="xs","selectinput-btn--s":r.size==="s","selectinput-btn--l":r.size==="l","selectinput-btn--xl":r.size==="xl","selectinput-btn--round":r.round,"selectinput-btn--thin":r.thin,outline:r.outline,border:r.border})),b=(0,n.computed)(()=>m.value===0?g.value:m.value>4?`${d.value.slice(0,4).map(z=>Eo(z)).join(", ")}... +${m.value-4}`:d.value.map(z=>Eo(z)).join(", ")),_=(0,n.computed)(()=>r.searchPlaceholder??b.value??a("select.search")),{results:w,isLoading:S}=qh({searchTerm:()=>p.value,serverSearch:c(r.options)?r.options:void 0,items:()=>Array.isArray(r.options)?r.options:[],keysToSearch:["label","subtitle","value"],minChars:c(r.options)?0:2}),E=(0,n.ref)(-1),k=(0,n.ref)();function B(z){if(!y.value){y.value=!0,setTimeout(()=>{B(z)},210);return}z==="up"?E.value=E.value>0?E.value-1:w.value.length-1:z==="down"&&(E.value=E.value<w.value.length-1?E.value+1:0),setTimeout(()=>{const $=k.value?.children[E.value];$?$.focus():E.value=-1},10)}const I=z=>d.value.find($=>f(z)===f($))!==void 0;function D(){if(!k.value||m.value===0)return;const z=w.value.findIndex(M=>I(M));if(z===-1)return;const $=k.value.children[z];$&&$.scrollIntoView({block:"center",behavior:"instant"})}function V(){y.value=!0}function O(z){v.value=!0;const $=d.value.findIndex(q=>f(q)===f(z));if($>-1)d.value.splice($,1);else if(r.multiselect){const q=[...d.value];q.push(z),d.value=q}else d.value.splice(0,m.value,z);const M=document.activeElement;M&&k.value?.contains(M)&&M.blur(),r.multiselect||(y.value=!1,setTimeout(()=>{u.value?.focus()},0)),N()}function N(){if(r.multiselect)o("update:modelValue",d.value.map(f).filter(z=>z!=null));else{const[z]=d.value;o("update:modelValue",f(z))}}function j(z,$){if(z.length!==$.length)return!1;const M=z.map(f).filter(H=>H!=null).map(String).sort(),q=$.map(f).filter(H=>H!=null).map(String).sort();return M.every((H,K)=>H===q[K])}return(0,n.watch)(()=>r.modelValue,z=>{if(r.multiselect){const $=Array.isArray(z)?z:z!=null?[z]:[];j($,d.value)||d.value.splice(0,m.value,...$)}else if(z==null)d.value.length>0&&(d.value=[]);else{const $=Array.isArray(z)?z[0]:z,M=Array.isArray(r.options)?r.options.find(q=>f(q)===f($))??$:$;M!=null&&!I(M)&&(d.value=[M])}},{immediate:!0}),(0,n.watch)(()=>y.value,z=>{z&&(E.value=-1,setTimeout(()=>{D()},10))}),(0,n.watch)(()=>r.options,()=>{const z=r.options;Array.isArray(z)&&d.value.forEach(($,M)=>{const q=z.find(H=>f(H)===f($));q===void 0?d.value.splice(M,1):d.value.splice(M,1,q)})},{deep:!0,immediate:!0}),(0,n.watch)(()=>w.value,z=>{c(r.options)&&z.length>0&&d.value.forEach(($,M)=>{const q=f($);if(typeof $!="object"||!$.label){const H=z.find(K=>f(K)===q);H!==void 0&&d.value.splice(M,1,H)}})},{deep:!0,immediate:!0}),(0,n.onMounted)(()=>{const z=r.options;if(r.modelValue==null&&r.defaultValue!==void 0&&Array.isArray(z)){const $=z.find(M=>f(M)===f(r.defaultValue));if($===void 0)return;d.value=[$]}}),(z,$)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Dt),{ref_key:"dropdown",ref:h,shown:y.value,"onUpdate:shown":$[11]||($[11]=M=>y.value=M),placement:e.placement,class:(0,n.normalizeClass)(["bagel-input selectinput",[(0,n.unref)(l),{"has-error":!!e.error,underlined:e.underlined,open:y.value,"has-value":m.value>0}]]),style:(0,n.normalizeStyle)((0,n.unref)(i)),"no-auto-focus":"",onClick:$[12]||($[12]=(0,n.withModifiers)(()=>{},["stop"]))},{trigger:(0,n.withCtx)(()=>[(0,n.createElementVNode)("label",null,[e.label||e.underlined&&e.placeholder?((0,n.openBlock)(),(0,n.createElementBlock)("span",MC,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label)||(0,n.unref)($e)(e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",DC," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",AC,[e.searchable&&y.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ve),{key:0,ref_key:"searchInput",ref:s,modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=M=>p.value=M),class:"mb-0",placeholder:_.value,icon:"search",thin:e.thin,onInput:$[1]||($[1]=M=>v.value=!1),onClick:V,onKeydown:[$[2]||($[2]=(0,n.withKeys)((0,n.withModifiers)(M=>B("down"),["prevent"]),["down"])),$[3]||($[3]=(0,n.withKeys)((0,n.withModifiers)(M=>B("up"),["prevent"]),["up"]))]},null,8,["modelValue","placeholder","thin"])):((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,ref_key:"triggerBtn",ref:u,disabled:e.disabled,type:"button",class:(0,n.normalizeClass)(["selectinput-btn",[{isEmpty:m.value===0},L.value]]),onClick:$[5]||($[5]=M=>y.value=!y.value),onKeydown:[$[6]||($[6]=(0,n.withKeys)((0,n.withModifiers)(M=>B("down"),["prevent"]),["down"])),$[7]||($[7]=(0,n.withKeys)((0,n.withModifiers)(M=>B("up"),["prevent"]),["up"]))]},[e.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,icon:e.icon},null,8,["icon"])):(0,n.createCommentVNode)("",!0),e.hideLabel?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("p",{key:1,class:(0,n.normalizeClass)({"me-auto ms-05":e.icon})},(0,n.toDisplayString)(m.value>0?b.value:e.underlined?"":(0,n.unref)($e)(e.placeholder)||"Select..."),3)),e.clearable&&m.value>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",IC,[(0,n.createVNode)((0,n.unref)(se),{flat:"",thin:"",icon:"clear",class:"color-gray",onClick:$[4]||($[4]=M=>{d.value=[],N()})})])):(0,n.createCommentVNode)("",!0),e.disabled?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:3,thin:"",transition:"scale",icon:y.value?e.underlined?"expand_less":"unfold_less":e.underlined?"expand_more":"unfold_more"},null,8,["icon"]))],42,PC)),e.required&&!e.underlined?((0,n.openBlock)(),(0,n.createElementBlock)("input",{key:2,tabindex:"-1",style:{width:"0",height:"0",position:"absolute",opacity:"0","z-index":"-1"},value:d.value,required:""},null,8,VC)):(0,n.createCommentVNode)("",!0)]),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",OC,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)]),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",RC,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0)]),default:(0,n.withCtx)(()=>[(0,n.unref)(S)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(La),{key:0,count:6,width:"200px",height:"25px",class:"mx-1 my-1"})):(0,n.createCommentVNode)("",!0),(0,n.createVNode)((0,n.unref)(Wn),{class:"p-05",frame:"",style:(0,n.normalizeStyle)({width:e.fullWidth?"100%":"auto"}),onClick:$[10]||($[10]=(0,n.withModifiers)(()=>{},["stop"]))},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",{ref_key:"selectOptions",ref:k,class:(0,n.normalizeClass)(["selectinput-options",{multiselect:e.multiselect}])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(w),(M,q)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:`${String(f(M))}-${q}`,class:(0,n.normalizeClass)(["selectinput-option hover gap-1 align-items-center",{selected:I(M)}]),role:"option",tabindex:"0","aria-selected":I(M),onClick:H=>O(M),onKeydown:[(0,n.withKeys)(H=>O(M),["enter"]),$[8]||($[8]=(0,n.withKeys)((0,n.withModifiers)(H=>B("down"),["prevent"]),["down"])),$[9]||($[9]=(0,n.withKeys)((0,n.withModifiers)(H=>B("up"),["prevent"]),["up"]))]},[e.multiselect?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[I(M)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,size:1.1,icon:"select_check_box"})):(0,n.createCommentVNode)("",!0),I(M)?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:1,class:"opacity-3",icon:"check_box_outline_blank",size:1.1}))],64)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",zC,[(0,n.unref)(Rr)(M)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,icon:(0,n.unref)(Rr)(M),size:1},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("span",UC,[(0,n.createElementVNode)("span",HC,(0,n.toDisplayString)((0,n.unref)(Eo)(M)),1),(0,n.unref)(Fc)(M)?((0,n.openBlock)(),(0,n.createElementBlock)("span",WC,(0,n.toDisplayString)((0,n.unref)(Fc)(M)),1)):(0,n.createCommentVNode)("",!0)])])],42,FC))),128)),(0,n.unref)(w).length===0?((0,n.openBlock)(),(0,n.createElementBlock)("p",jC," No options found ")):(0,n.createCommentVNode)("",!0)],2),(0,n.renderSlot)(z.$slots,"last",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["shown","placement","class","style"]))}}),Bt=be(GC,[["__scopeId","data-v-9687f745"]]),qC=["title"],YC=["for"],ZC={key:0,class:"label-text"},XC={key:0},KC={class:"input-field"},JC=["id","name","title","autocomplete","type","placeholder","disabled","required","pattern"],QC=["id","name","title","type","rows","placeholder","disabled","required","pattern"],ex={key:0,class:"helptext"},tx={key:1,class:"error-message"},nx=(0,n.defineComponent)({__name:"TextInput",props:{id:{},title:{},helptext:{},name:{},placeholder:{},modelValue:{default:""},label:{},small:{type:Boolean},thin:{type:Boolean},dense:{type:Boolean},required:{type:Boolean},pattern:{},defaultValue:{},shrink:{type:Boolean},underlined:{type:Boolean},flat:{type:Boolean},disabled:{type:Boolean},type:{default:"text"},nativeInputAttrs:{},icon:{},iconStart:{},iconColor:{},multiline:{type:Boolean},autoheight:{type:Boolean},code:{type:Boolean},rows:{},autocomplete:{},autofocus:{type:Boolean},error:{},onFocusout:{},onFocus:{},validate:{},getFormData:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue","debounce"],setup(e,{expose:t,emit:r}){const o=e,a=r,{shellClass:l,shellStyle:i}=ht(o),c=(0,n.computed)(()=>{if(!o.pattern)return;let{pattern:g}=o;g=g.replace(/^\^/,"").replace(/\$$/,"");try{return new RegExp(g,"v"),g}catch{try{return new RegExp(g),g}catch{return}}}),s=(0,n.ref)(),u=(0,n.ref)();o5(()=>s.value,()=>u.value,o.validate,o.getFormData);const d=(0,n.computed)(()=>{let g=Number(o.rows)||1;return o.autoheight&&(g=Math.max(g,String(s.value).split(`
|
|
22
22
|
`).length)),(o.multiline||o.code)&&(g=Math.max(g,4)),g}),f=Zr(()=>{a("debounce",s.value)},700);function m(g=5){if(!o.autoheight||!u.value||u.value.tagName!=="TEXTAREA")return;const L=u.value;if(L.style.height="auto",!L.scrollHeight){g>0&&requestAnimationFrame(()=>m(g-1));return}L.style.height=`${L.scrollHeight+1}px`}function p(){o.disabled||(a("update:modelValue",s.value),f(),o.autoheight&&(0,n.nextTick)(()=>{m()}))}(0,n.watch)(()=>o.modelValue,g=>{g!==s.value&&(s.value=g,o.autoheight&&(0,n.nextTick)(()=>{m()}))},{immediate:!0}),t({focus:()=>u.value?.focus(),hasFocus:()=>document.activeElement===u.value});const y=(0,n.computed)(()=>String(s.value??"").length>0);return(0,n.onMounted)(async()=>{o.autofocus&&setTimeout(()=>u.value?.focus(),50),o.autoheight&&(await(0,n.nextTick)(),m())}),(g,L)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input text-input",[(0,n.unref)(l),{dense:e.dense,small:e.small,thin:e.thin,shrink:e.shrink,code:e.code,underlined:e.underlined,flat:e.flat,textInputIconWrap:e.icon,txtInputIconStart:e.iconStart,"multiline-field":e.autoheight||d.value>=2,"has-error":!!e.error,"has-value":y.value}]]),style:(0,n.normalizeStyle)((0,n.unref)(i)),title:e.title},[(0,n.createElementVNode)("label",{for:e.id},[e.label||e.underlined&&e.placeholder?((0,n.openBlock)(),(0,n.createElementBlock)("span",ZC,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label)||(0,n.unref)($e)(e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",XC," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("span",KC,[!e.autoheight&&d.value<2?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("input",(0,n.mergeProps)({key:0,id:e.id,ref_key:"input",ref:u,"onUpdate:modelValue":L[0]||(L[0]=b=>s.value=b),name:e.name,title:e.title,autocomplete:e.autocomplete,type:e.type,rows:1,placeholder:e.underlined?" ":(0,n.unref)($e)(e.placeholder)||(0,n.unref)($e)(e.label),disabled:e.disabled,required:e.required},e.nativeInputAttrs,{pattern:c.value,onFocusout:L[1]||(L[1]=(...b)=>e.onFocusout&&e.onFocusout(...b)),onFocus:L[2]||(L[2]=(...b)=>e.onFocus&&e.onFocus(...b)),onInput:p}),null,16,JC)),[[n.vModelDynamic,s.value,void 0,{trim:!0}]]):(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("textarea",(0,n.mergeProps)({key:1,id:e.id,ref_key:"input",ref:u,"onUpdate:modelValue":L[3]||(L[3]=b=>s.value=b),name:e.name,title:e.title,type:e.type,rows:d.value,placeholder:e.underlined?" ":(0,n.unref)($e)(e.placeholder)||(0,n.unref)($e)(e.label),disabled:e.disabled,required:e.required},e.nativeInputAttrs,{pattern:c.value,onInput:p,onFocusout:L[4]||(L[4]=(...b)=>e.onFocusout&&e.onFocusout(...b))}),null,16,QC)),[[n.vModelText,s.value]]),e.iconStart?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:2,class:(0,n.normalizeClass)([{" -top-025 line-height-0 ":e.underlined},"iconStart"]),icon:e.iconStart,color:e.iconColor},null,8,["class","icon","color"])):(0,n.createCommentVNode)("",!0),e.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:3,class:(0,n.normalizeClass)({" -top-025 line-height-0 ":e.underlined}),icon:e.icon,color:e.iconColor},null,8,["class","icon","color"])):(0,n.createCommentVNode)("",!0)])],8,YC),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",ex,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",tx,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],14,qC))}}),Ve=be(nx,[["__scopeId","data-v-8519c826"]]);function kp(e,t){return function(){return e.apply(t,arguments)}}var{toString:rx}=Object.prototype,{getPrototypeOf:Hi}=Object,{iterator:Wi,toStringTag:$p}=Symbol,ji=(e=>t=>{const r=rx.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=e=>(e=e.toLowerCase(),t=>ji(t)===e),Gi=e=>t=>typeof t===e,{isArray:Jr}=Array,Io=Gi("undefined");function jo(e){return e!==null&&!Io(e)&&e.constructor!==null&&!Io(e.constructor)&&Ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Ep=Cn("ArrayBuffer");function ox(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ep(e.buffer),t}var ax=Gi("string"),Ht=Gi("function"),Sp=Gi("number"),Qa=e=>e!==null&&typeof e=="object",lx=e=>e===!0||e===!1,Pl=e=>{if(ji(e)!=="object")return!1;const t=Hi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!($p in e)&&!(Wi in e)},ix=e=>{if(!Qa(e)||jo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},sx=Cn("Date"),cx=Cn("File"),ux=e=>!!(e&&typeof e.uri<"u"),dx=e=>e&&typeof e.getParts<"u",fx=Cn("Blob"),mx=Cn("FileList"),px=e=>Qa(e)&&Ht(e.pipe);function hx(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var w1=hx(),k1=typeof w1.FormData<"u"?w1.FormData:void 0,gx=e=>{if(!e)return!1;if(k1&&e instanceof k1)return!0;const t=Hi(e);if(!t||t===Object.prototype||!Ht(e.append))return!1;const r=ji(e);return r==="formdata"||r==="object"&&Ht(e.toString)&&e.toString()==="[object FormData]"},vx=Cn("URLSearchParams"),[Lx,yx,bx,_x]=["ReadableStream","Request","Response","Headers"].map(Cn),wx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function el(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,a;if(typeof e!="object"&&(e=[e]),Jr(e))for(o=0,a=e.length;o<a;o++)t.call(null,e[o],o,e);else{if(jo(e))return;const l=r?Object.getOwnPropertyNames(e):Object.keys(e),i=l.length;let c;for(o=0;o<i;o++)c=l[o],t.call(null,e[c],c,e)}}function Cp(e,t){if(jo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let o=r.length,a;for(;o-- >0;)if(a=r[o],t===a.toLowerCase())return a;return null}var Fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xp=e=>!Io(e)&&e!==Fr;function zc(...e){const{caseless:t,skipUndefined:r}=xp(this)&&this||{},o={},a=(l,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&Cp(o,i)||i,s=Uc(o,c)?o[c]:void 0;Pl(s)&&Pl(l)?o[c]=zc(s,l):Pl(l)?o[c]=zc({},l):Jr(l)?o[c]=l.slice():(!r||!Io(l))&&(o[c]=l)};for(let l=0,i=e.length;l<i;l++){const c=e[l];if(!c||jo(c)||(el(c,a),typeof c!="object"||Jr(c)))continue;const s=Object.getOwnPropertySymbols(c);for(let u=0;u<s.length;u++){const d=s[u];Ax.call(c,d)&&a(c[d],d)}}return o}var kx=(e,t,r,{allOwnKeys:o}={})=>(el(t,(a,l)=>{r&&Ht(a)?Object.defineProperty(e,l,{__proto__:null,value:kp(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),$x=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ex=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Sx=(e,t,r,o)=>{let a,l,i;const c={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),l=a.length;l-- >0;)i=a[l],(!o||o(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Hi(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Cx=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const o=e.indexOf(t,r);return o!==-1&&o===r},xx=e=>{if(!e)return null;if(Jr(e))return e;let t=e.length;if(!Sp(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Tx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Hi(Uint8Array)),Nx=(e,t)=>{const r=(e&&e[Wi]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Bx=(e,t)=>{let r;const o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},Mx=Cn("HTMLFormElement"),Dx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,a){return o.toUpperCase()+a}),Uc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),{propertyIsEnumerable:Ax}=Object.prototype,Px=Cn("RegExp"),Tp=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};el(r,(a,l)=>{let i;(i=t(a,l,e))!==!1&&(o[l]=i||a)}),Object.defineProperties(e,o)},Ix=e=>{Tp(e,(t,r)=>{if(Ht(e)&&["arguments","caller","callee"].includes(r))return!1;const o=e[r];if(Ht(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Vx=(e,t)=>{const r={},o=a=>{a.forEach(l=>{r[l]=!0})};return Jr(e)?o(e):o(String(e).split(t)),r},Ox=()=>{},Rx=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fx(e){return!!(e&&Ht(e.append)&&e[$p]==="FormData"&&e[Wi])}var zx=e=>{const t=new WeakSet,r=o=>{if(Qa(o)){if(t.has(o))return;if(jo(o))return o;if(!("toJSON"in o)){t.add(o);const a=Jr(o)?[]:{};return el(o,(l,i)=>{const c=r(l);!Io(c)&&(a[i]=c)}),t.delete(o),a}}return o};return r(e)},Ux=Cn("AsyncFunction"),Hx=e=>e&&(Qa(e)||Ht(e))&&Ht(e.then)&&Ht(e.catch),Np=((e,t)=>e?setImmediate:t?((r,o)=>(Fr.addEventListener("message",({source:a,data:l})=>{a===Fr&&l===r&&o.length&&o.shift()()},!1),a=>{o.push(a),Fr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ht(Fr.postMessage)),Wx=typeof queueMicrotask<"u"?queueMicrotask.bind(Fr):typeof process<"u"&&process.nextTick||Np,jx=e=>e!=null&&Ht(e[Wi]),te={isArray:Jr,isArrayBuffer:Ep,isBuffer:jo,isFormData:gx,isArrayBufferView:ox,isString:ax,isNumber:Sp,isBoolean:lx,isObject:Qa,isPlainObject:Pl,isEmptyObject:ix,isReadableStream:Lx,isRequest:yx,isResponse:bx,isHeaders:_x,isUndefined:Io,isDate:sx,isFile:cx,isReactNativeBlob:ux,isReactNative:dx,isBlob:fx,isRegExp:Px,isFunction:Ht,isStream:px,isURLSearchParams:vx,isTypedArray:Tx,isFileList:mx,forEach:el,merge:zc,extend:kx,trim:wx,stripBOM:$x,inherits:Ex,toFlatObject:Sx,kindOf:ji,kindOfTest:Cn,endsWith:Cx,toArray:xx,forEachEntry:Nx,matchAll:Bx,isHTMLForm:Mx,hasOwnProperty:Uc,hasOwnProp:Uc,reduceDescriptors:Tp,freezeMethods:Ix,toObjectSet:Vx,toCamelCase:Dx,noop:Ox,toFiniteNumber:Rx,findKey:Cp,global:Fr,isContextDefined:xp,isSpecCompliantForm:Fx,toJSONObject:zx,isAsyncFn:Ux,isThenable:Hx,setImmediate:Np,asap:Wx,isIterable:jx},Gx=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qx=e=>{const t={};let r,o,a;return e&&e.split(`
|
|
23
23
|
`).forEach(function(i){a=i.indexOf(":"),r=i.substring(0,a).trim().toLowerCase(),o=i.substring(a+1).trim(),!(!r||t[r]&&Gx[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};function Yx(e){let t=0,r=e.length;for(;t<r;){const o=e.charCodeAt(t);if(o!==9&&o!==32)break;t+=1}for(;r>t;){const o=e.charCodeAt(r-1);if(o!==9&&o!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}var Zx=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Xx=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function od(e,t){return te.isArray(e)?e.map(r=>od(r,t)):Yx(String(e).replace(t,""))}const Kx=e=>od(e,Zx),Jx=e=>od(e,Xx);function Bp(e){const t=Object.create(null);return te.forEach(e.toJSON(),(r,o)=>{t[o]=Jx(r)}),t}var $1=Symbol("internals");function Qo(e){return e&&String(e).trim().toLowerCase()}function Il(e){return e===!1||e==null?e:te.isArray(e)?e.map(Il):Kx(String(e))}function Qx(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}var eT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ts(e,t,r,o,a){if(te.isFunction(o))return o.call(this,t,r);if(a&&(t=r),!!te.isString(t)){if(te.isString(o))return t.indexOf(o)!==-1;if(te.isRegExp(o))return o.test(t)}}function tT(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function nT(e,t){const r=te.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{__proto__:null,value:function(a,l,i){return this[o].call(this,t,a,l,i)},configurable:!0})})}var qi=class{constructor(e){e&&this.set(e)}set(e,t,r){const o=this;function a(i,c,s){const u=Qo(c);if(!u)return;const d=te.findKey(o,u);(!d||o[d]===void 0||s===!0||s===void 0&&o[d]!==!1)&&(o[d||c]=Il(i))}const l=(i,c)=>te.forEach(i,(s,u)=>a(s,u,c));if(te.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(te.isString(e)&&(e=e.trim())&&!eT(e))l(qx(e),t);else if(te.isObject(e)&&te.isIterable(e)){let i={},c,s;for(const u of e){if(!te.isArray(u))throw new TypeError("Object iterator must return a key-value pair");i[s=u[0]]=(c=i[s])?te.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}l(i,t)}else e!=null&&a(t,e,r);return this}get(e,t){if(e=Qo(e),e){const r=te.findKey(this,e);if(r){const o=this[r];if(!t)return o;if(t===!0)return Qx(o);if(te.isFunction(t))return t.call(this,o,r);if(te.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Qo(e),e){const r=te.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Ts(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let o=!1;function a(l){if(l=Qo(l),l){const i=te.findKey(r,l);i&&(!t||Ts(r,r[i],i,t))&&(delete r[i],o=!0)}}return te.isArray(e)?e.forEach(a):a(e),o}clear(e){const t=Object.keys(this);let r=t.length,o=!1;for(;r--;){const a=t[r];(!e||Ts(this,this[a],a,e,!0))&&(delete this[a],o=!0)}return o}normalize(e){const t=this,r={};return te.forEach(this,(o,a)=>{const l=te.findKey(r,a);if(l){t[l]=Il(o),delete t[a];return}const i=e?tT(a):String(a).trim();i!==a&&delete t[a],t[i]=Il(o),r[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return te.forEach(this,(r,o)=>{r!=null&&r!==!1&&(t[o]=e&&te.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
24
24
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(o=>r.set(o)),r}static accessor(e){const t=(this[$1]=this[$1]={accessors:{}}).accessors,r=this.prototype;function o(a){const l=Qo(a);t[l]||(nT(r,a),t[l]=!0)}return te.isArray(e)?e.forEach(o):o(e),this}};qi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);te.reduceDescriptors(qi.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}});te.freezeMethods(qi);var dn=qi,rT="[REDACTED ****]";function oT(e){if(te.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(te.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function aT(e,t){const r=new Set(t.map(l=>String(l).toLowerCase())),o=[],a=l=>{if(l===null||typeof l!="object"||te.isBuffer(l))return l;if(o.indexOf(l)!==-1)return;l instanceof dn&&(l=l.toJSON()),o.push(l);let i;if(te.isArray(l))i=[],l.forEach((c,s)=>{const u=a(c);te.isUndefined(u)||(i[s]=u)});else{if(!te.isPlainObject(l)&&oT(l))return o.pop(),l;i=Object.create(null);for(const[c,s]of Object.entries(l)){const u=r.has(c.toLowerCase())?rT:a(s);te.isUndefined(u)||(i[c]=u)}}return o.pop(),i};return a(e)}var At=class Mp extends Error{static from(t,r,o,a,l,i){const c=new Mp(t.message,r||t.code,o,a,l);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,r,o,a,l){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),o&&(this.config=o),a&&(this.request=a),l&&(this.response=l,this.status=l.status)}toJSON(){const t=this.config,r=t&&te.hasOwnProp(t,"redact")?t.redact:void 0,o=te.isArray(r)&&r.length>0?aT(t,r):te.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};At.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";At.ERR_BAD_OPTION="ERR_BAD_OPTION";At.ECONNABORTED="ECONNABORTED";At.ETIMEDOUT="ETIMEDOUT";At.ECONNREFUSED="ECONNREFUSED";At.ERR_NETWORK="ERR_NETWORK";At.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";At.ERR_DEPRECATED="ERR_DEPRECATED";At.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";At.ERR_BAD_REQUEST="ERR_BAD_REQUEST";At.ERR_CANCELED="ERR_CANCELED";At.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";At.ERR_INVALID_URL="ERR_INVALID_URL";At.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Se=At;function Hc(e){return te.isPlainObject(e)||te.isArray(e)}function Dp(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function Ns(e,t,r){return e?e.concat(t).map(function(a,l){return a=Dp(a),!r&&l?"["+a+"]":a}).join(r?".":""):t}function lT(e){return te.isArray(e)&&!e.some(Hc)}var iT=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function sT(e,t,r){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=te.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!te.isUndefined(g[y])});const o=r.metaTokens,a=r.visitor||f,l=r.dots,i=r.indexes,c=r.Blob||typeof Blob<"u"&&Blob,s=r.maxDepth===void 0?100:r.maxDepth,u=c&&te.isSpecCompliantForm(t);if(!te.isFunction(a))throw new TypeError("visitor must be a function");function d(v){if(v===null)return"";if(te.isDate(v))return v.toISOString();if(te.isBoolean(v))return v.toString();if(!u&&te.isBlob(v))throw new Se("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(v)||te.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function f(v,y,g){let L=v;if(te.isReactNative(t)&&te.isReactNativeBlob(v))return t.append(Ns(g,y,l),d(v)),!1;if(v&&!g&&typeof v=="object"){if(te.endsWith(y,"{}"))y=o?y:y.slice(0,-2),v=JSON.stringify(v);else if(te.isArray(v)&&lT(v)||(te.isFileList(v)||te.endsWith(y,"[]"))&&(L=te.toArray(v)))return y=Dp(y),L.forEach(function(_,w){!(te.isUndefined(_)||_===null)&&t.append(i===!0?Ns([y],w,l):i===null?y:y+"[]",d(_))}),!1}return Hc(v)?!0:(t.append(Ns(g,y,l),d(v)),!1)}const m=[],p=Object.assign(iT,{defaultVisitor:f,convertValue:d,isVisitable:Hc});function h(v,y,g=0){if(!te.isUndefined(v)){if(g>s)throw new Se("Object is too deeply nested ("+g+" levels). Max depth: "+s,Se.ERR_FORM_DATA_DEPTH_EXCEEDED);if(m.indexOf(v)!==-1)throw new Error("Circular reference detected in "+y.join("."));m.push(v),te.forEach(v,function(b,_){(!(te.isUndefined(b)||b===null)&&a.call(t,b,te.isString(_)?_.trim():_,y,p))===!0&&h(b,y?y.concat(_):[_],g+1)}),m.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return h(e),t}var Yi=sT;function E1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(o){return t[o]})}function Ap(e,t){this._pairs=[],e&&Yi(e,this,t)}var Pp=Ap.prototype;Pp.append=function(t,r){this._pairs.push([t,r])};Pp.toString=function(t){const r=t?function(o){return t.call(this,o,E1)}:E1;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};var Ip=Ap;function cT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vp(e,t,r){if(!t)return e;const o=r&&r.encode||cT,a=te.isFunction(r)?{serialize:r}:r,l=a&&a.serialize;let i;if(l?i=l(t,a):i=te.isURLSearchParams(t)?t.toString():new Ip(t,a).toString(o),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var uT=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){te.forEach(this.handlers,function(r){r!==null&&e(r)})}},S1=uT,ad={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},dT=typeof URLSearchParams<"u"?URLSearchParams:Ip,fT=typeof FormData<"u"?FormData:null,mT=typeof Blob<"u"?Blob:null,pT={isBrowser:!0,classes:{URLSearchParams:dT,FormData:fT,Blob:mT},protocols:["http","https","file","blob","url","data"]},hT=Tu({hasBrowserEnv:()=>ld,hasStandardBrowserEnv:()=>gT,hasStandardBrowserWebWorkerEnv:()=>vT,navigator:()=>Wc,origin:()=>LT},1),ld=typeof window<"u"&&typeof document<"u",Wc=typeof navigator=="object"&&navigator||void 0,gT=ld&&(!Wc||["ReactNative","NativeScript","NS"].indexOf(Wc.product)<0),vT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LT=ld&&window.location.href||"http://localhost",kt={...hT,...pT};function yT(e,t){return Yi(e,new kt.classes.URLSearchParams,{visitor:function(r,o,a,l){return kt.isNode&&te.isBuffer(r)?(this.append(o,r.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function bT(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _T(e){const t={},r=Object.keys(e);let o;const a=r.length;let l;for(o=0;o<a;o++)l=r[o],t[l]=e[l];return t}function wT(e){function t(r,o,a,l){let i=r[l++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),s=l>=r.length;return i=!i&&te.isArray(a)?a.length:i,s?(te.hasOwnProp(a,i)?a[i]=te.isArray(a[i])?a[i].concat(o):[a[i],o]:a[i]=o,!c):((!te.hasOwnProp(a,i)||!te.isObject(a[i]))&&(a[i]=[]),t(r,o,a[i],l)&&te.isArray(a[i])&&(a[i]=_T(a[i])),!c)}if(te.isFormData(e)&&te.isFunction(e.entries)){const r={};return te.forEachEntry(e,(o,a)=>{t(bT(o),a,r,0)}),r}return null}var Op=wT,ao=(e,t)=>e!=null&&te.hasOwnProp(e,t)?e[t]:void 0;function kT(e,t,r){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var id={transitional:ad,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const o=r.getContentType()||"",a=o.indexOf("application/json")>-1,l=te.isObject(t);if(l&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return a?JSON.stringify(Op(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(l){const c=ao(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return yT(t,c).toString();if((i=te.isFileList(t))||o.indexOf("multipart/form-data")>-1){const s=ao(this,"env"),u=s&&s.FormData;return Yi(i?{"files[]":t}:t,u&&new u,c)}}return l||a?(r.setContentType("application/json",!1),kT(t)):t}],transformResponse:[function(t){const r=ao(this,"transitional")||id.transitional,o=r&&r.forcedJSONParsing,a=ao(this,"responseType"),l=a==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(o&&!a||l)){const i=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(t,ao(this,"parseReviver"))}catch(c){if(i)throw c.name==="SyntaxError"?Se.from(c,Se.ERR_BAD_RESPONSE,this,null,ao(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch","query"],e=>{id.headers[e]={}});var sd=id;function Bs(e,t){const r=this||sd,o=t||r,a=dn.from(o.headers);let l=o.data;return te.forEach(e,function(c){l=c.call(r,l,a.normalize(),t?t.status:void 0)}),a.normalize(),l}function Rp(e){return!!(e&&e.__CANCEL__)}var $T=class extends Se{constructor(e,t,r){super(e??"canceled",Se.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}},tl=$T;function Fp(e,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new Se("Request failed with status code "+r.status,r.status>=400&&r.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,r.config,r.request,r))}function ET(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function ST(e,t){e=e||10;const r=new Array(e),o=new Array(e);let a=0,l=0,i;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),d=o[l];i||(i=u),r[a]=s,o[a]=u;let f=l,m=0;for(;f!==a;)m+=r[f++],f=f%e;if(a=(a+1)%e,a===l&&(l=(l+1)%e),u-i<t)return;const p=d&&u-d;return p?Math.round(m*1e3/p):void 0}}var CT=ST;function xT(e,t){let r=0,o=1e3/t,a,l;const i=(u,d=Date.now())=>{r=d,a=null,l&&(clearTimeout(l),l=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=o?i(u,d):(a=u,l||(l=setTimeout(()=>{l=null,i(a)},o-f)))},()=>a&&i(a)]}var TT=xT;const li=(e,t,r=3)=>{let o=0;const a=CT(50,250);return TT(l=>{if(!l||typeof l.loaded!="number")return;const i=l.loaded,c=l.lengthComputable?l.total:void 0,s=c!=null?Math.min(i,c):i,u=Math.max(0,s-o),d=a(u);o=Math.max(o,s),e({loaded:s,total:c,progress:c?s/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c?(c-s)/d:void 0,event:l,lengthComputable:c!=null,[t?"download":"upload"]:!0})},r)},C1=(e,t)=>{const r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},x1=e=>(...t)=>te.asap(()=>e(...t));var NT=kt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,kt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,BT=kt.hasStandardBrowserEnv?{write(e,t,r,o,a,l,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];te.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),te.isString(o)&&c.push(`path=${o}`),te.isString(a)&&c.push(`domain=${a}`),l===!0&&c.push("secure"),te.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const o=t[r].replace(/^\s+/,""),a=o.indexOf("=");if(a!==-1&&o.slice(0,a)===e)return decodeURIComponent(o.slice(a+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function MT(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function DT(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zp(e,t,r){let o=!MT(t);return e&&(o||r===!1)?DT(e,t):t}var T1=e=>e instanceof dn?{...e}:e;function Qr(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(u,d,f,m){return te.isPlainObject(u)&&te.isPlainObject(d)?te.merge.call({caseless:m},u,d):te.isPlainObject(d)?te.merge({},d):te.isArray(d)?d.slice():d}function a(u,d,f,m){if(te.isUndefined(d)){if(!te.isUndefined(u))return o(void 0,u,f,m)}else return o(u,d,f,m)}function l(u,d){if(!te.isUndefined(d))return o(void 0,d)}function i(u,d){if(te.isUndefined(d)){if(!te.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function c(u,d,f){if(te.hasOwnProp(t,f))return o(u,d);if(te.hasOwnProp(e,f))return o(void 0,u)}const s={url:l,method:l,data:l,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(u,d,f)=>a(T1(u),T1(d),f,!0)};return te.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=te.hasOwnProp(s,d)?s[d]:a,m=f(te.hasOwnProp(e,d)?e[d]:void 0,te.hasOwnProp(t,d)?t[d]:void 0,d);te.isUndefined(m)&&f!==c||(r[d]=m)}),r}var AT=["content-type","content-length"];function PT(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([o,a])=>{AT.includes(o.toLowerCase())&&e.set(o,a)})}var IT=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function VT(e){const t=Qr({},e),r=m=>te.hasOwnProp(t,m)?t[m]:void 0,o=r("data");let a=r("withXSRFToken");const l=r("xsrfHeaderName"),i=r("xsrfCookieName");let c=r("headers");const s=r("auth"),u=r("baseURL"),d=r("allowAbsoluteUrls"),f=r("url");if(t.headers=c=dn.from(c),t.url=Vp(zp(u,f,d),r("params"),r("paramsSerializer")),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?IT(s.password):""))),te.isFormData(o)&&(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv||te.isReactNative(o)?c.setContentType(void 0):te.isFunction(o.getHeaders)&&PT(c,o.getHeaders(),r("formDataHeaderPolicy"))),kt.hasStandardBrowserEnv&&(te.isFunction(a)&&(a=a(t)),a===!0||a==null&&NT(t.url))){const m=l&&i&&BT.read(i);m&&c.set(l,m)}return t}var Up=VT,OT=typeof XMLHttpRequest<"u",RT=OT&&function(e){return new Promise(function(r,o){const a=Up(e);let l=a.data;const i=dn.from(a.headers).normalize();let{responseType:c,onUploadProgress:s,onDownloadProgress:u}=a,d,f,m,p,h;function v(){p&&p(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function g(){if(!y)return;const b=dn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Fp(function(w){r(w),v()},function(w){o(w),v()},{data:!c||c==="text"||c==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:b,config:e,request:y}),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(g)},y.onabort=function(){y&&(o(new Se("Request aborted",Se.ECONNABORTED,e,y)),v(),y=null)},y.onerror=function(_){const w=new Se(_&&_.message?_.message:"Network Error",Se.ERR_NETWORK,e,y);w.event=_||null,o(w),v(),y=null},y.ontimeout=function(){let _=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const w=a.transitional||ad;a.timeoutErrorMessage&&(_=a.timeoutErrorMessage),o(new Se(_,w.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,y)),v(),y=null},l===void 0&&i.setContentType(null),"setRequestHeader"in y&&te.forEach(Bp(i),function(_,w){y.setRequestHeader(w,_)}),te.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),c&&c!=="json"&&(y.responseType=a.responseType),u&&([m,h]=li(u,!0),y.addEventListener("progress",m)),s&&y.upload&&([f,p]=li(s),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(d=b=>{y&&(o(!b||b.type?new tl(null,e,y):b),y.abort(),v(),y=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const L=ET(a.url);if(L&&!kt.protocols.includes(L)){o(new Se("Unsupported protocol "+L+":",Se.ERR_BAD_REQUEST,e));return}y.send(l||null)})},FT=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let o=!1;const a=function(s){if(!o){o=!0,i();const u=s instanceof Error?s:this.reason;r.abort(u instanceof Se?u:new tl(u instanceof Error?u.message:u))}};let l=t&&setTimeout(()=>{l=null,a(new Se(`timeout of ${t}ms exceeded`,Se.ETIMEDOUT))},t);const i=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(a):s.removeEventListener("abort",a)}),e=null)};e.forEach(s=>s.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>te.asap(i),c},zT=FT;const UT=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let o=0,a;for(;o<r;)a=o+t,yield e.slice(o,a),o=a},HT=async function*(e,t){for await(const r of WT(e))yield*UT(r,t)};var WT=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}};const N1=(e,t,r,o)=>{const a=HT(e,t);let l=0,i,c=s=>{i||(i=!0,o&&o(s))};return new ReadableStream({async pull(s){try{const{done:u,value:d}=await a.next();if(u){c(),s.close();return}let f=d.byteLength;r&&r(l+=f),s.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(s){return c(s),a.return()}},{highWaterMark:2})};function jT(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),o=e.slice(t+1);if(/;base64/i.test(r)){let l=o.length;const i=o.length;for(let f=0;f<i;f++)if(o.charCodeAt(f)===37&&f+2<i){const m=o.charCodeAt(f+1),p=o.charCodeAt(f+2);(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(l-=2,f+=2)}let c=0,s=i-1;const u=f=>f>=2&&o.charCodeAt(f-2)===37&&o.charCodeAt(f-1)===51&&(o.charCodeAt(f)===68||o.charCodeAt(f)===100);s>=0&&(o.charCodeAt(s)===61?(c++,s--):u(s)&&(c++,s-=3)),c===1&&s>=0&&(o.charCodeAt(s)===61||u(s))&&c++;const d=Math.floor(l/4)*3-(c||0);return d>0?d:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(o,"utf8");let a=0;for(let l=0,i=o.length;l<i;l++){const c=o.charCodeAt(l);if(c<128)a+=1;else if(c<2048)a+=2;else if(c>=55296&&c<=56319&&l+1<i){const s=o.charCodeAt(l+1);s>=56320&&s<=57343?(a+=4,l++):a+=3}else a+=3}return a}const cd="1.17.0";var B1=64*1024,{isFunction:hl}=te,GT=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),M1=e=>{if(!te.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},D1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},qT=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},YT=e=>{const t=te.global!==void 0&&te.global!==null?te.global:globalThis,{ReadableStream:r,TextEncoder:o}=t;e=te.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:l,Response:i}=e,c=a?hl(a):typeof fetch=="function",s=hl(l),u=hl(i);if(!c)return!1;const d=c&&hl(r),f=c&&(typeof o=="function"?(g=>L=>g.encode(L))(new o):async g=>new Uint8Array(await new l(g).arrayBuffer())),m=s&&d&&D1(()=>{let g=!1;const L=new l(kt.origin,{body:new r,method:"POST",get duplex(){return g=!0,"half"}}),b=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),g&&!b}),p=u&&d&&D1(()=>te.isReadableStream(new i("").body)),h={stream:p&&(g=>g.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!h[g]&&(h[g]=(L,b)=>{let _=L&&L[g];if(_)return _.call(L);throw new Se(`Response type '${g}' is not supported`,Se.ERR_NOT_SUPPORT,b)})});const v=async g=>{if(g==null)return 0;if(te.isBlob(g))return g.size;if(te.isSpecCompliantForm(g))return(await new l(kt.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(te.isArrayBufferView(g)||te.isArrayBuffer(g))return g.byteLength;if(te.isURLSearchParams(g)&&(g=g+""),te.isString(g))return(await f(g)).byteLength},y=async(g,L)=>{const b=te.toFiniteNumber(g.getContentLength());return b??v(L)};return async g=>{let{url:L,method:b,data:_,signal:w,cancelToken:S,timeout:E,onDownloadProgress:k,onUploadProgress:B,responseType:I,headers:D,withCredentials:V="same-origin",fetchOptions:O,maxContentLength:N,maxBodyLength:j}=Up(g);const z=te.isNumber(N)&&N>-1,$=te.isNumber(j)&&j>-1,M=A=>te.hasOwnProp(g,A)?g[A]:void 0;let q=a||fetch;I=I?(I+"").toLowerCase():"text";let H=zT([w,S&&S.toAbortSignal()],E),K=null;const U=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let C;try{let A;const W=M("auth");if(W&&(A={username:W.username||"",password:W.password||""}),qT(L)){const le=new URL(L,kt.origin);!A&&(le.username||le.password)&&(A={username:M1(le.username),password:M1(le.password)}),(le.username||le.password)&&(le.username="",le.password="",L=le.href)}if(A&&(D.delete("authorization"),D.set("Authorization","Basic "+btoa(GT((A.username||"")+":"+(A.password||""))))),z&&typeof L=="string"&&L.startsWith("data:")&&jT(L)>N)throw new Se("maxContentLength size of "+N+" exceeded",Se.ERR_BAD_RESPONSE,g,K);if($&&b!=="get"&&b!=="head"){const le=await y(D,_);if(typeof le=="number"&&isFinite(le)&&le>j)throw new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,g,K)}if(B&&m&&b!=="get"&&b!=="head"&&(C=await y(D,_))!==0){let le=new l(L,{method:"POST",body:_,duplex:"half"}),Le;if(te.isFormData(_)&&(Le=le.headers.get("content-type"))&&D.setContentType(Le),le.body){const[X,ae]=C1(C,li(x1(B)));_=N1(le.body,B1,X,ae)}}te.isString(V)||(V=V?"include":"omit");const F=s&&"credentials"in l.prototype;if(te.isFormData(_)){const le=D.getContentType();le&&/^multipart\/form-data/i.test(le)&&!/boundary=/i.test(le)&&D.delete("content-type")}D.set("User-Agent","axios/"+cd,!1);const ne={...O,signal:H,method:b.toUpperCase(),headers:Bp(D.normalize()),body:_,duplex:"half",credentials:F?V:void 0};K=s&&new l(L,ne);let Q=await(s?q(K,O):q(L,ne));if(z){const le=te.toFiniteNumber(Q.headers.get("content-length"));if(le!=null&&le>N)throw new Se("maxContentLength size of "+N+" exceeded",Se.ERR_BAD_RESPONSE,g,K)}const ce=p&&(I==="stream"||I==="response");if(p&&Q.body&&(k||z||ce&&U)){const le={};["status","statusText","headers"].forEach(re=>{le[re]=Q[re]});const Le=te.toFiniteNumber(Q.headers.get("content-length")),[X,ae]=k&&C1(Le,li(x1(k),!0))||[];let Y=0;const J=re=>{if(z&&(Y=re,Y>N))throw new Se("maxContentLength size of "+N+" exceeded",Se.ERR_BAD_RESPONSE,g,K);X&&X(re)};Q=new i(N1(Q.body,B1,J,()=>{ae&&ae(),U&&U()}),le)}I=I||"text";let me=await h[te.findKey(h,I)||"text"](Q,g);if(z&&!p&&!ce){let le;if(me!=null&&(typeof me.byteLength=="number"?le=me.byteLength:typeof me.size=="number"?le=me.size:typeof me=="string"&&(le=typeof o=="function"?new o().encode(me).byteLength:me.length)),typeof le=="number"&&le>N)throw new Se("maxContentLength size of "+N+" exceeded",Se.ERR_BAD_RESPONSE,g,K)}return!ce&&U&&U(),await new Promise((le,Le)=>{Fp(le,Le,{data:me,headers:dn.from(Q.headers),status:Q.status,statusText:Q.statusText,config:g,request:K})})}catch(A){if(U&&U(),H&&H.aborted&&H.reason instanceof Se){const W=H.reason;throw W.config=g,K&&(W.request=K),A!==W&&(W.cause=A),W}throw A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new Se("Network Error",Se.ERR_NETWORK,g,K,A&&A.response),{cause:A.cause||A}):Se.from(A,A&&A.code,g,K,A&&A.response)}}},ZT=new Map;const Hp=e=>{let t=e&&e.env||{};const{fetch:r,Request:o,Response:a}=t,l=[o,a,r];let i=l.length,c,s,u=ZT;for(;i--;)c=l[i],s=u.get(c),s===void 0&&u.set(c,s=i?new Map:YT(t)),u=s;return s};var KW=Hp(),ud={http:null,xhr:RT,fetch:{get:Hp}};te.forEach(ud,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var A1=e=>`- ${e}`,XT=e=>te.isFunction(e)||e===null||e===!1;function KT(e,t){e=te.isArray(e)?e:[e];const{length:r}=e;let o,a;const l={};for(let i=0;i<r;i++){o=e[i];let c;if(a=o,!XT(o)&&(a=ud[(c=String(o)).toLowerCase()],a===void 0))throw new Se(`Unknown adapter '${c}'`);if(a&&(te.isFunction(a)||(a=a.get(t))))break;l[c||"#"+i]=a}if(!a){const i=Object.entries(l).map(([c,s])=>`adapter ${c} `+(s===!1?"is not supported by the environment":"is not available in the build"));throw new Se("There is no suitable adapter to dispatch the request "+(r?i.length>1?`since :
|