@feedmepos/ui-library 1.8.2 → 1.8.4

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.
@@ -11,7 +11,7 @@
11
11
  fm-btn--${u.variant}
12
12
  ${u.disabled||u.loading?"fm-btn--disabled":""}
13
13
  ${n.value&&u.variant===r.unref(_n).Plain?"!text-fm-color-system-warning-400":""}
14
- `),disabled:u.disabled,type:u.type,onMousedown:p[0]||(p[0]=()=>c(!0)),onMouseleave:p[1]||(p[1]=()=>c(!1)),onMouseup:p[2]||(p[2]=()=>c(!1))},[u.icon&&u.iconPosition==="prepend"||u.prependIcon?(r.openBlock(),r.createBlock(ue,{key:0,class:r.normalizeClass({invisible:u.loading}),color:u.disabled?"neutral-gray-200":u.iconColor??"",name:u.icon||u.prependIcon,outline:u.overwriteIconOutline==="outline"?!0:u.overwriteIconOutline==="filled"?!1:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),u.label?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[u.$slots.default?r.renderSlot(u.$slots,"default",{key:0,disabled:u.disabled},void 0,!0):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([{invisible:u.loading},"fm-typo-en-body-lg-600 label line-clamp-1"])},r.toDisplayString(u.label),3))],64)):r.createCommentVNode("",!0),u.icon&&u.iconPosition==="append"||u.appendIcon?(r.openBlock(),r.createBlock(ue,{key:2,class:r.normalizeClass({invisible:u.loading}),color:u.disabled?"neutral-gray-200":u.iconColor??"",name:u.icon||u.appendIcon,outline:u.overwriteIconOutline==="outline"?!0:u.overwriteIconOutline==="filled"?!1:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("div",bk,[u.loading?(r.openBlock(),r.createBlock(Sr,{key:0,color:"neutral-gray-300",size:"md"})):r.createCommentVNode("",!0)])],42,gk)),[[h,!u.disabled&&!u.loading&&u.variant!==r.unref(_n).Plain]])}}}),ke=Be(yk,[["__scopeId","data-v-ee1e7cfc"]]),Kh=Symbol.for("fm:form"),Ke=Symbol.for("fm:form-state"),Jh=Symbol.for("fm:radio-group"),Yh=Symbol.for("fm:stepper"),Zh=Symbol.for("fm:dialog"),$h=Symbol.for("fm:menu"),em=Symbol.for("fm:menu-to-item"),vc=Symbol.for("fm:snackbar"),Qo=Symbol.for("fm:card");function tm(t,e){const n=r.ref([]);function o(){const a=[];if(e.value&&e.value.length>0)for(const s of e.value){const c=(typeof s=="function"?s:()=>s)(t.value);c!==!0&&a.push(c)}return n.value=a,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function vk(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Pe(t,e){const n=vk(),o=r.ref(t[e]);return r.watch(()=>t[e],()=>{o.value=t[e]}),r.computed({get(){return o.value},set(a){o.value=a,n==null||n(`update:${String(e)}`,a)}})}function nm(t,e=null,n=null,o=null){let i=null;const a=Pe(t,"modelValue"),s=r.ref(!0),l=r.inject(Kh,null),{validate:c,resetValidation:u,errorMessages:p}=tm(a,r.toRef(()=>t.rules)),h=(m=n)=>{s.value=!0,u(),m&&typeof m=="function"&&m(),a.value=e};return r.onMounted(()=>{l&&(i=l.register({validate:c,resetValidation:u,resetValue:h,blame:o??null}))}),r.onUnmounted(()=>{l&&l.unregister(i)}),r.watch(()=>a.value,()=>{s.value=!1,a.value!==e&&c()}),r.watch(()=>t.focused,m=>{s.value=!1,m||c()}),{validate:c,resetValidation:u,errorMessages:p,resetValue:h,isPristine:s}}const kk={class:"w-full"},at=Be(r.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1},size:{default:"sm"},tooltip:{}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,a)=>(r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-field":!0,"fm-field--focused":i.focused,"fm-field--invalid":i.invalid,"fm-field--valid":i.showValidBorder&&!i.invalid,"fm-field--disabled":o.value,"fm-field--md":i.size==="md","fm-field--sm":i.size==="sm"})},{default:r.withCtx(()=>[r.renderSlot(i.$slots,"prepend",{},()=>[i.prependIcon?(r.openBlock(),r.createBlock(ue,{key:0,color:o.value?"disabled":"neutral-black",name:i.prependIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0),r.createElementVNode("div",kk,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(ue,{key:0,color:o.value?"disabled":"neutral-black",name:i.appendIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-d76c3b9a"]]),wk={class:"flex gap-4"},om=r.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:void 0},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=r.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),a=r.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-en-body-md-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":s.state==="none"&&!o.value,"text-fm-color-typo-success":s.state==="success"&&!o.value,"text-fm-color-typo-warning":s.state==="warning"&&!o.value,"text-fm-color-typo-error":s.state==="error"&&!o.value}])},[s.errorMessages.length===0?r.renderSlot(s.$slots,"default",{key:0},()=>[r.createElementVNode("div",wk,[i.value?(r.openBlock(),r.createBlock(ue,{key:0,class:r.normalizeClass([a.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(s.text),1)])]):r.renderSlot(s.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.errorMessages,c=>(r.openBlock(),r.createElementBlock("div",{key:c,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(ue,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(c),1)]))),128))])],2))}}),oo=Math.min,fn=Math.max,Is=Math.round,Ns=Math.floor,Xo=t=>({x:t,y:t}),xk={left:"right",right:"left",bottom:"top",top:"bottom"},Sk={start:"end",end:"start"};function kc(t,e,n){return fn(t,oo(e,n))}function ni(t,e){return typeof t=="function"?t(e):t}function qo(t){return t.split("-")[0]}function oi(t){return t.split("-")[1]}function rm(t){return t==="x"?"y":"x"}function wc(t){return t==="y"?"height":"width"}function Cr(t){return["top","bottom"].includes(qo(t))?"y":"x"}function xc(t){return rm(Cr(t))}function Ck(t,e,n){n===void 0&&(n=!1);const o=oi(t),i=xc(t),a=wc(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=Vs(s)),[s,Vs(s)]}function Ak(t){const e=Vs(t);return[Sc(t),e,Sc(e)]}function Sc(t){return t.replace(/start|end/g,e=>Sk[e])}function Dk(t,e,n){const o=["left","right"],i=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?a:s;default:return[]}}function Ek(t,e,n,o){const i=oi(t);let a=Dk(qo(t),n==="start",o);return i&&(a=a.map(s=>s+"-"+i),e&&(a=a.concat(a.map(Sc)))),a}function Vs(t){return t.replace(/left|right|bottom|top/g,e=>xk[e])}function Bk(t){return{top:0,right:0,bottom:0,left:0,...t}}function im(t){return typeof t!="number"?Bk(t):{top:t,right:t,bottom:t,left:t}}function Rs(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function am(t,e,n){let{reference:o,floating:i}=t;const a=Cr(e),s=xc(e),l=wc(s),c=qo(e),u=a==="y",p=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,m=o[l]/2-i[l]/2;let b;switch(c){case"top":b={x:p,y:o.y-i.height};break;case"bottom":b={x:p,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:h};break;case"left":b={x:o.x-i.width,y:h};break;default:b={x:o.x,y:o.y}}switch(oi(e)){case"start":b[s]-=m*(n&&u?-1:1);break;case"end":b[s]+=m*(n&&u?-1:1);break}return b}const Pk=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:h}=am(u,o,c),m=o,b={},y=0;for(let v=0;v<l.length;v++){const{name:w,fn:A}=l[v],{x:I,y:V,data:R,reset:E}=await A({x:p,y:h,initialPlacement:o,placement:m,strategy:i,middlewareData:b,rects:u,platform:s,elements:{reference:t,floating:e}});p=I??p,h=V??h,b={...b,[w]:{...b[w],...R}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:p,y:h}=am(u,m,c)),v=-1)}return{x:p,y:h,placement:m,strategy:i,middlewareData:b}};async function Cc(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:a,rects:s,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:b=0}=ni(e,t),y=im(b),w=l[m?h==="floating"?"reference":"floating":h],A=Rs(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:p,strategy:c})),I=h==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),R=await(a.isElement==null?void 0:a.isElement(V))?await(a.getScale==null?void 0:a.getScale(V))||{x:1,y:1}:{x:1,y:1},E=Rs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:V,strategy:c}):I);return{top:(A.top-E.top+y.top)/R.y,bottom:(E.bottom-A.bottom+y.bottom)/R.y,left:(A.left-E.left+y.left)/R.x,right:(E.right-A.right+y.right)/R.x}}const Ok=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:a,platform:s,elements:l,middlewareData:c}=e,{element:u,padding:p=0}=ni(t,e)||{};if(u==null)return{};const h=im(p),m={x:n,y:o},b=xc(i),y=wc(b),v=await s.getDimensions(u),w=b==="y",A=w?"top":"left",I=w?"bottom":"right",V=w?"clientHeight":"clientWidth",R=a.reference[y]+a.reference[b]-m[b]-a.floating[y],E=m[b]-a.reference[b],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let B=T?T[V]:0;(!B||!await(s.isElement==null?void 0:s.isElement(T)))&&(B=l.floating[V]||a.floating[y]);const H=R/2-E/2,_=B/2-v[y]/2-1,j=oo(h[A],_),Q=oo(h[I],_),F=j,S=B-v[y]-Q,x=B/2-v[y]/2+H,P=kc(F,x,S),C=!c.arrow&&oi(i)!=null&&x!==P&&a.reference[y]/2-(x<F?j:Q)-v[y]/2<0,M=C?x<F?x-F:x-S:0;return{[b]:m[b]+M,data:{[b]:P,centerOffset:x-P-M,...C&&{alignmentOffset:M}},reset:C}}}),Ik=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:a,rects:s,initialPlacement:l,platform:c,elements:u}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...w}=ni(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const A=qo(i),I=Cr(l),V=qo(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=m||(V||!v?[Vs(l)]:Ak(l)),T=y!=="none";!m&&T&&E.push(...Ek(l,v,y,R));const B=[l,...E],H=await Cc(e,w),_=[];let j=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(H[A]),h){const x=Ck(i,s,R);_.push(H[x[0]],H[x[1]])}if(j=[...j,{placement:i,overflows:_}],!_.every(x=>x<=0)){var Q,F;const x=(((Q=a.flip)==null?void 0:Q.index)||0)+1,P=B[x];if(P)return{data:{index:x,overflows:j},reset:{placement:P}};let C=(F=j.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:F.placement;if(!C)switch(b){case"bestFit":{var S;const M=(S=j.filter(L=>{if(T){const K=Cr(L.placement);return K===I||K==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(K=>K>0).reduce((K,oe)=>K+oe,0)]).sort((L,K)=>L[1]-K[1])[0])==null?void 0:S[0];M&&(C=M);break}case"initialPlacement":C=l;break}if(i!==C)return{reset:{placement:C}}}return{}}}};async function Nk(t,e){const{placement:n,platform:o,elements:i}=t,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=qo(n),l=oi(n),c=Cr(n)==="y",u=["left","top"].includes(s)?-1:1,p=a&&c?-1:1,h=ni(e,t);let{mainAxis:m,crossAxis:b,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof y=="number"&&(b=l==="end"?y*-1:y),c?{x:b*p,y:m*u}:{x:m*u,y:b*p}}const Vk=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:a,placement:s,middlewareData:l}=e,c=await Nk(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},Rk=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:w=>{let{x:A,y:I}=w;return{x:A,y:I}}},...c}=ni(t,e),u={x:n,y:o},p=await Cc(e,c),h=Cr(qo(i)),m=rm(h);let b=u[m],y=u[h];if(a){const w=m==="y"?"top":"left",A=m==="y"?"bottom":"right",I=b+p[w],V=b-p[A];b=kc(I,b,V)}if(s){const w=h==="y"?"top":"left",A=h==="y"?"bottom":"right",I=y+p[w],V=y-p[A];y=kc(I,y,V)}const v=l.fn({...e,[m]:b,[h]:y});return{...v,data:{x:v.x-n,y:v.y-o}}}}},Fk=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:a}=e,{apply:s=()=>{},...l}=ni(t,e),c=await Cc(e,l),u=qo(n),p=oi(n),h=Cr(n)==="y",{width:m,height:b}=o.floating;let y,v;u==="top"||u==="bottom"?(y=u,v=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,y=p==="end"?"top":"bottom");const w=b-c.top-c.bottom,A=m-c.left-c.right,I=oo(b-c[y],w),V=oo(m-c[v],A),R=!e.middlewareData.shift;let E=I,T=V;if(h?T=p||R?oo(V,A):A:E=p||R?oo(I,w):w,R&&!p){const H=fn(c.left,0),_=fn(c.right,0),j=fn(c.top,0),Q=fn(c.bottom,0);h?T=m-2*(H!==0||_!==0?H+_:fn(c.left,c.right)):E=b-2*(j!==0||Q!==0?j+Q:fn(c.top,c.bottom))}await s({...e,availableWidth:T,availableHeight:E});const B=await i.getDimensions(a.floating);return m!==B.width||b!==B.height?{reset:{rects:!0}}:{}}}};function Ar(t){return Ac(t)?(t.nodeName||"").toLowerCase():"#document"}function pn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function bo(t){var e;return(e=(Ac(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ac(t){return t instanceof Node||t instanceof pn(t).Node}function Hn(t){return t instanceof Element||t instanceof pn(t).Element}function ro(t){return t instanceof HTMLElement||t instanceof pn(t).HTMLElement}function sm(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pn(t).ShadowRoot}function aa(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Un(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Tk(t){return["table","td","th"].includes(Ar(t))}function Fs(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Dc(t){const e=Ec(),n=Hn(t)?Un(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Mk(t){let e=Ko(t);for(;ro(e)&&!ri(e);){if(Dc(e))return e;if(Fs(e))return null;e=Ko(e)}return null}function Ec(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ri(t){return["html","body","#document"].includes(Ar(t))}function Un(t){return pn(t).getComputedStyle(t)}function Ts(t){return Hn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ko(t){if(Ar(t)==="html")return t;const e=t.assignedSlot||t.parentNode||sm(t)&&t.host||bo(t);return sm(e)?e.host:e}function lm(t){const e=Ko(t);return ri(e)?t.ownerDocument?t.ownerDocument.body:t.body:ro(e)&&aa(e)?e:lm(e)}function sa(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=lm(t),a=i===((o=t.ownerDocument)==null?void 0:o.body),s=pn(i);if(a){const l=Bc(s);return e.concat(s,s.visualViewport||[],aa(i)?i:[],l&&n?sa(l):[])}return e.concat(i,sa(i,[],n))}function Bc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function dm(t){const e=Un(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=ro(t),a=i?t.offsetWidth:n,s=i?t.offsetHeight:o,l=Is(n)!==a||Is(o)!==s;return l&&(n=a,o=s),{width:n,height:o,$:l}}function Pc(t){return Hn(t)?t:t.contextElement}function ii(t){const e=Pc(t);if(!ro(e))return Xo(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:a}=dm(e);let s=(a?Is(n.width):n.width)/o,l=(a?Is(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Lk=Xo(0);function cm(t){const e=pn(t);return!Ec()||!e.visualViewport?Lk:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zk(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==pn(t)?!1:e}function Dr(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),a=Pc(t);let s=Xo(1);e&&(o?Hn(o)&&(s=ii(o)):s=ii(t));const l=zk(a,n,o)?cm(a):Xo(0);let c=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,p=i.width/s.x,h=i.height/s.y;if(a){const m=pn(a),b=o&&Hn(o)?pn(o):o;let y=m,v=Bc(y);for(;v&&o&&b!==y;){const w=ii(v),A=v.getBoundingClientRect(),I=Un(v),V=A.left+(v.clientLeft+parseFloat(I.paddingLeft))*w.x,R=A.top+(v.clientTop+parseFloat(I.paddingTop))*w.y;c*=w.x,u*=w.y,p*=w.x,h*=w.y,c+=V,u+=R,y=pn(v),v=Bc(y)}}return Rs({width:p,height:h,x:c,y:u})}function _k(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const a=i==="fixed",s=bo(o),l=e?Fs(e.floating):!1;if(o===s||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Xo(1);const p=Xo(0),h=ro(o);if((h||!h&&!a)&&((Ar(o)!=="body"||aa(s))&&(c=Ts(o)),ro(o))){const m=Dr(o);u=ii(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+p.x,y:n.y*u.y-c.scrollTop*u.y+p.y}}function Hk(t){return Array.from(t.getClientRects())}function um(t){return Dr(bo(t)).left+Ts(t).scrollLeft}function Uk(t){const e=bo(t),n=Ts(t),o=t.ownerDocument.body,i=fn(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=fn(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+um(t);const l=-n.scrollTop;return Un(o).direction==="rtl"&&(s+=fn(e.clientWidth,o.clientWidth)-i),{width:i,height:a,x:s,y:l}}function Wk(t,e){const n=pn(t),o=bo(t),i=n.visualViewport;let a=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){a=i.width,s=i.height;const u=Ec();(!u||u&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:a,height:s,x:l,y:c}}function jk(t,e){const n=Dr(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,a=ro(t)?ii(t):Xo(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,c=i*a.x,u=o*a.y;return{width:s,height:l,x:c,y:u}}function fm(t,e,n){let o;if(e==="viewport")o=Wk(t,n);else if(e==="document")o=Uk(bo(t));else if(Hn(e))o=jk(e,n);else{const i=cm(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Rs(o)}function pm(t,e){const n=Ko(t);return n===e||!Hn(n)||ri(n)?!1:Un(n).position==="fixed"||pm(n,e)}function Gk(t,e){const n=e.get(t);if(n)return n;let o=sa(t,[],!1).filter(l=>Hn(l)&&Ar(l)!=="body"),i=null;const a=Un(t).position==="fixed";let s=a?Ko(t):t;for(;Hn(s)&&!ri(s);){const l=Un(s),c=Dc(s);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||aa(s)&&!c&&pm(t,s))?o=o.filter(p=>p!==s):i=l,s=Ko(s)}return e.set(t,o),o}function Qk(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?Fs(e)?[]:Gk(e,this._c):[].concat(n),o],l=s[0],c=s.reduce((u,p)=>{const h=fm(e,p,i);return u.top=fn(h.top,u.top),u.right=oo(h.right,u.right),u.bottom=oo(h.bottom,u.bottom),u.left=fn(h.left,u.left),u},fm(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Xk(t){const{width:e,height:n}=dm(t);return{width:e,height:n}}function qk(t,e,n){const o=ro(e),i=bo(e),a=n==="fixed",s=Dr(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const c=Xo(0);if(o||!o&&!a)if((Ar(e)!=="body"||aa(i))&&(l=Ts(e)),o){const h=Dr(e,!0,a,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else i&&(c.x=um(i));const u=s.left+l.scrollLeft-c.x,p=s.top+l.scrollTop-c.y;return{x:u,y:p,width:s.width,height:s.height}}function Oc(t){return Un(t).position==="static"}function hm(t,e){return!ro(t)||Un(t).position==="fixed"?null:e?e(t):t.offsetParent}function mm(t,e){const n=pn(t);if(Fs(t))return n;if(!ro(t)){let i=Ko(t);for(;i&&!ri(i);){if(Hn(i)&&!Oc(i))return i;i=Ko(i)}return n}let o=hm(t,e);for(;o&&Tk(o)&&Oc(o);)o=hm(o,e);return o&&ri(o)&&Oc(o)&&!Dc(o)?n:o||Mk(t)||n}const Kk=async function(t){const e=this.getOffsetParent||mm,n=this.getDimensions,o=await n(t.floating);return{reference:qk(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Jk(t){return Un(t).direction==="rtl"}const Yk={convertOffsetParentRelativeRectToViewportRelativeRect:_k,getDocumentElement:bo,getClippingRect:Qk,getOffsetParent:mm,getElementRects:Kk,getClientRects:Hk,getDimensions:Xk,getScale:ii,isElement:Hn,isRTL:Jk};function Zk(t,e){let n=null,o;const i=bo(t);function a(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const{left:u,top:p,width:h,height:m}=t.getBoundingClientRect();if(l||e(),!h||!m)return;const b=Ns(p),y=Ns(i.clientWidth-(u+h)),v=Ns(i.clientHeight-(p+m)),w=Ns(u),I={rootMargin:-b+"px "+-y+"px "+-v+"px "+-w+"px",threshold:fn(0,oo(1,c))||1};let V=!0;function R(E){const T=E[0].intersectionRatio;if(T!==c){if(!V)return s();T?s(!1,T):o=setTimeout(()=>{s(!1,1e-7)},1e3)}V=!1}try{n=new IntersectionObserver(R,{...I,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,I)}n.observe(t)}return s(!0),a}function ai(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Pc(t),p=i||a?[...u?sa(u):[],...sa(e)]:[];p.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const h=u&&l?Zk(u,n):null;let m=-1,b=null;s&&(b=new ResizeObserver(A=>{let[I]=A;I&&I.target===u&&b&&(b.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var V;(V=b)==null||V.observe(e)})),n()}),u&&!c&&b.observe(u),b.observe(e));let y,v=c?Dr(t):null;c&&w();function w(){const A=Dr(t);v&&(A.x!==v.x||A.y!==v.y||A.width!==v.width||A.height!==v.height)&&n(),v=A,y=requestAnimationFrame(w)}return n(),()=>{var A;p.forEach(I=>{i&&I.removeEventListener("scroll",n),a&&I.removeEventListener("resize",n)}),h==null||h(),(A=b)==null||A.disconnect(),b=null,c&&cancelAnimationFrame(y)}}const si=Vk,Ic=Rk,li=Ik,gm=Fk,$k=Ok,ew=(t,e,n)=>{const o=new Map,i={platform:Yk,...n},a={...i.platform,_c:o};return Pk(t,e,{...i,platform:a})};function tw(t){return t!=null&&typeof t=="object"&&"$el"in t}function Nc(t){if(tw(t)){const e=t.$el;return Ac(e)&&Ar(e)==="#comment"?null:e}return t}function di(t){return typeof t=="function"?t():r.unref(t)}function bm(t){return{name:"arrow",options:t,fn(e){const n=Nc(di(t.element));return n==null?{}:$k({element:n,padding:t.padding}).fn(e)}}}function ym(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vm(t,e){const n=ym(t);return Math.round(e*n)/n}function ci(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var B;return(B=di(n.open))!=null?B:!0}),a=r.computed(()=>di(n.middleware)),s=r.computed(()=>{var B;return(B=di(n.placement))!=null?B:"bottom"}),l=r.computed(()=>{var B;return(B=di(n.strategy))!=null?B:"absolute"}),c=r.computed(()=>{var B;return(B=di(n.transform))!=null?B:!0}),u=r.computed(()=>Nc(t.value)),p=r.computed(()=>Nc(e.value)),h=r.ref(0),m=r.ref(0),b=r.ref(l.value),y=r.ref(s.value),v=r.shallowRef({}),w=r.ref(!1),A=r.computed(()=>{const B={position:b.value,left:"0",top:"0"};if(!p.value)return B;const H=vm(p.value,h.value),_=vm(p.value,m.value);return c.value?{...B,transform:"translate("+H+"px, "+_+"px)",...ym(p.value)>=1.5&&{willChange:"transform"}}:{position:b.value,left:H+"px",top:_+"px"}});let I;function V(){u.value==null||p.value==null||ew(u.value,p.value,{middleware:a.value,placement:s.value,strategy:l.value}).then(B=>{h.value=B.x,m.value=B.y,b.value=B.strategy,y.value=B.placement,v.value=B.middlewareData,w.value=!0})}function R(){typeof I=="function"&&(I(),I=void 0)}function E(){if(R(),o===void 0){V();return}if(u.value!=null&&p.value!=null){I=o(u.value,p.value,V);return}}function T(){i.value||(w.value=!1)}return r.watch([a,s,l],V,{flush:"sync"}),r.watch([u,p],E,{flush:"sync"}),r.watch(i,T,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(R),{x:r.shallowReadonly(h),y:r.shallowReadonly(m),strategy:r.shallowReadonly(b),placement:r.shallowReadonly(y),middlewareData:r.shallowReadonly(v),isPositioned:r.shallowReadonly(w),floatingStyles:A,update:V}}const Vc={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?typeof e.arg=="string"?document.querySelectorAll(`#${e.arg}`):Array.isArray(e.arg)?e.arg.map(i=>document.querySelector(`#${i}`)).flat():[]:[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},Rc=r.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1},zIndex:{default:void 0},contentClass:{}},setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(null),{floatingStyles:a,middlewareData:s,placement:l}=ci(n,o,{whileElementsMounted:ai,placement:e.placement,middleware:[li(),si({mainAxis:6}),bm({element:i})]}),c="ontouchstart"in window||navigator.maxTouchPoints>0,u=r.ref(!1),p=r.ref(0),h=r.ref(0),m=()=>{e.disabled||(clearTimeout(h.value),p.value=window.setTimeout(()=>{u.value=!0},250))},b=()=>{e.disabled||(clearTimeout(p.value),h.value=window.setTimeout(()=>u.value=!1,250))},y=()=>{c?u.value?b():m():b()},v=()=>{c||b()},w=()=>{c||b()},A=()=>{b()},I=()=>{clearTimeout(h.value),u.value=!0},V=r.computed(()=>{var E,T,B,H;const R={top:"bottom",right:"left",bottom:"top",left:"right"}[l.value];return{left:((E=s.value.arrow)==null?void 0:E.x)!=null?`${(T=s.value.arrow)==null?void 0:T.x}px`:"",top:((B=s.value.arrow)==null?void 0:B.y)!=null?`${(H=s.value.arrow)==null?void 0:H.y}px`:"",[R]:"-3px"}});return(R,E)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:r.normalizeClass([[{"cursor-not-allowed pointer-events-none":R.disabled},R.contentClass],"cursor-pointer flex items-center justify-center relative"]),onPointerdown:y,onPointerleave:w,onPointermove:E[0]||(E[0]=T=>{T.pointerType!=="touch"&&m()}),onPointerup:v},[r.renderSlot(R.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[u.value&&!R.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:r.normalizeClass([{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-en-body-sm-400":R.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-en-body-md-400":R.variant==="rich"},"fm-shadow-light-300 max-w-[240px] px-8 py-4 rounded-md"]),style:r.normalizeStyle([r.unref(a),{zIndex:R.zIndex}]),onMouseenter:I,onMouseleave:b},[r.renderSlot(R.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(R.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass([{"bg-fm-color-neutral-black":R.variant==="plain","bg-fm-color-neutral-white":R.variant==="rich"},"absolute h-8 rotate-45 rounded-[2px] w-8"]),style:r.normalizeStyle(V.value)},null,6),[[r.vShow,!R.hideArrow]])],38)):r.createCommentVNode("",!0)]))])),[[r.unref(Vc),A]])}}),nw={actions:{cancel:"Cancel",apply:"Apply",more:"More"},search:{recent:"Recent search",clearHistory:"Clear history"},label:{optional:"(Optional)"},date:{placeholder:"DD MM YYYY",format:"D MMM YYYY",monthFormat:"MMMM",yearFormat:"YYYY",startDate:"Start date",endDate:"End date",predefinedRanges:{today:"Today",yesterday:"Yesterday",thisWeek:"This week",lastWeek:"Last week",last7Days:"Last 7 days",thisMonth:"This month",lastMonth:"Last month",thisYear:"This year"},label:{compare:"Compare",custom:"Custom"},compare:"Date",compareLabel:"Compared: ",precedingPeriod:"Preceding period",match:{dayOfWeek:"Match day of week",dayOfMonth:"Match day of month",custom:"Custom"},day:{mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat",sun:"Sun"}},time:{start:"Starting Time",end:"Ending Time"},select:{placeholder:"Select item"},dropField:{placeholder:"Add files",accept:"Accepts ",maxSize:"Max size "},table:{loading:"Loading data...",itemsPerPage:"Items per page:",itemCount:"{start}-{end} of {total} items",pageCount:"of {total} pages",all:"All"},advancedSort:{availableItems:"Available Items",sortedGroups:"Sorted Groups",searchPlaceholder:"Search items...",sortByField:"Sort by field...",newGroup:"New Group",noItemsAvailable:"No items available",createGroupsPrompt:"Create groups to organize items",dropItemsHere:"Drop items here",createGroup:{title:"Create New Group",groupName:"Group Name",groupNamePlaceholder:"Enter group name...",groupNameRequired:"Group name is required",filterByQuery:"Filter by Query (Optional)",filterDescription:"Configure a query to automatically add items to this group",field:"Field",fieldPlaceholder:"Select field...",operator:"Operator",value:"Value",valuePlaceholder:"Enter value...",operators:{equals:"Equals",contains:"Contains",startsWith:"Starts With",endsWith:"Ends With",greaterThan:"Greater Than",lessThan:"Less Than"}}}},ow={actions:{cancel:"取消",apply:"应用",more:"更多"},search:{recent:"最近搜索",clearHistory:"清除历史"},label:{optional:"(可选)"},date:{placeholder:"年-月-日",format:"YYYY年MM月DD日",monthFormat:"MM月",yearFormat:"YYYY年",startDate:"开始日期",endDate:"结束日期",predefinedRanges:{today:"今天",yesterday:"昨天",thisWeek:"本周",lastWeek:"上周",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上月",thisYear:"今年"},label:{compare:"对比",custom:"自定义"},compare:"日期",compareLabel:"对比: ",precedingPeriod:"上期",match:{dayOfWeek:"匹配周几",dayOfMonth:"匹配几号",custom:"自定义"},day:{mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六",sun:"日"}},time:{start:"开始时间",end:"结束时间"},select:{placeholder:"请选择"},dropField:{placeholder:"添加文件",accept:"支持: ",maxSize:"最大文件大小: "},table:{loading:"加载中...",itemsPerPage:"每页条数: ",itemCount:"{start}-{end} 条,共 {total} 条",pageCount:"共 {total} 页",all:"全部"},advancedSort:{availableItems:"可用项目",sortedGroups:"已排序组",searchPlaceholder:"搜索项目...",sortByField:"按字段排序...",newGroup:"新建组",noItemsAvailable:"没有可用项目",createGroupsPrompt:"创建组来组织项目",dropItemsHere:"将项目拖放到此处",createGroup:{title:"创建新组",groupName:"组名",groupNamePlaceholder:"输入组名...",groupNameRequired:"组名为必填项",filterByQuery:"按条件筛选(可选)",filterDescription:"配置条件以自动将项目添加到此组",field:"字段",fieldPlaceholder:"选择字段...",operator:"操作符",value:"值",valuePlaceholder:"输入值...",operators:{equals:"等于",contains:"包含",startsWith:"开头是",endsWith:"结尾是",greaterThan:"大于",lessThan:"小于"}}}},rw={actions:{cancel:"取消",apply:"應用",more:"更多"},search:{recent:"最近搜尋",clearHistory:"清除歷史"},label:{optional:"(選填)"},date:{placeholder:"年-月-日",format:"YYYY年MM月DD日",monthFormat:"MM月",yearFormat:"YYYY年",startDate:"開始日期",endDate:"結束日期",predefinedRanges:{today:"今天",yesterday:"昨天",thisWeek:"本周",lastWeek:"上周",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上月",thisYear:"今年"},label:{compare:"對比",custom:"自定義"},compare:"日期",compareLabel:"對比: ",precedingPeriod:"上期",match:{dayOfWeek:"匹配週幾",dayOfMonth:"匹配幾號",custom:"自定義"},day:{mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六",sun:"日"}},time:{start:"開始時間",end:"結束時間"},select:{placeholder:"請選擇"},dropField:{placeholder:"新增文件",accept:"支持: ",maxSize:"最大文件大小: "},table:{loading:"載入中...",itemsPerPage:"每頁條數: ",itemCount:"{start}-{end} 條,共 {total} 條",pageCount:"共 {total} 頁",all:"全部"},advancedSort:{availableItems:"可用項目",sortedGroups:"已排序組",searchPlaceholder:"搜尋項目...",sortByField:"按欄位排序...",newGroup:"新建組",noItemsAvailable:"沒有可用項目",createGroupsPrompt:"創建組來組織項目",dropItemsHere:"將項目拖放到此處",createGroup:{title:"創建新組",groupName:"組名",groupNamePlaceholder:"輸入組名...",groupNameRequired:"組名為必填項",filterByQuery:"按條件篩選(選填)",filterDescription:"配置條件以自動將項目添加到此組",field:"欄位",fieldPlaceholder:"選擇欄位...",operator:"操作符",value:"值",valuePlaceholder:"輸入值...",operators:{equals:"等於",contains:"包含",startsWith:"開頭是",endsWith:"結尾是",greaterThan:"大於",lessThan:"小於"}}}},iw={actions:{cancel:"ยกเลิก",apply:"นำไปใช้",more:"เพิ่มเติม"},search:{recent:"การค้นหาล่าสุด",clearHistory:"ล้างประวัติ"},label:{optional:"(ไม่จำเป็น)"},date:{placeholder:"วว ดด ปปปป",format:"D MMM YYYY",monthFormat:"MMMM",yearFormat:"YYYY",startDate:"วันที่เริ่มต้น",endDate:"วันที่สิ้นสุด",predefinedRanges:{today:"วันนี้",yesterday:"เมื่อวาน",thisWeek:"สัปดาห์นี้",lastWeek:"สัปดาห์ที่แล้ว",last7Days:"7 วันที่ผ่านมา",thisMonth:"เดือนนี้",lastMonth:"เดือนที่แล้ว",thisYear:"ปีนี้"},label:{compare:"เปรียบเทียบ",custom:"กำหนดเอง"},compare:"วันที่",compareLabel:"เปรียบเทียบกับ: ",precedingPeriod:"ช่วงเวลาก่อนหน้า",match:{dayOfWeek:"ตรงกับวันในสัปดาห์",dayOfMonth:"ตรงกับวันที่",custom:"กำหนดเอง"},day:{mon:"จ.",tue:"อ.",wed:"พ.",thu:"พฤ.",fri:"ศ.",sat:"ส.",sun:"อา."}},time:{start:"เวลาเริ่มต้น",end:"เวลาสิ้นสุด"},select:{placeholder:"เลือกรายการ"},dropField:{placeholder:"เพิ่มไฟล์",accept:"รองรับ ",maxSize:"ขนาดสูงสุด "},table:{loading:"กำลังโหลดข้อมูล...",itemsPerPage:"รายการต่อหน้า:",itemCount:"{start}-{end} จาก {total} รายการ",pageCount:"จาก {total} หน้า",all:"ทั้งหมด"},advancedSort:{availableItems:"รายการที่มี",sortedGroups:"กลุ่มที่เรียง",searchPlaceholder:"ค้นหารายการ...",sortByField:"เรียงตามฟิลด์...",newGroup:"กลุ่มใหม่",noItemsAvailable:"ไม่มีรายการ",createGroupsPrompt:"สร้างกลุ่มเพื่อจัดการรายการ",dropItemsHere:"วางรายการที่นี่",createGroup:{title:"สร้างกลุ่มใหม่",groupName:"ชื่อกลุ่ม",groupNamePlaceholder:"ป้อนชื่อกลุ่ม...",groupNameRequired:"ต้องระบุชื่อกลุ่ม",filterByQuery:"กรองตามเงื่อนไข (ไม่บังคับ)",filterDescription:"ตั้งค่าเงื่อนไขเพื่อเพิ่มรายการเข้ากลุ่มโดยอัตโนมัติ",field:"ฟิลด์",fieldPlaceholder:"เลือกฟิลด์...",operator:"ตัวดำเนินการ",value:"ค่า",valuePlaceholder:"ป้อนค่า...",operators:{equals:"เท่ากับ",contains:"มี",startsWith:"เริ่มต้นด้วย",endsWith:"ลงท้ายด้วย",greaterThan:"มากกว่า",lessThan:"น้อยกว่า"}}}};var km=(t=>(t.enUS="en-US",t.zhCN="zh-CN",t.zhHant="zh-Hant",t.jaJP="ja-JP",t.thTH="th-TH",t.viVN="vi-VN",t.msMY="ms-MY",t.idID="id-ID",t.phPH="ph-PH",t))(km||{});const aw={"en-US":nw,"zh-CN":ow,"zh-Hant":rw,"th-TH":iw},sw=["en-US","zh-CN","zh-Hant","th-TH"],Fc="en-US",Ms=r.ref(Fc);function U(t,e){const n=aw[Ms.value],o=t.split(".");let i=n;for(const a of o)i=i[a];return e?Object.entries(e).reduce((a,[s,l])=>a.replace(new RegExp(`{${s}}`,"g"),String(l)),i):i}function wm(t){sw.includes(t)?Ms.value=t:(console.warn(`Locale ${t} is not supported, using default locale ${Fc}`),Ms.value=Fc)}const hn=r.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},locale:{default:"en"}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,a)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info,"fm-typo-en-body-lg-600":i.locale==="en","fm-typo-cn-body-lg-600":i.locale==="cn"}])},[r.renderSlot(i.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(i.label),1),i.required?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-600",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):r.createCommentVNode("",!0),i.optional?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])},r.toDisplayString(r.unref(U)("label.optional")),3)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(Rc,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(ue,{class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"]),name:"info",size:"sm"},null,8,["class"])]),_:1},8,["content","disabled"])):r.createCommentVNode("",!0)])],2)):r.createCommentVNode("",!0)}});function la(){const t=r.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const lw={key:1,class:"flex items-center justify-between"},Nt=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},blameHandler:{},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"},locale:{}},setup(t,{expose:e}){const n=t,o=r.inject(Ke,null),i=()=>{var y;(y=b.value)==null||y.scrollIntoView({behavior:"smooth"})},{errorMessages:a,isPristine:s}=nm(n,null,null,n.blameHandler??i),{focus:l,blur:c}=la(),u=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),p=r.computed(()=>({label:n.label,disabled:u.value,required:n.required,optional:n.optional,info:n.info})),h=r.computed(()=>({text:n.helperText,disabled:u.value,state:n.helperState,errorMessages:a.value})),m=r.computed(()=>({isPristine:s,invalid:a.value.length>0})),b=r.ref(null);return e({el:b}),(y,v)=>(r.openBlock(),r.createBlock(n.tag,{ref_key:"el",ref:b,class:"flex flex-col gap-8",onBlur:r.unref(c),onClick:r.unref(l)},{default:r.withCtx(()=>[y.label||y.$slots.label?(r.openBlock(),r.createBlock(hn,r.mergeProps({key:0,locale:y.locale},p.value),{default:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),_:3},16,["locale"])):r.createCommentVNode("",!0),r.renderSlot(y.$slots,"default",r.normalizeProps(r.guardReactiveProps(m.value))),h.value.text||h.value.errorMessages.length>0||y.$slots["helper-text"]||y.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",lw,[r.createVNode(om,r.normalizeProps(r.guardReactiveProps(h.value)),{default:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),_:3},16),r.renderSlot(y.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}});var mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ls(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xm={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(mn,function(){var n=1e3,o=6e4,i=36e5,a="millisecond",s="second",l="minute",c="hour",u="day",p="week",h="month",m="quarter",b="year",y="date",v="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var P=["th","st","nd","rd"],C=x%100;return"["+x+(P[(C-20)%10]||P[C]||P[0])+"]"}},V=function(x,P,C){var M=String(x);return!M||M.length>=P?x:""+Array(P+1-M.length).join(C)+x},R={s:V,z:function(x){var P=-x.utcOffset(),C=Math.abs(P),M=Math.floor(C/60),L=C%60;return(P<=0?"+":"-")+V(M,2,"0")+":"+V(L,2,"0")},m:function x(P,C){if(P.date()<C.date())return-x(C,P);var M=12*(C.year()-P.year())+(C.month()-P.month()),L=P.clone().add(M,h),K=C-L<0,oe=P.clone().add(M+(K?-1:1),h);return+(-(M+(C-L)/(K?L-oe:oe-L))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:h,y:b,w:p,d:u,D:y,h:c,m:l,s,ms:a,Q:m}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},E="en",T={};T[E]=I;var B="$isDayjsObject",H=function(x){return x instanceof F||!(!x||!x[B])},_=function x(P,C,M){var L;if(!P)return E;if(typeof P=="string"){var K=P.toLowerCase();T[K]&&(L=K),C&&(T[K]=C,L=K);var oe=P.split("-");if(!L&&oe.length>1)return x(oe[0])}else{var le=P.name;T[le]=P,L=le}return!M&&L&&(E=L),L||!M&&E},j=function(x,P){if(H(x))return x.clone();var C=typeof P=="object"?P:{};return C.date=x,C.args=arguments,new F(C)},Q=R;Q.l=_,Q.i=H,Q.w=function(x,P){return j(x,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var F=function(){function x(C){this.$L=_(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[B]=!0}var P=x.prototype;return P.parse=function(C){this.$d=function(M){var L=M.date,K=M.utc;if(L===null)return new Date(NaN);if(Q.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var oe=L.match(w);if(oe){var le=oe[2]-1||0,Z=(oe[7]||"0").substring(0,3);return K?new Date(Date.UTC(oe[1],le,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Z)):new Date(oe[1],le,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Z)}}return new Date(L)}(C),this.init()},P.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},P.$utils=function(){return Q},P.isValid=function(){return this.$d.toString()!==v},P.isSame=function(C,M){var L=j(C);return this.startOf(M)<=L&&L<=this.endOf(M)},P.isAfter=function(C,M){return j(C)<this.startOf(M)},P.isBefore=function(C,M){return this.endOf(M)<j(C)},P.$g=function(C,M,L){return Q.u(C)?this[M]:this.set(L,C)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(C,M){var L=this,K=!!Q.u(M)||M,oe=Q.p(C),le=function(nt,ot){var At=Q.w(L.$u?Date.UTC(L.$y,ot,nt):new Date(L.$y,ot,nt),L);return K?At:At.endOf(u)},Z=function(nt,ot){return Q.w(L.toDate()[nt].apply(L.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(ot)),L)},ae=this.$W,fe=this.$M,he=this.$D,Ie="set"+(this.$u?"UTC":"");switch(oe){case b:return K?le(1,0):le(31,11);case h:return K?le(1,fe):le(0,fe+1);case p:var st=this.$locale().weekStart||0,Xe=(ae<st?ae+7:ae)-st;return le(K?he-Xe:he+(6-Xe),fe);case u:case y:return Z(Ie+"Hours",0);case c:return Z(Ie+"Minutes",1);case l:return Z(Ie+"Seconds",2);case s:return Z(Ie+"Milliseconds",3);default:return this.clone()}},P.endOf=function(C){return this.startOf(C,!1)},P.$set=function(C,M){var L,K=Q.p(C),oe="set"+(this.$u?"UTC":""),le=(L={},L[u]=oe+"Date",L[y]=oe+"Date",L[h]=oe+"Month",L[b]=oe+"FullYear",L[c]=oe+"Hours",L[l]=oe+"Minutes",L[s]=oe+"Seconds",L[a]=oe+"Milliseconds",L)[K],Z=K===u?this.$D+(M-this.$W):M;if(K===h||K===b){var ae=this.clone().set(y,1);ae.$d[le](Z),ae.init(),this.$d=ae.set(y,Math.min(this.$D,ae.daysInMonth())).$d}else le&&this.$d[le](Z);return this.init(),this},P.set=function(C,M){return this.clone().$set(C,M)},P.get=function(C){return this[Q.p(C)]()},P.add=function(C,M){var L,K=this;C=Number(C);var oe=Q.p(M),le=function(fe){var he=j(K);return Q.w(he.date(he.date()+Math.round(fe*C)),K)};if(oe===h)return this.set(h,this.$M+C);if(oe===b)return this.set(b,this.$y+C);if(oe===u)return le(1);if(oe===p)return le(7);var Z=(L={},L[l]=o,L[c]=i,L[s]=n,L)[oe]||1,ae=this.$d.getTime()+C*Z;return Q.w(ae,this)},P.subtract=function(C,M){return this.add(-1*C,M)},P.format=function(C){var M=this,L=this.$locale();if(!this.isValid())return L.invalidDate||v;var K=C||"YYYY-MM-DDTHH:mm:ssZ",oe=Q.z(this),le=this.$H,Z=this.$m,ae=this.$M,fe=L.weekdays,he=L.months,Ie=L.meridiem,st=function(ot,At,Pt,kn){return ot&&(ot[At]||ot(M,K))||Pt[At].slice(0,kn)},Xe=function(ot){return Q.s(le%12||12,ot,"0")},nt=Ie||function(ot,At,Pt){var kn=ot<12?"AM":"PM";return Pt?kn.toLowerCase():kn};return K.replace(A,function(ot,At){return At||function(Pt){switch(Pt){case"YY":return String(M.$y).slice(-2);case"YYYY":return Q.s(M.$y,4,"0");case"M":return ae+1;case"MM":return Q.s(ae+1,2,"0");case"MMM":return st(L.monthsShort,ae,he,3);case"MMMM":return st(he,ae);case"D":return M.$D;case"DD":return Q.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return st(L.weekdaysMin,M.$W,fe,2);case"ddd":return st(L.weekdaysShort,M.$W,fe,3);case"dddd":return fe[M.$W];case"H":return String(le);case"HH":return Q.s(le,2,"0");case"h":return Xe(1);case"hh":return Xe(2);case"a":return nt(le,Z,!0);case"A":return nt(le,Z,!1);case"m":return String(Z);case"mm":return Q.s(Z,2,"0");case"s":return String(M.$s);case"ss":return Q.s(M.$s,2,"0");case"SSS":return Q.s(M.$ms,3,"0");case"Z":return oe}return null}(ot)||oe.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(C,M,L){var K,oe=this,le=Q.p(M),Z=j(C),ae=(Z.utcOffset()-this.utcOffset())*o,fe=this-Z,he=function(){return Q.m(oe,Z)};switch(le){case b:K=he()/12;break;case h:K=he();break;case m:K=he()/3;break;case p:K=(fe-ae)/6048e5;break;case u:K=(fe-ae)/864e5;break;case c:K=fe/i;break;case l:K=fe/o;break;case s:K=fe/n;break;default:K=fe}return L?K:Q.a(K)},P.daysInMonth=function(){return this.endOf(h).$D},P.$locale=function(){return T[this.$L]},P.locale=function(C,M){if(!C)return this.$L;var L=this.clone(),K=_(C,M,!0);return K&&(L.$L=K),L},P.clone=function(){return Q.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},x}(),S=F.prototype;return j.prototype=S,[["$ms",a],["$s",s],["$m",l],["$H",c],["$W",u],["$M",h],["$y",b],["$D",y]].forEach(function(x){S[x[1]]=function(P){return this.$g(P,x[0],x[1])}}),j.extend=function(x,P){return x.$i||(x(P,F,j),x.$i=!0),j},j.locale=_,j.isDayjs=H,j.unix=function(x){return j(1e3*x)},j.en=T[E],j.Ls=T,j.p={},j})})(xm);var Tc=xm.exports;const W=Ls(Tc);function Vt(t,e){return t===null||e===null||t===void 0||e===void 0||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Vt(t[n],e[n]))}const pt=(t,e,n)=>t&&e&&n?t.isAfter(e,"day")&&t.isBefore(n,"day"):!1,dw={class:"fm-checkbox"},cw={class:"relative flex items-center justify-center w-6 h-6"},uw={class:"fm-checkbox__input--container"},fw=["checked","disabled","indeterminate"],pw={class:"fm-typo-en-body-lg-400"},hw={key:0,class:"text-fm-color-typo-secondary fm-typo-en-body-md-400"},Sm=r.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=Pe(e,"indeterminate"),s=Array.isArray(i.value),l=r.ref(s?i.value.some(p=>Vt(p,e.value)):i.value),c=r.computed(()=>{const p=s?i.value.some(h=>Vt(h,e.value)):i.value;return a.value&&!p?"remove":i.value?"check_small":""});function u(){if(o.value)return;a.value=!1,l.value=!l.value;let p=i.value;s?p=l.value?p.concat(e.value):p.filter(h=>!Vt(h,e.value)):p=l.value,i.value=p}return r.watch(()=>i.value,()=>{l.value=s?i.value.some(p=>Vt(p,e.value)):i.value}),(p,h)=>(r.openBlock(),r.createElementBlock("div",dw,[r.createElementVNode("label",{class:r.normalizeClass([["space-x-8",p.sublabel?"items-start":"items-center"],"fm-checkbox--wrapper"])},[r.createElementVNode("div",cw,[r.createElementVNode("div",uw,[r.createElementVNode("input",{checked:l.value,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":l.value}),disabled:o.value,indeterminate:r.unref(a),type:"checkbox",onInput:u},null,42,fw),r.unref(a)||l.value?(r.openBlock(),r.createBlock(ue,{key:0,name:c.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)])]),e.label?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([[p.sublabel?"py-0":"py-0.5","space-y-4"],"fm-checkbox__label-container"])},[r.renderSlot(p.$slots,"label"),r.createElementVNode("div",pw,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",hw,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)],2)):r.createCommentVNode("",!0)],2)]))}});function mw(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const n=["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(t.tagName),o=t.hasAttribute("tabindex")&&t.tabIndex>=0,i=t.hasAttribute("disabled");return n&&!i||o}function gw(t){if(!t)return!1;for(const e of t.querySelectorAll("*"))if(mw(e))return!0;return!1}const Cm="arrow-focusable";function bw(t){const e=n=>{if(!t.value)return;const o=document.querySelectorAll(`.${Cm}`);if(o.length!==0&&(n.key==="ArrowDown"||n.key==="ArrowUp")){const i=Array.from(o).findIndex(l=>l===document.activeElement);let a=i;n.key==="ArrowDown"?a=i+1:n.key==="ArrowUp"&&(a=i-1),a<0?a=o.length-1:a>=o.length&&(a=0),o[a].focus()}};r.onMounted(()=>{window.addEventListener("keydown",e)}),r.onUnmounted(()=>{window.removeEventListener("keydown",e)})}const yw=["tabindex"],vw={class:"fm-menu-item--left"},kw={key:0,class:"fm-menu-item--right"},St=Be(r.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.ref(!1),i=r.computed(()=>!n.disabled&&n.selectable&&!n.hasCheckbox),a=r.inject(em,null),s=e,l=p=>{p.preventDefault(),a==null||a.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},c=()=>{s("update:modelValue",n.modelValue)};function u(p){o.value=p}return(p,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass([{"fm-menu-item":!0,"fm-menu-item--selected":p.modelValue&&!p.hasCheckbox,"fm-menu-item--disabled":p.disabled,"hover:bg-fm-color-opacity-sm":!p.disabled&&!p.modelValue&&p.selectable,[r.unref(Cm)]:i.value},p.hasCheckbox?"pl-4":"pl-12"]),tabindex:i.value?"-1":"",onMousedown:h[1]||(h[1]=()=>u(!0)),onMouseleave:h[2]||(h[2]=()=>u(!1)),onMouseup:h[3]||(h[3]=()=>u(!1)),onClickCapture:l,onKeyup:r.withKeys(l,["enter","space"])},[r.createElementVNode("div",vw,[r.renderSlot(p.$slots,"prepend",{},()=>[!p.hasCheckbox&&p.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:p.disabled?"#C7C7CC":p.modelValue?"#FF7823":"#1C1C1E",name:p.icon,outline:!o.value&&!p.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),p.hasCheckbox?(r.openBlock(),r.createBlock(Sm,{key:1,disabled:p.disabled,indeterminate:p.indeterminate,"model-value":p.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:h[0]||(h[0]=m=>m.preventDefault()),"onUpdate:modelValue":c},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(p.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-md-400 max-w-[240px]",p.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(p.label),3),p.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-sm-400 ${p.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(p.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(p.$slots,"append",{},void 0,!0),p.expandable?(r.openBlock(),r.createElementBlock("div",kw,[r.createVNode(ue,{color:p.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],42,yw)]))}}),[["__scopeId","data-v-5c141aa6"]]);for(var Rt=[],Mc=0;Mc<256;++Mc)Rt.push((Mc+256).toString(16).slice(1));function ww(t,e=0){return(Rt[t[e+0]]+Rt[t[e+1]]+Rt[t[e+2]]+Rt[t[e+3]]+"-"+Rt[t[e+4]]+Rt[t[e+5]]+"-"+Rt[t[e+6]]+Rt[t[e+7]]+"-"+Rt[t[e+8]]+Rt[t[e+9]]+"-"+Rt[t[e+10]]+Rt[t[e+11]]+Rt[t[e+12]]+Rt[t[e+13]]+Rt[t[e+14]]+Rt[t[e+15]]).toLowerCase()}var zs,xw=new Uint8Array(16);function Sw(){if(!zs&&(zs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zs(xw)}var Cw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Am={randomUUID:Cw};function Dm(t,e,n){if(Am.randomUUID&&!e&&!t)return Am.randomUUID();t=t||{};var o=t.random||(t.rng||Sw)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,ww(o)}function Em(t,e){r.onMounted(async()=>{var n;e.value&&(await r.nextTick(),(n=t.value)==null||n.focus())}),r.watch(e,async n=>{var o;n&&((o=t.value)==null||o.focus())})}const Aw=["autofocus","disabled","inputMode","maxlength","minlength","placeholder","readOnly","step","type","value"],Er=r.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},type:{},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},autofocus:{type:Boolean},formatter:{type:Function,default:t=>t},decimal:{},datalist:{default:void 0},shiftDatalist:{type:Boolean,default:!0},datalistMaxHeight:{default:408},datalistMinHeight:{},offsetDatalist:{},datalistPlacement:{},datalistZIndex:{default:99},datalistWidth:{},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed","paste"],setup(t,{expose:e,emit:n}){const o=t,i=r.inject(Ke,null),a=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),s=n,l=r.ref(null),c=Pe(o,"modelValue"),{isFocused:u,focus:p,blur:h}=la(),m=B=>{c.value=o.formatter(B.target.value)},b=r.ref(null),y=r.computed(()=>{var B;return((B=b.value)==null?void 0:B.el)??null}),v=r.ref(null),w=r.ref(o.datalistMaxHeight),A=r.ref(!1),{floatingStyles:I}=ci(y,v,{middleware:[gm({apply({availableHeight:B,elements:H}){if(o.shiftDatalist)return;const _=B-16,j=Math.min(_,o.datalistMaxHeight);o.datalistMinHeight&&j<=o.datalistMinHeight||(w.value=j,Object.assign(H.floating.style,{maxHeight:`${_}px`}))}}),si({mainAxis:o.offsetDatalist??8}),li({crossAxis:!1,fallbackStrategy:"initialPlacement"}),Ic()],placement:o.datalistPlacement,whileElementsMounted:ai,strategy:"fixed"}),V=r.computed(()=>o.datalist?(A.value=!0,o.datalist.filter(B=>B.toLowerCase().includes(c.value.toLowerCase()))):null),R=r.ref(null);e({focus:p,inputEl:l}),r.onBeforeMount(()=>{R.value=`text-field-${Dm()}`}),Em(l,r.toRef(()=>o.autofocus));const E=r.computed(()=>[R.value]),T=()=>{var B;(B=l.value)==null||B.focus()};return(B,H)=>{var _;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(Nt,{id:R.value,ref_key:"formGroupRef",ref:b,modelValue:r.unref(c),"onUpdate:modelValue":H[4]||(H[4]=j=>r.isRef(c)?c.value=j:null),disabled:a.value,focused:r.unref(u),"helper-state":B.helperState,"helper-text":B.helperText,info:B.labelInfo,label:B.label,optional:B.labelMark==="optional",required:B.labelMark==="required",rules:B.rules,"blame-handler":T},r.createSlots({default:r.withCtx(({invalid:j})=>[r.createVNode(at,{"append-icon":B.appendIcon,focused:r.unref(u),invalid:B.invalid||j,"prepend-icon":B.prependIcon,"show-valid-border":B.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(B.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(B.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:l,autofocus:B.autofocus,class:r.normalizeClass({"fm-text-field--input fm-typo-en-body-lg-400":!0,"text-fm-color-typo-primary":!a.value,"text-fm-color-typo-disabled":a.value,"outline-none":!0}),disabled:a.value,inputMode:B.inputmode,maxlength:B.maxLength,minlength:B.minLength,placeholder:B.placeholder,readOnly:B.readonly,step:B.decimal?`0.${"0".repeat(B.decimal-1)}1`:void 0,type:B.type??B.inputmode,value:r.unref(c),onBlur:H[0]||(H[0]=()=>{r.unref(h)(),s("focus-changed",!1)}),onClick:H[1]||(H[1]=()=>{a.value||(A.value=!0)}),onFocus:H[2]||(H[2]=()=>{r.unref(p)(),s("focus-changed",!0)}),onInput:m,onPaste:H[3]||(H[3]=Q=>s("paste",Q))},null,42,Aw)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),_:2},[B.label||B.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(B.$slots,"label")]),key:"0"}:void 0,B.helperText||B.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(B.$slots,"helper-text")]),key:"1"}:void 0,B.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([a.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(B.maxLength?`${r.unref(c).length} / ${B.maxLength}`:""),3)]),key:"2"}:void 0]),1032,["id","modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[B.datalist&&A.value?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:v,style:r.normalizeStyle({...r.unref(I),zIndex:o.datalistZIndex}),class:"block"},[r.renderSlot(B.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:w.value,width:B.datalistWidth?`${B.datalistWidth}px`:`${(_=y.value)==null?void 0:_.clientWidth}px`})),()=>{var j;return[r.createElementVNode("div",{class:r.normalizeClass(["relative","px-4 py-4","flex flex-col","overflow-y-auto","bg-fm-color-neutral-white shadow-light-300 rounded-md"]),style:r.normalizeStyle({"max-height":`${w.value}px`,width:B.datalistWidth?`${B.datalistWidth}px`:`${(j=y.value)==null?void 0:j.clientWidth}px`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.value,Q=>(r.openBlock(),r.createBlock(St,{key:Q,label:Q,"model-value":Q===r.unref(c),value:Q,onClick:()=>{var F;(F=l.value)==null||F.focus(),c.value=Q,A.value=!1}},null,8,["label","model-value","value","onClick"]))),128))],4)]})],4)),[[r.unref(Vc),()=>{A.value=!1},E.value]]):r.createCommentVNode("",!0)]))],64)}}}),Dw=["tabindex"],io=Be(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},customElementClassListForCloseOnClick:{},closeOnMouseLeave:{type:Boolean,default:!1},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1},stopClickPropagation:{type:Boolean},zIndex:{default:99},offset:{},shift:{type:Boolean,default:!1},minHeight:{},flipPadding:{default:()=>({bottom:40})},elementIdsUseForDismissAwayEventExclusion:{},selectorForDismissAwayEventExclusion:{}},emits:["menu-changed"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=r.ref([]);let s;const l=r.ref(),c=r.ref(o.maxHeight),u=r.ref(!1),p=r.ref(!1),h=r.inject($h,null),m=r.ref(null),b=r.ref(null),{floatingStyles:y}=ci(m,b,{middleware:[gm({apply({availableHeight:x,elements:P}){if(o.shift)return;const C=x-16,M=Math.min(C,o.maxHeight),L=o.minHeight?Math.max(M,o.minHeight):M;c.value=L,Object.assign(P.floating.style,{maxHeight:`${L}px`})}}),si({mainAxis:o.offset??(h?8:4),crossAxis:h?-12:0}),li({crossAxis:!1,fallbackStrategy:"initialPlacement",padding:o.flipPadding}),Ic()],placement:o.placement,whileElementsMounted:ai,strategy:"fixed"}),v=()=>{V&&clearTimeout(V)},w=()=>{j.value==="hover"&&I()},A=x=>{if(!(x instanceof PointerEvent&&x.detail===0)&&(o.stopClickPropagation&&(x.stopPropagation(),document.body.click()),!o.disabled)){if(u.value){u.value=!1;return}j.value==="click"&&I()}},I=()=>{v(),p.value=!0,u.value=!0,h==null||h.setChildId(s)};let V;const R=()=>{j.value==="hover"&&(p.value=!1,v(),o.closeOnMouseLeave&&(V=setTimeout(()=>{u.value=!1},500)))},E=()=>{v(),p.value=!0},T=()=>{p.value=!1,V&&clearTimeout(V),o.closeOnMouseLeave&&j.value==="hover"&&(V=setTimeout(()=>{p.value||(a.value.length>0&&h?u.value=a.value.some(({injectProps:x})=>x.mouseInMenu.value):(h&&h.closeParent(),j.value!=="click"&&(u.value=!1)))},500))},B=x=>{const P=x.target;if(!(!P||!Array.isArray(o.customElementClassListForCloseOnClick))){for(const C of o.customElementClassListForCloseOnClick)if(P.closest(`.${C}`)){H();return}}},H=()=>{o.closeOnClick&&setTimeout(()=>{var x;u.value=!1,(x=m.value)==null||x.focus(),h==null||h.closeParent()},10)},_=r.computed(()=>({mouseInMenu:p}));r.provide($h,{register({injectProps:x}){return a.value=[...a.value,{injectProps:x}],a.value.length},closeParent(){h?(u.value=!1,h==null||h.closeParent()):u.value=j.value!=="click"},setChildId(x){l.value=x},mouseInChildId:l,trigger:o.trigger}),r.provide(em,{handleContentClick:H}),r.onMounted(()=>{window.addEventListener("click",Q),h&&(s=h.register({injectProps:_}))}),r.onUnmounted(()=>{window.removeEventListener("click",Q)}),r.watch(()=>h==null?void 0:h.mouseInChildId.value,x=>{x!==s&&(v(),u.value=!1)});const j=r.computed(()=>h===null?o.trigger:"hover");r.watch(()=>u.value,()=>i("menu-changed",u.value)),r.watch(()=>[u.value,b.value],([x,P])=>{if(!x)return;const C=P==null?void 0:P.querySelector('*[data-checked="true"]');C&&C.scrollIntoView()});const Q=x=>{if(!u.value)return;const P=x.path||x.composedPath();for(const M of P)if(M==m.value||M==b.value)return;const C=x.target;if(C){if(o.selectorForDismissAwayEventExclusion&&C.closest(o.selectorForDismissAwayEventExclusion))return;if(o.elementIdsUseForDismissAwayEventExclusion)for(const M of o.elementIdsUseForDismissAwayEventExclusion){const L=document.getElementById(M);if(L&&L.contains(C))return}}u.value=!1};function F(x){typeof x=="boolean"?u.value=x:u.value=!u.value}const S=r.ref(-1);return r.onMounted(()=>{!o.disabled&&!gw(m.value)&&(S.value=0)}),bw(u),e({toggleMenu:F}),(x,P)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:m,tabindex:S.value,class:"fm-menu",onClick:A,onMouseenter:w,onMouseleave:R,onKeyupCapture:r.withKeys(A,["enter","space"])},[r.renderSlot(x.$slots,"menu-button",{},void 0,!0)],40,Dw),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(h)||x.inPopover,to:"body"},[u.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:b,style:r.normalizeStyle({...r.unref(y),zIndex:o.zIndex}),class:"block",onMouseenter:E,onMouseleave:T,onClick:B},[r.renderSlot(x.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:c.value,width:`${x.width}px`})),()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${c.value}px`,width:`${x.width}px`}),class:"fm-menu__wrapper"},[r.renderSlot(x.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-6ea6484f"]]),Lc=r.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},rightIcon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.ref(!1);function s(y){n.selectable&&(a.value=y)}const l=()=>{!n.selectable||n.disabled||(i.value=!i.value)},c=y=>{y.stopPropagation(),!n.disabled&&o("chip-closed")};r.onMounted(()=>{i.value=n.selected}),r.watch(()=>n.selected,()=>{i.value=n.selected});function u(y,v,w){if(y)return"text-fm-color-typo-disabled";switch(w){case"plain":return v?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function p(y,v,w){if(y)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(w){case"plain":return v?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const h=r.ref(),m=r.ref(!1);function b(y=0){if(n.label&&!(!h.value&&y>500)){if(!h.value){r.nextTick(()=>b(y+1));return}m.value=h.value.offsetWidth<h.value.scrollWidth}}return r.onMounted(()=>{b()}),(y,v)=>{const w=r.resolveDirective("tooltip");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center",y.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",p(y.disabled,i.value,y.variant),{"cursor-pointer":y.selectable&&!y.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!y.disabled&&y.selectable}]),onClick:l,onMousedown:v[0]||(v[0]=()=>s(!0)),onMouseleave:v[1]||(v[1]=()=>s(!1)),onMouseup:v[2]||(v[2]=()=>s(!1))},[r.renderSlot(y.$slots,"default",{},()=>[y.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:y.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:y.icon,outline:!a.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),y.label?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"labelRef",ref:h,class:r.normalizeClass(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",u(y.disabled,i.value,y.variant)])},r.toDisplayString(y.label),3)):r.createCommentVNode("",!0),y.rightIcon?(r.openBlock(),r.createBlock(ue,{key:2,color:y.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:y.rightIcon,outline:!a.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)]),y.removable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!y.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":y.disabled,"cursor-pointer":y.selectable&&!y.disabled}]),onClick:c},[r.createVNode(ue,{color:y.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):r.createCommentVNode("",!0)],34)),[[w,m.value?y.label:null]])}}}),zc=r.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(null),a=r.ref(0),s=r.ref(null),l=r.ref(),c=()=>{var m,b;if(!i.value)return;const p=i.value.getBoundingClientRect();a.value>0&&s.value&&((m=l.value)==null||m.splice(s.value,1)),a.value=0;let h=0;Array.from(i.value.children).forEach((y,v)=>{const w=y.getBoundingClientRect(),A=w.y-p.y;h=Math.max(w.height*2+4,h),A>h&&(a.value+=1,s.value=s.value===null?v:v-a.value)}),a.value>0&&s.value&&((b=l.value)==null||b.splice(s.value,0,{label:`+${a.value}`,removable:!1,selectable:!1,compact:n.compact}))},u=p=>{o("chip-closed",p)};return r.onMounted(()=>{l.value=n.items,c(),new ResizeObserver(()=>{c()}).observe(i.value)}),r.watch(()=>n.items,()=>{l.value=n.items,c()}),(p,h)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:r.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",p.compact?"max-h-48":"max-h-64"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(m,b)=>(r.openBlock(),r.createBlock(Lc,{key:b,label:m.label,icon:m.icon,selected:m.selected,removable:m.removable!==void 0?m.removable:p.removable,selectable:m.selectable!==void 0?m.selectable:p.selectable,disabled:m.disabled!==void 0?m.disabled:p.disabled,compact:p.compact,variant:m.variant,onChipClosed:y=>u(b)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Ew={class:"flex flex-col gap-4"},Bw=["id"],Pw={key:0,class:"flex flex-col gap-4 justify-center"},Ow=r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},menuId:{default:Dm()},shiftMenu:{type:Boolean},hideChips:{type:Boolean},elementIdsUseForDismissAwayEventExclusion:{},menuZIndex:{},searchable:{type:Boolean},searchTarget:{default:"label"},searchDebounce:{default:700},onSearch:{},keepSelectionOrder:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=r.inject(Ke,null),i=e,a=Pe(n,"modelValue"),s=r.ref(),l=r.ref(!1),c=S=>{let x;n.keepSelectionOrder?x=s.value.filter(P=>!Vt(P.value,S.value)):x=n.items.filter(P=>s.value.some(C=>Vt(P.value,C.value)&&!Vt(P.value,S.value))),a.value=x.map(P=>P.value),s.value=x},u=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),p=()=>{n.multiselect||u.value||(a.value=void 0,s.value=void 0,n.searchable&&(T.value=""))},h=r.computed(()=>n.clearable&&!n.multiselect&&v.value&&!u.value),m=(S,x)=>{var C;if(!n.multiselect)return a.value=x.value,s.value=x,n.searchable&&(T.value=x.label),setTimeout(()=>{l.value=!1},0);if(!S)return c(x),setTimeout(()=>{l.value=!1},0);if(n.searchable&&n.onSearch){const M=[...s.value??[],x];return a.value=M.map(L=>L.value),s.value=M,setTimeout(()=>{l.value=!1},0)}let P;return(((C=s.value)==null?void 0:C.length)??0)===0?P=[x]:n.keepSelectionOrder?P=[...s.value,x]:P=n.items.filter(M=>a.value.some(L=>Vt(M.value,L)||Vt(M.value,x.value))),a.value=P.map(M=>M.value),s.value=P,setTimeout(()=>{l.value=!1},0)},b=S=>{a.value=[...a.value].filter((x,P)=>P!==S)},y=r.computed(()=>n.multiselect&&n.searchable&&n.onSearch?s.value.map(S=>({label:S.label})):n.keepSelectionOrder&&s.value?s.value.map(S=>({label:S.label})):n.items.filter(S=>a.value.some(x=>Vt(S.value,x))).map(S=>({label:S.label}))),v=r.computed(()=>{var S;return n.multiselect?((S=s.value)==null?void 0:S.length)>0:!!s.value}),w=r.computed(()=>n.placeholder||U("select.placeholder")),A=r.computed(()=>{var S;return n.multiselect?w.value:v.value?((S=s.value)==null?void 0:S.label)??n.placeholder??w.value:n.placeholder??w.value}),I=r.ref(null);r.watch(()=>[l.value,I.value],([S,x])=>{if(!S)return;const P=x==null?void 0:x.querySelector('*[data-checked="true"]');P&&P.scrollIntoView()});const V=r.ref(null),R=()=>{V.value&&!n.multiselect&&V.value.toggleMenu(!1)},E=r.ref(n.items),T=r.ref(""),B=r.ref(!1);let H,_;const j=()=>{clearTimeout(_),B.value=!1},Q=async S=>{let x=S??T.value;if(H===x)return;if(H=x,n.onSearch){B.value=!0,await n.onSearch(x),B.value=!1;return}let P=[...n.items];x!==""&&(P=P.filter(C=>C[n.searchTarget].toLowerCase().includes(T.value.toLowerCase()))),E.value=P,B.value=!1},F=S=>{if(S)return Q("");if(n.multiselect)return B.value=!1,T.value="",setTimeout(()=>{j()},0),E.value=n.items;const x=s.value;let P=T.value;B.value&&(P=(x==null?void 0:x.label)??"");const C=n.items.findIndex(M=>M.label===P);C!==-1&&(s.value=n.items[C],a.value=x.value),T.value=(x==null?void 0:x.label)??"",setTimeout(()=>{j()},0)};return n.searchable&&r.watch(T,async()=>{j(),_=setTimeout(Q,n.searchDebounce)}),n.multiselect&&n.searchable&&n.onSearch||r.watch(a,()=>{var S;if(n.multiselect){if(n.keepSelectionOrder){const x=r.toRaw(a.value);s.value=x.map(P=>n.items.find(C=>Vt(C.value,P))).filter(Boolean)}else s.value=n.items.filter(x=>r.toRaw(a.value).some(P=>Vt(P,x.value)));return}s.value=n.items.find(x=>Vt(a.value,x.value)),n.searchable&&(T.value=((S=s.value)==null?void 0:S.label)??"",setTimeout(()=>{j()},0))},{immediate:!0}),(S,x)=>{var P;return r.openBlock(),r.createElementBlock("div",Ew,[r.createVNode(Nt,{modelValue:r.unref(a),"onUpdate:modelValue":x[2]||(x[2]=C=>r.isRef(a)?a.value=C:null),disabled:u.value,focused:l.value,"helper-state":S.helperState,"helper-text":S.helperText,info:S.labelInfo,label:S.label,optional:S.labelMark==="optional",required:S.labelMark==="required",rules:S.rules},r.createSlots({default:r.withCtx(({invalid:C})=>[r.createVNode(io,{ref_key:"menuRef",ref:V,"close-on-click":!S.multiselect,disabled:u.value,"element-ids-use-for-dismiss-away-event-exclusion":S.elementIdsUseForDismissAwayEventExclusion,"max-height":S.maxHeight,placement:S.placement,shift:S.shiftMenu,"show-menu":l.value,width:S.width,"z-index":S.menuZIndex,onMenuChanged:x[1]||(x[1]=M=>{l.value=M,n.searchable&&F(M),i("dropdown-changed",l.value)})},{"menu-button":r.withCtx(()=>[n.searchable?(r.openBlock(),r.createBlock(Er,{key:0,modelValue:T.value,"onUpdate:modelValue":x[0]||(x[0]=M=>T.value=M),focused:l.value,invalid:C,"show-valid-border":S.showValidBorder,disabled:u.value,placeholder:A.value},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[h.value?(r.openBlock(),r.createBlock(ue,{key:0,name:"close",size:"md",class:"cursor-pointer",onClick:r.withModifiers(p,["stop"])})):(r.openBlock(),r.createBlock(ue,{key:1,color:u.value?"#C7C7CC":"black",name:l.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"]))]),_:2},1032,["modelValue","focused","invalid","show-valid-border","disabled","placeholder"])):(r.openBlock(),r.createBlock(at,{key:1,class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:C,"show-valid-border":S.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[h.value?(r.openBlock(),r.createBlock(ue,{key:0,name:"close",size:"md",class:"cursor-pointer",onClick:r.withModifiers(p,["stop"])})):(r.openBlock(),r.createBlock(ue,{key:1,color:u.value?"#C7C7CC":"black",name:l.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"]))]),default:r.withCtx(()=>[r.renderSlot(S.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled":v.value&&!S.multiselect?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-en-body-lg-400 line-clamp-1"])},r.toDisplayString(A.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),"menu-wrapper":r.withCtx(({maxHeight:M,width:L})=>[r.createElementVNode("div",{id:S.menuId,ref_key:"menuOptionsRef",ref:I,style:r.normalizeStyle({"max-height":`${M}px`,width:`${L}`}),class:"fm-select__menu__wrapper"},[r.renderSlot(S.$slots,"menu-wrapper",r.mergeProps({handleItemChange:(K,oe)=>m(K,oe)},{maxHeight:M,width:L}),()=>[r.createElementVNode("div",{onClick:R},[r.renderSlot(S.$slots,"prepend-menu",{},void 0,!0)]),B.value?r.createCommentVNode("",!0):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(S.searchable&&!S.onSearch?E.value:S.items,K=>{var oe,le;return r.openBlock(),r.createBlock(St,{key:K.value,"data-checked":S.multiselect&&((oe=s.value)==null?void 0:oe.some(Z=>r.unref(Vt)(Z.value,K.value))),disabled:K.disabled,"has-checkbox":S.multiselect,label:K.label,"model-value":S.multiselect&&((le=s.value)==null?void 0:le.some(Z=>r.unref(Vt)(Z.value,K.value))),sublabel:K.sublabel,value:K.value,"onUpdate:modelValue":Z=>m(Z,K)},null,8,["data-checked","disabled","has-checkbox","label","model-value","sublabel","value","onUpdate:modelValue"])}),128)),B.value?(r.openBlock(),r.createBlock(Sr,{key:1,size:"lg"})):r.createCommentVNode("",!0),r.createElementVNode("div",{onClick:R},[r.renderSlot(S.$slots,"append-menu",{},void 0,!0)])],!0)],12,Bw)]),_:2},1032,["close-on-click","disabled","element-ids-use-for-dismiss-away-event-exclusion","max-height","placement","shift","show-menu","width","z-index"])]),_:2},[S.label||S.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(S.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,S.helperText||S.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(S.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),S.multiselect&&((P=s.value)==null?void 0:P.length)>0&&!S.hideChips?(r.openBlock(),r.createElementBlock("div",Pw,[r.createVNode(zc,{disabled:u.value,items:y.value,removable:"",onChipClosed:b},null,8,["disabled","items"])])):r.createCommentVNode("",!0)])}}}),yo=Be(Ow,[["__scopeId","data-v-d0c6c521"]]);function Jo(){const t=r.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};r.onMounted(()=>{window.addEventListener("resize",e)}),r.onUnmounted(()=>{window.removeEventListener("resize",e)});const n=r.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248})),o={xs:[0,647],sm:[648,959],md:[960,1247],lg:[1248,1/0]};function i(l){return o[l]}function a(l){const c=o[l][1];return t.value<=c}function s(l){return!!o[l]}return{breakpoints:n,isAtMost:a,getBreakpointsBoundary:i,isBreakpointKeyword:s}}function Bm(){const t=r.inject(Zh);if(!t)throw new Error("No provider");return t}function Iw(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Pm(){const t=Iw();return{emitData(e){t==null||t("dialog:emit-data",e)},emitAction(e){t==null||t(`dialog:${e}-action`)}}}function Nw(){return r.inject(vc)}const Om=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},blameFormChildOnValidationFailed:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),a=r.ref(0),s=r.ref(!1),l=n,c=()=>{let m=[],b=!1;for(let y=0;y<i.value.length;y++){const v=i.value[y],w=v.validate();if(w.length>0&&o.blameFormChildOnValidationFailed&&!b)if(v.blame&&typeof v.blame=="function")try{v.blame(),b=!0}catch(A){throw A}else console.warn(`FormGroup thrown error message ${JSON.stringify(w)}, but does not implement a blameHandler to focus on error.`);m=[...m,...w]}return m},u=async()=>{var b,y;s.value=!0;const m=c();m.length?await((y=o.onValidationFailed)==null?void 0:y.call(o,m)):await((b=o.onValidationSuccess)==null?void 0:b.call(o)),s.value=!1},p=()=>{for(let m=0;m<i.value.length;m++)i.value[m].resetValue();l("reset")};return e({validateInputsWithoutSubmit:c,validateInputs:u,resetInputsValidation:()=>{for(let m=0;m<i.value.length;m++)i.value[m].resetValidation();l("validation-reset")},resetInputs:p,isSubmitting:s}),r.provide(Kh,{register({validate:m,resetValidation:b,resetValue:y,blame:v}){return i.value=[...i.value,{componentId:a.value,validate:m,resetValidation:b,resetValue:y,blame:v}],a.value++},unregister(m){i.value=i.value.filter(b=>b.componentId!==m)}}),r.provide(Ke,{getDisabled:()=>o.disabled}),(m,b)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(u,["prevent"]),onReset:r.withModifiers(p,["prevent"])},[r.renderSlot(m.$slots,"default")],32))}}),Vw={class:"space-y-1"},Rw={class:"fm-typo-en-body-lg-600 text-fm-color-typo-primary"},Fw={class:"fm-typo-en-body-sm-400 text-fm-color-typo-secondary"},Tw=Be(r.defineComponent({__name:"CreateGroupForm",props:{sortFields:{default:()=>[]}},emits:["update:formData"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=r.ref({name:"",field:"",operator:"contains",value:""}),s=r.computed(()=>[{label:U("advancedSort.createGroup.operators.equals"),value:"equals"},{label:U("advancedSort.createGroup.operators.contains"),value:"contains"},{label:U("advancedSort.createGroup.operators.startsWith"),value:"startsWith"},{label:U("advancedSort.createGroup.operators.endsWith"),value:"endsWith"},{label:U("advancedSort.createGroup.operators.greaterThan"),value:"greaterThan"},{label:U("advancedSort.createGroup.operators.lessThan"),value:"lessThan"}]),l=o.sortFields.map(p=>({label:p.label,value:p.key})),{emitData:c,emitAction:u}=Pm();return r.watch(a,p=>{i("update:formData",p),c(p)},{deep:!0,immediate:!0}),e({formData:a}),(p,h)=>(r.openBlock(),r.createBlock(Om,{class:"create-group-form space-y-4",onValidationSuccess:h[4]||(h[4]=m=>r.unref(u)("primary"))},{default:r.withCtx(()=>[r.createVNode(Er,{modelValue:a.value.name,"onUpdate:modelValue":h[0]||(h[0]=m=>a.value.name=m),rules:[m=>!!m||r.unref(U)("advancedSort.createGroup.groupNameRequired")],autofocus:"",label:r.unref(U)("advancedSort.createGroup.groupName"),placeholder:r.unref(U)("advancedSort.createGroup.groupNamePlaceholder")},null,8,["modelValue","rules","label","placeholder"]),r.createElementVNode("div",Vw,[r.createElementVNode("h4",Rw,r.toDisplayString(r.unref(U)("advancedSort.createGroup.filterByQuery")),1),r.createElementVNode("p",Fw,r.toDisplayString(r.unref(U)("advancedSort.createGroup.filterDescription")),1)]),r.createVNode(yo,{modelValue:a.value.field,"onUpdate:modelValue":h[1]||(h[1]=m=>a.value.field=m),items:r.unref(l),label:r.unref(U)("advancedSort.createGroup.field"),placeholder:r.unref(U)("advancedSort.createGroup.fieldPlaceholder")},null,8,["modelValue","items","label","placeholder"]),r.createVNode(yo,{modelValue:a.value.operator,"onUpdate:modelValue":h[2]||(h[2]=m=>a.value.operator=m),items:s.value,label:r.unref(U)("advancedSort.createGroup.operator")},null,8,["modelValue","items","label"]),r.createVNode(Er,{modelValue:a.value.value,"onUpdate:modelValue":h[3]||(h[3]=m=>a.value.value=m),label:r.unref(U)("advancedSort.createGroup.value"),placeholder:r.unref(U)("advancedSort.createGroup.valuePlaceholder")},null,8,["modelValue","label","placeholder"])]),_:1}))}}),[["__scopeId","data-v-c70ec71b"]]),Mw={class:"fm-advanced-sort__container"},Lw={class:"fm-advanced-sort__column fm-advanced-sort__column--left"},zw={class:"fm-advanced-sort__column-header"},_w={class:"fm-typo-en-body-lg-600 text-fm-color-typo-primary"},Hw={key:1,class:"fm-advanced-sort__sort-controls"},Uw={class:"fm-advanced-sort__list-container"},Ww={class:"fm-advanced-sort__item"},jw={class:"fm-advanced-sort__item-text"},Gw={key:0,class:"fm-advanced-sort__empty"},Qw={class:"fm-advanced-sort__column fm-advanced-sort__column--right"},Xw={class:"fm-advanced-sort__column-header"},qw={class:"fm-typo-en-body-lg-600 text-fm-color-typo-primary"},Kw={class:"fm-advanced-sort__groups-container"},Jw={key:0,class:"fm-advanced-sort__empty"},Yw={class:"fm-advanced-sort__group-header"},Zw={class:"fm-advanced-sort__group-title"},$w={class:"fm-typo-en-body-lg-600"},ex={class:"fm-advanced-sort__group-count"},tx={class:"fm-advanced-sort__group-actions"},nx={class:"fm-advanced-sort__item fm-advanced-sort__item--in-group"},ox={class:"fm-advanced-sort__item-text"},rx={key:0,class:"fm-advanced-sort__group-empty"},Im=Be(r.defineComponent({__name:"FmAdvancedSort",props:{modelValue:{},sortFields:{default:()=>[]},leftColumnLabel:{default:""},rightColumnLabel:{default:""},height:{default:"600px"},searchable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([...n.modelValue]),a=r.ref([]),s=r.ref(""),l=r.ref("asc"),c=r.ref(""),u=Bm();r.watch(()=>n.modelValue,B=>{i.value=[...B]},{deep:!0});const p=r.computed(()=>{const B=new Set;return a.value.forEach(H=>{H.items.forEach(_=>{B.add(_)})}),i.value.filter(H=>!B.has(H))}),h=r.computed(()=>{let B=[...p.value];if(c.value&&n.searchable){const H=c.value.toLowerCase();B=B.filter(_=>Object.values(_).some(j=>String(j).toLowerCase().includes(H)))}if(s.value&&n.sortFields.length>0){const H=n.sortFields.find(_=>_.key===s.value);H&&B.sort((_,j)=>{const Q=H.getter?H.getter(_):_[H.key],F=H.getter?H.getter(j):j[H.key];return Q<F?l.value==="asc"?-1:1:Q>F?l.value==="asc"?1:-1:0})}return B}),m=r.computed(()=>n.sortFields.map(B=>({label:B.label,value:B.key}))),b=r.computed(()=>n.leftColumnLabel||U("advancedSort.availableItems")),y=r.computed(()=>n.rightColumnLabel||U("advancedSort.sortedGroups")),v=(B,H)=>{R()},w=()=>{u.open({title:U("advancedSort.createGroup.title"),contentComponent:Tw,contentComponentProps:{sortFields:n.sortFields},primaryActions:{text:U("advancedSort.newGroup"),close:!1},secondaryActions:{text:U("actions.cancel"),close:!0}}).onPrimary(async B=>{if(!(B!=null&&B.name))return;const H={id:`group-${Date.now()}`,name:B.name,items:[]};if(B.field&&B.value){H.query={field:B.field,operator:B.operator,value:B.value};const _=n.sortFields.find(Q=>Q.key===B.field),j=p.value.filter(Q=>{const F=_!=null&&_.getter?_.getter(Q):Q[B.field],S=B.value;switch(B.operator){case"equals":return F===S;case"contains":return String(F).toLowerCase().includes(String(S).toLowerCase());case"startsWith":return String(F).toLowerCase().startsWith(String(S).toLowerCase());case"endsWith":return String(F).toLowerCase().endsWith(String(S).toLowerCase());case"greaterThan":return F>S;case"lessThan":return F<S;default:return!1}});H.items=j,i.value=i.value.filter(Q=>!j.includes(Q))}a.value.push(H),R(),u.close()})},A=B=>{const H=a.value.findIndex(_=>_.id===B);H>-1&&(a.value.splice(H,1),R())},I=B=>{if(B>0){const H=a.value[B];a.value[B]=a.value[B-1],a.value[B-1]=H,R()}},V=B=>{if(B<a.value.length-1){const H=a.value[B];a.value[B]=a.value[B+1],a.value[B+1]=H,R()}},R=()=>{const B=[];a.value.forEach(H=>{B.push(...H.items)}),B.push(...p.value),o("update:modelValue",B)},E=()=>{l.value=l.value==="asc"?"desc":"asc"},T=B=>B.label??B.name??B.title??String(B);return(B,H)=>(r.openBlock(),r.createElementBlock("div",{class:"fm-advanced-sort",style:r.normalizeStyle({height:B.height})},[r.createElementVNode("div",Mw,[r.createElementVNode("div",Lw,[r.createElementVNode("div",zw,[r.createElementVNode("h3",_w,r.toDisplayString(b.value),1),B.searchable?(r.openBlock(),r.createBlock(Er,{key:0,modelValue:c.value,"onUpdate:modelValue":H[0]||(H[0]=_=>c.value=_),placeholder:r.unref(U)("advancedSort.searchPlaceholder"),"prepend-icon":"search",class:"fm-advanced-sort__search"},null,8,["modelValue","placeholder"])):r.createCommentVNode("",!0),B.sortFields.length>0?(r.openBlock(),r.createElementBlock("div",Hw,[r.createVNode(yo,{modelValue:s.value,"onUpdate:modelValue":H[1]||(H[1]=_=>s.value=_),items:m.value,placeholder:r.unref(U)("advancedSort.sortByField"),class:"fm-advanced-sort__sort-field"},null,8,["modelValue","items","placeholder"]),r.createVNode(ke,{icon:l.value==="asc"?"arrow_upward":"arrow_downward",variant:"secondary",size:"md",onClick:E},null,8,["icon"])])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Uw,[r.createVNode(r.unref(bc),{"model-value":h.value,group:{name:"items",pull:!0,put:!1},class:"fm-advanced-sort__list","item-key":_=>_.id,sort:!1},{item:r.withCtx(({element:_})=>[r.createElementVNode("div",Ww,[r.createVNode(ue,{name:"drag_indicator",class:"fm-advanced-sort__drag-handle"}),r.createElementVNode("span",jw,r.toDisplayString(T(_)),1)])]),_:1},8,["model-value","item-key"]),h.value.length===0?(r.openBlock(),r.createElementBlock("div",Gw,[r.createElementVNode("span",null,r.toDisplayString(r.unref(U)("advancedSort.noItemsAvailable")),1)])):r.createCommentVNode("",!0)])]),r.createElementVNode("div",Qw,[r.createElementVNode("div",Xw,[r.createElementVNode("h3",qw,r.toDisplayString(y.value),1),r.createVNode(ke,{label:r.unref(U)("advancedSort.newGroup"),"prepend-icon":"add",variant:"primary",size:"md",onClick:w},null,8,["label"])]),r.createElementVNode("div",Kw,[a.value.length===0?(r.openBlock(),r.createElementBlock("div",Jw,[r.createElementVNode("span",null,r.toDisplayString(r.unref(U)("advancedSort.createGroupsPrompt")),1)])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(_,j)=>(r.openBlock(),r.createElementBlock("div",{key:_.id,class:"fm-advanced-sort__group"},[r.createElementVNode("div",Yw,[r.createElementVNode("div",Zw,[r.createVNode(ue,{name:"folder"}),r.createElementVNode("span",$w,r.toDisplayString(_.name),1),r.createElementVNode("span",ex,"("+r.toDisplayString(_.items.length)+")",1)]),r.createElementVNode("div",tx,[r.createVNode(ke,{icon:"arrow_upward",variant:"tertiary",size:"md",disabled:j===0,onClick:Q=>I(j)},null,8,["disabled","onClick"]),r.createVNode(ke,{icon:"arrow_downward",variant:"tertiary",size:"md",disabled:j===a.value.length-1,onClick:Q=>V(j)},null,8,["disabled","onClick"]),r.createVNode(ke,{icon:"delete",variant:"tertiary",size:"md",onClick:Q=>A(_.id)},null,8,["onClick"])])]),r.createVNode(r.unref(bc),{modelValue:_.items,"onUpdate:modelValue":Q=>_.items=Q,group:{name:"items",pull:!0,put:!0},class:"fm-advanced-sort__group-list","item-key":Q=>Q.id,onChange:Q=>v(_.id)},{item:r.withCtx(({element:Q})=>[r.createElementVNode("div",nx,[r.createVNode(ue,{name:"drag_indicator",class:"fm-advanced-sort__drag-handle"}),r.createElementVNode("span",ox,r.toDisplayString(T(Q)),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","item-key","onChange"]),_.items.length===0?(r.openBlock(),r.createElementBlock("div",rx,[r.createElementVNode("span",null,r.toDisplayString(r.unref(U)("advancedSort.dropItemsHere")),1)])):r.createCommentVNode("",!0)]))),128))])])])],4))}}),[["__scopeId","data-v-bf0fb835"]]),ix={class:"gap-8 inline-flex items-center relative select-none"},ax={key:0,class:"fm-typo-en-body-sm-400 justify-center flex items-center w-full"},Yo=Be(r.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"},class:{default:void 0}},setup(t){const e=t,n=r.computed(()=>e.value!==null&&e.value!==void 0),o=r.computed(()=>e.value&&e.value>99?"99+":e.value);return(i,a)=>(r.openBlock(),r.createElementBlock("div",ix,[r.renderSlot(i.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-badge",e.class??`fm-badge--${i.variant}`,{absolute:!i.inline,"top-0 right-0 w-[6px] h-[6px]":!n.value,"top-[-2px] right-[-4px] w-[16px] h-[16px]":n.value&&e.value<10,"top-[-2px] right-[-8px] px-4 h-[20px] min-w-[20px]":n.value&&e.value>=10&&e.value<100,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[28px]":n.value&&e.value>=100}])},[e.value!==null?(r.openBlock(),r.createElementBlock("span",ax,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-5a27efb4"]]);function sx(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Nm(t){return typeof t=="function"?t():r.unref(t)}const lx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const dx=Object.prototype.toString,cx=t=>dx.call(t)==="[object Object]",_s=()=>{};function ux(t){return r.getCurrentInstance()}function fx(...t){if(t.length!==1)return r.toRef(...t);const e=t[0];return typeof e=="function"?r.readonly(r.customRef(()=>({get:e,set:_s}))):r.ref(e)}function px(t,e=!0,n){ux()?r.onMounted(t,n):e?t():r.nextTick(t)}function hx(t){var e;const n=Nm(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Vm=lx?window:void 0;function ui(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=Vm):[e,n,o,i]=t,!e)return _s;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],s=()=>{a.forEach(p=>p()),a.length=0},l=(p,h,m,b)=>(p.addEventListener(h,m,b),()=>p.removeEventListener(h,m,b)),c=r.watch(()=>[hx(e),Nm(i)],([p,h])=>{if(s(),!p)return;const m=cx(h)?{...h}:h;a.push(...n.flatMap(b=>o.map(y=>l(p,b,y,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return sx(u),u}function mx(t,e={}){const n=fx(t),{threshold:o=50,onSwipe:i,onSwipeEnd:a,onSwipeStart:s,disableTextSelect:l=!1}=e,c=r.reactive({x:0,y:0}),u=(B,H)=>{c.x=B,c.y=H},p=r.reactive({x:0,y:0}),h=(B,H)=>{p.x=B,p.y=H},m=r.computed(()=>c.x-p.x),b=r.computed(()=>c.y-p.y),{max:y,abs:v}=Math,w=r.computed(()=>y(v(m.value),v(b.value))>=o),A=r.ref(!1),I=r.ref(!1),V=r.computed(()=>w.value?v(m.value)>v(b.value)?m.value>0?"left":"right":b.value>0?"up":"down":"none"),R=B=>{var H,_,j;const Q=B.buttons===0,F=B.buttons===1;return(j=(_=(H=e.pointerTypes)==null?void 0:H.includes(B.pointerType))!=null?_:Q||F)!=null?j:!0},E=[ui(t,"pointerdown",B=>{if(!R(B))return;I.value=!0;const H=B.target;H==null||H.setPointerCapture(B.pointerId);const{clientX:_,clientY:j}=B;u(_,j),h(_,j),s==null||s(B)}),ui(t,"pointermove",B=>{if(!R(B)||!I.value)return;const{clientX:H,clientY:_}=B;h(H,_),!A.value&&w.value&&(A.value=!0),A.value&&(i==null||i(B))}),ui(t,"pointerup",B=>{R(B)&&(A.value&&(a==null||a(B,V.value)),I.value=!1,A.value=!1)})];px(()=>{var B,H,_,j,Q,F,S,x;(H=(B=n.value)==null?void 0:B.style)==null||H.setProperty("touch-action","none"),l&&((j=(_=n.value)==null?void 0:_.style)==null||j.setProperty("-webkit-user-select","none"),(F=(Q=n.value)==null?void 0:Q.style)==null||F.setProperty("-ms-user-select","none"),(x=(S=n.value)==null?void 0:S.style)==null||x.setProperty("user-select","none"))});const T=()=>E.forEach(B=>B());return{isSwiping:r.readonly(A),direction:r.readonly(V),posStart:r.readonly(c),posEnd:r.readonly(p),distanceX:m,distanceY:b,stop:T}}function gx(t,e={}){const{threshold:n=50,onSwipe:o,onSwipeEnd:i,onSwipeStart:a,passive:s=!0,window:l=Vm}=e,c=r.reactive({x:0,y:0}),u=r.reactive({x:0,y:0}),p=r.computed(()=>c.x-u.x),h=r.computed(()=>c.y-u.y),{max:m,abs:b}=Math,y=r.computed(()=>m(b(p.value),b(h.value))>=n),v=r.ref(!1),w=r.computed(()=>y.value?b(p.value)>b(h.value)?p.value>0?"left":"right":h.value>0?"up":"down":"none"),A=_=>[_.touches[0].clientX,_.touches[0].clientY],I=(_,j)=>{c.x=_,c.y=j},V=(_,j)=>{u.x=_,u.y=j};let R;const E=bx(l==null?void 0:l.document);s?R=E?{passive:!0}:{capture:!1}:R=E?{passive:!1,capture:!0}:{capture:!0};const T=_=>{v.value&&(i==null||i(_,w.value)),v.value=!1},B=[ui(t,"touchstart",_=>{if(_.touches.length!==1)return;R.capture&&!R.passive&&_.preventDefault();const[j,Q]=A(_);I(j,Q),V(j,Q),a==null||a(_)},R),ui(t,"touchmove",_=>{if(_.touches.length!==1)return;const[j,Q]=A(_);V(j,Q),!v.value&&y.value&&(v.value=!0),v.value&&(o==null||o(_))},R),ui(t,["touchend","touchcancel"],T,R)];return{isPassiveEventSupported:E,isSwiping:v,direction:w,coordsStart:c,coordsEnd:u,lengthX:p,lengthY:h,stop:()=>B.forEach(_=>_())}}function bx(t){if(!t)return!1;let e=!1;const n={get passive(){return e=!0,!1}};return t.addEventListener("x",_s,n),t.removeEventListener("x",_s),e}const fi=Be(r.defineComponent({__name:"FmOverlay",props:{onClose:{type:Function},onClickedAway:{type:Function},dismissAway:{type:Boolean},zIndex:{},preventBackdropEvent:{type:Boolean},transparent:{type:Boolean},centerContent:{type:Boolean}},setup(t){const e=t,n=r.ref(null),o=i=>{var a,s;n.value&&i.target===n.value&&(e.dismissAway&&((a=e.onClose)==null||a.call(e)),(s=e.onClickedAway)==null||s.call(e))};return r.onMounted(()=>{var a,s;((a=n.value)==null?void 0:a.querySelector(":focus"))||(s=n.value)==null||s.focus()}),(i,a)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"overlayRef",ref:n,class:r.normalizeClass([[i.preventBackdropEvent?"pointer-events-none":"pointer-events-auto",i.transparent?"bg-transparent":"bg-fm-color-overlay-background",{"fm-overlay--center":e.centerContent,"z-50":e.zIndex===void 0}],"fm-overlay"]),style:r.normalizeStyle({zIndex:e.zIndex}),onClick:a[0]||(a[0]=s=>o(s)),onKeyup:a[1]||(a[1]=r.withKeys(s=>{var l;return(l=e.onClose)==null?void 0:l.call(e)},["esc"])),tabindex:"-1"},[r.renderSlot(i.$slots,"default",{},void 0,!0)],38))}}),[["__scopeId","data-v-308ff512"]]),yx=[(t=>(r.pushScopeId("data-v-9f77466f"),t=t(),r.popScopeId(),t))(()=>r.createElementVNode("div",{class:"fm-bottom-sheet--gesture--stick"},null,-1))],vx={key:0,class:"fm-bottom-sheet--header"},kx={class:"fm-bottom-sheet--header--content"},wx={key:0},xx={class:"overflow-y-auto"},Sx={class:"flex gap-8 items-center"},_c=Be(r.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},zIndex:{default:void 0},noHeader:{type:Boolean,default:!1},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway"],setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(0),{direction:a,distanceY:s}=mx(n,{threshold:0,onSwipe(){a.value==="down"&&(i.value=Math.min(s.value,0))},onSwipeEnd(){var h;const p=(h=o.value)==null?void 0:h.clientHeight;p&&i.value<-p/2?u.value=!1:i.value=0}}),{direction:l,lengthY:c}=gx(n,{passive:!1,threshold:0,onSwipe(){l.value==="down"&&(i.value=Math.min(c.value,0))},onSwipeEnd(){var h;const p=(h=o.value)==null?void 0:h.clientHeight;p&&i.value<-p/2?u.value=!1:i.value=0}}),u=Pe(e,"modelValue");return r.watch(u,p=>{p&&(i.value=0)}),(p,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:h[0]||(h[0]=m=>u.value=!0)},[r.renderSlot(p.$slots,"bottom-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(u)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,transparent:e.noOverlay,onClose:h[2]||(h[2]=m=>u.value=!1),onClickedAway:h[3]||(h[3]=m=>p.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"wrapperRef",ref:o,style:r.normalizeStyle({bottom:`${i.value}px`}),class:r.normalizeClass(["fm-bottom-sheet",e.noOverlay&&"shadow-md"])},[r.createElementVNode("div",{ref_key:"gestureRef",ref:n,class:"fm-bottom-sheet--gesture"},yx,512),p.noHeader?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",vx,[r.createElementVNode("div",kx,[r.createElementVNode("div",{class:"flex h-24 items-center justify-center w-24",onClick:h[1]||(h[1]=m=>u.value=!1)},[r.createVNode(ue,{name:"arrow_back"})]),r.renderSlot(p.$slots,"bottom-sheet-header",{},()=>[p.header?(r.openBlock(),r.createElementBlock("div",wx,r.toDisplayString(p.header),1)):r.createCommentVNode("",!0)],!0)])])),r.createElementVNode("div",xx,[r.renderSlot(p.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Sx,[r.renderSlot(p.$slots,"bottom-sheet-footer",{},void 0,!0)])],6)]),_:3})]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-9f77466f"]]),Cx={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Ax=["onMouseenter"],Dx={key:0},Ex=r.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t,{expose:e}){const n=vr.useRoute(),o=vr.useRouter();r.onMounted(async()=>{if(!o){console.warn("FmBreadcrumb: router is not available");return}await o.isReady();const w=i.items.findIndex(A=>A.route==n.path);w!=-1&&!i.items[w].disabled&&(a.value=w)});const i=t,a=r.ref(-1),s=r.ref(-1),l=r.ref(" / "),c=r.ref("... /"),u=r.ref(!1),p=w=>a.value===w?"selected":s.value===w?"hovered":i.items[w].disabled?"disabled":"default",h=w=>{!i.items[w].disabled&&i.items[w].route&&(a.value=w)},m=w=>w!=i.items.length-1,b=w=>!u.value&&i.items.length>5&&w>=2&&w<i.items.length-2,y=()=>{u.value=!u.value};return e({setSelectedItemIndex:w=>{a.value=w}}),(w,A)=>{const I=r.resolveComponent("RouterLink");return r.openBlock(),r.createElementBlock("nav",null,[r.createElementVNode("ul",Cx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.items,(V,R)=>(r.openBlock(),r.createElementBlock("li",{key:R,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:E=>s.value=R,onMouseleave:A[0]||(A[0]=E=>s.value=-1)},[b(R)?R===3&&!u.value?(r.openBlock(),r.createElementBlock("a",{key:1,onClick:y},r.toDisplayString(c.value),1)):r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(I,{key:0,class:r.normalizeClass([p(R),"fm-typo-en-body-md-400"]),to:V.disabled?"":V.route,onClick:E=>h(R)},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(V.label),1),m(R)?(r.openBlock(),r.createElementBlock("span",Dx,r.toDisplayString(l.value),1)):r.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Ax))),128))])])}}}),Bx={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},Px=["disabled","v-wave","onClick","onMousedown"],Ox=r.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:modelValue",u)},a=r.ref(null),s=u=>{a.value=u},l=u=>u.disabled||n.disabled,c=u=>JSON.stringify(u)===JSON.stringify(n.modelValue);return(u,p)=>(r.openBlock(),r.createElementBlock("div",Bx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,(h,m)=>(r.openBlock(),r.createElementBlock("button",{key:m,class:r.normalizeClass([{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":c(h),"hover:bg-fm-color-neutral-white cursor-not-allowed":l(h)},"border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[5px]"]),disabled:l(h),"v-wave":l(h),type:"button",onClick:b=>i(h),onMousedown:b=>s(h),onMouseleave:p[0]||(p[0]=b=>s(null)),onMouseup:p[1]||(p[1]=b=>s(null))},[h.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:l(h)?"neutral-gray-200":c(h)?"primary":"",name:h.icon,outline:JSON.stringify(a.value)!==JSON.stringify(h)&&!c(h),size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),h.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([[l(h)?"text-fm-color-typo-disabled":c(h)?"text-fm-color-primary":"text-fm-color-typo-primary"],"fm-typo-en-body-lg-600"])},r.toDisplayString(h.label),3)):r.createCommentVNode("",!0)],42,Px))),128))]))}}),Hc=r.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return r.provide(Qo,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[r.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),Ix=r.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=r.inject(Qo,null);return(n,o)=>{var a,s;const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((a=r.unref(e))!=null&&a.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[r.renderSlot(n.$slots,"default")],2)),[[i,!((s=r.unref(e))!=null&&s.disabled)&&!n.disabled]])}}}),Uc=r.defineComponent({__name:"FmCardSection",setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Nx={class:"fm-card__actions"},Vx=r.defineComponent({__name:"FmCardActions",setup(t){const e=r.inject(Qo,null);return(n,o)=>(r.openBlock(),r.createBlock(Uc,null,{default:r.withCtx(()=>{var i;return[r.createElementVNode("div",Nx,[r.renderSlot(n.$slots,"default",{disabled:((i=r.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),Rm=r.defineComponent({__name:"FmCardTitle",setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Fm=r.defineComponent({__name:"FmCardSubtitle",setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Rx={class:"flex flex-col gap-4"},Fx=r.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=r.inject(Qo,null);return(n,o)=>(r.openBlock(),r.createBlock(Uc,{class:"fm-card__header"},{default:r.withCtx(()=>{var i,a;return[r.createElementVNode("div",Rx,[n.title?(r.openBlock(),r.createBlock(Rm,{key:0,disabled:(i=r.unref(e))==null?void 0:i.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.title),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0),n.subtitle?(r.openBlock(),r.createBlock(Fm,{key:1,disabled:(a=r.unref(e))==null?void 0:a.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0)])]}),_:1}))}}),Tx=["src","width"],Mx=r.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i,a;return r.openBlock(),r.createElementBlock("img",{src:n.src,class:r.normalizeClass(["object-cover",[{"opacity-60":((i=r.unref(e))==null?void 0:i.disabled)??!1},(a=r.unref(e))!=null&&a.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Tx)}}}),Lx={class:"flex h-48 items-center justify-center w-48"},Tm=r.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},maxWidth:{default:"min(calc(100% - 48px), 560px)"},maxHeight:{default:"600px"},closeButton:{type:Boolean,default:!0},zIndex:{},contentScrollable:{type:Boolean,default:!0},contentClass:{default:void 0},dismissAway:{type:Boolean},isComponent:{default:"div"},isComponentProps:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=r.ref(null),i=r.ref(!1),a=r.ref(!1),s=u=>{const p=u.scrollHeight,h=u.scrollTop+u.clientHeight;a.value=p===h,i.value=u.scrollTop===0},l=u=>{u.stopPropagation();const p=u.target;s(p)};r.watchEffect(()=>{o.value&&s(o.value)});function c(u){return typeof u=="number"?`${u}px`:u}return(u,p)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.isComponent),r.mergeProps({class:["fm-dialog"],style:{minWidth:c(u.minWidth),maxWidth:c(u.maxWidth),maxHeight:c(u.maxHeight)}},u.isComponentProps),{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-en-title-sm-600 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[r.renderSlot(u.$slots,"dialog-header"),r.createElementVNode("div",Lx,[u.closeButton?(r.openBlock(),r.createBlock(ue,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:p[0]||(p[0]=h=>n("update:modelValue",!1))})):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",{ref_key:"contentRef",ref:o,class:r.normalizeClass([[u.contentScrollable?"overflow-y-auto":"overflow-hidden",u.contentClass],"fm-dialog--content"]),onScrollPassive:l},[r.renderSlot(u.$slots,"default")],34),u.$slots["dialog-footer"]?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-dialog--footer","flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse",!a.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[r.renderSlot(u.$slots,"dialog-footer")],2)):r.createCommentVNode("",!0)]),_:3},16,["style"]))}}),zx=r.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},maxWidth:{},maxHeight:{},closeButton:{type:Boolean,default:!0},zIndex:{default:void 0},contentScrollable:{type:Boolean,default:!0},contentClass:{},dismissAway:{type:Boolean},isComponent:{default:"div"},isComponentProps:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=Pe(n,"modelValue"),a=document.body.style.overflow;return r.watch(()=>i,s=>{s?document.body.style.overflow="hidden":document.body.style.overflow=a}),(s,l)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s.$slots["dialog-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:l[1]||(l[1]=c=>i.value=!0)},[r.renderSlot(s.$slots,"dialog-button",{onClick:l[0]||(l[0]=c=>i.value=!0)})])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":s.dismissAway,"prevent-backdrop-event":!s.overlay,transparent:!s.overlay,"z-index":s.zIndex,"center-content":"",onClose:l[3]||(l[3]=c=>o("update:modelValue",!1))},{default:r.withCtx(()=>[r.createVNode(Tm,{"close-button":s.closeButton,"content-class":s.contentClass,"content-scrollable":s.contentScrollable,"is-component":s.isComponent,"is-component-props":s.isComponentProps,"max-width":s.maxWidth,"min-width":s.minWidth,"model-value":r.unref(i),"onUpdate:modelValue":l[2]||(l[2]=c=>i.value=c)},r.createSlots({"dialog-header":r.withCtx(()=>[r.renderSlot(s.$slots,"dialog-header")]),default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:2},[s.$slots["dialog-footer"]?{name:"dialog-footer",fn:r.withCtx(()=>[r.renderSlot(s.$slots,"dialog-footer")]),key:"0"}:void 0]),1032,["close-button","content-class","content-scrollable","is-component","is-component-props","max-width","min-width","model-value"])]),_:3},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:3})]))],64))}}),_x={class:"fm-drop-field"},Hx=["accept","disabled"],Ux=Be(r.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{},contentClass:{}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.ref(),s=r.ref(),l=r.ref(),c=E=>{n.disabled||(E.stopPropagation(),E.preventDefault())},u=E=>{n.disabled||(E.stopPropagation(),E.preventDefault(),i.value=!0)},p=E=>{n.disabled||(E.stopPropagation(),E.preventDefault(),i.value=!1)},h=E=>{n.disabled||(E.stopPropagation(),E.preventDefault(),i.value=!1,m(E))},m=E=>{var B;l.value=((B=E.dataTransfer)==null?void 0:B.files)??E.target.files;const T=l.value;if(a.value=y(T[0]),s.value=v(T[0]),a.value&&s.value)o("file-upload",T[0]);else{const H=b();o("file-rejected",[{file:T[0],reason:H}])}},b=()=>{const E=[];return a.value||E.push("invalid-type"),s.value||E.push("invalid-size"),E},y=E=>{if(!n.accept)return!0;const T=n.accept.split(",").map(B=>B.trim());for(const B of T)if(w(B)){if(I(B)===I(E.type))return!0}else if(A(E)===B||E.type===B)return!0;return!1},v=E=>!n.maxFileSize||E.size<=n.maxFileSize,w=E=>E.indexOf("*")!==-1,A=E=>"."+E.name.split(".").pop(),I=E=>E.substring(0,E.indexOf("/")),V=r.computed(()=>{if(i.value)return"Drop file to upload";if(a.value){if(!s.value)return`File size exceeds ${n!=null&&n.maxFileSize?n.maxFileSize*1e-6:"8"}mb`}else return"File type is not valid";return""}),R=r.computed(()=>l.value?!a.value||!s.value:!1);return(E,T)=>(r.openBlock(),r.createElementBlock("label",_x,[r.renderSlot(E.$slots,"label",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[E.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(E.label),3)],!0),r.createElementVNode("div",{class:r.normalizeClass([[E.contentClass?E.contentClass:"w-full h-full",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":R.value&&!E.disabled,"fm-drop-field__container--disabled":E.disabled}],"fm-drop-field__container"]),onDragenter:c,onDragleave:p,onDragover:u,onDrop:h},[r.renderSlot(E.$slots,"default",{},void 0,!0),(i.value||R.value)&&!E.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass({"fm-typo-en-body-lg-600":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":R.value})},r.toDisplayString(V.value),3)):(r.openBlock(),r.createBlock(ke,{key:1,disabled:E.disabled,label:r.unref(U)("dropField.placeholder"),size:"md",variant:"secondary"},null,8,["disabled","label"])),r.renderSlot(E.$slots,"accept-text",{},()=>[n.accept?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([[E.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"],"fm-typo-en-body-md-400"])},r.toDisplayString(`${r.unref(U)("dropField.accept")}${n.accept}`),3)):r.createCommentVNode("",!0)],!0),r.createElementVNode("input",{accept:E.accept,disabled:E.disabled,class:"fm-drop-field__input",type:"file",onChange:m},null,40,Hx)],34),r.renderSlot(E.$slots,"helper-text",{},()=>[n.maxFileSize?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([[E.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"],"fm-typo-en-body-sm-400"])},r.toDisplayString(`${r.unref(U)("dropField.maxSize")}${n.maxFileSize*1e-6}mb`),3)):r.createCommentVNode("",!0)],!0)]))}}),[["__scopeId","data-v-0a66f57c"]]),Wx={},jx={class:"flex-grow"};function Gx(t,e){return r.openBlock(),r.createElementBlock("div",jx)}const Zo=Be(Wx,[["render",Gx]]),Qx={install:t=>{const e={currentDialog:{dialogCount:0,vNode:null,container:null,uselessContainers:[]},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i=new Array,a={onPrimary:p=>(o.primary.push(p),a),onSecondary:p=>(o.secondary.push(p),a),onTertiary:p=>(o.tertiary.push(p),a),onClose:p=>(i.push(p),a)};function s(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const c=r.markRaw(Mm),u=r.createVNode(c,{...n,unmount:s,storedFunctions:o,"onDialog-closed"(p){i.forEach(h=>h(p))}});return u.appContext=t._context,r.render(u,l),e.currentDialog.container&&e.currentDialog.uselessContainers.push(e.currentDialog.container),e.currentDialog.dialogCount+=1,e.currentDialog.vNode=u,e.currentDialog.container=l,a},close:()=>{const{vNode:n,container:o}=e.currentDialog;e.currentDialog.uselessContainers.forEach(i=>{i.remove()}),!(n===null&&o===null)&&(e.currentDialog.dialogCount-=1,e.currentDialog.dialogCount===0&&(o&&r.render(null,o),o==null||o.remove(),e.currentDialog={vNode:null,container:null,dialogCount:0,uselessContainers:[]}))}};t.config.globalProperties.$dialog=e,t.provide(Zh,e)}},Xx={key:0,class:"block relative"},qx={class:"space-y-4"},Kx={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},Jx={key:1,class:"fm-typo-en-body-md-400 text-fm-color-neutral-black"},Mm=r.defineComponent({__name:"FmDynamicDialog",props:{title:{},subTitle:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},dismissAway:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},maxWidth:{},maxHeight:{},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentScrollable:{type:Boolean,default:!0},contentClass:{},contentComponentProps:{default:null},isContentComponent:{},isContentComponentProps:{},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null},zIndex:{default:void 0}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=r.ref(!1),o=r.ref(),i=r.computed(()=>a.primaryActions||a.secondaryActions||a.tertiaryActions),a=t,s=e,l=()=>{a.overlay&&(n.value=!1,setTimeout(()=>{a.unmount()},500))},c=(h,m)=>{a.storedFunctions[m].forEach(b=>b(o.value)),h.close&&l()},u=h=>{const m=a[`${h}Actions`];c(m||{text:null,close:!1},h)};r.onMounted(()=>{s("dialog-opened"),n.value=!0}),r.onUnmounted(()=>{s("dialog-closed",o.value)});const p=h=>r.isRef(h)?h.value:r.ref(h).value;return(h,m)=>(r.openBlock(),r.createBlock(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[n.value?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":h.dismissAway,"prevent-backdrop-event":!h.overlay,transparent:!h.overlay,"z-index":h.zIndex,"center-content":"",onClose:l},{default:r.withCtx(()=>[h.dialogComponent?(r.openBlock(),r.createElementBlock("div",Xx,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.dialogComponent),r.normalizeProps(r.guardReactiveProps(h.dialogComponentProps)),null,16)),h.closeButton?(r.openBlock(),r.createBlock(ue,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:l})):r.createCommentVNode("",!0)])):(r.openBlock(),r.createBlock(Tm,{key:1,"close-button":h.closeButton,"content-class":h.contentClass,"content-scrollable":h.contentScrollable,"is-component":h.isContentComponent,"is-component-props":h.isContentComponentProps,"max-width":h.maxWidth,"min-width":h.minWidth,"max-height":h.maxHeight,"model-value":n.value,"onUpdate:modelValue":l},r.createSlots({"dialog-header":r.withCtx(()=>[r.createElementVNode("div",qx,[r.createElementVNode("p",null,r.toDisplayString(h.title??"Notification"),1),h.subTitle?(r.openBlock(),r.createElementBlock("p",Kx,r.toDisplayString(h.subTitle),1)):r.createCommentVNode("",!0)])]),default:r.withCtx(()=>[h.contentComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.contentComponent),r.mergeProps({key:0},h.contentComponentProps,{"onDialog:emitData":m[0]||(m[0]=b=>o.value=b),"onDialog:primaryAction":m[1]||(m[1]=b=>u("primary")),"onDialog:secondaryAction":m[2]||(m[2]=b=>u("secondary")),"onDialog:tertiaryAction":m[3]||(m[3]=b=>u("tertiary"))}),null,16)):(r.openBlock(),r.createElementBlock("div",Jx,r.toDisplayString(h.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:r.withCtx(()=>[h.tertiaryActions?(r.openBlock(),r.createBlock(ke,{key:0,disabled:p(h.tertiaryActions.disabled),label:h.tertiaryActions.text,loading:p(h.tertiaryActions.isLoading),type:h.tertiaryActions.type??"button",variant:h.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:m[4]||(m[4]=b=>c(h.tertiaryActions,"tertiary"))},null,8,["disabled","label","loading","type","variant"])):r.createCommentVNode("",!0),r.createVNode(Zo,{class:"sm:hidden xs:hidden"}),h.secondaryActions?(r.openBlock(),r.createBlock(ke,{key:1,disabled:p(h.secondaryActions.disabled),label:h.secondaryActions.text,loading:p(h.secondaryActions.isLoading),type:h.secondaryActions.type??"button",variant:h.secondaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:m[5]||(m[5]=b=>c(h.secondaryActions,"secondary"))},null,8,["disabled","label","loading","type","variant"])):r.createCommentVNode("",!0),h.primaryActions?(r.openBlock(),r.createBlock(ke,{key:2,disabled:p(h.primaryActions.disabled),label:h.primaryActions.text,loading:p(h.primaryActions.isLoading),type:h.primaryActions.type??"button",variant:h.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:m[6]||(m[6]=b=>c(h.primaryActions,"primary"))},null,8,["disabled","label","loading","type","variant"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["close-button","content-class","content-scrollable","is-component","is-component-props","max-width","min-width","max-height","model-value"]))]),_:1},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:1}))}});/*!
14
+ `),disabled:u.disabled,type:u.type,onMousedown:p[0]||(p[0]=()=>c(!0)),onMouseleave:p[1]||(p[1]=()=>c(!1)),onMouseup:p[2]||(p[2]=()=>c(!1))},[u.icon&&u.iconPosition==="prepend"||u.prependIcon?(r.openBlock(),r.createBlock(ue,{key:0,class:r.normalizeClass({invisible:u.loading}),color:u.disabled?"neutral-gray-200":u.iconColor??"",name:u.icon||u.prependIcon,outline:u.overwriteIconOutline==="outline"?!0:u.overwriteIconOutline==="filled"?!1:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),u.label?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[u.$slots.default?r.renderSlot(u.$slots,"default",{key:0,disabled:u.disabled},void 0,!0):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([{invisible:u.loading},"fm-typo-en-body-lg-600 label line-clamp-1"])},r.toDisplayString(u.label),3))],64)):r.createCommentVNode("",!0),u.icon&&u.iconPosition==="append"||u.appendIcon?(r.openBlock(),r.createBlock(ue,{key:2,class:r.normalizeClass({invisible:u.loading}),color:u.disabled?"neutral-gray-200":u.iconColor??"",name:u.icon||u.appendIcon,outline:u.overwriteIconOutline==="outline"?!0:u.overwriteIconOutline==="filled"?!1:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("div",bk,[u.loading?(r.openBlock(),r.createBlock(Sr,{key:0,color:"neutral-gray-300",size:"md"})):r.createCommentVNode("",!0)])],42,gk)),[[h,!u.disabled&&!u.loading&&u.variant!==r.unref(_n).Plain]])}}}),ke=Be(yk,[["__scopeId","data-v-ee1e7cfc"]]),Kh=Symbol.for("fm:form"),Ke=Symbol.for("fm:form-state"),Jh=Symbol.for("fm:radio-group"),Yh=Symbol.for("fm:stepper"),Zh=Symbol.for("fm:dialog"),$h=Symbol.for("fm:menu"),em=Symbol.for("fm:menu-to-item"),vc=Symbol.for("fm:snackbar"),Qo=Symbol.for("fm:card");function tm(t,e){const n=r.ref([]);function o(){const a=[];if(e.value&&e.value.length>0)for(const s of e.value){const c=(typeof s=="function"?s:()=>s)(t.value);c!==!0&&a.push(c)}return n.value=a,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function vk(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Pe(t,e){const n=vk(),o=r.ref(t[e]);return r.watch(()=>t[e],()=>{o.value=t[e]}),r.computed({get(){return o.value},set(a){o.value=a,n==null||n(`update:${String(e)}`,a)}})}function nm(t,e=null,n=null,o=null){let i=null;const a=Pe(t,"modelValue"),s=r.ref(!0),l=r.inject(Kh,null),{validate:c,resetValidation:u,errorMessages:p}=tm(a,r.toRef(()=>t.rules)),h=(m=n)=>{s.value=!0,u(),m&&typeof m=="function"&&m(),a.value=e};return r.onMounted(()=>{l&&(i=l.register({validate:c,resetValidation:u,resetValue:h,blame:o??null}))}),r.onUnmounted(()=>{l&&l.unregister(i)}),r.watch(()=>a.value,()=>{s.value=!1,a.value!==e&&c()}),r.watch(()=>t.focused,m=>{s.value=!1,m||c()}),{validate:c,resetValidation:u,errorMessages:p,resetValue:h,isPristine:s}}const kk={class:"w-full"},at=Be(r.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1},size:{default:"sm"},tooltip:{}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,a)=>(r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-field":!0,"fm-field--focused":i.focused,"fm-field--invalid":i.invalid,"fm-field--valid":i.showValidBorder&&!i.invalid,"fm-field--disabled":o.value,"fm-field--md":i.size==="md","fm-field--sm":i.size==="sm"})},{default:r.withCtx(()=>[r.renderSlot(i.$slots,"prepend",{},()=>[i.prependIcon?(r.openBlock(),r.createBlock(ue,{key:0,color:o.value?"disabled":"neutral-black",name:i.prependIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0),r.createElementVNode("div",kk,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(ue,{key:0,color:o.value?"disabled":"neutral-black",name:i.appendIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-d76c3b9a"]]),wk={class:"flex gap-4"},om=r.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:void 0},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=r.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),a=r.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-en-body-md-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":s.state==="none"&&!o.value,"text-fm-color-typo-success":s.state==="success"&&!o.value,"text-fm-color-typo-warning":s.state==="warning"&&!o.value,"text-fm-color-typo-error":s.state==="error"&&!o.value}])},[s.errorMessages.length===0?r.renderSlot(s.$slots,"default",{key:0},()=>[r.createElementVNode("div",wk,[i.value?(r.openBlock(),r.createBlock(ue,{key:0,class:r.normalizeClass([a.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(s.text),1)])]):r.renderSlot(s.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.errorMessages,c=>(r.openBlock(),r.createElementBlock("div",{key:c,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(ue,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(c),1)]))),128))])],2))}}),oo=Math.min,fn=Math.max,Is=Math.round,Ns=Math.floor,Xo=t=>({x:t,y:t}),xk={left:"right",right:"left",bottom:"top",top:"bottom"},Sk={start:"end",end:"start"};function kc(t,e,n){return fn(t,oo(e,n))}function ni(t,e){return typeof t=="function"?t(e):t}function qo(t){return t.split("-")[0]}function oi(t){return t.split("-")[1]}function rm(t){return t==="x"?"y":"x"}function wc(t){return t==="y"?"height":"width"}function Cr(t){return["top","bottom"].includes(qo(t))?"y":"x"}function xc(t){return rm(Cr(t))}function Ck(t,e,n){n===void 0&&(n=!1);const o=oi(t),i=xc(t),a=wc(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=Vs(s)),[s,Vs(s)]}function Ak(t){const e=Vs(t);return[Sc(t),e,Sc(e)]}function Sc(t){return t.replace(/start|end/g,e=>Sk[e])}function Dk(t,e,n){const o=["left","right"],i=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?a:s;default:return[]}}function Ek(t,e,n,o){const i=oi(t);let a=Dk(qo(t),n==="start",o);return i&&(a=a.map(s=>s+"-"+i),e&&(a=a.concat(a.map(Sc)))),a}function Vs(t){return t.replace(/left|right|bottom|top/g,e=>xk[e])}function Bk(t){return{top:0,right:0,bottom:0,left:0,...t}}function im(t){return typeof t!="number"?Bk(t):{top:t,right:t,bottom:t,left:t}}function Rs(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function am(t,e,n){let{reference:o,floating:i}=t;const a=Cr(e),s=xc(e),l=wc(s),c=qo(e),u=a==="y",p=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,m=o[l]/2-i[l]/2;let b;switch(c){case"top":b={x:p,y:o.y-i.height};break;case"bottom":b={x:p,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:h};break;case"left":b={x:o.x-i.width,y:h};break;default:b={x:o.x,y:o.y}}switch(oi(e)){case"start":b[s]-=m*(n&&u?-1:1);break;case"end":b[s]+=m*(n&&u?-1:1);break}return b}const Pk=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:h}=am(u,o,c),m=o,b={},y=0;for(let v=0;v<l.length;v++){const{name:w,fn:A}=l[v],{x:I,y:V,data:R,reset:E}=await A({x:p,y:h,initialPlacement:o,placement:m,strategy:i,middlewareData:b,rects:u,platform:s,elements:{reference:t,floating:e}});p=I??p,h=V??h,b={...b,[w]:{...b[w],...R}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:p,y:h}=am(u,m,c)),v=-1)}return{x:p,y:h,placement:m,strategy:i,middlewareData:b}};async function Cc(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:a,rects:s,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:b=0}=ni(e,t),y=im(b),w=l[m?h==="floating"?"reference":"floating":h],A=Rs(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:p,strategy:c})),I=h==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),R=await(a.isElement==null?void 0:a.isElement(V))?await(a.getScale==null?void 0:a.getScale(V))||{x:1,y:1}:{x:1,y:1},E=Rs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:V,strategy:c}):I);return{top:(A.top-E.top+y.top)/R.y,bottom:(E.bottom-A.bottom+y.bottom)/R.y,left:(A.left-E.left+y.left)/R.x,right:(E.right-A.right+y.right)/R.x}}const Ok=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:a,platform:s,elements:l,middlewareData:c}=e,{element:u,padding:p=0}=ni(t,e)||{};if(u==null)return{};const h=im(p),m={x:n,y:o},b=xc(i),y=wc(b),v=await s.getDimensions(u),w=b==="y",A=w?"top":"left",I=w?"bottom":"right",V=w?"clientHeight":"clientWidth",R=a.reference[y]+a.reference[b]-m[b]-a.floating[y],E=m[b]-a.reference[b],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let B=T?T[V]:0;(!B||!await(s.isElement==null?void 0:s.isElement(T)))&&(B=l.floating[V]||a.floating[y]);const H=R/2-E/2,_=B/2-v[y]/2-1,j=oo(h[A],_),Q=oo(h[I],_),F=j,S=B-v[y]-Q,x=B/2-v[y]/2+H,P=kc(F,x,S),C=!c.arrow&&oi(i)!=null&&x!==P&&a.reference[y]/2-(x<F?j:Q)-v[y]/2<0,M=C?x<F?x-F:x-S:0;return{[b]:m[b]+M,data:{[b]:P,centerOffset:x-P-M,...C&&{alignmentOffset:M}},reset:C}}}),Ik=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:a,rects:s,initialPlacement:l,platform:c,elements:u}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...w}=ni(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const A=qo(i),I=Cr(l),V=qo(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=m||(V||!v?[Vs(l)]:Ak(l)),T=y!=="none";!m&&T&&E.push(...Ek(l,v,y,R));const B=[l,...E],H=await Cc(e,w),_=[];let j=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(H[A]),h){const x=Ck(i,s,R);_.push(H[x[0]],H[x[1]])}if(j=[...j,{placement:i,overflows:_}],!_.every(x=>x<=0)){var Q,F;const x=(((Q=a.flip)==null?void 0:Q.index)||0)+1,P=B[x];if(P)return{data:{index:x,overflows:j},reset:{placement:P}};let C=(F=j.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:F.placement;if(!C)switch(b){case"bestFit":{var S;const M=(S=j.filter(L=>{if(T){const K=Cr(L.placement);return K===I||K==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(K=>K>0).reduce((K,oe)=>K+oe,0)]).sort((L,K)=>L[1]-K[1])[0])==null?void 0:S[0];M&&(C=M);break}case"initialPlacement":C=l;break}if(i!==C)return{reset:{placement:C}}}return{}}}};async function Nk(t,e){const{placement:n,platform:o,elements:i}=t,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=qo(n),l=oi(n),c=Cr(n)==="y",u=["left","top"].includes(s)?-1:1,p=a&&c?-1:1,h=ni(e,t);let{mainAxis:m,crossAxis:b,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof y=="number"&&(b=l==="end"?y*-1:y),c?{x:b*p,y:m*u}:{x:m*u,y:b*p}}const Vk=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:a,placement:s,middlewareData:l}=e,c=await Nk(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},Rk=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:w=>{let{x:A,y:I}=w;return{x:A,y:I}}},...c}=ni(t,e),u={x:n,y:o},p=await Cc(e,c),h=Cr(qo(i)),m=rm(h);let b=u[m],y=u[h];if(a){const w=m==="y"?"top":"left",A=m==="y"?"bottom":"right",I=b+p[w],V=b-p[A];b=kc(I,b,V)}if(s){const w=h==="y"?"top":"left",A=h==="y"?"bottom":"right",I=y+p[w],V=y-p[A];y=kc(I,y,V)}const v=l.fn({...e,[m]:b,[h]:y});return{...v,data:{x:v.x-n,y:v.y-o}}}}},Fk=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:a}=e,{apply:s=()=>{},...l}=ni(t,e),c=await Cc(e,l),u=qo(n),p=oi(n),h=Cr(n)==="y",{width:m,height:b}=o.floating;let y,v;u==="top"||u==="bottom"?(y=u,v=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,y=p==="end"?"top":"bottom");const w=b-c.top-c.bottom,A=m-c.left-c.right,I=oo(b-c[y],w),V=oo(m-c[v],A),R=!e.middlewareData.shift;let E=I,T=V;if(h?T=p||R?oo(V,A):A:E=p||R?oo(I,w):w,R&&!p){const H=fn(c.left,0),_=fn(c.right,0),j=fn(c.top,0),Q=fn(c.bottom,0);h?T=m-2*(H!==0||_!==0?H+_:fn(c.left,c.right)):E=b-2*(j!==0||Q!==0?j+Q:fn(c.top,c.bottom))}await s({...e,availableWidth:T,availableHeight:E});const B=await i.getDimensions(a.floating);return m!==B.width||b!==B.height?{reset:{rects:!0}}:{}}}};function Ar(t){return Ac(t)?(t.nodeName||"").toLowerCase():"#document"}function pn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function bo(t){var e;return(e=(Ac(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ac(t){return t instanceof Node||t instanceof pn(t).Node}function Hn(t){return t instanceof Element||t instanceof pn(t).Element}function ro(t){return t instanceof HTMLElement||t instanceof pn(t).HTMLElement}function sm(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pn(t).ShadowRoot}function aa(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Un(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Tk(t){return["table","td","th"].includes(Ar(t))}function Fs(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Dc(t){const e=Ec(),n=Hn(t)?Un(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Mk(t){let e=Ko(t);for(;ro(e)&&!ri(e);){if(Dc(e))return e;if(Fs(e))return null;e=Ko(e)}return null}function Ec(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ri(t){return["html","body","#document"].includes(Ar(t))}function Un(t){return pn(t).getComputedStyle(t)}function Ts(t){return Hn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ko(t){if(Ar(t)==="html")return t;const e=t.assignedSlot||t.parentNode||sm(t)&&t.host||bo(t);return sm(e)?e.host:e}function lm(t){const e=Ko(t);return ri(e)?t.ownerDocument?t.ownerDocument.body:t.body:ro(e)&&aa(e)?e:lm(e)}function sa(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=lm(t),a=i===((o=t.ownerDocument)==null?void 0:o.body),s=pn(i);if(a){const l=Bc(s);return e.concat(s,s.visualViewport||[],aa(i)?i:[],l&&n?sa(l):[])}return e.concat(i,sa(i,[],n))}function Bc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function dm(t){const e=Un(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=ro(t),a=i?t.offsetWidth:n,s=i?t.offsetHeight:o,l=Is(n)!==a||Is(o)!==s;return l&&(n=a,o=s),{width:n,height:o,$:l}}function Pc(t){return Hn(t)?t:t.contextElement}function ii(t){const e=Pc(t);if(!ro(e))return Xo(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:a}=dm(e);let s=(a?Is(n.width):n.width)/o,l=(a?Is(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Lk=Xo(0);function cm(t){const e=pn(t);return!Ec()||!e.visualViewport?Lk:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zk(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==pn(t)?!1:e}function Dr(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),a=Pc(t);let s=Xo(1);e&&(o?Hn(o)&&(s=ii(o)):s=ii(t));const l=zk(a,n,o)?cm(a):Xo(0);let c=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,p=i.width/s.x,h=i.height/s.y;if(a){const m=pn(a),b=o&&Hn(o)?pn(o):o;let y=m,v=Bc(y);for(;v&&o&&b!==y;){const w=ii(v),A=v.getBoundingClientRect(),I=Un(v),V=A.left+(v.clientLeft+parseFloat(I.paddingLeft))*w.x,R=A.top+(v.clientTop+parseFloat(I.paddingTop))*w.y;c*=w.x,u*=w.y,p*=w.x,h*=w.y,c+=V,u+=R,y=pn(v),v=Bc(y)}}return Rs({width:p,height:h,x:c,y:u})}function _k(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const a=i==="fixed",s=bo(o),l=e?Fs(e.floating):!1;if(o===s||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Xo(1);const p=Xo(0),h=ro(o);if((h||!h&&!a)&&((Ar(o)!=="body"||aa(s))&&(c=Ts(o)),ro(o))){const m=Dr(o);u=ii(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+p.x,y:n.y*u.y-c.scrollTop*u.y+p.y}}function Hk(t){return Array.from(t.getClientRects())}function um(t){return Dr(bo(t)).left+Ts(t).scrollLeft}function Uk(t){const e=bo(t),n=Ts(t),o=t.ownerDocument.body,i=fn(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=fn(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+um(t);const l=-n.scrollTop;return Un(o).direction==="rtl"&&(s+=fn(e.clientWidth,o.clientWidth)-i),{width:i,height:a,x:s,y:l}}function Wk(t,e){const n=pn(t),o=bo(t),i=n.visualViewport;let a=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){a=i.width,s=i.height;const u=Ec();(!u||u&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:a,height:s,x:l,y:c}}function jk(t,e){const n=Dr(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,a=ro(t)?ii(t):Xo(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,c=i*a.x,u=o*a.y;return{width:s,height:l,x:c,y:u}}function fm(t,e,n){let o;if(e==="viewport")o=Wk(t,n);else if(e==="document")o=Uk(bo(t));else if(Hn(e))o=jk(e,n);else{const i=cm(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Rs(o)}function pm(t,e){const n=Ko(t);return n===e||!Hn(n)||ri(n)?!1:Un(n).position==="fixed"||pm(n,e)}function Gk(t,e){const n=e.get(t);if(n)return n;let o=sa(t,[],!1).filter(l=>Hn(l)&&Ar(l)!=="body"),i=null;const a=Un(t).position==="fixed";let s=a?Ko(t):t;for(;Hn(s)&&!ri(s);){const l=Un(s),c=Dc(s);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||aa(s)&&!c&&pm(t,s))?o=o.filter(p=>p!==s):i=l,s=Ko(s)}return e.set(t,o),o}function Qk(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?Fs(e)?[]:Gk(e,this._c):[].concat(n),o],l=s[0],c=s.reduce((u,p)=>{const h=fm(e,p,i);return u.top=fn(h.top,u.top),u.right=oo(h.right,u.right),u.bottom=oo(h.bottom,u.bottom),u.left=fn(h.left,u.left),u},fm(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Xk(t){const{width:e,height:n}=dm(t);return{width:e,height:n}}function qk(t,e,n){const o=ro(e),i=bo(e),a=n==="fixed",s=Dr(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const c=Xo(0);if(o||!o&&!a)if((Ar(e)!=="body"||aa(i))&&(l=Ts(e)),o){const h=Dr(e,!0,a,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else i&&(c.x=um(i));const u=s.left+l.scrollLeft-c.x,p=s.top+l.scrollTop-c.y;return{x:u,y:p,width:s.width,height:s.height}}function Oc(t){return Un(t).position==="static"}function hm(t,e){return!ro(t)||Un(t).position==="fixed"?null:e?e(t):t.offsetParent}function mm(t,e){const n=pn(t);if(Fs(t))return n;if(!ro(t)){let i=Ko(t);for(;i&&!ri(i);){if(Hn(i)&&!Oc(i))return i;i=Ko(i)}return n}let o=hm(t,e);for(;o&&Tk(o)&&Oc(o);)o=hm(o,e);return o&&ri(o)&&Oc(o)&&!Dc(o)?n:o||Mk(t)||n}const Kk=async function(t){const e=this.getOffsetParent||mm,n=this.getDimensions,o=await n(t.floating);return{reference:qk(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Jk(t){return Un(t).direction==="rtl"}const Yk={convertOffsetParentRelativeRectToViewportRelativeRect:_k,getDocumentElement:bo,getClippingRect:Qk,getOffsetParent:mm,getElementRects:Kk,getClientRects:Hk,getDimensions:Xk,getScale:ii,isElement:Hn,isRTL:Jk};function Zk(t,e){let n=null,o;const i=bo(t);function a(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const{left:u,top:p,width:h,height:m}=t.getBoundingClientRect();if(l||e(),!h||!m)return;const b=Ns(p),y=Ns(i.clientWidth-(u+h)),v=Ns(i.clientHeight-(p+m)),w=Ns(u),I={rootMargin:-b+"px "+-y+"px "+-v+"px "+-w+"px",threshold:fn(0,oo(1,c))||1};let V=!0;function R(E){const T=E[0].intersectionRatio;if(T!==c){if(!V)return s();T?s(!1,T):o=setTimeout(()=>{s(!1,1e-7)},1e3)}V=!1}try{n=new IntersectionObserver(R,{...I,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,I)}n.observe(t)}return s(!0),a}function ai(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Pc(t),p=i||a?[...u?sa(u):[],...sa(e)]:[];p.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),a&&A.addEventListener("resize",n)});const h=u&&l?Zk(u,n):null;let m=-1,b=null;s&&(b=new ResizeObserver(A=>{let[I]=A;I&&I.target===u&&b&&(b.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var V;(V=b)==null||V.observe(e)})),n()}),u&&!c&&b.observe(u),b.observe(e));let y,v=c?Dr(t):null;c&&w();function w(){const A=Dr(t);v&&(A.x!==v.x||A.y!==v.y||A.width!==v.width||A.height!==v.height)&&n(),v=A,y=requestAnimationFrame(w)}return n(),()=>{var A;p.forEach(I=>{i&&I.removeEventListener("scroll",n),a&&I.removeEventListener("resize",n)}),h==null||h(),(A=b)==null||A.disconnect(),b=null,c&&cancelAnimationFrame(y)}}const si=Vk,Ic=Rk,li=Ik,gm=Fk,$k=Ok,ew=(t,e,n)=>{const o=new Map,i={platform:Yk,...n},a={...i.platform,_c:o};return Pk(t,e,{...i,platform:a})};function tw(t){return t!=null&&typeof t=="object"&&"$el"in t}function Nc(t){if(tw(t)){const e=t.$el;return Ac(e)&&Ar(e)==="#comment"?null:e}return t}function di(t){return typeof t=="function"?t():r.unref(t)}function bm(t){return{name:"arrow",options:t,fn(e){const n=Nc(di(t.element));return n==null?{}:$k({element:n,padding:t.padding}).fn(e)}}}function ym(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vm(t,e){const n=ym(t);return Math.round(e*n)/n}function ci(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var B;return(B=di(n.open))!=null?B:!0}),a=r.computed(()=>di(n.middleware)),s=r.computed(()=>{var B;return(B=di(n.placement))!=null?B:"bottom"}),l=r.computed(()=>{var B;return(B=di(n.strategy))!=null?B:"absolute"}),c=r.computed(()=>{var B;return(B=di(n.transform))!=null?B:!0}),u=r.computed(()=>Nc(t.value)),p=r.computed(()=>Nc(e.value)),h=r.ref(0),m=r.ref(0),b=r.ref(l.value),y=r.ref(s.value),v=r.shallowRef({}),w=r.ref(!1),A=r.computed(()=>{const B={position:b.value,left:"0",top:"0"};if(!p.value)return B;const H=vm(p.value,h.value),_=vm(p.value,m.value);return c.value?{...B,transform:"translate("+H+"px, "+_+"px)",...ym(p.value)>=1.5&&{willChange:"transform"}}:{position:b.value,left:H+"px",top:_+"px"}});let I;function V(){u.value==null||p.value==null||ew(u.value,p.value,{middleware:a.value,placement:s.value,strategy:l.value}).then(B=>{h.value=B.x,m.value=B.y,b.value=B.strategy,y.value=B.placement,v.value=B.middlewareData,w.value=!0})}function R(){typeof I=="function"&&(I(),I=void 0)}function E(){if(R(),o===void 0){V();return}if(u.value!=null&&p.value!=null){I=o(u.value,p.value,V);return}}function T(){i.value||(w.value=!1)}return r.watch([a,s,l],V,{flush:"sync"}),r.watch([u,p],E,{flush:"sync"}),r.watch(i,T,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(R),{x:r.shallowReadonly(h),y:r.shallowReadonly(m),strategy:r.shallowReadonly(b),placement:r.shallowReadonly(y),middlewareData:r.shallowReadonly(v),isPositioned:r.shallowReadonly(w),floatingStyles:A,update:V}}const Vc={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?typeof e.arg=="string"?document.querySelectorAll(`#${e.arg}`):Array.isArray(e.arg)?e.arg.map(i=>document.querySelector(`#${i}`)).flat():[]:[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},Rc=r.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1},zIndex:{default:void 0},contentClass:{}},setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(null),{floatingStyles:a,middlewareData:s,placement:l}=ci(n,o,{whileElementsMounted:ai,placement:e.placement,middleware:[li(),si({mainAxis:6}),bm({element:i})]}),c="ontouchstart"in window||navigator.maxTouchPoints>0,u=r.ref(!1),p=r.ref(0),h=r.ref(0),m=()=>{e.disabled||(clearTimeout(h.value),p.value=window.setTimeout(()=>{u.value=!0},250))},b=()=>{e.disabled||(clearTimeout(p.value),h.value=window.setTimeout(()=>u.value=!1,250))},y=()=>{c?u.value?b():m():b()},v=()=>{c||b()},w=()=>{c||b()},A=()=>{b()},I=()=>{clearTimeout(h.value),u.value=!0},V=r.computed(()=>{var E,T,B,H;const R={top:"bottom",right:"left",bottom:"top",left:"right"}[l.value];return{left:((E=s.value.arrow)==null?void 0:E.x)!=null?`${(T=s.value.arrow)==null?void 0:T.x}px`:"",top:((B=s.value.arrow)==null?void 0:B.y)!=null?`${(H=s.value.arrow)==null?void 0:H.y}px`:"",[R]:"-3px"}});return(R,E)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:r.normalizeClass([[{"cursor-not-allowed pointer-events-none":R.disabled},R.contentClass],"cursor-pointer flex items-center justify-center relative"]),onPointerdown:y,onPointerleave:w,onPointermove:E[0]||(E[0]=T=>{T.pointerType!=="touch"&&m()}),onPointerup:v},[r.renderSlot(R.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[u.value&&!R.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:r.normalizeClass([{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-en-body-sm-400":R.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-en-body-md-400":R.variant==="rich"},"fm-shadow-light-300 max-w-[240px] px-8 py-4 rounded-md"]),style:r.normalizeStyle([r.unref(a),{zIndex:R.zIndex}]),onMouseenter:I,onMouseleave:b},[r.renderSlot(R.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(R.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass([{"bg-fm-color-neutral-black":R.variant==="plain","bg-fm-color-neutral-white":R.variant==="rich"},"absolute h-8 rotate-45 rounded-[2px] w-8"]),style:r.normalizeStyle(V.value)},null,6),[[r.vShow,!R.hideArrow]])],38)):r.createCommentVNode("",!0)]))])),[[r.unref(Vc),A]])}}),nw={actions:{cancel:"Cancel",apply:"Apply",more:"More"},search:{recent:"Recent search",clearHistory:"Clear history"},label:{optional:"(Optional)"},date:{placeholder:"DD MM YYYY",format:"D MMM YYYY",monthFormat:"MMMM",yearFormat:"YYYY",startDate:"Start date",endDate:"End date",predefinedRanges:{today:"Today",yesterday:"Yesterday",thisWeek:"This week",lastWeek:"Last week",last7Days:"Last 7 days",thisMonth:"This month",lastMonth:"Last month",thisYear:"This year"},label:{compare:"Compare",custom:"Custom"},compare:"Date",compareLabel:"Compared: ",precedingPeriod:"Preceding period",match:{dayOfWeek:"Match day of week",dayOfMonth:"Match day of month",custom:"Custom"},day:{mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat",sun:"Sun"}},time:{start:"Starting Time",end:"Ending Time"},select:{placeholder:"Select item"},dropField:{placeholder:"Add files",accept:"Accepts ",maxSize:"Max size "},table:{loading:"Loading data...",itemsPerPage:"Items per page:",itemCount:"{start}-{end} of {total} items",pageCount:"of {total} pages",all:"All"},advancedSort:{availableItems:"Available Items",sortedGroups:"Sorted Groups",searchPlaceholder:"Search items...",sortByField:"Sort by field...",newGroup:"New Group",noItemsAvailable:"No items available",createGroupsPrompt:"Create groups to organize items",dropItemsHere:"Drop items here",createGroup:{title:"Create New Group",groupName:"Group Name",groupNamePlaceholder:"Enter group name...",groupNameRequired:"Group name is required",filterByQuery:"Filter by Query (Optional)",filterDescription:"Configure a query to automatically add items to this group",field:"Field",fieldPlaceholder:"Select field...",operator:"Operator",value:"Value",valuePlaceholder:"Enter value...",operators:{equals:"Equals",contains:"Contains",startsWith:"Starts With",endsWith:"Ends With",greaterThan:"Greater Than",lessThan:"Less Than"}}}},ow={actions:{cancel:"取消",apply:"应用",more:"更多"},search:{recent:"最近搜索",clearHistory:"清除历史"},label:{optional:"(可选)"},date:{placeholder:"年-月-日",format:"YYYY年MM月DD日",monthFormat:"MM月",yearFormat:"YYYY年",startDate:"开始日期",endDate:"结束日期",predefinedRanges:{today:"今天",yesterday:"昨天",thisWeek:"本周",lastWeek:"上周",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上月",thisYear:"今年"},label:{compare:"对比",custom:"自定义"},compare:"日期",compareLabel:"对比: ",precedingPeriod:"上期",match:{dayOfWeek:"匹配周几",dayOfMonth:"匹配几号",custom:"自定义"},day:{mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六",sun:"日"}},time:{start:"开始时间",end:"结束时间"},select:{placeholder:"请选择"},dropField:{placeholder:"添加文件",accept:"支持: ",maxSize:"最大文件大小: "},table:{loading:"加载中...",itemsPerPage:"每页条数: ",itemCount:"{start}-{end} 条,共 {total} 条",pageCount:"共 {total} 页",all:"全部"},advancedSort:{availableItems:"可用项目",sortedGroups:"已排序组",searchPlaceholder:"搜索项目...",sortByField:"按字段排序...",newGroup:"新建组",noItemsAvailable:"没有可用项目",createGroupsPrompt:"创建组来组织项目",dropItemsHere:"将项目拖放到此处",createGroup:{title:"创建新组",groupName:"组名",groupNamePlaceholder:"输入组名...",groupNameRequired:"组名为必填项",filterByQuery:"按条件筛选(可选)",filterDescription:"配置条件以自动将项目添加到此组",field:"字段",fieldPlaceholder:"选择字段...",operator:"操作符",value:"值",valuePlaceholder:"输入值...",operators:{equals:"等于",contains:"包含",startsWith:"开头是",endsWith:"结尾是",greaterThan:"大于",lessThan:"小于"}}}},rw={actions:{cancel:"取消",apply:"應用",more:"更多"},search:{recent:"最近搜尋",clearHistory:"清除歷史"},label:{optional:"(選填)"},date:{placeholder:"年-月-日",format:"YYYY年MM月DD日",monthFormat:"MM月",yearFormat:"YYYY年",startDate:"開始日期",endDate:"結束日期",predefinedRanges:{today:"今天",yesterday:"昨天",thisWeek:"本周",lastWeek:"上周",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上月",thisYear:"今年"},label:{compare:"對比",custom:"自定義"},compare:"日期",compareLabel:"對比: ",precedingPeriod:"上期",match:{dayOfWeek:"匹配週幾",dayOfMonth:"匹配幾號",custom:"自定義"},day:{mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六",sun:"日"}},time:{start:"開始時間",end:"結束時間"},select:{placeholder:"請選擇"},dropField:{placeholder:"新增文件",accept:"支持: ",maxSize:"最大文件大小: "},table:{loading:"載入中...",itemsPerPage:"每頁條數: ",itemCount:"{start}-{end} 條,共 {total} 條",pageCount:"共 {total} 頁",all:"全部"},advancedSort:{availableItems:"可用項目",sortedGroups:"已排序組",searchPlaceholder:"搜尋項目...",sortByField:"按欄位排序...",newGroup:"新建組",noItemsAvailable:"沒有可用項目",createGroupsPrompt:"創建組來組織項目",dropItemsHere:"將項目拖放到此處",createGroup:{title:"創建新組",groupName:"組名",groupNamePlaceholder:"輸入組名...",groupNameRequired:"組名為必填項",filterByQuery:"按條件篩選(選填)",filterDescription:"配置條件以自動將項目添加到此組",field:"欄位",fieldPlaceholder:"選擇欄位...",operator:"操作符",value:"值",valuePlaceholder:"輸入值...",operators:{equals:"等於",contains:"包含",startsWith:"開頭是",endsWith:"結尾是",greaterThan:"大於",lessThan:"小於"}}}},iw={actions:{cancel:"ยกเลิก",apply:"นำไปใช้",more:"เพิ่มเติม"},search:{recent:"การค้นหาล่าสุด",clearHistory:"ล้างประวัติ"},label:{optional:"(ไม่จำเป็น)"},date:{placeholder:"วว ดด ปปปป",format:"D MMM YYYY",monthFormat:"MMMM",yearFormat:"YYYY",startDate:"วันที่เริ่มต้น",endDate:"วันที่สิ้นสุด",predefinedRanges:{today:"วันนี้",yesterday:"เมื่อวาน",thisWeek:"สัปดาห์นี้",lastWeek:"สัปดาห์ที่แล้ว",last7Days:"7 วันที่ผ่านมา",thisMonth:"เดือนนี้",lastMonth:"เดือนที่แล้ว",thisYear:"ปีนี้"},label:{compare:"เปรียบเทียบ",custom:"กำหนดเอง"},compare:"วันที่",compareLabel:"เปรียบเทียบกับ: ",precedingPeriod:"ช่วงเวลาก่อนหน้า",match:{dayOfWeek:"ตรงกับวันในสัปดาห์",dayOfMonth:"ตรงกับวันที่",custom:"กำหนดเอง"},day:{mon:"จ.",tue:"อ.",wed:"พ.",thu:"พฤ.",fri:"ศ.",sat:"ส.",sun:"อา."}},time:{start:"เวลาเริ่มต้น",end:"เวลาสิ้นสุด"},select:{placeholder:"เลือกรายการ"},dropField:{placeholder:"เพิ่มไฟล์",accept:"รองรับ ",maxSize:"ขนาดสูงสุด "},table:{loading:"กำลังโหลดข้อมูล...",itemsPerPage:"รายการต่อหน้า:",itemCount:"{start}-{end} จาก {total} รายการ",pageCount:"จาก {total} หน้า",all:"ทั้งหมด"},advancedSort:{availableItems:"รายการที่มี",sortedGroups:"กลุ่มที่เรียง",searchPlaceholder:"ค้นหารายการ...",sortByField:"เรียงตามฟิลด์...",newGroup:"กลุ่มใหม่",noItemsAvailable:"ไม่มีรายการ",createGroupsPrompt:"สร้างกลุ่มเพื่อจัดการรายการ",dropItemsHere:"วางรายการที่นี่",createGroup:{title:"สร้างกลุ่มใหม่",groupName:"ชื่อกลุ่ม",groupNamePlaceholder:"ป้อนชื่อกลุ่ม...",groupNameRequired:"ต้องระบุชื่อกลุ่ม",filterByQuery:"กรองตามเงื่อนไข (ไม่บังคับ)",filterDescription:"ตั้งค่าเงื่อนไขเพื่อเพิ่มรายการเข้ากลุ่มโดยอัตโนมัติ",field:"ฟิลด์",fieldPlaceholder:"เลือกฟิลด์...",operator:"ตัวดำเนินการ",value:"ค่า",valuePlaceholder:"ป้อนค่า...",operators:{equals:"เท่ากับ",contains:"มี",startsWith:"เริ่มต้นด้วย",endsWith:"ลงท้ายด้วย",greaterThan:"มากกว่า",lessThan:"น้อยกว่า"}}}};var km=(t=>(t.enUS="en-US",t.zhCN="zh-CN",t.zhHant="zh-Hant",t.jaJP="ja-JP",t.thTH="th-TH",t.viVN="vi-VN",t.msMY="ms-MY",t.idID="id-ID",t.phPH="ph-PH",t))(km||{});const aw={"en-US":nw,"zh-CN":ow,"zh-Hant":rw,"th-TH":iw},sw=["en-US","zh-CN","zh-Hant","th-TH"],Fc="en-US",Ms=r.ref(Fc);function U(t,e){const n=aw[Ms.value],o=t.split(".");let i=n;for(const a of o)i=i[a];return e?Object.entries(e).reduce((a,[s,l])=>a.replace(new RegExp(`{${s}}`,"g"),String(l)),i):i}function wm(t){sw.includes(t)?Ms.value=t:(console.warn(`Locale ${t} is not supported, using default locale ${Fc}`),Ms.value=Fc)}const hn=r.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},locale:{default:"en"}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,a)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info,"fm-typo-en-body-lg-600":i.locale==="en","fm-typo-cn-body-lg-600":i.locale==="cn"}])},[r.renderSlot(i.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(i.label),1),i.required?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-600",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):r.createCommentVNode("",!0),i.optional?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])},r.toDisplayString(r.unref(U)("label.optional")),3)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(Rc,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(ue,{class:r.normalizeClass(["fm-typo-en-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"]),name:"info",size:"sm"},null,8,["class"])]),_:1},8,["content","disabled"])):r.createCommentVNode("",!0)])],2)):r.createCommentVNode("",!0)}});function la(){const t=r.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const lw={key:1,class:"flex items-center justify-between"},Nt=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},blameHandler:{},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"},locale:{}},setup(t,{expose:e}){const n=t,o=r.inject(Ke,null),i=()=>{var y;(y=b.value)==null||y.scrollIntoView({behavior:"smooth"})},{errorMessages:a,isPristine:s}=nm(n,null,null,n.blameHandler??i),{focus:l,blur:c}=la(),u=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),p=r.computed(()=>({label:n.label,disabled:u.value,required:n.required,optional:n.optional,info:n.info})),h=r.computed(()=>({text:n.helperText,disabled:u.value,state:n.helperState,errorMessages:a.value})),m=r.computed(()=>({isPristine:s,invalid:a.value.length>0})),b=r.ref(null);return e({el:b}),(y,v)=>(r.openBlock(),r.createBlock(n.tag,{ref_key:"el",ref:b,class:"flex flex-col gap-8",onBlur:r.unref(c),onClick:r.unref(l)},{default:r.withCtx(()=>[y.label||y.$slots.label?(r.openBlock(),r.createBlock(hn,r.mergeProps({key:0,locale:y.locale},p.value),{default:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),_:3},16,["locale"])):r.createCommentVNode("",!0),r.renderSlot(y.$slots,"default",r.normalizeProps(r.guardReactiveProps(m.value))),h.value.text||h.value.errorMessages.length>0||y.$slots["helper-text"]||y.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",lw,[r.createVNode(om,r.normalizeProps(r.guardReactiveProps(h.value)),{default:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),_:3},16),r.renderSlot(y.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}});var mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ls(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xm={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(mn,function(){var n=1e3,o=6e4,i=36e5,a="millisecond",s="second",l="minute",c="hour",u="day",p="week",h="month",m="quarter",b="year",y="date",v="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var P=["th","st","nd","rd"],C=x%100;return"["+x+(P[(C-20)%10]||P[C]||P[0])+"]"}},V=function(x,P,C){var M=String(x);return!M||M.length>=P?x:""+Array(P+1-M.length).join(C)+x},R={s:V,z:function(x){var P=-x.utcOffset(),C=Math.abs(P),M=Math.floor(C/60),L=C%60;return(P<=0?"+":"-")+V(M,2,"0")+":"+V(L,2,"0")},m:function x(P,C){if(P.date()<C.date())return-x(C,P);var M=12*(C.year()-P.year())+(C.month()-P.month()),L=P.clone().add(M,h),K=C-L<0,oe=P.clone().add(M+(K?-1:1),h);return+(-(M+(C-L)/(K?L-oe:oe-L))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:h,y:b,w:p,d:u,D:y,h:c,m:l,s,ms:a,Q:m}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},E="en",T={};T[E]=I;var B="$isDayjsObject",H=function(x){return x instanceof F||!(!x||!x[B])},_=function x(P,C,M){var L;if(!P)return E;if(typeof P=="string"){var K=P.toLowerCase();T[K]&&(L=K),C&&(T[K]=C,L=K);var oe=P.split("-");if(!L&&oe.length>1)return x(oe[0])}else{var le=P.name;T[le]=P,L=le}return!M&&L&&(E=L),L||!M&&E},j=function(x,P){if(H(x))return x.clone();var C=typeof P=="object"?P:{};return C.date=x,C.args=arguments,new F(C)},Q=R;Q.l=_,Q.i=H,Q.w=function(x,P){return j(x,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var F=function(){function x(C){this.$L=_(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[B]=!0}var P=x.prototype;return P.parse=function(C){this.$d=function(M){var L=M.date,K=M.utc;if(L===null)return new Date(NaN);if(Q.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var oe=L.match(w);if(oe){var le=oe[2]-1||0,Z=(oe[7]||"0").substring(0,3);return K?new Date(Date.UTC(oe[1],le,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Z)):new Date(oe[1],le,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Z)}}return new Date(L)}(C),this.init()},P.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},P.$utils=function(){return Q},P.isValid=function(){return this.$d.toString()!==v},P.isSame=function(C,M){var L=j(C);return this.startOf(M)<=L&&L<=this.endOf(M)},P.isAfter=function(C,M){return j(C)<this.startOf(M)},P.isBefore=function(C,M){return this.endOf(M)<j(C)},P.$g=function(C,M,L){return Q.u(C)?this[M]:this.set(L,C)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(C,M){var L=this,K=!!Q.u(M)||M,oe=Q.p(C),le=function(nt,ot){var At=Q.w(L.$u?Date.UTC(L.$y,ot,nt):new Date(L.$y,ot,nt),L);return K?At:At.endOf(u)},Z=function(nt,ot){return Q.w(L.toDate()[nt].apply(L.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(ot)),L)},ae=this.$W,fe=this.$M,he=this.$D,Ie="set"+(this.$u?"UTC":"");switch(oe){case b:return K?le(1,0):le(31,11);case h:return K?le(1,fe):le(0,fe+1);case p:var st=this.$locale().weekStart||0,Xe=(ae<st?ae+7:ae)-st;return le(K?he-Xe:he+(6-Xe),fe);case u:case y:return Z(Ie+"Hours",0);case c:return Z(Ie+"Minutes",1);case l:return Z(Ie+"Seconds",2);case s:return Z(Ie+"Milliseconds",3);default:return this.clone()}},P.endOf=function(C){return this.startOf(C,!1)},P.$set=function(C,M){var L,K=Q.p(C),oe="set"+(this.$u?"UTC":""),le=(L={},L[u]=oe+"Date",L[y]=oe+"Date",L[h]=oe+"Month",L[b]=oe+"FullYear",L[c]=oe+"Hours",L[l]=oe+"Minutes",L[s]=oe+"Seconds",L[a]=oe+"Milliseconds",L)[K],Z=K===u?this.$D+(M-this.$W):M;if(K===h||K===b){var ae=this.clone().set(y,1);ae.$d[le](Z),ae.init(),this.$d=ae.set(y,Math.min(this.$D,ae.daysInMonth())).$d}else le&&this.$d[le](Z);return this.init(),this},P.set=function(C,M){return this.clone().$set(C,M)},P.get=function(C){return this[Q.p(C)]()},P.add=function(C,M){var L,K=this;C=Number(C);var oe=Q.p(M),le=function(fe){var he=j(K);return Q.w(he.date(he.date()+Math.round(fe*C)),K)};if(oe===h)return this.set(h,this.$M+C);if(oe===b)return this.set(b,this.$y+C);if(oe===u)return le(1);if(oe===p)return le(7);var Z=(L={},L[l]=o,L[c]=i,L[s]=n,L)[oe]||1,ae=this.$d.getTime()+C*Z;return Q.w(ae,this)},P.subtract=function(C,M){return this.add(-1*C,M)},P.format=function(C){var M=this,L=this.$locale();if(!this.isValid())return L.invalidDate||v;var K=C||"YYYY-MM-DDTHH:mm:ssZ",oe=Q.z(this),le=this.$H,Z=this.$m,ae=this.$M,fe=L.weekdays,he=L.months,Ie=L.meridiem,st=function(ot,At,Pt,kn){return ot&&(ot[At]||ot(M,K))||Pt[At].slice(0,kn)},Xe=function(ot){return Q.s(le%12||12,ot,"0")},nt=Ie||function(ot,At,Pt){var kn=ot<12?"AM":"PM";return Pt?kn.toLowerCase():kn};return K.replace(A,function(ot,At){return At||function(Pt){switch(Pt){case"YY":return String(M.$y).slice(-2);case"YYYY":return Q.s(M.$y,4,"0");case"M":return ae+1;case"MM":return Q.s(ae+1,2,"0");case"MMM":return st(L.monthsShort,ae,he,3);case"MMMM":return st(he,ae);case"D":return M.$D;case"DD":return Q.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return st(L.weekdaysMin,M.$W,fe,2);case"ddd":return st(L.weekdaysShort,M.$W,fe,3);case"dddd":return fe[M.$W];case"H":return String(le);case"HH":return Q.s(le,2,"0");case"h":return Xe(1);case"hh":return Xe(2);case"a":return nt(le,Z,!0);case"A":return nt(le,Z,!1);case"m":return String(Z);case"mm":return Q.s(Z,2,"0");case"s":return String(M.$s);case"ss":return Q.s(M.$s,2,"0");case"SSS":return Q.s(M.$ms,3,"0");case"Z":return oe}return null}(ot)||oe.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(C,M,L){var K,oe=this,le=Q.p(M),Z=j(C),ae=(Z.utcOffset()-this.utcOffset())*o,fe=this-Z,he=function(){return Q.m(oe,Z)};switch(le){case b:K=he()/12;break;case h:K=he();break;case m:K=he()/3;break;case p:K=(fe-ae)/6048e5;break;case u:K=(fe-ae)/864e5;break;case c:K=fe/i;break;case l:K=fe/o;break;case s:K=fe/n;break;default:K=fe}return L?K:Q.a(K)},P.daysInMonth=function(){return this.endOf(h).$D},P.$locale=function(){return T[this.$L]},P.locale=function(C,M){if(!C)return this.$L;var L=this.clone(),K=_(C,M,!0);return K&&(L.$L=K),L},P.clone=function(){return Q.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},x}(),S=F.prototype;return j.prototype=S,[["$ms",a],["$s",s],["$m",l],["$H",c],["$W",u],["$M",h],["$y",b],["$D",y]].forEach(function(x){S[x[1]]=function(P){return this.$g(P,x[0],x[1])}}),j.extend=function(x,P){return x.$i||(x(P,F,j),x.$i=!0),j},j.locale=_,j.isDayjs=H,j.unix=function(x){return j(1e3*x)},j.en=T[E],j.Ls=T,j.p={},j})})(xm);var Tc=xm.exports;const W=Ls(Tc);function Vt(t,e){return t===null||e===null||t===void 0||e===void 0||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Vt(t[n],e[n]))}const pt=(t,e,n)=>t&&e&&n?t.isAfter(e,"day")&&t.isBefore(n,"day"):!1,dw={class:"fm-checkbox"},cw={class:"relative flex items-center justify-center w-6 h-6"},uw={class:"fm-checkbox__input--container"},fw=["checked","disabled","indeterminate"],pw={class:"fm-typo-en-body-lg-400"},hw={key:0,class:"text-fm-color-typo-secondary fm-typo-en-body-md-400"},Sm=r.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=Pe(e,"indeterminate"),s=Array.isArray(i.value),l=r.ref(s?i.value.some(p=>Vt(p,e.value)):i.value),c=r.computed(()=>{const p=s?i.value.some(h=>Vt(h,e.value)):i.value;return a.value&&!p?"remove":i.value?"check_small":""});function u(){if(o.value)return;a.value=!1,l.value=!l.value;let p=i.value;s?p=l.value?p.concat(e.value):p.filter(h=>!Vt(h,e.value)):p=l.value,i.value=p}return r.watch(()=>i.value,()=>{l.value=s?i.value.some(p=>Vt(p,e.value)):i.value}),(p,h)=>(r.openBlock(),r.createElementBlock("div",dw,[r.createElementVNode("label",{class:r.normalizeClass([["space-x-8",p.sublabel?"items-start":"items-center"],"fm-checkbox--wrapper"])},[r.createElementVNode("div",cw,[r.createElementVNode("div",uw,[r.createElementVNode("input",{checked:l.value,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":l.value}),disabled:o.value,indeterminate:r.unref(a),type:"checkbox",onInput:u},null,42,fw),r.unref(a)||l.value?(r.openBlock(),r.createBlock(ue,{key:0,name:c.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)])]),e.label?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([[p.sublabel?"py-0":"py-0.5","space-y-4"],"fm-checkbox__label-container"])},[r.renderSlot(p.$slots,"label"),r.createElementVNode("div",pw,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",hw,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)],2)):r.createCommentVNode("",!0)],2)]))}});function mw(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const n=["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(t.tagName),o=t.hasAttribute("tabindex")&&t.tabIndex>=0,i=t.hasAttribute("disabled");return n&&!i||o}function gw(t){if(!t)return!1;for(const e of t.querySelectorAll("*"))if(mw(e))return!0;return!1}const Cm="arrow-focusable";function bw(t){const e=n=>{if(!t.value)return;const o=document.querySelectorAll(`.${Cm}`);if(o.length!==0&&(n.key==="ArrowDown"||n.key==="ArrowUp")){const i=Array.from(o).findIndex(l=>l===document.activeElement);let a=i;n.key==="ArrowDown"?a=i+1:n.key==="ArrowUp"&&(a=i-1),a<0?a=o.length-1:a>=o.length&&(a=0),o[a].focus()}};r.onMounted(()=>{window.addEventListener("keydown",e)}),r.onUnmounted(()=>{window.removeEventListener("keydown",e)})}const yw=["tabindex"],vw={class:"fm-menu-item--left"},kw={key:0,class:"fm-menu-item--right"},St=Be(r.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.ref(!1),i=r.computed(()=>!n.disabled&&n.selectable&&!n.hasCheckbox),a=r.inject(em,null),s=e,l=p=>{p.preventDefault(),a==null||a.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},c=()=>{s("update:modelValue",n.modelValue)};function u(p){o.value=p}return(p,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass([{"fm-menu-item":!0,"fm-menu-item--selected":p.modelValue&&!p.hasCheckbox,"fm-menu-item--disabled":p.disabled,"hover:bg-fm-color-opacity-sm":!p.disabled&&!p.modelValue&&p.selectable,[r.unref(Cm)]:i.value},p.hasCheckbox?"pl-4":"pl-12"]),tabindex:i.value?"-1":"",onMousedown:h[1]||(h[1]=()=>u(!0)),onMouseleave:h[2]||(h[2]=()=>u(!1)),onMouseup:h[3]||(h[3]=()=>u(!1)),onClickCapture:l,onKeyup:r.withKeys(l,["enter","space"])},[r.createElementVNode("div",vw,[r.renderSlot(p.$slots,"prepend",{},()=>[!p.hasCheckbox&&p.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:p.disabled?"#C7C7CC":p.modelValue?"#FF7823":"#1C1C1E",name:p.icon,outline:!o.value&&!p.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),p.hasCheckbox?(r.openBlock(),r.createBlock(Sm,{key:1,disabled:p.disabled,indeterminate:p.indeterminate,"model-value":p.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:h[0]||(h[0]=m=>m.preventDefault()),"onUpdate:modelValue":c},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(p.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-md-400 max-w-[240px]",p.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(p.label),3),p.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-sm-400 ${p.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(p.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(p.$slots,"append",{},void 0,!0),p.expandable?(r.openBlock(),r.createElementBlock("div",kw,[r.createVNode(ue,{color:p.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],42,yw)]))}}),[["__scopeId","data-v-5c141aa6"]]);for(var Rt=[],Mc=0;Mc<256;++Mc)Rt.push((Mc+256).toString(16).slice(1));function ww(t,e=0){return(Rt[t[e+0]]+Rt[t[e+1]]+Rt[t[e+2]]+Rt[t[e+3]]+"-"+Rt[t[e+4]]+Rt[t[e+5]]+"-"+Rt[t[e+6]]+Rt[t[e+7]]+"-"+Rt[t[e+8]]+Rt[t[e+9]]+"-"+Rt[t[e+10]]+Rt[t[e+11]]+Rt[t[e+12]]+Rt[t[e+13]]+Rt[t[e+14]]+Rt[t[e+15]]).toLowerCase()}var zs,xw=new Uint8Array(16);function Sw(){if(!zs&&(zs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zs(xw)}var Cw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Am={randomUUID:Cw};function Dm(t,e,n){if(Am.randomUUID&&!e&&!t)return Am.randomUUID();t=t||{};var o=t.random||(t.rng||Sw)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,ww(o)}function Em(t,e){r.onMounted(async()=>{var n;e.value&&(await r.nextTick(),(n=t.value)==null||n.focus())}),r.watch(e,async n=>{var o;n&&((o=t.value)==null||o.focus())})}const Aw=["autofocus","disabled","inputMode","maxlength","minlength","placeholder","readOnly","step","type","value"],Er=r.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},type:{},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},autofocus:{type:Boolean},formatter:{type:Function,default:t=>t},decimal:{},datalist:{default:void 0},shiftDatalist:{type:Boolean,default:!0},datalistMaxHeight:{default:408},datalistMinHeight:{},offsetDatalist:{},datalistPlacement:{},datalistZIndex:{default:99},datalistWidth:{},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed","paste"],setup(t,{expose:e,emit:n}){const o=t,i=r.inject(Ke,null),a=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),s=n,l=r.ref(null),c=Pe(o,"modelValue"),{isFocused:u,focus:p,blur:h}=la(),m=B=>{c.value=o.formatter(B.target.value)},b=r.ref(null),y=r.computed(()=>{var B;return((B=b.value)==null?void 0:B.el)??null}),v=r.ref(null),w=r.ref(o.datalistMaxHeight),A=r.ref(!1),{floatingStyles:I}=ci(y,v,{middleware:[gm({apply({availableHeight:B,elements:H}){if(o.shiftDatalist)return;const _=B-16,j=Math.min(_,o.datalistMaxHeight);o.datalistMinHeight&&j<=o.datalistMinHeight||(w.value=j,Object.assign(H.floating.style,{maxHeight:`${_}px`}))}}),si({mainAxis:o.offsetDatalist??8}),li({crossAxis:!1,fallbackStrategy:"initialPlacement"}),Ic()],placement:o.datalistPlacement,whileElementsMounted:ai,strategy:"fixed"}),V=r.computed(()=>o.datalist?(A.value=!0,o.datalist.filter(B=>B.toLowerCase().includes(c.value.toLowerCase()))):null),R=r.ref(null);e({focus:p,inputEl:l}),r.onBeforeMount(()=>{R.value=`text-field-${Dm()}`}),Em(l,r.toRef(()=>o.autofocus));const E=r.computed(()=>[R.value]),T=()=>{var B;(B=l.value)==null||B.focus()};return(B,H)=>{var _;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(Nt,{id:R.value,ref_key:"formGroupRef",ref:b,modelValue:r.unref(c),"onUpdate:modelValue":H[4]||(H[4]=j=>r.isRef(c)?c.value=j:null),disabled:a.value,focused:r.unref(u),"helper-state":B.helperState,"helper-text":B.helperText,info:B.labelInfo,label:B.label,optional:B.labelMark==="optional",required:B.labelMark==="required",rules:B.rules,"blame-handler":T},r.createSlots({default:r.withCtx(({invalid:j})=>[r.createVNode(at,{"append-icon":B.appendIcon,focused:r.unref(u),invalid:B.invalid||j,"prepend-icon":B.prependIcon,"show-valid-border":B.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(B.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(B.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:l,autofocus:B.autofocus,class:r.normalizeClass({"fm-text-field--input fm-typo-en-body-lg-400":!0,"text-fm-color-typo-primary":!a.value,"text-fm-color-typo-disabled":a.value,"outline-none":!0}),disabled:a.value,inputMode:B.inputmode,maxlength:B.maxLength,minlength:B.minLength,placeholder:B.placeholder,readOnly:B.readonly,step:B.decimal?`0.${"0".repeat(B.decimal-1)}1`:void 0,type:B.type??B.inputmode,value:r.unref(c),onBlur:H[0]||(H[0]=()=>{r.unref(h)(),s("focus-changed",!1)}),onClick:H[1]||(H[1]=()=>{a.value||(A.value=!0)}),onFocus:H[2]||(H[2]=()=>{r.unref(p)(),s("focus-changed",!0)}),onInput:m,onPaste:H[3]||(H[3]=Q=>s("paste",Q))},null,42,Aw)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),_:2},[B.label||B.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(B.$slots,"label")]),key:"0"}:void 0,B.helperText||B.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(B.$slots,"helper-text")]),key:"1"}:void 0,B.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([a.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(B.maxLength?`${r.unref(c).length} / ${B.maxLength}`:""),3)]),key:"2"}:void 0]),1032,["id","modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[B.datalist&&A.value?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:v,style:r.normalizeStyle({...r.unref(I),zIndex:o.datalistZIndex}),class:"block"},[r.renderSlot(B.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:w.value,width:B.datalistWidth?`${B.datalistWidth}px`:`${(_=y.value)==null?void 0:_.clientWidth}px`})),()=>{var j;return[r.createElementVNode("div",{class:r.normalizeClass(["relative","px-4 py-4","flex flex-col","overflow-y-auto","bg-fm-color-neutral-white shadow-light-300 rounded-md"]),style:r.normalizeStyle({"max-height":`${w.value}px`,width:B.datalistWidth?`${B.datalistWidth}px`:`${(j=y.value)==null?void 0:j.clientWidth}px`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.value,Q=>(r.openBlock(),r.createBlock(St,{key:Q,label:Q,"model-value":Q===r.unref(c),value:Q,onClick:()=>{var F;(F=l.value)==null||F.focus(),c.value=Q,A.value=!1}},null,8,["label","model-value","value","onClick"]))),128))],4)]})],4)),[[r.unref(Vc),()=>{A.value=!1},E.value]]):r.createCommentVNode("",!0)]))],64)}}}),Dw=["tabindex"],io=Be(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},customElementClassListForCloseOnClick:{},closeOnMouseLeave:{type:Boolean,default:!1},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1},stopClickPropagation:{type:Boolean},zIndex:{default:99},offset:{},shift:{type:Boolean,default:!1},minHeight:{},flipPadding:{default:()=>({bottom:40})},elementIdsUseForDismissAwayEventExclusion:{},selectorForDismissAwayEventExclusion:{}},emits:["menu-changed"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=r.ref([]);let s;const l=r.ref(),c=r.ref(o.maxHeight),u=r.ref(!1),p=r.ref(!1),h=r.inject($h,null),m=r.ref(null),b=r.ref(null),{floatingStyles:y}=ci(m,b,{middleware:[gm({apply({availableHeight:x,elements:P}){if(o.shift)return;const C=x-16,M=Math.min(C,o.maxHeight),L=o.minHeight?Math.max(M,o.minHeight):M;c.value=L,Object.assign(P.floating.style,{maxHeight:`${L}px`})}}),si({mainAxis:o.offset??(h?8:4),crossAxis:h?-12:0}),li({crossAxis:!1,fallbackStrategy:"initialPlacement",padding:o.flipPadding}),Ic()],placement:o.placement,whileElementsMounted:ai,strategy:"fixed"}),v=()=>{V&&clearTimeout(V)},w=()=>{j.value==="hover"&&I()},A=x=>{if(!(x instanceof PointerEvent&&x.detail===0)&&(o.stopClickPropagation&&(x.stopPropagation(),document.body.click()),!o.disabled)){if(u.value){u.value=!1;return}j.value==="click"&&I()}},I=()=>{v(),p.value=!0,u.value=!0,h==null||h.setChildId(s)};let V;const R=()=>{j.value==="hover"&&(p.value=!1,v(),o.closeOnMouseLeave&&(V=setTimeout(()=>{u.value=!1},500)))},E=()=>{v(),p.value=!0},T=()=>{p.value=!1,V&&clearTimeout(V),o.closeOnMouseLeave&&j.value==="hover"&&(V=setTimeout(()=>{p.value||(a.value.length>0&&h?u.value=a.value.some(({injectProps:x})=>x.mouseInMenu.value):(h&&h.closeParent(),j.value!=="click"&&(u.value=!1)))},500))},B=x=>{const P=x.target;if(!(!P||!Array.isArray(o.customElementClassListForCloseOnClick))){for(const C of o.customElementClassListForCloseOnClick)if(P.closest(`.${C}`)){H();return}}},H=()=>{o.closeOnClick&&setTimeout(()=>{var x;u.value=!1,(x=m.value)==null||x.focus(),h==null||h.closeParent()},10)},_=r.computed(()=>({mouseInMenu:p}));r.provide($h,{register({injectProps:x}){return a.value=[...a.value,{injectProps:x}],a.value.length},closeParent(){h?(u.value=!1,h==null||h.closeParent()):u.value=j.value!=="click"},setChildId(x){l.value=x},mouseInChildId:l,trigger:o.trigger}),r.provide(em,{handleContentClick:H}),r.onMounted(()=>{window.addEventListener("click",Q),h&&(s=h.register({injectProps:_}))}),r.onUnmounted(()=>{window.removeEventListener("click",Q)}),r.watch(()=>h==null?void 0:h.mouseInChildId.value,x=>{x!==s&&(v(),u.value=!1)});const j=r.computed(()=>h===null?o.trigger:"hover");r.watch(()=>u.value,()=>i("menu-changed",u.value)),r.watch(()=>[u.value,b.value],([x,P])=>{if(!x)return;const C=P==null?void 0:P.querySelector('*[data-checked="true"]');C&&C.scrollIntoView()});const Q=x=>{if(!u.value)return;const P=x.path||x.composedPath();for(const M of P)if(M==m.value||M==b.value)return;const C=x.target;if(C){if(o.selectorForDismissAwayEventExclusion&&C.closest(o.selectorForDismissAwayEventExclusion))return;if(o.elementIdsUseForDismissAwayEventExclusion)for(const M of o.elementIdsUseForDismissAwayEventExclusion){const L=document.getElementById(M);if(L&&L.contains(C))return}}u.value=!1};function F(x){typeof x=="boolean"?u.value=x:u.value=!u.value}const S=r.ref(-1);return r.onMounted(()=>{!o.disabled&&!gw(m.value)&&(S.value=0)}),bw(u),e({toggleMenu:F}),(x,P)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:m,tabindex:S.value,class:"fm-menu",onClick:A,onMouseenter:w,onMouseleave:R,onKeyupCapture:r.withKeys(A,["enter","space"])},[r.renderSlot(x.$slots,"menu-button",{},void 0,!0)],40,Dw),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(h)||x.inPopover,to:"body"},[u.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:b,style:r.normalizeStyle({...r.unref(y),zIndex:o.zIndex}),class:"block",onMouseenter:E,onMouseleave:T,onClick:B},[r.renderSlot(x.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:c.value,width:`${x.width}px`})),()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${c.value}px`,width:`${x.width}px`}),class:"fm-menu__wrapper"},[r.renderSlot(x.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-6ea6484f"]]),Lc=r.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},rightIcon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.ref(!1);function s(y){n.selectable&&(a.value=y)}const l=()=>{!n.selectable||n.disabled||(i.value=!i.value)},c=y=>{y.stopPropagation(),!n.disabled&&o("chip-closed")};r.onMounted(()=>{i.value=n.selected}),r.watch(()=>n.selected,()=>{i.value=n.selected});function u(y,v,w){if(y)return"text-fm-color-typo-disabled";switch(w){case"plain":return v?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function p(y,v,w){if(y)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(w){case"plain":return v?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const h=r.ref(),m=r.ref(!1);function b(y=0){if(n.label&&!(!h.value&&y>500)){if(!h.value){r.nextTick(()=>b(y+1));return}m.value=h.value.offsetWidth<h.value.scrollWidth}}return r.onMounted(()=>{b()}),(y,v)=>{const w=r.resolveDirective("tooltip");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center",y.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",p(y.disabled,i.value,y.variant),{"cursor-pointer":y.selectable&&!y.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!y.disabled&&y.selectable}]),onClick:l,onMousedown:v[0]||(v[0]=()=>s(!0)),onMouseleave:v[1]||(v[1]=()=>s(!1)),onMouseup:v[2]||(v[2]=()=>s(!1))},[r.renderSlot(y.$slots,"default",{},()=>[y.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:y.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:y.icon,outline:!a.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),y.label?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"labelRef",ref:h,class:r.normalizeClass(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",u(y.disabled,i.value,y.variant)])},r.toDisplayString(y.label),3)):r.createCommentVNode("",!0),y.rightIcon?(r.openBlock(),r.createBlock(ue,{key:2,color:y.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:y.rightIcon,outline:!a.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)]),y.removable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!y.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":y.disabled,"cursor-pointer":y.selectable&&!y.disabled}]),onClick:c},[r.createVNode(ue,{color:y.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):r.createCommentVNode("",!0)],34)),[[w,m.value?y.label:null]])}}}),zc=r.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(null),a=r.ref(0),s=r.ref(null),l=r.ref(),c=()=>{var m,b;if(!i.value)return;const p=i.value.getBoundingClientRect();a.value>0&&s.value&&((m=l.value)==null||m.splice(s.value,1)),a.value=0;let h=0;Array.from(i.value.children).forEach((y,v)=>{const w=y.getBoundingClientRect(),A=w.y-p.y;h=Math.max(w.height*2+4,h),A>h&&(a.value+=1,s.value=s.value===null?v:v-a.value)}),a.value>0&&s.value&&((b=l.value)==null||b.splice(s.value,0,{label:`+${a.value}`,removable:!1,selectable:!1,compact:n.compact}))},u=p=>{o("chip-closed",p)};return r.onMounted(()=>{l.value=n.items,c(),new ResizeObserver(()=>{c()}).observe(i.value)}),r.watch(()=>n.items,()=>{l.value=n.items,c()}),(p,h)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:r.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",p.compact?"max-h-48":"max-h-64"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(m,b)=>(r.openBlock(),r.createBlock(Lc,{key:b,label:m.label,icon:m.icon,selected:m.selected,removable:m.removable!==void 0?m.removable:p.removable,selectable:m.selectable!==void 0?m.selectable:p.selectable,disabled:m.disabled!==void 0?m.disabled:p.disabled,compact:p.compact,variant:m.variant,onChipClosed:y=>u(b)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Ew={class:"flex flex-col gap-4"},Bw=["id"],Pw={key:0,class:"flex flex-col gap-4 justify-center"},Ow=r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},menuId:{default:Dm()},shiftMenu:{type:Boolean},hideChips:{type:Boolean},elementIdsUseForDismissAwayEventExclusion:{},menuZIndex:{},searchable:{type:Boolean},searchTarget:{default:"label"},searchDebounce:{default:700},onSearch:{},keepSelectionOrder:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=r.inject(Ke,null),i=e,a=Pe(n,"modelValue"),s=r.ref(),l=r.ref(!1),c=S=>{let x;n.keepSelectionOrder?x=s.value.filter(P=>!Vt(P.value,S.value)):x=n.items.filter(P=>s.value.some(C=>Vt(P.value,C.value)&&!Vt(P.value,S.value))),a.value=x.map(P=>P.value),s.value=x},u=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),p=()=>{n.multiselect||u.value||(a.value=void 0,s.value=void 0,n.searchable&&(T.value=""))},h=r.computed(()=>n.clearable&&!n.multiselect&&v.value&&!u.value),m=(S,x)=>{var C;if(!n.multiselect)return a.value=x.value,s.value=x,n.searchable&&(T.value=x.label),setTimeout(()=>{l.value=!1},0);if(!S)return c(x),setTimeout(()=>{l.value=!1},0);if(n.searchable&&n.onSearch){const M=[...s.value??[],x];return a.value=M.map(L=>L.value),s.value=M,setTimeout(()=>{l.value=!1},0)}let P;return(((C=s.value)==null?void 0:C.length)??0)===0?P=[x]:n.keepSelectionOrder?P=[...s.value,x]:P=n.items.filter(M=>a.value.some(L=>Vt(M.value,L)||Vt(M.value,x.value))),a.value=P.map(M=>M.value),s.value=P,setTimeout(()=>{l.value=!1},0)},b=S=>{a.value=[...a.value].filter((x,P)=>P!==S)},y=r.computed(()=>n.multiselect&&n.searchable&&n.onSearch?s.value.map(S=>({label:S.label})):n.keepSelectionOrder&&s.value?s.value.map(S=>({label:S.label})):n.items.filter(S=>a.value.some(x=>Vt(S.value,x))).map(S=>({label:S.label}))),v=r.computed(()=>{var S;return n.multiselect?((S=s.value)==null?void 0:S.length)>0:!!s.value}),w=r.computed(()=>n.placeholder||U("select.placeholder")),A=r.computed(()=>{var S;return n.multiselect?w.value:v.value?((S=s.value)==null?void 0:S.label)??n.placeholder??w.value:n.placeholder??w.value}),I=r.ref(null);r.watch(()=>[l.value,I.value],([S,x])=>{if(!S)return;const P=x==null?void 0:x.querySelector('*[data-checked="true"]');P&&P.scrollIntoView()});const V=r.ref(null),R=()=>{V.value&&!n.multiselect&&V.value.toggleMenu(!1)},E=r.ref(n.items),T=r.ref(""),B=r.ref(!1);let H,_;const j=()=>{clearTimeout(_),B.value=!1},Q=async S=>{let x=S??T.value;if(H===x)return;if(H=x,n.onSearch){B.value=!0,await n.onSearch(x),B.value=!1;return}let P=[...n.items];x!==""&&(P=P.filter(C=>C[n.searchTarget].toLowerCase().includes(T.value.toLowerCase()))),E.value=P,B.value=!1},F=S=>{if(S)return Q("");if(n.multiselect)return B.value=!1,T.value="",setTimeout(()=>{j()},0),E.value=n.items;const x=s.value;let P=T.value;B.value&&(P=(x==null?void 0:x.label)??"");const C=n.items.findIndex(M=>M.label===P);C!==-1&&(s.value=n.items[C],a.value=x.value),T.value=(x==null?void 0:x.label)??"",setTimeout(()=>{j()},0)};return n.searchable&&r.watch(T,async()=>{j(),_=setTimeout(Q,n.searchDebounce)}),n.multiselect&&n.searchable&&n.onSearch||r.watch(a,()=>{var S;if(n.multiselect){if(n.keepSelectionOrder){const x=r.toRaw(a.value);s.value=x.map(P=>n.items.find(C=>Vt(C.value,P))).filter(Boolean)}else s.value=n.items.filter(x=>r.toRaw(a.value).some(P=>Vt(P,x.value)));return}s.value=n.items.find(x=>Vt(a.value,x.value)),n.searchable&&(T.value=((S=s.value)==null?void 0:S.label)??"",setTimeout(()=>{j()},0))},{immediate:!0}),(S,x)=>{var P;return r.openBlock(),r.createElementBlock("div",Ew,[r.createVNode(Nt,{modelValue:r.unref(a),"onUpdate:modelValue":x[2]||(x[2]=C=>r.isRef(a)?a.value=C:null),disabled:u.value,focused:l.value,"helper-state":S.helperState,"helper-text":S.helperText,info:S.labelInfo,label:S.label,optional:S.labelMark==="optional",required:S.labelMark==="required",rules:S.rules},r.createSlots({default:r.withCtx(({invalid:C})=>[r.createVNode(io,{ref_key:"menuRef",ref:V,"close-on-click":!S.multiselect,disabled:u.value,"element-ids-use-for-dismiss-away-event-exclusion":S.elementIdsUseForDismissAwayEventExclusion,"max-height":S.maxHeight,placement:S.placement,shift:S.shiftMenu,"show-menu":l.value,width:S.width,"z-index":S.menuZIndex,onMenuChanged:x[1]||(x[1]=M=>{l.value=M,n.searchable&&F(M),i("dropdown-changed",l.value)})},{"menu-button":r.withCtx(()=>[n.searchable?(r.openBlock(),r.createBlock(Er,{key:0,modelValue:T.value,"onUpdate:modelValue":x[0]||(x[0]=M=>T.value=M),focused:l.value,invalid:C,"show-valid-border":S.showValidBorder,disabled:u.value,placeholder:A.value},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[h.value?(r.openBlock(),r.createBlock(ue,{key:0,name:"close",size:"md",class:"cursor-pointer",onClick:r.withModifiers(p,["stop"])})):(r.openBlock(),r.createBlock(ue,{key:1,color:u.value?"#C7C7CC":"black",name:l.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"]))]),_:2},1032,["modelValue","focused","invalid","show-valid-border","disabled","placeholder"])):(r.openBlock(),r.createBlock(at,{key:1,class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:C,"show-valid-border":S.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[h.value?(r.openBlock(),r.createBlock(ue,{key:0,name:"close",size:"md",class:"cursor-pointer",onClick:r.withModifiers(p,["stop"])})):(r.openBlock(),r.createBlock(ue,{key:1,color:u.value?"#C7C7CC":"black",name:l.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"]))]),default:r.withCtx(()=>[r.renderSlot(S.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled":v.value&&!S.multiselect?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-en-body-lg-400 line-clamp-1"])},r.toDisplayString(A.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),"menu-wrapper":r.withCtx(({maxHeight:M,width:L})=>[r.createElementVNode("div",{id:S.menuId,ref_key:"menuOptionsRef",ref:I,style:r.normalizeStyle({"max-height":`${M}px`,width:`${L}`}),class:"fm-select__menu__wrapper"},[r.renderSlot(S.$slots,"menu-wrapper",r.mergeProps({handleItemChange:(K,oe)=>m(K,oe)},{maxHeight:M,width:L}),()=>[r.createElementVNode("div",{onClick:R},[r.renderSlot(S.$slots,"prepend-menu",{},void 0,!0)]),B.value?r.createCommentVNode("",!0):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(S.searchable&&!S.onSearch?E.value:S.items,K=>{var oe,le;return r.openBlock(),r.createBlock(St,{key:K.value,"data-checked":S.multiselect&&((oe=s.value)==null?void 0:oe.some(Z=>r.unref(Vt)(Z.value,K.value))),disabled:K.disabled,"has-checkbox":S.multiselect,label:K.label,"model-value":S.multiselect&&((le=s.value)==null?void 0:le.some(Z=>r.unref(Vt)(Z.value,K.value))),sublabel:K.sublabel,value:K.value,"onUpdate:modelValue":Z=>m(Z,K)},null,8,["data-checked","disabled","has-checkbox","label","model-value","sublabel","value","onUpdate:modelValue"])}),128)),B.value?(r.openBlock(),r.createBlock(Sr,{key:1,size:"lg"})):r.createCommentVNode("",!0),r.createElementVNode("div",{onClick:R},[r.renderSlot(S.$slots,"append-menu",{},void 0,!0)])],!0)],12,Bw)]),_:2},1032,["close-on-click","disabled","element-ids-use-for-dismiss-away-event-exclusion","max-height","placement","shift","show-menu","width","z-index"])]),_:2},[S.label||S.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(S.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,S.helperText||S.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(S.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),S.multiselect&&((P=s.value)==null?void 0:P.length)>0&&!S.hideChips?(r.openBlock(),r.createElementBlock("div",Pw,[r.createVNode(zc,{disabled:u.value,items:y.value,removable:"",onChipClosed:b},null,8,["disabled","items"])])):r.createCommentVNode("",!0)])}}}),yo=Be(Ow,[["__scopeId","data-v-d0c6c521"]]);function Jo(){const t=r.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};r.onMounted(()=>{window.addEventListener("resize",e)}),r.onUnmounted(()=>{window.removeEventListener("resize",e)});const n=r.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248})),o={xs:[0,647],sm:[648,959],md:[960,1247],lg:[1248,1/0]};function i(l){return o[l]}function a(l){const c=o[l][1];return t.value<=c}function s(l){return!!o[l]}return{breakpoints:n,isAtMost:a,getBreakpointsBoundary:i,isBreakpointKeyword:s}}function Bm(){const t=r.inject(Zh);if(!t)throw new Error("No provider");return t}function Iw(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Pm(){const t=Iw();return{emitData(e){t==null||t("dialog:emit-data",e)},emitAction(e){t==null||t(`dialog:${e}-action`)}}}function Nw(){return r.inject(vc)}const Om=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},blameFormChildOnValidationFailed:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),a=r.ref(0),s=r.ref(!1),l=n,c=()=>{let m=[],b=!1;for(let y=0;y<i.value.length;y++){const v=i.value[y],w=v.validate();if(w.length>0&&o.blameFormChildOnValidationFailed&&!b)if(v.blame&&typeof v.blame=="function")try{v.blame(),b=!0}catch(A){throw A}else console.warn(`FormGroup thrown error message ${JSON.stringify(w)}, but does not implement a blameHandler to focus on error.`);m=[...m,...w]}return m},u=async()=>{var b,y;s.value=!0;const m=c();m.length?await((y=o.onValidationFailed)==null?void 0:y.call(o,m)):await((b=o.onValidationSuccess)==null?void 0:b.call(o)),s.value=!1},p=()=>{for(let m=0;m<i.value.length;m++)i.value[m].resetValue();l("reset")};return e({validateInputsWithoutSubmit:c,validateInputs:u,resetInputsValidation:()=>{for(let m=0;m<i.value.length;m++)i.value[m].resetValidation();l("validation-reset")},resetInputs:p,isSubmitting:s}),r.provide(Kh,{register({validate:m,resetValidation:b,resetValue:y,blame:v}){return i.value=[...i.value,{componentId:a.value,validate:m,resetValidation:b,resetValue:y,blame:v}],a.value++},unregister(m){i.value=i.value.filter(b=>b.componentId!==m)}}),r.provide(Ke,{getDisabled:()=>o.disabled}),(m,b)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(u,["prevent"]),onReset:r.withModifiers(p,["prevent"])},[r.renderSlot(m.$slots,"default")],32))}}),Vw={class:"space-y-1"},Rw={class:"fm-typo-en-body-lg-600 text-fm-color-typo-primary"},Fw={class:"fm-typo-en-body-sm-400 text-fm-color-typo-secondary"},Tw=Be(r.defineComponent({__name:"CreateGroupForm",props:{sortFields:{default:()=>[]}},emits:["update:formData"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=r.ref({name:"",field:"",operator:"contains",value:""}),s=r.computed(()=>[{label:U("advancedSort.createGroup.operators.equals"),value:"equals"},{label:U("advancedSort.createGroup.operators.contains"),value:"contains"},{label:U("advancedSort.createGroup.operators.startsWith"),value:"startsWith"},{label:U("advancedSort.createGroup.operators.endsWith"),value:"endsWith"},{label:U("advancedSort.createGroup.operators.greaterThan"),value:"greaterThan"},{label:U("advancedSort.createGroup.operators.lessThan"),value:"lessThan"}]),l=o.sortFields.map(p=>({label:p.label,value:p.key})),{emitData:c,emitAction:u}=Pm();return r.watch(a,p=>{i("update:formData",p),c(p)},{deep:!0,immediate:!0}),e({formData:a}),(p,h)=>(r.openBlock(),r.createBlock(Om,{class:"create-group-form space-y-4",onValidationSuccess:h[4]||(h[4]=m=>r.unref(u)("primary"))},{default:r.withCtx(()=>[r.createVNode(Er,{modelValue:a.value.name,"onUpdate:modelValue":h[0]||(h[0]=m=>a.value.name=m),rules:[m=>!!m||r.unref(U)("advancedSort.createGroup.groupNameRequired")],autofocus:"",label:r.unref(U)("advancedSort.createGroup.groupName"),placeholder:r.unref(U)("advancedSort.createGroup.groupNamePlaceholder")},null,8,["modelValue","rules","label","placeholder"]),r.createElementVNode("div",Vw,[r.createElementVNode("h4",Rw,r.toDisplayString(r.unref(U)("advancedSort.createGroup.filterByQuery")),1),r.createElementVNode("p",Fw,r.toDisplayString(r.unref(U)("advancedSort.createGroup.filterDescription")),1)]),r.createVNode(yo,{modelValue:a.value.field,"onUpdate:modelValue":h[1]||(h[1]=m=>a.value.field=m),items:r.unref(l),label:r.unref(U)("advancedSort.createGroup.field"),placeholder:r.unref(U)("advancedSort.createGroup.fieldPlaceholder")},null,8,["modelValue","items","label","placeholder"]),r.createVNode(yo,{modelValue:a.value.operator,"onUpdate:modelValue":h[2]||(h[2]=m=>a.value.operator=m),items:s.value,label:r.unref(U)("advancedSort.createGroup.operator")},null,8,["modelValue","items","label"]),r.createVNode(Er,{modelValue:a.value.value,"onUpdate:modelValue":h[3]||(h[3]=m=>a.value.value=m),label:r.unref(U)("advancedSort.createGroup.value"),placeholder:r.unref(U)("advancedSort.createGroup.valuePlaceholder")},null,8,["modelValue","label","placeholder"])]),_:1}))}}),[["__scopeId","data-v-c70ec71b"]]),Mw={class:"fm-advanced-sort__container"},Lw={class:"fm-advanced-sort__column fm-advanced-sort__column--left"},zw={class:"fm-advanced-sort__column-header"},_w={class:"fm-typo-en-body-lg-600 text-fm-color-typo-primary"},Hw={key:1,class:"fm-advanced-sort__sort-controls"},Uw={class:"fm-advanced-sort__list-container"},Ww={class:"fm-advanced-sort__item"},jw={class:"fm-advanced-sort__item-text"},Gw={key:0,class:"fm-advanced-sort__empty"},Qw={class:"fm-advanced-sort__column fm-advanced-sort__column--right"},Xw={class:"fm-advanced-sort__column-header"},qw={class:"fm-typo-en-body-lg-600 text-fm-color-typo-primary"},Kw={class:"fm-advanced-sort__groups-container"},Jw={key:0,class:"fm-advanced-sort__empty"},Yw={class:"fm-advanced-sort__group-header"},Zw={class:"fm-advanced-sort__group-title"},$w={class:"fm-typo-en-body-lg-600"},ex={class:"fm-advanced-sort__group-count"},tx={class:"fm-advanced-sort__group-actions"},nx={class:"fm-advanced-sort__item fm-advanced-sort__item--in-group"},ox={class:"fm-advanced-sort__item-text"},rx={key:0,class:"fm-advanced-sort__group-empty"},Im=Be(r.defineComponent({__name:"FmAdvancedSort",props:{modelValue:{},sortFields:{default:()=>[]},leftColumnLabel:{default:""},rightColumnLabel:{default:""},height:{default:"600px"},searchable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([...n.modelValue]),a=r.ref([]),s=r.ref(""),l=r.ref("asc"),c=r.ref(""),u=Bm();r.watch(()=>n.modelValue,B=>{i.value=[...B]},{deep:!0});const p=r.computed(()=>{const B=new Set;return a.value.forEach(H=>{H.items.forEach(_=>{B.add(_)})}),i.value.filter(H=>!B.has(H))}),h=r.computed(()=>{let B=[...p.value];if(c.value&&n.searchable){const H=c.value.toLowerCase();B=B.filter(_=>Object.values(_).some(j=>String(j).toLowerCase().includes(H)))}if(s.value&&n.sortFields.length>0){const H=n.sortFields.find(_=>_.key===s.value);H&&B.sort((_,j)=>{const Q=H.getter?H.getter(_):_[H.key],F=H.getter?H.getter(j):j[H.key];return Q<F?l.value==="asc"?-1:1:Q>F?l.value==="asc"?1:-1:0})}return B}),m=r.computed(()=>n.sortFields.map(B=>({label:B.label,value:B.key}))),b=r.computed(()=>n.leftColumnLabel||U("advancedSort.availableItems")),y=r.computed(()=>n.rightColumnLabel||U("advancedSort.sortedGroups")),v=(B,H)=>{R()},w=()=>{u.open({title:U("advancedSort.createGroup.title"),contentComponent:Tw,contentComponentProps:{sortFields:n.sortFields},primaryActions:{text:U("advancedSort.newGroup"),close:!1},secondaryActions:{text:U("actions.cancel"),close:!0}}).onPrimary(async B=>{if(!(B!=null&&B.name))return;const H={id:`group-${Date.now()}`,name:B.name,items:[]};if(B.field&&B.value){H.query={field:B.field,operator:B.operator,value:B.value};const _=n.sortFields.find(Q=>Q.key===B.field),j=p.value.filter(Q=>{const F=_!=null&&_.getter?_.getter(Q):Q[B.field],S=B.value;switch(B.operator){case"equals":return F===S;case"contains":return String(F).toLowerCase().includes(String(S).toLowerCase());case"startsWith":return String(F).toLowerCase().startsWith(String(S).toLowerCase());case"endsWith":return String(F).toLowerCase().endsWith(String(S).toLowerCase());case"greaterThan":return F>S;case"lessThan":return F<S;default:return!1}});H.items=j,i.value=i.value.filter(Q=>!j.includes(Q))}a.value.push(H),R(),u.close()})},A=B=>{const H=a.value.findIndex(_=>_.id===B);H>-1&&(a.value.splice(H,1),R())},I=B=>{if(B>0){const H=a.value[B];a.value[B]=a.value[B-1],a.value[B-1]=H,R()}},V=B=>{if(B<a.value.length-1){const H=a.value[B];a.value[B]=a.value[B+1],a.value[B+1]=H,R()}},R=()=>{const B=[];a.value.forEach(H=>{B.push(...H.items)}),B.push(...p.value),o("update:modelValue",B)},E=()=>{l.value=l.value==="asc"?"desc":"asc"},T=B=>B.label??B.name??B.title??String(B);return(B,H)=>(r.openBlock(),r.createElementBlock("div",{class:"fm-advanced-sort",style:r.normalizeStyle({height:B.height})},[r.createElementVNode("div",Mw,[r.createElementVNode("div",Lw,[r.createElementVNode("div",zw,[r.createElementVNode("h3",_w,r.toDisplayString(b.value),1),B.searchable?(r.openBlock(),r.createBlock(Er,{key:0,modelValue:c.value,"onUpdate:modelValue":H[0]||(H[0]=_=>c.value=_),placeholder:r.unref(U)("advancedSort.searchPlaceholder"),"prepend-icon":"search",class:"fm-advanced-sort__search"},null,8,["modelValue","placeholder"])):r.createCommentVNode("",!0),B.sortFields.length>0?(r.openBlock(),r.createElementBlock("div",Hw,[r.createVNode(yo,{modelValue:s.value,"onUpdate:modelValue":H[1]||(H[1]=_=>s.value=_),items:m.value,placeholder:r.unref(U)("advancedSort.sortByField"),class:"fm-advanced-sort__sort-field"},null,8,["modelValue","items","placeholder"]),r.createVNode(ke,{icon:l.value==="asc"?"arrow_upward":"arrow_downward",variant:"secondary",size:"md",onClick:E},null,8,["icon"])])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Uw,[r.createVNode(r.unref(bc),{"model-value":h.value,group:{name:"items",pull:!0,put:!1},class:"fm-advanced-sort__list","item-key":_=>_.id,sort:!1},{item:r.withCtx(({element:_})=>[r.createElementVNode("div",Ww,[r.createVNode(ue,{name:"drag_indicator",class:"fm-advanced-sort__drag-handle"}),r.createElementVNode("span",jw,r.toDisplayString(T(_)),1)])]),_:1},8,["model-value","item-key"]),h.value.length===0?(r.openBlock(),r.createElementBlock("div",Gw,[r.createElementVNode("span",null,r.toDisplayString(r.unref(U)("advancedSort.noItemsAvailable")),1)])):r.createCommentVNode("",!0)])]),r.createElementVNode("div",Qw,[r.createElementVNode("div",Xw,[r.createElementVNode("h3",qw,r.toDisplayString(y.value),1),r.createVNode(ke,{label:r.unref(U)("advancedSort.newGroup"),"prepend-icon":"add",variant:"primary",size:"md",onClick:w},null,8,["label"])]),r.createElementVNode("div",Kw,[a.value.length===0?(r.openBlock(),r.createElementBlock("div",Jw,[r.createElementVNode("span",null,r.toDisplayString(r.unref(U)("advancedSort.createGroupsPrompt")),1)])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(_,j)=>(r.openBlock(),r.createElementBlock("div",{key:_.id,class:"fm-advanced-sort__group"},[r.createElementVNode("div",Yw,[r.createElementVNode("div",Zw,[r.createVNode(ue,{name:"folder"}),r.createElementVNode("span",$w,r.toDisplayString(_.name),1),r.createElementVNode("span",ex,"("+r.toDisplayString(_.items.length)+")",1)]),r.createElementVNode("div",tx,[r.createVNode(ke,{icon:"arrow_upward",variant:"tertiary",size:"md",disabled:j===0,onClick:Q=>I(j)},null,8,["disabled","onClick"]),r.createVNode(ke,{icon:"arrow_downward",variant:"tertiary",size:"md",disabled:j===a.value.length-1,onClick:Q=>V(j)},null,8,["disabled","onClick"]),r.createVNode(ke,{icon:"delete",variant:"tertiary",size:"md",onClick:Q=>A(_.id)},null,8,["onClick"])])]),r.createVNode(r.unref(bc),{modelValue:_.items,"onUpdate:modelValue":Q=>_.items=Q,group:{name:"items",pull:!0,put:!0},class:"fm-advanced-sort__group-list","item-key":Q=>Q.id,onChange:Q=>v(_.id)},{item:r.withCtx(({element:Q})=>[r.createElementVNode("div",nx,[r.createVNode(ue,{name:"drag_indicator",class:"fm-advanced-sort__drag-handle"}),r.createElementVNode("span",ox,r.toDisplayString(T(Q)),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","item-key","onChange"]),_.items.length===0?(r.openBlock(),r.createElementBlock("div",rx,[r.createElementVNode("span",null,r.toDisplayString(r.unref(U)("advancedSort.dropItemsHere")),1)])):r.createCommentVNode("",!0)]))),128))])])])],4))}}),[["__scopeId","data-v-cc85d12d"]]),ix={class:"gap-8 inline-flex items-center relative select-none"},ax={key:0,class:"fm-typo-en-body-sm-400 justify-center flex items-center w-full"},Yo=Be(r.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"},class:{default:void 0}},setup(t){const e=t,n=r.computed(()=>e.value!==null&&e.value!==void 0),o=r.computed(()=>e.value&&e.value>99?"99+":e.value);return(i,a)=>(r.openBlock(),r.createElementBlock("div",ix,[r.renderSlot(i.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-badge",e.class??`fm-badge--${i.variant}`,{absolute:!i.inline,"top-0 right-0 w-[6px] h-[6px]":!n.value,"top-[-2px] right-[-4px] w-[16px] h-[16px]":n.value&&e.value<10,"top-[-2px] right-[-8px] px-4 h-[20px] min-w-[20px]":n.value&&e.value>=10&&e.value<100,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[28px]":n.value&&e.value>=100}])},[e.value!==null?(r.openBlock(),r.createElementBlock("span",ax,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-5a27efb4"]]);function sx(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Nm(t){return typeof t=="function"?t():r.unref(t)}const lx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const dx=Object.prototype.toString,cx=t=>dx.call(t)==="[object Object]",_s=()=>{};function ux(t){return r.getCurrentInstance()}function fx(...t){if(t.length!==1)return r.toRef(...t);const e=t[0];return typeof e=="function"?r.readonly(r.customRef(()=>({get:e,set:_s}))):r.ref(e)}function px(t,e=!0,n){ux()?r.onMounted(t,n):e?t():r.nextTick(t)}function hx(t){var e;const n=Nm(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Vm=lx?window:void 0;function ui(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=Vm):[e,n,o,i]=t,!e)return _s;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],s=()=>{a.forEach(p=>p()),a.length=0},l=(p,h,m,b)=>(p.addEventListener(h,m,b),()=>p.removeEventListener(h,m,b)),c=r.watch(()=>[hx(e),Nm(i)],([p,h])=>{if(s(),!p)return;const m=cx(h)?{...h}:h;a.push(...n.flatMap(b=>o.map(y=>l(p,b,y,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return sx(u),u}function mx(t,e={}){const n=fx(t),{threshold:o=50,onSwipe:i,onSwipeEnd:a,onSwipeStart:s,disableTextSelect:l=!1}=e,c=r.reactive({x:0,y:0}),u=(B,H)=>{c.x=B,c.y=H},p=r.reactive({x:0,y:0}),h=(B,H)=>{p.x=B,p.y=H},m=r.computed(()=>c.x-p.x),b=r.computed(()=>c.y-p.y),{max:y,abs:v}=Math,w=r.computed(()=>y(v(m.value),v(b.value))>=o),A=r.ref(!1),I=r.ref(!1),V=r.computed(()=>w.value?v(m.value)>v(b.value)?m.value>0?"left":"right":b.value>0?"up":"down":"none"),R=B=>{var H,_,j;const Q=B.buttons===0,F=B.buttons===1;return(j=(_=(H=e.pointerTypes)==null?void 0:H.includes(B.pointerType))!=null?_:Q||F)!=null?j:!0},E=[ui(t,"pointerdown",B=>{if(!R(B))return;I.value=!0;const H=B.target;H==null||H.setPointerCapture(B.pointerId);const{clientX:_,clientY:j}=B;u(_,j),h(_,j),s==null||s(B)}),ui(t,"pointermove",B=>{if(!R(B)||!I.value)return;const{clientX:H,clientY:_}=B;h(H,_),!A.value&&w.value&&(A.value=!0),A.value&&(i==null||i(B))}),ui(t,"pointerup",B=>{R(B)&&(A.value&&(a==null||a(B,V.value)),I.value=!1,A.value=!1)})];px(()=>{var B,H,_,j,Q,F,S,x;(H=(B=n.value)==null?void 0:B.style)==null||H.setProperty("touch-action","none"),l&&((j=(_=n.value)==null?void 0:_.style)==null||j.setProperty("-webkit-user-select","none"),(F=(Q=n.value)==null?void 0:Q.style)==null||F.setProperty("-ms-user-select","none"),(x=(S=n.value)==null?void 0:S.style)==null||x.setProperty("user-select","none"))});const T=()=>E.forEach(B=>B());return{isSwiping:r.readonly(A),direction:r.readonly(V),posStart:r.readonly(c),posEnd:r.readonly(p),distanceX:m,distanceY:b,stop:T}}function gx(t,e={}){const{threshold:n=50,onSwipe:o,onSwipeEnd:i,onSwipeStart:a,passive:s=!0,window:l=Vm}=e,c=r.reactive({x:0,y:0}),u=r.reactive({x:0,y:0}),p=r.computed(()=>c.x-u.x),h=r.computed(()=>c.y-u.y),{max:m,abs:b}=Math,y=r.computed(()=>m(b(p.value),b(h.value))>=n),v=r.ref(!1),w=r.computed(()=>y.value?b(p.value)>b(h.value)?p.value>0?"left":"right":h.value>0?"up":"down":"none"),A=_=>[_.touches[0].clientX,_.touches[0].clientY],I=(_,j)=>{c.x=_,c.y=j},V=(_,j)=>{u.x=_,u.y=j};let R;const E=bx(l==null?void 0:l.document);s?R=E?{passive:!0}:{capture:!1}:R=E?{passive:!1,capture:!0}:{capture:!0};const T=_=>{v.value&&(i==null||i(_,w.value)),v.value=!1},B=[ui(t,"touchstart",_=>{if(_.touches.length!==1)return;R.capture&&!R.passive&&_.preventDefault();const[j,Q]=A(_);I(j,Q),V(j,Q),a==null||a(_)},R),ui(t,"touchmove",_=>{if(_.touches.length!==1)return;const[j,Q]=A(_);V(j,Q),!v.value&&y.value&&(v.value=!0),v.value&&(o==null||o(_))},R),ui(t,["touchend","touchcancel"],T,R)];return{isPassiveEventSupported:E,isSwiping:v,direction:w,coordsStart:c,coordsEnd:u,lengthX:p,lengthY:h,stop:()=>B.forEach(_=>_())}}function bx(t){if(!t)return!1;let e=!1;const n={get passive(){return e=!0,!1}};return t.addEventListener("x",_s,n),t.removeEventListener("x",_s),e}const fi=Be(r.defineComponent({__name:"FmOverlay",props:{onClose:{type:Function},onClickedAway:{type:Function},dismissAway:{type:Boolean},zIndex:{},preventBackdropEvent:{type:Boolean},transparent:{type:Boolean},centerContent:{type:Boolean}},setup(t){const e=t,n=r.ref(null),o=i=>{var a,s;n.value&&i.target===n.value&&(e.dismissAway&&((a=e.onClose)==null||a.call(e)),(s=e.onClickedAway)==null||s.call(e))};return r.onMounted(()=>{var a,s;((a=n.value)==null?void 0:a.querySelector(":focus"))||(s=n.value)==null||s.focus()}),(i,a)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"overlayRef",ref:n,class:r.normalizeClass([[i.preventBackdropEvent?"pointer-events-none":"pointer-events-auto",i.transparent?"bg-transparent":"bg-fm-color-overlay-background",{"fm-overlay--center":e.centerContent,"z-50":e.zIndex===void 0}],"fm-overlay"]),style:r.normalizeStyle({zIndex:e.zIndex}),onClick:a[0]||(a[0]=s=>o(s)),onKeyup:a[1]||(a[1]=r.withKeys(s=>{var l;return(l=e.onClose)==null?void 0:l.call(e)},["esc"])),tabindex:"-1"},[r.renderSlot(i.$slots,"default",{},void 0,!0)],38))}}),[["__scopeId","data-v-308ff512"]]),yx=[(t=>(r.pushScopeId("data-v-9f77466f"),t=t(),r.popScopeId(),t))(()=>r.createElementVNode("div",{class:"fm-bottom-sheet--gesture--stick"},null,-1))],vx={key:0,class:"fm-bottom-sheet--header"},kx={class:"fm-bottom-sheet--header--content"},wx={key:0},xx={class:"overflow-y-auto"},Sx={class:"flex gap-8 items-center"},_c=Be(r.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},zIndex:{default:void 0},noHeader:{type:Boolean,default:!1},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway"],setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(0),{direction:a,distanceY:s}=mx(n,{threshold:0,onSwipe(){a.value==="down"&&(i.value=Math.min(s.value,0))},onSwipeEnd(){var h;const p=(h=o.value)==null?void 0:h.clientHeight;p&&i.value<-p/2?u.value=!1:i.value=0}}),{direction:l,lengthY:c}=gx(n,{passive:!1,threshold:0,onSwipe(){l.value==="down"&&(i.value=Math.min(c.value,0))},onSwipeEnd(){var h;const p=(h=o.value)==null?void 0:h.clientHeight;p&&i.value<-p/2?u.value=!1:i.value=0}}),u=Pe(e,"modelValue");return r.watch(u,p=>{p&&(i.value=0)}),(p,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:h[0]||(h[0]=m=>u.value=!0)},[r.renderSlot(p.$slots,"bottom-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(u)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,transparent:e.noOverlay,onClose:h[2]||(h[2]=m=>u.value=!1),onClickedAway:h[3]||(h[3]=m=>p.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"wrapperRef",ref:o,style:r.normalizeStyle({bottom:`${i.value}px`}),class:r.normalizeClass(["fm-bottom-sheet",e.noOverlay&&"shadow-md"])},[r.createElementVNode("div",{ref_key:"gestureRef",ref:n,class:"fm-bottom-sheet--gesture"},yx,512),p.noHeader?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",vx,[r.createElementVNode("div",kx,[r.createElementVNode("div",{class:"flex h-24 items-center justify-center w-24",onClick:h[1]||(h[1]=m=>u.value=!1)},[r.createVNode(ue,{name:"arrow_back"})]),r.renderSlot(p.$slots,"bottom-sheet-header",{},()=>[p.header?(r.openBlock(),r.createElementBlock("div",wx,r.toDisplayString(p.header),1)):r.createCommentVNode("",!0)],!0)])])),r.createElementVNode("div",xx,[r.renderSlot(p.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Sx,[r.renderSlot(p.$slots,"bottom-sheet-footer",{},void 0,!0)])],6)]),_:3})]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-9f77466f"]]),Cx={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Ax=["onMouseenter"],Dx={key:0},Ex=r.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t,{expose:e}){const n=vr.useRoute(),o=vr.useRouter();r.onMounted(async()=>{if(!o){console.warn("FmBreadcrumb: router is not available");return}await o.isReady();const w=i.items.findIndex(A=>A.route==n.path);w!=-1&&!i.items[w].disabled&&(a.value=w)});const i=t,a=r.ref(-1),s=r.ref(-1),l=r.ref(" / "),c=r.ref("... /"),u=r.ref(!1),p=w=>a.value===w?"selected":s.value===w?"hovered":i.items[w].disabled?"disabled":"default",h=w=>{!i.items[w].disabled&&i.items[w].route&&(a.value=w)},m=w=>w!=i.items.length-1,b=w=>!u.value&&i.items.length>5&&w>=2&&w<i.items.length-2,y=()=>{u.value=!u.value};return e({setSelectedItemIndex:w=>{a.value=w}}),(w,A)=>{const I=r.resolveComponent("RouterLink");return r.openBlock(),r.createElementBlock("nav",null,[r.createElementVNode("ul",Cx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.items,(V,R)=>(r.openBlock(),r.createElementBlock("li",{key:R,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:E=>s.value=R,onMouseleave:A[0]||(A[0]=E=>s.value=-1)},[b(R)?R===3&&!u.value?(r.openBlock(),r.createElementBlock("a",{key:1,onClick:y},r.toDisplayString(c.value),1)):r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(I,{key:0,class:r.normalizeClass([p(R),"fm-typo-en-body-md-400"]),to:V.disabled?"":V.route,onClick:E=>h(R)},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(V.label),1),m(R)?(r.openBlock(),r.createElementBlock("span",Dx,r.toDisplayString(l.value),1)):r.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Ax))),128))])])}}}),Bx={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},Px=["disabled","v-wave","onClick","onMousedown"],Ox=r.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:modelValue",u)},a=r.ref(null),s=u=>{a.value=u},l=u=>u.disabled||n.disabled,c=u=>JSON.stringify(u)===JSON.stringify(n.modelValue);return(u,p)=>(r.openBlock(),r.createElementBlock("div",Bx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.items,(h,m)=>(r.openBlock(),r.createElementBlock("button",{key:m,class:r.normalizeClass([{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":c(h),"hover:bg-fm-color-neutral-white cursor-not-allowed":l(h)},"border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[5px]"]),disabled:l(h),"v-wave":l(h),type:"button",onClick:b=>i(h),onMousedown:b=>s(h),onMouseleave:p[0]||(p[0]=b=>s(null)),onMouseup:p[1]||(p[1]=b=>s(null))},[h.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:l(h)?"neutral-gray-200":c(h)?"primary":"",name:h.icon,outline:JSON.stringify(a.value)!==JSON.stringify(h)&&!c(h),size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),h.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([[l(h)?"text-fm-color-typo-disabled":c(h)?"text-fm-color-primary":"text-fm-color-typo-primary"],"fm-typo-en-body-lg-600"])},r.toDisplayString(h.label),3)):r.createCommentVNode("",!0)],42,Px))),128))]))}}),Hc=r.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return r.provide(Qo,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[r.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),Ix=r.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=r.inject(Qo,null);return(n,o)=>{var a,s;const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((a=r.unref(e))!=null&&a.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[r.renderSlot(n.$slots,"default")],2)),[[i,!((s=r.unref(e))!=null&&s.disabled)&&!n.disabled]])}}}),Uc=r.defineComponent({__name:"FmCardSection",setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Nx={class:"fm-card__actions"},Vx=r.defineComponent({__name:"FmCardActions",setup(t){const e=r.inject(Qo,null);return(n,o)=>(r.openBlock(),r.createBlock(Uc,null,{default:r.withCtx(()=>{var i;return[r.createElementVNode("div",Nx,[r.renderSlot(n.$slots,"default",{disabled:((i=r.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),Rm=r.defineComponent({__name:"FmCardTitle",setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Fm=r.defineComponent({__name:"FmCardSubtitle",setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Rx={class:"flex flex-col gap-4"},Fx=r.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=r.inject(Qo,null);return(n,o)=>(r.openBlock(),r.createBlock(Uc,{class:"fm-card__header"},{default:r.withCtx(()=>{var i,a;return[r.createElementVNode("div",Rx,[n.title?(r.openBlock(),r.createBlock(Rm,{key:0,disabled:(i=r.unref(e))==null?void 0:i.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.title),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0),n.subtitle?(r.openBlock(),r.createBlock(Fm,{key:1,disabled:(a=r.unref(e))==null?void 0:a.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0)])]}),_:1}))}}),Tx=["src","width"],Mx=r.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=r.inject(Qo,null);return(n,o)=>{var i,a;return r.openBlock(),r.createElementBlock("img",{src:n.src,class:r.normalizeClass(["object-cover",[{"opacity-60":((i=r.unref(e))==null?void 0:i.disabled)??!1},(a=r.unref(e))!=null&&a.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Tx)}}}),Lx={class:"flex h-48 items-center justify-center w-48"},Tm=r.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},maxWidth:{default:"min(calc(100% - 48px), 560px)"},maxHeight:{default:"600px"},closeButton:{type:Boolean,default:!0},zIndex:{},contentScrollable:{type:Boolean,default:!0},contentClass:{default:void 0},dismissAway:{type:Boolean},isComponent:{default:"div"},isComponentProps:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=r.ref(null),i=r.ref(!1),a=r.ref(!1),s=u=>{const p=u.scrollHeight,h=u.scrollTop+u.clientHeight;a.value=p===h,i.value=u.scrollTop===0},l=u=>{u.stopPropagation();const p=u.target;s(p)};r.watchEffect(()=>{o.value&&s(o.value)});function c(u){return typeof u=="number"?`${u}px`:u}return(u,p)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(u.isComponent),r.mergeProps({class:["fm-dialog"],style:{minWidth:c(u.minWidth),maxWidth:c(u.maxWidth),maxHeight:c(u.maxHeight)}},u.isComponentProps),{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-en-title-sm-600 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[r.renderSlot(u.$slots,"dialog-header"),r.createElementVNode("div",Lx,[u.closeButton?(r.openBlock(),r.createBlock(ue,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:p[0]||(p[0]=h=>n("update:modelValue",!1))})):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",{ref_key:"contentRef",ref:o,class:r.normalizeClass([[u.contentScrollable?"overflow-y-auto":"overflow-hidden",u.contentClass],"fm-dialog--content"]),onScrollPassive:l},[r.renderSlot(u.$slots,"default")],34),u.$slots["dialog-footer"]?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-dialog--footer","flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse",!a.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[r.renderSlot(u.$slots,"dialog-footer")],2)):r.createCommentVNode("",!0)]),_:3},16,["style"]))}}),zx=r.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},maxWidth:{},maxHeight:{},closeButton:{type:Boolean,default:!0},zIndex:{default:void 0},contentScrollable:{type:Boolean,default:!0},contentClass:{},dismissAway:{type:Boolean},isComponent:{default:"div"},isComponentProps:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=Pe(n,"modelValue"),a=document.body.style.overflow;return r.watch(()=>i,s=>{s?document.body.style.overflow="hidden":document.body.style.overflow=a}),(s,l)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[s.$slots["dialog-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:l[1]||(l[1]=c=>i.value=!0)},[r.renderSlot(s.$slots,"dialog-button",{onClick:l[0]||(l[0]=c=>i.value=!0)})])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":s.dismissAway,"prevent-backdrop-event":!s.overlay,transparent:!s.overlay,"z-index":s.zIndex,"center-content":"",onClose:l[3]||(l[3]=c=>o("update:modelValue",!1))},{default:r.withCtx(()=>[r.createVNode(Tm,{"close-button":s.closeButton,"content-class":s.contentClass,"content-scrollable":s.contentScrollable,"is-component":s.isComponent,"is-component-props":s.isComponentProps,"max-width":s.maxWidth,"min-width":s.minWidth,"model-value":r.unref(i),"onUpdate:modelValue":l[2]||(l[2]=c=>i.value=c)},r.createSlots({"dialog-header":r.withCtx(()=>[r.renderSlot(s.$slots,"dialog-header")]),default:r.withCtx(()=>[r.renderSlot(s.$slots,"default")]),_:2},[s.$slots["dialog-footer"]?{name:"dialog-footer",fn:r.withCtx(()=>[r.renderSlot(s.$slots,"dialog-footer")]),key:"0"}:void 0]),1032,["close-button","content-class","content-scrollable","is-component","is-component-props","max-width","min-width","model-value"])]),_:3},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:3})]))],64))}}),_x={class:"fm-drop-field"},Hx=["accept","disabled"],Ux=Be(r.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{},contentClass:{}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.ref(),s=r.ref(),l=r.ref(),c=E=>{n.disabled||(E.stopPropagation(),E.preventDefault())},u=E=>{n.disabled||(E.stopPropagation(),E.preventDefault(),i.value=!0)},p=E=>{n.disabled||(E.stopPropagation(),E.preventDefault(),i.value=!1)},h=E=>{n.disabled||(E.stopPropagation(),E.preventDefault(),i.value=!1,m(E))},m=E=>{var B;l.value=((B=E.dataTransfer)==null?void 0:B.files)??E.target.files;const T=l.value;if(a.value=y(T[0]),s.value=v(T[0]),a.value&&s.value)o("file-upload",T[0]);else{const H=b();o("file-rejected",[{file:T[0],reason:H}])}},b=()=>{const E=[];return a.value||E.push("invalid-type"),s.value||E.push("invalid-size"),E},y=E=>{if(!n.accept)return!0;const T=n.accept.split(",").map(B=>B.trim());for(const B of T)if(w(B)){if(I(B)===I(E.type))return!0}else if(A(E)===B||E.type===B)return!0;return!1},v=E=>!n.maxFileSize||E.size<=n.maxFileSize,w=E=>E.indexOf("*")!==-1,A=E=>"."+E.name.split(".").pop(),I=E=>E.substring(0,E.indexOf("/")),V=r.computed(()=>{if(i.value)return"Drop file to upload";if(a.value){if(!s.value)return`File size exceeds ${n!=null&&n.maxFileSize?n.maxFileSize*1e-6:"8"}mb`}else return"File type is not valid";return""}),R=r.computed(()=>l.value?!a.value||!s.value:!1);return(E,T)=>(r.openBlock(),r.createElementBlock("label",_x,[r.renderSlot(E.$slots,"label",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[E.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(E.label),3)],!0),r.createElementVNode("div",{class:r.normalizeClass([[E.contentClass?E.contentClass:"w-full h-full",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":R.value&&!E.disabled,"fm-drop-field__container--disabled":E.disabled}],"fm-drop-field__container"]),onDragenter:c,onDragleave:p,onDragover:u,onDrop:h},[r.renderSlot(E.$slots,"default",{},void 0,!0),(i.value||R.value)&&!E.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass({"fm-typo-en-body-lg-600":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":R.value})},r.toDisplayString(V.value),3)):(r.openBlock(),r.createBlock(ke,{key:1,disabled:E.disabled,label:r.unref(U)("dropField.placeholder"),size:"md",variant:"secondary"},null,8,["disabled","label"])),r.renderSlot(E.$slots,"accept-text",{},()=>[n.accept?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([[E.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"],"fm-typo-en-body-md-400"])},r.toDisplayString(`${r.unref(U)("dropField.accept")}${n.accept}`),3)):r.createCommentVNode("",!0)],!0),r.createElementVNode("input",{accept:E.accept,disabled:E.disabled,class:"fm-drop-field__input",type:"file",onChange:m},null,40,Hx)],34),r.renderSlot(E.$slots,"helper-text",{},()=>[n.maxFileSize?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([[E.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"],"fm-typo-en-body-sm-400"])},r.toDisplayString(`${r.unref(U)("dropField.maxSize")}${n.maxFileSize*1e-6}mb`),3)):r.createCommentVNode("",!0)],!0)]))}}),[["__scopeId","data-v-0a66f57c"]]),Wx={},jx={class:"flex-grow"};function Gx(t,e){return r.openBlock(),r.createElementBlock("div",jx)}const Zo=Be(Wx,[["render",Gx]]),Qx={install:t=>{const e={currentDialog:{dialogCount:0,vNode:null,container:null,uselessContainers:[]},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i=new Array,a={onPrimary:p=>(o.primary.push(p),a),onSecondary:p=>(o.secondary.push(p),a),onTertiary:p=>(o.tertiary.push(p),a),onClose:p=>(i.push(p),a)};function s(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const c=r.markRaw(Mm),u=r.createVNode(c,{...n,unmount:s,storedFunctions:o,"onDialog-closed"(p){i.forEach(h=>h(p))}});return u.appContext=t._context,r.render(u,l),e.currentDialog.container&&e.currentDialog.uselessContainers.push(e.currentDialog.container),e.currentDialog.dialogCount+=1,e.currentDialog.vNode=u,e.currentDialog.container=l,a},close:()=>{const{vNode:n,container:o}=e.currentDialog;e.currentDialog.uselessContainers.forEach(i=>{i.remove()}),!(n===null&&o===null)&&(e.currentDialog.dialogCount-=1,e.currentDialog.dialogCount===0&&(o&&r.render(null,o),o==null||o.remove(),e.currentDialog={vNode:null,container:null,dialogCount:0,uselessContainers:[]}))}};t.config.globalProperties.$dialog=e,t.provide(Zh,e)}},Xx={key:0,class:"block relative"},qx={class:"space-y-4"},Kx={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},Jx={key:1,class:"fm-typo-en-body-md-400 text-fm-color-neutral-black"},Mm=r.defineComponent({__name:"FmDynamicDialog",props:{title:{},subTitle:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},dismissAway:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},maxWidth:{},maxHeight:{},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentScrollable:{type:Boolean,default:!0},contentClass:{},contentComponentProps:{default:null},isContentComponent:{},isContentComponentProps:{},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null},zIndex:{default:void 0}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=r.ref(!1),o=r.ref(),i=r.computed(()=>a.primaryActions||a.secondaryActions||a.tertiaryActions),a=t,s=e,l=()=>{a.overlay&&(n.value=!1,setTimeout(()=>{a.unmount()},500))},c=(h,m)=>{a.storedFunctions[m].forEach(b=>b(o.value)),h.close&&l()},u=h=>{const m=a[`${h}Actions`];c(m||{text:null,close:!1},h)};r.onMounted(()=>{s("dialog-opened"),n.value=!0}),r.onUnmounted(()=>{s("dialog-closed",o.value)});const p=h=>r.isRef(h)?h.value:r.ref(h).value;return(h,m)=>(r.openBlock(),r.createBlock(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[n.value?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":h.dismissAway,"prevent-backdrop-event":!h.overlay,transparent:!h.overlay,"z-index":h.zIndex,"center-content":"",onClose:l},{default:r.withCtx(()=>[h.dialogComponent?(r.openBlock(),r.createElementBlock("div",Xx,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.dialogComponent),r.normalizeProps(r.guardReactiveProps(h.dialogComponentProps)),null,16)),h.closeButton?(r.openBlock(),r.createBlock(ue,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:l})):r.createCommentVNode("",!0)])):(r.openBlock(),r.createBlock(Tm,{key:1,"close-button":h.closeButton,"content-class":h.contentClass,"content-scrollable":h.contentScrollable,"is-component":h.isContentComponent,"is-component-props":h.isContentComponentProps,"max-width":h.maxWidth,"min-width":h.minWidth,"max-height":h.maxHeight,"model-value":n.value,"onUpdate:modelValue":l},r.createSlots({"dialog-header":r.withCtx(()=>[r.createElementVNode("div",qx,[r.createElementVNode("p",null,r.toDisplayString(h.title??"Notification"),1),h.subTitle?(r.openBlock(),r.createElementBlock("p",Kx,r.toDisplayString(h.subTitle),1)):r.createCommentVNode("",!0)])]),default:r.withCtx(()=>[h.contentComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.contentComponent),r.mergeProps({key:0},h.contentComponentProps,{"onDialog:emitData":m[0]||(m[0]=b=>o.value=b),"onDialog:primaryAction":m[1]||(m[1]=b=>u("primary")),"onDialog:secondaryAction":m[2]||(m[2]=b=>u("secondary")),"onDialog:tertiaryAction":m[3]||(m[3]=b=>u("tertiary"))}),null,16)):(r.openBlock(),r.createElementBlock("div",Jx,r.toDisplayString(h.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:r.withCtx(()=>[h.tertiaryActions?(r.openBlock(),r.createBlock(ke,{key:0,disabled:p(h.tertiaryActions.disabled),label:h.tertiaryActions.text,loading:p(h.tertiaryActions.isLoading),type:h.tertiaryActions.type??"button",variant:h.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:m[4]||(m[4]=b=>c(h.tertiaryActions,"tertiary"))},null,8,["disabled","label","loading","type","variant"])):r.createCommentVNode("",!0),r.createVNode(Zo,{class:"sm:hidden xs:hidden"}),h.secondaryActions?(r.openBlock(),r.createBlock(ke,{key:1,disabled:p(h.secondaryActions.disabled),label:h.secondaryActions.text,loading:p(h.secondaryActions.isLoading),type:h.secondaryActions.type??"button",variant:h.secondaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:m[5]||(m[5]=b=>c(h.secondaryActions,"secondary"))},null,8,["disabled","label","loading","type","variant"])):r.createCommentVNode("",!0),h.primaryActions?(r.openBlock(),r.createBlock(ke,{key:2,disabled:p(h.primaryActions.disabled),label:h.primaryActions.text,loading:p(h.primaryActions.isLoading),type:h.primaryActions.type??"button",variant:h.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:m[6]||(m[6]=b=>c(h.primaryActions,"primary"))},null,8,["disabled","label","loading","type","variant"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["close-button","content-class","content-scrollable","is-component","is-component-props","max-width","min-width","max-height","model-value"]))]),_:1},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:1}))}});/*!
15
15
  * @kurkle/color v0.3.2
16
16
  * https://github.com/kurkle/color#readme
17
17
  * (c) 2023 Jukka Kurkela
@@ -26,16 +26,16 @@
26
26
  * https://www.chartjs.org
27
27
  * (c) 2024 Chart.js Contributors
28
28
  * Released under the MIT License
29
- */class TC{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const a=n.listeners[i],s=n.duration;a.forEach(l=>l({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(o-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=og.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let s=a.length-1,l=!1,c;for(;s>=0;--s)c=a[s],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(e),l=!0):(a[s]=a[a.length-1],a.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),a.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Co=new TC;const Vg="transparent",MC={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=dg(t||Vg),i=o.valid&&dg(e||Vg);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class LC{constructor(e,n,o,i){const a=n[o];i=et([e.to,i,a,e.from]);const s=et([e.from,a,i]);this._active=!0,this._fn=e.fn||MC[e.type||typeof s],this._easing=ga[e.easing]||ga.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,s=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=et([e.to,n,i,e.from]),this._from=et([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,a=this._from,s=this._loop,l=this._to;let c;if(this._active=a!==l&&(s||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=a;return}c=n/o%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(a,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Rg{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Re(e))return;const n=Object.keys(dt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const a=e[i];if(!Re(a))return;const s={};for(const l of n)s[l]=a[l];(Ye(a.properties)&&a.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,s)})})}_animateOptions(e,n){const o=n.options,i=_C(e,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&zC(e.options.$animations,o).then(()=>{e.options=o},()=>{}),a}_createAnimations(e,n){const o=this._properties,i=[],a=e.$animations||(e.$animations={}),s=Object.keys(n),l=Date.now();let c;for(c=s.length-1;c>=0;--c){const u=s[c];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const p=n[u];let h=a[u];const m=o.get(u);if(h)if(m&&h.active()){h.update(m,p,l);continue}else h.cancel();if(!m||!m.duration){e[u]=p;continue}a[u]=h=new LC(m,e,u,p),i.push(h)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return Co.add(this._chart,o),!0}}function zC(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const a=t[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function _C(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fg(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:o?a:i,end:o?i:a}}function HC(t,e,n){if(n===!1)return!1;const o=Fg(t,n),i=Fg(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function UC(t){let e,n,o,i;return Re(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Tg(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function Mg(t,e,n,o={}){const i=t.keys,a=o.mode==="single";let s,l,c,u;if(e!==null){for(s=0,l=i.length;s<l;++s){if(c=+i[s],c===n){if(o.all)continue;break}u=t.values[c],ht(u)&&(a||e===0||so(e)===so(u))&&(e+=u)}return e}}function WC(t,e){const{iScale:n,vScale:o}=e,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",s=Object.keys(t),l=new Array(s.length);let c,u,p;for(c=0,u=s.length;c<u;++c)p=s[c],l[c]={[i]:p,[a]:t[p]};return l}function Lg(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function jC(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function GC(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function QC(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function zg(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const a=t[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function _g(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:l}=o,c=a.axis,u=s.axis,p=jC(a,s,o),h=e.length;let m;for(let b=0;b<h;++b){const y=e[b],{[c]:v,[u]:w}=y,A=y._stacks||(y._stacks={});m=A[u]=QC(i,p,v),m[l]=w,m._top=zg(m,s,!0,o.type),m._bottom=zg(m,s,!1,o.type);const I=m._visualValues||(m._visualValues={});I[l]=w}}function cu(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function XC(t,e){return rr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function qC(t,e,n){return rr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function ka(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const uu=t=>t==="reset"||t==="none",Hg=(t,e)=>e?t:Object.assign({},t),KC=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Tg(n,!0),values:null};class jn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Lg(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&ka(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(h,m,b,y)=>h==="x"?m:h==="r"?y:b,a=n.xAxisID=Ce(o.xAxisID,cu(e,"x")),s=n.yAxisID=Ce(o.yAxisID,cu(e,"y")),l=n.rAxisID=Ce(o.rAxisID,cu(e,"r")),c=n.indexAxis,u=n.iAxisID=i(c,a,s,l),p=n.vAxisID=i(c,s,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&tg(this._data,this),e._stacked&&ka(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(Re(n)){const i=this._cachedMeta;this._data=WC(n,i)}else if(o!==n){if(o){tg(o,this);const i=this._cachedMeta;ka(i),i._parsed=[]}n&&Object.isExtensible(n)&&RS(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=Lg(n.vScale,n),n.stack!==o.stack&&(i=!0,ka(n),n.stack=o.stack),this._resyncElements(e),(i||a!==n._stacked)&&_g(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:s}=o,l=a.axis;let c=e===0&&n===i.length?!0:o._sorted,u=e>0&&o._parsed[e-1],p,h,m;if(this._parsing===!1)o._parsed=i,o._sorted=!0,m=i;else{Ye(i[e])?m=this.parseArrayData(o,i,e,n):Re(i[e])?m=this.parseObjectData(o,i,e,n):m=this.parsePrimitiveData(o,i,e,n);const b=()=>h[l]===null||u&&h[l]<u[l];for(p=0;p<n;++p)o._parsed[p+e]=h=m[p],c&&(b()&&(c=!1),u=h);o._sorted=c}s&&_g(this,m)}parsePrimitiveData(e,n,o,i){const{iScale:a,vScale:s}=e,l=a.axis,c=s.axis,u=a.getLabels(),p=a===s,h=new Array(i);let m,b,y;for(m=0,b=i;m<b;++m)y=m+o,h[m]={[l]:p||a.parse(u[y],y),[c]:s.parse(n[y],y)};return h}parseArrayData(e,n,o,i){const{xScale:a,yScale:s}=e,l=new Array(i);let c,u,p,h;for(c=0,u=i;c<u;++c)p=c+o,h=n[p],l[c]={x:a.parse(h[0],p),y:s.parse(h[1],p)};return l}parseObjectData(e,n,o,i){const{xScale:a,yScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=new Array(i);let p,h,m,b;for(p=0,h=i;p<h;++p)m=p+o,b=n[m],u[p]={x:a.parse(tr(b,l),m),y:s.parse(tr(b,c),m)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,a=this._cachedMeta,s=n[e.axis],l={keys:Tg(i,!0),values:n._stacks[e.axis]._visualValues};return Mg(l,s,a.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const a=o[n.axis];let s=a===null?NaN:a;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,s=Mg(i,a,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&e===o.iScale,s=i.length,l=this._getOtherScale(e),c=KC(n,o,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:h}=GC(l);let m,b;function y(){b=i[m];const v=b[l.axis];return!ht(b[e.axis])||p>v||h<v}for(m=0;m<s&&!(!y()&&(this.updateRangeFromParsed(u,e,b,c),a));++m);if(a){for(m=s-1;m>=0;--m)if(!y()){this.updateRangeFromParsed(u,e,b,c);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,a,s;for(i=0,a=n.length;i<a;++i)s=n[i][e.axis],ht(s)&&o.push(s);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(e);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=UC(Ce(this.options.clip,HC(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||i.length-l,u=this.options.drawActiveElementsOnTop;let p;for(o.dataset&&o.dataset.draw(e,a,l,c),p=l;p<l+c;++p){const h=i[p];h.hidden||(h.active&&u?s.push(h):h.draw(e,a))}for(p=0;p<s.length;++p)s[p].draw(e,a)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];a=s.$context||(s.$context=qC(this.getContext(),e,s)),a.parsed=this.getParsed(e),a.raw=i.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=XC(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",a=this._cachedDataOpts,s=e+"-"+n,l=a[s],c=this.enableOptionSharing&&pa(o);if(l)return Hg(l,c);const u=this.chart.config,p=u.datasetElementScopeKeys(this._type,e),h=i?[`${e}Hover`,"hover",e,""]:[e,""],m=u.getOptionScopes(this.getDataset(),p),b=Object.keys(dt.elements[e]),y=()=>this.getContext(o,i,n),v=u.resolveNamedOptions(m,b,y,h);return v.$shared&&(v.$shared=c,a[s]=Object.freeze(Hg(v,c))),v}_resolveAnimations(e,n,o){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,l=a[s];if(l)return l;let c;if(i.options.animation!==!1){const p=this.chart.config,h=p.datasetAnimationScopeKeys(this._type,n),m=p.getOptionScopes(this.getDataset(),h);c=p.createResolver(m,this.getContext(e,o,n))}const u=new Rg(i,c&&c.animations);return c&&c._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||uu(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,a=this.getSharedOptions(o),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:s}}updateElement(e,n,o,i){uu(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!uu(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];const i=o.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,e):a<i&&this._removeElements(a,i-a)}_insertElements(e,n,o=!0){const i=this._cachedMeta,a=i.data,s=e+n;let l;const c=u=>{for(u.length+=n,l=u.length-1;l>=s;l--)u[l]=u[l-n]};for(c(a),l=e;l<s;++l)a[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(e,n),o&&this.updateElements(a,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&ka(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ie(jn,"defaults",{}),ie(jn,"datasetElementType",null),ie(jn,"dataElementType",null);function JC(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=ng(o.sort((i,a)=>i-a))}return t._cache.$bar}function YC(t){const e=t.iScale,n=JC(e,t.type);let o=e._length,i,a,s,l;const c=()=>{s===32767||s===-32768||(pa(l)&&(o=Math.min(o,Math.abs(s-l)||o)),l=s)};for(i=0,a=n.length;i<a;++i)s=e.getPixelForValue(n[i]),c();for(l=void 0,i=0,a=e.ticks.length;i<a;++i)s=e.getPixelForTick(i),c();return o}function ZC(t,e,n,o){const i=n.barThickness;let a,s;return Ve(i)?(a=e.min*n.categoryPercentage,s=n.barPercentage):(a=i*o,s=1),{chunk:a/o,ratio:s,start:e.pixels[t]-a/2}}function $C(t,e,n,o){const i=e.pixels,a=i[t];let s=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;s===null&&(s=a-(l===null?e.end-e.start:l-a)),l===null&&(l=a+a-s);const u=a-(a-Math.min(s,l))/2*c;return{chunk:Math.abs(l-s)/2*c/o,ratio:n.barPercentage,start:u}}function eA(t,e,n,o){const i=n.parse(t[0],o),a=n.parse(t[1],o),s=Math.min(i,a),l=Math.max(i,a);let c=s,u=l;Math.abs(s)>Math.abs(l)&&(c=l,u=s),e[n.axis]=u,e._custom={barStart:c,barEnd:u,start:i,end:a,min:s,max:l}}function Ug(t,e,n,o){return Ye(t)?eA(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Wg(t,e,n,o){const i=t.iScale,a=t.vScale,s=i.getLabels(),l=i===a,c=[];let u,p,h,m;for(u=n,p=n+o;u<p;++u)m=e[u],h={},h[i.axis]=l||i.parse(s[u],u),c.push(Ug(m,h,a,u));return c}function fu(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function tA(t,e,n){return t!==0?so(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function nA(t){let e,n,o,i,a;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:e,top:i,bottom:a}}function oA(t,e,n,o){let i=e.borderSkipped;const a={};if(!i){t.borderSkipped=a;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:l,reverse:c,top:u,bottom:p}=nA(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=u:(n._bottom||0)===o?i=p:(a[jg(p,s,l,c)]=!0,i=u)),a[jg(i,s,l,c)]=!0,t.borderSkipped=a}function jg(t,e,n,o){return o?(t=rA(t,e,n),t=Gg(t,n,e)):t=Gg(t,e,n),t}function rA(t,e,n){return t===e?n:t===n?e:t}function Gg(t,e,n){return t==="start"?e:t==="end"?n:t}function iA(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class nl extends jn{parsePrimitiveData(e,n,o,i){return Wg(e,n,o,i)}parseArrayData(e,n,o,i){return Wg(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:a,vScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=a.axis==="x"?l:c,p=s.axis==="x"?l:c,h=[];let m,b,y,v;for(m=o,b=o+i;m<b;++m)v=n[m],y={},y[a.axis]=a.parse(tr(v,u),m),h.push(Ug(tr(v,p),y,s,m));return h}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(e),s=a._custom,l=fu(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),u=l.isHorizontal(),p=this._getRuler(),{sharedOptions:h,includeOptions:m}=this._getSharedOptions(n,i);for(let b=n;b<n+o;b++){const y=this.getParsed(b),v=a||Ve(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(b),w=this._calculateBarIndexPixels(b,p),A=(y._stacks||{})[l.axis],I={horizontal:u,base:v.base,enableBorderRadius:!A||fu(y._custom)||s===A._top||s===A._bottom,x:u?v.head:w.center,y:u?w.center:v.head,height:u?w.size:Math.abs(v.size),width:u?Math.abs(v.size):w.size};m&&(I.options=h||this.resolveDataElementOptions(b,e[b].active?"active":i));const V=I.options||e[b].options;oA(I,V,A,s),iA(I,V,p.ratio),this.updateElement(e[b],b,I,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=o.options.stacked,s=[],l=c=>{const u=c.controller.getParsed(n),p=u&&u[c.vScale.axis];if(Ve(p)||isNaN(p))return!0};for(const c of i)if(!(n!==void 0&&l(c))&&((a===!1||s.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a<s;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const l=e.barThickness;return{min:l||YC(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:s}}=this,l=a||0,c=this.getParsed(e),u=c._custom,p=fu(u);let h=c[n.axis],m=0,b=o?this.applyStack(n,c,o):h,y,v;b!==h&&(m=b-h,b=h),p&&(h=u.barStart,b=u.barEnd-u.barStart,h!==0&&so(h)!==so(u.barEnd)&&(m=0),m+=h);const w=!Ve(a)&&!p?a:m;let A=n.getPixelForValue(w);if(this.chart.getDataVisibility(e)?y=n.getPixelForValue(m+b):y=A,v=y-A,Math.abs(v)<s){v=tA(v,n,l)*s,h===l&&(A-=v/2);const I=n.getPixelForDecimal(0),V=n.getPixelForDecimal(1),R=Math.min(I,V),E=Math.max(I,V);A=Math.max(Math.min(A,E),R),y=A+v,o&&!p&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(A))}if(A===n.getPixelForValue(l)){const I=so(v)*n.getLineWidthForValue(l)/2;A+=I,v-=I}return{size:v,base:A,head:y,center:y+v/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,a=i.skipNull,s=Ce(i.maxBarThickness,1/0);let l,c;if(n.grouped){const u=a?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?$C(e,n,i,u):ZC(e,n,i,u),h=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);l=p.start+p.chunk*h+p.chunk/2,c=Math.min(s,p.chunk*p.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),c=Math.min(s,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}ie(nl,"id","bar"),ie(nl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ie(nl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ol extends jn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const a=super.parsePrimitiveData(e,n,o,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+o).radius;return a}parseArrayData(e,n,o,i){const a=super.parseArrayData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Ce(l[2],this.resolveDataElementOptions(s+o).radius)}return a}parseObjectData(e,n,o,i){const a=super.parseObjectData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Ce(l&&l.r&&+l.r,this.resolveDataElementOptions(s+o).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y),u=s._custom;return{label:o[e]||"",value:"("+l+", "+c+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(n,i),p=s.axis,h=l.axis;for(let m=n;m<n+o;m++){const b=e[m],y=!a&&this.getParsed(m),v={},w=v[p]=a?s.getPixelForDecimal(.5):s.getPixelForValue(y[p]),A=v[h]=a?l.getBasePixel():l.getPixelForValue(y[h]);v.skip=isNaN(w)||isNaN(A),u&&(v.options=c||this.resolveDataElementOptions(m,b.active?"active":i),a&&(v.options.radius=0)),this.updateElement(b,m,v,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Ce(o&&o._custom,a),i}}ie(ol,"id","bubble"),ie(ol,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ie(ol,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function aA(t,e,n){let o=1,i=1,a=0,s=0;if(e<$e){const l=t,c=l+e,u=Math.cos(l),p=Math.sin(l),h=Math.cos(c),m=Math.sin(c),b=(V,R,E)=>ma(V,l,c,!0)?1:Math.max(R,R*n,E,E*n),y=(V,R,E)=>ma(V,l,c,!0)?-1:Math.min(R,R*n,E,E*n),v=b(0,u,h),w=b(gt,p,m),A=y(Ze,u,h),I=y(Ze+gt,p,m);o=(v-A)/2,i=(w-I)/2,a=-(v+A)/2,s=-(w+I)/2}return{ratioX:o,ratioY:i,offsetX:a,offsetY:s}}class Tr extends jn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let a=c=>+o[c];if(Re(o[e])){const{key:c="value"}=this._parsing;a=u=>+tr(o[u],c)}let s,l;for(s=e,l=e+n;s<l;++s)i._parsed[s]=a(s)}}_getRotation(){return Wn(this.options.rotation-90)}_getCircumference(){return Wn(this.options.circumference)}_getRotationExtents(){let e=$e,n=-$e;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,a=i._getRotation(),s=i._getCircumference();e=Math.min(e,a),n=Math.max(n,a+s)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-s)/2,0),c=Math.min(kS(this.options.cutout,l),1),u=this._getRingWeight(this.index),{circumference:p,rotation:h}=this._getRotationExtents(),{ratioX:m,ratioY:b,offsetX:y,offsetY:v}=aA(h,p,c),w=(o.width-s)/m,A=(o.height-s)/b,I=Math.max(Math.min(w,A)/2,0),V=Gm(this.options.radius,I),R=Math.max(V*c,0),E=(V-R)/this._getVisibleDatasetWeightTotal();this.offsetX=y*V,this.offsetY=v*V,i.total=this.calculateTotal(),this.outerRadius=V-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*u,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*a/$e)}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,l=s.chartArea,u=s.options.animation,p=(l.left+l.right)/2,h=(l.top+l.bottom)/2,m=a&&u.animateScale,b=m?0:this.innerRadius,y=m?0:this.outerRadius,{sharedOptions:v,includeOptions:w}=this._getSharedOptions(n,i);let A=this._getRotation(),I;for(I=0;I<n;++I)A+=this._circumference(I,a);for(I=n;I<n+o;++I){const V=this._circumference(I,a),R=e[I],E={x:p+this.offsetX,y:h+this.offsetY,startAngle:A,endAngle:A+V,circumference:V,outerRadius:y,innerRadius:b};w&&(E.options=v||this.resolveDataElementOptions(I,R.active?"active":i)),A+=V,this.updateElement(R,I,E,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const a=e._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(a))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?$e*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=ba(n._parsed[e],o.options.locale);return{label:i[e]||"",value:a}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,a,s,l,c;if(!e){for(i=0,a=o.data.datasets.length;i<a;++i)if(o.isDatasetVisible(i)){s=o.getDatasetMeta(i),e=s.data,l=s.controller;break}}if(!e)return 0;for(i=0,a=e.length;i<a;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const a=this.resolveDataElementOptions(o);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Ce(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ie(Tr,"id","doughnut"),ie(Tr,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),ie(Tr,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),ie(Tr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class rl extends jn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:l,count:c}=ig(n,i,s);this._drawStart=l,this._drawCount=c,ag(n)&&(l=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!s,options:u},e),this.updateElements(i,l,c,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,{sharedOptions:p,includeOptions:h}=this._getSharedOptions(n,i),m=s.axis,b=l.axis,{spanGaps:y,segment:v}=this.options,w=hi(y)?y:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||a||i==="none",I=n+o,V=e.length;let R=n>0&&this.getParsed(n-1);for(let E=0;E<V;++E){const T=e[E],B=A?T:{};if(E<n||E>=I){B.skip=!0;continue}const H=this.getParsed(E),_=Ve(H[b]),j=B[m]=s.getPixelForValue(H[m],E),Q=B[b]=a||_?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,H,c):H[b],E);B.skip=isNaN(j)||isNaN(Q)||_,B.stop=E>0&&Math.abs(H[m]-R[m])>w,v&&(B.parsed=H,B.raw=u.data[E]),h&&(B.options=p||this.resolveDataElementOptions(E,T.active?"active":i)),A||this.updateElement(T,E,B,i),R=H}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,a,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}ie(rl,"id","line"),ie(rl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ie(rl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class wa extends jn{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=ba(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:a}}parseObjectData(e,n,o,i){return wg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),s=Math.max(o.cutoutPercentage?a/100*o.cutoutPercentage:1,0),l=(a-s)/e.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,c=s.options.animation,u=this._cachedMeta.rScale,p=u.xCenter,h=u.yCenter,m=u.getIndexAngle(0)-.5*Ze;let b=m,y;const v=360/this.countVisibleElements();for(y=0;y<n;++y)b+=this._computeAngle(y,i,v);for(y=n;y<n+o;y++){const w=e[y];let A=b,I=b+this._computeAngle(y,i,v),V=s.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;b=I,a&&(c.animateScale&&(V=0),c.animateRotate&&(A=I=m));const R={x:p,y:h,innerRadius:0,outerRadius:V,startAngle:A,endAngle:I,options:this.resolveDataElementOptions(y,w.active?"active":i)};this.updateElement(w,y,R,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Wn(this.resolveDataElementOptions(e,n).angle||o):0}}ie(wa,"id","polarArea"),ie(wa,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ie(wa,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class pu extends Tr{}ie(pu,"id","pie"),ie(pu,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class il extends jn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return wg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(o.points=i,e!=="resize"){const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);const l={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let l=n;l<n+o;l++){const c=e[l],u=this.resolveDataElementOptions(l,c.active?"active":i),p=a.getPointPositionForValue(l,this.getParsed(l).r),h=s?a.xCenter:p.x,m=s?a.yCenter:p.y,b={x:h,y:m,angle:p.angle,skip:isNaN(h)||isNaN(m),options:u};this.updateElement(c,l,b,i)}}}ie(il,"id","radar"),ie(il,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ie(il,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class al extends jn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y);return{label:o[e]||"",value:"("+l+", "+c+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:s}=ig(n,o,i);if(this._drawStart=a,this._drawCount=s,ag(n)&&(a=0,s=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=o;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,a,s,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,p=this.resolveDataElementOptions(n,i),h=this.getSharedOptions(p),m=this.includeOptions(i,h),b=s.axis,y=l.axis,{spanGaps:v,segment:w}=this.options,A=hi(v)?v:Number.POSITIVE_INFINITY,I=this.chart._animationsDisabled||a||i==="none";let V=n>0&&this.getParsed(n-1);for(let R=n;R<n+o;++R){const E=e[R],T=this.getParsed(R),B=I?E:{},H=Ve(T[y]),_=B[b]=s.getPixelForValue(T[b],R),j=B[y]=a||H?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,T,c):T[y],R);B.skip=isNaN(_)||isNaN(j)||H,B.stop=R>0&&Math.abs(T[b]-V[b])>A,w&&(B.parsed=T,B.raw=u.data[R]),m&&(B.options=h||this.resolveDataElementOptions(R,E.active?"active":i)),I||this.updateElement(E,R,B,i),V=T}this.updateSharedOptions(h,i,p)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}}ie(al,"id","scatter"),ie(al,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),ie(al,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var sA=Object.freeze({__proto__:null,BarController:nl,BubbleController:ol,DoughnutController:Tr,LineController:rl,PieController:pu,PolarAreaController:wa,RadarController:il,ScatterController:al});function Mr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hu{constructor(e){ie(this,"options");this.options=e||{}}static override(e){Object.assign(hu.prototype,e)}init(){}formats(){return Mr()}parse(){return Mr()}format(){return Mr()}add(){return Mr()}diff(){return Mr()}startOf(){return Mr()}endOf(){return Mr()}}var lA={_date:hu};function dA(t,e,n,o){const{controller:i,data:a,_sorted:s}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&s&&a.length){const c=l._reversePixels?NS:xo;if(o){if(i._sharedOptions){const u=a[0],p=typeof u.getRange=="function"&&u.getRange(e);if(p){const h=c(a,e,n-p),m=c(a,e,n+p);return{lo:h.lo,hi:m.hi}}}}else return c(a,e,n)}return{lo:0,hi:a.length-1}}function xa(t,e,n,o,i){const a=t.getSortedVisibleDatasetMetas(),s=n[e];for(let l=0,c=a.length;l<c;++l){const{index:u,data:p}=a[l],{lo:h,hi:m}=dA(a[l],e,s,i);for(let b=h;b<=m;++b){const y=p[b];y.skip||o(y,u,b)}}}function cA(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const a=e?Math.abs(o.x-i.x):0,s=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function mu(t,e,n,o,i){const a=[];return!i&&!t.isPointInArea(e)||xa(t,n,e,function(l,c,u){!i&&!So(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&a.push({element:l,datasetIndex:c,index:u})},!0),a}function uA(t,e,n,o){let i=[];function a(s,l,c){const{startAngle:u,endAngle:p}=s.getProps(["startAngle","endAngle"],o),{angle:h}=$m(s,{x:e.x,y:e.y});ma(h,u,p)&&i.push({element:s,datasetIndex:l,index:c})}return xa(t,n,e,a),i}function fA(t,e,n,o,i,a){let s=[];const l=cA(n);let c=Number.POSITIVE_INFINITY;function u(p,h,m){const b=p.inRange(e.x,e.y,i);if(o&&!b)return;const y=p.getCenterPoint(i);if(!(!!a||t.isPointInArea(y))&&!b)return;const w=l(e,y);w<c?(s=[{element:p,datasetIndex:h,index:m}],c=w):w===c&&s.push({element:p,datasetIndex:h,index:m})}return xa(t,n,e,u),s}function gu(t,e,n,o,i,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!o?uA(t,e,n,i):fA(t,e,n,o,i,a)}function Qg(t,e,n,o,i){const a=[],s=n==="x"?"inXRange":"inYRange";let l=!1;return xa(t,n,e,(c,u,p)=>{c[s](e[n],i)&&(a.push({element:c,datasetIndex:u,index:p}),l=l||c.inRange(e.x,e.y,i))}),o&&!l?[]:a}var pA={evaluateInteractionItems:xa,modes:{index(t,e,n,o){const i=Rr(e,t),a=n.axis||"x",s=n.includeInvisible||!1,l=n.intersect?mu(t,i,a,o,s):gu(t,i,a,!1,o,s),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const p=l[0].index,h=u.data[p];h&&!h.skip&&c.push({element:h,datasetIndex:u.index,index:p})}),c):[]},dataset(t,e,n,o){const i=Rr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;let l=n.intersect?mu(t,i,a,o,s):gu(t,i,a,!1,o,s);if(l.length>0){const c=l[0].datasetIndex,u=t.getDatasetMeta(c).data;l=[];for(let p=0;p<u.length;++p)l.push({element:u[p],datasetIndex:c,index:p})}return l},point(t,e,n,o){const i=Rr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return mu(t,i,a,o,s)},nearest(t,e,n,o){const i=Rr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return gu(t,i,a,n.intersect,o,s)},x(t,e,n,o){const i=Rr(e,t);return Qg(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Rr(e,t);return Qg(t,i,"y",n.intersect,o)}}};const Xg=["left","top","right","bottom"];function Sa(t,e){return t.filter(n=>n.pos===e)}function qg(t,e){return t.filter(n=>Xg.indexOf(n.pos)===-1&&n.box.axis===e)}function Ca(t,e){return t.sort((n,o)=>{const i=e?o:n,a=e?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function hA(t){const e=[];let n,o,i,a,s,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:a,options:{stack:s,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:l});return e}function mA(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!Xg.includes(i))continue;const s=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}function gA(t,e){const n=mA(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let a,s,l;for(a=0,s=t.length;a<s;++a){l=t[a];const{fullSize:c}=l.box,u=n[l.stack],p=u&&l.stackWeight/u.weight;l.horizontal?(l.width=p?p*o:c&&e.availableWidth,l.height=i):(l.width=o,l.height=p?p*i:c&&e.availableHeight)}return n}function bA(t){const e=hA(t),n=Ca(e.filter(u=>u.box.fullSize),!0),o=Ca(Sa(e,"left"),!0),i=Ca(Sa(e,"right")),a=Ca(Sa(e,"top"),!0),s=Ca(Sa(e,"bottom")),l=qg(e,"x"),c=qg(e,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(c).concat(s).concat(l),chartArea:Sa(e,"chartArea"),vertical:o.concat(i).concat(c),horizontal:a.concat(s).concat(l)}}function Kg(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function Jg(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function yA(t,e,n,o){const{pos:i,box:a}=n,s=t.maxPadding;if(!Re(i)){n.size&&(t[i]-=n.size);const h=o[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?a.height:a.width),n.size=h.size/h.count,t[i]+=n.size}a.getPadding&&Jg(s,a.getPadding());const l=Math.max(0,e.outerWidth-Kg(s,t,"left","right")),c=Math.max(0,e.outerHeight-Kg(s,t,"top","bottom")),u=l!==t.w,p=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:p}:{same:p,other:u}}function vA(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function kA(t,e){const n=e.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(e[s],n[s])}),a}return o(t?["left","right"]:["top","bottom"])}function Aa(t,e,n,o){const i=[];let a,s,l,c,u,p;for(a=0,s=t.length,u=0;a<s;++a){l=t[a],c=l.box,c.update(l.width||e.w,l.height||e.h,kA(l.horizontal,e));const{same:h,other:m}=yA(e,n,l,o);u|=h&&i.length,p=p||m,c.fullSize||i.push(l)}return u&&Aa(i,e,n,o)||p}function sl(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function Yg(t,e,n,o){const i=n.padding;let{x:a,y:s}=e;for(const l of t){const c=l.box,u=o[l.stack]||{count:1,placed:0,weight:1},p=l.stackWeight/u.weight||1;if(l.horizontal){const h=e.w*p,m=u.size||c.height;pa(u.start)&&(s=u.start),c.fullSize?sl(c,i.left,s,n.outerWidth-i.right-i.left,m):sl(c,e.left+u.placed,s,h,m),u.start=s,u.placed+=h,s=c.bottom}else{const h=e.h*p,m=u.size||c.width;pa(u.start)&&(a=u.start),c.fullSize?sl(c,a,i.top,m,n.outerHeight-i.bottom-i.top):sl(c,a,e.top+u.placed,m,h),u.start=a,u.placed+=h,a=c.right}}e.x=a,e.y=s}var _t={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=Ft(t.options.layout.padding),a=Math.max(e-i.width,0),s=Math.max(n-i.height,0),l=bA(t.boxes),c=l.vertical,u=l.horizontal;We(t.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const p=c.reduce((v,w)=>w.box.options&&w.box.options.display===!1?v:v+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/p,hBoxMaxHeight:s/2}),m=Object.assign({},i);Jg(m,Ft(o));const b=Object.assign({maxPadding:m,w:a,h:s,x:i.left,y:i.top},i),y=gA(c.concat(u),h);Aa(l.fullSize,b,h,y),Aa(c,b,h,y),Aa(u,b,h,y)&&Aa(c,b,h,y),vA(b),Yg(l.leftAndTop,b,h,y),b.x+=b.w,b.y+=b.h,Yg(l.rightAndBottom,b,h,y),t.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},We(l.chartArea,v=>{const w=v.box;Object.assign(w,t.chartArea),w.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class Zg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class wA extends Zg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ll="$chartjs",xA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$g=t=>t===null||t==="";function SA(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[ll]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",$g(i)){const a=Cg(t,"width");a!==void 0&&(t.width=a)}if($g(o))if(t.style.height==="")t.height=t.width/(e||2);else{const a=Cg(t,"height");a!==void 0&&(t.height=a)}return t}const e0=AC?{passive:!0}:!1;function CA(t,e,n){t&&t.addEventListener(e,n,e0)}function AA(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,e0)}function DA(t,e){const n=xA[t.type]||t.type,{x:o,y:i}=Rr(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function dl(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function EA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||dl(l.addedNodes,o),s=s&&!dl(l.removedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function BA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||dl(l.removedNodes,o),s=s&&!dl(l.addedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Da=new Map;let t0=0;function n0(){const t=window.devicePixelRatio;t!==t0&&(t0=t,Da.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function PA(t,e){Da.size||window.addEventListener("resize",n0),Da.set(t,e)}function OA(t){Da.delete(t),Da.size||window.removeEventListener("resize",n0)}function IA(t,e,n){const o=t.canvas,i=o&&du(o);if(!i)return;const a=rg((l,c)=>{const u=i.clientWidth;n(l,c),u<i.clientWidth&&n()},window),s=new ResizeObserver(l=>{const c=l[0],u=c.contentRect.width,p=c.contentRect.height;u===0&&p===0||a(u,p)});return s.observe(i),PA(t,a),s}function bu(t,e,n){n&&n.disconnect(),e==="resize"&&OA(t)}function NA(t,e,n){const o=t.canvas,i=rg(a=>{t.ctx!==null&&n(DA(a,t))},t);return CA(o,e,i),i}class VA extends Zg{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(SA(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[ll])return!1;const o=n[ll].initial;["height","width"].forEach(a=>{const s=o[a];Ve(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[ll],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),s={attach:EA,detach:BA,resize:IA}[n]||NA;i[n]=s(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:bu,detach:bu,resize:bu}[n]||AA)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return CC(e,n,o,i)}isAttached(e){const n=e&&du(e);return!!(n&&n.isConnected)}}function RA(t){return!lu()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?wA:VA}let Ao=(id=class{constructor(){ie(this,"x");ie(this,"y");ie(this,"active",!1);ie(this,"options");ie(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return hi(this.x)&&hi(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}},ie(id,"defaults",{}),ie(id,"defaultRoutes"),id);function FA(t,e){const n=t.options.ticks,o=TA(t),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?LA(e):[],s=a.length,l=a[0],c=a[s-1],u=[];if(s>i)return zA(e,u,a,s/i),u;const p=MA(a,e,i);if(s>0){let h,m;const b=s>1?Math.round((c-l)/(s-1)):null;for(cl(e,u,p,Ve(b)?0:l-b,l),h=0,m=s-1;h<m;h++)cl(e,u,p,a[h],a[h+1]);return cl(e,u,p,c,Ve(b)?e.length:c+b),u}return cl(e,u,p),u}function TA(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function MA(t,e,n){const o=_A(t),i=e.length/n;if(!o)return Math.max(i,1);const a=BS(o);for(let s=0,l=a.length-1;s<l;s++){const c=a[s];if(c>i)return c}return Math.max(i,1)}function LA(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function zA(t,e,n,o){let i=0,a=n[0],s;for(o=Math.ceil(o),s=0;s<t.length;s++)s===a&&(e.push(t[s]),i++,a=n[i*o])}function cl(t,e,n,o,i){const a=Ce(o,0),s=Math.min(Ce(i,t.length),t.length);let l=0,c,u,p;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),p=a;p<0;)l++,p=Math.round(a+l*n);for(u=Math.max(a,0);u<s;u++)u===p&&(e.push(t[u]),l++,p=Math.round(a+l*n))}function _A(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const HA=t=>t==="left"?"right":t==="right"?"left":t,o0=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,r0=(t,e)=>Math.min(e||t,t);function i0(t,e){const n=[],o=t.length/e,i=t.length;let a=0;for(;a<i;a+=o)n.push(t[Math.floor(a)]);return n}function UA(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),a=t._startPixel,s=t._endPixel,l=1e-6;let c=t.getPixelForTick(i),u;if(!(n&&(o===1?u=Math.max(c-a,s-c):e===0?u=(t.getPixelForTick(1)-c)/2:u=(c-t.getPixelForTick(i-1))/2,c+=i<e?u:-u,c<a-l||c>s+l)))return c}function WA(t,e){We(t,n=>{const o=n.gc,i=o.length/2;let a;if(i>e){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function Ea(t){return t.drawTicks?t.tickLength:0}function a0(t,e){if(!t.display)return 0;const n=wt(t.font,e),o=Ft(t.padding);return(Ye(t.text)?t.text.length:1)*n.lineHeight+o.height}function jA(t,e){return rr(t,{scale:e,type:"scale"})}function GA(t,e,n){return rr(t,{tick:n,index:e,type:"tick"})}function QA(t,e,n){let o=Zc(t);return(n&&e!=="right"||!n&&e==="right")&&(o=HA(o)),o}function XA(t,e,n,o){const{top:i,left:a,bottom:s,right:l,chart:c}=t,{chartArea:u,scales:p}=c;let h=0,m,b,y;const v=s-i,w=l-a;if(t.isHorizontal()){if(b=zt(o,a,l),Re(n)){const A=Object.keys(n)[0],I=n[A];y=p[A].getPixelForValue(I)+v-e}else n==="center"?y=(u.bottom+u.top)/2+v-e:y=o0(t,n,e);m=l-a}else{if(Re(n)){const A=Object.keys(n)[0],I=n[A];b=p[A].getPixelForValue(I)-w+e}else n==="center"?b=(u.left+u.right)/2-w+e:b=o0(t,n,e);y=zt(o,s,i),h=n==="left"?-gt:gt}return{titleX:b,titleY:y,maxWidth:m,rotation:h}}class Lr extends Ao{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=gn(e,Number.POSITIVE_INFINITY),n=gn(n,Number.NEGATIVE_INFINITY),o=gn(o,Number.POSITIVE_INFINITY),i=gn(i,Number.NEGATIVE_INFINITY),{min:gn(e,o),max:gn(n,i),minDefined:ht(e),maxDefined:ht(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let c=0,u=l.length;c<u;++c)s=l[c].controller.getMinMax(this,e),i||(n=Math.min(n,s.min)),a||(o=Math.max(o,s.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:gn(n,gn(o,n)),max:gn(o,gn(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Qe(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:a,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nC(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?i0(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=FA(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Qe(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o],a.label=Qe(n.callback,[a.value,o,e],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=r0(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let s=i,l,c,u;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),h=p.widest.width,m=p.highest.height,b=Bt(this.chart.width-h,0,this.maxWidth);l=e.offset?this.maxWidth/o:b/(o-1),h+6>l&&(l=b/(o-(e.offset?.5:1)),c=this.maxHeight-Ea(e.grid)-n.padding-a0(e.title,this.chart.options.font),u=Math.sqrt(h*h+m*m),s=Kc(Math.min(Math.asin(Bt((p.highest.height+6)/l,-1,1)),Math.asin(Bt(c/u,-1,1))-Math.asin(Bt(m/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const c=a0(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=Ea(a)+c):(e.height=this.maxHeight,e.width=Ea(a)+c),o.display&&this.ticks.length){const{first:u,last:p,widest:h,highest:m}=this._getLabelSizes(),b=o.padding*2,y=Wn(this.labelRotation),v=Math.cos(y),w=Math.sin(y);if(l){const A=o.mirror?0:w*h.width+v*m.height;e.height=Math.min(this.maxHeight,e.height+A+b)}else{const A=o.mirror?0:v*h.width+w*m.height;e.width=Math.min(this.maxWidth,e.width+A+b)}this._calculatePadding(u,p,w,v)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:a,padding:s},position:l}=this.options,c=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,b=0;c?u?(m=i*e.width,b=o*n.height):(m=o*e.height,b=i*n.width):a==="start"?b=n.width:a==="end"?m=e.width:a!=="inner"&&(m=e.width/2,b=n.width/2),this.paddingLeft=Math.max((m-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-h+s)*this.width/(this.width-h),0)}else{let p=n.height/2,h=e.height/2;a==="start"?(p=0,h=e.height):a==="end"&&(p=n.height,h=0),this.paddingTop=p+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)Ve(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=i0(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:a}=this,s=[],l=[],c=Math.floor(n/r0(n,o));let u=0,p=0,h,m,b,y,v,w,A,I,V,R,E;for(h=0;h<n;h+=c){if(y=e[h].label,v=this._resolveTickFontOptions(h),i.font=w=v.string,A=a[w]=a[w]||{data:{},gc:[]},I=v.lineHeight,V=R=0,!Ve(y)&&!Ye(y))V=Ks(i,A.data,A.gc,V,y),R=I;else if(Ye(y))for(m=0,b=y.length;m<b;++m)E=y[m],!Ve(E)&&!Ye(E)&&(V=Ks(i,A.data,A.gc,V,E),R+=I);s.push(V),l.push(R),u=Math.max(V,u),p=Math.max(R,p)}WA(a,n);const T=s.indexOf(u),B=l.indexOf(p),H=_=>({width:s[_]||0,height:l[_]||0});return{first:H(0),last:H(n-1),widest:H(T),highest:H(B),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return IS(this._alignToPixels?Or(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=GA(this.getContext(),e,o))}return this.$context||(this.$context=jA(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Wn(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=e.autoSkipPadding||0,l=a?a.widest.width+s:0,c=a?a.highest.height+s:0;return this.isHorizontal()?c*o>l*i?l/o:c/i:c*i<l*o?c/o:l/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:s,border:l}=i,c=a.offset,u=this.isHorizontal(),h=this.ticks.length+(c?1:0),m=Ea(a),b=[],y=l.setContext(this.getContext()),v=y.display?y.width:0,w=v/2,A=function(C){return Or(o,C,v)};let I,V,R,E,T,B,H,_,j,Q,F,S;if(s==="top")I=A(this.bottom),B=this.bottom-m,_=I-w,Q=A(e.top)+w,S=e.bottom;else if(s==="bottom")I=A(this.top),Q=e.top,S=A(e.bottom)-w,B=I+w,_=this.top+m;else if(s==="left")I=A(this.right),T=this.right-m,H=I-w,j=A(e.left)+w,F=e.right;else if(s==="right")I=A(this.left),j=e.left,F=A(e.right)-w,T=I+w,H=this.left+m;else if(n==="x"){if(s==="center")I=A((e.top+e.bottom)/2+.5);else if(Re(s)){const C=Object.keys(s)[0],M=s[C];I=A(this.chart.scales[C].getPixelForValue(M))}Q=e.top,S=e.bottom,B=I+w,_=B+m}else if(n==="y"){if(s==="center")I=A((e.left+e.right)/2);else if(Re(s)){const C=Object.keys(s)[0],M=s[C];I=A(this.chart.scales[C].getPixelForValue(M))}T=I-w,H=T-m,j=e.left,F=e.right}const x=Ce(i.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/x));for(V=0;V<h;V+=P){const C=this.getContext(V),M=a.setContext(C),L=l.setContext(C),K=M.lineWidth,oe=M.color,le=L.dash||[],Z=L.dashOffset,ae=M.tickWidth,fe=M.tickColor,he=M.tickBorderDash||[],Ie=M.tickBorderDashOffset;R=UA(this,V,c),R!==void 0&&(E=Or(o,R,K),u?T=H=j=F=E:B=_=Q=S=E,b.push({tx1:T,ty1:B,tx2:H,ty2:_,x1:j,y1:Q,x2:F,y2:S,width:K,color:oe,borderDash:le,borderDashOffset:Z,tickWidth:ae,tickColor:fe,tickBorderDash:he,tickBorderDashOffset:Ie}))}return this._ticksLength=h,this._borderValue=I,b}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:a}=o,s=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:u,padding:p,mirror:h}=a,m=Ea(o.grid),b=m+p,y=h?-p:b,v=-Wn(this.labelRotation),w=[];let A,I,V,R,E,T,B,H,_,j,Q,F,S="middle";if(i==="top")T=this.bottom-y,B=this._getXAxisLabelAlignment();else if(i==="bottom")T=this.top+y,B=this._getXAxisLabelAlignment();else if(i==="left"){const P=this._getYAxisLabelAlignment(m);B=P.textAlign,E=P.x}else if(i==="right"){const P=this._getYAxisLabelAlignment(m);B=P.textAlign,E=P.x}else if(n==="x"){if(i==="center")T=(e.top+e.bottom)/2+b;else if(Re(i)){const P=Object.keys(i)[0],C=i[P];T=this.chart.scales[P].getPixelForValue(C)+b}B=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")E=(e.left+e.right)/2-b;else if(Re(i)){const P=Object.keys(i)[0],C=i[P];E=this.chart.scales[P].getPixelForValue(C)}B=this._getYAxisLabelAlignment(m).textAlign}n==="y"&&(c==="start"?S="top":c==="end"&&(S="bottom"));const x=this._getLabelSizes();for(A=0,I=l.length;A<I;++A){V=l[A],R=V.label;const P=a.setContext(this.getContext(A));H=this.getPixelForTick(A)+a.labelOffset,_=this._resolveTickFontOptions(A),j=_.lineHeight,Q=Ye(R)?R.length:1;const C=Q/2,M=P.color,L=P.textStrokeColor,K=P.textStrokeWidth;let oe=B;s?(E=H,B==="inner"&&(A===I-1?oe=this.options.reverse?"left":"right":A===0?oe=this.options.reverse?"right":"left":oe="center"),i==="top"?u==="near"||v!==0?F=-Q*j+j/2:u==="center"?F=-x.highest.height/2-C*j+j:F=-x.highest.height+j/2:u==="near"||v!==0?F=j/2:u==="center"?F=x.highest.height/2-C*j:F=x.highest.height-Q*j,h&&(F*=-1),v!==0&&!P.showLabelBackdrop&&(E+=j/2*Math.sin(v))):(T=H,F=(1-Q)*j/2);let le;if(P.showLabelBackdrop){const Z=Ft(P.backdropPadding),ae=x.heights[A],fe=x.widths[A];let he=F-Z.top,Ie=0-Z.left;switch(S){case"middle":he-=ae/2;break;case"bottom":he-=ae;break}switch(B){case"center":Ie-=fe/2;break;case"right":Ie-=fe;break;case"inner":A===I-1?Ie-=fe:A>0&&(Ie-=fe/2);break}le={left:Ie,top:he,width:fe+Z.width,height:ae+Z.height,color:P.backdropColor}}w.push({label:R,font:_,textOffset:F,options:{rotation:v,color:M,strokeColor:L,strokeWidth:K,textAlign:oe,textBaseline:S,translation:[E,T],backdrop:le}})}return w}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Wn(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),l=e+a,c=s.widest.width;let u,p;return n==="left"?i?(p=this.right+a,o==="near"?u="left":o==="center"?(u="center",p+=c/2):(u="right",p+=c)):(p=this.right-l,o==="near"?u="right":o==="center"?(u="center",p-=c/2):(u="left",p=this.left)):n==="right"?i?(p=this.left+a,o==="near"?u="right":o==="center"?(u="center",p-=c/2):(u="left",p-=c)):(p=this.left+l,o==="near"?u="left":o==="center"?(u="center",p+=c/2):(u="right",p=this.right)):u="right",{textAlign:u,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:a,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,a,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,s;const l=(c,u,p)=>{!p.width||!p.color||(o.save(),o.lineWidth=p.width,o.strokeStyle=p.color,o.setLineDash(p.borderDash||[]),o.lineDashOffset=p.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(u.x,u.y),o.stroke(),o.restore())};if(n.display)for(a=0,s=i.length;a<s;++a){const c=i[a];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),s=o.display?a.width:0;if(!s)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let u,p,h,m;this.isHorizontal()?(u=Or(e,this.left,s)-s/2,p=Or(e,this.right,l)+l/2,h=m=c):(h=Or(e,this.top,s)-s/2,m=Or(e,this.bottom,l)+l/2,u=p=c),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,h),n.lineTo(p,m),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Js(o,i);const a=this.getLabelItems(e);for(const s of a){const l=s.options,c=s.font,u=s.label,p=s.textOffset;Ir(o,u,0,p,c,l)}i&&Ys(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=wt(o.font),s=Ft(o.padding),l=o.align;let c=a.lineHeight/2;n==="bottom"||n==="center"||Re(n)?(c+=s.bottom,Ye(o.text)&&(c+=a.lineHeight*(o.text.length-1))):c+=s.top;const{titleX:u,titleY:p,maxWidth:h,rotation:m}=XA(this,c,n,l);Ir(e,o.text,0,0,a,{color:o.color,maxWidth:h,rotation:m,textAlign:QA(l,n,i),textBaseline:"middle",translation:[u,p]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Ce(e.grid&&e.grid.z,-1),i=Ce(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Lr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a<s;++a){const l=n[a];l[o]===this.id&&(!e||l.type===e)&&i.push(l)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return wt(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ul{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;JA(n)&&(o=this.register(n));const i=this.items,a=e.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in i||(i[a]=e,qA(e,s,o),this.override&&dt.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in dt[i]&&(delete dt[i][o],this.override&&delete Pr[o])}}function qA(t,e,n){const o=ao(Object.create(null),[n?dt.get(n):{},dt.get(e),t.defaults]);dt.set(e,o),t.defaultRoutes&&KA(e,t.defaultRoutes),t.descriptors&&dt.describe(e,t.descriptors)}function KA(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),a=[t].concat(o).join("."),s=e[n].split("."),l=s.pop(),c=s.join(".");dt.route(a,i,c,l)})}function JA(t){return"id"in t&&"defaults"in t}class YA{constructor(){this.controllers=new ul(jn,"datasets",!0),this.elements=new ul(Ao,"elements"),this.plugins=new ul(Object,"plugins"),this.scales=new ul(Lr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(e,a,i):We(i,s=>{const l=o||this._getRegistryForType(s);this._exec(e,l,s)})})}_exec(e,n,o){const i=qc(e);Qe(o["before"+i],[],o),n[e](o),Qe(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var lo=new YA;class ZA{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=i?this._descriptors(e).filter(i):this._descriptors(e),s=this._notify(a,e,n,o);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,o,i){i=i||{};for(const a of e){const s=a.plugin,l=s[o],c=[n,i,a.options];if(Qe(l,c,s)===!1&&i.cancelable)return!1}return!0}invalidate(){Ve(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Ce(o.options&&o.options.plugins,{}),a=$A(o);return i===!1&&!n?[]:t8(e,a,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(a,s)=>a.filter(l=>!s.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function $A(t){const e={},n=[],o=Object.keys(lo.plugins.items);for(let a=0;a<o.length;a++)n.push(lo.getPlugin(o[a]));const i=t.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function e8(t,e){return!e&&t===!1?null:t===!0?{}:t}function t8(t,{plugins:e,localIds:n},o,i){const a=[],s=t.getContext();for(const l of e){const c=l.id,u=e8(o[c],i);u!==null&&a.push({plugin:l,options:n8(t.config,{plugin:l,local:n[c]},u,s)})}return a}function n8(t,{plugin:e,local:n},o,i){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(o,a);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yu(t,e){const n=dt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function o8(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function r8(t,e){return t===e?"_index_":"_value_"}function s0(t){if(t==="x"||t==="y"||t==="r")return t}function i8(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function vu(t,...e){if(s0(t))return t;for(const n of e){const o=n.axis||i8(n.position)||t.length>1&&s0(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function l0(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function a8(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return l0(t,"x",n[0])||l0(t,"y",n[0])}return{}}function s8(t,e){const n=Pr[t.type]||{scales:{}},o=e.scales||{},i=yu(t.type,e),a=Object.create(null);return Object.keys(o).forEach(s=>{const l=o[s];if(!Re(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const c=vu(s,l,a8(s,t),dt.scales[l.type]),u=r8(c,i),p=n.scales||{};a[s]=fa(Object.create(null),[{axis:c},l,p[c],p[u]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,c=s.indexAxis||yu(l,e),p=(Pr[l]||{}).scales||{};Object.keys(p).forEach(h=>{const m=o8(h,c),b=s[m+"AxisID"]||m;a[b]=a[b]||Object.create(null),fa(a[b],[{axis:m},o[b],p[h]])})}),Object.keys(a).forEach(s=>{const l=a[s];fa(l,[dt.scales[l.type],dt.scale])}),a}function d0(t){const e=t.options||(t.options={});e.plugins=Ce(e.plugins,{}),e.scales=s8(t,e)}function c0(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function l8(t){return t=t||{},t.data=c0(t.data),d0(t),t}const u0=new Map,f0=new Set;function fl(t,e){let n=u0.get(t);return n||(n=e(),u0.set(t,n),f0.add(n)),n}const Ba=(t,e,n)=>{const o=tr(e,n);o!==void 0&&t.add(o)};class d8{constructor(e){this._config=l8(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=c0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),d0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return fl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return fl(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return fl(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return fl(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:a}=this,s=this._cachedScopes(e,o),l=s.get(n);if(l)return l;const c=new Set;n.forEach(p=>{e&&(c.add(e),p.forEach(h=>Ba(c,e,h))),p.forEach(h=>Ba(c,i,h)),p.forEach(h=>Ba(c,Pr[a]||{},h)),p.forEach(h=>Ba(c,dt,h)),p.forEach(h=>Ba(c,tu,h))});const u=Array.from(c);return u.length===0&&u.push(Object.create(null)),f0.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Pr[n]||{},dt.datasets[n]||{},{type:n},dt,tu]}resolveNamedOptions(e,n,o,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:l}=p0(this._resolverCache,e,i);let c=s;if(u8(s,n)){a.$shared=!1,o=nr(o)?o():o;const u=this.createResolver(e,o,l);c=mi(s,o,u)}for(const u of n)a[u]=c[u];return a}createResolver(e,n,o=[""],i){const{resolver:a}=p0(this._resolverCache,e,o);return Re(n)?mi(a,n,void 0,i):a}}function p0(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let a=o.get(i);return a||(a={resolver:iu(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,a)),a}const c8=t=>Re(t)&&Object.getOwnPropertyNames(t).some(e=>nr(t[e]));function u8(t,e){const{isScriptable:n,isIndexable:o}=mg(t);for(const i of e){const a=n(i),s=o(i),l=(s||a)&&t[i];if(a&&(nr(l)||c8(l))||s&&Ye(l))return!0}return!1}var f8="4.4.3";const p8=["top","bottom","left","right","chartArea"];function h0(t,e){return t==="top"||t==="bottom"||p8.indexOf(t)===-1&&e==="x"}function m0(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function g0(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[t],e)}function h8(t){const e=t.chart,n=e.options.animation;Qe(n&&n.onProgress,[t],e)}function b0(t){return lu()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const pl={},y0=t=>{const e=b0(t);return Object.values(pl).filter(n=>n.canvas===e).pop()};function m8(t,e,n){const o=Object.keys(t);for(const i of o){const a=+i;if(a>=e){const s=t[i];delete t[i],(n>0||a>e)&&(t[a+n]=s)}}}function g8(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function hl(t,e,n){return t.options.clip?t[n]:e[n]}function b8(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:hl(n,e,"left"),right:hl(n,e,"right"),top:hl(o,e,"top"),bottom:hl(o,e,"bottom")}:e}class Zt{static register(...e){lo.add(...e),v0()}static unregister(...e){lo.remove(...e),v0()}constructor(e,n){const o=this.config=new d8(n),i=b0(e),a=y0(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||RA(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,s.aspectRatio),c=l&&l.canvas,u=c&&c.height,p=c&&c.width;if(this.id=vS(),this.ctx=l,this.canvas=c,this.width=p,this.height=u,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ZA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=FS(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],pl[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Co.listen(this,"complete",g0),Co.listen(this,"progress",h8),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return Ve(e)?n&&a?a:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return lo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Sg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fg(this.canvas,this.ctx),this}stop(){return Co.stop(this),this}resize(e,n){Co.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,a),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Sg(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),Qe(o.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};We(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((s,l)=>(s[l]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const l=n[s],c=vu(s,l),u=c==="r",p=c==="x";return{options:l,dposition:u?"chartArea":p?"bottom":"left",dtype:u?"radialLinear":p?"category":"linear"}}))),We(a,s=>{const l=s.options,c=l.id,u=vu(c,l),p=Ce(l.type,s.dtype);(l.position===void 0||h0(l.position,u)!==h0(s.dposition))&&(l.position=s.dposition),i[c]=!0;let h=null;if(c in o&&o[c].type===p)h=o[c];else{const m=lo.getScale(p);h=new m({id:c,type:p,ctx:this.ctx,chart:this}),o[h.id]=h}h.init(l,e)}),We(i,(s,l)=>{s||delete o[l]}),We(o,s=>{_t.configure(this,s,s.options),_t.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(m0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let s=this.getDatasetMeta(o);const l=a.type||this.config.type;if(s.type&&s.type!==l&&(this._destroyDatasetMeta(o),s=this.getDatasetMeta(o)),s.type=l,s.indexAxis=a.indexAxis||yu(l,this.options),s.order=a.order||0,s.index=o,s.label=""+a.label,s.visible=this.isDatasetVisible(o),s.controller)s.controller.updateIndex(o),s.controller.linkScales();else{const c=lo.getController(l),{datasetElementType:u,dataElementType:p}=dt.datasets[l];Object.assign(c,{dataElementType:lo.getElement(p),datasetElementType:u&&lo.getElement(u)}),s.controller=new c(this,o),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){We(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,p=this.data.datasets.length;u<p;u++){const{controller:h}=this.getDatasetMeta(u),m=!i&&a.indexOf(h)===-1;h.buildOrUpdateElements(m),s=Math.max(+h.getMaxOverflow(),s)}s=this._minPadding=o.layout.autoPadding?s:0,this._updateLayout(s),i||We(a,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(m0("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){We(this.scales,e=>{_t.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!qm(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const s=o==="_removeElements"?-a:a;m8(e,i,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(e.filter(s=>s[0]===a).map((s,l)=>l+","+s.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!qm(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;_t.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],We(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,nr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Co.has(this)?this.attached&&!Co.running(this)&&Co.start(this):(this.draw(),g0({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const s=n[i];(!e||s.visible)&&o.push(s)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,a=b8(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Js(n,{left:o.left===!1?0:a.left-o.left,right:o.right===!1?this.width:a.right+o.right,top:o.top===!1?0:a.top-o.top,bottom:o.bottom===!1?this.height:a.bottom+o.bottom}),e.controller.draw(),i&&Ys(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return So(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const a=pA.modes[n];return typeof a=="function"?a(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=rr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(e),s=a.controller._resolveAnimations(void 0,i);pa(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),s.update(a,{visible:o}),this.update(l=>l.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Co.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),fg(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete pl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(a,s)=>{n.addEventListener(this,a,s),e[a]=s},i=(a,s,l)=>{a.offsetX=s,a.offsetY=l,this._eventHandler(a)};We(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(c,u)=>{n.addEventListener(this,c,u),e[c]=u},i=(c,u)=>{e[c]&&(n.removeEventListener(this,c,u),delete e[c])},a=(c,u)=>{this.canvas&&this.resize(c,u)};let s;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",a),o("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():s()}unbindEvents(){We(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},We(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let a,s,l,c;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){s=e[l];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:a,index:s})=>{const l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[s],index:s}});!js(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,a=(c,u)=>c.filter(p=>!u.some(h=>p.datasetIndex===h.datasetIndex&&p.index===h.index)),s=a(n,e),l=o?e:a(e,n);s.length&&this.updateHoverStyle(s,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:a}=this,s=n,l=this._getActiveElements(e,i,o,s),c=AS(e),u=g8(e,this._lastEvent,o,c);o&&(this._lastEvent=null,Qe(a.onHover,[e,l,this],this),c&&Qe(a.onClick,[e,l,this],this));const p=!js(l,i);return(p||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=u,p}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,i)}}ie(Zt,"defaults",dt),ie(Zt,"instances",pl),ie(Zt,"overrides",Pr),ie(Zt,"registry",lo),ie(Zt,"version",f8),ie(Zt,"getChart",y0);function v0(){return We(Zt.instances,t=>t._plugins.invalidate())}function y8(t,e,n){const{startAngle:o,pixelMargin:i,x:a,y:s,outerRadius:l,innerRadius:c}=e;let u=i/l;t.beginPath(),t.arc(a,s,l,o-u,n+u),c>i?(u=i/c,t.arc(a,s,c,n+u,o-u,!0)):t.arc(a,s,i,n+gt,o-gt),t.closePath(),t.clip()}function v8(t){return ru(t,["outerStart","outerEnd","innerStart","innerEnd"])}function k8(t,e,n,o){const i=v8(t.options.borderRadius),a=(n-e)/2,s=Math.min(a,o*e/2),l=c=>{const u=(n-Math.min(a,c))*o/2;return Bt(c,0,Math.min(a,u))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Bt(i.innerStart,0,s),innerEnd:Bt(i.innerEnd,0,s)}}function yi(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function ml(t,e,n,o,i,a){const{x:s,y:l,startAngle:c,pixelMargin:u,innerRadius:p}=e,h=Math.max(e.outerRadius+o+n-u,0),m=p>0?p+o+n+u:0;let b=0;const y=i-c;if(o){const P=p>0?p-o:0,C=h>0?h-o:0,M=(P+C)/2,L=M!==0?y*M/(M+o):y;b=(y-L)/2}const v=Math.max(.001,y*h-n/Ze)/h,w=(y-v)/2,A=c+w+b,I=i-w-b,{outerStart:V,outerEnd:R,innerStart:E,innerEnd:T}=k8(e,m,h,I-A),B=h-V,H=h-R,_=A+V/B,j=I-R/H,Q=m+E,F=m+T,S=A+E/Q,x=I-T/F;if(t.beginPath(),a){const P=(_+j)/2;if(t.arc(s,l,h,_,P),t.arc(s,l,h,P,j),R>0){const K=yi(H,j,s,l);t.arc(K.x,K.y,R,j,I+gt)}const C=yi(F,I,s,l);if(t.lineTo(C.x,C.y),T>0){const K=yi(F,x,s,l);t.arc(K.x,K.y,T,I+gt,x+Math.PI)}const M=(I-T/m+(A+E/m))/2;if(t.arc(s,l,m,I-T/m,M,!0),t.arc(s,l,m,M,A+E/m,!0),E>0){const K=yi(Q,S,s,l);t.arc(K.x,K.y,E,S+Math.PI,A-gt)}const L=yi(B,A,s,l);if(t.lineTo(L.x,L.y),V>0){const K=yi(B,_,s,l);t.arc(K.x,K.y,V,A-gt,_)}}else{t.moveTo(s,l);const P=Math.cos(_)*h+s,C=Math.sin(_)*h+l;t.lineTo(P,C);const M=Math.cos(j)*h+s,L=Math.sin(j)*h+l;t.lineTo(M,L)}t.closePath()}function w8(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l}=e;let c=e.endAngle;if(a){ml(t,e,n,o,c,i);for(let u=0;u<a;++u)t.fill();isNaN(l)||(c=s+(l%$e||$e))}return ml(t,e,n,o,c,i),t.fill(),c}function x8(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l,options:c}=e,{borderWidth:u,borderJoinStyle:p,borderDash:h,borderDashOffset:m}=c,b=c.borderAlign==="inner";if(!u)return;t.setLineDash(h||[]),t.lineDashOffset=m,b?(t.lineWidth=u*2,t.lineJoin=p||"round"):(t.lineWidth=u,t.lineJoin=p||"bevel");let y=e.endAngle;if(a){ml(t,e,n,o,y,i);for(let v=0;v<a;++v)t.stroke();isNaN(l)||(y=s+(l%$e||$e))}b&&y8(t,e,y),a||(ml(t,e,n,o,y,i),t.stroke())}class vi extends Ao{constructor(n){super();ie(this,"circumference");ie(this,"endAngle");ie(this,"fullCircles");ie(this,"innerRadius");ie(this,"outerRadius");ie(this,"pixelMargin");ie(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.getProps(["x","y"],i),{angle:s,distance:l}=$m(a,{x:n,y:o}),{startAngle:c,endAngle:u,innerRadius:p,outerRadius:h,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),b=(this.options.spacing+this.options.borderWidth)/2,v=Ce(m,u-c)>=$e||ma(s,c,u),w=wo(l,p+b,h+b);return v&&w}getCenterPoint(n){const{x:o,y:i,startAngle:a,endAngle:s,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:p}=this.options,h=(a+s)/2,m=(l+c+p+u)/2;return{x:o+Math.cos(h)*m,y:i+Math.sin(h)*m}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,a=(o.offset||0)/4,s=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>$e?Math.floor(i/$e):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*a,Math.sin(c)*a);const u=1-Math.sin(Math.min(Ze,i||0)),p=a*u;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,w8(n,this,p,s,l),x8(n,this,p,s,l),n.restore()}}ie(vi,"id","arc"),ie(vi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ie(vi,"defaultRoutes",{backgroundColor:"backgroundColor"}),ie(vi,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function k0(t,e,n=e){t.lineCap=Ce(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Ce(n.borderDash,e.borderDash)),t.lineDashOffset=Ce(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Ce(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Ce(n.borderWidth,e.borderWidth),t.strokeStyle=Ce(n.borderColor,e.borderColor)}function S8(t,e,n){t.lineTo(n.x,n.y)}function C8(t){return t.stepped?XS:t.tension||t.cubicInterpolationMode==="monotone"?qS:S8}function w0(t,e,n={}){const o=t.length,{start:i=0,end:a=o-1}=n,{start:s,end:l}=e,c=Math.max(i,s),u=Math.min(a,l),p=i<s&&a<s||i>l&&a>l;return{count:o,start:c,loop:e.loop,ilen:u<c&&!p?o+u-c:u-c}}function A8(t,e,n,o){const{points:i,options:a}=e,{count:s,start:l,loop:c,ilen:u}=w0(i,n,o),p=C8(a);let{move:h=!0,reverse:m}=o||{},b,y,v;for(b=0;b<=u;++b)y=i[(l+(m?u-b:b))%s],!y.skip&&(h?(t.moveTo(y.x,y.y),h=!1):p(t,v,y,m,a.stepped),v=y);return c&&(y=i[(l+(m?u:0))%s],p(t,v,y,m,a.stepped)),!!c}function D8(t,e,n,o){const i=e.points,{count:a,start:s,ilen:l}=w0(i,n,o),{move:c=!0,reverse:u}=o||{};let p=0,h=0,m,b,y,v,w,A;const I=R=>(s+(u?l-R:R))%a,V=()=>{v!==w&&(t.lineTo(p,w),t.lineTo(p,v),t.lineTo(p,A))};for(c&&(b=i[I(0)],t.moveTo(b.x,b.y)),m=0;m<=l;++m){if(b=i[I(m)],b.skip)continue;const R=b.x,E=b.y,T=R|0;T===y?(E<v?v=E:E>w&&(w=E),p=(h*p+R)/++h):(V(),t.lineTo(R,E),y=T,h=0,v=w=E),A=E}V()}function ku(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?D8:A8}function E8(t){return t.stepped?DC:t.tension||t.cubicInterpolationMode==="monotone"?EC:Fr}function B8(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),k0(t,e.options),t.stroke(i)}function P8(t,e,n,o){const{segments:i,options:a}=e,s=ku(e);for(const l of i)k0(t,a,l.style),t.beginPath(),s(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const O8=typeof Path2D=="function";function I8(t,e,n,o){O8&&!e.options.segment?B8(t,e,n,o):P8(t,e,n,o)}class ir extends Ao{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;yC(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=VC(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],a=this.points,s=Og(this,{property:n,start:i,end:i});if(!s.length)return;const l=[],c=E8(o);let u,p;for(u=0,p=s.length;u<p;++u){const{start:h,end:m}=s[u],b=a[h],y=a[m];if(b===y){l.push(b);continue}const v=Math.abs((i-b[n])/(y[n]-b[n])),w=c(b,y,v,o.stepped);w[n]=e[n],l.push(w)}return l.length===1?l[0]:l}pathSegment(e,n,o){return ku(this)(e,this,n,o)}path(e,n,o){const i=this.segments,a=ku(this);let s=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)s&=a(e,this,l,{start:n,end:n+o-1});return!!s}draw(e,n,o,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),I8(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ie(ir,"id","line"),ie(ir,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ie(ir,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ie(ir,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function x0(t,e,n,o){const i=t.options,{[n]:a}=t.getProps([n],o);return Math.abs(e-a)<i.radius+i.hitRadius}class Pa extends Ao{constructor(n){super();ie(this,"parsed");ie(this,"skip");ie(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.options,{x:s,y:l}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(o-l,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,o){return x0(this,n,"x",o)}inYRange(n,o){return x0(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!So(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,ou(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ie(Pa,"id","point"),ie(Pa,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ie(Pa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function S0(t,e){const{x:n,y:o,base:i,width:a,height:s}=t.getProps(["x","y","base","width","height"],e);let l,c,u,p,h;return t.horizontal?(h=s/2,l=Math.min(n,i),c=Math.max(n,i),u=o-h,p=o+h):(h=a/2,l=n-h,c=n+h,u=Math.min(o,i),p=Math.max(o,i)),{left:l,top:u,right:c,bottom:p}}function ar(t,e,n,o){return t?0:Bt(e,n,o)}function N8(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,a=hg(o);return{t:ar(i.top,a.top,0,n),r:ar(i.right,a.right,0,e),b:ar(i.bottom,a.bottom,0,n),l:ar(i.left,a.left,0,e)}}function V8(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,a=Nr(i),s=Math.min(e,n),l=t.borderSkipped,c=o||Re(i);return{topLeft:ar(!c||l.top||l.left,a.topLeft,0,s),topRight:ar(!c||l.top||l.right,a.topRight,0,s),bottomLeft:ar(!c||l.bottom||l.left,a.bottomLeft,0,s),bottomRight:ar(!c||l.bottom||l.right,a.bottomRight,0,s)}}function R8(t){const e=S0(t),n=e.right-e.left,o=e.bottom-e.top,i=N8(t,n/2,o/2),a=V8(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:a},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function wu(t,e,n,o){const i=e===null,a=n===null,l=t&&!(i&&a)&&S0(t,o);return l&&(i||wo(e,l.left,l.right))&&(a||wo(n,l.top,l.bottom))}function F8(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function T8(t,e){t.rect(e.x,e.y,e.w,e.h)}function xu(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-o,s=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+a,h:t.h+s,radius:t.radius}}class Oa extends Ao{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:s}=R8(this),l=F8(s.radius)?va:T8;e.save(),(s.w!==a.w||s.h!==a.h)&&(e.beginPath(),l(e,xu(s,n,a)),e.clip(),l(e,xu(a,-n,s)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,xu(a,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return wu(this,e,n,o)}inXRange(e,n){return wu(this,e,null,n)}inYRange(e,n){return wu(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ie(Oa,"id","bar"),ie(Oa,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ie(Oa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var M8=Object.freeze({__proto__:null,ArcElement:vi,BarElement:Oa,LineElement:ir,PointElement:Pa});const Su=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],C0=Su.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function A0(t){return Su[t%Su.length]}function D0(t){return C0[t%C0.length]}function L8(t,e){return t.borderColor=A0(e),t.backgroundColor=D0(e),++e}function z8(t,e){return t.backgroundColor=t.data.map(()=>A0(e++)),e}function _8(t,e){return t.backgroundColor=t.data.map(()=>D0(e++)),e}function H8(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Tr?e=z8(n,e):i instanceof wa?e=_8(n,e):i&&(e=L8(n,e))}}function E0(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function U8(t){return t&&(t.borderColor||t.backgroundColor)}var W8={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:a}=i;if(!n.forceOverride&&(E0(o)||U8(i)||a&&E0(a)))return;const s=H8(t);o.forEach(s)}};function j8(t,e,n,o,i){const a=i.samples||o;if(a>=n)return t.slice(e,e+n);const s=[],l=(n-2)/(a-2);let c=0;const u=e+n-1;let p=e,h,m,b,y,v;for(s[c++]=t[p],h=0;h<a-2;h++){let w=0,A=0,I;const V=Math.floor((h+1)*l)+1+e,R=Math.min(Math.floor((h+2)*l)+1,n)+e,E=R-V;for(I=V;I<R;I++)w+=t[I].x,A+=t[I].y;w/=E,A/=E;const T=Math.floor(h*l)+1+e,B=Math.min(Math.floor((h+1)*l)+1,n)+e,{x:H,y:_}=t[p];for(b=y=-1,I=T;I<B;I++)y=.5*Math.abs((H-w)*(t[I].y-_)-(H-t[I].x)*(A-_)),y>b&&(b=y,m=t[I],v=I);s[c++]=m,p=v}return s[c++]=t[u],s}function G8(t,e,n,o){let i=0,a=0,s,l,c,u,p,h,m,b,y,v;const w=[],A=e+n-1,I=t[e].x,R=t[A].x-I;for(s=e;s<e+n;++s){l=t[s],c=(l.x-I)/R*o,u=l.y;const E=c|0;if(E===p)u<y?(y=u,h=s):u>v&&(v=u,m=s),i=(a*i+l.x)/++a;else{const T=s-1;if(!Ve(h)&&!Ve(m)){const B=Math.min(h,m),H=Math.max(h,m);B!==b&&B!==T&&w.push({...t[B],x:i}),H!==b&&H!==T&&w.push({...t[H],x:i})}s>0&&T!==b&&w.push(t[T]),w.push(l),p=E,a=0,y=v=u,h=m=b=s}}return w}function B0(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function P0(t){t.data.datasets.forEach(e=>{B0(e)})}function Q8(t,e){const n=e.length;let o=0,i;const{iScale:a}=t,{min:s,max:l,minDefined:c,maxDefined:u}=a.getUserBounds();return c&&(o=Bt(xo(e,a.axis,s).lo,0,n-1)),u?i=Bt(xo(e,a.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var X8={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){P0(t);return}const o=t.width;t.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:l}=i,c=t.getDatasetMeta(a),u=s||i.data;if(et([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const p=t.scales[c.xAxisID];if(p.type!=="linear"&&p.type!=="time"||t.options.parsing)return;let{start:h,count:m}=Q8(c,u);const b=n.threshold||4*o;if(m<=b){B0(i);return}Ve(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let y;switch(n.algorithm){case"lttb":y=j8(u,h,m,o,n);break;case"min-max":y=G8(u,h,m,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=y})},destroy(t){P0(t)}};function q8(t,e,n){const o=t.segments,i=t.points,a=e.points,s=[];for(const l of o){let{start:c,end:u}=l;u=Au(c,u,i);const p=Cu(n,i[c],i[u],l.loop);if(!e.segments){s.push({source:l,target:p,start:i[c],end:i[u]});continue}const h=Og(e,p);for(const m of h){const b=Cu(n,a[m.start],a[m.end],m.loop),y=Pg(l,i,b);for(const v of y)s.push({source:v,target:m,start:{[n]:O0(p,b,"start",Math.max)},end:{[n]:O0(p,b,"end",Math.min)}})}}return s}function Cu(t,e,n,o){if(o)return;let i=e[t],a=n[t];return t==="angle"&&(i=bn(i),a=bn(a)),{property:t,start:i,end:a}}function K8(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,a=[];return e.segments.forEach(({start:s,end:l})=>{l=Au(s,l,i);const c=i[s],u=i[l];o!==null?(a.push({x:c.x,y:o}),a.push({x:u.x,y:o})):n!==null&&(a.push({x:n,y:c.y}),a.push({x:n,y:u.y}))}),a}function Au(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function O0(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function I0(t,e){let n=[],o=!1;return Ye(t)?(o=!0,n=t):n=K8(t,e),n.length?new ir({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function N0(t){return t&&t.fill!==!1}function J8(t,e,n){let i=t[e].fill;const a=[e];let s;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!ht(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function Y8(t,e,n){const o=t4(t);if(Re(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return ht(i)&&Math.floor(i)===i?Z8(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Z8(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function $8(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:Re(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function e4(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:Re(t)?o=t.value:o=e.getBaseValue(),o}function t4(t){const e=t.options,n=e.fill;let o=Ce(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function n4(t){const{scale:e,index:n,line:o}=t,i=[],a=o.segments,s=o.points,l=o4(e,n);l.push(I0({x:null,y:e.bottom},o));for(let c=0;c<a.length;c++){const u=a[c];for(let p=u.start;p<=u.end;p++)r4(i,s[p],l)}return new ir({points:i,options:{}})}function o4(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const a=o[i];if(a.index===e)break;a.hidden||n.unshift(a.dataset)}return n}function r4(t,e,n){const o=[];for(let i=0;i<n.length;i++){const a=n[i],{first:s,last:l,point:c}=i4(a,e,"x");if(!(!c||s&&l)){if(s)o.unshift(c);else if(t.push(c),!l)break}}t.push(...o)}function i4(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],a=t.segments,s=t.points;let l=!1,c=!1;for(let u=0;u<a.length;u++){const p=a[u],h=s[p.start][n],m=s[p.end][n];if(wo(i,h,m)){l=i===h,c=i===m;break}}return{first:l,last:c,point:o}}class V0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:a,radius:s}=this;return n=n||{start:0,end:$e},e.arc(i,a,s,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,a=e.angle;return{x:n+Math.cos(a)*i,y:o+Math.sin(a)*i,angle:a}}}function a4(t){const{chart:e,fill:n,line:o}=t;if(ht(n))return s4(e,n);if(n==="stack")return n4(t);if(n==="shape")return!0;const i=l4(t);return i instanceof V0?i:I0(i,o)}function s4(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function l4(t){return(t.scale||{}).getPointPositionForValue?c4(t):d4(t)}function d4(t){const{scale:e={},fill:n}=t,o=$8(n,e);if(ht(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function c4(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,a=o.reverse?e.max:e.min,s=e4(n,e,a),l=[];if(o.grid.circular){const c=e.getPointPositionForValue(0,a);return new V0({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(s)})}for(let c=0;c<i;++c)l.push(e.getPointPositionForValue(c,s));return l}function Du(t,e,n){const o=a4(e),{line:i,scale:a,axis:s}=e,l=i.options,c=l.fill,u=l.backgroundColor,{above:p=u,below:h=u}=c||{};o&&i.points.length&&(Js(t,n),u4(t,{line:i,target:o,above:p,below:h,area:n,scale:a,axis:s}),Ys(t))}function u4(t,e){const{line:n,target:o,above:i,below:a,area:s,scale:l}=e,c=n._loop?"angle":e.axis;t.save(),c==="x"&&a!==i&&(R0(t,o,s.top),F0(t,{line:n,target:o,color:i,scale:l,property:c}),t.restore(),t.save(),R0(t,o,s.bottom)),F0(t,{line:n,target:o,color:a,scale:l,property:c}),t.restore()}function R0(t,e,n){const{segments:o,points:i}=e;let a=!0,s=!1;t.beginPath();for(const l of o){const{start:c,end:u}=l,p=i[c],h=i[Au(c,u,i)];a?(t.moveTo(p.x,p.y),a=!1):(t.lineTo(p.x,n),t.lineTo(p.x,p.y)),s=!!e.pathSegment(t,l,{move:s}),s?t.closePath():t.lineTo(h.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function F0(t,e){const{line:n,target:o,property:i,color:a,scale:s}=e,l=q8(n,o,i);for(const{source:c,target:u,start:p,end:h}of l){const{style:{backgroundColor:m=a}={}}=c,b=o!==!0;t.save(),t.fillStyle=m,f4(t,s,b&&Cu(i,p,h)),t.beginPath();const y=!!n.pathSegment(t,c);let v;if(b){y?t.closePath():T0(t,o,h,i);const w=!!o.pathSegment(t,u,{move:y,reverse:!0});v=y&&w,v||T0(t,o,p,i)}t.closePath(),t.fill(v?"evenodd":"nonzero"),t.restore()}}function f4(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:a,start:s,end:l}=n||{};a==="x"&&(t.beginPath(),t.rect(s,o,l-s,i-o),t.clip())}function T0(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var p4={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let a,s,l,c;for(s=0;s<o;++s)a=t.getDatasetMeta(s),l=a.dataset,c=null,l&&l.options&&l instanceof ir&&(c={visible:t.isDatasetVisible(s),index:s,fill:Y8(l,s,o),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=c,i.push(c);for(s=0;s<o;++s)c=i[s],!(!c||c.fill===!1)&&(c.fill=J8(i,s,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;l&&(l.line.updateControlPoints(a,l.axis),o&&l.fill&&Du(t.ctx,l,a))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const a=o[i].$filler;N0(a)&&Du(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!N0(o)||n.drawTime!=="beforeDatasetDraw"||Du(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const M0=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},h4=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class L0 extends Ao{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=Qe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=wt(o.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=M0(o,a);let u,p;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,p=this._fitRows(s,a,l,c)+10):(p=this.maxHeight,u=this._fitCols(s,i,l,c)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:a,maxWidth:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.lineWidths=[0],p=i+l;let h=e;a.textAlign="left",a.textBaseline="middle";let m=-1,b=-p;return this.legendItems.forEach((y,v)=>{const w=o+n/2+a.measureText(y.text).width;(v===0||u[u.length-1]+w+2*l>s)&&(h+=p,u[u.length-(v>0?0:1)]=0,b+=p,m++),c[v]={left:0,top:b,row:m,width:w,height:i},u[u.length-1]+=w+l}),h}_fitCols(e,n,o,i){const{ctx:a,maxHeight:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.columnSizes=[],p=s-e;let h=l,m=0,b=0,y=0,v=0;return this.legendItems.forEach((w,A)=>{const{itemWidth:I,itemHeight:V}=m4(o,n,a,w,i);A>0&&b+V+2*l>p&&(h+=m+l,u.push({width:m,height:b}),y+=m+l,v++,m=b=0),c[A]={left:y,top:b,col:v,width:I,height:V},m=Math.max(m,I),b+=V+l}),h+=m,u.push({width:m,height:b}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:a}}=this,s=bi(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=zt(o,this.left+i,this.right-this.lineWidths[l]);for(const u of n)l!==u.row&&(l=u.row,c=zt(o,this.left+i,this.right-this.lineWidths[l])),u.top+=this.top+e+i,u.left=s.leftForLtr(s.x(c),u.width),c+=u.width+i}else{let l=0,c=zt(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const u of n)u.col!==l&&(l=u.col,c=zt(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),u.top=c,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),c+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Js(e,this),this._draw(),Ys(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:a,labels:s}=e,l=dt.color,c=bi(e.rtl,this.left,this.width),u=wt(s.font),{padding:p}=s,h=u.size,m=h/2;let b;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:y,boxHeight:v,itemHeight:w}=M0(s,h),A=function(T,B,H){if(isNaN(y)||y<=0||isNaN(v)||v<0)return;i.save();const _=Ce(H.lineWidth,1);if(i.fillStyle=Ce(H.fillStyle,l),i.lineCap=Ce(H.lineCap,"butt"),i.lineDashOffset=Ce(H.lineDashOffset,0),i.lineJoin=Ce(H.lineJoin,"miter"),i.lineWidth=_,i.strokeStyle=Ce(H.strokeStyle,l),i.setLineDash(Ce(H.lineDash,[])),s.usePointStyle){const j={radius:v*Math.SQRT2/2,pointStyle:H.pointStyle,rotation:H.rotation,borderWidth:_},Q=c.xPlus(T,y/2),F=B+m;pg(i,j,Q,F,s.pointStyleWidth&&y)}else{const j=B+Math.max((h-v)/2,0),Q=c.leftForLtr(T,y),F=Nr(H.borderRadius);i.beginPath(),Object.values(F).some(S=>S!==0)?va(i,{x:Q,y:j,w:y,h:v,radius:F}):i.rect(Q,j,y,v),i.fill(),_!==0&&i.stroke()}i.restore()},I=function(T,B,H){Ir(i,H.text,T,B+w/2,u,{strikethrough:H.hidden,textAlign:c.textAlign(H.textAlign)})},V=this.isHorizontal(),R=this._computeTitleHeight();V?b={x:zt(a,this.left+p,this.right-o[0]),y:this.top+p+R,line:0}:b={x:this.left+p,y:zt(a,this.top+R+p,this.bottom-n[0].height),line:0},Ag(this.ctx,e.textDirection);const E=w+p;this.legendItems.forEach((T,B)=>{i.strokeStyle=T.fontColor,i.fillStyle=T.fontColor;const H=i.measureText(T.text).width,_=c.textAlign(T.textAlign||(T.textAlign=s.textAlign)),j=y+m+H;let Q=b.x,F=b.y;c.setWidth(this.width),V?B>0&&Q+j+p>this.right&&(F=b.y+=E,b.line++,Q=b.x=zt(a,this.left+p,this.right-o[b.line])):B>0&&F+E>this.bottom&&(Q=b.x=Q+n[b.line].width+p,b.line++,F=b.y=zt(a,this.top+R+p,this.bottom-n[b.line].height));const S=c.x(Q);if(A(S,F,T),Q=TS(_,Q+y+m,V?Q+j:this.right,e.rtl),I(c.x(Q),F,T),V)b.x+=j+p;else if(typeof T.text!="string"){const x=u.lineHeight;b.y+=z0(T,x)+p}else b.y+=E}),Dg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=wt(n.font),i=Ft(n.padding);if(!n.display)return;const a=bi(e.rtl,this.left,this.width),s=this.ctx,l=n.position,c=o.size/2,u=i.top+c;let p,h=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),p=this.top+u,h=zt(e.align,h,this.right-m);else{const y=this.columnSizes.reduce((v,w)=>Math.max(v,w.height),0);p=u+zt(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const b=zt(l,h,h+m);s.textAlign=a.textAlign(Zc(l)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=o.string,Ir(s,n.text,b,p,o)}_computeTitleHeight(){const e=this.options.title,n=wt(e.font),o=Ft(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,a;if(wo(e,this.left,this.right)&&wo(n,this.top,this.bottom)){for(a=this.legendHitBoxes,o=0;o<a.length;++o)if(i=a[o],wo(e,i.left,i.left+i.width)&&wo(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!y4(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,a=h4(i,o);i&&!a&&Qe(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!a&&Qe(n.onHover,[e,o,this],this)}else o&&Qe(n.onClick,[e,o,this],this)}}function m4(t,e,n,o,i){const a=g4(o,t,e,n),s=b4(i,o,e.lineHeight);return{itemWidth:a,itemHeight:s}}function g4(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),e+n.size/2+o.measureText(i).width}function b4(t,e,n){let o=t;return typeof e.text!="string"&&(o=z0(e,n)),o}function z0(t,e){const n=t.text?t.text.length:0;return e*n}function y4(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var v4={id:"legend",_element:L0,start(t,e,n){const o=t.legend=new L0({ctx:t.ctx,options:n,chart:t});_t.configure(t,o,n),_t.addBox(t,o)},stop(t){_t.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;_t.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:a,useBorderRadius:s,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const u=c.controller.getStyle(n?0:void 0),p=Ft(u.borderWidth);return{text:e[c.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:u.borderColor,pointStyle:o||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(l||u.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Eu extends Ao{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=Ye(o.text)?o.text.length:1;this._padding=Ft(o.padding);const a=i*wt(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:a,options:s}=this,l=s.align;let c=0,u,p,h;return this.isHorizontal()?(p=zt(l,o,a),h=n+e,u=a-o):(s.position==="left"?(p=o+e,h=zt(l,i,n),c=Ze*-.5):(p=a-e,h=zt(l,n,i),c=Ze*.5),u=i-n),{titleX:p,titleY:h,maxWidth:u,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=wt(n.font),a=o.lineHeight/2+this._padding.top,{titleX:s,titleY:l,maxWidth:c,rotation:u}=this._drawArgs(a);Ir(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:u,textAlign:Zc(n.align),textBaseline:"middle",translation:[s,l]})}}function k4(t,e){const n=new Eu({ctx:t.ctx,options:e,chart:t});_t.configure(t,n,e),_t.addBox(t,n),t.titleBlock=n}var w4={id:"title",_element:Eu,start(t,e,n){k4(t,n)},stop(t){const e=t.titleBlock;_t.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;_t.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gl=new WeakMap;var x4={id:"subtitle",start(t,e,n){const o=new Eu({ctx:t.ctx,options:n,chart:t});_t.configure(t,o,n),_t.addBox(t,o),gl.set(t,o)},stop(t){_t.removeBox(t,gl.get(t)),gl.delete(t)},beforeUpdate(t,e,n){const o=gl.get(t);_t.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ia={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,a=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const c=l.tooltipPosition();o.add(c.x),i+=c.y,++a}}return{x:[...o].reduce((l,c)=>l+c)/o.size,y:i/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,a,s,l;for(a=0,s=t.length;a<s;++a){const c=t[a].element;if(c&&c.hasValue()){const u=c.getCenterPoint(),p=Jc(e,u);p<i&&(i=p,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function co(t,e){return e&&(Ye(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Do(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
29
+ */class TC{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const a=n.listeners[i],s=n.duration;a.forEach(l=>l({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(o-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=og.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const a=o.items;let s=a.length-1,l=!1,c;for(;s>=0;--s)c=a[s],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(e),l=!0):(a[s]=a[a.length-1],a.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),a.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Co=new TC;const Vg="transparent",MC={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=dg(t||Vg),i=o.valid&&dg(e||Vg);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class LC{constructor(e,n,o,i){const a=n[o];i=et([e.to,i,a,e.from]);const s=et([e.from,a,i]);this._active=!0,this._fn=e.fn||MC[e.type||typeof s],this._easing=ga[e.easing]||ga.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],a=o-this._start,s=this._duration-a;this._start=o,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=et([e.to,n,i,e.from]),this._from=et([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,a=this._from,s=this._loop,l=this._to;let c;if(this._active=a!==l&&(s||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=a;return}c=n/o%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(a,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Rg{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Re(e))return;const n=Object.keys(dt.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const a=e[i];if(!Re(a))return;const s={};for(const l of n)s[l]=a[l];(Ye(a.properties)&&a.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,s)})})}_animateOptions(e,n){const o=n.options,i=_C(e,o);if(!i)return[];const a=this._createAnimations(i,o);return o.$shared&&zC(e.options.$animations,o).then(()=>{e.options=o},()=>{}),a}_createAnimations(e,n){const o=this._properties,i=[],a=e.$animations||(e.$animations={}),s=Object.keys(n),l=Date.now();let c;for(c=s.length-1;c>=0;--c){const u=s[c];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const p=n[u];let h=a[u];const m=o.get(u);if(h)if(m&&h.active()){h.update(m,p,l);continue}else h.cancel();if(!m||!m.duration){e[u]=p;continue}a[u]=h=new LC(m,e,u,p),i.push(h)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return Co.add(this._chart,o),!0}}function zC(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const a=t[o[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function _C(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fg(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:o?a:i,end:o?i:a}}function HC(t,e,n){if(n===!1)return!1;const o=Fg(t,n),i=Fg(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function UC(t){let e,n,o,i;return Re(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Tg(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,a;for(i=0,a=o.length;i<a;++i)n.push(o[i].index);return n}function Mg(t,e,n,o={}){const i=t.keys,a=o.mode==="single";let s,l,c,u;if(e!==null){for(s=0,l=i.length;s<l;++s){if(c=+i[s],c===n){if(o.all)continue;break}u=t.values[c],ht(u)&&(a||e===0||so(e)===so(u))&&(e+=u)}return e}}function WC(t,e){const{iScale:n,vScale:o}=e,i=n.axis==="x"?"x":"y",a=o.axis==="x"?"x":"y",s=Object.keys(t),l=new Array(s.length);let c,u,p;for(c=0,u=s.length;c<u;++c)p=s[c],l[c]={[i]:p,[a]:t[p]};return l}function Lg(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function jC(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function GC(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function QC(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function zg(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const a=t[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function _g(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:l}=o,c=a.axis,u=s.axis,p=jC(a,s,o),h=e.length;let m;for(let b=0;b<h;++b){const y=e[b],{[c]:v,[u]:w}=y,A=y._stacks||(y._stacks={});m=A[u]=QC(i,p,v),m[l]=w,m._top=zg(m,s,!0,o.type),m._bottom=zg(m,s,!1,o.type);const I=m._visualValues||(m._visualValues={});I[l]=w}}function cu(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function XC(t,e){return rr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function qC(t,e,n){return rr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function ka(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const a=i._stacks;if(!a||a[o]===void 0||a[o][n]===void 0)return;delete a[o][n],a[o]._visualValues!==void 0&&a[o]._visualValues[n]!==void 0&&delete a[o]._visualValues[n]}}}const uu=t=>t==="reset"||t==="none",Hg=(t,e)=>e?t:Object.assign({},t),KC=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Tg(n,!0),values:null};class jn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Lg(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&ka(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(h,m,b,y)=>h==="x"?m:h==="r"?y:b,a=n.xAxisID=Ce(o.xAxisID,cu(e,"x")),s=n.yAxisID=Ce(o.yAxisID,cu(e,"y")),l=n.rAxisID=Ce(o.rAxisID,cu(e,"r")),c=n.indexAxis,u=n.iAxisID=i(c,a,s,l),p=n.vAxisID=i(c,s,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&tg(this._data,this),e._stacked&&ka(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(Re(n)){const i=this._cachedMeta;this._data=WC(n,i)}else if(o!==n){if(o){tg(o,this);const i=this._cachedMeta;ka(i),i._parsed=[]}n&&Object.isExtensible(n)&&RS(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=Lg(n.vScale,n),n.stack!==o.stack&&(i=!0,ka(n),n.stack=o.stack),this._resyncElements(e),(i||a!==n._stacked)&&_g(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:a,_stacked:s}=o,l=a.axis;let c=e===0&&n===i.length?!0:o._sorted,u=e>0&&o._parsed[e-1],p,h,m;if(this._parsing===!1)o._parsed=i,o._sorted=!0,m=i;else{Ye(i[e])?m=this.parseArrayData(o,i,e,n):Re(i[e])?m=this.parseObjectData(o,i,e,n):m=this.parsePrimitiveData(o,i,e,n);const b=()=>h[l]===null||u&&h[l]<u[l];for(p=0;p<n;++p)o._parsed[p+e]=h=m[p],c&&(b()&&(c=!1),u=h);o._sorted=c}s&&_g(this,m)}parsePrimitiveData(e,n,o,i){const{iScale:a,vScale:s}=e,l=a.axis,c=s.axis,u=a.getLabels(),p=a===s,h=new Array(i);let m,b,y;for(m=0,b=i;m<b;++m)y=m+o,h[m]={[l]:p||a.parse(u[y],y),[c]:s.parse(n[y],y)};return h}parseArrayData(e,n,o,i){const{xScale:a,yScale:s}=e,l=new Array(i);let c,u,p,h;for(c=0,u=i;c<u;++c)p=c+o,h=n[p],l[c]={x:a.parse(h[0],p),y:s.parse(h[1],p)};return l}parseObjectData(e,n,o,i){const{xScale:a,yScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=new Array(i);let p,h,m,b;for(p=0,h=i;p<h;++p)m=p+o,b=n[m],u[p]={x:a.parse(tr(b,l),m),y:s.parse(tr(b,c),m)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,a=this._cachedMeta,s=n[e.axis],l={keys:Tg(i,!0),values:n._stacks[e.axis]._visualValues};return Mg(l,s,a.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const a=o[n.axis];let s=a===null?NaN:a;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,s=Mg(i,a,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,a=o._sorted&&e===o.iScale,s=i.length,l=this._getOtherScale(e),c=KC(n,o,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:h}=GC(l);let m,b;function y(){b=i[m];const v=b[l.axis];return!ht(b[e.axis])||p>v||h<v}for(m=0;m<s&&!(!y()&&(this.updateRangeFromParsed(u,e,b,c),a));++m);if(a){for(m=s-1;m>=0;--m)if(!y()){this.updateRangeFromParsed(u,e,b,c);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,a,s;for(i=0,a=n.length;i<a;++i)s=n[i][e.axis],ht(s)&&o.push(s);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,a=this.getParsed(e);return{label:o?""+o.getLabelForValue(a[o.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=UC(Ce(this.options.clip,HC(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],a=n.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||i.length-l,u=this.options.drawActiveElementsOnTop;let p;for(o.dataset&&o.dataset.draw(e,a,l,c),p=l;p<l+c;++p){const h=i[p];h.hidden||(h.active&&u?s.push(h):h.draw(e,a))}for(p=0;p<s.length;++p)s[p].draw(e,a)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];a=s.$context||(s.$context=qC(this.getContext(),e,s)),a.parsed=this.getParsed(e),a.raw=i.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=XC(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=o,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",a=this._cachedDataOpts,s=e+"-"+n,l=a[s],c=this.enableOptionSharing&&pa(o);if(l)return Hg(l,c);const u=this.chart.config,p=u.datasetElementScopeKeys(this._type,e),h=i?[`${e}Hover`,"hover",e,""]:[e,""],m=u.getOptionScopes(this.getDataset(),p),b=Object.keys(dt.elements[e]),y=()=>this.getContext(o,i,n),v=u.resolveNamedOptions(m,b,y,h);return v.$shared&&(v.$shared=c,a[s]=Object.freeze(Hg(v,c))),v}_resolveAnimations(e,n,o){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,l=a[s];if(l)return l;let c;if(i.options.animation!==!1){const p=this.chart.config,h=p.datasetAnimationScopeKeys(this._type,n),m=p.getOptionScopes(this.getDataset(),h);c=p.createResolver(m,this.getContext(e,o,n))}const u=new Rg(i,c&&c.animations);return c&&c._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||uu(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,a=this.getSharedOptions(o),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,o),{sharedOptions:a,includeOptions:s}}updateElement(e,n,o,i){uu(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!uu(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];const i=o.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,e):a<i&&this._removeElements(a,i-a)}_insertElements(e,n,o=!0){const i=this._cachedMeta,a=i.data,s=e+n;let l;const c=u=>{for(u.length+=n,l=u.length-1;l>=s;l--)u[l]=u[l-n]};for(c(a),l=e;l<s;++l)a[l]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(e,n),o&&this.updateElements(a,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&ka(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ie(jn,"defaults",{}),ie(jn,"datasetElementType",null),ie(jn,"dataElementType",null);function JC(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,a=n.length;i<a;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=ng(o.sort((i,a)=>i-a))}return t._cache.$bar}function YC(t){const e=t.iScale,n=JC(e,t.type);let o=e._length,i,a,s,l;const c=()=>{s===32767||s===-32768||(pa(l)&&(o=Math.min(o,Math.abs(s-l)||o)),l=s)};for(i=0,a=n.length;i<a;++i)s=e.getPixelForValue(n[i]),c();for(l=void 0,i=0,a=e.ticks.length;i<a;++i)s=e.getPixelForTick(i),c();return o}function ZC(t,e,n,o){const i=n.barThickness;let a,s;return Ve(i)?(a=e.min*n.categoryPercentage,s=n.barPercentage):(a=i*o,s=1),{chunk:a/o,ratio:s,start:e.pixels[t]-a/2}}function $C(t,e,n,o){const i=e.pixels,a=i[t];let s=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;s===null&&(s=a-(l===null?e.end-e.start:l-a)),l===null&&(l=a+a-s);const u=a-(a-Math.min(s,l))/2*c;return{chunk:Math.abs(l-s)/2*c/o,ratio:n.barPercentage,start:u}}function eA(t,e,n,o){const i=n.parse(t[0],o),a=n.parse(t[1],o),s=Math.min(i,a),l=Math.max(i,a);let c=s,u=l;Math.abs(s)>Math.abs(l)&&(c=l,u=s),e[n.axis]=u,e._custom={barStart:c,barEnd:u,start:i,end:a,min:s,max:l}}function Ug(t,e,n,o){return Ye(t)?eA(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Wg(t,e,n,o){const i=t.iScale,a=t.vScale,s=i.getLabels(),l=i===a,c=[];let u,p,h,m;for(u=n,p=n+o;u<p;++u)m=e[u],h={},h[i.axis]=l||i.parse(s[u],u),c.push(Ug(m,h,a,u));return c}function fu(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function tA(t,e,n){return t!==0?so(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function nA(t){let e,n,o,i,a;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",a="start"):(i="start",a="end"),{start:n,end:o,reverse:e,top:i,bottom:a}}function oA(t,e,n,o){let i=e.borderSkipped;const a={};if(!i){t.borderSkipped=a;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:l,reverse:c,top:u,bottom:p}=nA(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=u:(n._bottom||0)===o?i=p:(a[jg(p,s,l,c)]=!0,i=u)),a[jg(i,s,l,c)]=!0,t.borderSkipped=a}function jg(t,e,n,o){return o?(t=rA(t,e,n),t=Gg(t,n,e)):t=Gg(t,e,n),t}function rA(t,e,n){return t===e?n:t===n?e:t}function Gg(t,e,n){return t==="start"?e:t==="end"?n:t}function iA(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class nl extends jn{parsePrimitiveData(e,n,o,i){return Wg(e,n,o,i)}parseArrayData(e,n,o,i){return Wg(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:a,vScale:s}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=a.axis==="x"?l:c,p=s.axis==="x"?l:c,h=[];let m,b,y,v;for(m=o,b=o+i;m<b;++m)v=n[m],y={},y[a.axis]=a.parse(tr(v,u),m),h.push(Ug(tr(v,p),y,s,m));return h}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const a=o._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,a=this.getParsed(e),s=a._custom,l=fu(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+o.getLabelForValue(a[o.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),u=l.isHorizontal(),p=this._getRuler(),{sharedOptions:h,includeOptions:m}=this._getSharedOptions(n,i);for(let b=n;b<n+o;b++){const y=this.getParsed(b),v=a||Ve(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(b),w=this._calculateBarIndexPixels(b,p),A=(y._stacks||{})[l.axis],I={horizontal:u,base:v.base,enableBorderRadius:!A||fu(y._custom)||s===A._top||s===A._bottom,x:u?v.head:w.center,y:u?w.center:v.head,height:u?w.size:Math.abs(v.size),width:u?Math.abs(v.size):w.size};m&&(I.options=h||this.resolveDataElementOptions(b,e[b].active?"active":i));const V=I.options||e[b].options;oA(I,V,A,s),iA(I,V,p.ratio),this.updateElement(e[b],b,I,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=o.options.stacked,s=[],l=c=>{const u=c.controller.getParsed(n),p=u&&u[c.vScale.axis];if(Ve(p)||isNaN(p))return!0};for(const c of i)if(!(n!==void 0&&l(c))&&((a===!1||s.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a<s;++a)i.push(o.getPixelForValue(this.getParsed(a)[o.axis],a));const l=e.barThickness;return{min:l||YC(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:a,minBarLength:s}}=this,l=a||0,c=this.getParsed(e),u=c._custom,p=fu(u);let h=c[n.axis],m=0,b=o?this.applyStack(n,c,o):h,y,v;b!==h&&(m=b-h,b=h),p&&(h=u.barStart,b=u.barEnd-u.barStart,h!==0&&so(h)!==so(u.barEnd)&&(m=0),m+=h);const w=!Ve(a)&&!p?a:m;let A=n.getPixelForValue(w);if(this.chart.getDataVisibility(e)?y=n.getPixelForValue(m+b):y=A,v=y-A,Math.abs(v)<s){v=tA(v,n,l)*s,h===l&&(A-=v/2);const I=n.getPixelForDecimal(0),V=n.getPixelForDecimal(1),R=Math.min(I,V),E=Math.max(I,V);A=Math.max(Math.min(A,E),R),y=A+v,o&&!p&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(A))}if(A===n.getPixelForValue(l)){const I=so(v)*n.getLineWidthForValue(l)/2;A+=I,v-=I}return{size:v,base:A,head:y,center:y+v/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,a=i.skipNull,s=Ce(i.maxBarThickness,1/0);let l,c;if(n.grouped){const u=a?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?$C(e,n,i,u):ZC(e,n,i,u),h=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);l=p.start+p.chunk*h+p.chunk/2,c=Math.min(s,p.chunk*p.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),c=Math.min(s,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!o[a].hidden&&o[a].draw(this._ctx)}}ie(nl,"id","bar"),ie(nl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ie(nl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ol extends jn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const a=super.parsePrimitiveData(e,n,o,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+o).radius;return a}parseArrayData(e,n,o,i){const a=super.parseArrayData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Ce(l[2],this.resolveDataElementOptions(s+o).radius)}return a}parseObjectData(e,n,o,i){const a=super.parseObjectData(e,n,o,i);for(let s=0;s<a.length;s++){const l=n[o+s];a[s]._custom=Ce(l&&l.r&&+l.r,this.resolveDataElementOptions(s+o).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y),u=s._custom;return{label:o[e]||"",value:"("+l+", "+c+(u?", "+u:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(n,i),p=s.axis,h=l.axis;for(let m=n;m<n+o;m++){const b=e[m],y=!a&&this.getParsed(m),v={},w=v[p]=a?s.getPixelForDecimal(.5):s.getPixelForValue(y[p]),A=v[h]=a?l.getBasePixel():l.getPixelForValue(y[h]);v.skip=isNaN(w)||isNaN(A),u&&(v.options=c||this.resolveDataElementOptions(m,b.active?"active":i),a&&(v.options.radius=0)),this.updateElement(b,m,v,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Ce(o&&o._custom,a),i}}ie(ol,"id","bubble"),ie(ol,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ie(ol,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function aA(t,e,n){let o=1,i=1,a=0,s=0;if(e<$e){const l=t,c=l+e,u=Math.cos(l),p=Math.sin(l),h=Math.cos(c),m=Math.sin(c),b=(V,R,E)=>ma(V,l,c,!0)?1:Math.max(R,R*n,E,E*n),y=(V,R,E)=>ma(V,l,c,!0)?-1:Math.min(R,R*n,E,E*n),v=b(0,u,h),w=b(gt,p,m),A=y(Ze,u,h),I=y(Ze+gt,p,m);o=(v-A)/2,i=(w-I)/2,a=-(v+A)/2,s=-(w+I)/2}return{ratioX:o,ratioY:i,offsetX:a,offsetY:s}}class Tr extends jn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let a=c=>+o[c];if(Re(o[e])){const{key:c="value"}=this._parsing;a=u=>+tr(o[u],c)}let s,l;for(s=e,l=e+n;s<l;++s)i._parsed[s]=a(s)}}_getRotation(){return Wn(this.options.rotation-90)}_getCircumference(){return Wn(this.options.circumference)}_getRotationExtents(){let e=$e,n=-$e;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,a=i._getRotation(),s=i._getCircumference();e=Math.min(e,a),n=Math.max(n,a+s)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-s)/2,0),c=Math.min(kS(this.options.cutout,l),1),u=this._getRingWeight(this.index),{circumference:p,rotation:h}=this._getRotationExtents(),{ratioX:m,ratioY:b,offsetX:y,offsetY:v}=aA(h,p,c),w=(o.width-s)/m,A=(o.height-s)/b,I=Math.max(Math.min(w,A)/2,0),V=Gm(this.options.radius,I),R=Math.max(V*c,0),E=(V-R)/this._getVisibleDatasetWeightTotal();this.offsetX=y*V,this.offsetY=v*V,i.total=this.calculateTotal(),this.outerRadius=V-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*u,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*a/$e)}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,l=s.chartArea,u=s.options.animation,p=(l.left+l.right)/2,h=(l.top+l.bottom)/2,m=a&&u.animateScale,b=m?0:this.innerRadius,y=m?0:this.outerRadius,{sharedOptions:v,includeOptions:w}=this._getSharedOptions(n,i);let A=this._getRotation(),I;for(I=0;I<n;++I)A+=this._circumference(I,a);for(I=n;I<n+o;++I){const V=this._circumference(I,a),R=e[I],E={x:p+this.offsetX,y:h+this.offsetY,startAngle:A,endAngle:A+V,circumference:V,outerRadius:y,innerRadius:b};w&&(E.options=v||this.resolveDataElementOptions(I,R.active?"active":i)),A+=V,this.updateElement(R,I,E,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const a=e._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(a))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?$e*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=ba(n._parsed[e],o.options.locale);return{label:i[e]||"",value:a}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,a,s,l,c;if(!e){for(i=0,a=o.data.datasets.length;i<a;++i)if(o.isDatasetVisible(i)){s=o.getDatasetMeta(i),e=s.data,l=s.controller;break}}if(!e)return 0;for(i=0,a=e.length;i<a;++i)c=l.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const a=this.resolveDataElementOptions(o);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Ce(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ie(Tr,"id","doughnut"),ie(Tr,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),ie(Tr,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),ie(Tr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class rl extends jn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:l,count:c}=ig(n,i,s);this._drawStart=l,this._drawCount=c,ag(n)&&(l=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!s,options:u},e),this.updateElements(i,l,c,e)}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,{sharedOptions:p,includeOptions:h}=this._getSharedOptions(n,i),m=s.axis,b=l.axis,{spanGaps:y,segment:v}=this.options,w=hi(y)?y:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||a||i==="none",I=n+o,V=e.length;let R=n>0&&this.getParsed(n-1);for(let E=0;E<V;++E){const T=e[E],B=A?T:{};if(E<n||E>=I){B.skip=!0;continue}const H=this.getParsed(E),_=Ve(H[b]),j=B[m]=s.getPixelForValue(H[m],E),Q=B[b]=a||_?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,H,c):H[b],E);B.skip=isNaN(j)||isNaN(Q)||_,B.stop=E>0&&Math.abs(H[m]-R[m])>w,v&&(B.parsed=H,B.raw=u.data[E]),h&&(B.options=p||this.resolveDataElementOptions(E,T.active?"active":i)),A||this.updateElement(T,E,B,i),R=H}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,a,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}ie(rl,"id","line"),ie(rl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ie(rl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class wa extends jn{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],a=ba(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:a}}parseObjectData(e,n,o,i){return wg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),s=Math.max(o.cutoutPercentage?a/100*o.cutoutPercentage:1,0),l=(a-s)/e.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const a=i==="reset",s=this.chart,c=s.options.animation,u=this._cachedMeta.rScale,p=u.xCenter,h=u.yCenter,m=u.getIndexAngle(0)-.5*Ze;let b=m,y;const v=360/this.countVisibleElements();for(y=0;y<n;++y)b+=this._computeAngle(y,i,v);for(y=n;y<n+o;y++){const w=e[y];let A=b,I=b+this._computeAngle(y,i,v),V=s.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;b=I,a&&(c.animateScale&&(V=0),c.animateRotate&&(A=I=m));const R={x:p,y:h,innerRadius:0,outerRadius:V,startAngle:A,endAngle:I,options:this.resolveDataElementOptions(y,w.active?"active":i)};this.updateElement(w,y,R,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Wn(this.resolveDataElementOptions(e,n).angle||o):0}}ie(wa,"id","polarArea"),ie(wa,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ie(wa,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((a,s)=>{const c=e.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class pu extends Tr{}ie(pu,"id","pie"),ie(pu,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class il extends jn{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return wg.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(o.points=i,e!=="resize"){const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);const l={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let l=n;l<n+o;l++){const c=e[l],u=this.resolveDataElementOptions(l,c.active?"active":i),p=a.getPointPositionForValue(l,this.getParsed(l).r),h=s?a.xCenter:p.x,m=s?a.yCenter:p.y,b={x:h,y:m,angle:p.angle,skip:isNaN(h)||isNaN(m),options:u};this.updateElement(c,l,b,i)}}}ie(il,"id","radar"),ie(il,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ie(il,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class al extends jn{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(e),l=i.getLabelForValue(s.x),c=a.getLabelForValue(s.y);return{label:o[e]||"",value:"("+l+", "+c+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:s}=ig(n,o,i);if(this._drawStart=a,this._drawCount=s,ag(n)&&(a=0,s=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=o;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,a,s,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const a=i==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,p=this.resolveDataElementOptions(n,i),h=this.getSharedOptions(p),m=this.includeOptions(i,h),b=s.axis,y=l.axis,{spanGaps:v,segment:w}=this.options,A=hi(v)?v:Number.POSITIVE_INFINITY,I=this.chart._animationsDisabled||a||i==="none";let V=n>0&&this.getParsed(n-1);for(let R=n;R<n+o;++R){const E=e[R],T=this.getParsed(R),B=I?E:{},H=Ve(T[y]),_=B[b]=s.getPixelForValue(T[b],R),j=B[y]=a||H?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,T,c):T[y],R);B.skip=isNaN(_)||isNaN(j)||H,B.stop=R>0&&Math.abs(T[b]-V[b])>A,w&&(B.parsed=T,B.raw=u.data[R]),m&&(B.options=h||this.resolveDataElementOptions(R,E.active?"active":i)),I||this.updateElement(E,R,B,i),V=T}this.updateSharedOptions(h,i,p)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}}ie(al,"id","scatter"),ie(al,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),ie(al,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var sA=Object.freeze({__proto__:null,BarController:nl,BubbleController:ol,DoughnutController:Tr,LineController:rl,PieController:pu,PolarAreaController:wa,RadarController:il,ScatterController:al});function Mr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hu{constructor(e){ie(this,"options");this.options=e||{}}static override(e){Object.assign(hu.prototype,e)}init(){}formats(){return Mr()}parse(){return Mr()}format(){return Mr()}add(){return Mr()}diff(){return Mr()}startOf(){return Mr()}endOf(){return Mr()}}var lA={_date:hu};function dA(t,e,n,o){const{controller:i,data:a,_sorted:s}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&s&&a.length){const c=l._reversePixels?NS:xo;if(o){if(i._sharedOptions){const u=a[0],p=typeof u.getRange=="function"&&u.getRange(e);if(p){const h=c(a,e,n-p),m=c(a,e,n+p);return{lo:h.lo,hi:m.hi}}}}else return c(a,e,n)}return{lo:0,hi:a.length-1}}function xa(t,e,n,o,i){const a=t.getSortedVisibleDatasetMetas(),s=n[e];for(let l=0,c=a.length;l<c;++l){const{index:u,data:p}=a[l],{lo:h,hi:m}=dA(a[l],e,s,i);for(let b=h;b<=m;++b){const y=p[b];y.skip||o(y,u,b)}}}function cA(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const a=e?Math.abs(o.x-i.x):0,s=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function mu(t,e,n,o,i){const a=[];return!i&&!t.isPointInArea(e)||xa(t,n,e,function(l,c,u){!i&&!So(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&a.push({element:l,datasetIndex:c,index:u})},!0),a}function uA(t,e,n,o){let i=[];function a(s,l,c){const{startAngle:u,endAngle:p}=s.getProps(["startAngle","endAngle"],o),{angle:h}=$m(s,{x:e.x,y:e.y});ma(h,u,p)&&i.push({element:s,datasetIndex:l,index:c})}return xa(t,n,e,a),i}function fA(t,e,n,o,i,a){let s=[];const l=cA(n);let c=Number.POSITIVE_INFINITY;function u(p,h,m){const b=p.inRange(e.x,e.y,i);if(o&&!b)return;const y=p.getCenterPoint(i);if(!(!!a||t.isPointInArea(y))&&!b)return;const w=l(e,y);w<c?(s=[{element:p,datasetIndex:h,index:m}],c=w):w===c&&s.push({element:p,datasetIndex:h,index:m})}return xa(t,n,e,u),s}function gu(t,e,n,o,i,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!o?uA(t,e,n,i):fA(t,e,n,o,i,a)}function Qg(t,e,n,o,i){const a=[],s=n==="x"?"inXRange":"inYRange";let l=!1;return xa(t,n,e,(c,u,p)=>{c[s](e[n],i)&&(a.push({element:c,datasetIndex:u,index:p}),l=l||c.inRange(e.x,e.y,i))}),o&&!l?[]:a}var pA={evaluateInteractionItems:xa,modes:{index(t,e,n,o){const i=Rr(e,t),a=n.axis||"x",s=n.includeInvisible||!1,l=n.intersect?mu(t,i,a,o,s):gu(t,i,a,!1,o,s),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const p=l[0].index,h=u.data[p];h&&!h.skip&&c.push({element:h,datasetIndex:u.index,index:p})}),c):[]},dataset(t,e,n,o){const i=Rr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;let l=n.intersect?mu(t,i,a,o,s):gu(t,i,a,!1,o,s);if(l.length>0){const c=l[0].datasetIndex,u=t.getDatasetMeta(c).data;l=[];for(let p=0;p<u.length;++p)l.push({element:u[p],datasetIndex:c,index:p})}return l},point(t,e,n,o){const i=Rr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return mu(t,i,a,o,s)},nearest(t,e,n,o){const i=Rr(e,t),a=n.axis||"xy",s=n.includeInvisible||!1;return gu(t,i,a,n.intersect,o,s)},x(t,e,n,o){const i=Rr(e,t);return Qg(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Rr(e,t);return Qg(t,i,"y",n.intersect,o)}}};const Xg=["left","top","right","bottom"];function Sa(t,e){return t.filter(n=>n.pos===e)}function qg(t,e){return t.filter(n=>Xg.indexOf(n.pos)===-1&&n.box.axis===e)}function Ca(t,e){return t.sort((n,o)=>{const i=e?o:n,a=e?n:o;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function hA(t){const e=[];let n,o,i,a,s,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:a,options:{stack:s,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:l});return e}function mA(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:a}=n;if(!o||!Xg.includes(i))continue;const s=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return e}function gA(t,e){const n=mA(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let a,s,l;for(a=0,s=t.length;a<s;++a){l=t[a];const{fullSize:c}=l.box,u=n[l.stack],p=u&&l.stackWeight/u.weight;l.horizontal?(l.width=p?p*o:c&&e.availableWidth,l.height=i):(l.width=o,l.height=p?p*i:c&&e.availableHeight)}return n}function bA(t){const e=hA(t),n=Ca(e.filter(u=>u.box.fullSize),!0),o=Ca(Sa(e,"left"),!0),i=Ca(Sa(e,"right")),a=Ca(Sa(e,"top"),!0),s=Ca(Sa(e,"bottom")),l=qg(e,"x"),c=qg(e,"y");return{fullSize:n,leftAndTop:o.concat(a),rightAndBottom:i.concat(c).concat(s).concat(l),chartArea:Sa(e,"chartArea"),vertical:o.concat(i).concat(c),horizontal:a.concat(s).concat(l)}}function Kg(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function Jg(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function yA(t,e,n,o){const{pos:i,box:a}=n,s=t.maxPadding;if(!Re(i)){n.size&&(t[i]-=n.size);const h=o[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?a.height:a.width),n.size=h.size/h.count,t[i]+=n.size}a.getPadding&&Jg(s,a.getPadding());const l=Math.max(0,e.outerWidth-Kg(s,t,"left","right")),c=Math.max(0,e.outerHeight-Kg(s,t,"top","bottom")),u=l!==t.w,p=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:p}:{same:p,other:u}}function vA(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function kA(t,e){const n=e.maxPadding;function o(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(e[s],n[s])}),a}return o(t?["left","right"]:["top","bottom"])}function Aa(t,e,n,o){const i=[];let a,s,l,c,u,p;for(a=0,s=t.length,u=0;a<s;++a){l=t[a],c=l.box,c.update(l.width||e.w,l.height||e.h,kA(l.horizontal,e));const{same:h,other:m}=yA(e,n,l,o);u|=h&&i.length,p=p||m,c.fullSize||i.push(l)}return u&&Aa(i,e,n,o)||p}function sl(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function Yg(t,e,n,o){const i=n.padding;let{x:a,y:s}=e;for(const l of t){const c=l.box,u=o[l.stack]||{count:1,placed:0,weight:1},p=l.stackWeight/u.weight||1;if(l.horizontal){const h=e.w*p,m=u.size||c.height;pa(u.start)&&(s=u.start),c.fullSize?sl(c,i.left,s,n.outerWidth-i.right-i.left,m):sl(c,e.left+u.placed,s,h,m),u.start=s,u.placed+=h,s=c.bottom}else{const h=e.h*p,m=u.size||c.width;pa(u.start)&&(a=u.start),c.fullSize?sl(c,a,i.top,m,n.outerHeight-i.bottom-i.top):sl(c,a,e.top+u.placed,m,h),u.start=a,u.placed+=h,a=c.right}}e.x=a,e.y=s}var _t={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=Ft(t.options.layout.padding),a=Math.max(e-i.width,0),s=Math.max(n-i.height,0),l=bA(t.boxes),c=l.vertical,u=l.horizontal;We(t.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const p=c.reduce((v,w)=>w.box.options&&w.box.options.display===!1?v:v+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/p,hBoxMaxHeight:s/2}),m=Object.assign({},i);Jg(m,Ft(o));const b=Object.assign({maxPadding:m,w:a,h:s,x:i.left,y:i.top},i),y=gA(c.concat(u),h);Aa(l.fullSize,b,h,y),Aa(c,b,h,y),Aa(u,b,h,y)&&Aa(c,b,h,y),vA(b),Yg(l.leftAndTop,b,h,y),b.x+=b.w,b.y+=b.h,Yg(l.rightAndBottom,b,h,y),t.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},We(l.chartArea,v=>{const w=v.box;Object.assign(w,t.chartArea),w.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class Zg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class wA extends Zg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ll="$chartjs",xA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$g=t=>t===null||t==="";function SA(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[ll]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",$g(i)){const a=Cg(t,"width");a!==void 0&&(t.width=a)}if($g(o))if(t.style.height==="")t.height=t.width/(e||2);else{const a=Cg(t,"height");a!==void 0&&(t.height=a)}return t}const e0=AC?{passive:!0}:!1;function CA(t,e,n){t&&t.addEventListener(e,n,e0)}function AA(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,e0)}function DA(t,e){const n=xA[t.type]||t.type,{x:o,y:i}=Rr(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function dl(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function EA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||dl(l.addedNodes,o),s=s&&!dl(l.removedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function BA(t,e,n){const o=t.canvas,i=new MutationObserver(a=>{let s=!1;for(const l of a)s=s||dl(l.removedNodes,o),s=s&&!dl(l.addedNodes,o);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Da=new Map;let t0=0;function n0(){const t=window.devicePixelRatio;t!==t0&&(t0=t,Da.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function PA(t,e){Da.size||window.addEventListener("resize",n0),Da.set(t,e)}function OA(t){Da.delete(t),Da.size||window.removeEventListener("resize",n0)}function IA(t,e,n){const o=t.canvas,i=o&&du(o);if(!i)return;const a=rg((l,c)=>{const u=i.clientWidth;n(l,c),u<i.clientWidth&&n()},window),s=new ResizeObserver(l=>{const c=l[0],u=c.contentRect.width,p=c.contentRect.height;u===0&&p===0||a(u,p)});return s.observe(i),PA(t,a),s}function bu(t,e,n){n&&n.disconnect(),e==="resize"&&OA(t)}function NA(t,e,n){const o=t.canvas,i=rg(a=>{t.ctx!==null&&n(DA(a,t))},t);return CA(o,e,i),i}class VA extends Zg{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(SA(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[ll])return!1;const o=n[ll].initial;["height","width"].forEach(a=>{const s=o[a];Ve(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=o.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[ll],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),s={attach:EA,detach:BA,resize:IA}[n]||NA;i[n]=s(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:bu,detach:bu,resize:bu}[n]||AA)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return CC(e,n,o,i)}isAttached(e){const n=e&&du(e);return!!(n&&n.isConnected)}}function RA(t){return!lu()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?wA:VA}let Ao=(id=class{constructor(){ie(this,"x");ie(this,"y");ie(this,"active",!1);ie(this,"options");ie(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return hi(this.x)&&hi(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(a=>{i[a]=o[a]&&o[a].active()?o[a]._to:this[a]}),i}},ie(id,"defaults",{}),ie(id,"defaultRoutes"),id);function FA(t,e){const n=t.options.ticks,o=TA(t),i=Math.min(n.maxTicksLimit||o,o),a=n.major.enabled?LA(e):[],s=a.length,l=a[0],c=a[s-1],u=[];if(s>i)return zA(e,u,a,s/i),u;const p=MA(a,e,i);if(s>0){let h,m;const b=s>1?Math.round((c-l)/(s-1)):null;for(cl(e,u,p,Ve(b)?0:l-b,l),h=0,m=s-1;h<m;h++)cl(e,u,p,a[h],a[h+1]);return cl(e,u,p,c,Ve(b)?e.length:c+b),u}return cl(e,u,p),u}function TA(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function MA(t,e,n){const o=_A(t),i=e.length/n;if(!o)return Math.max(i,1);const a=BS(o);for(let s=0,l=a.length-1;s<l;s++){const c=a[s];if(c>i)return c}return Math.max(i,1)}function LA(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function zA(t,e,n,o){let i=0,a=n[0],s;for(o=Math.ceil(o),s=0;s<t.length;s++)s===a&&(e.push(t[s]),i++,a=n[i*o])}function cl(t,e,n,o,i){const a=Ce(o,0),s=Math.min(Ce(i,t.length),t.length);let l=0,c,u,p;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),p=a;p<0;)l++,p=Math.round(a+l*n);for(u=Math.max(a,0);u<s;u++)u===p&&(e.push(t[u]),l++,p=Math.round(a+l*n))}function _A(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const HA=t=>t==="left"?"right":t==="right"?"left":t,o0=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,r0=(t,e)=>Math.min(e||t,t);function i0(t,e){const n=[],o=t.length/e,i=t.length;let a=0;for(;a<i;a+=o)n.push(t[Math.floor(a)]);return n}function UA(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),a=t._startPixel,s=t._endPixel,l=1e-6;let c=t.getPixelForTick(i),u;if(!(n&&(o===1?u=Math.max(c-a,s-c):e===0?u=(t.getPixelForTick(1)-c)/2:u=(c-t.getPixelForTick(i-1))/2,c+=i<e?u:-u,c<a-l||c>s+l)))return c}function WA(t,e){We(t,n=>{const o=n.gc,i=o.length/2;let a;if(i>e){for(a=0;a<i;++a)delete n.data[o[a]];o.splice(0,i)}})}function Ea(t){return t.drawTicks?t.tickLength:0}function a0(t,e){if(!t.display)return 0;const n=wt(t.font,e),o=Ft(t.padding);return(Ye(t.text)?t.text.length:1)*n.lineHeight+o.height}function jA(t,e){return rr(t,{scale:e,type:"scale"})}function GA(t,e,n){return rr(t,{tick:n,index:e,type:"tick"})}function QA(t,e,n){let o=Zc(t);return(n&&e!=="right"||!n&&e==="right")&&(o=HA(o)),o}function XA(t,e,n,o){const{top:i,left:a,bottom:s,right:l,chart:c}=t,{chartArea:u,scales:p}=c;let h=0,m,b,y;const v=s-i,w=l-a;if(t.isHorizontal()){if(b=zt(o,a,l),Re(n)){const A=Object.keys(n)[0],I=n[A];y=p[A].getPixelForValue(I)+v-e}else n==="center"?y=(u.bottom+u.top)/2+v-e:y=o0(t,n,e);m=l-a}else{if(Re(n)){const A=Object.keys(n)[0],I=n[A];b=p[A].getPixelForValue(I)-w+e}else n==="center"?b=(u.left+u.right)/2-w+e:b=o0(t,n,e);y=zt(o,s,i),h=n==="left"?-gt:gt}return{titleX:b,titleY:y,maxWidth:m,rotation:h}}class Lr extends Ao{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=gn(e,Number.POSITIVE_INFINITY),n=gn(n,Number.NEGATIVE_INFINITY),o=gn(o,Number.POSITIVE_INFINITY),i=gn(i,Number.NEGATIVE_INFINITY),{min:gn(e,o),max:gn(n,i),minDefined:ht(e),maxDefined:ht(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let c=0,u=l.length;c<u;++c)s=l[c].controller.getMinMax(this,e),i||(n=Math.min(n,s.min)),a||(o=Math.max(o,s.max));return n=a&&n>o?o:n,o=i&&n>o?n:o,{min:gn(n,gn(o,n)),max:gn(o,gn(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Qe(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:a,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nC(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?i0(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=FA(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Qe(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,a;for(o=0,i=e.length;o<i;o++)a=e[o],a.label=Qe(n.callback,[a.value,o,e],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=r0(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let s=i,l,c,u;if(!this._isVisible()||!n.display||i>=a||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),h=p.widest.width,m=p.highest.height,b=Bt(this.chart.width-h,0,this.maxWidth);l=e.offset?this.maxWidth/o:b/(o-1),h+6>l&&(l=b/(o-(e.offset?.5:1)),c=this.maxHeight-Ea(e.grid)-n.padding-a0(e.title,this.chart.options.font),u=Math.sqrt(h*h+m*m),s=Kc(Math.min(Math.asin(Bt((p.highest.height+6)/l,-1,1)),Math.asin(Bt(c/u,-1,1))-Math.asin(Bt(m/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:a}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const c=a0(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=Ea(a)+c):(e.height=this.maxHeight,e.width=Ea(a)+c),o.display&&this.ticks.length){const{first:u,last:p,widest:h,highest:m}=this._getLabelSizes(),b=o.padding*2,y=Wn(this.labelRotation),v=Math.cos(y),w=Math.sin(y);if(l){const A=o.mirror?0:w*h.width+v*m.height;e.height=Math.min(this.maxHeight,e.height+A+b)}else{const A=o.mirror?0:v*h.width+w*m.height;e.width=Math.min(this.maxWidth,e.width+A+b)}this._calculatePadding(u,p,w,v)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:a,padding:s},position:l}=this.options,c=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,b=0;c?u?(m=i*e.width,b=o*n.height):(m=o*e.height,b=i*n.width):a==="start"?b=n.width:a==="end"?m=e.width:a!=="inner"&&(m=e.width/2,b=n.width/2),this.paddingLeft=Math.max((m-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-h+s)*this.width/(this.width-h),0)}else{let p=n.height/2,h=e.height/2;a==="start"?(p=0,h=e.height):a==="end"&&(p=n.height,h=0),this.paddingTop=p+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)Ve(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=i0(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:a}=this,s=[],l=[],c=Math.floor(n/r0(n,o));let u=0,p=0,h,m,b,y,v,w,A,I,V,R,E;for(h=0;h<n;h+=c){if(y=e[h].label,v=this._resolveTickFontOptions(h),i.font=w=v.string,A=a[w]=a[w]||{data:{},gc:[]},I=v.lineHeight,V=R=0,!Ve(y)&&!Ye(y))V=Ks(i,A.data,A.gc,V,y),R=I;else if(Ye(y))for(m=0,b=y.length;m<b;++m)E=y[m],!Ve(E)&&!Ye(E)&&(V=Ks(i,A.data,A.gc,V,E),R+=I);s.push(V),l.push(R),u=Math.max(V,u),p=Math.max(R,p)}WA(a,n);const T=s.indexOf(u),B=l.indexOf(p),H=_=>({width:s[_]||0,height:l[_]||0});return{first:H(0),last:H(n-1),widest:H(T),highest:H(B),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return IS(this._alignToPixels?Or(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=GA(this.getContext(),e,o))}return this.$context||(this.$context=jA(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Wn(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=e.autoSkipPadding||0,l=a?a.widest.width+s:0,c=a?a.highest.height+s:0;return this.isHorizontal()?c*o>l*i?l/o:c/i:c*i<l*o?c/o:l/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:a,position:s,border:l}=i,c=a.offset,u=this.isHorizontal(),h=this.ticks.length+(c?1:0),m=Ea(a),b=[],y=l.setContext(this.getContext()),v=y.display?y.width:0,w=v/2,A=function(C){return Or(o,C,v)};let I,V,R,E,T,B,H,_,j,Q,F,S;if(s==="top")I=A(this.bottom),B=this.bottom-m,_=I-w,Q=A(e.top)+w,S=e.bottom;else if(s==="bottom")I=A(this.top),Q=e.top,S=A(e.bottom)-w,B=I+w,_=this.top+m;else if(s==="left")I=A(this.right),T=this.right-m,H=I-w,j=A(e.left)+w,F=e.right;else if(s==="right")I=A(this.left),j=e.left,F=A(e.right)-w,T=I+w,H=this.left+m;else if(n==="x"){if(s==="center")I=A((e.top+e.bottom)/2+.5);else if(Re(s)){const C=Object.keys(s)[0],M=s[C];I=A(this.chart.scales[C].getPixelForValue(M))}Q=e.top,S=e.bottom,B=I+w,_=B+m}else if(n==="y"){if(s==="center")I=A((e.left+e.right)/2);else if(Re(s)){const C=Object.keys(s)[0],M=s[C];I=A(this.chart.scales[C].getPixelForValue(M))}T=I-w,H=T-m,j=e.left,F=e.right}const x=Ce(i.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/x));for(V=0;V<h;V+=P){const C=this.getContext(V),M=a.setContext(C),L=l.setContext(C),K=M.lineWidth,oe=M.color,le=L.dash||[],Z=L.dashOffset,ae=M.tickWidth,fe=M.tickColor,he=M.tickBorderDash||[],Ie=M.tickBorderDashOffset;R=UA(this,V,c),R!==void 0&&(E=Or(o,R,K),u?T=H=j=F=E:B=_=Q=S=E,b.push({tx1:T,ty1:B,tx2:H,ty2:_,x1:j,y1:Q,x2:F,y2:S,width:K,color:oe,borderDash:le,borderDashOffset:Z,tickWidth:ae,tickColor:fe,tickBorderDash:he,tickBorderDashOffset:Ie}))}return this._ticksLength=h,this._borderValue=I,b}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:a}=o,s=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:u,padding:p,mirror:h}=a,m=Ea(o.grid),b=m+p,y=h?-p:b,v=-Wn(this.labelRotation),w=[];let A,I,V,R,E,T,B,H,_,j,Q,F,S="middle";if(i==="top")T=this.bottom-y,B=this._getXAxisLabelAlignment();else if(i==="bottom")T=this.top+y,B=this._getXAxisLabelAlignment();else if(i==="left"){const P=this._getYAxisLabelAlignment(m);B=P.textAlign,E=P.x}else if(i==="right"){const P=this._getYAxisLabelAlignment(m);B=P.textAlign,E=P.x}else if(n==="x"){if(i==="center")T=(e.top+e.bottom)/2+b;else if(Re(i)){const P=Object.keys(i)[0],C=i[P];T=this.chart.scales[P].getPixelForValue(C)+b}B=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")E=(e.left+e.right)/2-b;else if(Re(i)){const P=Object.keys(i)[0],C=i[P];E=this.chart.scales[P].getPixelForValue(C)}B=this._getYAxisLabelAlignment(m).textAlign}n==="y"&&(c==="start"?S="top":c==="end"&&(S="bottom"));const x=this._getLabelSizes();for(A=0,I=l.length;A<I;++A){V=l[A],R=V.label;const P=a.setContext(this.getContext(A));H=this.getPixelForTick(A)+a.labelOffset,_=this._resolveTickFontOptions(A),j=_.lineHeight,Q=Ye(R)?R.length:1;const C=Q/2,M=P.color,L=P.textStrokeColor,K=P.textStrokeWidth;let oe=B;s?(E=H,B==="inner"&&(A===I-1?oe=this.options.reverse?"left":"right":A===0?oe=this.options.reverse?"right":"left":oe="center"),i==="top"?u==="near"||v!==0?F=-Q*j+j/2:u==="center"?F=-x.highest.height/2-C*j+j:F=-x.highest.height+j/2:u==="near"||v!==0?F=j/2:u==="center"?F=x.highest.height/2-C*j:F=x.highest.height-Q*j,h&&(F*=-1),v!==0&&!P.showLabelBackdrop&&(E+=j/2*Math.sin(v))):(T=H,F=(1-Q)*j/2);let le;if(P.showLabelBackdrop){const Z=Ft(P.backdropPadding),ae=x.heights[A],fe=x.widths[A];let he=F-Z.top,Ie=0-Z.left;switch(S){case"middle":he-=ae/2;break;case"bottom":he-=ae;break}switch(B){case"center":Ie-=fe/2;break;case"right":Ie-=fe;break;case"inner":A===I-1?Ie-=fe:A>0&&(Ie-=fe/2);break}le={left:Ie,top:he,width:fe+Z.width,height:ae+Z.height,color:P.backdropColor}}w.push({label:R,font:_,textOffset:F,options:{rotation:v,color:M,strokeColor:L,strokeWidth:K,textAlign:oe,textBaseline:S,translation:[E,T],backdrop:le}})}return w}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Wn(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),l=e+a,c=s.widest.width;let u,p;return n==="left"?i?(p=this.right+a,o==="near"?u="left":o==="center"?(u="center",p+=c/2):(u="right",p+=c)):(p=this.right-l,o==="near"?u="right":o==="center"?(u="center",p-=c/2):(u="left",p=this.left)):n==="right"?i?(p=this.left+a,o==="near"?u="right":o==="center"?(u="center",p-=c/2):(u="left",p-=c)):(p=this.left+l,o==="near"?u="left":o==="center"?(u="center",p+=c/2):(u="right",p=this.right)):u="right",{textAlign:u,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:a,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,a,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,s;const l=(c,u,p)=>{!p.width||!p.color||(o.save(),o.lineWidth=p.width,o.strokeStyle=p.color,o.setLineDash(p.borderDash||[]),o.lineDashOffset=p.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(u.x,u.y),o.stroke(),o.restore())};if(n.display)for(a=0,s=i.length;a<s;++a){const c=i[a];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,a=o.setContext(this.getContext()),s=o.display?a.width:0;if(!s)return;const l=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let u,p,h,m;this.isHorizontal()?(u=Or(e,this.left,s)-s/2,p=Or(e,this.right,l)+l/2,h=m=c):(h=Or(e,this.top,s)-s/2,m=Or(e,this.bottom,l)+l/2,u=p=c),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,h),n.lineTo(p,m),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Js(o,i);const a=this.getLabelItems(e);for(const s of a){const l=s.options,c=s.font,u=s.label,p=s.textOffset;Ir(o,u,0,p,c,l)}i&&Ys(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const a=wt(o.font),s=Ft(o.padding),l=o.align;let c=a.lineHeight/2;n==="bottom"||n==="center"||Re(n)?(c+=s.bottom,Ye(o.text)&&(c+=a.lineHeight*(o.text.length-1))):c+=s.top;const{titleX:u,titleY:p,maxWidth:h,rotation:m}=XA(this,c,n,l);Ir(e,o.text,0,0,a,{color:o.color,maxWidth:h,rotation:m,textAlign:QA(l,n,i),textBaseline:"middle",translation:[u,p]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Ce(e.grid&&e.grid.z,-1),i=Ce(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Lr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:o,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a<s;++a){const l=n[a];l[o]===this.id&&(!e||l.type===e)&&i.push(l)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return wt(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ul{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;JA(n)&&(o=this.register(n));const i=this.items,a=e.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in i||(i[a]=e,qA(e,s,o),this.override&&dt.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in dt[i]&&(delete dt[i][o],this.override&&delete Pr[o])}}function qA(t,e,n){const o=ao(Object.create(null),[n?dt.get(n):{},dt.get(e),t.defaults]);dt.set(e,o),t.defaultRoutes&&KA(e,t.defaultRoutes),t.descriptors&&dt.describe(e,t.descriptors)}function KA(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),a=[t].concat(o).join("."),s=e[n].split("."),l=s.pop(),c=s.join(".");dt.route(a,i,c,l)})}function JA(t){return"id"in t&&"defaults"in t}class YA{constructor(){this.controllers=new ul(jn,"datasets",!0),this.elements=new ul(Ao,"elements"),this.plugins=new ul(Object,"plugins"),this.scales=new ul(Lr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const a=o||this._getRegistryForType(i);o||a.isForType(i)||a===this.plugins&&i.id?this._exec(e,a,i):We(i,s=>{const l=o||this._getRegistryForType(s);this._exec(e,l,s)})})}_exec(e,n,o){const i=qc(e);Qe(o["before"+i],[],o),n[e](o),Qe(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var lo=new YA;class ZA{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=i?this._descriptors(e).filter(i):this._descriptors(e),s=this._notify(a,e,n,o);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,o,i){i=i||{};for(const a of e){const s=a.plugin,l=s[o],c=[n,i,a.options];if(Qe(l,c,s)===!1&&i.cancelable)return!1}return!0}invalidate(){Ve(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Ce(o.options&&o.options.plugins,{}),a=$A(o);return i===!1&&!n?[]:t4(e,a,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(a,s)=>a.filter(l=>!s.some(c=>l.plugin.id===c.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function $A(t){const e={},n=[],o=Object.keys(lo.plugins.items);for(let a=0;a<o.length;a++)n.push(lo.getPlugin(o[a]));const i=t.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function e4(t,e){return!e&&t===!1?null:t===!0?{}:t}function t4(t,{plugins:e,localIds:n},o,i){const a=[],s=t.getContext();for(const l of e){const c=l.id,u=e4(o[c],i);u!==null&&a.push({plugin:l,options:n4(t.config,{plugin:l,local:n[c]},u,s)})}return a}function n4(t,{plugin:e,local:n},o,i){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(o,a);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yu(t,e){const n=dt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function o4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function r4(t,e){return t===e?"_index_":"_value_"}function s0(t){if(t==="x"||t==="y"||t==="r")return t}function i4(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function vu(t,...e){if(s0(t))return t;for(const n of e){const o=n.axis||i4(n.position)||t.length>1&&s0(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function l0(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function a4(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return l0(t,"x",n[0])||l0(t,"y",n[0])}return{}}function s4(t,e){const n=Pr[t.type]||{scales:{}},o=e.scales||{},i=yu(t.type,e),a=Object.create(null);return Object.keys(o).forEach(s=>{const l=o[s];if(!Re(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const c=vu(s,l,a4(s,t),dt.scales[l.type]),u=r4(c,i),p=n.scales||{};a[s]=fa(Object.create(null),[{axis:c},l,p[c],p[u]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,c=s.indexAxis||yu(l,e),p=(Pr[l]||{}).scales||{};Object.keys(p).forEach(h=>{const m=o4(h,c),b=s[m+"AxisID"]||m;a[b]=a[b]||Object.create(null),fa(a[b],[{axis:m},o[b],p[h]])})}),Object.keys(a).forEach(s=>{const l=a[s];fa(l,[dt.scales[l.type],dt.scale])}),a}function d0(t){const e=t.options||(t.options={});e.plugins=Ce(e.plugins,{}),e.scales=s4(t,e)}function c0(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function l4(t){return t=t||{},t.data=c0(t.data),d0(t),t}const u0=new Map,f0=new Set;function fl(t,e){let n=u0.get(t);return n||(n=e(),u0.set(t,n),f0.add(n)),n}const Ba=(t,e,n)=>{const o=tr(e,n);o!==void 0&&t.add(o)};class d4{constructor(e){this._config=l4(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=c0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),d0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return fl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return fl(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return fl(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return fl(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:a}=this,s=this._cachedScopes(e,o),l=s.get(n);if(l)return l;const c=new Set;n.forEach(p=>{e&&(c.add(e),p.forEach(h=>Ba(c,e,h))),p.forEach(h=>Ba(c,i,h)),p.forEach(h=>Ba(c,Pr[a]||{},h)),p.forEach(h=>Ba(c,dt,h)),p.forEach(h=>Ba(c,tu,h))});const u=Array.from(c);return u.length===0&&u.push(Object.create(null)),f0.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Pr[n]||{},dt.datasets[n]||{},{type:n},dt,tu]}resolveNamedOptions(e,n,o,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:l}=p0(this._resolverCache,e,i);let c=s;if(u4(s,n)){a.$shared=!1,o=nr(o)?o():o;const u=this.createResolver(e,o,l);c=mi(s,o,u)}for(const u of n)a[u]=c[u];return a}createResolver(e,n,o=[""],i){const{resolver:a}=p0(this._resolverCache,e,o);return Re(n)?mi(a,n,void 0,i):a}}function p0(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let a=o.get(i);return a||(a={resolver:iu(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,a)),a}const c4=t=>Re(t)&&Object.getOwnPropertyNames(t).some(e=>nr(t[e]));function u4(t,e){const{isScriptable:n,isIndexable:o}=mg(t);for(const i of e){const a=n(i),s=o(i),l=(s||a)&&t[i];if(a&&(nr(l)||c4(l))||s&&Ye(l))return!0}return!1}var f4="4.4.3";const p4=["top","bottom","left","right","chartArea"];function h0(t,e){return t==="top"||t==="bottom"||p4.indexOf(t)===-1&&e==="x"}function m0(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function g0(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[t],e)}function h4(t){const e=t.chart,n=e.options.animation;Qe(n&&n.onProgress,[t],e)}function b0(t){return lu()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const pl={},y0=t=>{const e=b0(t);return Object.values(pl).filter(n=>n.canvas===e).pop()};function m4(t,e,n){const o=Object.keys(t);for(const i of o){const a=+i;if(a>=e){const s=t[i];delete t[i],(n>0||a>e)&&(t[a+n]=s)}}}function g4(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function hl(t,e,n){return t.options.clip?t[n]:e[n]}function b4(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:hl(n,e,"left"),right:hl(n,e,"right"),top:hl(o,e,"top"),bottom:hl(o,e,"bottom")}:e}class Zt{static register(...e){lo.add(...e),v0()}static unregister(...e){lo.remove(...e),v0()}constructor(e,n){const o=this.config=new d4(n),i=b0(e),a=y0(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||RA(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,s.aspectRatio),c=l&&l.canvas,u=c&&c.height,p=c&&c.width;if(this.id=vS(),this.ctx=l,this.canvas=c,this.width=p,this.height=u,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ZA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=FS(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],pl[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Co.listen(this,"complete",g0),Co.listen(this,"progress",h4),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:a}=this;return Ve(e)?n&&a?a:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return lo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Sg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fg(this.canvas,this.ctx),this}stop(){return Co.stop(this),this}resize(e,n){Co.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,e,n,a),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Sg(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),Qe(o.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};We(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((s,l)=>(s[l]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const l=n[s],c=vu(s,l),u=c==="r",p=c==="x";return{options:l,dposition:u?"chartArea":p?"bottom":"left",dtype:u?"radialLinear":p?"category":"linear"}}))),We(a,s=>{const l=s.options,c=l.id,u=vu(c,l),p=Ce(l.type,s.dtype);(l.position===void 0||h0(l.position,u)!==h0(s.dposition))&&(l.position=s.dposition),i[c]=!0;let h=null;if(c in o&&o[c].type===p)h=o[c];else{const m=lo.getScale(p);h=new m({id:c,type:p,ctx:this.ctx,chart:this}),o[h.id]=h}h.init(l,e)}),We(i,(s,l)=>{s||delete o[l]}),We(o,s=>{_t.configure(this,s,s.options),_t.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,a)=>i.index-a.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(m0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const a=n[o];let s=this.getDatasetMeta(o);const l=a.type||this.config.type;if(s.type&&s.type!==l&&(this._destroyDatasetMeta(o),s=this.getDatasetMeta(o)),s.type=l,s.indexAxis=a.indexAxis||yu(l,this.options),s.order=a.order||0,s.index=o,s.label=""+a.label,s.visible=this.isDatasetVisible(o),s.controller)s.controller.updateIndex(o),s.controller.linkScales();else{const c=lo.getController(l),{datasetElementType:u,dataElementType:p}=dt.datasets[l];Object.assign(c,{dataElementType:lo.getElement(p),datasetElementType:u&&lo.getElement(u)}),s.controller=new c(this,o),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){We(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,p=this.data.datasets.length;u<p;u++){const{controller:h}=this.getDatasetMeta(u),m=!i&&a.indexOf(h)===-1;h.buildOrUpdateElements(m),s=Math.max(+h.getMaxOverflow(),s)}s=this._minPadding=o.layout.autoPadding?s:0,this._updateLayout(s),i||We(a,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(m0("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){We(this.scales,e=>{_t.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!qm(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:a}of n){const s=o==="_removeElements"?-a:a;m4(e,i,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=a=>new Set(e.filter(s=>s[0]===a).map((s,l)=>l+","+s.splice(1).join(","))),i=o(0);for(let a=1;a<n;a++)if(!qm(i,o(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;_t.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],We(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,nr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Co.has(this)?this.attached&&!Co.running(this)&&Co.start(this):(this.draw(),g0({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,a;for(i=0,a=n.length;i<a;++i){const s=n[i];(!e||s.visible)&&o.push(s)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,a=b4(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Js(n,{left:o.left===!1?0:a.left-o.left,right:o.right===!1?this.width:a.right+o.right,top:o.top===!1?0:a.top-o.top,bottom:o.bottom===!1?this.height:a.bottom+o.bottom}),e.controller.draw(),i&&Ys(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return So(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const a=pA.modes[n];return typeof a=="function"?a(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=rr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",a=this.getDatasetMeta(e),s=a.controller._resolveAnimations(void 0,i);pa(n)?(a.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),s.update(a,{visible:o}),this.update(l=>l.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Co.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),fg(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete pl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(a,s)=>{n.addEventListener(this,a,s),e[a]=s},i=(a,s,l)=>{a.offsetX=s,a.offsetY=l,this._eventHandler(a)};We(this.options.events,a=>o(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(c,u)=>{n.addEventListener(this,c,u),e[c]=u},i=(c,u)=>{e[c]&&(n.removeEventListener(this,c,u),delete e[c])},a=(c,u)=>{this.canvas&&this.resize(c,u)};let s;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",a),o("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():s()}unbindEvents(){We(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},We(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let a,s,l,c;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){s=e[l];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:a,index:s})=>{const l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[s],index:s}});!js(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,a=(c,u)=>c.filter(p=>!u.some(h=>p.datasetIndex===h.datasetIndex&&p.index===h.index)),s=a(n,e),l=o?e:a(e,n);s.length&&this.updateHoverStyle(s,i.mode,!1),l.length&&i.mode&&this.updateHoverStyle(l,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const a=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(a||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:a}=this,s=n,l=this._getActiveElements(e,i,o,s),c=AS(e),u=g4(e,this._lastEvent,o,c);o&&(this._lastEvent=null,Qe(a.onHover,[e,l,this],this),c&&Qe(a.onClick,[e,l,this],this));const p=!js(l,i);return(p||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=u,p}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,i)}}ie(Zt,"defaults",dt),ie(Zt,"instances",pl),ie(Zt,"overrides",Pr),ie(Zt,"registry",lo),ie(Zt,"version",f4),ie(Zt,"getChart",y0);function v0(){return We(Zt.instances,t=>t._plugins.invalidate())}function y4(t,e,n){const{startAngle:o,pixelMargin:i,x:a,y:s,outerRadius:l,innerRadius:c}=e;let u=i/l;t.beginPath(),t.arc(a,s,l,o-u,n+u),c>i?(u=i/c,t.arc(a,s,c,n+u,o-u,!0)):t.arc(a,s,i,n+gt,o-gt),t.closePath(),t.clip()}function v4(t){return ru(t,["outerStart","outerEnd","innerStart","innerEnd"])}function k4(t,e,n,o){const i=v4(t.options.borderRadius),a=(n-e)/2,s=Math.min(a,o*e/2),l=c=>{const u=(n-Math.min(a,c))*o/2;return Bt(c,0,Math.min(a,u))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:Bt(i.innerStart,0,s),innerEnd:Bt(i.innerEnd,0,s)}}function yi(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function ml(t,e,n,o,i,a){const{x:s,y:l,startAngle:c,pixelMargin:u,innerRadius:p}=e,h=Math.max(e.outerRadius+o+n-u,0),m=p>0?p+o+n+u:0;let b=0;const y=i-c;if(o){const P=p>0?p-o:0,C=h>0?h-o:0,M=(P+C)/2,L=M!==0?y*M/(M+o):y;b=(y-L)/2}const v=Math.max(.001,y*h-n/Ze)/h,w=(y-v)/2,A=c+w+b,I=i-w-b,{outerStart:V,outerEnd:R,innerStart:E,innerEnd:T}=k4(e,m,h,I-A),B=h-V,H=h-R,_=A+V/B,j=I-R/H,Q=m+E,F=m+T,S=A+E/Q,x=I-T/F;if(t.beginPath(),a){const P=(_+j)/2;if(t.arc(s,l,h,_,P),t.arc(s,l,h,P,j),R>0){const K=yi(H,j,s,l);t.arc(K.x,K.y,R,j,I+gt)}const C=yi(F,I,s,l);if(t.lineTo(C.x,C.y),T>0){const K=yi(F,x,s,l);t.arc(K.x,K.y,T,I+gt,x+Math.PI)}const M=(I-T/m+(A+E/m))/2;if(t.arc(s,l,m,I-T/m,M,!0),t.arc(s,l,m,M,A+E/m,!0),E>0){const K=yi(Q,S,s,l);t.arc(K.x,K.y,E,S+Math.PI,A-gt)}const L=yi(B,A,s,l);if(t.lineTo(L.x,L.y),V>0){const K=yi(B,_,s,l);t.arc(K.x,K.y,V,A-gt,_)}}else{t.moveTo(s,l);const P=Math.cos(_)*h+s,C=Math.sin(_)*h+l;t.lineTo(P,C);const M=Math.cos(j)*h+s,L=Math.sin(j)*h+l;t.lineTo(M,L)}t.closePath()}function w4(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l}=e;let c=e.endAngle;if(a){ml(t,e,n,o,c,i);for(let u=0;u<a;++u)t.fill();isNaN(l)||(c=s+(l%$e||$e))}return ml(t,e,n,o,c,i),t.fill(),c}function x4(t,e,n,o,i){const{fullCircles:a,startAngle:s,circumference:l,options:c}=e,{borderWidth:u,borderJoinStyle:p,borderDash:h,borderDashOffset:m}=c,b=c.borderAlign==="inner";if(!u)return;t.setLineDash(h||[]),t.lineDashOffset=m,b?(t.lineWidth=u*2,t.lineJoin=p||"round"):(t.lineWidth=u,t.lineJoin=p||"bevel");let y=e.endAngle;if(a){ml(t,e,n,o,y,i);for(let v=0;v<a;++v)t.stroke();isNaN(l)||(y=s+(l%$e||$e))}b&&y4(t,e,y),a||(ml(t,e,n,o,y,i),t.stroke())}class vi extends Ao{constructor(n){super();ie(this,"circumference");ie(this,"endAngle");ie(this,"fullCircles");ie(this,"innerRadius");ie(this,"outerRadius");ie(this,"pixelMargin");ie(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.getProps(["x","y"],i),{angle:s,distance:l}=$m(a,{x:n,y:o}),{startAngle:c,endAngle:u,innerRadius:p,outerRadius:h,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),b=(this.options.spacing+this.options.borderWidth)/2,v=Ce(m,u-c)>=$e||ma(s,c,u),w=wo(l,p+b,h+b);return v&&w}getCenterPoint(n){const{x:o,y:i,startAngle:a,endAngle:s,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:p}=this.options,h=(a+s)/2,m=(l+c+p+u)/2;return{x:o+Math.cos(h)*m,y:i+Math.sin(h)*m}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,a=(o.offset||0)/4,s=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>$e?Math.floor(i/$e):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*a,Math.sin(c)*a);const u=1-Math.sin(Math.min(Ze,i||0)),p=a*u;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,w4(n,this,p,s,l),x4(n,this,p,s,l),n.restore()}}ie(vi,"id","arc"),ie(vi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ie(vi,"defaultRoutes",{backgroundColor:"backgroundColor"}),ie(vi,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function k0(t,e,n=e){t.lineCap=Ce(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Ce(n.borderDash,e.borderDash)),t.lineDashOffset=Ce(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Ce(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Ce(n.borderWidth,e.borderWidth),t.strokeStyle=Ce(n.borderColor,e.borderColor)}function S4(t,e,n){t.lineTo(n.x,n.y)}function C4(t){return t.stepped?XS:t.tension||t.cubicInterpolationMode==="monotone"?qS:S4}function w0(t,e,n={}){const o=t.length,{start:i=0,end:a=o-1}=n,{start:s,end:l}=e,c=Math.max(i,s),u=Math.min(a,l),p=i<s&&a<s||i>l&&a>l;return{count:o,start:c,loop:e.loop,ilen:u<c&&!p?o+u-c:u-c}}function A4(t,e,n,o){const{points:i,options:a}=e,{count:s,start:l,loop:c,ilen:u}=w0(i,n,o),p=C4(a);let{move:h=!0,reverse:m}=o||{},b,y,v;for(b=0;b<=u;++b)y=i[(l+(m?u-b:b))%s],!y.skip&&(h?(t.moveTo(y.x,y.y),h=!1):p(t,v,y,m,a.stepped),v=y);return c&&(y=i[(l+(m?u:0))%s],p(t,v,y,m,a.stepped)),!!c}function D4(t,e,n,o){const i=e.points,{count:a,start:s,ilen:l}=w0(i,n,o),{move:c=!0,reverse:u}=o||{};let p=0,h=0,m,b,y,v,w,A;const I=R=>(s+(u?l-R:R))%a,V=()=>{v!==w&&(t.lineTo(p,w),t.lineTo(p,v),t.lineTo(p,A))};for(c&&(b=i[I(0)],t.moveTo(b.x,b.y)),m=0;m<=l;++m){if(b=i[I(m)],b.skip)continue;const R=b.x,E=b.y,T=R|0;T===y?(E<v?v=E:E>w&&(w=E),p=(h*p+R)/++h):(V(),t.lineTo(R,E),y=T,h=0,v=w=E),A=E}V()}function ku(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?D4:A4}function E4(t){return t.stepped?DC:t.tension||t.cubicInterpolationMode==="monotone"?EC:Fr}function B4(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),k0(t,e.options),t.stroke(i)}function P4(t,e,n,o){const{segments:i,options:a}=e,s=ku(e);for(const l of i)k0(t,a,l.style),t.beginPath(),s(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const O4=typeof Path2D=="function";function I4(t,e,n,o){O4&&!e.options.segment?B4(t,e,n,o):P4(t,e,n,o)}class ir extends Ao{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;yC(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=VC(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],a=this.points,s=Og(this,{property:n,start:i,end:i});if(!s.length)return;const l=[],c=E4(o);let u,p;for(u=0,p=s.length;u<p;++u){const{start:h,end:m}=s[u],b=a[h],y=a[m];if(b===y){l.push(b);continue}const v=Math.abs((i-b[n])/(y[n]-b[n])),w=c(b,y,v,o.stepped);w[n]=e[n],l.push(w)}return l.length===1?l[0]:l}pathSegment(e,n,o){return ku(this)(e,this,n,o)}path(e,n,o){const i=this.segments,a=ku(this);let s=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)s&=a(e,this,l,{start:n,end:n+o-1});return!!s}draw(e,n,o,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),I4(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ie(ir,"id","line"),ie(ir,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ie(ir,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ie(ir,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function x0(t,e,n,o){const i=t.options,{[n]:a}=t.getProps([n],o);return Math.abs(e-a)<i.radius+i.hitRadius}class Pa extends Ao{constructor(n){super();ie(this,"parsed");ie(this,"skip");ie(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const a=this.options,{x:s,y:l}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(o-l,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,o){return x0(this,n,"x",o)}inYRange(n,o){return x0(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!So(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,ou(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ie(Pa,"id","point"),ie(Pa,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ie(Pa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function S0(t,e){const{x:n,y:o,base:i,width:a,height:s}=t.getProps(["x","y","base","width","height"],e);let l,c,u,p,h;return t.horizontal?(h=s/2,l=Math.min(n,i),c=Math.max(n,i),u=o-h,p=o+h):(h=a/2,l=n-h,c=n+h,u=Math.min(o,i),p=Math.max(o,i)),{left:l,top:u,right:c,bottom:p}}function ar(t,e,n,o){return t?0:Bt(e,n,o)}function N4(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,a=hg(o);return{t:ar(i.top,a.top,0,n),r:ar(i.right,a.right,0,e),b:ar(i.bottom,a.bottom,0,n),l:ar(i.left,a.left,0,e)}}function V4(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,a=Nr(i),s=Math.min(e,n),l=t.borderSkipped,c=o||Re(i);return{topLeft:ar(!c||l.top||l.left,a.topLeft,0,s),topRight:ar(!c||l.top||l.right,a.topRight,0,s),bottomLeft:ar(!c||l.bottom||l.left,a.bottomLeft,0,s),bottomRight:ar(!c||l.bottom||l.right,a.bottomRight,0,s)}}function R4(t){const e=S0(t),n=e.right-e.left,o=e.bottom-e.top,i=N4(t,n/2,o/2),a=V4(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:a},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function wu(t,e,n,o){const i=e===null,a=n===null,l=t&&!(i&&a)&&S0(t,o);return l&&(i||wo(e,l.left,l.right))&&(a||wo(n,l.top,l.bottom))}function F4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function T4(t,e){t.rect(e.x,e.y,e.w,e.h)}function xu(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-o,s=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+a,h:t.h+s,radius:t.radius}}class Oa extends Ao{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:a,outer:s}=R4(this),l=F4(s.radius)?va:T4;e.save(),(s.w!==a.w||s.h!==a.h)&&(e.beginPath(),l(e,xu(s,n,a)),e.clip(),l(e,xu(a,-n,s)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,xu(a,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return wu(this,e,n,o)}inXRange(e,n){return wu(this,e,null,n)}inYRange(e,n){return wu(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+i)/2:n,y:a?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ie(Oa,"id","bar"),ie(Oa,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ie(Oa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var M4=Object.freeze({__proto__:null,ArcElement:vi,BarElement:Oa,LineElement:ir,PointElement:Pa});const Su=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],C0=Su.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function A0(t){return Su[t%Su.length]}function D0(t){return C0[t%C0.length]}function L4(t,e){return t.borderColor=A0(e),t.backgroundColor=D0(e),++e}function z4(t,e){return t.backgroundColor=t.data.map(()=>A0(e++)),e}function _4(t,e){return t.backgroundColor=t.data.map(()=>D0(e++)),e}function H4(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Tr?e=z4(n,e):i instanceof wa?e=_4(n,e):i&&(e=L4(n,e))}}function E0(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function U4(t){return t&&(t.borderColor||t.backgroundColor)}var W4={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:a}=i;if(!n.forceOverride&&(E0(o)||U4(i)||a&&E0(a)))return;const s=H4(t);o.forEach(s)}};function j4(t,e,n,o,i){const a=i.samples||o;if(a>=n)return t.slice(e,e+n);const s=[],l=(n-2)/(a-2);let c=0;const u=e+n-1;let p=e,h,m,b,y,v;for(s[c++]=t[p],h=0;h<a-2;h++){let w=0,A=0,I;const V=Math.floor((h+1)*l)+1+e,R=Math.min(Math.floor((h+2)*l)+1,n)+e,E=R-V;for(I=V;I<R;I++)w+=t[I].x,A+=t[I].y;w/=E,A/=E;const T=Math.floor(h*l)+1+e,B=Math.min(Math.floor((h+1)*l)+1,n)+e,{x:H,y:_}=t[p];for(b=y=-1,I=T;I<B;I++)y=.5*Math.abs((H-w)*(t[I].y-_)-(H-t[I].x)*(A-_)),y>b&&(b=y,m=t[I],v=I);s[c++]=m,p=v}return s[c++]=t[u],s}function G4(t,e,n,o){let i=0,a=0,s,l,c,u,p,h,m,b,y,v;const w=[],A=e+n-1,I=t[e].x,R=t[A].x-I;for(s=e;s<e+n;++s){l=t[s],c=(l.x-I)/R*o,u=l.y;const E=c|0;if(E===p)u<y?(y=u,h=s):u>v&&(v=u,m=s),i=(a*i+l.x)/++a;else{const T=s-1;if(!Ve(h)&&!Ve(m)){const B=Math.min(h,m),H=Math.max(h,m);B!==b&&B!==T&&w.push({...t[B],x:i}),H!==b&&H!==T&&w.push({...t[H],x:i})}s>0&&T!==b&&w.push(t[T]),w.push(l),p=E,a=0,y=v=u,h=m=b=s}}return w}function B0(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function P0(t){t.data.datasets.forEach(e=>{B0(e)})}function Q4(t,e){const n=e.length;let o=0,i;const{iScale:a}=t,{min:s,max:l,minDefined:c,maxDefined:u}=a.getUserBounds();return c&&(o=Bt(xo(e,a.axis,s).lo,0,n-1)),u?i=Bt(xo(e,a.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var X4={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){P0(t);return}const o=t.width;t.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:l}=i,c=t.getDatasetMeta(a),u=s||i.data;if(et([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const p=t.scales[c.xAxisID];if(p.type!=="linear"&&p.type!=="time"||t.options.parsing)return;let{start:h,count:m}=Q4(c,u);const b=n.threshold||4*o;if(m<=b){B0(i);return}Ve(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let y;switch(n.algorithm){case"lttb":y=j4(u,h,m,o,n);break;case"min-max":y=G4(u,h,m,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=y})},destroy(t){P0(t)}};function q4(t,e,n){const o=t.segments,i=t.points,a=e.points,s=[];for(const l of o){let{start:c,end:u}=l;u=Au(c,u,i);const p=Cu(n,i[c],i[u],l.loop);if(!e.segments){s.push({source:l,target:p,start:i[c],end:i[u]});continue}const h=Og(e,p);for(const m of h){const b=Cu(n,a[m.start],a[m.end],m.loop),y=Pg(l,i,b);for(const v of y)s.push({source:v,target:m,start:{[n]:O0(p,b,"start",Math.max)},end:{[n]:O0(p,b,"end",Math.min)}})}}return s}function Cu(t,e,n,o){if(o)return;let i=e[t],a=n[t];return t==="angle"&&(i=bn(i),a=bn(a)),{property:t,start:i,end:a}}function K4(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,a=[];return e.segments.forEach(({start:s,end:l})=>{l=Au(s,l,i);const c=i[s],u=i[l];o!==null?(a.push({x:c.x,y:o}),a.push({x:u.x,y:o})):n!==null&&(a.push({x:n,y:c.y}),a.push({x:n,y:u.y}))}),a}function Au(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function O0(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function I0(t,e){let n=[],o=!1;return Ye(t)?(o=!0,n=t):n=K4(t,e),n.length?new ir({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function N0(t){return t&&t.fill!==!1}function J4(t,e,n){let i=t[e].fill;const a=[e];let s;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!ht(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function Y4(t,e,n){const o=t8(t);if(Re(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return ht(i)&&Math.floor(i)===i?Z4(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Z4(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function $4(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:Re(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function e8(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:Re(t)?o=t.value:o=e.getBaseValue(),o}function t8(t){const e=t.options,n=e.fill;let o=Ce(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function n8(t){const{scale:e,index:n,line:o}=t,i=[],a=o.segments,s=o.points,l=o8(e,n);l.push(I0({x:null,y:e.bottom},o));for(let c=0;c<a.length;c++){const u=a[c];for(let p=u.start;p<=u.end;p++)r8(i,s[p],l)}return new ir({points:i,options:{}})}function o8(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const a=o[i];if(a.index===e)break;a.hidden||n.unshift(a.dataset)}return n}function r8(t,e,n){const o=[];for(let i=0;i<n.length;i++){const a=n[i],{first:s,last:l,point:c}=i8(a,e,"x");if(!(!c||s&&l)){if(s)o.unshift(c);else if(t.push(c),!l)break}}t.push(...o)}function i8(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],a=t.segments,s=t.points;let l=!1,c=!1;for(let u=0;u<a.length;u++){const p=a[u],h=s[p.start][n],m=s[p.end][n];if(wo(i,h,m)){l=i===h,c=i===m;break}}return{first:l,last:c,point:o}}class V0{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:a,radius:s}=this;return n=n||{start:0,end:$e},e.arc(i,a,s,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,a=e.angle;return{x:n+Math.cos(a)*i,y:o+Math.sin(a)*i,angle:a}}}function a8(t){const{chart:e,fill:n,line:o}=t;if(ht(n))return s8(e,n);if(n==="stack")return n8(t);if(n==="shape")return!0;const i=l8(t);return i instanceof V0?i:I0(i,o)}function s8(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function l8(t){return(t.scale||{}).getPointPositionForValue?c8(t):d8(t)}function d8(t){const{scale:e={},fill:n}=t,o=$4(n,e);if(ht(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function c8(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,a=o.reverse?e.max:e.min,s=e8(n,e,a),l=[];if(o.grid.circular){const c=e.getPointPositionForValue(0,a);return new V0({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(s)})}for(let c=0;c<i;++c)l.push(e.getPointPositionForValue(c,s));return l}function Du(t,e,n){const o=a8(e),{line:i,scale:a,axis:s}=e,l=i.options,c=l.fill,u=l.backgroundColor,{above:p=u,below:h=u}=c||{};o&&i.points.length&&(Js(t,n),u8(t,{line:i,target:o,above:p,below:h,area:n,scale:a,axis:s}),Ys(t))}function u8(t,e){const{line:n,target:o,above:i,below:a,area:s,scale:l}=e,c=n._loop?"angle":e.axis;t.save(),c==="x"&&a!==i&&(R0(t,o,s.top),F0(t,{line:n,target:o,color:i,scale:l,property:c}),t.restore(),t.save(),R0(t,o,s.bottom)),F0(t,{line:n,target:o,color:a,scale:l,property:c}),t.restore()}function R0(t,e,n){const{segments:o,points:i}=e;let a=!0,s=!1;t.beginPath();for(const l of o){const{start:c,end:u}=l,p=i[c],h=i[Au(c,u,i)];a?(t.moveTo(p.x,p.y),a=!1):(t.lineTo(p.x,n),t.lineTo(p.x,p.y)),s=!!e.pathSegment(t,l,{move:s}),s?t.closePath():t.lineTo(h.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function F0(t,e){const{line:n,target:o,property:i,color:a,scale:s}=e,l=q4(n,o,i);for(const{source:c,target:u,start:p,end:h}of l){const{style:{backgroundColor:m=a}={}}=c,b=o!==!0;t.save(),t.fillStyle=m,f8(t,s,b&&Cu(i,p,h)),t.beginPath();const y=!!n.pathSegment(t,c);let v;if(b){y?t.closePath():T0(t,o,h,i);const w=!!o.pathSegment(t,u,{move:y,reverse:!0});v=y&&w,v||T0(t,o,p,i)}t.closePath(),t.fill(v?"evenodd":"nonzero"),t.restore()}}function f8(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:a,start:s,end:l}=n||{};a==="x"&&(t.beginPath(),t.rect(s,o,l-s,i-o),t.clip())}function T0(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var p8={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let a,s,l,c;for(s=0;s<o;++s)a=t.getDatasetMeta(s),l=a.dataset,c=null,l&&l.options&&l instanceof ir&&(c={visible:t.isDatasetVisible(s),index:s,fill:Y4(l,s,o),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=c,i.push(c);for(s=0;s<o;++s)c=i[s],!(!c||c.fill===!1)&&(c.fill=J4(i,s,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;l&&(l.line.updateControlPoints(a,l.axis),o&&l.fill&&Du(t.ctx,l,a))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const a=o[i].$filler;N0(a)&&Du(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!N0(o)||n.drawTime!=="beforeDatasetDraw"||Du(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const M0=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},h8=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class L0 extends Ao{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=Qe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=wt(o.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=M0(o,a);let u,p;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,p=this._fitRows(s,a,l,c)+10):(p=this.maxHeight,u=this._fitCols(s,i,l,c)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:a,maxWidth:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.lineWidths=[0],p=i+l;let h=e;a.textAlign="left",a.textBaseline="middle";let m=-1,b=-p;return this.legendItems.forEach((y,v)=>{const w=o+n/2+a.measureText(y.text).width;(v===0||u[u.length-1]+w+2*l>s)&&(h+=p,u[u.length-(v>0?0:1)]=0,b+=p,m++),c[v]={left:0,top:b,row:m,width:w,height:i},u[u.length-1]+=w+l}),h}_fitCols(e,n,o,i){const{ctx:a,maxHeight:s,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.columnSizes=[],p=s-e;let h=l,m=0,b=0,y=0,v=0;return this.legendItems.forEach((w,A)=>{const{itemWidth:I,itemHeight:V}=m8(o,n,a,w,i);A>0&&b+V+2*l>p&&(h+=m+l,u.push({width:m,height:b}),y+=m+l,v++,m=b=0),c[A]={left:y,top:b,col:v,width:I,height:V},m=Math.max(m,I),b+=V+l}),h+=m,u.push({width:m,height:b}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:a}}=this,s=bi(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=zt(o,this.left+i,this.right-this.lineWidths[l]);for(const u of n)l!==u.row&&(l=u.row,c=zt(o,this.left+i,this.right-this.lineWidths[l])),u.top+=this.top+e+i,u.left=s.leftForLtr(s.x(c),u.width),c+=u.width+i}else{let l=0,c=zt(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const u of n)u.col!==l&&(l=u.col,c=zt(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),u.top=c,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),c+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Js(e,this),this._draw(),Ys(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:a,labels:s}=e,l=dt.color,c=bi(e.rtl,this.left,this.width),u=wt(s.font),{padding:p}=s,h=u.size,m=h/2;let b;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:y,boxHeight:v,itemHeight:w}=M0(s,h),A=function(T,B,H){if(isNaN(y)||y<=0||isNaN(v)||v<0)return;i.save();const _=Ce(H.lineWidth,1);if(i.fillStyle=Ce(H.fillStyle,l),i.lineCap=Ce(H.lineCap,"butt"),i.lineDashOffset=Ce(H.lineDashOffset,0),i.lineJoin=Ce(H.lineJoin,"miter"),i.lineWidth=_,i.strokeStyle=Ce(H.strokeStyle,l),i.setLineDash(Ce(H.lineDash,[])),s.usePointStyle){const j={radius:v*Math.SQRT2/2,pointStyle:H.pointStyle,rotation:H.rotation,borderWidth:_},Q=c.xPlus(T,y/2),F=B+m;pg(i,j,Q,F,s.pointStyleWidth&&y)}else{const j=B+Math.max((h-v)/2,0),Q=c.leftForLtr(T,y),F=Nr(H.borderRadius);i.beginPath(),Object.values(F).some(S=>S!==0)?va(i,{x:Q,y:j,w:y,h:v,radius:F}):i.rect(Q,j,y,v),i.fill(),_!==0&&i.stroke()}i.restore()},I=function(T,B,H){Ir(i,H.text,T,B+w/2,u,{strikethrough:H.hidden,textAlign:c.textAlign(H.textAlign)})},V=this.isHorizontal(),R=this._computeTitleHeight();V?b={x:zt(a,this.left+p,this.right-o[0]),y:this.top+p+R,line:0}:b={x:this.left+p,y:zt(a,this.top+R+p,this.bottom-n[0].height),line:0},Ag(this.ctx,e.textDirection);const E=w+p;this.legendItems.forEach((T,B)=>{i.strokeStyle=T.fontColor,i.fillStyle=T.fontColor;const H=i.measureText(T.text).width,_=c.textAlign(T.textAlign||(T.textAlign=s.textAlign)),j=y+m+H;let Q=b.x,F=b.y;c.setWidth(this.width),V?B>0&&Q+j+p>this.right&&(F=b.y+=E,b.line++,Q=b.x=zt(a,this.left+p,this.right-o[b.line])):B>0&&F+E>this.bottom&&(Q=b.x=Q+n[b.line].width+p,b.line++,F=b.y=zt(a,this.top+R+p,this.bottom-n[b.line].height));const S=c.x(Q);if(A(S,F,T),Q=TS(_,Q+y+m,V?Q+j:this.right,e.rtl),I(c.x(Q),F,T),V)b.x+=j+p;else if(typeof T.text!="string"){const x=u.lineHeight;b.y+=z0(T,x)+p}else b.y+=E}),Dg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=wt(n.font),i=Ft(n.padding);if(!n.display)return;const a=bi(e.rtl,this.left,this.width),s=this.ctx,l=n.position,c=o.size/2,u=i.top+c;let p,h=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),p=this.top+u,h=zt(e.align,h,this.right-m);else{const y=this.columnSizes.reduce((v,w)=>Math.max(v,w.height),0);p=u+zt(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const b=zt(l,h,h+m);s.textAlign=a.textAlign(Zc(l)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=o.string,Ir(s,n.text,b,p,o)}_computeTitleHeight(){const e=this.options.title,n=wt(e.font),o=Ft(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,a;if(wo(e,this.left,this.right)&&wo(n,this.top,this.bottom)){for(a=this.legendHitBoxes,o=0;o<a.length;++o)if(i=a[o],wo(e,i.left,i.left+i.width)&&wo(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!y8(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,a=h8(i,o);i&&!a&&Qe(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!a&&Qe(n.onHover,[e,o,this],this)}else o&&Qe(n.onClick,[e,o,this],this)}}function m8(t,e,n,o,i){const a=g8(o,t,e,n),s=b8(i,o,e.lineHeight);return{itemWidth:a,itemHeight:s}}function g8(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),e+n.size/2+o.measureText(i).width}function b8(t,e,n){let o=t;return typeof e.text!="string"&&(o=z0(e,n)),o}function z0(t,e){const n=t.text?t.text.length:0;return e*n}function y8(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var v8={id:"legend",_element:L0,start(t,e,n){const o=t.legend=new L0({ctx:t.ctx,options:n,chart:t});_t.configure(t,o,n),_t.addBox(t,o)},stop(t){_t.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;_t.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:a,useBorderRadius:s,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const u=c.controller.getStyle(n?0:void 0),p=Ft(u.borderWidth);return{text:e[c.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:u.borderColor,pointStyle:o||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(l||u.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Eu extends Ao{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=Ye(o.text)?o.text.length:1;this._padding=Ft(o.padding);const a=i*wt(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:a,options:s}=this,l=s.align;let c=0,u,p,h;return this.isHorizontal()?(p=zt(l,o,a),h=n+e,u=a-o):(s.position==="left"?(p=o+e,h=zt(l,i,n),c=Ze*-.5):(p=a-e,h=zt(l,n,i),c=Ze*.5),u=i-n),{titleX:p,titleY:h,maxWidth:u,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=wt(n.font),a=o.lineHeight/2+this._padding.top,{titleX:s,titleY:l,maxWidth:c,rotation:u}=this._drawArgs(a);Ir(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:u,textAlign:Zc(n.align),textBaseline:"middle",translation:[s,l]})}}function k8(t,e){const n=new Eu({ctx:t.ctx,options:e,chart:t});_t.configure(t,n,e),_t.addBox(t,n),t.titleBlock=n}var w8={id:"title",_element:Eu,start(t,e,n){k8(t,n)},stop(t){const e=t.titleBlock;_t.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;_t.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gl=new WeakMap;var x8={id:"subtitle",start(t,e,n){const o=new Eu({ctx:t.ctx,options:n,chart:t});_t.configure(t,o,n),_t.addBox(t,o),gl.set(t,o)},stop(t){_t.removeBox(t,gl.get(t)),gl.delete(t)},beforeUpdate(t,e,n){const o=gl.get(t);_t.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ia={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,a=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const c=l.tooltipPosition();o.add(c.x),i+=c.y,++a}}return{x:[...o].reduce((l,c)=>l+c)/o.size,y:i/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,a,s,l;for(a=0,s=t.length;a<s;++a){const c=t[a].element;if(c&&c.hasValue()){const u=c.getCenterPoint(),p=Jc(e,u);p<i&&(i=p,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function co(t,e){return e&&(Ye(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Do(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
30
30
  `)>-1?t.split(`
31
- `):t}function S4(t,e){const{element:n,datasetIndex:o,index:i}=e,a=t.getDatasetMeta(o).controller,{label:s,value:l}=a.getLabelAndValue(i);return{chart:t,label:s,parsed:a.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function _0(t,e){const n=t.chart.ctx,{body:o,footer:i,title:a}=t,{boxWidth:s,boxHeight:l}=e,c=wt(e.bodyFont),u=wt(e.titleFont),p=wt(e.footerFont),h=a.length,m=i.length,b=o.length,y=Ft(e.padding);let v=y.height,w=0,A=o.reduce((R,E)=>R+E.before.length+E.lines.length+E.after.length,0);if(A+=t.beforeBody.length+t.afterBody.length,h&&(v+=h*u.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),A){const R=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;v+=b*R+(A-b)*c.lineHeight+(A-1)*e.bodySpacing}m&&(v+=e.footerMarginTop+m*p.lineHeight+(m-1)*e.footerSpacing);let I=0;const V=function(R){w=Math.max(w,n.measureText(R).width+I)};return n.save(),n.font=u.string,We(t.title,V),n.font=c.string,We(t.beforeBody.concat(t.afterBody),V),I=e.displayColors?s+2+e.boxPadding:0,We(o,R=>{We(R.before,V),We(R.lines,V),We(R.after,V)}),I=0,n.font=p.string,We(t.footer,V),n.restore(),w+=y.width,{width:w,height:v}}function C4(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function A4(t,e,n,o){const{x:i,width:a}=o,s=n.caretSize+n.caretPadding;if(t==="left"&&i+a+s>e.width||t==="right"&&i-a-s<0)return!0}function D4(t,e,n,o){const{x:i,width:a}=n,{width:s,chartArea:{left:l,right:c}}=t;let u="center";return o==="center"?u=i<=(l+c)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),A4(u,t,e,n)&&(u="center"),u}function H0(t,e,n){const o=n.yAlign||e.yAlign||C4(t,n);return{xAlign:n.xAlign||e.xAlign||D4(t,e,n,o),yAlign:o}}function E4(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function B4(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function U0(t,e,n,o){const{caretSize:i,caretPadding:a,cornerRadius:s}=t,{xAlign:l,yAlign:c}=n,u=i+a,{topLeft:p,topRight:h,bottomLeft:m,bottomRight:b}=Nr(s);let y=E4(e,l);const v=B4(e,c,u);return c==="center"?l==="left"?y+=u:l==="right"&&(y-=u):l==="left"?y-=Math.max(p,m)+i:l==="right"&&(y+=Math.max(h,b)+i),{x:Bt(y,0,o.width-e.width),y:Bt(v,0,o.height-e.height)}}function bl(t,e,n){const o=Ft(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function W0(t){return co([],Do(t))}function P4(t,e,n){return rr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function j0(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const G0={beforeTitle:ko,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:ko,beforeBody:ko,beforeLabel:ko,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Ve(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ko,afterBody:ko,beforeFooter:ko,footer:ko,afterFooter:ko};function $t(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?G0[e].call(n,o):i}class Bu extends Ao{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new Rg(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=P4(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=$t(o,"beforeTitle",this,e),a=$t(o,"title",this,e),s=$t(o,"afterTitle",this,e);let l=[];return l=co(l,Do(i)),l=co(l,Do(a)),l=co(l,Do(s)),l}getBeforeBody(e,n){return W0($t(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return We(e,a=>{const s={before:[],lines:[],after:[]},l=j0(o,a);co(s.before,Do($t(l,"beforeLabel",this,a))),co(s.lines,$t(l,"label",this,a)),co(s.after,Do($t(l,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(e,n){return W0($t(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=$t(o,"beforeFooter",this,e),a=$t(o,"footer",this,e),s=$t(o,"afterFooter",this,e);let l=[];return l=co(l,Do(i)),l=co(l,Do(a)),l=co(l,Do(s)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],a=[],s=[];let l=[],c,u;for(c=0,u=n.length;c<u;++c)l.push(S4(this.chart,n[c]));return e.filter&&(l=l.filter((p,h,m)=>e.filter(p,h,m,o))),e.itemSort&&(l=l.sort((p,h)=>e.itemSort(p,h,o))),We(l,p=>{const h=j0(e.callbacks,p);i.push($t(h,"labelColor",this,p)),a.push($t(h,"labelPointStyle",this,p)),s.push($t(h,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const l=Ia[o.position].call(this,i,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);const c=this._size=_0(this,o),u=Object.assign({},l,c),p=H0(this.chart,o,u),h=U0(o,u,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,a={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const a=this.getCaretPosition(e,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:l}=o,{topLeft:c,topRight:u,bottomLeft:p,bottomRight:h}=Nr(l),{x:m,y:b}=e,{width:y,height:v}=n;let w,A,I,V,R,E;return a==="center"?(R=b+v/2,i==="left"?(w=m,A=w-s,V=R+s,E=R-s):(w=m+y,A=w+s,V=R-s,E=R+s),I=w):(i==="left"?A=m+Math.max(c,p)+s:i==="right"?A=m+y-Math.max(u,h)-s:A=this.caretX,a==="top"?(V=b,R=V-s,w=A-s,I=A+s):(V=b+v,R=V+s,w=A+s,I=A-s),E=V),{x1:w,x2:A,x3:I,y1:V,y2:R,y3:E}}drawTitle(e,n,o){const i=this.title,a=i.length;let s,l,c;if(a){const u=bi(o.rtl,this.x,this.width);for(e.x=bl(this,o.titleAlign,o),n.textAlign=u.textAlign(o.titleAlign),n.textBaseline="middle",s=wt(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=s.string,c=0;c<a;++c)n.fillText(i[c],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+l,c+1===a&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,a){const s=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:c,boxWidth:u}=a,p=wt(a.bodyFont),h=bl(this,"left",a),m=i.x(h),b=c<p.lineHeight?(p.lineHeight-c)/2:0,y=n.y+b;if(a.usePointStyle){const v={radius:Math.min(u,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},w=i.leftForLtr(m,u)+u/2,A=y+c/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,ou(e,v,w,A),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,ou(e,v,w,A)}else{e.lineWidth=Re(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const v=i.leftForLtr(m,u),w=i.leftForLtr(i.xPlus(m,1),u-2),A=Nr(s.borderRadius);Object.values(A).some(I=>I!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,va(e,{x:v,y,w:u,h:c,radius:A}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),va(e,{x:w,y:y+1,w:u-2,h:c-2,radius:A}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(v,y,u,c),e.strokeRect(v,y,u,c),e.fillStyle=s.backgroundColor,e.fillRect(w,y+1,u-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:p}=o,h=wt(o.bodyFont);let m=h.lineHeight,b=0;const y=bi(o.rtl,this.x,this.width),v=function(H){n.fillText(H,y.x(e.x+b),e.y+m/2),e.y+=m+a},w=y.textAlign(s);let A,I,V,R,E,T,B;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,e.x=bl(this,w,o),n.fillStyle=o.bodyColor,We(this.beforeBody,v),b=l&&w!=="right"?s==="center"?u/2+p:u+2+p:0,R=0,T=i.length;R<T;++R){for(A=i[R],I=this.labelTextColors[R],n.fillStyle=I,We(A.before,v),V=A.lines,l&&V.length&&(this._drawColorBox(n,e,R,y,o),m=Math.max(h.lineHeight,c)),E=0,B=V.length;E<B;++E)v(V[E]),m=h.lineHeight;We(A.after,v)}b=0,m=h.lineHeight,We(this.afterBody,v),e.y-=a}drawFooter(e,n,o){const i=this.footer,a=i.length;let s,l;if(a){const c=bi(o.rtl,this.x,this.width);for(e.x=bl(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",s=wt(o.footerFont),n.fillStyle=o.footerColor,n.font=s.string,l=0;l<a;++l)n.fillText(i[l],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:a,yAlign:s}=this,{x:l,y:c}=e,{width:u,height:p}=o,{topLeft:h,topRight:m,bottomLeft:b,bottomRight:y}=Nr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+h,c),s==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+u-m,c),n.quadraticCurveTo(l+u,c,l+u,c+m),s==="center"&&a==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+u,c+p-y),n.quadraticCurveTo(l+u,c+p,l+u-y,c+p),s==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+b,c+p),n.quadraticCurveTo(l,c+p,l,c+p-b),s==="center"&&a==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,c+h),n.quadraticCurveTo(l,c,l+h,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const s=Ia[e.position].call(this,this._active,this._eventPosition);if(!s)return;const l=this._size=_0(this,e),c=Object.assign({},s,this._size),u=H0(n,e,c),p=U0(e,c,u,n);(i._to!==p.x||a._to!==p.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const s=Ft(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=o,this.drawBackground(a,e,i,n),Ag(e,n.textDirection),a.y+=s.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),Dg(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:c})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),a=!js(o,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(e,a,n,o),l=this._positionChanged(s,e),c=n||!js(s,a)||l;return c&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,i){const a=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,a.mode,a,o);return a.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:o,caretY:i,options:a}=this,s=Ia[a.position].call(this,e,n);return s!==!1&&(o!==s.x||i!==s.y)}}ie(Bu,"positioners",Ia);var O4={id:"tooltip",_element:Bu,positioners:Ia,afterInit(t,e,n){n&&(t.tooltip=new Bu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:G0},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},I4=Object.freeze({__proto__:null,Colors:W8,Decimation:X8,Filler:p4,Legend:v4,SubTitle:x4,Title:w4,Tooltip:O4});const N4=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function V4(t,e,n,o){const i=t.indexOf(e);if(i===-1)return N4(t,e,n,o);const a=t.lastIndexOf(e);return i!==a?n:i}const R4=(t,e)=>t===null?null:Bt(Math.round(t),0,e);function Q0(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Pu extends Lr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Ve(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:V4(o,e,Ce(n,e),this._addedLabels),R4(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let s=e;s<=n;s++)i.push({value:s});return i}getLabelForValue(e){return Q0.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ie(Pu,"id","category"),ie(Pu,"defaults",{ticks:{callback:Q0}});function F4(t,e){const n=[],{bounds:i,step:a,min:s,max:l,precision:c,count:u,maxTicks:p,maxDigits:h,includeBounds:m}=t,b=a||1,y=p-1,{min:v,max:w}=e,A=!Ve(s),I=!Ve(l),V=!Ve(u),R=(w-v)/(h+1);let E=Jm((w-v)/y/b)*b,T,B,H,_;if(E<1e-14&&!A&&!I)return[{value:v},{value:w}];_=Math.ceil(w/E)-Math.floor(v/E),_>y&&(E=Jm(_*E/y/b)*b),Ve(c)||(T=Math.pow(10,c),E=Math.ceil(E*T)/T),i==="ticks"?(B=Math.floor(v/E)*E,H=Math.ceil(w/E)*E):(B=v,H=w),A&&I&&a&&PS((l-s)/a,E/1e3)?(_=Math.round(Math.min((l-s)/E,p)),E=(l-s)/_,B=s,H=l):V?(B=A?s:B,H=I?l:H,_=u-1,E=(H-B)/_):(_=(H-B)/E,ha(_,Math.round(_),E/1e3)?_=Math.round(_):_=Math.ceil(_));const j=Math.max(Zm(E),Zm(B));T=Math.pow(10,Ve(c)?j:c),B=Math.round(B*T)/T,H=Math.round(H*T)/T;let Q=0;for(A&&(m&&B!==s?(n.push({value:s}),B<s&&Q++,ha(Math.round((B+Q*E)*T)/T,s,X0(s,R,t))&&Q++):B<s&&Q++);Q<_;++Q){const F=Math.round((B+Q*E)*T)/T;if(I&&F>l)break;n.push({value:F})}return I&&m&&H!==l?n.length&&ha(n[n.length-1].value,l,X0(l,R,t))?n[n.length-1].value=l:n.push({value:l}):(!I||H===l)&&n.push({value:H}),n}function X0(t,e,{horizontal:n,minRotation:o}){const i=Wn(o),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}class yl extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Ve(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const s=c=>i=n?i:c,l=c=>a=o?a:c;if(e){const c=so(i),u=so(a);c<0&&u<0?l(0):c>0&&u>0&&s(0)}if(i===a){let c=a===0?1:Math.abs(a*.05);l(a+c),e||s(i-c)}this.min=i,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=F4(i,a);return e.bounds==="ticks"&&Ym(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return ba(e,this.chart.options.locale,this.options.ticks.format)}}class Ou extends yl{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ht(e)?e:0,this.max=ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Wn(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ie(Ou,"id","linear"),ie(Ou,"defaults",{ticks:{callback:qs.formatters.numeric}});const Na=t=>Math.floor(or(t)),zr=(t,e)=>Math.pow(10,Na(t)+e);function q0(t){return t/Math.pow(10,Na(t))===1}function K0(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function T4(t,e){const n=e-t;let o=Na(n);for(;K0(t,e,o)>10;)o++;for(;K0(t,e,o)<10;)o--;return Math.min(o,Na(t))}function M4(t,{min:e,max:n}){e=gn(t.min,e);const o=[],i=Na(e);let a=T4(e,n),s=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=i>a?Math.pow(10,i):0,u=Math.round((e-c)*s)/s,p=Math.floor((e-c)/l/10)*l*10;let h=Math.floor((u-p)/Math.pow(10,a)),m=gn(t.min,Math.round((c+p+h*Math.pow(10,a))*s)/s);for(;m<n;)o.push({value:m,major:q0(m),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),m=Math.round((c+p+h*Math.pow(10,a))*s)/s;const b=gn(t.max,m);return o.push({value:b,major:q0(b),significand:h}),o}class Iu extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=yl.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return ht(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ht(e)?Math.max(0,e):null,this.max=ht(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ht(this._userMin)&&(this.min=e===zr(this.min,0)?zr(this.min,-1):zr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const a=l=>o=e?o:l,s=l=>i=n?i:l;o===i&&(o<=0?(a(1),s(10)):(a(zr(o,-1)),s(zr(i,1)))),o<=0&&a(zr(i,-1)),i<=0&&s(zr(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=M4(n,this);return e.bounds==="ticks"&&Ym(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":ba(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=or(e),this._valueRange=or(this.max)-or(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(or(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ie(Iu,"id","logarithmic"),ie(Iu,"defaults",{ticks:{callback:qs.formatters.logarithmic,major:{enabled:!0}}});function Nu(t){const e=t.ticks;if(e.display&&t.display){const n=Ft(e.backdropPadding);return Ce(e.font&&e.font.size,dt.font.size)+n.height}return 0}function L4(t,e,n){return n=Ye(n)?n:[n],{w:QS(t,e.string,n),h:n.length*e.lineHeight}}function J0(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function z4(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],a=t._pointLabels.length,s=t.options.pointLabels,l=s.centerPointLabels?Ze/a:0;for(let c=0;c<a;c++){const u=s.setContext(t.getPointLabelContext(c));i[c]=u.padding;const p=t.getPointPosition(c,t.drawingArea+i[c],l),h=wt(u.font),m=L4(t.ctx,h,t._pointLabels[c]);o[c]=m;const b=bn(t.getIndexAngle(c)+l),y=Math.round(Kc(b)),v=J0(y,p.x,m.w,0,180),w=J0(y,p.y,m.h,90,270);_4(n,e,b,v,w)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=W4(t,o,i)}function _4(t,e,n,o,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let l=0,c=0;o.start<e.l?(l=(e.l-o.start)/a,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/a,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(c=(e.t-i.start)/s,t.t=Math.min(t.t,e.t-c)):i.end>e.b&&(c=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function H4(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:a,padding:s,size:l}=n,c=t.getPointPosition(e,o+i+s,a),u=Math.round(Kc(bn(c.angle+gt))),p=Q4(c.y,l.h,u),h=j4(u),m=G4(c.x,l.w,h);return{visible:!0,x:c.x,y:p,textAlign:h,left:m,top:p,right:m+l.w,bottom:p+l.h}}function U4(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:a}=t;return!(So({x:n,y:o},e)||So({x:n,y:a},e)||So({x:i,y:o},e)||So({x:i,y:a},e))}function W4(t,e,n){const o=[],i=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:l}=a.pointLabels,c={extra:Nu(a)/2,additionalAngle:s?Ze/i:0};let u;for(let p=0;p<i;p++){c.padding=n[p],c.size=e[p];const h=H4(t,p,c);o.push(h),l==="auto"&&(h.visible=U4(h,u),h.visible&&(u=h))}return o}function j4(t){return t===0||t===180?"center":t<180?"left":"right"}function G4(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Q4(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function X4(t,e,n){const{left:o,top:i,right:a,bottom:s}=n,{backdropColor:l}=e;if(!Ve(l)){const c=Nr(e.borderRadius),u=Ft(e.backdropPadding);t.fillStyle=l;const p=o-u.left,h=i-u.top,m=a-o+u.width,b=s-i+u.height;Object.values(c).some(y=>y!==0)?(t.beginPath(),va(t,{x:p,y:h,w:m,h:b,radius:c}),t.fill()):t.fillRect(p,h,m,b)}}function q4(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const a=t._pointLabelItems[i];if(!a.visible)continue;const s=o.setContext(t.getPointLabelContext(i));X4(n,s,a);const l=wt(s.font),{x:c,y:u,textAlign:p}=a;Ir(n,t._pointLabels[i],c,u+l.lineHeight/2,l,{color:s.color,textAlign:p,textBaseline:"middle"})}}function Y0(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,$e);else{let a=t.getPointPosition(0,e);i.moveTo(a.x,a.y);for(let s=1;s<o;s++)a=t.getPointPosition(s,e),i.lineTo(a.x,a.y)}}function K4(t,e,n,o,i){const a=t.ctx,s=e.circular,{color:l,lineWidth:c}=e;!s&&!o||!l||!c||n<0||(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),Y0(t,n,s,o),a.closePath(),a.stroke(),a.restore())}function J4(t,e,n){return rr(t,{label:n,index:e,type:"pointLabel"})}class Va extends yl{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Ft(Nu(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=ht(e)&&!isNaN(e)?e:0,this.max=ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Nu(this.options))}generateTickLabels(e){yl.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=Qe(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?z4(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=$e/(this._pointLabels.length||1),o=this.options.startAngle||0;return bn(e*n+Wn(o))}getDistanceFromCenterForValue(e){if(Ve(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Ve(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return J4(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-gt+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:a}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),Y0(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:a}=n,s=this._pointLabels.length;let l,c,u;if(n.pointLabels.display&&q4(this,s),i.display&&this.ticks.forEach((p,h)=>{if(h!==0||h===0&&this.min<0){c=this.getDistanceFromCenterForValue(p.value);const m=this.getContext(h),b=i.setContext(m),y=a.setContext(m);K4(this,b,c,s,y)}}),o.display){for(e.save(),l=s-1;l>=0;l--){const p=o.setContext(this.getPointLabelContext(l)),{color:h,lineWidth:m}=p;!m||!h||(e.lineWidth=m,e.strokeStyle=h,e.setLineDash(p.borderDash),e.lineDashOffset=p.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let a,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const u=o.setContext(this.getContext(c)),p=wt(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),u.showLabelBackdrop){e.font=p.string,s=e.measureText(l.label).width,e.fillStyle=u.backdropColor;const h=Ft(u.backdropPadding);e.fillRect(-s/2-h.left,-a-p.size/2-h.top,s+h.width,p.size+h.height)}Ir(e,l.label,0,-a,p,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}ie(Va,"id","radialLinear"),ie(Va,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:qs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ie(Va,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ie(Va,"descriptors",{angleLines:{_fallback:"grid"}});const vl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},en=Object.keys(vl);function Z0(t,e){return t-e}function $0(t,e){if(Ve(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:a}=t._parseOpts;let s=e;return typeof o=="function"&&(s=o(s)),ht(s)||(s=typeof o=="string"?n.parse(s,o):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(hi(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function e1(t,e,n,o){const i=en.length;for(let a=en.indexOf(t);a<i-1;++a){const s=vl[en[a]],l=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(l*s.size))<=o)return en[a]}return en[i-1]}function Y4(t,e,n,o,i){for(let a=en.length-1;a>=en.indexOf(n);a--){const s=en[a];if(vl[s].common&&t._adapter.diff(i,o,s)>=e-1)return s}return en[n?en.indexOf(n):0]}function Z4(t){for(let e=en.indexOf(t)+1,n=en.length;e<n;++e)if(vl[en[e]].common)return en[e]}function t1(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Yc(n,e),a=n[o]>=e?n[o]:n[i];t[a]=!0}}function $4(t,e,n,o){const i=t._adapter,a=+i.startOf(e[0].value,o),s=e[e.length-1].value;let l,c;for(l=a;l<=s;l=+i.add(l,1,o))c=n[l],c>=0&&(e[c].major=!0);return e}function n1(t,e,n){const o=[],i={},a=e.length;let s,l;for(s=0;s<a;++s)l=e[s],i[l]=s,o.push({value:l,major:!1});return a===0||!n?o:$4(t,o,i,n)}class Ra extends Lr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new lA._date(e.adapters.date);i.init(n),fa(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:$0(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:l}=this.getUserBounds();function c(u){!s&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!l&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!s||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=ht(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=ht(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,l=VS(i,a,s);return this._unit=n.unit||(o.autoSkip?e1(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Y4(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Z4(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),n1(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?o=a:o=(a-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Bt(n,0,s),o=Bt(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,s=a.unit||e1(a.minUnit,n,o,this._getLabelCapacity(n)),l=Ce(i.ticks.stepSize,1),c=s==="week"?a.isoWeekday:!1,u=hi(c)||c===!0,p={};let h=n,m,b;if(u&&(h=+e.startOf(h,"isoWeek",c)),h=+e.startOf(h,u?"day":s),e.diff(o,n,s)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(m=h,b=0;m<o;m=+e.add(m,l,s),b++)t1(p,m,y);return(m===o||i.bounds==="ticks"||b===1)&&t1(p,m,y),Object.keys(p).sort(Z0).map(v=>+v)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(e,s)}_tickFormatFunction(e,n,o,i){const a=this.options,s=a.ticks.callback;if(s)return Qe(s,[e,n,o],this);const l=a.time.displayFormats,c=this._unit,u=this._majorUnit,p=c&&l[c],h=u&&l[u],m=o[n],b=u&&h&&m&&m.major;return this._adapter.format(e,i||(b?h:p))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Wn(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*a+l*s,h:o*s+l*a}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(e,0,n1(this,[e],this._majorUnit),i),s=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push($0(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ng(e.sort(Z0))}}ie(Ra,"id","time"),ie(Ra,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function kl(t,e,n){let o=0,i=t.length-1,a,s,l,c;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=xo(t,"pos",e)),{pos:a,time:l}=t[o],{pos:s,time:c}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=xo(t,"time",e)),{time:a,pos:l}=t[o],{time:s,pos:c}=t[i]);const u=s-a;return u?l+(c-l)*(e-a)/u:l}class Vu extends Ra{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=kl(n,this.min),this._tableRange=kl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],a=[];let s,l,c,u,p;for(s=0,l=e.length;s<l;++s)u=e[s],u>=n&&u<=o&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(s=0,l=i.length;s<l;++s)p=i[s+1],c=i[s-1],u=i[s],Math.round((p+c)/2)!==u&&a.push({time:u,pos:s/(l-1)});return a}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(kl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return kl(this._table,o*this._tableRange+this._minPos,!0)}}ie(Vu,"id","timeseries"),ie(Vu,"defaults",Ra.defaults);var e9=Object.freeze({__proto__:null,CategoryScale:Pu,LinearScale:Ou,LogarithmicScale:Iu,RadialLinearScale:Va,TimeScale:Ra,TimeSeriesScale:Vu});const t9=[sA,M8,I4,e9];Zt.register(...t9);/*!
31
+ `):t}function S8(t,e){const{element:n,datasetIndex:o,index:i}=e,a=t.getDatasetMeta(o).controller,{label:s,value:l}=a.getLabelAndValue(i);return{chart:t,label:s,parsed:a.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:a.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function _0(t,e){const n=t.chart.ctx,{body:o,footer:i,title:a}=t,{boxWidth:s,boxHeight:l}=e,c=wt(e.bodyFont),u=wt(e.titleFont),p=wt(e.footerFont),h=a.length,m=i.length,b=o.length,y=Ft(e.padding);let v=y.height,w=0,A=o.reduce((R,E)=>R+E.before.length+E.lines.length+E.after.length,0);if(A+=t.beforeBody.length+t.afterBody.length,h&&(v+=h*u.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),A){const R=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;v+=b*R+(A-b)*c.lineHeight+(A-1)*e.bodySpacing}m&&(v+=e.footerMarginTop+m*p.lineHeight+(m-1)*e.footerSpacing);let I=0;const V=function(R){w=Math.max(w,n.measureText(R).width+I)};return n.save(),n.font=u.string,We(t.title,V),n.font=c.string,We(t.beforeBody.concat(t.afterBody),V),I=e.displayColors?s+2+e.boxPadding:0,We(o,R=>{We(R.before,V),We(R.lines,V),We(R.after,V)}),I=0,n.font=p.string,We(t.footer,V),n.restore(),w+=y.width,{width:w,height:v}}function C8(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function A8(t,e,n,o){const{x:i,width:a}=o,s=n.caretSize+n.caretPadding;if(t==="left"&&i+a+s>e.width||t==="right"&&i-a-s<0)return!0}function D8(t,e,n,o){const{x:i,width:a}=n,{width:s,chartArea:{left:l,right:c}}=t;let u="center";return o==="center"?u=i<=(l+c)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),A8(u,t,e,n)&&(u="center"),u}function H0(t,e,n){const o=n.yAlign||e.yAlign||C8(t,n);return{xAlign:n.xAlign||e.xAlign||D8(t,e,n,o),yAlign:o}}function E8(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function B8(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function U0(t,e,n,o){const{caretSize:i,caretPadding:a,cornerRadius:s}=t,{xAlign:l,yAlign:c}=n,u=i+a,{topLeft:p,topRight:h,bottomLeft:m,bottomRight:b}=Nr(s);let y=E8(e,l);const v=B8(e,c,u);return c==="center"?l==="left"?y+=u:l==="right"&&(y-=u):l==="left"?y-=Math.max(p,m)+i:l==="right"&&(y+=Math.max(h,b)+i),{x:Bt(y,0,o.width-e.width),y:Bt(v,0,o.height-e.height)}}function bl(t,e,n){const o=Ft(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function W0(t){return co([],Do(t))}function P8(t,e,n){return rr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function j0(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const G0={beforeTitle:ko,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:ko,beforeBody:ko,beforeLabel:ko,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Ve(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ko,afterBody:ko,beforeFooter:ko,footer:ko,afterFooter:ko};function $t(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?G0[e].call(n,o):i}class Bu extends Ao{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,a=new Rg(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=P8(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=$t(o,"beforeTitle",this,e),a=$t(o,"title",this,e),s=$t(o,"afterTitle",this,e);let l=[];return l=co(l,Do(i)),l=co(l,Do(a)),l=co(l,Do(s)),l}getBeforeBody(e,n){return W0($t(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return We(e,a=>{const s={before:[],lines:[],after:[]},l=j0(o,a);co(s.before,Do($t(l,"beforeLabel",this,a))),co(s.lines,$t(l,"label",this,a)),co(s.after,Do($t(l,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(e,n){return W0($t(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=$t(o,"beforeFooter",this,e),a=$t(o,"footer",this,e),s=$t(o,"afterFooter",this,e);let l=[];return l=co(l,Do(i)),l=co(l,Do(a)),l=co(l,Do(s)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],a=[],s=[];let l=[],c,u;for(c=0,u=n.length;c<u;++c)l.push(S8(this.chart,n[c]));return e.filter&&(l=l.filter((p,h,m)=>e.filter(p,h,m,o))),e.itemSort&&(l=l.sort((p,h)=>e.itemSort(p,h,o))),We(l,p=>{const h=j0(e.callbacks,p);i.push($t(h,"labelColor",this,p)),a.push($t(h,"labelPointStyle",this,p)),s.push($t(h,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const l=Ia[o.position].call(this,i,this._eventPosition);s=this._createItems(o),this.title=this.getTitle(s,o),this.beforeBody=this.getBeforeBody(s,o),this.body=this.getBody(s,o),this.afterBody=this.getAfterBody(s,o),this.footer=this.getFooter(s,o);const c=this._size=_0(this,o),u=Object.assign({},l,c),p=H0(this.chart,o,u),h=U0(o,u,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,a={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const a=this.getCaretPosition(e,o,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:l}=o,{topLeft:c,topRight:u,bottomLeft:p,bottomRight:h}=Nr(l),{x:m,y:b}=e,{width:y,height:v}=n;let w,A,I,V,R,E;return a==="center"?(R=b+v/2,i==="left"?(w=m,A=w-s,V=R+s,E=R-s):(w=m+y,A=w+s,V=R-s,E=R+s),I=w):(i==="left"?A=m+Math.max(c,p)+s:i==="right"?A=m+y-Math.max(u,h)-s:A=this.caretX,a==="top"?(V=b,R=V-s,w=A-s,I=A+s):(V=b+v,R=V+s,w=A+s,I=A-s),E=V),{x1:w,x2:A,x3:I,y1:V,y2:R,y3:E}}drawTitle(e,n,o){const i=this.title,a=i.length;let s,l,c;if(a){const u=bi(o.rtl,this.x,this.width);for(e.x=bl(this,o.titleAlign,o),n.textAlign=u.textAlign(o.titleAlign),n.textBaseline="middle",s=wt(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=s.string,c=0;c<a;++c)n.fillText(i[c],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+l,c+1===a&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,a){const s=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:c,boxWidth:u}=a,p=wt(a.bodyFont),h=bl(this,"left",a),m=i.x(h),b=c<p.lineHeight?(p.lineHeight-c)/2:0,y=n.y+b;if(a.usePointStyle){const v={radius:Math.min(u,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},w=i.leftForLtr(m,u)+u/2,A=y+c/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,ou(e,v,w,A),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,ou(e,v,w,A)}else{e.lineWidth=Re(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const v=i.leftForLtr(m,u),w=i.leftForLtr(i.xPlus(m,1),u-2),A=Nr(s.borderRadius);Object.values(A).some(I=>I!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,va(e,{x:v,y,w:u,h:c,radius:A}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),va(e,{x:w,y:y+1,w:u-2,h:c-2,radius:A}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(v,y,u,c),e.strokeRect(v,y,u,c),e.fillStyle=s.backgroundColor,e.fillRect(w,y+1,u-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:p}=o,h=wt(o.bodyFont);let m=h.lineHeight,b=0;const y=bi(o.rtl,this.x,this.width),v=function(H){n.fillText(H,y.x(e.x+b),e.y+m/2),e.y+=m+a},w=y.textAlign(s);let A,I,V,R,E,T,B;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,e.x=bl(this,w,o),n.fillStyle=o.bodyColor,We(this.beforeBody,v),b=l&&w!=="right"?s==="center"?u/2+p:u+2+p:0,R=0,T=i.length;R<T;++R){for(A=i[R],I=this.labelTextColors[R],n.fillStyle=I,We(A.before,v),V=A.lines,l&&V.length&&(this._drawColorBox(n,e,R,y,o),m=Math.max(h.lineHeight,c)),E=0,B=V.length;E<B;++E)v(V[E]),m=h.lineHeight;We(A.after,v)}b=0,m=h.lineHeight,We(this.afterBody,v),e.y-=a}drawFooter(e,n,o){const i=this.footer,a=i.length;let s,l;if(a){const c=bi(o.rtl,this.x,this.width);for(e.x=bl(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",s=wt(o.footerFont),n.fillStyle=o.footerColor,n.font=s.string,l=0;l<a;++l)n.fillText(i[l],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:a,yAlign:s}=this,{x:l,y:c}=e,{width:u,height:p}=o,{topLeft:h,topRight:m,bottomLeft:b,bottomRight:y}=Nr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+h,c),s==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+u-m,c),n.quadraticCurveTo(l+u,c,l+u,c+m),s==="center"&&a==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+u,c+p-y),n.quadraticCurveTo(l+u,c+p,l+u-y,c+p),s==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+b,c+p),n.quadraticCurveTo(l,c+p,l,c+p-b),s==="center"&&a==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,c+h),n.quadraticCurveTo(l,c,l+h,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,a=o&&o.y;if(i||a){const s=Ia[e.position].call(this,this._active,this._eventPosition);if(!s)return;const l=this._size=_0(this,e),c=Object.assign({},s,this._size),u=H0(n,e,c),p=U0(e,c,u,n);(i._to!==p.x||a._to!==p.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const s=Ft(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=o,this.drawBackground(a,e,i,n),Ag(e,n.textDirection),a.y+=s.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),Dg(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:c})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),a=!js(o,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(e,a,n,o),l=this._positionChanged(s,e),c=n||!js(s,a)||l;return c&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,i){const a=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,a.mode,a,o);return a.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:o,caretY:i,options:a}=this,s=Ia[a.position].call(this,e,n);return s!==!1&&(o!==s.x||i!==s.y)}}ie(Bu,"positioners",Ia);var O8={id:"tooltip",_element:Bu,positioners:Ia,afterInit(t,e,n){n&&(t.tooltip=new Bu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:G0},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},I8=Object.freeze({__proto__:null,Colors:W4,Decimation:X4,Filler:p8,Legend:v8,SubTitle:x8,Title:w8,Tooltip:O8});const N8=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function V8(t,e,n,o){const i=t.indexOf(e);if(i===-1)return N8(t,e,n,o);const a=t.lastIndexOf(e);return i!==a?n:i}const R8=(t,e)=>t===null?null:Bt(Math.round(t),0,e);function Q0(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Pu extends Lr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:a}of n)o[i]===a&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Ve(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:V8(o,e,Ce(n,e),this._addedLabels),R8(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let s=e;s<=n;s++)i.push({value:s});return i}getLabelForValue(e){return Q0.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ie(Pu,"id","category"),ie(Pu,"defaults",{ticks:{callback:Q0}});function F8(t,e){const n=[],{bounds:i,step:a,min:s,max:l,precision:c,count:u,maxTicks:p,maxDigits:h,includeBounds:m}=t,b=a||1,y=p-1,{min:v,max:w}=e,A=!Ve(s),I=!Ve(l),V=!Ve(u),R=(w-v)/(h+1);let E=Jm((w-v)/y/b)*b,T,B,H,_;if(E<1e-14&&!A&&!I)return[{value:v},{value:w}];_=Math.ceil(w/E)-Math.floor(v/E),_>y&&(E=Jm(_*E/y/b)*b),Ve(c)||(T=Math.pow(10,c),E=Math.ceil(E*T)/T),i==="ticks"?(B=Math.floor(v/E)*E,H=Math.ceil(w/E)*E):(B=v,H=w),A&&I&&a&&PS((l-s)/a,E/1e3)?(_=Math.round(Math.min((l-s)/E,p)),E=(l-s)/_,B=s,H=l):V?(B=A?s:B,H=I?l:H,_=u-1,E=(H-B)/_):(_=(H-B)/E,ha(_,Math.round(_),E/1e3)?_=Math.round(_):_=Math.ceil(_));const j=Math.max(Zm(E),Zm(B));T=Math.pow(10,Ve(c)?j:c),B=Math.round(B*T)/T,H=Math.round(H*T)/T;let Q=0;for(A&&(m&&B!==s?(n.push({value:s}),B<s&&Q++,ha(Math.round((B+Q*E)*T)/T,s,X0(s,R,t))&&Q++):B<s&&Q++);Q<_;++Q){const F=Math.round((B+Q*E)*T)/T;if(I&&F>l)break;n.push({value:F})}return I&&m&&H!==l?n.length&&ha(n[n.length-1].value,l,X0(l,R,t))?n[n.length-1].value=l:n.push({value:l}):(!I||H===l)&&n.push({value:H}),n}function X0(t,e,{horizontal:n,minRotation:o}){const i=Wn(o),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}class yl extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Ve(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:a}=this;const s=c=>i=n?i:c,l=c=>a=o?a:c;if(e){const c=so(i),u=so(a);c<0&&u<0?l(0):c>0&&u>0&&s(0)}if(i===a){let c=a===0?1:Math.abs(a*.05);l(a+c),e||s(i-c)}this.min=i,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=F8(i,a);return e.bounds==="ticks"&&Ym(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return ba(e,this.chart.options.locale,this.options.ticks.format)}}class Ou extends yl{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ht(e)?e:0,this.max=ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Wn(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ie(Ou,"id","linear"),ie(Ou,"defaults",{ticks:{callback:qs.formatters.numeric}});const Na=t=>Math.floor(or(t)),zr=(t,e)=>Math.pow(10,Na(t)+e);function q0(t){return t/Math.pow(10,Na(t))===1}function K0(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function T8(t,e){const n=e-t;let o=Na(n);for(;K0(t,e,o)>10;)o++;for(;K0(t,e,o)<10;)o--;return Math.min(o,Na(t))}function M8(t,{min:e,max:n}){e=gn(t.min,e);const o=[],i=Na(e);let a=T8(e,n),s=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=i>a?Math.pow(10,i):0,u=Math.round((e-c)*s)/s,p=Math.floor((e-c)/l/10)*l*10;let h=Math.floor((u-p)/Math.pow(10,a)),m=gn(t.min,Math.round((c+p+h*Math.pow(10,a))*s)/s);for(;m<n;)o.push({value:m,major:q0(m),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),m=Math.round((c+p+h*Math.pow(10,a))*s)/s;const b=gn(t.max,m);return o.push({value:b,major:q0(b),significand:h}),o}class Iu extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=yl.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return ht(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ht(e)?Math.max(0,e):null,this.max=ht(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ht(this._userMin)&&(this.min=e===zr(this.min,0)?zr(this.min,-1):zr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const a=l=>o=e?o:l,s=l=>i=n?i:l;o===i&&(o<=0?(a(1),s(10)):(a(zr(o,-1)),s(zr(i,1)))),o<=0&&a(zr(i,-1)),i<=0&&s(zr(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=M8(n,this);return e.bounds==="ticks"&&Ym(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":ba(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=or(e),this._valueRange=or(this.max)-or(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(or(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ie(Iu,"id","logarithmic"),ie(Iu,"defaults",{ticks:{callback:qs.formatters.logarithmic,major:{enabled:!0}}});function Nu(t){const e=t.ticks;if(e.display&&t.display){const n=Ft(e.backdropPadding);return Ce(e.font&&e.font.size,dt.font.size)+n.height}return 0}function L8(t,e,n){return n=Ye(n)?n:[n],{w:QS(t,e.string,n),h:n.length*e.lineHeight}}function J0(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function z8(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],a=t._pointLabels.length,s=t.options.pointLabels,l=s.centerPointLabels?Ze/a:0;for(let c=0;c<a;c++){const u=s.setContext(t.getPointLabelContext(c));i[c]=u.padding;const p=t.getPointPosition(c,t.drawingArea+i[c],l),h=wt(u.font),m=L8(t.ctx,h,t._pointLabels[c]);o[c]=m;const b=bn(t.getIndexAngle(c)+l),y=Math.round(Kc(b)),v=J0(y,p.x,m.w,0,180),w=J0(y,p.y,m.h,90,270);_8(n,e,b,v,w)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=W8(t,o,i)}function _8(t,e,n,o,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let l=0,c=0;o.start<e.l?(l=(e.l-o.start)/a,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/a,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(c=(e.t-i.start)/s,t.t=Math.min(t.t,e.t-c)):i.end>e.b&&(c=(i.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function H8(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:a,padding:s,size:l}=n,c=t.getPointPosition(e,o+i+s,a),u=Math.round(Kc(bn(c.angle+gt))),p=Q8(c.y,l.h,u),h=j8(u),m=G8(c.x,l.w,h);return{visible:!0,x:c.x,y:p,textAlign:h,left:m,top:p,right:m+l.w,bottom:p+l.h}}function U8(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:a}=t;return!(So({x:n,y:o},e)||So({x:n,y:a},e)||So({x:i,y:o},e)||So({x:i,y:a},e))}function W8(t,e,n){const o=[],i=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:l}=a.pointLabels,c={extra:Nu(a)/2,additionalAngle:s?Ze/i:0};let u;for(let p=0;p<i;p++){c.padding=n[p],c.size=e[p];const h=H8(t,p,c);o.push(h),l==="auto"&&(h.visible=U8(h,u),h.visible&&(u=h))}return o}function j8(t){return t===0||t===180?"center":t<180?"left":"right"}function G8(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Q8(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function X8(t,e,n){const{left:o,top:i,right:a,bottom:s}=n,{backdropColor:l}=e;if(!Ve(l)){const c=Nr(e.borderRadius),u=Ft(e.backdropPadding);t.fillStyle=l;const p=o-u.left,h=i-u.top,m=a-o+u.width,b=s-i+u.height;Object.values(c).some(y=>y!==0)?(t.beginPath(),va(t,{x:p,y:h,w:m,h:b,radius:c}),t.fill()):t.fillRect(p,h,m,b)}}function q8(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const a=t._pointLabelItems[i];if(!a.visible)continue;const s=o.setContext(t.getPointLabelContext(i));X8(n,s,a);const l=wt(s.font),{x:c,y:u,textAlign:p}=a;Ir(n,t._pointLabels[i],c,u+l.lineHeight/2,l,{color:s.color,textAlign:p,textBaseline:"middle"})}}function Y0(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,$e);else{let a=t.getPointPosition(0,e);i.moveTo(a.x,a.y);for(let s=1;s<o;s++)a=t.getPointPosition(s,e),i.lineTo(a.x,a.y)}}function K8(t,e,n,o,i){const a=t.ctx,s=e.circular,{color:l,lineWidth:c}=e;!s&&!o||!l||!c||n<0||(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),Y0(t,n,s,o),a.closePath(),a.stroke(),a.restore())}function J8(t,e,n){return rr(t,{label:n,index:e,type:"pointLabel"})}class Va extends yl{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Ft(Nu(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=ht(e)&&!isNaN(e)?e:0,this.max=ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Nu(this.options))}generateTickLabels(e){yl.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=Qe(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?z8(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=$e/(this._pointLabels.length||1),o=this.options.startAngle||0;return bn(e*n+Wn(o))}getDistanceFromCenterForValue(e){if(Ve(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Ve(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return J8(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-gt+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:a}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),Y0(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:a}=n,s=this._pointLabels.length;let l,c,u;if(n.pointLabels.display&&q8(this,s),i.display&&this.ticks.forEach((p,h)=>{if(h!==0||h===0&&this.min<0){c=this.getDistanceFromCenterForValue(p.value);const m=this.getContext(h),b=i.setContext(m),y=a.setContext(m);K8(this,b,c,s,y)}}),o.display){for(e.save(),l=s-1;l>=0;l--){const p=o.setContext(this.getPointLabelContext(l)),{color:h,lineWidth:m}=p;!m||!h||(e.lineWidth=m,e.strokeStyle=h,e.setLineDash(p.borderDash),e.lineDashOffset=p.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let a,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const u=o.setContext(this.getContext(c)),p=wt(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),u.showLabelBackdrop){e.font=p.string,s=e.measureText(l.label).width,e.fillStyle=u.backdropColor;const h=Ft(u.backdropPadding);e.fillRect(-s/2-h.left,-a-p.size/2-h.top,s+h.width,p.size+h.height)}Ir(e,l.label,0,-a,p,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}ie(Va,"id","radialLinear"),ie(Va,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:qs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ie(Va,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ie(Va,"descriptors",{angleLines:{_fallback:"grid"}});const vl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},en=Object.keys(vl);function Z0(t,e){return t-e}function $0(t,e){if(Ve(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:a}=t._parseOpts;let s=e;return typeof o=="function"&&(s=o(s)),ht(s)||(s=typeof o=="string"?n.parse(s,o):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(hi(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function e1(t,e,n,o){const i=en.length;for(let a=en.indexOf(t);a<i-1;++a){const s=vl[en[a]],l=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(l*s.size))<=o)return en[a]}return en[i-1]}function Y8(t,e,n,o,i){for(let a=en.length-1;a>=en.indexOf(n);a--){const s=en[a];if(vl[s].common&&t._adapter.diff(i,o,s)>=e-1)return s}return en[n?en.indexOf(n):0]}function Z8(t){for(let e=en.indexOf(t)+1,n=en.length;e<n;++e)if(vl[en[e]].common)return en[e]}function t1(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Yc(n,e),a=n[o]>=e?n[o]:n[i];t[a]=!0}}function $8(t,e,n,o){const i=t._adapter,a=+i.startOf(e[0].value,o),s=e[e.length-1].value;let l,c;for(l=a;l<=s;l=+i.add(l,1,o))c=n[l],c>=0&&(e[c].major=!0);return e}function n1(t,e,n){const o=[],i={},a=e.length;let s,l;for(s=0;s<a;++s)l=e[s],i[l]=s,o.push({value:l,major:!1});return a===0||!n?o:$8(t,o,i,n)}class Ra extends Lr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new lA._date(e.adapters.date);i.init(n),fa(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:$0(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:l}=this.getUserBounds();function c(u){!s&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!l&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!s||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=ht(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),a=ht(a)&&!isNaN(a)?a:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,l=VS(i,a,s);return this._unit=n.unit||(o.autoSkip?e1(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Y8(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Z8(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),n1(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,a;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?o=a:o=(a-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Bt(n,0,s),o=Bt(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,a=i.time,s=a.unit||e1(a.minUnit,n,o,this._getLabelCapacity(n)),l=Ce(i.ticks.stepSize,1),c=s==="week"?a.isoWeekday:!1,u=hi(c)||c===!0,p={};let h=n,m,b;if(u&&(h=+e.startOf(h,"isoWeek",c)),h=+e.startOf(h,u?"day":s),e.diff(o,n,s)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+s);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(m=h,b=0;m<o;m=+e.add(m,l,s),b++)t1(p,m,y);return(m===o||i.bounds==="ticks"||b===1)&&t1(p,m,y),Object.keys(p).sort(Z0).map(v=>+v)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(e,s)}_tickFormatFunction(e,n,o,i){const a=this.options,s=a.ticks.callback;if(s)return Qe(s,[e,n,o],this);const l=a.time.displayFormats,c=this._unit,u=this._majorUnit,p=c&&l[c],h=u&&l[u],m=o[n],b=u&&h&&m&&m.major;return this._adapter.format(e,i||(b?h:p))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Wn(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*a+l*s,h:o*s+l*a}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,a=this._tickFormatFunction(e,0,n1(this,[e],this._majorUnit),i),s=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push($0(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ng(e.sort(Z0))}}ie(Ra,"id","time"),ie(Ra,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function kl(t,e,n){let o=0,i=t.length-1,a,s,l,c;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=xo(t,"pos",e)),{pos:a,time:l}=t[o],{pos:s,time:c}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=xo(t,"time",e)),{time:a,pos:l}=t[o],{time:s,pos:c}=t[i]);const u=s-a;return u?l+(c-l)*(e-a)/u:l}class Vu extends Ra{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=kl(n,this.min),this._tableRange=kl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],a=[];let s,l,c,u,p;for(s=0,l=e.length;s<l;++s)u=e[s],u>=n&&u<=o&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(s=0,l=i.length;s<l;++s)p=i[s+1],c=i[s-1],u=i[s],Math.round((p+c)/2)!==u&&a.push({time:u,pos:s/(l-1)});return a}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,a)=>i-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(kl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return kl(this._table,o*this._tableRange+this._minPos,!0)}}ie(Vu,"id","timeseries"),ie(Vu,"defaults",Ra.defaults);var e9=Object.freeze({__proto__:null,CategoryScale:Pu,LinearScale:Ou,LogarithmicScale:Iu,RadialLinearScale:Va,TimeScale:Ra,TimeSeriesScale:Vu});const t9=[sA,M4,I8,e9];Zt.register(...t9);/*!
32
32
  * chartjs-plugin-datalabels v2.2.0
33
33
  * https://chartjs-plugin-datalabels.netlify.app
34
34
  * (c) 2017-2022 chartjs-plugin-datalabels contributors
35
35
  * Released under the MIT license
36
36
  */var o1=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Fa={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(`
37
37
  `)):Array.isArray(n)?t.push.apply(t,n):Ve(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var o=[].concat(e),i=o.length,a=t.font,s=0,l;for(t.font=n.string,l=0;l<i;++l)s=Math.max(t.measureText(o[l]).width,s);return t.font=a,{height:i*n.lineHeight,width:s}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),o=[],i,a,s,l;for(i=0,s=e.length;i<s;++i)l=e[i],a=n.indexOf(l),a===-1?o.push([l,1]):n.splice(a,1);for(i=0,s=n.length;i<s;++i)o.push([n[i],-1]);return o},rasterize:function(t){return Math.round(t*o1)/o1}};function Ru(t,e){var n=e.x,o=e.y;if(n===null)return{x:0,y:-1};if(o===null)return{x:1,y:0};var i=t.x-n,a=t.y-o,s=Math.sqrt(i*i+a*a);return{x:s?i/s:0,y:s?a/s:-1}}function n9(t,e,n,o,i){switch(i){case"center":n=o=0;break;case"bottom":n=0,o=1;break;case"right":n=1,o=0;break;case"left":n=-1,o=0;break;case"top":n=0,o=-1;break;case"start":n=-n,o=-o;break;case"end":break;default:i*=Math.PI/180,n=Math.cos(i),o=Math.sin(i);break}return{x:t,y:e,vx:n,vy:o}}var o9=0,r1=1,i1=2,a1=4,s1=8;function wl(t,e,n){var o=o9;return t<n.left?o|=r1:t>n.right&&(o|=i1),e<n.top?o|=s1:e>n.bottom&&(o|=a1),o}function r9(t,e){for(var n=t.x0,o=t.y0,i=t.x1,a=t.y1,s=wl(n,o,e),l=wl(i,a,e),c,u,p;!(!(s|l)||s&l);)c=s||l,c&s1?(u=n+(i-n)*(e.top-o)/(a-o),p=e.top):c&a1?(u=n+(i-n)*(e.bottom-o)/(a-o),p=e.bottom):c&i1?(p=o+(a-o)*(e.right-n)/(i-n),u=e.right):c&r1&&(p=o+(a-o)*(e.left-n)/(i-n),u=e.left),c===s?(n=u,o=p,s=wl(n,o,e)):(i=u,a=p,l=wl(i,a,e));return{x0:n,x1:i,y0:o,y1:a}}function xl(t,e){var n=e.anchor,o=t,i,a;return e.clamp&&(o=r9(o,e.area)),n==="start"?(i=o.x0,a=o.y0):n==="end"?(i=o.x1,a=o.y1):(i=(o.x0+o.x1)/2,a=(o.y0+o.y1)/2),n9(i,a,t.vx,t.vy,e.align)}var Sl={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,o=Math.cos(n),i=Math.sin(n),a=t.innerRadius,s=t.outerRadius;return xl({x0:t.x+o*a,y0:t.y+i*a,x1:t.x+o*s,y1:t.y+i*s,vx:o,vy:i},e)},point:function(t,e){var n=Ru(t,e.origin),o=n.x*t.options.radius,i=n.y*t.options.radius;return xl({x0:t.x-o,y0:t.y-i,x1:t.x+o,y1:t.y+i,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=Ru(t,e.origin),o=t.x,i=t.y,a=0,s=0;return t.horizontal?(o=Math.min(t.x,t.base),a=Math.abs(t.base-t.x)):(i=Math.min(t.y,t.base),s=Math.abs(t.base-t.y)),xl({x0:o,y0:i+s,x1:o+a,y1:i,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=Ru(t,e.origin);return xl({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},Eo=Fa.rasterize;function i9(t){var e=t.borderWidth||0,n=t.padding,o=t.size.height,i=t.size.width,a=-i/2,s=-o/2;return{frame:{x:a-n.left-e,y:s-n.top-e,w:i+n.width+e*2,h:o+n.height+e*2},text:{x:a,y:s,w:i,h:o}}}function a9(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var o=n.getBasePixel();return t.horizontal?{x:o,y:null}:{x:null,y:o}}function s9(t){return t instanceof vi?Sl.arc:t instanceof Pa?Sl.point:t instanceof Oa?Sl.bar:Sl.fallback}function l9(t,e,n,o,i,a){var s=Math.PI/2;if(a){var l=Math.min(a,i/2,o/2),c=e+l,u=n+l,p=e+o-l,h=n+i-l;t.moveTo(e,u),c<p&&u<h?(t.arc(c,u,l,-Math.PI,-s),t.arc(p,u,l,-s,0),t.arc(p,h,l,0,s),t.arc(c,h,l,s,Math.PI)):c<p?(t.moveTo(c,n),t.arc(p,u,l,-s,s),t.arc(c,u,l,s,Math.PI+s)):u<h?(t.arc(c,u,l,-Math.PI,0),t.arc(c,h,l,0,Math.PI)):t.arc(c,u,l,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,o,i)}function d9(t,e,n){var o=n.backgroundColor,i=n.borderColor,a=n.borderWidth;!o&&(!i||!a)||(t.beginPath(),l9(t,Eo(e.x)+a/2,Eo(e.y)+a/2,Eo(e.w)-a,Eo(e.h)-a,n.borderRadius),t.closePath(),o&&(t.fillStyle=o,t.fill()),i&&a&&(t.strokeStyle=i,t.lineWidth=a,t.lineJoin="miter",t.stroke()))}function c9(t,e,n){var o=n.lineHeight,i=t.w,a=t.x,s=t.y+o/2;return e==="center"?a+=i/2:(e==="end"||e==="right")&&(a+=i),{h:o,w:i,x:a,y:s}}function u9(t,e,n){var o=t.shadowBlur,i=n.stroked,a=Eo(n.x),s=Eo(n.y),l=Eo(n.w);i&&t.strokeText(e,a,s,l),n.filled&&(o&&i&&(t.shadowBlur=0),t.fillText(e,a,s,l),o&&i&&(t.shadowBlur=o))}function f9(t,e,n,o){var i=o.textAlign,a=o.color,s=!!a,l=o.font,c=e.length,u=o.textStrokeColor,p=o.textStrokeWidth,h=u&&p,m;if(!(!c||!s&&!h))for(n=c9(n,i,l),t.font=l.string,t.textAlign=i,t.textBaseline="middle",t.shadowBlur=o.textShadowBlur,t.shadowColor=o.textShadowColor,s&&(t.fillStyle=a),h&&(t.lineJoin="round",t.lineWidth=p,t.strokeStyle=u),m=0,c=e.length;m<c;++m)u9(t,e[m],{stroked:h,filled:s,w:n.w,x:n.x,y:n.y+n.h*m})}var l1=function(t,e,n,o){var i=this;i._config=t,i._index=o,i._model=null,i._rects=null,i._ctx=e,i._el=n};ao(l1.prototype,{_modelize:function(t,e,n,o){var i=this,a=i._index,s=wt(et([n.font,{}],o,a)),l=et([n.color,dt.color],o,a);return{align:et([n.align,"center"],o,a),anchor:et([n.anchor,"center"],o,a),area:o.chart.chartArea,backgroundColor:et([n.backgroundColor,null],o,a),borderColor:et([n.borderColor,null],o,a),borderRadius:et([n.borderRadius,0],o,a),borderWidth:et([n.borderWidth,0],o,a),clamp:et([n.clamp,!1],o,a),clip:et([n.clip,!1],o,a),color:l,display:t,font:s,lines:e,offset:et([n.offset,4],o,a),opacity:et([n.opacity,1],o,a),origin:a9(i._el,o),padding:Ft(et([n.padding,4],o,a)),positioner:s9(i._el),rotation:et([n.rotation,0],o,a)*(Math.PI/180),size:Fa.textSize(i._ctx,e,s),textAlign:et([n.textAlign,"start"],o,a),textShadowBlur:et([n.textShadowBlur,0],o,a),textShadowColor:et([n.textShadowColor,l],o,a),textStrokeColor:et([n.textStrokeColor,l],o,a),textStrokeWidth:et([n.textStrokeWidth,0],o,a)}},update:function(t){var e=this,n=null,o=null,i=e._index,a=e._config,s,l,c,u=et([a.display,!0],t,i);u&&(s=t.dataset.data[i],l=Ce(Qe(a.formatter,[s,t]),s),c=Ve(l)?[]:Fa.toTextLines(l),c.length&&(n=e._modelize(u,c,a,t),o=i9(n))),e._model=n,e._rects=o},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n=this,o=t.ctx,i=n._model,a=n._rects,s;this.visible()&&(o.save(),i.clip&&(s=i.area,o.beginPath(),o.rect(s.left,s.top,s.right-s.left,s.bottom-s.top),o.clip()),o.globalAlpha=Fa.bound(0,i.opacity,1),o.translate(Eo(e.x),Eo(e.y)),o.rotate(i.rotation),d9(o,a.frame,i),f9(o,i.lines,a.text,i),o.restore())}});var p9=Number.MIN_SAFE_INTEGER||-9007199254740991,h9=Number.MAX_SAFE_INTEGER||9007199254740991;function Ta(t,e,n){var o=Math.cos(n),i=Math.sin(n),a=e.x,s=e.y;return{x:a+o*(t.x-a)-i*(t.y-s),y:s+i*(t.x-a)+o*(t.y-s)}}function d1(t,e){var n=h9,o=p9,i=e.origin,a,s,l,c,u;for(a=0;a<t.length;++a)s=t[a],l=s.x-i.x,c=s.y-i.y,u=e.vx*l+e.vy*c,n=Math.min(n,u),o=Math.max(o,u);return{min:n,max:o}}function Cl(t,e){var n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);return{vx:(e.x-t.x)/i,vy:(e.y-t.y)/i,origin:t,ln:i}}var c1=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};ao(c1.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,n=1,o=e._rect;return t=Ta(t,e.center(),-e._rotation),!(t.x<o.x-n||t.y<o.y-n||t.x>o.x+o.w+n*2||t.y>o.y+o.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),o=[Cl(e[0],e[1]),Cl(e[0],e[3])],i,a,s;for(this._rotation!==t._rotation&&o.push(Cl(n[0],n[1]),Cl(n[0],n[3])),i=0;i<o.length;++i)if(a=d1(e,o[i]),s=d1(n,o[i]),a.max<s.min||s.max<a.min)return!1;return!0},_points:function(){var t=this,e=t._rect,n=t._rotation,o=t.center();return[Ta({x:e.x,y:e.y},o,n),Ta({x:e.x+e.w,y:e.y},o,n),Ta({x:e.x+e.w,y:e.y+e.h},o,n),Ta({x:e.x,y:e.y+e.h},o,n)]}});function u1(t,e,n){var o=e.positioner(t,e),i=o.vx,a=o.vy;if(!i&&!a)return{x:o.x,y:o.y};var s=n.w,l=n.h,c=e.rotation,u=Math.abs(s/2*Math.cos(c))+Math.abs(l/2*Math.sin(c)),p=Math.abs(s/2*Math.sin(c))+Math.abs(l/2*Math.cos(c)),h=1/Math.max(Math.abs(i),Math.abs(a));return u*=i*h,p*=a*h,u+=e.offset*i,p+=e.offset*a,{x:o.x+u,y:o.y+p}}function m9(t,e){var n,o,i,a;for(n=t.length-1;n>=0;--n)for(i=t[n].$layout,o=n-1;o>=0&&i._visible;--o)a=t[o].$layout,a._visible&&i._box.intersects(a._box)&&e(i,a);return t}function g9(t){var e,n,o,i,a,s,l;for(e=0,n=t.length;e<n;++e)o=t[e],i=o.$layout,i._visible&&(l=new Proxy(o._el,{get:(c,u)=>c.getProps([u],!0)[u]}),a=o.geometry(),s=u1(l,o.model(),a),i._box.update(s,a,o.rotation()));return m9(t,function(c,u){var p=c._hidable,h=u._hidable;p&&h||h?u._visible=!1:p&&(c._visible=!1)})}var Ma={prepare:function(t){var e=[],n,o,i,a,s;for(n=0,i=t.length;n<i;++n)for(o=0,a=t[n].length;o<a;++o)s=t[n][o],e.push(s),s.$layout={_box:new c1,_hidable:!1,_visible:!0,_set:n,_idx:s._index};return e.sort(function(l,c){var u=l.$layout,p=c.$layout;return u._idx===p._idx?p._set-u._set:p._idx-u._idx}),this.update(e),e},update:function(t){var e=!1,n,o,i,a,s;for(n=0,o=t.length;n<o;++n)i=t[n],a=i.model(),s=i.$layout,s._hidable=a&&a.display==="auto",s._visible=i.visible(),e|=s._hidable;e&&g9(t)},lookup:function(t,e){var n,o;for(n=t.length-1;n>=0;--n)if(o=t[n].$layout,o&&o._visible&&o._box.contains(e))return t[n];return null},draw:function(t,e){var n,o,i,a,s,l;for(n=0,o=e.length;n<o;++n)i=e[n],a=i.$layout,a._visible&&(s=i.geometry(),l=u1(i._el,i.model(),s),a._box.update(l,s,i.rotation()),i.draw(t,l))}},b9=function(t){if(Ve(t))return null;var e=t,n,o,i;if(Re(t))if(!Ve(t.label))e=t.label;else if(!Ve(t.r))e=t.r;else for(e="",n=Object.keys(t),i=0,o=n.length;i<o;++i)e+=(i!==0?", ":"")+n[i]+": "+t[n[i]];return""+e},y9={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:b9,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},tn="$datalabels",f1="$default";function v9(t,e){var n=t.datalabels,o={},i=[],a,s;return n===!1?null:(n===!0&&(n={}),e=ao({},[e,n]),a=e.labels||{},s=Object.keys(a),delete e.labels,s.length?s.forEach(function(l){a[l]&&i.push(ao({},[e,a[l],{_key:l}]))}):i.push(e),o=i.reduce(function(l,c){return We(c.listeners||{},function(u,p){l[p]=l[p]||{},l[p][c._key||f1]=u}),delete c.listeners,l},{}),{labels:i,listeners:o})}function Fu(t,e,n,o){if(e){var i=n.$context,a=n.$groups,s;e[a._set]&&(s=e[a._set][a._key],s&&Qe(s,[i,o])===!0&&(t[tn]._dirty=!0,n.update(i)))}}function k9(t,e,n,o,i){var a,s;!n&&!o||(n?o?n!==o&&(s=a=!0):s=!0:a=!0,s&&Fu(t,e.leave,n,i),a&&Fu(t,e.enter,o,i))}function w9(t,e){var n=t[tn],o=n._listeners,i,a;if(!(!o.enter&&!o.leave)){if(e.type==="mousemove")a=Ma.lookup(n._labels,e);else if(e.type!=="mouseout")return;i=n._hovered,n._hovered=a,k9(t,o,i,a,e)}}function x9(t,e){var n=t[tn],o=n._listeners.click,i=o&&Ma.lookup(n._labels,e);i&&Fu(t,o,i,e)}var Tu={id:"datalabels",defaults:y9,beforeInit:function(t){t[tn]={_actives:[]}},beforeUpdate:function(t){var e=t[tn];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var o=e.index,i=t[tn],a=i._datasets[o]=[],s=t.isDatasetVisible(o),l=t.data.datasets[o],c=v9(l,n),u=e.meta.data||[],p=t.ctx,h,m,b,y,v,w,A,I;for(p.save(),h=0,b=u.length;h<b;++h)if(A=u[h],A[tn]=[],s&&A&&t.getDataVisibility(h)&&!A.skip)for(m=0,y=c.labels.length;m<y;++m)v=c.labels[m],w=v._key,I=new l1(v,p,A,h),I.$groups={_set:o,_key:w||f1},I.$context={active:!1,chart:t,dataIndex:h,dataset:l,datasetIndex:o},I.update(I.$context),A[tn].push(I),a.push(I);p.restore(),ao(i._listeners,c.listeners,{merger:function(V,R,E){R[V]=R[V]||{},R[V][e.index]=E[V],i._listened=!0}})},afterUpdate:function(t){t[tn]._labels=Ma.prepare(t[tn]._datasets)},afterDatasetsDraw:function(t){Ma.draw(t,t[tn]._labels)},beforeEvent:function(t,e){if(t[tn]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":w9(t,n);break;case"click":x9(t,n);break}}},afterEvent:function(t){var e=t[tn],n=e._actives,o=e._actives=t.getActiveElements(),i=Fa.arrayDiff(n,o),a,s,l,c,u,p,h;for(a=0,s=i.length;a<s;++a)if(u=i[a],u[1])for(h=u[0].element[tn]||[],l=0,c=h.length;l<c;++l)p=h[l],p.$context.active=u[1]===1,p.update(p.$context);(e._dirty||i.length)&&(Ma.update(e._labels),t.render()),delete e._dirty}};const S9={class:"flex flex-col h-full m-24 overflow-hidden p-24"},C9={class:"flex flex-col gap-8"},A9={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},D9={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},E9={class:"grow"},p1=r.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean},hideXAxis:{type:Boolean,default:void 0},hideYAxis:{type:Boolean,default:void 0},legend:{default:void 0},tooltip:{default:void 0},datalabels:{default:void 0},xCfg:{default:void 0},yCfg:{default:void 0},height:{default:void 0},width:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.hideXAxis,()=>e.hideYAxis,()=>e.legend,()=>e.datalabels,()=>e.xCfg,()=>e.yCfg,()=>e.height,()=>e.width],()=>{o&&o.config.options&&(o.destroy(),c())});const i=r.computed(()=>e.transpose?"y":"x");function a({context:u,color:p}){const{ctx:h,chartArea:m}=u.chart;if(!m)return;const b=h==null?void 0:h.createLinearGradient(0,0,0,m.height);return b.addColorStop(0,yc(p,.5)),b.addColorStop(1,yc(p,0)),b}const s=r.computed(()=>({height:e.height||"100%",width:e.width||"100%"})),l=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(u=>{const p=Go(u.color)??"";let h;u.borderColor===null?h=void 0:u.borderColor?h=Go(u.borderColor):h=p;let m;return u.backgroundColor===null?m=void 0:u.backgroundColor?m=Go(u.backgroundColor):m=p?b=>a({context:b,color:p}):void 0,{...u,backgroundColor:m,borderColor:h,borderDash:u.dash?[5,5]:void 0,tension:.1}})}));r.watch(l,()=>{o&&(o.data=l.value,o.update())},{deep:!0});function c(){Zt.register(Tu),n.value&&(o=new Zt(n.value,{type:"line",data:l.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0,pointStyle:"line"}},tooltip:{...e.tooltip},datalabels:{display:!1,...e.datalabels}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0,...e.xCfg},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0,...e.yCfg}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{c()}),(u,p)=>(r.openBlock(),r.createElementBlock("div",S9,[r.createElementVNode("div",C9,[r.renderSlot(u.$slots,"title"),r.createElementVNode("div",A9,r.toDisplayString(u.name),1),r.createElementVNode("div",D9,r.toDisplayString(u.paragraph),1)]),r.createElementVNode("div",E9,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n,style:r.normalizeStyle(s.value)},null,4)])]))}}),B9={class:"flex flex-col h-full overflow-hidden px-24 py-16"},P9={class:"flex flex-col gap-8"},O9={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},I9={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},N9={class:"grow"},V9=r.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{default:void 0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0},percentage:{default:void 0},tooltip:{},datalabels:{default:void 0},height:{default:void 0},width:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;const i=r.computed(()=>e.percentage?e.percentage:e.variant==="doughnut"?"90%":"0"),a=r.computed(()=>e.text);r.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio,()=>e.percentage,()=>e.datalabels,()=>e.height,()=>e.width],()=>{o&&(o.destroy(),c())});const s=r.computed(()=>({height:e.height||"100%",width:e.width||"100%"})),l=r.computed(()=>({labels:e.metrics,datasets:e.datasets.map(u=>{let p;return typeof u.backgroundColor=="string"?p=u.backgroundColor:typeof u.backgroundColor=="object"&&(p=u.backgroundColor.map(h=>Go(h)??"")),typeof u.backgroundColor=="string"?p=u.backgroundColor:typeof u.backgroundColor=="object"&&(p=u.backgroundColor.map(h=>Go(h)??"")),{...u,backgroundColor:p,hoverOffset:u.hoverOffset??0}})}));function c(){Zt.register(Tu),n.value&&(o=new Zt(n.value,{type:"doughnut",data:l.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}},tooltip:{...e.tooltip},datalabels:{display:!1,...e.datalabels}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:u=>{var p,h;if(e.variant==="doughnut"){const{ctx:m}=u;m.save();const b=(p=u.getDatasetMeta(0).data[0])==null?void 0:p.x,y=(h=u.getDatasetMeta(0).data[0])==null?void 0:h.y;if(m.font=e.textStyle,m.textAlign="center",m.textBaseline="middle",a.value&&a.value!==""){const v=a.value.split(`
38
- `);for(let w=0;w<v.length;w++){const A=w===0?1:.7;m.fillStyle=yc(Go(e.textColor)??"",A),m.fillText(v[w],b,y+w*40)}}}}}]}))}return r.onMounted(()=>{c()}),(u,p)=>(r.openBlock(),r.createElementBlock("div",B9,[r.createElementVNode("div",P9,[r.renderSlot(u.$slots,"title"),r.createElementVNode("div",O9,r.toDisplayString(u.name),1),r.createElementVNode("div",I9,r.toDisplayString(u.paragraph),1)]),r.createElementVNode("div",N9,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n,style:r.normalizeStyle(s.value)},null,4)])]))}}),R9={class:"flex flex-col h-full overflow-hidden px-24 py-16"},F9={class:"flex flex-col gap-8"},T9={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},M9={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},L9={class:"grow"},z9=r.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0},hideXAxis:{type:Boolean,default:void 0},hideYAxis:{type:Boolean,default:void 0},legend:{default:void 0},tooltip:{default:void 0},datalabels:{default:void 0},xCfg:{default:void 0},yCfg:{default:void 0},height:{default:void 0},width:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.legend,()=>e.hideXAxis,()=>e.hideYAxis,()=>e.datalabels,()=>e.xCfg,()=>e.yCfg,()=>e.height,()=>e.width],()=>{o&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x"),a=r.computed(()=>({height:e.height||"100%",width:e.width||"100%"})),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(c=>{var h;let u,p;return typeof c.backgroundColor=="string"?u=c.backgroundColor:typeof c.backgroundColor=="object"&&(u=c.backgroundColor.map(m=>Go(m)??"")),typeof c.borderColor=="string"?p=c.borderColor:typeof c.borderColor=="object"&&(p=(h=c.borderColor)==null?void 0:h.map(m=>Go(m)??"")),{...c,backgroundColor:u,borderColor:p,borderRadius:10,borderWidth:p?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function l(){Zt.register(Tu),n.value&&(o=new Zt(n.value,{type:"bar",data:s.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}},tooltip:{...e.tooltip},datalabels:{display:!1,...e.datalabels}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0,...e.xCfg},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0,...e.yCfg}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(c,u)=>(r.openBlock(),r.createElementBlock("div",R9,[r.createElementVNode("div",F9,[r.renderSlot(c.$slots,"title"),r.createElementVNode("div",T9,r.toDisplayString(c.name),1),r.createElementVNode("div",M9,r.toDisplayString(c.paragraph),1)]),r.createElementVNode("div",L9,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n,style:r.normalizeStyle(a.value)},null,4)])]))}}),_9={class:"fm-typo-en-body-lg-600"},H9={class:"h-[264px] overflow-y-auto w-[160px]"},U9=["onVnodeMounted"],W9=["onVnodeMounted"],ki=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>{const u=W(n.min).startOf("year"),p=W(n.max).startOf("year"),h=p.diff(u,"year"),m=[];for(let b=0;b<=h;b++)m.push(p.subtract(b,"year"));return m}),s=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");return u.get("year")===p.get("year")?u.startOf("month").isAfter(p)||u.get("month")===p.get("month"):u.get("year")===h.get("year")?u.startOf("month").isBefore(h)||u.get("month")===h.get("month"):!0},l=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");if(p.get("year")===u.get("year")){o("update:modelValue",p);return}if(h.get("year")===u.get("year")){o("update:modelValue",h);return}o("update:modelValue",u)};function c(u,p){if(!p)return!1;const h=u.el,m=h==null?void 0:h.parentElement;!h||!m||m.scrollTo({top:h.offsetTop-50})}return(u,p)=>(r.openBlock(),r.createBlock(io,{trigger:"click","in-popover":"",onMenuChanged:p[0]||(p[0]=h=>i.value=h)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",_9,[u.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.monthFormat"))),1)],64)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.yearFormat"))),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(ue,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",H9,[u.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(h,m)=>u.modelValue.month(m)),h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.monthFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")))},[r.createVNode(St,{disabled:!s(h),"model-value":u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")),label:h.format(r.unref(U)("date.monthFormat")),"onUpdate:modelValue":m=>o("update:modelValue",h)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,U9))),128)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(a.value,h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.yearFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")))},[r.createVNode(St,{"model-value":u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")),label:h.format(r.unref(U)("date.yearFormat")),"onUpdate:modelValue":m=>l(h)},null,8,["model-value","label","onUpdate:modelValue"])],8,W9))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),Bo=Be(r.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},zIndex:{default:99},excludeElFromClickOutside:{default:void 0}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(o.showPopover),a=r.ref(null),s=r.ref(null),{floatingStyles:l}=ci(a,s,{middleware:[si(4),li(),Ic({crossAxis:!0})],placement:o.placement,whileElementsMounted:ai,strategy:"fixed"}),c=n,u=()=>{i.value||(i.value=!0,c("popover-changed",i.value))},p=()=>{i.value&&(i.value=!1,c("popover-changed",i.value))};e({show:u,hide:p});const h=()=>{o.disabled||(i.value=!i.value,c("popover-changed",i.value))};r.watch(()=>o.showPopover,v=>i.value=v);const m=`fm-popover-${Math.random().toString(36).substring(2,15)}`,b=r.computed(()=>[m,...o.excludeElFromClickOutside||[]]),y=()=>{i.value&&(i.value=!1,c("popover-changed",i.value))};return(v,w)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:a,class:"fm-popover",onClick:h},[r.renderSlot(v.$slots,"popover-button",{},void 0,!0)],512),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:m,ref_key:"popoverEl",ref:s,style:r.normalizeStyle({...r.unref(l),zIndex:o.zIndex}),class:"fm-popover__content"},[r.renderSlot(v.$slots,"default",{hide:p,show:u},void 0,!0)],4)):r.createCommentVNode("",!0)]))])),[[r.unref(Vc),y,b.value]])}}),[["__scopeId","data-v-c760cf20"]]),ne="YYYY-MM-DD",Mu=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),a=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&a.length>0&&(e.push(a),a=[]),a.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return a.length>0&&e.push(a),e},h1=(t,e)=>{const n=W().startOf("month"),o=W(t).diff(n,"month"),i=W(e).diff(n,"month"),a=[];for(let s=o-1;s<=i;s++){const l=[],c=n.add(s,"month").startOf("month"),u=c.endOf("month"),p=c.month();let h=c.startOf("week"),m=[];for(;h.isBefore(u.endOf("week"));)h.day()===0&&m.length>0&&(l.push(m),m=[]),m.push({id:c.format("MM-YYYY"),date:h,isCurrentMonth:h.month()===p}),h=h.add(1,"day");m.length>0&&l.push(m),a.push({id:c.format("YYYY-MM-DD"),matrix:l,height:64+48*(u.endOf("week").diff(c.startOf("week"),"week")+1)})}return a},wi=()=>[U("date.day.sun"),U("date.day.mon"),U("date.day.tue"),U("date.day.wed"),U("date.day.thu"),U("date.day.fri"),U("date.day.sat")],j9={class:"p-12 w-[360px]"},G9={class:"w-max"},Q9={class:"flex h-40 justify-between px-4 py-8"},X9={class:"flex gap-4 items-center"},q9={class:"flex gap-4 items-center justify-center"},K9={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},J9=["onClick"],Y9={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},Z9=Be(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=Pe(e,"modelValue"),i=r.ref(W(o.value,ne)),a=r.ref(!1),s=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(W().startOf("month")),c=r.ref(!1),u=r.ref(!1),p=y=>{i.value=y},h=()=>{o.value=i.value.format(ne),setTimeout(()=>{a.value=!1},0)},m=()=>{i.value=o.value?W(o.value):null,a.value=!1},b=y=>{c.value=!1,u.value=!1,l.value=y};return(y,v)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(o),"onUpdate:modelValue":v[5]||(v[5]=w=>r.isRef(o)?o.value=w:null),disabled:s.value,focused:a.value,"helper-state":y.helperState,"helper-text":y.helperText,info:y.labelInfo,label:y.label,optional:y.labelMark==="optional",required:y.labelMark==="required",rules:y.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(y.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:w})=>[r.createVNode(Bo,{disabled:s.value,"show-popover":a.value,"z-index":y.zIndex,onPopoverChanged:v[4]||(v[4]=A=>a.value=A)},{"popover-button":r.withCtx(()=>[y.$slots["trigger-button"]?r.renderSlot(y.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:w,opened:a.value,showValidBorder:y.showValidBorder,disabled:s.value})),void 0,!0):(r.openBlock(),r.createBlock(at,{key:1,disabled:s.value,focused:a.value,"icon-outlined":!a.value,invalid:w,"show-valid-border":y.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(y.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(y.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[s.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(W)(r.unref(o)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",j9,[r.createElementVNode("div",G9,[r.createElementVNode("div",Q9,[r.createElementVNode("div",X9,[r.createVNode(ki,{max:y.max,min:y.min,"model-value":l.value,picker:"month","onUpdate:modelValue":v[0]||(v[0]=A=>b(A))},null,8,["max","min","model-value"]),r.createVNode(ki,{max:y.max,min:y.min,"model-value":l.value,picker:"year","onUpdate:modelValue":v[1]||(v[1]=A=>b(A))},null,8,["max","min","model-value"])]),r.createElementVNode("div",q9,[r.createVNode(ue,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:v[2]||(v[2]=()=>b(l.value.subtract(1,"month")))}),r.createVNode(ue,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:v[3]||(v[3]=()=>b(l.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",K9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),A=>(r.openBlock(),r.createElementBlock("div",{key:A,class:"fm-calendar__cell"},r.toDisplayString(A),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Mu)(l.value),(A,I)=>(r.openBlock(),r.createElementBlock("div",{key:I,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A,V=>(r.openBlock(),r.createElementBlock("div",{key:V.date.date(),class:"fm-calendar__cell"},[V.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":V.date.isSame(i.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>p(V.date)},r.toDisplayString(V.date.date()),11,J9)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",Y9,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:m},null,8,["label"]),r.createVNode(ke,{disabled:!i.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:h},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-f6b5a366"]]),m1=t=>(r.pushScopeId("data-v-43495396"),t=t(),r.popScopeId(),t),$9={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},e6={class:"flex items-center justify-center"},t6={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},n6={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},o6=m1(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),r6={id:"wrapper",class:"h-full relative w-[336px]"},i6=["id"],a6={class:"flex gap-4 items-center"},s6={class:"fm-typo-en-body-lg-600"},l6={class:"fm-typo-en-body-lg-600"},d6=["onClick"],c6={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},u6=m1(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),f6={class:"flex gap-8 items-center justify-end w-full"},g1=Be(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:99},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=h1(e.min,e.max),i=Pe(e,"modelValue"),a=W(),s=r.ref(W(i.value,ne)),l=r.ref(!1),c=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),u=r.ref(),p=v=>{s.value=v},h=()=>{i.value=s.value.format(ne),setTimeout(()=>{l.value=!1},0)},m=()=>{s.value=i.value?W(i.value):null,l.value=!1},b=()=>{l.value=!0,setTimeout(()=>{u.value.scrollToItem(y(a.startOf("month")))},0)},y=v=>o.findIndex(w=>w.id===v.startOf("month").format(ne));return(v,w)=>{const A=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":w[0]||(w[0]=I=>r.isRef(i)?i.value=I:null),disabled:c.value,focused:l.value,"helper-state":v.helperState,"helper-text":v.helperText,info:v.labelInfo,label:v.label,optional:v.labelMark==="optional",required:v.labelMark==="required",rules:v.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(v.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:I})=>[v.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:b},[r.renderSlot(v.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:I,opened:l.value,showValidBorder:v.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(at,{key:1,disabled:c.value,focused:l.value,invalid:I,"show-valid-border":v.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:b},{prepend:r.withCtx(()=>[r.renderSlot(v.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(v.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":r.unref(i)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(i)?r.unref(W)(r.unref(i)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","invalid","show-valid-border"])),l.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:e.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-dvh left-0 top-0 w-screen"},[r.createElementVNode("div",$9,[r.createVNode(at,{focused:l.value,invalid:I,"show-valid-border":v.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(v.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(v.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":(V=s.value)!=null&&V.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((R=s.value)!=null&&R.isValid()?r.unref(W)(s.value).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",e6,[r.createElementVNode("div",t6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))])])]),r.createElementVNode("div",n6,[o6,r.createElementVNode("div",r6,[r.createVNode(A,{ref_key:"scroller",ref:u,buffer:200,"item-size":null,items:r.unref(o),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:V})=>[r.createElementVNode("div",{id:V.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",a6,[r.createElementVNode("div",s6,r.toDisplayString(r.unref(W)(V.id).format(r.unref(U)("date.monthFormat"))),1),r.createElementVNode("div",l6,r.toDisplayString(r.unref(W)(V.id).format(r.unref(U)("date.yearFormat"))),1)])],8,i6),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.matrix,(R,E)=>(r.openBlock(),r.createElementBlock("div",{key:E,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(R,T=>(r.openBlock(),r.createElementBlock("div",{key:T.date.date(),class:"fm-calendar__cell"},[T.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":T.date.isSame(s.value),"fm-typo-en-body-lg-600":T.date.isSame(r.unref(a),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>p(T.date)},r.toDisplayString(T.date.date()),11,d6)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",c6,[u6,r.createElementVNode("div",f6,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:m},null,8,["label"]),r.createVNode(ke,{disabled:!s.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:h},null,8,["disabled","label"])])])],4)])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(v.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-43495396"]]),Al=t=>{const e=r.inject(Ke,null);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},p6=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Jo(),n=t,o=Pe(n,"modelValue"),i=Al(n);return(a,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(Z9,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(g1,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),b1=r.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),h6={class:"cursor-pointer fm-switch__container"},m6={key:0,class:"space-y-4"},g6={class:"fm-typo-en-body-lg-400"},b6={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},y6={class:"fm-switch__input--container"},v6=["checked","disabled","value"],k6={key:1,class:"space-y-4"},w6={class:"fm-typo-en-body-lg-400"},x6={key:0,class:"text-fm-color-typo-secondary fm-typo-en-body-md-400"},Lu=Be(r.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:void 0},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=()=>{o.value||(i.value=!i.value)};return(s,l)=>(r.openBlock(),r.createElementBlock("label",h6,[s.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",m6,[r.renderSlot(s.$slots,"label",{},void 0,!0),r.createElementVNode("div",g6,r.toDisplayString(s.label),1),s.sublabel?(r.openBlock(),r.createElementBlock("div",b6,r.toDisplayString(s.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",y6,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:s.value,class:"fm-switch__input--btn",type:"checkbox",onClick:a},null,8,v6),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":s.showIcon})},[s.showIcon?(r.openBlock(),r.createBlock(ue,{key:0,color:o.value?"#C7C7CC":r.unref(i)?"#1C1C1E":"#FFFFFF",name:r.unref(i)?"check":"close",size:"sm"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)]),s.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",k6,[r.createElementVNode("div",w6,r.toDisplayString(s.label),1),s.sublabel?(r.openBlock(),r.createElementBlock("div",x6,r.toDisplayString(s.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-48c9e062"]]);var Ct=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(Ct||{});const y1=t=>(r.pushScopeId("data-v-c8fd36a9"),t=t(),r.popScopeId(),t),S6={key:0,class:"flex gap-4 items-center relative w-full"},C6={class:"flex flex-col gap-4 w-full"},A6=y1(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),D6={class:"flex flex-col gap-4 w-full"},E6={key:1,class:"flex flex-col gap-4 w-full"},B6={class:"flex gap-4 p-12"},P6={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},O6={key:0,class:"px-8"},I6={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},N6={class:"flex flex-col gap-24"},V6={key:0,class:"flex gap-4 items-center px-12 w-full"},R6={class:"flex flex-col gap-4 w-full"},F6=y1(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),T6={class:"flex flex-col gap-4 w-full"},M6={class:"flex gap-24"},L6={class:"w-max"},z6={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},_6={class:"flex gap-4 items-center"},H6={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},U6={class:"h-[288px]"},W6={key:0,class:"fm-calendar__cell__button--today"},j6=["onClick","onMouseover"],G6={class:"w-max"},Q6={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},X6={class:"flex gap-4 items-center"},q6={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},K6={key:0,class:"fm-calendar__cell__button--today"},J6=["onClick","onMouseover"],Y6={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},Z6=Be(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:U("date.predefinedRanges.today"),value:{startDate:W().format(ne),endDate:W().format(ne)}},{label:U("date.predefinedRanges.yesterday"),value:{startDate:W().subtract(1,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisWeek"),value:{startDate:W().startOf("week").format(ne),endDate:W().endOf("week").format(ne)}},{label:U("date.predefinedRanges.lastWeek"),value:{startDate:W().subtract(1,"week").startOf("week").format(ne),endDate:W().subtract(1,"week").endOf("week").format(ne)}},{label:U("date.predefinedRanges.last7Days"),value:{startDate:W().subtract(7,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisMonth"),value:{startDate:W().startOf("month").format(ne),endDate:W().endOf("month").format(ne)}},{label:U("date.predefinedRanges.lastMonth"),value:{startDate:W().subtract(1,"month").startOf("month").format(ne),endDate:W().subtract(1,"month").endOf("month").format(ne)}},{label:U("date.predefinedRanges.thisYear"),value:{startDate:W().startOf("year").format(ne),endDate:W().endOf("year").format(ne)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:void 0},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var Q,F;const e=[{id:Ct.PrecedingPeriod,label:U("date.precedingPeriod"),sublabel:"",action:()=>{p.value=Ct.PrecedingPeriod;const S=s.value;if(S[0].startDate&&S[0].endDate){const x=S[0].startDate.diff(S[0].endDate,"day");S[1]={startDate:S[0].startDate.subtract(+(1-x),"day"),endDate:S[0].startDate.subtract(1,"day")}}}},{id:Ct.PrecedingWeek,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfWeek"),action:()=>{p.value=Ct.PrecedingWeek;const S=s.value;if(S[0].startDate&&S[0].endDate){let x=S[0].endDate.diff(S[0].startDate,"week");x===0&&(x+=1),S[1]={startDate:S[0].startDate.subtract(x,"week"),endDate:S[0].endDate.subtract(x,"week")}}}},{id:Ct.PrecedingMonth,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfMonth"),action:()=>{p.value=Ct.PrecedingMonth;const S=s.value;if(S[0].startDate&&S[0].endDate){let x=S[0].endDate.diff(S[0].startDate,"month");x===0&&(x+=1),S[1]={startDate:S[0].startDate.subtract(x,"month"),endDate:S[0].endDate.subtract(x,"month")}}}},{id:Ct.Custom,label:U("date.match.custom"),sublabel:"",action:()=>{p.value=Ct.Custom}}],n=t,o=r.inject(Ke,null),i=W(),a=Pe(n,"modelValue"),s=r.ref([{startDate:(Q=a.value)!=null&&Q.startDate?W(a.value.startDate,ne):null,endDate:(F=a.value)!=null&&F.endDate?W(a.value.endDate,ne):null},{startDate:null,endDate:null}]),l=r.ref(!1),c=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),u=r.ref(!1),p=r.ref(""),h=r.ref(W().startOf("month")),m=r.ref(W().startOf("month").add(1,"month")),b=r.ref(""),y=r.ref(null);let v=0;const w=S=>{var x;if(b.value="",s.value[v].startDate&&s.value[v].endDate){v===1&&(s.value=s.value.map(()=>({startDate:null,endDate:null})),v=0),s.value[0]={startDate:S,endDate:null};return}else if(!s.value[v].startDate&&!s.value[v].endDate)s.value[v].startDate=S;else{if(S.isBefore(s.value[v].startDate)){const P=s.value[v].startDate;s.value[v]={startDate:S,endDate:P}}else s.value[v].endDate=S;u.value&&(v=1),e.find(P=>P.id===p.value)||(p.value=Ct.Custom)}(x=e.find(P=>P.id===p.value))==null||x.action()},A=()=>{u.value?a.value=s.value.map(S=>({startDate:S.startDate.format(ne),endDate:S.endDate.format(ne)})):a.value={startDate:s.value[0].startDate.format(ne),endDate:s.value[0].endDate.format(ne)},setTimeout(()=>{l.value=!1})},I=()=>{var S,x;Array.isArray(a.value)?s.value=a.value:s.value[0]={startDate:(S=a.value)!=null&&S.startDate?W(a.value.startDate,ne):null,endDate:(x=a.value)!=null&&x.endDate?W(a.value.endDate,ne):null},l.value=!1},V=(S,x)=>{S==="left"?(h.value=x,m.value=x.add(1,"month")):S==="right"&&(m.value=x,h.value=x.subtract(1,"month"))},R=S=>{const x=s.value[0].startDate,P=s.value[0].endDate,C=s.value[1].startDate,M=s.value[1].endDate,L=y.value,K=x==null?void 0:x.isSame(S),oe=P==null?void 0:P.isSame(S),le=C==null?void 0:C.isSame(S),Z=M==null?void 0:M.isSame(S),ae=L==null?void 0:L.isSame(S),fe=K&&P&&!(K&&oe)||x&&!P&&K&&(L==null?void 0:L.isAfter(x))||x&&!P&&ae&&(L==null?void 0:L.isBefore(x)),he=le&&M&&!(le&&Z)||C&&!M&&le&&(L==null?void 0:L.isAfter(C))||C&&!M&&ae&&(L==null?void 0:L.isBefore(C)),Ie=oe&&x&&!(K&&oe)||x&&!P&&K&&(L==null?void 0:L.isBefore(x))||x&&!P&&ae&&(L==null?void 0:L.isAfter(x)),st=Z&&C&&!(le&&Z)||C&&!M&&le&&(L==null?void 0:L.isBefore(C))||C&&!M&&ae&&(L==null?void 0:L.isAfter(C)),Xe=K&&oe||K&&!P,nt=le&&Z||le&&!M,ot=x&&(P||L)&&P?S.isAfter(x)&&S.isBefore(P):S.isAfter(L)&&S.isBefore(x)||S.isBefore(L)&&S.isAfter(x),At=C&&(M||L)&&M?S.isAfter(C)&&S.isBefore(M):S.isAfter(L)&&S.isBefore(C)||S.isBefore(L)&&S.isAfter(C),Pt=()=>{if(s.value.filter(Xt=>{var Xn;for(const Ni in Xt)if((Xn=Xt[Ni])!=null&&Xn.isSame(S,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(K&&oe&&(pt(S,C,M)||pt(S,C,L)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(le&&Z&&(pt(S,x,P)||pt(S,x,L)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(fe||Ie)return pt(S,C,M)||pt(S,C,L)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(he||st)return pt(S,x,P)||pt(S,x,L)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Xe)return"bg-fm-color-primary";if(nt)return"bg-fm-color-system-info-300";if(pt(S,x,P)&&(pt(S,C,M)||pt(S,C,L)))return"bg-fm-color-system-success-100";if(ot)return"bg-fm-color-system-warning-100";if(At)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Pt()}`]:fe||he,[`fm-calendar__cell__button--selected-end ${Pt()}`]:Ie||st,[`fm-calendar__cell__button--selected-between ${Pt()}`]:ot||At,[`fm-calendar__cell__button--selected ${Pt()}`]:Xe||nt}},E=S=>{const x=s.value;if(x[0].startDate&&!x[0].endDate||x[1].startDate&&!x[1].endDate){y.value=S;return}y.value=null},T=S=>{b.value=S.label,s.value[0]={startDate:W(S.value.startDate,ne),endDate:W(S.value.endDate,ne)},V("left",W(S.value.startDate,ne).startOf("month"))},B=r.computed(()=>u.value?!s.value.every(S=>S.startDate&&S.endDate):!(s.value[0].startDate&&s.value[0].endDate)),H=S=>{p.value="",u.value=S,s.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),v=0},_=r.computed(()=>{if(!a.value)return{startDate:U("date.placeholder"),endDate:U("date.placeholder")};const S=u.value&&Array.isArray(a.value)?a.value[0].startDate:a.value.startDate,x=u.value&&Array.isArray(a.value)?a.value[0].endDate:a.value.endDate;return{startDate:S?W(S).format(U("date.format")):U("date.placeholder"),endDate:x?W(x).format(U("date.format")):U("date.placeholder")}}),j=r.computed(()=>{const S=u.value&&Array.isArray(a.value)?a.value[1].startDate:null,x=u.value&&Array.isArray(a.value)?a.value[1].endDate:null;return S&&x?`${U("date.compareLabel")} ${W(S).format(U("date.format"))} - ${W(x).format(U("date.format"))}`:""});return r.watch(()=>a.value,()=>{var S,x;u.value?s.value=a.value.map(P=>({startDate:P!=null&&P.startDate?W(P.startDate,ne):null,endDate:P!=null&&P.endDate?W(P.endDate,ne):null})):s.value[0]={startDate:(S=a.value)!=null&&S.startDate?W(a.value.startDate,ne):null,endDate:(x=a.value)!=null&&x.endDate?W(a.value.endDate,ne):null}}),(S,x)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(a),"onUpdate:modelValue":x[8]||(x[8]=P=>r.isRef(a)?a.value=P:null),disabled:c.value,focused:l.value,"helper-state":S.helperState,"helper-text":u.value?j.value:S.helperText,rules:S.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:P})=>[r.createVNode(Bo,{disabled:c.value,"show-popover":l.value,"z-index":n.zIndex,onPopoverChanged:x[7]||(x[7]=C=>l.value=C)},{"popover-button":r.withCtx(()=>[S.$slots["trigger-button"]?r.renderSlot(S.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:P,showValidBorder:S.showValidBorder,isComparing:u.value,disabled:c.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[S.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",S6,[r.createElementVNode("label",C6,[r.createVNode(hn,{disabled:c.value,label:n.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(c.value?"cursor-not-allowed":"cursor-pointer"),disabled:c.value,focused:l.value,"icon-outlined":!l.value,invalid:P,"show-valid-border":S.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(S.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(a))!=null&&C.startDate?r.unref(W)(r.unref(a).startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),A6,r.createElementVNode("label",D6,[r.createVNode(hn,{disabled:c.value,label:n.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(c.value?"cursor-not-allowed":"cursor-pointer"),disabled:c.value,focused:l.value,"icon-outlined":!l.value,invalid:P,"show-valid-border":S.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(S.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":_.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(a))!=null&&C.endDate?r.unref(W)(r.unref(a).endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),S.compare?(r.openBlock(),r.createElementBlock("label",E6,[r.createVNode(hn,{label:S.compareLabel??r.unref(U)("date.compare"),locale:S.locale},null,8,["label","locale"]),r.createVNode(at,{class:r.normalizeClass(c.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:P,"show-valid-border":S.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(S.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":_.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(_.value.startDate)+" - "+r.toDisplayString(_.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",B6,[S.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",P6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.predefinedRange,(C,M)=>(r.openBlock(),r.createBlock(St,{key:M,label:C.label,"model-value":b.value===C.label,selectable:"",onClick:L=>T(C)},null,8,["label","model-value","onClick"]))),128)),S.compare&&S.predefinedRange?(r.openBlock(),r.createElementBlock("div",O6,[r.createVNode(b1,{inset:""})])):r.createCommentVNode("",!0),S.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Lu,{"model-value":u.value,class:"justify-between px-12",label:r.unref(U)("date.label.compare"),"onUpdate:modelValue":x[0]||(x[0]=C=>H(C))},null,8,["model-value","label"]),u.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(C,M)=>r.createVNode(St,{key:M,label:C.label,"model-value":p.value===C.id,sublabel:C.sublabel,selectable:"",onClick:L=>C.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),S.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",I6)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":S.showPredefinedRange})},[r.createElementVNode("div",N6,[u.value?(r.openBlock(),r.createElementBlock("div",V6,[r.createElementVNode("label",R6,[r.createVNode(hn,{locale:S.locale,label:r.unref(U)("date.label.custom")},null,8,["locale","label"]),r.createVNode(at,{focused:!1},{default:r.withCtx(()=>{var C,M;return[r.createElementVNode("div",{class:r.normalizeClass([[(C=s.value[0])!=null&&C.startDate&&((M=s.value[0])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.value[0].startDate!==null?s.value[0].startDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder"))+" - "+r.toDisplayString(s.value[0].endDate!==null?s.value[0].endDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:1})]),F6,r.createElementVNode("label",T6,[r.createVNode(hn,{locale:S.locale,label:r.unref(U)("date.label.compare")},null,8,["locale","label"]),r.createVNode(at,{focused:!1},{default:r.withCtx(()=>{var C,M;return[r.createElementVNode("div",{class:r.normalizeClass([[(C=s.value[1])!=null&&C.startDate&&((M=s.value[1])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.value[1].startDate!==null?s.value[1].startDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder"))+" - "+r.toDisplayString(s.value[1].endDate!==null?s.value[1].endDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",M6,[r.createElementVNode("div",L6,[r.createElementVNode("div",z6,[r.createElementVNode("div",_6,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:x[1]||(x[1]=()=>V("left",h.value.subtract(1,"month")))}),r.createVNode(ki,{max:S.max,min:S.min,"model-value":h.value,picker:"month","onUpdate:modelValue":x[2]||(x[2]=C=>V("left",C))},null,8,["max","min","model-value"]),r.createVNode(ki,{max:S.max,min:S.min,"model-value":h.value,picker:"year","onUpdate:modelValue":x[3]||(x[3]=C=>V("left",C))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",H6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),C=>(r.openBlock(),r.createElementBlock("div",{key:C,class:"fm-calendar__cell"},r.toDisplayString(C),1))),128))]),r.createElementVNode("div",U6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Mu)(h.value),(C,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C,L=>(r.openBlock(),r.createElementBlock("div",{key:L.date.date(),class:"fm-calendar__cell"},[L.date.isSame(r.unref(i),"day")&&L.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",W6)):r.createCommentVNode("",!0),L.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[R(L.date),{"fm-typo-en-body-lg-600":L.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>w(L.date),onMouseover:K=>E(L.date)},r.toDisplayString(L.date.date()),43,j6)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",G6,[r.createElementVNode("div",Q6,[r.createElementVNode("div",X6,[r.createVNode(ki,{max:S.max,min:S.min,"model-value":m.value,picker:"month","onUpdate:modelValue":x[4]||(x[4]=C=>V("right",C))},null,8,["max","min","model-value"]),r.createVNode(ki,{max:S.max,min:S.min,"model-value":m.value,picker:"year","onUpdate:modelValue":x[5]||(x[5]=C=>V("right",C))},null,8,["max","min","model-value"])]),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:x[6]||(x[6]=()=>V("left",h.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",q6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),C=>(r.openBlock(),r.createElementBlock("div",{key:C,class:"fm-calendar__cell"},r.toDisplayString(C),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Mu)(m.value),(C,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C,L=>(r.openBlock(),r.createElementBlock("div",{key:L.date.date(),class:"fm-calendar__cell"},[L.date.isSame(r.unref(i),"day")&&L.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",K6)):r.createCommentVNode("",!0),L.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[R(L.date),{"fm-typo-en-body-lg-600":L.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>w(L.date),onMouseover:K=>E(L.date)},r.toDisplayString(L.date.date()),43,J6)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",Y6,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:I},null,8,["label"]),r.createVNode(ke,{disabled:B.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:A},null,8,["disabled","label"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[S.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(S.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-c8fd36a9"]]),$6={key:0},e5={class:"flex gap-4 items-center relative w-full"},t5={class:"flex flex-col gap-4 w-full"},n5=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),o5={class:"flex flex-col gap-4 w-full"},r5={key:1,class:"flex flex-col gap-4 w-full"},zu=r.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{},endLabel:{},compareLabel:{},locale:{}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:U("date.placeholder"),endDate:U("date.placeholder")};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?W(o).format(U("date.format")):U("date.placeholder"),endDate:i?W(i).format(U("date.format")):U("date.placeholder")}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",$6,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",e5,[r.createElementVNode("label",t5,[r.createVNode(hn,{disabled:o.disabled,label:e.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.startDate?r.unref(W)(o.modelValue.startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])]),n5,r.createElementVNode("label",o5,[r.createVNode(hn,{disabled:o.disabled,label:e.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.endDate?r.unref(W)(o.modelValue.endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",r5,[r.createVNode(hn,{label:o.compareLabel??r.unref(U)("date.compare"),locale:o.locale},null,8,["label","locale"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),v1=t=>(r.pushScopeId("data-v-2f7759d2"),t=t(),r.popScopeId(),t),i5={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},a5={class:"flex items-center justify-center"},s5={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},l5={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},d5=v1(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),c5={id:"wrapper",class:"h-full relative w-[336px]"},u5=["id"],f5={class:"flex gap-4 items-center"},p5={class:"fm-typo-en-body-lg-600"},h5={class:"fm-typo-en-body-lg-600"},m5=["onClick","onMouseover"],g5={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},b5=v1(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),y5={class:"flex gap-8 items-center justify-end w-full"},k1=Be(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:U("date.predefinedRanges.today"),value:{startDate:W().format(ne),endDate:W().format(ne)}},{label:U("date.predefinedRanges.yesterday"),value:{startDate:W().subtract(1,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisWeek"),value:{startDate:W().startOf("week").format(ne),endDate:W().endOf("week").format(ne)}},{label:U("date.predefinedRanges.lastWeek"),value:{startDate:W().subtract(1,"week").startOf("week").format(ne),endDate:W().subtract(1,"week").endOf("week").format(ne)}},{label:U("date.predefinedRanges.last7Days"),value:{startDate:W().subtract(7,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisMonth"),value:{startDate:W().startOf("month").format(ne),endDate:W().endOf("month").format(ne)}},{label:U("date.predefinedRanges.lastMonth"),value:{startDate:W().subtract(1,"month").startOf("month").format(ne),endDate:W().subtract(1,"month").endOf("month").format(ne)}},{label:U("date.predefinedRanges.thisYear"),value:{startDate:W().startOf("year").format(ne),endDate:W().endOf("year").format(ne)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:100},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var F,S;const e=r.ref(),n=[{id:Ct.PrecedingPeriod,label:U("date.precedingPeriod"),sublabel:"",action:()=>{h.value=Ct.PrecedingPeriod;const x=c.value;if(x[0].startDate&&x[0].endDate){const P=x[0].startDate.diff(x[0].endDate,"day");x[1]={startDate:x[0].startDate.subtract(+(1-P),"day"),endDate:x[0].startDate.subtract(1,"day")}}}},{id:Ct.PrecedingWeek,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfWeek"),action:()=>{h.value=Ct.PrecedingWeek;const x=c.value;if(x[0].startDate&&x[0].endDate){let P=x[0].endDate.diff(x[0].startDate,"week");P===0&&(P+=1),x[1]={startDate:x[0].startDate.subtract(P,"week"),endDate:x[0].endDate.subtract(P,"week")}}}},{id:Ct.PrecedingMonth,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfMonth"),action:()=>{h.value=Ct.PrecedingMonth;const x=c.value;if(x[0].startDate&&x[0].endDate){let P=x[0].endDate.diff(x[0].startDate,"month");P===0&&(P+=1),x[1]={startDate:x[0].startDate.subtract(P,"month"),endDate:x[0].endDate.subtract(P,"month")}}}},{id:Ct.Custom,label:U("date.match.custom"),sublabel:"",action:()=>{h.value=Ct.Custom}}],o=t,i=r.inject(Ke,null),a=h1(o.min,o.max),s=W(),l=Pe(o,"modelValue"),c=r.ref([{startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,ne):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,ne):null},{startDate:null,endDate:null}]),u=r.ref(!1),p=r.ref(!1),h=r.ref(""),m=r.ref(""),b=r.ref(null);let y=0;const v=x=>{var P;if(m.value="",c.value[y].startDate&&c.value[y].endDate){y===1&&(c.value=c.value.map(()=>({startDate:null,endDate:null})),y=0),c.value[0]={startDate:x,endDate:null};return}else if(!c.value[y].startDate&&!c.value[y].endDate)c.value[y].startDate=x;else{if(x.isBefore(c.value[y].startDate)){const C=c.value[y].startDate;c.value[y]={startDate:x,endDate:C}}else c.value[y].endDate=x;p.value&&(y=1),n.find(C=>C.id===h.value)||(h.value=Ct.Custom)}(P=n.find(C=>C.id===h.value))==null||P.action()},w=()=>{p.value?l.value=c.value.map(x=>({startDate:x.startDate.format(ne),endDate:x.endDate.format(ne)})):l.value={startDate:c.value[0].startDate.format(ne),endDate:c.value[0].endDate.format(ne)},setTimeout(()=>{u.value=!1})},A=()=>{var x,P;Array.isArray(l.value)?c.value=l.value:c.value[0]={startDate:(x=l.value)!=null&&x.startDate?W(l.value.startDate,ne):null,endDate:(P=l.value)!=null&&P.endDate?W(l.value.endDate,ne):null},u.value=!1},I=x=>{const P=c.value[0].startDate,C=c.value[0].endDate,M=c.value[1].startDate,L=c.value[1].endDate,K=b.value,oe=P==null?void 0:P.isSame(x),le=C==null?void 0:C.isSame(x),Z=M==null?void 0:M.isSame(x),ae=L==null?void 0:L.isSame(x),fe=K==null?void 0:K.isSame(x),he=oe&&C&&!(oe&&le)||P&&!C&&oe&&(K==null?void 0:K.isAfter(P))||P&&!C&&fe&&(K==null?void 0:K.isBefore(P)),Ie=Z&&L&&!(Z&&ae)||M&&!L&&Z&&(K==null?void 0:K.isAfter(M))||M&&!L&&fe&&(K==null?void 0:K.isBefore(M)),st=le&&P&&!(oe&&le)||P&&!C&&oe&&(K==null?void 0:K.isBefore(P))||P&&!C&&fe&&(K==null?void 0:K.isAfter(P)),Xe=ae&&M&&!(Z&&ae)||M&&!L&&Z&&(K==null?void 0:K.isBefore(M))||M&&!L&&fe&&(K==null?void 0:K.isAfter(M)),nt=oe&&le||oe&&!C,ot=Z&&ae||Z&&!L,At=P&&(C||K)&&C?x.isAfter(P)&&x.isBefore(C):x.isAfter(K)&&x.isBefore(P)||x.isBefore(K)&&x.isAfter(P),Pt=M&&(L||K)&&L?x.isAfter(M)&&x.isBefore(L):x.isAfter(K)&&x.isBefore(M)||x.isBefore(K)&&x.isAfter(M),kn=()=>{if(c.value.filter(Xn=>{var Ni;for(const qn in Xn)if((Ni=Xn[qn])!=null&&Ni.isSame(x,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(oe&&le&&(pt(x,M,L)||pt(x,M,K)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(Z&&ae&&(pt(x,P,C)||pt(x,P,K)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(he||st)return pt(x,M,L)||pt(x,M,K)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(Ie||Xe)return pt(x,P,C)||pt(x,P,K)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(nt)return"bg-fm-color-primary";if(ot)return"bg-fm-color-system-info-300";if(pt(x,P,C)&&(pt(x,M,L)||pt(x,M,K)))return"bg-fm-color-system-success-100";if(At)return"bg-fm-color-system-warning-100";if(Pt)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${kn()}`]:he||Ie,[`fm-calendar__cell__button--selected-end ${kn()}`]:st||Xe,[`fm-calendar__cell__button--selected-between ${kn()}`]:At||Pt,[`fm-calendar__cell__button--selected ${kn()}`]:nt||ot}},V=x=>{const P=c.value;if(P[0].startDate&&!P[0].endDate||P[1].startDate&&!P[1].endDate){b.value=x;return}b.value=null},R=x=>{c.value[0]={startDate:W(x.startDate,ne),endDate:W(x.endDate,ne)}},E=x=>{const P=n.find(C=>C.id===x);P==null||P.action()},T=r.computed(()=>p.value?!c.value.every(x=>x.startDate&&x.endDate):!(c.value[0].startDate&&c.value[0].endDate)),B=x=>{h.value="",p.value=x,c.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),y=0},H=r.computed(()=>{const x=p.value&&Array.isArray(l.value)?l.value[1].startDate:null,P=p.value&&Array.isArray(l.value)?l.value[1].endDate:null;return x&&P?`${U("date.compareLabel")} ${W(x).format(U("date.format"))} - ${W(P).format(U("date.format"))}`:""}),_=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),j=()=>{_.value||(u.value=!0,setTimeout(()=>{e.value.scrollToItem(Q(s.startOf("month")))},0))},Q=x=>a.findIndex(P=>P.id===x.startOf("month").format(ne));return r.watch(()=>l.value,()=>{var x,P;p.value?c.value=l.value.map(C=>({startDate:C!=null&&C.startDate?W(C.startDate,ne):null,endDate:C!=null&&C.endDate?W(C.endDate,ne):null})):c.value[0]={startDate:(x=l.value)!=null&&x.startDate?W(l.value.startDate,ne):null,endDate:(P=l.value)!=null&&P.endDate?W(l.value.endDate,ne):null}}),(x,P)=>{const C=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(l),"onUpdate:modelValue":P[3]||(P[3]=M=>r.isRef(l)?l.value=M:null),disabled:_.value,focused:u.value,"helper-state":x.helperState,"helper-text":p.value?H.value:x.helperText,rules:x.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:M})=>{var L,K,oe,le;return[x.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:j},[r.renderSlot(x.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:u.value,invalid:M,showValidBorder:x.showValidBorder,isComparing:p.value,disabled:_.value})),void 0,!0)])):(r.openBlock(),r.createBlock(zu,{key:1,analytic:x.compare,"compare-label":x.compareLabel??r.unref(U)("date.compare"),disabled:_.value,"end-label":x.endLabel??r.unref(U)("date.endDate"),focused:u.value,invalid:M,"is-comparing":p.value,"model-value":r.unref(l),"show-valid-border":x.showValidBorder,"start-label":x.startLabel??r.unref(U)("date.startDate"),onClick:j},r.createSlots({_:2},[x.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(x.$slots,"popover-button",{focused:u.value},void 0,!0)]),key:"0"}:void 0]),1032,["analytic","compare-label","disabled","end-label","focused","invalid","is-comparing","model-value","show-valid-border","start-label"])),u.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:o.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-dvh left-0 top-0 w-screen"},[r.createElementVNode("div",i5,[x.showPredefinedRange?(r.openBlock(),r.createBlock(yo,{key:0,items:x.predefinedRange,"model-value":m.value,"onUpdate:modelValue":P[0]||(P[0]=Z=>R(Z))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(zu,{analytic:x.compare,"compare-label":x.compareLabel??r.unref(U)("date.compare"),"end-label":x.endLabel??r.unref(U)("date.endDate"),"is-comparing":p.value,"model-value":{startDate:((L=c.value[0].startDate)==null?void 0:L.format(r.unref(ne)))??null,endDate:((K=c.value[0].endDate)==null?void 0:K.format(r.unref(ne)))??null},"start-label":x.startLabel??r.unref(U)("date.startDate")},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),x.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Lu,{"model-value":p.value,label:r.unref(U)("date.label.compare"),"label-placement":"right","onUpdate:modelValue":P[1]||(P[1]=Z=>B(Z))},null,8,["model-value","label"]),p.value&&x.compare?(r.openBlock(),r.createBlock(yo,{key:0,items:n.map(Z=>({label:Z.label,sublabel:Z.sublabel,value:Z.id})),"model-value":h.value,"onUpdate:modelValue":P[2]||(P[2]=Z=>E(Z))},null,8,["items","model-value"])):r.createCommentVNode("",!0),p.value&&x.compare?(r.openBlock(),r.createBlock(zu,{key:1,analytic:x.compare,"end-label":x.endLabel??r.unref(U)("date.endDate"),"is-comparing":p.value,"model-value":{startDate:((oe=c.value[1].startDate)==null?void 0:oe.format(r.unref(ne)))??null,endDate:((le=c.value[1].endDate)==null?void 0:le.format(r.unref(ne)))??null},"start-label":x.startLabel??r.unref(U)("date.startDate"),"compare-label":"Compare: Custom"},null,8,["analytic","end-label","is-comparing","model-value","start-label"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",a5,[r.createElementVNode("div",s5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),Z=>(r.openBlock(),r.createElementBlock("div",{key:Z,class:"fm-calendar__cell"},r.toDisplayString(Z),1))),128))])])]),r.createElementVNode("div",l5,[d5,r.createElementVNode("div",c5,[r.createVNode(C,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(a),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:Z})=>[r.createElementVNode("div",{id:Z.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",f5,[r.createElementVNode("div",p5,r.toDisplayString(r.unref(W)(Z.id).format(r.unref(U)("date.monthFormat"))),1),r.createElementVNode("div",h5,r.toDisplayString(r.unref(W)(Z.id).format(r.unref(U)("date.yearFormat"))),1)])],8,u5),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Z.matrix,(ae,fe)=>(r.openBlock(),r.createElementBlock("div",{key:fe,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ae,he=>(r.openBlock(),r.createElementBlock("div",{key:he.date.date(),class:"fm-calendar__cell"},[he.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[I(he.date),{"fm-typo-en-body-lg-600":he.date.isSame(r.unref(s),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>v(he.date),onMouseover:Ie=>V(he.date)},r.toDisplayString(he.date.date()),43,m5)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",g5,[b5,r.createElementVNode("div",y5,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:A},null,8,["label"]),r.createVNode(ke,{disabled:T.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:w},null,8,["disabled","label"])])])],4)])):r.createCommentVNode("",!0)]}),_:2},[x.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(x.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-2f7759d2"]]),v5=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:U("date.predefinedRanges.today"),value:{startDate:W().format(ne),endDate:W().format(ne)}},{label:U("date.predefinedRanges.yesterday"),value:{startDate:W().subtract(1,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisWeek"),value:{startDate:W().startOf("week").format(ne),endDate:W().endOf("week").format(ne)}},{label:U("date.predefinedRanges.lastWeek"),value:{startDate:W().subtract(1,"week").startOf("week").format(ne),endDate:W().subtract(1,"week").endOf("week").format(ne)}},{label:U("date.predefinedRanges.last7Days"),value:{startDate:W().subtract(7,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisMonth"),value:{startDate:W().startOf("month").format(ne),endDate:W().endOf("month").format(ne)}},{label:U("date.predefinedRanges.lastMonth"),value:{startDate:W().subtract(1,"month").startOf("month").format(ne),endDate:W().subtract(1,"month").endOf("month").format(ne)}},{label:U("date.predefinedRanges.thisYear"),value:{startDate:W().startOf("year").format(ne),endDate:W().endOf("year").format(ne)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=Jo(),o=Pe(e,"modelValue"),i=Al(e);return(a,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(Z6,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(n).xs||r.unref(n).sm?(r.openBlock(),r.createBlock(k1,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),re="YYYY-MM-DD",xi=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),a=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&a.length>0&&(e.push(a),a=[]),a.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return a.length>0&&e.push(a),e.length<6&&e.push([]),e},w1=(t,e)=>({startAt:t?W(t,re):null,endAt:e?W(e,re):null}),k5={class:"fm-typo-en-body-md-600"},w5={id:"in-calendar-app",class:"h-[264px] overflow-y-auto w-[160px]"},x5=["onVnodeMounted"],S5=["onVnodeMounted"],Pn=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>{const u=W(n.min).startOf("year"),p=W(n.max).startOf("year"),h=p.diff(u,"year"),m=[];for(let b=0;b<=h;b++)m.push(p.subtract(b,"year"));return m}),s=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");return u.get("year")===p.get("year")?u.startOf("month").isAfter(p)||u.get("month")===p.get("month"):u.get("year")===h.get("year")?u.startOf("month").isBefore(h)||u.get("month")===h.get("month"):!0},l=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");if(p.get("year")===u.get("year")){o("update:modelValue",p);return}if(h.get("year")===u.get("year")){o("update:modelValue",h);return}o("update:modelValue",u)};function c(u,p){if(!p)return!1;const h=u.el,m=h==null?void 0:h.parentElement;!h||!m||m.scrollTo({top:h.offsetTop-50})}return(u,p)=>(r.openBlock(),r.createBlock(io,{trigger:"click",onMenuChanged:p[0]||(p[0]=h=>i.value=h)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-4 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",k5,[u.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.monthFormat"))),1)],64)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.yearFormat"))),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(ue,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",w5,[u.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(h,m)=>u.modelValue.month(m)),h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.monthFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")))},[r.createVNode(St,{disabled:!s(h),"model-value":u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")),label:h.format(r.unref(U)("date.monthFormat")),"onUpdate:modelValue":m=>o("update:modelValue",h)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,x5))),128)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(a.value,h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.yearFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")))},[r.createVNode(St,{"model-value":u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")),label:h.format(r.unref(U)("date.yearFormat")),"onUpdate:modelValue":m=>l(h)},null,8,["model-value","label","onUpdate:modelValue"])],8,S5))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),C5={class:"fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary"},A5=["id"],D5={key:0,class:"fm-calendar__cell__button--today"},E5=["onClick","onMouseover"],Si=Be(r.defineComponent({__name:"FmCalendar",props:{days:{},dayCellClass:{type:[Object,Function],default:void 0},onDayClick:{},onCellMouseOver:{type:Function,default:void 0},cellSize:{default:"md"}},setup(t){const e=W(),n=(i,a)=>typeof i=="function"?i(...a):i,o=(i,a)=>{if(!a)return;const s={"fm-calendar__cell--selected":!1,"fm-calendar__cell--selected-start":!1,"fm-calendar__cell--selected-end":!1,"fm-calendar__cell--selected-between":!1};let l;if(typeof a=="function"){const{status:c,className:u}=a(i);c&&(s["fm-calendar__cell--selected"]=c.isSelected??!1,s["fm-calendar__cell--selected-start"]=c.isStart??!1,s["fm-calendar__cell--selected-end"]=c.isEnd??!1,s["fm-calendar__cell--selected-between"]=c.isBetween??!1),l=u??""}else{const{status:c,className:u}=a;c&&(s["fm-calendar__cell--selected"]=n(c.isSelected,[i])??!1,s["fm-calendar__cell--selected-start"]=n(c.isStart,[i])??!1,s["fm-calendar__cell--selected-end"]=n(c.isEnd,[i])??!1,s["fm-calendar__cell--selected-between"]=n(c.isBetween,[i])??!1),l=n(u,[i])??""}return[s,l]};return(i,a)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",C5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),s=>(r.openBlock(),r.createElementBlock("div",{key:s,class:r.normalizeClass(["fm-calendar__cell",`fm-calendar__cell__${i.cellSize}`])},r.toDisplayString(s),3))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.days,(s,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:"fm-calendar__row fm-typo-en-body-md-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s,c=>(r.openBlock(),r.createElementBlock("div",{id:`${c.date.toISOString()}`,key:c.date.date(),class:r.normalizeClass(["fm-calendar__cell",[`fm-calendar__cell__${i.cellSize}`,o(c.date,i.dayCellClass),!c.isCurrentMonth&&"fm-calendar__cell--not-current-month"]])},[c.date.isSame(r.unref(e),"day")&&c.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",D5)):r.createCommentVNode("",!0),c.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-calendar__cell__button",type:"button",onClick:u=>i.onDayClick(c),onMouseover:u=>{var p;return(p=i.onCellMouseOver)==null?void 0:p.call(i,c.date)}},r.toDisplayString(c.date.date()),41,E5)):r.createCommentVNode("",!0)],10,A5))),128))]))),128))])]))}}),[["__scopeId","data-v-9a5f3a22"]]),B5={class:"p-12 space-y-4 w-[552px]"},P5={class:"w-max"},O5={class:"flex space-x-24"},I5={class:"flex items-center py-8 space-x-16"},N5={class:"flex space-x-4"},V5={class:"flex items-center justify-end py-8 space-x-16"},R5={class:"flex space-x-4"},F5={class:"flex gap-8 items-center justify-end w-full"},T5=r.defineComponent({__name:"FmSimpleDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=Pe(e,"modelValue"),i=r.ref(W(o.value,re)),a=r.ref(!1),s=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(W().startOf("month")),c=r.ref(W().startOf("month").add(1,"month")),u=(w,A)=>{w==="left"?(l.value=A,c.value=A.add(1,"month")):w==="right"&&(c.value=A,l.value=A.subtract(1,"month"))},p=w=>{i.value=w},h=r.computed(()=>xi(l.value)),m=r.computed(()=>xi(l.value.add(1,"month"))),b=()=>{o.value=i.value.format(re),setTimeout(()=>{a.value=!1},0)},y=()=>{i.value=o.value?W(o.value):null,a.value=!1},v=w=>{a.value=w,w||y()};return(w,A)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(o),"onUpdate:modelValue":A[6]||(A[6]=I=>r.isRef(o)?o.value=I:null),disabled:s.value,focused:a.value,"helper-state":w.helperState,"helper-text":w.helperText,info:w.labelInfo,label:w.label,optional:w.labelMark==="optional",required:w.labelMark==="required",rules:w.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(w.$slots,"label")]),default:r.withCtx(({invalid:I})=>[r.createVNode(Bo,{disabled:s.value,"show-popover":a.value,"z-index":e.zIndex,"exclude-el-from-click-outside":["in-calendar-app"],onPopoverChanged:v},{"popover-button":r.withCtx(()=>[w.$slots["trigger-button"]?r.renderSlot(w.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:I,opened:a.value,showValidBorder:w.showValidBorder,disabled:s.value}))):(r.openBlock(),r.createBlock(at,{key:1,disabled:s.value,focused:a.value,"icon-outlined":!a.value,invalid:I,"show-valid-border":w.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[s.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(W)(r.unref(o)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",B5,[r.createElementVNode("div",P5,[r.createElementVNode("div",O5,[r.createElementVNode("div",null,[r.createElementVNode("div",I5,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:A[0]||(A[0]=()=>u("left",l.value.subtract(1,"month")))}),r.createElementVNode("div",N5,[r.createVNode(Pn,{max:w.max,min:w.min,"model-value":l.value,picker:"month","onUpdate:modelValue":A[1]||(A[1]=V=>u("left",V))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:w.max,min:w.min,"model-value":l.value,picker:"year","onUpdate:modelValue":A[2]||(A[2]=V=>u("left",V))},null,8,["max","min","model-value"])])]),r.createVNode(Si,{"day-cell-class":{status:{isSelected:V=>V.isSame(i.value,"date")}},days:h.value,"on-day-click":V=>p(V.date)},null,8,["day-cell-class","days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",V5,[r.createElementVNode("div",R5,[r.createVNode(Pn,{max:w.max,min:w.min,"model-value":c.value,picker:"month","onUpdate:modelValue":A[3]||(A[3]=V=>u("right",V))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:w.max,min:w.min,"model-value":c.value,picker:"year","onUpdate:modelValue":A[4]||(A[4]=V=>u("right",V))},null,8,["max","min","model-value"])]),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:A[5]||(A[5]=()=>u("left",l.value.add(1,"month")))})]),r.createVNode(Si,{"day-cell-class":{status:{isSelected:V=>V.isSame(i.value,"date")}},days:m.value,"on-day-click":V=>p(V.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",F5,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:y},null,8,["label"]),r.createVNode(ke,{disabled:!i.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:b},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),M5={class:"p-12 space-y-4 w-[276px]"},L5={class:"w-max"},z5={class:"flex space-x-24"},_5={class:"flex items-center justify-between py-8"},H5={class:"flex space-x-4"},U5={class:"flex space-x-4"},W5={class:"flex gap-8 items-center justify-end w-full"},x1=r.defineComponent({__name:"FmSimpleDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=Pe(e,"modelValue"),i=r.ref(W(o.value,re)),a=r.ref(!1),s=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(W().startOf("month")),c=y=>{l.value=y},u=y=>{i.value=y},p=r.computed(()=>xi(l.value)),h=()=>{o.value=i.value.format(re),setTimeout(()=>{a.value=!1},0)},m=()=>{i.value=o.value?W(o.value):null,a.value=!1},b=y=>{a.value=y,y||m()};return(y,v)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(o),"onUpdate:modelValue":v[4]||(v[4]=w=>r.isRef(o)?o.value=w:null),disabled:s.value,focused:a.value,"helper-state":y.helperState,"helper-text":y.helperText,info:y.labelInfo,label:y.label,optional:y.labelMark==="optional",required:y.labelMark==="required",rules:y.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),default:r.withCtx(({invalid:w})=>[r.createVNode(Bo,{disabled:s.value,"show-popover":a.value,"z-index":e.zIndex,"exclude-el-from-click-outside":["in-calendar-app"],onPopoverChanged:b},{"popover-button":r.withCtx(()=>[y.$slots["trigger-button"]?r.renderSlot(y.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:w,opened:a.value,showValidBorder:y.showValidBorder,disabled:s.value}))):(r.openBlock(),r.createBlock(at,{key:1,disabled:s.value,focused:a.value,"icon-outlined":!a.value,invalid:w,"show-valid-border":y.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(y.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(y.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[s.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(W)(r.unref(o)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",M5,[r.createElementVNode("div",L5,[r.createElementVNode("div",z5,[r.createElementVNode("div",null,[r.createElementVNode("div",_5,[r.createElementVNode("div",H5,[r.createVNode(Pn,{max:y.max,min:y.min,"model-value":l.value,picker:"month","onUpdate:modelValue":v[0]||(v[0]=A=>c(A))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:y.max,min:y.min,"model-value":l.value,picker:"year","onUpdate:modelValue":v[1]||(v[1]=A=>c(A))},null,8,["max","min","model-value"])]),r.createElementVNode("div",U5,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:v[2]||(v[2]=()=>c(l.value.subtract(1,"month")))}),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:v[3]||(v[3]=()=>c(l.value.add(1,"month")))})])]),r.createVNode(Si,{"day-cell-class":{status:{isSelected:A=>A.isSame(i.value,"date")}},days:p.value,"on-day-click":A=>u(A.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",W5,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:m},null,8,["label"]),r.createVNode(ke,{disabled:!i.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:h},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),j5=r.defineComponent({__name:"FmSimpleDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Jo(),n=t,o=Pe(n,"modelValue"),i=Al(n);return(a,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(T5,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(x1,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}});var He=(t=>(t.NoComparison="no_comparison",t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.PrecedingYear="preceding_year",t.Custom="custom",t))(He||{});const G5={key:1,class:"flex gap-4 items-center relative w-full"},Q5={class:"flex flex-col gap-4 w-full"},X5=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),q5={class:"flex flex-col gap-4 w-full"},K5={class:"flex h-[360px]"},J5={class:"flex flex-col items-start p-12 pr-4"},Y5={key:0},Z5={key:1},$5=r.createElementVNode("div",{class:"bg-fm-color-neutral-gray-100 h-full mx-4 w-px"},null,-1),eD={class:"w-max"},tD={class:"flex space-x-24"},nD={class:"flex items-center py-8 space-x-16"},oD={class:"flex space-x-4"},rD={class:"flex items-center justify-end py-8 space-x-16"},iD={class:"flex space-x-4"},aD={class:"flex gap-8 items-center justify-end w-full"},sD=r.defineComponent({__name:"FmSimpleDateRangePickerDesktop",props:{modelValue:{},compareTarget:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:W().format(re),endDate:W().format(re)}},{label:"Yesterday",value:{startDate:W().subtract(1,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This week",value:{startDate:W().startOf("week").format(re),endDate:W().endOf("week").format(re)}},{label:"Last week",value:{startDate:W().subtract(1,"week").startOf("week").format(re),endDate:W().subtract(1,"week").endOf("week").format(re)}},{label:"Last 7 days",value:{startDate:W().subtract(7,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This month",value:{startDate:W().startOf("month").format(re),endDate:W().endOf("month").format(re)}},{label:"Last month",value:{startDate:W().subtract(1,"month").startOf("month").format(re),endDate:W().subtract(1,"month").endOf("month").format(re)}},{label:"This year",value:{startDate:W().startOf("year").format(re),endDate:W().endOf("year").format(re)}}]},defaultCompareType:{default:He.PrecedingPeriod},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var j,Q;const n=F=>()=>{var C,M;const{startAt:S,endAt:x}=w1((C=a.compareTarget)==null?void 0:C.startDate,(M=a.compareTarget)==null?void 0:M.endDate);if(!S||!x)return;const P=F({startAt:S,endAt:x});return R("right",P.endDate.startOf("month")),P},o=r.computed(()=>[{id:He.NoComparison,label:"No Comparison",sublabel:"",action:()=>{c.value={startDate:null,endDate:null},y.value=He.NoComparison}},{id:He.PrecedingWeek,label:"Same period last week",sublabel:"Match day of week",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"week")+1;return c.value={startDate:F.subtract(x,"week"),endDate:S.subtract(x,"week")},y.value=He.PrecedingWeek,c.value})},{id:He.PrecedingMonth,label:"Same period last month",sublabel:"Match day of month",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"month")+1;return c.value={startDate:F.subtract(x,"month"),endDate:S.subtract(x,"month")},y.value=He.PrecedingMonth,c.value})},{id:He.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"day")+1;return c.value={startDate:F.subtract(x,"day"),endDate:S.subtract(x,"day")},y.value=He.PrecedingPeriod,c.value})},{id:He.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"year")+1;return c.value={startDate:F.subtract(x,"year"),endDate:S.subtract(x,"year")},y.value=He.PrecedingYear,c.value})},{id:He.Custom,label:"Custom",sublabel:"",action:()=>{y.value=He.Custom}}]),i=e,a=t,s=r.inject(Ke,null),l=Pe(a,"modelValue"),c=r.ref({startDate:(j=l.value)!=null&&j.startDate?W(l.value.startDate,re):null,endDate:(Q=l.value)!=null&&Q.endDate?W(l.value.endDate,re):null}),u=r.ref(!1),p=r.computed(()=>a.disabled??(s==null?void 0:s.getDisabled())??!1),h=r.ref(W().startOf("month")),m=r.ref(W().startOf("month").add(1,"month")),b=r.ref(""),y=r.ref(a.defaultCompareType),v=r.ref(null),w=()=>{a.showPredefinedRange&&a.predefinedRange.map(({value:{startDate:F,endDate:S},label:x})=>{var P,C;((P=c.value.startDate)==null?void 0:P.format(re))===F&&((C=c.value.endDate)==null?void 0:C.format(re))===S&&(b.value=x)})},A=F=>{if(b.value="",y.value=He.Custom,c.value.startDate&&c.value.endDate){c.value={startDate:F,endDate:null};return}else if(!c.value.startDate&&!c.value.endDate)c.value.startDate=F;else{if(F.isBefore(c.value.startDate)){const S=c.value.startDate;c.value={startDate:F,endDate:S}}else c.value.endDate=F;w()}},I=()=>{var F,S;l.value={startDate:(F=c.value.startDate)==null?void 0:F.format(re),endDate:(S=c.value.endDate)==null?void 0:S.format(re)},i("select-comparison",y.value),setTimeout(()=>{u.value=!1})},V=()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null},u.value=!1},R=(F,S)=>{F==="left"?(h.value=S,m.value=S.add(1,"month")):F==="right"&&(m.value=S,h.value=S.subtract(1,"month"))},E=F=>{var ae,fe;const S=(ae=c.value.startDate)==null?void 0:ae.startOf("day"),x=(fe=c.value.endDate)==null?void 0:fe.startOf("day"),P=v.value,C=S==null?void 0:S.isSame(F),M=x==null?void 0:x.isSame(F),L=P==null?void 0:P.isSame(F),K=C&&x&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isAfter(S))||S&&!x&&L&&(P==null?void 0:P.isBefore(S)),oe=M&&S&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isBefore(S))||S&&!x&&L&&(P==null?void 0:P.isAfter(S)),le=C&&M||C&&!x,Z=S&&(x||P)&&x?F.isAfter(S)&&F.isBefore(x):F.isAfter(P)&&F.isBefore(S)||F.isBefore(P)&&F.isAfter(S);return{status:{isStart:K??!1,isEnd:oe??!1,isBetween:Z??!1,isSelected:le??!1}}},T=F=>{const S=c.value;if(S.startDate&&!S.endDate){v.value=F;return}v.value=null},B=F=>{b.value=F.label;const S=W(F.value.startDate,re),x=W(F.value.endDate,re);c.value={startDate:S,endDate:x},R("left",S.startOf("month"))},H=F=>{u.value=F,F||V()},_=r.computed(()=>!y.value&&!(c.value.startDate&&c.value.endDate));return r.watch(()=>l.value,()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null}}),r.watch(()=>a.compareTarget,()=>{if(!a.compareTarget||y.value===He.Custom)return;const F=o.value.find(x=>x.id===y.value),S=F==null?void 0:F.action();S&&(l.value=S)}),r.onMounted(()=>{w()}),(F,S)=>{const x=r.resolveComponent("fm-label");return r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(l),"onUpdate:modelValue":S[6]||(S[6]=P=>r.isRef(l)?l.value=P:null),disabled:p.value,focused:u.value,"helper-state":F.helperState,"helper-text":F.helperText,rules:F.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:P})=>[r.createVNode(Bo,{disabled:p.value,"exclude-el-from-click-outside":["in-calendar-app"],"show-popover":u.value,"z-index":a.zIndex,onPopoverChanged:H},{"popover-button":r.withCtx(()=>[F.$slots["trigger-button"]?r.renderSlot(F.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:u.value,invalid:P,showValidBorder:F.showValidBorder,disabled:p.value}))):(r.openBlock(),r.createElementBlock("div",G5,[r.createElementVNode("label",Q5,[r.createVNode(x,{disabled:p.value,label:a.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(p.value?"cursor-not-allowed":"cursor-pointer"),disabled:p.value,focused:u.value,"icon-outlined":!u.value,invalid:P,"show-valid-border":F.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(F.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(F.$slots,"append")]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[p.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(l))!=null&&C.startDate?r.unref(W)(r.unref(l).startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),X5,r.createElementVNode("label",q5,[r.createVNode(x,{disabled:p.value,label:a.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(p.value?"cursor-not-allowed":"cursor-pointer"),disabled:p.value,focused:u.value,"icon-outlined":!u.value,invalid:P,"show-valid-border":F.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(F.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(F.$slots,"append")]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[p.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(l))!=null&&C.endDate?r.unref(W)(r.unref(l).endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])]))]),default:r.withCtx(()=>[r.createElementVNode("div",K5,[F.showPredefinedRange||F.compareTarget?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",J5,[F.showPredefinedRange&&!F.compareTarget?(r.openBlock(),r.createElementBlock("div",Y5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.predefinedRange,(C,M)=>(r.openBlock(),r.createBlock(St,{key:M,label:C.label,"model-value":b.value===C.label,class:"min-w-[158px]",selectable:"",onClick:L=>B(C)},null,8,["label","model-value","onClick"]))),128))])):r.createCommentVNode("",!0),F.compareTarget?(r.openBlock(),r.createElementBlock("div",Z5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(C,M)=>(r.openBlock(),r.createBlock(St,{key:M,label:C.label,"model-value":y.value===C.id,sublabel:C.sublabel,class:"min-w-[158px]",selectable:"",onClick:L=>C.action()},null,8,["label","model-value","sublabel","onClick"]))),128))])):r.createCommentVNode("",!0)]),$5],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pl-4":F.showPredefinedRange||F.compareTarget},"p-12 space-y-4"])},[r.createElementVNode("div",eD,[r.createElementVNode("div",tD,[r.createElementVNode("div",null,[r.createElementVNode("div",nD,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:S[0]||(S[0]=()=>R("left",h.value.subtract(1,"month")))}),r.createElementVNode("div",oD,[r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"month","onUpdate:modelValue":S[1]||(S[1]=C=>R("left",C))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"year","onUpdate:modelValue":S[2]||(S[2]=C=>R("left",C))},null,8,["max","min","model-value"])])]),r.createVNode(Si,{"day-cell-class":E,days:r.unref(xi)(h.value),"on-day-click":C=>A(C.date),onCellMouseOver:T},null,8,["days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",rD,[r.createElementVNode("div",iD,[r.createVNode(Pn,{max:F.max,min:F.min,"model-value":m.value,picker:"month","onUpdate:modelValue":S[3]||(S[3]=C=>R("right",C))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:F.max,min:F.min,"model-value":m.value,picker:"year","onUpdate:modelValue":S[4]||(S[4]=C=>R("right",C))},null,8,["max","min","model-value"])]),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:S[5]||(S[5]=()=>R("left",h.value.add(1,"month")))})]),r.createVNode(Si,{"day-cell-class":C=>E(C),days:r.unref(xi)(m.value),"on-day-click":C=>A(C.date),onCellMouseOver:T},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",aD,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:V},null,8,["label"]),r.createVNode(ke,{disabled:_.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:I},null,8,["disabled","label"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[F.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(F.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),lD={key:0},dD={class:"flex gap-4 items-center relative w-full"},cD={class:"flex flex-col gap-4 w-full"},uD=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),fD={class:"flex flex-col gap-4 w-full"},pD={key:1,class:"flex flex-col gap-4 w-full"},hD=r.defineComponent({__name:"FmSimpleDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{},endLabel:{},compareLabel:{},locale:{}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:U("date.placeholder"),endDate:U("date.placeholder")};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?W(o).format(U("date.format")):U("date.placeholder"),endDate:i?W(i).format(U("date.format")):U("date.placeholder")}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",lD,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",dD,[r.createElementVNode("label",cD,[r.createVNode(hn,{disabled:o.disabled,label:e.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.startDate?r.unref(W)(o.modelValue.startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])]),uD,r.createElementVNode("label",fD,[r.createVNode(hn,{disabled:o.disabled,label:e.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.endDate?r.unref(W)(o.modelValue.endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",pD,[r.createVNode(hn,{label:o.compareLabel??r.unref(U)("date.compare"),locale:o.locale},null,8,["label","locale"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),mD={class:"p-12 space-y-4"},gD={class:"w-max"},bD={class:"flex space-x-24"},yD={class:"flex items-center justify-between py-8"},vD={class:"flex space-x-4"},kD={class:"flex space-x-4"},wD={class:"flex gap-8 items-center justify-end w-full"},S1=r.defineComponent({__name:"FmSimpleDateRangePickerMobile",props:{modelValue:{},compareTarget:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:W().format(re),endDate:W().format(re)}},{label:"Yesterday",value:{startDate:W().subtract(1,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This week",value:{startDate:W().startOf("week").format(re),endDate:W().endOf("week").format(re)}},{label:"Last week",value:{startDate:W().subtract(1,"week").startOf("week").format(re),endDate:W().subtract(1,"week").endOf("week").format(re)}},{label:"Last 7 days",value:{startDate:W().subtract(7,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This month",value:{startDate:W().startOf("month").format(re),endDate:W().endOf("month").format(re)}},{label:"Last month",value:{startDate:W().subtract(1,"month").startOf("month").format(re),endDate:W().subtract(1,"month").endOf("month").format(re)}},{label:"This year",value:{startDate:W().startOf("year").format(re),endDate:W().endOf("year").format(re)}}]},defaultCompareType:{default:He.PrecedingPeriod},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var j,Q;const n=F=>()=>{var C,M;const{startAt:S,endAt:x}=w1((C=a.compareTarget)==null?void 0:C.startDate,(M=a.compareTarget)==null?void 0:M.endDate);if(!S||!x)return;const P=F({startAt:S,endAt:x});return V(P.endDate.startOf("month")),P},o=r.computed(()=>[{id:He.NoComparison,label:"No Comparison",sublabel:"",action:()=>{c.value={startDate:null,endDate:null},b.value=He.NoComparison}},{id:He.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"week")+1;return c.value={startDate:F.subtract(x,"week"),endDate:S.subtract(x,"week")},b.value=He.PrecedingWeek,c.value})},{id:He.PrecedingMonth,label:"Same period last week",sublabel:"Match day of month",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"month")+1;return c.value={startDate:F.subtract(x,"month"),endDate:S.subtract(x,"month")},b.value=He.PrecedingMonth,c.value})},{id:He.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"day")+1;return c.value={startDate:F.subtract(x,"day"),endDate:S.subtract(x,"day")},b.value=He.PrecedingPeriod,c.value})},{id:He.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"year")+1;return c.value={startDate:F.subtract(x,"year"),endDate:S.subtract(x,"year")},b.value=He.PrecedingYear,c.value})},{id:He.Custom,label:"Custom",sublabel:"",action:()=>{b.value=He.Custom}}]),i=e,a=t,s=r.inject(Ke,null),l=Pe(a,"modelValue"),c=r.ref({startDate:(j=l.value)!=null&&j.startDate?W(l.value.startDate,re):null,endDate:(Q=l.value)!=null&&Q.endDate?W(l.value.endDate,re):null}),u=r.ref(!1),p=r.computed(()=>a.disabled??(s==null?void 0:s.getDisabled())??!1),h=r.ref(W().startOf("month")),m=r.ref(null),b=r.ref(a.defaultCompareType),y=r.ref(null),v=()=>{a.showPredefinedRange&&a.predefinedRange.map(({value:{startDate:F,endDate:S},label:x})=>{var P,C;((P=c.value.startDate)==null?void 0:P.format(re))===F&&((C=c.value.endDate)==null?void 0:C.format(re))===S&&(m.value={startDate:F,endDate:S})})},w=F=>{if(m.value=null,b.value=He.Custom,c.value.startDate&&c.value.endDate){c.value={startDate:F,endDate:null};return}else if(!c.value.startDate&&!c.value.endDate)c.value.startDate=F;else{if(F.isBefore(c.value.startDate)){const S=c.value.startDate;c.value={startDate:F,endDate:S}}else c.value.endDate=F;v()}},A=()=>{var F,S;l.value={startDate:(F=c.value.startDate)==null?void 0:F.format(re),endDate:(S=c.value.endDate)==null?void 0:S.format(re)},i("select-comparison",b.value),setTimeout(()=>{u.value=!1})},I=()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null},u.value=!1},V=F=>{h.value=F},R=F=>{var ae,fe;const S=(ae=c.value.startDate)==null?void 0:ae.startOf("day"),x=(fe=c.value.endDate)==null?void 0:fe.startOf("day"),P=y.value,C=S==null?void 0:S.isSame(F),M=x==null?void 0:x.isSame(F),L=P==null?void 0:P.isSame(F),K=C&&x&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isAfter(S))||S&&!x&&L&&(P==null?void 0:P.isBefore(S)),oe=M&&S&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isBefore(S))||S&&!x&&L&&(P==null?void 0:P.isAfter(S)),le=C&&M||C&&!x,Z=S&&(x||P)&&x?F.isAfter(S)&&F.isBefore(x):F.isAfter(P)&&F.isBefore(S)||F.isBefore(P)&&F.isAfter(S);return{status:{isStart:K??!1,isEnd:oe??!1,isBetween:Z??!1,isSelected:le??!1}}},E=F=>{const S=c.value;if(S.startDate&&!S.endDate){y.value=F;return}y.value=null},T=F=>{const S=W(F.startDate,re),x=W(F.endDate,re);m.value=F,c.value={startDate:S,endDate:x},V(x.startOf("month"))},B=F=>{const S=o.value.find(x=>x.id===F);S==null||S.action()},H=F=>{u.value=F,F||I()},_=r.computed(()=>!b.value&&!(c.value.startDate&&c.value.endDate));return r.watch(()=>l.value,()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null}}),r.watch(()=>a.compareTarget,()=>{if(!a.compareTarget||b.value===He.Custom)return;const F=o.value.find(x=>x.id===b.value),S=F==null?void 0:F.action();S&&(l.value=S)}),r.onMounted(()=>{v()}),(F,S)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(l),"onUpdate:modelValue":S[6]||(S[6]=x=>r.isRef(l)?l.value=x:null),disabled:p.value,focused:u.value,"helper-state":F.helperState,"helper-text":F.helperText,rules:F.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:x})=>[r.createVNode(Bo,{disabled:p.value,"exclude-el-from-click-outside":["exclude-from-click-outside","in-calendar-app"],"show-popover":u.value,"z-index":a.zIndex,onPopoverChanged:H},{"popover-button":r.withCtx(()=>[F.$slots["trigger-button"]?r.renderSlot(F.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:u.value,invalid:x,showValidBorder:F.showValidBorder,disabled:p.value}))):(r.openBlock(),r.createBlock(hD,{key:1,disabled:p.value,focused:u.value,invalid:x,"model-value":r.unref(l),"show-valid-border":F.showValidBorder,"start-label":F.startLabel??r.unref(U)("date.startDate"),"end-label":F.endLabel??r.unref(U)("date.endDate")},r.createSlots({_:2},[F.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(F.$slots,"popover-button",{focused:u.value})]),key:"0"}:void 0]),1032,["disabled","focused","invalid","model-value","show-valid-border","start-label","end-label"]))]),default:r.withCtx(()=>[r.createElementVNode("div",mD,[F.showPredefinedRange&&!F.compareTarget?(r.openBlock(),r.createBlock(yo,{key:0,items:F.predefinedRange,"model-value":m.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":S[0]||(S[0]=P=>T(P))},null,8,["items","model-value"])):r.createCommentVNode("",!0),F.compareTarget?(r.openBlock(),r.createBlock(yo,{key:1,items:o.value.map(P=>({label:P.label,sublabel:P.sublabel,value:P.id})),"model-value":b.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":S[1]||(S[1]=P=>B(P))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createElementVNode("div",gD,[r.createElementVNode("div",bD,[r.createElementVNode("div",null,[r.createElementVNode("div",yD,[r.createElementVNode("div",vD,[r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"month","onUpdate:modelValue":S[2]||(S[2]=P=>V(P))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"year","onUpdate:modelValue":S[3]||(S[3]=P=>V(P))},null,8,["max","min","model-value"])]),r.createElementVNode("div",kD,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:S[4]||(S[4]=()=>V(h.value.subtract(1,"month")))}),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:S[5]||(S[5]=()=>V(h.value.add(1,"month")))})])]),r.createVNode(Si,{"day-cell-class":R,days:r.unref(xi)(h.value),"on-day-click":P=>w(P.date),"cell-size":"lg",onCellMouseOver:E},null,8,["days","on-day-click"])])])]),r.createElementVNode("div",wD,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:I},null,8,["label"]),r.createVNode(ke,{disabled:_.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:A},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[F.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(F.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),xD=r.defineComponent({__name:"FmSimpleDateRangePicker",props:{modelValue:{},compareTarget:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:W().format(re),endDate:W().format(re)}},{label:"Yesterday",value:{startDate:W().subtract(1,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This week",value:{startDate:W().startOf("week").format(re),endDate:W().endOf("week").format(re)}},{label:"Last week",value:{startDate:W().subtract(1,"week").startOf("week").format(re),endDate:W().subtract(1,"week").endOf("week").format(re)}},{label:"Last 7 days",value:{startDate:W().subtract(7,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This month",value:{startDate:W().startOf("month").format(re),endDate:W().endOf("month").format(re)}},{label:"Last month",value:{startDate:W().subtract(1,"month").startOf("month").format(re),endDate:W().subtract(1,"month").endOf("month").format(re)}},{label:"This year",value:{startDate:W().startOf("year").format(re),endDate:W().endOf("year").format(re)}}]},defaultCompareType:{},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){const n=t,{breakpoints:o}=Jo(),i=Pe(n,"modelValue"),a=e,s=Al(n);return(l,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(o).md||r.unref(o).lg?(r.openBlock(),r.createBlock(sD,r.mergeProps({key:0},r.unref(s),{modelValue:r.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>r.isRef(i)?i.value=u:null),onSelectComparison:c[1]||(c[1]=u=>a("select-comparison",u))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(u=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(u)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(o).xs||r.unref(o).sm?(r.openBlock(),r.createBlock(S1,r.mergeProps({key:1},r.unref(s),{modelValue:r.unref(i),"onUpdate:modelValue":c[2]||(c[2]=u=>r.isRef(i)?i.value=u:null),onSelectComparison:c[3]||(c[3]=u=>a("select-comparison",u))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(u=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(u)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),SD={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[0135-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function _u(t,e){var n=Array.prototype.slice.call(e);return n.push(SD),t.apply(this,n)}function Hu(t){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hu(t)}function CD(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function AD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&La(t,e)}function ED(t){var e=A1();return function(){var o=za(t),i;if(e){var a=za(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return BD(this,i)}}function BD(t,e){if(e&&(Hu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C1(t)}function C1(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uu(t){var e=typeof Map=="function"?new Map:void 0;return Uu=function(o){if(o===null||!PD(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Dl(o,arguments,za(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),La(i,o)},Uu(t)}function Dl(t,e,n){return A1()?Dl=Reflect.construct:Dl=function(i,a,s){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(i,l),u=new c;return s&&La(u,s.prototype),u},Dl.apply(null,arguments)}function A1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function PD(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function La(t,e){return La=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},La(t,e)}function za(t){return za=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},za(t)}var Po=function(t){DD(n,t);var e=ED(n);function n(o){var i;return AD(this,n),i=e.call(this,o),Object.setPrototypeOf(C1(i),n.prototype),i.name=i.constructor.name,i}return CD(n)}(Uu(Error)),Wu=2,OD=17,ID=3,Gn="0-90-9٠-٩۰-۹",ND="-‐-―−ー-",VD="//",RD="..",FD="  ­​⁠ ",TD="()()[]\\[\\]",MD="~⁓∼~",El="".concat(ND).concat(VD).concat(RD).concat(FD).concat(TD).concat(MD),ju="++";function D1(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var a=Number(n[i]),s=Number(o[i]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var LD={}.constructor;function Bl(t){return t!=null&&t.constructor===LD}function Gu(t){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gu(t)}function Pl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zD(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Ol(t,e,n){return e&&zD(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var _D="1.2.0",HD="1.7.35",E1=" ext. ",UD=/^\d+$/,Ht=function(){function t(e){Pl(this,t),QD(e),this.metadata=e,O1.call(this,e)}return Ol(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&UD.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new B1(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new B1(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var a=this.countryCallingCodes()[n];if(a&&a.length===1&&a[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),B1=function(){function t(e,n){Pl(this,t),this.globalMetadataObject=n,this.metadata=e,O1.call(this,n.metadata)}return Ol(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new WD(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&P1(this.types(),n))return new GD(P1(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?E1:this.metadata[13]||E1}}]),t}(),WD=function(){function t(e,n){Pl(this,t),this._format=e,this.metadata=n}return Ol(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!jD.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),jD=/^\(?\$1\)?$/,GD=function(){function t(e,n){Pl(this,t),this.type=e,this.metadata=n}return Ol(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function P1(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function QD(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Bl(t)||!Bl(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Bl(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+XD(t)+": "+t,"."))}var XD=function(e){return Gu(e)};function Il(t,e){if(e=new Ht(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function qD(t,e){return e.countries.hasOwnProperty(t)}function O1(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?D1(e,_D)===-1?this.v2=!0:D1(e,HD)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var KD=";ext=",Ci=function(e){return"([".concat(Gn,"]{1,").concat(e,"})")};function I1(t){var e="20",n="15",o="9",i="6",a="[  \\t,]*",s="[:\\..]?[  \\t,-]*",l="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",u="(?:[xx##~~]|int|int)",p="[- ]+",h="[  \\t]*",m="(?:,{2}|;)",b=KD+Ci(e),y=a+c+s+Ci(e)+l,v=a+u+s+Ci(o)+l,w=p+Ci(i)+"#",A=h+m+s+Ci(n)+l,I=h+"(?:,)+"+s+Ci(o)+l;return b+"|"+y+"|"+v+"|"+w+"|"+A+"|"+I}var JD="["+Gn+"]{"+Wu+"}",YD="["+ju+"]{0,1}(?:["+El+"]*["+Gn+"]){3,}["+El+Gn+"]*",ZD=new RegExp("^["+ju+"]{0,1}(?:["+El+"]*["+Gn+"]){1,2}$","i"),$D=YD+"(?:"+I1()+")?",e7=new RegExp("^"+JD+"$|^"+$D+"$","i");function t7(t){return t.length>=Wu&&e7.test(t)}function n7(t){return ZD.test(t)}var N1=new RegExp("(?:"+I1()+")$","i");function o7(t){var e=t.search(N1);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(N1),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var r7={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function i7(t){return r7[t]}function a7(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=s7(t))||e){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
38
+ `);for(let w=0;w<v.length;w++){const A=w===0?1:.7;m.fillStyle=yc(Go(e.textColor)??"",A),m.fillText(v[w],b,y+w*40)}}}}}]}))}return r.onMounted(()=>{c()}),(u,p)=>(r.openBlock(),r.createElementBlock("div",B9,[r.createElementVNode("div",P9,[r.renderSlot(u.$slots,"title"),r.createElementVNode("div",O9,r.toDisplayString(u.name),1),r.createElementVNode("div",I9,r.toDisplayString(u.paragraph),1)]),r.createElementVNode("div",N9,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n,style:r.normalizeStyle(s.value)},null,4)])]))}}),R9={class:"flex flex-col h-full overflow-hidden px-24 py-16"},F9={class:"flex flex-col gap-8"},T9={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},M9={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},L9={class:"grow"},z9=r.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0},hideXAxis:{type:Boolean,default:void 0},hideYAxis:{type:Boolean,default:void 0},legend:{default:void 0},tooltip:{default:void 0},datalabels:{default:void 0},xCfg:{default:void 0},yCfg:{default:void 0},height:{default:void 0},width:{default:void 0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.legend,()=>e.hideXAxis,()=>e.hideYAxis,()=>e.datalabels,()=>e.xCfg,()=>e.yCfg,()=>e.height,()=>e.width],()=>{o&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x"),a=r.computed(()=>({height:e.height||"100%",width:e.width||"100%"})),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(c=>{var h;let u,p;return typeof c.backgroundColor=="string"?u=c.backgroundColor:typeof c.backgroundColor=="object"&&(u=c.backgroundColor.map(m=>Go(m)??"")),typeof c.borderColor=="string"?p=c.borderColor:typeof c.borderColor=="object"&&(p=(h=c.borderColor)==null?void 0:h.map(m=>Go(m)??"")),{...c,backgroundColor:u,borderColor:p,borderRadius:10,borderWidth:p?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function l(){Zt.register(Tu),n.value&&(o=new Zt(n.value,{type:"bar",data:s.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}},tooltip:{...e.tooltip},datalabels:{display:!1,...e.datalabels}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0,...e.xCfg},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0,...e.yCfg}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(c,u)=>(r.openBlock(),r.createElementBlock("div",R9,[r.createElementVNode("div",F9,[r.renderSlot(c.$slots,"title"),r.createElementVNode("div",T9,r.toDisplayString(c.name),1),r.createElementVNode("div",M9,r.toDisplayString(c.paragraph),1)]),r.createElementVNode("div",L9,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n,style:r.normalizeStyle(a.value)},null,4)])]))}}),_9={class:"fm-typo-en-body-lg-600"},H9={class:"h-[264px] overflow-y-auto w-[160px]"},U9=["onVnodeMounted"],W9=["onVnodeMounted"],ki=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>{const u=W(n.min).startOf("year"),p=W(n.max).startOf("year"),h=p.diff(u,"year"),m=[];for(let b=0;b<=h;b++)m.push(p.subtract(b,"year"));return m}),s=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");return u.get("year")===p.get("year")?u.startOf("month").isAfter(p)||u.get("month")===p.get("month"):u.get("year")===h.get("year")?u.startOf("month").isBefore(h)||u.get("month")===h.get("month"):!0},l=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");if(p.get("year")===u.get("year")){o("update:modelValue",p);return}if(h.get("year")===u.get("year")){o("update:modelValue",h);return}o("update:modelValue",u)};function c(u,p){if(!p)return!1;const h=u.el,m=h==null?void 0:h.parentElement;!h||!m||m.scrollTo({top:h.offsetTop-50})}return(u,p)=>(r.openBlock(),r.createBlock(io,{trigger:"click","in-popover":"",onMenuChanged:p[0]||(p[0]=h=>i.value=h)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",_9,[u.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.monthFormat"))),1)],64)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.yearFormat"))),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(ue,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",H9,[u.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(h,m)=>u.modelValue.month(m)),h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.monthFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")))},[r.createVNode(St,{disabled:!s(h),"model-value":u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")),label:h.format(r.unref(U)("date.monthFormat")),"onUpdate:modelValue":m=>o("update:modelValue",h)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,U9))),128)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(a.value,h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.yearFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")))},[r.createVNode(St,{"model-value":u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")),label:h.format(r.unref(U)("date.yearFormat")),"onUpdate:modelValue":m=>l(h)},null,8,["model-value","label","onUpdate:modelValue"])],8,W9))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),Bo=Be(r.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},zIndex:{default:99},excludeElFromClickOutside:{default:void 0}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(o.showPopover),a=r.ref(null),s=r.ref(null),{floatingStyles:l}=ci(a,s,{middleware:[si(4),li(),Ic({crossAxis:!0})],placement:o.placement,whileElementsMounted:ai,strategy:"fixed"}),c=n,u=()=>{i.value||(i.value=!0,c("popover-changed",i.value))},p=()=>{i.value&&(i.value=!1,c("popover-changed",i.value))};e({show:u,hide:p});const h=()=>{o.disabled||(i.value=!i.value,c("popover-changed",i.value))};r.watch(()=>o.showPopover,v=>i.value=v);const m=`fm-popover-${Math.random().toString(36).substring(2,15)}`,b=r.computed(()=>[m,...o.excludeElFromClickOutside||[]]),y=()=>{i.value&&(i.value=!1,c("popover-changed",i.value))};return(v,w)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:a,class:"fm-popover",onClick:h},[r.renderSlot(v.$slots,"popover-button",{},void 0,!0)],512),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:m,ref_key:"popoverEl",ref:s,style:r.normalizeStyle({...r.unref(l),zIndex:o.zIndex}),class:"fm-popover__content"},[r.renderSlot(v.$slots,"default",{hide:p,show:u},void 0,!0)],4)):r.createCommentVNode("",!0)]))])),[[r.unref(Vc),y,b.value]])}}),[["__scopeId","data-v-c760cf20"]]),ne="YYYY-MM-DD",Mu=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),a=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&a.length>0&&(e.push(a),a=[]),a.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return a.length>0&&e.push(a),e},h1=(t,e)=>{const n=W().startOf("month"),o=W(t).diff(n,"month"),i=W(e).diff(n,"month"),a=[];for(let s=o-1;s<=i;s++){const l=[],c=n.add(s,"month").startOf("month"),u=c.endOf("month"),p=c.month();let h=c.startOf("week"),m=[];for(;h.isBefore(u.endOf("week"));)h.day()===0&&m.length>0&&(l.push(m),m=[]),m.push({id:c.format("MM-YYYY"),date:h,isCurrentMonth:h.month()===p}),h=h.add(1,"day");m.length>0&&l.push(m),a.push({id:c.format("YYYY-MM-DD"),matrix:l,height:64+48*(u.endOf("week").diff(c.startOf("week"),"week")+1)})}return a},wi=()=>[U("date.day.sun"),U("date.day.mon"),U("date.day.tue"),U("date.day.wed"),U("date.day.thu"),U("date.day.fri"),U("date.day.sat")],j9={class:"p-12 w-[360px]"},G9={class:"w-max"},Q9={class:"flex h-40 justify-between px-4 py-8"},X9={class:"flex gap-4 items-center"},q9={class:"flex gap-4 items-center justify-center"},K9={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},J9=["onClick"],Y9={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},Z9=Be(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=Pe(e,"modelValue"),i=r.ref(W(o.value,ne)),a=r.ref(!1),s=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(W().startOf("month")),c=r.ref(!1),u=r.ref(!1),p=y=>{i.value=y},h=()=>{o.value=i.value.format(ne),setTimeout(()=>{a.value=!1},0)},m=()=>{i.value=o.value?W(o.value):null,a.value=!1},b=y=>{c.value=!1,u.value=!1,l.value=y};return(y,v)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(o),"onUpdate:modelValue":v[5]||(v[5]=w=>r.isRef(o)?o.value=w:null),disabled:s.value,focused:a.value,"helper-state":y.helperState,"helper-text":y.helperText,info:y.labelInfo,label:y.label,optional:y.labelMark==="optional",required:y.labelMark==="required",rules:y.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(y.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:w})=>[r.createVNode(Bo,{disabled:s.value,"show-popover":a.value,"z-index":y.zIndex,onPopoverChanged:v[4]||(v[4]=A=>a.value=A)},{"popover-button":r.withCtx(()=>[y.$slots["trigger-button"]?r.renderSlot(y.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:w,opened:a.value,showValidBorder:y.showValidBorder,disabled:s.value})),void 0,!0):(r.openBlock(),r.createBlock(at,{key:1,disabled:s.value,focused:a.value,"icon-outlined":!a.value,invalid:w,"show-valid-border":y.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(y.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(y.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[s.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(W)(r.unref(o)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",j9,[r.createElementVNode("div",G9,[r.createElementVNode("div",Q9,[r.createElementVNode("div",X9,[r.createVNode(ki,{max:y.max,min:y.min,"model-value":l.value,picker:"month","onUpdate:modelValue":v[0]||(v[0]=A=>b(A))},null,8,["max","min","model-value"]),r.createVNode(ki,{max:y.max,min:y.min,"model-value":l.value,picker:"year","onUpdate:modelValue":v[1]||(v[1]=A=>b(A))},null,8,["max","min","model-value"])]),r.createElementVNode("div",q9,[r.createVNode(ue,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:v[2]||(v[2]=()=>b(l.value.subtract(1,"month")))}),r.createVNode(ue,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:v[3]||(v[3]=()=>b(l.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",K9,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),A=>(r.openBlock(),r.createElementBlock("div",{key:A,class:"fm-calendar__cell"},r.toDisplayString(A),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Mu)(l.value),(A,I)=>(r.openBlock(),r.createElementBlock("div",{key:I,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A,V=>(r.openBlock(),r.createElementBlock("div",{key:V.date.date(),class:"fm-calendar__cell"},[V.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":V.date.isSame(i.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>p(V.date)},r.toDisplayString(V.date.date()),11,J9)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",Y9,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:m},null,8,["label"]),r.createVNode(ke,{disabled:!i.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:h},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-f6b5a366"]]),m1=t=>(r.pushScopeId("data-v-43495396"),t=t(),r.popScopeId(),t),$9={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},e5={class:"flex items-center justify-center"},t5={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},n5={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},o5=m1(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),r5={id:"wrapper",class:"h-full relative w-[336px]"},i5=["id"],a5={class:"flex gap-4 items-center"},s5={class:"fm-typo-en-body-lg-600"},l5={class:"fm-typo-en-body-lg-600"},d5=["onClick"],c5={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},u5=m1(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),f5={class:"flex gap-8 items-center justify-end w-full"},g1=Be(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:99},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=h1(e.min,e.max),i=Pe(e,"modelValue"),a=W(),s=r.ref(W(i.value,ne)),l=r.ref(!1),c=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),u=r.ref(),p=v=>{s.value=v},h=()=>{i.value=s.value.format(ne),setTimeout(()=>{l.value=!1},0)},m=()=>{s.value=i.value?W(i.value):null,l.value=!1},b=()=>{l.value=!0,setTimeout(()=>{u.value.scrollToItem(y(a.startOf("month")))},0)},y=v=>o.findIndex(w=>w.id===v.startOf("month").format(ne));return(v,w)=>{const A=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":w[0]||(w[0]=I=>r.isRef(i)?i.value=I:null),disabled:c.value,focused:l.value,"helper-state":v.helperState,"helper-text":v.helperText,info:v.labelInfo,label:v.label,optional:v.labelMark==="optional",required:v.labelMark==="required",rules:v.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(v.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:I})=>[v.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:b},[r.renderSlot(v.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:I,opened:l.value,showValidBorder:v.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(at,{key:1,disabled:c.value,focused:l.value,invalid:I,"show-valid-border":v.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:b},{prepend:r.withCtx(()=>[r.renderSlot(v.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(v.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":r.unref(i)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(i)?r.unref(W)(r.unref(i)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","invalid","show-valid-border"])),l.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:e.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-dvh left-0 top-0 w-screen"},[r.createElementVNode("div",$9,[r.createVNode(at,{focused:l.value,invalid:I,"show-valid-border":v.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(v.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(v.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":(V=s.value)!=null&&V.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((R=s.value)!=null&&R.isValid()?r.unref(W)(s.value).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",e5,[r.createElementVNode("div",t5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))])])]),r.createElementVNode("div",n5,[o5,r.createElementVNode("div",r5,[r.createVNode(A,{ref_key:"scroller",ref:u,buffer:200,"item-size":null,items:r.unref(o),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:V})=>[r.createElementVNode("div",{id:V.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",a5,[r.createElementVNode("div",s5,r.toDisplayString(r.unref(W)(V.id).format(r.unref(U)("date.monthFormat"))),1),r.createElementVNode("div",l5,r.toDisplayString(r.unref(W)(V.id).format(r.unref(U)("date.yearFormat"))),1)])],8,i5),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.matrix,(R,E)=>(r.openBlock(),r.createElementBlock("div",{key:E,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(R,T=>(r.openBlock(),r.createElementBlock("div",{key:T.date.date(),class:"fm-calendar__cell"},[T.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":T.date.isSame(s.value),"fm-typo-en-body-lg-600":T.date.isSame(r.unref(a),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>p(T.date)},r.toDisplayString(T.date.date()),11,d5)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",c5,[u5,r.createElementVNode("div",f5,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:m},null,8,["label"]),r.createVNode(ke,{disabled:!s.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:h},null,8,["disabled","label"])])])],4)])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(v.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-43495396"]]),Al=t=>{const e=r.inject(Ke,null);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},p5=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Jo(),n=t,o=Pe(n,"modelValue"),i=Al(n);return(a,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(Z9,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(g1,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),b1=r.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),h5={class:"cursor-pointer fm-switch__container"},m5={key:0,class:"space-y-4"},g5={class:"fm-typo-en-body-lg-400"},b5={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},y5={class:"fm-switch__input--container"},v5=["checked","disabled","value"],k5={key:1,class:"space-y-4"},w5={class:"fm-typo-en-body-lg-400"},x5={key:0,class:"text-fm-color-typo-secondary fm-typo-en-body-md-400"},Lu=Be(r.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:void 0},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=()=>{o.value||(i.value=!i.value)};return(s,l)=>(r.openBlock(),r.createElementBlock("label",h5,[s.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",m5,[r.renderSlot(s.$slots,"label",{},void 0,!0),r.createElementVNode("div",g5,r.toDisplayString(s.label),1),s.sublabel?(r.openBlock(),r.createElementBlock("div",b5,r.toDisplayString(s.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",y5,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:s.value,class:"fm-switch__input--btn",type:"checkbox",onClick:a},null,8,v5),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":s.showIcon})},[s.showIcon?(r.openBlock(),r.createBlock(ue,{key:0,color:o.value?"#C7C7CC":r.unref(i)?"#1C1C1E":"#FFFFFF",name:r.unref(i)?"check":"close",size:"sm"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)]),s.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",k5,[r.createElementVNode("div",w5,r.toDisplayString(s.label),1),s.sublabel?(r.openBlock(),r.createElementBlock("div",x5,r.toDisplayString(s.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-48c9e062"]]);var Ct=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(Ct||{});const y1=t=>(r.pushScopeId("data-v-c8fd36a9"),t=t(),r.popScopeId(),t),S5={key:0,class:"flex gap-4 items-center relative w-full"},C5={class:"flex flex-col gap-4 w-full"},A5=y1(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),D5={class:"flex flex-col gap-4 w-full"},E5={key:1,class:"flex flex-col gap-4 w-full"},B5={class:"flex gap-4 p-12"},P5={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},O5={key:0,class:"px-8"},I5={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},N5={class:"flex flex-col gap-24"},V5={key:0,class:"flex gap-4 items-center px-12 w-full"},R5={class:"flex flex-col gap-4 w-full"},F5=y1(()=>r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),T5={class:"flex flex-col gap-4 w-full"},M5={class:"flex gap-24"},L5={class:"w-max"},z5={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},_5={class:"flex gap-4 items-center"},H5={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},U5={class:"h-[288px]"},W5={key:0,class:"fm-calendar__cell__button--today"},j5=["onClick","onMouseover"],G5={class:"w-max"},Q5={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},X5={class:"flex gap-4 items-center"},q5={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},K5={key:0,class:"fm-calendar__cell__button--today"},J5=["onClick","onMouseover"],Y5={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},Z5=Be(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:U("date.predefinedRanges.today"),value:{startDate:W().format(ne),endDate:W().format(ne)}},{label:U("date.predefinedRanges.yesterday"),value:{startDate:W().subtract(1,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisWeek"),value:{startDate:W().startOf("week").format(ne),endDate:W().endOf("week").format(ne)}},{label:U("date.predefinedRanges.lastWeek"),value:{startDate:W().subtract(1,"week").startOf("week").format(ne),endDate:W().subtract(1,"week").endOf("week").format(ne)}},{label:U("date.predefinedRanges.last7Days"),value:{startDate:W().subtract(7,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisMonth"),value:{startDate:W().startOf("month").format(ne),endDate:W().endOf("month").format(ne)}},{label:U("date.predefinedRanges.lastMonth"),value:{startDate:W().subtract(1,"month").startOf("month").format(ne),endDate:W().subtract(1,"month").endOf("month").format(ne)}},{label:U("date.predefinedRanges.thisYear"),value:{startDate:W().startOf("year").format(ne),endDate:W().endOf("year").format(ne)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:void 0},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var Q,F;const e=[{id:Ct.PrecedingPeriod,label:U("date.precedingPeriod"),sublabel:"",action:()=>{p.value=Ct.PrecedingPeriod;const S=s.value;if(S[0].startDate&&S[0].endDate){const x=S[0].startDate.diff(S[0].endDate,"day");S[1]={startDate:S[0].startDate.subtract(+(1-x),"day"),endDate:S[0].startDate.subtract(1,"day")}}}},{id:Ct.PrecedingWeek,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfWeek"),action:()=>{p.value=Ct.PrecedingWeek;const S=s.value;if(S[0].startDate&&S[0].endDate){let x=S[0].endDate.diff(S[0].startDate,"week");x===0&&(x+=1),S[1]={startDate:S[0].startDate.subtract(x,"week"),endDate:S[0].endDate.subtract(x,"week")}}}},{id:Ct.PrecedingMonth,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfMonth"),action:()=>{p.value=Ct.PrecedingMonth;const S=s.value;if(S[0].startDate&&S[0].endDate){let x=S[0].endDate.diff(S[0].startDate,"month");x===0&&(x+=1),S[1]={startDate:S[0].startDate.subtract(x,"month"),endDate:S[0].endDate.subtract(x,"month")}}}},{id:Ct.Custom,label:U("date.match.custom"),sublabel:"",action:()=>{p.value=Ct.Custom}}],n=t,o=r.inject(Ke,null),i=W(),a=Pe(n,"modelValue"),s=r.ref([{startDate:(Q=a.value)!=null&&Q.startDate?W(a.value.startDate,ne):null,endDate:(F=a.value)!=null&&F.endDate?W(a.value.endDate,ne):null},{startDate:null,endDate:null}]),l=r.ref(!1),c=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),u=r.ref(!1),p=r.ref(""),h=r.ref(W().startOf("month")),m=r.ref(W().startOf("month").add(1,"month")),b=r.ref(""),y=r.ref(null);let v=0;const w=S=>{var x;if(b.value="",s.value[v].startDate&&s.value[v].endDate){v===1&&(s.value=s.value.map(()=>({startDate:null,endDate:null})),v=0),s.value[0]={startDate:S,endDate:null};return}else if(!s.value[v].startDate&&!s.value[v].endDate)s.value[v].startDate=S;else{if(S.isBefore(s.value[v].startDate)){const P=s.value[v].startDate;s.value[v]={startDate:S,endDate:P}}else s.value[v].endDate=S;u.value&&(v=1),e.find(P=>P.id===p.value)||(p.value=Ct.Custom)}(x=e.find(P=>P.id===p.value))==null||x.action()},A=()=>{u.value?a.value=s.value.map(S=>({startDate:S.startDate.format(ne),endDate:S.endDate.format(ne)})):a.value={startDate:s.value[0].startDate.format(ne),endDate:s.value[0].endDate.format(ne)},setTimeout(()=>{l.value=!1})},I=()=>{var S,x;Array.isArray(a.value)?s.value=a.value:s.value[0]={startDate:(S=a.value)!=null&&S.startDate?W(a.value.startDate,ne):null,endDate:(x=a.value)!=null&&x.endDate?W(a.value.endDate,ne):null},l.value=!1},V=(S,x)=>{S==="left"?(h.value=x,m.value=x.add(1,"month")):S==="right"&&(m.value=x,h.value=x.subtract(1,"month"))},R=S=>{const x=s.value[0].startDate,P=s.value[0].endDate,C=s.value[1].startDate,M=s.value[1].endDate,L=y.value,K=x==null?void 0:x.isSame(S),oe=P==null?void 0:P.isSame(S),le=C==null?void 0:C.isSame(S),Z=M==null?void 0:M.isSame(S),ae=L==null?void 0:L.isSame(S),fe=K&&P&&!(K&&oe)||x&&!P&&K&&(L==null?void 0:L.isAfter(x))||x&&!P&&ae&&(L==null?void 0:L.isBefore(x)),he=le&&M&&!(le&&Z)||C&&!M&&le&&(L==null?void 0:L.isAfter(C))||C&&!M&&ae&&(L==null?void 0:L.isBefore(C)),Ie=oe&&x&&!(K&&oe)||x&&!P&&K&&(L==null?void 0:L.isBefore(x))||x&&!P&&ae&&(L==null?void 0:L.isAfter(x)),st=Z&&C&&!(le&&Z)||C&&!M&&le&&(L==null?void 0:L.isBefore(C))||C&&!M&&ae&&(L==null?void 0:L.isAfter(C)),Xe=K&&oe||K&&!P,nt=le&&Z||le&&!M,ot=x&&(P||L)&&P?S.isAfter(x)&&S.isBefore(P):S.isAfter(L)&&S.isBefore(x)||S.isBefore(L)&&S.isAfter(x),At=C&&(M||L)&&M?S.isAfter(C)&&S.isBefore(M):S.isAfter(L)&&S.isBefore(C)||S.isBefore(L)&&S.isAfter(C),Pt=()=>{if(s.value.filter(Xt=>{var Xn;for(const Ni in Xt)if((Xn=Xt[Ni])!=null&&Xn.isSame(S,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(K&&oe&&(pt(S,C,M)||pt(S,C,L)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(le&&Z&&(pt(S,x,P)||pt(S,x,L)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(fe||Ie)return pt(S,C,M)||pt(S,C,L)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(he||st)return pt(S,x,P)||pt(S,x,L)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Xe)return"bg-fm-color-primary";if(nt)return"bg-fm-color-system-info-300";if(pt(S,x,P)&&(pt(S,C,M)||pt(S,C,L)))return"bg-fm-color-system-success-100";if(ot)return"bg-fm-color-system-warning-100";if(At)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Pt()}`]:fe||he,[`fm-calendar__cell__button--selected-end ${Pt()}`]:Ie||st,[`fm-calendar__cell__button--selected-between ${Pt()}`]:ot||At,[`fm-calendar__cell__button--selected ${Pt()}`]:Xe||nt}},E=S=>{const x=s.value;if(x[0].startDate&&!x[0].endDate||x[1].startDate&&!x[1].endDate){y.value=S;return}y.value=null},T=S=>{b.value=S.label,s.value[0]={startDate:W(S.value.startDate,ne),endDate:W(S.value.endDate,ne)},V("left",W(S.value.startDate,ne).startOf("month"))},B=r.computed(()=>u.value?!s.value.every(S=>S.startDate&&S.endDate):!(s.value[0].startDate&&s.value[0].endDate)),H=S=>{p.value="",u.value=S,s.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),v=0},_=r.computed(()=>{if(!a.value)return{startDate:U("date.placeholder"),endDate:U("date.placeholder")};const S=u.value&&Array.isArray(a.value)?a.value[0].startDate:a.value.startDate,x=u.value&&Array.isArray(a.value)?a.value[0].endDate:a.value.endDate;return{startDate:S?W(S).format(U("date.format")):U("date.placeholder"),endDate:x?W(x).format(U("date.format")):U("date.placeholder")}}),j=r.computed(()=>{const S=u.value&&Array.isArray(a.value)?a.value[1].startDate:null,x=u.value&&Array.isArray(a.value)?a.value[1].endDate:null;return S&&x?`${U("date.compareLabel")} ${W(S).format(U("date.format"))} - ${W(x).format(U("date.format"))}`:""});return r.watch(()=>a.value,()=>{var S,x;u.value?s.value=a.value.map(P=>({startDate:P!=null&&P.startDate?W(P.startDate,ne):null,endDate:P!=null&&P.endDate?W(P.endDate,ne):null})):s.value[0]={startDate:(S=a.value)!=null&&S.startDate?W(a.value.startDate,ne):null,endDate:(x=a.value)!=null&&x.endDate?W(a.value.endDate,ne):null}}),(S,x)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(a),"onUpdate:modelValue":x[8]||(x[8]=P=>r.isRef(a)?a.value=P:null),disabled:c.value,focused:l.value,"helper-state":S.helperState,"helper-text":u.value?j.value:S.helperText,rules:S.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:P})=>[r.createVNode(Bo,{disabled:c.value,"show-popover":l.value,"z-index":n.zIndex,onPopoverChanged:x[7]||(x[7]=C=>l.value=C)},{"popover-button":r.withCtx(()=>[S.$slots["trigger-button"]?r.renderSlot(S.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:P,showValidBorder:S.showValidBorder,isComparing:u.value,disabled:c.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[S.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",S5,[r.createElementVNode("label",C5,[r.createVNode(hn,{disabled:c.value,label:n.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(c.value?"cursor-not-allowed":"cursor-pointer"),disabled:c.value,focused:l.value,"icon-outlined":!l.value,invalid:P,"show-valid-border":S.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(S.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(a))!=null&&C.startDate?r.unref(W)(r.unref(a).startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),A5,r.createElementVNode("label",D5,[r.createVNode(hn,{disabled:c.value,label:n.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(c.value?"cursor-not-allowed":"cursor-pointer"),disabled:c.value,focused:l.value,"icon-outlined":!l.value,invalid:P,"show-valid-border":S.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(S.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":_.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(a))!=null&&C.endDate?r.unref(W)(r.unref(a).endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),S.compare?(r.openBlock(),r.createElementBlock("label",E5,[r.createVNode(hn,{label:S.compareLabel??r.unref(U)("date.compare"),locale:S.locale},null,8,["label","locale"]),r.createVNode(at,{class:r.normalizeClass(c.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:P,"show-valid-border":S.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(S.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(S.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[c.value?"text-fm-color-typo-disabled":_.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(_.value.startDate)+" - "+r.toDisplayString(_.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",B5,[S.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",P5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.predefinedRange,(C,M)=>(r.openBlock(),r.createBlock(St,{key:M,label:C.label,"model-value":b.value===C.label,selectable:"",onClick:L=>T(C)},null,8,["label","model-value","onClick"]))),128)),S.compare&&S.predefinedRange?(r.openBlock(),r.createElementBlock("div",O5,[r.createVNode(b1,{inset:""})])):r.createCommentVNode("",!0),S.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Lu,{"model-value":u.value,class:"justify-between px-12",label:r.unref(U)("date.label.compare"),"onUpdate:modelValue":x[0]||(x[0]=C=>H(C))},null,8,["model-value","label"]),u.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(C,M)=>r.createVNode(St,{key:M,label:C.label,"model-value":p.value===C.id,sublabel:C.sublabel,selectable:"",onClick:L=>C.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),S.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",I5)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":S.showPredefinedRange})},[r.createElementVNode("div",N5,[u.value?(r.openBlock(),r.createElementBlock("div",V5,[r.createElementVNode("label",R5,[r.createVNode(hn,{locale:S.locale,label:r.unref(U)("date.label.custom")},null,8,["locale","label"]),r.createVNode(at,{focused:!1},{default:r.withCtx(()=>{var C,M;return[r.createElementVNode("div",{class:r.normalizeClass([[(C=s.value[0])!=null&&C.startDate&&((M=s.value[0])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.value[0].startDate!==null?s.value[0].startDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder"))+" - "+r.toDisplayString(s.value[0].endDate!==null?s.value[0].endDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:1})]),F5,r.createElementVNode("label",T5,[r.createVNode(hn,{locale:S.locale,label:r.unref(U)("date.label.compare")},null,8,["locale","label"]),r.createVNode(at,{focused:!1},{default:r.withCtx(()=>{var C,M;return[r.createElementVNode("div",{class:r.normalizeClass([[(C=s.value[1])!=null&&C.startDate&&((M=s.value[1])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.value[1].startDate!==null?s.value[1].startDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder"))+" - "+r.toDisplayString(s.value[1].endDate!==null?s.value[1].endDate.format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",M5,[r.createElementVNode("div",L5,[r.createElementVNode("div",z5,[r.createElementVNode("div",_5,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:x[1]||(x[1]=()=>V("left",h.value.subtract(1,"month")))}),r.createVNode(ki,{max:S.max,min:S.min,"model-value":h.value,picker:"month","onUpdate:modelValue":x[2]||(x[2]=C=>V("left",C))},null,8,["max","min","model-value"]),r.createVNode(ki,{max:S.max,min:S.min,"model-value":h.value,picker:"year","onUpdate:modelValue":x[3]||(x[3]=C=>V("left",C))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",H5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),C=>(r.openBlock(),r.createElementBlock("div",{key:C,class:"fm-calendar__cell"},r.toDisplayString(C),1))),128))]),r.createElementVNode("div",U5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Mu)(h.value),(C,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C,L=>(r.openBlock(),r.createElementBlock("div",{key:L.date.date(),class:"fm-calendar__cell"},[L.date.isSame(r.unref(i),"day")&&L.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",W5)):r.createCommentVNode("",!0),L.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[R(L.date),{"fm-typo-en-body-lg-600":L.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>w(L.date),onMouseover:K=>E(L.date)},r.toDisplayString(L.date.date()),43,j5)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",G5,[r.createElementVNode("div",Q5,[r.createElementVNode("div",X5,[r.createVNode(ki,{max:S.max,min:S.min,"model-value":m.value,picker:"month","onUpdate:modelValue":x[4]||(x[4]=C=>V("right",C))},null,8,["max","min","model-value"]),r.createVNode(ki,{max:S.max,min:S.min,"model-value":m.value,picker:"year","onUpdate:modelValue":x[5]||(x[5]=C=>V("right",C))},null,8,["max","min","model-value"])]),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:x[6]||(x[6]=()=>V("left",h.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",q5,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),C=>(r.openBlock(),r.createElementBlock("div",{key:C,class:"fm-calendar__cell"},r.toDisplayString(C),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Mu)(m.value),(C,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C,L=>(r.openBlock(),r.createElementBlock("div",{key:L.date.date(),class:"fm-calendar__cell"},[L.date.isSame(r.unref(i),"day")&&L.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",K5)):r.createCommentVNode("",!0),L.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[R(L.date),{"fm-typo-en-body-lg-600":L.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>w(L.date),onMouseover:K=>E(L.date)},r.toDisplayString(L.date.date()),43,J5)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",Y5,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:I},null,8,["label"]),r.createVNode(ke,{disabled:B.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:A},null,8,["disabled","label"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[S.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(S.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-c8fd36a9"]]),$5={key:0},e6={class:"flex gap-4 items-center relative w-full"},t6={class:"flex flex-col gap-4 w-full"},n6=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),o6={class:"flex flex-col gap-4 w-full"},r6={key:1,class:"flex flex-col gap-4 w-full"},zu=r.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{},endLabel:{},compareLabel:{},locale:{}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:U("date.placeholder"),endDate:U("date.placeholder")};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?W(o).format(U("date.format")):U("date.placeholder"),endDate:i?W(i).format(U("date.format")):U("date.placeholder")}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",$5,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",e6,[r.createElementVNode("label",t6,[r.createVNode(hn,{disabled:o.disabled,label:e.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.startDate?r.unref(W)(o.modelValue.startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])]),n6,r.createElementVNode("label",o6,[r.createVNode(hn,{disabled:o.disabled,label:e.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.endDate?r.unref(W)(o.modelValue.endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",r6,[r.createVNode(hn,{label:o.compareLabel??r.unref(U)("date.compare"),locale:o.locale},null,8,["label","locale"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),v1=t=>(r.pushScopeId("data-v-2f7759d2"),t=t(),r.popScopeId(),t),i6={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},a6={class:"flex items-center justify-center"},s6={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},l6={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},d6=v1(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),c6={id:"wrapper",class:"h-full relative w-[336px]"},u6=["id"],f6={class:"flex gap-4 items-center"},p6={class:"fm-typo-en-body-lg-600"},h6={class:"fm-typo-en-body-lg-600"},m6=["onClick","onMouseover"],g6={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},b6=v1(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),y6={class:"flex gap-8 items-center justify-end w-full"},k1=Be(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:U("date.predefinedRanges.today"),value:{startDate:W().format(ne),endDate:W().format(ne)}},{label:U("date.predefinedRanges.yesterday"),value:{startDate:W().subtract(1,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisWeek"),value:{startDate:W().startOf("week").format(ne),endDate:W().endOf("week").format(ne)}},{label:U("date.predefinedRanges.lastWeek"),value:{startDate:W().subtract(1,"week").startOf("week").format(ne),endDate:W().subtract(1,"week").endOf("week").format(ne)}},{label:U("date.predefinedRanges.last7Days"),value:{startDate:W().subtract(7,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisMonth"),value:{startDate:W().startOf("month").format(ne),endDate:W().endOf("month").format(ne)}},{label:U("date.predefinedRanges.lastMonth"),value:{startDate:W().subtract(1,"month").startOf("month").format(ne),endDate:W().subtract(1,"month").endOf("month").format(ne)}},{label:U("date.predefinedRanges.thisYear"),value:{startDate:W().startOf("year").format(ne),endDate:W().endOf("year").format(ne)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{default:100},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var F,S;const e=r.ref(),n=[{id:Ct.PrecedingPeriod,label:U("date.precedingPeriod"),sublabel:"",action:()=>{h.value=Ct.PrecedingPeriod;const x=c.value;if(x[0].startDate&&x[0].endDate){const P=x[0].startDate.diff(x[0].endDate,"day");x[1]={startDate:x[0].startDate.subtract(+(1-P),"day"),endDate:x[0].startDate.subtract(1,"day")}}}},{id:Ct.PrecedingWeek,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfWeek"),action:()=>{h.value=Ct.PrecedingWeek;const x=c.value;if(x[0].startDate&&x[0].endDate){let P=x[0].endDate.diff(x[0].startDate,"week");P===0&&(P+=1),x[1]={startDate:x[0].startDate.subtract(P,"week"),endDate:x[0].endDate.subtract(P,"week")}}}},{id:Ct.PrecedingMonth,label:U("date.precedingPeriod"),sublabel:U("date.match.dayOfMonth"),action:()=>{h.value=Ct.PrecedingMonth;const x=c.value;if(x[0].startDate&&x[0].endDate){let P=x[0].endDate.diff(x[0].startDate,"month");P===0&&(P+=1),x[1]={startDate:x[0].startDate.subtract(P,"month"),endDate:x[0].endDate.subtract(P,"month")}}}},{id:Ct.Custom,label:U("date.match.custom"),sublabel:"",action:()=>{h.value=Ct.Custom}}],o=t,i=r.inject(Ke,null),a=h1(o.min,o.max),s=W(),l=Pe(o,"modelValue"),c=r.ref([{startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,ne):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,ne):null},{startDate:null,endDate:null}]),u=r.ref(!1),p=r.ref(!1),h=r.ref(""),m=r.ref(""),b=r.ref(null);let y=0;const v=x=>{var P;if(m.value="",c.value[y].startDate&&c.value[y].endDate){y===1&&(c.value=c.value.map(()=>({startDate:null,endDate:null})),y=0),c.value[0]={startDate:x,endDate:null};return}else if(!c.value[y].startDate&&!c.value[y].endDate)c.value[y].startDate=x;else{if(x.isBefore(c.value[y].startDate)){const C=c.value[y].startDate;c.value[y]={startDate:x,endDate:C}}else c.value[y].endDate=x;p.value&&(y=1),n.find(C=>C.id===h.value)||(h.value=Ct.Custom)}(P=n.find(C=>C.id===h.value))==null||P.action()},w=()=>{p.value?l.value=c.value.map(x=>({startDate:x.startDate.format(ne),endDate:x.endDate.format(ne)})):l.value={startDate:c.value[0].startDate.format(ne),endDate:c.value[0].endDate.format(ne)},setTimeout(()=>{u.value=!1})},A=()=>{var x,P;Array.isArray(l.value)?c.value=l.value:c.value[0]={startDate:(x=l.value)!=null&&x.startDate?W(l.value.startDate,ne):null,endDate:(P=l.value)!=null&&P.endDate?W(l.value.endDate,ne):null},u.value=!1},I=x=>{const P=c.value[0].startDate,C=c.value[0].endDate,M=c.value[1].startDate,L=c.value[1].endDate,K=b.value,oe=P==null?void 0:P.isSame(x),le=C==null?void 0:C.isSame(x),Z=M==null?void 0:M.isSame(x),ae=L==null?void 0:L.isSame(x),fe=K==null?void 0:K.isSame(x),he=oe&&C&&!(oe&&le)||P&&!C&&oe&&(K==null?void 0:K.isAfter(P))||P&&!C&&fe&&(K==null?void 0:K.isBefore(P)),Ie=Z&&L&&!(Z&&ae)||M&&!L&&Z&&(K==null?void 0:K.isAfter(M))||M&&!L&&fe&&(K==null?void 0:K.isBefore(M)),st=le&&P&&!(oe&&le)||P&&!C&&oe&&(K==null?void 0:K.isBefore(P))||P&&!C&&fe&&(K==null?void 0:K.isAfter(P)),Xe=ae&&M&&!(Z&&ae)||M&&!L&&Z&&(K==null?void 0:K.isBefore(M))||M&&!L&&fe&&(K==null?void 0:K.isAfter(M)),nt=oe&&le||oe&&!C,ot=Z&&ae||Z&&!L,At=P&&(C||K)&&C?x.isAfter(P)&&x.isBefore(C):x.isAfter(K)&&x.isBefore(P)||x.isBefore(K)&&x.isAfter(P),Pt=M&&(L||K)&&L?x.isAfter(M)&&x.isBefore(L):x.isAfter(K)&&x.isBefore(M)||x.isBefore(K)&&x.isAfter(M),kn=()=>{if(c.value.filter(Xn=>{var Ni;for(const qn in Xn)if((Ni=Xn[qn])!=null&&Ni.isSame(x,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(oe&&le&&(pt(x,M,L)||pt(x,M,K)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(Z&&ae&&(pt(x,P,C)||pt(x,P,K)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(he||st)return pt(x,M,L)||pt(x,M,K)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(Ie||Xe)return pt(x,P,C)||pt(x,P,K)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(nt)return"bg-fm-color-primary";if(ot)return"bg-fm-color-system-info-300";if(pt(x,P,C)&&(pt(x,M,L)||pt(x,M,K)))return"bg-fm-color-system-success-100";if(At)return"bg-fm-color-system-warning-100";if(Pt)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${kn()}`]:he||Ie,[`fm-calendar__cell__button--selected-end ${kn()}`]:st||Xe,[`fm-calendar__cell__button--selected-between ${kn()}`]:At||Pt,[`fm-calendar__cell__button--selected ${kn()}`]:nt||ot}},V=x=>{const P=c.value;if(P[0].startDate&&!P[0].endDate||P[1].startDate&&!P[1].endDate){b.value=x;return}b.value=null},R=x=>{c.value[0]={startDate:W(x.startDate,ne),endDate:W(x.endDate,ne)}},E=x=>{const P=n.find(C=>C.id===x);P==null||P.action()},T=r.computed(()=>p.value?!c.value.every(x=>x.startDate&&x.endDate):!(c.value[0].startDate&&c.value[0].endDate)),B=x=>{h.value="",p.value=x,c.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),y=0},H=r.computed(()=>{const x=p.value&&Array.isArray(l.value)?l.value[1].startDate:null,P=p.value&&Array.isArray(l.value)?l.value[1].endDate:null;return x&&P?`${U("date.compareLabel")} ${W(x).format(U("date.format"))} - ${W(P).format(U("date.format"))}`:""}),_=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),j=()=>{_.value||(u.value=!0,setTimeout(()=>{e.value.scrollToItem(Q(s.startOf("month")))},0))},Q=x=>a.findIndex(P=>P.id===x.startOf("month").format(ne));return r.watch(()=>l.value,()=>{var x,P;p.value?c.value=l.value.map(C=>({startDate:C!=null&&C.startDate?W(C.startDate,ne):null,endDate:C!=null&&C.endDate?W(C.endDate,ne):null})):c.value[0]={startDate:(x=l.value)!=null&&x.startDate?W(l.value.startDate,ne):null,endDate:(P=l.value)!=null&&P.endDate?W(l.value.endDate,ne):null}}),(x,P)=>{const C=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(l),"onUpdate:modelValue":P[3]||(P[3]=M=>r.isRef(l)?l.value=M:null),disabled:_.value,focused:u.value,"helper-state":x.helperState,"helper-text":p.value?H.value:x.helperText,rules:x.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:M})=>{var L,K,oe,le;return[x.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:j},[r.renderSlot(x.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:u.value,invalid:M,showValidBorder:x.showValidBorder,isComparing:p.value,disabled:_.value})),void 0,!0)])):(r.openBlock(),r.createBlock(zu,{key:1,analytic:x.compare,"compare-label":x.compareLabel??r.unref(U)("date.compare"),disabled:_.value,"end-label":x.endLabel??r.unref(U)("date.endDate"),focused:u.value,invalid:M,"is-comparing":p.value,"model-value":r.unref(l),"show-valid-border":x.showValidBorder,"start-label":x.startLabel??r.unref(U)("date.startDate"),onClick:j},r.createSlots({_:2},[x.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(x.$slots,"popover-button",{focused:u.value},void 0,!0)]),key:"0"}:void 0]),1032,["analytic","compare-label","disabled","end-label","focused","invalid","is-comparing","model-value","show-valid-border","start-label"])),u.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",{style:r.normalizeStyle({zIndex:o.zIndex}),class:"bg-fm-color-neutral-white fixed flex flex-col h-dvh left-0 top-0 w-screen"},[r.createElementVNode("div",i6,[x.showPredefinedRange?(r.openBlock(),r.createBlock(yo,{key:0,items:x.predefinedRange,"model-value":m.value,"onUpdate:modelValue":P[0]||(P[0]=Z=>R(Z))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(zu,{analytic:x.compare,"compare-label":x.compareLabel??r.unref(U)("date.compare"),"end-label":x.endLabel??r.unref(U)("date.endDate"),"is-comparing":p.value,"model-value":{startDate:((L=c.value[0].startDate)==null?void 0:L.format(r.unref(ne)))??null,endDate:((K=c.value[0].endDate)==null?void 0:K.format(r.unref(ne)))??null},"start-label":x.startLabel??r.unref(U)("date.startDate")},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),x.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Lu,{"model-value":p.value,label:r.unref(U)("date.label.compare"),"label-placement":"right","onUpdate:modelValue":P[1]||(P[1]=Z=>B(Z))},null,8,["model-value","label"]),p.value&&x.compare?(r.openBlock(),r.createBlock(yo,{key:0,items:n.map(Z=>({label:Z.label,sublabel:Z.sublabel,value:Z.id})),"model-value":h.value,"onUpdate:modelValue":P[2]||(P[2]=Z=>E(Z))},null,8,["items","model-value"])):r.createCommentVNode("",!0),p.value&&x.compare?(r.openBlock(),r.createBlock(zu,{key:1,analytic:x.compare,"end-label":x.endLabel??r.unref(U)("date.endDate"),"is-comparing":p.value,"model-value":{startDate:((oe=c.value[1].startDate)==null?void 0:oe.format(r.unref(ne)))??null,endDate:((le=c.value[1].endDate)==null?void 0:le.format(r.unref(ne)))??null},"start-label":x.startLabel??r.unref(U)("date.startDate"),"compare-label":"Compare: Custom"},null,8,["analytic","end-label","is-comparing","model-value","start-label"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",a6,[r.createElementVNode("div",s6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),Z=>(r.openBlock(),r.createElementBlock("div",{key:Z,class:"fm-calendar__cell"},r.toDisplayString(Z),1))),128))])])]),r.createElementVNode("div",l6,[d6,r.createElementVNode("div",c6,[r.createVNode(C,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(a),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:Z})=>[r.createElementVNode("div",{id:Z.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",f6,[r.createElementVNode("div",p6,r.toDisplayString(r.unref(W)(Z.id).format(r.unref(U)("date.monthFormat"))),1),r.createElementVNode("div",h6,r.toDisplayString(r.unref(W)(Z.id).format(r.unref(U)("date.yearFormat"))),1)])],8,u6),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Z.matrix,(ae,fe)=>(r.openBlock(),r.createElementBlock("div",{key:fe,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(ae,he=>(r.openBlock(),r.createElementBlock("div",{key:he.date.date(),class:"fm-calendar__cell"},[he.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[I(he.date),{"fm-typo-en-body-lg-600":he.date.isSame(r.unref(s),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>v(he.date),onMouseover:Ie=>V(he.date)},r.toDisplayString(he.date.date()),43,m6)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",g6,[b6,r.createElementVNode("div",y6,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:A},null,8,["label"]),r.createVNode(ke,{disabled:T.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:w},null,8,["disabled","label"])])])],4)])):r.createCommentVNode("",!0)]}),_:2},[x.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(x.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-2f7759d2"]]),v6=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:U("date.predefinedRanges.today"),value:{startDate:W().format(ne),endDate:W().format(ne)}},{label:U("date.predefinedRanges.yesterday"),value:{startDate:W().subtract(1,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisWeek"),value:{startDate:W().startOf("week").format(ne),endDate:W().endOf("week").format(ne)}},{label:U("date.predefinedRanges.lastWeek"),value:{startDate:W().subtract(1,"week").startOf("week").format(ne),endDate:W().subtract(1,"week").endOf("week").format(ne)}},{label:U("date.predefinedRanges.last7Days"),value:{startDate:W().subtract(7,"day").format(ne),endDate:W().subtract(1,"day").format(ne)}},{label:U("date.predefinedRanges.thisMonth"),value:{startDate:W().startOf("month").format(ne),endDate:W().endOf("month").format(ne)}},{label:U("date.predefinedRanges.lastMonth"),value:{startDate:W().subtract(1,"month").startOf("month").format(ne),endDate:W().subtract(1,"month").endOf("month").format(ne)}},{label:U("date.predefinedRanges.thisYear"),value:{startDate:W().startOf("year").format(ne),endDate:W().endOf("year").format(ne)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>W().subtract(50,"year").format(ne)},max:{default:()=>W().add(25,"year").format(ne)},zIndex:{},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=Jo(),o=Pe(e,"modelValue"),i=Al(e);return(a,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(Z5,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(n).xs||r.unref(n).sm?(r.openBlock(),r.createBlock(k1,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),re="YYYY-MM-DD",xi=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),a=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&a.length>0&&(e.push(a),a=[]),a.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return a.length>0&&e.push(a),e.length<6&&e.push([]),e},w1=(t,e)=>({startAt:t?W(t,re):null,endAt:e?W(e,re):null}),k6={class:"fm-typo-en-body-md-600"},w6={id:"in-calendar-app",class:"h-[264px] overflow-y-auto w-[160px]"},x6=["onVnodeMounted"],S6=["onVnodeMounted"],Pn=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>{const u=W(n.min).startOf("year"),p=W(n.max).startOf("year"),h=p.diff(u,"year"),m=[];for(let b=0;b<=h;b++)m.push(p.subtract(b,"year"));return m}),s=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");return u.get("year")===p.get("year")?u.startOf("month").isAfter(p)||u.get("month")===p.get("month"):u.get("year")===h.get("year")?u.startOf("month").isBefore(h)||u.get("month")===h.get("month"):!0},l=u=>{const p=W(n.min).startOf("month"),h=W(n.max).startOf("month");if(p.get("year")===u.get("year")){o("update:modelValue",p);return}if(h.get("year")===u.get("year")){o("update:modelValue",h);return}o("update:modelValue",u)};function c(u,p){if(!p)return!1;const h=u.el,m=h==null?void 0:h.parentElement;!h||!m||m.scrollTo({top:h.offsetTop-50})}return(u,p)=>(r.openBlock(),r.createBlock(io,{trigger:"click",onMenuChanged:p[0]||(p[0]=h=>i.value=h)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-4 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",k6,[u.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.monthFormat"))),1)],64)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(u.modelValue.format(r.unref(U)("date.yearFormat"))),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(ue,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",w6,[u.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(h,m)=>u.modelValue.month(m)),h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.monthFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")))},[r.createVNode(St,{disabled:!s(h),"model-value":u.modelValue.format(r.unref(U)("date.monthFormat"))===h.format(r.unref(U)("date.monthFormat")),label:h.format(r.unref(U)("date.monthFormat")),"onUpdate:modelValue":m=>o("update:modelValue",h)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,x6))),128)):r.createCommentVNode("",!0),u.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(a.value,h=>(r.openBlock(),r.createElementBlock("li",{key:h.format(r.unref(U)("date.yearFormat")),onVnodeMounted:m=>c(m,u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")))},[r.createVNode(St,{"model-value":u.modelValue.format(r.unref(U)("date.yearFormat"))===h.format(r.unref(U)("date.yearFormat")),label:h.format(r.unref(U)("date.yearFormat")),"onUpdate:modelValue":m=>l(h)},null,8,["model-value","label","onUpdate:modelValue"])],8,S6))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),C6={class:"fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary"},A6=["id"],D6={key:0,class:"fm-calendar__cell__button--today"},E6=["onClick","onMouseover"],Si=Be(r.defineComponent({__name:"FmCalendar",props:{days:{},dayCellClass:{type:[Object,Function],default:void 0},onDayClick:{},onCellMouseOver:{type:Function,default:void 0},cellSize:{default:"md"}},setup(t){const e=W(),n=(i,a)=>typeof i=="function"?i(...a):i,o=(i,a)=>{if(!a)return;const s={"fm-calendar__cell--selected":!1,"fm-calendar__cell--selected-start":!1,"fm-calendar__cell--selected-end":!1,"fm-calendar__cell--selected-between":!1};let l;if(typeof a=="function"){const{status:c,className:u}=a(i);c&&(s["fm-calendar__cell--selected"]=c.isSelected??!1,s["fm-calendar__cell--selected-start"]=c.isStart??!1,s["fm-calendar__cell--selected-end"]=c.isEnd??!1,s["fm-calendar__cell--selected-between"]=c.isBetween??!1),l=u??""}else{const{status:c,className:u}=a;c&&(s["fm-calendar__cell--selected"]=n(c.isSelected,[i])??!1,s["fm-calendar__cell--selected-start"]=n(c.isStart,[i])??!1,s["fm-calendar__cell--selected-end"]=n(c.isEnd,[i])??!1,s["fm-calendar__cell--selected-between"]=n(c.isBetween,[i])??!1),l=n(u,[i])??""}return[s,l]};return(i,a)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",C6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wi)(),s=>(r.openBlock(),r.createElementBlock("div",{key:s,class:r.normalizeClass(["fm-calendar__cell",`fm-calendar__cell__${i.cellSize}`])},r.toDisplayString(s),3))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.days,(s,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:"fm-calendar__row fm-typo-en-body-md-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s,c=>(r.openBlock(),r.createElementBlock("div",{id:`${c.date.toISOString()}`,key:c.date.date(),class:r.normalizeClass(["fm-calendar__cell",[`fm-calendar__cell__${i.cellSize}`,o(c.date,i.dayCellClass),!c.isCurrentMonth&&"fm-calendar__cell--not-current-month"]])},[c.date.isSame(r.unref(e),"day")&&c.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",D6)):r.createCommentVNode("",!0),c.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-calendar__cell__button",type:"button",onClick:u=>i.onDayClick(c),onMouseover:u=>{var p;return(p=i.onCellMouseOver)==null?void 0:p.call(i,c.date)}},r.toDisplayString(c.date.date()),41,E6)):r.createCommentVNode("",!0)],10,A6))),128))]))),128))])]))}}),[["__scopeId","data-v-9a5f3a22"]]),B6={class:"p-12 space-y-4 w-[552px]"},P6={class:"w-max"},O6={class:"flex space-x-24"},I6={class:"flex items-center py-8 space-x-16"},N6={class:"flex space-x-4"},V6={class:"flex items-center justify-end py-8 space-x-16"},R6={class:"flex space-x-4"},F6={class:"flex gap-8 items-center justify-end w-full"},T6=r.defineComponent({__name:"FmSimpleDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=Pe(e,"modelValue"),i=r.ref(W(o.value,re)),a=r.ref(!1),s=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(W().startOf("month")),c=r.ref(W().startOf("month").add(1,"month")),u=(w,A)=>{w==="left"?(l.value=A,c.value=A.add(1,"month")):w==="right"&&(c.value=A,l.value=A.subtract(1,"month"))},p=w=>{i.value=w},h=r.computed(()=>xi(l.value)),m=r.computed(()=>xi(l.value.add(1,"month"))),b=()=>{o.value=i.value.format(re),setTimeout(()=>{a.value=!1},0)},y=()=>{i.value=o.value?W(o.value):null,a.value=!1},v=w=>{a.value=w,w||y()};return(w,A)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(o),"onUpdate:modelValue":A[6]||(A[6]=I=>r.isRef(o)?o.value=I:null),disabled:s.value,focused:a.value,"helper-state":w.helperState,"helper-text":w.helperText,info:w.labelInfo,label:w.label,optional:w.labelMark==="optional",required:w.labelMark==="required",rules:w.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(w.$slots,"label")]),default:r.withCtx(({invalid:I})=>[r.createVNode(Bo,{disabled:s.value,"show-popover":a.value,"z-index":e.zIndex,"exclude-el-from-click-outside":["in-calendar-app"],onPopoverChanged:v},{"popover-button":r.withCtx(()=>[w.$slots["trigger-button"]?r.renderSlot(w.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:I,opened:a.value,showValidBorder:w.showValidBorder,disabled:s.value}))):(r.openBlock(),r.createBlock(at,{key:1,disabled:s.value,focused:a.value,"icon-outlined":!a.value,invalid:I,"show-valid-border":w.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[s.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(W)(r.unref(o)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",B6,[r.createElementVNode("div",P6,[r.createElementVNode("div",O6,[r.createElementVNode("div",null,[r.createElementVNode("div",I6,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:A[0]||(A[0]=()=>u("left",l.value.subtract(1,"month")))}),r.createElementVNode("div",N6,[r.createVNode(Pn,{max:w.max,min:w.min,"model-value":l.value,picker:"month","onUpdate:modelValue":A[1]||(A[1]=V=>u("left",V))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:w.max,min:w.min,"model-value":l.value,picker:"year","onUpdate:modelValue":A[2]||(A[2]=V=>u("left",V))},null,8,["max","min","model-value"])])]),r.createVNode(Si,{"day-cell-class":{status:{isSelected:V=>V.isSame(i.value,"date")}},days:h.value,"on-day-click":V=>p(V.date)},null,8,["day-cell-class","days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",V6,[r.createElementVNode("div",R6,[r.createVNode(Pn,{max:w.max,min:w.min,"model-value":c.value,picker:"month","onUpdate:modelValue":A[3]||(A[3]=V=>u("right",V))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:w.max,min:w.min,"model-value":c.value,picker:"year","onUpdate:modelValue":A[4]||(A[4]=V=>u("right",V))},null,8,["max","min","model-value"])]),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:A[5]||(A[5]=()=>u("left",l.value.add(1,"month")))})]),r.createVNode(Si,{"day-cell-class":{status:{isSelected:V=>V.isSame(i.value,"date")}},days:m.value,"on-day-click":V=>p(V.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",F6,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:y},null,8,["label"]),r.createVNode(ke,{disabled:!i.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:b},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),M6={class:"p-12 space-y-4 w-[276px]"},L6={class:"w-max"},z6={class:"flex space-x-24"},_6={class:"flex items-center justify-between py-8"},H6={class:"flex space-x-4"},U6={class:"flex space-x-4"},W6={class:"flex gap-8 items-center justify-end w-full"},x1=r.defineComponent({__name:"FmSimpleDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=Pe(e,"modelValue"),i=r.ref(W(o.value,re)),a=r.ref(!1),s=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(W().startOf("month")),c=y=>{l.value=y},u=y=>{i.value=y},p=r.computed(()=>xi(l.value)),h=()=>{o.value=i.value.format(re),setTimeout(()=>{a.value=!1},0)},m=()=>{i.value=o.value?W(o.value):null,a.value=!1},b=y=>{a.value=y,y||m()};return(y,v)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(o),"onUpdate:modelValue":v[4]||(v[4]=w=>r.isRef(o)?o.value=w:null),disabled:s.value,focused:a.value,"helper-state":y.helperState,"helper-text":y.helperText,info:y.labelInfo,label:y.label,optional:y.labelMark==="optional",required:y.labelMark==="required",rules:y.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),default:r.withCtx(({invalid:w})=>[r.createVNode(Bo,{disabled:s.value,"show-popover":a.value,"z-index":e.zIndex,"exclude-el-from-click-outside":["in-calendar-app"],onPopoverChanged:b},{"popover-button":r.withCtx(()=>[y.$slots["trigger-button"]?r.renderSlot(y.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:w,opened:a.value,showValidBorder:y.showValidBorder,disabled:s.value}))):(r.openBlock(),r.createBlock(at,{key:1,disabled:s.value,focused:a.value,"icon-outlined":!a.value,invalid:w,"show-valid-border":y.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(y.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(y.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[s.value?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(W)(r.unref(o)).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",M6,[r.createElementVNode("div",L6,[r.createElementVNode("div",z6,[r.createElementVNode("div",null,[r.createElementVNode("div",_6,[r.createElementVNode("div",H6,[r.createVNode(Pn,{max:y.max,min:y.min,"model-value":l.value,picker:"month","onUpdate:modelValue":v[0]||(v[0]=A=>c(A))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:y.max,min:y.min,"model-value":l.value,picker:"year","onUpdate:modelValue":v[1]||(v[1]=A=>c(A))},null,8,["max","min","model-value"])]),r.createElementVNode("div",U6,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:v[2]||(v[2]=()=>c(l.value.subtract(1,"month")))}),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:v[3]||(v[3]=()=>c(l.value.add(1,"month")))})])]),r.createVNode(Si,{"day-cell-class":{status:{isSelected:A=>A.isSame(i.value,"date")}},days:p.value,"on-day-click":A=>u(A.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",W6,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:m},null,8,["label"]),r.createVNode(ke,{disabled:!i.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:h},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),j6=r.defineComponent({__name:"FmSimpleDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Jo(),n=t,o=Pe(n,"modelValue"),i=Al(n);return(a,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(T6,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(x1,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[a.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(a.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}});var He=(t=>(t.NoComparison="no_comparison",t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.PrecedingYear="preceding_year",t.Custom="custom",t))(He||{});const G6={key:1,class:"flex gap-4 items-center relative w-full"},Q6={class:"flex flex-col gap-4 w-full"},X6=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),q6={class:"flex flex-col gap-4 w-full"},K6={class:"flex h-[360px]"},J6={class:"flex flex-col items-start p-12 pr-4"},Y6={key:0},Z6={key:1},$6=r.createElementVNode("div",{class:"bg-fm-color-neutral-gray-100 h-full mx-4 w-px"},null,-1),eD={class:"w-max"},tD={class:"flex space-x-24"},nD={class:"flex items-center py-8 space-x-16"},oD={class:"flex space-x-4"},rD={class:"flex items-center justify-end py-8 space-x-16"},iD={class:"flex space-x-4"},aD={class:"flex gap-8 items-center justify-end w-full"},sD=r.defineComponent({__name:"FmSimpleDateRangePickerDesktop",props:{modelValue:{},compareTarget:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:W().format(re),endDate:W().format(re)}},{label:"Yesterday",value:{startDate:W().subtract(1,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This week",value:{startDate:W().startOf("week").format(re),endDate:W().endOf("week").format(re)}},{label:"Last week",value:{startDate:W().subtract(1,"week").startOf("week").format(re),endDate:W().subtract(1,"week").endOf("week").format(re)}},{label:"Last 7 days",value:{startDate:W().subtract(7,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This month",value:{startDate:W().startOf("month").format(re),endDate:W().endOf("month").format(re)}},{label:"Last month",value:{startDate:W().subtract(1,"month").startOf("month").format(re),endDate:W().subtract(1,"month").endOf("month").format(re)}},{label:"This year",value:{startDate:W().startOf("year").format(re),endDate:W().endOf("year").format(re)}}]},defaultCompareType:{default:He.PrecedingPeriod},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var j,Q;const n=F=>()=>{var C,M;const{startAt:S,endAt:x}=w1((C=a.compareTarget)==null?void 0:C.startDate,(M=a.compareTarget)==null?void 0:M.endDate);if(!S||!x)return;const P=F({startAt:S,endAt:x});return R("right",P.endDate.startOf("month")),P},o=r.computed(()=>[{id:He.NoComparison,label:"No Comparison",sublabel:"",action:()=>{c.value={startDate:null,endDate:null},y.value=He.NoComparison}},{id:He.PrecedingWeek,label:"Same period last week",sublabel:"Match day of week",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"week")+1;return c.value={startDate:F.subtract(x,"week"),endDate:S.subtract(x,"week")},y.value=He.PrecedingWeek,c.value})},{id:He.PrecedingMonth,label:"Same period last month",sublabel:"Match day of month",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"month")+1;return c.value={startDate:F.subtract(x,"month"),endDate:S.subtract(x,"month")},y.value=He.PrecedingMonth,c.value})},{id:He.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"day")+1;return c.value={startDate:F.subtract(x,"day"),endDate:S.subtract(x,"day")},y.value=He.PrecedingPeriod,c.value})},{id:He.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"year")+1;return c.value={startDate:F.subtract(x,"year"),endDate:S.subtract(x,"year")},y.value=He.PrecedingYear,c.value})},{id:He.Custom,label:"Custom",sublabel:"",action:()=>{y.value=He.Custom}}]),i=e,a=t,s=r.inject(Ke,null),l=Pe(a,"modelValue"),c=r.ref({startDate:(j=l.value)!=null&&j.startDate?W(l.value.startDate,re):null,endDate:(Q=l.value)!=null&&Q.endDate?W(l.value.endDate,re):null}),u=r.ref(!1),p=r.computed(()=>a.disabled??(s==null?void 0:s.getDisabled())??!1),h=r.ref(W().startOf("month")),m=r.ref(W().startOf("month").add(1,"month")),b=r.ref(""),y=r.ref(a.defaultCompareType),v=r.ref(null),w=()=>{a.showPredefinedRange&&a.predefinedRange.map(({value:{startDate:F,endDate:S},label:x})=>{var P,C;((P=c.value.startDate)==null?void 0:P.format(re))===F&&((C=c.value.endDate)==null?void 0:C.format(re))===S&&(b.value=x)})},A=F=>{if(b.value="",y.value=He.Custom,c.value.startDate&&c.value.endDate){c.value={startDate:F,endDate:null};return}else if(!c.value.startDate&&!c.value.endDate)c.value.startDate=F;else{if(F.isBefore(c.value.startDate)){const S=c.value.startDate;c.value={startDate:F,endDate:S}}else c.value.endDate=F;w()}},I=()=>{var F,S;l.value={startDate:(F=c.value.startDate)==null?void 0:F.format(re),endDate:(S=c.value.endDate)==null?void 0:S.format(re)},i("select-comparison",y.value),setTimeout(()=>{u.value=!1})},V=()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null},u.value=!1},R=(F,S)=>{F==="left"?(h.value=S,m.value=S.add(1,"month")):F==="right"&&(m.value=S,h.value=S.subtract(1,"month"))},E=F=>{var ae,fe;const S=(ae=c.value.startDate)==null?void 0:ae.startOf("day"),x=(fe=c.value.endDate)==null?void 0:fe.startOf("day"),P=v.value,C=S==null?void 0:S.isSame(F),M=x==null?void 0:x.isSame(F),L=P==null?void 0:P.isSame(F),K=C&&x&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isAfter(S))||S&&!x&&L&&(P==null?void 0:P.isBefore(S)),oe=M&&S&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isBefore(S))||S&&!x&&L&&(P==null?void 0:P.isAfter(S)),le=C&&M||C&&!x,Z=S&&(x||P)&&x?F.isAfter(S)&&F.isBefore(x):F.isAfter(P)&&F.isBefore(S)||F.isBefore(P)&&F.isAfter(S);return{status:{isStart:K??!1,isEnd:oe??!1,isBetween:Z??!1,isSelected:le??!1}}},T=F=>{const S=c.value;if(S.startDate&&!S.endDate){v.value=F;return}v.value=null},B=F=>{b.value=F.label;const S=W(F.value.startDate,re),x=W(F.value.endDate,re);c.value={startDate:S,endDate:x},R("left",S.startOf("month"))},H=F=>{u.value=F,F||V()},_=r.computed(()=>!y.value&&!(c.value.startDate&&c.value.endDate));return r.watch(()=>l.value,()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null}}),r.watch(()=>a.compareTarget,()=>{if(!a.compareTarget||y.value===He.Custom)return;const F=o.value.find(x=>x.id===y.value),S=F==null?void 0:F.action();S&&(l.value=S)}),r.onMounted(()=>{w()}),(F,S)=>{const x=r.resolveComponent("fm-label");return r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(l),"onUpdate:modelValue":S[6]||(S[6]=P=>r.isRef(l)?l.value=P:null),disabled:p.value,focused:u.value,"helper-state":F.helperState,"helper-text":F.helperText,rules:F.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:P})=>[r.createVNode(Bo,{disabled:p.value,"exclude-el-from-click-outside":["in-calendar-app"],"show-popover":u.value,"z-index":a.zIndex,onPopoverChanged:H},{"popover-button":r.withCtx(()=>[F.$slots["trigger-button"]?r.renderSlot(F.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:u.value,invalid:P,showValidBorder:F.showValidBorder,disabled:p.value}))):(r.openBlock(),r.createElementBlock("div",G6,[r.createElementVNode("label",Q6,[r.createVNode(x,{disabled:p.value,label:a.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(p.value?"cursor-not-allowed":"cursor-pointer"),disabled:p.value,focused:u.value,"icon-outlined":!u.value,invalid:P,"show-valid-border":F.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(F.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(F.$slots,"append")]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[p.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(l))!=null&&C.startDate?r.unref(W)(r.unref(l).startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),X6,r.createElementVNode("label",q6,[r.createVNode(x,{disabled:p.value,label:a.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(p.value?"cursor-not-allowed":"cursor-pointer"),disabled:p.value,focused:u.value,"icon-outlined":!u.value,invalid:P,"show-valid-border":F.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(F.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(F.$slots,"append")]),default:r.withCtx(()=>{var C;return[r.createElementVNode("div",{class:r.normalizeClass([[p.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((C=r.unref(l))!=null&&C.endDate?r.unref(W)(r.unref(l).endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])]))]),default:r.withCtx(()=>[r.createElementVNode("div",K6,[F.showPredefinedRange||F.compareTarget?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",J6,[F.showPredefinedRange&&!F.compareTarget?(r.openBlock(),r.createElementBlock("div",Y6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.predefinedRange,(C,M)=>(r.openBlock(),r.createBlock(St,{key:M,label:C.label,"model-value":b.value===C.label,class:"min-w-[158px]",selectable:"",onClick:L=>B(C)},null,8,["label","model-value","onClick"]))),128))])):r.createCommentVNode("",!0),F.compareTarget?(r.openBlock(),r.createElementBlock("div",Z6,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(C,M)=>(r.openBlock(),r.createBlock(St,{key:M,label:C.label,"model-value":y.value===C.id,sublabel:C.sublabel,class:"min-w-[158px]",selectable:"",onClick:L=>C.action()},null,8,["label","model-value","sublabel","onClick"]))),128))])):r.createCommentVNode("",!0)]),$6],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pl-4":F.showPredefinedRange||F.compareTarget},"p-12 space-y-4"])},[r.createElementVNode("div",eD,[r.createElementVNode("div",tD,[r.createElementVNode("div",null,[r.createElementVNode("div",nD,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:S[0]||(S[0]=()=>R("left",h.value.subtract(1,"month")))}),r.createElementVNode("div",oD,[r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"month","onUpdate:modelValue":S[1]||(S[1]=C=>R("left",C))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"year","onUpdate:modelValue":S[2]||(S[2]=C=>R("left",C))},null,8,["max","min","model-value"])])]),r.createVNode(Si,{"day-cell-class":E,days:r.unref(xi)(h.value),"on-day-click":C=>A(C.date),onCellMouseOver:T},null,8,["days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",rD,[r.createElementVNode("div",iD,[r.createVNode(Pn,{max:F.max,min:F.min,"model-value":m.value,picker:"month","onUpdate:modelValue":S[3]||(S[3]=C=>R("right",C))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:F.max,min:F.min,"model-value":m.value,picker:"year","onUpdate:modelValue":S[4]||(S[4]=C=>R("right",C))},null,8,["max","min","model-value"])]),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:S[5]||(S[5]=()=>R("left",h.value.add(1,"month")))})]),r.createVNode(Si,{"day-cell-class":C=>E(C),days:r.unref(xi)(m.value),"on-day-click":C=>A(C.date),onCellMouseOver:T},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",aD,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:V},null,8,["label"]),r.createVNode(ke,{disabled:_.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:I},null,8,["disabled","label"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[F.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(F.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),lD={key:0},dD={class:"flex gap-4 items-center relative w-full"},cD={class:"flex flex-col gap-4 w-full"},uD=r.createElementVNode("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),fD={class:"flex flex-col gap-4 w-full"},pD={key:1,class:"flex flex-col gap-4 w-full"},hD=r.defineComponent({__name:"FmSimpleDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{},endLabel:{},compareLabel:{},locale:{}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:U("date.placeholder"),endDate:U("date.placeholder")};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?W(o).format(U("date.format")):U("date.placeholder"),endDate:i?W(i).format(U("date.format")):U("date.placeholder")}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",lD,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",dD,[r.createElementVNode("label",cD,[r.createVNode(hn,{disabled:o.disabled,label:e.startLabel??r.unref(U)("date.startDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.startDate?r.unref(W)(o.modelValue.startDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])]),uD,r.createElementVNode("label",fD,[r.createVNode(hn,{disabled:o.disabled,label:e.endLabel??r.unref(U)("date.endDate")},null,8,["disabled","label"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),disabled:o.disabled,focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var a,s;return[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":(a=o.modelValue)!=null&&a.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((s=o.modelValue)!=null&&s.endDate?r.unref(W)(o.modelValue.endDate).format(r.unref(U)("date.format")):r.unref(U)("date.placeholder")),3)]}),_:3},8,["class","disabled","focused","invalid","show-valid-border"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",pD,[r.createVNode(hn,{label:o.compareLabel??r.unref(U)("date.compare"),locale:o.locale},null,8,["label","locale"]),r.createVNode(at,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!==r.unref(U)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),mD={class:"p-12 space-y-4"},gD={class:"w-max"},bD={class:"flex space-x-24"},yD={class:"flex items-center justify-between py-8"},vD={class:"flex space-x-4"},kD={class:"flex space-x-4"},wD={class:"flex gap-8 items-center justify-end w-full"},S1=r.defineComponent({__name:"FmSimpleDateRangePickerMobile",props:{modelValue:{},compareTarget:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:W().format(re),endDate:W().format(re)}},{label:"Yesterday",value:{startDate:W().subtract(1,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This week",value:{startDate:W().startOf("week").format(re),endDate:W().endOf("week").format(re)}},{label:"Last week",value:{startDate:W().subtract(1,"week").startOf("week").format(re),endDate:W().subtract(1,"week").endOf("week").format(re)}},{label:"Last 7 days",value:{startDate:W().subtract(7,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This month",value:{startDate:W().startOf("month").format(re),endDate:W().endOf("month").format(re)}},{label:"Last month",value:{startDate:W().subtract(1,"month").startOf("month").format(re),endDate:W().subtract(1,"month").endOf("month").format(re)}},{label:"This year",value:{startDate:W().startOf("year").format(re),endDate:W().endOf("year").format(re)}}]},defaultCompareType:{default:He.PrecedingPeriod},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){var j,Q;const n=F=>()=>{var C,M;const{startAt:S,endAt:x}=w1((C=a.compareTarget)==null?void 0:C.startDate,(M=a.compareTarget)==null?void 0:M.endDate);if(!S||!x)return;const P=F({startAt:S,endAt:x});return V(P.endDate.startOf("month")),P},o=r.computed(()=>[{id:He.NoComparison,label:"No Comparison",sublabel:"",action:()=>{c.value={startDate:null,endDate:null},b.value=He.NoComparison}},{id:He.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"week")+1;return c.value={startDate:F.subtract(x,"week"),endDate:S.subtract(x,"week")},b.value=He.PrecedingWeek,c.value})},{id:He.PrecedingMonth,label:"Same period last week",sublabel:"Match day of month",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"month")+1;return c.value={startDate:F.subtract(x,"month"),endDate:S.subtract(x,"month")},b.value=He.PrecedingMonth,c.value})},{id:He.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"day")+1;return c.value={startDate:F.subtract(x,"day"),endDate:S.subtract(x,"day")},b.value=He.PrecedingPeriod,c.value})},{id:He.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:F,endAt:S})=>{const x=S.diff(F,"year")+1;return c.value={startDate:F.subtract(x,"year"),endDate:S.subtract(x,"year")},b.value=He.PrecedingYear,c.value})},{id:He.Custom,label:"Custom",sublabel:"",action:()=>{b.value=He.Custom}}]),i=e,a=t,s=r.inject(Ke,null),l=Pe(a,"modelValue"),c=r.ref({startDate:(j=l.value)!=null&&j.startDate?W(l.value.startDate,re):null,endDate:(Q=l.value)!=null&&Q.endDate?W(l.value.endDate,re):null}),u=r.ref(!1),p=r.computed(()=>a.disabled??(s==null?void 0:s.getDisabled())??!1),h=r.ref(W().startOf("month")),m=r.ref(null),b=r.ref(a.defaultCompareType),y=r.ref(null),v=()=>{a.showPredefinedRange&&a.predefinedRange.map(({value:{startDate:F,endDate:S},label:x})=>{var P,C;((P=c.value.startDate)==null?void 0:P.format(re))===F&&((C=c.value.endDate)==null?void 0:C.format(re))===S&&(m.value={startDate:F,endDate:S})})},w=F=>{if(m.value=null,b.value=He.Custom,c.value.startDate&&c.value.endDate){c.value={startDate:F,endDate:null};return}else if(!c.value.startDate&&!c.value.endDate)c.value.startDate=F;else{if(F.isBefore(c.value.startDate)){const S=c.value.startDate;c.value={startDate:F,endDate:S}}else c.value.endDate=F;v()}},A=()=>{var F,S;l.value={startDate:(F=c.value.startDate)==null?void 0:F.format(re),endDate:(S=c.value.endDate)==null?void 0:S.format(re)},i("select-comparison",b.value),setTimeout(()=>{u.value=!1})},I=()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null},u.value=!1},V=F=>{h.value=F},R=F=>{var ae,fe;const S=(ae=c.value.startDate)==null?void 0:ae.startOf("day"),x=(fe=c.value.endDate)==null?void 0:fe.startOf("day"),P=y.value,C=S==null?void 0:S.isSame(F),M=x==null?void 0:x.isSame(F),L=P==null?void 0:P.isSame(F),K=C&&x&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isAfter(S))||S&&!x&&L&&(P==null?void 0:P.isBefore(S)),oe=M&&S&&!(C&&M)||S&&!x&&C&&(P==null?void 0:P.isBefore(S))||S&&!x&&L&&(P==null?void 0:P.isAfter(S)),le=C&&M||C&&!x,Z=S&&(x||P)&&x?F.isAfter(S)&&F.isBefore(x):F.isAfter(P)&&F.isBefore(S)||F.isBefore(P)&&F.isAfter(S);return{status:{isStart:K??!1,isEnd:oe??!1,isBetween:Z??!1,isSelected:le??!1}}},E=F=>{const S=c.value;if(S.startDate&&!S.endDate){y.value=F;return}y.value=null},T=F=>{const S=W(F.startDate,re),x=W(F.endDate,re);m.value=F,c.value={startDate:S,endDate:x},V(x.startOf("month"))},B=F=>{const S=o.value.find(x=>x.id===F);S==null||S.action()},H=F=>{u.value=F,F||I()},_=r.computed(()=>!b.value&&!(c.value.startDate&&c.value.endDate));return r.watch(()=>l.value,()=>{var F,S;c.value={startDate:(F=l.value)!=null&&F.startDate?W(l.value.startDate,re):null,endDate:(S=l.value)!=null&&S.endDate?W(l.value.endDate,re):null}}),r.watch(()=>a.compareTarget,()=>{if(!a.compareTarget||b.value===He.Custom)return;const F=o.value.find(x=>x.id===b.value),S=F==null?void 0:F.action();S&&(l.value=S)}),r.onMounted(()=>{v()}),(F,S)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(l),"onUpdate:modelValue":S[6]||(S[6]=x=>r.isRef(l)?l.value=x:null),disabled:p.value,focused:u.value,"helper-state":F.helperState,"helper-text":F.helperText,rules:F.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:x})=>[r.createVNode(Bo,{disabled:p.value,"exclude-el-from-click-outside":["exclude-from-click-outside","in-calendar-app"],"show-popover":u.value,"z-index":a.zIndex,onPopoverChanged:H},{"popover-button":r.withCtx(()=>[F.$slots["trigger-button"]?r.renderSlot(F.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:u.value,invalid:x,showValidBorder:F.showValidBorder,disabled:p.value}))):(r.openBlock(),r.createBlock(hD,{key:1,disabled:p.value,focused:u.value,invalid:x,"model-value":r.unref(l),"show-valid-border":F.showValidBorder,"start-label":F.startLabel??r.unref(U)("date.startDate"),"end-label":F.endLabel??r.unref(U)("date.endDate")},r.createSlots({_:2},[F.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(F.$slots,"popover-button",{focused:u.value})]),key:"0"}:void 0]),1032,["disabled","focused","invalid","model-value","show-valid-border","start-label","end-label"]))]),default:r.withCtx(()=>[r.createElementVNode("div",mD,[F.showPredefinedRange&&!F.compareTarget?(r.openBlock(),r.createBlock(yo,{key:0,items:F.predefinedRange,"model-value":m.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":S[0]||(S[0]=P=>T(P))},null,8,["items","model-value"])):r.createCommentVNode("",!0),F.compareTarget?(r.openBlock(),r.createBlock(yo,{key:1,items:o.value.map(P=>({label:P.label,sublabel:P.sublabel,value:P.id})),"model-value":b.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":S[1]||(S[1]=P=>B(P))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createElementVNode("div",gD,[r.createElementVNode("div",bD,[r.createElementVNode("div",null,[r.createElementVNode("div",yD,[r.createElementVNode("div",vD,[r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"month","onUpdate:modelValue":S[2]||(S[2]=P=>V(P))},null,8,["max","min","model-value"]),r.createVNode(Pn,{max:F.max,min:F.min,"model-value":h.value,picker:"year","onUpdate:modelValue":S[3]||(S[3]=P=>V(P))},null,8,["max","min","model-value"])]),r.createElementVNode("div",kD,[r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:S[4]||(S[4]=()=>V(h.value.subtract(1,"month")))}),r.createVNode(ue,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:S[5]||(S[5]=()=>V(h.value.add(1,"month")))})])]),r.createVNode(Si,{"day-cell-class":R,days:r.unref(xi)(h.value),"on-day-click":P=>w(P.date),"cell-size":"lg",onCellMouseOver:E},null,8,["days","on-day-click"])])])]),r.createElementVNode("div",wD,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:I},null,8,["label"]),r.createVNode(ke,{disabled:_.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:A},null,8,["disabled","label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[F.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(F.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),xD=r.defineComponent({__name:"FmSimpleDateRangePicker",props:{modelValue:{},compareTarget:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:W().format(re),endDate:W().format(re)}},{label:"Yesterday",value:{startDate:W().subtract(1,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This week",value:{startDate:W().startOf("week").format(re),endDate:W().endOf("week").format(re)}},{label:"Last week",value:{startDate:W().subtract(1,"week").startOf("week").format(re),endDate:W().subtract(1,"week").endOf("week").format(re)}},{label:"Last 7 days",value:{startDate:W().subtract(7,"day").format(re),endDate:W().subtract(1,"day").format(re)}},{label:"This month",value:{startDate:W().startOf("month").format(re),endDate:W().endOf("month").format(re)}},{label:"Last month",value:{startDate:W().subtract(1,"month").startOf("month").format(re),endDate:W().subtract(1,"month").endOf("month").format(re)}},{label:"This year",value:{startDate:W().startOf("year").format(re),endDate:W().endOf("year").format(re)}}]},defaultCompareType:{},min:{default:()=>W().subtract(50,"year").format(re)},max:{default:()=>W().add(25,"year").format(re)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","select-comparison"],setup(t,{emit:e}){const n=t,{breakpoints:o}=Jo(),i=Pe(n,"modelValue"),a=e,s=Al(n);return(l,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(o).md||r.unref(o).lg?(r.openBlock(),r.createBlock(sD,r.mergeProps({key:0},r.unref(s),{modelValue:r.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>r.isRef(i)?i.value=u:null),onSelectComparison:c[1]||(c[1]=u=>a("select-comparison",u))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(u=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(u)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(o).xs||r.unref(o).sm?(r.openBlock(),r.createBlock(S1,r.mergeProps({key:1},r.unref(s),{modelValue:r.unref(i),"onUpdate:modelValue":c[2]||(c[2]=u=>r.isRef(i)?i.value=u:null),onSelectComparison:c[3]||(c[3]=u=>a("select-comparison",u))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(u=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(u)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),SD={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[0135-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function _u(t,e){var n=Array.prototype.slice.call(e);return n.push(SD),t.apply(this,n)}function Hu(t){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hu(t)}function CD(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function AD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&La(t,e)}function ED(t){var e=A1();return function(){var o=za(t),i;if(e){var a=za(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return BD(this,i)}}function BD(t,e){if(e&&(Hu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C1(t)}function C1(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uu(t){var e=typeof Map=="function"?new Map:void 0;return Uu=function(o){if(o===null||!PD(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Dl(o,arguments,za(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),La(i,o)},Uu(t)}function Dl(t,e,n){return A1()?Dl=Reflect.construct:Dl=function(i,a,s){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(i,l),u=new c;return s&&La(u,s.prototype),u},Dl.apply(null,arguments)}function A1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function PD(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function La(t,e){return La=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},La(t,e)}function za(t){return za=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},za(t)}var Po=function(t){DD(n,t);var e=ED(n);function n(o){var i;return AD(this,n),i=e.call(this,o),Object.setPrototypeOf(C1(i),n.prototype),i.name=i.constructor.name,i}return CD(n)}(Uu(Error)),Wu=2,OD=17,ID=3,Gn="0-90-9٠-٩۰-۹",ND="-‐-―−ー-",VD="//",RD="..",FD="  ­​⁠ ",TD="()()[]\\[\\]",MD="~⁓∼~",El="".concat(ND).concat(VD).concat(RD).concat(FD).concat(TD).concat(MD),ju="++";function D1(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var a=Number(n[i]),s=Number(o[i]);if(a>s)return 1;if(s>a)return-1;if(!isNaN(a)&&isNaN(s))return 1;if(isNaN(a)&&!isNaN(s))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var LD={}.constructor;function Bl(t){return t!=null&&t.constructor===LD}function Gu(t){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gu(t)}function Pl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zD(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Ol(t,e,n){return e&&zD(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var _D="1.2.0",HD="1.7.35",E1=" ext. ",UD=/^\d+$/,Ht=function(){function t(e){Pl(this,t),QD(e),this.metadata=e,O1.call(this,e)}return Ol(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&UD.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new B1(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new B1(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var a=this.countryCallingCodes()[n];if(a&&a.length===1&&a[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),B1=function(){function t(e,n){Pl(this,t),this.globalMetadataObject=n,this.metadata=e,O1.call(this,n.metadata)}return Ol(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new WD(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&P1(this.types(),n))return new GD(P1(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?E1:this.metadata[13]||E1}}]),t}(),WD=function(){function t(e,n){Pl(this,t),this._format=e,this.metadata=n}return Ol(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!jD.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),jD=/^\(?\$1\)?$/,GD=function(){function t(e,n){Pl(this,t),this.type=e,this.metadata=n}return Ol(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function P1(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function QD(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Bl(t)||!Bl(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Bl(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+XD(t)+": "+t,"."))}var XD=function(e){return Gu(e)};function Il(t,e){if(e=new Ht(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function qD(t,e){return e.countries.hasOwnProperty(t)}function O1(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?D1(e,_D)===-1?this.v2=!0:D1(e,HD)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var KD=";ext=",Ci=function(e){return"([".concat(Gn,"]{1,").concat(e,"})")};function I1(t){var e="20",n="15",o="9",i="6",a="[  \\t,]*",s="[:\\..]?[  \\t,-]*",l="#?",c="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",u="(?:[xx##~~]|int|int)",p="[- ]+",h="[  \\t]*",m="(?:,{2}|;)",b=KD+Ci(e),y=a+c+s+Ci(e)+l,v=a+u+s+Ci(o)+l,w=p+Ci(i)+"#",A=h+m+s+Ci(n)+l,I=h+"(?:,)+"+s+Ci(o)+l;return b+"|"+y+"|"+v+"|"+w+"|"+A+"|"+I}var JD="["+Gn+"]{"+Wu+"}",YD="["+ju+"]{0,1}(?:["+El+"]*["+Gn+"]){3,}["+El+Gn+"]*",ZD=new RegExp("^["+ju+"]{0,1}(?:["+El+"]*["+Gn+"]){1,2}$","i"),$D=YD+"(?:"+I1()+")?",e7=new RegExp("^"+JD+"$|^"+$D+"$","i");function t7(t){return t.length>=Wu&&e7.test(t)}function n7(t){return ZD.test(t)}var N1=new RegExp("(?:"+I1()+")$","i");function o7(t){var e=t.search(N1);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(N1),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var r7={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function i7(t){return r7[t]}function a7(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=s7(t))||e){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
39
39
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s7(t,e){if(t){if(typeof t=="string")return V1(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V1(t,e)}}function V1(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function R1(t){for(var e="",n=a7(t.split("")),o;!(o=n()).done;){var i=o.value;e+=l7(i,e)||""}return e}function l7(t,e,n){return t==="+"?e?void 0:"+":i7(t)}function Qu(t,e){return d7(t,void 0,e)}function d7(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";var a=t.length,s=i[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":i[i.length-1]<a?"TOO_LONG":i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function c7(t,e,n){if(e===void 0&&(e={}),n=new Ht(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return F1(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function F1(t,e){switch(Qu(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function Oo(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function u7(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=f7(t))||e){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
40
40
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f7(t,e){if(t){if(typeof t=="string")return T1(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T1(t,e)}}function T1(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var p7=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Xu(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new Ht(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(Oo(o,n.nationalNumberPattern())){if(qu(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||qu(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=u7(p7),a;!(a=i()).done;){var s=a.value;if(qu(o,s,n))return s}}}}function qu(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:Oo(t,e.pattern())}function h7(t,e,n){if(e=e||{},n=new Ht(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return Xu(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return Oo(o,n.nationalNumberPattern())}function m7(t,e,n){var o=new Ht(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(a){return g7(e,a,n)}):[]}function g7(t,e,n){var o=new Ht(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function b7(t){return t.replace(new RegExp("[".concat(El,"]+"),"g")," ").trim()}var y7=/(\$\d)/;function v7(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix,a=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(y7,e.nationalPrefixFormattingRule()):e.format());return o?b7(a):a}var k7=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function w7(t,e,n){var o=new Ht(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(k7.test(o.IDDPrefix()))return o.IDDPrefix()}function x7(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function S7(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=C7(t))||e){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
41
41
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C7(t,e){if(t){if(typeof t=="string")return M1(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M1(t,e)}}function M1(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function L1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function z1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L1(Object(n),!0).forEach(function(o){A7(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L1(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function A7(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _1={formatExtension:function(e,n,o){return"".concat(e).concat(o.ext()).concat(n)}};function D7(t,e,n,o){if(n?n=z1(z1({},_1),n):n=_1,o=new Ht(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var i=o.countryCallingCode(),a=n.v2?t.nationalNumber:t.phone,s;switch(e){case"NATIONAL":return a?(s=Nl(a,t.carrierCode,"NATIONAL",o,n),Ku(s,t.ext,o,n.formatExtension)):"";case"INTERNATIONAL":return a?(s=Nl(a,null,"INTERNATIONAL",o,n),s="+".concat(i," ").concat(s),Ku(s,t.ext,o,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(a);case"RFC3966":return x7({number:"+".concat(i).concat(a),ext:t.ext});case"IDD":if(!n.fromCountry)return;var l=B7(a,t.carrierCode,i,n.fromCountry,o);return Ku(l,t.ext,o,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function Nl(t,e,n,o,i){var a=E7(o.formats(),t);return a?v7(t,a,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function E7(t,e){for(var n=S7(t),o;!(o=n()).done;){var i=o.value;if(i.leadingDigitsPatterns().length>0){var a=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(e.search(a)!==0)continue}if(Oo(e,i.pattern()))return i}}function Ku(t,e,n,o){return e?o(t,e,n):t}function B7(t,e,n,o,i){var a=Il(o,i.metadata);if(a===n){var s=Nl(t,e,"NATIONAL",i);return n==="1"?n+" "+s:s}var l=w7(o,void 0,i.metadata);if(l)return"".concat(l," ").concat(n," ").concat(Nl(t,null,"INTERNATIONAL",i))}function H1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function U1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?H1(Object(n),!0).forEach(function(o){P7(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H1(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function P7(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I7(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function N7(t,e,n){return e&&I7(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var V7=function(){function t(e,n,o){if(O7(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var i=F7(e,o),a=i.country,s=i.countryCallingCode;this.country=a,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return N7(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:m7(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return c7(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return h7(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new Ht(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Xu(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,o){return D7(this,n,o?U1(U1({},o),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),R7=function(e){return/^[A-Z]{2}$/.test(e)};function F7(t,e){var n,o,i=new Ht(e);return R7(t)?(n=t,i.selectNumberingPlan(n),o=i.countryCallingCode()):o=t,{country:n,countryCallingCode:o}}var T7=new RegExp("(["+Gn+"])");function M7(t,e,n,o){if(e){var i=new Ht(o);i.selectNumberingPlan(e,n);var a=new RegExp(i.IDDPrefix());if(t.search(a)===0){t=t.slice(t.match(a)[0].length);var s=t.match(T7);if(!(s&&s[1]!=null&&s[1].length>0&&s[1]==="0"))return t}}}function L7(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){var i,a,s=o.length-1,l=s>0&&o[s];if(e.nationalPrefixTransformRule()&&l)i=t.replace(n,e.nationalPrefixTransformRule()),s>1&&(a=o[1]);else{var c=o[0];i=t.slice(c.length),l&&(a=o[1])}var u;if(l){var p=t.indexOf(o[1]),h=t.slice(0,p);h===e.numberingPlan.nationalPrefix()&&(u=e.numberingPlan.nationalPrefix())}else u=o[0];return{nationalNumber:i,nationalPrefix:u,carrierCode:a}}}return{nationalNumber:t}}function Ju(t,e){var n=L7(t,e),o=n.carrierCode,i=n.nationalNumber;if(i!==t){if(!z7(t,i,e))return{nationalNumber:t};if(e.possibleLengths()&&!_7(i,e))return{nationalNumber:t}}return{nationalNumber:i,carrierCode:o}}function z7(t,e,n){return!(Oo(t,n.nationalNumberPattern())&&!Oo(e,n.nationalNumberPattern()))}function _7(t,e){switch(Qu(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function H7(t,e,n,o){var i=e?Il(e,o):n;if(t.indexOf(i)===0){o=new Ht(o),o.selectNumberingPlan(e,n);var a=t.slice(i.length),s=Ju(a,o),l=s.nationalNumber,c=Ju(t,o),u=c.nationalNumber;if(!Oo(u,o.nationalNumberPattern())&&Oo(l,o.nationalNumberPattern())||Qu(u,o)==="TOO_LONG")return{countryCallingCode:i,number:a}}return{number:t}}function U7(t,e,n,o){if(!t)return{};var i;if(t[0]!=="+"){var a=M7(t,e,n,o);if(a&&a!==t)i=!0,t="+"+a;else{if(e||n){var s=H7(t,e,n,o),l=s.countryCallingCode,c=s.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}return{number:t}}}if(t[1]==="0")return{};o=new Ht(o);for(var u=2;u-1<=ID&&u<=t.length;){var p=t.slice(1,u);if(o.hasCallingCode(p))return o.selectNumberingPlan(p),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:p,number:t.slice(u)};u++}return{}}function W7(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=j7(t))||e){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
@@ -111,7 +111,7 @@ __p += '`),Me&&(te+=`' +
111
111
  function print() { __p += __j.call(arguments, '') }
112
112
  `:`;
113
113
  `)+te+`return __p
114
- }`;var Oe=Zv(function(){return Ue(N,pe+"return "+te).apply(n,z)});if(Oe.source=te,th(Oe))throw Oe;return Oe}function gG(d){return je(d).toLowerCase()}function bG(d){return je(d).toUpperCase()}function yG(d,f,g){if(d=je(d),d&&(g||f===n))return s2(d);if(!d||!(f=Sn(f)))return d;var k=Jn(d),D=Jn(f),N=l2(k,D),z=d2(k,D)+1;return br(k,N,z).join("")}function vG(d,f,g){if(d=je(d),d&&(g||f===n))return d.slice(0,u2(d)+1);if(!d||!(f=Sn(f)))return d;var k=Jn(d),D=d2(k,Jn(f))+1;return br(k,0,D).join("")}function kG(d,f,g){if(d=je(d),d&&(g||f===n))return d.replace(tp,"");if(!d||!(f=Sn(f)))return d;var k=Jn(d),D=l2(k,Jn(f));return br(k,D).join("")}function wG(d,f){var g=j,k=Q;if(ct(f)){var D="separator"in f?f.separator:D;g="length"in f?Ee(f.length):g,k="omission"in f?Sn(f.omission):k}d=je(d);var N=d.length;if(Ti(d)){var z=Jn(d);N=z.length}if(g>=N)return d;var G=g-Mi(k);if(G<1)return k;var q=z?br(z,0,G).join(""):d.slice(0,G);if(D===n)return q+k;if(z&&(G+=q.length-G),nh(D)){if(d.slice(G).search(D)){var $,ee=q;for(D.global||(D=yp(D.source,je(Py.exec(D))+"g")),D.lastIndex=0;$=D.exec(ee);)var te=$.index;q=q.slice(0,te===n?G:te)}}else if(d.indexOf(Sn(D),G)!=G){var de=q.lastIndexOf(D);de>-1&&(q=q.slice(0,de))}return q+k}function xG(d){return d=je(d),d&&VL.test(d)?d.replace(Dy,Yz):d}var SG=ji(function(d,f,g){return d+(g?" ":"")+f.toUpperCase()}),ih=$2("toUpperCase");function Yv(d,f,g){return d=je(d),f=g?n:f,f===n?Qz(d)?e_(d):Mz(d):d.match(f)||[]}var Zv=Ne(function(d,f){try{return wn(d,n,f)}catch(g){return th(g)?g:new Se(g)}}),CG=Mo(function(d,f){return Nn(f,function(g){g=po(g),Fo(d,g,$p(d[g],d))}),d});function AG(d){var f=d==null?0:d.length,g=be();return d=f?lt(d,function(k){if(typeof k[1]!="function")throw new Vn(s);return[g(k[0]),k[1]]}):[],Ne(function(k){for(var D=-1;++D<f;){var N=d[D];if(wn(N[0],this,k))return wn(N[1],this,k)}})}function DG(d){return Y_(Fn(d,h))}function ah(d){return function(){return d}}function EG(d,f){return d==null||d!==d?f:d}var BG=tv(),PG=tv(!0);function ln(d){return d}function sh(d){return I2(typeof d=="function"?d:Fn(d,h))}function OG(d){return V2(Fn(d,h))}function IG(d,f){return R2(d,Fn(f,h))}var NG=Ne(function(d,f){return function(g){return as(g,d,f)}}),VG=Ne(function(d,f){return function(g){return as(d,g,f)}});function lh(d,f,g){var k=Ot(f),D=Pd(f,k);g==null&&!(ct(f)&&(D.length||!k.length))&&(g=f,f=d,d=this,D=Pd(f,Ot(f)));var N=!(ct(g)&&"chain"in g)||!!g.chain,z=zo(d);return Nn(D,function(G){var q=f[G];d[G]=q,z&&(d.prototype[G]=function(){var $=this.__chain__;if(N||$){var ee=d(this.__wrapped__),te=ee.__actions__=rn(this.__actions__);return te.push({func:q,args:arguments,thisArg:d}),ee.__chain__=$,ee}return q.apply(d,ur([this.value()],arguments))})}),d}function RG(){return Tt._===this&&(Tt._=a_),this}function dh(){}function FG(d){return d=Ee(d),Ne(function(f){return F2(f,d)})}var TG=_p(lt),MG=_p(n2),LG=_p(up);function $v(d){return Xp(d)?fp(po(d)):hH(d)}function zG(d){return function(f){return d==null?n:Qr(d,f)}}var _G=ov(),HG=ov(!0);function ch(){return[]}function uh(){return!1}function UG(){return{}}function WG(){return""}function jG(){return!0}function GG(d,f){if(d=Ee(d),d<1||d>L)return[];var g=le,k=Wt(d,le);f=be(f),d-=le;for(var D=mp(k,f);++g<d;)f(g);return D}function QG(d){return Ae(d)?lt(d,po):Cn(d)?[d]:rn(vv(je(d)))}function XG(d){var f=++r_;return je(d)+f}var qG=Fd(function(d,f){return d+f},0),KG=Hp("ceil"),JG=Fd(function(d,f){return d/f},1),YG=Hp("floor");function ZG(d){return d&&d.length?Bd(d,ln,Dp):n}function $G(d,f){return d&&d.length?Bd(d,be(f,2),Dp):n}function eQ(d){return i2(d,ln)}function tQ(d,f){return i2(d,be(f,2))}function nQ(d){return d&&d.length?Bd(d,ln,Op):n}function oQ(d,f){return d&&d.length?Bd(d,be(f,2),Op):n}var rQ=Fd(function(d,f){return d*f},1),iQ=Hp("round"),aQ=Fd(function(d,f){return d-f},0);function sQ(d){return d&&d.length?hp(d,ln):0}function lQ(d,f){return d&&d.length?hp(d,be(f,2)):0}return O.after=OW,O.ary=Ov,O.assign=bj,O.assignIn=jv,O.assignInWith=qd,O.assignWith=yj,O.at=vj,O.before=Iv,O.bind=$p,O.bindAll=CG,O.bindKey=Nv,O.castArray=UW,O.chain=Ev,O.chunk=YH,O.compact=ZH,O.concat=$H,O.cond=AG,O.conforms=DG,O.constant=ah,O.countBy=sW,O.create=kj,O.curry=Vv,O.curryRight=Rv,O.debounce=Fv,O.defaults=wj,O.defaultsDeep=xj,O.defer=IW,O.delay=NW,O.difference=eU,O.differenceBy=tU,O.differenceWith=nU,O.drop=oU,O.dropRight=rU,O.dropRightWhile=iU,O.dropWhile=aU,O.fill=sU,O.filter=dW,O.flatMap=fW,O.flatMapDeep=pW,O.flatMapDepth=hW,O.flatten=Sv,O.flattenDeep=lU,O.flattenDepth=dU,O.flip=VW,O.flow=BG,O.flowRight=PG,O.fromPairs=cU,O.functions=Pj,O.functionsIn=Oj,O.groupBy=mW,O.initial=fU,O.intersection=pU,O.intersectionBy=hU,O.intersectionWith=mU,O.invert=Nj,O.invertBy=Vj,O.invokeMap=bW,O.iteratee=sh,O.keyBy=yW,O.keys=Ot,O.keysIn=sn,O.map=Ud,O.mapKeys=Fj,O.mapValues=Tj,O.matches=OG,O.matchesProperty=IG,O.memoize=jd,O.merge=Mj,O.mergeWith=Gv,O.method=NG,O.methodOf=VG,O.mixin=lh,O.negate=Gd,O.nthArg=FG,O.omit=Lj,O.omitBy=zj,O.once=RW,O.orderBy=vW,O.over=TG,O.overArgs=FW,O.overEvery=MG,O.overSome=LG,O.partial=eh,O.partialRight=Tv,O.partition=kW,O.pick=_j,O.pickBy=Qv,O.property=$v,O.propertyOf=zG,O.pull=vU,O.pullAll=Av,O.pullAllBy=kU,O.pullAllWith=wU,O.pullAt=xU,O.range=_G,O.rangeRight=HG,O.rearg=TW,O.reject=SW,O.remove=SU,O.rest=MW,O.reverse=Yp,O.sampleSize=AW,O.set=Uj,O.setWith=Wj,O.shuffle=DW,O.slice=CU,O.sortBy=PW,O.sortedUniq=IU,O.sortedUniqBy=NU,O.split=fG,O.spread=LW,O.tail=VU,O.take=RU,O.takeRight=FU,O.takeRightWhile=TU,O.takeWhile=MU,O.tap=ZU,O.throttle=zW,O.thru=Hd,O.toArray=Hv,O.toPairs=Xv,O.toPairsIn=qv,O.toPath=QG,O.toPlainObject=Wv,O.transform=jj,O.unary=_W,O.union=LU,O.unionBy=zU,O.unionWith=_U,O.uniq=HU,O.uniqBy=UU,O.uniqWith=WU,O.unset=Gj,O.unzip=Zp,O.unzipWith=Dv,O.update=Qj,O.updateWith=Xj,O.values=Xi,O.valuesIn=qj,O.without=jU,O.words=Yv,O.wrap=HW,O.xor=GU,O.xorBy=QU,O.xorWith=XU,O.zip=qU,O.zipObject=KU,O.zipObjectDeep=JU,O.zipWith=YU,O.entries=Xv,O.entriesIn=qv,O.extend=jv,O.extendWith=qd,lh(O,O),O.add=qG,O.attempt=Zv,O.camelCase=Zj,O.capitalize=Kv,O.ceil=KG,O.clamp=Kj,O.clone=WW,O.cloneDeep=GW,O.cloneDeepWith=QW,O.cloneWith=jW,O.conformsTo=XW,O.deburr=Jv,O.defaultTo=EG,O.divide=JG,O.endsWith=$j,O.eq=Zn,O.escape=eG,O.escapeRegExp=tG,O.every=lW,O.find=cW,O.findIndex=wv,O.findKey=Sj,O.findLast=uW,O.findLastIndex=xv,O.findLastKey=Cj,O.floor=YG,O.forEach=Bv,O.forEachRight=Pv,O.forIn=Aj,O.forInRight=Dj,O.forOwn=Ej,O.forOwnRight=Bj,O.get=oh,O.gt=qW,O.gte=KW,O.has=Ij,O.hasIn=rh,O.head=Cv,O.identity=ln,O.includes=gW,O.indexOf=uU,O.inRange=Jj,O.invoke=Rj,O.isArguments=Kr,O.isArray=Ae,O.isArrayBuffer=JW,O.isArrayLike=an,O.isArrayLikeObject=yt,O.isBoolean=YW,O.isBuffer=yr,O.isDate=ZW,O.isElement=$W,O.isEmpty=ej,O.isEqual=tj,O.isEqualWith=nj,O.isError=th,O.isFinite=oj,O.isFunction=zo,O.isInteger=Mv,O.isLength=Qd,O.isMap=Lv,O.isMatch=rj,O.isMatchWith=ij,O.isNaN=aj,O.isNative=sj,O.isNil=dj,O.isNull=lj,O.isNumber=zv,O.isObject=ct,O.isObjectLike=mt,O.isPlainObject=fs,O.isRegExp=nh,O.isSafeInteger=cj,O.isSet=_v,O.isString=Xd,O.isSymbol=Cn,O.isTypedArray=Qi,O.isUndefined=uj,O.isWeakMap=fj,O.isWeakSet=pj,O.join=gU,O.kebabCase=nG,O.last=Mn,O.lastIndexOf=bU,O.lowerCase=oG,O.lowerFirst=rG,O.lt=hj,O.lte=mj,O.max=ZG,O.maxBy=$G,O.mean=eQ,O.meanBy=tQ,O.min=nQ,O.minBy=oQ,O.stubArray=ch,O.stubFalse=uh,O.stubObject=UG,O.stubString=WG,O.stubTrue=jG,O.multiply=rQ,O.nth=yU,O.noConflict=RG,O.noop=dh,O.now=Wd,O.pad=iG,O.padEnd=aG,O.padStart=sG,O.parseInt=lG,O.random=Yj,O.reduce=wW,O.reduceRight=xW,O.repeat=dG,O.replace=cG,O.result=Hj,O.round=iQ,O.runInContext=X,O.sample=CW,O.size=EW,O.snakeCase=uG,O.some=BW,O.sortedIndex=AU,O.sortedIndexBy=DU,O.sortedIndexOf=EU,O.sortedLastIndex=BU,O.sortedLastIndexBy=PU,O.sortedLastIndexOf=OU,O.startCase=pG,O.startsWith=hG,O.subtract=aQ,O.sum=sQ,O.sumBy=lQ,O.template=mG,O.times=GG,O.toFinite=_o,O.toInteger=Ee,O.toLength=Uv,O.toLower=gG,O.toNumber=Ln,O.toSafeInteger=gj,O.toString=je,O.toUpper=bG,O.trim=yG,O.trimEnd=vG,O.trimStart=kG,O.truncate=wG,O.unescape=xG,O.uniqueId=XG,O.upperCase=SG,O.upperFirst=ih,O.each=Bv,O.eachRight=Pv,O.first=Cv,lh(O,function(){var d={};return uo(O,function(f,g){Ge.call(O.prototype,g)||(d[g]=f)}),d}(),{chain:!1}),O.VERSION=o,Nn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){O[d].placeholder=O}),Nn(["drop","take"],function(d,f){Te.prototype[d]=function(g){g=g===n?1:Et(Ee(g),0);var k=this.__filtered__&&!f?new Te(this):this.clone();return k.__filtered__?k.__takeCount__=Wt(g,k.__takeCount__):k.__views__.push({size:Wt(g,le),type:d+(k.__dir__<0?"Right":"")}),k},Te.prototype[d+"Right"]=function(g){return this.reverse()[d](g).reverse()}}),Nn(["filter","map","takeWhile"],function(d,f){var g=f+1,k=g==x||g==C;Te.prototype[d]=function(D){var N=this.clone();return N.__iteratees__.push({iteratee:be(D,3),type:g}),N.__filtered__=N.__filtered__||k,N}}),Nn(["head","last"],function(d,f){var g="take"+(f?"Right":"");Te.prototype[d]=function(){return this[g](1).value()[0]}}),Nn(["initial","tail"],function(d,f){var g="drop"+(f?"":"Right");Te.prototype[d]=function(){return this.__filtered__?new Te(this):this[g](1)}}),Te.prototype.compact=function(){return this.filter(ln)},Te.prototype.find=function(d){return this.filter(d).head()},Te.prototype.findLast=function(d){return this.reverse().find(d)},Te.prototype.invokeMap=Ne(function(d,f){return typeof d=="function"?new Te(this):this.map(function(g){return as(g,d,f)})}),Te.prototype.reject=function(d){return this.filter(Gd(be(d)))},Te.prototype.slice=function(d,f){d=Ee(d);var g=this;return g.__filtered__&&(d>0||f<0)?new Te(g):(d<0?g=g.takeRight(-d):d&&(g=g.drop(d)),f!==n&&(f=Ee(f),g=f<0?g.dropRight(-f):g.take(f-d)),g)},Te.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},Te.prototype.toArray=function(){return this.take(le)},uo(Te.prototype,function(d,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),k=/^(?:head|last)$/.test(f),D=O[k?"take"+(f=="last"?"Right":""):f],N=k||/^find/.test(f);D&&(O.prototype[f]=function(){var z=this.__wrapped__,G=k?[1]:arguments,q=z instanceof Te,$=G[0],ee=q||Ae(z),te=function(Fe){var Me=D.apply(O,ur([Fe],G));return k&&de?Me[0]:Me};ee&&g&&typeof $=="function"&&$.length!=1&&(q=ee=!1);var de=this.__chain__,pe=!!this.__actions__.length,ye=N&&!de,Oe=q&&!pe;if(!N&&ee){z=Oe?z:new Te(this);var ve=d.apply(z,G);return ve.__actions__.push({func:Hd,args:[te],thisArg:n}),new Rn(ve,de)}return ye&&Oe?d.apply(this,G):(ve=this.thru(te),ye?k?ve.value()[0]:ve.value():ve)})}),Nn(["pop","push","shift","sort","splice","unshift"],function(d){var f=pd[d],g=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",k=/^(?:pop|shift)$/.test(d);O.prototype[d]=function(){var D=arguments;if(k&&!this.__chain__){var N=this.value();return f.apply(Ae(N)?N:[],D)}return this[g](function(z){return f.apply(Ae(z)?z:[],D)})}}),uo(Te.prototype,function(d,f){var g=O[f];if(g){var k=g.name+"";Ge.call(Hi,k)||(Hi[k]=[]),Hi[k].push({name:f,func:g})}}),Hi[Rd(n,A).name]=[{name:"wrapper",func:n}],Te.prototype.clone=x_,Te.prototype.reverse=S_,Te.prototype.value=C_,O.prototype.at=$U,O.prototype.chain=eW,O.prototype.commit=tW,O.prototype.next=nW,O.prototype.plant=rW,O.prototype.reverse=iW,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=aW,O.prototype.first=O.prototype.head,$a&&(O.prototype[$a]=oW),O},Li=t_();Hr?((Hr.exports=Li)._=Li,sp._=Li):Tt._=Li}).call(mn)}(Rl,Rl.exports);var ef=Rl.exports;const zE={class:"flex gap-8 items-center"},_E=["type","onInput","onKeydown"],HE=Be(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean},masked:{type:Boolean,default:!1}},emits:["update:modelValue","complete","focus"],setup(t,{emit:e}){const n=e,o=t,i=Pe(o,"modelValue"),a=r.ref([]),s=(m,b)=>{const y=m.target;if(o.type==="number"&&!/^[0-9]$/g.test(y.value)){y.value="";return}y.value=y.value.slice(-1),u(y.value,b),a.value[b+1]?a.value[b+1].focus():a.value[b].blur()},l=(m,b)=>{m.preventDefault();const y=m.target;y.value="",u(null,b),a.value[b-1]?a.value[b-1].focus():a.value[b].focus()},c=(m,b)=>{m.preventDefault(),m.key==="ArrowLeft"&&(a.value[b-1]?a.value[b-1].focus():a.value[b].focus()),m.key==="ArrowRight"&&(a.value[b+1]?a.value[b+1].focus():a.value[b].focus())},u=(m,b)=>{i.value=i.value.toSpliced(b,1,m)},p=(m,b)=>{a.value[b]=m};r.onMounted(()=>{const m=Array.from(Array(o.length).fill(null));Array.isArray(i.value)&&i.value.forEach((b,y)=>{b!==null&&y<m.length&&(m[y]=b)}),i.value=m});const h=r.computed(()=>ef.isArray(i.value)?i.value.map(m=>m===null?" ":m).join(""):new Array(o.length).fill(" ").join(""));return r.watch([()=>{var m;return(m=a.value)==null?void 0:m.length},h],()=>{var m,b;((m=a.value)==null?void 0:m.length)>0&&((b=i.value)==null||b.forEach((y,v)=>{v<o.length&&(a.value[v].value=y??"")}))},{immediate:!0,flush:"post"}),r.watch(()=>i.value,()=>{i.value.every(m=>m!==null)&&n("complete",i.value.join(""))}),(m,b)=>(r.openBlock(),r.createElementBlock("div",zE,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.length,(y,v)=>(r.openBlock(),r.createElementBlock("input",{key:y,ref_for:!0,ref:w=>p(w,v),class:r.normalizeClass(["fm-pin-field",{[m.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[v]!==null}]),inputmode:"numeric",type:m.masked?"password":"text",onFocus:b[0]||(b[0]=w=>n("focus")),onInput:w=>s(w,v),onKeydown:[r.withKeys(w=>l(w,v),["backspace"]),r.withKeys(w=>c(w,v),["arrow-left","arrow-right"])]},null,42,_E))),128))]))}}),[["__scopeId","data-v-aec3f93d"]]),UE={class:"fm-radio-btn"},WE={class:"relative flex items-center justify-center w-6 h-6"},jE={class:"fm-radio-btn__input--container"},GE=["checked","disabled","value"],QE={class:"fm-typo-en-body-lg-400"},XE={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},qE=Be(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=Pe(e,"modelValue"),o=r.ref(),i=r.inject(Jh,null),a=r.inject(Ke,null),s=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(a==null?void 0:a.getDisabled())??!1),c=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(u,p)=>{const h=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",UE,[r.createElementVNode("label",{class:r.normalizeClass([{"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value},"space-x-8",u.sublabel?"items-start":"items-center"]),onClick:s},[r.createElementVNode("div",WE,[r.withDirectives((r.openBlock(),r.createElementBlock("div",jE,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:c.value,disabled:l.value,value:u.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,GE)])),[[h,!l.value]])]),r.createElementVNode("div",{class:r.normalizeClass([u.sublabel?"py-0":"py-0.5","space-y-4","flex-1","min-w-0"])},[r.renderSlot(u.$slots,"label",{},()=>[r.createElementVNode("div",QE,r.toDisplayString(u.label),1),u.sublabel?(r.openBlock(),r.createElementBlock("div",XE,r.toDisplayString(u.sublabel),1)):r.createCommentVNode("",!0)],!0)],2)],2)])}}}),[["__scopeId","data-v-9d8dbc91"]]),KE=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!ef.isNil(t)||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Pe(e,"modelValue"),o=r.inject(Ke,null);r.provide(Jh,{groupValue:n,getDisabled:()=>i.value,updateValue(a){n.value=a}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(a,s)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.value,"helper-state":a.helperState,"helper-text":a.helperText,info:a.labelInfo,label:a.label,optional:a.labelMark==="optional",required:a.labelMark==="required",rules:a.rules},r.createSlots({default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":a.inline,"flex flex-col gap-8":!a.inline})},[r.renderSlot(a.$slots,"default")],2)]),_:2},[a.label||a.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"label")]),key:"0"}:void 0,a.helperText||a.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),tf=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},autofocus:{type:Boolean,default:!1},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>{const{modelValue:m,disabled:b,...y}=e;return y}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),a=Pe(e,"modelValue"),s=r.ref(!1),l=r.ref(),c=r.ref(e.collapsible),u=r.ref(e.collapsible);function p(){c.value=!1,r.nextTick(()=>{var m,b,y,v;(v=(y=(b=(m=l.value)==null?void 0:m.querySelector)==null?void 0:b.call(m,"input"))==null?void 0:y.focus)==null||v.call(y)})}function h(m){if(s.value=m,!!e.collapsible){if(m){u.value=!1;return}c.value=a.value.length===0,c.value&&setTimeout(()=>{u.value=!0},250)}}return(m,b)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createElementVNode("div",{class:r.normalizeClass(["transition-all",{"opacity-100":!m.collapsible||!c.value,"opacity-0 pointer-events-none":m.collapsible&&c.value},m.collapsible&&c.value?"w-9 h-9":"w-full"])},[r.createVNode(Er,r.mergeProps({modelValue:r.unref(a),"onUpdate:modelValue":b[1]||(b[1]=y=>r.isRef(a)?a.value=y:null),disabled:i.value||m.collapsible&&c.value},o.value,{autofocus:e.autofocus,onFocusChanged:h}),r.createSlots({_:2},[!m.collapsible||!s.value?{name:"prepend",fn:r.withCtx(()=>[r.createVNode(ue,{name:"search"})]),key:"0"}:void 0,r.unref(a).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(ue,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:b[0]||(b[0]=y=>a.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","autofocus"])],2),m.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute bottom-0 right-0",c.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:c.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(ke,{icon:"search",variant:"tertiary",onClick:p})],6)):r.createCommentVNode("",!0)],512))}}),JE={key:0,class:"flex fm-typo-en-title-sm-600 items-center justify-between text-fm-color-typo-primary"},YE={key:0},ZE={class:"h-full overflow-y-auto"},$E={key:1,class:"flex gap-8 items-center"},tb=Be(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0},zIndex:{default:void 0},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway"],setup(t){const e=t,n=Pe(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=a=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,transparent:e.noOverlay,onClose:i[1]||(i[1]=a=>n.value=!1),onClickedAway:i[2]||(i[2]=a=>o.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`,e.noOverlay&&"shadow-md"])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",JE,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",YE,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",ZE,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",$E,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-6e83c161"]]);var nf={exports:{}};function nb(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,a,s,l,c;function u(){const m=i,b=a;return i=void 0,a=void 0,c=t.apply(m,b),c}function p(){const m=Date.now()-l;m<e&&m>=0?s=setTimeout(p,e-m):(s=void 0,o||(c=u()))}const h=function(...m){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,a=m,l=Date.now();const b=o&&!s;return s||(s=setTimeout(p,e)),b&&(c=u()),c};return h.clear=()=>{s&&(clearTimeout(s),s=void 0)},h.flush=()=>{s&&h.trigger()},h.trigger=()=>{c=u(),h.clear()},h}nf.exports.debounce=nb,nf.exports=nb;var eB=nf.exports;const of=Ls(eB);var ob={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(a){return n.test(o,a)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,a){a=a||{};var s=0,l=[],c=i.length,u=0,p=0,h=a.pre||"",m=a.post||"",b=a.caseSensitive&&i||i.toLowerCase(),y;o=a.caseSensitive&&o||o.toLowerCase();for(var v=0;v<c;v++)y=i[v],b[v]===o[s]?(y=h+y+m,s+=1,p+=1+p):p=0,u+=p,l[l.length]=y;return s===o.length?(u=b===o?1/0:u,{rendered:l.join(""),score:u}):null},n.filter=function(o,i,a){return!i||i.length===0?[]:typeof o!="string"?i:(a=a||{},i.reduce(function(s,l,c,u){var p=l;a.extract&&(p=a.extract(l));var h=n.match(o,p,a);return h!=null&&(s[s.length]={string:h.rendered,score:h.score,index:c,original:l}),s},[]).sort(function(s,l){var c=l.score-s.score;return c||s.index-l.index}))}})()})(ob);var tB=ob.exports;const nB=Ls(tB);function Fl(t,e){const[n]=nB.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,a,s)=>(i.push({segment:a,isMatch:s%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const oB={class:"flex flex-col gap-4"},rB={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},iB={class:"hidden sm:inline xs:inline"},aB={key:0},sB={key:0,class:"flex flex-col"},lB={class:"flex flex-col"},dB={class:"flex items-center px-24 py-12"},cB={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},uB=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),fB=["onClick"],pB={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},hB={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},mB={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},gB={key:3,class:"flex flex-col"},bB=["onClick"],yB={class:"flex flex-col gap-4"},vB={key:0,class:"text-fm-color-typo-secondary"},kB={class:"px-16 py-4"},wB=5,xB=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const _=n.recentSearchKey;localStorage.removeItem(_),l.value=[]}function a(){if(!n.recentSearchKey)return;const _=n.recentSearchKey,j=localStorage.getItem(_);if(!j)return[];try{return JSON.parse(j)}catch{return new Array}}const s=of(function(j){if(!n.recentSearchKey)return;const Q=n.recentSearchKey,F=j().trim();if(!Q||!F)return;const S=a()??[],x=[...new Set([F,...S])].slice(0,wB),P=JSON.stringify(x);return localStorage.setItem(Q,P),l.value=x,x},800),l=r.ref(a()),c=Pe(n,"show");r.watch([()=>n.show],()=>{n.show?(h.value=null,n.suggestions&&I()):o("dismiss")});const u=Pe(n,"modelValue"),p=r.ref(n.modelValue);r.watch([()=>p.value],()=>{R()});const h=r.ref(null),m=r.ref(!0),b=r.computed(()=>{var _;return m.value?(_=h.value)==null?void 0:_.slice(0,5):h.value});r.watch([()=>h.value],([])=>{m.value=!0});const y=r.computed(()=>h.value===null),v=r.ref(!1),w=r.ref(""),A=()=>p.value;async function I(){if(!c.value)return;const _=A();if(!_)return;const j=Math.random().toString();if(w.value=j,n.suggestions){h.value=n.suggestions.map(Q=>({label:Fl(_,Q.label),sublabel:Q.sublabel?Fl(_,Q.sublabel):null})).filter(Q=>{var F;return Q.label.matched||((F=Q.sublabel)==null?void 0:F.matched)}),s(A);return}if(n.onSearch)try{v.value=!0;const Q=await n.onSearch(_);j===w.value&&(h.value=Q.map(F=>({label:Fl(_,F.label),sublabel:F.sublabel?Fl(_,F.sublabel):null})))}catch{j===w.value&&(h.value=[])}finally{j===w.value&&(v.value=!1,s(A))}}function V(_){c.value=!1,o("dismiss"),u.value=_}const R=of(I),E=r.computed(()=>l.value&&l.value.length===0),T=r.computed(()=>(!p.value||y.value)&&!E.value),B=r.computed(()=>(!p.value||y.value)&&E.value),H=r.computed(()=>p.value&&h.value&&h.value.length===0);return(_,j)=>(r.openBlock(),r.createBlock(tb,{"model-value":r.unref(c),"onUpdate:modelValue":j[4]||(j[4]=Q=>r.isRef(c)?c.value=Q:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var Q,F;return[r.createElementVNode("div",oB,[r.createElementVNode("div",rB,[r.createElementVNode("div",iB,[r.createVNode(ke,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:j[0]||(j[0]=S=>c.value=!1)})]),r.createVNode(tf,{"model-value":p.value,"onUpdate:modelValue":j[1]||(j[1]=S=>p.value=S),class:"flex-1",placeholder:_.placeholder},null,8,["model-value","placeholder"])]),v.value?(r.openBlock(),r.createElementBlock("div",aB,[r.createVNode(Sr,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[T.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[_.recentSearchKey&&((Q=l.value)!=null&&Q.length)?(r.openBlock(),r.createElementBlock("div",sB,[r.createElementVNode("div",lB,[r.createElementVNode("div",dB,[r.createElementVNode("div",cB,r.toDisplayString(r.unref(U)("search.recent")),1),r.createVNode(Zo),r.createVNode(ke,{label:r.unref(U)("search.clearHistory"),variant:"plain",size:"md",onClick:j[2]||(j[2]=S=>i())},null,8,["label"])]),uB]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(S,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:P=>p.value=S},[r.createVNode(ue,{size:"lg",name:"history"}),r.createElementVNode("div",pB,r.toDisplayString(S),1)],8,fB))),128))])])):r.createCommentVNode("",!0)],64)):B.value?r.renderSlot(_.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",hB,r.toDisplayString(_.hintPlaceholder),1)]):H.value?r.renderSlot(_.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",mB,r.toDisplayString(_.notFoundPlaceholder||`No result found for “${p.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",gB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.value,(S,x)=>r.renderSlot(_.$slots,"search-result-item",r.mergeProps({key:x,ref_for:!0},{result:S}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:P=>V(S.label.label)},[r.createVNode(ue,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",yB,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.label.segments,(P,C)=>(r.openBlock(),r.createElementBlock("span",{key:C,class:r.normalizeClass({"fm-typo-en-body-lg-400":!P.isMatch,"fm-typo-en-body-lg-600":P.isMatch})},r.toDisplayString(P.segment),3))),128))]),S.sublabel?(r.openBlock(),r.createElementBlock("div",vB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.sublabel.segments,(P,C)=>(r.openBlock(),r.createElementBlock("span",{key:C,class:r.normalizeClass({"fm-typo-en-body-md-400":!P.isMatch,"fm-typo-en-body-md-600":P.isMatch})},r.toDisplayString(P.segment),3))),128))])):r.createCommentVNode("",!0)])],8,bB)])),128)),r.createElementVNode("div",kB,[m.value&&(((F=h.value)==null?void 0:F.length)??0)>5?(r.openBlock(),r.createBlock(ke,{key:0,label:`show ${h.value.length-5} more results`,variant:"plain",onClick:j[3]||(j[3]=S=>m.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),SB=["disabled","inputMode","placeholder","readOnly","value"],CB={key:0},AB=["disabled"],DB=["disabled"],EB=Be(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),{isFocused:a,blur:s,focus:l}=la(),c=r.ref(null);let u;const p=E=>{if(E!==""){const T=+E.replace(/,/g,"");return isNaN(T)?null:T}return null},h=E=>u.format(E),m=E=>{if(typeof i.value!="number"){i.value=+i.value;return}if(E>0&&A.value||E<0&&I.value)return;let T=V(i.value)?i.value+E:0;T=b(T),i.value=T},b=E=>e.max!==void 0&&E>e.max?e.max:e.min!==void 0&&E<e.min?e.min:E,y=()=>{var E;i.value=p(((E=c.value)==null?void 0:E.value)??"")},v=E=>{if(![...Array(10).keys()].map(T=>T.toString()).includes(E.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(E.key)){E.preventDefault();return}},w=r.computed(()=>i.value!=null?h(i.value):""),A=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>=e.max),e.min!==void 0&&(E=i.value<e.min),E}),I=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>e.max),e.min!==void 0&&(E=i.value<=e.min),E});r.onBeforeMount(()=>{u=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function V(E){return typeof E=="number"&&isFinite(E)}const R=()=>{var E;(E=c.value)==null||E.focus()};return(E,T)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":T[8]||(T[8]=B=>r.isRef(i)?i.value=B:null),disabled:o.value,focused:r.unref(a),"helper-state":E.helperState,"helper-text":E.helperText,info:E.labelInfo,label:E.label,optional:E.labelMark==="optional",required:E.labelMark==="required",rules:E.rules,"blame-handler":R},{label:r.withCtx(()=>[r.renderSlot(E.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:B})=>[r.createVNode(at,{"append-icon":E.appendIcon,focused:r.unref(a),invalid:B,"prepend-icon":E.prependIcon,"show-valid-border":E.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(E.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(E.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":E.showSteppers},"flex items-center justify-center"])},[E.appendText?(r.openBlock(),r.createElementBlock("div",CB,r.toDisplayString(E.appendText),1)):r.createCommentVNode("",!0),E.appendIcon?(r.openBlock(),r.createBlock(ue,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:E.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),E.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(a)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||A.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:T[2]||(T[2]=(...H)=>r.unref(s)&&r.unref(s)(...H)),onFocus:T[3]||(T[3]=(...H)=>r.unref(l)&&r.unref(l)(...H)),onMousedown:T[4]||(T[4]=()=>m(E.step))},[r.createVNode(ue,{color:o.value||A.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,AB),r.createElementVNode("button",{disabled:o.value||I.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:T[5]||(T[5]=(...H)=>r.unref(s)&&r.unref(s)(...H)),onFocus:T[6]||(T[6]=(...H)=>r.unref(l)&&r.unref(l)(...H)),onMousedown:T[7]||(T[7]=()=>m(-E.step))},[r.createVNode(ue,{color:o.value||I.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,DB)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:c,disabled:o.value,inputMode:E.inputmode,placeholder:E.placeholder,readOnly:E.readonly,value:w.value,class:"fm-stepper-field--input",type:"text",onBlur:T[0]||(T[0]=(...H)=>r.unref(s)&&r.unref(s)(...H)),onFocus:T[1]||(T[1]=(...H)=>r.unref(l)&&r.unref(l)(...H)),onInput:y,onKeydown:v},null,40,SB)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(E.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-457948be"]]),BB=["disabled","maxlength","minlength","placeholder","readOnly","value"],PB=Be(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),{isFocused:a,focus:s,blur:l}=la(),c=h=>{i.value=h.target.value},u=r.ref(null);Em(u,r.toRef(()=>e.autofocus));const p=()=>{var h;(h=u.value)==null||h.focus()};return(h,m)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":m[2]||(m[2]=b=>r.isRef(i)?i.value=b:null),disabled:o.value,focused:r.unref(a),"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,"blame-handler":p},r.createSlots({label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(a),"fm-textarea__container--invalid":!!r.unref(i)&&b,"fm-textarea__container--valid":h.showValidBorder&&h.showSuccess&&!!r.unref(i)&&!b,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{ref_key:"inputEl",ref:u,class:r.normalizeClass({"fm-textarea--input fm-typo-en-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value,"outline-none":!0}),disabled:o.value,maxlength:h.maxLength,minlength:h.minLength,placeholder:h.placeholder,readOnly:h.readonly,value:r.unref(i),onBlur:m[0]||(m[0]=(...y)=>r.unref(l)&&r.unref(l)(...y)),onFocus:m[1]||(m[1]=(...y)=>r.unref(s)&&r.unref(s)(...y)),onInput:c},null,42,BB)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:2},[h.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(h.maxLength?`${r.unref(i).length} / ${h.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-8bc4f92e"]]);var On=(t=>(t.AM="AM",t.PM="PM",t))(On||{});function yn(t){return t.toString().padStart(2,"0")}function OB(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),a=o>11?"PM":"AM";let s=o;return s===0?s=12:s>12&&(s-=12),`${yn(s)}:${yn(i)}:${a}`}function nn(t){const[e,n,o]=OB(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function rf({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${yn(o)}:${yn(e)}`}const IB={class:"flex flex-col gap-8 fm-time-input items-center"},NB=["value","maxlength"],rb=Be(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function a(h){i.value&&(i.value.value=h)}r.watch(()=>n.modelValue,a);function s(h){!/^\d$/.test(h.key)&&!["ArrowLeft","ArrowRight","Backspace","Delete","Tab"].includes(h.key)&&h.preventDefault()}function l(){if(!i.value)return;const h=c(i.value.value);h==null||h<n.min?(a(yn(n.min)),o("update:model-value",n.min)):h>n.max?(a(yn(n.max)),o("update:model-value",n.max)):(a(yn(h)),o("update:model-value",h))}function c(h){return h&&/^\d+$/.test(h)?Number(h):null}function u(){var h;(h=i.value)==null||h.focus(),o("update:model-value",c(n.modelValue)+1)}function p(){var h;(h=i.value)==null||h.focus(),o("update:model-value",c(n.modelValue)-1)}return(h,m)=>(r.openBlock(),r.createElementBlock("div",IB,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:u},[r.createVNode(ue,{name:"expand_less",size:"md"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onKeypress:s,onBlur:l,maxlength:t.max.toString().length},null,40,NB),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:p},[r.createVNode(ue,{name:"expand_more",size:"md"})])]))}}),[["__scopeId","data-v-ced7c472"]]),VB={class:"flex fm-time-input items-center"},RB=r.createElementVNode("div",{class:"fm-typo-en-title-sm-600 w-6 flex items-center justify-center"},[r.createElementVNode("span",null,":")],-1),FB={class:"fm-time-input-periods ml-16"},TB=["onClick"],Tl=r.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(a){const s={hours:a.hours??n.modelValue.hours,minutes:a.minutes??n.modelValue.minutes,period:a.period??n.modelValue.period},l=n.modelValue.hours;(l===12&&s.hours===11||l===11&&s.hours===12)&&(s.period=n.modelValue.period===On.AM?On.PM:On.AM),s.hours>12?s.hours=1:s.hours<1&&(s.hours=12),s.minutes>59?s.minutes=0:s.minutes<0&&(s.minutes=59),o("update:model-value",s)}return(a,s)=>(r.openBlock(),r.createElementBlock("div",VB,[r.createVNode(rb,{"model-value":r.unref(yn)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":s[0]||(s[0]=l=>i({hours:l}))},null,8,["model-value"]),RB,r.createVNode(rb,{"model-value":r.unref(yn)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":s[1]||(s[1]=l=>i({minutes:l}))},null,8,["model-value"]),r.createElementVNode("div",FB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(On),l=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass([{"fm-time-input-period__selected":l===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:l})},r.toDisplayString(l),11,TB))),128))])]))}}),MB={class:"flex gap-8"},LB={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[220px]"},zB={class:"flex items-center justify-center py-16 w-full"},_B={class:"flex justify-end gap-8"},HB=r.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=r.ref(null),s=r.computed(()=>{if(!i.value)return null;const{hours:u,minutes:p,period:h}=nn(i.value);return`${yn(u)}:${yn(p)} ${h}`});function l(){if(!a.value){i.value=null;return}const u=rf(a.value);i.value=u,c.value=!1}r.onMounted(()=>{i.value&&(a.value=nn(i.value))}),r.watch(()=>i.value,u=>{u&&(a.value=nn(u))});const c=r.ref(!1);return r.watchEffect(()=>{o.value||(c.value?a.value=nn(i.value??"00:00"):a.value=i.value?nn(i.value):null)}),(u,p)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":p[3]||(p[3]=h=>r.isRef(i)?i.value=h:null),disabled:o.value,focused:c.value,"helper-state":u.helperState,"helper-text":u.helperText,info:u.labelInfo,label:u.label,optional:u.labelMark==="optional",required:u.labelMark==="required",rules:u.rules,"disable-auto-focus":"",tag:"div"},{label:r.withCtx(()=>[r.renderSlot(u.$slots,"label")]),default:r.withCtx(({invalid:h})=>[r.createVNode(Bo,{disabled:o.value,"show-popover":c.value,"z-index":u.zIndex,onPopoverChanged:p[2]||(p[2]=m=>c.value=m)},{"popover-button":r.withCtx(()=>[u.$slots["trigger-button"]?r.renderSlot(u.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:h,dropdownShowed:c.value,showValidBorder:u.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(at,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:c.value,invalid:h,"show-valid-border":u.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",MB,[r.createVNode(ue,{outline:!c.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!s.value},"grow"])},r.toDisplayString(s.value??u.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",LB,[r.createElementVNode("div",zB,[r.createVNode(Tl,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(On).AM},"onUpdate:modelValue":p[0]||(p[0]=m=>a.value=m)},null,8,["model-value"])]),r.createElementVNode("div",_B,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:p[1]||(p[1]=m=>c.value=!1)},null,8,["label"]),r.createVNode(ke,{label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:l},null,8,["label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(u.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),UB={class:"flex gap-8"},WB={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[220px]"},jB={class:"flex flex-col gap-16 items-center justify-center w-full pb-16"},GB={class:"fm-typo-en-body-lg-600 text-left w-full"},QB={class:"fm-typo-en-body-lg-600 text-left w-full"},XB={class:"flex gap-8 items-center justify-end"},qB=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},disableTimeCheck:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=r.ref(null),s=r.ref(null),l=r.computed(()=>{const v=Array.isArray(i.value);return!i.value||!v||v&&i.value.every(w=>!b(w))?null:i.value.map(w=>{const{hours:A,minutes:I,period:V}=nn(w);return`${yn(A)}:${yn(I)} ${V}`}).join(" - ")});function c(){if(!a.value||!s.value){i.value=null;return}const v=a.value,w=s.value,A=v.period===On.PM&&w.period===On.AM,V=!(v.period===On.PM&&v.hours===12&&w.period===On.PM&&w.hours!==12)&&v.period===w.period&&(v.hours>w.hours||v.hours===w.hours&&v.minutes>w.minutes),R=!e.disableTimeCheck&&(A||V),E=rf(a.value),T=rf(s.value);i.value=R?[T,E]:[E,T],p()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(v=>!!v)&&(a.value=nn(i.value[0]),s.value=nn(i.value[1]))}),r.watch(()=>i.value,v=>{const w=Array.isArray(v);v&&w&&v.every(A=>b(A))&&(a.value=nn(v[0]),s.value=nn(v[1]))});const u=r.ref();function p(){var v;(v=u.value)==null||v.hide()}const h=r.ref(!1);function m(v){var w,A,I,V;v?(a.value=nn(((I=i.value)==null?void 0:I[0])??"00:00"),s.value=nn(((V=i.value)==null?void 0:V[1])??"23:59")):(a.value=(w=i.value)!=null&&w[0]?nn(i.value[0]):null,s.value=(A=i.value)!=null&&A[1]?nn(i.value[1]):null),h.value=v}const b=v=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(v),y=r.computed(()=>e.disableTimeCheck?!1:Vt(a.value,s.value));return(v,w)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":w[2]||(w[2]=A=>r.isRef(i)?i.value=A:null),disabled:o.value,focused:h.value,"helper-state":v.helperState,"helper-text":v.helperText,info:v.labelInfo,label:v.label,optional:v.labelMark==="optional",required:v.labelMark==="required",rules:v.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(v.$slots,"label")]),default:r.withCtx(({invalid:A})=>[r.createVNode(Bo,{ref_key:"dropdownRef",ref:u,"show-popover":h.value,width:343,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[v.$slots["trigger-button"]?r.renderSlot(v.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:A,dropdownShowed:h.value,showValidBorder:v.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(at,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:h.value,invalid:A,"show-valid-border":v.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",UB,[r.createVNode(ue,{outline:!h.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??v.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",WB,[r.createElementVNode("div",jB,[r.createElementVNode("div",null,[r.createElementVNode("div",GB,r.toDisplayString(r.unref(U)("time.start")),1),r.createVNode(Tl,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(On).AM},"onUpdate:modelValue":w[0]||(w[0]=I=>a.value=I)},null,8,["model-value"])]),r.createElementVNode("div",null,[r.createElementVNode("div",QB,r.toDisplayString(r.unref(U)("time.end")),1),r.createVNode(Tl,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(On).AM},"onUpdate:modelValue":w[1]||(w[1]=I=>s.value=I)},null,8,["model-value"])])]),r.createElementVNode("div",XB,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:p},null,8,["label"]),r.createVNode(ke,{disabled:y.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:c},null,8,["disabled","label"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(v.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),af=Be(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t,{expose:e}){const n=r.ref(null);return e({element:n}),(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"element",ref:n,class:r.normalizeClass({"fm-list--separator":o.separator,activeClass:o.activeClass})},[r.renderSlot(o.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-266d01d7"]]),sf=Be(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;function n(o){e.disabled&&o.stopImmediatePropagation()}return(o,i)=>{const a=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":o.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":o.clickable&&!o.disabled,"cursor-not-allowed":o.clickable&&o.disabled}),onClick:r.withModifiers(n,["prevent"])},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend",{},void 0,!0),r.renderSlot(o.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(o.label),3),o.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(o.sublabel),3)):r.createCommentVNode("",!0)])],!0),o.$slots.append?(r.openBlock(),r.createBlock(Zo,{key:0})):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[a,o.clickable&&!o.disabled]])}}}),[["__scopeId","data-v-90c2ba0a"]]);function KB(t){for(;t;){if(JB(t))return t;t=t.parentElement}return document.scrollingElement}function JB(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class YB{constructor(e,n){ie(this,"onScroll");ie(this,"scrollParent");this.onScroll=n,this.scrollParent=KB(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const ZB={class:"fm-menu__wrapper"},$B=Be(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),a=r.ref(null),s=r.ref(null),{floatingStyles:l}=ci(a,s,{middleware:[si(4),li()],placement:o.placement,whileElementsMounted:ai});let c;const u=n;e({show:()=>{i.value||(i.value=!0,u("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,u("dropdown-changed",i.value))}});const p=b=>{b.preventDefault(),b.stopPropagation(),!o.disabled&&(i.value=!i.value,u("dropdown-changed",i.value))},h=b=>{if(!i.value)return;const y=b.path||b.composedPath();for(const v of y)if(v==a.value||v==s.value)return;i.value=!1,u("dropdown-changed",i.value)},m=()=>{u("dropdown-changed",!1)};return r.watch(()=>o.showMenu,b=>i.value=b),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",h),c=new YB(a.value,m),c.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",h),c.unbindScroll()}),(b,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:a,class:"fm-menu",onClick:p},[r.renderSlot(b.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:s,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(b.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",ZB,[r.renderSlot(b.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),eP={class:"fm-typo-en-body-md-600 mx-8 p-8 text-fm-color-typo-secondary"},tP=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",eP,r.toDisplayString(e.label),1))}}),nP=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),oP={class:"relative"},rP={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},iP=nP(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),aP=Be(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(ia(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",oP,[r.createElementVNode("div",rP,[iP,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-6d0e6490"]]),sP={class:"flex fm-typo-en-title-md-600 items-center justify-between text-fm-color-typo-primary pb-16"},lP={key:0},dP={class:"h-full overflow-y-auto"},cP={key:0,class:"pt-24"},uP=Be(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0},zIndex:{default:void 0},isContainer:{default:"div"},isContainerProps:{default:()=>({})},closeIcon:{default:"close"},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway","on:close"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=Pe(o,"modelValue"),s=r.ref(),l=()=>{a.value=!1,i("on:close")};return e({containerRef:s}),(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:u[0]||(u[0]=p=>a.value=!0)},[r.renderSlot(c.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":o.dismissAway,"z-index":o.zIndex,transparent:o.noOverlay,onClose:l,onClickedAway:u[1]||(u[1]=p=>c.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.isContainer),r.mergeProps({ref_key:"containerRef",ref:s,class:[[!c.maxWidth&&"max-w-[400px]",o.noOverlay&&"shadow-md"],"fm-side-sheet xs:w-full"],style:{maxWidth:`${c.maxWidth}px`}},c.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",sP,[r.renderSlot(c.$slots,"side-sheet-header",{},()=>[c.header?(r.openBlock(),r.createElementBlock("div",lP,r.toDisplayString(c.header),1)):r.createCommentVNode("",!0)],!0),c.closeButton?(r.openBlock(),r.createBlock(ue,{key:0,name:c.closeIcon,class:"cursor-pointer",size:"md",onClick:l},null,8,["name"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",dP,[r.renderSlot(c.$slots,"default",{},void 0,!0)]),c.$slots["side-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",cP,[r.renderSlot(c.$slots,"side-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-d5a939ad"]]),fP={class:"flex items-center"},pP={key:1,class:"flex items-center mx-12"},hP={key:0,class:"mt-8"},ib=Be(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0},zIndex:{type:Number,default:1e3},spinner:{type:Boolean,default:!1}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),a=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),s=r.computed(()=>n.bgColor?ia(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?ia(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(c,u)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({style:{zIndex:t.zIndex},class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"},s.value),[r.createElementVNode("div",fP,[i.value.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:n.color??i.value.icon.color,name:i.value.icon.name,class:"mr-12"},null,8,["color","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${a.value.classes} grow ellipsis mr-16`)},r.toDisplayString(a.value.text),3),t.spinner?(r.openBlock(),r.createElementBlock("div",pP,[r.createVNode(ue,{class:"animate-spin",name:"progress_activity"})])):r.createCommentVNode("",!0),n.dismissable?(r.openBlock(),r.createBlock(ue,{key:2,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:u[0]||(u[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",hP,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(c.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"mt-16 fm-typo-en-body-lg-600"},l.value),[r.createElementVNode("span",{class:"cursor-pointer",onClick:u[1]||(u[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-65fce1f3"]]),mP={class:r.normalizeClass(["fm-step-description","text-fm-color-typo-secondary","fm-typo-en-body-md-400 line-clamp-1","mt-4"])},lf=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([t.disabled?"text-fm-color-typo-disabled":"","flex flex-col"])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([t.titleBold?"fm-typo-en-title-md-600":"fm-typo-en-body-md-400","fm-step-title line-clamp-2"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",mP,r.toDisplayString(t.description),1)])],2))}}),gP=["data-title","data-description","data-disabled"],bP={class:"flex flex-col fm-step-container grow"},yP={class:"fm-step-container-content"},vP=Be(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(Yh);function i(){a.value||o(e.value)}const a=r.computed(()=>e.disabled?e.disabled():!1),s=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),c=r.computed(()=>e.complete()),u=r.computed(()=>l.value||c.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),p=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:s.value?{config:{name:"warning",color:"system-error-300"}}:a.value?{className:"border-2 border-fm-color-neutral-gray-200"}:c.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(h,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":a.value,class:r.normalizeClass(`fm-step gap-4 grow ${a.value?"cursor-not-allowed":"cursor-pointer"}`)},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${u.value}`)},null,2)]),r.createElementVNode("div",bP,[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"flex gap-12",onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",p.value.className])},[p.value.config?(r.openBlock(),r.createBlock(ue,{key:0,name:p.value.config.name,color:p.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(lf,{title:t.title,description:t.description,disabled:a.value,class:"grow"},null,8,["title","description","disabled"])])),[[b,!a.value]]),r.createElementVNode("div",yP,[r.renderSlot(h.$slots,"default",{},void 0,!0)])])],10,gP)}}}),[["__scopeId","data-v-113e7095"]]),kP={class:"hidden items-center xs:flex"},wP={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},xP=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=p=>{o("update:model-value",p)};r.provide(Yh,{currentStep:()=>n.modelValue,goToStep:i});const a=r.ref(),s=r.ref([]),l=r.computed(()=>s.value[n.modelValue-1]),c=r.computed(()=>`${n.modelValue} of ${s.value.length}`),u=()=>{var h;const p=Array.from(((h=a.value)==null?void 0:h.querySelectorAll(":scope > .fm-step"))??[]);s.value=p.map(m=>({title:m.dataset.title??"",description:m.dataset.description,disabled:m.dataset.disabled=="true"}))};return r.onMounted(()=>{u()}),(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:a,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(p.$slots,"default")],2),r.createElementVNode("div",kP,[r.createVNode(Sr,{"current-step":t.modelValue,"total-steps":s.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(lf,{key:0,class:"grow","title-bold":"",title:l.value.title,description:l.value.description,disabled:l.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),p.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(p.$slots,"contents"),r.createElementVNode("div",wP,[r.renderSlot(p.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let SP=0;function CP(){return SP++}const AP=t=>(r.pushScopeId("data-v-dfbdb871"),t=t(),r.popScopeId(),t),DP=["disabled"],EP={key:1,class:"ml-4"},BP={key:0,class:"ml-4"},PP={key:0,class:r.normalizeClass(["block","absolute bottom-0 left-0","h-0.5 w-full"])},OP=[AP(()=>r.createElementVNode("span",{class:r.normalizeClass(["block","bg-fm-color-primary rounded-xxxl","w-full h-full"])},null,-1))],ab=Be(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>CP()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,a=r.ref(!1);function s(h){n.value=h}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},c=h=>{o.children.length!==0&&(a.value=h)},u=r.computed(()=>o.children.length>0?o.children.some(h=>h.value===o.modelValue):o.modelValue===o.value),p=h=>{a.value=!1,i("update:modelValue",h)};return(h,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createBlock(io,{class:r.normalizeClass([{"w-full":h.vertical},"flex-shrink-0 max-w-[360px] min-w-[90px] rounded-sm"]),disabled:h.children.length===0,placement:h.vertical?"right-start":"bottom-start","show-menu":a.value,onMenuChanged:c},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass([h.vertical?["px-16 py-8"]:["px-8 pt-8"],h.vertical?["max-w-[360px] w-full"]:["min-w-[90px] max-w-[360px]"]]),disabled:h.disabled,type:"button",onClick:l,onMousedown:m[0]||(m[0]=()=>s(!0)),onMouseleave:m[1]||(m[1]=()=>s(!1)),onMouseup:m[2]||(m[2]=()=>s(!1))},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",h.vertical?["justify-start"]:["justify-center"],"relative"])},[r.createElementVNode("span",{class:r.normalizeClass([[h.vertical&&"w-full"],"block"])},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",!h.vertical&&"pb-1.5",h.vertical&&"w-full"])},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["rounded-xxxl",!h.vertical&&"hover:bg-fm-color-opacity-sm group",h.vertical&&"w-full"]),type:"button"},[r.createElementVNode("button",{class:r.normalizeClass(["relative","flex items-center","px-8",h.vertical?"py-1":"py-1.5 space-x-8",h.vertical&&"w-full"]),type:"button"},[r.renderSlot(h.$slots,"prepend",{},void 0,!0),h.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:h.disabled?"neutral-gray-200":u.value?"primary":"neutral-black",name:h.icon,outline:!n.value&&!u.value,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400",h.disabled?"text-fm-color-typo-disabled":u.value?"text-fm-color-primary":"text-fm-color-typo-secondary"])},r.toDisplayString(h.label),3),h.badge&&h.vertical?(r.openBlock(),r.createElementBlock("span",EP,[r.createVNode(Yo,{value:h.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0),h.children.length>0?(r.openBlock(),r.createBlock(ue,{key:2,class:r.normalizeClass(["text-fm-color-neutral-gray-400",h.vertical&&"block ml-auto"]),name:a.value?"expand_less":"expand_more",size:"md"},null,8,["class","name"])):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"append",{},void 0,!0)],2)],2)),[[b,h.vertical?!1:{color:"rgba(28, 28, 30, 0.16)"}]]),h.badge&&!h.vertical?(r.openBlock(),r.createElementBlock("span",BP,[r.createVNode(Yo,{value:h.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0)],2),u.value&&!h.vertical?(r.openBlock(),r.createElementBlock("span",PP,OP)):r.createCommentVNode("",!0)],2)],2)],42,DP)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.children,y=>(r.openBlock(),r.createBlock(St,{key:y.value,disabled:y.disabled,icon:y.icon,label:y.label,"model-value":o.modelValue===y.value,onClick:v=>p(y.value)},{append:r.withCtx(()=>[y.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:y.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["disabled","icon","label","model-value","onClick"]))),128))]),_:3},8,["class","disabled","placement","show-menu"])}}}),[["__scopeId","data-v-dfbdb871"]]),IP={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},NP={class:"flex flex-1 gap-8"},VP=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=Jo(),o=r.computed(()=>{const l=[];e.searchable&&l.push({label:"Search",icon:"search",key:"search"}),e.filterable&&l.push({label:"Filter",icon:"filter_alt",key:"filter"});const c=l.concat(e.actions);if(n.value.xs){const[y,v,w,...A]=c;return A.length===0?{actionButtons:[y,v,w].filter(I=>I),collapse:A}:{actionButtons:[y,v].filter(I=>I),collapse:[w,...A]}}const[u,p,h,m,...b]=c;return b.length===0?{actionButtons:[u,p,h,m].filter(y=>y),collapse:b}:{actionButtons:[u,p,h].filter(y=>y),collapse:[m,...b]}}),i=r.ref(!1);function a(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const s=Pe(e,"searchModel");return(l,c)=>(r.openBlock(),r.createElementBlock("div",IP,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(zc,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:c[0]||(c[0]=u=>l.$emit("click:remove-chip",u))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",NP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,u=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:u.key},[u.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(tf,{"model-value":r.unref(s),"onUpdate:modelValue":c[1]||(c[1]=p=>r.isRef(s)?s.value=p:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${u.key}`,{key:1},()=>[r.createVNode(ke,{"prepend-icon":u.icon,variant:"tertiary",onClick:p=>l.$emit(`click:action-${u.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(io,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(ke,{"prepend-icon":"more_vert",variant:"tertiary",onClick:a})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(St,{key:u.key,label:u.label,icon:u.icon,onClick:p=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),l.$slots.append?r.renderSlot(l.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(_c,{modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=u=>i.value=u),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(af,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(sf,{key:u.key,label:u.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:p=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var RP={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.19.5 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.2.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.2.13676358",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1748",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20251102.99.1",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12644",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.9/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.3/x64",GITHUB_RUN_ID:"19226577440",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"a66810bfd2515713e801cf92de0914360bedbfb9",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/fix/advanced-sort",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.5/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_78c27ab8-1b06-4f2a-ae2c-bb668252e7a6",INVOCATION_ID:"a04244b96b034700a027019e139ebfee",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"315",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000026131",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"fix/advanced-sort",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_dependencies__feedmepos_core:"^2.10.12",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.8.2",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"a66810bfd2515713e801cf92de0914360bedbfb9",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/fix/advanced-sort",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function sr(t,e){return typeof t=="function"?t(e):t}function vn(t,e){return n=>{e.setState(o=>({...o,[t]:sr(n,o[t])}))}}function Ml(t){return t instanceof Function}function FP(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function TP(t,e){const n=[],o=i=>{i.forEach(a=>{n.push(a);const s=e(a);s!=null&&s.length&&o(s)})};return o(t),n}function me(t,e,n){let o=[],i;return a=>{let s;n.key&&n.debug&&(s=Date.now());const l=t(a);if(!(l.length!==o.length||l.some((p,h)=>o[h]!==p)))return i;o=l;let u;if(n.key&&n.debug&&(u=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const p=Math.round((Date.now()-s)*100)/100,h=Math.round((Date.now()-u)*100)/100,m=h/16,b=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%c⏱ ${b(h,5)} /${b(p,5)} ms`,`
114
+ }`;var Oe=Zv(function(){return Ue(N,pe+"return "+te).apply(n,z)});if(Oe.source=te,th(Oe))throw Oe;return Oe}function gG(d){return je(d).toLowerCase()}function bG(d){return je(d).toUpperCase()}function yG(d,f,g){if(d=je(d),d&&(g||f===n))return s2(d);if(!d||!(f=Sn(f)))return d;var k=Jn(d),D=Jn(f),N=l2(k,D),z=d2(k,D)+1;return br(k,N,z).join("")}function vG(d,f,g){if(d=je(d),d&&(g||f===n))return d.slice(0,u2(d)+1);if(!d||!(f=Sn(f)))return d;var k=Jn(d),D=d2(k,Jn(f))+1;return br(k,0,D).join("")}function kG(d,f,g){if(d=je(d),d&&(g||f===n))return d.replace(tp,"");if(!d||!(f=Sn(f)))return d;var k=Jn(d),D=l2(k,Jn(f));return br(k,D).join("")}function wG(d,f){var g=j,k=Q;if(ct(f)){var D="separator"in f?f.separator:D;g="length"in f?Ee(f.length):g,k="omission"in f?Sn(f.omission):k}d=je(d);var N=d.length;if(Ti(d)){var z=Jn(d);N=z.length}if(g>=N)return d;var G=g-Mi(k);if(G<1)return k;var q=z?br(z,0,G).join(""):d.slice(0,G);if(D===n)return q+k;if(z&&(G+=q.length-G),nh(D)){if(d.slice(G).search(D)){var $,ee=q;for(D.global||(D=yp(D.source,je(Py.exec(D))+"g")),D.lastIndex=0;$=D.exec(ee);)var te=$.index;q=q.slice(0,te===n?G:te)}}else if(d.indexOf(Sn(D),G)!=G){var de=q.lastIndexOf(D);de>-1&&(q=q.slice(0,de))}return q+k}function xG(d){return d=je(d),d&&VL.test(d)?d.replace(Dy,Yz):d}var SG=ji(function(d,f,g){return d+(g?" ":"")+f.toUpperCase()}),ih=$2("toUpperCase");function Yv(d,f,g){return d=je(d),f=g?n:f,f===n?Qz(d)?e_(d):Mz(d):d.match(f)||[]}var Zv=Ne(function(d,f){try{return wn(d,n,f)}catch(g){return th(g)?g:new Se(g)}}),CG=Mo(function(d,f){return Nn(f,function(g){g=po(g),Fo(d,g,$p(d[g],d))}),d});function AG(d){var f=d==null?0:d.length,g=be();return d=f?lt(d,function(k){if(typeof k[1]!="function")throw new Vn(s);return[g(k[0]),k[1]]}):[],Ne(function(k){for(var D=-1;++D<f;){var N=d[D];if(wn(N[0],this,k))return wn(N[1],this,k)}})}function DG(d){return Y_(Fn(d,h))}function ah(d){return function(){return d}}function EG(d,f){return d==null||d!==d?f:d}var BG=tv(),PG=tv(!0);function ln(d){return d}function sh(d){return I2(typeof d=="function"?d:Fn(d,h))}function OG(d){return V2(Fn(d,h))}function IG(d,f){return R2(d,Fn(f,h))}var NG=Ne(function(d,f){return function(g){return as(g,d,f)}}),VG=Ne(function(d,f){return function(g){return as(d,g,f)}});function lh(d,f,g){var k=Ot(f),D=Pd(f,k);g==null&&!(ct(f)&&(D.length||!k.length))&&(g=f,f=d,d=this,D=Pd(f,Ot(f)));var N=!(ct(g)&&"chain"in g)||!!g.chain,z=zo(d);return Nn(D,function(G){var q=f[G];d[G]=q,z&&(d.prototype[G]=function(){var $=this.__chain__;if(N||$){var ee=d(this.__wrapped__),te=ee.__actions__=rn(this.__actions__);return te.push({func:q,args:arguments,thisArg:d}),ee.__chain__=$,ee}return q.apply(d,ur([this.value()],arguments))})}),d}function RG(){return Tt._===this&&(Tt._=a_),this}function dh(){}function FG(d){return d=Ee(d),Ne(function(f){return F2(f,d)})}var TG=_p(lt),MG=_p(n2),LG=_p(up);function $v(d){return Xp(d)?fp(po(d)):hH(d)}function zG(d){return function(f){return d==null?n:Qr(d,f)}}var _G=ov(),HG=ov(!0);function ch(){return[]}function uh(){return!1}function UG(){return{}}function WG(){return""}function jG(){return!0}function GG(d,f){if(d=Ee(d),d<1||d>L)return[];var g=le,k=Wt(d,le);f=be(f),d-=le;for(var D=mp(k,f);++g<d;)f(g);return D}function QG(d){return Ae(d)?lt(d,po):Cn(d)?[d]:rn(vv(je(d)))}function XG(d){var f=++r_;return je(d)+f}var qG=Fd(function(d,f){return d+f},0),KG=Hp("ceil"),JG=Fd(function(d,f){return d/f},1),YG=Hp("floor");function ZG(d){return d&&d.length?Bd(d,ln,Dp):n}function $G(d,f){return d&&d.length?Bd(d,be(f,2),Dp):n}function eQ(d){return i2(d,ln)}function tQ(d,f){return i2(d,be(f,2))}function nQ(d){return d&&d.length?Bd(d,ln,Op):n}function oQ(d,f){return d&&d.length?Bd(d,be(f,2),Op):n}var rQ=Fd(function(d,f){return d*f},1),iQ=Hp("round"),aQ=Fd(function(d,f){return d-f},0);function sQ(d){return d&&d.length?hp(d,ln):0}function lQ(d,f){return d&&d.length?hp(d,be(f,2)):0}return O.after=OW,O.ary=Ov,O.assign=bj,O.assignIn=jv,O.assignInWith=qd,O.assignWith=yj,O.at=vj,O.before=Iv,O.bind=$p,O.bindAll=CG,O.bindKey=Nv,O.castArray=UW,O.chain=Ev,O.chunk=YH,O.compact=ZH,O.concat=$H,O.cond=AG,O.conforms=DG,O.constant=ah,O.countBy=sW,O.create=kj,O.curry=Vv,O.curryRight=Rv,O.debounce=Fv,O.defaults=wj,O.defaultsDeep=xj,O.defer=IW,O.delay=NW,O.difference=eU,O.differenceBy=tU,O.differenceWith=nU,O.drop=oU,O.dropRight=rU,O.dropRightWhile=iU,O.dropWhile=aU,O.fill=sU,O.filter=dW,O.flatMap=fW,O.flatMapDeep=pW,O.flatMapDepth=hW,O.flatten=Sv,O.flattenDeep=lU,O.flattenDepth=dU,O.flip=VW,O.flow=BG,O.flowRight=PG,O.fromPairs=cU,O.functions=Pj,O.functionsIn=Oj,O.groupBy=mW,O.initial=fU,O.intersection=pU,O.intersectionBy=hU,O.intersectionWith=mU,O.invert=Nj,O.invertBy=Vj,O.invokeMap=bW,O.iteratee=sh,O.keyBy=yW,O.keys=Ot,O.keysIn=sn,O.map=Ud,O.mapKeys=Fj,O.mapValues=Tj,O.matches=OG,O.matchesProperty=IG,O.memoize=jd,O.merge=Mj,O.mergeWith=Gv,O.method=NG,O.methodOf=VG,O.mixin=lh,O.negate=Gd,O.nthArg=FG,O.omit=Lj,O.omitBy=zj,O.once=RW,O.orderBy=vW,O.over=TG,O.overArgs=FW,O.overEvery=MG,O.overSome=LG,O.partial=eh,O.partialRight=Tv,O.partition=kW,O.pick=_j,O.pickBy=Qv,O.property=$v,O.propertyOf=zG,O.pull=vU,O.pullAll=Av,O.pullAllBy=kU,O.pullAllWith=wU,O.pullAt=xU,O.range=_G,O.rangeRight=HG,O.rearg=TW,O.reject=SW,O.remove=SU,O.rest=MW,O.reverse=Yp,O.sampleSize=AW,O.set=Uj,O.setWith=Wj,O.shuffle=DW,O.slice=CU,O.sortBy=PW,O.sortedUniq=IU,O.sortedUniqBy=NU,O.split=fG,O.spread=LW,O.tail=VU,O.take=RU,O.takeRight=FU,O.takeRightWhile=TU,O.takeWhile=MU,O.tap=ZU,O.throttle=zW,O.thru=Hd,O.toArray=Hv,O.toPairs=Xv,O.toPairsIn=qv,O.toPath=QG,O.toPlainObject=Wv,O.transform=jj,O.unary=_W,O.union=LU,O.unionBy=zU,O.unionWith=_U,O.uniq=HU,O.uniqBy=UU,O.uniqWith=WU,O.unset=Gj,O.unzip=Zp,O.unzipWith=Dv,O.update=Qj,O.updateWith=Xj,O.values=Xi,O.valuesIn=qj,O.without=jU,O.words=Yv,O.wrap=HW,O.xor=GU,O.xorBy=QU,O.xorWith=XU,O.zip=qU,O.zipObject=KU,O.zipObjectDeep=JU,O.zipWith=YU,O.entries=Xv,O.entriesIn=qv,O.extend=jv,O.extendWith=qd,lh(O,O),O.add=qG,O.attempt=Zv,O.camelCase=Zj,O.capitalize=Kv,O.ceil=KG,O.clamp=Kj,O.clone=WW,O.cloneDeep=GW,O.cloneDeepWith=QW,O.cloneWith=jW,O.conformsTo=XW,O.deburr=Jv,O.defaultTo=EG,O.divide=JG,O.endsWith=$j,O.eq=Zn,O.escape=eG,O.escapeRegExp=tG,O.every=lW,O.find=cW,O.findIndex=wv,O.findKey=Sj,O.findLast=uW,O.findLastIndex=xv,O.findLastKey=Cj,O.floor=YG,O.forEach=Bv,O.forEachRight=Pv,O.forIn=Aj,O.forInRight=Dj,O.forOwn=Ej,O.forOwnRight=Bj,O.get=oh,O.gt=qW,O.gte=KW,O.has=Ij,O.hasIn=rh,O.head=Cv,O.identity=ln,O.includes=gW,O.indexOf=uU,O.inRange=Jj,O.invoke=Rj,O.isArguments=Kr,O.isArray=Ae,O.isArrayBuffer=JW,O.isArrayLike=an,O.isArrayLikeObject=yt,O.isBoolean=YW,O.isBuffer=yr,O.isDate=ZW,O.isElement=$W,O.isEmpty=ej,O.isEqual=tj,O.isEqualWith=nj,O.isError=th,O.isFinite=oj,O.isFunction=zo,O.isInteger=Mv,O.isLength=Qd,O.isMap=Lv,O.isMatch=rj,O.isMatchWith=ij,O.isNaN=aj,O.isNative=sj,O.isNil=dj,O.isNull=lj,O.isNumber=zv,O.isObject=ct,O.isObjectLike=mt,O.isPlainObject=fs,O.isRegExp=nh,O.isSafeInteger=cj,O.isSet=_v,O.isString=Xd,O.isSymbol=Cn,O.isTypedArray=Qi,O.isUndefined=uj,O.isWeakMap=fj,O.isWeakSet=pj,O.join=gU,O.kebabCase=nG,O.last=Mn,O.lastIndexOf=bU,O.lowerCase=oG,O.lowerFirst=rG,O.lt=hj,O.lte=mj,O.max=ZG,O.maxBy=$G,O.mean=eQ,O.meanBy=tQ,O.min=nQ,O.minBy=oQ,O.stubArray=ch,O.stubFalse=uh,O.stubObject=UG,O.stubString=WG,O.stubTrue=jG,O.multiply=rQ,O.nth=yU,O.noConflict=RG,O.noop=dh,O.now=Wd,O.pad=iG,O.padEnd=aG,O.padStart=sG,O.parseInt=lG,O.random=Yj,O.reduce=wW,O.reduceRight=xW,O.repeat=dG,O.replace=cG,O.result=Hj,O.round=iQ,O.runInContext=X,O.sample=CW,O.size=EW,O.snakeCase=uG,O.some=BW,O.sortedIndex=AU,O.sortedIndexBy=DU,O.sortedIndexOf=EU,O.sortedLastIndex=BU,O.sortedLastIndexBy=PU,O.sortedLastIndexOf=OU,O.startCase=pG,O.startsWith=hG,O.subtract=aQ,O.sum=sQ,O.sumBy=lQ,O.template=mG,O.times=GG,O.toFinite=_o,O.toInteger=Ee,O.toLength=Uv,O.toLower=gG,O.toNumber=Ln,O.toSafeInteger=gj,O.toString=je,O.toUpper=bG,O.trim=yG,O.trimEnd=vG,O.trimStart=kG,O.truncate=wG,O.unescape=xG,O.uniqueId=XG,O.upperCase=SG,O.upperFirst=ih,O.each=Bv,O.eachRight=Pv,O.first=Cv,lh(O,function(){var d={};return uo(O,function(f,g){Ge.call(O.prototype,g)||(d[g]=f)}),d}(),{chain:!1}),O.VERSION=o,Nn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){O[d].placeholder=O}),Nn(["drop","take"],function(d,f){Te.prototype[d]=function(g){g=g===n?1:Et(Ee(g),0);var k=this.__filtered__&&!f?new Te(this):this.clone();return k.__filtered__?k.__takeCount__=Wt(g,k.__takeCount__):k.__views__.push({size:Wt(g,le),type:d+(k.__dir__<0?"Right":"")}),k},Te.prototype[d+"Right"]=function(g){return this.reverse()[d](g).reverse()}}),Nn(["filter","map","takeWhile"],function(d,f){var g=f+1,k=g==x||g==C;Te.prototype[d]=function(D){var N=this.clone();return N.__iteratees__.push({iteratee:be(D,3),type:g}),N.__filtered__=N.__filtered__||k,N}}),Nn(["head","last"],function(d,f){var g="take"+(f?"Right":"");Te.prototype[d]=function(){return this[g](1).value()[0]}}),Nn(["initial","tail"],function(d,f){var g="drop"+(f?"":"Right");Te.prototype[d]=function(){return this.__filtered__?new Te(this):this[g](1)}}),Te.prototype.compact=function(){return this.filter(ln)},Te.prototype.find=function(d){return this.filter(d).head()},Te.prototype.findLast=function(d){return this.reverse().find(d)},Te.prototype.invokeMap=Ne(function(d,f){return typeof d=="function"?new Te(this):this.map(function(g){return as(g,d,f)})}),Te.prototype.reject=function(d){return this.filter(Gd(be(d)))},Te.prototype.slice=function(d,f){d=Ee(d);var g=this;return g.__filtered__&&(d>0||f<0)?new Te(g):(d<0?g=g.takeRight(-d):d&&(g=g.drop(d)),f!==n&&(f=Ee(f),g=f<0?g.dropRight(-f):g.take(f-d)),g)},Te.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},Te.prototype.toArray=function(){return this.take(le)},uo(Te.prototype,function(d,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),k=/^(?:head|last)$/.test(f),D=O[k?"take"+(f=="last"?"Right":""):f],N=k||/^find/.test(f);D&&(O.prototype[f]=function(){var z=this.__wrapped__,G=k?[1]:arguments,q=z instanceof Te,$=G[0],ee=q||Ae(z),te=function(Fe){var Me=D.apply(O,ur([Fe],G));return k&&de?Me[0]:Me};ee&&g&&typeof $=="function"&&$.length!=1&&(q=ee=!1);var de=this.__chain__,pe=!!this.__actions__.length,ye=N&&!de,Oe=q&&!pe;if(!N&&ee){z=Oe?z:new Te(this);var ve=d.apply(z,G);return ve.__actions__.push({func:Hd,args:[te],thisArg:n}),new Rn(ve,de)}return ye&&Oe?d.apply(this,G):(ve=this.thru(te),ye?k?ve.value()[0]:ve.value():ve)})}),Nn(["pop","push","shift","sort","splice","unshift"],function(d){var f=pd[d],g=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",k=/^(?:pop|shift)$/.test(d);O.prototype[d]=function(){var D=arguments;if(k&&!this.__chain__){var N=this.value();return f.apply(Ae(N)?N:[],D)}return this[g](function(z){return f.apply(Ae(z)?z:[],D)})}}),uo(Te.prototype,function(d,f){var g=O[f];if(g){var k=g.name+"";Ge.call(Hi,k)||(Hi[k]=[]),Hi[k].push({name:f,func:g})}}),Hi[Rd(n,A).name]=[{name:"wrapper",func:n}],Te.prototype.clone=x_,Te.prototype.reverse=S_,Te.prototype.value=C_,O.prototype.at=$U,O.prototype.chain=eW,O.prototype.commit=tW,O.prototype.next=nW,O.prototype.plant=rW,O.prototype.reverse=iW,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=aW,O.prototype.first=O.prototype.head,$a&&(O.prototype[$a]=oW),O},Li=t_();Hr?((Hr.exports=Li)._=Li,sp._=Li):Tt._=Li}).call(mn)}(Rl,Rl.exports);var ef=Rl.exports;const zE={class:"flex gap-8 items-center"},_E=["type","onInput","onKeydown"],HE=Be(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean},masked:{type:Boolean,default:!1}},emits:["update:modelValue","complete","focus"],setup(t,{emit:e}){const n=e,o=t,i=Pe(o,"modelValue"),a=r.ref([]),s=(m,b)=>{const y=m.target;if(o.type==="number"&&!/^[0-9]$/g.test(y.value)){y.value="";return}y.value=y.value.slice(-1),u(y.value,b),a.value[b+1]?a.value[b+1].focus():a.value[b].blur()},l=(m,b)=>{m.preventDefault();const y=m.target;y.value="",u(null,b),a.value[b-1]?a.value[b-1].focus():a.value[b].focus()},c=(m,b)=>{m.preventDefault(),m.key==="ArrowLeft"&&(a.value[b-1]?a.value[b-1].focus():a.value[b].focus()),m.key==="ArrowRight"&&(a.value[b+1]?a.value[b+1].focus():a.value[b].focus())},u=(m,b)=>{i.value=i.value.toSpliced(b,1,m)},p=(m,b)=>{a.value[b]=m};r.onMounted(()=>{const m=Array.from(Array(o.length).fill(null));Array.isArray(i.value)&&i.value.forEach((b,y)=>{b!==null&&y<m.length&&(m[y]=b)}),i.value=m});const h=r.computed(()=>ef.isArray(i.value)?i.value.map(m=>m===null?" ":m).join(""):new Array(o.length).fill(" ").join(""));return r.watch([()=>{var m;return(m=a.value)==null?void 0:m.length},h],()=>{var m,b;((m=a.value)==null?void 0:m.length)>0&&((b=i.value)==null||b.forEach((y,v)=>{v<o.length&&(a.value[v].value=y??"")}))},{immediate:!0,flush:"post"}),r.watch(()=>i.value,()=>{i.value.every(m=>m!==null)&&n("complete",i.value.join(""))}),(m,b)=>(r.openBlock(),r.createElementBlock("div",zE,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.length,(y,v)=>(r.openBlock(),r.createElementBlock("input",{key:y,ref_for:!0,ref:w=>p(w,v),class:r.normalizeClass(["fm-pin-field",{[m.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[v]!==null}]),inputmode:"numeric",type:m.masked?"password":"text",onFocus:b[0]||(b[0]=w=>n("focus")),onInput:w=>s(w,v),onKeydown:[r.withKeys(w=>l(w,v),["backspace"]),r.withKeys(w=>c(w,v),["arrow-left","arrow-right"])]},null,42,_E))),128))]))}}),[["__scopeId","data-v-aec3f93d"]]),UE={class:"fm-radio-btn"},WE={class:"relative flex items-center justify-center w-6 h-6"},jE={class:"fm-radio-btn__input--container"},GE=["checked","disabled","value"],QE={class:"fm-typo-en-body-lg-400"},XE={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},qE=Be(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=Pe(e,"modelValue"),o=r.ref(),i=r.inject(Jh,null),a=r.inject(Ke,null),s=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(a==null?void 0:a.getDisabled())??!1),c=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(u,p)=>{const h=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",UE,[r.createElementVNode("label",{class:r.normalizeClass([{"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value},"space-x-8",u.sublabel?"items-start":"items-center"]),onClick:s},[r.createElementVNode("div",WE,[r.withDirectives((r.openBlock(),r.createElementBlock("div",jE,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:c.value,disabled:l.value,value:u.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,GE)])),[[h,!l.value]])]),r.createElementVNode("div",{class:r.normalizeClass([u.sublabel?"py-0":"py-0.5","space-y-4","flex-1","min-w-0"])},[r.renderSlot(u.$slots,"label",{},()=>[r.createElementVNode("div",QE,r.toDisplayString(u.label),1),u.sublabel?(r.openBlock(),r.createElementBlock("div",XE,r.toDisplayString(u.sublabel),1)):r.createCommentVNode("",!0)],!0)],2)],2)])}}}),[["__scopeId","data-v-9d8dbc91"]]),KE=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!ef.isNil(t)||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Pe(e,"modelValue"),o=r.inject(Ke,null);r.provide(Jh,{groupValue:n,getDisabled:()=>i.value,updateValue(a){n.value=a}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(a,s)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.value,"helper-state":a.helperState,"helper-text":a.helperText,info:a.labelInfo,label:a.label,optional:a.labelMark==="optional",required:a.labelMark==="required",rules:a.rules},r.createSlots({default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":a.inline,"flex flex-col gap-8":!a.inline})},[r.renderSlot(a.$slots,"default")],2)]),_:2},[a.label||a.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"label")]),key:"0"}:void 0,a.helperText||a.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(a.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),tf=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},autofocus:{type:Boolean,default:!1},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>{const{modelValue:m,disabled:b,...y}=e;return y}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),a=Pe(e,"modelValue"),s=r.ref(!1),l=r.ref(),c=r.ref(e.collapsible),u=r.ref(e.collapsible);function p(){c.value=!1,r.nextTick(()=>{var m,b,y,v;(v=(y=(b=(m=l.value)==null?void 0:m.querySelector)==null?void 0:b.call(m,"input"))==null?void 0:y.focus)==null||v.call(y)})}function h(m){if(s.value=m,!!e.collapsible){if(m){u.value=!1;return}c.value=a.value.length===0,c.value&&setTimeout(()=>{u.value=!0},250)}}return(m,b)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createElementVNode("div",{class:r.normalizeClass(["transition-all",{"opacity-100":!m.collapsible||!c.value,"opacity-0 pointer-events-none":m.collapsible&&c.value},m.collapsible&&c.value?"w-9 h-9":"w-full"])},[r.createVNode(Er,r.mergeProps({modelValue:r.unref(a),"onUpdate:modelValue":b[1]||(b[1]=y=>r.isRef(a)?a.value=y:null),disabled:i.value||m.collapsible&&c.value},o.value,{autofocus:e.autofocus,onFocusChanged:h}),r.createSlots({_:2},[!m.collapsible||!s.value?{name:"prepend",fn:r.withCtx(()=>[r.createVNode(ue,{name:"search"})]),key:"0"}:void 0,r.unref(a).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(ue,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:b[0]||(b[0]=y=>a.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","autofocus"])],2),m.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute bottom-0 right-0",c.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:c.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(ke,{icon:"search",variant:"tertiary",onClick:p})],6)):r.createCommentVNode("",!0)],512))}}),JE={key:0,class:"flex fm-typo-en-title-sm-600 items-center justify-between text-fm-color-typo-primary"},YE={key:0},ZE={class:"h-full overflow-y-auto"},$E={key:1,class:"flex gap-8 items-center"},tb=Be(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0},zIndex:{default:void 0},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway"],setup(t){const e=t,n=Pe(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=a=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,transparent:e.noOverlay,onClose:i[1]||(i[1]=a=>n.value=!1),onClickedAway:i[2]||(i[2]=a=>o.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`,e.noOverlay&&"shadow-md"])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",JE,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",YE,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",ZE,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",$E,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-6e83c161"]]);var nf={exports:{}};function nb(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,a,s,l,c;function u(){const m=i,b=a;return i=void 0,a=void 0,c=t.apply(m,b),c}function p(){const m=Date.now()-l;m<e&&m>=0?s=setTimeout(p,e-m):(s=void 0,o||(c=u()))}const h=function(...m){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,a=m,l=Date.now();const b=o&&!s;return s||(s=setTimeout(p,e)),b&&(c=u()),c};return h.clear=()=>{s&&(clearTimeout(s),s=void 0)},h.flush=()=>{s&&h.trigger()},h.trigger=()=>{c=u(),h.clear()},h}nf.exports.debounce=nb,nf.exports=nb;var eB=nf.exports;const of=Ls(eB);var ob={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(a){return n.test(o,a)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,a){a=a||{};var s=0,l=[],c=i.length,u=0,p=0,h=a.pre||"",m=a.post||"",b=a.caseSensitive&&i||i.toLowerCase(),y;o=a.caseSensitive&&o||o.toLowerCase();for(var v=0;v<c;v++)y=i[v],b[v]===o[s]?(y=h+y+m,s+=1,p+=1+p):p=0,u+=p,l[l.length]=y;return s===o.length?(u=b===o?1/0:u,{rendered:l.join(""),score:u}):null},n.filter=function(o,i,a){return!i||i.length===0?[]:typeof o!="string"?i:(a=a||{},i.reduce(function(s,l,c,u){var p=l;a.extract&&(p=a.extract(l));var h=n.match(o,p,a);return h!=null&&(s[s.length]={string:h.rendered,score:h.score,index:c,original:l}),s},[]).sort(function(s,l){var c=l.score-s.score;return c||s.index-l.index}))}})()})(ob);var tB=ob.exports;const nB=Ls(tB);function Fl(t,e){const[n]=nB.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,a,s)=>(i.push({segment:a,isMatch:s%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const oB={class:"flex flex-col gap-4"},rB={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},iB={class:"hidden sm:inline xs:inline"},aB={key:0},sB={key:0,class:"flex flex-col"},lB={class:"flex flex-col"},dB={class:"flex items-center px-24 py-12"},cB={class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},uB=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),fB=["onClick"],pB={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},hB={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},mB={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},gB={key:3,class:"flex flex-col"},bB=["onClick"],yB={class:"flex flex-col gap-4"},vB={key:0,class:"text-fm-color-typo-secondary"},kB={class:"px-16 py-4"},wB=5,xB=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const _=n.recentSearchKey;localStorage.removeItem(_),l.value=[]}function a(){if(!n.recentSearchKey)return;const _=n.recentSearchKey,j=localStorage.getItem(_);if(!j)return[];try{return JSON.parse(j)}catch{return new Array}}const s=of(function(j){if(!n.recentSearchKey)return;const Q=n.recentSearchKey,F=j().trim();if(!Q||!F)return;const S=a()??[],x=[...new Set([F,...S])].slice(0,wB),P=JSON.stringify(x);return localStorage.setItem(Q,P),l.value=x,x},800),l=r.ref(a()),c=Pe(n,"show");r.watch([()=>n.show],()=>{n.show?(h.value=null,n.suggestions&&I()):o("dismiss")});const u=Pe(n,"modelValue"),p=r.ref(n.modelValue);r.watch([()=>p.value],()=>{R()});const h=r.ref(null),m=r.ref(!0),b=r.computed(()=>{var _;return m.value?(_=h.value)==null?void 0:_.slice(0,5):h.value});r.watch([()=>h.value],([])=>{m.value=!0});const y=r.computed(()=>h.value===null),v=r.ref(!1),w=r.ref(""),A=()=>p.value;async function I(){if(!c.value)return;const _=A();if(!_)return;const j=Math.random().toString();if(w.value=j,n.suggestions){h.value=n.suggestions.map(Q=>({label:Fl(_,Q.label),sublabel:Q.sublabel?Fl(_,Q.sublabel):null})).filter(Q=>{var F;return Q.label.matched||((F=Q.sublabel)==null?void 0:F.matched)}),s(A);return}if(n.onSearch)try{v.value=!0;const Q=await n.onSearch(_);j===w.value&&(h.value=Q.map(F=>({label:Fl(_,F.label),sublabel:F.sublabel?Fl(_,F.sublabel):null})))}catch{j===w.value&&(h.value=[])}finally{j===w.value&&(v.value=!1,s(A))}}function V(_){c.value=!1,o("dismiss"),u.value=_}const R=of(I),E=r.computed(()=>l.value&&l.value.length===0),T=r.computed(()=>(!p.value||y.value)&&!E.value),B=r.computed(()=>(!p.value||y.value)&&E.value),H=r.computed(()=>p.value&&h.value&&h.value.length===0);return(_,j)=>(r.openBlock(),r.createBlock(tb,{"model-value":r.unref(c),"onUpdate:modelValue":j[4]||(j[4]=Q=>r.isRef(c)?c.value=Q:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var Q,F;return[r.createElementVNode("div",oB,[r.createElementVNode("div",rB,[r.createElementVNode("div",iB,[r.createVNode(ke,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:j[0]||(j[0]=S=>c.value=!1)})]),r.createVNode(tf,{"model-value":p.value,"onUpdate:modelValue":j[1]||(j[1]=S=>p.value=S),class:"flex-1",placeholder:_.placeholder},null,8,["model-value","placeholder"])]),v.value?(r.openBlock(),r.createElementBlock("div",aB,[r.createVNode(Sr,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[T.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[_.recentSearchKey&&((Q=l.value)!=null&&Q.length)?(r.openBlock(),r.createElementBlock("div",sB,[r.createElementVNode("div",lB,[r.createElementVNode("div",dB,[r.createElementVNode("div",cB,r.toDisplayString(r.unref(U)("search.recent")),1),r.createVNode(Zo),r.createVNode(ke,{label:r.unref(U)("search.clearHistory"),variant:"plain",size:"md",onClick:j[2]||(j[2]=S=>i())},null,8,["label"])]),uB]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(S,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:P=>p.value=S},[r.createVNode(ue,{size:"lg",name:"history"}),r.createElementVNode("div",pB,r.toDisplayString(S),1)],8,fB))),128))])])):r.createCommentVNode("",!0)],64)):B.value?r.renderSlot(_.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",hB,r.toDisplayString(_.hintPlaceholder),1)]):H.value?r.renderSlot(_.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",mB,r.toDisplayString(_.notFoundPlaceholder||`No result found for “${p.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",gB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.value,(S,x)=>r.renderSlot(_.$slots,"search-result-item",r.mergeProps({key:x,ref_for:!0},{result:S}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:P=>V(S.label.label)},[r.createVNode(ue,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",yB,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.label.segments,(P,C)=>(r.openBlock(),r.createElementBlock("span",{key:C,class:r.normalizeClass({"fm-typo-en-body-lg-400":!P.isMatch,"fm-typo-en-body-lg-600":P.isMatch})},r.toDisplayString(P.segment),3))),128))]),S.sublabel?(r.openBlock(),r.createElementBlock("div",vB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.sublabel.segments,(P,C)=>(r.openBlock(),r.createElementBlock("span",{key:C,class:r.normalizeClass({"fm-typo-en-body-md-400":!P.isMatch,"fm-typo-en-body-md-600":P.isMatch})},r.toDisplayString(P.segment),3))),128))])):r.createCommentVNode("",!0)])],8,bB)])),128)),r.createElementVNode("div",kB,[m.value&&(((F=h.value)==null?void 0:F.length)??0)>5?(r.openBlock(),r.createBlock(ke,{key:0,label:`show ${h.value.length-5} more results`,variant:"plain",onClick:j[3]||(j[3]=S=>m.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),SB=["disabled","inputMode","placeholder","readOnly","value"],CB={key:0},AB=["disabled"],DB=["disabled"],EB=Be(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),{isFocused:a,blur:s,focus:l}=la(),c=r.ref(null);let u;const p=E=>{if(E!==""){const T=+E.replace(/,/g,"");return isNaN(T)?null:T}return null},h=E=>u.format(E),m=E=>{if(typeof i.value!="number"){i.value=+i.value;return}if(E>0&&A.value||E<0&&I.value)return;let T=V(i.value)?i.value+E:0;T=b(T),i.value=T},b=E=>e.max!==void 0&&E>e.max?e.max:e.min!==void 0&&E<e.min?e.min:E,y=()=>{var E;i.value=p(((E=c.value)==null?void 0:E.value)??"")},v=E=>{if(![...Array(10).keys()].map(T=>T.toString()).includes(E.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(E.key)){E.preventDefault();return}},w=r.computed(()=>i.value!=null?h(i.value):""),A=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>=e.max),e.min!==void 0&&(E=i.value<e.min),E}),I=r.computed(()=>{let E=!1;return e.max!==void 0&&(E=i.value>e.max),e.min!==void 0&&(E=i.value<=e.min),E});r.onBeforeMount(()=>{u=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function V(E){return typeof E=="number"&&isFinite(E)}const R=()=>{var E;(E=c.value)==null||E.focus()};return(E,T)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":T[8]||(T[8]=B=>r.isRef(i)?i.value=B:null),disabled:o.value,focused:r.unref(a),"helper-state":E.helperState,"helper-text":E.helperText,info:E.labelInfo,label:E.label,optional:E.labelMark==="optional",required:E.labelMark==="required",rules:E.rules,"blame-handler":R},{label:r.withCtx(()=>[r.renderSlot(E.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:B})=>[r.createVNode(at,{"append-icon":E.appendIcon,focused:r.unref(a),invalid:B,"prepend-icon":E.prependIcon,"show-valid-border":E.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(E.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(E.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":E.showSteppers},"flex items-center justify-center"])},[E.appendText?(r.openBlock(),r.createElementBlock("div",CB,r.toDisplayString(E.appendText),1)):r.createCommentVNode("",!0),E.appendIcon?(r.openBlock(),r.createBlock(ue,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:E.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),E.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(a)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||A.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:T[2]||(T[2]=(...H)=>r.unref(s)&&r.unref(s)(...H)),onFocus:T[3]||(T[3]=(...H)=>r.unref(l)&&r.unref(l)(...H)),onMousedown:T[4]||(T[4]=()=>m(E.step))},[r.createVNode(ue,{color:o.value||A.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,AB),r.createElementVNode("button",{disabled:o.value||I.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:T[5]||(T[5]=(...H)=>r.unref(s)&&r.unref(s)(...H)),onFocus:T[6]||(T[6]=(...H)=>r.unref(l)&&r.unref(l)(...H)),onMousedown:T[7]||(T[7]=()=>m(-E.step))},[r.createVNode(ue,{color:o.value||I.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,DB)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:c,disabled:o.value,inputMode:E.inputmode,placeholder:E.placeholder,readOnly:E.readonly,value:w.value,class:"fm-stepper-field--input",type:"text",onBlur:T[0]||(T[0]=(...H)=>r.unref(s)&&r.unref(s)(...H)),onFocus:T[1]||(T[1]=(...H)=>r.unref(l)&&r.unref(l)(...H)),onInput:y,onKeydown:v},null,40,SB)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(E.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-457948be"]]),BB=["disabled","maxlength","minlength","placeholder","readOnly","value"],PB=Be(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),{isFocused:a,focus:s,blur:l}=la(),c=h=>{i.value=h.target.value},u=r.ref(null);Em(u,r.toRef(()=>e.autofocus));const p=()=>{var h;(h=u.value)==null||h.focus()};return(h,m)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":m[2]||(m[2]=b=>r.isRef(i)?i.value=b:null),disabled:o.value,focused:r.unref(a),"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,"blame-handler":p},r.createSlots({label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(a),"fm-textarea__container--invalid":!!r.unref(i)&&b,"fm-textarea__container--valid":h.showValidBorder&&h.showSuccess&&!!r.unref(i)&&!b,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{ref_key:"inputEl",ref:u,class:r.normalizeClass({"fm-textarea--input fm-typo-en-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value,"outline-none":!0}),disabled:o.value,maxlength:h.maxLength,minlength:h.minLength,placeholder:h.placeholder,readOnly:h.readonly,value:r.unref(i),onBlur:m[0]||(m[0]=(...y)=>r.unref(l)&&r.unref(l)(...y)),onFocus:m[1]||(m[1]=(...y)=>r.unref(s)&&r.unref(s)(...y)),onInput:c},null,42,BB)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:2},[h.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-en-body-sm-400"])},r.toDisplayString(h.maxLength?`${r.unref(i).length} / ${h.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-8bc4f92e"]]);var On=(t=>(t.AM="AM",t.PM="PM",t))(On||{});function yn(t){return t.toString().padStart(2,"0")}function OB(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),a=o>11?"PM":"AM";let s=o;return s===0?s=12:s>12&&(s-=12),`${yn(s)}:${yn(i)}:${a}`}function nn(t){const[e,n,o]=OB(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function rf({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${yn(o)}:${yn(e)}`}const IB={class:"flex flex-col gap-8 fm-time-input items-center"},NB=["value","maxlength"],rb=Be(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function a(h){i.value&&(i.value.value=h)}r.watch(()=>n.modelValue,a);function s(h){!/^\d$/.test(h.key)&&!["ArrowLeft","ArrowRight","Backspace","Delete","Tab"].includes(h.key)&&h.preventDefault()}function l(){if(!i.value)return;const h=c(i.value.value);h==null||h<n.min?(a(yn(n.min)),o("update:model-value",n.min)):h>n.max?(a(yn(n.max)),o("update:model-value",n.max)):(a(yn(h)),o("update:model-value",h))}function c(h){return h&&/^\d+$/.test(h)?Number(h):null}function u(){var h;(h=i.value)==null||h.focus(),o("update:model-value",c(n.modelValue)+1)}function p(){var h;(h=i.value)==null||h.focus(),o("update:model-value",c(n.modelValue)-1)}return(h,m)=>(r.openBlock(),r.createElementBlock("div",IB,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:u},[r.createVNode(ue,{name:"expand_less",size:"md"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onKeypress:s,onBlur:l,maxlength:t.max.toString().length},null,40,NB),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:p},[r.createVNode(ue,{name:"expand_more",size:"md"})])]))}}),[["__scopeId","data-v-ced7c472"]]),VB={class:"flex fm-time-input items-center"},RB=r.createElementVNode("div",{class:"fm-typo-en-title-sm-600 w-6 flex items-center justify-center"},[r.createElementVNode("span",null,":")],-1),FB={class:"fm-time-input-periods ml-16"},TB=["onClick"],Tl=r.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(a){const s={hours:a.hours??n.modelValue.hours,minutes:a.minutes??n.modelValue.minutes,period:a.period??n.modelValue.period},l=n.modelValue.hours;(l===12&&s.hours===11||l===11&&s.hours===12)&&(s.period=n.modelValue.period===On.AM?On.PM:On.AM),s.hours>12?s.hours=1:s.hours<1&&(s.hours=12),s.minutes>59?s.minutes=0:s.minutes<0&&(s.minutes=59),o("update:model-value",s)}return(a,s)=>(r.openBlock(),r.createElementBlock("div",VB,[r.createVNode(rb,{"model-value":r.unref(yn)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":s[0]||(s[0]=l=>i({hours:l}))},null,8,["model-value"]),RB,r.createVNode(rb,{"model-value":r.unref(yn)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":s[1]||(s[1]=l=>i({minutes:l}))},null,8,["model-value"]),r.createElementVNode("div",FB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(On),l=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass([{"fm-time-input-period__selected":l===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:l})},r.toDisplayString(l),11,TB))),128))])]))}}),MB={class:"flex gap-8"},LB={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[220px]"},zB={class:"flex items-center justify-center py-16 w-full"},_B={class:"flex justify-end gap-8"},HB=r.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=r.ref(null),s=r.computed(()=>{if(!i.value)return null;const{hours:u,minutes:p,period:h}=nn(i.value);return`${yn(u)}:${yn(p)} ${h}`});function l(){if(!a.value){i.value=null;return}const u=rf(a.value);i.value=u,c.value=!1}r.onMounted(()=>{i.value&&(a.value=nn(i.value))}),r.watch(()=>i.value,u=>{u&&(a.value=nn(u))});const c=r.ref(!1);return r.watchEffect(()=>{o.value||(c.value?a.value=nn(i.value??"00:00"):a.value=i.value?nn(i.value):null)}),(u,p)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":p[3]||(p[3]=h=>r.isRef(i)?i.value=h:null),disabled:o.value,focused:c.value,"helper-state":u.helperState,"helper-text":u.helperText,info:u.labelInfo,label:u.label,optional:u.labelMark==="optional",required:u.labelMark==="required",rules:u.rules,"disable-auto-focus":"",tag:"div"},{label:r.withCtx(()=>[r.renderSlot(u.$slots,"label")]),default:r.withCtx(({invalid:h})=>[r.createVNode(Bo,{disabled:o.value,"show-popover":c.value,"z-index":u.zIndex,onPopoverChanged:p[2]||(p[2]=m=>c.value=m)},{"popover-button":r.withCtx(()=>[u.$slots["trigger-button"]?r.renderSlot(u.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:h,dropdownShowed:c.value,showValidBorder:u.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(at,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:c.value,invalid:h,"show-valid-border":u.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",MB,[r.createVNode(ue,{outline:!c.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!s.value},"grow"])},r.toDisplayString(s.value??u.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",LB,[r.createElementVNode("div",zB,[r.createVNode(Tl,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(On).AM},"onUpdate:modelValue":p[0]||(p[0]=m=>a.value=m)},null,8,["model-value"])]),r.createElementVNode("div",_B,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:p[1]||(p[1]=m=>c.value=!1)},null,8,["label"]),r.createVNode(ke,{label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:l},null,8,["label"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(u.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),UB={class:"flex gap-8"},WB={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[220px]"},jB={class:"flex flex-col gap-16 items-center justify-center w-full pb-16"},GB={class:"fm-typo-en-body-lg-600 text-left w-full"},QB={class:"fm-typo-en-body-lg-600 text-left w-full"},XB={class:"flex gap-8 items-center justify-end"},qB=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},disableTimeCheck:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(Ke,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=Pe(e,"modelValue"),a=r.ref(null),s=r.ref(null),l=r.computed(()=>{const v=Array.isArray(i.value);return!i.value||!v||v&&i.value.every(w=>!b(w))?null:i.value.map(w=>{const{hours:A,minutes:I,period:V}=nn(w);return`${yn(A)}:${yn(I)} ${V}`}).join(" - ")});function c(){if(!a.value||!s.value){i.value=null;return}const v=a.value,w=s.value,A=v.period===On.PM&&w.period===On.AM,V=!(v.period===On.PM&&v.hours===12&&w.period===On.PM&&w.hours!==12)&&v.period===w.period&&(v.hours>w.hours||v.hours===w.hours&&v.minutes>w.minutes),R=!e.disableTimeCheck&&(A||V),E=rf(a.value),T=rf(s.value);i.value=R?[T,E]:[E,T],p()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(v=>!!v)&&(a.value=nn(i.value[0]),s.value=nn(i.value[1]))}),r.watch(()=>i.value,v=>{const w=Array.isArray(v);v&&w&&v.every(A=>b(A))&&(a.value=nn(v[0]),s.value=nn(v[1]))});const u=r.ref();function p(){var v;(v=u.value)==null||v.hide()}const h=r.ref(!1);function m(v){var w,A,I,V;v?(a.value=nn(((I=i.value)==null?void 0:I[0])??"00:00"),s.value=nn(((V=i.value)==null?void 0:V[1])??"23:59")):(a.value=(w=i.value)!=null&&w[0]?nn(i.value[0]):null,s.value=(A=i.value)!=null&&A[1]?nn(i.value[1]):null),h.value=v}const b=v=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(v),y=r.computed(()=>e.disableTimeCheck?!1:Vt(a.value,s.value));return(v,w)=>(r.openBlock(),r.createBlock(Nt,{modelValue:r.unref(i),"onUpdate:modelValue":w[2]||(w[2]=A=>r.isRef(i)?i.value=A:null),disabled:o.value,focused:h.value,"helper-state":v.helperState,"helper-text":v.helperText,info:v.labelInfo,label:v.label,optional:v.labelMark==="optional",required:v.labelMark==="required",rules:v.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(v.$slots,"label")]),default:r.withCtx(({invalid:A})=>[r.createVNode(Bo,{ref_key:"dropdownRef",ref:u,"show-popover":h.value,width:343,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[v.$slots["trigger-button"]?r.renderSlot(v.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:A,dropdownShowed:h.value,showValidBorder:v.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(at,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:h.value,invalid:A,"show-valid-border":v.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",UB,[r.createVNode(ue,{outline:!h.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??v.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",WB,[r.createElementVNode("div",jB,[r.createElementVNode("div",null,[r.createElementVNode("div",GB,r.toDisplayString(r.unref(U)("time.start")),1),r.createVNode(Tl,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(On).AM},"onUpdate:modelValue":w[0]||(w[0]=I=>a.value=I)},null,8,["model-value"])]),r.createElementVNode("div",null,[r.createElementVNode("div",QB,r.toDisplayString(r.unref(U)("time.end")),1),r.createVNode(Tl,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(On).AM},"onUpdate:modelValue":w[1]||(w[1]=I=>s.value=I)},null,8,["model-value"])])]),r.createElementVNode("div",XB,[r.createVNode(ke,{label:r.unref(U)("actions.cancel"),size:"md",variant:"tertiary",onClick:p},null,8,["label"]),r.createVNode(ke,{disabled:y.value,label:r.unref(U)("actions.apply"),size:"md",variant:"primary",onClick:c},null,8,["disabled","label"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(v.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),af=Be(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t,{expose:e}){const n=r.ref(null);return e({element:n}),(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"element",ref:n,class:r.normalizeClass({"fm-list--separator":o.separator,activeClass:o.activeClass})},[r.renderSlot(o.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-266d01d7"]]),sf=Be(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;function n(o){e.disabled&&o.stopImmediatePropagation()}return(o,i)=>{const a=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":o.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":o.clickable&&!o.disabled,"cursor-not-allowed":o.clickable&&o.disabled}),onClick:r.withModifiers(n,["prevent"])},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend",{},void 0,!0),r.renderSlot(o.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(o.label),3),o.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${o.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(o.sublabel),3)):r.createCommentVNode("",!0)])],!0),o.$slots.append?(r.openBlock(),r.createBlock(Zo,{key:0})):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[a,o.clickable&&!o.disabled]])}}}),[["__scopeId","data-v-90c2ba0a"]]);function KB(t){for(;t;){if(JB(t))return t;t=t.parentElement}return document.scrollingElement}function JB(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class YB{constructor(e,n){ie(this,"onScroll");ie(this,"scrollParent");this.onScroll=n,this.scrollParent=KB(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const ZB={class:"fm-menu__wrapper"},$B=Be(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),a=r.ref(null),s=r.ref(null),{floatingStyles:l}=ci(a,s,{middleware:[si(4),li()],placement:o.placement,whileElementsMounted:ai});let c;const u=n;e({show:()=>{i.value||(i.value=!0,u("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,u("dropdown-changed",i.value))}});const p=b=>{b.preventDefault(),b.stopPropagation(),!o.disabled&&(i.value=!i.value,u("dropdown-changed",i.value))},h=b=>{if(!i.value)return;const y=b.path||b.composedPath();for(const v of y)if(v==a.value||v==s.value)return;i.value=!1,u("dropdown-changed",i.value)},m=()=>{u("dropdown-changed",!1)};return r.watch(()=>o.showMenu,b=>i.value=b),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",h),c=new YB(a.value,m),c.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",h),c.unbindScroll()}),(b,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:a,class:"fm-menu",onClick:p},[r.renderSlot(b.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:s,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(b.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",ZB,[r.renderSlot(b.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),eP={class:"fm-typo-en-body-md-600 mx-8 p-8 text-fm-color-typo-secondary"},tP=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",eP,r.toDisplayString(e.label),1))}}),nP=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),oP={class:"relative"},rP={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},iP=nP(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),aP=Be(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(ia(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",oP,[r.createElementVNode("div",rP,[iP,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-6d0e6490"]]),sP={class:"flex fm-typo-en-title-md-600 items-center justify-between text-fm-color-typo-primary pb-16"},lP={key:0},dP={class:"h-full overflow-y-auto"},cP={key:0,class:"pt-24"},uP=Be(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0},zIndex:{default:void 0},isContainer:{default:"div"},isContainerProps:{default:()=>({})},closeIcon:{default:"close"},noOverlay:{type:Boolean,default:!1}},emits:["update:modelValue","on:clickedAway","on:close"],setup(t,{expose:e,emit:n}){const o=t,i=n,a=Pe(o,"modelValue"),s=r.ref(),l=()=>{a.value=!1,i("on:close")};return e({containerRef:s}),(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:u[0]||(u[0]=p=>a.value=!0)},[r.renderSlot(c.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(fi,{key:0,"dismiss-away":o.dismissAway,"z-index":o.zIndex,transparent:o.noOverlay,onClose:l,onClickedAway:u[1]||(u[1]=p=>c.$emit("on:clickedAway"))},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.isContainer),r.mergeProps({ref_key:"containerRef",ref:s,class:[[!c.maxWidth&&"max-w-[400px]",o.noOverlay&&"shadow-md"],"fm-side-sheet xs:w-full"],style:{maxWidth:`${c.maxWidth}px`}},c.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",sP,[r.renderSlot(c.$slots,"side-sheet-header",{},()=>[c.header?(r.openBlock(),r.createElementBlock("div",lP,r.toDisplayString(c.header),1)):r.createCommentVNode("",!0)],!0),c.closeButton?(r.openBlock(),r.createBlock(ue,{key:0,name:c.closeIcon,class:"cursor-pointer",size:"md",onClick:l},null,8,["name"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",dP,[r.renderSlot(c.$slots,"default",{},void 0,!0)]),c.$slots["side-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",cP,[r.renderSlot(c.$slots,"side-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index","transparent"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-d5a939ad"]]),fP={class:"flex items-center"},pP={key:1,class:"flex items-center mx-12"},hP={key:0,class:"mt-8"},ib=Be(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0},zIndex:{type:Number,default:1e3},spinner:{type:Boolean,default:!1}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),a=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),s=r.computed(()=>n.bgColor?ia(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?ia(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(c,u)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({style:{zIndex:t.zIndex},class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"},s.value),[r.createElementVNode("div",fP,[i.value.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:n.color??i.value.icon.color,name:i.value.icon.name,class:"mr-12"},null,8,["color","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${a.value.classes} grow ellipsis mr-16`)},r.toDisplayString(a.value.text),3),t.spinner?(r.openBlock(),r.createElementBlock("div",pP,[r.createVNode(ue,{class:"animate-spin",name:"progress_activity"})])):r.createCommentVNode("",!0),n.dismissable?(r.openBlock(),r.createBlock(ue,{key:2,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:u[0]||(u[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",hP,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(c.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"mt-16 fm-typo-en-body-lg-600"},l.value),[r.createElementVNode("span",{class:"cursor-pointer",onClick:u[1]||(u[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-65fce1f3"]]),mP={class:r.normalizeClass(["fm-step-description","text-fm-color-typo-secondary","fm-typo-en-body-md-400 line-clamp-1","mt-4"])},lf=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([t.disabled?"text-fm-color-typo-disabled":"","flex flex-col"])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([t.titleBold?"fm-typo-en-title-md-600":"fm-typo-en-body-md-400","fm-step-title line-clamp-2"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",mP,r.toDisplayString(t.description),1)])],2))}}),gP=["data-title","data-description","data-disabled"],bP={class:"flex flex-col fm-step-container grow"},yP={class:"fm-step-container-content"},vP=Be(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(Yh);function i(){a.value||o(e.value)}const a=r.computed(()=>e.disabled?e.disabled():!1),s=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),c=r.computed(()=>e.complete()),u=r.computed(()=>l.value||c.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),p=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:s.value?{config:{name:"warning",color:"system-error-300"}}:a.value?{className:"border-2 border-fm-color-neutral-gray-200"}:c.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(h,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":a.value,class:r.normalizeClass(`fm-step gap-4 grow ${a.value?"cursor-not-allowed":"cursor-pointer"}`)},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${u.value}`)},null,2)]),r.createElementVNode("div",bP,[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:"flex gap-12",onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",p.value.className])},[p.value.config?(r.openBlock(),r.createBlock(ue,{key:0,name:p.value.config.name,color:p.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(lf,{title:t.title,description:t.description,disabled:a.value,class:"grow"},null,8,["title","description","disabled"])])),[[b,!a.value]]),r.createElementVNode("div",yP,[r.renderSlot(h.$slots,"default",{},void 0,!0)])])],10,gP)}}}),[["__scopeId","data-v-113e7095"]]),kP={class:"hidden items-center xs:flex"},wP={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},xP=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=p=>{o("update:model-value",p)};r.provide(Yh,{currentStep:()=>n.modelValue,goToStep:i});const a=r.ref(),s=r.ref([]),l=r.computed(()=>s.value[n.modelValue-1]),c=r.computed(()=>`${n.modelValue} of ${s.value.length}`),u=()=>{var h;const p=Array.from(((h=a.value)==null?void 0:h.querySelectorAll(":scope > .fm-step"))??[]);s.value=p.map(m=>({title:m.dataset.title??"",description:m.dataset.description,disabled:m.dataset.disabled=="true"}))};return r.onMounted(()=>{u()}),(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:a,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(p.$slots,"default")],2),r.createElementVNode("div",kP,[r.createVNode(Sr,{"current-step":t.modelValue,"total-steps":s.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(lf,{key:0,class:"grow","title-bold":"",title:l.value.title,description:l.value.description,disabled:l.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),p.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(p.$slots,"contents"),r.createElementVNode("div",wP,[r.renderSlot(p.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let SP=0;function CP(){return SP++}const AP=t=>(r.pushScopeId("data-v-dfbdb871"),t=t(),r.popScopeId(),t),DP=["disabled"],EP={key:1,class:"ml-4"},BP={key:0,class:"ml-4"},PP={key:0,class:r.normalizeClass(["block","absolute bottom-0 left-0","h-0.5 w-full"])},OP=[AP(()=>r.createElementVNode("span",{class:r.normalizeClass(["block","bg-fm-color-primary rounded-xxxl","w-full h-full"])},null,-1))],ab=Be(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>CP()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,a=r.ref(!1);function s(h){n.value=h}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},c=h=>{o.children.length!==0&&(a.value=h)},u=r.computed(()=>o.children.length>0?o.children.some(h=>h.value===o.modelValue):o.modelValue===o.value),p=h=>{a.value=!1,i("update:modelValue",h)};return(h,m)=>{const b=r.resolveDirective("wave");return r.openBlock(),r.createBlock(io,{class:r.normalizeClass([{"w-full":h.vertical},"flex-shrink-0 max-w-[360px] min-w-[90px] rounded-sm"]),disabled:h.children.length===0,placement:h.vertical?"right-start":"bottom-start","show-menu":a.value,onMenuChanged:c},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass([h.vertical?["px-16 py-8"]:["px-8 pt-8"],h.vertical?["max-w-[360px] w-full"]:["min-w-[90px] max-w-[360px]"]]),disabled:h.disabled,type:"button",onClick:l,onMousedown:m[0]||(m[0]=()=>s(!0)),onMouseleave:m[1]||(m[1]=()=>s(!1)),onMouseup:m[2]||(m[2]=()=>s(!1))},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",h.vertical?["justify-start"]:["justify-center"],"relative"])},[r.createElementVNode("span",{class:r.normalizeClass([[h.vertical&&"w-full"],"block"])},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",!h.vertical&&"pb-1.5",h.vertical&&"w-full"])},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["rounded-xxxl",!h.vertical&&"hover:bg-fm-color-opacity-sm group",h.vertical&&"w-full"]),type:"button"},[r.createElementVNode("button",{class:r.normalizeClass(["relative","flex items-center","px-8",h.vertical?"py-1":"py-1.5 space-x-8",h.vertical&&"w-full"]),type:"button"},[r.renderSlot(h.$slots,"prepend",{},void 0,!0),h.icon?(r.openBlock(),r.createBlock(ue,{key:0,color:h.disabled?"neutral-gray-200":u.value?"primary":"neutral-black",name:h.icon,outline:!n.value&&!u.value,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400",h.disabled?"text-fm-color-typo-disabled":u.value?"text-fm-color-primary":"text-fm-color-typo-secondary"])},r.toDisplayString(h.label),3),h.badge&&h.vertical?(r.openBlock(),r.createElementBlock("span",EP,[r.createVNode(Yo,{value:h.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0),h.children.length>0?(r.openBlock(),r.createBlock(ue,{key:2,class:r.normalizeClass(["text-fm-color-neutral-gray-400",h.vertical&&"block ml-auto"]),name:a.value?"expand_less":"expand_more",size:"md"},null,8,["class","name"])):r.createCommentVNode("",!0),r.renderSlot(h.$slots,"append",{},void 0,!0)],2)],2)),[[b,h.vertical?!1:{color:"rgba(28, 28, 30, 0.16)"}]]),h.badge&&!h.vertical?(r.openBlock(),r.createElementBlock("span",BP,[r.createVNode(Yo,{value:h.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0)],2),u.value&&!h.vertical?(r.openBlock(),r.createElementBlock("span",PP,OP)):r.createCommentVNode("",!0)],2)],2)],42,DP)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.children,y=>(r.openBlock(),r.createBlock(St,{key:y.value,disabled:y.disabled,icon:y.icon,label:y.label,"model-value":o.modelValue===y.value,onClick:v=>p(y.value)},{append:r.withCtx(()=>[y.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:y.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["disabled","icon","label","model-value","onClick"]))),128))]),_:3},8,["class","disabled","placement","show-menu"])}}}),[["__scopeId","data-v-dfbdb871"]]),IP={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},NP={class:"flex flex-1 gap-8"},VP=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=Jo(),o=r.computed(()=>{const l=[];e.searchable&&l.push({label:"Search",icon:"search",key:"search"}),e.filterable&&l.push({label:"Filter",icon:"filter_alt",key:"filter"});const c=l.concat(e.actions);if(n.value.xs){const[y,v,w,...A]=c;return A.length===0?{actionButtons:[y,v,w].filter(I=>I),collapse:A}:{actionButtons:[y,v].filter(I=>I),collapse:[w,...A]}}const[u,p,h,m,...b]=c;return b.length===0?{actionButtons:[u,p,h,m].filter(y=>y),collapse:b}:{actionButtons:[u,p,h].filter(y=>y),collapse:[m,...b]}}),i=r.ref(!1);function a(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const s=Pe(e,"searchModel");return(l,c)=>(r.openBlock(),r.createElementBlock("div",IP,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(zc,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:c[0]||(c[0]=u=>l.$emit("click:remove-chip",u))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",NP,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,u=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:u.key},[u.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(tf,{"model-value":r.unref(s),"onUpdate:modelValue":c[1]||(c[1]=p=>r.isRef(s)?s.value=p:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${u.key}`,{key:1},()=>[r.createVNode(ke,{"prepend-icon":u.icon,variant:"tertiary",onClick:p=>l.$emit(`click:action-${u.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(io,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(ke,{"prepend-icon":"more_vert",variant:"tertiary",onClick:a})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(St,{key:u.key,label:u.label,icon:u.icon,onClick:p=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),l.$slots.append?r.renderSlot(l.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(_c,{modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=u=>i.value=u),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(af,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,u=>(r.openBlock(),r.createBlock(sf,{key:u.key,label:u.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:p=>{l.$emit(`click:action-${u.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var RP={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.19.5 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.2.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.2.13676358",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1740",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20251102.99.1",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12724",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.9/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.3/x64",GITHUB_RUN_ID:"19236355523",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"513206f4794f3e1a4a5083bfdc21fe8eaa13c1a3",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/main",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.5/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_d0fbb4d3-2a90-4e6b-aa0b-cbc18a9c844b",INVOCATION_ID:"c48c49c7efda4d74a71c95a5983af255",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"318",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000026175",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_dependencies__feedmepos_core:"^2.10.12",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.8.4",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"513206f4794f3e1a4a5083bfdc21fe8eaa13c1a3",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function sr(t,e){return typeof t=="function"?t(e):t}function vn(t,e){return n=>{e.setState(o=>({...o,[t]:sr(n,o[t])}))}}function Ml(t){return t instanceof Function}function FP(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function TP(t,e){const n=[],o=i=>{i.forEach(a=>{n.push(a);const s=e(a);s!=null&&s.length&&o(s)})};return o(t),n}function me(t,e,n){let o=[],i;return a=>{let s;n.key&&n.debug&&(s=Date.now());const l=t(a);if(!(l.length!==o.length||l.some((p,h)=>o[h]!==p)))return i;o=l;let u;if(n.key&&n.debug&&(u=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const p=Math.round((Date.now()-s)*100)/100,h=Math.round((Date.now()-u)*100)/100,m=h/16,b=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%c⏱ ${b(h,5)} /${b(p,5)} ms`,`
115
115
  font-size: .6rem;
116
116
  font-weight: bold;
117
117
  color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function ge(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:RP.env.NODE_ENV==="development",onChange:o}}function MP(t,e,n,o){const i=()=>{var s;return(s=a.getValue())!=null?s:t.options.renderFallbackValue},a={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:me(()=>[t,n,e,a],(s,l,c,u)=>({table:s,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(t.options,"debugCells"))};return t._features.forEach(s=>{s.createCell==null||s.createCell(a,n,e,t)},{}),a}function LP(t,e,n,o){var i,a;const l={...t._getDefaultColumnDef(),...e},c=l.accessorKey;let u=(i=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,p;if(l.accessorFn?p=l.accessorFn:c&&(c.includes(".")?p=m=>{let b=m;for(const v of c.split(".")){var y;b=(y=b)==null?void 0:y[v]}return b}:p=m=>m[l.accessorKey]),!u)throw new Error;let h={id:`${String(u)}`,accessorFn:p,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:me(()=>[!0],()=>{var m;return[h,...(m=h.columns)==null?void 0:m.flatMap(b=>b.getFlatColumns())]},ge(t.options,"debugColumns")),getLeafColumns:me(()=>[t._getOrderColumnsFn()],m=>{var b;if((b=h.columns)!=null&&b.length){let y=h.columns.flatMap(v=>v.getLeafColumns());return m(y)}return[h]},ge(t.options,"debugColumns"))};for(const m of t._features)m.createColumn==null||m.createColumn(h,t);return h}const Ut="debugHeaders";function sb(t,e,n){var o;let a={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),s.push(c)};return l(a),s},getContext:()=>({table:t,header:a,column:e})};return t._features.forEach(s=>{s.createHeader==null||s.createHeader(a,t)}),a}const zP={createTable:t=>{t.getHeaderGroups=me(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var a,s;const l=(a=o==null?void 0:o.map(h=>n.find(m=>m.id===h)).filter(Boolean))!=null?a:[],c=(s=i==null?void 0:i.map(h=>n.find(m=>m.id===h)).filter(Boolean))!=null?s:[],u=n.filter(h=>!(o!=null&&o.includes(h.id))&&!(i!=null&&i.includes(h.id)));return Ll(e,[...l,...u,...c],t)},ge(t.options,Ut)),t.getCenterHeaderGroups=me(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(a=>!(o!=null&&o.includes(a.id))&&!(i!=null&&i.includes(a.id))),Ll(e,n,t,"center")),ge(t.options,Ut)),t.getLeftHeaderGroups=me(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const a=(i=o==null?void 0:o.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?i:[];return Ll(e,a,t,"left")},ge(t.options,Ut)),t.getRightHeaderGroups=me(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const a=(i=o==null?void 0:o.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?i:[];return Ll(e,a,t,"right")},ge(t.options,Ut)),t.getFooterGroups=me(()=>[t.getHeaderGroups()],e=>[...e].reverse(),ge(t.options,Ut)),t.getLeftFooterGroups=me(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),ge(t.options,Ut)),t.getCenterFooterGroups=me(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),ge(t.options,Ut)),t.getRightFooterGroups=me(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),ge(t.options,Ut)),t.getFlatHeaders=me(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,Ut)),t.getLeftFlatHeaders=me(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,Ut)),t.getCenterFlatHeaders=me(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,Ut)),t.getRightFlatHeaders=me(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,Ut)),t.getCenterLeafHeaders=me(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),ge(t.options,Ut)),t.getLeftLeafHeaders=me(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),ge(t.options,Ut)),t.getRightLeafHeaders=me(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),ge(t.options,Ut)),t.getLeafHeaders=me(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,a,s,l,c,u;return[...(i=(a=e[0])==null?void 0:a.headers)!=null?i:[],...(s=(l=n[0])==null?void 0:l.headers)!=null?s:[],...(c=(u=o[0])==null?void 0:u.headers)!=null?c:[]].map(p=>p.getLeafHeaders()).flat()},ge(t.options,Ut))}};function Ll(t,e,n,o){var i,a;let s=0;const l=function(m,b){b===void 0&&(b=1),s=Math.max(s,b),m.filter(y=>y.getIsVisible()).forEach(y=>{var v;(v=y.columns)!=null&&v.length&&l(y.columns,b+1)},0)};l(t);let c=[];const u=(m,b)=>{const y={depth:b,id:[o,`${b}`].filter(Boolean).join("_"),headers:[]},v=[];m.forEach(w=>{const A=[...v].reverse()[0],I=w.column.depth===y.depth;let V,R=!1;if(I&&w.column.parent?V=w.column.parent:(V=w.column,R=!0),A&&(A==null?void 0:A.column)===V)A.subHeaders.push(w);else{const E=sb(n,V,{id:[o,b,V.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${v.filter(T=>T.column===V).length}`:void 0,depth:b,index:v.length});E.subHeaders.push(w),v.push(E)}y.headers.push(w),w.headerGroup=y}),c.push(y),b>0&&u(v,b-1)},p=e.map((m,b)=>sb(n,m,{depth:s,index:b}));u(p,s-1),c.reverse();const h=m=>m.filter(y=>y.column.getIsVisible()).map(y=>{let v=0,w=0,A=[0];y.subHeaders&&y.subHeaders.length?(A=[],h(y.subHeaders).forEach(V=>{let{colSpan:R,rowSpan:E}=V;v+=R,A.push(E)})):v=1;const I=Math.min(...A);return w=w+I,y.colSpan=v,y.rowSpan=w,{colSpan:v,rowSpan:w}});return h((i=(a=c[0])==null?void 0:a.headers)!=null?i:[]),c}const df=(t,e,n,o,i,a,s)=>{let l={id:e,index:o,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=t.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,o),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=t.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:t.options.renderFallbackValue},subRows:[],getLeafRows:()=>TP(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const p=u.getParentRow();if(!p)break;c.push(p),u=p}return c.reverse()},getAllCells:me(()=>[t.getAllLeafColumns()],c=>c.map(u=>MP(t,l,u,u.id)),ge(t.options,"debugRows")),_getAllCellsByColumnId:me(()=>[l.getAllCells()],c=>c.reduce((u,p)=>(u[p.column.id]=p,u),{}),ge(t.options,"debugRows"))};for(let c=0;c<t._features.length;c++){const u=t._features[c];u==null||u.createRow==null||u.createRow(l,t)}return l},_P={createColumn:(t,e)=>{t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},lb=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};lb.autoRemove=t=>Qn(t);const db=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};db.autoRemove=t=>Qn(t);const cb=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};cb.autoRemove=t=>Qn(t);const ub=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};ub.autoRemove=t=>Qn(t)||!(t!=null&&t.length);const fb=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});fb.autoRemove=t=>Qn(t)||!(t!=null&&t.length);const pb=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});pb.autoRemove=t=>Qn(t)||!(t!=null&&t.length);const hb=(t,e,n)=>t.getValue(e)===n;hb.autoRemove=t=>Qn(t);const mb=(t,e,n)=>t.getValue(e)==n;mb.autoRemove=t=>Qn(t);const cf=(t,e,n)=>{let[o,i]=n;const a=t.getValue(e);return a>=o&&a<=i};cf.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,a=e===null||Number.isNaN(o)?-1/0:o,s=n===null||Number.isNaN(i)?1/0:i;if(a>s){const l=a;a=s,s=l}return[a,s]},cf.autoRemove=t=>Qn(t)||Qn(t[0])&&Qn(t[1]);const Io={includesString:lb,includesStringSensitive:db,equalsString:cb,arrIncludes:ub,arrIncludesAll:fb,arrIncludesSome:pb,equals:hb,weakEquals:mb,inNumberRange:cf};function Qn(t){return t==null||t===""}const HP={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:vn("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?Io.includesString:typeof o=="number"?Io.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Io.equals:Array.isArray(o)?Io.arrIncludes:Io.weakEquals},t.getFilterFn=()=>{var n,o;return Ml(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:Io[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),a=o==null?void 0:o.find(p=>p.id===t.id),s=sr(n,a?a.value:void 0);if(gb(i,s,t)){var l;return(l=o==null?void 0:o.filter(p=>p.id!==t.id))!=null?l:[]}const c={id:t.id,value:s};if(a){var u;return(u=o==null?void 0:o.map(p=>p.id===t.id?c:p))!=null?u:[]}return o!=null&&o.length?[...o,c]:[c]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var a;return(a=sr(e,i))==null?void 0:a.filter(s=>{const l=n.find(c=>c.id===s.id);if(l){const c=l.getFilterFn();if(gb(c,s.value,l))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function gb(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const uf={sum:(t,e,n)=>n.reduce((o,i)=>{const a=i.getValue(t);return o+(typeof a=="number"?a:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const a=i.getValue(t);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const a=i.getValue(t);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(a=>{const s=a.getValue(t);s!=null&&(o===void 0?s>=s&&(o=i=s):(o>s&&(o=s),i<s&&(i=s)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let a=i.getValue(t);a!=null&&(a=+a)>=a&&(++n,o+=a)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(a=>a.getValue(t));if(!FP(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((a,s)=>a-s);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},UP={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:vn("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o;return((n=t.columnDef.enableGrouping)!=null?n:!0)&&((o=e.options.enableGrouping)!=null?o:!0)&&(!!t.accessorFn||!!t.columnDef.getGroupingValue)},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return uf.sum;if(Object.prototype.toString.call(o)==="[object Date]")return uf.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return Ml(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:uf[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function WP(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(a=>!e.includes(a.id));return n==="remove"?o:[...e.map(a=>t.find(s=>s.id===a)).filter(Boolean),...o]}const jP={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:vn("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=me(n=>[_a(e,n)],n=>n.findIndex(o=>o.id===t.id),ge(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var o;return((o=_a(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=_a(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=me(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let a=[];if(!(e!=null&&e.length))a=i;else{const s=[...e],l=[...i];for(;l.length&&s.length;){const c=s.shift(),u=l.findIndex(p=>p.id===c);u>-1&&a.push(l.splice(u,1)[0])}a=[...a,...l]}return WP(a,n,o)},ge(t.options,"debugTable"))}},ff=()=>({left:[],right:[]}),GP={getInitialState:t=>({columnPinning:ff(),...t}),getDefaultOptions:t=>({onColumnPinningChange:vn("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var a,s;if(n==="right"){var l,c;return{left:((l=i==null?void 0:i.left)!=null?l:[]).filter(h=>!(o!=null&&o.includes(h))),right:[...((c=i==null?void 0:i.right)!=null?c:[]).filter(h=>!(o!=null&&o.includes(h))),...o]}}if(n==="left"){var u,p;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(h=>!(o!=null&&o.includes(h))),...o],right:((p=i==null?void 0:i.right)!=null?p:[]).filter(h=>!(o!=null&&o.includes(h)))}}return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(h=>!(o!=null&&o.includes(h))),right:((s=i==null?void 0:i.right)!=null?s:[]).filter(h=>!(o!=null&&o.includes(h)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,a,s;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((a=(s=e.options.enableColumnPinning)!=null?s:e.options.enablePinning)!=null?a:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(l=>l.id),{left:o,right:i}=e.getState().columnPinning,a=n.some(l=>o==null?void 0:o.includes(l)),s=n.some(l=>i==null?void 0:i.includes(l));return a?"left":s?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.getCenterVisibleCells=me(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const a=[...o??[],...i??[]];return n.filter(s=>!a.includes(s.column.id))},ge(e.options,"debugRows")),t.getLeftVisibleCells=me(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(a=>n.find(s=>s.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),ge(e.options,"debugRows")),t.getRightVisibleCells=me(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(a=>n.find(s=>s.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),ge(e.options,"debugRows"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?ff():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:ff())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,a;return!!((i=o.left)!=null&&i.length||(a=o.right)!=null&&a.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=me(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),ge(t.options,"debugColumns")),t.getRightLeafColumns=me(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),ge(t.options,"debugColumns")),t.getCenterLeafColumns=me(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(a=>!i.includes(a.id))},ge(t.options,"debugColumns"))}},zl={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pf=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),QP={getDefaultColumnDef:()=>zl,getInitialState:t=>({columnSizing:{},columnSizingInfo:pf(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:vn("columnSizing",t),onColumnSizingInfoChange:vn("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const a=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:zl.minSize,(o=a??t.columnDef.size)!=null?o:zl.size),(i=t.columnDef.maxSize)!=null?i:zl.maxSize)},t.getStart=me(n=>[n,_a(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,a)=>i+a.getSize(),0),ge(e.options,"debugColumns")),t.getAfter=me(n=>[n,_a(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,a)=>i+a.getSize(),0),ge(e.options,"debugColumns")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var a;n+=(a=i.column.getSize())!=null?a:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return a=>{if(!o||!i||(a.persist==null||a.persist(),hf(a)&&a.touches&&a.touches.length>1))return;const s=t.getSize(),l=t?t.getLeafHeaders().map(A=>[A.column.id,A.column.getSize()]):[[o.id,o.getSize()]],c=hf(a)?Math.round(a.touches[0].clientX):a.clientX,u={},p=(A,I)=>{typeof I=="number"&&(e.setColumnSizingInfo(V=>{var R,E;const T=e.options.columnResizeDirection==="rtl"?-1:1,B=(I-((R=V==null?void 0:V.startOffset)!=null?R:0))*T,H=Math.max(B/((E=V==null?void 0:V.startSize)!=null?E:0),-.999999);return V.columnSizingStart.forEach(_=>{let[j,Q]=_;u[j]=Math.round(Math.max(Q+Q*H,0)*100)/100}),{...V,deltaOffset:B,deltaPercentage:H}}),(e.options.columnResizeMode==="onChange"||A==="end")&&e.setColumnSizing(V=>({...V,...u})))},h=A=>p("move",A),m=A=>{p("end",A),e.setColumnSizingInfo(I=>({...I,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},b=n||typeof document<"u"?document:null,y={moveHandler:A=>h(A.clientX),upHandler:A=>{b==null||b.removeEventListener("mousemove",y.moveHandler),b==null||b.removeEventListener("mouseup",y.upHandler),m(A.clientX)}},v={moveHandler:A=>(A.cancelable&&(A.preventDefault(),A.stopPropagation()),h(A.touches[0].clientX),!1),upHandler:A=>{var I;b==null||b.removeEventListener("touchmove",v.moveHandler),b==null||b.removeEventListener("touchend",v.upHandler),A.cancelable&&(A.preventDefault(),A.stopPropagation()),m((I=A.touches[0])==null?void 0:I.clientX)}},w=XP()?{passive:!1}:!1;hf(a)?(b==null||b.addEventListener("touchmove",v.moveHandler,w),b==null||b.addEventListener("touchend",v.upHandler,w)):(b==null||b.addEventListener("mousemove",y.moveHandler,w),b==null||b.addEventListener("mouseup",y.upHandler,w)),e.setColumnSizingInfo(A=>({...A,startOffset:c,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?pf():(n=t.initialState.columnSizingInfo)!=null?n:pf())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let _l=null;function XP(){if(typeof _l=="boolean")return _l;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return _l=t,_l}function hf(t){return t.type==="touchstart"}const qP={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:vn("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(a=>a.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=me(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),ge(e.options,"debugRows")),t.getVisibleCells=me(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],ge(e.options,"debugRows"))},createTable:t=>{const e=(n,o)=>me(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(t.options,"debugColumns"));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,a)=>({...i,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function _a(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const KP={createTable:t=>{t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},JP={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:vn("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getCanGlobalFilter=()=>{var n,o,i,a;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((a=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?a:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>Io.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return Ml(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:Io[o]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},YP={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:vn("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,a;t.setExpanded(o?{}:(i=(a=t.initialState)==null?void 0:a.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(a=>{const s=a.split(".");o=Math.max(o,s.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const a=o===!0?!0:!!(o!=null&&o[t.id]);let s={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(l=>{s[l]=!0}):s=o,n=(i=n)!=null?i:!a,!a&&n)return{...s,[t.id]:!0};if(a&&!n){const{[t.id]:l,...c}=s;return c}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},mf=0,gf=10,bf=()=>({pageIndex:mf,pageSize:gf}),ZP={getInitialState:t=>({...t,pagination:{...bf(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:vn("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=a=>sr(o,a);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?bf():(i=t.initialState.pagination)!=null?i:bf())},t.setPageIndex=o=>{t.setPagination(i=>{let a=sr(o,i.pageIndex);const s=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return a=Math.max(0,Math.min(a,s)),{...i,pageIndex:a}})},t.resetPageIndex=o=>{var i,a;t.setPageIndex(o?mf:(i=(a=t.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?i:mf)},t.resetPageSize=o=>{var i,a;t.setPageSize(o?gf:(i=(a=t.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?i:gf)},t.setPageSize=o=>{t.setPagination(i=>{const a=Math.max(1,sr(o,i.pageSize)),s=i.pageSize*i.pageIndex,l=Math.floor(s/a);return{...i,pageIndex:l,pageSize:a}})},t.setPageCount=o=>t.setPagination(i=>{var a;let s=sr(o,(a=t.options.pageCount)!=null?a:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),t.getPageOptions=me(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((a,s)=>s)),i},ge(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},yf=()=>({top:[],bottom:[]}),$P={getInitialState:t=>({rowPinning:yf(),...t}),getDefaultOptions:t=>({onRowPinningChange:vn("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,o,i)=>{const a=o?t.getLeafRows().map(c=>{let{id:u}=c;return u}):[],s=i?t.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...s,t.id,...a]);e.setRowPinning(c=>{var u,p;if(n==="bottom"){var h,m;return{top:((h=c==null?void 0:c.top)!=null?h:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((m=c==null?void 0:c.bottom)!=null?m:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(n==="top"){var b,y;return{top:[...((b=c==null?void 0:c.top)!=null?b:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((y=c==null?void 0:c.bottom)!=null?y:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((p=c==null?void 0:c.bottom)!=null?p:[]).filter(v=>!(l!=null&&l.has(v)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,a=n.some(l=>o==null?void 0:o.includes(l)),s=n.some(l=>i==null?void 0:i.includes(l));return a?"top":s?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const a=(n=i==="top"?e.getTopRows():e.getBottomRows())==null?void 0:n.map(s=>{let{id:l}=s;return l});return(o=a==null?void 0:a.indexOf(t.id))!=null?o:-1}},createTable:t=>{t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?yf():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:yf())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,a;return!!((i=o.top)!=null&&i.length||(a=o.bottom)!=null&&a.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const l=t.getRow(s,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(s=>e.find(l=>l.id===s))).filter(Boolean).map(s=>({...s,position:o}))},t.getTopRows=me(()=>[t.getRowModel().rows,t.getState().rowPinning.top],(e,n)=>t._getPinnedRows(e,n,"top"),ge(t.options,"debugRows")),t.getBottomRows=me(()=>[t.getRowModel().rows,t.getState().rowPinning.bottom],(e,n)=>t._getPinnedRows(e,n,"bottom"),ge(t.options,"debugRows")),t.getCenterRows=me(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(a=>!i.has(a.id))},ge(t.options,"debugRows"))}},eO={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:vn("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):i.forEach(a=>{delete o[a.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(a=>{vf(i,a.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=me(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?kf(t,n):{rows:[],flatRows:[],rowsById:{}},ge(t.options,"debugTable")),t.getFilteredSelectedRowModel=me(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?kf(t,n):{rows:[],flatRows:[],rowsById:{}},ge(t.options,"debugTable")),t.getGroupedSelectedRowModel=me(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?kf(t,n):{rows:[],flatRows:[],rowsById:{}},ge(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(a=>{var s;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return a;const l={...a};return vf(l,t.id,n,(s=o==null?void 0:o.selectChildren)!=null?s:!0,e),l})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return wf(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return xf(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return xf(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},vf=(t,e,n,o,i)=>{var a;const s=i.getRow(e,!0);n?(s.getCanMultiSelect()||Object.keys(t).forEach(l=>delete t[l]),s.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(a=s.subRows)!=null&&a.length&&s.getCanSelectSubRows()&&s.subRows.forEach(l=>vf(t,l.id,n,o,i))};function kf(t,e){const n=t.getState().rowSelection,o=[],i={},a=function(s,l){return s.map(c=>{var u;const p=wf(c,n);if(p&&(o.push(c),i[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:a(c.subRows)}),p)return c}).filter(Boolean)};return{rows:a(e.rows),flatRows:o,rowsById:i}}function wf(t,e){var n;return(n=e[t.id])!=null?n:!1}function xf(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,a=!1;return t.subRows.forEach(s=>{if(!(a&&!i)&&(s.getCanSelect()&&(wf(s,e)?a=!0:i=!1),s.subRows&&s.subRows.length)){const l=xf(s,e);l==="all"?a=!0:(l==="some"&&(a=!0),i=!1)}}),i?"all":a?"some":!1}const Sf=/([0-9]+)/gm,tO=(t,e,n)=>bb(lr(t.getValue(n)).toLowerCase(),lr(e.getValue(n)).toLowerCase()),nO=(t,e,n)=>bb(lr(t.getValue(n)),lr(e.getValue(n))),oO=(t,e,n)=>Cf(lr(t.getValue(n)).toLowerCase(),lr(e.getValue(n)).toLowerCase()),rO=(t,e,n)=>Cf(lr(t.getValue(n)),lr(e.getValue(n))),iO=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},aO=(t,e,n)=>Cf(t.getValue(n),e.getValue(n));function Cf(t,e){return t===e?0:t>e?1:-1}function lr(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function bb(t,e){const n=t.split(Sf).filter(Boolean),o=e.split(Sf).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),a=o.shift(),s=parseInt(i,10),l=parseInt(a,10),c=[s,l].sort();if(isNaN(c[0])){if(i>a)return 1;if(a>i)return-1;continue}if(isNaN(c[1]))return isNaN(s)?-1:1;if(s>l)return 1;if(l>s)return-1}return n.length-o.length}const Ha={alphanumeric:tO,alphanumericCaseSensitive:nO,text:oO,textCaseSensitive:rO,datetime:iO,basic:aO},sO=[zP,qP,jP,GP,_P,HP,KP,JP,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:vn("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const a=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(a)==="[object Date]")return Ha.datetime;if(typeof a=="string"&&(o=!0,a.split(Sf).length>1))return Ha.alphanumeric}return o?Ha.text:Ha.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return Ml(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:Ha[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),a=typeof n<"u"&&n!==null;e.setSorting(s=>{const l=s==null?void 0:s.find(b=>b.id===t.id),c=s==null?void 0:s.findIndex(b=>b.id===t.id);let u=[],p,h=a?n:i==="desc";if(s!=null&&s.length&&t.getCanMultiSort()&&o?l?p="toggle":p="add":s!=null&&s.length&&c!==s.length-1?p="replace":l?p="toggle":p="replace",p==="toggle"&&(a||i||(p="remove")),p==="add"){var m;u=[...s,{id:t.id,desc:h}],u.splice(0,u.length-((m=e.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else p==="toggle"?u=s.map(b=>b.id===t.id?{...b,desc:h}:b):p==="remove"?u=s.filter(b=>b.id!==t.id):u=[{id:t.id,desc:h}];return u})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const a=t.getFirstSortDir(),s=t.getIsSorted();return s?s!==a&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":a},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},UP,YP,ZP,$P,eO,QP];function lO(t){var e,n;const o=[...sO,...(e=t._features)!=null?e:[]];let i={_features:o};const a=i._features.reduce((m,b)=>Object.assign(m,b.getDefaultOptions==null?void 0:b.getDefaultOptions(i)),{}),s=m=>i.options.mergeOptions?i.options.mergeOptions(a,m):{...a,...m};let c={...{},...(n=t.initialState)!=null?n:{}};i._features.forEach(m=>{var b;c=(b=m.getInitialState==null?void 0:m.getInitialState(c))!=null?b:c});const u=[];let p=!1;const h={_features:o,options:{...a,...t},initialState:c,_queue:m=>{u.push(m),p||(p=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();p=!1}).catch(b=>setTimeout(()=>{throw b})))},reset:()=>{i.setState(i.initialState)},setOptions:m=>{const b=sr(m,i.options);i.options=s(b)},getState:()=>i.options.state,setState:m=>{i.options.onStateChange==null||i.options.onStateChange(m)},_getRowId:(m,b,y)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(m,b,y))!=null?v:`${y?[y.id,b].join("."):b}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(m,b)=>{let y=(b?i.getPrePaginationRowModel():i.getRowModel()).rowsById[m];if(!y&&(y=i.getCoreRowModel().rowsById[m],!y))throw new Error;return y},_getDefaultColumnDef:me(()=>[i.options.defaultColumn],m=>{var b;return m=(b=m)!=null?b:{},{header:y=>{const v=y.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:y=>{var v,w;return(v=(w=y.renderValue())==null||w.toString==null?void 0:w.toString())!=null?v:null},...i._features.reduce((y,v)=>Object.assign(y,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...m}},ge(t,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:me(()=>[i._getColumnDefs()],m=>{const b=function(y,v,w){return w===void 0&&(w=0),y.map(A=>{const I=LP(i,A,w,v),V=A;return I.columns=V.columns?b(V.columns,I,w+1):[],I})};return b(m)},ge(t,"debugColumns")),getAllFlatColumns:me(()=>[i.getAllColumns()],m=>m.flatMap(b=>b.getFlatColumns()),ge(t,"debugColumns")),_getAllFlatColumnsById:me(()=>[i.getAllFlatColumns()],m=>m.reduce((b,y)=>(b[y.id]=y,b),{}),ge(t,"debugColumns")),getAllLeafColumns:me(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(m,b)=>{let y=m.flatMap(v=>v.getLeafColumns());return b(y)},ge(t,"debugColumns")),getColumn:m=>i._getAllFlatColumnsById()[m]};Object.assign(i,h);for(let m=0;m<i._features.length;m++){const b=i._features[m];b==null||b.createTable==null||b.createTable(i)}return i}function dO(){return t=>me(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,a,s){a===void 0&&(a=0);const l=[];for(let u=0;u<i.length;u++){const p=df(t,t._getRowId(i[u],u,s),i[u],u,a,void 0,s==null?void 0:s.id);if(n.flatRows.push(p),n.rowsById[p.id]=p,l.push(p),t.options.getSubRows){var c;p.originalSubRows=t.options.getSubRows(i[u],u),(c=p.originalSubRows)!=null&&c.length&&(p.subRows=o(p.originalSubRows,a+1,p))}}return l};return n.rows=o(e),n},ge(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function cO(){return t=>me(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:yb(n),ge(t.options,"debugTable"))}function yb(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function uO(t,e,n){return n.options.filterFromLeafRows?fO(t,e,n):pO(t,e,n)}function fO(t,e,n){var o;const i=[],a={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(c,u){u===void 0&&(u=0);const p=[];for(let m=0;m<c.length;m++){var h;let b=c[m];const y=df(n,b.id,b.original,b.index,b.depth,void 0,b.parentId);if(y.columnFilters=b.columnFilters,(h=b.subRows)!=null&&h.length&&u<s){if(y.subRows=l(b.subRows,u+1),b=y,e(b)&&!y.subRows.length){p.push(b),a[b.id]=b,i.push(b);continue}if(e(b)||y.subRows.length){p.push(b),a[b.id]=b,i.push(b);continue}}else b=y,e(b)&&(p.push(b),a[b.id]=b,i.push(b))}return p};return{rows:l(t),flatRows:i,rowsById:a}}function pO(t,e,n){var o;const i=[],a={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(c,u){u===void 0&&(u=0);const p=[];for(let m=0;m<c.length;m++){let b=c[m];if(e(b)){var h;if((h=b.subRows)!=null&&h.length&&u<s){const v=df(n,b.id,b.original,b.index,b.depth,void 0,b.parentId);v.subRows=l(b.subRows,u+1),b=v}p.push(b),i.push(b),a[b.id]=b}}return p};return{rows:l(t),flatRows:i,rowsById:a}}function hO(){return t=>me(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let m=0;m<e.flatRows.length;m++)e.flatRows[m].columnFilters={},e.flatRows[m].columnFiltersMeta={};return e}const i=[],a=[];(n??[]).forEach(m=>{var b;const y=t.getColumn(m.id);if(!y)return;const v=y.getFilterFn();v&&i.push({id:m.id,filterFn:v,resolvedValue:(b=v.resolveFilterValue==null?void 0:v.resolveFilterValue(m.value))!=null?b:m.value})});const s=(n??[]).map(m=>m.id),l=t.getGlobalFilterFn(),c=t.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());o&&l&&c.length&&(s.push("__global__"),c.forEach(m=>{var b;a.push({id:m.id,filterFn:l,resolvedValue:(b=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?b:o})}));let u,p;for(let m=0;m<e.flatRows.length;m++){const b=e.flatRows[m];if(b.columnFilters={},i.length)for(let y=0;y<i.length;y++){u=i[y];const v=u.id;b.columnFilters[v]=u.filterFn(b,v,u.resolvedValue,w=>{b.columnFiltersMeta[v]=w})}if(a.length){for(let y=0;y<a.length;y++){p=a[y];const v=p.id;if(p.filterFn(b,v,p.resolvedValue,w=>{b.columnFiltersMeta[v]=w})){b.columnFilters.__global__=!0;break}}b.columnFilters.__global__!==!0&&(b.columnFilters.__global__=!1)}}const h=m=>{for(let b=0;b<s.length;b++)if(m.columnFilters[s[b]]===!1)return!1;return!0};return uO(e.rows,h,t)},ge(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function mO(t){return e=>me(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:a}=n;let{rows:s,flatRows:l,rowsById:c}=o;const u=i*a,p=u+i;s=s.slice(u,p);let h;e.options.paginateExpandedRows?h={rows:s,flatRows:l,rowsById:c}:h=yb({rows:s,flatRows:l,rowsById:c}),h.flatRows=[];const m=b=>{h.flatRows.push(b),b.subRows.length&&b.subRows.forEach(m)};return h.rows.forEach(m),h},ge(e.options,"debugTable"))}function gO(){return t=>me(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],a=o.filter(c=>{var u;return(u=t.getColumn(c.id))==null?void 0:u.getCanSort()}),s={};a.forEach(c=>{const u=t.getColumn(c.id);u&&(s[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=c=>{const u=c.map(p=>({...p}));return u.sort((p,h)=>{for(let b=0;b<a.length;b+=1){var m;const y=a[b],v=s[y.id],w=v.sortUndefined,A=(m=y==null?void 0:y.desc)!=null?m:!1;let I=0;if(w){const V=p.getValue(y.id),R=h.getValue(y.id),E=V===void 0,T=R===void 0;if(E||T){if(w==="first")return E?-1:1;if(w==="last")return E?1:-1;I=E&&T?0:E?w:-w}}if(I===0&&(I=v.sortingFn(p,h,y.id)),I!==0)return A&&(I*=-1),v.invertSorting&&(I*=-1),I}return p.index-h.index}),u.forEach(p=>{var h;i.push(p),(h=p.subRows)!=null&&h.length&&(p.subRows=l(p.subRows))}),u};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},ge(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
@@ -126,5 +126,5 @@ function print() { __p += __j.call(arguments, '') }
126
126
  */function Hl(){return!0}const bO=Symbol("merge-proxy"),yO={get(t,e,n){return e===bO?n:t.get(e)},has(t,e){return t.has(e)},set:Hl,deleteProperty:Hl,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:Hl,deleteProperty:Hl}},ownKeys(t){return t.keys()}};function Af(t){return"value"in t?t.value:t}function Ua(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const a=Af(e[i])[o];if(a!==void 0)return a}},has(o){for(let i=e.length-1;i>=0;i--)if(o in Af(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(Af(e[i])));return[...Array.from(new Set(o))]}},yO)}const Wa=r.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?r.h(t.render,t.props):t.render});function vb(t){return Ua(t,{data:r.unref(t.data)})}function vO(t){const e=Ua({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,a){return Ua(i,a)}},vb(t)),n=lO(e);r.isRef(t.data)&&r.watch(t.data,()=>{n.setState(i=>({...i,data:r.unref(t.data)}))},{immediate:!0,deep:!0});const o=r.ref(n.initialState);return r.watchEffect(()=>{n.setOptions(i=>{var a;const s=new Proxy({},{get:(l,c)=>o.value[c]});return Ua(i,vb(t),{state:Ua(s,(a=t.state)!=null?a:{}),onStateChange:l=>{l instanceof Function?o.value=l(o.value):o.value=l,t.onStateChange==null||t.onStateChange(l)}})})}),n}const kO=["checked","disabled","indeterminate"],kb=Be(r.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=r.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=r.withModifiers((...a)=>o.onChange&&o.onChange(...a),["stop"]))},[r.createElementVNode("input",{checked:o.checked,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),disabled:o.disabled,indeterminate:o.indeterminate,type:"checkbox"},null,10,kO),o.indeterminate||o.checked?(r.openBlock(),r.createBlock(ue,{key:0,name:n.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-dbf1ded4"]]),wO=["id"],wb=r.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=Pe(t,"modelValue"),o=r.ref(!1);return(i,a)=>(r.openBlock(),r.createBlock(io,{"max-height":264,shift:"",onMenuChanged:a[0]||(a[0]=s=>o.value=s)},{"menu-button":r.withCtx(()=>{var s;return[r.createVNode(ke,{icon:o.value?"expand_less":"expand_more",label:(s=i.items.find(l=>l.value===i.modelValue))==null?void 0:s.label,"icon-position":"append",size:"md",variant:"tertiary"},null,8,["icon","label"])]}),"menu-wrapper":r.withCtx(({maxHeight:s})=>[r.createElementVNode("div",{id:`menu-wrapper-${s}`,style:r.normalizeStyle({maxHeight:`${s}px`}),class:"bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,l=>(r.openBlock(),r.createBlock(St,{key:l.value,label:l.label,"model-value":l.value===r.unref(n),value:l.value,"onUpdate:modelValue":c=>n.value=l.value},null,8,["label","model-value","value","onUpdate:modelValue"]))),128))],12,wO)]),_:1}))}}),xO=["colSpan","onClick"],Ul=r.defineComponent({__name:"FmTableHeader",props:{table:{}},emits:["update:column-widths"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(new Map);function a(c){return c.column.columnDef.meta}function s(){const c=Array.from(i.value.values()).map(u=>u.offsetWidth);n("update:column-widths",c)}r.onMounted(()=>{setTimeout(()=>{s()},0),setTimeout(()=>{s()},100)});let l=null;return r.onMounted(()=>{window.ResizeObserver&&(l=new ResizeObserver(()=>{s()}),i.value.forEach(c=>{l==null||l.observe(c)})),r.onUnmounted(()=>{l&&l.disconnect()})}),r.onMounted(()=>{window.addEventListener("resize",s),r.onUnmounted(()=>window.removeEventListener("resize",s))}),r.watch(()=>o.table.getHeaderGroups(),()=>{s()}),(c,u)=>{const p=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("thead",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.table.getHeaderGroups(),h=>(r.openBlock(),r.createElementBlock("tr",{key:h.id},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.headers,m=>{var b,y,v,w,A,I,V;return r.openBlock(),r.createElementBlock("th",{key:m.id,ref_for:!0,ref:R=>R&&i.value.set(m.id,R),class:r.normalizeClass(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24",m.column.getCanSort()?"cursor-pointer select-none hover:bg-fm-color-opacity-sm":"",((b=a(m))==null?void 0:b.headerClass)??"px-16 py-[13px]"]),colSpan:m.colSpan,style:r.normalizeStyle({width:(y=m.column.columnDef.meta)!=null&&y.width?(v=m.column.columnDef.meta)==null?void 0:v.width:m.column.getSize()!==0?`${m.column.getSize()}px`:(w=a(m))==null?void 0:w.width,maxWidth:(A=a(m))==null?void 0:A.maxWidth,textAlign:((I=a(m))==null?void 0:I.textAlign)??"left"}),onClick:R=>{var E;return(E=m.column.getToggleSortingHandler())==null?void 0:E(R)}},[r.createElementVNode("div",{class:r.normalizeClass([((V=a(m))==null?void 0:V.headerContentClass)??"flex gap-8 items-center"])},[m.isPlaceholder?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(Wa),{key:0,props:m.getContext(),render:m.column.columnDef.header},null,8,["props","render"])),m.column.getCanSort()?(r.openBlock(),r.createBlock(p,{key:1,name:{asc:"arrow_upward",desc:"arrow_downward"}[m.column.getIsSorted()]??"unfold_more",color:"neutral-gray-400",size:"sm"},null,8,["name"])):r.createCommentVNode("",!0)],2)],14,xO)}),128))]))),128))])}}});function SO(){this.__data__=[],this.size=0}var CO=SO;function AO(t,e){return t===e||t!==t&&e!==e}var xb=AO,DO=xb;function EO(t,e){for(var n=t.length;n--;)if(DO(t[n][0],e))return n;return-1}var Wl=EO,BO=Wl,PO=Array.prototype,OO=PO.splice;function IO(t){var e=this.__data__,n=BO(e,t);if(n<0)return!1;var o=e.length-1;return n==o?e.pop():OO.call(e,n,1),--this.size,!0}var NO=IO,VO=Wl;function RO(t){var e=this.__data__,n=VO(e,t);return n<0?void 0:e[n][1]}var FO=RO,TO=Wl;function MO(t){return TO(this.__data__,t)>-1}var LO=MO,zO=Wl;function _O(t,e){var n=this.__data__,o=zO(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}var HO=_O,UO=CO,WO=NO,jO=FO,GO=LO,QO=HO;function Ai(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Ai.prototype.clear=UO,Ai.prototype.delete=WO,Ai.prototype.get=jO,Ai.prototype.has=GO,Ai.prototype.set=QO;var jl=Ai,XO=jl;function qO(){this.__data__=new XO,this.size=0}var KO=qO;function JO(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var YO=JO;function ZO(t){return this.__data__.get(t)}var $O=ZO;function eI(t){return this.__data__.has(t)}var tI=eI,nI=typeof mn=="object"&&mn&&mn.Object===Object&&mn,Sb=nI,oI=Sb,rI=typeof self=="object"&&self&&self.Object===Object&&self,iI=oI||rI||Function("return this")(),No=iI,aI=No,sI=aI.Symbol,Df=sI,Cb=Df,Ab=Object.prototype,lI=Ab.hasOwnProperty,dI=Ab.toString,ja=Cb?Cb.toStringTag:void 0;function cI(t){var e=lI.call(t,ja),n=t[ja];try{t[ja]=void 0;var o=!0}catch{}var i=dI.call(t);return o&&(e?t[ja]=n:delete t[ja]),i}var uI=cI,fI=Object.prototype,pI=fI.toString;function hI(t){return pI.call(t)}var mI=hI,Db=Df,gI=uI,bI=mI,yI="[object Null]",vI="[object Undefined]",Eb=Db?Db.toStringTag:void 0;function kI(t){return t==null?t===void 0?vI:yI:Eb&&Eb in Object(t)?gI(t):bI(t)}var Gl=kI;function wI(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Bb=wI,xI=Gl,SI=Bb,CI="[object AsyncFunction]",AI="[object Function]",DI="[object GeneratorFunction]",EI="[object Proxy]";function BI(t){if(!SI(t))return!1;var e=xI(t);return e==AI||e==DI||e==CI||e==EI}var Pb=BI,PI=No,OI=PI["__core-js_shared__"],II=OI,Ef=II,Ob=function(){var t=/[^.]+$/.exec(Ef&&Ef.keys&&Ef.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function NI(t){return!!Ob&&Ob in t}var VI=NI,RI=Function.prototype,FI=RI.toString;function TI(t){if(t!=null){try{return FI.call(t)}catch{}try{return t+""}catch{}}return""}var Ib=TI,MI=Pb,LI=VI,zI=Bb,_I=Ib,HI=/[\\^$.*+?()[\]{}|]/g,UI=/^\[object .+?Constructor\]$/,WI=Function.prototype,jI=Object.prototype,GI=WI.toString,QI=jI.hasOwnProperty,XI=RegExp("^"+GI.call(QI).replace(HI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qI(t){if(!zI(t)||LI(t))return!1;var e=MI(t)?XI:UI;return e.test(_I(t))}var KI=qI;function JI(t,e){return t==null?void 0:t[e]}var YI=JI,ZI=KI,$I=YI;function eN(t,e){var n=$I(t,e);return ZI(n)?n:void 0}var Di=eN,tN=Di,nN=No,oN=tN(nN,"Map"),Bf=oN,rN=Di,iN=rN(Object,"create"),Ql=iN,Nb=Ql;function aN(){this.__data__=Nb?Nb(null):{},this.size=0}var sN=aN;function lN(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var dN=lN,cN=Ql,uN="__lodash_hash_undefined__",fN=Object.prototype,pN=fN.hasOwnProperty;function hN(t){var e=this.__data__;if(cN){var n=e[t];return n===uN?void 0:n}return pN.call(e,t)?e[t]:void 0}var mN=hN,gN=Ql,bN=Object.prototype,yN=bN.hasOwnProperty;function vN(t){var e=this.__data__;return gN?e[t]!==void 0:yN.call(e,t)}var kN=vN,wN=Ql,xN="__lodash_hash_undefined__";function SN(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=wN&&e===void 0?xN:e,this}var CN=SN,AN=sN,DN=dN,EN=mN,BN=kN,PN=CN;function Ei(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Ei.prototype.clear=AN,Ei.prototype.delete=DN,Ei.prototype.get=EN,Ei.prototype.has=BN,Ei.prototype.set=PN;var ON=Ei,Vb=ON,IN=jl,NN=Bf;function VN(){this.size=0,this.__data__={hash:new Vb,map:new(NN||IN),string:new Vb}}var RN=VN;function FN(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var TN=FN,MN=TN;function LN(t,e){var n=t.__data__;return MN(e)?n[typeof e=="string"?"string":"hash"]:n.map}var Xl=LN,zN=Xl;function _N(t){var e=zN(this,t).delete(t);return this.size-=e?1:0,e}var HN=_N,UN=Xl;function WN(t){return UN(this,t).get(t)}var jN=WN,GN=Xl;function QN(t){return GN(this,t).has(t)}var XN=QN,qN=Xl;function KN(t,e){var n=qN(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}var JN=KN,YN=RN,ZN=HN,$N=jN,eV=XN,tV=JN;function Bi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Bi.prototype.clear=YN,Bi.prototype.delete=ZN,Bi.prototype.get=$N,Bi.prototype.has=eV,Bi.prototype.set=tV;var Rb=Bi,nV=jl,oV=Bf,rV=Rb,iV=200;function aV(t,e){var n=this.__data__;if(n instanceof nV){var o=n.__data__;if(!oV||o.length<iV-1)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new rV(o)}return n.set(t,e),this.size=n.size,this}var sV=aV,lV=jl,dV=KO,cV=YO,uV=$O,fV=tI,pV=sV;function Pi(t){var e=this.__data__=new lV(t);this.size=e.size}Pi.prototype.clear=dV,Pi.prototype.delete=cV,Pi.prototype.get=uV,Pi.prototype.has=fV,Pi.prototype.set=pV;var hV=Pi,mV="__lodash_hash_undefined__";function gV(t){return this.__data__.set(t,mV),this}var bV=gV;function yV(t){return this.__data__.has(t)}var vV=yV,kV=Rb,wV=bV,xV=vV;function ql(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new kV;++e<n;)this.add(t[e])}ql.prototype.add=ql.prototype.push=wV,ql.prototype.has=xV;var SV=ql;function CV(t,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1}var AV=CV;function DV(t,e){return t.has(e)}var EV=DV,BV=SV,PV=AV,OV=EV,IV=1,NV=2;function VV(t,e,n,o,i,a){var s=n&IV,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),p=a.get(e);if(u&&p)return u==e&&p==t;var h=-1,m=!0,b=n&NV?new BV:void 0;for(a.set(t,e),a.set(e,t);++h<l;){var y=t[h],v=e[h];if(o)var w=s?o(v,y,h,e,t,a):o(y,v,h,t,e,a);if(w!==void 0){if(w)continue;m=!1;break}if(b){if(!PV(e,function(A,I){if(!OV(b,I)&&(y===A||i(y,A,n,o,a)))return b.push(I)})){m=!1;break}}else if(!(y===v||i(y,v,n,o,a))){m=!1;break}}return a.delete(t),a.delete(e),m}var Fb=VV,RV=No,FV=RV.Uint8Array,TV=FV;function MV(t){var e=-1,n=Array(t.size);return t.forEach(function(o,i){n[++e]=[i,o]}),n}var LV=MV;function zV(t){var e=-1,n=Array(t.size);return t.forEach(function(o){n[++e]=o}),n}var _V=zV,Tb=Df,Mb=TV,HV=xb,UV=Fb,WV=LV,jV=_V,GV=1,QV=2,XV="[object Boolean]",qV="[object Date]",KV="[object Error]",JV="[object Map]",YV="[object Number]",ZV="[object RegExp]",$V="[object Set]",eR="[object String]",tR="[object Symbol]",nR="[object ArrayBuffer]",oR="[object DataView]",Lb=Tb?Tb.prototype:void 0,Pf=Lb?Lb.valueOf:void 0;function rR(t,e,n,o,i,a,s){switch(n){case oR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nR:return!(t.byteLength!=e.byteLength||!a(new Mb(t),new Mb(e)));case XV:case qV:case YV:return HV(+t,+e);case KV:return t.name==e.name&&t.message==e.message;case ZV:case eR:return t==e+"";case JV:var l=WV;case $V:var c=o&GV;if(l||(l=jV),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;o|=QV,s.set(t,e);var p=UV(l(t),l(e),o,i,a,s);return s.delete(t),p;case tR:if(Pf)return Pf.call(t)==Pf.call(e)}return!1}var iR=rR;function aR(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t}var sR=aR,lR=Array.isArray,Of=lR,dR=sR,cR=Of;function uR(t,e,n){var o=e(t);return cR(t)?o:dR(o,n(t))}var fR=uR;function pR(t,e){for(var n=-1,o=t==null?0:t.length,i=0,a=[];++n<o;){var s=t[n];e(s,n,t)&&(a[i++]=s)}return a}var hR=pR;function mR(){return[]}var gR=mR,bR=hR,yR=gR,vR=Object.prototype,kR=vR.propertyIsEnumerable,zb=Object.getOwnPropertySymbols,wR=zb?function(t){return t==null?[]:(t=Object(t),bR(zb(t),function(e){return kR.call(t,e)}))}:yR,xR=wR;function SR(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}var CR=SR;function AR(t){return t!=null&&typeof t=="object"}var Kl=AR,DR=Gl,ER=Kl,BR="[object Arguments]";function PR(t){return ER(t)&&DR(t)==BR}var OR=PR,_b=OR,IR=Kl,Hb=Object.prototype,NR=Hb.hasOwnProperty,VR=Hb.propertyIsEnumerable,RR=_b(function(){return arguments}())?_b:function(t){return IR(t)&&NR.call(t,"callee")&&!VR.call(t,"callee")},FR=RR,Jl={exports:{}};function TR(){return!1}var MR=TR;Jl.exports,function(t,e){var n=No,o=MR,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,l=s?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||o;t.exports=u}(Jl,Jl.exports);var Ub=Jl.exports,LR=9007199254740991,zR=/^(?:0|[1-9]\d*)$/;function _R(t,e){var n=typeof t;return e=e??LR,!!e&&(n=="number"||n!="symbol"&&zR.test(t))&&t>-1&&t%1==0&&t<e}var HR=_R,UR=9007199254740991;function WR(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=UR}var Wb=WR,jR=Gl,GR=Wb,QR=Kl,XR="[object Arguments]",qR="[object Array]",KR="[object Boolean]",JR="[object Date]",YR="[object Error]",ZR="[object Function]",$R="[object Map]",eF="[object Number]",tF="[object Object]",nF="[object RegExp]",oF="[object Set]",rF="[object String]",iF="[object WeakMap]",aF="[object ArrayBuffer]",sF="[object DataView]",lF="[object Float32Array]",dF="[object Float64Array]",cF="[object Int8Array]",uF="[object Int16Array]",fF="[object Int32Array]",pF="[object Uint8Array]",hF="[object Uint8ClampedArray]",mF="[object Uint16Array]",gF="[object Uint32Array]",tt={};tt[lF]=tt[dF]=tt[cF]=tt[uF]=tt[fF]=tt[pF]=tt[hF]=tt[mF]=tt[gF]=!0,tt[XR]=tt[qR]=tt[aF]=tt[KR]=tt[sF]=tt[JR]=tt[YR]=tt[ZR]=tt[$R]=tt[eF]=tt[tF]=tt[nF]=tt[oF]=tt[rF]=tt[iF]=!1;function bF(t){return QR(t)&&GR(t.length)&&!!tt[jR(t)]}var yF=bF;function vF(t){return function(e){return t(e)}}var kF=vF,Yl={exports:{}};Yl.exports,function(t,e){var n=Sb,o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&n.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();t.exports=l}(Yl,Yl.exports);var wF=Yl.exports,xF=yF,SF=kF,jb=wF,Gb=jb&&jb.isTypedArray,CF=Gb?SF(Gb):xF,Qb=CF,AF=CR,DF=FR,EF=Of,BF=Ub,PF=HR,OF=Qb,IF=Object.prototype,NF=IF.hasOwnProperty;function VF(t,e){var n=EF(t),o=!n&&DF(t),i=!n&&!o&&BF(t),a=!n&&!o&&!i&&OF(t),s=n||o||i||a,l=s?AF(t.length,String):[],c=l.length;for(var u in t)(e||NF.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||PF(u,c)))&&l.push(u);return l}var RF=VF,FF=Object.prototype;function TF(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||FF;return t===n}var MF=TF;function LF(t,e){return function(n){return t(e(n))}}var zF=LF,_F=zF,HF=_F(Object.keys,Object),UF=HF,WF=MF,jF=UF,GF=Object.prototype,QF=GF.hasOwnProperty;function XF(t){if(!WF(t))return jF(t);var e=[];for(var n in Object(t))QF.call(t,n)&&n!="constructor"&&e.push(n);return e}var qF=XF,KF=Pb,JF=Wb;function YF(t){return t!=null&&JF(t.length)&&!KF(t)}var ZF=YF,$F=RF,eT=qF,tT=ZF;function nT(t){return tT(t)?$F(t):eT(t)}var oT=nT,rT=fR,iT=xR,aT=oT;function sT(t){return rT(t,aT,iT)}var lT=sT,Xb=lT,dT=1,cT=Object.prototype,uT=cT.hasOwnProperty;function fT(t,e,n,o,i,a){var s=n&dT,l=Xb(t),c=l.length,u=Xb(e),p=u.length;if(c!=p&&!s)return!1;for(var h=c;h--;){var m=l[h];if(!(s?m in e:uT.call(e,m)))return!1}var b=a.get(t),y=a.get(e);if(b&&y)return b==e&&y==t;var v=!0;a.set(t,e),a.set(e,t);for(var w=s;++h<c;){m=l[h];var A=t[m],I=e[m];if(o)var V=s?o(I,A,m,e,t,a):o(A,I,m,t,e,a);if(!(V===void 0?A===I||i(A,I,n,o,a):V)){v=!1;break}w||(w=m=="constructor")}if(v&&!w){var R=t.constructor,E=e.constructor;R!=E&&"constructor"in t&&"constructor"in e&&!(typeof R=="function"&&R instanceof R&&typeof E=="function"&&E instanceof E)&&(v=!1)}return a.delete(t),a.delete(e),v}var pT=fT,hT=Di,mT=No,gT=hT(mT,"DataView"),bT=gT,yT=Di,vT=No,kT=yT(vT,"Promise"),wT=kT,xT=Di,ST=No,CT=xT(ST,"Set"),AT=CT,DT=Di,ET=No,BT=DT(ET,"WeakMap"),PT=BT,If=bT,Nf=Bf,Vf=wT,Rf=AT,Ff=PT,qb=Gl,Oi=Ib,Kb="[object Map]",OT="[object Object]",Jb="[object Promise]",Yb="[object Set]",Zb="[object WeakMap]",$b="[object DataView]",IT=Oi(If),NT=Oi(Nf),VT=Oi(Vf),RT=Oi(Rf),FT=Oi(Ff),_r=qb;(If&&_r(new If(new ArrayBuffer(1)))!=$b||Nf&&_r(new Nf)!=Kb||Vf&&_r(Vf.resolve())!=Jb||Rf&&_r(new Rf)!=Yb||Ff&&_r(new Ff)!=Zb)&&(_r=function(t){var e=qb(t),n=e==OT?t.constructor:void 0,o=n?Oi(n):"";if(o)switch(o){case IT:return $b;case NT:return Kb;case VT:return Jb;case RT:return Yb;case FT:return Zb}return e});var TT=_r,Tf=hV,MT=Fb,LT=iR,zT=pT,ey=TT,ty=Of,ny=Ub,_T=Qb,HT=1,oy="[object Arguments]",ry="[object Array]",Zl="[object Object]",UT=Object.prototype,iy=UT.hasOwnProperty;function WT(t,e,n,o,i,a){var s=ty(t),l=ty(e),c=s?ry:ey(t),u=l?ry:ey(e);c=c==oy?Zl:c,u=u==oy?Zl:u;var p=c==Zl,h=u==Zl,m=c==u;if(m&&ny(t)){if(!ny(e))return!1;s=!0,p=!1}if(m&&!p)return a||(a=new Tf),s||_T(t)?MT(t,e,n,o,i,a):LT(t,e,c,n,o,i,a);if(!(n&HT)){var b=p&&iy.call(t,"__wrapped__"),y=h&&iy.call(e,"__wrapped__");if(b||y){var v=b?t.value():t,w=y?e.value():e;return a||(a=new Tf),i(v,w,n,o,a)}}return m?(a||(a=new Tf),zT(t,e,n,o,i,a)):!1}var jT=WT,GT=jT,ay=Kl;function sy(t,e,n,o,i){return t===e?!0:t==null||e==null||!ay(t)&&!ay(e)?t!==t&&e!==e:GT(t,e,n,o,sy,i)}var QT=sy,XT=QT;function qT(t,e){return XT(t,e)}var KT=qT;const JT=Ls(KT);function Ii(t,e,n){let o=n.initialDeps??[],i;return()=>{var a,s,l,c;let u;n.key&&((a=n.debug)!=null&&a.call(n))&&(u=Date.now());const p=t();if(!(p.length!==o.length||p.some((b,y)=>o[y]!==b)))return i;o=p;let m;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(m=Date.now()),i=e(...p),n.key&&((l=n.debug)!=null&&l.call(n))){const b=Math.round((Date.now()-u)*100)/100,y=Math.round((Date.now()-m)*100)/100,v=y/16,w=(A,I)=>{for(A=String(A);A.length<I;)A=" "+A;return A};console.info(`%c⏱ ${w(y,5)} /${w(b,5)} ms`,`
127
127
  font-size: .6rem;
128
128
  font-weight: bold;
129
- color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,i),i}}function Mf(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const YT=(t,e)=>Math.abs(t-e)<1,ZT=(t,e,n)=>{let o;return function(...i){t.clearTimeout(o),o=t.setTimeout(()=>e.apply(this,i),n)}};var Ga={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.19.5 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.2.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.2.13676358",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1748",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20251102.99.1",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12644",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.9/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.3/x64",GITHUB_RUN_ID:"19226577440",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"a66810bfd2515713e801cf92de0914360bedbfb9",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/fix/advanced-sort",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.5/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_78c27ab8-1b06-4f2a-ae2c-bb668252e7a6",INVOCATION_ID:"a04244b96b034700a027019e139ebfee",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"315",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000026131",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"fix/advanced-sort",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_dependencies__feedmepos_core:"^2.10.12",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.8.2",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"a66810bfd2515713e801cf92de0914360bedbfb9",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/fix/advanced-sort",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_7b98bf0c-30c7-40ce-a1ec-6b67a8d41131",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};const $T=t=>t,eM=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),o=[];for(let i=e;i<=n;i++)o.push(i);return o},tM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;const i=s=>{const{width:l,height:c}=s;e({width:Math.round(l),height:Math.round(c)})};if(i(n.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(s=>{const l=()=>{const c=s[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(n.getBoundingClientRect())};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},ly={passive:!0},dy=typeof window>"u"?!0:"onscrollend"in window,nM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;let i=0;const a=t.options.useScrollendEvent&&dy?()=>{}:ZT(o,()=>{e(i,!1)},t.options.isScrollingResetDelay),s=p=>()=>{const{horizontal:h,isRtl:m}=t.options;i=h?n.scrollLeft*(m&&-1||1):n.scrollTop,a(),e(i,p)},l=s(!0),c=s(!1);c(),n.addEventListener("scroll",l,ly);const u=t.options.useScrollendEvent&&dy;return u&&n.addEventListener("scrollend",c,ly),()=>{n.removeEventListener("scroll",l),u&&n.removeEventListener("scrollend",c)}},oM=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const o=e.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},rM=(t,{adjustments:e=0,behavior:n},o)=>{var i,a;const s=t+e;(a=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[o.options.horizontal?"left":"top"]:s,behavior:n})};class iM{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(a=>{const s=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var a;return(a=o())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return(a=o())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$T,rangeExtractor:eM,onChange:()=>{},measureElement:oM,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=Ii(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,o)=>{const i=new Map,a=new Map;for(let s=o-1;s>=0;s--){const l=n[s];if(i.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&i.set(l.lane,!0),i.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((s,l)=>s.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurementOptions=Ii(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,i,a,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s}),{key:!1}),this.getMeasurements=Ii(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s},l)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,c);for(let p=c;p<n;p++){const h=a(p),m=this.options.lanes===1?u[p-1]:this.getFurthestMeasurement(u,p),b=m?m.end+this.options.gap:o+i,y=l.get(h),v=typeof y=="number"?y:this.options.estimateSize(p),w=b+v,A=m?m.lane:p%this.options.lanes;u[p]={index:p,start:b,size:v,end:w,key:h,lane:A}}return this.measurementsCache=u,u},{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.calculateRange=Ii(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,o,i)=>this.range=n.length>0&&o>0?aM({measurements:n,outerSize:o,scrollOffset:i}):null,{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualIndexes=Ii(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,a,s)=>a===null||s===null?[]:n({startIndex:a,endIndex:s,overscan:o,count:i}),{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),a=this.measurementsCache[i];if(!a)return;const s=a.key,l=this.elementsCache.get(s);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const a=this.itemSizeCache.get(i.key)??i.size,s=o-a;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Ii(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let a=0,s=n.length;a<s;a++){const l=n[a],c=o[l];i.push(c)}return i},{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Mf(o[cy(0,o.length-1,i=>Mf(o[i]).start,n)])},this.getOffsetForAlignment=(n,o)=>{const i=this.getSize(),a=this.getScrollOffset();o==="auto"&&n>=a+i&&(o="end"),o==="end"&&(n-=i);const s=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const a=this.getSize(),s=this.getScrollOffset();if(o==="auto")if(i.end>=s+a-this.options.scrollPaddingEnd)o="end";else if(i.start<=s+this.options.scrollPaddingStart)o="start";else return[s,o];const l=i.start-this.options.scrollPaddingStart+(i.size-a)/2;switch(o){case"center":return[this.getOffsetForAlignment(l,o),o];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,o),o];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,o),o]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(n,o);if(!a)return;const[s,l]=a;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[u]=Mf(this.getOffsetForIndex(n,l));YT(u,this.getScrollOffset())||this.scrollToIndex(n,{align:l,behavior:i})}else this.scrollToIndex(n,{align:l,behavior:i})}))},this.scrollBy=(n,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;return o.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=o[o.length-1])==null?void 0:n.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const cy=(t,e,n,o)=>{for(;t<=e;){const i=(t+e)/2|0,a=n(i);if(a<o)t=i+1;else if(a>o)e=i-1;else return i}return t>0?t-1:0};function aM({measurements:t,outerSize:e,scrollOffset:n}){const o=t.length-1,a=cy(0,o,l=>t[l].start,n);let s=a;for(;s<o&&t[s].end<n+e;)s++;return{startIndex:a,endIndex:s}}function sM(t){const e=new iM(r.unref(t)),n=r.shallowRef(e),o=e._didMount();return r.watch(()=>r.unref(t).getScrollElement(),i=>{i&&e._willUpdate()},{immediate:!0}),r.watch(()=>r.unref(t),i=>{e.setOptions({...i,onChange:(a,s)=>{var l;r.triggerRef(n),(l=i.onChange)==null||l.call(i,a,s)}}),e._willUpdate(),r.triggerRef(n)},{immediate:!0}),r.onScopeDispose(o),n}function lM(t){return sM(r.computed(()=>({observeElementRect:tM,observeElementOffset:nM,scrollToFn:rM,...r.unref(t)})))}const dM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},cM={class:"text-fm-color-typo-secondary"},uM=["onClick"],fM={key:0},pM={key:0,class:"w-full"},hM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},mM={class:"text-fm-color-typo-secondary"},gM=["onClick"],bM=["colspan"],yM={key:1,class:"virtual-table-container w-full"},vM={class:"sticky top-0 z-10 w-full"},kM={class:"w-full"},wM=["onClick"],xM={class:"flex gap-8 items-center"},SM={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},CM={class:"flex gap-8"},AM=Be(r.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},hideHeaderRow:{type:Boolean},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean},columnVisibility:{},draggable:{type:[Boolean,Function]},wholeRowDraggable:{type:Boolean},expandedState:{type:[Boolean,Object]},getRowCanExpand:{type:Function,default:()=>!0},getSubRow:{type:Function,default:t=>t.subRows},onVuedraggableMove:{type:Function,default:()=>!0},virtual:{type:Boolean,default:!1},virtualRowHeight:{default:48}},emits:["sort-change","dnd-changed","update:expanded-state","update:dragging"],setup(t,{emit:e}){const n=t,o=e;if(n.virtual&&n.draggable)throw new Error("Cannot use virtual scroll and draggable at the same time");const i=Pe(n,"modelValue"),a=Pe(n,"searchValue"),s=r.ref(n.rowData),l=r.ref(!1);r.watch(()=>l.value,C=>{o("update:dragging",C),C&&o("update:expanded-state",{})});const c=()=>{let C=[];n.selection&&C.push({id:"row-selection",header:({table:L})=>r.createVNode(kb,{checked:L.getIsAllPageRowsSelected(),indeterminate:L.getIsSomePageRowsSelected(),onChange:L.getToggleAllPageRowsSelectedHandler()},null),cell:({row:L})=>L.depth===0?r.createVNode(kb,{checked:L==null?void 0:L.getIsSelected(),disabled:!(L!=null&&L.getCanSelect()),onChange:L==null?void 0:L.getToggleSelectedHandler()},null):r.createVNode("div",null,null),enableResizing:!1,meta:{headerClass:"py-[2px] pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"},size:60});const M=n.draggable;return M&&!n.wholeRowDraggable&&C.push({id:"row-drag",header:"",cell:({row:L})=>(typeof M=="function"?M(L.original,L.index):M)&&L.depth===0?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(ke,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",onMousedown:()=>{l.value=!0},onMouseup:()=>{l.value=!1}})):typeof M=="function"?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(ke,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",disabled:!0})):r.createVNode("div",null,null),enableResizing:!1,meta:{cellClass:"dnd-handler",width:"60px"},size:60}),[...C,...n.columnDefs]},u=r.ref([]);r.watch(()=>u.value,C=>{o("sort-change",C)}),r.watch(()=>n.rowData,C=>{s.value=[...C]},{deep:!0});const p=r.ref({pageIndex:0,pageSize:n.pageSize}),h=vO({get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()},get data(){return s.value},state:{get pagination(){return typeof n.fetchFn=="function"?p.value:void 0},get globalFilter(){return a.value},get rowSelection(){return i.value},get sorting(){return u.value},get columnVisibility(){return n.columnVisibility},get expanded(){return n.expandedState}},getCoreRowModel:dO(),getSortedRowModel:gO(),getFilteredRowModel:hO(),getPaginationRowModel:mO(),getRowCanExpand:n.getRowCanExpand,onExpandedChange:C=>{if(!n.expandedState)return;const M=typeof C=="function"?C(n.expandedState):C;o("update:expanded-state",M)},onRowSelectionChange:C=>{if(!v.value)return i.value=typeof C=="function"?C(i.value):C},onSortingChange:C=>{u.value=typeof C=="function"?C(u.value):C},onGlobalFilterChange:C=>{a.value=typeof C=="function"?C(a.value):C},autoResetPageIndex:n.autoResetPageIndex,manualPagination:typeof n.fetchFn=="function",...typeof n.fetchFn=="function"&&{onPaginationChange:C=>p.value=typeof C=="function"?C(p.value):C},pageCount:typeof n.fetchFn=="function"?n.pageCount:void 0,getSubRows:C=>n.getSubRow(C),getExpandedRowModel:cO(),get enableHiding(){return!0}});r.watch(()=>p.value,C=>{y(C)}),r.watch(()=>n.selection,()=>{h.setOptions(C=>({...C,get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()}}))});const m=r.ref(""),b=r.ref(!1);async function y(C){if(!n.fetchFn)return;b.value=!0;const M=`${Math.random()}`;m.value=M;try{await n.fetchFn(C)}catch{}finally{m.value===M&&(b.value=!1)}}const v=r.computed(()=>{const C=b.value;return typeof n.loading=="boolean"?n.loading:C});r.watch(()=>n.rowData,()=>{h.setOptions(C=>({...C,get data(){return s.value}}))}),r.watch([()=>n.pageCount,()=>n.rowCount],()=>{h.setOptions(C=>({...C,pageCount:n.pageCount,rowCount:n.rowCount}))}),r.watch(()=>n.pageSize,()=>{h.setPageSize(n.pageSize)}),r.watch([()=>n.columnFilter],([C])=>{h.setColumnFilters(()=>C??[])}),r.watch(()=>n.columnDefs,()=>{h.setOptions(C=>({...C,get columns(){return c()}}))}),r.onMounted(()=>{n.fetchFn&&n.fetchFn(h.getState().pagination),h.setPageSize(n.pageSize)});const w=r.ref(380);function A(C){var L;const M=((L=C.el)==null?void 0:L.scrollHeight)??0;w.value=Math.max(100,M)}const I=Jo(),V=r.ref(),R=r.ref(typeof n.shrinkAt=="boolean"&&!n.shrinkAt?!1:I.isBreakpointKeyword(n.shrinkAt)&&I.isAtMost(n.shrinkAt)),E=r.computed(()=>{const C=[...Array.from(Array(Math.min(5,Math.floor(n.rowData.length/10))),(L,K)=>(K+1)*10).map(L=>({label:L.toString(),value:L}))],M={label:U("table.all"),value:n.rowData.length};return n.pageSize&&n.pageSize>0&&(C.some(L=>L.value===n.pageSize)||(C.push({label:n.pageSize.toString(),value:n.pageSize}),C.sort((L,K)=>L.value-K.value))),[...C,M]});function T(C){const M=C.el;if(!M||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt)return;const L=of(function(){if(V.value=M.clientWidth,I.isBreakpointKeyword(n.shrinkAt)){R.value=I.isAtMost(n.shrinkAt);return}const K=Number(n.shrinkAt);if(isNaN(K)){R.value=!1;return}R.value=M.scrollWidth>=K},200);M.resizeTable??(M.resizeTable=function(){R.value=I.isBreakpointKeyword(n.shrinkAt)&&I.isAtMost(n.shrinkAt),L()}),window.addEventListener("resize",M.resizeTable),M.resizeTable()}function B(C){const M=C.el;!M||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt||M.resizeTable&&window.removeEventListener("resize",M.resizeTable)}function H(C){const M=Math.min(...C.map(ae=>ae.index)),L=Math.max(...C.map(ae=>ae.index)),K=s.value.slice(0,M),oe=s.value.slice(L+1),le=C.map(ae=>ae.original),Z=s.value.slice(M,L+1);JT(le,Z)||o("dnd-changed",[...K,...le,...oe])}const _=r.ref(),j=r.computed(()=>!n.virtual||!_.value?null:lM({count:h.getRowModel().rows.length,getScrollElement:()=>_.value||null,estimateSize:()=>n.virtualRowHeight,overscan:20})),Q=r.ref([]);function F(C){Q.value=C}function S(C,M){var K;const L=(K=C.column.columnDef.meta)==null?void 0:K.colspan;return typeof L=="function"?L(M):L??1}function x(C){return C.getVisibleCells().filter(M=>S(M,C)!==0)}function P({draggedContext:C}){const M=n.draggable,L=C.index,K=h.getRowModel().rows[L];let oe=typeof M=="function"?M(K.original,L):M;if(!oe)return oe;const le=C.futureIndex,Z=h.getRowModel().rows[le];return oe=typeof M=="function"?M(Z.original,le):M,oe}return(C,M)=>{var oe,le;const L=r.resolveComponent("FmListItem"),K=r.resolveComponent("FmList");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:T,onVnodeUnmounted:B},[r.createElementVNode("div",{class:"overflow-y-auto",ref_key:"parentRef",ref:_},[R.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[v.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({height:`${w.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",dM,[r.createVNode(Zo),r.createVNode(Sr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(C.$slots,"loading-text",{},()=>[r.createElementVNode("span",cM,r.toDisplayString(r.unref(U)("table.loading")),1)],!0)]),r.createVNode(Zo)])],4)):(r.openBlock(),r.createBlock(K,{key:1,onVnodeMounted:A},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h).getRowModel().rows,Z=>r.renderSlot(C.$slots,"list-row",r.mergeProps({key:Z.id,ref_for:!0},Z),()=>[r.createVNode(L,{class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":Z.getIsSelected(),"cursor-pointer":typeof C.onRowClick=="function"}]),style:{padding:"0"},tag:"label"},{prepend:r.withCtx(()=>{var ae,fe,he,Ie,st;return[r.createVNode(r.unref(Wa),{props:(fe=(ae=Z.getVisibleCells().find(Xe=>Xe.column.id==="row-selection"))==null?void 0:ae.getContext)==null?void 0:fe.call(ae),render:(st=(Ie=(he=Z.getVisibleCells().find(Xe=>Xe.column.id==="row-selection"))==null?void 0:he.column)==null?void 0:Ie.columnDef)==null?void 0:st.cell},null,8,["props","render"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:ae=>{var fe;return(fe=C.onRowClick)==null?void 0:fe.call(C,Z)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Z.getVisibleCells(),ae=>{var fe;return r.openBlock(),r.createElementBlock(r.Fragment,{key:ae.id},[ae.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",fM,[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((fe=ae.column.columnDef.meta)==null?void 0:fe.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(Wa),{props:ae.getContext(),render:ae.column.columnDef.cell},null,8,["props","render"])],2)])):r.createCommentVNode("",!0)],64)}),128))],8,uM)]),_:2},1032,["class"])],!0)),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[C.virtual?(r.openBlock(),r.createElementBlock("div",yM,[r.createElementVNode("div",vM,[r.createElementVNode("table",kM,[C.hideHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Ul,{key:0,table:r.unref(h),class:"bg-fm-color-neutral-gray-100","onUpdate:columnWidths":F},null,8,["table"]))])]),r.createElementVNode("div",{class:"virtual-list relative",style:r.normalizeStyle({height:`${r.unref(h).getRowModel().rows.length*n.virtualRowHeight}px`,width:"100%"}),onVnodeMounted:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((le=(oe=j.value)==null?void 0:oe.value)==null?void 0:le.getVirtualItems(),Z=>{var ae,fe;return r.openBlock(),r.createElementBlock("div",{key:Z.index,style:r.normalizeStyle({position:"absolute",top:0,left:0,width:"100%",height:`${n.virtualRowHeight}px`,transform:`translateY(${Z.start}px)`,display:"flex",alignItems:"center",borderBottom:"1px solid var(--fm-color-neutral-gray-100)"}),class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":(ae=r.unref(h).getRowModel().rows[Z.index])==null?void 0:ae.getIsSelected(),"cursor-pointer":typeof C.onRowClick=="function"},C.rowClassName,"hover:bg-fm-color-opacity-sm"]),onClick:he=>{var Ie;return(Ie=C.onRowClick)==null?void 0:Ie.call(C,r.unref(h).getRowModel().rows[Z.index])}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((fe=r.unref(h).getRowModel().rows[Z.index])==null?void 0:fe.getVisibleCells())||[],(he,Ie)=>{var st,Xe,nt,ot;return r.openBlock(),r.createElementBlock("div",{key:he.id,class:r.normalizeClass(["virtual-cell","h-full flex items-center",((st=he.column.columnDef.meta)==null?void 0:st.cellClass)??"px-16"]),style:r.normalizeStyle({width:Q.value[Ie]?`${Q.value[Ie]}px`:"auto",flex:Q.value[Ie]?"0 0 auto":"1 1 0px",textAlign:((Xe=he.column.columnDef.meta)==null?void 0:Xe.textAlign)??"left",maxWidth:(nt=he.column.columnDef.meta)==null?void 0:nt.maxWidth})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((ot=he.column.columnDef.meta)==null?void 0:ot.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(Wa),{props:he.getContext(),render:he.column.columnDef.cell},null,8,["props","render"])],2)],6)}),128))],14,wM)}),128))],4)])):(r.openBlock(),r.createElementBlock("table",pM,[!C.pinHeaderRow&&!C.hideHeaderRow?(r.openBlock(),r.createBlock(Ul,{key:0,table:r.unref(h)},null,8,["table"])):r.createCommentVNode("",!0),r.renderSlot(C.$slots,"pin-top",{},void 0,!0),v.value?(r.openBlock(),r.createElementBlock("tbody",{key:1,onVnodeMounted:A},[r.createElementVNode("div",{style:r.normalizeStyle({height:`${w.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",hM,[r.createVNode(Zo),r.createVNode(Sr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(C.$slots,"loading-text",{},()=>[r.createElementVNode("span",mM,r.toDisplayString(r.unref(U)("table.loading")),1)],!0)]),r.createVNode(Zo)])],4)],512)):(r.openBlock(),r.createBlock(r.unref(bc),{key:2,clone:r.unref(ef.clone),handle:Object.keys(n.expandedState??{}).length>0?".dnd-handler-disabled":".dnd-handler","model-value":r.unref(h).getRowModel().rows,move:P||C.onVuedraggableMove,"item-key":"id",tag:"tbody",onDragend:M[0]||(M[0]=Z=>l.value=!1),onDragstart:M[1]||(M[1]=Z=>l.value=!0),"onUpdate:modelValue":H,onVnodeMounted:A},{item:r.withCtx(({element:Z})=>[C.$slots["table-row"]?r.renderSlot(C.$slots,"table-row",r.normalizeProps(r.mergeProps({key:0},Z)),void 0,!0):(r.openBlock(),r.createElementBlock("tr",{key:1,class:r.normalizeClass([[{"bg-fm-color-neutral-gray-100":Z.getIsSelected(),"cursor-pointer":typeof C.onRowClick=="function","dnd-handler":(typeof C.draggable=="function"?C.draggable(Z.original,Z.index):C.draggable)&&C.wholeRowDraggable,"border-b border-fm-color-neutral-gray-100":Z.subRows.length===0&&Z.depth===0?!0:Z.depth===0?!Z.getIsExpanded():Z.index+1===Z.getParentRow().subRows.length},C.rowClassName],"hover:bg-fm-color-opacity-sm"]),onClick:ae=>{var fe;return(fe=C.onRowClick)==null?void 0:fe.call(C,Z)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x(Z),ae=>{var fe,he,Ie,st,Xe,nt;return r.openBlock(),r.createElementBlock("td",{key:ae.id,colspan:S(ae,Z),class:r.normalizeClass([v.value?"hidden":"","h-[48px] text-fm-color-typo-primary",((fe=ae.column.columnDef.meta)==null?void 0:fe.cellClass)??"px-16"]),style:r.normalizeStyle({width:(he=ae.column.columnDef.meta)!=null&&he.width?(Ie=ae.column.columnDef.meta)==null?void 0:Ie.width:ae.column.getSize()!==0?`${ae.column.getSize()}px`:void 0,maxWidth:(st=ae.column.columnDef.meta)==null?void 0:st.maxWidth,textAlign:((Xe=ae.column.columnDef.meta)==null?void 0:Xe.textAlign)??"left"})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((nt=ae.column.columnDef.meta)==null?void 0:nt.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(Wa),{props:ae.getContext(),render:ae.column.columnDef.cell},null,8,["props","render"])],2)],14,bM)}),128))],10,gM))]),_:3},8,["clone","handle","model-value","move"])),C.pinHeaderRow&&!C.hideHeaderRow?(r.openBlock(),r.createBlock(Ul,{key:3,table:r.unref(h),class:r.normalizeClass(["bg-fm-color-neutral-gray-100 top-0",{sticky:!l.value}]),"onUpdate:columnWidths":F},null,8,["table","class"])):r.createCommentVNode("",!0)]))],64))],512),C.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxWidth:V.value?`${V.value}px`:void 0}),class:"basis-72 bg-white flex items-center justify-between px-24"},[R.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([{"hidden invisible":C.forceMobileFooter},"flex gap-24 items-center justify-between xs:hidden xs:invisible"])},[r.createElementVNode("div",xM,[r.createElementVNode("span",SM,r.toDisplayString(r.unref(U)("table.itemsPerPage")),1),r.createVNode(wb,{items:E.value,"model-value":r.unref(h).getState().pagination.pageSize,"onUpdate:modelValue":M[2]||(M[2]=Z=>r.unref(h).setPageSize(Z))},null,8,["items","model-value"])]),r.createElementVNode("span",{class:r.normalizeClass([{"hidden invisible":C.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible"])},r.toDisplayString(r.unref(U)("table.itemCount",{start:n.rowData.length<r.unref(h).getState().pagination.pageSize?n.rowData.length:r.unref(h).getState().pagination.pageIndex*r.unref(h).getState().pagination.pageSize+1,end:(r.unref(h).getState().pagination.pageIndex+1)*r.unref(h).getState().pagination.pageSize,total:n.rowCount??n.rowData.length})),3)],2)),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":R.value||C.forceMobileFooter,"xs:w-full xs:justify-between":!R.value}])},[r.createVNode(wb,{items:Array.from(Array(r.unref(h).getPageCount()),(Z,ae)=>ae+1).map(Z=>({label:Z.toString(),value:Z})),"model-value":r.unref(h).getState().pagination.pageIndex+1,"onUpdate:modelValue":M[3]||(M[3]=Z=>r.unref(h).setPageIndex(Z?Z-1:0))},null,8,["items","model-value"]),r.createElementVNode("span",{class:r.normalizeClass([{"mr-auto":R.value||C.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto"])},r.toDisplayString(r.unref(U)("table.pageCount",{total:r.unref(h).getPageCount()})),3),r.createElementVNode("div",CM,[r.createVNode(ke,{disabled:!r.unref(h).getCanPreviousPage(),icon:"chevron_left","icon-color":"neutral-black",variant:"tertiary",onClick:M[4]||(M[4]=()=>r.unref(h).previousPage())},null,8,["disabled"]),r.createVNode(ke,{disabled:!r.unref(h).getCanNextPage(),icon:"chevron_right","icon-color":"neutral-black",variant:"tertiary",onClick:M[5]||(M[5]=()=>r.unref(h).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),[["__scopeId","data-v-59fbc452"]]),DM=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),EM=r.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),s=r.computed(()=>{const u=n.items.slice(0,n.showMoreAt-1),p=n.items.find(m=>{var b;return m.value===n.modelValue||((b=m.children)==null?void 0:b.find(y=>y.value===n.modelValue))}),h=u.map(m=>m.value);return p&&h.includes(p.value)?n.items.slice(0,n.showMoreAt):p?[...u,p]:u}),l=r.computed(()=>{const u=s.value.map(p=>p.value);return n.items.filter(p=>!u.includes(p.value))}),c=u=>{i.value=!1,o("update:modelValue",u)};return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",u.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,h=>r.renderSlot(u.$slots,"default",r.mergeProps({ref_for:!0},{...h,tabsProps:a.value}),()=>[r.createVNode(ab,r.mergeProps({"model-value":n.modelValue,ref_for:!0},{children:h.children,label:h.label,icon:h.icon,disabled:h.disabled,badge:h.badge,value:h.value,tabsProps:a.value},{disabled:h.disabled===void 0?u.disabled:h.disabled,vertical:u.vertical,"onUpdate:modelValue":p[0]||(p[0]=m=>o("update:modelValue",m))}),null,16,["model-value","disabled","vertical"])])),256)),l.value.length>0?(r.openBlock(),r.createBlock(io,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":u.vertical}]),placement:u.vertical?"right-start":"bottom-start",onMenuChanged:p[1]||(p[1]=h=>i.value=h)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[u.vertical?"h-40":"h-[46px]"]])},[r.createVNode(ue,{name:"more_vert"}),DM],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,h=>{var m;return r.openBlock(),r.createElementBlock(r.Fragment,{key:h.value},[(m=h.children)!=null&&m.length?(r.openBlock(),r.createBlock(io,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(St,{"model-value":n.modelValue===h.value,label:h.label,icon:h.icon,disabled:h.disabled,expandable:""},{append:r.withCtx(()=>[h.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.children,b=>(r.openBlock(),r.createBlock(St,{key:b.value,"model-value":n.modelValue===b.value,label:b.label,icon:b.icon,disabled:b.disabled,onClick:y=>c(b.value)},{append:r.withCtx(()=>[b.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:b.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(r.openBlock(),r.createBlock(St,{key:1,"model-value":n.modelValue===h.value,label:h.label,icon:h.icon,disabled:h.disabled,onClick:b=>c(h.value)},{append:r.withCtx(()=>[h.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):r.createCommentVNode("",!0)],2))}}),BM=["tabindex"],PM=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0},action:{}},setup(t){const e=t,n=Pe(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),a=r.computed(()=>{if(!o.value)return 0;function m(y){return y.children?[y,...y.children.flatMap(m)]:[y]}return 56*(e.children?e.children.flatMap(m):[]).length});function s(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value,e.action&&e.action()}}const l=r.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function c(m){return m.children&&m.children.length?m.children.some(c):e.modelValue===m.value}const u=r.computed(()=>{const m=c(e);return o.value?m&&i.value:m}),p=r.computed(()=>e.children?e.children.map(({modelValue:m,indentation:b,active:y,focusable:v,...w})=>{const A=c(w);return{...w,expand:A,focusable:!w.disabled&&!i.value}}):[]),h=r.computed(()=>{switch(e.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(m,b)=>{const y=r.resolveComponent("FmCollapsibleTab",!0),v=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({paddingLeft:`${h.value}px`}),class:"flex flex-col px-8"},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["flex fm-corner-radius-md gap-4 items-center px-16 py-8 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!m.disabled,"cursor-not-allowed":m.disabled,"bg-fm-color-system-warning-100":u.value}]),tabindex:l.value?"0":"-1",type:"button",onClick:s},[m.icon?(r.openBlock(),r.createBlock(ue,{key:0,class:r.normalizeClass({"text-fm-color-typo-disabled":m.disabled,"text-fm-color-typo-primary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value}),name:m.icon},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["py-4 fm-typo-en-body-lg-400 text-left line-clamp-2",{"text-fm-color-typo-secondary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value,"text-fm-color-typo-disabled":m.disabled}])},r.toDisplayString(m.label),3),m.badge!==void 0&&m.badge!==null?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[typeof m.badge=="number"?(r.openBlock(),r.createBlock(Yo,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.badge),{key:1}))],64)):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",{key:2,style:r.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"}),class:"flex h-24 items-center ml-auto w-24"},[r.createVNode(ue,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!m.disabled,"text-fm-color-typo-disabled":m.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):r.createCommentVNode("",!0)],10,BM)),[[v,!m.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxHeight:i.value?0:`${a.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"}),class:"flex flex-col overflow-hidden"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(w,A)=>(r.openBlock(),r.createBlock(y,r.mergeProps({key:A,"model-value":r.unref(n),"onUpdate:modelValue":b[0]||(b[0]=I=>r.isRef(n)?n.value=I:null),indentation:m.indentation+1,ref_for:!0},w),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)],4)}}}),OM={class:"h-full flex flex-col overflow-auto"},IM=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=Pe(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:a,...s})=>s):[]);function i(a){function s(c){return c.children?c.children.flatMap(s):[c.value]}return(a.children?a.children.flatMap(s):[a.value]).includes(e.modelValue)}return(a,s)=>(r.openBlock(),r.createElementBlock("div",OM,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(l,c)=>(r.openBlock(),r.createBlock(PM,r.mergeProps({key:c,"model-value":r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=u=>r.isRef(n)?n.value=u:null),active:i(l),expand:i(l),ref_for:!0},l),null,16,["model-value","active","expand"]))),128))]))}}),NM=r.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"},rounded:{default:()=>"xxxl"}},setup(t){const e=t,n=r.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center uppercase",{"w-24 h-24 fm-typo-en-body-sm-600":o.size==="sm","w-9 h-9 fm-typo-en-body-sm-600":o.size==="sm2","w-40 h-40 fm-typo-en-body-md-600":o.size==="md","w-48 h-48 fm-typo-en-body-lg-600":o.size==="lg","w-56 h-56 fm-typo-en-body-lg-600":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src},{"rounded-xxxl":o.rounded==="xxxl","rounded-xxl":o.rounded==="xxl","rounded-xl":o.rounded==="xl","rounded-lg":o.rounded==="lg","rounded-md":o.rounded==="md","rounded-sm":o.rounded==="sm"}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},r.toDisplayString(n.value),7))}}),VM=r.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-en-body-sm-600":n.size==="sm","w-40 h-40 fm-typo-en-body-md-600":n.size==="md","w-56 h-56 fm-typo-en-body-lg-600":n.size==="lg","w-72 h-72 fm-typo-en-body-lg-600":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(r.openBlock(),r.createBlock(ue,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),RM={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},FM={class:"flex gap-4 items-center xs:hidden"},TM={key:1,class:"hidden xs:flex"},MM=r.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0},titleBold:{type:Boolean,default:()=>!0},primaryActionXsBottomMargin:{}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const s=[...n.actions],l=s.findIndex(m=>m.isPrimary),c=s[l],[u,p,...h]=s.filter((m,b)=>b!==l);return{primaryAction:c,firstSecondaryAction:u,secondSecondaryAction:p,showMoreSecondary:h,bottomSheetActions:s.filter(m=>!m.isPrimary),fabActions:s.filter(m=>m.isPrimary)}}),a=r.ref(!1);return(s,l)=>(r.openBlock(),r.createElementBlock("div",RM,[s.backButton?(r.openBlock(),r.createBlock(ke,{key:0,icon:"arrow_back","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[0]||(l[0]=c=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"prepend"),r.createVNode(lf,{description:s.description,title:s.title,"title-bold":s.titleBold,class:"flex-grow"},{title:r.withCtx(()=>[r.renderSlot(s.$slots,"title")]),description:r.withCtx(()=>[r.renderSlot(s.$slots,"description")]),_:3},8,["description","title","title-bold"]),r.createElementVNode("div",FM,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(ke,{key:0,"append-icon":i.value.firstSecondaryAction.appendIcon,"bg-color":i.value.firstSecondaryAction.bgColor,"border-color":i.value.firstSecondaryAction.borderColor,"icon-color":i.value.firstSecondaryAction.iconColor,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"text-color":i.value.firstSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[1]||(l[1]=c=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(ke,{key:1,"append-icon":i.value.secondSecondaryAction.appendIcon,"bg-color":i.value.secondSecondaryAction.bgColor,"border-color":i.value.secondSecondaryAction.borderColor,"icon-color":i.value.secondSecondaryAction.iconColor,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"text-color":i.value.secondSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[2]||(l[2]=c=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(io,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(ke,{"append-icon":"expand_more","icon-color":"black",label:r.unref(U)("actions.more"),size:"md",type:"button",variant:"tertiary"},null,8,["label"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,c=>(r.openBlock(),r.createBlock(St,{key:c.value,icon:c.prependIcon,label:c.label,onClick:u=>o("click:action",c.value)},null,8,["icon","label","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(ke,{key:3,"append-icon":i.value.showMoreSecondary[0].appendIcon,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,size:"md",type:"button",variant:"tertiary",onClick:l[3]||(l[3]=c=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["append-icon","label","prepend-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(ke,{key:4,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"primary",size:"md",type:"button",onClick:l[4]||(l[4]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",TM,[r.createVNode(ke,{icon:"more_vert","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[5]||(l[5]=c=>a.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(_c,{"model-value":a.value,"onUpdate:modelValue":l[6]||(l[6]=c=>a.value=c),"z-index":n.zIndexForBottomSheet,"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(af,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,c=>(r.openBlock(),r.createBlock(sf,{key:c.value,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{o("click:action",c.value),a.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),r.createElementVNode("div",{class:r.normalizeClass(["fixed hidden right-16 xs:inline",{"bottom-[68px]":!n.primaryActionXsBottomMargin}]),style:r.normalizeStyle({bottom:n.primaryActionXsBottomMargin})},[i.value.primaryAction?(r.openBlock(),r.createBlock(ke,{key:0,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"fab",class:"fm-shadow-light-100",size:"md",type:"button",onClick:l[7]||(l[7]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)],6)]))]))}}),LM={class:"fm-typo-en-title-md-600"},zM={class:"flex"},_M=Be(r.defineComponent({__name:"FmScorecard",props:{title:{},value:{default:0},compareValue:{default:void 0},description:{},hideCompare:{type:Boolean,default:!1},hideLineChart:{type:Boolean,default:!1},sparklineData:{default:void 0}},setup(t){const e=t,n=(s,l)=>{if(s===""||l==="")return null;const c=Number(s),u=Number(l);let p=0;u===0?c===0?p=0:p=1:p=(c-u)/u;const h=o(p);return{value:isNaN(p)?"":`${(p*100).toFixed(0)}%`,icon:h}};function o(s){return s>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:s<0?{name:"trending_down",color:"#99231D",tailwind:"fm-color-system-error-100"}:{name:"equal",color:"#C7C7CC",tailwind:"fm-color-neutral-gray-100"}}const i=r.computed(()=>{const{value:s,compareValue:l}=e;return l?n(s,l):null}),a=r.computed(()=>{var s;return((s=e.sparklineData)==null?void 0:s.datasets.map(l=>{var c;return{label:l.name,data:l.values,fill:!0,color:((c=i.value)==null?void 0:c.icon.color)??"fm-color-system-info-300"}}))??[]});return(s,l)=>(r.openBlock(),r.createBlock(Hc,{class:"flex flex-col gap-2 p-5",variant:"outlined"},{default:r.withCtx(()=>[r.createVNode(Rc,{content:e.description},{default:r.withCtx(()=>[r.renderSlot(s.$slots,"title",{},()=>[r.createElementVNode("p",{class:r.normalizeClass([e.description?"border-b-2 border-dotted":"","fm-typo-body-md-400 w-full truncate"])},r.toDisplayString(e.title),3)],!0)]),_:3},8,["content"]),r.createElementVNode("p",LM,r.toDisplayString(e.value),1),s.hideCompare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",zM,[i.value?(r.openBlock(),r.createBlock(Lc,{key:0,class:r.normalizeClass(`bg-${i.value.icon.tailwind}`),compact:""},{default:r.withCtx(()=>[r.createVNode(ue,{color:i.value.icon.color,name:i.value.icon.name},null,8,["color","name"]),r.createElementVNode("p",{style:r.normalizeStyle({color:i.value.icon.color}),class:"fm-typo-body-md-700"},r.toDisplayString(i.value.value),5)]),_:1},8,["class"])):r.createCommentVNode("",!0)]),r.renderSlot(s.$slots,"compare",{},void 0,!0)],64)),e.sparklineData?(r.openBlock(),r.createBlock(Hc,{key:1},{default:r.withCtx(()=>[r.createVNode(p1,{datasets:a.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:e.sparklineData.dimension},class:"sparkline"},null,8,["datasets","x-axis"])]),_:1})):r.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-c66db589"]]);var Qa=(t=>(t.Premium="premium",t.Beta="beta",t.Paid="paid",t))(Qa||{});const HM=r.defineComponent({__name:"FmPill",props:{variant:{default:Qa.Beta},label:{}},setup(t){const e=t,n=r.computed(()=>({[Qa.Beta]:{containerClass:"border border-fm-color-system-error-400 bg-fm-color-system-error-100 ",label:"BETA",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-error"},[Qa.Premium]:{containerClass:"h-[18px] fm-pill-premium-gradient",label:"Premium",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-white"},[Qa.Paid]:{containerClass:"border border-fm-color-system-info-400 bg-fm-color-system-info-100 ",icon:"lock",label:"Paid feature",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-info"}})[e.variant]);return(o,i)=>{const a=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center fm-corner-radius-md px-4 gap-4",n.value.containerClass])},[n.value.icon?(r.openBlock(),r.createBlock(a,{key:0,size:"sm",outline:"",name:n.value.icon,class:r.normalizeClass(n.value.labelClass)},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(n.value.labelClass)},r.toDisplayString(e.label||n.value.label),3)],2)}}}),UM=Be(HM,[["__scopeId","data-v-cdca68a7"]]),$l=16,WM=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=Jo(),n=r.inject(vc),o=r.computed(()=>{var u;const s={currentSum:$l,tops:new Array},l=Object.values(on).reduce((p,h)=>({...p,[h]:{...s}}),{});return[...((u=n==null?void 0:n.store)==null?void 0:u.snackbars)??[]].reduce((p,h)=>{const m=e.value.xs?on.TOP:h.position??on.TOP_RIGHT,{currentSum:b,tops:y}=p[m];y.push({id:h.id,accumulatedHeight:b});const v=h.mountStage===bt.EXPIRED?0:$l+h.renderedHeight;return p[m]={currentSum:b+v,tops:y},p},l)}),i=r.computed(()=>{var s,l;return(l=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:l.map(c=>{var h,m,b,y,v,w;let u=0;const p=e.value.xs?on.TOP:c.position??on.TOP_RIGHT;switch(c.mountStage){case bt.PREMOUNT:{u=e.value.xs?0:$l;break}case bt.MOUNTED:{u=((b=(m=(h=o.value[p].tops)==null?void 0:h.find)==null?void 0:m.call(h,A=>A.id===c.id))==null?void 0:b.accumulatedHeight)||$l;break}case bt.EXPIRED:{u=((w=(v=(y=o.value[p].tops)==null?void 0:y.find)==null?void 0:v.call(y,A=>A.id===c.id))==null?void 0:w.accumulatedHeight)||0,u=Math.max(0,u-c.renderedHeight);break}}return{...c,top:u}})}),a=(s,l,c)=>{if(e.value.xs)return{bottom:`${s}px`,width:"calc(100vw - 32px)",right:"16px",opacity:l===bt.EXPIRED?0:1};if(c===on.TOP)return{top:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===on.TOP_LEFT)return{top:`${s}px`,opacity:l===bt.EXPIRED?0:1,left:l===bt.PREMOUNT?"-20px":"16px"};if(c===on.TOP_RIGHT)return{top:`${s}px`,opacity:l===bt.EXPIRED?0:1,right:l===bt.PREMOUNT?"-20px":"16px"};if(c===on.BOTTOM)return{bottom:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===on.BOTTOM_LEFT)return{bottom:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,left:l===bt.PREMOUNT?"-20px":"16px"};if(c===on.BOTTOM_RIGHT)return{bottom:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,right:l===bt.PREMOUNT?"-20px":"16px"}};return(s,l)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createBlock(r.Teleport,{key:c.id,to:"body"},[r.createVNode(ib,{action:c.action,description:c.message,dismissable:c.dismissable,spinner:c.spinner,style:r.normalizeStyle(a(c.top,c.mountStage,c.position??r.unref(on).TOP_RIGHT)),title:c.title,variant:c.type,"z-index":c.zIndex,class:"fixed transition-all z-10",onVnodeMounted:u=>{var p;return(p=r.unref(n))==null?void 0:p.onSnackbarMounted(c.id,u.el.scrollHeight,c.persistent)},onOnAction:()=>{var u,p;(u=c==null?void 0:c.onAction)==null||u.call(c),(p=r.unref(n))==null||p.close(c.id)},onOnDismiss:()=>{var u;return(u=r.unref(n))==null?void 0:u.close(c.id)}},null,8,["action","description","dismissable","spinner","style","title","variant","z-index","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var on=(t=>(t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t))(on||{}),bt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(bt||{});class uy{constructor(){ie(this,"store",r.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0,position:(e==null?void 0:e.position)??"top-right"},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n,o){const i=this.store.snackbars.findIndex(s=>s.id===e);if(i===-1)return;const a=this.store.snackbars[i];this.store.snackbars[i]={...a,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[i];this.store.snackbars[i]={...s,mountStage:"MOUNTED"}}),!o&&typeof a.duration=="number"&&setTimeout(()=>{this.close(e)},a.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}updateSnackbar(e,n){const o=this.store.snackbars.findIndex(a=>a.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,...n}}}const fy={install(t){t.provide(vc,new uy);const e=document.body,n=r.createVNode(WM);n.appContext=t._context,r.render(n,e)}},py={FmAdvancedSort:Im,FmBadge:Yo,FmBottomSheet:_c,FmBreadcrumb:Ex,FmButton:ke,FmButtonGroup:Ox,FmCard:Hc,FmCardActionArea:Ix,FmCardActions:Vx,FmCardHeader:Fx,FmCardMedia:Mx,FmCardSection:Uc,FmCardSubtitle:Fm,FmCardTitle:Rm,FmChip:Lc,FmChipGroup:zc,FmDialog:zx,FmDropField:Ux,FmDynamicDialog:Mm,FmLineChart:p1,FmPieChart:V9,FmBarChart:z9,FmScorecard:_M,FmCheckbox:Sm,FmDatePicker:p6,FmDatePickerMobile:g1,FmDateRangePicker:v5,FmDateRangePickerMobile:k1,FmSimpleDatePicker:j5,FmSimpleDatePickerMobile:x1,FmSimpleDateRangePicker:xD,FmSimpleDateRangePickerMobile:S1,FmField:at,FmForm:Om,FmFormGroup:Nt,FmHelperText:om,FmLabel:hn,FmPhoneNumber:LE,FmPinField:HE,FmRadio:qE,FmRadioGroup:KE,FmSearch:tf,FmGlobalSearch:xB,FmSelect:yo,FmStepperField:EB,FmSwitch:Lu,FmTextField:Er,FmTextarea:PB,FmTimeInput:Tl,FmTimePicker:HB,FmTimeRangePicker:qB,FmIcon:ue,FmList:af,FmListItem:sf,FmMenu:io,FmMenuDeprecated:$B,FmMenuDivider:b1,FmMenuHeader:tP,FmMenuItem:St,FmCircularProgress:Sr,FmLinearProgress:aP,FmSideSheet:uP,FmSnackbar:ib,FmSpacer:Zo,FmStep:vP,FmStepper:xP,FmTab:ab,FmTable:AM,FmTableToolbar:VP,FmTableHeader:Ul,FmTabs:EM,FmCollapsibleTabs:IM,FmTooltip:Rc,FmAvatar:NM,FmThumbnail:VM,FmPageHead:MM,FmTopSheet:tb,FmPopover:Bo,FmOverlay:fi,FmPill:UM},jM=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},zIndex:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),a=r.computed(()=>e.reference());let s;const{floatingStyles:l,middlewareData:c,placement:u}=ci(a,o,{whileElementsMounted:ai,placement:e.placement,middleware:[li(),si({mainAxis:6}),bm({element:i})]}),p=r.computed(()=>{var y,v,w,A;const b={top:"bottom",right:"left",bottom:"top",left:"right"}[u.value];return{left:((y=c.value.arrow)==null?void 0:y.x)!=null?`${(v=c.value.arrow)==null?void 0:v.x}px`:"",top:((w=c.value.arrow)==null?void 0:w.y)!=null?`${(A=c.value.arrow)==null?void 0:A.y}px`:"",[b]:"-3px"}}),h=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!0},250))},m=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{a.value.addEventListener("pointerdown",h),a.value.addEventListener("pointermove",b=>{b.pointerType!=="touch"&&h()}),a.value.addEventListener("pointerleave",m),a.value.addEventListener("pointerup",m)}),r.onBeforeUnmount(()=>{a.value.removeEventListener("pointerdown",h),a.value.removeEventListener("pointermove",b=>{b.pointerType!=="touch"&&h()}),a.value.removeEventListener("pointerleave",m),a.value.removeEventListener("pointerup",m)}),(b,y)=>n.value&&!b.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-en-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:r.normalizeStyle({...r.unref(l),zIndex:b.zIndex})},[r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:r.normalizeStyle(p.value)},null,4),[[r.vShow,!b.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(b.content),1)],4)):r.createCommentVNode("",!0)}});let Lf;const dr=r.ref([]);let hy=0;const GM=()=>{if(Lf)return;const t=document.createElement("div");document.body.appendChild(t),Lf=r.createApp({render:()=>dr.value.map(e=>r.h(jM,e))}),Lf.mount(t)},ed=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},my=(t,e)=>{const{value:n,modifiers:o}=e;GM(),t.$_fmTooltipId=hy,hy+=1,typeof n=="string"?dr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ed(o),hideArrow:!1}):n&&typeof n=="object"&&dr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:ed(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1,zIndex:n.zIndex})},QM={mounted:my,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=dr.value.findIndex(a=>a.id===t.$_fmTooltipId);if(i===-1){my(t,e);return}typeof n=="string"?dr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ed(o),hideArrow:!1}:n&&typeof n=="object"&&(dr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:ed(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=dr.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&dr.value.splice(e,1)}};function XM(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let td;function zf(){zf.init||(zf.init=!0,td=XM()!==-1)}var nd={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){zf(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",td&&this.$el.appendChild(t),t.data="about:blank",td||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!td&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const qM=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const KM={class:"resize-observer",tabindex:"-1"};r.popScopeId();const JM=qM((t,e,n,o,i,a)=>(r.openBlock(),r.createBlock("div",KM)));nd.render=JM,nd.__scopeId="data-v-b329ee4c",nd.__file="src/components/ResizeObserver.vue";function od(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?od=function(e){return typeof e}:od=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},od(t)}function YM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZM(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function $M(t,e,n){return e&&ZM(t.prototype,e),t}function gy(t){return eL(t)||tL(t)||nL(t)||oL()}function eL(t){if(Array.isArray(t))return _f(t)}function tL(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function nL(t,e){if(t){if(typeof t=="string")return _f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _f(t,e)}}function _f(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function oL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
130
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rL(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function iL(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a,s=function(c){for(var u=arguments.length,p=new Array(u>1?u-1:0),h=1;h<u;h++)p[h-1]=arguments[h];if(a=p,!(o&&c===i)){var m=n.leading;typeof m=="function"&&(m=m(c,i)),(!o||c!==i)&&m&&t.apply(void 0,[c].concat(gy(a))),i=c,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[c].concat(gy(a))),o=0},e)}};return s._clear=function(){clearTimeout(o),o=null},s}function by(t,e){if(t===e)return!0;if(od(t)==="object"){for(var n in t)if(!by(t[n],e[n]))return!1;return!0}return!1}var aL=function(){function t(e,n,o){YM(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return $M(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=rL(n),this.callback=function(l,c){i.options.callback(l,c),l&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},s=a.leading;this.callback=iL(this.callback,this.options.throttle,{leading:function(c){return s==="both"||s==="visible"&&c||s==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var c=l[0];if(l.length>1){var u=l.find(function(h){return h.isIntersecting});u&&(c=u)}if(i.callback){var p=c.isIntersecting&&c.intersectionRatio>=i.threshold;if(p===i.oldResult)return;i.oldResult=p,i.callback(p,c)}},this.options.intersection),r.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function yy(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new aL(t,o,n);t._vue_visibilityState=i}}function sL(t,e,n){var o=e.value,i=e.oldValue;if(!by(o,i)){var a=t._vue_visibilityState;if(!o){vy(t);return}a?a.createObserver(o,n):yy(t,{value:o},n)}}function vy(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var lL={beforeMount:yy,updated:sL,unmounted:vy};function dL(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var ky={itemsLimit:1e3},cL=/(auto|scroll)/;function wy(t,e){return t.parentNode===null?e:wy(t.parentNode,e.concat([t]))}var Hf=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},uL=function(e){return Hf(e,"overflow")+Hf(e,"overflow-y")+Hf(e,"overflow-x")},fL=function(e){return cL.test(uL(e))};function xy(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=wy(t.parentNode,[]),n=0;n<e.length;n+=1)if(fL(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Uf(t){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uf(t)}var Sy={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Cy(){return this.items.length&&Uf(this.items[0])!=="object"}var Wf=!1;if(typeof window<"u"){Wf=!1;try{var pL=Object.defineProperty({},"passive",{get:function(){Wf=!0}});window.addEventListener("test",null,pL)}catch{}}let hL=0;var Xa={name:"RecycleScroller",components:{ResizeObserver:nd},directives:{ObserveVisibility:lL},props:{...Sy,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,a=0,s;for(let l=0,c=e.length;l<c;l++)s=e[l][n]||o,s<i&&(i=s),a+=s,t[l]={accumulator:a,size:s};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Cy,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const a=r.markRaw({id:hL++,index:e,used:!0,key:o,type:i}),s=r.shallowReactive({item:n,position:0,nr:a});return t.push(s),s},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,s=this.typeField,l=this.simpleArray?null:this.keyField,c=this.items,u=c.length,p=this.sizes,h=this.$_views,m=this.$_unusedViews,b=this.pool,y=this.itemIndexByKey;let v,w,A,I,V;if(!u)v=w=I=V=A=0;else if(this.$_prerender)v=I=0,w=V=Math.min(this.prerender,c.length),A=null;else{const j=this.getScroll();if(e){let S=j.start-this.$_lastUpdateScrollPosition;if(S<0&&(S=-S),n===null&&S<a||S<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=j.start;const Q=this.buffer;j.start-=Q,j.end+=Q;let F=0;if(this.$refs.before&&(F=this.$refs.before.scrollHeight,j.start-=F),this.$refs.after){const S=this.$refs.after.scrollHeight;j.end+=S}if(n===null){let S,x=0,P=u-1,C=~~(u/2),M;do M=C,S=p[C].accumulator,S<j.start?x=C:C<u-1&&p[C+1].accumulator>j.start&&(P=C),C=~~((x+P)/2);while(C!==M);for(C<0&&(C=0),v=C,A=p[u-1].accumulator,w=C;w<u&&p[w].accumulator<j.end;w++);for(w===-1?w=c.length-1:(w++,w>u&&(w=u)),I=v;I<u&&F+p[I].accumulator<j.start;I++);for(V=I;V<u&&F+p[V].accumulator<j.end;V++);}else{v=~~(j.start/n*o);const S=v%o;v-=S,w=Math.ceil(j.end/n*o),I=Math.max(0,Math.floor((j.start-F)/n*o)),V=Math.floor((j.end-F)/n*o),v<0&&(v=0),w>u&&(w=u),I<0&&(I=0),V>u&&(V=u),A=Math.ceil(u/o)*n}}w-v>ky.itemsLimit&&this.itemsLimitError(),this.totalSize=A;let R;const E=v<=this.$_endIndex&&w>=this.$_startIndex;if(E)for(let j=0,Q=b.length;j<Q;j++)R=b[j],R.nr.used&&(t&&(R.nr.index=y[R.item[l]]),(R.nr.index==null||R.nr.index<v||R.nr.index>=w)&&this.unuseView(R));const T=E?null:new Map;let B,H,_;for(let j=v;j<w;j++){B=c[j];const Q=l?B[l]:B;if(Q==null)throw new Error(`Key is ${Q} on item (keyField is '${l}')`);if(R=h.get(Q),!n&&!p[j].size){R&&this.unuseView(R);continue}H=B[s];let F=m.get(H),S=!1;if(!R)E?F&&F.length?R=F.pop():R=this.addView(b,j,B,Q,H):(_=T.get(H)||0,(!F||_>=F.length)&&(R=this.addView(b,j,B,Q,H),this.unuseView(R,!0),F=m.get(H)),R=F[_],T.set(H,_+1)),h.delete(R.nr.key),R.nr.used=!0,R.nr.index=j,R.nr.key=Q,R.nr.type=H,h.set(Q,R),S=!0;else if(!R.nr.used&&(R.nr.used=!0,S=!0,F)){const x=F.indexOf(R);x!==-1&&F.splice(x,1)}R.item=B,S&&(j===c.length-1&&this.$emit("scroll-end"),j===0&&this.$emit("scroll-start")),n===null?(R.position=p[j-1].accumulator,R.offset=0):(R.position=Math.floor(j/o)*n,R.offset=j%o*i)}return this.$_startIndex=v,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",v,w,I,V),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:E}},getListenerTarget(){let t=xy(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),a=n?i.height:i.width;let s=-(n?i.top:i.left),l=n?window.innerHeight:window.innerWidth;s<0&&(l+=s,s=0),s+l>a&&(l=a-s),o={start:s,end:s+l}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Wf?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const a=xy(this.$el),s=a.tagName==="HTML"?0:a[e.scroll],l=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[e.start]-l[e.start];n=a,o=e.scroll,i=t+s+u}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const mL={key:0,ref:"before",class:"vue-recycle-scroller__slot"},gL={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function bL(t,e,n,o,i,a){const s=r.resolveComponent("ResizeObserver"),l=r.resolveDirective("observe-visibility");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...c)=>a.handleScroll&&a.handleScroll(...c))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",mL,[r.renderSlot(t.$slots,"before")],512)):r.createCommentVNode("v-if",!0),(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:r.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:r.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.pool,c=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:c.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${c.position}px) translate${t.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===c.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=c.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",gL,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(s,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[l,a.handleVisibilityChange]])}Xa.render=bL,Xa.__file="src/components/RecycleScroller.vue";var rd={name:"DynamicScroller",components:{RecycleScroller:Xa},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Sy,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Cy,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,a=e.length;for(let s=0;s<a;s++){const l=e[s],c=o?s:l[n];let u=i[c];typeof u>"u"&&!this.$_undefinedMap[c]&&(u=0),t.push({item:l,id:c,size:u})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const a=Math.min(t.length,e.length);for(let l=0;l<a&&!(o>=n);l++)o+=e[l].size||this.minItemSize,i+=t[l].size||this.minItemSize;const s=i-o;s!==0&&(this.$el.scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=dL()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function yL(t,e,n,o,i,a){const s=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(s,r.mergeProps({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:r.withCtx(({item:l,index:c,active:u})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:l.item,index:c,active:u,itemWithSize:l})))]),before:r.withCtx(()=>[r.renderSlot(t.$slots,"before")]),after:r.withCtx(()=>[r.renderSlot(t.$slots,"after")]),empty:r.withCtx(()=>[r.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}rd.render=yL,rd.__file="src/components/DynamicScroller.vue";var jf={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return r.h(this.tag,this.$slots.default())}};jf.__file="src/components/DynamicScrollerItem.vue";function vL(t,e){t.component("".concat(e,"recycle-scroller"),Xa),t.component("".concat(e,"RecycleScroller"),Xa),t.component("".concat(e,"dynamic-scroller"),rd),t.component("".concat(e,"DynamicScroller"),rd),t.component("".concat(e,"dynamic-scroller-item"),jf),t.component("".concat(e,"DynamicScrollerItem"),jf)}var kL={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(ky[i]=o[i]);o.installComponents&&vL(e,o.componentsPrefix)}},wL={exports:{}};(function(t,e){(function(n,o){t.exports=o(Tc)})(mn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(s){return s+"."}};return i.default.locale(a,null,!0),a})})(wL);var xL={exports:{}};(function(t,e){(function(n,o){t.exports=o(Tc)})(mn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"週":s+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var c=100*s+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return i.default.locale(a,null,!0),a})})(xL);var SL={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(mn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var o=["th","st","nd","rd"],i=n%100;return"["+n+(o[(i-20)%10]||o[i]||o[0])+"]"}}})})(SL);const CL={name:"@feedmepos/ui-library",version:"1.8.2",type:"module",files:["dist"],repository:{type:"git",url:"git+https://github.com/feedmepos/ui-library.git"},bugs:"https://feedmepos.atlassian.net/browse/CT-3",homepage:"ui.feedme.ai",main:"./dist/feedmepos-ui-library.umd.cjs",module:"./dist/feedmepos-ui-library.js",exports:{".":{types:"./dist/index.d.ts",import:"./dist/feedmepos-ui-library.js",require:"./dist/feedmepos-ui-library.umd.cjs"},"./meta":{types:"./dist/meta.d.ts"},"./tailwind-plugin":"./dist/tailwind-plugin.js","./tailwind-styling":"./dist/tailwind-styling.js","./styles.css":"./dist/style.css"},scripts:{dev:"vite --port 5273",preview:"vite preview","build:lib":"pnpm run build-components && pnpm run build-types && pnpm run build-federation && pnpm run build-tailwind-plugin && pnpm run build-tailwind-styling && tsc-alias --project tsconfig.app.json --outDir dist && mv ./dist/src/* ./dist",build:"vite build","build-lib":"vite build --mode library","build-tailwind-plugin":"vite build --mode tailwind-plugin","build-tailwind-styling":"vite build --mode tailwind-styling","build-federation":"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp","build-components":'run-p type-check "build-lib {@}" --',"build-types":"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false","copy-changelog":"cp ./CHANGELOG.md ./dist/CHANGELOG.md","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false",lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",deploy:"pnpm run build:lib && pnpm publish --no-git-checks .","register-components":"node ./scripts/register-components.js && pnpm lint","generate-component-meta":"node ./scripts/generate-component-meta.js","build:pack":"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../"},dependencies:{"@feedmepos/core":"^2.10.12","@floating-ui/vue":"^1.0.6","@rollup/plugin-commonjs":"^26.0.1","@tanstack/vue-table":"^8.13.2","@tanstack/vue-virtual":"^3.13.0","@types/lodash":"^4.17.7","@vueuse/core":"^10.9.0","chartjs-plugin-datalabels":"^2.2.0","chart.js":"^4.4.2",dayjs:"^1.11.10",debounce:"^2.0.0",fuzzy:"^0.1.3","libphonenumber-js":"^1.10.57",lodash:"^4.17.21",prettier:"^3.2.5",uuid:"^10.0.0","v-wave":"^1.5.1",vue:"^3.4.21","vue-country-flag-next":"^2.3.2","vue-router":"^4.3.0","vue-virtual-scroller":"2.0.0-beta.8",vuedraggable:"^4.1.0"},devDependencies:{"@originjs/vite-plugin-federation":"^1.3.5","@rushstack/eslint-patch":"^1.7.2","@tsconfig/node18":"^18.2.2","@types/chart.js":"^2.9.41","@types/debounce":"^1.2.4","@types/node":"^18.19.21","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.0.4","@vitejs/plugin-vue-jsx":"^3.1.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0",autoprefixer:"^10.4.17",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-vue":"^9.22.0","npm-run-all2":"^6.1.2",postcss:"^8.4.35",sass:"^1.71.1",tailwindcss:"^3.4.1","tsc-alias":"^1.8.8",typescript:"~5.2.2",vite:"^5.1.4","vite-plugin-static-copy":"^0.17.1","vite-plugin-top-level-await":"^1.4.1","vue-component-meta":"^2.0.13","vue-tsc":"^1.8.27"},peerDependencies:{tailwindcss:"^3.4.1",vite:"^5.1.4",vue:"^3.4.21"}};globalThis.__FM_UI_VERSION__=CL.version;const AL={"en-US":"en","zh-CN":"zh-cn","zh-Hant":"zh-tw","th-TH":"th"},DL=(t,e)=>{if(t.use(c3,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",QM),t.use(Qx),t.use(fy),t.use(kL),Object.entries(py).forEach(([n,o])=>{t.component(n,o)}),e!=null&&e.locale){wm(e.locale);const n=AL[e.locale]||"en";W.locale(n)}};ze.FeedMeUI=DL,ze.FmAdvancedSort=Im,ze.FmButtonColorThemeVariant=Qt,ze.FmButtonVariant=_n,ze.Locale=km,ze.SnackbarMountStage=bt,ze.SnackbarPlugin=fy,ze.SnackbarPosition=on,ze.SnackbarService=uy,ze.components=py,ze.setLocale=wm,ze.useBreakpoints=Jo,ze.useDialog=Bm,ze.useDialogChild=Pm,ze.useFocus=la,ze.useFormChild=nm,ze.useProxiedModel=Pe,ze.useSnackbar=Nw,ze.useValidation=tm,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
129
+ color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,i),i}}function Mf(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const YT=(t,e)=>Math.abs(t-e)<1,ZT=(t,e,n)=>{let o;return function(...i){t.clearTimeout(o),o=t.setTimeout(()=>e.apply(this,i),n)}};var Ga={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",npm_package_exports___require:"./dist/feedmepos-ui-library.umd.cjs",npm_package_dependencies_prettier:"^3.2.5",npm_package_devDependencies__types_node:"^18.19.21",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_package_dependencies__rollup_plugin_commonjs:"^26.0.1",npm_config_user_agent:"pnpm/9.15.9 npm/? node/v20.19.5 linux x64",CI:"true",npm_package_dependencies_v_wave:"^1.5.1",npm_package_dependencies_vue:"^3.4.21",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",PIPX_HOME:"/opt/pipx",npm_package_dependencies__types_lodash:"^4.17.7",npm_package_devDependencies_tsc_alias:"^1.8.8",npm_package_devDependencies_vite:"^5.1.4",npm_package_peerDependencies_tailwindcss:"^3.4.1",npm_node_execpath:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_files_0:"dist",npm_package_scripts_build_lib:"vite build --mode library",npm_package_dependencies_vue_virtual_scroller:"2.0.0-beta.8",HOME:"/home/runner",npm_package_exports___meta_types:"./dist/meta.d.ts",npm_package_dependencies_chart_js:"^4.4.2",npm_package_devDependencies_sass:"^1.71.1",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_devDependencies_eslint_config_prettier:"^9.1.0",npm_package_devDependencies_vite_plugin_static_copy:"^0.17.1",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"feedmepos",npm_package_scripts_build_components:'run-p type-check "build-lib {@}" --',GRADLE_HOME:"/usr/share/gradle-9.2.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.2.13676358",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",npm_package_dependencies__tanstack_vue_virtual:"^3.13.0",npm_package_devDependencies_npm_run_all2:"^6.1.2",npm_package_peerDependencies_vue:"^3.4.21",GITHUB_REPOSITORY_OWNER_ID:"54831515",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_build_federation:"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"1740",npm_package_dependencies_dayjs:"^1.11.10",npm_package_devDependencies__tsconfig_node18:"^18.2.2",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_devDependencies_tailwindcss:"^3.4.1",npm_package_devDependencies_typescript:"~5.2.2",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",npm_package_homepage:"ui.feedme.ai",npm_package_devDependencies_vue_tsc:"^1.8.27",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20251102.99.1",npm_package_scripts_dev:"vite --port 5273",LOGNAME:"runner",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",STORE_PATH:"/home/runner/setup-pnpm/node_modules/.bin/store/v3",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_type:"module",npm_package_dependencies__vueuse_core:"^10.9.0",npm_package_devDependencies__vue_tsconfig:"^0.4.0",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:12724",GITHUB_WORKFLOW:"Publish Vue",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_module:"./dist/feedmepos-ui-library.js",npm_package_devDependencies_autoprefixer:"^10.4.17",RUNNER_DEBUG:"1",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.9/x64",npm_package_scripts_build_tailwind_plugin:"vite build --mode tailwind-plugin",npm_package_scripts_lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",npm_package_dependencies_fuzzy:"^0.1.3",npm_package_devDependencies__types_uuid:"^10.0.0",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.3/x64",GITHUB_RUN_ID:"19236355523",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"513206f4794f3e1a4a5083bfdc21fe8eaa13c1a3",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",npm_package_exports___import:"./dist/feedmepos-ui-library.js",npm_package_devDependencies__vitejs_plugin_vue:"^5.0.4",GITHUB_WORKFLOW_REF:"feedmepos/ui-library/.github/workflows/publish-vue.yml@refs/heads/main",GITHUB_ACTION_REPOSITORY:"",ENABLE_RUNNER_TRACING:"true",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/work/ui-library/ui-library/packages/vue/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/ui-library/ui-library/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.5/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_d0fbb4d3-2a90-4e6b-aa0b-cbc18a9c844b",INVOCATION_ID:"c48c49c7efda4d74a71c95a5983af255",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.19.5/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"318",GITHUB_TRIGGERING_ACTOR:"heiseshandian",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies_vue_country_flag_next:"^2.3.2",npm_config_frozen_lockfile:"",npm_package_exports___styles_css:"./dist/style.css",npm_package_scripts_build_tailwind_styling:"vite build --mode tailwind-styling",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_scripts_generate_component_meta:"node ./scripts/generate-component-meta.js",npm_package_devDependencies__vue_eslint_config_typescript:"^12.0.0",npm_package_devDependencies_eslint:"^8.57.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 1000026175",XDG_CONFIG_HOME:"/home/runner/.config",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"feedmepos/ui-library",npm_package_main:"./dist/feedmepos-ui-library.umd.cjs",npm_package_scripts_build_types:"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false",npm_package_dependencies__feedmepos_core:"^2.10.12",npm_package_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_exports___tailwind_plugin:"./dist/tailwind-plugin.js",npm_package_devDependencies__vitejs_plugin_vue_jsx:"^3.1.0",SHELL:"/bin/bash",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.4.0_@types+node@18.19.43_sass@1.77.8/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/run-p/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.2.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",npm_package_version:"1.8.4",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",npm_package_dependencies_vuedraggable:"^4.1.0",npm_package_devDependencies__rushstack_eslint_patch:"^1.7.2",npm_lifecycle_event:"build-lib",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build",npm_package_dependencies_uuid:"^10.0.0",GITHUB_WORKSPACE:"/home/runner/work/ui-library/ui-library",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",npm_package_dependencies_lodash:"^4.17.21",GITHUB_SHA:"513206f4794f3e1a4a5083bfdc21fe8eaa13c1a3",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies_vue_router:"^4.3.0",npm_package_devDependencies_vite_plugin_top_level_await:"^1.4.1",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"heiseshandian",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"7780463",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",npm_config_recursive:"true",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_devDependencies_eslint_plugin_vue:"^9.22.0",npm_package_devDependencies_postcss:"^8.4.35",npm_package_peerDependencies_vite:"^5.1.4",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_scripts_deploy:"pnpm run build:lib && pnpm publish --no-git-checks .",npm_package_dependencies__floating_ui_vue:"^1.0.6",npm_package_dependencies_debounce:"^2.0.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",npm_package_bugs:"https://feedmepos.atlassian.net/browse/CT-3",npm_package_scripts_register_components:"node ./scripts/register-components.js && pnpm lint",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_d4754a44-0a1d-4f63-84e5-5f0e2bdaa274",INIT_CWD:"/home/runner/work/ui-library/ui-library/packages/vue",npm_package_scripts_copy_changelog:"cp ./CHANGELOG.md ./dist/CHANGELOG.md",npm_package_dependencies_chartjs_plugin_datalabels:"^2.2.0",npm_package_dependencies_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};const $T=t=>t,eM=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),o=[];for(let i=e;i<=n;i++)o.push(i);return o},tM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;const i=s=>{const{width:l,height:c}=s;e({width:Math.round(l),height:Math.round(c)})};if(i(n.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(s=>{const l=()=>{const c=s[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(n.getBoundingClientRect())};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},ly={passive:!0},dy=typeof window>"u"?!0:"onscrollend"in window,nM=(t,e)=>{const n=t.scrollElement;if(!n)return;const o=t.targetWindow;if(!o)return;let i=0;const a=t.options.useScrollendEvent&&dy?()=>{}:ZT(o,()=>{e(i,!1)},t.options.isScrollingResetDelay),s=p=>()=>{const{horizontal:h,isRtl:m}=t.options;i=h?n.scrollLeft*(m&&-1||1):n.scrollTop,a(),e(i,p)},l=s(!0),c=s(!1);c(),n.addEventListener("scroll",l,ly);const u=t.options.useScrollendEvent&&dy;return u&&n.addEventListener("scrollend",c,ly),()=>{n.removeEventListener("scroll",l),u&&n.removeEventListener("scrollend",c)}},oM=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const o=e.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},rM=(t,{adjustments:e=0,behavior:n},o)=>{var i,a;const s=t+e;(a=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[o.options.horizontal?"left":"top"]:s,behavior:n})};class iM{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(a=>{const s=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var a;return(a=o())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return(a=o())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$T,rangeExtractor:eM,onChange:()=>{},measureElement:oM,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=Ii(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,o)=>{const i=new Map,a=new Map;for(let s=o-1;s>=0;s--){const l=n[s];if(i.has(l.lane))continue;const c=a.get(l.lane);if(c==null||l.end>c.end?a.set(l.lane,l):l.end<c.end&&i.set(l.lane,!0),i.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((s,l)=>s.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurementOptions=Ii(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,i,a,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s}),{key:!1}),this.getMeasurements=Ii(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:a,enabled:s},l)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,c);for(let p=c;p<n;p++){const h=a(p),m=this.options.lanes===1?u[p-1]:this.getFurthestMeasurement(u,p),b=m?m.end+this.options.gap:o+i,y=l.get(h),v=typeof y=="number"?y:this.options.estimateSize(p),w=b+v,A=m?m.lane:p%this.options.lanes;u[p]={index:p,start:b,size:v,end:w,key:h,lane:A}}return this.measurementsCache=u,u},{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.calculateRange=Ii(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,o,i)=>this.range=n.length>0&&o>0?aM({measurements:n,outerSize:o,scrollOffset:i}):null,{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualIndexes=Ii(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,a,s)=>a===null||s===null?[]:n({startIndex:a,endIndex:s,overscan:o,count:i}),{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),a=this.measurementsCache[i];if(!a)return;const s=a.key,l=this.elementsCache.get(s);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const a=this.itemSizeCache.get(i.key)??i.size,s=o-a;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=Ii(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let a=0,s=n.length;a<s;a++){const l=n[a],c=o[l];i.push(c)}return i},{key:Ga.env.NODE_ENV!=="production",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Mf(o[cy(0,o.length-1,i=>Mf(o[i]).start,n)])},this.getOffsetForAlignment=(n,o)=>{const i=this.getSize(),a=this.getScrollOffset();o==="auto"&&n>=a+i&&(o="end"),o==="end"&&(n-=i);const s=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const a=this.getSize(),s=this.getScrollOffset();if(o==="auto")if(i.end>=s+a-this.options.scrollPaddingEnd)o="end";else if(i.start<=s+this.options.scrollPaddingStart)o="start";else return[s,o];const l=i.start-this.options.scrollPaddingStart+(i.size-a)/2;switch(o){case"center":return[this.getOffsetForAlignment(l,o),o];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,o),o];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,o),o]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(n,o);if(!a)return;const[s,l]=a;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[u]=Mf(this.getOffsetForIndex(n,l));YT(u,this.getScrollOffset())||this.scrollToIndex(n,{align:l,behavior:i})}else this.scrollToIndex(n,{align:l,behavior:i})}))},this.scrollBy=(n,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;return o.length===0?i=this.options.paddingStart:i=this.options.lanes===1?((n=o[o.length-1])==null?void 0:n.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const cy=(t,e,n,o)=>{for(;t<=e;){const i=(t+e)/2|0,a=n(i);if(a<o)t=i+1;else if(a>o)e=i-1;else return i}return t>0?t-1:0};function aM({measurements:t,outerSize:e,scrollOffset:n}){const o=t.length-1,a=cy(0,o,l=>t[l].start,n);let s=a;for(;s<o&&t[s].end<n+e;)s++;return{startIndex:a,endIndex:s}}function sM(t){const e=new iM(r.unref(t)),n=r.shallowRef(e),o=e._didMount();return r.watch(()=>r.unref(t).getScrollElement(),i=>{i&&e._willUpdate()},{immediate:!0}),r.watch(()=>r.unref(t),i=>{e.setOptions({...i,onChange:(a,s)=>{var l;r.triggerRef(n),(l=i.onChange)==null||l.call(i,a,s)}}),e._willUpdate(),r.triggerRef(n)},{immediate:!0}),r.onScopeDispose(o),n}function lM(t){return sM(r.computed(()=>({observeElementRect:tM,observeElementOffset:nM,scrollToFn:rM,...r.unref(t)})))}const dM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},cM={class:"text-fm-color-typo-secondary"},uM=["onClick"],fM={key:0},pM={key:0,class:"w-full"},hM={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},mM={class:"text-fm-color-typo-secondary"},gM=["onClick"],bM=["colspan"],yM={key:1,class:"virtual-table-container w-full"},vM={class:"sticky top-0 z-10 w-full"},kM={class:"w-full"},wM=["onClick"],xM={class:"flex gap-8 items-center"},SM={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},CM={class:"flex gap-8"},AM=Be(r.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},hideHeaderRow:{type:Boolean},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean},columnVisibility:{},draggable:{type:[Boolean,Function]},wholeRowDraggable:{type:Boolean},expandedState:{type:[Boolean,Object]},getRowCanExpand:{type:Function,default:()=>!0},getSubRow:{type:Function,default:t=>t.subRows},onVuedraggableMove:{type:Function,default:()=>!0},virtual:{type:Boolean,default:!1},virtualRowHeight:{default:48}},emits:["sort-change","dnd-changed","update:expanded-state","update:dragging"],setup(t,{emit:e}){const n=t,o=e;if(n.virtual&&n.draggable)throw new Error("Cannot use virtual scroll and draggable at the same time");const i=Pe(n,"modelValue"),a=Pe(n,"searchValue"),s=r.ref(n.rowData),l=r.ref(!1);r.watch(()=>l.value,C=>{o("update:dragging",C),C&&o("update:expanded-state",{})});const c=()=>{let C=[];n.selection&&C.push({id:"row-selection",header:({table:L})=>r.createVNode(kb,{checked:L.getIsAllPageRowsSelected(),indeterminate:L.getIsSomePageRowsSelected(),onChange:L.getToggleAllPageRowsSelectedHandler()},null),cell:({row:L})=>L.depth===0?r.createVNode(kb,{checked:L==null?void 0:L.getIsSelected(),disabled:!(L!=null&&L.getCanSelect()),onChange:L==null?void 0:L.getToggleSelectedHandler()},null):r.createVNode("div",null,null),enableResizing:!1,meta:{headerClass:"py-[2px] pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"},size:60});const M=n.draggable;return M&&!n.wholeRowDraggable&&C.push({id:"row-drag",header:"",cell:({row:L})=>(typeof M=="function"?M(L.original,L.index):M)&&L.depth===0?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(ke,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",onMousedown:()=>{l.value=!0},onMouseup:()=>{l.value=!1}})):typeof M=="function"?r.h("div",{class:["w-full flex",n.selection?"justify-end":"justify-start"]},r.h(ke,{prependIcon:"drag_handle",variant:"tertiary",class:"cursor-move",type:"button",disabled:!0})):r.createVNode("div",null,null),enableResizing:!1,meta:{cellClass:"dnd-handler",width:"60px"},size:60}),[...C,...n.columnDefs]},u=r.ref([]);r.watch(()=>u.value,C=>{o("sort-change",C)}),r.watch(()=>n.rowData,C=>{s.value=[...C]},{deep:!0});const p=r.ref({pageIndex:0,pageSize:n.pageSize}),h=vO({get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()},get data(){return s.value},state:{get pagination(){return typeof n.fetchFn=="function"?p.value:void 0},get globalFilter(){return a.value},get rowSelection(){return i.value},get sorting(){return u.value},get columnVisibility(){return n.columnVisibility},get expanded(){return n.expandedState}},getCoreRowModel:dO(),getSortedRowModel:gO(),getFilteredRowModel:hO(),getPaginationRowModel:mO(),getRowCanExpand:n.getRowCanExpand,onExpandedChange:C=>{if(!n.expandedState)return;const M=typeof C=="function"?C(n.expandedState):C;o("update:expanded-state",M)},onRowSelectionChange:C=>{if(!v.value)return i.value=typeof C=="function"?C(i.value):C},onSortingChange:C=>{u.value=typeof C=="function"?C(u.value):C},onGlobalFilterChange:C=>{a.value=typeof C=="function"?C(a.value):C},autoResetPageIndex:n.autoResetPageIndex,manualPagination:typeof n.fetchFn=="function",...typeof n.fetchFn=="function"&&{onPaginationChange:C=>p.value=typeof C=="function"?C(p.value):C},pageCount:typeof n.fetchFn=="function"?n.pageCount:void 0,getSubRows:C=>n.getSubRow(C),getExpandedRowModel:cO(),get enableHiding(){return!0}});r.watch(()=>p.value,C=>{y(C)}),r.watch(()=>n.selection,()=>{h.setOptions(C=>({...C,get enableRowSelection(){return!!n.selection},get enableMultiRowSelection(){return n.selection==="multiple"},get columns(){return c()}}))});const m=r.ref(""),b=r.ref(!1);async function y(C){if(!n.fetchFn)return;b.value=!0;const M=`${Math.random()}`;m.value=M;try{await n.fetchFn(C)}catch{}finally{m.value===M&&(b.value=!1)}}const v=r.computed(()=>{const C=b.value;return typeof n.loading=="boolean"?n.loading:C});r.watch(()=>n.rowData,()=>{h.setOptions(C=>({...C,get data(){return s.value}}))}),r.watch([()=>n.pageCount,()=>n.rowCount],()=>{h.setOptions(C=>({...C,pageCount:n.pageCount,rowCount:n.rowCount}))}),r.watch(()=>n.pageSize,()=>{h.setPageSize(n.pageSize)}),r.watch([()=>n.columnFilter],([C])=>{h.setColumnFilters(()=>C??[])}),r.watch(()=>n.columnDefs,()=>{h.setOptions(C=>({...C,get columns(){return c()}}))}),r.onMounted(()=>{n.fetchFn&&n.fetchFn(h.getState().pagination),h.setPageSize(n.pageSize)});const w=r.ref(380);function A(C){var L;const M=((L=C.el)==null?void 0:L.scrollHeight)??0;w.value=Math.max(100,M)}const I=Jo(),V=r.ref(),R=r.ref(typeof n.shrinkAt=="boolean"&&!n.shrinkAt?!1:I.isBreakpointKeyword(n.shrinkAt)&&I.isAtMost(n.shrinkAt)),E=r.computed(()=>{const C=[...Array.from(Array(Math.min(5,Math.floor(n.rowData.length/10))),(L,K)=>(K+1)*10).map(L=>({label:L.toString(),value:L}))],M={label:U("table.all"),value:n.rowData.length};return n.pageSize&&n.pageSize>0&&(C.some(L=>L.value===n.pageSize)||(C.push({label:n.pageSize.toString(),value:n.pageSize}),C.sort((L,K)=>L.value-K.value))),[...C,M]});function T(C){const M=C.el;if(!M||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt)return;const L=of(function(){if(V.value=M.clientWidth,I.isBreakpointKeyword(n.shrinkAt)){R.value=I.isAtMost(n.shrinkAt);return}const K=Number(n.shrinkAt);if(isNaN(K)){R.value=!1;return}R.value=M.scrollWidth>=K},200);M.resizeTable??(M.resizeTable=function(){R.value=I.isBreakpointKeyword(n.shrinkAt)&&I.isAtMost(n.shrinkAt),L()}),window.addEventListener("resize",M.resizeTable),M.resizeTable()}function B(C){const M=C.el;!M||typeof n.shrinkAt>"u"||typeof n.shrinkAt=="boolean"&&!n.shrinkAt||M.resizeTable&&window.removeEventListener("resize",M.resizeTable)}function H(C){const M=Math.min(...C.map(ae=>ae.index)),L=Math.max(...C.map(ae=>ae.index)),K=s.value.slice(0,M),oe=s.value.slice(L+1),le=C.map(ae=>ae.original),Z=s.value.slice(M,L+1);JT(le,Z)||o("dnd-changed",[...K,...le,...oe])}const _=r.ref(),j=r.computed(()=>!n.virtual||!_.value?null:lM({count:h.getRowModel().rows.length,getScrollElement:()=>_.value||null,estimateSize:()=>n.virtualRowHeight,overscan:20})),Q=r.ref([]);function F(C){Q.value=C}function S(C,M){var K;const L=(K=C.column.columnDef.meta)==null?void 0:K.colspan;return typeof L=="function"?L(M):L??1}function x(C){return C.getVisibleCells().filter(M=>S(M,C)!==0)}function P({draggedContext:C}){const M=n.draggable,L=C.index,K=h.getRowModel().rows[L];let oe=typeof M=="function"?M(K.original,L):M;if(!oe)return oe;const le=C.futureIndex,Z=h.getRowModel().rows[le];return oe=typeof M=="function"?M(Z.original,le):M,oe}return(C,M)=>{var oe,le;const L=r.resolveComponent("FmListItem"),K=r.resolveComponent("FmList");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:T,onVnodeUnmounted:B},[r.createElementVNode("div",{class:"overflow-y-auto",ref_key:"parentRef",ref:_},[R.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[v.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({height:`${w.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",dM,[r.createVNode(Zo),r.createVNode(Sr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(C.$slots,"loading-text",{},()=>[r.createElementVNode("span",cM,r.toDisplayString(r.unref(U)("table.loading")),1)],!0)]),r.createVNode(Zo)])],4)):(r.openBlock(),r.createBlock(K,{key:1,onVnodeMounted:A},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h).getRowModel().rows,Z=>r.renderSlot(C.$slots,"list-row",r.mergeProps({key:Z.id,ref_for:!0},Z),()=>[r.createVNode(L,{class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":Z.getIsSelected(),"cursor-pointer":typeof C.onRowClick=="function"}]),style:{padding:"0"},tag:"label"},{prepend:r.withCtx(()=>{var ae,fe,he,Ie,st;return[r.createVNode(r.unref(Wa),{props:(fe=(ae=Z.getVisibleCells().find(Xe=>Xe.column.id==="row-selection"))==null?void 0:ae.getContext)==null?void 0:fe.call(ae),render:(st=(Ie=(he=Z.getVisibleCells().find(Xe=>Xe.column.id==="row-selection"))==null?void 0:he.column)==null?void 0:Ie.columnDef)==null?void 0:st.cell},null,8,["props","render"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:ae=>{var fe;return(fe=C.onRowClick)==null?void 0:fe.call(C,Z)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(Z.getVisibleCells(),ae=>{var fe;return r.openBlock(),r.createElementBlock(r.Fragment,{key:ae.id},[ae.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",fM,[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((fe=ae.column.columnDef.meta)==null?void 0:fe.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(Wa),{props:ae.getContext(),render:ae.column.columnDef.cell},null,8,["props","render"])],2)])):r.createCommentVNode("",!0)],64)}),128))],8,uM)]),_:2},1032,["class"])],!0)),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[C.virtual?(r.openBlock(),r.createElementBlock("div",yM,[r.createElementVNode("div",vM,[r.createElementVNode("table",kM,[C.hideHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Ul,{key:0,table:r.unref(h),class:"bg-fm-color-neutral-gray-100","onUpdate:columnWidths":F},null,8,["table"]))])]),r.createElementVNode("div",{class:"virtual-list relative",style:r.normalizeStyle({height:`${r.unref(h).getRowModel().rows.length*n.virtualRowHeight}px`,width:"100%"}),onVnodeMounted:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList((le=(oe=j.value)==null?void 0:oe.value)==null?void 0:le.getVirtualItems(),Z=>{var ae,fe;return r.openBlock(),r.createElementBlock("div",{key:Z.index,style:r.normalizeStyle({position:"absolute",top:0,left:0,width:"100%",height:`${n.virtualRowHeight}px`,transform:`translateY(${Z.start}px)`,display:"flex",alignItems:"center",borderBottom:"1px solid var(--fm-color-neutral-gray-100)"}),class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":(ae=r.unref(h).getRowModel().rows[Z.index])==null?void 0:ae.getIsSelected(),"cursor-pointer":typeof C.onRowClick=="function"},C.rowClassName,"hover:bg-fm-color-opacity-sm"]),onClick:he=>{var Ie;return(Ie=C.onRowClick)==null?void 0:Ie.call(C,r.unref(h).getRowModel().rows[Z.index])}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(((fe=r.unref(h).getRowModel().rows[Z.index])==null?void 0:fe.getVisibleCells())||[],(he,Ie)=>{var st,Xe,nt,ot;return r.openBlock(),r.createElementBlock("div",{key:he.id,class:r.normalizeClass(["virtual-cell","h-full flex items-center",((st=he.column.columnDef.meta)==null?void 0:st.cellClass)??"px-16"]),style:r.normalizeStyle({width:Q.value[Ie]?`${Q.value[Ie]}px`:"auto",flex:Q.value[Ie]?"0 0 auto":"1 1 0px",textAlign:((Xe=he.column.columnDef.meta)==null?void 0:Xe.textAlign)??"left",maxWidth:(nt=he.column.columnDef.meta)==null?void 0:nt.maxWidth})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((ot=he.column.columnDef.meta)==null?void 0:ot.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(Wa),{props:he.getContext(),render:he.column.columnDef.cell},null,8,["props","render"])],2)],6)}),128))],14,wM)}),128))],4)])):(r.openBlock(),r.createElementBlock("table",pM,[!C.pinHeaderRow&&!C.hideHeaderRow?(r.openBlock(),r.createBlock(Ul,{key:0,table:r.unref(h)},null,8,["table"])):r.createCommentVNode("",!0),r.renderSlot(C.$slots,"pin-top",{},void 0,!0),v.value?(r.openBlock(),r.createElementBlock("tbody",{key:1,onVnodeMounted:A},[r.createElementVNode("div",{style:r.normalizeStyle({height:`${w.value}px`}),class:"pointer-events-none"},[r.createElementVNode("div",hM,[r.createVNode(Zo),r.createVNode(Sr,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(C.$slots,"loading-text",{},()=>[r.createElementVNode("span",mM,r.toDisplayString(r.unref(U)("table.loading")),1)],!0)]),r.createVNode(Zo)])],4)],512)):(r.openBlock(),r.createBlock(r.unref(bc),{key:2,clone:r.unref(ef.clone),handle:Object.keys(n.expandedState??{}).length>0?".dnd-handler-disabled":".dnd-handler","model-value":r.unref(h).getRowModel().rows,move:P||C.onVuedraggableMove,"item-key":"id",tag:"tbody",onDragend:M[0]||(M[0]=Z=>l.value=!1),onDragstart:M[1]||(M[1]=Z=>l.value=!0),"onUpdate:modelValue":H,onVnodeMounted:A},{item:r.withCtx(({element:Z})=>[C.$slots["table-row"]?r.renderSlot(C.$slots,"table-row",r.normalizeProps(r.mergeProps({key:0},Z)),void 0,!0):(r.openBlock(),r.createElementBlock("tr",{key:1,class:r.normalizeClass([[{"bg-fm-color-neutral-gray-100":Z.getIsSelected(),"cursor-pointer":typeof C.onRowClick=="function","dnd-handler":(typeof C.draggable=="function"?C.draggable(Z.original,Z.index):C.draggable)&&C.wholeRowDraggable,"border-b border-fm-color-neutral-gray-100":Z.subRows.length===0&&Z.depth===0?!0:Z.depth===0?!Z.getIsExpanded():Z.index+1===Z.getParentRow().subRows.length},C.rowClassName],"hover:bg-fm-color-opacity-sm"]),onClick:ae=>{var fe;return(fe=C.onRowClick)==null?void 0:fe.call(C,Z)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x(Z),ae=>{var fe,he,Ie,st,Xe,nt;return r.openBlock(),r.createElementBlock("td",{key:ae.id,colspan:S(ae,Z),class:r.normalizeClass([v.value?"hidden":"","h-[48px] text-fm-color-typo-primary",((fe=ae.column.columnDef.meta)==null?void 0:fe.cellClass)??"px-16"]),style:r.normalizeStyle({width:(he=ae.column.columnDef.meta)!=null&&he.width?(Ie=ae.column.columnDef.meta)==null?void 0:Ie.width:ae.column.getSize()!==0?`${ae.column.getSize()}px`:void 0,maxWidth:(st=ae.column.columnDef.meta)==null?void 0:st.maxWidth,textAlign:((Xe=ae.column.columnDef.meta)==null?void 0:Xe.textAlign)??"left"})},[r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-md-400",((nt=ae.column.columnDef.meta)==null?void 0:nt.cellSpanClass)??"line-clamp-2 w-full"])},[r.createVNode(r.unref(Wa),{props:ae.getContext(),render:ae.column.columnDef.cell},null,8,["props","render"])],2)],14,bM)}),128))],10,gM))]),_:3},8,["clone","handle","model-value","move"])),C.pinHeaderRow&&!C.hideHeaderRow?(r.openBlock(),r.createBlock(Ul,{key:3,table:r.unref(h),class:r.normalizeClass(["bg-fm-color-neutral-gray-100 top-0",{sticky:!l.value}]),"onUpdate:columnWidths":F},null,8,["table","class"])):r.createCommentVNode("",!0)]))],64))],512),C.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxWidth:V.value?`${V.value}px`:void 0}),class:"basis-72 bg-white flex items-center justify-between px-24"},[R.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([{"hidden invisible":C.forceMobileFooter},"flex gap-24 items-center justify-between xs:hidden xs:invisible"])},[r.createElementVNode("div",xM,[r.createElementVNode("span",SM,r.toDisplayString(r.unref(U)("table.itemsPerPage")),1),r.createVNode(wb,{items:E.value,"model-value":r.unref(h).getState().pagination.pageSize,"onUpdate:modelValue":M[2]||(M[2]=Z=>r.unref(h).setPageSize(Z))},null,8,["items","model-value"])]),r.createElementVNode("span",{class:r.normalizeClass([{"hidden invisible":C.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible"])},r.toDisplayString(r.unref(U)("table.itemCount",{start:n.rowData.length<r.unref(h).getState().pagination.pageSize?n.rowData.length:r.unref(h).getState().pagination.pageIndex*r.unref(h).getState().pagination.pageSize+1,end:(r.unref(h).getState().pagination.pageIndex+1)*r.unref(h).getState().pagination.pageSize,total:n.rowCount??n.rowData.length})),3)],2)),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":R.value||C.forceMobileFooter,"xs:w-full xs:justify-between":!R.value}])},[r.createVNode(wb,{items:Array.from(Array(r.unref(h).getPageCount()),(Z,ae)=>ae+1).map(Z=>({label:Z.toString(),value:Z})),"model-value":r.unref(h).getState().pagination.pageIndex+1,"onUpdate:modelValue":M[3]||(M[3]=Z=>r.unref(h).setPageIndex(Z?Z-1:0))},null,8,["items","model-value"]),r.createElementVNode("span",{class:r.normalizeClass([{"mr-auto":R.value||C.forceMobileFooter},"fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto"])},r.toDisplayString(r.unref(U)("table.pageCount",{total:r.unref(h).getPageCount()})),3),r.createElementVNode("div",CM,[r.createVNode(ke,{disabled:!r.unref(h).getCanPreviousPage(),icon:"chevron_left","icon-color":"neutral-black",variant:"tertiary",onClick:M[4]||(M[4]=()=>r.unref(h).previousPage())},null,8,["disabled"]),r.createVNode(ke,{disabled:!r.unref(h).getCanNextPage(),icon:"chevron_right","icon-color":"neutral-black",variant:"tertiary",onClick:M[5]||(M[5]=()=>r.unref(h).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),[["__scopeId","data-v-59fbc452"]]),DM=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),EM=r.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),a=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),s=r.computed(()=>{const u=n.items.slice(0,n.showMoreAt-1),p=n.items.find(m=>{var b;return m.value===n.modelValue||((b=m.children)==null?void 0:b.find(y=>y.value===n.modelValue))}),h=u.map(m=>m.value);return p&&h.includes(p.value)?n.items.slice(0,n.showMoreAt):p?[...u,p]:u}),l=r.computed(()=>{const u=s.value.map(p=>p.value);return n.items.filter(p=>!u.includes(p.value))}),c=u=>{i.value=!1,o("update:modelValue",u)};return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",u.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,h=>r.renderSlot(u.$slots,"default",r.mergeProps({ref_for:!0},{...h,tabsProps:a.value}),()=>[r.createVNode(ab,r.mergeProps({"model-value":n.modelValue,ref_for:!0},{children:h.children,label:h.label,icon:h.icon,disabled:h.disabled,badge:h.badge,value:h.value,tabsProps:a.value},{disabled:h.disabled===void 0?u.disabled:h.disabled,vertical:u.vertical,"onUpdate:modelValue":p[0]||(p[0]=m=>o("update:modelValue",m))}),null,16,["model-value","disabled","vertical"])])),256)),l.value.length>0?(r.openBlock(),r.createBlock(io,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":u.vertical}]),placement:u.vertical?"right-start":"bottom-start",onMenuChanged:p[1]||(p[1]=h=>i.value=h)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[u.vertical?"h-40":"h-[46px]"]])},[r.createVNode(ue,{name:"more_vert"}),DM],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,h=>{var m;return r.openBlock(),r.createElementBlock(r.Fragment,{key:h.value},[(m=h.children)!=null&&m.length?(r.openBlock(),r.createBlock(io,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(St,{"model-value":n.modelValue===h.value,label:h.label,icon:h.icon,disabled:h.disabled,expandable:""},{append:r.withCtx(()=>[h.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.children,b=>(r.openBlock(),r.createBlock(St,{key:b.value,"model-value":n.modelValue===b.value,label:b.label,icon:b.icon,disabled:b.disabled,onClick:y=>c(b.value)},{append:r.withCtx(()=>[b.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:b.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(r.openBlock(),r.createBlock(St,{key:1,"model-value":n.modelValue===h.value,label:h.label,icon:h.icon,disabled:h.disabled,onClick:b=>c(h.value)},{append:r.withCtx(()=>[h.badge?(r.openBlock(),r.createBlock(Yo,{key:0,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):r.createCommentVNode("",!0)],2))}}),BM=["tabindex"],PM=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0},action:{}},setup(t){const e=t,n=Pe(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),a=r.computed(()=>{if(!o.value)return 0;function m(y){return y.children?[y,...y.children.flatMap(m)]:[y]}return 56*(e.children?e.children.flatMap(m):[]).length});function s(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value,e.action&&e.action()}}const l=r.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function c(m){return m.children&&m.children.length?m.children.some(c):e.modelValue===m.value}const u=r.computed(()=>{const m=c(e);return o.value?m&&i.value:m}),p=r.computed(()=>e.children?e.children.map(({modelValue:m,indentation:b,active:y,focusable:v,...w})=>{const A=c(w);return{...w,expand:A,focusable:!w.disabled&&!i.value}}):[]),h=r.computed(()=>{switch(e.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(m,b)=>{const y=r.resolveComponent("FmCollapsibleTab",!0),v=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({paddingLeft:`${h.value}px`}),class:"flex flex-col px-8"},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["flex fm-corner-radius-md gap-4 items-center px-16 py-8 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!m.disabled,"cursor-not-allowed":m.disabled,"bg-fm-color-system-warning-100":u.value}]),tabindex:l.value?"0":"-1",type:"button",onClick:s},[m.icon?(r.openBlock(),r.createBlock(ue,{key:0,class:r.normalizeClass({"text-fm-color-typo-disabled":m.disabled,"text-fm-color-typo-primary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value}),name:m.icon},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["py-4 fm-typo-en-body-lg-400 text-left line-clamp-2",{"text-fm-color-typo-secondary":!m.disabled&&!u.value,"text-fm-color-primary":!m.disabled&&u.value,"text-fm-color-typo-disabled":m.disabled}])},r.toDisplayString(m.label),3),m.badge!==void 0&&m.badge!==null?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[typeof m.badge=="number"?(r.openBlock(),r.createBlock(Yo,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(m.badge),{key:1}))],64)):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",{key:2,style:r.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"}),class:"flex h-24 items-center ml-auto w-24"},[r.createVNode(ue,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!m.disabled,"text-fm-color-typo-disabled":m.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):r.createCommentVNode("",!0)],10,BM)),[[v,!m.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxHeight:i.value?0:`${a.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"}),class:"flex flex-col overflow-hidden"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(w,A)=>(r.openBlock(),r.createBlock(y,r.mergeProps({key:A,"model-value":r.unref(n),"onUpdate:modelValue":b[0]||(b[0]=I=>r.isRef(n)?n.value=I:null),indentation:m.indentation+1,ref_for:!0},w),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)],4)}}}),OM={class:"h-full flex flex-col overflow-auto"},IM=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=Pe(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:a,...s})=>s):[]);function i(a){function s(c){return c.children?c.children.flatMap(s):[c.value]}return(a.children?a.children.flatMap(s):[a.value]).includes(e.modelValue)}return(a,s)=>(r.openBlock(),r.createElementBlock("div",OM,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(l,c)=>(r.openBlock(),r.createBlock(PM,r.mergeProps({key:c,"model-value":r.unref(n),"onUpdate:modelValue":s[0]||(s[0]=u=>r.isRef(n)?n.value=u:null),active:i(l),expand:i(l),ref_for:!0},l),null,16,["model-value","active","expand"]))),128))]))}}),NM=r.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"},rounded:{default:()=>"xxxl"}},setup(t){const e=t,n=r.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center uppercase",{"w-24 h-24 fm-typo-en-body-sm-600":o.size==="sm","w-9 h-9 fm-typo-en-body-sm-600":o.size==="sm2","w-40 h-40 fm-typo-en-body-md-600":o.size==="md","w-48 h-48 fm-typo-en-body-lg-600":o.size==="lg","w-56 h-56 fm-typo-en-body-lg-600":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src},{"rounded-xxxl":o.rounded==="xxxl","rounded-xxl":o.rounded==="xxl","rounded-xl":o.rounded==="xl","rounded-lg":o.rounded==="lg","rounded-md":o.rounded==="md","rounded-sm":o.rounded==="sm"}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},r.toDisplayString(n.value),7))}}),VM=r.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-en-body-sm-600":n.size==="sm","w-40 h-40 fm-typo-en-body-md-600":n.size==="md","w-56 h-56 fm-typo-en-body-lg-600":n.size==="lg","w-72 h-72 fm-typo-en-body-lg-600":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(r.openBlock(),r.createBlock(ue,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),RM={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},FM={class:"flex gap-4 items-center xs:hidden"},TM={key:1,class:"hidden xs:flex"},MM=r.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]},zIndexForBottomSheet:{default:void 0},titleBold:{type:Boolean,default:()=>!0},primaryActionXsBottomMargin:{}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const s=[...n.actions],l=s.findIndex(m=>m.isPrimary),c=s[l],[u,p,...h]=s.filter((m,b)=>b!==l);return{primaryAction:c,firstSecondaryAction:u,secondSecondaryAction:p,showMoreSecondary:h,bottomSheetActions:s.filter(m=>!m.isPrimary),fabActions:s.filter(m=>m.isPrimary)}}),a=r.ref(!1);return(s,l)=>(r.openBlock(),r.createElementBlock("div",RM,[s.backButton?(r.openBlock(),r.createBlock(ke,{key:0,icon:"arrow_back","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[0]||(l[0]=c=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"prepend"),r.createVNode(lf,{description:s.description,title:s.title,"title-bold":s.titleBold,class:"flex-grow"},{title:r.withCtx(()=>[r.renderSlot(s.$slots,"title")]),description:r.withCtx(()=>[r.renderSlot(s.$slots,"description")]),_:3},8,["description","title","title-bold"]),r.createElementVNode("div",FM,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(ke,{key:0,"append-icon":i.value.firstSecondaryAction.appendIcon,"bg-color":i.value.firstSecondaryAction.bgColor,"border-color":i.value.firstSecondaryAction.borderColor,"icon-color":i.value.firstSecondaryAction.iconColor,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"text-color":i.value.firstSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[1]||(l[1]=c=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(ke,{key:1,"append-icon":i.value.secondSecondaryAction.appendIcon,"bg-color":i.value.secondSecondaryAction.bgColor,"border-color":i.value.secondSecondaryAction.borderColor,"icon-color":i.value.secondSecondaryAction.iconColor,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"text-color":i.value.secondSecondaryAction.fontColor,variant:i.value.firstSecondaryAction.variant??"tertiary",size:"md",type:"button",onClick:l[2]||(l[2]=c=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(io,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(ke,{"append-icon":"expand_more","icon-color":"black",label:r.unref(U)("actions.more"),size:"md",type:"button",variant:"tertiary"},null,8,["label"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,c=>(r.openBlock(),r.createBlock(St,{key:c.value,icon:c.prependIcon,label:c.label,onClick:u=>o("click:action",c.value)},null,8,["icon","label","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(ke,{key:3,"append-icon":i.value.showMoreSecondary[0].appendIcon,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,size:"md",type:"button",variant:"tertiary",onClick:l[3]||(l[3]=c=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["append-icon","label","prepend-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(ke,{key:4,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"primary",size:"md",type:"button",onClick:l[4]||(l[4]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",TM,[r.createVNode(ke,{icon:"more_vert","icon-color":"black",size:"md",type:"button",variant:"tertiary",onClick:l[5]||(l[5]=c=>a.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(_c,{"model-value":a.value,"onUpdate:modelValue":l[6]||(l[6]=c=>a.value=c),"z-index":n.zIndexForBottomSheet,"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(af,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,c=>(r.openBlock(),r.createBlock(sf,{key:c.value,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{o("click:action",c.value),a.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),r.createElementVNode("div",{class:r.normalizeClass(["fixed hidden right-16 xs:inline",{"bottom-[68px]":!n.primaryActionXsBottomMargin}]),style:r.normalizeStyle({bottom:n.primaryActionXsBottomMargin})},[i.value.primaryAction?(r.openBlock(),r.createBlock(ke,{key:0,"append-icon":i.value.primaryAction.appendIcon,"bg-color":i.value.primaryAction.bgColor,"border-color":i.value.primaryAction.borderColor,"icon-color":i.value.primaryAction.iconColor,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"text-color":i.value.primaryAction.fontColor,variant:i.value.primaryAction.variant??"fab",class:"fm-shadow-light-100",size:"md",type:"button",onClick:l[7]||(l[7]=c=>o("click:action",i.value.primaryAction.value))},null,8,["append-icon","bg-color","border-color","icon-color","label","prepend-icon","text-color","variant"])):r.createCommentVNode("",!0)],6)]))]))}}),LM={class:"fm-typo-en-title-md-600"},zM={class:"flex"},_M=Be(r.defineComponent({__name:"FmScorecard",props:{title:{},value:{default:0},compareValue:{default:void 0},description:{},hideCompare:{type:Boolean,default:!1},hideLineChart:{type:Boolean,default:!1},sparklineData:{default:void 0}},setup(t){const e=t,n=(s,l)=>{if(s===""||l==="")return null;const c=Number(s),u=Number(l);let p=0;u===0?c===0?p=0:p=1:p=(c-u)/u;const h=o(p);return{value:isNaN(p)?"":`${(p*100).toFixed(0)}%`,icon:h}};function o(s){return s>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:s<0?{name:"trending_down",color:"#99231D",tailwind:"fm-color-system-error-100"}:{name:"equal",color:"#C7C7CC",tailwind:"fm-color-neutral-gray-100"}}const i=r.computed(()=>{const{value:s,compareValue:l}=e;return l?n(s,l):null}),a=r.computed(()=>{var s;return((s=e.sparklineData)==null?void 0:s.datasets.map(l=>{var c;return{label:l.name,data:l.values,fill:!0,color:((c=i.value)==null?void 0:c.icon.color)??"fm-color-system-info-300"}}))??[]});return(s,l)=>(r.openBlock(),r.createBlock(Hc,{class:"flex flex-col gap-2 p-5",variant:"outlined"},{default:r.withCtx(()=>[r.createVNode(Rc,{content:e.description},{default:r.withCtx(()=>[r.renderSlot(s.$slots,"title",{},()=>[r.createElementVNode("p",{class:r.normalizeClass([e.description?"border-b-2 border-dotted":"","fm-typo-body-md-400 w-full truncate"])},r.toDisplayString(e.title),3)],!0)]),_:3},8,["content"]),r.createElementVNode("p",LM,r.toDisplayString(e.value),1),s.hideCompare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",zM,[i.value?(r.openBlock(),r.createBlock(Lc,{key:0,class:r.normalizeClass(`bg-${i.value.icon.tailwind}`),compact:""},{default:r.withCtx(()=>[r.createVNode(ue,{color:i.value.icon.color,name:i.value.icon.name},null,8,["color","name"]),r.createElementVNode("p",{style:r.normalizeStyle({color:i.value.icon.color}),class:"fm-typo-body-md-700"},r.toDisplayString(i.value.value),5)]),_:1},8,["class"])):r.createCommentVNode("",!0)]),r.renderSlot(s.$slots,"compare",{},void 0,!0)],64)),e.sparklineData?(r.openBlock(),r.createBlock(Hc,{key:1},{default:r.withCtx(()=>[r.createVNode(p1,{datasets:a.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:e.sparklineData.dimension},class:"sparkline"},null,8,["datasets","x-axis"])]),_:1})):r.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-c66db589"]]);var Qa=(t=>(t.Premium="premium",t.Beta="beta",t.Paid="paid",t))(Qa||{});const HM=r.defineComponent({__name:"FmPill",props:{variant:{default:Qa.Beta},label:{}},setup(t){const e=t,n=r.computed(()=>({[Qa.Beta]:{containerClass:"border border-fm-color-system-error-400 bg-fm-color-system-error-100 ",label:"BETA",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-error"},[Qa.Premium]:{containerClass:"h-[18px] fm-pill-premium-gradient",label:"Premium",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-white"},[Qa.Paid]:{containerClass:"border border-fm-color-system-info-400 bg-fm-color-system-info-100 ",icon:"lock",label:"Paid feature",labelClass:"fm-typo-en-body-sm-600 text-fm-color-typo-info"}})[e.variant]);return(o,i)=>{const a=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center fm-corner-radius-md px-4 gap-4",n.value.containerClass])},[n.value.icon?(r.openBlock(),r.createBlock(a,{key:0,size:"sm",outline:"",name:n.value.icon,class:r.normalizeClass(n.value.labelClass)},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(n.value.labelClass)},r.toDisplayString(e.label||n.value.label),3)],2)}}}),UM=Be(HM,[["__scopeId","data-v-cdca68a7"]]),$l=16,WM=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=Jo(),n=r.inject(vc),o=r.computed(()=>{var u;const s={currentSum:$l,tops:new Array},l=Object.values(on).reduce((p,h)=>({...p,[h]:{...s}}),{});return[...((u=n==null?void 0:n.store)==null?void 0:u.snackbars)??[]].reduce((p,h)=>{const m=e.value.xs?on.TOP:h.position??on.TOP_RIGHT,{currentSum:b,tops:y}=p[m];y.push({id:h.id,accumulatedHeight:b});const v=h.mountStage===bt.EXPIRED?0:$l+h.renderedHeight;return p[m]={currentSum:b+v,tops:y},p},l)}),i=r.computed(()=>{var s,l;return(l=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:l.map(c=>{var h,m,b,y,v,w;let u=0;const p=e.value.xs?on.TOP:c.position??on.TOP_RIGHT;switch(c.mountStage){case bt.PREMOUNT:{u=e.value.xs?0:$l;break}case bt.MOUNTED:{u=((b=(m=(h=o.value[p].tops)==null?void 0:h.find)==null?void 0:m.call(h,A=>A.id===c.id))==null?void 0:b.accumulatedHeight)||$l;break}case bt.EXPIRED:{u=((w=(v=(y=o.value[p].tops)==null?void 0:y.find)==null?void 0:v.call(y,A=>A.id===c.id))==null?void 0:w.accumulatedHeight)||0,u=Math.max(0,u-c.renderedHeight);break}}return{...c,top:u}})}),a=(s,l,c)=>{if(e.value.xs)return{bottom:`${s}px`,width:"calc(100vw - 32px)",right:"16px",opacity:l===bt.EXPIRED?0:1};if(c===on.TOP)return{top:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===on.TOP_LEFT)return{top:`${s}px`,opacity:l===bt.EXPIRED?0:1,left:l===bt.PREMOUNT?"-20px":"16px"};if(c===on.TOP_RIGHT)return{top:`${s}px`,opacity:l===bt.EXPIRED?0:1,right:l===bt.PREMOUNT?"-20px":"16px"};if(c===on.BOTTOM)return{bottom:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,right:"50vw",transform:"translateX(50%)"};if(c===on.BOTTOM_LEFT)return{bottom:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,left:l===bt.PREMOUNT?"-20px":"16px"};if(c===on.BOTTOM_RIGHT)return{bottom:l===bt.PREMOUNT?"-20px":`${s}px`,opacity:l===bt.EXPIRED?0:1,right:l===bt.PREMOUNT?"-20px":"16px"}};return(s,l)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createBlock(r.Teleport,{key:c.id,to:"body"},[r.createVNode(ib,{action:c.action,description:c.message,dismissable:c.dismissable,spinner:c.spinner,style:r.normalizeStyle(a(c.top,c.mountStage,c.position??r.unref(on).TOP_RIGHT)),title:c.title,variant:c.type,"z-index":c.zIndex,class:"fixed transition-all z-10",onVnodeMounted:u=>{var p;return(p=r.unref(n))==null?void 0:p.onSnackbarMounted(c.id,u.el.scrollHeight,c.persistent)},onOnAction:()=>{var u,p;(u=c==null?void 0:c.onAction)==null||u.call(c),(p=r.unref(n))==null||p.close(c.id)},onOnDismiss:()=>{var u;return(u=r.unref(n))==null?void 0:u.close(c.id)}},null,8,["action","description","dismissable","spinner","style","title","variant","z-index","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var on=(t=>(t.TOP="top",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM="bottom",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t))(on||{}),bt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(bt||{});class uy{constructor(){ie(this,"store",r.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0,position:(e==null?void 0:e.position)??"top-right"},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n,o){const i=this.store.snackbars.findIndex(s=>s.id===e);if(i===-1)return;const a=this.store.snackbars[i];this.store.snackbars[i]={...a,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[i];this.store.snackbars[i]={...s,mountStage:"MOUNTED"}}),!o&&typeof a.duration=="number"&&setTimeout(()=>{this.close(e)},a.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}updateSnackbar(e,n){const o=this.store.snackbars.findIndex(a=>a.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,...n}}}const fy={install(t){t.provide(vc,new uy);const e=document.body,n=r.createVNode(WM);n.appContext=t._context,r.render(n,e)}},py={FmAdvancedSort:Im,FmBadge:Yo,FmBottomSheet:_c,FmBreadcrumb:Ex,FmButton:ke,FmButtonGroup:Ox,FmCard:Hc,FmCardActionArea:Ix,FmCardActions:Vx,FmCardHeader:Fx,FmCardMedia:Mx,FmCardSection:Uc,FmCardSubtitle:Fm,FmCardTitle:Rm,FmChip:Lc,FmChipGroup:zc,FmDialog:zx,FmDropField:Ux,FmDynamicDialog:Mm,FmLineChart:p1,FmPieChart:V9,FmBarChart:z9,FmScorecard:_M,FmCheckbox:Sm,FmDatePicker:p5,FmDatePickerMobile:g1,FmDateRangePicker:v6,FmDateRangePickerMobile:k1,FmSimpleDatePicker:j6,FmSimpleDatePickerMobile:x1,FmSimpleDateRangePicker:xD,FmSimpleDateRangePickerMobile:S1,FmField:at,FmForm:Om,FmFormGroup:Nt,FmHelperText:om,FmLabel:hn,FmPhoneNumber:LE,FmPinField:HE,FmRadio:qE,FmRadioGroup:KE,FmSearch:tf,FmGlobalSearch:xB,FmSelect:yo,FmStepperField:EB,FmSwitch:Lu,FmTextField:Er,FmTextarea:PB,FmTimeInput:Tl,FmTimePicker:HB,FmTimeRangePicker:qB,FmIcon:ue,FmList:af,FmListItem:sf,FmMenu:io,FmMenuDeprecated:$B,FmMenuDivider:b1,FmMenuHeader:tP,FmMenuItem:St,FmCircularProgress:Sr,FmLinearProgress:aP,FmSideSheet:uP,FmSnackbar:ib,FmSpacer:Zo,FmStep:vP,FmStepper:xP,FmTab:ab,FmTable:AM,FmTableToolbar:VP,FmTableHeader:Ul,FmTabs:EM,FmCollapsibleTabs:IM,FmTooltip:Rc,FmAvatar:NM,FmThumbnail:VM,FmPageHead:MM,FmTopSheet:tb,FmPopover:Bo,FmOverlay:fi,FmPill:UM},jM=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},zIndex:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),a=r.computed(()=>e.reference());let s;const{floatingStyles:l,middlewareData:c,placement:u}=ci(a,o,{whileElementsMounted:ai,placement:e.placement,middleware:[li(),si({mainAxis:6}),bm({element:i})]}),p=r.computed(()=>{var y,v,w,A;const b={top:"bottom",right:"left",bottom:"top",left:"right"}[u.value];return{left:((y=c.value.arrow)==null?void 0:y.x)!=null?`${(v=c.value.arrow)==null?void 0:v.x}px`:"",top:((w=c.value.arrow)==null?void 0:w.y)!=null?`${(A=c.value.arrow)==null?void 0:A.y}px`:"",[b]:"-3px"}}),h=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!0},250))},m=()=>{e.disabled||(s&&clearTimeout(s),s=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{a.value.addEventListener("pointerdown",h),a.value.addEventListener("pointermove",b=>{b.pointerType!=="touch"&&h()}),a.value.addEventListener("pointerleave",m),a.value.addEventListener("pointerup",m)}),r.onBeforeUnmount(()=>{a.value.removeEventListener("pointerdown",h),a.value.removeEventListener("pointermove",b=>{b.pointerType!=="touch"&&h()}),a.value.removeEventListener("pointerleave",m),a.value.removeEventListener("pointerup",m)}),(b,y)=>n.value&&!b.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-en-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:r.normalizeStyle({...r.unref(l),zIndex:b.zIndex})},[r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:r.normalizeStyle(p.value)},null,4),[[r.vShow,!b.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(b.content),1)],4)):r.createCommentVNode("",!0)}});let Lf;const dr=r.ref([]);let hy=0;const GM=()=>{if(Lf)return;const t=document.createElement("div");document.body.appendChild(t),Lf=r.createApp({render:()=>dr.value.map(e=>r.h(jM,e))}),Lf.mount(t)},ed=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},my=(t,e)=>{const{value:n,modifiers:o}=e;GM(),t.$_fmTooltipId=hy,hy+=1,typeof n=="string"?dr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ed(o),hideArrow:!1}):n&&typeof n=="object"&&dr.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:ed(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1,zIndex:n.zIndex})},QM={mounted:my,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=dr.value.findIndex(a=>a.id===t.$_fmTooltipId);if(i===-1){my(t,e);return}typeof n=="string"?dr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ed(o),hideArrow:!1}:n&&typeof n=="object"&&(dr.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:ed(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=dr.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&dr.value.splice(e,1)}};function XM(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let td;function zf(){zf.init||(zf.init=!0,td=XM()!==-1)}var nd={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){zf(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",td&&this.$el.appendChild(t),t.data="about:blank",td||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!td&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const qM=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const KM={class:"resize-observer",tabindex:"-1"};r.popScopeId();const JM=qM((t,e,n,o,i,a)=>(r.openBlock(),r.createBlock("div",KM)));nd.render=JM,nd.__scopeId="data-v-b329ee4c",nd.__file="src/components/ResizeObserver.vue";function od(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?od=function(e){return typeof e}:od=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},od(t)}function YM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZM(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function $M(t,e,n){return e&&ZM(t.prototype,e),t}function gy(t){return eL(t)||tL(t)||nL(t)||oL()}function eL(t){if(Array.isArray(t))return _f(t)}function tL(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function nL(t,e){if(t){if(typeof t=="string")return _f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _f(t,e)}}function _f(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function oL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
130
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rL(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function iL(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a,s=function(c){for(var u=arguments.length,p=new Array(u>1?u-1:0),h=1;h<u;h++)p[h-1]=arguments[h];if(a=p,!(o&&c===i)){var m=n.leading;typeof m=="function"&&(m=m(c,i)),(!o||c!==i)&&m&&t.apply(void 0,[c].concat(gy(a))),i=c,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[c].concat(gy(a))),o=0},e)}};return s._clear=function(){clearTimeout(o),o=null},s}function by(t,e){if(t===e)return!0;if(od(t)==="object"){for(var n in t)if(!by(t[n],e[n]))return!1;return!0}return!1}var aL=function(){function t(e,n,o){YM(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return $M(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=rL(n),this.callback=function(l,c){i.options.callback(l,c),l&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},s=a.leading;this.callback=iL(this.callback,this.options.throttle,{leading:function(c){return s==="both"||s==="visible"&&c||s==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var c=l[0];if(l.length>1){var u=l.find(function(h){return h.isIntersecting});u&&(c=u)}if(i.callback){var p=c.isIntersecting&&c.intersectionRatio>=i.threshold;if(p===i.oldResult)return;i.oldResult=p,i.callback(p,c)}},this.options.intersection),r.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function yy(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new aL(t,o,n);t._vue_visibilityState=i}}function sL(t,e,n){var o=e.value,i=e.oldValue;if(!by(o,i)){var a=t._vue_visibilityState;if(!o){vy(t);return}a?a.createObserver(o,n):yy(t,{value:o},n)}}function vy(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var lL={beforeMount:yy,updated:sL,unmounted:vy};function dL(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var ky={itemsLimit:1e3},cL=/(auto|scroll)/;function wy(t,e){return t.parentNode===null?e:wy(t.parentNode,e.concat([t]))}var Hf=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},uL=function(e){return Hf(e,"overflow")+Hf(e,"overflow-y")+Hf(e,"overflow-x")},fL=function(e){return cL.test(uL(e))};function xy(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=wy(t.parentNode,[]),n=0;n<e.length;n+=1)if(fL(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Uf(t){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uf(t)}var Sy={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Cy(){return this.items.length&&Uf(this.items[0])!=="object"}var Wf=!1;if(typeof window<"u"){Wf=!1;try{var pL=Object.defineProperty({},"passive",{get:function(){Wf=!0}});window.addEventListener("test",null,pL)}catch{}}let hL=0;var Xa={name:"RecycleScroller",components:{ResizeObserver:nd},directives:{ObserveVisibility:lL},props:{...Sy,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,a=0,s;for(let l=0,c=e.length;l<c;l++)s=e[l][n]||o,s<i&&(i=s),a+=s,t[l]={accumulator:a,size:s};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Cy,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const a=r.markRaw({id:hL++,index:e,used:!0,key:o,type:i}),s=r.shallowReactive({item:n,position:0,nr:a});return t.push(s),s},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,s=this.typeField,l=this.simpleArray?null:this.keyField,c=this.items,u=c.length,p=this.sizes,h=this.$_views,m=this.$_unusedViews,b=this.pool,y=this.itemIndexByKey;let v,w,A,I,V;if(!u)v=w=I=V=A=0;else if(this.$_prerender)v=I=0,w=V=Math.min(this.prerender,c.length),A=null;else{const j=this.getScroll();if(e){let S=j.start-this.$_lastUpdateScrollPosition;if(S<0&&(S=-S),n===null&&S<a||S<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=j.start;const Q=this.buffer;j.start-=Q,j.end+=Q;let F=0;if(this.$refs.before&&(F=this.$refs.before.scrollHeight,j.start-=F),this.$refs.after){const S=this.$refs.after.scrollHeight;j.end+=S}if(n===null){let S,x=0,P=u-1,C=~~(u/2),M;do M=C,S=p[C].accumulator,S<j.start?x=C:C<u-1&&p[C+1].accumulator>j.start&&(P=C),C=~~((x+P)/2);while(C!==M);for(C<0&&(C=0),v=C,A=p[u-1].accumulator,w=C;w<u&&p[w].accumulator<j.end;w++);for(w===-1?w=c.length-1:(w++,w>u&&(w=u)),I=v;I<u&&F+p[I].accumulator<j.start;I++);for(V=I;V<u&&F+p[V].accumulator<j.end;V++);}else{v=~~(j.start/n*o);const S=v%o;v-=S,w=Math.ceil(j.end/n*o),I=Math.max(0,Math.floor((j.start-F)/n*o)),V=Math.floor((j.end-F)/n*o),v<0&&(v=0),w>u&&(w=u),I<0&&(I=0),V>u&&(V=u),A=Math.ceil(u/o)*n}}w-v>ky.itemsLimit&&this.itemsLimitError(),this.totalSize=A;let R;const E=v<=this.$_endIndex&&w>=this.$_startIndex;if(E)for(let j=0,Q=b.length;j<Q;j++)R=b[j],R.nr.used&&(t&&(R.nr.index=y[R.item[l]]),(R.nr.index==null||R.nr.index<v||R.nr.index>=w)&&this.unuseView(R));const T=E?null:new Map;let B,H,_;for(let j=v;j<w;j++){B=c[j];const Q=l?B[l]:B;if(Q==null)throw new Error(`Key is ${Q} on item (keyField is '${l}')`);if(R=h.get(Q),!n&&!p[j].size){R&&this.unuseView(R);continue}H=B[s];let F=m.get(H),S=!1;if(!R)E?F&&F.length?R=F.pop():R=this.addView(b,j,B,Q,H):(_=T.get(H)||0,(!F||_>=F.length)&&(R=this.addView(b,j,B,Q,H),this.unuseView(R,!0),F=m.get(H)),R=F[_],T.set(H,_+1)),h.delete(R.nr.key),R.nr.used=!0,R.nr.index=j,R.nr.key=Q,R.nr.type=H,h.set(Q,R),S=!0;else if(!R.nr.used&&(R.nr.used=!0,S=!0,F)){const x=F.indexOf(R);x!==-1&&F.splice(x,1)}R.item=B,S&&(j===c.length-1&&this.$emit("scroll-end"),j===0&&this.$emit("scroll-start")),n===null?(R.position=p[j-1].accumulator,R.offset=0):(R.position=Math.floor(j/o)*n,R.offset=j%o*i)}return this.$_startIndex=v,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",v,w,I,V),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:E}},getListenerTarget(){let t=xy(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),a=n?i.height:i.width;let s=-(n?i.top:i.left),l=n?window.innerHeight:window.innerWidth;s<0&&(l+=s,s=0),s+l>a&&(l=a-s),o={start:s,end:s+l}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Wf?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const a=xy(this.$el),s=a.tagName==="HTML"?0:a[e.scroll],l=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[e.start]-l[e.start];n=a,o=e.scroll,i=t+s+u}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const mL={key:0,ref:"before",class:"vue-recycle-scroller__slot"},gL={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function bL(t,e,n,o,i,a){const s=r.resolveComponent("ResizeObserver"),l=r.resolveDirective("observe-visibility");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...c)=>a.handleScroll&&a.handleScroll(...c))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",mL,[r.renderSlot(t.$slots,"before")],512)):r.createCommentVNode("v-if",!0),(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:r.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:r.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.pool,c=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:c.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${c.position}px) translate${t.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===c.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=c.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",gL,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(s,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[l,a.handleVisibilityChange]])}Xa.render=bL,Xa.__file="src/components/RecycleScroller.vue";var rd={name:"DynamicScroller",components:{RecycleScroller:Xa},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Sy,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Cy,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,a=e.length;for(let s=0;s<a;s++){const l=e[s],c=o?s:l[n];let u=i[c];typeof u>"u"&&!this.$_undefinedMap[c]&&(u=0),t.push({item:l,id:c,size:u})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const a=Math.min(t.length,e.length);for(let l=0;l<a&&!(o>=n);l++)o+=e[l].size||this.minItemSize,i+=t[l].size||this.minItemSize;const s=i-o;s!==0&&(this.$el.scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=dL()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function yL(t,e,n,o,i,a){const s=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(s,r.mergeProps({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:r.withCtx(({item:l,index:c,active:u})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:l.item,index:c,active:u,itemWithSize:l})))]),before:r.withCtx(()=>[r.renderSlot(t.$slots,"before")]),after:r.withCtx(()=>[r.renderSlot(t.$slots,"after")]),empty:r.withCtx(()=>[r.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}rd.render=yL,rd.__file="src/components/DynamicScroller.vue";var jf={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return r.h(this.tag,this.$slots.default())}};jf.__file="src/components/DynamicScrollerItem.vue";function vL(t,e){t.component("".concat(e,"recycle-scroller"),Xa),t.component("".concat(e,"RecycleScroller"),Xa),t.component("".concat(e,"dynamic-scroller"),rd),t.component("".concat(e,"DynamicScroller"),rd),t.component("".concat(e,"dynamic-scroller-item"),jf),t.component("".concat(e,"DynamicScrollerItem"),jf)}var kL={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(ky[i]=o[i]);o.installComponents&&vL(e,o.componentsPrefix)}},wL={exports:{}};(function(t,e){(function(n,o){t.exports=o(Tc)})(mn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(s){return s+"."}};return i.default.locale(a,null,!0),a})})(wL);var xL={exports:{}};(function(t,e){(function(n,o){t.exports=o(Tc)})(mn,function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=o(n),a={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"週":s+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var c=100*s+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return i.default.locale(a,null,!0),a})})(xL);var SL={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(mn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var o=["th","st","nd","rd"],i=n%100;return"["+n+(o[(i-20)%10]||o[i]||o[0])+"]"}}})})(SL);const CL={name:"@feedmepos/ui-library",version:"1.8.4",type:"module",files:["dist"],repository:{type:"git",url:"git+https://github.com/feedmepos/ui-library.git"},bugs:"https://feedmepos.atlassian.net/browse/CT-3",homepage:"ui.feedme.ai",main:"./dist/feedmepos-ui-library.umd.cjs",module:"./dist/feedmepos-ui-library.js",exports:{".":{types:"./dist/index.d.ts",import:"./dist/feedmepos-ui-library.js",require:"./dist/feedmepos-ui-library.umd.cjs"},"./meta":{types:"./dist/meta.d.ts"},"./tailwind-plugin":"./dist/tailwind-plugin.js","./tailwind-styling":"./dist/tailwind-styling.js","./styles.css":"./dist/style.css"},scripts:{dev:"vite --port 5273",preview:"vite preview","build:lib":"pnpm run build-components && pnpm run build-types && pnpm run build-federation && pnpm run build-tailwind-plugin && pnpm run build-tailwind-styling && tsc-alias --project tsconfig.app.json --outDir dist && mv ./dist/src/* ./dist",build:"vite build","build-lib":"vite build --mode library","build-tailwind-plugin":"vite build --mode tailwind-plugin","build-tailwind-styling":"vite build --mode tailwind-styling","build-federation":"vite build --mode federation && cp -r ./temp/assets ./dist/federation && rm -rf ./temp","build-components":'run-p type-check "build-lib {@}" --',"build-types":"vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false","copy-changelog":"cp ./CHANGELOG.md ./dist/CHANGELOG.md","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false",lint:"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",deploy:"pnpm run build:lib && pnpm publish --no-git-checks .","register-components":"node ./scripts/register-components.js && pnpm lint","generate-component-meta":"node ./scripts/generate-component-meta.js","build:pack":"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../"},dependencies:{"@feedmepos/core":"^2.10.12","@floating-ui/vue":"^1.0.6","@rollup/plugin-commonjs":"^26.0.1","@tanstack/vue-table":"^8.13.2","@tanstack/vue-virtual":"^3.13.0","@types/lodash":"^4.17.7","@vueuse/core":"^10.9.0","chartjs-plugin-datalabels":"^2.2.0","chart.js":"^4.4.2",dayjs:"^1.11.10",debounce:"^2.0.0",fuzzy:"^0.1.3","libphonenumber-js":"^1.10.57",lodash:"^4.17.21",prettier:"^3.2.5",uuid:"^10.0.0","v-wave":"^1.5.1",vue:"^3.4.21","vue-country-flag-next":"^2.3.2","vue-router":"^4.3.0","vue-virtual-scroller":"2.0.0-beta.8",vuedraggable:"^4.1.0"},devDependencies:{"@originjs/vite-plugin-federation":"^1.3.5","@rushstack/eslint-patch":"^1.7.2","@tsconfig/node18":"^18.2.2","@types/chart.js":"^2.9.41","@types/debounce":"^1.2.4","@types/node":"^18.19.21","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.0.4","@vitejs/plugin-vue-jsx":"^3.1.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0",autoprefixer:"^10.4.17",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-vue":"^9.22.0","npm-run-all2":"^6.1.2",postcss:"^8.4.35",sass:"^1.71.1",tailwindcss:"^3.4.1","tsc-alias":"^1.8.8",typescript:"~5.2.2",vite:"^5.1.4","vite-plugin-static-copy":"^0.17.1","vite-plugin-top-level-await":"^1.4.1","vue-component-meta":"^2.0.13","vue-tsc":"^1.8.27"},peerDependencies:{tailwindcss:"^3.4.1",vite:"^5.1.4",vue:"^3.4.21"}};globalThis.__FM_UI_VERSION__=CL.version;const AL={"en-US":"en","zh-CN":"zh-cn","zh-Hant":"zh-tw","th-TH":"th"},DL=(t,e)=>{if(t.use(c3,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",QM),t.use(Qx),t.use(fy),t.use(kL),Object.entries(py).forEach(([n,o])=>{t.component(n,o)}),e!=null&&e.locale){wm(e.locale);const n=AL[e.locale]||"en";W.locale(n)}};ze.FeedMeUI=DL,ze.FmAdvancedSort=Im,ze.FmButtonColorThemeVariant=Qt,ze.FmButtonVariant=_n,ze.Locale=km,ze.SnackbarMountStage=bt,ze.SnackbarPlugin=fy,ze.SnackbarPosition=on,ze.SnackbarService=uy,ze.components=py,ze.setLocale=wm,ze.useBreakpoints=Jo,ze.useDialog=Bm,ze.useDialogChild=Pm,ze.useFocus=la,ze.useFormChild=nm,ze.useProxiedModel=Pe,ze.useSnackbar=Nw,ze.useValidation=tm,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});