@bagelink/vue 1.15.241 → 1.15.243
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
|
@@ -17,7 +17,7 @@ ${f}}`:p.map(([h,L])=>`${h}: ${typeof L=="object"&&L!==null?l(L,d+1):String(L)}`
|
|
|
17
17
|
transition: transform 0.1s;
|
|
18
18
|
}
|
|
19
19
|
`,document.head.appendChild(W)}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,L=-1,y=0;const g=150,v=new Map;function b(W){if(!i)return null;const C=W.cloneNode(!0),I=W.getBoundingClientRect();return C.style.position="fixed",C.style.margin="0",C.style.top=`${I.top}px`,C.style.left=`${I.left}px`,C.style.width=`${I.width}px`,C.style.height=`${I.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 _(W){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 I=document.createElement("div");return I.style.position="absolute",I.style.left="-4px",I.style.top="-3px",I.style.width="8px",I.style.height="8px",I.style.borderRadius="50%",I.style.background="var(--primary-color, #0066ff)",C.appendChild(I),document.body.appendChild(C),C}function w(W,C){if(!a.value)return;const I=W.getBoundingClientRect();a.value.style.display="block",a.value.style.width=`${I.width}px`,a.value.style.left=`${I.left}px`,C?a.value.style.top=`${I.bottom}px`:a.value.style.top=`${I.top}px`}function S(W){let C=W;for(;C&&(!("__drag_group"in C)||C.dataset.draggable==="false");)C=C.parentElement;return C}function k(W){return W.style.opacity="0.4",W.style.transform="scale(0.95)",W.offsetHeight}function E(W){return W.style.opacity="0.5",2}function M(W){v.clear(),W.forEach((C,I)=>{const P=C.getBoundingClientRect();v.set(I,{top:P.top,bottom:P.bottom})})}function V(W,C,I,P){const B=Date.now();if(B-y<g)return L!==-1?L:I;v.size===0&&M(C);const z=W.clientY,K=C.indexOf(P),te=v.get(K);if(!te)return I;const ue=te.bottom-te.top,ne=z-te.top,pe=ue*.3,ge=ue*.7;let Le=K;return K===I?ne>ge&&(Le+=1):K===L?K>I?ne<pe?Le=K:Le=K+1:ne>ge?Le=K+1:Le=K:ne>ue*.6&&(Le+=1),L=Le,y=B,Le}function A(){i&&(document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",$),document.removeEventListener("keydown",F),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",j),document.removeEventListener("touchcancel",j),window.removeEventListener("blur",A),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(W=>{W.style.transition="",W.style.transform="",W.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),L=-1,y=0,v.clear())}function F(W){W.key==="Escape"&&t.value&&A()}function R(W){if(!i||c.disabled||W.button!==0||W.ctrlKey||W.metaKey||W.shiftKey||W.altKey)return;const C=S(W.target);if(!C||C.dataset.draggable==="false")return;if(c.handle){const P=W.target.closest(c.handle);if(!P||!C.contains(P))return}W.preventDefault(),t.value=!0,r.value=C,s=W.clientX,u=W.clientY;const I=C.getBoundingClientRect();d=I.left,f=I.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"?k(C):E(C),c.onStart?.(W),i&&(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",document.body.style.cursor="grabbing",window.addEventListener("blur",A),document.addEventListener("mousemove",H),document.addEventListener("mouseup",$),document.addEventListener("keydown",F))}function N(W){let C=W.parentElement;for(;C;){const{overflow:I,overflowY:P}=window.getComputedStyle(C);if(/auto|scroll/.test(I+P))return C;C=C.parentElement}return document.scrollingElement||document.documentElement||document.body}function G(W){r.value&&(h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{const C=N(r.value),I=C.getBoundingClientRect(),P=50,B=Math.min(20,I.height*.1),{scrollTop:z}=C,K=C.scrollHeight-C.clientHeight;W.clientY-I.top<P?C.scrollTop=Math.max(0,z-B):I.bottom-W.clientY<P&&(C.scrollTop=Math.min(K,z+B))}))}function H(W){if(!t.value||!r.value)return;if(o.value){const z=W.clientX-s,K=W.clientY-u;o.value.style.transform=`translate3d(${z}px, ${K}px, 0)`}const C=r.value.__drag_list.filter(z=>z.dataset.draggable!=="false"),I=C.indexOf(r.value),P=S(document.elementFromPoint(W.clientX,W.clientY));if(!P||P.__drag_group!==r.value.__drag_group){a.value&&(a.value.style.display="none");return}const B=V(W,C,I,P);if(l.value!==P||l.value.__intended_index!==B){l.value=P,l.value.__intended_index=B,a.value&&c.mode==="line"&&w(P,B>C.indexOf(P));const z=m;C.forEach(K=>{if(K.style.transition=`transform ${c.animation}ms cubic-bezier(0.2, 0, 0, 1)`,K.style.transform="translate3d(0, 0, 0)",K===r.value){if(c.mode==="ghost"){const te=(B-I)*z;K.style.transform=`translate3d(0, ${te}px, 0)`}}else{const te=C.indexOf(K);I<B?te>I&&te<=B&&(K.style.transform=`translate3d(0, -${z}px, 0)`):I>B&&te>=B&&te<I&&(K.style.transform=`translate3d(0, ${z}px, 0)`)}})}G(W)}function $(W){if(!t.value||!r.value||!l.value){A();return}const C=r.value.__drag_list;if(!C||!C.length){A();return}const I=C.filter(B=>B.dataset.draggable!=="false").indexOf(r.value),P=l.value.__intended_index;if(I!==-1&&P!==-1){C.forEach(z=>{z.style.transition="none",z.style.transform=""}),document.body.offsetHeight;const B=new MouseEvent("mouseup",W);B.oldIndex=I,B.newIndex=P,B.item=r.value.__drag_data,c.onEnd?.(B)}A()}function D(W){if(!i||c.disabled||!W.target)return;const C=W.touches[0];if(!C)return;const I=W.target,P=S(I);if(!P)return;const{handle:B}=c;if(B&&!I.closest(B))return;W.preventDefault(),t.value=!0,r.value=P,s=C.clientX,u=C.clientY;const z=P.getBoundingClientRect();d=z.left,f=z.top,o.value=b(P),o.value&&(o.value.style.left=`${d}px`,o.value.style.top=`${f}px`),c.mode==="line"&&(a.value=_(P)),r.value.classList.add(c.dragClass),m=c.mode==="ghost"?k(r.value):E(r.value),c.onStart?.(W),i&&(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",document.body.style.cursor="grabbing",window.addEventListener("blur",A),document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",j),document.addEventListener("touchcancel",j))}function q(W){W.preventDefault();const C=W.touches[0];if(!C)return;const I={clientX:C.clientX,clientY:C.clientY,target:document.elementFromPoint(C.clientX,C.clientY)};H(I),G(I)}function j(W){const C=W.changedTouches[0];C&&($({clientX:C.clientX,clientY:C.clientY,target:document.elementFromPoint(C.clientX,C.clientY)}),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",j),document.removeEventListener("touchcancel",j))}function X(W){if(!i)return;p?.(),t.value=!1,r.value=null,o.value=null,a.value=null,l.value=null;const C=Array.from(W.children);C.forEach(P=>{delete P.__drag_group,delete P.__drag_index,delete P.__drag_list});let I=0;C.forEach((P,B)=>{P.dataset.draggable!=="false"&&(P.style.userSelect="none",P.style.webkitUserSelect="none",P.__drag_group=e.group,P.__drag_index=I++,P.__drag_list=C.filter(z=>z.dataset.draggable!=="false"),e.items&&(P.__drag_data=e.items[B]),P.addEventListener("mousedown",R),P.addEventListener("touchstart",D))}),p=()=>{C.forEach(P=>{P.removeEventListener("mousedown",R),P.removeEventListener("touchstart",D),delete P.__drag_group,delete P.__drag_index,delete P.__drag_list}),A()}}return(0,n.onUnmounted)(()=>{p?.()}),{isDragging:t,dragElement:r,initDraggableContainer:X}}function dw(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(d?.shiftKey&&r.value!==null&&f!==-1){const p=Math.min(r.value,f),h=Math.max(r.value,f),L=l.value.slice(p,h+1).map(y=>y.id);if(L.every(y=>e.selectedItems.value.includes(y)))e.selectedItems.value=e.selectedItems.value.filter(y=>!L.includes(y));else{const y=L.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 fw(e){const t=(0,n.ref)(null),{list:r,containerProps:o,wrapperProps:a,scrollTo:l}=Hb((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 Ab(()=>t.value).toBeTruthy(),km(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 mw={class:"row first-row"},pw={key:0,class:"col-drag"},hw={key:1},gw=["onClick"],vw={class:"flex"},Lw=["onClick"],yw={key:0,class:"col-drag"},bw={key:1},_w=["value"],ww={key:1},kw=(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=>({e5eb6d56:W.value,v1b95efbf:$.value,v1e8a096a:X.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}=Dm({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,I)=>{o("orderBy",`${C.trim()} ${I.trim()}`)}}),{computedSelectedItems:L,isSelectable:y,allSelectorEl:g,updateAllSelectorState:v,toggleSelectItem:b,toggleSelectAll:_}=dw({data:d,selectable:r.selectable,selectedItems:s,cleanData:h,onSelect:C=>{o("select",C)}}),{list:w,containerProps:S,wrapperProps:k,scrollTo:E,lastItemEl:M,registerLastItemObserver:V}=fw({data:d,itemHeight:i.value,onLastItemVisible:()=>{o("lastItemVisible"),r.onLastItemVisible?.()}}),A=(0,n.computed)(()=>!!r.sortable),F=(0,n.computed)(()=>typeof r.sortable=="object"&&r.sortable?.handle?r.sortable.handle:".drag-handle-col"),R=(0,n.ref)(),{initDraggableContainer:N}=Sa({handle:F.value,mode:"line",items:r.data,onEnd:C=>{if(C.oldIndex===C.newIndex)return;const I=d.value[C.oldIndex],P=h(I);o("reorder",{oldIndex:C.oldIndex,newIndex:C.newIndex,item:P})}});function G(){!A.value||!R.value||(0,n.nextTick)(()=>{R.value&&N(R.value)})}(0,n.watch)(()=>r.data,G,{deep:!0}),(0,n.watch)(A,C=>{C&&(0,n.nextTick)(G)}),(0,n.onMounted)(G);function H(C,I){const{renderField:P}=Mm({mode:"table",getFormData:()=>I});return P({...C,label:""},a)}const $=(0,n.computed)(()=>`${i.value}px`);(0,n.watch)(()=>l.value,async(C,I)=>{C!==I&&(C||(V(),E(0),await(0,n.nextTick)(),E(0)))},{immediate:!0}),(0,n.watch)(()=>L.value.length,()=>{v()}),(0,n.watch)(()=>d.value.length,async(C,I)=>{const P=r.onLastItemVisible!==void 0&&(I??0)>0;C===I||P||(E(0),await(0,n.nextTick)(),E(0))});const D=(0,n.computed)(()=>l.value),q=(0,n.computed)(()=>!D.value&&d.value.length===0),j=(0,n.computed)(()=>{const C=c.value;return C==null||C===""?null:typeof C=="number"?`${C}px`:String(C)}),X=(0,n.computed)(()=>j.value??"0.88em"),W=(0,n.computed)(()=>j.value?`calc(${j.value} * 0.9)`:"0.8rem");return(C,I)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",(0,n.mergeProps)({class:"table-list-wrap h-100p"},(0,n.unref)(S),{class:{overflowHiddenLoading:D.value}}),[D.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Yr),{key:0,class:"h100p"})):(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)(k),{class:{"pointer-events-none":D.value}}),[(0,n.createElementVNode)("table",{class:(0,n.normalizeClass)(["infinite-wrapper",{selecting:(0,n.unref)(L).length}])},[(0,n.createElementVNode)("thead",mw,[A.value?((0,n.openBlock)(),(0,n.createElementBlock)("th",pw)):(0,n.createCommentVNode)("",!0),(0,n.unref)(y)&&!A.value?((0,n.openBlock)(),(0,n.createElementBlock)("th",hw,[(0,n.createElementVNode)("input",{ref_key:"allSelectorEl",ref:g,type:"checkbox",onClick:I[0]||(I[0]=(0,n.withModifiers)(()=>{},["stop"])),onChange:I[1]||(I[1]=P=>(0,n.unref)(_)(P))},null,544)])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(u),P=>((0,n.openBlock)(),(0,n.createElementBlock)("th",{key:P.id,class:"col",onClick:B=>!A.value&&(0,n.unref)(p)(P?.id||"")},[(0,n.createElementVNode)("div",vw,[(0,n.createTextVNode)((0,n.toDisplayString)(P.label||P.attrs?.label||(0,n.unref)(ol)(P?.id))+" ",1),A.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)===P?.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,gw))),128))]),(0,n.createElementVNode)("tbody",{ref_key:"tbodyRef",ref:R},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(w),({data:P})=>((0,n.openBlock)(),(0,n.createElementBlock)("tr",{key:P?.id||`row-${Math.random()}`,class:(0,n.normalizeClass)(["row row-item position-relative",{selected:P?.id&&(0,n.unref)(L).includes(P.id)}]),onClick:B=>(0,n.unref)(b)(P,B)},[A.value?((0,n.openBlock)(),(0,n.createElementBlock)("td",yw,[(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)&&!A.value?((0,n.openBlock)(),(0,n.createElementBlock)("td",bw,[(0,n.createElementVNode)("div",{onClick:I[3]||(I[3]=(0,n.withModifiers)(()=>{},["stop"]))},[(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":I[2]||(I[2]=B=>s.value=B),type:"checkbox",value:P?.id||""},null,8,_w),[[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),B=>((0,n.openBlock)(),(0,n.createElementBlock)("td",{key:`${B.id}-${P?.id||Math.random()}`,class:"col"},[B.id&&(0,n.unref)(a)?.[B.id]?(0,n.renderSlot)(C.$slots,B.id,{key:0,row:P,field:B},void 0,!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",ww,[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(H(B,P))))]))]))),128))],10,Lw))),128)),r.onLastItemVisible!==void 0?((0,n.openBlock)(),(0,n.createElementBlock)("tr",{key:0,ref_key:"lastItemEl",ref:M,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)(qu),{icon:r.emptyIcon??"inbox",title:r.emptyTitle??"No results",description:r.emptyDescription,compact:""},null,8,["icon","title","description"])],!0):(0,n.createCommentVNode)("",!0)],16))}}),Am=be(kw,[["__scopeId","data-v-db77a32d"]]),$w=(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}=Sa({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))}}),Pm=$w;const Ew={mounted(e,t){const{initDraggableContainer:r}=Sa(t.value||{});r(e)},updated(e,t){if(t.value!==t.oldValue){const{initDraggableContainer:r}=Sa(t.value||{});r(e)}}};var Sw={key:0,class:"drag-overlay"},Cw=(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",Sw,[(0,n.createVNode)((0,n.unref)(_e),{name:"download",color:"white",size:"2"})])):(0,n.createCommentVNode)("",!0)],34))}}),xw=be(Cw,[["__scopeId","data-v-0acc58aa"]]),Tw=["top","right","bottom","left"],Z0=["start","end"],X0=Tw.reduce((e,t)=>e.concat(t,t+"-"+Z0[0],t+"-"+Z0[1]),[]),qr=Math.min,an=Math.max,Kl=Math.round,In=e=>({x:e,y:e}),Nw={left:"right",right:"left",bottom:"top",top:"bottom"};function xc(e,t,r){return an(e,qr(t,r))}function Jr(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function bn(e){return e.split("-")[1]}function Im(e){return e==="x"?"y":"x"}function Hu(e){return e==="y"?"height":"width"}function Jn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Wu(e){return Im(Jn(e))}function Vm(e,t,r){r===void 0&&(r=!1);const o=bn(e),a=Wu(e),l=Hu(a);let i=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=Ql(i)),[i,Ql(i)]}function Bw(e){const t=Ql(e);return[Jl(e),t,Jl(t)]}function Jl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var K0=["left","right"],J0=["right","left"],Mw=["top","bottom"],Dw=["bottom","top"];function Aw(e,t,r){switch(e){case"top":case"bottom":return r?t?J0:K0:t?K0:J0;case"left":case"right":return t?Mw:Dw;default:return[]}}function Pw(e,t,r,o){const a=bn(e);let l=Aw(Un(e),r==="start",o);return a&&(l=l.map(i=>i+"-"+a),t&&(l=l.concat(l.map(Jl)))),l}function Ql(e){const t=Un(e);return Nw[t]+e.slice(t.length)}function Iw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Om(e){return typeof e!="number"?Iw(e):{top:e,right:e,bottom:e,left:e}}function Fr(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 Q0(e,t,r){let{reference:o,floating:a}=e;const l=Jn(t),i=Wu(t),c=Hu(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 Vw(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}=Jr(t,e),h=Om(p),L=c[m?f==="floating"?"reference":"floating":f],y=Fr(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(L)))==null||r?L:L.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,v=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),b=await(l.isElement==null?void 0:l.isElement(v))?await(l.getScale==null?void 0:l.getScale(v))||{x:1,y:1}:{x:1,y:1},_=Fr(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:v,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 Ow=50,Rm=async(e,t,r)=>{const{placement:o="bottom",strategy:a="absolute",middleware:l=[],platform:i}=r,c=i.detectOverflow?i:{...i,detectOverflow:Vw},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}=Q0(u,o,s),m=o,p=0;const h={};for(let L=0;L<l.length;L++){const y=l[L];if(!y)continue;const{name:g,fn:v}=y,{x:b,y:_,data:w,reset:S}=await v({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<Ow&&(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}=Q0(u,m,s)),L=-1)}return{x:d,y:f,placement:m,strategy:a,middlewareData:h}},Rw=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}=Jr(e,t)||{};if(u==null)return{};const f=Om(d),m={x:r,y:o},p=Wu(a),h=Hu(p),L=await i.getDimensions(u),y=p==="y",g=y?"top":"left",v=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 k=S?S[b]:0;(!k||!await(i.isElement==null?void 0:i.isElement(S)))&&(k=c.floating[b]||l.floating[h]);const E=_/2-w/2,M=k/2-L[h]/2-1,V=qr(f[g],M),A=qr(f[v],M),F=V,R=k-L[h]-A,N=k/2-L[h]/2+E,G=xc(F,N,R),H=!s.arrow&&bn(a)!=null&&N!==G&&l.reference[h]/2-(N<F?V:A)-L[h]/2<0,$=H?N<F?N-F:N-R:0;return{[p]:m[p]+$,data:{[p]:G,centerOffset:N-G-$,...H&&{alignmentOffset:$}},reset:H}}});function Fw(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?Jl(o)!==o:!1):!0)}var Fm=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=X0,autoAlignment:p=!0,...h}=Jr(e,t),L=f!==void 0||m===X0?Fw(f||null,p,m):m,y=await s.detectOverflow(t,h),g=((r=i.autoPlacement)==null?void 0:r.index)||0,v=L[g];if(v==null)return{};const b=Vm(v,l,await(s.isRTL==null?void 0:s.isRTL(u.floating)));if(c!==v)return{reset:{placement:L[0]}};const _=[y[Un(v)],y[b[0]],y[b[1]]],w=[...((o=i.autoPlacement)==null?void 0:o.overflows)||[],{placement:v,overflows:_}],S=L[g+1];if(S)return{data:{index:g+1,overflows:w},reset:{placement:S}};const k=w.map(M=>{const V=bn(M.placement);return[M.placement,V&&d?M.overflows.slice(0,2).reduce((A,F)=>A+F,0):M.overflows[0],M.overflows]}).sort((M,V)=>M[1]-V[1]),E=((a=k.filter(M=>M[2].slice(0,bn(M[0])?2:3).every(V=>V<=0))[0])==null?void 0:a[0])||k[0][0];return E!==c?{data:{index:g+1,overflows:w},reset:{placement:E}}:{}}}},zm=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:L=!0,...y}=Jr(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const g=Un(a),v=Jn(c),b=Un(c)===c,_=await(s.isRTL==null?void 0:s.isRTL(u.floating)),w=m||(b||!L?[Ql(c)]:Bw(c)),S=h!=="none";!m&&S&&w.push(...Pw(c,L,h,_));const k=[c,...w],E=await s.detectOverflow(t,y),M=[];let V=((o=l.flip)==null?void 0:o.overflows)||[];if(d&&M.push(E[g]),f){const N=Vm(a,i,_);M.push(E[N[0]],E[N[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(N=>N<=0)){var A,F;const N=(((A=l.flip)==null?void 0:A.index)||0)+1,G=k[N];if(G&&(!(f==="alignment"&&v!==Jn(G))||V.every($=>Jn($.placement)===v?$.overflows[0]>0:!0)))return{data:{index:N,overflows:V},reset:{placement:G}};let H=(F=V.filter($=>$.overflows[0]<=0).sort(($,D)=>$.overflows[1]-D.overflows[1])[0])==null?void 0:F.placement;if(!H)switch(p){case"bestFit":{var R;const $=(R=V.filter(D=>{if(S){const q=Jn(D.placement);return q===v||q==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(q=>q>0).reduce((q,j)=>q+j,0)]).sort((D,q)=>D[1]-q[1])[0])==null?void 0:R[0];$&&(H=$);break}case"initialPlacement":H=c;break}if(a!==H)return{reset:{placement:H}}}return{}}}},zw=new Set(["left","top"]);async function Uw(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=zw.has(i)?-1:1,d=l&&s?-1:1,f=Jr(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 Um=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 Uw(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}}}}},Hm=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:v,y:b}=g;return{x:v,y:b}}},...u}=Jr(e,t),d={x:r,y:o},f=await l.detectOverflow(t,u),m=Jn(Un(a)),p=Im(m);let h=d[p],L=d[m];if(i){const g=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=h+f[g],_=h-f[v];h=xc(b,h,_)}if(c){const g=m==="y"?"top":"left",v=m==="y"?"bottom":"right",b=L+f[g],_=L-f[v];L=xc(b,L,_)}const y=s.fn({...t,[p]:h,[m]:L});return{...y,data:{x:y.x-r,y:y.y-o,enabled:{[p]:i,[m]:c}}}}}},Hw=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}=Jr(e,t),d=await i.detectOverflow(t,u),f=Un(a),m=bn(a),p=Jn(a)==="y",{width:h,height:L}=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 v=L-d.top-d.bottom,b=h-d.left-d.right,_=qr(L-d[y],v),w=qr(h-d[g],b),S=!t.middlewareData.shift;let k=_,E=w;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(k=v),S&&!m){const V=an(d.left,0),A=an(d.right,0),F=an(d.top,0),R=an(d.bottom,0);p?E=h-2*(V!==0||A!==0?V+A:an(d.left,d.right)):k=L-2*(F!==0||R!==0?F+R:an(d.top,d.bottom))}await s({...t,availableWidth:E,availableHeight:k});const M=await i.getDimensions(c.floating);return h!==M.width||L!==M.height?{reset:{rects:!0}}:{}}}};function Pi(){return typeof window<"u"}function zo(e){return Wm(e)?(e.nodeName||"").toLowerCase():"#document"}function en(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(Wm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wm(e){return Pi()?e instanceof Node||e instanceof en(e).Node:!1}function kn(e){return Pi()?e instanceof Element||e instanceof en(e).Element:!1}function ur(e){return Pi()?e instanceof HTMLElement||e instanceof en(e).HTMLElement:!1}function e1(e){return!Pi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof en(e).ShadowRoot}function Za(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 Ww(e){return/^(table|td|th)$/.test(zo(e))}function Ii(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var jw=/transform|translate|scale|rotate|perspective|filter/,Gw=/paint|layout|strict|content/,Nr=e=>!!e&&e!=="none",bs;function ju(e){const t=kn(e)?$n(e):e;return Nr(t.transform)||Nr(t.translate)||Nr(t.scale)||Nr(t.rotate)||Nr(t.perspective)||!Gu()&&(Nr(t.backdropFilter)||Nr(t.filter))||jw.test(t.willChange||"")||Gw.test(t.contain||"")}function qw(e){let t=kr(e);for(;ur(t)&&!Bo(t);){if(ju(t))return t;if(Ii(t))return null;t=kr(t)}return null}function Gu(){return bs==null&&(bs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bs}function Bo(e){return/^(html|body|#document)$/.test(zo(e))}function $n(e){return en(e).getComputedStyle(e)}function Vi(e){return kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kr(e){if(zo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||e1(e)&&e.host||cr(e);return e1(t)?t.host:t}function jm(e){const t=kr(e);return Bo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ur(t)&&Za(t)?t:jm(t)}function Tc(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=jm(e),l=a===((o=e.ownerDocument)==null?void 0:o.body),i=en(a);if(l){const c=Nc(i);return t.concat(i,i.visualViewport||[],Za(a)?a:[],c&&r?Tc(c):[])}else return t.concat(a,Tc(a,[],r))}function Nc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gm(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=Kl(r)!==l||Kl(o)!==i;return c&&(r=l,o=i),{width:r,height:o,$:c}}function qm(e){return kn(e)?e:e.contextElement}function wo(e){const t=qm(e);if(!ur(t))return In(1);const r=t.getBoundingClientRect(),{width:o,height:a,$:l}=Gm(t);let i=(l?Kl(r.width):r.width)/o,c=(l?Kl(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}var Yw=In(0);function Ym(e){const t=en(e);return!Gu()||!t.visualViewport?Yw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zw(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==en(e)?!1:t}function Ca(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),l=qm(e);let i=In(1);t&&(o?kn(o)&&(i=wo(o)):i=wo(e));const c=Zw(l,r,o)?Ym(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=en(l),p=o&&kn(o)?en(o):o;let h=m,L=Nc(h);for(;L&&o&&p!==h;){const y=wo(L),g=L.getBoundingClientRect(),v=$n(L),b=g.left+(L.clientLeft+parseFloat(v.paddingLeft))*y.x,_=g.top+(L.clientTop+parseFloat(v.paddingTop))*y.y;s*=y.x,u*=y.y,d*=y.x,f*=y.y,s+=b,u+=_,h=en(L),L=Nc(h)}}return Fr({width:d,height:f,x:s,y:u})}function Oi(e,t){const r=Vi(e).scrollLeft;return t?t.left+r:Ca(cr(e)).left+r}function Zm(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Oi(e,r),y:r.top+t.scrollTop}}function Xw(e){let{elements:t,rect:r,offsetParent:o,strategy:a}=e;const l=a==="fixed",i=cr(o),c=t?Ii(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)&&((zo(o)!=="body"||Za(i))&&(s=Vi(o)),f)){const p=Ca(o);u=wo(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const m=i&&!f&&!l?Zm(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 Kw(e){return Array.from(e.getClientRects())}function Jw(e){const t=cr(e),r=Vi(e),o=e.ownerDocument.body,a=an(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=an(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-r.scrollLeft+Oi(e);const c=-r.scrollTop;return $n(o).direction==="rtl"&&(i+=an(t.clientWidth,o.clientWidth)-a),{width:a,height:l,x:i,y:c}}var t1=25;function Qw(e,t){const r=en(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=Gu();(!d||d&&t==="fixed")&&(c=a.offsetLeft,s=a.offsetTop)}const u=Oi(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<=t1&&(l-=h)}else u<=t1&&(l+=u);return{width:l,height:i,x:c,y:s}}function ek(e,t){const r=Ca(e,!0,t==="fixed"),o=r.top+e.clientTop,a=r.left+e.clientLeft,l=ur(e)?wo(e):In(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:a*l.x,y:o*l.y}}function n1(e,t,r){let o;if(t==="viewport")o=Qw(e,r);else if(t==="document")o=Jw(cr(e));else if(kn(t))o=ek(t,r);else{const a=Ym(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Fr(o)}function Xm(e,t){const r=kr(e);return r===t||!kn(r)||Bo(r)?!1:$n(r).position==="fixed"||Xm(r,t)}function tk(e,t){const r=t.get(e);if(r)return r;let o=Tc(e,[],!1).filter(c=>kn(c)&&zo(c)!=="body"),a=null;const l=$n(e).position==="fixed";let i=l?kr(e):e;for(;kn(i)&&!Bo(i);){const c=$n(i),s=ju(i);!s&&c.position==="fixed"&&(a=null),(l?!s&&!a:!s&&c.position==="static"&&a&&(a.position==="absolute"||a.position==="fixed")||Za(i)&&!s&&Xm(e,i))?o=o.filter(u=>u!==i):a=c,i=kr(i)}return t.set(e,o),o}function nk(e){let{element:t,boundary:r,rootBoundary:o,strategy:a}=e;const l=[...r==="clippingAncestors"?Ii(t)?[]:tk(t,this._c):[].concat(r),o],i=n1(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=n1(t,l[f],a);c=an(m.top,c),s=qr(m.right,s),u=qr(m.bottom,u),d=an(m.left,d)}return{width:s-d,height:u-c,x:d,y:c}}function rk(e){const{width:t,height:r}=Gm(e);return{width:t,height:r}}function ok(e,t,r){const o=ur(t),a=cr(t),l=r==="fixed",i=Ca(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const s=In(0);function u(){s.x=Oi(a)}if(o||!o&&!l)if((zo(t)!=="body"||Za(a))&&(c=Vi(t)),o){const f=Ca(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?Zm(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 _s(e){return $n(e).position==="static"}function r1(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 Km(e,t){const r=en(e);if(Ii(e))return r;if(!ur(e)){let a=kr(e);for(;a&&!Bo(a);){if(kn(a)&&!_s(a))return a;a=kr(a)}return r}let o=r1(e,t);for(;o&&Ww(o)&&_s(o);)o=r1(o,t);return o&&Bo(o)&&_s(o)&&!ju(o)?r:o||qw(e)||r}var ak=async function(e){const t=this.getOffsetParent||Km,r=this.getDimensions,o=await r(e.floating);return{reference:ok(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function lk(e){return $n(e).direction==="rtl"}var ik={convertOffsetParentRelativeRectToViewportRelativeRect:Xw,getDocumentElement:cr,getClippingRect:nk,getOffsetParent:Km,getElementRects:ak,getClientRects:Kw,getDimensions:rk,getScale:wo,isElement:kn,isRTL:lk},sk=Um,ck=Fm,uk=Hm,dk=zm,fk=(e,t,r)=>{const o=new Map,a={platform:ik,...r},l={...a.platform,_c:o};return Rm(e,t,{...a,platform:l})},mk={style:{display:"contents"}},pk=["aria-expanded"],hk=(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}=rl(),m=(0,n.computed)(()=>o.disablePlacement&&f.value),p=f,h=(0,n.computed)(()=>p.value?o.triggers.map(ue=>ue==="hover"?"click":ue):o.triggers),L=(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),v=(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 ue=o.referenceEl??i.value?.firstElementChild;if(!c.value||!ue||m.value)return;const ne=o.placement==="auto",{x:pe,y:ge}=await fk(ue,c.value,{placement:ne?void 0:o.placement,strategy:"fixed",middleware:[sk(4),...ne?[ck()]:[dk()],uk({padding:8})]});c.value&&(c.value.style.left=`${pe}px`,c.value.style.top=`${ge}px`)}function S(){return!!c.value?.matches(":popover-open")}async function k(){if(o.disabled||S()||(d.value=i.value?.closest("dialog[open]")??"body",o.showGroup&&_.has(o.showGroup)&&_.get(o.showGroup).forEach(ne=>ne()),await(0,n.nextTick)(),!c.value))return;c.value.dataset.bglId=u;const ue=i.value?.closest("[data-bgl-id]");ue?.dataset.bglId?c.value.dataset.bglOwner=ue.dataset.bglId:delete c.value.dataset.bglOwner,c.value.style.opacity="0",c.value.showPopover(),await w(),c.value.style.opacity="",s&&(F(),s=!1)}function E(ue){S()&&((ue?.restoreFocus??!0)&&!o.noAutoFocus&&i.value?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')?.focus(),c.value?.hidePopover())}const M=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function V(){return c.value?Array.from(c.value.querySelectorAll(M)).filter(ue=>ue.offsetParent!==null||ue===document.activeElement):[]}function A(ue){const ne=V();ne.length!==0&&ne[(ue+ne.length)%ne.length]?.focus()}function F(){o.noAutoFocus||A(0)}function R(ue){const ne=V();if(ne.length===0)return;const pe=ne.indexOf(document.activeElement);switch(ue.key){case"ArrowDown":ue.preventDefault(),A(pe<0?0:pe+1);break;case"ArrowUp":ue.preventDefault(),A(pe<0?ne.length-1:pe-1);break;case"Home":ue.preventDefault(),A(0);break;case"End":ue.preventDefault(),A(ne.length-1);break}}const N=k;function G(){E()}(0,n.watch)(l,ue=>{ue&&!S()?k():!ue&&S()&&E()});function H(ue){ue.newState==="open"?(l.value=!0,(0,n.nextTick)(w),a("show")):(l.value=!1,a("hide"))}function $(ue){if(!o.autoHide||!S())return;const ne=ue.target;if(c.value?.contains(ne)||i.value?.contains(ne)||o.referenceEl instanceof Node&&o.referenceEl.contains(ne))return;const pe=document.querySelectorAll("[popover]:popover-open"),ge=c.value?.dataset.bglId;for(const Le of Array.from(pe))if(Le!==c.value&&Le.contains(ne)&&ge&&Le.dataset.bglOwner===ge)return;E({restoreFocus:!1})}Ki(()=>E(),()=>S());let D,q;function j(){clearTimeout(D),clearTimeout(q)}let X=0;function W(ue){const ne=Date.now();ne-X<50||(X=ne,s=ue,S()?E():k())}function C(ue){L.value&&W(!!ue&&ue.detail===0)}function I(ue){switch(ue.key){case"Enter":case" ":case"Spacebar":ue.preventDefault(),W(!0);break;case"ArrowDown":ue.preventDefault(),s=!0,S()?A(0):k();break;case"ArrowUp":ue.preventDefault(),s=!0,S()?A(-1):k();break}}function P(){y.value&&(clearTimeout(q),D=setTimeout(k,b.value.show))}function B(){y.value&&(clearTimeout(D),q=setTimeout(()=>E({restoreFocus:!1}),b.value.hide))}function z(){g.value&&clearTimeout(q)}function K(){g.value&&(q=setTimeout(()=>E({restoreFocus:!1}),b.value.hide))}function te(){S()&&w()}return(0,n.onMounted)(()=>{document.addEventListener("pointerdown",$,!0),document.addEventListener("scroll",te,{capture:!0,passive:!0}),o.showGroup&&(_.has(o.showGroup)||_.set(o.showGroup,new Set),_.get(o.showGroup).add(E)),l.value&&k()}),(0,n.onBeforeUnmount)(()=>{document.removeEventListener("pointerdown",$,!0),document.removeEventListener("scroll",te,!0),j(),o.showGroup&&_.get(o.showGroup)?.delete(E),S()&&c.value?.hidePopover()}),t({show:N,hide:G,shown:l}),(ue,ne)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",mk,[e.referenceEl?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",(0,n.mergeProps)({key:0,ref_key:"triggerWrapRef",ref:i},ue.$attrs,{"aria-haspopup":"menu","aria-expanded":l.value,"aria-controls":u,onMouseenter:P,onMouseleave:B,onFocus:P,onBlur:B,onKeydown:I}),[(0,n.renderSlot)(ue.$slots,"trigger",{show:(0,n.unref)(N),hide:G,shown:l.value},()=>[(0,n.createVNode)((0,n.unref)(oe),{class:(0,n.normalizeClass)(e.triggerClass),iconEnd:e.iconEnd,icon:v.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,pk)),((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":"var(--bgl-card-border-radius)"},onToggle:H,onMouseenter:z,onMouseleave:K,onFocus:z,onBlur:K,onKeydown:R},[ne[0]||(ne[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":"var(--bgl-card-border-radius)"}},[(0,n.renderSlot)(ue.$slots,"default",{hide:G,show:(0,n.unref)(N),shown:l.value})],2)],34)],8,["to"]))]))}}),Dt=hk,gk={key:0,class:"bgl-empty-icon flex-center"},vk={key:1,class:"bgl-empty-title m-0"},Lk={key:2,class:"bgl-empty-desc m-0"},yk={key:3,class:"bgl-empty-action"},bk=(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",gk,[(0,n.renderSlot)(a.$slots,"icon",{},()=>[(0,n.createVNode)((0,n.unref)(_e),{icon:e.icon,size:e.compact?1.6:2.2},null,8,["icon","size"])],!0)])):(0,n.createCommentVNode)("",!0),e.title?((0,n.openBlock)(),(0,n.createElementBlock)("p",vk,(0,n.toDisplayString)(e.title),1)):(0,n.createCommentVNode)("",!0),e.description||(0,n.unref)(o).default?((0,n.openBlock)(),(0,n.createElementBlock)("p",Lk,[(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",yk,[(0,n.renderSlot)(a.$slots,"action",{},()=>[(0,n.createVNode)(oe,{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))}}),qu=be(bk,[["__scopeId","data-v-6816911d"]]),_k={class:"px-1 pt-025 pb-1"},wk={class:"ms-1"},kk=(0,n.defineComponent)({__name:"FieldSetVue",props:{label:{},legend:{}},setup(e){return(t,r)=>((0,n.openBlock)(),(0,n.createElementBlock)("fieldset",_k,[(0,n.createElementVNode)("legend",wk,(0,n.toDisplayString)(e.legend||e.label),1),(0,n.renderSlot)(t.$slots,"default",{},void 0,!0)]))}}),$k=be(kk,[["__scopeId","data-v-7b2b7aa2"]]);function o1(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 Ek=["width","height"],Sk=["r","stroke","stroke-width"],Ck=["r","stroke","stroke-width","stroke-dasharray"],xk={class:"slot-content"},Tk=(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)(()=>o1(e.size)),r=(0,n.computed)(()=>`${e.duration}s`),o=(0,n.computed)(()=>o1(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,Sk),(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,Ck)],8,Ek)):((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",xk,[(0,n.renderSlot)(s.$slots,"default",{},void 0,!0)])],4)):(0,n.createCommentVNode)("",!0)],6))}}),Yr=be(Tk,[["__scopeId","data-v-89551186"]]),Nk={class:"bgl-kanban m_pt-075 gap-1 display-flex overflow-x min-h-0 min-w-0"},Bk=["onDragover","onDragleave","onDrop"],Mk={class:"bgl-kanban-head gap-05 px-025 flex"},Dk={key:1,class:"bgl-kanban-title txt13 semi"},Ak={class:"bgl-kanban-list column display-flex"},Pk=["draggable","onDragstart","onDrop","onClick"],Ik={class:"bgl-kanban-card display-flex column gap-05 border bg-box"},Vk={key:0,class:"bgl-kanban-card-title txt13 semi line-height-13"},Ok={key:1,class:"bgl-kanban-card-sub txt12 opacity-7"},Rk={key:2,class:"bgl-kanban-card-badges gap-025 display-flex flex-wrap"},Fk={key:3,class:"bgl-kanban-card-foot1 bg-red txt11 opacity-5 monospace"},zk={key:2,class:"bgl-kanban-foot"},Uk=(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(E=>({...E,items:E.items??[]}));const w=r.columnsDef??[],S=E=>String(i(E,r.groupBy)??""),k=new Map;for(const E of w)k.set(E.id,[]);for(const E of r.data??[]){const M=S(E);if(!k.has(M))if(!w.length)k.set(M,[]);else continue;k.get(M).push(E)}return w.length?w.map(E=>({...E,items:k.get(E.id)??[]})):[...k.entries()].map(([E,M])=>({id:E,title:E,items:M}))}),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 L(){m.value=null,p.value=null}function y(w,S){if(!r.draggable||!m.value)return;const{item:k,from:E}=m.value,M=S??w.items.length;o("move",{item:k,fromColumn:E,toColumn:w.id,newIndex:M}),L()}function g(w){return i(w,r.cardSchema?.title)}function v(w){return i(w,r.cardSchema?.subtitle)}function b(w){return i(w,r.cardSchema?.id)}function _(w){const S=[];for(const k of r.cardSchema?.badges??[]){const E=i(w,k);E==null||E===""||S.push(typeof E=="object"?E:{label:String(E)})}return S}return(w,S)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",Nk,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.value,k=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:k.id,class:(0,n.normalizeClass)(["bgl-kanban-col column display-flex",{"is-dragover":p.value===k.id}]),onDragover:(0,n.withModifiers)(E=>e.draggable&&(p.value=k.id),["prevent"]),onDragleave:E=>p.value===k.id&&(p.value=null),onDrop:E=>y(k)},[(0,n.createElementVNode)("div",Mk,[(0,n.renderSlot)(w.$slots,"column-header",{column:k,count:k.items.length},()=>[k.color?((0,n.openBlock)(),(0,n.createBlock)(vo,{key:0,dot:"",color:k.color,value:k.title,flat:"",sm:""},null,8,["color","value"])):((0,n.openBlock)(),(0,n.createElementBlock)("span",Dk,[k.icon?((0,n.openBlock)(),(0,n.createBlock)(vo,{key:0,icon:k.icon,flat:"",sm:"",value:k.title},null,8,["icon","value"])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createTextVNode)((0,n.toDisplayString)(k.title),1)],64))])),(0,n.createVNode)(vo,{soft:"",color:"gray",sm:"",value:String(typeof k.total=="number"?k.total:k.items.length),class:"ms-auto"},null,8,["value"])],!0)]),(0,n.createElementVNode)("div",Ak,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(k.items,(E,M)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:c(E),class:"bgl-kanban-card-wrap",draggable:e.draggable||void 0,onDragstart:V=>h(E,k.id),onDragend:L,onDrop:(0,n.withModifiers)(V=>y(k,M),["stop"]),onClick:V=>o("card-click",E,k.id)},[(0,n.renderSlot)(w.$slots,"card",{item:E,column:k},()=>[(0,n.createElementVNode)("div",Ik,[g(E)?((0,n.openBlock)(),(0,n.createElementBlock)("div",Vk,(0,n.toDisplayString)(g(E)),1)):(0,n.createCommentVNode)("",!0),v(E)?((0,n.openBlock)(),(0,n.createElementBlock)("div",Ok,(0,n.toDisplayString)(v(E)),1)):(0,n.createCommentVNode)("",!0),_(E).length?((0,n.openBlock)(),(0,n.createElementBlock)("div",Rk,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_(E),(V,A)=>((0,n.openBlock)(),(0,n.createBlock)(vo,{key:A,sm:"",soft:"",color:V.color||"gray",value:V.label},null,8,["color","value"]))),128))])):(0,n.createCommentVNode)("",!0),b(E)?((0,n.openBlock)(),(0,n.createElementBlock)("div",Fk,(0,n.toDisplayString)(b(E)),1)):(0,n.createCommentVNode)("",!0)])],!0)],40,Pk))),128)),!k.items.length&&!k.loading?((0,n.openBlock)(),(0,n.createBlock)(qu,{key:0,compact:"",icon:"inbox",title:e.emptyText,class:"bgl-kanban-empty py-075 opacity-5"},null,8,["title"])):(0,n.createCommentVNode)("",!0),k.loading?((0,n.openBlock)(),(0,n.createBlock)(Yr,{key:1,class:"bgl-kanban-loading p-1 display-flex justify-content-center"})):(0,n.createCommentVNode)("",!0),d(k)||a["column-footer"]?((0,n.openBlock)(),(0,n.createElementBlock)("div",zk,[(0,n.renderSlot)(w.$slots,"column-footer",{column:k},()=>[d(k)?((0,n.openBlock)(),(0,n.createBlock)(oe,{key:0,flat:"",thin:"",sm:"","full-width":"",icon:"expand_more",value:"Load more",disabled:k.loading,onClick:E=>f(k)},null,8,["disabled","onClick"])):(0,n.createCommentVNode)("",!0)],!0)])):(0,n.createCommentVNode)("",!0)])],42,Bk))),128))]))}}),Hk=be(Uk,[["__scopeId","data-v-720550c0"]]);function a1(e){return e===null?"null":typeof e=="string"?`"${e.replace(/"/g,'\\"')}"`:typeof e=="boolean"?e.toString():String(e)}function Xa(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;const s=a==="in"?"eq":"ne",u=a==="in"?"or":"and",d=c.map(f=>`${o} ${s} ${a1(f)}`).join(` ${u} `);t.push(c.length>1?`(${d})`:d)}else t.push(`${o} ${a} ${a1(l??null)}`)}return t.join(" ")}var Wk=class pn{parts=[];eq(t,r){return this.parts.push(`${t} eq ${pn.formatValue(r)}`),this}ne(t,r){return this.parts.push(`${t} ne ${pn.formatValue(r)}`),this}gt(t,r){return this.parts.push(`${t} gt ${pn.formatValue(r)}`),this}ge(t,r){return this.parts.push(`${t} ge ${pn.formatValue(r)}`),this}lt(t,r){return this.parts.push(`${t} lt ${pn.formatValue(r)}`),this}le(t,r){return this.parts.push(`${t} le ${pn.formatValue(r)}`),this}co(t,r){return this.parts.push(`${t} co ${pn.formatValue(r)}`),this}sw(t,r){return this.parts.push(`${t} sw ${pn.formatValue(r)}`),this}ew(t,r){return this.parts.push(`${t} ew ${pn.formatValue(r)}`),this}pr(t){return this.parts.push(`${t} pr`),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 pn;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 jk(e){const t=new Wk;return e&&e.length>0&&t.raw(Xa(e)),t}function Gk(e,t){return Xa(e.map((r,o)=>({field:r,op:"eq",value:t,connector:o>0?"or":void 0})))}function qk(e,t,r){return Xa([{field:e,op:"ge",value:t},{field:e,op:"le",value:r,connector:"and"}])}function Yk(e,t){return Xa(e.map((r,o)=>({field:r,op:"co",value:t,connector:o>0?"or":void 0})))}function Yu(e,t){if(!e)return!0;try{const r=xa(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=Zk(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;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 Zk(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}var Xk=["eq","ne","gt","ge","lt","le","co","sw","ew","pr","in","nin"],Kk=["and","or"];function Jk(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 xa(e){if(e==null||e.trim()==="")return[];const t=Qk(e);return Jm(t,0,t.length).conditions}function Jm(e,t,r){const o=[];let a=t;for(;a<r;){let l;if(o.length>0&&Kk.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=Jm(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(!Xk.includes(c))throw new Error(`Invalid operator: ${c}`);let s;if(c!=="pr"){if(a>=r)throw new Error(`Missing value for operator ${c}`);s=Jk(e[a++])}const u={field:i,op:c,value:s};l&&(u.connector=l),o.push(u)}return{conditions:o,endIndex:a}}function Qk(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==="("||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 e$={class:"p-025 bg-bg radius-1 mb-05 m_max-h-300px m_overflow m_border"},t$={key:0,class:"opacity-3 flex gap-05 p-025 min-w-450px m_min-0"},n$={class:""},r$={key:0,class:"w-fit"},o$={key:1},a$={class:"flex gap-1 space-between m_flex-wrap"},l$={class:"flex gap-05"},i$=(0,n.defineComponent)({__name:"FilterQuery",props:(0,n.mergeModels)({fields:{}},{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)(k([...a.value])),{$t:i}=rt(),c=(0,n.getCurrentInstance)(),s=(0,n.computed)(()=>!!c?.vnode.props?.onSave);function u(P){return!P.field||!P.op?!1:_(P.field)?P.value!==""&&P.value!=null:P.op==="pr"?!0:P.op==="in"||P.op==="nin"?Array.isArray(P.value)&&P.value.length>0:P.value!==""&&P.value!==null&&P.value!==void 0}const d=Gr(()=>{const P=S(l.value.filter(u));a.value=P,o("change",P)},400);let f=0;function m(){return`cond_${++f}_${Date.now()}`}const p=(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")},placeholders:{selectField:i("filter.placeholders.selectField"),selectOption:i("filter.placeholders.selectOption"),selectDate:i("filter.placeholders.selectDate"),enterValue:i("filter.placeholders.enterValue")},buttons:{addCondition:i("filter.buttons.addCondition"),clearAll:i("filter.buttons.clearAll")},boolean:{true:i("select.yes"),false:i("select.no")}})),h=new Map,L=(0,n.computed)(()=>(l.value||[]).map((P,B)=>(h.has(B)||h.set(B,m()),{id:h.get(B),field:P.field,operator:P.op,value:Array.isArray(P.value)?P.value.map(String):P.value===null?"null":P.value===void 0?"":String(P.value),connector:B>0?P.connector||"and":""}))),y=(0,n.computed)(()=>[{label:p.value.operators.eq,value:"eq"},{label:p.value.operators.ne,value:"ne"},{label:p.value.operators.gt,value:"gt"},{label:p.value.operators.ge,value:"ge"},{label:p.value.operators.lt,value:"lt"},{label:p.value.operators.le,value:"le"},{label:p.value.operators.co,value:"co"},{label:p.value.operators.sw,value:"sw"},{label:p.value.operators.ew,value:"ew"},{label:p.value.operators.pr,value:"pr"},{label:p.value.operators.in,value:"in"},{label:p.value.operators.nin,value:"nin"}]);function g(P,B,z){if(z&&B)return y.value.filter(K=>["in","nin","pr"].includes(K.value));if(B)return y.value.filter(K=>["eq","ne","pr"].includes(K.value));switch(P){case"boolean":return y.value.filter(K=>["eq","ne","pr"].includes(K.value));case"number":case"date":return y.value.filter(K=>["eq","ne","gt","ge","lt","le","pr"].includes(K.value));default:return y.value.filter(K=>["eq","ne","co","sw","ew","pr"].includes(K.value))}}function v(P){return r.fields.find(B=>B.value===P)}function b(P){return v(P)?.options}function _(P){const B=v(P);return!!(B?.queryOptions&&B.queryOptions.length>0)}function w(P){const B=v(P);return!!(B?.multiple&&B?.options)}function S(P){const B=[];for(const z of P){const K=v(z.field)?.queryOptions?.find(te=>te.value===z.value);if(K){const te=xa(K.query);te.length&&(te[0]={...te[0],connector:z.connector},B.push(...te))}else B.push(z)}return B}function k(P){const B=r.fields.filter(te=>te.queryOptions?.length);if(!B.length)return P;const z=[];let K=0;for(;K<P.length;){let te=!1;for(const ue of B){for(const ne of ue.queryOptions){const pe=xa(ne.query),ge=pe.length;if(!ge||K+ge>P.length)continue;const Le=P.slice(K,K+ge);if(Le.every((ce,ae)=>{const fe=pe[ae];return ce.field===fe.field&&ce.op===fe.op&&ce.value===fe.value&&(ae===0||ce.connector===fe.connector)})){z.push({field:ue.value,op:"eq",value:ne.value,connector:Le[0].connector}),K+=ge,te=!0;break}}if(te)break}te||(z.push(P[K]),K++)}return z}const E=(0,n.computed)(()=>[{label:p.value.boolean.true,value:"true"},{label:p.value.boolean.false,value:"false"}]);function M(P){return typeof P=="number"||typeof P=="boolean"||P===null?P:P==="true"?!0:P==="false"?!1:P==="null"?null:!Number.isNaN(Number(P))&&P.trim()!==""?Number(P):P}function V(P,B){const z=[...l.value],K=z[P];if(!K)return;const te={...K};B.field!==void 0&&(te.field=B.field),B.op!==void 0&&(te.op=B.op),B.value!==void 0&&(te.value=Array.isArray(B.value)?B.value:M(B.value)),B.connector!==void 0&&(te.connector=B.connector),z[P]=te,l.value=z,d()}function A(){const P=r.fields[0]?.value||"field",B=w(P),z={field:P,op:B?"in":"eq",value:B?[]:"",connector:a.value.length>0?"and":void 0};l.value=[...l.value,z]}function F(P){const B=[...l.value];B.splice(P,1),B.length>0&&B[0].connector&&(B[0]={...B[0],connector:void 0}),h.delete(P),l.value=B,d()}function R(){h.clear(),l.value=[],a.value=[],o("change",[])}function N(P){return r.fields.find(B=>B.value===P)?.type||"string"}function G(P){return P!=="pr"}function H(P){return P==="in"||P==="nin"}const $=(0,n.computed)(()=>L.value.filter(P=>!!P.field&&(P.operator==="pr"||!!P.value)).length);function D(P){return L.value.findIndex(B=>B.id===P)}function q(P,B){const z=D(P);if(z<0)return;const K=v(B);if(K?.queryOptions?.length){V(z,{field:B,op:"eq",value:""});return}const te=!!(K?.multiple&&K?.options),ue=g(K?.type||"string",!!K?.options,te);V(z,{field:B,op:te?"in":ue[0]?.value??"eq",value:te?[]:""})}function j(P,B){const z=D(P);if(z<0)return;const K=L.value[z],te=K?.operator==="in"||K?.operator==="nin",ue=B==="in"||B==="nin",ne={op:B};te&&!ue?ne.value="":!te&&ue&&(ne.value=[]),V(z,ne)}function X(P,B){const z=D(P);z>=0&&V(z,{value:B})}function W(P,B){const z=D(P);z>=0&&V(z,{value:B})}function C(P){return Array.isArray(P.value)?"":P.value}function I(P,B){const z=D(P);z>=0&&V(z,{connector:B})}return(P,B)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Dt),{flat:"",placement:"bottom-end",icon:"filter_alt",value:$.value>0?`${p.value.filter} (${$.value})`:p.value.filter,thin:""},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(Wn),{class:"p-05"},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",e$,[L.value.length===0?((0,n.openBlock)(),(0,n.createElementBlock)("div",t$,[(0,n.createVNode)((0,n.unref)(_e),{name:"info"}),(0,n.createElementVNode)("div",n$,(0,n.toDisplayString)(p.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)(L.value,(z,K)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:z.id,class:(0,n.normalizeClass)(["grid gap-025 align-items-center pt-025",{"":K>0&&z.connector==="or","pt-075 border-top-or":K>0&&z.connector==="or","first-filter-row":K===0,"filter-row":K>0}])},[K>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",r$,[(0,n.createVNode)((0,n.unref)(zt),{"model-value":z.connector||"and",options:[{label:p.value.connectors.and,value:"and"},{label:p.value.connectors.or,value:"or"}],class:"m-0 and-or-select txt-12","onUpdate:modelValue":te=>I(z.id,te)},null,8,["model-value","options","onUpdate:modelValue"])])):(0,n.createCommentVNode)("",!0),(0,n.createVNode)((0,n.unref)(zt),{"model-value":z.field,options:e.fields,placeholder:p.value.placeholders.selectField,class:"m-0 light-input borderHover",searchable:"","onUpdate:modelValue":te=>q(z.id,te)},null,8,["model-value","options","placeholder","onUpdate:modelValue"]),_(z.field)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(zt),{key:`${z.id}-${z.field}-qpreset`,"model-value":C(z),options:v(z.field).queryOptions,placeholder:p.value.placeholders.selectOption,class:"m-0 light-input borderHover",style:{"grid-column":"span 2"},"onUpdate:modelValue":te=>W(z.id,te)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[(0,n.createVNode)((0,n.unref)(zt),{"model-value":z.operator,options:g(N(z.field),!!b(z.field),w(z.field)),class:"m-0 light-input borderHover","onUpdate:modelValue":te=>j(z.id,te)},null,8,["model-value","options","onUpdate:modelValue"]),G(z.operator)?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[b(z.field)&&H(z.operator)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(zt),{key:`${z.id}-${z.field}-multi`,"model-value":Array.isArray(z.value)?z.value:[],options:b(z.field),placeholder:p.value.placeholders.selectOption,class:"m-0 light-input borderHover",searchable:"",multiselect:"","onUpdate:modelValue":te=>X(z.id,te)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):b(z.field)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(zt),{key:`${z.id}-${z.field}-single`,"model-value":z.value,options:b(z.field),placeholder:p.value.placeholders.selectOption,class:"m-0 light-input borderHover",searchable:"","onUpdate:modelValue":te=>X(z.id,te)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):N(z.field)==="boolean"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(zt),{key:`${z.id}-${z.field}-bool`,"model-value":z.value,options:E.value,placeholder:p.value.placeholders.selectOption,class:"m-0 light-input borderHover","onUpdate:modelValue":te=>X(z.id,te)},null,8,["model-value","options","placeholder","onUpdate:modelValue"])):N(z.field)==="date"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Ta),{key:`${z.id}-${z.field}-date`,"model-value":z.value,placeholder:p.value.placeholders.selectDate,class:"m-0 light-input borderHover","onUpdate:modelValue":te=>X(z.id,String(te))},null,8,["model-value","placeholder","onUpdate:modelValue"])):N(z.field)==="number"?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(He),{key:`${z.id}-${z.field}-number`,"model-value":z.value,placeholder:"0",type:"number",class:"m-0 light-input borderHover","onUpdate:modelValue":te=>X(z.id,te)},null,8,["model-value","onUpdate:modelValue"])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(He),{key:5,"model-value":z.value,placeholder:p.value.placeholders.enterValue,class:"m-0 light-input borderHover","onUpdate:modelValue":te=>X(z.id,te)},null,8,["model-value","placeholder","onUpdate:modelValue"]))],64)):((0,n.openBlock)(),(0,n.createElementBlock)("div",o$))],64)),(0,n.createVNode)((0,n.unref)(oe),{icon:"close",thin:"",flat:"",size:"sm",class:"m_bg-gray-40 m_px-3 m_mx-auto",onClick:te=>F(K)},null,8,["onClick"])],2))),128))]),_:1})]),(0,n.createElementVNode)("div",a$,[(0,n.createVNode)((0,n.unref)(oe),{icon:"add",flat:"",thin:"",value:p.value.buttons.addCondition,onClick:A},null,8,["value"]),(0,n.createElementVNode)("div",l$,[L.value.length>0?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:0,icon:"delete_sweep",flat:"",thin:"",color:"gray",value:p.value.buttons.clearAll,onClick:R},null,8,["value"])):(0,n.createCommentVNode)("",!0),s.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:1,disabled:L.value.length===0,class:"color-green",icon:"save",thin:"",color:"green-light",value:(0,n.unref)(i)("filter.buttons.save"),onClick:B[0]||(B[0]=z=>o("save",l.value.filter(u)))},null,8,["disabled","value"])):(0,n.createCommentVNode)("",!0)])])]),_:1})]),_:1},8,["value"]))}}),s$=i$,c$=(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))}}),Bc=be(c$,[["__scopeId","data-v-9f07b0be"]]),u$={class:"floating-panel"},d$={class:"floating-panel-box"},f$={class:"floating-panel-controls flex align-items-center gap-025 p-025 border-bottom"},m$={class:"floating-panel-body"},p$=(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)(oe,{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",u$,[(0,n.createElementVNode)("div",d$,[(0,n.createElementVNode)("div",f$,[(0,n.renderSlot)(i.$slots,"controls",{close:()=>l(!1)},()=>[(0,n.createVNode)(oe,{icon:"remove",flat:"",thin:"",size:"xs",class:"ms-auto",onClick:c[1]||(c[1]=s=>l(!1))})],!0)]),(0,n.createElementVNode)("div",m$,[(0,n.renderSlot)(i.$slots,"default",{close:()=>l(!1)},void 0,!0)])])],512),[[n.vShow,a.value]])]),_:3})],64))}}),h$=be(p$,[["__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 g$={key:0,class:"txt12 txt-gray-90 mb-025 block"},v$={key:1,class:"helptext"},L$={class:"border radius-1 overflow-hidden"},y$={class:"grid gap-0 grid-array-line align-items-center pe-025 hover"},b$={key:1},_$={class:"flex align-items-center gap-05 w-100p overflow-hidden"},w$=["src"],k$={class:"ellipsis-1"},$$={key:0,class:"array-input-row grid align-items-center px-05"},E$=(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(A=>A!=null&&A!=="")),f=(0,n.computed)(()=>{const A=$e(r.itemLabel);return typeof A=="string"&&A.length>0?A: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(A){return!A.includes("<")&&!A.includes("&")?A.trim():(new DOMParser().parseFromString(A,"text/html").body.textContent||"").replace(/\s+/g," ").trim()}function L(A){if(typeof A=="string"&&A.trim().length>0){const F=h(A);return F.length>0?F:null}if(A!=null&&typeof A=="object")for(const F of m){const R=A[F];if(typeof R=="string"&&R.trim().length>0){const N=h(R);if(N.length>0)return N}}return null}function y(A){if(A!=null&&typeof A=="object")for(const F of p){const R=A[F];if(typeof R=="string"&&R.trim().length>0)return R.trim()}return null}function g(A){const F=L(s.value[A]);return F!=null?`${A+1}. ${F}`:`${f.value} ${A+1}`}(0,n.watch)(()=>r.modelValue,A=>{Array.isArray(A)&&(s.value=[...A],u.value.length!==A.length&&(u.value=Array.from({length:A.length},(F,R)=>u.value[R]??!0)))});function v(){const A=r.createItem?r.createItem():{};s.value.push(A),u.value.push(!1),k()}function b(A){s.value.splice(A,1),u.value.splice(A,1),k()}function _(A){u.value[A]=!u.value[A]}function w(A,F){if(F<0||F>=s.value.length||A===F)return;const[R]=s.value.splice(A,1);s.value.splice(F,0,R);const[N]=u.value.splice(A,1);u.value.splice(F,0,N),k()}function S(A){w(A.oldIndex,A.newIndex)}function k(){l("update:modelValue",[...s.value])}function E(A,F){s.value[F]=A,k()}const M=(0,n.computed)(()=>{if(r.simple)return!0;if(!i.default)return!1;const A=(0,n.computed)({get:()=>{},set:()=>{}});return i.default({item:A,index:0}).filter(F=>typeof F.type!="symbol").length===1});function V(A){return(0,n.computed)({get:()=>s.value[A],set:F=>{E(F,A)}})}return(A,F)=>{const R=(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",g$,(0,n.toDisplayString)((0,n.unref)($e)(e.label)),1)):(0,n.createCommentVNode)("",!0),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",v$,(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,G)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:G,class:(0,n.normalizeClass)(["array-input-row grid align-items-center",{simpleArray:M.value,"pb-1":!M.value}])},[(0,n.renderSlot)(A.$slots,"default",{item:V(G),index:G}),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)(oe),{flat:"",icon:"delete",onClick:H=>b(G)},null,8,["onClick"]),[[R,(0,n.unref)($e)(e.deleteTooltip||"Delete")]])],2)):(0,n.createCommentVNode)("",!0)],2))),128)),e.collapsible?((0,n.openBlock)(),(0,n.createBlock)(Pm,{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",L$,[(0,n.createElementVNode)("div",y$,[e.allowReorder?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:0,flat:"",thin:"",icon:"drag_indicator",class:"grab"},null,512)),[[R,(0,n.unref)($e)("Drag to reorder")]]):((0,n.openBlock)(),(0,n.createElementBlock)("div",b$)),(0,n.createVNode)((0,n.unref)(oe),{"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:G=>_(N)},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)("div",_$,[y(s.value[N])?((0,n.openBlock)(),(0,n.createElementBlock)("img",{key:0,src:(0,n.unref)(ln)(y(s.value[N])),class:"array-item-thumb",onError:F[0]||(F[0]=G=>G.target.style.display="none")},null,40,w$)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("p",k$,(0,n.toDisplayString)(g(N)),1)])]),_:2},1032,["icon","onClick"]),e.allowDelete?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:2,flat:"",icon:"delete",thin:"",confirm:(0,n.unref)($e)("Are you sure you want to delete this item?"),onClick:G=>b(N),"icon-size":"0.8"},null,8,["confirm","onClick"])),[[R,(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",$$,[(0,n.renderSlot)(A.$slots,"default",{item:V(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)(oe),{key:4,class:"radius-1",thin:"",icon:"add",value:(0,n.unref)($e)(e.addText||"Add"),onClick:v},null,8,["value"])):(0,n.createCommentVNode)("",!0)],6)}}}),fo=E$,S$={class:"primary-checkbox"},C$=(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",S$,[(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]])]))}}),x$=be(C$,[["__scopeId","data-v-2e5bdc80"]]),T$=["title"],N$=["id","disabled","value","required"],B$=["for"],M$=(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,N$),[[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,B$)],14,T$))}}),Bt=be(M$,[["__scopeId","data-v-aca51122"]]);function D$(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 du(h),i(h),o.value=p}catch{o.value="atom-one-dark";const L=l(o.value);await du(L),i(L)}},s=async m=>{const p=a(m);p!==o.value&&await c(p)},u=async()=>{if(!r.value)try{await al("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/highlight.min.js",{id:"hljs-cdn"});const m=await Ia("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,L=!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:L})).value||d(m)}catch{return d(m)}}}}var A$={key:0,class:"label"},P$={class:"editor-content-papa"},I$={class:"code-display"},V$=["innerHTML"],O$={key:0,class:"code-placeholder"},R$=["value"],F$=(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},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:L}=D$(r.theme),y=(0,n.computed)(()=>{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)}),v=(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(k.key!=="Tab")return;k.preventDefault();const E=k.target,M=E.selectionStart,V=E.selectionEnd;if(s.value=`${s.value.substring(0,M)} ${s.value.substring(V)}`,i.value)try{o("update:modelValue",JSON.parse(s.value))}catch{o("update:modelValue",s.value)}else o("update:modelValue",s.value);setTimeout(()=>{E.selectionStart=M+2,E.selectionEnd=M+2},0)}(0,n.onMounted)(async()=>{await p()}),(0,n.watch)(()=>r.theme,k=>{L(k)});function w(){const k=c(r.modelValue);k!==s.value&&(s.value=k)}function S(){f.value=!1,w()}return(0,n.watch)(()=>r.modelValue,()=>{f.value||w()},{immediate:!0}),(k,E)=>((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,"has-value":u.value}]]),style:(0,n.normalizeStyle)([{height:y.value},(0,n.unref)(l)])},[e.label?((0,n.openBlock)(),(0,n.createElementBlock)("label",A$,(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"])},[(0,n.createElementVNode)("div",P$,[(0,n.createElementVNode)("pre",I$,[(0,n.createElementVNode)("code",{innerHTML:v.value},null,8,V$)]),e.placeholder&&!u.value?((0,n.openBlock)(),(0,n.createElementBlock)("pre",O$,(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:E[0]||(E[0]=M=>f.value=!0),onBlur:S},null,40,R$)):(0,n.createCommentVNode)("",!0)])],2)):(0,n.createCommentVNode)("",!0)],6))}}),Zu=be(F$,[["__scopeId","data-v-16c5ab1c"]]),z$=["title"],U$=["id","placeholder","required"],H$=["placeholder"],W$=(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,U$),[[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,H$)),[[n.vModelText,s.value]]),(0,n.createVNode)((0,n.unref)(oe),{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,z$))}}),Bn=W$;const l1=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/,i1=/^\d{4}-\d{2}-\d{2}$/;let ta=(function(e){return e.REGULAR="regular",e.SHORTENED="shortened",e.FLEXIBLE="flexible",e})({}),s1=(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 j$=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=l1.test(e.time.start)&&l1.test(e.time.end),o=i1.test(e.time.start)&&i1.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===ta.FLEXIBLE){const r=t.setHourInDateTimeString(t.addDaysToDateTimeString(1,t.dateStringFrom(e.time.start)),Qm.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 ei=(function(e){return e.SUNDAY="sunday",e.MONDAY="monday",e})({});var Qm=class Mc{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=ei.MONDAY,r=null,o={start:0,end:2400}){this.FIRST_DAY_OF_WEEK=t,this.CALENDAR_LOCALE=r||j$.getBrowserNavigatorLocale(),this.DAY_START=o.start,this.DAY_END=o.end,this.HOURS_PER_DAY=(()=>{const a=Mc.getHourFromTimePoints(this.DAY_END),l=Mc.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?ta.REGULAR:this.DAY_START>=this.DAY_END?ta.FLEXIBLE:ta.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=s1.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!==ta.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===s1.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)}},G$={class:"calendar-section m_border-none px-05 pb-05 pt-025 m_p-0"},q$={class:"flex space-between pb-1"},Y$={class:"flex gap-05"},Z$={class:"month-year"},X$={key:0,class:"calendar-grid grid gap-025"},K$=["disabled","onClick","onMouseenter"],J$={key:1,class:"month-grid grid gap-05 p-05"},Q$={key:2,class:"year-grid grid gap-05 p-0"},eE={key:0,class:"time-picker border-start flex column gap-1 w-120px px-025"},tE={class:"flex gap-025"},nE=(0,n.defineComponent)({__name:"DatePicker",props:{modelValue:{},min:{},max:{},mode:{default:()=>({mode:"day"})},firstDayOfWeek:{default:ei.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 Qm(r.firstDayOfWeek,r.locale);function f(ce){if(!ce)return null;const ae=typeof ce=="string"?new Date(ce):ce;return Number.isNaN(ae.getTime())?null:ae}function m(){return{isDateDisabled:U=>{if(!U)return!0;const Y=f(r.min),ie=f(r.max);if(Y&&U<Y||ie&&U>ie||Array.isArray(i.value)&&i.value.length>0&&i.value.some(he=>{const Ne=f(he);return Ne?U.getFullYear()===Ne.getFullYear()&&U.getMonth()===Ne.getMonth()&&U.getDate()===Ne.getDate():!1}))return!0;if(Array.isArray(c.value)&&c.value.length>0){const he=`${U.getFullYear()}-${String(U.getMonth()+1).padStart(2,"0")}-${String(U.getDate()).padStart(2,"0")}`;if(!c.value.some(Ne=>typeof Ne=="string"?Ne===he:Ne.getFullYear()===U.getFullYear()&&Ne.getMonth()===U.getMonth()&&Ne.getDate()===U.getDate()))return!0}return!1},isMonthDisabled:(U,Y)=>{const ie=f(r.min),he=f(r.max),Ne=new Date(U,Y+1,0),Ze=new Date(U,Y,1);return!!(ie&&Ne<new Date(ie.getFullYear(),ie.getMonth(),ie.getDate())||he&&Ze>new Date(he.getFullYear(),he.getMonth(),he.getDate()))},isYearDisabled:U=>{const Y=f(r.min),ie=f(r.max);return!!(Y&&U<Y.getFullYear()||ie&&U>ie.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:L,isYearDisabled:y}=m(),{selectedDate:g,rangeStart:v,rangeEnd:b}=p();function _(ce,ae){return!ce||!ae?!1:ce.getFullYear()===ae.getFullYear()&&ce.getMonth()===ae.getMonth()&&ce.getDate()===ae.getDate()}function w(){const ce=(0,n.computed)(()=>{const ke=s.value.getFullYear(),Me=s.value.getMonth(),ze=d.getCalendarMonthSplitInWeeks(ke,Me);for(;ze.length<6;){const ct=ze[ze.length-1],tt=ct[ct.length-1],Vt=new Date(tt.getFullYear(),tt.getMonth(),tt.getDate()+1),Tr=d.getCalendarWeekDateObjects(Vt);ze.push(Tr)}return ze.flat()}),ae=(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()}})),fe=(0,n.computed)(()=>Array.from({length:12},(ke,Me)=>{const ze=new Date(ae.value.year,Me,1);return{name:d.getLocalizedNameOfMonth(ze,"short"),value:Me,disabled:L(ae.value.year,Me)}})),U=(0,n.computed)(()=>{const ke=ae.value.year-10;return Array.from({length:18},(Me,ze)=>({value:ke+ze,disabled:y(ke+ze)}))}),Y=(0,n.computed)(()=>{const ke=new Date;return ke.setDate(ke.getDate()-ke.getDay()+(r.firstDayOfWeek===ei.MONDAY?1:0)),Array.from({length:7},(Me,ze)=>{const ct=new Date(ke);return ct.setDate(ke.getDate()+ze),d.getLocalizedNameOfWeekday(ct,"short")})}),ie=ke=>ke?r.range?_(ke,v.value)||_(ke,b.value):g.value?_(ke,g.value):!1:!1,he=(0,n.computed)(()=>b.value?b.value:v.value&&a.value?a.value:null);return{currentMonthDays:ce,currentMonthValue:ae,months:fe,years:U,weekDays:Y,isSelected:ie,isRangeStart:ke=>r.range&&_(ke,v.value),isRangeEnd:ke=>r.range&&_(ke,b.value),isInRange:ke=>{if(!r.range||!ke||!v.value)return!1;const Me=he.value;if(!Me)return!1;const ze=v.value<Me?v.value:Me,ct=v.value<Me?Me:v.value,tt=new Date(ke.getFullYear(),ke.getMonth(),ke.getDate()),Vt=new Date(ze.getFullYear(),ze.getMonth(),ze.getDate()),Tr=new Date(ct.getFullYear(),ct.getMonth(),ct.getDate());return tt>Vt&&tt<Tr},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 ze=f(Me);return ze?ke.getFullYear()===ze.getFullYear()&&ke.getMonth()===ze.getMonth()&&ke.getDate()===ze.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 k(){const ce=(0,n.computed)(()=>g.value?.getHours()??0),ae=(0,n.computed)(()=>g.value?.getMinutes()??0);return{hours:ce,minutes:ae,handleHourInput:Y=>{if(!g.value)return;const ie=new Date(g.value);ie.setHours(Y),E(ie)},handleMinuteInput:Y=>{if(!g.value)return;const ie=new Date(g.value);ie.setMinutes(Y),E(ie)}}}function E(ce){r.enableTime?o("update:modelValue",ce.toISOString()):o("update:modelValue",So.date(ce))}const{currentMonthDays:M,currentMonthValue:V,months:A,years:F,weekDays:R,isSelected:N,isRangeStart:G,isRangeEnd:H,isInRange:$,isToday:D,isNotInMonth:q,isHighlighted:j}=w(),{selectMonth:X,selectYear:W,previousMonth:C,nextMonth:I,previousYear:P,nextYear:B}=S(),{hours:z,minutes:K,handleHourInput:te,handleMinuteInput:ue}=k();function ne(ce){return So.date(ce)}function pe(ce){const ae=v.value,fe=b.value;if(!ae||fe){o("update:modelValue",{start:ne(ce),end:void 0});return}const U=ce<ae?ce:ae,Y=ce<ae?ae:ce;o("update:modelValue",{start:ne(U),end:ne(Y)}),a.value=null}function ge(ce){r.range&&ce&&(a.value=ce)}function Le(ce){if(ce){if(r.range){pe(ce);return}if(r.enableTime){const ae=new Date(ce.getFullYear(),ce.getMonth(),ce.getDate()),fe=g.value?.getHours()??new Date().getHours(),U=g.value?.getMinutes()??new Date().getMinutes();ae.setHours(fe),ae.setMinutes(U),E(ae)}else E(new Date(ce.getFullYear(),ce.getMonth(),ce.getDate()))}}return(ce,ae)=>((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",G$,[(0,n.createElementVNode)("div",q$,[u.value==="days"?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",icon:"chevron_left",onClick:(0,n.unref)(C)},null,8,["onClick"]),(0,n.createElementVNode)("div",Y$,[(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",class:"month-btn",onClick:ae[0]||(ae[0]=fe=>u.value="months")},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(V).formatted.month),1)]),_:1}),(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",class:"year-btn",onClick:ae[1]||(ae[1]=fe=>u.value="years")},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(V).formatted.year),1)]),_:1})]),(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",icon:"chevron_right",onClick:(0,n.unref)(I)},null,8,["onClick"])],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",icon:"chevron_left",onClick:(0,n.unref)(P)},null,8,["onClick"]),(0,n.createElementVNode)("span",Z$,(0,n.toDisplayString)((0,n.unref)(V).formatted.year),1),(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",icon:"chevron_right",onClick:(0,n.unref)(B)},null,8,["onClick"])],64))]),u.value==="days"?((0,n.openBlock)(),(0,n.createElementBlock)("div",X$,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(R),fe=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:fe,class:"txt-center txt-12 opacity-6"},(0,n.toDisplayString)(fe),1))),128)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(M),fe=>((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:fe?.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)(fe),"range-start":(0,n.unref)(G)(fe),"range-end":(0,n.unref)(H)(fe),"in-range":(0,n.unref)($)(fe),today:(0,n.unref)(D)(fe),disabled:(0,n.unref)(h)(fe),"not-in-month":(0,n.unref)(q)(fe),highlighted:(0,n.unref)(j)(fe)}]),disabled:(0,n.unref)(h)(fe),onClick:U=>Le(fe),onMouseenter:U=>ge(fe)},(0,n.toDisplayString)(fe?.getDate()),43,K$))),128))])):u.value==="months"?((0,n.openBlock)(),(0,n.createElementBlock)("div",J$,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(A),fe=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:fe.value,thin:"",flat:fe.value!==(0,n.unref)(V).month,disabled:fe.disabled,value:fe.name,onClick:U=>(0,n.unref)(X)(fe.value)},null,8,["flat","disabled","value","onClick"]))),128))])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Q$,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(F),fe=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:fe.value,thin:"",flat:fe.value!==(0,n.unref)(V).year,disabled:fe.disabled,value:fe.value.toString(),onClick:U=>(0,n.unref)(W)(fe.value)},null,8,["flat","disabled","value","onClick"]))),128))]))]),e.enableTime&&u.value==="days"?((0,n.openBlock)(),(0,n.createElementBlock)("div",eE,[(0,n.createElementVNode)("div",tE,[(0,n.createVNode)((0,n.unref)(Dn),{center:"",modelValue:(0,n.unref)(z),disabled:!(0,n.unref)(g),min:0,max:23,layout:"vertical",padZero:2,"onUpdate:modelValue":(0,n.unref)(te)},null,8,["modelValue","disabled","onUpdate:modelValue"]),ae[2]||(ae[2]=(0,n.createElementVNode)("p",{class:"pb-075"}," : ",-1)),(0,n.createVNode)((0,n.unref)(Dn),{center:"",modelValue:(0,n.unref)(K),disabled:!(0,n.unref)(g),min:0,max:59,padZero:2,layout:"vertical","onUpdate:modelValue":(0,n.unref)(ue)},null,8,["modelValue","disabled","onUpdate:modelValue"])])])):(0,n.createCommentVNode)("",!0)],2))}}),ep=be(nE,[["__scopeId","data-v-a4bc37e9"]]),rE={key:0,class:"label-text"},oE={key:0},ws=" - ",aE=(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:ei.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 L(N){if(t.range){const G=N??{},H=h(G.start),$=h(G.end);return!H&&!$?"":`${H}${ws}${$}`}return h(N)}function y(N){const G=new Date(N);if(!Number.isNaN(G.getTime()))return G;const H=N.split(/[/.-]/);if(H.length===3){const[$,D,q]=H.map(j=>Number.parseInt(j,10));if(!Number.isNaN($)&&!Number.isNaN(D)&&!Number.isNaN(q)){const j=new Date(q,D-1,$);if(j.getFullYear()===q&&j.getMonth()===D-1&&j.getDate()===$)return j}}return null}function g(N){return t.enableTime?N.toISOString():So.date(N)}function v(N){if(t.enableTime||t.range||N==null)return N;if(typeof N=="string"&&N.includes("T")){const G=/^(\d{4}-\d{2}-\d{2})/.exec(N)?.[1];if(G)return G;const H=new Date(N);if(!Number.isNaN(H.getTime()))return So.date(H)}return N instanceof Date?So.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()?L(i.value):"")}function w(N){const G=N.replace(/[^\d.]/g,"").split(".");let H=G.slice(0,3).join(".");return(H.length===2&&!H.includes(".")||H.length===5&&G.length===2)&&(H+="."),H}function S(N){const G=N.target;if(u.value=!0,t.range){k(G);return}const H=w(G.value);c.value=H,G.value!==H&&(G.value=H);const $=y(H);$!==null?(i.value=g($),s.value=!0):H.length===0?(i.value=void 0,s.value=!0):s.value=!1}function k(N){const[G="",H=""]=N.value.split(/\s*-\s*/,2),$=w(G),D=w(H),q=/-/.test(N.value),j=D||q?`${$}${ws}${D}`:$;c.value=j,N.value!==j&&(N.value=j);const X=G?y($):null,W=H?y(D):null;if(G&&!X||H&&!W){s.value=!1;return}if(s.value=!0,!X&&!W){i.value=void 0;return}let C=X,I=W;X&&W&&W<X&&(C=W,I=X),i.value={start:C?g(C):void 0,end:I?g(I):void 0}}function E(){f||(d.value=!0)}function M(){u.value=!1,c.value.length===0?(i.value=void 0,s.value=!0):b()?(c.value=L(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 V(N){const{key:G,shiftKey:H}=N;if(G==="Escape")d.value=!1,u.value=!1,c.value=b()?L(i.value):"",s.value=!0;else if(G==="Enter")u.value=!1,b()&&(c.value=L(i.value)),d.value=!1;else if(!t.range&&(G==="ArrowUp"||G==="ArrowDown")){N.preventDefault();const $=i.value!==void 0?new Date(i.value):new Date,D=G==="ArrowUp"?1:-1;H?$.setMonth($.getMonth()+D):$.setDate($.getDate()+D),i.value=g($),c.value=L($)}}function A(){d.value=!d.value}(0,n.watch)(()=>i.value,N=>{const G=v(N);if(G!==N){i.value=G;return}_()},{immediate:!0});const F=(0,n.computed)(()=>c.value.length>0),R=(0,n.computed)(()=>{const N=t.enableTime?"DD.MM.YY HH:mm":"DD.MM.YY";return t.range?`${N}${ws}${N}`:N});return Vb(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,G)=>((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":F.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",rE,[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)($e)(e.label||e.placeholder)),1),e.required?((0,n.openBlock)(),(0,n.createElementBlock)("span",oE," *")):(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)(He),{modelValue:c.value,"onUpdate:modelValue":G[0]||(G[0]=H=>c.value=H),iconStart:"calendar",placeholder:e.underlined?" ":(0,n.unref)($e)(e.placeholder)||R.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:E,onBlur:M,onClick:G[1]||(G[1]=(0,n.withModifiers)(()=>{},["stop"])),onKeydown:V,onIconClick:A},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:G[3]||(G[3]=(0,n.withModifiers)(()=>{},["stop"]))},[(0,n.createVNode)(ep,{modelValue:i.value,"onUpdate:modelValue":G[2]||(G[2]=H=>i.value=H),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))}}),Ta=aE;const lE=910,iE=1280,tp=["jpeg","png","webp","avif","apng","gif","avifs","svg","bmp","jpg","heic","heif","ico","cur","tif","tiff"],ti=new RegExp(`(${tp.join("|")})$`,"i"),np=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","ts","m3u8"],rp=new RegExp(`(${np.join("|")})$`,"i"),Vr=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/i;var sE=["title"],cE=["for"],uE={key:0,class:"label-text"},dE={key:0},fE={key:1,class:"flex"},mE={key:0,class:"helptext"},pE={key:2,class:"validating"},hE=["id","name","title","placeholder","disabled","required"],gE={key:0,class:"error-message"},vE=(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,L=(0,n.ref)();function y(N){if(N){if(!Vr.test(N))return c("email.invalidEmail");if(o.preventFakeEmails&&N.includes("@")){const[,G]=N.split("@");if(G){const H=G.toLowerCase();if(u.includes(H))return c("email.disposableEmail")}}if(m.value)return m.value}}const g=Gr(()=>{a("debounce",d.value)},700);function v(){if(!L.value||(L.value.setCustomValidity(""),!d.value))return;const N=y(d.value);typeof N=="string"&&L.value.setCustomValidity(N)}async function b(N){if(!(!o.serverValidate||!N||!Vr.test(N))){if(h.has(N)){h.get(N)||(m.value=c("email.invalidDomain"),L.value?.setCustomValidity(m.value));return}p.value=!0,m.value="";try{const G=await fetch(`https://api.mailcheck.ai/domain/${N.split("@")[1]}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!G.ok)throw new Error("Validation service unavailable");const H=await G.json(),$=H.status==="valid"||H.has_mx===!0;h.set(N,$),$?L.value?.setCustomValidity(""):(m.value=c("email.invalidDomain"),L.value?.setCustomValidity(m.value))}catch{}finally{p.value=!1}}}function _(N){if(!o.autocorrect||!N)return;if(N.includes("@")&&!N.includes(".")){const[D,q]=N.split("@"),j=q.toLowerCase();for(const X of s)if(X.startsWith(j)){f.value=`${D}@${X}`;return}}if(!N.includes("@"))return;const[G,H]=N.split("@"),$=H.toLowerCase();if(s.includes($)){f.value=null;return}for(const D of s)if(S($,D)<=2){f.value=`${G}@${D}`.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,G){const H=[];for(let $=0;$<=N.length;$++)H[$]=[$];for(let $=0;$<=G.length;$++)H[0][$]=$;for(let $=1;$<=N.length;$++)for(let D=1;D<=G.length;D++){const q=N[$-1]===G[D-1]?0:1;H[$][D]=Math.min(H[$-1][D]+1,H[$][D-1]+1,H[$-1][D-1]+q)}return H[N.length][G.length]}const k=Gr(()=>b(d.value),1e3);function E(){o.disabled||(f.value=null,v(),o.serverValidate&&k(),a("update:modelValue",d.value),g())}function M(N){_(d.value),o.serverValidate&&Vr.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,()=>{v()},{immediate:!0}),t({focus:()=>L.value?.focus(),hasFocus:()=>document.activeElement===L.value});const F=(0,n.computed)(()=>d.value.length>0),R=(0,n.computed)(()=>o.formatValidation?F.value?Vr.test(d.value)?"format-valid":"format-invalid":"format-empty":null);return(0,n.onMounted)(()=>{o.autofocus&&setTimeout(()=>L.value?.focus(),10)}),(N,G)=>{const H=(0,n.resolveDirective)("pattern");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["bagel-input text-input",[(0,n.unref)(l),R.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":F.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",uE,[(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",dE," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),e.underlined?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",fE,[e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("span",mE,(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",pE,(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:L,"onUpdate:modelValue":G[0]||(G[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:M,onFocus:G[1]||(G[1]=(...$)=>e.onFocus&&e.onFocus(...$)),onInput:E}),null,16,hE),[[n.vModelText,d.value],[H,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,cE),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",gE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],14,sE)}}}),Xu=be(vE,[["__scopeId","data-v-27dcfb77"]]),LE={class:"markdown-editor"},yE={key:0,class:"txt10 opacity-6 -mb-1 w100p txt-end"},bE={key:0,class:"flex justify-content-end -mt-025 -mb-05 ltr"},_E=(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(L){const y=f.value?.$el.querySelector("textarea"),g=d.value,v=y?.selectionStart??g.length,b=y?.selectionEnd??g.length,_=g.slice(0,v),w=g.slice(b),S=g.slice(v,b);let k="";switch(L){case"bold":k=`*${S||"bold"}*`;break;case"italic":k=`_${S||"italic"}_`;break;case"underline":k=`~${S||"underline"}~`;break;case"code":k=`\`${S||"code"}\``;break;case"pre":k=`\`\`\`${S||"pre"}\`\`\``;break;case"newline":k=`
|
|
20
|
-
`;break;default:k=""}d.value=_+k+w,(0,n.nextTick)(()=>{if(y){const E=_.length+k.length;y.setSelectionRange(E,E),y.focus()}})}return t({html:(0,n.computed)(()=>{let L=d.value.replace(/\{\{([^}]+)\}\}/g,(y,g)=>`{{${g.replace(/_/g,"#####")}}}`);return L=L.replace(/```([\s\S]+?)```/g,"<pre>$1</pre>"),L=L.replace(/`([^`]+)`/g,"<code>$1</code>"),L=L.replace(/\*([^*]+)\*/g,"<b>$1</b>"),L=L.replace(/_([^_]+)_/g,"<i>$1</i>"),L=L.replace(/~([^~]+)~/g,"<u>$1</u>"),L=L.replace(/\n/g,"<br>"),L=L.replace(/\{\{([^}]+)\}\}/g,(y,g)=>`{{${g.replace(/#####/g,"_")}}}`),L})}),(L,y)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",LE,[(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",yE,(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)(He),{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",bE,[(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"format_bold",onClick:y[1]||(y[1]=g=>h("bold"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"format_italic",onClick:y[2]||(y[2]=g=>h("italic"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"format_underlined",onClick:y[3]||(y[3]=g=>h("underline"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"code",onClick:y[4]||(y[4]=g=>h("code"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"notes",onClick:y[5]||(y[5]=g=>h("pre"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"keyboard_return",onClick:y[6]||(y[6]=g=>h("newline"))})])):(0,n.createCommentVNode)("",!0)]))}}),wE=be(_E,[["__scopeId","data-v-911cd1d1"]]),kE={key:0,class:"block"},$E={class:"label-text"},EE={key:0},SE={class:"input-icon-wrap flex-grow-1"},CE=["id","placeholder","disabled","required","pattern","onKeydown"],xE={key:2,class:"flex column spinner-btns"},TE={key:1,class:"helptext"},NE={key:0,class:"error-message"},BE=(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,k)=>S+k,0).toFixed(s()))}function d(..._){const w=_.map(k=>k||0),S=w.shift()||0;return Number.parseFloat(w.reduce((k,E)=>k-E,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 L=(0,n.computed)(()=>new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:e.useGrouping}));function y(_){if(Number.isNaN(_))return"";const[w,S]=L.value.format(_).split("."),k=w.replace(/,/g,"").length,E=e.padZero&&e.padZero>k?"0".repeat(e.padZero-k):"";return S?`${E}${w}.${S}`:`${E}${w}`}const g=(0,n.ref)("");function v(){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",kE,[(0,n.createElementVNode)("span",$E,[(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",EE," *")):(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)(oe),{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",SE,[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]=k=>g.value=k),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:v,onKeydown:[(0,n.withKeys)((0,n.withModifiers)(p,["prevent"]),["up"]),(0,n.withKeys)((0,n.withModifiers)(h,["prevent"]),["down"])]},null,42,CE),[[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",xE,[(0,n.createVNode)((0,n.unref)(oe),{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)(oe),{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)(oe),{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",TE,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0)]),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",NE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],6)}}}),Dn=be(BE,[["__scopeId","data-v-181dd2db"]]),ME=["value","autofocus","onKeydown","onPaste"],DE={key:0,class:"otp-error-message txt-center txt10 pt-05"},AE=(0,n.defineComponent)({__name:"OTP",props:{digitCount:{},default:{},modelValue:{},error:{},color:{},frame:{type:Boolean},outline:{type:Boolean},minWidth:{},maxWidth:{},labelColor:{},labelActiveColor:{}},emits:["update:modelValue","complete"],setup(e,{emit:t}){const r=e,{shellClass:o,shellStyle:a}=ht(r),l=(0,n.computed)(()=>{if(r.color)return/^[a-z-]+$/.test(r.color)?`var(--bgl-${r.color}, ${r.color})`:r.color}),i=(0,n.computed)(()=>{const L=l.value;return L?{...a.value,"--bgl-otp-digit-color":L}:a.value}),c=(0,n.computed)(()=>u.some(L=>L!==void 0&&L!=="")),s=t,u=(0,n.reactive)([]),d=(0,n.ref)();function f(L,y){L.preventDefault();const{clipboardData:g}=L,v=[...g?.getData("text").replaceAll(/\D/g,"")??""];if(v){for(let b=0;b<v.length;b++){const _=v[b];y+b<u.length&&(u[y+b]=_)}m()}}function m(){s("update:modelValue",u.join("")),h()&&s("complete",u.join(""))}function p(L,y){if(!["Tab","ArrowRight","ArrowLeft","Control","Shift","Alt","Meta"].includes(L.key)){if(["ArrowUp","ArrowDown"].includes(L.key)){L.preventDefault();return}if(L.key==="Backspace"){u[y]=void 0,y!==0&&(d.value?.children[y-1]).focus(),m();return}/^\d$/.test(L.key)&&(u[y]=L.key,y!==r.digitCount-1&&setTimeout(()=>{(d.value?.children[y+1]).focus()},10),m())}}if(r.default&&r.default.length===r.digitCount)for(let L=0;L<r.digitCount;L++)u[L]=r.default.charAt(L);else for(let L=0;L<r.digitCount;L++)u[L]=void 0;function h(){for(const L of u)if(L===void 0)return!1;return!0}return(L,y)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["otp-input",[(0,n.unref)(o),{"has-value":c.value}]]),style:(0,n.normalizeStyle)(i.value),tabindex:"-1"},[(0,n.createElementVNode)("div",{ref_key:"otpCont",ref:d,class:(0,n.normalizeClass)(["otp_wrap ltr",{"has-error":!!e.error}])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(u,(g,v)=>((0,n.openBlock)(),(0,n.createElementBlock)("input",{key:v,value:u[v]||"",type:"number",inputmode:"numeric",class:"digit-box",autofocus:v===0,maxlength:"1",pattern:"[0-9]*",oninput:"this.value = this.value.slice(0, 1)",onKeydown:b=>p(b,v),onPaste:b=>f(b,v),onKeyup:y[0]||(y[0]=(0,n.withModifiers)(()=>{},["prevent"]))},null,40,ME))),128))],2),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",DE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],6))}}),PE=be(AE,[["__scopeId","data-v-3aefabe5"]]),Dc=(e,t)=>e.push.apply(e,t),Mo=e=>e.sort((t,r)=>t.i-r.i||t.j-r.j),c1=e=>{const t={};let r=1;return e.forEach(o=>{t[o]=r,r+=1}),t},IE={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 VE=IE;var OE=1e4;var op=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,RE=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,FE=/^[A-Z\xbf-\xdf]+$/,ap=/^[^a-z\xdf-\xff]+$/,zE=/^[a-z\xdf-\xff]+$/,UE=/^[^A-Z\xbf-\xdf]+$/,HE=/[a-z\xdf-\xff]/,WE=/[A-Z\xbf-\xdf]/,jE=/[^A-Za-z\xbf-\xdf]/gi,GE=/^\d+$/,Ku=new Date().getFullYear(),qE={recentYear:/19\d\d|200\d|201\d|202\d/g},lp=[" ",",",";",":","|","/","\\","_",".","-"],YE=lp.length,ZE=class{match({password:e}){const t=[...this.getMatchesWithoutSeparator(e),...this.getMatchesWithSeparator(e)];return Mo(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-Ku);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(VE[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),XE=(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},KE=(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,L=-1;const y=s*32,g=Math.min(32,o)+y;for(let v=y;v<g;v++)Yn[e.charCodeAt(v)]|=1<<v;for(let v=0;v<r;v++){const b=Yn[t.charCodeAt(v)],_=l[v/32|0]>>>v&1,w=a[v/32|0]>>>v&1,S=b|h,k=((b|w)&L)+L^L|b|w;let E=h|~(k|L),M=L&k;E>>>31^_&&(l[v/32|0]^=1<<v),M>>>31^w&&(a[v/32|0]^=1<<v),E=E<<1|_,M=M<<1|w,L=M|~(S|E),h=E&S}for(let v=y;v<g;v++)Yn[e.charCodeAt(v)]=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 L=Yn[t.charCodeAt(h)],y=l[h/32|0]>>>h&1,g=a[h/32|0]>>>h&1,v=L|u,b=((L|g)&d)+d^d|L|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|~(v|_),u=_&v}for(let h=f;h<m;h++)Yn[e.charCodeAt(h)]=0;return p},JE=(e,t)=>{if(e.length<t.length){const r=t;t=e,e=r}return t.length===0?e.length:e.length<=32?XE(e,t):KE(e,t)},QE=(e,t,r)=>{const o=e.length<=t.length,a=e.length<=r;return o||a?Math.ceil(e.length/4):r},eS=(e,t,r)=>{let o=0;const a=Object.keys(t).find(l=>{const i=QE(e,l,r);if(Math.abs(e.length-l.length)>i)return!1;const c=JE(e,l),s=c<=i;return s&&(o=c),s});return a?{levenshteinDistance:o,levenshteinDistanceEntry:a}:{}},u1={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"]},ks={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"}},d1=class Ac{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 Ac([...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 Ac([...this.parents,t]))}hasChild(t){return this.children.has(t)}},f1=((e,t)=>(Object.entries(e).forEach(([r,o])=>{o.forEach(a=>{t.addSub(a,r)})}),t)),tS=class{constructor(){this.matchers={},this.l33tTable=u1,this.trieNodeRoot=f1(u1,new d1),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=ks,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=f1(e.l33tTable,new d1)),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(ks).forEach(r=>{if(r in e){const o=r;Object.keys(ks[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]=c1(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())}),c1(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 tS,nS=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}))}},rS=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}},oS=(e,t,r)=>new rS({substr:e,limit:t,trieRoot:r}).getAll(),aS=(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(", ")}},lS=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=oS(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=aS(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)}},iS=class{constructor(){this.l33t=new lS(this.defaultMatch),this.reverse=new nS(this.defaultMatch)}match({password:e}){return Mo([...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 L=u===0&&f===o-1;Ee.useLevenshteinDistance&&L&&!p&&t&&(h=eS(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}},sS=class{match({password:e,regexes:t=qE}){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})}}),Mo(r)}},Qr={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}},cS=(({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)}),uS=(({year:e,separator:t})=>{let r=Math.max(Math.abs(e-Ku),20)*365;return t&&(r*=4),r}),dS=e=>{const t=e.split(""),r=t.filter(i=>i.match(WE)).length,o=t.filter(i=>i.match(HE)).length;let a=0;const l=Math.min(r,o);for(let i=1;i<=l;i+=1)a+=Qr.nCk(r+o,i);return a},fS=(e=>{const t=e.replace(jE,"");if(t.match(UE)||t.toLowerCase()===t)return 1;const r=[op,RE,ap],o=r.length;for(let a=0;a<o;a+=1){const l=r[a];if(t.match(l))return 2}return dS(t)}),m1=(e,t)=>{let r=0,o=e.indexOf(t);for(;o>=0;)r+=1,o=e.indexOf(t,o+t.length);return r},mS=({sub:e,token:t})=>{const r=t.toLowerCase();return{subbedCount:m1(r,e.substitution),unsubbedCount:m1(r,e.letter)}},pS=(({l33t:e,subs:t,token:r})=>{if(!e)return 1;let o=1;return t.forEach(a=>{const{subbedCount:l,unsubbedCount:i}=mS({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+=Qr.nCk(i+l,u);o*=s}}),o}),hS=(({rank:e,reversed:t,l33t:r,subs:o,token:a,dictionaryName:l})=>{const i=e,c=fS(a),s=pS({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}}),gS=(({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)-Ku),20):0}),vS=(({baseGuesses:e,repeatCount:t})=>e*t),LS=(({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}),yS=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},bS=({token:e,graph:t,turns:r})=>{const o=Object.keys(Ee.graphs[t]).length,a=yS(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+=Qr.nCk(c-1,u-1)*o*a**u}return l},_S=(({graph:e,token:t,shiftedCount:r,turns:o})=>{let a=bS({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+=Qr.nCk(r+l,c);a*=i}}return Math.round(a)}),wS=(()=>YE),kS=(e,t)=>{let r=1;return e.token.length<t.length&&(e.token.length===1?r=10:r=50),r},p1={bruteforce:cS,date:uS,dictionary:hS,regex:gS,repeat:vS,sequence:LS,spatial:_S,separator:wS},$S=(e,t)=>p1[e]?p1[e](t):Ee.matchers[e]&&"scoring"in Ee.matchers[e]?Ee.matchers[e].scoring(t):0,ES=((e,t)=>{const r={};if("guesses"in e&&e.guesses!=null)return e;const o=kS(e,t),a=$S(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:Qr.log10(i)}}),Gt={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=ES(e,this.password);let a=o.guesses;t>1&&(a*=this.optimal.pi[o.i-1][t-1]);let l=Qr.factorial(t)*a;this.excludeAdditive||(l+=OE**(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}},Pc={mostGuessableMatchSequence(e,t,r=!1){Gt.password=e,Gt.excludeAdditive=r;const o=e.length;let a=Gt.fillArray(o,"array");t.forEach(s=>{a[s.j].push(s)}),a=a.map(s=>s.sort((u,d)=>u.i-d.i)),Gt.optimal={m:Gt.fillArray(o,"object"),pi:Gt.fillArray(o,"object"),g:Gt.fillArray(o,"object")};for(let s=0;s<o;s+=1)a[s].forEach(u=>{u.i>0?Object.keys(Gt.optimal.m[u.i-1]).forEach(d=>{Gt.update(u,parseInt(d,10)+1)}):Gt.update(u,1)}),Gt.bruteforceUpdate(s);const l=Gt.unwind(o),i=l.length,c=this.getGuesses(e,i);return{password:e,guesses:c,guessesLog10:Qr.log10(c),sequence:l}},getGuesses(e,t){const r=e.length;let o=0;return e.length===0?o=1:o=Gt.optimal.g[r-1][t],o}},SS=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=>Pc.mostGuessableMatchSequence(e,o).guesses):Pc.mostGuessableMatchSequence(e,r).guesses}},CS=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 zE.test(e)?(t="lower",r=26):FE.test(e)?(t="upper",r=26):GE.test(e)&&(t="digits",r=10),{sequenceName:t,sequenceSpace:r}}},xS=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];Dc(t,this.helper(e,o,r))}),Mo(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),L=d.length;for(let y=0;y<L;y+=1){const g=d[y];if(p+=1,g){const v=g.indexOf(h);if(v!==-1){f=!0,m=p,v===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}},TS=new RegExp(`[${lp.join("")}]`),NS=class Ic{static getMostUsedSeparatorChar(t){const r=[...t.split("").filter(a=>TS.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}
|
|
20
|
+
`;break;default:k=""}d.value=_+k+w,(0,n.nextTick)(()=>{if(y){const E=_.length+k.length;y.setSelectionRange(E,E),y.focus()}})}return t({html:(0,n.computed)(()=>{let L=d.value.replace(/\{\{([^}]+)\}\}/g,(y,g)=>`{{${g.replace(/_/g,"#####")}}}`);return L=L.replace(/```([\s\S]+?)```/g,"<pre>$1</pre>"),L=L.replace(/`([^`]+)`/g,"<code>$1</code>"),L=L.replace(/\*([^*]+)\*/g,"<b>$1</b>"),L=L.replace(/_([^_]+)_/g,"<i>$1</i>"),L=L.replace(/~([^~]+)~/g,"<u>$1</u>"),L=L.replace(/\n/g,"<br>"),L=L.replace(/\{\{([^}]+)\}\}/g,(y,g)=>`{{${g.replace(/#####/g,"_")}}}`),L})}),(L,y)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",LE,[(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",yE,(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)(He),{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",bE,[(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"format_bold",onClick:y[1]||(y[1]=g=>h("bold"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"format_italic",onClick:y[2]||(y[2]=g=>h("italic"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"format_underlined",onClick:y[3]||(y[3]=g=>h("underline"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"code",onClick:y[4]||(y[4]=g=>h("code"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"notes",onClick:y[5]||(y[5]=g=>h("pre"))}),(0,n.createVNode)((0,n.unref)(oe),{thin:"","icon-size":"0.9",flat:"",icon:"keyboard_return",onClick:y[6]||(y[6]=g=>h("newline"))})])):(0,n.createCommentVNode)("",!0)]))}}),wE=be(_E,[["__scopeId","data-v-911cd1d1"]]),kE={key:0,class:"block"},$E={class:"label-text"},EE={key:0},SE={class:"input-icon-wrap flex-grow-1"},CE=["id","placeholder","disabled","required","pattern","onKeydown"],xE={key:2,class:"flex column spinner-btns"},TE={key:1,class:"helptext"},NE={key:0,class:"error-message"},BE=(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,k)=>S+k,0).toFixed(s()))}function d(..._){const w=_.map(k=>k||0),S=w.shift()||0;return Number.parseFloat(w.reduce((k,E)=>k-E,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 L=(0,n.computed)(()=>new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:e.useGrouping}));function y(_){if(Number.isNaN(_))return"";const[w,S]=L.value.format(_).split("."),k=w.replace(/,/g,"").length,E=e.padZero&&e.padZero>k?"0".repeat(e.padZero-k):"";return S?`${E}${w}.${S}`:`${E}${w}`}const g=(0,n.ref)("");function v(){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",kE,[(0,n.createElementVNode)("span",$E,[(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",EE," *")):(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)(oe),{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",SE,[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]=k=>g.value=k),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:v,onKeydown:[(0,n.withKeys)((0,n.withModifiers)(p,["prevent"]),["up"]),(0,n.withKeys)((0,n.withModifiers)(h,["prevent"]),["down"])]},null,42,CE),[[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",xE,[(0,n.createVNode)((0,n.unref)(oe),{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)(oe),{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)(oe),{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",TE,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0)]),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",NE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],6)}}}),Dn=be(BE,[["__scopeId","data-v-181dd2db"]]),ME=["value","maxlength"],DE={key:0,class:"otp-error-message txt-center txt10 pt-05"},AE=(0,n.defineComponent)({__name:"OTP",props:{digitCount:{},default:{},modelValue:{},error:{},color:{},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=i.value;return g?{...l.value,"--bgl-otp-digit-color":g}:l.value}),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 v=(g??"").replace(/\D/g,"").slice(0,r.digitCount);v!==u.value&&(u.value=v)});const d=(0,n.computed)(()=>{const g=u.value.split("");return Array.from({length:r.digitCount},(v,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 v=g.replace(/\D/g,"").slice(0,r.digitCount);u.value=v,o("update:modelValue",v),v.length===r.digitCount&&o("complete",v)}function L(g){h(g.target.value)}function y(){s.value?.focus()}return(g,v)=>((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:L,onFocus:v[0]||(v[0]=b=>p.value=!0),onBlur:v[1]||(v[1]=b=>p.value=!1)},null,40,ME),((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",DE,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],6))}}),PE=be(AE,[["__scopeId","data-v-1866f3d1"]]),Dc=(e,t)=>e.push.apply(e,t),Mo=e=>e.sort((t,r)=>t.i-r.i||t.j-r.j),c1=e=>{const t={};let r=1;return e.forEach(o=>{t[o]=r,r+=1}),t},IE={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 VE=IE;var OE=1e4;var op=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,RE=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,FE=/^[A-Z\xbf-\xdf]+$/,ap=/^[^a-z\xdf-\xff]+$/,zE=/^[a-z\xdf-\xff]+$/,UE=/^[^A-Z\xbf-\xdf]+$/,HE=/[a-z\xdf-\xff]/,WE=/[A-Z\xbf-\xdf]/,jE=/[^A-Za-z\xbf-\xdf]/gi,GE=/^\d+$/,Ku=new Date().getFullYear(),qE={recentYear:/19\d\d|200\d|201\d|202\d/g},lp=[" ",",",";",":","|","/","\\","_",".","-"],YE=lp.length,ZE=class{match({password:e}){const t=[...this.getMatchesWithoutSeparator(e),...this.getMatchesWithSeparator(e)];return Mo(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-Ku);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(VE[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),XE=(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},KE=(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,L=-1;const y=s*32,g=Math.min(32,o)+y;for(let v=y;v<g;v++)Yn[e.charCodeAt(v)]|=1<<v;for(let v=0;v<r;v++){const b=Yn[t.charCodeAt(v)],_=l[v/32|0]>>>v&1,w=a[v/32|0]>>>v&1,S=b|h,k=((b|w)&L)+L^L|b|w;let E=h|~(k|L),M=L&k;E>>>31^_&&(l[v/32|0]^=1<<v),M>>>31^w&&(a[v/32|0]^=1<<v),E=E<<1|_,M=M<<1|w,L=M|~(S|E),h=E&S}for(let v=y;v<g;v++)Yn[e.charCodeAt(v)]=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 L=Yn[t.charCodeAt(h)],y=l[h/32|0]>>>h&1,g=a[h/32|0]>>>h&1,v=L|u,b=((L|g)&d)+d^d|L|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|~(v|_),u=_&v}for(let h=f;h<m;h++)Yn[e.charCodeAt(h)]=0;return p},JE=(e,t)=>{if(e.length<t.length){const r=t;t=e,e=r}return t.length===0?e.length:e.length<=32?XE(e,t):KE(e,t)},QE=(e,t,r)=>{const o=e.length<=t.length,a=e.length<=r;return o||a?Math.ceil(e.length/4):r},eS=(e,t,r)=>{let o=0;const a=Object.keys(t).find(l=>{const i=QE(e,l,r);if(Math.abs(e.length-l.length)>i)return!1;const c=JE(e,l),s=c<=i;return s&&(o=c),s});return a?{levenshteinDistance:o,levenshteinDistanceEntry:a}:{}},u1={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"]},ks={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"}},d1=class Ac{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 Ac([...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 Ac([...this.parents,t]))}hasChild(t){return this.children.has(t)}},f1=((e,t)=>(Object.entries(e).forEach(([r,o])=>{o.forEach(a=>{t.addSub(a,r)})}),t)),tS=class{constructor(){this.matchers={},this.l33tTable=u1,this.trieNodeRoot=f1(u1,new d1),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=ks,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=f1(e.l33tTable,new d1)),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(ks).forEach(r=>{if(r in e){const o=r;Object.keys(ks[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]=c1(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())}),c1(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 tS,nS=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}))}},rS=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}},oS=(e,t,r)=>new rS({substr:e,limit:t,trieRoot:r}).getAll(),aS=(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(", ")}},lS=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=oS(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=aS(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)}},iS=class{constructor(){this.l33t=new lS(this.defaultMatch),this.reverse=new nS(this.defaultMatch)}match({password:e}){return Mo([...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 L=u===0&&f===o-1;Ee.useLevenshteinDistance&&L&&!p&&t&&(h=eS(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}},sS=class{match({password:e,regexes:t=qE}){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})}}),Mo(r)}},Qr={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}},cS=(({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)}),uS=(({year:e,separator:t})=>{let r=Math.max(Math.abs(e-Ku),20)*365;return t&&(r*=4),r}),dS=e=>{const t=e.split(""),r=t.filter(i=>i.match(WE)).length,o=t.filter(i=>i.match(HE)).length;let a=0;const l=Math.min(r,o);for(let i=1;i<=l;i+=1)a+=Qr.nCk(r+o,i);return a},fS=(e=>{const t=e.replace(jE,"");if(t.match(UE)||t.toLowerCase()===t)return 1;const r=[op,RE,ap],o=r.length;for(let a=0;a<o;a+=1){const l=r[a];if(t.match(l))return 2}return dS(t)}),m1=(e,t)=>{let r=0,o=e.indexOf(t);for(;o>=0;)r+=1,o=e.indexOf(t,o+t.length);return r},mS=({sub:e,token:t})=>{const r=t.toLowerCase();return{subbedCount:m1(r,e.substitution),unsubbedCount:m1(r,e.letter)}},pS=(({l33t:e,subs:t,token:r})=>{if(!e)return 1;let o=1;return t.forEach(a=>{const{subbedCount:l,unsubbedCount:i}=mS({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+=Qr.nCk(i+l,u);o*=s}}),o}),hS=(({rank:e,reversed:t,l33t:r,subs:o,token:a,dictionaryName:l})=>{const i=e,c=fS(a),s=pS({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}}),gS=(({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)-Ku),20):0}),vS=(({baseGuesses:e,repeatCount:t})=>e*t),LS=(({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}),yS=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},bS=({token:e,graph:t,turns:r})=>{const o=Object.keys(Ee.graphs[t]).length,a=yS(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+=Qr.nCk(c-1,u-1)*o*a**u}return l},_S=(({graph:e,token:t,shiftedCount:r,turns:o})=>{let a=bS({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+=Qr.nCk(r+l,c);a*=i}}return Math.round(a)}),wS=(()=>YE),kS=(e,t)=>{let r=1;return e.token.length<t.length&&(e.token.length===1?r=10:r=50),r},p1={bruteforce:cS,date:uS,dictionary:hS,regex:gS,repeat:vS,sequence:LS,spatial:_S,separator:wS},$S=(e,t)=>p1[e]?p1[e](t):Ee.matchers[e]&&"scoring"in Ee.matchers[e]?Ee.matchers[e].scoring(t):0,ES=((e,t)=>{const r={};if("guesses"in e&&e.guesses!=null)return e;const o=kS(e,t),a=$S(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:Qr.log10(i)}}),Gt={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=ES(e,this.password);let a=o.guesses;t>1&&(a*=this.optimal.pi[o.i-1][t-1]);let l=Qr.factorial(t)*a;this.excludeAdditive||(l+=OE**(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}},Pc={mostGuessableMatchSequence(e,t,r=!1){Gt.password=e,Gt.excludeAdditive=r;const o=e.length;let a=Gt.fillArray(o,"array");t.forEach(s=>{a[s.j].push(s)}),a=a.map(s=>s.sort((u,d)=>u.i-d.i)),Gt.optimal={m:Gt.fillArray(o,"object"),pi:Gt.fillArray(o,"object"),g:Gt.fillArray(o,"object")};for(let s=0;s<o;s+=1)a[s].forEach(u=>{u.i>0?Object.keys(Gt.optimal.m[u.i-1]).forEach(d=>{Gt.update(u,parseInt(d,10)+1)}):Gt.update(u,1)}),Gt.bruteforceUpdate(s);const l=Gt.unwind(o),i=l.length,c=this.getGuesses(e,i);return{password:e,guesses:c,guessesLog10:Qr.log10(c),sequence:l}},getGuesses(e,t){const r=e.length;let o=0;return e.length===0?o=1:o=Gt.optimal.g[r-1][t],o}},SS=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=>Pc.mostGuessableMatchSequence(e,o).guesses):Pc.mostGuessableMatchSequence(e,r).guesses}},CS=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 zE.test(e)?(t="lower",r=26):FE.test(e)?(t="upper",r=26):GE.test(e)&&(t="digits",r=10),{sequenceName:t,sequenceSpace:r}}},xS=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];Dc(t,this.helper(e,o,r))}),Mo(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),L=d.length;for(let y=0;y<L;y+=1){const g=d[y];if(p+=1,g){const v=g.indexOf(h);if(v!==-1){f=!0,m=p,v===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}},TS=new RegExp(`[${lp.join("")}]`),NS=class Ic{static getMostUsedSeparatorChar(t){const r=[...t.split("").filter(a=>TS.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
21
|
])(${t})(?!${t})`,"g")}match({password:t}){const r=[];if(t.length===0)return r;const o=Ic.getMostUsedSeparatorChar(t);if(o===void 0)return r;const a=Ic.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}},BS=class{constructor(){this.matchers={date:ZE,dictionary:iS,regex:sS,repeat:SS,sequence:CS,spatial:xS,separator:NS}}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=>{Dc(t,l)}),r.push(a)):Dc(t,a)}),r.length>0?new Promise((o,a)=>{Promise.all(r).then(()=>{o(Mo(t))}).catch(l=>{a(l)})}):Mo(t)}},ip=1,sp=ip*60,cp=sp*60,up=cp*24,dp=up*31,h1=dp*12,$s={second:ip,minute:sp,hour:cp,day:up,month:dp,year:h1,century:h1*100},MS=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($s),a=o.findIndex(l=>e<$s[l]);return a>-1&&(t=o[a-1],a!==0?r=Math.round(e/$s[t]):t="ltSecond"),this.translate(t,r)}},DS=(()=>null),AS=(()=>({warning:Ee.translations.warnings.dates,suggestions:[Ee.translations.suggestions.dates]})),PS=(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},IS=(e,t)=>{let r=null;return t&&(r=Ee.translations.warnings.wordByItself),r},VS=(e,t)=>t?Ee.translations.warnings.namesByThemselves:Ee.translations.warnings.commonNames,OS=(e,t)=>{let r=null;const o=e.dictionaryName,a=o==="lastnames"||o.toLowerCase().includes("firstnames");return o==="passwords"?r=PS(e,t):o.includes("wikipedia")?r=IS(e,t):a?r=VS(e,t):o==="userInputs"&&(r=Ee.translations.warnings.userInputs),r},RS=((e,t)=>{const r=OS(e,t),o=[],a=e.token;return a.match(op)?o.push(Ee.translations.suggestions.capitalization):a.match(ap)&&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}}),FS=(e=>e.regexName==="recentYear"?{warning:Ee.translations.warnings.recentYears,suggestions:[Ee.translations.suggestions.recentYears,Ee.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]}),zS=(e=>{let t=Ee.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Ee.translations.warnings.simpleRepeat),{warning:t,suggestions:[Ee.translations.suggestions.repeated]}}),US=(()=>({warning:Ee.translations.warnings.sequences,suggestions:[Ee.translations.suggestions.sequences]})),HS=(e=>{let t=Ee.translations.warnings.keyPattern;return e.turns===1&&(t=Ee.translations.warnings.straightRow),{warning:t,suggestions:[Ee.translations.suggestions.longerKeyboardPattern]}}),WS=(()=>null),g1={warning:null,suggestions:[]},jS=class{constructor(){this.matchers={bruteforce:DS,date:AS,dictionary:RS,regex:FS,repeat:zS,sequence:US,spatial:HS,separator:WS},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 g1;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):g1}},fp=()=>new Date().getTime(),GS=(e,t,r)=>{const o=new jS,a=new MS,l=Pc.mostGuessableMatchSequence(t,e),i=fp()-r,c=a.estimateAttackTimes(l.guesses);return{calcTime:i,...l,...c,feedback:o.getFeedback(c.score,l.sequence)}},qS=(e,t)=>(t&&Ee.extendUserInputsDictionary(t),new BS().match(e)),YS=(e,t)=>{const r=fp(),o=qS(e,t);if(o instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return GS(o,e,r)},ZS={class:"m-password position-bottom-end flex column justify-content-center"},XS={key:0,class:"password-strength-container absolute start end -bottom-1-5"},KS={class:"password-strength-bar pointer overflow-hidden round"},JS=(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:L,...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:YS(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:L,suggestions:y}}=h;return[...L?[L]:[],...y].join(" ")});return(h,L)=>{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)(He),(0,n.mergeProps)({modelValue:a.value,"onUpdate:modelValue":L[0]||(L[0]=g=>a.value=g)},o.value,{type:c.value,class:"mb-0"}),null,16,["modelValue","type"]),(0,n.createElementVNode)("div",ZS,[(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",class:"mx-05",icon:i.value,onClick:L[1]||(L[1]=g=>l.value=!l.value)},null,8,["icon"])]),t.strengthMeter?((0,n.openBlock)(),(0,n.createElementBlock)("div",XS,[(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("div",KS,[(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)}}}),mp=JS;function sa(e){return e==null?"":typeof e=="object"?e.label??String(e.value??""):String(e)}function gr(e){if(e!=null)return typeof e=="object"?e.value:e}function Na(e){if(!(e==null||typeof e!="object"))return e.icon}function pp(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 QS=["aria-labelledby"],eC=["id"],tC={key:0},nC=["for"],rC=["id","disabled","tabindex","name","value","required"],oC=["src","alt"],aC={class:""},lC=["innerHTML"],iC={key:1,class:"txt-gray txt-12 m-0 pt-025"},sC=(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,k){const E=s.value===S.value;return d.value.some(M=>M.value===s.value)?E?0:-1:k===d.value.findIndex(M=>!(r.disabled||M.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=>pp(S))),f=(0,n.ref)(null),m=(0,n.ref)("90px");let p;function h(){const S=f.value,k=d.value.length;if(!r.inline||!S||!k)return;const E=Number.parseFloat(getComputedStyle(S).columnGap)||0,M=Math.max(1,Math.min(k,Math.floor((S.clientWidth+E)/(100+E)))),V=Math.ceil(k/M),A=Math.ceil(k/V);m.value=`calc((100% - ${E*(A-1)}px) / ${A})`}(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 L(){if(typeof r.options=="function")try{u.value=await r.options()}catch{u.value=[]}}(0,n.watch)(()=>r.options,()=>{u.value=[],L()},{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"})),v=(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,k)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(g.value),style:(0,n.normalizeStyle)(v.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",tC,"*")):(0,n.createCommentVNode)("",!0)],8,eC)):(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,(E,M)=>((0,n.openBlock)(),(0,n.createElementBlock)("label",{key:E.id||`${c.value}-${M}`,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||E.disabled}]),for:E.id||`${c.value}-${M}`,style:(0,n.normalizeStyle)({backgroundColor:e.bgColor,borderColor:e.borderColor})},[(0,n.withDirectives)((0,n.createElementVNode)("input",{id:E.id||`${c.value}-${M}`,"onUpdate:modelValue":k[0]||(k[0]=V=>s.value=V),disabled:e.disabled||E.disabled,tabindex:i(E,M),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:E.value,required:e.required,onFocus:b,onBlur:_,onChange:w},null,42,rC),[[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"&&E.imgSrc,"txt-end justify-content-end":e.textAlign==="right","txt-start justify-content-start":e.textAlign==="left"}]),style:(0,n.normalizeStyle)({color:e.textColor})},[E.imgSrc?((0,n.openBlock)(),(0,n.createElementBlock)("img",{key:0,class:"py-025 radius-05 m_w40 object-fit",height:"40",width:"40",src:E.imgSrc,alt:E.imgAlt||E.label||""},null,8,oC)):E.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:1,icon:E.icon,size:1},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",aC,[E.label?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:"m-0 m_txt-14 line-height-14",innerHTML:(0,n.unref)(H3)(E.label)},null,8,lC)):(0,n.createCommentVNode)("",!0),E.subLabel?((0,n.openBlock)(),(0,n.createElementBlock)("p",iC,(0,n.toDisplayString)(E.subLabel),1)):(0,n.createCommentVNode)("",!0)]),(0,n.renderSlot)(S.$slots,"radioItem",(0,n.mergeProps)({ref_for:!0},E),void 0,!0)],6),e.deletable?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(oe),{key:0,class:"ms-auto",flat:"",thin:"",icon:"delete",onClick:V=>S.$emit("delete",E)},null,8,["onClick"])):(0,n.createCommentVNode)("",!0)],14,nC))),128))],6)],14,QS))}}),hp=be(sC,[["__scopeId","data-v-af8bc932"]]),cC=["dir"],uC={key:0,class:"label"},dC={class:"range-slider relative w-100"},fC=["id","value","min","max","step","required","disabled","aria-label"],mC=["value","min","max","step","required","disabled"],pC={key:1,class:"txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05"},hC=(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)),L=(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 v=(0,n.computed)(()=>c?{insetInlineStart:`${L.value}%`,width:`${y.value-L.value}%`}:{insetInlineStart:"0",width:`${L.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",uC,(0,n.toDisplayString)((0,n.unref)($e)(r.label)),1)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",dC,[(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]=k=>g(+k.target.value,!0))},null,40,fC),(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]=k=>g(+k.target.value,!1))},null,40,mC)):(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)({...v.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":`${L.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",pC,[(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,cC))}}),Ju=be(hC,[["__scopeId","data-v-38ba2d44"]]),gC={key:0,class:"label-text"},vC={key:0},LC={class:"flex gap-05"},yC=["disabled"],bC={key:2,class:"ms-auto ps-05 me-05"},_C=["value"],wC={key:1,class:"error-message"},kC={key:0,class:"helptext"},$C=["aria-selected","onClick","onKeydown"],EC={class:"flex gap-05"},SC={class:"block"},CC={key:0,class:"selectinput-option opacity-3 pointer-events-none"},xC=(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=H=>typeof H=="function",s=(0,n.ref)(),u=(0,n.ref)(),d=(0,n.ref)([]),f=H=>gr(H),m=(0,n.computed)(()=>d.value.length),p=(0,n.ref)(""),h=(0,n.ref)(),L=(0,n.ref)(!1),y=(0,n.ref)(!1),g=(0,n.computed)(()=>$e(r.placeholder)??a("select.placeholder")),v=(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(H=>sa(H)).join(", ")}... +${m.value-4}`:d.value.map(H=>sa(H)).join(", ")),_=(0,n.computed)(()=>r.searchPlaceholder??b.value??a("select.search")),{results:w,isLoading:S}=zh({searchTerm:()=>p.value,serverSearch:c(r.options)?r.options:void 0,items:()=>Array.isArray(r.options)?r.options:[],keysToSearch:["label"],minChars:c(r.options)?0:2}),k=(0,n.ref)(-1),E=(0,n.ref)();function M(H){if(!y.value){y.value=!0,setTimeout(()=>{M(H)},210);return}H==="up"?k.value=k.value>0?k.value-1:w.value.length-1:H==="down"&&(k.value=k.value<w.value.length-1?k.value+1:0),setTimeout(()=>{const $=E.value?.children[k.value];$?$.focus():k.value=-1},10)}const V=H=>d.value.find($=>f(H)===f($))!==void 0;function A(){if(!E.value||m.value===0)return;const H=w.value.findIndex(D=>V(D));if(H===-1)return;const $=E.value.children[H];$&&$.scrollIntoView({block:"center",behavior:"instant"})}function F(){y.value=!0}function R(H){L.value=!0;const $=d.value.findIndex(q=>f(q)===f(H));if($>-1)d.value.splice($,1);else if(r.multiselect){const q=[...d.value];q.push(H),d.value=q}else d.value.splice(0,m.value,H);const D=document.activeElement;D&&E.value?.contains(D)&&D.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(H=>H!=null));else{const[H]=d.value;o("update:modelValue",f(H))}}function G(H,$){if(H.length!==$.length)return!1;const D=H.map(f).filter(j=>j!=null).map(String).sort(),q=$.map(f).filter(j=>j!=null).map(String).sort();return D.every((j,X)=>j===q[X])}return(0,n.watch)(()=>r.modelValue,H=>{if(r.multiselect){const $=Array.isArray(H)?H:H!=null?[H]:[];G($,d.value)||d.value.splice(0,m.value,...$)}else if(H==null)d.value.length>0&&(d.value=[]);else{const $=Array.isArray(H)?H[0]:H,D=Array.isArray(r.options)?r.options.find(q=>f(q)===f($))??$:$;D!=null&&!V(D)&&(d.value=[D])}},{immediate:!0}),(0,n.watch)(()=>y.value,H=>{H&&(k.value=-1,setTimeout(()=>{A()},10))}),(0,n.watch)(()=>r.options,()=>{const H=r.options;Array.isArray(H)&&d.value.forEach(($,D)=>{const q=H.find(j=>f(j)===f($));q===void 0?d.value.splice(D,1):d.value.splice(D,1,q)})},{deep:!0,immediate:!0}),(0,n.watch)(()=>w.value,H=>{c(r.options)&&H.length>0&&d.value.forEach(($,D)=>{const q=f($);if(typeof $!="object"||!$.label){const j=H.find(X=>f(X)===q);j!==void 0&&d.value.splice(D,1,j)}})},{deep:!0,immediate:!0}),(0,n.onMounted)(()=>{const H=r.options;if(r.modelValue==null&&r.defaultValue!==void 0&&Array.isArray(H)){const $=H.find(D=>f(D)===f(r.defaultValue));if($===void 0)return;d.value=[$]}}),(H,$)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(Dt),{ref_key:"dropdown",ref:h,shown:y.value,"onUpdate:shown":$[11]||($[11]=D=>y.value=D),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",gC,[(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",vC," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",LC,[e.searchable&&y.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(He),{key:0,ref_key:"searchInput",ref:s,modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=D=>p.value=D),class:"mb-0",placeholder:_.value,icon:"search",onInput:$[1]||($[1]=D=>L.value=!1),onClick:F,onKeydown:[$[2]||($[2]=(0,n.withKeys)((0,n.withModifiers)(D=>M("down"),["prevent"]),["down"])),$[3]||($[3]=(0,n.withKeys)((0,n.withModifiers)(D=>M("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},v.value]]),onClick:$[5]||($[5]=D=>y.value=!y.value),onKeydown:[$[6]||($[6]=(0,n.withKeys)((0,n.withModifiers)(D=>M("down"),["prevent"]),["down"])),$[7]||($[7]=(0,n.withKeys)((0,n.withModifiers)(D=>M("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",bC,[(0,n.createVNode)((0,n.unref)(oe),{flat:"",thin:"",icon:"clear",class:"color-gray",onClick:$[4]||($[4]=D=>{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,yC)),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,_C)):(0,n.createCommentVNode)("",!0)]),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",wC,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)]),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",kC,(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)(pa),{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:E,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),(D,q)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:`${String(f(D))}-${q}`,class:(0,n.normalizeClass)(["selectinput-option hover gap-1 align-items-center",{selected:V(D)}]),role:"option",tabindex:"0","aria-selected":V(D),onClick:j=>R(D),onKeydown:[(0,n.withKeys)(j=>R(D),["enter"]),$[8]||($[8]=(0,n.withKeys)((0,n.withModifiers)(j=>M("down"),["prevent"]),["down"])),$[9]||($[9]=(0,n.withKeys)((0,n.withModifiers)(j=>M("up"),["prevent"]),["up"]))]},[e.multiselect?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[V(D)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,size:1.1,icon:"select_check_box"})):(0,n.createCommentVNode)("",!0),V(D)?(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",EC,[(0,n.unref)(Na)(D)?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:0,icon:(0,n.unref)(Na)(D),size:1},null,8,["icon"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("span",SC,(0,n.toDisplayString)((0,n.unref)(sa)(D)),1)])],42,$C))),128)),(0,n.unref)(w).length===0?((0,n.openBlock)(),(0,n.createElementBlock)("p",CC," No options found ")):(0,n.createCommentVNode)("",!0)],2),(0,n.renderSlot)(H.$slots,"last",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["shown","placement","class","style"]))}}),zt=be(xC,[["__scopeId","data-v-a6b4cdd8"]]),TC=["title"],NC=["for"],BC={key:0,class:"label-text"},MC={key:0},DC=["id","name","title","autocomplete","type","placeholder","disabled","required","pattern"],AC=["id","name","title","type","rows","placeholder","disabled","required","pattern"],PC={key:0,class:"helptext"},IC={key:1,class:"error-message"},VC=(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},disabled:{type:Boolean},type:{default:"text"},nativeInputAttrs:{},icon:{},iconStart:{},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)();K3(()=>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=Gr(()=>{a("debounce",s.value)},700);function m(g=5){if(!o.autoheight||!u.value||u.value.tagName!=="TEXTAREA")return;const v=u.value;if(v.style.height="auto",!v.scrollHeight){g>0&&requestAnimationFrame(()=>m(g-1));return}v.style.height=`${v.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,v)=>((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,textInputIconWrap:e.icon,txtInputIconStart:e.iconStart,"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",BC,[(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",MC," *")):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0),!e.autoheight&&d.value<2?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("input",(0,n.mergeProps)({key:1,id:e.id,ref_key:"input",ref:u,"onUpdate:modelValue":v[0]||(v[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:v[1]||(v[1]=(...b)=>e.onFocusout&&e.onFocusout(...b)),onFocus:v[2]||(v[2]=(...b)=>e.onFocus&&e.onFocus(...b)),onInput:p}),null,16,DC)),[[n.vModelDynamic,s.value,void 0,{trim:!0}]]):(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("textarea",(0,n.mergeProps)({key:2,id:e.id,ref_key:"input",ref:u,"onUpdate:modelValue":v[3]||(v[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:v[4]||(v[4]=(...b)=>e.onFocusout&&e.onFocusout(...b))}),null,16,AC)),[[n.vModelText,s.value]]),e.iconStart?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(_e),{key:3,class:(0,n.normalizeClass)([{" -top-025 line-height-0 ":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:4,class:(0,n.normalizeClass)({" -top-025 line-height-0 ":e.underlined}),icon:e.icon},null,8,["class","icon"])):(0,n.createCommentVNode)("",!0)],8,NC),e.helptext?((0,n.openBlock)(),(0,n.createElementBlock)("p",PC,(0,n.toDisplayString)(e.helptext),1)):(0,n.createCommentVNode)("",!0),e.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",IC,(0,n.toDisplayString)(e.error),1)):(0,n.createCommentVNode)("",!0)],14,TC))}}),He=be(VC,[["__scopeId","data-v-ba5a8776"]]);function gp(e,t){return function(){return e.apply(t,arguments)}}var{toString:OC}=Object.prototype,{getPrototypeOf:Ri}=Object,{iterator:Fi,toStringTag:vp}=Symbol,zi=(e=>t=>{const r=OC.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=e=>(e=e.toLowerCase(),t=>zi(t)===e),Ui=e=>t=>typeof t===e,{isArray:Zr}=Array,Do=Ui("undefined");function Uo(e){return e!==null&&!Do(e)&&e.constructor!==null&&!Do(e.constructor)&&Wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Lp=Cn("ArrayBuffer");function RC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lp(e.buffer),t}var FC=Ui("string"),Wt=Ui("function"),yp=Ui("number"),Ka=e=>e!==null&&typeof e=="object",zC=e=>e===!0||e===!1,Ml=e=>{if(zi(e)!=="object")return!1;const t=Ri(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(vp in e)&&!(Fi in e)},UC=e=>{if(!Ka(e)||Uo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},HC=Cn("Date"),WC=Cn("File"),jC=e=>!!(e&&typeof e.uri<"u"),GC=e=>e&&typeof e.getParts<"u",qC=Cn("Blob"),YC=Cn("FileList"),ZC=e=>Ka(e)&&Wt(e.pipe);function XC(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var v1=XC(),L1=typeof v1.FormData<"u"?v1.FormData:void 0,KC=e=>{if(!e)return!1;if(L1&&e instanceof L1)return!0;const t=Ri(e);if(!t||t===Object.prototype||!Wt(e.append))return!1;const r=zi(e);return r==="formdata"||r==="object"&&Wt(e.toString)&&e.toString()==="[object FormData]"},JC=Cn("URLSearchParams"),[QC,ex,tx,nx]=["ReadableStream","Request","Response","Headers"].map(Cn),rx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ja(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,a;if(typeof e!="object"&&(e=[e]),Zr(e))for(o=0,a=e.length;o<a;o++)t.call(null,e[o],o,e);else{if(Uo(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 bp(e,t){if(Uo(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 Or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_p=e=>!Do(e)&&e!==Or;function Vc(...e){const{caseless:t,skipUndefined:r}=_p(this)&&this||{},o={},a=(l,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&bp(o,i)||i,s=Oc(o,c)?o[c]:void 0;Ml(s)&&Ml(l)?o[c]=Vc(s,l):Ml(l)?o[c]=Vc({},l):Zr(l)?o[c]=l.slice():(!r||!Do(l))&&(o[c]=l)};for(let l=0,i=e.length;l<i;l++){const c=e[l];if(!c||Uo(c)||(Ja(c,a),typeof c!="object"||Zr(c)))continue;const s=Object.getOwnPropertySymbols(c);for(let u=0;u<s.length;u++){const d=s[u];hx.call(c,d)&&a(c[d],d)}}return o}var ox=(e,t,r,{allOwnKeys:o}={})=>(Ja(t,(a,l)=>{r&&Wt(a)?Object.defineProperty(e,l,{__proto__:null,value:gp(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),ax=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),lx=(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)},ix=(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&&Ri(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},sx=(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},cx=e=>{if(!e)return null;if(Zr(e))return e;let t=e.length;if(!yp(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},ux=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ri(Uint8Array)),dx=(e,t)=>{const r=(e&&e[Fi]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},fx=(e,t)=>{let r;const o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},mx=Cn("HTMLFormElement"),px=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,a){return o.toUpperCase()+a}),Oc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),{propertyIsEnumerable:hx}=Object.prototype,gx=Cn("RegExp"),wp=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};Ja(r,(a,l)=>{let i;(i=t(a,l,e))!==!1&&(o[l]=i||a)}),Object.defineProperties(e,o)},vx=e=>{wp(e,(t,r)=>{if(Wt(e)&&["arguments","caller","callee"].includes(r))return!1;const o=e[r];if(Wt(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+"'")})}})},Lx=(e,t)=>{const r={},o=a=>{a.forEach(l=>{r[l]=!0})};return Zr(e)?o(e):o(String(e).split(t)),r},yx=()=>{},bx=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _x(e){return!!(e&&Wt(e.append)&&e[vp]==="FormData"&&e[Fi])}var wx=e=>{const t=new WeakSet,r=o=>{if(Ka(o)){if(t.has(o))return;if(Uo(o))return o;if(!("toJSON"in o)){t.add(o);const a=Zr(o)?[]:{};return Ja(o,(l,i)=>{const c=r(l);!Do(c)&&(a[i]=c)}),t.delete(o),a}}return o};return r(e)},kx=Cn("AsyncFunction"),$x=e=>e&&(Ka(e)||Wt(e))&&Wt(e.then)&&Wt(e.catch),kp=((e,t)=>e?setImmediate:t?((r,o)=>(Or.addEventListener("message",({source:a,data:l})=>{a===Or&&l===r&&o.length&&o.shift()()},!1),a=>{o.push(a),Or.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Wt(Or.postMessage)),Ex=typeof queueMicrotask<"u"?queueMicrotask.bind(Or):typeof process<"u"&&process.nextTick||kp,Sx=e=>e!=null&&Wt(e[Fi]),Q={isArray:Zr,isArrayBuffer:Lp,isBuffer:Uo,isFormData:KC,isArrayBufferView:RC,isString:FC,isNumber:yp,isBoolean:zC,isObject:Ka,isPlainObject:Ml,isEmptyObject:UC,isReadableStream:QC,isRequest:ex,isResponse:tx,isHeaders:nx,isUndefined:Do,isDate:HC,isFile:WC,isReactNativeBlob:jC,isReactNative:GC,isBlob:qC,isRegExp:gx,isFunction:Wt,isStream:ZC,isURLSearchParams:JC,isTypedArray:ux,isFileList:YC,forEach:Ja,merge:Vc,extend:ox,trim:rx,stripBOM:ax,inherits:lx,toFlatObject:ix,kindOf:zi,kindOfTest:Cn,endsWith:sx,toArray:cx,forEachEntry:dx,matchAll:fx,isHTMLForm:mx,hasOwnProperty:Oc,hasOwnProp:Oc,reduceDescriptors:wp,freezeMethods:vx,toObjectSet:Lx,toCamelCase:px,noop:yx,toFiniteNumber:bx,findKey:bp,global:Or,isContextDefined:_p,isSpecCompliantForm:_x,toJSONObject:wx,isAsyncFn:kx,isThenable:$x,setImmediate:kp,asap:Ex,isIterable:Sx},Cx=Q.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"]),xx=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]&&Cx[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};function Tx(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 Nx=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Bx=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Qu(e,t){return Q.isArray(e)?e.map(r=>Qu(r,t)):Tx(String(e).replace(t,""))}const Mx=e=>Qu(e,Nx),Dx=e=>Qu(e,Bx);function $p(e){const t=Object.create(null);return Q.forEach(e.toJSON(),(r,o)=>{t[o]=Dx(r)}),t}var y1=Symbol("internals");function Zo(e){return e&&String(e).trim().toLowerCase()}function Dl(e){return e===!1||e==null?e:Q.isArray(e)?e.map(Dl):Mx(String(e))}function Ax(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 Px=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Es(e,t,r,o,a){if(Q.isFunction(o))return o.call(this,t,r);if(a&&(t=r),!!Q.isString(t)){if(Q.isString(o))return t.indexOf(o)!==-1;if(Q.isRegExp(o))return o.test(t)}}function Ix(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function Vx(e,t){const r=Q.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 Hi=class{constructor(e){e&&this.set(e)}set(e,t,r){const o=this;function a(i,c,s){const u=Zo(c);if(!u)return;const d=Q.findKey(o,u);(!d||o[d]===void 0||s===!0||s===void 0&&o[d]!==!1)&&(o[d||c]=Dl(i))}const l=(i,c)=>Q.forEach(i,(s,u)=>a(s,u,c));if(Q.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(Q.isString(e)&&(e=e.trim())&&!Px(e))l(xx(e),t);else if(Q.isObject(e)&&Q.isIterable(e)){let i={},c,s;for(const u of e){if(!Q.isArray(u))throw new TypeError("Object iterator must return a key-value pair");i[s=u[0]]=(c=i[s])?Q.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=Zo(e),e){const r=Q.findKey(this,e);if(r){const o=this[r];if(!t)return o;if(t===!0)return Ax(o);if(Q.isFunction(t))return t.call(this,o,r);if(Q.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Zo(e),e){const r=Q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Es(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let o=!1;function a(l){if(l=Zo(l),l){const i=Q.findKey(r,l);i&&(!t||Es(r,r[i],i,t))&&(delete r[i],o=!0)}}return Q.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||Es(this,this[a],a,e,!0))&&(delete this[a],o=!0)}return o}normalize(e){const t=this,r={};return Q.forEach(this,(o,a)=>{const l=Q.findKey(r,a);if(l){t[l]=Dl(o),delete t[a];return}const i=e?Ix(a):String(a).trim();i!==a&&delete t[a],t[i]=Dl(o),r[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(t[o]=e&&Q.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(`
|