@bagelink/vue 1.12.1 → 1.12.5
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 +1 -1
- package/dist/index.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/form/inputs/OTP.vue +1 -1
package/dist/index.cjs
CHANGED
|
@@ -148,7 +148,7 @@ ${t.preList[r]}
|
|
|
148
148
|
|
|
149
149
|
`}return r});q.subParser("makeMarkdown.paragraph",(e,t)=>{let o="";if(e.hasChildNodes()){let r=e.childNodes,a=r.length;for(let l=0;l<a;++l)o+=q.subParser("makeMarkdown.node")(r[l],t)}return o=o.trim(),o});q.subParser("makeMarkdown.pre",(e,t)=>{let o=e.getAttribute("prenum");return`<pre>${t.preList[o]}</pre>`});q.subParser("makeMarkdown.strikethrough",(e,t)=>{let o="";if(e.hasChildNodes()){o+="~~";let r=e.childNodes,a=r.length;for(let l=0;l<a;++l)o+=q.subParser("makeMarkdown.node")(r[l],t);o+="~~"}return o});q.subParser("makeMarkdown.strong",(e,t)=>{let o="";if(e.hasChildNodes()){o+="**";let r=e.childNodes,a=r.length;for(let l=0;l<a;++l)o+=q.subParser("makeMarkdown.node")(r[l],t);o+="**"}return o});q.subParser("makeMarkdown.table",(e,t)=>{let o="",r=[[],[]],a=e.querySelectorAll("thead>tr>th"),l=e.querySelectorAll("tbody>tr");for(let s=0;s<a.length;++s){let c=q.subParser("makeMarkdown.tableCell")(a[s],t),u="---";if(a[s].hasAttribute("style"))switch(a[s].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":u=":---";break;case"text-align:right;":u="---:";break;case"text-align:center;":u=":---:";break}r[0][s]=c.trim(),r[1][s]=u}for(let s=0;s<l.length;++s){let c=r.push([])-1,u=l[s].getElementsByTagName("td");for(let d=0;d<a.length;++d){let f=" ";typeof u[d]<"u"&&(f=q.subParser("makeMarkdown.tableCell")(u[d],t)),r[c].push(f)}}let i=3;for(let s=0;s<r.length;++s)for(let c=0;c<r[s].length;++c){let u=r[s][c].length;u>i&&(i=u)}for(let s=0;s<r.length;++s){for(let c=0;c<r[s].length;++c)s===1?r[s][c].slice(-1)===":"?r[s][c]=`${q.helper.padEnd(r[s][c].slice(-1),i-1,"-")}:`:r[s][c]=q.helper.padEnd(r[s][c],i,"-"):r[s][c]=q.helper.padEnd(r[s][c],i);o+=`| ${r[s].join(" | ")} |
|
|
150
150
|
`}return o.trim()});q.subParser("makeMarkdown.tableCell",(e,t)=>{let o="";if(!e.hasChildNodes())return"";let r=e.childNodes,a=r.length;for(let l=0;l<a;++l)o+=q.subParser("makeMarkdown.node")(r[l],t,!0);return o.trim()});q.subParser("makeMarkdown.txt",e=>{let t=e.nodeValue;return t=t.replace(/ +/g," "),t=t.replace(/¨NBSP;/g," "),t=q.helper.unescapeHTMLEntities(t),t=t.replace(/([*_~|`])/g,"\\$1"),t=t.replace(/^(\s*)>/g,"\\$1>"),t=t.replace(/^#/gm,"\\#"),t=t.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),t=t.replace(/^( {0,3}\d+)\./gm,"$1\\."),t=t.replace(/^( {0,3})([+-])/gm,"$1\\$2"),t=t.replace(/\](\s*)\(/g,"\\]$1\\("),t=t.replace(/^ {0,3}\[([\S \t]*?)\]:/gm,"\\[$1]:"),t});function uo(e,t){return t==="titleCase"?e.split("_").map(o=>o[0].toUpperCase()+o.slice(1).toLocaleLowerCase()).join(" "):t==="pascal"?e.split("_").map(o=>o[0].toUpperCase()+o.slice(1).toLocaleLowerCase()).join(""):t==="camel"?e.split("_").map((o,r)=>r===0?o:o[0].toUpperCase()+o.slice(1)).join(""):t==="snake"?[...e].map(o=>o===o.toUpperCase()?`_${o.toLowerCase()}`:o).join(""):e}const Es=new Map;function g2(e,t=500){clearTimeout(Es.get(e));const o=setTimeout(()=>{e(),Es.delete(e)},t);Es.set(e,o)}function v2(e){return e.toLowerCase().replace(/[^a-z0-9-\s]/g,"").split(/[\s-]+/).join("-")}function tl(e){return e===void 0?e:e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")||e}async function Bh(e,t){await navigator.clipboard.writeText(e),t&&t("Copied to clipboard")}function Ah(...e){return e=e.flatMap(t=>t.split(/\s/)),e.map(t=>t.charAt(0)).join("")}function y2(e,t){e.key==="Escape"&&t()}function Lh(e,t,...o){return o.map(r=>typeof r=="function"?r(e,t):r).join(" ")}function $c(e,t,o){if(!e)return{};const r=["class","onClick","$el"],a=Object.entries(e).filter(([i])=>!r.includes(i)).map(([i,s])=>[i,typeof s=="function"?s(t,o):s]),l=Object.fromEntries(a);for(const i of r.slice(1))e[i]&&(l[i]=e[i]);return l}function b2(e,t){var o;return e["v-if"]===void 0?!0:typeof e["v-if"]=="boolean"?e["v-if"]:typeof e["v-if"]=="string"?!0:typeof e["v-if"]=="function"?(o=e["v-if"])==null?void 0:o.call(e,t==null?void 0:t[e.id],t):!0}function _2(e,t){if(t)return e?e[t]:void 0}const kc=e=>!Number.isNaN(Date.parse(e));function Mh(e,t){const r=Array.from(new Set((e??[]).flatMap(Object.keys))).map(a=>({id:a,label:tl(a),transform:l=>["created_at","updated_at"].includes(a)?l&&new Date(l).toLocaleString():l}));return t?r.filter(a=>t.includes(a.id)||!a.id):r}function or(e=100){return new Promise(t=>setTimeout(t,e))}const oa=new Map;async function nl(e,t){const o=(t==null?void 0:t.id)||e;if(await or(1),oa.has(o)){const a=oa.get(o);if(a)return a}if(t!=null&&t.id&&document.getElementById(t.id)||document.querySelector(`script[src="${e}"]`))return Promise.resolve();const r=new Promise((a,l)=>{const i=document.createElement("script");i.src=e,t!=null&&t.id&&(i.id=t.id),i.onload=()=>{a(),oa.delete(o)},i.onerror=s=>{l(new Error(String(s))),oa.delete(o)},document.head.append(i)});return oa.set(o,r),r}function Ec(e){return new Promise((t,o)=>{if(document.querySelector(`link[href="${e}"]`)){t();return}const r=document.createElement("link");r.href=e,r.rel="stylesheet",r.onload=()=>{t()},r.onerror=o,document.head.append(r)})}function Mu(e){return e.startsWith("https://")?e:(e=e.replace(/http:\/\//,""),`https://${e}`)}function Nn(e,t="px"){return typeof e=="number"?`${e}${t}`:e}const w2=/^https?:\/\/|^\/\//;function Gn(e){return e===void 0||e===""||w2.test(e)?e:e.startsWith("static/")?`/${e}`:`https://files.bagel.design/${e}`}function Jo(e,t,o=void 0){if(!t)return e;const r=t.split(/[.[]/);let a=e;for(const l of r){if(!a||typeof a!="object"||!(l in a))return o;a=a[l]}return a??o}const $2=e=>e.replace(/http:\/\//,"//");function Vh(e,t){try{return e()}catch(o){t&&t(o)}}function Vu(e,t){if(typeof document>"u")return;const o=document.createElement("a");o.target="_blank",o.rel="noopener noreferrer";const r=t!==void 0&&t!=="";if(typeof e=="string"){o.href=$2(e);const a=e.split("/").pop(),l=a!==void 0&&a!=="";o.download=r?t:l?a:"download"}else{const a=URL.createObjectURL(e);o.href=a,o.download=r?t:"download",setTimeout(()=>Vh(()=>{URL.revokeObjectURL(a)}),0)}document.body.appendChild(o),o.click(),document.body.removeChild(o)}const qr=n.defineComponent({__name:"BagelForm",props:{modelValue:{default:void 0},schema:{type:[Object,Function],default:void 0},tag:{default:"form"},class:{default:""},onSubmit:{}},emits:["update:modelValue"],setup(e,{expose:t,emit:o}){const r=e,a=o,l=S=>S&&JSON.parse(JSON.stringify(S)),i=n.ref(),s=n.ref(l(r.modelValue??{})),c=n.ref(l(r.modelValue??{})),u=n.ref("idle"),d=n.computed(()=>n.toValue(r.schema)),f=n.computed(()=>{try{return JSON.stringify(s.value)!==JSON.stringify(c.value)}catch{return!1}});n.onMounted(()=>{r.modelValue&&(c.value=l(r.modelValue),Object.keys(s.value).length===0&&Object.keys(r.modelValue).length>0&&(s.value=l(r.modelValue))),setTimeout(()=>{m()},10)}),n.watch(()=>r.modelValue,S=>{S!==void 0&&(s.value=l(S))},{immediate:!0,deep:!0});let h=!1;function m(){if(!h){h=!0;try{const S=d.value;if(!S)return;const x=T=>{for(const L of T){if(!L||typeof L!="object")continue;const I=typeof L.id=="string"&&L.id.length>0,E=Object.hasOwn(L,"defaultValue")&&L.defaultValue!==void 0;if(I&&E){const C=Jo(s.value,L.id,void 0);if(L.$el==="array"||L.type==="array")continue;C==null&&g({fieldId:L.id,value:L.defaultValue})}Array.isArray(L.children)&&L.children.length&&x(L.children),Array.isArray(L.fields)&&L.fields.length&&x(L.fields)}};x(S)}finally{setTimeout(()=>{h=!1},0)}}}const p=n.ref(0);n.watch(d,()=>{p.value++,setTimeout(()=>{h||m()},10)},{immediate:!1});function g({fieldId:S,value:x}){const T=(S==null?void 0:S.split("."))||[],L=l(s.value);let I=L;for(let E=0;E<T.length-1;E++){const C=T[E];(!I[C]||typeof I[C]!="object")&&(I[C]={}),I=I[C]}I[T[T.length-1]]=x,s.value=L,a("update:modelValue",s.value)}const b=()=>{var S;return((S=i.value)==null?void 0:S.reportValidity())??!1},v=()=>{var S;return((S=i.value)==null?void 0:S.checkValidity())??!1},y=n.ref();async function _(){var S;try{if(!b()||u.value==="submitting")return;u.value="submitting",await((S=r.onSubmit)==null?void 0:S.call(r,s.value)),c.value=l(s.value),u.value="success",window.parent.postMessage({type:"BAGEL_FORM_SUCCESS",data:JSON.stringify(s.value)},"*")}catch(x){u.value="error",y.value=x,console.error("Submit error:",y.value)}}const{renderField:$}=Ti({mode:"form",getFormData:()=>s.value,onUpdateModelValue:(S,x)=>{var T;S.id&&(g({fieldId:S.id,value:x}),(T=S.onUpdate)==null||T.call(S,x,s.value))}}),w=S=>$(S);function k(S){const x=S.target;if(x.name){const T=x.type==="checkbox"?x.checked:x.value;g({fieldId:x.name,value:T})}}return t({form:i,isDirty:f,validateForm:b,checkValidity:v}),(S,x)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[u.value!=="success"||!S.$slots.success?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[r.tag==="form"?(n.openBlock(),n.createElementBlock("form",{key:0,ref_key:"form",ref:i,class:n.normalizeClass(r.class),onSubmit:n.withModifiers(_,["prevent"]),onInput:k},[d.value?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(d.value,T=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(w(T)),{key:T.id}))),128)):n.renderSlot(S.$slots,"default",{key:1}),n.renderSlot(S.$slots,"submit",{submit:_,isDirty:f.value,validateForm:b,formState:u.value})],34)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[d.value?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(d.value,T=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(w(T)),{key:T.id,class:n.normalizeClass(r.class)},null,8,["class"]))),128)):n.createCommentVNode("",!0)],64))],64)):n.createCommentVNode("",!0),u.value==="success"?n.renderSlot(S.$slots,"success",{key:1}):n.createCommentVNode("",!0),u.value==="error"?n.renderSlot(S.$slots,"error",{key:2,error:y.value}):n.createCommentVNode("",!0)],64))}}),k2={class:"bgl-multi-step-form"},E2={key:0,class:"bgl-step-progress"},C2={class:"bgl-steps-indicator"},S2=["onClick"],T2={key:0,class:"bgl-step-label"},N2={class:"bgl-form-wrapper"},D2={class:"bgl-step-controls"},x2=n.defineComponent({__name:"BglMultiStepForm",props:n.mergeModels({bagelFormProps:{default:()=>({})},schema:{},showProgress:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},stepLabels:{},allowStepNavigation:{type:Boolean,default:!1},validateOnSteps:{type:Boolean,default:!0},direction:{default:"auto"}},{modelValue:{default:()=>({}),required:!0},modelModifiers:{}}),emits:n.mergeModels(["submit","stepChange"],["update:modelValue"]),setup(e,{expose:t,emit:o}){var I;const r=e,a=o,l=n.ref(),i=n.useModel(e,"modelValue"),s=n.ref(0),c=n.ref(0),u=n.ref([]);function d(){if(!l.value)return!1;const E=l.value.validateForm();return E&&!u.value.includes(s.value)&&u.value.push(s.value),E}const f=n.computed(()=>id({schema:n.toValue(r.schema)})),h=n.computed(()=>f.value.filter((C,B)=>{if(C.vIf!==void 0||C["v-if"]!==void 0){const A=C.vIf??C["v-if"];if(typeof A=="function")return A(void 0,i.value);if(typeof A=="boolean")return A;if(typeof A=="string")return!!A}return!0})),m=n.computed(()=>h.value.length),p=n.computed(()=>{const E=[];return f.value.forEach((C,B)=>{const A=C.vIf??C["v-if"];let M=!0;A!==void 0&&(typeof A=="function"?M=A(void 0,i.value):typeof A=="boolean"?M=A:typeof A=="string"&&(M=!!A)),M&&E.push(B)}),E}),g=n.computed(()=>{const E=p.value[s.value];return[f.value[E]]}),b=n.ref(r.rtl?"right":"left");n.watch(()=>s.value,(E,C)=>{r.direction==="auto"?b.value=r.rtl?E>C?"right":"left":E>C?"left":"right":b.value=r.direction,c.value=C,a("stepChange",{newStep:E,oldStep:C,totalSteps:m.value,direction:b.value})});const v=n.computed(()=>s.value===m.value-1),y=n.computed(()=>E=>u.value.includes(E)),_=n.ref(!1);async function $(){var E;await n.nextTick(),r.validateOnSteps?_.value=((E=l.value)==null?void 0:E.checkValidity())??!1:_.value=!0}function w(){s.value>0&&s.value--}const k=n.ref();async function S(){r.validateOnSteps&&d()===!1||(v.value||s.value++,await or(400),$())}async function x(E){var C;if(E<s.value||u.value.includes(E))return s.value=E,!0;if(E>s.value){if(r.validateOnSteps&&d()===!1)return!1;for(let B=s.value+1;B<=E;B++)if(s.value=B,await n.nextTick(),await or(100),r.validateOnSteps){if(!(((C=l.value)==null?void 0:C.checkValidity())??!1))return!1;u.value.includes(B)||u.value.push(B)}return!0}return!1}function T(){d()!==!1&&a("submit",i.value)}function L(){u.value=[],s.value=0}return n.watch(()=>i.value,()=>{$(),s.value>=m.value&&m.value>0&&(s.value=0)},{deep:!0}),t({submit:T,validateForm:d,checkValidity:(I=l.value)==null?void 0:I.checkValidity,isDirty:n.computed(()=>{var E;return(E=l.value)==null?void 0:E.isDirty}),reset:L,isLastStep:v,goToStep:x,currentStep:s,totalSteps:n.computed(()=>m.value),isStepValid:_,nextStep:S,prevStep:w}),(E,C)=>(n.openBlock(),n.createElementBlock("div",k2,[E.showProgress?(n.openBlock(),n.createElementBlock("div",E2,[n.renderSlot(E.$slots,"progress",n.normalizeProps(n.guardReactiveProps({currentStep:s.value,totalSteps:m.value,goToStep:x,stepLabels:r.stepLabels,allowStepNavigation:r.allowStepNavigation,isStepValidated:y.value})),()=>[n.createElementVNode("div",C2,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.value,(B,A)=>(n.openBlock(),n.createElementBlock("div",{key:A,class:n.normalizeClass(["bgl-step-indicator",[{active:A===s.value},{completed:A<s.value||y.value(A)},{clickable:r.allowStepNavigation}]]),onClick:M=>r.allowStepNavigation&&x(A)},[n.createElementVNode("span",null,n.toDisplayString(A+1),1),r.stepLabels&&r.stepLabels[A]?(n.openBlock(),n.createElementBlock("span",T2,n.toDisplayString(r.stepLabels[A]),1)):n.createCommentVNode("",!0)],10,S2))),128))])],!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",N2,[n.createVNode(n.Transition,{name:b.value==="right"?"slide-right":"slide-left",mode:"out-in"},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("div",{key:s.value,ref_key:"formContainer",ref:k,class:"bgl-form-container"},[n.createVNode(n.unref(qr),n.mergeProps({ref_key:"formRef",ref:l,modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=B=>i.value=B),schema:g.value},E.bagelFormProps),n.createSlots({_:2},[E.$slots.success?{name:"success",fn:n.withCtx(()=>[n.renderSlot(E.$slots,"success",{},void 0,!0)]),key:"0"}:void 0,E.$slots.error?{name:"error",fn:n.withCtx(()=>[n.renderSlot(E.$slots,"error",{},void 0,!0)]),key:"1"}:void 0]),1040,["modelValue","schema"])]))]),_:3},8,["name"]),n.createElementVNode("div",D2,[n.renderSlot(E.$slots,"steppers",n.normalizeProps(n.guardReactiveProps({prevStep:w,nextStep:S,submit:T,currentStep:s.value,totalSteps:m.value,isLastStep:v.value,isStepValid:_.value})),()=>[s.value!==0?(n.openBlock(),n.createBlock(n.unref(ee),{key:0,color:"gray",icon:"arrow_back",onClick:w})):n.createCommentVNode("",!0),v.value?(n.openBlock(),n.createBlock(n.unref(ee),{key:2,value:"Submit",onClick:T})):(n.openBlock(),n.createBlock(n.unref(ee),{key:1,icon:"arrow_forward",disabled:r.validateOnSteps&&!_.value,onClick:S},null,8,["disabled"]))],!0)])])]))}}),B2=xe(x2,[["__scopeId","data-v-2cd38971"]]),A2={key:0,class:"label mb-05"},L2={class:"ps-025 mb-05"},M2={key:0,class:"flex-center h-300px"},V2={class:"opacity-7 txt-center txt14"},P2={class:"flex pointer"},I2=["onClick"],ca=n.defineComponent({__name:"FieldArray",props:{el:{default:"div"},id:{},label:{},placeholder:{},children:{},class:{type:[String,Number,Boolean,Object,Function]},attrs:{},required:{type:Boolean},disabled:{type:Boolean},helptext:{},options:{},defaultValue:{},add:{type:Boolean,default:!0},delete:{type:Boolean,default:!0},collapsed:{type:Boolean,default:!1},transform:{},schema:{},modelValue:{},type:{default:"object"}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,{$t:a}=Tt(),l=qr,i=n.ref([]),s=n.ref(o.modelValue||[]),c=n.ref("loaded");let u="";const d=n.computed(()=>o.type==="text"?[{id:"value",type:"text",label:"",$el:"text"}]:o.type==="number"?[{id:"value",type:"number",label:"",$el:"number"}]:[]),f=n.computed(()=>{var x;if(!(o.type==="object"||o.type==="array"))return d.value;const k=((x=o.attrs)==null?void 0:x.schema)!==void 0?n.toValue(o.attrs.schema):null;return o.children||n.toValue(o.schema)||k});n.watch(()=>o.modelValue,w=>{w&&Array.isArray(w)?s.value=[...w]:s.value=[]},{deep:!0,immediate:!1}),n.watch(()=>s.value.length,w=>{if(i.value.length!==w)if(i.value.length<w){const k=w-i.value.length;for(let S=0;S<k;S++)i.value.push(o.collapsed||!1)}else i.value=i.value.slice(0,w)}),n.onMounted(()=>{(!o.modelValue||o.modelValue.length===0)&&o.defaultValue&&o.defaultValue.length>0&&(s.value=[...o.defaultValue],m()),o.collapsed?i.value=Array.from({length:s.value.length},()=>!0):i.value=Array.from({length:s.value.length},()=>!1)});function h(){o.defaultValue&&o.defaultValue.length>0?(s.value=[...o.defaultValue],m()):g()}function m(){const w=JSON.stringify(o.modelValue||[]),k=JSON.stringify(s.value||[]);w!==k&&u!==k&&(u=k,r("update:modelValue",s.value),setTimeout(()=>{u=""},50))}function p(w){s.value.splice(w,1),i.value.splice(w,1),m()}function g(){const k={text:"",number:0,object:{},array:{}}[o.type];s.value.push(k!==void 0?k:{}),i.value.push(!1),m()}function b(w){i.value[w]=!i.value[w]}function v(w,k){o.type==="text"||o.type==="number"?s.value[w]=o.type==="number"?Number(k.value):k.value:s.value[w]=k,m()}const y=n.computed(()=>o.type==="text"||o.type==="number"),_=n.computed(()=>{const w=f.value,k=Array.isArray(w)&&w.length>0||o.children&&o.children.length>0,S=o.defaultValue&&o.defaultValue.length>0,x=o.type==="object"||o.type==="array";return y.value||x&&(k===!0||S===!0)}),$=n.computed(()=>{const w=f.value,k=Array.isArray(w)&&w.length>2,S=Array.isArray(w)&&w.some(x=>x.$el==="richtext");return k||S});return(w,k)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(o.class)},[w.label?(n.openBlock(),n.createElementBlock("p",A2,n.toDisplayString(w.label),1)):n.createCommentVNode("",!0),n.createElementVNode("div",L2,[c.value!=="loaded"?(n.openBlock(),n.createElementBlock("div",M2,[c.value==="loading"?(n.openBlock(),n.createBlock(n.unref(Po),{key:0})):c.value==="error"?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,icon:"error",color:"red"})):n.createCommentVNode("",!0)])):_.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[s.value.length===0?(n.openBlock(),n.createBlock(n.unref(en),{key:0,class:"py-1 border mb-05"},{default:n.withCtx(()=>{var S;return[n.createElementVNode("p",V2," No "+n.toDisplayString(((S=w.label)==null?void 0:S.toLowerCase())||"items")+" added yet ",1),o.defaultValue&&o.defaultValue.length>0?(n.openBlock(),n.createBlock(n.unref(ee),{key:0,thin:"",color:"primary",class:"txt12 mb-05",onClick:h},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(a)("fieldArray.loadDefault",{label:w.label||"Items"})),1)]),_:1})):n.createCommentVNode("",!0)]}),_:1})):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(S,x)=>(n.openBlock(),n.createElementBlock("div",{key:x,outline:"",thin:"",class:n.normalizeClass(["mb-05 itemBox transition radius-05 overflow-hidden txt12 border",{minimized:i.value[x]}]),style:{"--input-font-size":"12px"}},[n.createElementVNode("div",null,[n.createElementVNode("div",P2,[n.createElementVNode("p",{class:"minimizedText txt12 p-05 opacity-7 flex-grow-2",onClick:T=>b(x)},n.toDisplayString(w.label)+" "+n.toDisplayString(x+1),9,I2),$.value?(n.openBlock(),n.createBlock(n.unref(ee),{key:0,class:"rotate-180 txt10 opacity-7 p-025",flat:"",thin:"",icon:"keyboard_arrow_down",onClick:T=>b(x)},null,8,["onClick"])):n.createCommentVNode("",!0)]),i.value[x]?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(l),{key:0,"model-value":y.value?{value:S}:S,schema:f.value,class:"bginputbg p-05 grid gap-05","onUpdate:modelValue":T=>v(x,T)},null,8,["model-value","schema","onUpdate:modelValue"])),o.delete?(n.openBlock(),n.createBlock(n.unref(ee),{key:1,icon:"delete",class:"txt10 opacity-7",thin:"",flat:"",onClick:T=>p(x)},null,8,["onClick"])):n.createCommentVNode("",!0)])],2))),128)),w.add?(n.openBlock(),n.createBlock(n.unref(ee),{key:1,thin:"",icon:"add",color:"gray",class:"txt12 arrayAddButton",onClick:g},{default:n.withCtx(()=>[n.createElementVNode("p",null,n.toDisplayString(w.label),1)]),_:1})):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createBlock(n.unref(en),{key:1,class:"py-1 border mb-05"},{default:n.withCtx(()=>k[0]||(k[0]=[n.createElementVNode("p",{class:"opacity-7"}," No schema available ",-1)])),_:1,__:[0]}))])],2))}}),O2={class:"array-input testMe1"},R2={key:0,class:"txt12 txt-gray-90 mb-025 block"},F2={key:1,class:"txt12 txt-gray-50 mb-05"},z2={key:0,class:"ms-075 my-1 border-start h-100p ps-025"},U2={class:"border radius-1 overflow-hidden"},H2={class:"grid gap-05 grid-array-line align-items-center pe-025 hover"},j2={class:"ellipsis-1"},W2={key:0,class:"array-input-row grid align-items-center px-05"},ua=n.defineComponent({__name:"ArrayInput",props:{label:{},helpText:{},modelValue:{},allowAdd:{type:Boolean},allowDelete:{type:Boolean},allowReorder:{type:Boolean},addText:{},deleteTooltip:{},itemLabel:{},collapsible:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,{$t:a}=Tt(),l=n.ref(Array.isArray(o.modelValue)?[...o.modelValue]:[]),i=n.ref(Array.from({length:l.value.length},()=>!0)),s=n.computed(()=>{const _=je(o.itemLabel);return typeof _=="string"&&_.length>0?_:a("arrayInput.item")}),c=["title","name","label","displayName","display_name","heading","caption","text"];function u(_){if(typeof _=="string"&&_.trim().length>0)return _.trim();if(_!=null&&typeof _=="object")for(const $ of c){const w=_[$];if(typeof w=="string"&&w.trim().length>0)return w.trim()}return null}function d(_){const $=u(l.value[_]);return $!=null?`${_+1}. ${$}`:`${s.value} ${_+1}`}n.watch(()=>o.modelValue,_=>{Array.isArray(_)&&(l.value=[..._],i.value.length!==_.length&&(i.value=Array.from({length:_.length},($,w)=>i.value[w]??!0)))});function f(){l.value.push(void 0),i.value.push(!0),b()}function h(_){l.value.splice(_,1),i.value.splice(_,1),b()}function m(_){i.value[_]=!i.value[_]}function p(_,$){if($<0||$>=l.value.length||_===$)return;const[w]=l.value.splice(_,1);l.value.splice($,0,w);const[k]=i.value.splice(_,1);i.value.splice($,0,k),b()}function g(_){p(_.oldIndex,_.newIndex)}function b(){r("update:modelValue",[...l.value])}function v(_,$){l.value[$]=_,b()}function y(_){return n.computed({get:()=>l.value[_],set:$=>{v($,_)}})}return(_,$)=>{const w=n.resolveDirective("tooltip");return n.openBlock(),n.createElementBlock("div",O2,[_.label?(n.openBlock(),n.createElementBlock("label",R2,n.toDisplayString(n.unref(je)(_.label)),1)):n.createCommentVNode("",!0),_.helpText?(n.openBlock(),n.createElementBlock("p",F2,n.toDisplayString(_.helpText),1)):n.createCommentVNode("",!0),_.collapsible?n.createCommentVNode("",!0):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:2},n.renderList(l.value,(k,S)=>(n.openBlock(),n.createElementBlock("div",{key:S,class:"array-input-row grid align-items-center"},[n.renderSlot(_.$slots,"default",{item:y(S),index:S}),_.allowDelete?(n.openBlock(),n.createElementBlock("div",z2,[n.withDirectives(n.createVNode(n.unref(ee),{flat:"",icon:"delete",onClick:x=>h(S)},null,8,["onClick"]),[[w,n.unref(je)(_.deleteTooltip||"Delete")]])])):n.createCommentVNode("",!0)]))),128)),_.collapsible?(n.openBlock(),n.createBlock(ah,{key:3,"model-value":l.value,handle:".grab",disabled:!_.allowReorder,class:"grid gap-05 mb-05",onEnd:g},{default:n.withCtx(({index:k})=>[n.createElementVNode("div",U2,[n.createElementVNode("div",H2,[_.allowReorder?n.withDirectives((n.openBlock(),n.createBlock(n.unref(ee),{key:0,flat:"",thin:"",icon:"drag_indicator",class:"grab"},null,512)),[[w,n.unref(je)("Drag to reorder")]]):n.createCommentVNode("",!0),n.createVNode(n.unref(ee),{"full-width":"","align-txt":"start",class:"px-05 bg-transparent color-inherit",ripple:!1,icon:i.value[k]?"expand_more":"expand_less",onClick:S=>m(k)},{default:n.withCtx(()=>[n.createElementVNode("p",j2,n.toDisplayString(d(k)),1)]),_:2},1032,["icon","onClick"]),_.allowDelete?n.withDirectives((n.openBlock(),n.createBlock(n.unref(ee),{key:1,flat:"",icon:"delete",thin:"",confirm:n.unref(je)("Are you sure you want to delete this item?"),onClick:S=>h(k)},null,8,["confirm","onClick"])),[[w,n.unref(je)(_.deleteTooltip||"Delete")]]):n.createCommentVNode("",!0)]),n.createVNode(n.Transition,{name:"array-collapse"},{default:n.withCtx(()=>[i.value[k]?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",W2,[n.renderSlot(_.$slots,"default",{item:y(k),index:k})]))]),_:2},1024)])]),_:3},8,["model-value","disabled"])):n.createCommentVNode("",!0),_.allowAdd?(n.openBlock(),n.createBlock(n.unref(ee),{key:4,class:"radius-1",thin:"",icon:"add",value:n.unref(je)(_.addText||"Add"),onClick:f},null,8,["value"])):n.createCommentVNode("",!0)])}}}),q2={class:"primary-checkbox"},G2=n.defineComponent({__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,r)=>(n.openBlock(),n.createElementBlock("label",q2,[n.renderSlot(o.$slots,"label",{},void 0,!0),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),type:"checkbox"},null,512),[[n.vModelCheckbox,t.value]])]))}}),Y2=xe(G2,[["__scopeId","data-v-73f1d9ad"]]),X2=["title"],K2=["id","disabled","value","required"],J2=["for"],Z2=n.defineComponent({__name:"CheckInput",props:n.mergeModels({label:{},id:{},title:{},small:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean},defaultValue:{},value:{}},{modelValue:{default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.computed(()=>e.id||Math.random().toString(36).slice(7)),o=n.useModel(e,"modelValue");return n.onMounted(()=>{o.value===void 0&&e.defaultValue!==void 0&&(o.value=e.defaultValue)}),(r,a)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input bgl-checkbox align-items-center ps-025",{small:r.small}]),title:r.title},[n.withDirectives(n.createElementVNode("input",{id:t.value+r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),disabled:r.disabled,value:r.value,required:r.required,type:"checkbox",class:"me-05"},null,8,K2),[[n.vModelCheckbox,o.value]]),n.createElementVNode("label",{for:t.value+r.value},[n.renderSlot(r.$slots,"label",{},()=>[n.createTextVNode(n.toDisplayString(n.unref(je)(r.label)),1)],!0)],8,J2)],10,X2))}}),Ut=xe(Z2,[["__scopeId","data-v-d2e55b99"]]);function Q2(e="dark"){const t=n.ref(null),o=n.ref(!1),r=n.ref(e),a=f=>f==="dark"?"atom-one-dark":f==="light"?"atom-one-light":f,l=f=>`https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/styles/${f}.min.css`,i=()=>{document.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{var h;f instanceof HTMLLinkElement&&f.href.includes("/styles/")&&f.href.includes("highlight.js")&&((h=f.parentElement)==null||h.removeChild(f))})},s=async f=>{const h=a(f);if(h!==r.value)try{i();const m=l(h);console.log("setTheme",m),await Ec(m),r.value=h}catch(m){console.error("Failed to apply theme. Falling back to atom-one-dark:",m),i(),r.value="atom-one-dark";const p=l(r.value);await Ec(p)}},c=async()=>{if(!o.value)try{await nl("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/highlight.min.js",{id:"hljs-cdn"}),await s(r.value),window.hljs?(t.value=window.hljs,o.value=!0):console.error("Failed to load highlight.js")}catch(f){console.error("Error loading highlight.js:",f)}},u=f=>f.replace(/[&<>"']/g,h=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[h]||"");return{hljs:t,loaded:o,loadHighlight:c,setTheme:s,currentTheme:r,escapeHtml:u,highlightCode:(f,h,m=!0,p=!0)=>{if(!t.value)return u(f);try{const g=h||"";return g&&!m&&!t.value.getLanguage(g)?(console.warn(`The language "${g}" is not available.`),u(f)):(m?t.value.highlightAuto(f):t.value.highlight(f,{language:g,ignoreIllegals:p})).value||u(f)}catch(g){return console.error("Highlighting error:",g),u(f)}}}}const e$={key:0,class:"label"},t$={class:"editor-content-papa relative"},n$={class:"code-display",wrap:""},o$=["innerHTML"],r$=["value"],a$=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:""},height:{type:String,default:"240px"},disabled:{type:Boolean,default:!1},theme:{type:String,default:"dark"}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>typeof o.modelValue=="object");function l(_){return typeof _=="string"?_:typeof _=="object"?JSON.stringify(_,null,2):""}const i=n.ref(l(o.modelValue)),s=n.ref(),c=n.ref(!1),{loaded:u,loadHighlight:d,highlightCode:f,setTheme:h}=Q2(o.theme),m=n.computed(()=>{const _=o.height;return _.match(/^\d+$/)?`${_}px`:_}),p=n.computed(()=>f(i.value,o.language,o.autodetect,o.ignoreIllegals));function g(_){const $=_.target;if(i.value=$.value,a.value)try{const w=JSON.parse(i.value);r("update:modelValue",w)}catch{r("update:modelValue",i.value)}else r("update:modelValue",i.value)}function b(_){if(_.key!=="Tab")return;_.preventDefault();const $=_.target,w=$.selectionStart,k=$.selectionEnd,S=`${i.value.substring(0,w)} ${i.value.substring(k)}`;if(i.value=S,a.value)try{const x=JSON.parse(i.value);r("update:modelValue",x)}catch{r("update:modelValue",i.value)}else r("update:modelValue",i.value);setTimeout(()=>{$.selectionStart=w+2,$.selectionEnd=w+2},0)}n.onMounted(async()=>{await d()}),n.watch(()=>o.theme,_=>{h(_)});function v(){const _=l(o.modelValue);_!==i.value&&(i.value=_)}function y(){c.value=!1,v()}return n.watch(()=>o.modelValue,()=>{c.value||v()},{immediate:!0}),(_,$)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["code-editor-container ltr",{"mb-2":e.label}]),style:n.normalizeStyle({height:m.value})},[e.label?(n.openBlock(),n.createElementBlock("label",e$,n.toDisplayString(e.label),1)):n.createCommentVNode("",!0),n.unref(u)?(n.openBlock(),n.createElementBlock("div",{key:1,ref_key:"editorRef",ref:s,class:"code-editor-grandpa hljs"},[n.createElementVNode("div",t$,[n.createElementVNode("pre",n$,[n.createElementVNode("code",{innerHTML:p.value},null,8,o$)]),!e.readonly&&!e.disabled?(n.openBlock(),n.createElementBlock("textarea",{key:0,value:i.value,class:"code-input",spellcheck:"false",autocomplete:"off",autocorrect:"off",autocapitalize:"off",onInput:g,onKeydown:b,onFocus:$[0]||($[0]=w=>c.value=!0),onBlur:y},null,40,r$)):n.createCommentVNode("",!0)])],512)):n.createCommentVNode("",!0)],6))}}),Pu=xe(a$,[["__scopeId","data-v-debe1d9d"]]),l$=["title"],i$=["id","placeholder","required"],s$=["placeholder"],Wn=n.defineComponent({__name:"ColorInput",props:{label:{},id:{},placeholder:{},modelValue:{},editMode:{type:Boolean,default:!0},small:{type:Boolean},required:{type:Boolean},nativeInputAttrs:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,{$t:a}=Tt(),l=n.ref(o.modelValue);return n.watch(()=>l.value,i=>{r("update:modelValue",i)}),(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input testMe1",{small:i.small}]),title:i.label},[n.createElementVNode("label",null,[n.createTextVNode(n.toDisplayString(n.unref(je)(i.label))+" ",1),n.createElementVNode("div",{class:n.normalizeClass(["flex rounded colorInputPickWrap",{"px-025 bg-input":!i.small}])},[n.withDirectives(n.createElementVNode("input",n.mergeProps({id:i.id,"onUpdate:modelValue":s[0]||(s[0]=c=>l.value=c),class:["border",{"no-edit":!i.editMode,"opacity-1":!l.value}],type:"color",placeholder:n.unref(je)(i.placeholder)||n.unref(je)(i.label),required:i.required},i.nativeInputAttrs),null,16,i$),[[n.vModelText,l.value]]),i.small?n.createCommentVNode("",!0):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,"onUpdate:modelValue":s[1]||(s[1]=c=>l.value=c),class:"flex-grow-1 border colorInputPick",type:"text",placeholder:n.unref(a)("color.placeholder")},null,8,s$)),[[n.vModelText,l.value]]),n.createVNode(n.unref(ee),{class:n.normalizeClass({"not-allowed opacity-3":!l.value}),round:"",flat:"",thin:"",icon:"clear",onClick:s[2]||(s[2]=c=>l.value="")},null,8,["class"])],2)])],10,l$))}}),Kd=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/,Jd=/^\d{4}-\d{2}-\d{2}$/;var $r=(e=>(e.REGULAR="regular",e.SHORTENED="shortened",e.FLEXIBLE="flexible",e))($r||{}),Cc=(e=>(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))(Cc||{});class c${static getBrowserNavigatorLocale(){return typeof navigator!="object"?"en-US":navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language}static hasSlotContent(t){return t?t().some(o=>o.type===n.Comment||Array.isArray(o.children)&&!o.children.length?!1:o.type!==n.Text||typeof o.children=="string"&&o.children.trim()!==""):!1}static getEventType(t,o){const r=Kd.test(t.time.start)&&Kd.test(t.time.end),a=Jd.test(t.time.start)&&Jd.test(t.time.end);if(r)return this.getTimedEventType(t,o);if(a)return this.getFullDayEventType(t,o);throw new Error("Event has invalid type")}static getTimedEventType(t,o){if(o.dateStringsHaveEqualDates(t.time.start,t.time.end))return"SINGLE_DAY_TIMED";if(o.dayMode===$r.FLEXIBLE){const r=o.setHourInDateTimeString(o.addDaysToDateTimeString(1,o.dateStringFrom(t.time.start)),Na.getHourFromTimePoints(o.DAY_END));if(t.time.end<r)return"SINGLE_HYBRID_DAY_TIMED"}return"MULTI_DAY_TIMED"}static getFullDayEventType(t,o){return o.dateStringsHaveEqualDates(t.time.start,t.time.end)?"SINGLE_DAY_FULL_DAY":"MULTI_DAY_FULL_DAY"}static isUIEventTouchEvent(t){return"touches"in t&&typeof t.touches=="object"}}var Jl=(e=>(e.SUNDAY="sunday",e.MONDAY="monday",e))(Jl||{});class Na{constructor(t="monday",o=null,r={start:0,end:2400}){qe(this,"FIRST_DAY_OF_WEEK");qe(this,"CALENDAR_LOCALE");qe(this,"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]);qe(this,"DAY_START");qe(this,"DAY_END");qe(this,"HOURS_PER_DAY",24);qe(this,"MS_PER_DAY");this.FIRST_DAY_OF_WEEK=t,this.CALENDAR_LOCALE=o||c$.getBrowserNavigatorLocale(),this.DAY_START=r.start,this.DAY_END=r.end,this.HOURS_PER_DAY=(()=>{const a=Na.getHourFromTimePoints(this.DAY_END),l=Na.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?$r.REGULAR:this.DAY_START>=this.DAY_END?$r.FLEXIBLE:$r.SHORTENED}getDatesBetweenTwoDates(t,o){const r=[],a=new Date(t);for(;a<=o;)r.push(new Date(a.getFullYear(),a.getMonth(),a.getDate())),a.setDate(a.getDate()+1);return r}getCalendarWeekDateObjects(t){let o;this.FIRST_DAY_OF_WEEK==="sunday"?o=t.getDay():o=t.getDay()===0?6:t.getDay()-1;const r=t.getDate()-o,a=new Date(t.getFullYear(),t.getMonth(),r);return this.getDatesBetweenTwoDates(a,new Date(a.getFullYear(),a.getMonth(),a.getDate()+6))}getCalendarMonthSplitInWeeks(t,o){const r=[],a=new Date(t,o,1),l=new Date(a.getFullYear(),a.getMonth(),1),i=this.getCalendarWeekDateObjects(l);r.push(i);let s=!0,c=i[0];const u=a.getMonth();for(;s;){const d=new Date(c.getFullYear(),c.getMonth(),c.getDate()+7);d.getMonth()===u?(r.push(this.getCalendarWeekDateObjects(d)),c=d):s=!1}return r}getCalendarYearMonths(t){const o=[];let r=0;for(;r<=11;)o.push(new Date(t,r,1)),r++;return o}getHourAndMinutesFromTimePoints(t){const o=t.toString();let r="0",a="0";return o.length===4?(r=o[0]+o[1],a=o[2]+o[3]):o.length===3&&(r=o[0],a=o[1]+o[2]),{hour:+r,minutes:+a}}getHourLocaleStringFromHourDigits(t){const{hour:o,minutes:r}=this.getHourAndMinutesFromTimePoints(t),a=new Date(2100,0,1,+o,+r,0).toLocaleTimeString(this.CALENDAR_LOCALE,{hour:"2-digit"});return a[0]==="0"?a.substring(1):a}getLocalizedNameOfWeekday(t,o="short"){return t.toLocaleDateString(this.CALENDAR_LOCALE,{weekday:o})}getLocalizedNameOfMonth(t,o="short"){return t.toLocaleDateString(this.CALENDAR_LOCALE,{month:o})}getLocalizedDateString(t){return t.toLocaleDateString(this.CALENDAR_LOCALE)}getDateTimeStringFromDate(t,o){const r=t.getFullYear(),a=t.getMonth()+1,l=t.getDate(),i=`${r}-${a>=10?a:`0${a}`}-${l>=10?l:`0${l}`}`;if(!o){const c=t.getHours(),u=t.getMinutes();return`${i} ${c>=10?c:`0${c}`}:${u>=10?u:`0${u}`}`}return`${i} ${o==="start"?"00:00":"23:59"}`}getLocalizedTime(t){const{year:o,month:r,date:a,hour:l,minutes:i}=this.getAllVariablesFromDateTimeString(t);return new Date(o,r,a,l,i).toLocaleTimeString(this.CALENDAR_LOCALE,{hour:"numeric",minute:"numeric"})}getLocalizedHour(t){return t.toLocaleTimeString(this.CALENDAR_LOCALE,{hour:"2-digit"})}getLocalizedTimeRange(t,o){return`${this.getLocalizedTime(t)} - ${this.getLocalizedTime(o)}`}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 o=new Date,r=o.getFullYear(),a=o.getMonth(),l=o.getDate(),i=t.getFullYear(),s=t.getMonth(),c=t.getDate();return r===i&&a===s&&l===c}dateIsInWeek(t,o){const r=new Date(t),a=r.getDate(),l=r.getMonth(),i=r.getFullYear();for(const s of o){const c=a===s.getDate(),u=l===s.getMonth(),d=i===s.getFullYear();if(c&&u&&d)return!0}return!1}getDateStringFromDate(t){const o=t.getFullYear(),r=t.getMonth()+1,a=t.getDate();return`${o}-${r>=10?r:`0${r}`}-${a>=10?a:`0${a}`}`}addMinutesToDateTimeString(t,o){const{year:r,month:a,date:l,hour:i,minutes:s}=this.getAllVariablesFromDateTimeString(o),c=new Date(r,a,l,i,s),u=new Date(c.getTime()+t*6e4);return this.getDateTimeStringFromDate(u)}addDaysToDateTimeString(t,o){return this.addMinutesToDateTimeString(t*1440,o)}dateStringsHaveEqualDates(t,o){const{year:r,month:a,date:l}=this.getAllVariablesFromDateTimeString(t),{year:i,month:s,date:c}=this.getAllVariablesFromDateTimeString(o);return r===i&&a===s&&l===c}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,o,r){const l=this.hourFrom(t)*100,i=+t.substring(14,16),s=+this.turnMinutesIntoPercentageOfHour(+i);if(r>o){const h=r-o;return(l+s-o)/h*100}const c=Cc.TWELVE_AM-o,u=c+r,d=l+s;return(d>=o?d-o:c+d)/u*100}getTimeFromClick(t,o){if(o<=0)throw new Error("weekHeight cannot be a negative number");if(t<0)throw new Error("clickOffsetY cannot be a negative number");const r=this.DAY_START/100,a=o/this.HOURS_PER_DAY,l=Math.floor(t%a/(a/60));if(this.DAY_END<=this.DAY_START){const c=this.DAY_END/100*a,u=o-c;if(t>u){const d=Math.floor((t-u)/a);return`${this.doubleDigit(d)}:${this.doubleDigit(l)}`}}const i=Math.floor(t/a)+r;return`${this.doubleDigit(i)}:${this.doubleDigit(l)}`}setSegmentOfDateTimeString(t,o){if(o.hour<0||o.hour>23)throw new Error("Invalid hour");const r=this.doubleDigit(o.hour);return t=t.replace(/\d{2}:/,`${r}:`),t}isTrailingOrLeadingDate(t,o){const a=new Date(t).getMonth();return o!==a}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!==$r.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,o){return this.dateStringFrom(this.addDaysToDateTimeString(1,t))===this.dateStringFrom(o)}setHourInDateTimeString(t,o){const r=this.doubleDigit(o);return t=t.replace(/\d{2}:/,`${r}:`),t}setMinutesInDateTimeString(t,o){const r=this.doubleDigit(o);return t=t.replace(/:\d{2}/,`:${r}`),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 o=this.setHourInDateTimeString(t,this.getHourAndMinutesFromTimePoints(this.DAY_START).hour);let r;return this.DAY_END===Cc.TWELVE_AM?(r=this.setHourInDateTimeString(t,23),r=this.setMinutesInDateTimeString(r,59)):r=this.setHourInDateTimeString(t,this.getHourAndMinutesFromTimePoints(this.DAY_END).hour),{start:o,end:r}}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)}}const u$={class:"calendar-section m_border-none px-05 pb-05 pt-025 m_p-0"},d$={class:"flex space-between pb-1"},f$={class:"flex gap-05"},p$={class:"month-year"},m$={key:0,class:"calendar-grid grid gap-025"},h$=["disabled","onClick"],g$={key:1,class:"month-grid grid gap-05 p-05"},v$={key:2,class:"year-grid grid gap-05 p-0"},y$={key:0,class:"time-picker border-start flex column gap-1 w-120px px-025"},b$={class:"flex gap-025"},_$=n.defineComponent({__name:"DatePicker",props:{modelValue:{},min:{},max:{},mode:{default:()=>({mode:"day"})},firstDayOfWeek:{default:Jl.SUNDAY},locale:{default:""},enableTime:{type:Boolean,default:!1},highlightedDates:{},disabledDates:{},autoSize:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,a=n.computed(()=>n.toValue(o.highlightedDates)),l=n.computed(()=>n.toValue(o.disabledDates)),i=n.ref(new Date),s=n.ref("days"),c=new Na(o.firstDayOfWeek,o.locale);function u(J){if(!J)return null;const ae=typeof J=="string"?new Date(J):J;return Number.isNaN(ae.getTime())?null:ae}function d(){return{isDateDisabled:pe=>{if(!pe)return!0;const Ce=u(o.min),Be=u(o.max);return!!(Ce&&pe<Ce||Be&&pe>Be||Array.isArray(l.value)&&l.value.length>0&&l.value.some(_e=>{const Ae=u(_e);return Ae?pe.getFullYear()===Ae.getFullYear()&&pe.getMonth()===Ae.getMonth()&&pe.getDate()===Ae.getDate():!1}))},isMonthDisabled:(pe,Ce)=>{const Be=u(o.min),Ee=u(o.max),_e=new Date(pe,Ce+1,0),Ae=new Date(pe,Ce,1);if(Be){const re=new Date(Be.getFullYear(),Be.getMonth(),Be.getDate());if(_e<re)return!0}if(Ee){const re=new Date(Ee.getFullYear(),Ee.getMonth(),Ee.getDate());if(Ae>re)return!0}return!1},isYearDisabled:pe=>{const Ce=u(o.min),Be=u(o.max);return!!(Ce&&pe<Ce.getFullYear()||Be&&pe>Be.getFullYear())}}}function f(){return{selectedDate:n.computed(()=>u(o.modelValue))}}const{isDateDisabled:h,isMonthDisabled:m,isYearDisabled:p}=d(),{selectedDate:g}=f();function b(){const J=n.computed(()=>{const re=i.value.getFullYear(),ge=i.value.getMonth(),we=c.getCalendarMonthSplitInWeeks(re,ge);for(;we.length<6;){const Q=we[we.length-1],$e=Q[Q.length-1],O=new Date($e.getFullYear(),$e.getMonth(),$e.getDate()+1),G=c.getCalendarWeekDateObjects(O);we.push(G)}return we.flat()}),ae=n.computed(()=>({month:i.value.getMonth(),year:i.value.getFullYear(),formatted:{month:c.getLocalizedNameOfMonth(i.value,"long"),year:c.getLocalizedDateString(i.value).split("/").pop()}})),fe=n.computed(()=>Array.from({length:12},(re,ge)=>{const we=new Date(ae.value.year,ge,1);return{name:c.getLocalizedNameOfMonth(we,"short"),value:ge,disabled:m(ae.value.year,ge)}})),pe=n.computed(()=>{const re=ae.value.year-10;return Array.from({length:18},(ge,we)=>({value:re+we,disabled:p(re+we)}))}),Ce=n.computed(()=>{const re=new Date;return re.setDate(re.getDate()-re.getDay()+(o.firstDayOfWeek===Jl.MONDAY?1:0)),Array.from({length:7},(ge,we)=>{const Q=new Date(re);return Q.setDate(re.getDate()+we),c.getLocalizedNameOfWeekday(Q,"short")})}),Be=re=>!re||!g.value?!1:re.getFullYear()===g.value.getFullYear()&&re.getMonth()===g.value.getMonth()&&re.getDate()===g.value.getDate(),Ee=re=>re?c.dateIsToday(re):!1,_e=re=>c.isTrailingOrLeadingDate(re,i.value.getMonth()),Ae=n.computed(()=>re=>!re||!Array.isArray(a.value)||!a.value.length?!1:a.value.some(ge=>{const we=u(ge);return we?re.getFullYear()===we.getFullYear()&&re.getMonth()===we.getMonth()&&re.getDate()===we.getDate():!1}));return{currentMonthDays:J,currentMonthValue:ae,months:fe,years:pe,weekDays:Ce,isSelected:Be,isToday:Ee,isNotInMonth:_e,isHighlighted:Ae}}function v(){return{selectMonth:Ee=>{i.value=new Date(i.value.getFullYear(),Ee,1),s.value="days"},selectYear:Ee=>{i.value=new Date(Ee,i.value.getMonth(),1),s.value="months"},previousMonth:()=>{i.value=new Date(i.value.getFullYear(),i.value.getMonth()-1,1)},nextMonth:()=>{i.value=new Date(i.value.getFullYear(),i.value.getMonth()+1,1)},previousYear:()=>{const Ee=s.value==="months"?1:21;i.value=new Date(i.value.getFullYear()-Ee,i.value.getMonth(),1)},nextYear:()=>{const Ee=s.value==="months"?1:21;i.value=new Date(i.value.getFullYear()+Ee,i.value.getMonth(),1)}}}function y(){const J=n.computed(()=>{var Ce;return((Ce=g.value)==null?void 0:Ce.getHours())??0}),ae=n.computed(()=>{var Ce;return((Ce=g.value)==null?void 0:Ce.getMinutes())??0});return{hours:J,minutes:ae,handleHourInput:Ce=>{if(!g.value)return;const Be=new Date(g.value);Be.setHours(Ce),_(Be)},handleMinuteInput:Ce=>{if(!g.value)return;const Be=new Date(g.value);Be.setMinutes(Ce),_(Be)}}}function _(J){if(o.enableTime)r("update:modelValue",J.toISOString());else{const ae=new Date(J);ae.setHours(0,0,0,0),r("update:modelValue",ae.toISOString())}}const{currentMonthDays:$,currentMonthValue:w,months:k,years:S,weekDays:x,isSelected:T,isToday:L,isNotInMonth:I,isHighlighted:E}=b(),{selectMonth:C,selectYear:B,previousMonth:A,nextMonth:M,previousYear:P,nextYear:V}=v(),{hours:oe,minutes:Z,handleHourInput:U,handleMinuteInput:R}=y();function H(J){var ae,fe;if(J)if(o.enableTime){const pe=new Date(J.getFullYear(),J.getMonth(),J.getDate()),Ce=((ae=g.value)==null?void 0:ae.getHours())??new Date().getHours(),Be=((fe=g.value)==null?void 0:fe.getMinutes())??new Date().getMinutes();pe.setHours(Ce),pe.setMinutes(Be),_(pe)}else{const pe=new Date(J.getFullYear(),J.getMonth(),J.getDate());_(pe)}}return(J,ae)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ltr gap-075 m_flex-wrap calendar-container justify-content-center h-100p border p-025",{flex:!J.autoSize}])},[n.createElementVNode("div",u$,[n.createElementVNode("div",d$,[s.value==="days"?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(n.unref(ee),{flat:"",thin:"",icon:"chevron_left",onClick:n.unref(A)},null,8,["onClick"]),n.createElementVNode("div",f$,[n.createVNode(n.unref(ee),{flat:"",thin:"",class:"month-btn",onClick:ae[0]||(ae[0]=fe=>s.value="months")},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(w).formatted.month),1)]),_:1}),n.createVNode(n.unref(ee),{flat:"",thin:"",class:"year-btn",onClick:ae[1]||(ae[1]=fe=>s.value="years")},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(w).formatted.year),1)]),_:1})]),n.createVNode(n.unref(ee),{flat:"",thin:"",icon:"chevron_right",onClick:n.unref(M)},null,8,["onClick"])],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createVNode(n.unref(ee),{flat:"",thin:"",icon:"chevron_left",onClick:n.unref(P)},null,8,["onClick"]),n.createElementVNode("span",p$,n.toDisplayString(n.unref(w).formatted.year),1),n.createVNode(n.unref(ee),{flat:"",thin:"",icon:"chevron_right",onClick:n.unref(V)},null,8,["onClick"])],64))]),s.value==="days"?(n.openBlock(),n.createElementBlock("div",m$,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(x),fe=>(n.openBlock(),n.createElementBlock("div",{key:fe,class:"txt-center txt-12 opacity-6"},n.toDisplayString(fe),1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref($),fe=>(n.openBlock(),n.createElementBlock("button",{key:fe==null?void 0:fe.toISOString(),type:"button",class:n.normalizeClass(["day aspect-ratio-1 flex align-items-center justify-content-center pointer round txt14 p-0",{selected:n.unref(T)(fe),today:n.unref(L)(fe),disabled:n.unref(h)(fe),"not-in-month":n.unref(I)(fe),highlighted:n.unref(E)(fe)}]),disabled:n.unref(h)(fe),onClick:pe=>H(fe)},n.toDisplayString(fe==null?void 0:fe.getDate()),11,h$))),128))])):s.value==="months"?(n.openBlock(),n.createElementBlock("div",g$,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(k),fe=>(n.openBlock(),n.createBlock(n.unref(ee),{key:fe.value,thin:"",flat:fe.value!==n.unref(w).month,disabled:fe.disabled,value:fe.name,onClick:pe=>n.unref(C)(fe.value)},null,8,["flat","disabled","value","onClick"]))),128))])):(n.openBlock(),n.createElementBlock("div",v$,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(S),fe=>(n.openBlock(),n.createBlock(n.unref(ee),{key:fe.value,thin:"",flat:fe.value!==n.unref(w).year,disabled:fe.disabled,value:fe.value.toString(),onClick:pe=>n.unref(B)(fe.value)},null,8,["flat","disabled","value","onClick"]))),128))]))]),J.enableTime&&s.value==="days"?(n.openBlock(),n.createElementBlock("div",y$,[n.createElementVNode("div",b$,[n.createVNode(n.unref(Yn),{center:"",modelValue:n.unref(oe),disabled:!n.unref(g),min:0,max:23,layout:"vertical",padZero:2,"onUpdate:modelValue":n.unref(U)},null,8,["modelValue","disabled","onUpdate:modelValue"]),ae[2]||(ae[2]=n.createElementVNode("p",{class:"pb-075"}," : ",-1)),n.createVNode(n.unref(Yn),{center:"",modelValue:n.unref(Z),disabled:!n.unref(g),min:0,max:59,padZero:2,layout:"vertical","onUpdate:modelValue":n.unref(R)},null,8,["modelValue","disabled","onUpdate:modelValue"])])])):n.createCommentVNode("",!0)],2))}}),Ph=xe(_$,[["__scopeId","data-v-1c10c38c"]]),w$={key:0,class:"label-text"},$$={key:0},Da=n.defineComponent({__name:"DateInput",props:n.mergeModels({required:{type:Boolean},label:{},placeholder:{},editMode:{type:Boolean,default:!0},small:{type:Boolean,default:!1},enableTime:{type:Boolean,default:!1},modelValue:{},min:{},max:{},mode:{default:()=>({mode:"day"})},defaultValue:{},firstDayOfWeek:{default:Jl.SUNDAY},locale:{default:""},center:{type:Boolean},error:{},underlined:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{$t:o}=Tt(),r=n.useModel(e,"modelValue"),a=n.ref(""),l=n.ref(!0),i=n.ref(!1),s=n.ref(!1);let c=!1;const u=n.ref(null),d=n.ref(null);function f(w){return w===void 0||w===""?"":St(w,{format:t.enableTime?"DD.MM.YY HH:mm":"DD.MM.YY"})}function h(w){const k=new Date(w);if(!Number.isNaN(k.getTime()))return k;const S=w.split(/[/.-]/);if(S.length===3){const[x,T,L]=S.map(I=>Number.parseInt(I,10));if(!Number.isNaN(x)&&!Number.isNaN(T)&&!Number.isNaN(L)){const I=new Date(L,T-1,x);if(I.getFullYear()===L&&I.getMonth()===T-1&&I.getDate()===x)return I}}return null}function m(w){if(t.enableTime)return w.toISOString();const k=new Date(w);return k.setHours(0,0,0,0),k.toISOString().split("T")[0]}function p(){i.value||(a.value=r.value!==void 0?f(r.value):"")}function g(w){const k=w.target;i.value=!0;const x=k.value.replace(/[^\d.]/g,"").split(".");let T=x.slice(0,3).join(".");(T.length===2&&!T.includes(".")||T.length===5&&x.length===2)&&(T+="."),a.value=T,k.value!==T&&(k.value=T);const L=h(T);L!==null?(r.value=m(L),l.value=!0):T.length===0?(r.value=void 0,l.value=!0):l.value=!1}function b(){c||(s.value=!0)}function v(){i.value=!1,a.value.length===0?(r.value=void 0,l.value=!0):r.value!==void 0?(a.value=f(r.value),l.value=!0):l.value=!1,setTimeout(()=>{var w;(w=d.value)!=null&&w.contains(document.activeElement)||(c=!0,s.value=!1,setTimeout(()=>{c=!1},200))},100)}function y(w){const{key:k,shiftKey:S}=w;if(k==="Escape")s.value=!1,i.value=!1,a.value=r.value!==void 0?f(r.value):"",l.value=!0;else if(k==="Enter")i.value=!1,r.value!==void 0&&(a.value=f(r.value)),s.value=!1;else if(k==="ArrowUp"||k==="ArrowDown"){w.preventDefault();const x=r.value!==void 0?new Date(r.value):new Date,T=k==="ArrowUp"?1:-1;S?x.setMonth(x.getMonth()+T):x.setDate(x.getDate()+T),r.value=m(x),a.value=f(x)}}function _(){s.value=!s.value}n.watch(()=>r.value,p,{immediate:!0});const $=n.computed(()=>a.value.length>0);return d1(u,()=>{c=!0,s.value=!1,setTimeout(()=>{c=!1},200)},{ignore:[d]}),n.onMounted(()=>{r.value===void 0&&t.defaultValue!==void 0&&(r.value=t.defaultValue)}),(w,k)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input",{small:w.small,"has-error":!!w.error||!l.value,underlined:w.underlined,"has-value":$.value,open:s.value}])},[n.createElementVNode("label",null,[w.label||w.underlined&&w.placeholder?(n.openBlock(),n.createElementBlock("span",w$,[n.createTextVNode(n.toDisplayString(n.unref(je)(w.label||w.placeholder)),1),w.required?(n.openBlock(),n.createElementBlock("span",$$," *")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createVNode(n.unref(on),{shown:s.value,placement:"bottom-start",autoHide:!1,triggers:[],noAutoFocus:""},{trigger:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"datePickerRef",ref:u,class:"date-picker-container"},[n.createVNode(n.unref(et),{modelValue:a.value,"onUpdate:modelValue":k[0]||(k[0]=S=>a.value=S),iconStart:"calendar",placeholder:w.underlined?" ":n.unref(je)(w.placeholder)||(w.enableTime?"DD.MM.YY HH:mm":"DD.MM.YY"),required:w.underlined?!1:w.required,disabled:!w.editMode,error:l.value?w.error:n.unref(o)("date.invalidFormat"),class:n.normalizeClass([{"txt-center":w.center},"date-input m-0"]),underlined:w.underlined,onInput:g,onFocus:b,onBlur:v,onClick:k[1]||(k[1]=n.withModifiers(()=>{},["stop"])),onKeydown:y,onIconClick:_},null,8,["modelValue","placeholder","required","disabled","error","class","underlined"])],512)]),default:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"calendarRef",ref:d,class:"date-picker-popup",onClick:k[3]||(k[3]=n.withModifiers(()=>{},["stop"]))},[n.createVNode(Ph,{modelValue:r.value,"onUpdate:modelValue":k[2]||(k[2]=S=>r.value=S),min:w.min,max:w.max,mode:w.mode,firstDayOfWeek:w.firstDayOfWeek,locale:w.locale,enableTime:w.enableTime},null,8,["modelValue","min","max","mode","firstDayOfWeek","locale","enableTime"])],512)]),_:1},8,["shown"])])],2))}}),Ih=["jpeg","png","webp","avif","apng","gif","avifs","svg","bmp","jpg","heic","heif","ico","cur","tif","tiff"],Zl=new RegExp(`(${Ih.join("|")})$`,"i"),Oh=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","ts","m3u8"],Rh=new RegExp(`(${Oh.join("|")})$`,"i"),Bl=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/i,k$=["title"],E$=["for"],C$={key:0,class:"label-text"},S$={key:0},T$={key:1,class:"flex"},N$={key:0,class:"opacity-7 light"},D$={key:2,class:"validating"},x$=["id","name","title","placeholder","disabled","required"],B$={key:0,class:"error-message"},A$=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},validate:{},getFormData:{}},emits:["update:modelValue","debounce"],setup(e,{expose:t,emit:o}){const r=e,a=o,{$t:l}=Tt(),i=["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"],s=["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"],c=n.ref(""),u=n.ref(null),d=n.ref(""),f=n.ref(!1),h=n.ref(!0),m=new Map,p=n.ref();function g(E){if(E){if(!Bl.test(E))return l("email.invalidEmail");if(r.preventFakeEmails&&E.includes("@")){const[,C]=E.split("@");if(C){const B=C.toLowerCase();if(s.includes(B))return"Please use a non-disposable email address"}}if(d.value)return d.value}}const b=tr(()=>{a("debounce",c.value)},700);function v(){if(!p.value||(p.value.setCustomValidity(""),!c.value))return;const E=g(c.value);typeof E=="string"&&p.value.setCustomValidity(E)}async function y(E){var C,B;if(!(!r.serverValidate||!E||!Bl.test(E))){if(m.has(E)){h.value=m.get(E)||!1;return}f.value=!0,d.value="";try{const A=await fetch(`https://api.mailcheck.ai/domain/${E.split("@")[1]}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!A.ok)throw new Error("Validation service unavailable");const M=await A.json(),P=M.status==="valid"||M.has_mx===!0;h.value=P,m.set(E,P),P?(B=p.value)==null||B.setCustomValidity(""):(d.value=l("email.invalidDomain"),(C=p.value)==null||C.setCustomValidity(d.value))}catch(A){console.error("Email validation error:",A)}finally{f.value=!1}}}function _(E){if(!r.autocorrect||!E)return;if(E.includes("@")&&!E.includes(".")){const[M,P]=E.split("@"),V=P.toLowerCase();for(const oe of i)if(oe.startsWith(V)){u.value=`${M}@${oe}`;return}}if(!E.includes("@"))return;const[C,B]=E.split("@"),A=B.toLowerCase();if(i.includes(A)){u.value=null;return}for(const M of i)if(w(A,M)<=2){u.value=`${C}@${M}`.toLowerCase();return}u.value=null}function $(){u.value&&(c.value=u.value,u.value=null,a("update:modelValue",c.value),b())}function w(E,C){const B=[];for(let A=0;A<=E.length;A++)B[A]=[A];for(let A=0;A<=C.length;A++)B[0][A]=A;for(let A=1;A<=E.length;A++)for(let M=1;M<=C.length;M++){const P=E[A-1]===C[M-1]?0:1;B[A][M]=Math.min(B[A-1][M]+1,B[A][M-1]+1,B[A-1][M-1]+P)}return B[E.length][C.length]}const k=tr(()=>y(c.value),1e3);function S(){r.disabled||(u.value=null,v(),r.serverValidate&&k(),a("update:modelValue",c.value),b())}function x(E){_(c.value),r.serverValidate&&Bl.test(c.value)&&y(c.value),r.onFocusout&&r.onFocusout(E)}n.watch(()=>r.modelValue,E=>{E!==c.value&&(c.value=E||"",n.nextTick(()=>{v()}))},{immediate:!0}),n.watch(()=>c.value,()=>{v()},{immediate:!0}),t({focus:()=>{var E;return(E=p.value)==null?void 0:E.focus()},hasFocus:()=>document.activeElement===p.value});const I=n.computed(()=>{const E=c.value;return E!==void 0&&E!==""&&String(E).length>0});return n.onMounted(()=>{r.autofocus&&setTimeout(()=>{var E;return(E=p.value)==null?void 0:E.focus()},10)}),(E,C)=>{const B=n.resolveDirective("pattern");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input text-input",{small:E.small,shrink:E.shrink,underlined:E.underlined,textInputIconWrap:E.icon,txtInputIconStart:E.iconStart,"is-validating":f.value,"has-error":!!E.error,"has-value":I.value}]),title:E.title},[n.createElementVNode("label",{for:E.id},[E.label||E.underlined&&E.placeholder?(n.openBlock(),n.createElementBlock("span",C$,[n.createTextVNode(n.toDisplayString(n.unref(je)(E.label)||n.unref(je)(E.placeholder)),1),E.required?(n.openBlock(),n.createElementBlock("span",S$," *")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),E.underlined?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",T$,[E.helptext?(n.openBlock(),n.createElementBlock("span",N$,n.toDisplayString(E.helptext),1)):n.createCommentVNode("",!0),u.value?(n.openBlock(),n.createElementBlock("span",{key:1,class:"pointer nowrap inline-block ms-auto color-red txt-10px p-0",onClick:n.withModifiers($,["prevent"])}," did you mean "+n.toDisplayString(u.value)+"? ",1)):n.createCommentVNode("",!0),f.value?(n.openBlock(),n.createElementBlock("span",D$,"Validating email...")):n.createCommentVNode("",!0)])),n.withDirectives(n.createElementVNode("input",n.mergeProps({id:E.id,ref_key:"input",ref:p,"onUpdate:modelValue":C[0]||(C[0]=A=>c.value=A),class:"ltr",name:E.name,title:E.title,autocomplete:"email",type:"email",placeholder:E.underlined?" ":n.unref(je)(E.placeholder)||n.unref(je)(E.label),disabled:E.disabled,required:E.required},E.nativeInputAttrs,{onFocusout:x,onFocus:C[1]||(C[1]=(...A)=>E.onFocus&&E.onFocus(...A)),onInput:S}),null,16,x$),[[n.vModelText,c.value],[B,void 0,"lower"]]),E.iconStart?(n.openBlock(),n.createBlock(n.unref(Te),{key:2,class:n.normalizeClass([{" bottom-1-25 ":E.underlined},"iconStart"]),icon:E.iconStart},null,8,["class","icon"])):n.createCommentVNode("",!0),E.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:3,class:n.normalizeClass({" bottom-1-25 ":E.underlined}),icon:E.icon},null,8,["class","icon"])):n.createCommentVNode("",!0)],8,E$),E.error?(n.openBlock(),n.createElementBlock("div",B$,n.toDisplayString(E.error),1)):n.createCommentVNode("",!0)],10,k$)}}}),Iu=xe(A$,[["__scopeId","data-v-e15766ad"]]),L$=["title"],M$={key:0},V$=["value","placeholder"],P$=n.defineComponent({__name:"JSONInput",props:{description:{default:""},label:{default:""},modelValue:{},placeholder:{default:""},editMode:{type:Boolean,default:!0},small:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t;function r(a){const l=a.target;o("update:modelValue",l.value)}return(a,l)=>{const i=n.resolveComponent("LangText");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input",{small:a.small}]),title:a.description},[a.label?(n.openBlock(),n.createElementBlock("label",M$,[n.createVNode(i,{input:a.label},null,8,["input"])])):n.createCommentVNode("",!0),n.createElementVNode("textarea",{value:a.modelValue,class:n.normalizeClass({"no-edit":!a.editMode}),placeholder:n.unref(je)(a.placeholder),onInput:r},null,42,V$)],10,L$)}}}),I$=xe(P$,[["__scopeId","data-v-bc453691"]]),O$={class:"markdown-editor"},R$={class:"bagel-input mb-0"},F$={key:0,class:"txt10 opacity-6 -mb-1 w100p txt-end"},z$={key:0,class:"flex justify-content-end -mt-025 -mb-05"},U$=n.defineComponent({__name:"MarkdownEditor",props:n.mergeModels({maxLength:{},placeholder:{default:"Enter Text"},label:{default:"Body"},rtl:{type:Boolean},showFormatting:{type:Boolean,default:!0}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const o=n.useModel(e,"modelValue"),r=n.ref(),a=`markdown-editor-${Math.random().toString(36).substring(2,9)}`,l=n.computed(()=>o.value.length);function i(c){var v;const u=(v=r.value)==null?void 0:v.$el.querySelector("textarea");console.log(u);const d=o.value,f=(u==null?void 0:u.selectionStart)??d.length,h=(u==null?void 0:u.selectionEnd)??d.length,m=d.slice(0,f),p=d.slice(h),g=d.slice(f,h);let b="";switch(c){case"bold":b=`*${g||"bold"}*`;break;case"italic":b=`_${g||"italic"}_`;break;case"underline":b=`~${g||"underline"}~`;break;case"code":b=`\`${g||"code"}\``;break;case"pre":b=`\`\`\`${g||"pre"}\`\`\``;break;case"newline":b=`
|
|
151
|
-
`;break;default:b=""}o.value=m+b+p,n.nextTick(()=>{if(u){const y=m.length+b.length;u.setSelectionRange(y,y),u.focus()}})}const s=n.computed(()=>{let c=o.value.replace(/\{\{([^}]+)\}\}/g,(u,d)=>`{{${d.replace(/_/g,"#####")}}}`);return c=c.replace(/```([\s\S]+?)```/g,"<pre>$1</pre>"),c=c.replace(/`([^`]+)`/g,"<code>$1</code>"),c=c.replace(/\*([^*]+)\*/g,"<b>$1</b>"),c=c.replace(/_([^_]+)_/g,"<i>$1</i>"),c=c.replace(/~([^~]+)~/g,"<u>$1</u>"),c=c.replace(/\n/g,"<br>"),c=c.replace(/\{\{([^}]+)\}\}/g,(u,d)=>`{{${d.replace(/#####/g,"_")}}}`),c});return t({html:s}),(c,u)=>(n.openBlock(),n.createElementBlock("div",O$,[n.createElementVNode("div",R$,[c.maxLength?(n.openBlock(),n.createElementBlock("div",F$,n.toDisplayString(l.value)+" / "+n.toDisplayString(c.maxLength),1)):n.createCommentVNode("",!0),c.label?(n.openBlock(),n.createElementBlock("label",{key:1,class:"label",for:a},n.toDisplayString(c.label),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(et),{id:a,ref_key:"textareaRef",ref:r,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),dir:c.rtl?"rtl":"ltr",autoheight:"",placeholder:c.placeholder,maxlength:c.maxLength,class:"m-0"},null,8,["modelValue","dir","placeholder","maxlength"])]),c.showFormatting?(n.openBlock(),n.createElementBlock("div",z$,[n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"format_bold",onClick:u[1]||(u[1]=d=>i("bold"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"format_italic",onClick:u[2]||(u[2]=d=>i("italic"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"format_underlined",onClick:u[3]||(u[3]=d=>i("underline"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"code",onClick:u[4]||(u[4]=d=>i("code"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"notes",onClick:u[5]||(u[5]=d=>i("pre"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"keyboard_return",onClick:u[6]||(u[6]=d=>i("newline"))})])):n.createCommentVNode("",!0)]))}}),H$=xe(U$,[["__scopeId","data-v-6aa897d6"]]),j$=["for"],W$={key:0,class:"block"},q$={class:"label-text"},G$={key:0},Y$=["id","placeholder","disabled","required","readonly","pattern","onKeydown"],X$={key:1,class:"opacity-7 light"},K$={key:5,class:"flex column spinner"},J$={key:0,class:"error-message"},Z$=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:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t,r=n.ref();n.onMounted(()=>{const g=e.modelValue!==void 0?Number.parseFloat(`${e.modelValue}`):void 0,b=e.defaultValue!==void 0?Number.parseFloat(`${e.defaultValue}`):void 0;r.value=g??b});const a=["horizontal","vertical"];function l(...g){var y;const b=g.map(_=>_||0),v=((y=e.step.toString().split(".")[1])==null?void 0:y.length)||0;return Number.parseFloat(b.reduce((_,$)=>_+$,0).toFixed(v))}function i(...g){var _;const b=g.map($=>$||0),v=b.shift()||0,y=((_=e.step.toString().split(".")[1])==null?void 0:_.length)||0;return Number.parseFloat(b.reduce(($,w)=>$-w,v).toFixed(y))}const s=n.computed(()=>e.max===void 0||l(r.value,e.step)<=e.max),c=n.computed(()=>e.min===void 0||i(r.value,e.step)>=e.min);function u(){s.value&&(r.value=l(r.value??0,e.step),o("update:modelValue",r.value))}function d(){c.value&&(r.value=i(r.value||0,e.step),o("update:modelValue",r.value))}function f(g){if(Number.isNaN(g))return"";const v=new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:e.useGrouping}).format(g),[y,_]=v.split("."),$=e.padZero&&e.padZero>y.replace(/,/g,"").length?"0".repeat(e.padZero-y.replace(/,/g,"").length):"";return _?`${$}${y}.${_}`:`${$}${y}`}const h=n.ref("");function m(){const g=h.value.replace(/[^\d.-]/g,""),b=["","-",".","-."].includes(g),v=g.endsWith("."),y=/\.\d*0$/.test(g);if(b||v||y){o("update:modelValue",g==="-"?"-":g);return}r.value=Number.parseFloat(g),h.value=b?"":f(r.value),o("update:modelValue",r.value)}n.watch(()=>r.value,()=>{n.nextTick(()=>{h.value.endsWith(".")||/\.\d*0$/.test(h.value)||(h.value=r.value!==void 0?f(r.value):"")})}),n.watch(()=>e.modelValue,g=>{if(g!==r.value){if(typeof g=="string"&&(g==="-"||g.endsWith("."))){h.value=g;return}r.value=Number.parseFloat(`${g}`)||0}},{immediate:!0});const p=n.computed(()=>{const g=h.value;return!!(g&&String(g).length>0)});return(g,b)=>{const v=n.resolveDirective("pattern");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input num-input",{textInputSpinnerWrap:g.icon||g.spinner,txtInputIconStart:g.iconStart,underlined:g.underlined,"has-error":!!g.error,"has-value":p.value}])},[n.createElementVNode("div",{for:g.id},[g.label||g.underlined&&g.placeholder?(n.openBlock(),n.createElementBlock("label",W$,[n.createElementVNode("span",q$,[n.createTextVNode(n.toDisplayString(n.unref(je)(g.label)||n.unref(je)(g.placeholder)),1),g.required?(n.openBlock(),n.createElementBlock("span",G$," *")):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["gap-025",{"column flex":g.layout==="vertical",flex:g.layout==="horizontal"}])},[g.layout&&a.includes(g.layout)?(n.openBlock(),n.createBlock(n.unref(ee),{key:0,flat:"",icon:"add",class:n.normalizeClass(["radius",[{"bgl-big-ctrl-num-btn":g.layout==="vertical"}]]),tabindex:"-1",onClick:u},null,8,["class"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("input",{id:g.id,"onUpdate:modelValue":b[0]||(b[0]=y=>h.value=y),type:"text",class:n.normalizeClass({"txt-center":g.center,min0:g.layout,"bgl-number-input":g.layout!=="vertical"&&g.layout!=="horizontal"}),placeholder:g.underlined?" ":n.unref(je)(g.placeholder)||n.unref(je)(g.label),disabled:g.disabled,required:g.required,readonly:g.disabled,inputmode:"decimal",autocomplete:"off",pattern:g.useGrouping?"^-?\\d{1,3}(,\\d{3})*(.\\d+)?$":"^-?\\d*.?d*$",autocorrect:"off",spellcheck:"false",onInput:m,onKeydown:[n.withKeys(n.withModifiers(u,["prevent"]),["up"]),n.withKeys(n.withModifiers(d,["prevent"]),["down"])]},null,42,Y$),[[n.vModelText,h.value,void 0,{trim:!0}],[v,void 0,void 0,{number:!0}]]),g.helptext?(n.openBlock(),n.createElementBlock("p",X$,n.toDisplayString(g.helptext),1)):n.createCommentVNode("",!0),g.iconStart?(n.openBlock(),n.createBlock(n.unref(Te),{key:2,class:n.normalizeClass([{" bottom-1-25 ":g.underlined},"iconStart"]),size:"0.9",icon:g.iconStart},null,8,["class","icon"])):n.createCommentVNode("",!0),g.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:3,class:n.normalizeClass({" bottom-1-25 ":g.underlined}),icon:g.icon,size:"0.9"},null,8,["class","icon"])):n.createCommentVNode("",!0),g.layout&&a.includes(g.layout)?(n.openBlock(),n.createBlock(n.unref(ee),{key:4,flat:"",icon:"remove",class:n.normalizeClass(["radius",[{"bgl-big-ctrl-num-btn":g.layout==="vertical"}]]),tabindex:"-1",onClick:d},null,8,["class"])):n.createCommentVNode("",!0),g.spinner&&(!g.layout||!a.includes(g.layout))?(n.openBlock(),n.createElementBlock("div",K$,[n.createVNode(n.unref(ee),{icon:"add",flat:"",thin:"",class:"bgl-ctrl-num-btn ctrl-add top-bgl-ctrl-num-btn",disabled:!s.value,tabindex:"-1",onClick:u},null,8,["disabled"]),n.createVNode(n.unref(ee),{icon:"remove",flat:"",thin:"",class:"bgl-ctrl-num-btn ctrl-remove",disabled:!c.value,tabindex:"-1",onClick:d},null,8,["disabled"])])):n.createCommentVNode("",!0)],2)],8,j$),g.error?(n.openBlock(),n.createElementBlock("div",J$,n.toDisplayString(g.error),1)):n.createCommentVNode("",!0)],2)}}}),Yn=xe(Z$,[["__scopeId","data-v-e46ac8ce"]]),Q$=["value","autofocus","onKeydown","onPaste"],ek={key:0,class:"otp-error-message txt-center txt10 pt-05"},tk=n.defineComponent({__name:"OTP",props:{digitCount:{},default:{},modelValue:{},error:{}},emits:["update:modelValue","complete"],setup(e,{emit:t}){const o=e,r=t,a=n.reactive([]),l=n.ref();function i(d,f){d.preventDefault();const{clipboardData:h}=d,p=[...(h==null?void 0:h.getData("text").replaceAll(/\D/g,""))??""];if(p){for(let g=0;g<p.length;g++){const b=p[g];f+g<a.length&&(a[f+g]=b)}s()}}function s(){r("update:modelValue",a.join("")),u()&&r("complete",a.join(""))}function c(d,f){var g;if(["Tab","ArrowRight","ArrowLeft","Control","Shift","Alt","Meta"].includes(d.key))return;if(["ArrowUp","ArrowDown"].includes(d.key)){d.preventDefault();return}if(d.key==="Backspace"){a[f]=void 0,f!==0&&((g=l.value)==null?void 0:g.children[f-1]).focus(),s();return}/^\d$/.test(d.key)&&(a[f]=d.key,f!==o.digitCount-1&&setTimeout(()=>{var v;((v=l.value)==null?void 0:v.children[f+1]).focus()},10),s())}if(o.default&&o.default.length===o.digitCount)for(let d=0;d<o.digitCount;d++)a[d]=o.default.charAt(d);else for(let d=0;d<o.digitCount;d++)a[d]=void 0;function u(){for(const d of a)if(d===void 0)return!1;return!0}return(d,f)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("div",{ref_key:"otpCont",ref:l,class:n.normalizeClass(["otp_wrap",{"has-error":!!d.error}])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a,(h,m)=>(n.openBlock(),n.createElementBlock("input",{key:m,value:a[m]||"",type:"number",inputmode:"numeric",class:"digit-box",autofocus:m===0,maxlength:"1",pattern:"[0-9]*",oninput:"this.value = this.value.slice(0, 1)",onKeydown:p=>c(p,m),onPaste:p=>i(p,m),onKeyup:f[0]||(f[0]=n.withModifiers(()=>{},["prevent"]))},null,40,Q$))),128))],2),d.error?(n.openBlock(),n.createElementBlock("div",ek,n.toDisplayString(d.error),1)):n.createCommentVNode("",!0)]))}}),nk=xe(tk,[["__scopeId","data-v-1e270082"]]),Sc=(e,t)=>e.push.apply(e,t),Vr=e=>e.sort((t,o)=>t.i-o.i||t.j-o.j),Zd=e=>{const t={};let o=1;return e.forEach(r=>{t[r]=o,o+=1}),t};var ok={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]]};const Qd=2050,ef=1e3,rk=ok,ak=10,lk=1e4,Fh=10,zh=50,Uh=20,Hh=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,ik=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,sk=/^[A-Z\xbf-\xdf]+$/,jh=/^[^a-z\xdf-\xff]+$/,ck=/^[a-z\xdf-\xff]+$/,uk=/^[^A-Z\xbf-\xdf]+$/,dk=/[a-z\xdf-\xff]/,fk=/[A-Z\xbf-\xdf]/,pk=/[^A-Za-z\xbf-\xdf]/gi,mk=/^\d+$/,Ou=new Date().getFullYear(),hk={recentYear:/19\d\d|200\d|201\d|202\d/g},Wh=[" ",",",";",":","|","/","\\","_",".","-"],gk=Wh.length;class vk{match({password:t}){const o=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],r=this.filterNoise(o);return Vr(r)}getMatchesWithSeparator(t){const o=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let a=0;a<=Math.abs(t.length-6);a+=1)for(let l=a+5;l<=a+9&&!(l>=t.length);l+=1){const i=t.slice(a,+l+1||9e9),s=r.exec(i);if(s!=null){const c=this.mapIntegersToDayMonthYear([parseInt(s[1],10),parseInt(s[3],10),parseInt(s[4],10)]);c!=null&&o.push({pattern:"date",token:i,i:a,j:l,separator:s[2],year:c.year,month:c.month,day:c.day})}}return o}getMatchesWithoutSeparator(t){const o=[],r=/^\d{4,8}$/,a=l=>Math.abs(l.year-Ou);for(let l=0;l<=Math.abs(t.length-4);l+=1)for(let i=l+3;i<=l+7&&!(i>=t.length);i+=1){const s=t.slice(l,+i+1||9e9);if(r.exec(s)){const c=[],u=s.length;if(rk[u].forEach(([f,h])=>{const m=this.mapIntegersToDayMonthYear([parseInt(s.slice(0,f),10),parseInt(s.slice(f,h),10),parseInt(s.slice(h),10)]);m!=null&&c.push(m)}),c.length>0){let f=c[0],h=a(c[0]);c.slice(1).forEach(m=>{const p=a(m);p<h&&(f=m,h=p)}),o.push({pattern:"date",token:s,i:l,j:i,separator:"",year:f.year,month:f.month,day:f.day})}}}return o}filterNoise(t){return t.filter(o=>{let r=!1;const a=t.length;for(let l=0;l<a;l+=1){const i=t[l];if(o!==i&&i.i<=o.i&&i.j>=o.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let o=0,r=0,a=0;for(let l=0,i=t.length;l<i;l+=1){const s=t[l];if(s>99&&s<ef||s>Qd)return null;s>31&&(r+=1),s>12&&(o+=1),s<=0&&(a+=1)}return r>=2||o===3||a>=2?null:this.getDayMonth(t)}getDayMonth(t){const o=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],r=o.length;for(let a=0;a<r;a+=1){const[l,i]=o[a];if(ef<=l&&l<=Qd){const s=this.mapIntegersToDayMonth(i);return s!=null?{year:l,month:s.month,day:s.day}:null}}for(let a=0;a<r;a+=1){const[l,i]=o[a],s=this.mapIntegersToDayMonth(i);if(s!=null)return{year:this.twoToFourDigitYear(l),month:s.month,day:s.day}}return null}mapIntegersToDayMonth(t){const o=[t,t.slice().reverse()];for(let r=0;r<o.length;r+=1){const a=o[r],l=a[0],i=a[1];if(l>=1&&l<=31&&i>=1&&i<=12)return{day:l,month:i}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const fo=new Uint32Array(65536),yk=(e,t)=>{const o=e.length,r=t.length,a=1<<o-1;let l=-1,i=0,s=o,c=o;for(;c--;)fo[e.charCodeAt(c)]|=1<<c;for(c=0;c<r;c++){let u=fo[t.charCodeAt(c)];const d=u|i;u|=(u&l)+l^l,i|=~(u|l),l&=u,i&a&&s++,l&a&&s--,i=i<<1|1,l=l<<1|~(d|i),i&=d}for(c=o;c--;)fo[e.charCodeAt(c)]=0;return s},bk=(e,t)=>{const o=t.length,r=e.length,a=[],l=[],i=Math.ceil(o/32),s=Math.ceil(r/32);for(let p=0;p<i;p++)l[p]=-1,a[p]=0;let c=0;for(;c<s-1;c++){let p=0,g=-1;const b=c*32,v=Math.min(32,r)+b;for(let y=b;y<v;y++)fo[e.charCodeAt(y)]|=1<<y;for(let y=0;y<o;y++){const _=fo[t.charCodeAt(y)],$=l[y/32|0]>>>y&1,w=a[y/32|0]>>>y&1,k=_|p,S=((_|w)&g)+g^g|_|w;let x=p|~(S|g),T=g&S;x>>>31^$&&(l[y/32|0]^=1<<y),T>>>31^w&&(a[y/32|0]^=1<<y),x=x<<1|$,T=T<<1|w,g=T|~(k|x),p=x&k}for(let y=b;y<v;y++)fo[e.charCodeAt(y)]=0}let u=0,d=-1;const f=c*32,h=Math.min(32,r-f)+f;for(let p=f;p<h;p++)fo[e.charCodeAt(p)]|=1<<p;let m=r;for(let p=0;p<o;p++){const g=fo[t.charCodeAt(p)],b=l[p/32|0]>>>p&1,v=a[p/32|0]>>>p&1,y=g|u,_=((g|v)&d)+d^d|g|v;let $=u|~(_|d),w=d&_;m+=$>>>r-1&1,m-=w>>>r-1&1,$>>>31^b&&(l[p/32|0]^=1<<p),w>>>31^v&&(a[p/32|0]^=1<<p),$=$<<1|b,w=w<<1|v,d=w|~(y|$),u=$&y}for(let p=f;p<h;p++)fo[e.charCodeAt(p)]=0;return m},_k=(e,t)=>{if(e.length<t.length){const o=t;t=e,e=o}return t.length===0?e.length:e.length<=32?yk(e,t):bk(e,t)},wk=(e,t,o)=>{const r=e.length<=t.length,a=e.length<=o;return r||a?Math.ceil(e.length/4):o},$k=(e,t,o)=>{let r=0;const a=Object.keys(t).find(l=>{const i=wk(e,l,o);if(Math.abs(e.length-l.length)>i)return!1;const s=_k(e,l),c=s<=i;return c&&(r=s),c});return a?{levenshteinDistance:r,levenshteinDistanceEntry:a}:{}};var tf={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},Cs={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class xa{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...o){const r=t.charAt(0);this.children.has(r)||this.children.set(r,new xa([...this.parents,r]));let a=this.children.get(r);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(o),this}getChild(t){return this.children.get(t)}isTerminal(){return!!this.subs}addChild(t){this.hasChild(t)||this.children.set(t,new xa([...this.parents,t]))}hasChild(t){return this.children.has(t)}}var nf=(e,t)=>(Object.entries(e).forEach(([o,r])=>{r.forEach(a=>{t.addSub(a,o)})}),t);class kk{constructor(){this.matchers={},this.l33tTable=tf,this.trieNodeRoot=nf(tf,new xa),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=Cs,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=nf(t.l33tTable,new xa)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let o=!0;return Object.keys(Cs).forEach(r=>{if(r in t){const a=r;Object.keys(Cs[a]).forEach(l=>{l in t[a]||(o=!1)})}else o=!1}),o}setRankedDictionaries(){const t={},o={};Object.keys(this.dictionary).forEach(r=>{t[r]=Zd(this.dictionary[r]),o[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=o}getRankedDictionariesMaxWordSize(t){const o=t.map(r=>typeof r!="string"?r.toString().length:r.length);return o.length===0?0:o.reduce((r,a)=>Math.max(r,a),-1/0)}buildSanitizedRankedDictionary(t){const o=[];return t.forEach(r=>{const a=typeof r;(a==="string"||a==="number"||a==="boolean")&&o.push(r.toString().toLowerCase())}),Zd(o)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const o=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(o),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(o)}addMatcher(t,o){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=o}}const Re=new kk;class Ek{constructor(t){this.defaultMatch=t}match({password:t}){const o=t.split("").reverse().join("");return this.defaultMatch({password:o}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:t.length-1-r.j,j:t.length-1-r.i}))}}class Ck{constructor({substr:t,limit:o,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=o,this.trieRoot=r}getAllPossibleSubsAtIndex(t){const o=[];let r=this.trieRoot;for(let a=t;a<this.substr.length;a+=1){const l=this.substr.charAt(a);if(r=r.getChild(l),!r)break;o.push(r)}return o}helper({onlyFullSub:t,isFullSub:o,index:r,subIndex:a,changes:l,lastSubLetter:i,consecutiveSubCount:s}){if(this.finalPasswords.length>=this.limit)return;if(r===this.substr.length){t===o&&this.finalPasswords.push({password:this.buffer.join(""),changes:l});return}const c=[...this.getAllPossibleSubsAtIndex(r)];let u=!1;for(let d=r+c.length-1;d>=r;d-=1){const f=c[d-r];if(f.isTerminal()){if(i===f.parents.join("")&&s>=3)continue;u=!0;const h=f.subs;for(const m of h){this.buffer.push(m);const p=l.concat({i:a,letter:m,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:o,index:d+1,subIndex:a+m.length,changes:p,lastSubLetter:f.parents.join(""),consecutiveSubCount:i===f.parents.join("")?s+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!u){const d=this.substr.charAt(r);this.buffer.push(d),this.helper({onlyFullSub:t,isFullSub:o&&!u,index:r+1,subIndex:a+1,changes:l,lastSubLetter:i,consecutiveSubCount:s}),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}}const Sk=(e,t,o)=>new Ck({substr:e,limit:t,trieRoot:o}).getAll(),Tk=(e,t,o)=>{const a=e.changes.filter(u=>u.i<t).reduce((u,d)=>u-d.letter.length+d.substitution.length,t),l=e.changes.filter(u=>u.i>=t&&u.i<=o),i=l.reduce((u,d)=>u-d.letter.length+d.substitution.length,o-t+a),s=[],c=[];return l.forEach(u=>{s.findIndex(f=>f.letter===u.letter&&f.substitution===u.substitution)<0&&(s.push({letter:u.letter,substitution:u.substitution}),c.push(`${u.substitution} -> ${u.letter}`))}),{i:a,j:i,subs:s,subDisplay:c.join(", ")}};class Nk{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,o){return t.some(r=>Object.entries(r).every(([a,l])=>a==="subs"||l===o[a]))}match({password:t}){const o=[],r=Sk(t,Re.l33tMaxSubstitutions,Re.trieNodeRoot);let a=!1,l=!0;return r.forEach(i=>{if(a)return;const s=this.defaultMatch({password:i.password,useLevenshtein:l});l=!1,s.forEach(c=>{a||(a=c.i===0&&c.j===t.length-1);const u=Tk(i,c.i,c.j),d=t.slice(u.i,+u.j+1||9e9),f={...c,l33t:!0,token:d,...u},h=this.isAlreadyIncluded(o,f);d.toLowerCase()!==c.matchedWord&&!h&&o.push(f)})}),o.filter(i=>i.token.length>1)}}class Dk{constructor(){this.l33t=new Nk(this.defaultMatch),this.reverse=new Ek(this.defaultMatch)}match({password:t}){const o=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return Vr(o)}defaultMatch({password:t,useLevenshtein:o=!0}){const r=[],a=t.length,l=t.toLowerCase();return Object.keys(Re.rankedDictionaries).forEach(i=>{const s=Re.rankedDictionaries[i],c=Re.rankedDictionariesMaxWordSize[i],u=Math.min(c,a);for(let d=0;d<a;d+=1){const f=Math.min(d+u,a);for(let h=d;h<f;h+=1){const m=l.slice(d,+h+1||9e9),p=m in s;let g={};const b=d===0&&h===a-1;Re.useLevenshteinDistance&&b&&!p&&o&&(g=$k(m,s,Re.levenshteinThreshold));const v=Object.keys(g).length!==0;if(p||v){const y=v?g.levenshteinDistanceEntry:m,_=s[y];r.push({pattern:"dictionary",i:d,j:h,token:t.slice(d,+h+1||9e9),matchedWord:m,rank:_,dictionaryName:i,reversed:!1,l33t:!1,...g})}}}}),r}}class xk{match({password:t,regexes:o=hk}){const r=[];return Object.keys(o).forEach(a=>{const l=o[a];l.lastIndex=0;let i;for(;i=l.exec(t);)if(i){const s=i[0];r.push({pattern:"regex",token:s,i:i.index,j:i.index+i[0].length-1,regexName:a,regexMatch:i})}}),Vr(r)}}var ur={nCk(e,t){let o=e;if(t>o)return 0;if(t===0)return 1;let r=1;for(let a=1;a<=t;a+=1)r*=o,r/=a,o-=1;return r},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 o=2;o<=e;o+=1)t*=o;return t}},Bk=({token:e})=>{let t=ak**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let o;return e.length===1?o=Fh+1:o=zh+1,Math.max(t,o)},Ak=({year:e,separator:t})=>{let r=Math.max(Math.abs(e-Ou),Uh)*365;return t&&(r*=4),r};const Lk=e=>{const t=e.split(""),o=t.filter(i=>i.match(fk)).length,r=t.filter(i=>i.match(dk)).length;let a=0;const l=Math.min(o,r);for(let i=1;i<=l;i+=1)a+=ur.nCk(o+r,i);return a};var Mk=e=>{const t=e.replace(pk,"");if(t.match(uk)||t.toLowerCase()===t)return 1;const o=[Hh,ik,jh],r=o.length;for(let a=0;a<r;a+=1){const l=o[a];if(t.match(l))return 2}return Lk(t)};const of=(e,t)=>{let o=0,r=e.indexOf(t);for(;r>=0;)o+=1,r=e.indexOf(t,r+t.length);return o},Vk=({sub:e,token:t})=>{const o=t.toLowerCase(),r=of(o,e.substitution),a=of(o,e.letter);return{subbedCount:r,unsubbedCount:a}};var Pk=({l33t:e,subs:t,token:o})=>{if(!e)return 1;let r=1;return t.forEach(a=>{const{subbedCount:l,unsubbedCount:i}=Vk({sub:a,token:o});if(l===0||i===0)r*=2;else{const s=Math.min(i,l);let c=0;for(let u=1;u<=s;u+=1)c+=ur.nCk(i+l,u);r*=c}}),r},Ik=({rank:e,reversed:t,l33t:o,subs:r,token:a,dictionaryName:l})=>{const i=e,s=Mk(a),c=Pk({l33t:o,subs:r,token:a}),u=t&&2||1;let d;return l==="diceware"?d=6**5/2:d=i*s*c*u,{baseGuesses:i,uppercaseVariations:s,l33tVariations:c,calculation:d}},Ok=({regexName:e,regexMatch:t,token:o})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in r)return r[e]**o.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-Ou),Uh)}return 0},Rk=({baseGuesses:e,repeatCount:t})=>e*t,Fk=({token:e,ascending:t})=>{const o=e.charAt(0);let r=0;return["a","A","z","Z","0","1","9"].includes(o)?r=4:o.match(/\d/)?r=10:r=26,t||(r*=2),r*e.length};const zk=e=>{let t=0;return Object.keys(e).forEach(o=>{const r=e[o];t+=r.filter(a=>!!a).length}),t/=Object.entries(e).length,t},Uk=({token:e,graph:t,turns:o})=>{const r=Object.keys(Re.graphs[t]).length,a=zk(Re.graphs[t]);let l=0;const i=e.length;for(let s=2;s<=i;s+=1){const c=Math.min(o,s-1);for(let u=1;u<=c;u+=1)l+=ur.nCk(s-1,u-1)*r*a**u}return l};var Hk=({graph:e,token:t,shiftedCount:o,turns:r})=>{let a=Uk({token:t,graph:e,turns:r});if(o){const l=t.length-o;if(o===0||l===0)a*=2;else{let i=0;for(let s=1;s<=Math.min(o,l);s+=1)i+=ur.nCk(o+l,s);a*=i}}return Math.round(a)},jk=()=>gk;const Wk=(e,t)=>{let o=1;return e.token.length<t.length&&(e.token.length===1?o=Fh:o=zh),o},rf={bruteforce:Bk,date:Ak,dictionary:Ik,regex:Ok,repeat:Rk,sequence:Fk,spatial:Hk,separator:jk},qk=(e,t)=>rf[e]?rf[e](t):Re.matchers[e]&&"scoring"in Re.matchers[e]?Re.matchers[e].scoring(t):0;var Gk=(e,t)=>{const o={};if("guesses"in e&&e.guesses!=null)return e;const r=Wk(e,t),a=qk(e.pattern,e);let l=0;typeof a=="number"?l=a:e.pattern==="dictionary"&&(l=a.calculation,o.baseGuesses=a.baseGuesses,o.uppercaseVariations=a.uppercaseVariations,o.l33tVariations=a.l33tVariations);const i=Math.max(l,r);return{...e,...o,guesses:i,guessesLog10:ur.log10(i)}};const sn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const o=[];for(let r=0;r<e;r+=1){let a=[];t==="object"&&(a={}),o.push(a)}return o},makeBruteforceMatch(e,t){return{pattern:"bruteforce",token:this.password.slice(e,+t+1||9e9),i:e,j:t}},update(e,t){const o=e.j,r=Gk(e,this.password);let a=r.guesses;t>1&&(a*=this.optimal.pi[r.i-1][t-1]);let l=ur.factorial(t)*a;this.excludeAdditive||(l+=lk**(t-1));let i=!1;Object.keys(this.optimal.g[o]).forEach(s=>{const c=this.optimal.g[o][s];parseInt(s,10)<=t&&c<=l&&(i=!0)}),i||(this.optimal.g[o][t]=l,this.optimal.m[o][t]=r,this.optimal.pi[o][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let o=1;o<=e;o+=1){t=this.makeBruteforceMatch(o,e);const r=this.optimal.m[o-1];Object.keys(r).forEach(a=>{r[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let o=e-1,r=0,a=1/0;const l=this.optimal.g[o];for(l&&Object.keys(l).forEach(i=>{const s=l[i];s<a&&(r=parseInt(i,10),a=s)});o>=0;){const i=this.optimal.m[o][r];t.unshift(i),o=i.i-1,r-=1}return t}};var Tc={mostGuessableMatchSequence(e,t,o=!1){sn.password=e,sn.excludeAdditive=o;const r=e.length;let a=sn.fillArray(r,"array");t.forEach(c=>{a[c.j].push(c)}),a=a.map(c=>c.sort((u,d)=>u.i-d.i)),sn.optimal={m:sn.fillArray(r,"object"),pi:sn.fillArray(r,"object"),g:sn.fillArray(r,"object")};for(let c=0;c<r;c+=1)a[c].forEach(u=>{u.i>0?Object.keys(sn.optimal.m[u.i-1]).forEach(d=>{sn.update(u,parseInt(d,10)+1)}):sn.update(u,1)}),sn.bruteforceUpdate(c);const l=sn.unwind(r),i=l.length,s=this.getGuesses(e,i);return{password:e,guesses:s,guessesLog10:ur.log10(s),sequence:l}},getGuesses(e,t){const o=e.length;let r=0;return e.length===0?r=1:r=sn.optimal.g[o-1][t],r}};class Yk{match({password:t,omniMatch:o}){const r=[];let a=0;for(;a<t.length;){const i=this.getGreedyMatch(t,a),s=this.getLazyMatch(t,a);if(i==null)break;const{match:c,baseToken:u}=this.setMatchToken(i,s);if(c){const d=c.index+c[0].length-1,f=this.getBaseGuesses(u,o);r.push(this.normalizeMatch(u,d,c,f)),a=d+1}}return r.some(i=>i instanceof Promise)?Promise.all(r):r}normalizeMatch(t,o,r,a){const l={pattern:"repeat",i:r.index,j:o,token:r[0],baseToken:t,baseGuesses:0,repeatCount:r[0].length/t.length};return a instanceof Promise?a.then(i=>({...l,baseGuesses:i})):{...l,baseGuesses:a}}getGreedyMatch(t,o){const r=/(.+)\1+/g;return r.lastIndex=o,r.exec(t)}getLazyMatch(t,o){const r=/(.+?)\1+/g;return r.lastIndex=o,r.exec(t)}setMatchToken(t,o){const r=/^(.+?)\1+$/;let a,l="";if(o&&t[0].length>o[0].length){a=t;const i=r.exec(a[0]);i&&(l=i[1])}else a=o,a&&(l=a[1]);return{match:a,baseToken:l}}getBaseGuesses(t,o){const r=o.match(t);return r instanceof Promise?r.then(l=>Tc.mostGuessableMatchSequence(t,l).guesses):Tc.mostGuessableMatchSequence(t,r).guesses}}class Xk{constructor(){this.MAX_DELTA=5}match({password:t}){const o=[];if(t.length===1)return[];let r=0,a=null;const l=t.length;for(let i=1;i<l;i+=1){const s=t.charCodeAt(i)-t.charCodeAt(i-1);if(a==null&&(a=s),s!==a){const c=i-1;this.update({i:r,j:c,delta:a,password:t,result:o}),r=c,a=s}}return this.update({i:r,j:l-1,delta:a,password:t,result:o}),o}update({i:t,j:o,delta:r,password:a,result:l}){if(o-t>1||Math.abs(r)===1){const i=Math.abs(r);if(i>0&&i<=this.MAX_DELTA){const s=a.slice(t,+o+1||9e9),{sequenceName:c,sequenceSpace:u}=this.getSequence(s);return l.push({pattern:"sequence",i:t,j:o,token:a.slice(t,+o+1||9e9),sequenceName:c,sequenceSpace:u,ascending:r>0})}}return null}getSequence(t){let o="unicode",r=26;return ck.test(t)?(o="lower",r=26):sk.test(t)?(o="upper",r=26):mk.test(t)&&(o="digits",r=10),{sequenceName:o,sequenceSpace:r}}}class Kk{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const o=[];return Object.keys(Re.graphs).forEach(r=>{const a=Re.graphs[r];Sc(o,this.helper(t,a,r))}),Vr(o)}checkIfShifted(t,o,r){return!t.includes("keypad")&&this.SHIFTED_RX.test(o.charAt(r))?1:0}helper(t,o,r){let a;const l=[];let i=0;const s=t.length;for(;i<s-1;){let c=i+1,u=null,d=0;for(a=this.checkIfShifted(r,t,i);;){const f=t.charAt(c-1),h=o[f]||[];let m=!1,p=-1,g=-1;if(c<s){const b=t.charAt(c),v=h.length;for(let y=0;y<v;y+=1){const _=h[y];if(g+=1,_){const $=_.indexOf(b);if($!==-1){m=!0,p=g,$===1&&(a+=1),u!==p&&(d+=1,u=p);break}}}}if(m)c+=1;else{c-i>2&&l.push({pattern:"spatial",i,j:c-1,token:t.slice(i,c),graph:r,turns:d,shiftedCount:a}),i=c;break}}}return l}}const Jk=new RegExp(`[${Wh.join("")}]`);class Ql{static getMostUsedSeparatorChar(t){const o=[...t.split("").filter(a=>Jk.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,s])=>s-l);if(!o.length)return;const r=o[0];if(!(r[1]<2))return r[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
|
|
151
|
+
`;break;default:b=""}o.value=m+b+p,n.nextTick(()=>{if(u){const y=m.length+b.length;u.setSelectionRange(y,y),u.focus()}})}const s=n.computed(()=>{let c=o.value.replace(/\{\{([^}]+)\}\}/g,(u,d)=>`{{${d.replace(/_/g,"#####")}}}`);return c=c.replace(/```([\s\S]+?)```/g,"<pre>$1</pre>"),c=c.replace(/`([^`]+)`/g,"<code>$1</code>"),c=c.replace(/\*([^*]+)\*/g,"<b>$1</b>"),c=c.replace(/_([^_]+)_/g,"<i>$1</i>"),c=c.replace(/~([^~]+)~/g,"<u>$1</u>"),c=c.replace(/\n/g,"<br>"),c=c.replace(/\{\{([^}]+)\}\}/g,(u,d)=>`{{${d.replace(/#####/g,"_")}}}`),c});return t({html:s}),(c,u)=>(n.openBlock(),n.createElementBlock("div",O$,[n.createElementVNode("div",R$,[c.maxLength?(n.openBlock(),n.createElementBlock("div",F$,n.toDisplayString(l.value)+" / "+n.toDisplayString(c.maxLength),1)):n.createCommentVNode("",!0),c.label?(n.openBlock(),n.createElementBlock("label",{key:1,class:"label",for:a},n.toDisplayString(c.label),1)):n.createCommentVNode("",!0),n.createVNode(n.unref(et),{id:a,ref_key:"textareaRef",ref:r,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),dir:c.rtl?"rtl":"ltr",autoheight:"",placeholder:c.placeholder,maxlength:c.maxLength,class:"m-0"},null,8,["modelValue","dir","placeholder","maxlength"])]),c.showFormatting?(n.openBlock(),n.createElementBlock("div",z$,[n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"format_bold",onClick:u[1]||(u[1]=d=>i("bold"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"format_italic",onClick:u[2]||(u[2]=d=>i("italic"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"format_underlined",onClick:u[3]||(u[3]=d=>i("underline"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"code",onClick:u[4]||(u[4]=d=>i("code"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"notes",onClick:u[5]||(u[5]=d=>i("pre"))}),n.createVNode(n.unref(ee),{thin:"","icon-size":"0.9",flat:"",icon:"keyboard_return",onClick:u[6]||(u[6]=d=>i("newline"))})])):n.createCommentVNode("",!0)]))}}),H$=xe(U$,[["__scopeId","data-v-6aa897d6"]]),j$=["for"],W$={key:0,class:"block"},q$={class:"label-text"},G$={key:0},Y$=["id","placeholder","disabled","required","readonly","pattern","onKeydown"],X$={key:1,class:"opacity-7 light"},K$={key:5,class:"flex column spinner"},J$={key:0,class:"error-message"},Z$=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:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t,r=n.ref();n.onMounted(()=>{const g=e.modelValue!==void 0?Number.parseFloat(`${e.modelValue}`):void 0,b=e.defaultValue!==void 0?Number.parseFloat(`${e.defaultValue}`):void 0;r.value=g??b});const a=["horizontal","vertical"];function l(...g){var y;const b=g.map(_=>_||0),v=((y=e.step.toString().split(".")[1])==null?void 0:y.length)||0;return Number.parseFloat(b.reduce((_,$)=>_+$,0).toFixed(v))}function i(...g){var _;const b=g.map($=>$||0),v=b.shift()||0,y=((_=e.step.toString().split(".")[1])==null?void 0:_.length)||0;return Number.parseFloat(b.reduce(($,w)=>$-w,v).toFixed(y))}const s=n.computed(()=>e.max===void 0||l(r.value,e.step)<=e.max),c=n.computed(()=>e.min===void 0||i(r.value,e.step)>=e.min);function u(){s.value&&(r.value=l(r.value??0,e.step),o("update:modelValue",r.value))}function d(){c.value&&(r.value=i(r.value||0,e.step),o("update:modelValue",r.value))}function f(g){if(Number.isNaN(g))return"";const v=new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:e.useGrouping}).format(g),[y,_]=v.split("."),$=e.padZero&&e.padZero>y.replace(/,/g,"").length?"0".repeat(e.padZero-y.replace(/,/g,"").length):"";return _?`${$}${y}.${_}`:`${$}${y}`}const h=n.ref("");function m(){const g=h.value.replace(/[^\d.-]/g,""),b=["","-",".","-."].includes(g),v=g.endsWith("."),y=/\.\d*0$/.test(g);if(b||v||y){o("update:modelValue",g==="-"?"-":g);return}r.value=Number.parseFloat(g),h.value=b?"":f(r.value),o("update:modelValue",r.value)}n.watch(()=>r.value,()=>{n.nextTick(()=>{h.value.endsWith(".")||/\.\d*0$/.test(h.value)||(h.value=r.value!==void 0?f(r.value):"")})}),n.watch(()=>e.modelValue,g=>{if(g!==r.value){if(typeof g=="string"&&(g==="-"||g.endsWith("."))){h.value=g;return}r.value=Number.parseFloat(`${g}`)||0}},{immediate:!0});const p=n.computed(()=>{const g=h.value;return!!(g&&String(g).length>0)});return(g,b)=>{const v=n.resolveDirective("pattern");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input num-input",{textInputSpinnerWrap:g.icon||g.spinner,txtInputIconStart:g.iconStart,underlined:g.underlined,"has-error":!!g.error,"has-value":p.value}])},[n.createElementVNode("div",{for:g.id},[g.label||g.underlined&&g.placeholder?(n.openBlock(),n.createElementBlock("label",W$,[n.createElementVNode("span",q$,[n.createTextVNode(n.toDisplayString(n.unref(je)(g.label)||n.unref(je)(g.placeholder)),1),g.required?(n.openBlock(),n.createElementBlock("span",G$," *")):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["gap-025",{"column flex":g.layout==="vertical",flex:g.layout==="horizontal"}])},[g.layout&&a.includes(g.layout)?(n.openBlock(),n.createBlock(n.unref(ee),{key:0,flat:"",icon:"add",class:n.normalizeClass(["radius",[{"bgl-big-ctrl-num-btn":g.layout==="vertical"}]]),tabindex:"-1",onClick:u},null,8,["class"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("input",{id:g.id,"onUpdate:modelValue":b[0]||(b[0]=y=>h.value=y),type:"text",class:n.normalizeClass({"txt-center":g.center,min0:g.layout,"bgl-number-input":g.layout!=="vertical"&&g.layout!=="horizontal"}),placeholder:g.underlined?" ":n.unref(je)(g.placeholder)||n.unref(je)(g.label),disabled:g.disabled,required:g.required,readonly:g.disabled,inputmode:"decimal",autocomplete:"off",pattern:g.useGrouping?"^-?\\d{1,3}(,\\d{3})*(.\\d+)?$":"^-?\\d*.?d*$",autocorrect:"off",spellcheck:"false",onInput:m,onKeydown:[n.withKeys(n.withModifiers(u,["prevent"]),["up"]),n.withKeys(n.withModifiers(d,["prevent"]),["down"])]},null,42,Y$),[[n.vModelText,h.value,void 0,{trim:!0}],[v,void 0,void 0,{number:!0}]]),g.helptext?(n.openBlock(),n.createElementBlock("p",X$,n.toDisplayString(g.helptext),1)):n.createCommentVNode("",!0),g.iconStart?(n.openBlock(),n.createBlock(n.unref(Te),{key:2,class:n.normalizeClass([{" bottom-1-25 ":g.underlined},"iconStart"]),size:"0.9",icon:g.iconStart},null,8,["class","icon"])):n.createCommentVNode("",!0),g.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:3,class:n.normalizeClass({" bottom-1-25 ":g.underlined}),icon:g.icon,size:"0.9"},null,8,["class","icon"])):n.createCommentVNode("",!0),g.layout&&a.includes(g.layout)?(n.openBlock(),n.createBlock(n.unref(ee),{key:4,flat:"",icon:"remove",class:n.normalizeClass(["radius",[{"bgl-big-ctrl-num-btn":g.layout==="vertical"}]]),tabindex:"-1",onClick:d},null,8,["class"])):n.createCommentVNode("",!0),g.spinner&&(!g.layout||!a.includes(g.layout))?(n.openBlock(),n.createElementBlock("div",K$,[n.createVNode(n.unref(ee),{icon:"add",flat:"",thin:"",class:"bgl-ctrl-num-btn ctrl-add top-bgl-ctrl-num-btn",disabled:!s.value,tabindex:"-1",onClick:u},null,8,["disabled"]),n.createVNode(n.unref(ee),{icon:"remove",flat:"",thin:"",class:"bgl-ctrl-num-btn ctrl-remove",disabled:!c.value,tabindex:"-1",onClick:d},null,8,["disabled"])])):n.createCommentVNode("",!0)],2)],8,j$),g.error?(n.openBlock(),n.createElementBlock("div",J$,n.toDisplayString(g.error),1)):n.createCommentVNode("",!0)],2)}}}),Yn=xe(Z$,[["__scopeId","data-v-e46ac8ce"]]),Q$=["value","autofocus","onKeydown","onPaste"],ek={key:0,class:"otp-error-message txt-center txt10 pt-05"},tk=n.defineComponent({__name:"OTP",props:{digitCount:{},default:{},modelValue:{},error:{}},emits:["update:modelValue","complete"],setup(e,{emit:t}){const o=e,r=t,a=n.reactive([]),l=n.ref();function i(d,f){d.preventDefault();const{clipboardData:h}=d,p=[...(h==null?void 0:h.getData("text").replaceAll(/\D/g,""))??""];if(p){for(let g=0;g<p.length;g++){const b=p[g];f+g<a.length&&(a[f+g]=b)}s()}}function s(){r("update:modelValue",a.join("")),u()&&r("complete",a.join(""))}function c(d,f){var g;if(["Tab","ArrowRight","ArrowLeft","Control","Shift","Alt","Meta"].includes(d.key))return;if(["ArrowUp","ArrowDown"].includes(d.key)){d.preventDefault();return}if(d.key==="Backspace"){a[f]=void 0,f!==0&&((g=l.value)==null?void 0:g.children[f-1]).focus(),s();return}/^\d$/.test(d.key)&&(a[f]=d.key,f!==o.digitCount-1&&setTimeout(()=>{var v;((v=l.value)==null?void 0:v.children[f+1]).focus()},10),s())}if(o.default&&o.default.length===o.digitCount)for(let d=0;d<o.digitCount;d++)a[d]=o.default.charAt(d);else for(let d=0;d<o.digitCount;d++)a[d]=void 0;function u(){for(const d of a)if(d===void 0)return!1;return!0}return(d,f)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("div",{ref_key:"otpCont",ref:l,class:n.normalizeClass(["otp_wrap ltr",{"has-error":!!d.error}])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a,(h,m)=>(n.openBlock(),n.createElementBlock("input",{key:m,value:a[m]||"",type:"number",inputmode:"numeric",class:"digit-box",autofocus:m===0,maxlength:"1",pattern:"[0-9]*",oninput:"this.value = this.value.slice(0, 1)",onKeydown:p=>c(p,m),onPaste:p=>i(p,m),onKeyup:f[0]||(f[0]=n.withModifiers(()=>{},["prevent"]))},null,40,Q$))),128))],2),d.error?(n.openBlock(),n.createElementBlock("div",ek,n.toDisplayString(d.error),1)):n.createCommentVNode("",!0)]))}}),nk=xe(tk,[["__scopeId","data-v-27baff3c"]]),Sc=(e,t)=>e.push.apply(e,t),Vr=e=>e.sort((t,o)=>t.i-o.i||t.j-o.j),Zd=e=>{const t={};let o=1;return e.forEach(r=>{t[r]=o,o+=1}),t};var ok={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]]};const Qd=2050,ef=1e3,rk=ok,ak=10,lk=1e4,Fh=10,zh=50,Uh=20,Hh=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,ik=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,sk=/^[A-Z\xbf-\xdf]+$/,jh=/^[^a-z\xdf-\xff]+$/,ck=/^[a-z\xdf-\xff]+$/,uk=/^[^A-Z\xbf-\xdf]+$/,dk=/[a-z\xdf-\xff]/,fk=/[A-Z\xbf-\xdf]/,pk=/[^A-Za-z\xbf-\xdf]/gi,mk=/^\d+$/,Ou=new Date().getFullYear(),hk={recentYear:/19\d\d|200\d|201\d|202\d/g},Wh=[" ",",",";",":","|","/","\\","_",".","-"],gk=Wh.length;class vk{match({password:t}){const o=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],r=this.filterNoise(o);return Vr(r)}getMatchesWithSeparator(t){const o=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let a=0;a<=Math.abs(t.length-6);a+=1)for(let l=a+5;l<=a+9&&!(l>=t.length);l+=1){const i=t.slice(a,+l+1||9e9),s=r.exec(i);if(s!=null){const c=this.mapIntegersToDayMonthYear([parseInt(s[1],10),parseInt(s[3],10),parseInt(s[4],10)]);c!=null&&o.push({pattern:"date",token:i,i:a,j:l,separator:s[2],year:c.year,month:c.month,day:c.day})}}return o}getMatchesWithoutSeparator(t){const o=[],r=/^\d{4,8}$/,a=l=>Math.abs(l.year-Ou);for(let l=0;l<=Math.abs(t.length-4);l+=1)for(let i=l+3;i<=l+7&&!(i>=t.length);i+=1){const s=t.slice(l,+i+1||9e9);if(r.exec(s)){const c=[],u=s.length;if(rk[u].forEach(([f,h])=>{const m=this.mapIntegersToDayMonthYear([parseInt(s.slice(0,f),10),parseInt(s.slice(f,h),10),parseInt(s.slice(h),10)]);m!=null&&c.push(m)}),c.length>0){let f=c[0],h=a(c[0]);c.slice(1).forEach(m=>{const p=a(m);p<h&&(f=m,h=p)}),o.push({pattern:"date",token:s,i:l,j:i,separator:"",year:f.year,month:f.month,day:f.day})}}}return o}filterNoise(t){return t.filter(o=>{let r=!1;const a=t.length;for(let l=0;l<a;l+=1){const i=t[l];if(o!==i&&i.i<=o.i&&i.j>=o.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let o=0,r=0,a=0;for(let l=0,i=t.length;l<i;l+=1){const s=t[l];if(s>99&&s<ef||s>Qd)return null;s>31&&(r+=1),s>12&&(o+=1),s<=0&&(a+=1)}return r>=2||o===3||a>=2?null:this.getDayMonth(t)}getDayMonth(t){const o=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],r=o.length;for(let a=0;a<r;a+=1){const[l,i]=o[a];if(ef<=l&&l<=Qd){const s=this.mapIntegersToDayMonth(i);return s!=null?{year:l,month:s.month,day:s.day}:null}}for(let a=0;a<r;a+=1){const[l,i]=o[a],s=this.mapIntegersToDayMonth(i);if(s!=null)return{year:this.twoToFourDigitYear(l),month:s.month,day:s.day}}return null}mapIntegersToDayMonth(t){const o=[t,t.slice().reverse()];for(let r=0;r<o.length;r+=1){const a=o[r],l=a[0],i=a[1];if(l>=1&&l<=31&&i>=1&&i<=12)return{day:l,month:i}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const fo=new Uint32Array(65536),yk=(e,t)=>{const o=e.length,r=t.length,a=1<<o-1;let l=-1,i=0,s=o,c=o;for(;c--;)fo[e.charCodeAt(c)]|=1<<c;for(c=0;c<r;c++){let u=fo[t.charCodeAt(c)];const d=u|i;u|=(u&l)+l^l,i|=~(u|l),l&=u,i&a&&s++,l&a&&s--,i=i<<1|1,l=l<<1|~(d|i),i&=d}for(c=o;c--;)fo[e.charCodeAt(c)]=0;return s},bk=(e,t)=>{const o=t.length,r=e.length,a=[],l=[],i=Math.ceil(o/32),s=Math.ceil(r/32);for(let p=0;p<i;p++)l[p]=-1,a[p]=0;let c=0;for(;c<s-1;c++){let p=0,g=-1;const b=c*32,v=Math.min(32,r)+b;for(let y=b;y<v;y++)fo[e.charCodeAt(y)]|=1<<y;for(let y=0;y<o;y++){const _=fo[t.charCodeAt(y)],$=l[y/32|0]>>>y&1,w=a[y/32|0]>>>y&1,k=_|p,S=((_|w)&g)+g^g|_|w;let x=p|~(S|g),T=g&S;x>>>31^$&&(l[y/32|0]^=1<<y),T>>>31^w&&(a[y/32|0]^=1<<y),x=x<<1|$,T=T<<1|w,g=T|~(k|x),p=x&k}for(let y=b;y<v;y++)fo[e.charCodeAt(y)]=0}let u=0,d=-1;const f=c*32,h=Math.min(32,r-f)+f;for(let p=f;p<h;p++)fo[e.charCodeAt(p)]|=1<<p;let m=r;for(let p=0;p<o;p++){const g=fo[t.charCodeAt(p)],b=l[p/32|0]>>>p&1,v=a[p/32|0]>>>p&1,y=g|u,_=((g|v)&d)+d^d|g|v;let $=u|~(_|d),w=d&_;m+=$>>>r-1&1,m-=w>>>r-1&1,$>>>31^b&&(l[p/32|0]^=1<<p),w>>>31^v&&(a[p/32|0]^=1<<p),$=$<<1|b,w=w<<1|v,d=w|~(y|$),u=$&y}for(let p=f;p<h;p++)fo[e.charCodeAt(p)]=0;return m},_k=(e,t)=>{if(e.length<t.length){const o=t;t=e,e=o}return t.length===0?e.length:e.length<=32?yk(e,t):bk(e,t)},wk=(e,t,o)=>{const r=e.length<=t.length,a=e.length<=o;return r||a?Math.ceil(e.length/4):o},$k=(e,t,o)=>{let r=0;const a=Object.keys(t).find(l=>{const i=wk(e,l,o);if(Math.abs(e.length-l.length)>i)return!1;const s=_k(e,l),c=s<=i;return c&&(r=s),c});return a?{levenshteinDistance:r,levenshteinDistanceEntry:a}:{}};var tf={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},Cs={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class xa{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...o){const r=t.charAt(0);this.children.has(r)||this.children.set(r,new xa([...this.parents,r]));let a=this.children.get(r);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(o),this}getChild(t){return this.children.get(t)}isTerminal(){return!!this.subs}addChild(t){this.hasChild(t)||this.children.set(t,new xa([...this.parents,t]))}hasChild(t){return this.children.has(t)}}var nf=(e,t)=>(Object.entries(e).forEach(([o,r])=>{r.forEach(a=>{t.addSub(a,o)})}),t);class kk{constructor(){this.matchers={},this.l33tTable=tf,this.trieNodeRoot=nf(tf,new xa),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=Cs,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=nf(t.l33tTable,new xa)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let o=!0;return Object.keys(Cs).forEach(r=>{if(r in t){const a=r;Object.keys(Cs[a]).forEach(l=>{l in t[a]||(o=!1)})}else o=!1}),o}setRankedDictionaries(){const t={},o={};Object.keys(this.dictionary).forEach(r=>{t[r]=Zd(this.dictionary[r]),o[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=o}getRankedDictionariesMaxWordSize(t){const o=t.map(r=>typeof r!="string"?r.toString().length:r.length);return o.length===0?0:o.reduce((r,a)=>Math.max(r,a),-1/0)}buildSanitizedRankedDictionary(t){const o=[];return t.forEach(r=>{const a=typeof r;(a==="string"||a==="number"||a==="boolean")&&o.push(r.toString().toLowerCase())}),Zd(o)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const o=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(o),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(o)}addMatcher(t,o){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=o}}const Re=new kk;class Ek{constructor(t){this.defaultMatch=t}match({password:t}){const o=t.split("").reverse().join("");return this.defaultMatch({password:o}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:t.length-1-r.j,j:t.length-1-r.i}))}}class Ck{constructor({substr:t,limit:o,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=o,this.trieRoot=r}getAllPossibleSubsAtIndex(t){const o=[];let r=this.trieRoot;for(let a=t;a<this.substr.length;a+=1){const l=this.substr.charAt(a);if(r=r.getChild(l),!r)break;o.push(r)}return o}helper({onlyFullSub:t,isFullSub:o,index:r,subIndex:a,changes:l,lastSubLetter:i,consecutiveSubCount:s}){if(this.finalPasswords.length>=this.limit)return;if(r===this.substr.length){t===o&&this.finalPasswords.push({password:this.buffer.join(""),changes:l});return}const c=[...this.getAllPossibleSubsAtIndex(r)];let u=!1;for(let d=r+c.length-1;d>=r;d-=1){const f=c[d-r];if(f.isTerminal()){if(i===f.parents.join("")&&s>=3)continue;u=!0;const h=f.subs;for(const m of h){this.buffer.push(m);const p=l.concat({i:a,letter:m,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:o,index:d+1,subIndex:a+m.length,changes:p,lastSubLetter:f.parents.join(""),consecutiveSubCount:i===f.parents.join("")?s+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!u){const d=this.substr.charAt(r);this.buffer.push(d),this.helper({onlyFullSub:t,isFullSub:o&&!u,index:r+1,subIndex:a+1,changes:l,lastSubLetter:i,consecutiveSubCount:s}),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}}const Sk=(e,t,o)=>new Ck({substr:e,limit:t,trieRoot:o}).getAll(),Tk=(e,t,o)=>{const a=e.changes.filter(u=>u.i<t).reduce((u,d)=>u-d.letter.length+d.substitution.length,t),l=e.changes.filter(u=>u.i>=t&&u.i<=o),i=l.reduce((u,d)=>u-d.letter.length+d.substitution.length,o-t+a),s=[],c=[];return l.forEach(u=>{s.findIndex(f=>f.letter===u.letter&&f.substitution===u.substitution)<0&&(s.push({letter:u.letter,substitution:u.substitution}),c.push(`${u.substitution} -> ${u.letter}`))}),{i:a,j:i,subs:s,subDisplay:c.join(", ")}};class Nk{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,o){return t.some(r=>Object.entries(r).every(([a,l])=>a==="subs"||l===o[a]))}match({password:t}){const o=[],r=Sk(t,Re.l33tMaxSubstitutions,Re.trieNodeRoot);let a=!1,l=!0;return r.forEach(i=>{if(a)return;const s=this.defaultMatch({password:i.password,useLevenshtein:l});l=!1,s.forEach(c=>{a||(a=c.i===0&&c.j===t.length-1);const u=Tk(i,c.i,c.j),d=t.slice(u.i,+u.j+1||9e9),f={...c,l33t:!0,token:d,...u},h=this.isAlreadyIncluded(o,f);d.toLowerCase()!==c.matchedWord&&!h&&o.push(f)})}),o.filter(i=>i.token.length>1)}}class Dk{constructor(){this.l33t=new Nk(this.defaultMatch),this.reverse=new Ek(this.defaultMatch)}match({password:t}){const o=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return Vr(o)}defaultMatch({password:t,useLevenshtein:o=!0}){const r=[],a=t.length,l=t.toLowerCase();return Object.keys(Re.rankedDictionaries).forEach(i=>{const s=Re.rankedDictionaries[i],c=Re.rankedDictionariesMaxWordSize[i],u=Math.min(c,a);for(let d=0;d<a;d+=1){const f=Math.min(d+u,a);for(let h=d;h<f;h+=1){const m=l.slice(d,+h+1||9e9),p=m in s;let g={};const b=d===0&&h===a-1;Re.useLevenshteinDistance&&b&&!p&&o&&(g=$k(m,s,Re.levenshteinThreshold));const v=Object.keys(g).length!==0;if(p||v){const y=v?g.levenshteinDistanceEntry:m,_=s[y];r.push({pattern:"dictionary",i:d,j:h,token:t.slice(d,+h+1||9e9),matchedWord:m,rank:_,dictionaryName:i,reversed:!1,l33t:!1,...g})}}}}),r}}class xk{match({password:t,regexes:o=hk}){const r=[];return Object.keys(o).forEach(a=>{const l=o[a];l.lastIndex=0;let i;for(;i=l.exec(t);)if(i){const s=i[0];r.push({pattern:"regex",token:s,i:i.index,j:i.index+i[0].length-1,regexName:a,regexMatch:i})}}),Vr(r)}}var ur={nCk(e,t){let o=e;if(t>o)return 0;if(t===0)return 1;let r=1;for(let a=1;a<=t;a+=1)r*=o,r/=a,o-=1;return r},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 o=2;o<=e;o+=1)t*=o;return t}},Bk=({token:e})=>{let t=ak**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let o;return e.length===1?o=Fh+1:o=zh+1,Math.max(t,o)},Ak=({year:e,separator:t})=>{let r=Math.max(Math.abs(e-Ou),Uh)*365;return t&&(r*=4),r};const Lk=e=>{const t=e.split(""),o=t.filter(i=>i.match(fk)).length,r=t.filter(i=>i.match(dk)).length;let a=0;const l=Math.min(o,r);for(let i=1;i<=l;i+=1)a+=ur.nCk(o+r,i);return a};var Mk=e=>{const t=e.replace(pk,"");if(t.match(uk)||t.toLowerCase()===t)return 1;const o=[Hh,ik,jh],r=o.length;for(let a=0;a<r;a+=1){const l=o[a];if(t.match(l))return 2}return Lk(t)};const of=(e,t)=>{let o=0,r=e.indexOf(t);for(;r>=0;)o+=1,r=e.indexOf(t,r+t.length);return o},Vk=({sub:e,token:t})=>{const o=t.toLowerCase(),r=of(o,e.substitution),a=of(o,e.letter);return{subbedCount:r,unsubbedCount:a}};var Pk=({l33t:e,subs:t,token:o})=>{if(!e)return 1;let r=1;return t.forEach(a=>{const{subbedCount:l,unsubbedCount:i}=Vk({sub:a,token:o});if(l===0||i===0)r*=2;else{const s=Math.min(i,l);let c=0;for(let u=1;u<=s;u+=1)c+=ur.nCk(i+l,u);r*=c}}),r},Ik=({rank:e,reversed:t,l33t:o,subs:r,token:a,dictionaryName:l})=>{const i=e,s=Mk(a),c=Pk({l33t:o,subs:r,token:a}),u=t&&2||1;let d;return l==="diceware"?d=6**5/2:d=i*s*c*u,{baseGuesses:i,uppercaseVariations:s,l33tVariations:c,calculation:d}},Ok=({regexName:e,regexMatch:t,token:o})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in r)return r[e]**o.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-Ou),Uh)}return 0},Rk=({baseGuesses:e,repeatCount:t})=>e*t,Fk=({token:e,ascending:t})=>{const o=e.charAt(0);let r=0;return["a","A","z","Z","0","1","9"].includes(o)?r=4:o.match(/\d/)?r=10:r=26,t||(r*=2),r*e.length};const zk=e=>{let t=0;return Object.keys(e).forEach(o=>{const r=e[o];t+=r.filter(a=>!!a).length}),t/=Object.entries(e).length,t},Uk=({token:e,graph:t,turns:o})=>{const r=Object.keys(Re.graphs[t]).length,a=zk(Re.graphs[t]);let l=0;const i=e.length;for(let s=2;s<=i;s+=1){const c=Math.min(o,s-1);for(let u=1;u<=c;u+=1)l+=ur.nCk(s-1,u-1)*r*a**u}return l};var Hk=({graph:e,token:t,shiftedCount:o,turns:r})=>{let a=Uk({token:t,graph:e,turns:r});if(o){const l=t.length-o;if(o===0||l===0)a*=2;else{let i=0;for(let s=1;s<=Math.min(o,l);s+=1)i+=ur.nCk(o+l,s);a*=i}}return Math.round(a)},jk=()=>gk;const Wk=(e,t)=>{let o=1;return e.token.length<t.length&&(e.token.length===1?o=Fh:o=zh),o},rf={bruteforce:Bk,date:Ak,dictionary:Ik,regex:Ok,repeat:Rk,sequence:Fk,spatial:Hk,separator:jk},qk=(e,t)=>rf[e]?rf[e](t):Re.matchers[e]&&"scoring"in Re.matchers[e]?Re.matchers[e].scoring(t):0;var Gk=(e,t)=>{const o={};if("guesses"in e&&e.guesses!=null)return e;const r=Wk(e,t),a=qk(e.pattern,e);let l=0;typeof a=="number"?l=a:e.pattern==="dictionary"&&(l=a.calculation,o.baseGuesses=a.baseGuesses,o.uppercaseVariations=a.uppercaseVariations,o.l33tVariations=a.l33tVariations);const i=Math.max(l,r);return{...e,...o,guesses:i,guessesLog10:ur.log10(i)}};const sn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const o=[];for(let r=0;r<e;r+=1){let a=[];t==="object"&&(a={}),o.push(a)}return o},makeBruteforceMatch(e,t){return{pattern:"bruteforce",token:this.password.slice(e,+t+1||9e9),i:e,j:t}},update(e,t){const o=e.j,r=Gk(e,this.password);let a=r.guesses;t>1&&(a*=this.optimal.pi[r.i-1][t-1]);let l=ur.factorial(t)*a;this.excludeAdditive||(l+=lk**(t-1));let i=!1;Object.keys(this.optimal.g[o]).forEach(s=>{const c=this.optimal.g[o][s];parseInt(s,10)<=t&&c<=l&&(i=!0)}),i||(this.optimal.g[o][t]=l,this.optimal.m[o][t]=r,this.optimal.pi[o][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let o=1;o<=e;o+=1){t=this.makeBruteforceMatch(o,e);const r=this.optimal.m[o-1];Object.keys(r).forEach(a=>{r[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let o=e-1,r=0,a=1/0;const l=this.optimal.g[o];for(l&&Object.keys(l).forEach(i=>{const s=l[i];s<a&&(r=parseInt(i,10),a=s)});o>=0;){const i=this.optimal.m[o][r];t.unshift(i),o=i.i-1,r-=1}return t}};var Tc={mostGuessableMatchSequence(e,t,o=!1){sn.password=e,sn.excludeAdditive=o;const r=e.length;let a=sn.fillArray(r,"array");t.forEach(c=>{a[c.j].push(c)}),a=a.map(c=>c.sort((u,d)=>u.i-d.i)),sn.optimal={m:sn.fillArray(r,"object"),pi:sn.fillArray(r,"object"),g:sn.fillArray(r,"object")};for(let c=0;c<r;c+=1)a[c].forEach(u=>{u.i>0?Object.keys(sn.optimal.m[u.i-1]).forEach(d=>{sn.update(u,parseInt(d,10)+1)}):sn.update(u,1)}),sn.bruteforceUpdate(c);const l=sn.unwind(r),i=l.length,s=this.getGuesses(e,i);return{password:e,guesses:s,guessesLog10:ur.log10(s),sequence:l}},getGuesses(e,t){const o=e.length;let r=0;return e.length===0?r=1:r=sn.optimal.g[o-1][t],r}};class Yk{match({password:t,omniMatch:o}){const r=[];let a=0;for(;a<t.length;){const i=this.getGreedyMatch(t,a),s=this.getLazyMatch(t,a);if(i==null)break;const{match:c,baseToken:u}=this.setMatchToken(i,s);if(c){const d=c.index+c[0].length-1,f=this.getBaseGuesses(u,o);r.push(this.normalizeMatch(u,d,c,f)),a=d+1}}return r.some(i=>i instanceof Promise)?Promise.all(r):r}normalizeMatch(t,o,r,a){const l={pattern:"repeat",i:r.index,j:o,token:r[0],baseToken:t,baseGuesses:0,repeatCount:r[0].length/t.length};return a instanceof Promise?a.then(i=>({...l,baseGuesses:i})):{...l,baseGuesses:a}}getGreedyMatch(t,o){const r=/(.+)\1+/g;return r.lastIndex=o,r.exec(t)}getLazyMatch(t,o){const r=/(.+?)\1+/g;return r.lastIndex=o,r.exec(t)}setMatchToken(t,o){const r=/^(.+?)\1+$/;let a,l="";if(o&&t[0].length>o[0].length){a=t;const i=r.exec(a[0]);i&&(l=i[1])}else a=o,a&&(l=a[1]);return{match:a,baseToken:l}}getBaseGuesses(t,o){const r=o.match(t);return r instanceof Promise?r.then(l=>Tc.mostGuessableMatchSequence(t,l).guesses):Tc.mostGuessableMatchSequence(t,r).guesses}}class Xk{constructor(){this.MAX_DELTA=5}match({password:t}){const o=[];if(t.length===1)return[];let r=0,a=null;const l=t.length;for(let i=1;i<l;i+=1){const s=t.charCodeAt(i)-t.charCodeAt(i-1);if(a==null&&(a=s),s!==a){const c=i-1;this.update({i:r,j:c,delta:a,password:t,result:o}),r=c,a=s}}return this.update({i:r,j:l-1,delta:a,password:t,result:o}),o}update({i:t,j:o,delta:r,password:a,result:l}){if(o-t>1||Math.abs(r)===1){const i=Math.abs(r);if(i>0&&i<=this.MAX_DELTA){const s=a.slice(t,+o+1||9e9),{sequenceName:c,sequenceSpace:u}=this.getSequence(s);return l.push({pattern:"sequence",i:t,j:o,token:a.slice(t,+o+1||9e9),sequenceName:c,sequenceSpace:u,ascending:r>0})}}return null}getSequence(t){let o="unicode",r=26;return ck.test(t)?(o="lower",r=26):sk.test(t)?(o="upper",r=26):mk.test(t)&&(o="digits",r=10),{sequenceName:o,sequenceSpace:r}}}class Kk{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const o=[];return Object.keys(Re.graphs).forEach(r=>{const a=Re.graphs[r];Sc(o,this.helper(t,a,r))}),Vr(o)}checkIfShifted(t,o,r){return!t.includes("keypad")&&this.SHIFTED_RX.test(o.charAt(r))?1:0}helper(t,o,r){let a;const l=[];let i=0;const s=t.length;for(;i<s-1;){let c=i+1,u=null,d=0;for(a=this.checkIfShifted(r,t,i);;){const f=t.charAt(c-1),h=o[f]||[];let m=!1,p=-1,g=-1;if(c<s){const b=t.charAt(c),v=h.length;for(let y=0;y<v;y+=1){const _=h[y];if(g+=1,_){const $=_.indexOf(b);if($!==-1){m=!0,p=g,$===1&&(a+=1),u!==p&&(d+=1,u=p);break}}}}if(m)c+=1;else{c-i>2&&l.push({pattern:"spatial",i,j:c-1,token:t.slice(i,c),graph:r,turns:d,shiftedCount:a}),i=c;break}}}return l}}const Jk=new RegExp(`[${Wh.join("")}]`);class Ql{static getMostUsedSeparatorChar(t){const o=[...t.split("").filter(a=>Jk.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,s])=>s-l);if(!o.length)return;const r=o[0];if(!(r[1]<2))return r[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
|
|
152
152
|
])(${t})(?!${t})`,"g")}match({password:t}){const o=[];if(t.length===0)return o;const r=Ql.getMostUsedSeparatorChar(t);if(r===void 0)return o;const a=Ql.getSeparatorRegex(r);for(const l of t.matchAll(a)){if(l.index===void 0)continue;const i=l.index+1;o.push({pattern:"separator",token:r,i,j:i})}return o}}class Zk{constructor(){this.matchers={date:vk,dictionary:Dk,regex:xk,repeat:Yk,sequence:Xk,spatial:Kk,separator:Ql}}match(t){const o=[],r=[];return[...Object.keys(this.matchers),...Object.keys(Re.matchers)].forEach(l=>{if(!this.matchers[l]&&!Re.matchers[l])return;const i=this.matchers[l]?this.matchers[l]:Re.matchers[l].Matching,c=new i().match({password:t,omniMatch:this});c instanceof Promise?(c.then(u=>{Sc(o,u)}),r.push(c)):Sc(o,c)}),r.length>0?new Promise((l,i)=>{Promise.all(r).then(()=>{l(Vr(o))}).catch(s=>{i(s)})}):Vr(o)}}const qh=1,Gh=qh*60,Yh=Gh*60,Xh=Yh*24,Kh=Xh*31,Jh=Kh*12,Qk=Jh*100,Ss={second:qh,minute:Gh,hour:Yh,day:Xh,month:Kh,year:Jh,century:Qk};class eE{translate(t,o){let r=t;o!==void 0&&o!==1&&(r+="s");const{timeEstimation:a}=Re.translations;return a[r].replace("{base}",`${o}`)}estimateAttackTimes(t){const o={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(o).forEach(a=>{const l=o[a];r[a]=this.displayTime(l)}),{crackTimesSeconds:o,crackTimesDisplay:r,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let o="centuries",r;const a=Object.keys(Ss),l=a.findIndex(i=>t<Ss[i]);return l>-1&&(o=a[l-1],l!==0?r=Math.round(t/Ss[o]):o="ltSecond"),this.translate(o,r)}}var tE=()=>null,nE=()=>({warning:Re.translations.warnings.dates,suggestions:[Re.translations.suggestions.dates]});const oE=(e,t)=>{let o=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?o=Re.translations.warnings.topTen:e.rank<=100?o=Re.translations.warnings.topHundred:o=Re.translations.warnings.common:e.guessesLog10<=4&&(o=Re.translations.warnings.similarToCommon),o},rE=(e,t)=>{let o=null;return t&&(o=Re.translations.warnings.wordByItself),o},aE=(e,t)=>t?Re.translations.warnings.namesByThemselves:Re.translations.warnings.commonNames,lE=(e,t)=>{let o=null;const r=e.dictionaryName,a=r==="lastnames"||r.toLowerCase().includes("firstnames");return r==="passwords"?o=oE(e,t):r.includes("wikipedia")?o=rE(e,t):a?o=aE(e,t):r==="userInputs"&&(o=Re.translations.warnings.userInputs),o};var iE=(e,t)=>{const o=lE(e,t),r=[],a=e.token;return a.match(Hh)?r.push(Re.translations.suggestions.capitalization):a.match(jh)&&a.toLowerCase()!==a&&r.push(Re.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&r.push(Re.translations.suggestions.reverseWords),e.l33t&&r.push(Re.translations.suggestions.l33t),{warning:o,suggestions:r}},sE=e=>e.regexName==="recentYear"?{warning:Re.translations.warnings.recentYears,suggestions:[Re.translations.suggestions.recentYears,Re.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},cE=e=>{let t=Re.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Re.translations.warnings.simpleRepeat),{warning:t,suggestions:[Re.translations.suggestions.repeated]}},uE=()=>({warning:Re.translations.warnings.sequences,suggestions:[Re.translations.suggestions.sequences]}),dE=e=>{let t=Re.translations.warnings.keyPattern;return e.turns===1&&(t=Re.translations.warnings.straightRow),{warning:t,suggestions:[Re.translations.suggestions.longerKeyboardPattern]}},fE=()=>null;const af={warning:null,suggestions:[]};class pE{constructor(){this.matchers={bruteforce:tE,date:nE,dictionary:iE,regex:sE,repeat:cE,sequence:uE,spatial:dE,separator:fE},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Re.translations.suggestions.useWords,Re.translations.suggestions.noNeed)}getFeedback(t,o){if(o.length===0)return this.defaultFeedback;if(t>2)return af;const r=Re.translations.suggestions.anotherWord,a=this.getLongestMatch(o);let l=this.getMatchFeedback(a,o.length===1);return l!=null?l.suggestions.unshift(r):l={warning:null,suggestions:[r]},l}getLongestMatch(t){let o=t[0];return t.slice(1).forEach(a=>{a.token.length>o.token.length&&(o=a)}),o}getMatchFeedback(t,o){return this.matchers[t.pattern]?this.matchers[t.pattern](t,o):Re.matchers[t.pattern]&&"feedback"in Re.matchers[t.pattern]?Re.matchers[t.pattern].feedback(t,o):af}}const Zh=()=>new Date().getTime(),mE=(e,t,o)=>{const r=new pE,a=new eE,l=Tc.mostGuessableMatchSequence(t,e),i=Zh()-o,s=a.estimateAttackTimes(l.guesses);return{calcTime:i,...l,...s,feedback:r.getFeedback(s.score,l.sequence)}},hE=(e,t)=>new Zk().match(e),gE=(e,t)=>{const o=Zh(),r=hE(e);if(r instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return mE(r,e,o)},vE={class:"m-password position-bottom-end flex column justify-content-center"},yE={key:0,class:"password-strength-container absolute start end -bottom-1-5"},bE={class:"password-strength-bar pointer overflow-hidden round"},Qh=n.defineComponent({__name:"PasswordInput",props:n.mergeModels({id:{},title:{},helptext:{},placeholder:{},label:{default:""},small:{type:Boolean},dense:{type:Boolean},required:{type:Boolean},pattern:{},shrink:{type:Boolean},underlined:{type:Boolean},disabled:{type:Boolean},name:{},nativeInputAttrs:{},icon:{},iconStart:{},multiline:{type:Boolean},autoheight:{type:Boolean},code:{type:Boolean},lines:{},autofocus:{type:Boolean},debounceDelay:{},autocomplete:{default:"current-password"},onFocusout:{},strengthMeter:{type:Boolean,default:!1},error:{}},{modelValue:{},modelModifiers:{},showPwd:{type:Boolean,default:!1},showPwdModifiers:{}}),emits:["update:modelValue","update:showPwd"],setup(e){const t=e,{$t:o}=Tt(),r=n.useModel(e,"modelValue"),a=n.useModel(e,"showPwd"),l=n.computed(()=>a.value?"visibility_off":"visibility"),i=n.computed(()=>a.value?"text":"password"),s=n.computed(()=>{const m=r.value;return!t.strengthMeter||m==null||m.length===0?null:gE(m)}),c=n.computed(()=>{var m;return r.value==null||r.value.length===0?null:((m=s.value)==null?void 0:m.score)??0}),u=n.computed(()=>{const m=c.value;return m==null?"var(--input-bg)":m<=1?"var(--bgl-red)":m===2?"var(--bgl-orange)":m===3?"var(--bgl-yellow)":"var(--bgl-green)"}),d=n.computed(()=>{const m=c.value;return m==null?"":o(m===0?"password.veryWeak":m===1?"password.weak":m===2?"password.fair":m===3?"password.good":"password.strong")}),f=n.computed(()=>{const m=c.value;return m==null?0:(m+1)/5*100}),h=n.computed(()=>{const m=s.value;if(!m)return"";const{feedback:{warning:p,suggestions:g}}=m;return[...p!=null&&p!==""?[p]:[],...g].join(" ")});return(m,p)=>{const g=n.resolveDirective("tooltip");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["relative passwordInput",{"relative mb-2":t.strengthMeter,"has-error":!!t.error,underlined:t.underlined}])},[n.createVNode(n.unref(et),n.mergeProps({modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=b=>r.value=b)},t,{type:i.value,class:"mb-0",name:t.name,error:t.error,underlined:t.underlined}),null,16,["modelValue","type","name","error","underlined"]),n.createElementVNode("div",vE,[n.createVNode(n.unref(ee),{flat:"",thin:"",class:"mx-05",icon:l.value,onClick:p[1]||(p[1]=b=>a.value=!a.value)},null,8,["icon"])]),t.strengthMeter?(n.openBlock(),n.createElementBlock("div",yE,[n.withDirectives((n.openBlock(),n.createElementBlock("div",bE,[n.createElementVNode("div",{class:"password-strength-fill h-100p round",style:n.normalizeStyle({width:`${f.value}%`,backgroundColor:u.value})},null,4)])),[[g,h.value||`Password strength: ${d.value}`]]),n.createElementVNode("span",{class:"password-strength-label txt10 light white-space",style:n.normalizeStyle({color:u.value})},n.toDisplayString(d.value),5)])):n.createCommentVNode("",!0)],2)}}}),_E={key:0,class:"group-label"},wE={key:0},$E=["for"],kE=["id","disabled","name","value","required"],EE=["src","alt"],CE={class:""},SE=["innerHTML"],TE={key:1,class:"txt-gray txt-12 m-0 pt-025"},NE=n.defineComponent({__name:"RadioGroup",props:n.mergeModels({id:{},label:{},groupName:{},options:{},deletable:{type:Boolean},required:{type:Boolean},error:{},disabled:{type:Boolean},thin:{type:Boolean},flat:{type:Boolean},invertedActive:{type:Boolean},align:{default:"center"},hideRadio:{type:Boolean},bgColor:{},activeBgColor:{},borderColor:{},textColor:{},textAlign:{}},{modelValue:{},modelModifiers:{}}),emits:n.mergeModels(["delete","focus","blur","change"],["update:modelValue"]),setup(e,{emit:t}){n.useCssVars(p=>({45294882:p.activeBgColor||"var(--bgl-primary-light)"}));const o=e,r=t,a=n.computed(()=>o.groupName||o.id||Math.random().toString(36).substring(2,15)),l=n.useModel(e,"modelValue"),i=n.ref([]),s=n.computed(()=>(Array.isArray(o.options)?o.options:i.value).map(g=>Ch(g)));async function c(){if(typeof o.options=="function")try{i.value=await o.options()}catch{i.value=[]}}n.watch(()=>o.options,()=>{i.value=[],c()},{immediate:!0,deep:!0});const u=n.ref(!1),d=n.computed(()=>({"has-error":!!o.error,"is-disabled":o.disabled,"is-focused":u.value}));function f(){u.value=!0,r("focus")}function h(){u.value=!1,r("blur")}function m(){r("change",l.value)}return(p,g)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(d.value)},[p.label?(n.openBlock(),n.createElementBlock("p",_E,[n.createTextVNode(n.toDisplayString(n.unref(je)(p.label))+" ",1),p.required?(n.openBlock(),n.createElementBlock("span",wE,"*")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(b,v)=>(n.openBlock(),n.createElementBlock("label",{key:b.id||`${a.value}-${v}`,class:n.normalizeClass(["border rounded flex active-list-item hover",{"p-05 gap-025":p.thin,"py-1 gap-075":!p.thin,"ps-05":!p.hideRadio,"bg-gray-light":!p.bgColor&&!p.flat,"align-items-start":p.align==="start"||p.align==="top","align-items-center":p.align==="center","align-items-end":p.align==="end"||p.align==="bottom",invertedActive:p.invertedActive}]),for:b.id||`${a.value}-${v}`,style:n.normalizeStyle({backgroundColor:p.bgColor,borderColor:p.borderColor})},[n.withDirectives(n.createElementVNode("input",{id:b.id||`${a.value}-${v}`,"onUpdate:modelValue":g[0]||(g[0]=y=>l.value=y),disabled:p.disabled,class:n.normalizeClass(["radio-input-list",{"mt-025":p.align==="start"||p.align==="top","mb-025":p.align==="end"||p.align==="bottom",hideRadio:p.hideRadio}]),type:"radio",name:a.value,value:b.value,required:p.required,onFocus:f,onBlur:h,onChange:m},null,42,kE),[[n.vModelRadio,l.value]]),n.createElementVNode("div",{class:n.normalizeClass(["flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025",{"txt-center justify-content-center":p.textAlign==="center","txt-end justify-content-end":p.textAlign==="right","txt-start justify-content-start":p.textAlign==="left"}]),style:n.normalizeStyle({color:p.textColor})},[b.imgSrc?(n.openBlock(),n.createElementBlock("img",{key:0,class:"py-025 radius-05 m_w40 object-fit",height:"40",width:"40",src:b.imgSrc,alt:b.imgAlt},null,8,EE)):b.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,icon:b.icon,size:1},null,8,["icon"])):n.createCommentVNode("",!0),n.createElementVNode("div",CE,[b.label?(n.openBlock(),n.createElementBlock("div",{key:0,class:"m-0 m_txt-14 line-height-14",innerHTML:b.label},null,8,SE)):n.createCommentVNode("",!0),b.subLabel?(n.openBlock(),n.createElementBlock("p",TE,n.toDisplayString(b.subLabel),1)):n.createCommentVNode("",!0)]),n.renderSlot(p.$slots,"radioItem",n.mergeProps({ref_for:!0},b),void 0,!0)],6),p.deletable?(n.openBlock(),n.createBlock(n.unref(ee),{key:0,class:"ms-auto",flat:"",thin:"",icon:"delete",onClick:y=>p.$emit("delete",b)},null,8,["onClick"])):n.createCommentVNode("",!0)],14,$E))),128))],2))}}),eg=xe(NE,[["__scopeId","data-v-2edb7f61"]]),DE=["dir"],xE={key:0,class:"label"},BE={class:"range-slider relative w-100"},AE=["id","value","min","max","step","required","disabled","aria-label"],LE=["value","min","max","step","required","disabled"],ME={class:"track absolute pointer-events-none overflow-hidden round"},VE={class:"txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05"},PE=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}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,{min:a=0,max:l=100,step:i=1,multiRange:s=!1,formatValue:c=_=>_.toString()}=o,u=n.ref(Array.isArray(o.modelValue)?o.modelValue[0]:o.modelValue??a),d=n.ref(Array.isArray(o.modelValue)?o.modelValue[1]:l),f=n.computed(()=>Math.min(Math.max(u.value,a),s?d.value:l)),h=n.computed(()=>Math.max(Math.min(d.value,l),u.value)),m=n.computed(()=>(f.value-a)/(l-a)*100),p=n.computed(()=>(h.value-a)/(l-a)*100);n.watch(()=>o.modelValue,_=>{Array.isArray(_)&&s?(u.value=_[0]??a,d.value=_[1]??l):Array.isArray(_)||(u.value=_??a,d.value=l)},{immediate:!0});function g(_,$){$?u.value=_:d.value=_,r("update:modelValue",s?[f.value,h.value]:f.value)}const b=n.computed(()=>s?{left:`${m.value}%`,width:`${p.value-m.value}%`}:o.rtl?{left:`${100-m.value}%`,width:`${m.value}%`}:{left:"0",width:`${m.value}%`}),v=n.computed(()=>c(f.value)),y=n.computed(()=>c(h.value));return(_,$)=>(n.openBlock(),n.createElementBlock("div",{dir:_.rtl?"rtl":"ltr"},[o.label?(n.openBlock(),n.createElementBlock("label",xE,n.toDisplayString(n.unref(je)(o.label)),1)):n.createCommentVNode("",!0),n.createElementVNode("div",BE,[n.createElementVNode("input",{id:_.id,value:f.value,class:"from",type:"range",min:n.unref(a),max:n.unref(l),step:n.unref(i),required:_.required,disabled:_.disabled,"aria-label":n.unref(s)?"Minimum value":"Value",onInput:$[0]||($[0]=w=>g(+w.target.value,!0))},null,40,AE),n.unref(s)?(n.openBlock(),n.createElementBlock("input",{key:0,value:h.value,class:"to",type:"range",min:n.unref(a),max:n.unref(l),step:n.unref(i),required:_.required,disabled:_.disabled,"aria-label":"Maximum value",onInput:$[1]||($[1]=w=>g(+w.target.value,!1))},null,40,LE)):n.createCommentVNode("",!0),n.createElementVNode("div",ME,[n.createElementVNode("div",{class:"active-range absolute h-100 pointer-events-none bg-primary",style:n.normalizeStyle(b.value)},null,4)]),f.value!==n.unref(a)?(n.openBlock(),n.createElementBlock("p",{key:1,class:"txt-center txt-12 range-slider-position-txt absolute line-height-1",style:n.normalizeStyle({"--progress":`${m.value}`})},[n.unref(s)?n.createCommentVNode("",!0):n.renderSlot(_.$slots,"progress",{key:0,progress:v.value,min:n.unref(c)(n.unref(a)),max:n.unref(c)(n.unref(l))},()=>[n.createTextVNode(n.toDisplayString(v.value),1)],!0),n.unref(s)?n.renderSlot(_.$slots,"from",{key:1,from:v.value,to:y.value,min:n.unref(c)(n.unref(a)),max:n.unref(c)(n.unref(l))},()=>[n.createTextVNode(n.toDisplayString(v.value),1)],!0):n.createCommentVNode("",!0)],4)):n.createCommentVNode("",!0),n.unref(s)&&h.value!==n.unref(l)?(n.openBlock(),n.createElementBlock("p",{key:2,class:"txt-center txt-12 range-slider-position-txt line-height-1 absolute",style:n.normalizeStyle({"--progress":`${p.value}`})},[n.renderSlot(_.$slots,"to",{to:y.value,from:v.value,min:n.unref(c)(n.unref(a)),max:n.unref(c)(n.unref(l))},()=>[n.createTextVNode(n.toDisplayString(y.value),1)],!0)],4)):n.createCommentVNode("",!0)]),n.createElementVNode("p",VE,[n.renderSlot(_.$slots,"min",{max:n.unref(c)(n.unref(l)),min:n.unref(c)(n.unref(a)),from:v.value,to:y.value,progress:v.value},()=>[n.createElementVNode("span",null,n.toDisplayString(n.unref(c)(n.unref(a))),1)],!0),n.renderSlot(_.$slots,"max",{max:n.unref(c)(n.unref(l)),min:n.unref(c)(n.unref(a)),from:v.value,to:y.value,progress:v.value},()=>[n.createElementVNode("span",null,n.toDisplayString(n.unref(c)(n.unref(l))),1)],!0)])],8,DE))}}),tg=xe(PE,[["__scopeId","data-v-dbdd7bd5"]]),IE={key:0,class:"label-text"},OE={key:0},RE={class:"flex gap-05"},FE=["disabled"],zE={key:1},UE={key:2,class:"ms-auto ps-05 me-05"},HE=["value"],jE={key:1,class:"error-message"},WE={key:0,class:"opacity-7 txt-small light"},qE=["aria-selected","onClick","onKeydown"],GE={class:"block"},YE={key:0,class:"selectinput-option opacity-3 pointer-events-none"},XE=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}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,r=t,{$t:a}=Tt(),l=B=>typeof B=="function",i=n.ref(),s=n.ref(),c=n.ref([]),u=B=>Au(B),d=B=>Tr(B),f=n.computed(()=>c.value.length??0),h=n.ref(""),m=n.ref(),p=n.ref(!1),g=n.ref(!1),b=n.computed(()=>je(o.placeholder)??a("select.placeholder")),v=n.computed(()=>f.value===0?b.value:f.value>4?`${c.value.slice(0,4).map(A=>u(A)).join(", ")}... +${f.value-4}`:c.value.map(B=>u(B)).join(", ")),y=n.computed(()=>o.searchPlaceholder??v.value??a("select.search")),{results:_,isLoading:$}=$y({searchTerm:()=>h.value,serverSearch:l(o.options)?o.options:void 0,items:()=>Array.isArray(o.options)?o.options:[],minChars:l(o.options)?0:2}),w=n.ref(-1),k=n.ref();function S(B){if(!g.value){g.value=!0,setTimeout(()=>{S(B)},210);return}B==="up"?w.value=w.value>0?w.value-1:_.value.length-1:B==="down"&&(w.value=w.value<_.value.length-1?w.value+1:0),setTimeout(()=>{var M;const A=(M=k.value)==null?void 0:M.children[w.value];A?A.focus():w.value=-1},10)}const x=B=>c.value.find(A=>d(B)===d(A))!==void 0;function T(){if(!k.value||f.value===0)return;const B=_.value.findIndex(M=>x(M));if(B===-1)return;const A=k.value.children[B];A&&A.scrollIntoView({block:"center",behavior:"instant"})}function L(){g.value=!0}function I(B){var P;p.value=!0;const A=c.value.findIndex(V=>d(V)===d(B));if(A>-1)c.value.splice(A,1);else if(o.multiselect){const V=[...c.value];V.push(B),c.value=V}else c.value.splice(0,f.value,B);const M=document.activeElement;M&&((P=k.value)!=null&&P.contains(M))&&M.blur(),o.multiselect||(g.value=!1,setTimeout(()=>{var V;(V=s.value)==null||V.focus()},0)),E()}function E(){if(o.multiselect)r("update:modelValue",c.value.map(d).filter(B=>B!=null));else{const[B]=c.value;r("update:modelValue",d(B))}}function C(B,A){if(B.length!==A.length)return!1;const M=B.map(d).filter(V=>V!=null).map(String).sort(),P=A.map(d).filter(V=>V!=null).map(String).sort();return M.every((V,oe)=>V===P[oe])}return n.watch(()=>o.modelValue,B=>{if(o.multiselect){const A=Array.isArray(B)?B:B!=null?[B]:[];C(A,c.value)||c.value.splice(0,f.value,...A)}else if(B==null)c.value.length>0&&(c.value=[]);else{const A=Array.isArray(B)?B[0]:B,M=Array.isArray(o.options)?o.options.find(P=>d(P)===d(A))??A:A;M!=null&&!x(M)&&(c.value=[M])}},{immediate:!0}),n.watch(()=>g.value,B=>{B&&(w.value=-1,setTimeout(()=>{T()},10))}),n.watch(()=>o.options,()=>{const B=o.options;Array.isArray(B)&&c.value.forEach((A,M)=>{const P=B.find(V=>d(V)===d(A));P===void 0?c.value.splice(M,1):c.value.splice(M,1,P)})},{deep:!0,immediate:!0}),n.watch(()=>_.value,B=>{l(o.options)&&B.length>0&&c.value.forEach((A,M)=>{const P=d(A);if(typeof A!="object"||!A.label){const V=B.find(oe=>d(oe)===P);V!==void 0&&c.value.splice(M,1,V)}})},{deep:!0}),n.onMounted(()=>{const B=o.options;if(o.modelValue==null&&o.defaultValue!==void 0&&Array.isArray(B)){const A=B.find(M=>d(M)===d(o.defaultValue));if(A===void 0)return;c.value=[A]}}),(B,A)=>(n.openBlock(),n.createBlock(n.unref(on),{ref_key:"dropdown",ref:m,shown:g.value,"onUpdate:shown":A[11]||(A[11]=M=>g.value=M),placement:B.placement,class:n.normalizeClass(["bagel-input selectinput",{"has-error":!!B.error,underlined:B.underlined,open:g.value,"has-value":f.value>0}]),"no-auto-focus":"",onClick:A[12]||(A[12]=n.withModifiers(()=>{},["stop"]))},{trigger:n.withCtx(()=>[n.createElementVNode("label",null,[B.label||B.underlined&&B.placeholder?(n.openBlock(),n.createElementBlock("span",IE,[n.createTextVNode(n.toDisplayString(n.unref(je)(B.label)||n.unref(je)(B.placeholder)),1),B.required?(n.openBlock(),n.createElementBlock("span",OE," *")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",RE,[B.searchable&&g.value?(n.openBlock(),n.createBlock(n.unref(et),{key:0,ref_key:"searchInput",ref:i,modelValue:h.value,"onUpdate:modelValue":A[0]||(A[0]=M=>h.value=M),class:"mb-0",placeholder:y.value,icon:"search",onInput:A[1]||(A[1]=M=>p.value=!1),onClick:L,onKeydown:[A[2]||(A[2]=n.withKeys(n.withModifiers(M=>S("down"),["prevent"]),["down"])),A[3]||(A[3]=n.withKeys(n.withModifiers(M=>S("up"),["prevent"]),["up"]))]},null,8,["modelValue","placeholder"])):(n.openBlock(),n.createElementBlock("button",{key:1,ref_key:"triggerBtn",ref:s,disabled:B.disabled,type:"button",class:n.normalizeClass(["selectinput-btn",{isEmpty:f.value===0}]),onClick:A[5]||(A[5]=M=>g.value=!g.value),onKeydown:[A[6]||(A[6]=n.withKeys(n.withModifiers(M=>S("down"),["prevent"]),["down"])),A[7]||(A[7]=n.withKeys(n.withModifiers(M=>S("up"),["prevent"]),["up"]))]},[B.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:0,icon:B.icon},null,8,["icon"])):n.createCommentVNode("",!0),B.hideLabel?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("p",zE,n.toDisplayString(f.value>0?v.value:B.underlined?"":n.unref(je)(B.placeholder)||"Select..."),1)),B.clearable&&f.value>0?(n.openBlock(),n.createElementBlock("div",UE,[n.createVNode(n.unref(ee),{flat:"",thin:"",icon:"clear",class:"color-gray",onClick:A[4]||(A[4]=M=>{c.value=[],E()})})])):n.createCommentVNode("",!0),B.disabled?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.Transition,{key:3,name:"icon-swap",mode:"out-in"},{default:n.withCtx(()=>[g.value?(n.openBlock(),n.createBlock(n.unref(Te),{key:"open",thin:"",icon:B.underlined?"expand_less":"unfold_less"},null,8,["icon"])):(n.openBlock(),n.createBlock(n.unref(Te),{key:"closed",thin:"",icon:B.underlined?"expand_more":"unfold_more"},null,8,["icon"]))]),_:1}))],42,FE)),B.required&&!B.underlined?(n.openBlock(),n.createElementBlock("input",{key:2,tabindex:"-1",style:{width:"0",height:"0",position:"absolute",opacity:"0","z-index":"-1"},value:c.value,required:""},null,8,HE)):n.createCommentVNode("",!0)]),B.error?(n.openBlock(),n.createElementBlock("div",jE,n.toDisplayString(B.error),1)):n.createCommentVNode("",!0)]),B.helpText?(n.openBlock(),n.createElementBlock("p",WE,n.toDisplayString(B.helpText),1)):n.createCommentVNode("",!0)]),default:n.withCtx(()=>[n.unref($)?(n.openBlock(),n.createBlock(n.unref(di),{key:0,count:6,width:"200px",height:"25px",class:"mx-1 my-1"})):n.createCommentVNode("",!0),n.createVNode(n.unref(en),{class:"p-05",frame:"",style:n.normalizeStyle({width:B.fullWidth?"100%":"auto"}),onClick:A[10]||(A[10]=n.withModifiers(()=>{},["stop"]))},{default:n.withCtx(()=>[n.createElementVNode("div",{ref_key:"selectOptions",ref:k,class:n.normalizeClass(["selectinput-options",{multiselect:B.multiselect}])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(_),(M,P)=>(n.openBlock(),n.createElementBlock("div",{key:`${String(d(M))}-${P}`,class:n.normalizeClass(["selectinput-option hover gap-1 align-items-center",{selected:x(M)}]),role:"option",tabindex:"0","aria-selected":x(M),onClick:V=>I(M),onKeydown:[n.withKeys(V=>I(M),["enter"]),A[8]||(A[8]=n.withKeys(n.withModifiers(V=>S("down"),["prevent"]),["down"])),A[9]||(A[9]=n.withKeys(n.withModifiers(V=>S("up"),["prevent"]),["up"]))]},[B.multiselect?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[x(M)?(n.openBlock(),n.createBlock(n.unref(Te),{key:0,size:1.1,icon:"select_check_box"})):n.createCommentVNode("",!0),x(M)?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(Te),{key:1,class:"opacity-3",icon:"check_box_outline_blank",size:1.1}))],64)):n.createCommentVNode("",!0),n.unref(Ta)(M)?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,icon:n.unref(Ta)(M),size:1},null,8,["icon"])):n.createCommentVNode("",!0),n.createElementVNode("span",GE,n.toDisplayString(u(M)),1)],42,qE))),128)),n.unref(_).length===0?(n.openBlock(),n.createElementBlock("p",YE," No options found ")):n.createCommentVNode("",!0)],2),n.renderSlot(B.$slots,"last",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["shown","placement","class"]))}}),vt=xe(XE,[["__scopeId","data-v-05c4ddde"]]),KE=["title"],JE=["for"],ZE={key:0,class:"label-text"},QE={key:0},eC=["id","name","title","autocomplete","type","placeholder","disabled","required","pattern"],tC=["id","name","title","type","rows","placeholder","disabled","required","pattern"],nC={key:3,class:"opacity-7 light"},oC={key:0,class:"error-message"},rC=n.defineComponent({__name:"TextInput",props:{id:{},title:{},helptext:{},name:{},placeholder:{},modelValue:{default:""},label:{},small:{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:{}},emits:["update:modelValue","debounce"],setup(e,{expose:t,emit:o}){const r=e,a=o,l=n.computed(()=>{if(!r.pattern)return;let{pattern:g}=r;g=g.replace(/^\^/,"").replace(/\$$/,"");try{const b=new RegExp(g,"v");return g}catch{try{const b=new RegExp(g);return g}catch(b){console.error("Invalid pattern:",r.pattern,b);return}}}),i=n.ref(),s=n.ref();Cv(()=>i.value,()=>s.value,r.validate,r.getFormData);const c=n.computed(()=>{let g=Number(r.rows)||1;return r.autoheight&&(g=Math.max(g,String(i.value).split(`
|
|
153
153
|
`).length)),(r.multiline||r.code)&&(g=Math.max(g,4)),g}),u=tr(()=>{a("debounce",i.value)},700);function d(){if(!r.autoheight||!s.value||s.value.tagName!=="TEXTAREA")return;const g=s.value;g.style.height="auto",g.style.height=`${g.scrollHeight+1}px`}function f(){r.disabled||(a("update:modelValue",i.value),u(),r.autoheight&&n.nextTick(()=>{d()}))}n.watch(()=>r.modelValue,g=>{g!==i.value&&(i.value=g,r.autoheight&&n.nextTick(()=>{d()}))},{immediate:!0}),t({focus:()=>{var g;return(g=s.value)==null?void 0:g.focus()},hasFocus:()=>document.activeElement===s.value});const p=n.computed(()=>{const g=i.value;return g!==void 0&&g!==""&&String(g).length>0});return n.onMounted(async()=>{var g;r.autofocus&&(await Wm(()=>s.value).toBeTruthy(),await or(400),(g=s.value)==null||g.focus()),r.autoheight&&(await n.nextTick(),d())}),(g,b)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bagel-input text-input",{dense:g.dense,small:g.small,shrink:g.shrink,code:g.code,underlined:g.underlined,textInputIconWrap:g.icon,txtInputIconStart:g.iconStart,"has-error":!!g.error,"has-value":p.value}]),title:g.title},[n.createElementVNode("label",{for:g.id},[g.label||g.underlined&&g.placeholder?(n.openBlock(),n.createElementBlock("span",ZE,[n.createTextVNode(n.toDisplayString(n.unref(je)(g.label)||n.unref(je)(g.placeholder)),1),g.required?(n.openBlock(),n.createElementBlock("span",QE," *")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),!g.multiline&&!g.autoheight&&!g.code&&c.value<2?n.withDirectives((n.openBlock(),n.createElementBlock("input",n.mergeProps({key:1,id:g.id,ref_key:"input",ref:s,"onUpdate:modelValue":b[0]||(b[0]=v=>i.value=v),name:g.name,title:g.title,autocomplete:g.autocomplete,type:g.type,rows:1,placeholder:g.underlined?" ":n.unref(je)(g.placeholder)||n.unref(je)(g.label),disabled:g.disabled,required:g.required},g.nativeInputAttrs,{pattern:l.value,onFocusout:b[1]||(b[1]=(...v)=>g.onFocusout&&g.onFocusout(...v)),onFocus:b[2]||(b[2]=(...v)=>g.onFocus&&g.onFocus(...v)),onInput:f}),null,16,eC)),[[n.vModelDynamic,i.value,void 0,{trim:!0}]]):n.withDirectives((n.openBlock(),n.createElementBlock("textarea",n.mergeProps({key:2,id:g.id,ref_key:"input",ref:s,"onUpdate:modelValue":b[3]||(b[3]=v=>i.value=v),name:g.name,title:g.title,type:g.type,rows:c.value,placeholder:g.underlined?" ":n.unref(je)(g.placeholder)||n.unref(je)(g.label),disabled:g.disabled,required:g.required},g.nativeInputAttrs,{pattern:l.value,onInput:f,onFocusout:b[4]||(b[4]=(...v)=>g.onFocusout&&g.onFocusout(...v))}),null,16,tC)),[[n.vModelText,i.value]]),g.helptext?(n.openBlock(),n.createElementBlock("p",nC,n.toDisplayString(g.helptext),1)):n.createCommentVNode("",!0),g.iconStart?(n.openBlock(),n.createBlock(n.unref(Te),{key:4,class:n.normalizeClass([{" -top-025 line-height-0 ":g.underlined},"iconStart"]),icon:g.iconStart},null,8,["class","icon"])):n.createCommentVNode("",!0),g.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:5,class:n.normalizeClass({" -top-025 line-height-0 ":g.underlined}),icon:g.icon},null,8,["class","icon"])):n.createCommentVNode("",!0)],8,JE),g.error?(n.openBlock(),n.createElementBlock("div",oC,n.toDisplayString(g.error),1)):n.createCommentVNode("",!0)],10,KE))}}),et=xe(rC,[["__scopeId","data-v-af44bac3"]]);function ng(e,t){return function(){return e.apply(t,arguments)}}const{toString:aC}=Object.prototype,{getPrototypeOf:Ru}=Object,{iterator:Wi,toStringTag:og}=Symbol,qi=(e=>t=>{const o=aC.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),zn=e=>(e=e.toLowerCase(),t=>qi(t)===e),Gi=e=>t=>typeof t===e,{isArray:Gr}=Array,Ba=Gi("undefined");function lC(e){return e!==null&&!Ba(e)&&e.constructor!==null&&!Ba(e.constructor)&&tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rg=zn("ArrayBuffer");function iC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rg(e.buffer),t}const sC=Gi("string"),tn=Gi("function"),ag=Gi("number"),Yi=e=>e!==null&&typeof e=="object",cC=e=>e===!0||e===!1,Al=e=>{if(qi(e)!=="object")return!1;const t=Ru(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(og in e)&&!(Wi in e)},uC=zn("Date"),dC=zn("File"),fC=zn("Blob"),pC=zn("FileList"),mC=e=>Yi(e)&&tn(e.pipe),hC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||tn(e.append)&&((t=qi(e))==="formdata"||t==="object"&&tn(e.toString)&&e.toString()==="[object FormData]"))},gC=zn("URLSearchParams"),[vC,yC,bC,_C]=["ReadableStream","Request","Response","Headers"].map(zn),wC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ol(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Gr(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const l=o?Object.getOwnPropertyNames(e):Object.keys(e),i=l.length;let s;for(r=0;r<i;r++)s=l[r],t.call(null,e[s],s,e)}}function lg(e,t){t=t.toLowerCase();const o=Object.keys(e);let r=o.length,a;for(;r-- >0;)if(a=o[r],t===a.toLowerCase())return a;return null}const Go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ig=e=>!Ba(e)&&e!==Go;function Nc(){const{caseless:e}=ig(this)&&this||{},t={},o=(r,a)=>{const l=e&&lg(t,a)||a;Al(t[l])&&Al(r)?t[l]=Nc(t[l],r):Al(r)?t[l]=Nc({},r):Gr(r)?t[l]=r.slice():t[l]=r};for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&ol(arguments[r],o);return t}const $C=(e,t,o,{allOwnKeys:r}={})=>(ol(t,(a,l)=>{o&&tn(a)?e[l]=ng(a,o):e[l]=a},{allOwnKeys:r}),e),kC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EC=(e,t,o,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},CC=(e,t,o,r)=>{let a,l,i;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),l=a.length;l-- >0;)i=a[l],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=o!==!1&&Ru(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},SC=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const r=e.indexOf(t,o);return r!==-1&&r===o},TC=e=>{if(!e)return null;if(Gr(e))return e;let t=e.length;if(!ag(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},NC=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ru(Uint8Array)),DC=(e,t)=>{const r=(e&&e[Wi]).call(e);let a;for(;(a=r.next())&&!a.done;){const l=a.value;t.call(e,l[0],l[1])}},xC=(e,t)=>{let o;const r=[];for(;(o=e.exec(t))!==null;)r.push(o);return r},BC=zn("HTMLFormElement"),AC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,r,a){return r.toUpperCase()+a}),lf=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),LC=zn("RegExp"),sg=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),r={};ol(o,(a,l)=>{let i;(i=t(a,l,e))!==!1&&(r[l]=i||a)}),Object.defineProperties(e,r)},MC=e=>{sg(e,(t,o)=>{if(tn(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const r=e[o];if(tn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},VC=(e,t)=>{const o={},r=a=>{a.forEach(l=>{o[l]=!0})};return Gr(e)?r(e):r(String(e).split(t)),o},PC=()=>{},IC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function OC(e){return!!(e&&tn(e.append)&&e[og]==="FormData"&&e[Wi])}const RC=e=>{const t=new Array(10),o=(r,a)=>{if(Yi(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[a]=r;const l=Gr(r)?[]:{};return ol(r,(i,s)=>{const c=o(i,a+1);!Ba(c)&&(l[s]=c)}),t[a]=void 0,l}}return r};return o(e,0)},FC=zn("AsyncFunction"),zC=e=>e&&(Yi(e)||tn(e))&&tn(e.then)&&tn(e.catch),cg=((e,t)=>e?setImmediate:t?((o,r)=>(Go.addEventListener("message",({source:a,data:l})=>{a===Go&&l===o&&r.length&&r.shift()()},!1),a=>{r.push(a),Go.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",tn(Go.postMessage)),UC=typeof queueMicrotask<"u"?queueMicrotask.bind(Go):typeof process<"u"&&process.nextTick||cg,HC=e=>e!=null&&tn(e[Wi]),se={isArray:Gr,isArrayBuffer:rg,isBuffer:lC,isFormData:hC,isArrayBufferView:iC,isString:sC,isNumber:ag,isBoolean:cC,isObject:Yi,isPlainObject:Al,isReadableStream:vC,isRequest:yC,isResponse:bC,isHeaders:_C,isUndefined:Ba,isDate:uC,isFile:dC,isBlob:fC,isRegExp:LC,isFunction:tn,isStream:mC,isURLSearchParams:gC,isTypedArray:NC,isFileList:pC,forEach:ol,merge:Nc,extend:$C,trim:wC,stripBOM:kC,inherits:EC,toFlatObject:CC,kindOf:qi,kindOfTest:zn,endsWith:SC,toArray:TC,forEachEntry:DC,matchAll:xC,isHTMLForm:BC,hasOwnProperty:lf,hasOwnProp:lf,reduceDescriptors:sg,freezeMethods:MC,toObjectSet:VC,toCamelCase:AC,noop:PC,toFiniteNumber:IC,findKey:lg,global:Go,isContextDefined:ig,isSpecCompliantForm:OC,toJSONObject:RC,isAsyncFn:FC,isThenable:zC,setImmediate:cg,asap:UC,isIterable:HC};function Ye(e,t,o,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}se.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.status}}});const ug=Ye.prototype,dg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{dg[e]={value:e}});Object.defineProperties(Ye,dg);Object.defineProperty(ug,"isAxiosError",{value:!0});Ye.from=(e,t,o,r,a,l)=>{const i=Object.create(ug);return se.toFlatObject(e,i,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ye.call(i,e.message,t,o,r,a),i.cause=e,i.name=e.name,l&&Object.assign(i,l),i};const jC=null;function Dc(e){return se.isPlainObject(e)||se.isArray(e)}function fg(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function sf(e,t,o){return e?e.concat(t).map(function(a,l){return a=fg(a),!o&&l?"["+a+"]":a}).join(o?".":""):t}function WC(e){return se.isArray(e)&&!e.some(Dc)}const qC=se.toFlatObject(se,{},null,function(t){return/^is[A-Z]/.test(t)});function Xi(e,t,o){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=se.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!se.isUndefined(b[g])});const r=o.metaTokens,a=o.visitor||d,l=o.dots,i=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&se.isSpecCompliantForm(t);if(!se.isFunction(a))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(se.isDate(p))return p.toISOString();if(!c&&se.isBlob(p))throw new Ye("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(p)||se.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,g,b){let v=p;if(p&&!b&&typeof p=="object"){if(se.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(se.isArray(p)&&WC(p)||(se.isFileList(p)||se.endsWith(g,"[]"))&&(v=se.toArray(p)))return g=fg(g),v.forEach(function(_,$){!(se.isUndefined(_)||_===null)&&t.append(i===!0?sf([g],$,l):i===null?g:g+"[]",u(_))}),!1}return Dc(p)?!0:(t.append(sf(b,g,l),u(p)),!1)}const f=[],h=Object.assign(qC,{defaultVisitor:d,convertValue:u,isVisitable:Dc});function m(p,g){if(!se.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(p),se.forEach(p,function(v,y){(!(se.isUndefined(v)||v===null)&&a.call(t,v,se.isString(y)?y.trim():y,g,h))===!0&&m(v,g?g.concat(y):[y])}),f.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return m(e),t}function cf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Fu(e,t){this._pairs=[],e&&Xi(e,this,t)}const pg=Fu.prototype;pg.append=function(t,o){this._pairs.push([t,o])};pg.toString=function(t){const o=t?function(r){return t.call(this,r,cf)}:cf;return this._pairs.map(function(a){return o(a[0])+"="+o(a[1])},"").join("&")};function GC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mg(e,t,o){if(!t)return e;const r=o&&o.encode||GC;se.isFunction(o)&&(o={serialize:o});const a=o&&o.serialize;let l;if(a?l=a(t,o):l=se.isURLSearchParams(t)?t.toString():new Fu(t,o).toString(r),l){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class uf{constructor(){this.handlers=[]}use(t,o,r){return this.handlers.push({fulfilled:t,rejected:o,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){se.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YC=typeof URLSearchParams<"u"?URLSearchParams:Fu,XC=typeof FormData<"u"?FormData:null,KC=typeof Blob<"u"?Blob:null,JC={isBrowser:!0,classes:{URLSearchParams:YC,FormData:XC,Blob:KC},protocols:["http","https","file","blob","url","data"]},zu=typeof window<"u"&&typeof document<"u",xc=typeof navigator=="object"&&navigator||void 0,ZC=zu&&(!xc||["ReactNative","NativeScript","NS"].indexOf(xc.product)<0),QC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eS=zu&&window.location.href||"http://localhost",tS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zu,hasStandardBrowserEnv:ZC,hasStandardBrowserWebWorkerEnv:QC,navigator:xc,origin:eS},Symbol.toStringTag,{value:"Module"})),jt={...tS,...JC};function nS(e,t){return Xi(e,new jt.classes.URLSearchParams,Object.assign({visitor:function(o,r,a,l){return jt.isNode&&se.isBuffer(o)?(this.append(r,o.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function oS(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rS(e){const t={},o=Object.keys(e);let r;const a=o.length;let l;for(r=0;r<a;r++)l=o[r],t[l]=e[l];return t}function gg(e){function t(o,r,a,l){let i=o[l++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),c=l>=o.length;return i=!i&&se.isArray(a)?a.length:i,c?(se.hasOwnProp(a,i)?a[i]=[a[i],r]:a[i]=r,!s):((!a[i]||!se.isObject(a[i]))&&(a[i]=[]),t(o,r,a[i],l)&&se.isArray(a[i])&&(a[i]=rS(a[i])),!s)}if(se.isFormData(e)&&se.isFunction(e.entries)){const o={};return se.forEachEntry(e,(r,a)=>{t(oS(r),a,o,0)}),o}return null}function aS(e,t,o){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(o||JSON.stringify)(e)}const rl={transitional:hg,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const r=o.getContentType()||"",a=r.indexOf("application/json")>-1,l=se.isObject(t);if(l&&se.isHTMLForm(t)&&(t=new FormData(t)),se.isFormData(t))return a?JSON.stringify(gg(t)):t;if(se.isArrayBuffer(t)||se.isBuffer(t)||se.isStream(t)||se.isFile(t)||se.isBlob(t)||se.isReadableStream(t))return t;if(se.isArrayBufferView(t))return t.buffer;if(se.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(l){if(r.indexOf("application/x-www-form-urlencoded")>-1)return nS(t,this.formSerializer).toString();if((s=se.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Xi(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return l||a?(o.setContentType("application/json",!1),aS(t)):t}],transformResponse:[function(t){const o=this.transitional||rl.transitional,r=o&&o.forcedJSONParsing,a=this.responseType==="json";if(se.isResponse(t)||se.isReadableStream(t))return t;if(t&&se.isString(t)&&(r&&!this.responseType||a)){const i=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?Ye.from(s,Ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jt.classes.FormData,Blob:jt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],e=>{rl.headers[e]={}});const lS=se.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"]),iS=e=>{const t={};let o,r,a;return e&&e.split(`
|
|
154
154
|
`).forEach(function(i){a=i.indexOf(":"),o=i.substring(0,a).trim().toLowerCase(),r=i.substring(a+1).trim(),!(!o||t[o]&&lS[o])&&(o==="set-cookie"?t[o]?t[o].push(r):t[o]=[r]:t[o]=t[o]?t[o]+", "+r:r)}),t},df=Symbol("internals");function ra(e){return e&&String(e).trim().toLowerCase()}function Ll(e){return e===!1||e==null?e:se.isArray(e)?e.map(Ll):String(e)}function sS(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=o.exec(e);)t[r[1]]=r[2];return t}const cS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ts(e,t,o,r,a){if(se.isFunction(r))return r.call(this,t,o);if(a&&(t=o),!!se.isString(t)){if(se.isString(r))return t.indexOf(r)!==-1;if(se.isRegExp(r))return r.test(t)}}function uS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,r)=>o.toUpperCase()+r)}function dS(e,t){const o=se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+o,{value:function(a,l,i){return this[r].call(this,t,a,l,i)},configurable:!0})})}let nn=class{constructor(t){t&&this.set(t)}set(t,o,r){const a=this;function l(s,c,u){const d=ra(c);if(!d)throw new Error("header name must be a non-empty string");const f=se.findKey(a,d);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||c]=Ll(s))}const i=(s,c)=>se.forEach(s,(u,d)=>l(u,d,c));if(se.isPlainObject(t)||t instanceof this.constructor)i(t,o);else if(se.isString(t)&&(t=t.trim())&&!cS(t))i(iS(t),o);else if(se.isObject(t)&&se.isIterable(t)){let s={},c,u;for(const d of t){if(!se.isArray(d))throw TypeError("Object iterator must return a key-value pair");s[u=d[0]]=(c=s[u])?se.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}i(s,o)}else t!=null&&l(o,t,r);return this}get(t,o){if(t=ra(t),t){const r=se.findKey(this,t);if(r){const a=this[r];if(!o)return a;if(o===!0)return sS(a);if(se.isFunction(o))return o.call(this,a,r);if(se.isRegExp(o))return o.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=ra(t),t){const r=se.findKey(this,t);return!!(r&&this[r]!==void 0&&(!o||Ts(this,this[r],r,o)))}return!1}delete(t,o){const r=this;let a=!1;function l(i){if(i=ra(i),i){const s=se.findKey(r,i);s&&(!o||Ts(r,r[s],s,o))&&(delete r[s],a=!0)}}return se.isArray(t)?t.forEach(l):l(t),a}clear(t){const o=Object.keys(this);let r=o.length,a=!1;for(;r--;){const l=o[r];(!t||Ts(this,this[l],l,t,!0))&&(delete this[l],a=!0)}return a}normalize(t){const o=this,r={};return se.forEach(this,(a,l)=>{const i=se.findKey(r,l);if(i){o[i]=Ll(a),delete o[l];return}const s=t?uS(l):String(l).trim();s!==l&&delete o[l],o[s]=Ll(a),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return se.forEach(this,(r,a)=>{r!=null&&r!==!1&&(o[a]=t&&se.isArray(r)?r.join(", "):r)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
|
package/dist/index.mjs
CHANGED
|
@@ -10187,7 +10187,7 @@ const d$ = { class: "calendar-section m_border-none px-05 pb-05 pt-025 m_p-0" },
|
|
|
10187
10187
|
M("div", {
|
|
10188
10188
|
ref_key: "otpCont",
|
|
10189
10189
|
ref: o,
|
|
10190
|
-
class: se(["otp_wrap", { "has-error": !!c.error }])
|
|
10190
|
+
class: se(["otp_wrap ltr", { "has-error": !!c.error }])
|
|
10191
10191
|
}, [
|
|
10192
10192
|
($(!0), D(Ce, null, Ie(r, (h, p) => ($(), D("input", {
|
|
10193
10193
|
key: p,
|
|
@@ -10208,7 +10208,7 @@ const d$ = { class: "calendar-section m_border-none px-05 pb-05 pt-025 m_p-0" },
|
|
|
10208
10208
|
c.error ? ($(), D("div", a3, le(c.error), 1)) : U("", !0)
|
|
10209
10209
|
]));
|
|
10210
10210
|
}
|
|
10211
|
-
}), uV = /* @__PURE__ */ Ge(r3, [["__scopeId", "data-v-
|
|
10211
|
+
}), uV = /* @__PURE__ */ Ge(r3, [["__scopeId", "data-v-27baff3c"]]), Ku = (e, t) => (
|
|
10212
10212
|
// eslint-disable-next-line prefer-spread
|
|
10213
10213
|
e.push.apply(e, t)
|
|
10214
10214
|
), _o = (e) => e.sort((t, n) => t.i - n.i || t.j - n.j), Cf = (e) => {
|