@feedmepos/ui-library 1.2.9-rc.4 → 1.2.9

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.
Files changed (42) hide show
  1. package/dist/CHANGELOG.md +7 -0
  2. package/dist/components/button/FmButton.vue.d.ts +11 -2
  3. package/dist/components.d.ts +189 -51
  4. package/dist/federation/{FmDatePicker.vue_vue_type_script_setup_true_lang-CFDk3Cr0.js → FmDatePicker.vue_vue_type_script_setup_true_lang-DQZORnCm.js} +1 -1
  5. package/dist/federation/{FmDateRangePicker.vue_vue_type_script_setup_true_lang-D7GnL25G.js → FmDateRangePicker.vue_vue_type_script_setup_true_lang-DEUI654i.js} +1 -1
  6. package/dist/federation/{FmGlobalSearch.vue_vue_type_script_setup_true_lang-BZovv_DN.js → FmGlobalSearch.vue_vue_type_script_setup_true_lang-DM8ljvSH.js} +1 -1
  7. package/dist/federation/{FmPageHead.vue_vue_type_script_setup_true_lang-CKN_IGaW.js → FmPageHead.vue_vue_type_script_setup_true_lang-B-1Rwp-3.js} +1 -1
  8. package/dist/federation/{FmSearch.vue_vue_type_script_setup_true_lang-DZYaq1zq.js → FmSearch.vue_vue_type_script_setup_true_lang-BeKlAwbr.js} +1 -1
  9. package/dist/federation/{FmTable.vue_vue_type_script_setup_true_lang-BO_GQ5LP.js → FmTable.vue_vue_type_script_setup_true_lang-AdysSkZ-.js} +1 -1
  10. package/dist/federation/{FmTabs.vue_vue_type_script_setup_true_lang-BsHOWB1P.js → FmTabs.vue_vue_type_script_setup_true_lang-BPYfn5OQ.js} +1 -1
  11. package/dist/federation/{FmTimePicker.vue_vue_type_script_setup_true_lang-CNCzNJjc.js → FmTimePicker.vue_vue_type_script_setup_true_lang-CqL9fh-D.js} +1 -1
  12. package/dist/federation/{FmTimeRangePicker.vue_vue_type_script_setup_true_lang-DwkFgJD4.js → FmTimeRangePicker.vue_vue_type_script_setup_true_lang-gaZg50WV.js} +1 -1
  13. package/dist/federation/__federation_expose_FmButton-CfZVt7rM.js +9 -0
  14. package/dist/federation/__federation_expose_FmButton-DwIx5V3J.css +1 -0
  15. package/dist/federation/{__federation_expose_FmDatePicker-DS76cdBs.js → __federation_expose_FmDatePicker-C0-odFH7.js} +1 -1
  16. package/dist/federation/{__federation_expose_FmDatePickerMobile-D79wX3e9.js → __federation_expose_FmDatePickerMobile-CwKFkWFb.js} +1 -1
  17. package/dist/federation/{__federation_expose_FmDateRangePicker-CYR7EcrX.js → __federation_expose_FmDateRangePicker-TuPPBl0K.js} +1 -1
  18. package/dist/federation/{__federation_expose_FmDateRangePickerMobile-BWwg3C2x.js → __federation_expose_FmDateRangePickerMobile-BQevE3K2.js} +1 -1
  19. package/dist/federation/{__federation_expose_FmDropField-KKWs3vsm.js → __federation_expose_FmDropField-CZjwJVMy.js} +1 -1
  20. package/dist/federation/{__federation_expose_FmDynamicDialog-CIgVhgXt.js → __federation_expose_FmDynamicDialog-Cqa8lvY_.js} +1 -1
  21. package/dist/federation/{__federation_expose_FmGlobalSearch-D5_BiVA0.js → __federation_expose_FmGlobalSearch-Bb_mpbuv.js} +1 -1
  22. package/dist/federation/{__federation_expose_FmPageHead-cAnMW_gf.js → __federation_expose_FmPageHead-B9PoIXQ7.js} +1 -1
  23. package/dist/federation/{__federation_expose_FmSearch-Be6Ez-8F.js → __federation_expose_FmSearch-BZRPX-wz.js} +1 -1
  24. package/dist/federation/__federation_expose_FmTab-BN-n8MtU.css +1 -0
  25. package/dist/federation/__federation_expose_FmTab-BjvJP-Ei.js +1 -0
  26. package/dist/federation/{__federation_expose_FmTable-POK-9UVF.js → __federation_expose_FmTable-AoGYHwx0.js} +1 -1
  27. package/dist/federation/{__federation_expose_FmTabs-CJUr-2sz.js → __federation_expose_FmTabs-BCOwfGtP.js} +1 -1
  28. package/dist/federation/{__federation_expose_FmTimePicker-7KciPd7K.js → __federation_expose_FmTimePicker-CWZViO3T.js} +1 -1
  29. package/dist/federation/{__federation_expose_FmTimeRangePicker-CblIFYJp.js → __federation_expose_FmTimeRangePicker-D7wEI2bK.js} +1 -1
  30. package/dist/federation/{dialog-plugin-Bdd7Bqwm.js → dialog-plugin-CCUfMY81.js} +1 -1
  31. package/dist/federation/feedmepos-ui-components.js +1 -1
  32. package/dist/federation/index-Os5_1mM-.css +1 -0
  33. package/dist/federation/{index-CNcA9Cij.js → index-QS1laK_d.js} +1 -1
  34. package/dist/feedmepos-ui-library.js +1063 -1001
  35. package/dist/feedmepos-ui-library.umd.cjs +11 -11
  36. package/dist/style.css +1 -1
  37. package/package.json +1 -1
  38. package/dist/federation/__federation_expose_FmButton-CJdqrqAb.js +0 -9
  39. package/dist/federation/__federation_expose_FmButton-CUd06qi1.css +0 -1
  40. package/dist/federation/__federation_expose_FmTab-BzNTJ2Zh.js +0 -1
  41. package/dist/federation/__federation_expose_FmTab-COVLgtjU.css +0 -1
  42. package/dist/federation/index-CpS8Uqth.css +0 -1
@@ -1,4 +1,4 @@
1
- (function(ce,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],r):(ce=typeof globalThis<"u"?globalThis:ce||self,r(ce["feedmepos-ui-library"]={},ce.Vue,ce.VueRouter))})(this,function(ce,r,yt){"use strict";var GC=Object.defineProperty;var qC=(ce,r,yt)=>r in ce?GC(ce,r,{enumerable:!0,configurable:!0,writable:!0,value:yt}):ce[r]=yt;var H=(ce,r,yt)=>(qC(ce,typeof r!="symbol"?r+"":r,yt),yt);var Ar;const Is={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},mu=t=>"config"in t&&"globalProperties"in t.config,hu=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=mu(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},Rs=t=>typeof t=="string"&&t!=="auto",Ts=(t,e)=>{t.dataset.vWaveBoundary=Rs(e)?e:"true"},gu=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const s=document.createElement(i);return s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.display="block",s.style.position="absolute",s.style.borderRadius=`${t} ${e} ${o} ${n}`,s.style.overflow="hidden",s.style.pointerEvents="none",s.style.webkitMaskImage="-webkit-radial-gradient(white, black)",s},bu=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function lo(t,e,n,o){const i=t-n,s=e-o;return Math.sqrt(i*i+s*s)}function yu(t,e,{width:n,height:o}){const i=lo(t,e,0,0),s=lo(t,e,n,0),a=lo(t,e,0,o),l=lo(t,e,n,o);return Math.max(i,s,a,l)}const ku=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),Br="vWaveCountInternal";function xu(t){const e=Dr(t);zs(t,e+1)}function Su(t){const e=Dr(t);zs(t,e-1)}function zs(t,e){t.dataset[Br]=e.toString()}function Dr(t){var e;return parseInt((e=t.dataset[Br])!==null&&e!==void 0?e:"0",10)}function Cu(t){delete t.dataset[Br]}const Vr=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:s,y:a}=ku(t,o),l=2.05*yu(s,a,o),d=gu(i,n.tagName),c=bu(s,a,l,n);xu(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const p=b=>{typeof b<"u"&&(document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p)),f?m():f=!0},m=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),Su(e),Dr(e)===0&&(Cu(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",p),document.addEventListener("pointercancel",p);const h=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>p(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(h),d.remove(),document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},yn=new WeakMap,Ls=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},Is),t),o=hu(e),i=l=>{const d=l.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>Vr(l,u,Object.assign(Object.assign({},n),yn.get(u))))},s={[o.mounted](l,{value:d={}}){var c;yn.set(l,d),Ts(l,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),l.addEventListener("pointerdown",u=>{if(yn.get(l)===!1)return;const f=Object.assign(Object.assign({},n),yn.get(l));if(f.trigger===!1)return Vr(u,l,f);if(Rs(f.trigger))return;const p=l.querySelector('[data-v-wave-trigger="true"]');!p&&f.trigger===!0||p&&!u.composedPath().includes(p)||Vr(u,l,f)})},[o.updated](l,{value:d={}}){var c;yn.set(l,d),Ts(l,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},a={[o.mounted](l,{arg:d="true"}){l.dataset.vWaveTrigger=d,d!=="true"&&l.addEventListener("pointerdown",i)},[o.updated](l,{arg:d="true"}){l.dataset.vWaveTrigger=d,d==="true"?l.removeEventListener("pointerdown",i):l.addEventListener("pointerdown",i)}};return{wave:s,vWave:s,waveTrigger:a,vWaveTrigger:a}},wu={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},Is),e),{vWave:o,vWaveTrigger:i}=Ls(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:Ls},Au={class:"gap-8 inline-flex items-center relative select-none"},vu={key:0,class:"fm-typo-en-body-sm-400 justify-center"},Bu=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&&e.value>99?"99+":e.value);return(o,i)=>(r.openBlock(),r.createElementBlock("div",Au,[r.renderSlot(o.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-badge",e.class??`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(r.openBlock(),r.createElementBlock("span",vu,r.toDisplayString(n.value),1)):r.createCommentVNode("",!0)],2)]))}}),Z=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Tt=Z(Bu,[["__scopeId","data-v-6d4ce401"]]);function Du(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function J(t,e){const n=Du(),o=r.ref(t[e]);return r.watch(()=>t[e],()=>{o.value=t[e]}),r.computed({get(){return o.value},set(s){o.value=s,n==null||n(`update:${String(e)}`,s)}})}const Vu=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,Pu=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,Eu=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,Fu=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,Nu=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function kn(t){return[Vu,Pu,Eu,Fu,Nu].some(e=>e.test(t))}function Pr(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function $t(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const Q=Z(r.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(t){const e=t,n=r.computed(()=>{const s=[],a={};return s.push(o()),s.push(i()),kn(e.color)?a.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:a}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(s,a)=>(r.openBlock(),r.createElementBlock("span",r.mergeProps({class:"fm-icon"},n.value),r.toDisplayString(e.name),17))}}),[["__scopeId","data-v-acf7a3d2"]]);function Mu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Hs(t){return typeof t=="function"?t():r.unref(t)}const Ou=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Iu=Object.prototype.toString,Ru=t=>Iu.call(t)==="[object Object]",co=()=>{};function Tu(t){return t||r.getCurrentInstance()}function zu(...t){if(t.length!==1)return r.toRef(...t);const e=t[0];return typeof e=="function"?r.readonly(r.customRef(()=>({get:e,set:co}))):r.ref(e)}function Lu(t,e=!0,n){Tu()?r.onMounted(t,n):e?t():r.nextTick(t)}function Hu(t){var e;const n=Hs(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Us=Ou?window:void 0;function _t(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=Us):[e,n,o,i]=t,!e)return co;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],a=()=>{s.forEach(u=>u()),s.length=0},l=(u,f,p,m)=>(u.addEventListener(f,p,m),()=>u.removeEventListener(f,p,m)),d=r.watch(()=>[Hu(e),Hs(i)],([u,f])=>{if(a(),!u)return;const p=Ru(f)?{...f}:f;s.push(...n.flatMap(m=>o.map(h=>l(u,m,h,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),a()};return Mu(c),c}function Uu(t,e={}){const n=zu(t),{threshold:o=50,onSwipe:i,onSwipeEnd:s,onSwipeStart:a,disableTextSelect:l=!1}=e,d=r.reactive({x:0,y:0}),c=(E,M)=>{d.x=E,d.y=M},u=r.reactive({x:0,y:0}),f=(E,M)=>{u.x=E,u.y=M},p=r.computed(()=>d.x-u.x),m=r.computed(()=>d.y-u.y),{max:h,abs:g}=Math,b=r.computed(()=>h(g(p.value),g(m.value))>=o),y=r.ref(!1),S=r.ref(!1),v=r.computed(()=>b.value?g(p.value)>g(m.value)?p.value>0?"left":"right":m.value>0?"up":"down":"none"),w=E=>{var M,I,N;const C=E.buttons===0,D=E.buttons===1;return(N=(I=(M=e.pointerTypes)==null?void 0:M.includes(E.pointerType))!=null?I:C||D)!=null?N:!0},x=[_t(t,"pointerdown",E=>{if(!w(E))return;S.value=!0;const M=E.target;M==null||M.setPointerCapture(E.pointerId);const{clientX:I,clientY:N}=E;c(I,N),f(I,N),a==null||a(E)}),_t(t,"pointermove",E=>{if(!w(E)||!S.value)return;const{clientX:M,clientY:I}=E;f(M,I),!y.value&&b.value&&(y.value=!0),y.value&&(i==null||i(E))}),_t(t,"pointerup",E=>{w(E)&&(y.value&&(s==null||s(E,v.value)),S.value=!1,y.value=!1)})];Lu(()=>{var E,M,I,N,C,D,A,k;(M=(E=n.value)==null?void 0:E.style)==null||M.setProperty("touch-action","none"),l&&((N=(I=n.value)==null?void 0:I.style)==null||N.setProperty("-webkit-user-select","none"),(D=(C=n.value)==null?void 0:C.style)==null||D.setProperty("-ms-user-select","none"),(k=(A=n.value)==null?void 0:A.style)==null||k.setProperty("user-select","none"))});const F=()=>x.forEach(E=>E());return{isSwiping:r.readonly(y),direction:r.readonly(v),posStart:r.readonly(d),posEnd:r.readonly(u),distanceX:p,distanceY:m,stop:F}}function ju(t,e={}){const{threshold:n=50,onSwipe:o,onSwipeEnd:i,onSwipeStart:s,passive:a=!0,window:l=Us}=e,d=r.reactive({x:0,y:0}),c=r.reactive({x:0,y:0}),u=r.computed(()=>d.x-c.x),f=r.computed(()=>d.y-c.y),{max:p,abs:m}=Math,h=r.computed(()=>p(m(u.value),m(f.value))>=n),g=r.ref(!1),b=r.computed(()=>h.value?m(u.value)>m(f.value)?u.value>0?"left":"right":f.value>0?"up":"down":"none"),y=I=>[I.touches[0].clientX,I.touches[0].clientY],S=(I,N)=>{d.x=I,d.y=N},v=(I,N)=>{c.x=I,c.y=N};let w;const x=Qu(l==null?void 0:l.document);a?w=x?{passive:!0}:{capture:!1}:w=x?{passive:!1,capture:!0}:{capture:!0};const F=I=>{g.value&&(i==null||i(I,b.value)),g.value=!1},E=[_t(t,"touchstart",I=>{if(I.touches.length!==1)return;w.capture&&!w.passive&&I.preventDefault();const[N,C]=y(I);S(N,C),v(N,C),s==null||s(I)},w),_t(t,"touchmove",I=>{if(I.touches.length!==1)return;const[N,C]=y(I);v(N,C),!g.value&&h.value&&(g.value=!0),g.value&&(o==null||o(I))},w),_t(t,["touchend","touchcancel"],F,w)];return{isPassiveEventSupported:x,isSwiping:g,direction:b,coordsStart:d,coordsEnd:c,lengthX:u,lengthY:f,stop:()=>E.forEach(I=>I())}}function Qu(t){if(!t)return!1;let e=!1;const n={get passive(){return e=!0,!1}};return t.addEventListener("x",co,n),t.removeEventListener("x",co),e}const en=Z(r.defineComponent({__name:"FmOverlay",props:{onClose:{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 s;e.dismissAway&&n.value&&i.target===n.value&&((s=e.onClose)==null||s.call(e))};return(i,s)=>(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:s[0]||(s[0]=a=>o(a))},[r.renderSlot(i.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-6ebaa300"]]),Wu=[(t=>(r.pushScopeId("data-v-196e2b8b"),t=t(),r.popScopeId(),t))(()=>r.createElementVNode("div",{class:"fm-bottom-sheet--gesture--stick"},null,-1))],Yu={key:0,class:"fm-bottom-sheet--header"},Xu={class:"fm-bottom-sheet--header--content"},Gu={key:0},qu={class:"overflow-y-auto"},Ju={class:"flex gap-8 items-center"},Er=Z(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}},emits:["update:modelValue"],setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(0),{direction:s,distanceY:a}=Uu(n,{threshold:0,onSwipe(){s.value==="down"&&(i.value=Math.min(a.value,0))},onSwipeEnd(){var f;const u=(f=o.value)==null?void 0:f.clientHeight;u&&i.value<-u/2?c.value=!1:i.value=0}}),{direction:l,lengthY:d}=ju(n,{passive:!1,threshold:0,onSwipe(){l.value==="down"&&(i.value=Math.min(d.value,0))},onSwipeEnd(){var f;const u=(f=o.value)==null?void 0:f.clientHeight;u&&i.value<-u/2?c.value=!1:i.value=0}}),c=J(e,"modelValue");return r.watch(c,u=>{u&&(i.value=0)}),(u,f)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:f[0]||(f[0]=p=>c.value=!0)},[r.renderSlot(u.$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(c)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:f[2]||(f[2]=p=>c.value=!1)},{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:"fm-bottom-sheet"},[r.createElementVNode("div",{ref_key:"gestureRef",ref:n,class:"fm-bottom-sheet--gesture"},Wu,512),u.noHeader?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Yu,[r.createElementVNode("div",Xu,[r.createElementVNode("div",{class:"flex h-24 items-center justify-center w-24",onClick:f[1]||(f[1]=p=>c.value=!1)},[r.createVNode(Q,{name:"arrow_back"})]),r.renderSlot(u.$slots,"bottom-sheet-header",{},()=>[u.header?(r.openBlock(),r.createElementBlock("div",Gu,r.toDisplayString(u.header),1)):r.createCommentVNode("",!0)],!0)])])),r.createElementVNode("div",qu,[r.renderSlot(u.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Ju,[r.renderSlot(u.$slots,"bottom-sheet-footer",{},void 0,!0)])],4)]),_:3})]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-196e2b8b"]]),Ku={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Zu=["onMouseenter"],$u={key:0},_u=r.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=yt.useRoute(),n=yt.useRouter();r.onMounted(async()=>{await n.isReady();const h=o.items.findIndex(g=>g.route==e.path);h!=-1&&!o.items[h].disabled&&(i.value=h)});const o=t,i=r.ref(-1),s=r.ref(-1),a=r.ref(" / "),l=r.ref("... /"),d=r.ref(!1),c=h=>i.value===h?"selected":s.value===h?"hovered":o.items[h].disabled?"disabled":"default",u=h=>{o.items[h].disabled||(i.value=h)},f=h=>h!=o.items.length-1,p=h=>!d.value&&o.items.length>5&&h>=2&&h<o.items.length-2,m=()=>{d.value=!d.value};return(h,g)=>{const b=r.resolveComponent("RouterLink");return r.openBlock(),r.createElementBlock("nav",null,[r.createElementVNode("ul",Ku,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,(y,S)=>(r.openBlock(),r.createElementBlock("li",{key:S,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:v=>s.value=S,onMouseleave:g[0]||(g[0]=v=>s.value=-1)},[p(S)?S===3&&!d.value?(r.openBlock(),r.createElementBlock("a",{key:1,onClick:m},r.toDisplayString(l.value),1)):r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(b,{key:0,class:r.normalizeClass([c(S),"fm-typo-en-body-md-400"]),to:y.disabled?"":y.route,onClick:v=>u(S)},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(y.label),1),f(S)?(r.openBlock(),r.createElementBlock("span",$u,r.toDisplayString(a.value),1)):r.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Zu))),128))])])}}});function uo(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const ef={class:"relative"},tf=["stroke-width"],nf=["stroke-width","stroke-dashoffset"],of=["stroke-width","stroke-dashoffset"],rf={key:0};var fo=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(fo||{});const tn=Z(r.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const s=uo(e.currentStep),a=uo(e.totalSteps),l=e.indeterminate??(s===null||a===null);return{currentStep:l?null:Math.min(s,a),totalSteps:a,indeterminate:l}}),o=r.computed(()=>{const s=uo(e.currentStep),a=uo(e.totalSteps);if(typeof s!="number"||typeof a!="number")return"10 200";const l=48,d=Math.min(1,s/a);return isNaN(d)?"0 200":`${d*l} 200`}),i=r.computed(()=>{const s=new Array,a={};return e.color?(kn(e.color)?a.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:a}):{class:s.join(" "),style:a}});return(s,a)=>(r.openBlock(),r.createElementBlock("div",ef,[r.createElementVNode("div",{class:r.normalizeClass(["fm-progress fm-typo-en-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${s.size}`]:!0}])},[(r.openBlock(),r.createElementBlock("svg",{class:r.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:r.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(r.openBlock(),r.createElementBlock("circle",{key:0,class:"spinner","stroke-width":fo[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,tf)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("circle",{"stroke-width":fo[s.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,nf),r.createElementVNode("circle",{"stroke-width":fo[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,of)],64))],6)),!n.value.indeterminate&&s.size==="xxl"?(r.openBlock(),r.createElementBlock("div",rf,r.toDisplayString(n.value.currentStep)+" of "+r.toDisplayString(n.value.totalSteps),1)):r.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-2d7e0fe0"]]),sf=["disabled","type"],af={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},G=Z(r.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"md"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1},disableIconStatus:{type:Boolean}},setup(t){const e=t,n=r.ref(!1),o=r.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function s(a){e.disableIconStatus?n.value=!1:n.value=a}return(a,l)=>{const d=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("button",{ref:"buttonEl",class:r.normalizeClass(`
1
+ (function(ce,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],r):(ce=typeof globalThis<"u"?globalThis:ce||self,r(ce["feedmepos-ui-library"]={},ce.Vue,ce.VueRouter))})(this,function(ce,r,yt){"use strict";var KC=Object.defineProperty;var ZC=(ce,r,yt)=>r in ce?KC(ce,r,{enumerable:!0,configurable:!0,writable:!0,value:yt}):ce[r]=yt;var H=(ce,r,yt)=>(ZC(ce,typeof r!="symbol"?r+"":r,yt),yt);var Ar;const Is={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},mu=t=>"config"in t&&"globalProperties"in t.config,hu=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=mu(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},Rs=t=>typeof t=="string"&&t!=="auto",Ts=(t,e)=>{t.dataset.vWaveBoundary=Rs(e)?e:"true"},gu=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const s=document.createElement(i);return s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.display="block",s.style.position="absolute",s.style.borderRadius=`${t} ${e} ${o} ${n}`,s.style.overflow="hidden",s.style.pointerEvents="none",s.style.webkitMaskImage="-webkit-radial-gradient(white, black)",s},bu=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function lo(t,e,n,o){const i=t-n,s=e-o;return Math.sqrt(i*i+s*s)}function yu(t,e,{width:n,height:o}){const i=lo(t,e,0,0),s=lo(t,e,n,0),a=lo(t,e,0,o),l=lo(t,e,n,o);return Math.max(i,s,a,l)}const ku=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),Br="vWaveCountInternal";function xu(t){const e=Dr(t);zs(t,e+1)}function Su(t){const e=Dr(t);zs(t,e-1)}function zs(t,e){t.dataset[Br]=e.toString()}function Dr(t){var e;return parseInt((e=t.dataset[Br])!==null&&e!==void 0?e:"0",10)}function Cu(t){delete t.dataset[Br]}const Vr=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:s,y:a}=ku(t,o),l=2.05*yu(s,a,o),d=gu(i,n.tagName),c=bu(s,a,l,n);xu(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const p=b=>{typeof b<"u"&&(document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p)),f?m():f=!0},m=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),Su(e),Dr(e)===0&&(Cu(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",p),document.addEventListener("pointercancel",p);const h=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>p(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(h),d.remove(),document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},yn=new WeakMap,Ls=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},Is),t),o=hu(e),i=l=>{const d=l.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>Vr(l,u,Object.assign(Object.assign({},n),yn.get(u))))},s={[o.mounted](l,{value:d={}}){var c;yn.set(l,d),Ts(l,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),l.addEventListener("pointerdown",u=>{if(yn.get(l)===!1)return;const f=Object.assign(Object.assign({},n),yn.get(l));if(f.trigger===!1)return Vr(u,l,f);if(Rs(f.trigger))return;const p=l.querySelector('[data-v-wave-trigger="true"]');!p&&f.trigger===!0||p&&!u.composedPath().includes(p)||Vr(u,l,f)})},[o.updated](l,{value:d={}}){var c;yn.set(l,d),Ts(l,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},a={[o.mounted](l,{arg:d="true"}){l.dataset.vWaveTrigger=d,d!=="true"&&l.addEventListener("pointerdown",i)},[o.updated](l,{arg:d="true"}){l.dataset.vWaveTrigger=d,d==="true"?l.removeEventListener("pointerdown",i):l.addEventListener("pointerdown",i)}};return{wave:s,vWave:s,waveTrigger:a,vWaveTrigger:a}},wu={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},Is),e),{vWave:o,vWaveTrigger:i}=Ls(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:Ls},Au={class:"gap-8 inline-flex items-center relative select-none"},vu={key:0,class:"fm-typo-en-body-sm-400 justify-center"},Bu=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&&e.value>99?"99+":e.value);return(o,i)=>(r.openBlock(),r.createElementBlock("div",Au,[r.renderSlot(o.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-badge",e.class??`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(r.openBlock(),r.createElementBlock("span",vu,r.toDisplayString(n.value),1)):r.createCommentVNode("",!0)],2)]))}}),Z=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},kt=Z(Bu,[["__scopeId","data-v-6d4ce401"]]);function Du(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function J(t,e){const n=Du(),o=r.ref(t[e]);return r.watch(()=>t[e],()=>{o.value=t[e]}),r.computed({get(){return o.value},set(s){o.value=s,n==null||n(`update:${String(e)}`,s)}})}const Vu=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,Pu=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,Eu=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,Fu=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,Nu=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function kn(t){return[Vu,Pu,Eu,Fu,Nu].some(e=>e.test(t))}function Pr(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function $t(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const Q=Z(r.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(t){const e=t,n=r.computed(()=>{const s=[],a={};return s.push(o()),s.push(i()),kn(e.color)?a.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:a}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(s,a)=>(r.openBlock(),r.createElementBlock("span",r.mergeProps({class:"fm-icon"},n.value),r.toDisplayString(e.name),17))}}),[["__scopeId","data-v-acf7a3d2"]]);function Mu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Hs(t){return typeof t=="function"?t():r.unref(t)}const Ou=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Iu=Object.prototype.toString,Ru=t=>Iu.call(t)==="[object Object]",co=()=>{};function Tu(t){return t||r.getCurrentInstance()}function zu(...t){if(t.length!==1)return r.toRef(...t);const e=t[0];return typeof e=="function"?r.readonly(r.customRef(()=>({get:e,set:co}))):r.ref(e)}function Lu(t,e=!0,n){Tu()?r.onMounted(t,n):e?t():r.nextTick(t)}function Hu(t){var e;const n=Hs(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Us=Ou?window:void 0;function _t(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=Us):[e,n,o,i]=t,!e)return co;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],a=()=>{s.forEach(u=>u()),s.length=0},l=(u,f,p,m)=>(u.addEventListener(f,p,m),()=>u.removeEventListener(f,p,m)),d=r.watch(()=>[Hu(e),Hs(i)],([u,f])=>{if(a(),!u)return;const p=Ru(f)?{...f}:f;s.push(...n.flatMap(m=>o.map(h=>l(u,m,h,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),a()};return Mu(c),c}function Uu(t,e={}){const n=zu(t),{threshold:o=50,onSwipe:i,onSwipeEnd:s,onSwipeStart:a,disableTextSelect:l=!1}=e,d=r.reactive({x:0,y:0}),c=(E,M)=>{d.x=E,d.y=M},u=r.reactive({x:0,y:0}),f=(E,M)=>{u.x=E,u.y=M},p=r.computed(()=>d.x-u.x),m=r.computed(()=>d.y-u.y),{max:h,abs:g}=Math,b=r.computed(()=>h(g(p.value),g(m.value))>=o),y=r.ref(!1),S=r.ref(!1),v=r.computed(()=>b.value?g(p.value)>g(m.value)?p.value>0?"left":"right":m.value>0?"up":"down":"none"),w=E=>{var M,I,N;const C=E.buttons===0,D=E.buttons===1;return(N=(I=(M=e.pointerTypes)==null?void 0:M.includes(E.pointerType))!=null?I:C||D)!=null?N:!0},x=[_t(t,"pointerdown",E=>{if(!w(E))return;S.value=!0;const M=E.target;M==null||M.setPointerCapture(E.pointerId);const{clientX:I,clientY:N}=E;c(I,N),f(I,N),a==null||a(E)}),_t(t,"pointermove",E=>{if(!w(E)||!S.value)return;const{clientX:M,clientY:I}=E;f(M,I),!y.value&&b.value&&(y.value=!0),y.value&&(i==null||i(E))}),_t(t,"pointerup",E=>{w(E)&&(y.value&&(s==null||s(E,v.value)),S.value=!1,y.value=!1)})];Lu(()=>{var E,M,I,N,C,D,A,k;(M=(E=n.value)==null?void 0:E.style)==null||M.setProperty("touch-action","none"),l&&((N=(I=n.value)==null?void 0:I.style)==null||N.setProperty("-webkit-user-select","none"),(D=(C=n.value)==null?void 0:C.style)==null||D.setProperty("-ms-user-select","none"),(k=(A=n.value)==null?void 0:A.style)==null||k.setProperty("user-select","none"))});const F=()=>x.forEach(E=>E());return{isSwiping:r.readonly(y),direction:r.readonly(v),posStart:r.readonly(d),posEnd:r.readonly(u),distanceX:p,distanceY:m,stop:F}}function ju(t,e={}){const{threshold:n=50,onSwipe:o,onSwipeEnd:i,onSwipeStart:s,passive:a=!0,window:l=Us}=e,d=r.reactive({x:0,y:0}),c=r.reactive({x:0,y:0}),u=r.computed(()=>d.x-c.x),f=r.computed(()=>d.y-c.y),{max:p,abs:m}=Math,h=r.computed(()=>p(m(u.value),m(f.value))>=n),g=r.ref(!1),b=r.computed(()=>h.value?m(u.value)>m(f.value)?u.value>0?"left":"right":f.value>0?"up":"down":"none"),y=I=>[I.touches[0].clientX,I.touches[0].clientY],S=(I,N)=>{d.x=I,d.y=N},v=(I,N)=>{c.x=I,c.y=N};let w;const x=Qu(l==null?void 0:l.document);a?w=x?{passive:!0}:{capture:!1}:w=x?{passive:!1,capture:!0}:{capture:!0};const F=I=>{g.value&&(i==null||i(I,b.value)),g.value=!1},E=[_t(t,"touchstart",I=>{if(I.touches.length!==1)return;w.capture&&!w.passive&&I.preventDefault();const[N,C]=y(I);S(N,C),v(N,C),s==null||s(I)},w),_t(t,"touchmove",I=>{if(I.touches.length!==1)return;const[N,C]=y(I);v(N,C),!g.value&&h.value&&(g.value=!0),g.value&&(o==null||o(I))},w),_t(t,["touchend","touchcancel"],F,w)];return{isPassiveEventSupported:x,isSwiping:g,direction:b,coordsStart:d,coordsEnd:c,lengthX:u,lengthY:f,stop:()=>E.forEach(I=>I())}}function Qu(t){if(!t)return!1;let e=!1;const n={get passive(){return e=!0,!1}};return t.addEventListener("x",co,n),t.removeEventListener("x",co),e}const en=Z(r.defineComponent({__name:"FmOverlay",props:{onClose:{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 s;e.dismissAway&&n.value&&i.target===n.value&&((s=e.onClose)==null||s.call(e))};return(i,s)=>(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:s[0]||(s[0]=a=>o(a))},[r.renderSlot(i.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-6ebaa300"]]),Wu=[(t=>(r.pushScopeId("data-v-196e2b8b"),t=t(),r.popScopeId(),t))(()=>r.createElementVNode("div",{class:"fm-bottom-sheet--gesture--stick"},null,-1))],Yu={key:0,class:"fm-bottom-sheet--header"},Xu={class:"fm-bottom-sheet--header--content"},Gu={key:0},qu={class:"overflow-y-auto"},Ju={class:"flex gap-8 items-center"},Er=Z(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}},emits:["update:modelValue"],setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(0),{direction:s,distanceY:a}=Uu(n,{threshold:0,onSwipe(){s.value==="down"&&(i.value=Math.min(a.value,0))},onSwipeEnd(){var f;const u=(f=o.value)==null?void 0:f.clientHeight;u&&i.value<-u/2?c.value=!1:i.value=0}}),{direction:l,lengthY:d}=ju(n,{passive:!1,threshold:0,onSwipe(){l.value==="down"&&(i.value=Math.min(d.value,0))},onSwipeEnd(){var f;const u=(f=o.value)==null?void 0:f.clientHeight;u&&i.value<-u/2?c.value=!1:i.value=0}}),c=J(e,"modelValue");return r.watch(c,u=>{u&&(i.value=0)}),(u,f)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:f[0]||(f[0]=p=>c.value=!0)},[r.renderSlot(u.$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(c)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:f[2]||(f[2]=p=>c.value=!1)},{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:"fm-bottom-sheet"},[r.createElementVNode("div",{ref_key:"gestureRef",ref:n,class:"fm-bottom-sheet--gesture"},Wu,512),u.noHeader?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Yu,[r.createElementVNode("div",Xu,[r.createElementVNode("div",{class:"flex h-24 items-center justify-center w-24",onClick:f[1]||(f[1]=p=>c.value=!1)},[r.createVNode(Q,{name:"arrow_back"})]),r.renderSlot(u.$slots,"bottom-sheet-header",{},()=>[u.header?(r.openBlock(),r.createElementBlock("div",Gu,r.toDisplayString(u.header),1)):r.createCommentVNode("",!0)],!0)])])),r.createElementVNode("div",qu,[r.renderSlot(u.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Ju,[r.renderSlot(u.$slots,"bottom-sheet-footer",{},void 0,!0)])],4)]),_:3})]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-196e2b8b"]]),Ku={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Zu=["onMouseenter"],$u={key:0},_u=r.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=yt.useRoute(),n=yt.useRouter();r.onMounted(async()=>{await n.isReady();const h=o.items.findIndex(g=>g.route==e.path);h!=-1&&!o.items[h].disabled&&(i.value=h)});const o=t,i=r.ref(-1),s=r.ref(-1),a=r.ref(" / "),l=r.ref("... /"),d=r.ref(!1),c=h=>i.value===h?"selected":s.value===h?"hovered":o.items[h].disabled?"disabled":"default",u=h=>{o.items[h].disabled||(i.value=h)},f=h=>h!=o.items.length-1,p=h=>!d.value&&o.items.length>5&&h>=2&&h<o.items.length-2,m=()=>{d.value=!d.value};return(h,g)=>{const b=r.resolveComponent("RouterLink");return r.openBlock(),r.createElementBlock("nav",null,[r.createElementVNode("ul",Ku,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,(y,S)=>(r.openBlock(),r.createElementBlock("li",{key:S,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:v=>s.value=S,onMouseleave:g[0]||(g[0]=v=>s.value=-1)},[p(S)?S===3&&!d.value?(r.openBlock(),r.createElementBlock("a",{key:1,onClick:m},r.toDisplayString(l.value),1)):r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(b,{key:0,class:r.normalizeClass([c(S),"fm-typo-en-body-md-400"]),to:y.disabled?"":y.route,onClick:v=>u(S)},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(y.label),1),f(S)?(r.openBlock(),r.createElementBlock("span",$u,r.toDisplayString(a.value),1)):r.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Zu))),128))])])}}});function uo(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const ef={class:"relative"},tf=["stroke-width"],nf=["stroke-width","stroke-dashoffset"],of=["stroke-width","stroke-dashoffset"],rf={key:0};var fo=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(fo||{});const tn=Z(r.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const s=uo(e.currentStep),a=uo(e.totalSteps),l=e.indeterminate??(s===null||a===null);return{currentStep:l?null:Math.min(s,a),totalSteps:a,indeterminate:l}}),o=r.computed(()=>{const s=uo(e.currentStep),a=uo(e.totalSteps);if(typeof s!="number"||typeof a!="number")return"10 200";const l=48,d=Math.min(1,s/a);return isNaN(d)?"0 200":`${d*l} 200`}),i=r.computed(()=>{const s=new Array,a={};return e.color?(kn(e.color)?a.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:a}):{class:s.join(" "),style:a}});return(s,a)=>(r.openBlock(),r.createElementBlock("div",ef,[r.createElementVNode("div",{class:r.normalizeClass(["fm-progress fm-typo-en-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${s.size}`]:!0}])},[(r.openBlock(),r.createElementBlock("svg",{class:r.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:r.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(r.openBlock(),r.createElementBlock("circle",{key:0,class:"spinner","stroke-width":fo[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,tf)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("circle",{"stroke-width":fo[s.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,nf),r.createElementVNode("circle",{"stroke-width":fo[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,of)],64))],6)),!n.value.indeterminate&&s.size==="xxl"?(r.openBlock(),r.createElementBlock("div",rf,r.toDisplayString(n.value.currentStep)+" of "+r.toDisplayString(n.value.totalSteps),1)):r.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-2d7e0fe0"]]),sf=["disabled","type"],af={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},G=Z(r.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"md"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1},disableIconStatus:{type:Boolean}},setup(t){const e=t,n=r.ref(!1),o=r.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function s(a){e.disableIconStatus?n.value=!1:n.value=a}return(a,l)=>{const d=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("button",{ref:"buttonEl",class:r.normalizeClass(`
2
2
  fm-btn
3
3
  ${o.value}
4
4
  fm-btn--${a.size}
@@ -6,25 +6,25 @@
6
6
  fm-btn--${a.variant}
7
7
  ${a.disabled||a.loading?"fm-btn--disabled":""}
8
8
  ${n.value&&a.variant==="plain"?"!text-fm-color-system-warning-400":""}
9
- `),disabled:a.disabled,type:a.type,onMousedown:l[0]||(l[0]=()=>s(!0)),onMouseleave:l[1]||(l[1]=()=>s(!1)),onMouseup:l[2]||(l[2]=()=>s(!1))},[a.icon&&a.iconPosition==="prepend"||a.prependIcon?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass({invisible:a.loading}),color:a.disabled?"neutral-gray-200":a.iconColor??"",name:a.icon||a.prependIcon,outline:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),a.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([{invisible:a.loading},"fm-typo-en-body-lg-600 label line-clamp-1"])},r.toDisplayString(a.label),3)):r.createCommentVNode("",!0),a.icon&&a.iconPosition==="append"||a.appendIcon?(r.openBlock(),r.createBlock(Q,{key:2,class:r.normalizeClass({invisible:a.loading}),color:a.disabled?"neutral-gray-200":a.iconColor??"",name:a.icon||a.appendIcon,outline:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("div",af,[a.loading?(r.openBlock(),r.createBlock(tn,{key:0,color:"neutral-gray-300",size:"md"})):r.createCommentVNode("",!0)])],42,sf)),[[d,!a.disabled&&!a.loading&&a.variant!=="plain"]])}}}),[["__scopeId","data-v-3b971f91"]]),lf={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},df=["disabled","v-wave","onClick","onMousedown"],cf=r.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},s=r.ref(null),a=c=>{s.value=c},l=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(r.openBlock(),r.createElementBlock("div",lf,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.items,(f,p)=>(r.openBlock(),r.createElementBlock("button",{key:p,class:r.normalizeClass([{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":l(f)},"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(f),"v-wave":l(f),type:"button",onClick:m=>i(f),onMousedown:m=>a(f),onMouseleave:u[0]||(u[0]=m=>a(null)),onMouseup:u[1]||(u[1]=m=>a(null))},[f.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:l(f)?"neutral-gray-200":d(f)?"primary":"",name:f.icon,outline:JSON.stringify(s.value)!==JSON.stringify(f)&&!d(f),size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([[l(f)?"text-fm-color-typo-disabled":d(f)?"text-fm-color-primary":"text-fm-color-typo-primary"],"fm-typo-en-body-lg-600"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0)],42,df))),128))]))}}),js=Symbol.for("fm:form"),re=Symbol.for("fm:form-state"),Qs=Symbol.for("fm:radio-group"),Ws=Symbol.for("fm:stepper"),Ys=Symbol.for("fm:dialog"),Xs=Symbol.for("fm:menu"),Gs=Symbol.for("fm:menu-to-item"),Fr=Symbol.for("fm:snackbar"),kt=Symbol.for("fm:card"),Nr=r.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return r.provide(kt,{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))}}),uf=r.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=r.inject(kt,null);return(n,o)=>{var s,a;const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((s=r.unref(e))!=null&&s.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[r.renderSlot(n.$slots,"default")],2)),[[i,!((a=r.unref(e))!=null&&a.disabled)&&!n.disabled]])}}}),Mr=r.defineComponent({__name:"FmCardSection",setup(t){const e=r.inject(kt,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)}}}),ff={class:"fm-card__actions"},pf=r.defineComponent({__name:"FmCardActions",setup(t){const e=r.inject(kt,null);return(n,o)=>(r.openBlock(),r.createBlock(Mr,null,{default:r.withCtx(()=>{var i;return[r.createElementVNode("div",ff,[r.renderSlot(n.$slots,"default",{disabled:((i=r.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),qs=r.defineComponent({__name:"FmCardTitle",setup(t){const e=r.inject(kt,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)}}}),Js=r.defineComponent({__name:"FmCardSubtitle",setup(t){const e=r.inject(kt,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)}}}),mf={class:"flex flex-col gap-4"},hf=r.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=r.inject(kt,null);return(n,o)=>(r.openBlock(),r.createBlock(Mr,{class:"fm-card__header"},{default:r.withCtx(()=>{var i,s;return[r.createElementVNode("div",mf,[n.title?(r.openBlock(),r.createBlock(qs,{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(Js,{key:1,disabled:(s=r.unref(e))==null?void 0:s.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0)])]}),_:1}))}}),gf=["src","width"],bf=r.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=r.inject(kt,null);return(n,o)=>{var i,s;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},(s=r.unref(e))!=null&&s.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,gf)}}}),Or=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),s=r.ref(!1);function a(h){n.selectable&&(s.value=h)}const l=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=h=>{h.stopPropagation(),!n.disabled&&o("chip-closed")};r.onMounted(()=>{i.value=n.selected}),r.watch(()=>n.selected,()=>{i.value=n.selected});function c(h,g,b){if(h)return"text-fm-color-typo-disabled";switch(b){case"plain":return g?"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 u(h,g,b){if(h)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(b){case"plain":return g?"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 f=r.ref(),p=r.ref(!1);function m(h=0){if(n.label&&!(!f.value&&h>500)){if(!f.value){r.nextTick(()=>m(h+1));return}p.value=f.value.offsetWidth<f.value.scrollWidth}}return r.onMounted(()=>{m()}),(h,g)=>{const b=r.resolveDirective("tooltip");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center",h.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(h.disabled,i.value,h.variant),{"cursor-pointer":h.selectable&&!h.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!h.disabled&&h.selectable}]),onClick:l,onMousedown:g[0]||(g[0]=()=>a(!0)),onMouseleave:g[1]||(g[1]=()=>a(!1)),onMouseup:g[2]||(g[2]=()=>a(!1))},[r.renderSlot(h.$slots,"default",{},()=>[h.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:h.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:h.icon,outline:!s.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),h.label?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:r.normalizeClass(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(h.disabled,i.value,h.variant)])},r.toDisplayString(h.label),3)):r.createCommentVNode("",!0),h.rightIcon?(r.openBlock(),r.createBlock(Q,{key:2,color:h.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:h.rightIcon,outline:!s.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)]),h.removable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!h.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":h.disabled,"cursor-pointer":h.selectable&&!h.disabled}]),onClick:d},[r.createVNode(Q,{color:h.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):r.createCommentVNode("",!0)],34)),[[b,p.value?h.label:null]])}}}),Ir=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),s=r.ref(0),a=r.ref(null),l=r.ref(),d=()=>{var p,m;if(!i.value)return;const u=i.value.getBoundingClientRect();s.value>0&&a.value&&((p=l.value)==null||p.splice(a.value,1)),s.value=0;let f=0;Array.from(i.value.children).forEach((h,g)=>{const b=h.getBoundingClientRect(),y=b.y-u.y;f=Math.max(b.height*2+4,f),y>f&&(s.value+=1,a.value=a.value===null?g:g-s.value)}),s.value>0&&a.value&&((m=l.value)==null||m.splice(a.value,0,{label:`+${s.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return r.onMounted(()=>{l.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),r.watch(()=>n.items,()=>{l.value=n.items,d()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:r.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,m)=>(r.openBlock(),r.createBlock(Or,{key:m,label:p.label,icon:p.icon,selected:p.selected,removable:p.removable!==void 0?p.removable:u.removable,selectable:p.selectable!==void 0?p.selectable:u.selectable,disabled:p.disabled!==void 0?p.disabled:u.disabled,compact:u.compact,variant:p.variant,onChipClosed:h=>c(m)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),yf={class:"flex h-48 items-center justify-center w-48"},Ks=r.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},closeButton:{type:Boolean,default:!0},zIndex:{},contentScrollable:{type:Boolean,default:!0},contentClass:{default:void 0},dismissAway:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=r.ref(null),i=r.ref(!1),s=r.ref(!1),a=d=>{const c=d.scrollHeight,u=d.scrollTop+d.clientHeight;s.value=c===u,i.value=d.scrollTop===0},l=d=>{d.stopPropagation();const c=d.target;a(c)};return r.watchEffect(()=>{o.value&&a(o.value)}),(d,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-dialog",`min-w-[${d.minWidth}px] max-w-[min(calc(100%-48px),560px)] max-h-[600px]`])},[r.createElementVNode("div",{class:r.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-en-title-sm-800 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[r.renderSlot(d.$slots,"dialog-header"),r.createElementVNode("div",yf,[d.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:c[0]||(c[0]=u=>n("update:modelValue",!1))})):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",{ref_key:"contentRef",ref:o,class:r.normalizeClass(["fm-dialog--content",[d.contentScrollable?"overflow-y-auto":"overflow-hidden",d.contentClass]]),onScrollPassive:l},[r.renderSlot(d.$slots,"default")],34),d.$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",!s.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[r.renderSlot(d.$slots,"dialog-footer")],2)):r.createCommentVNode("",!0)],2))}});function xt(){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 s(l){const d=o[l][1];return t.value<=d}function a(l){return!!o[l]}return{breakpoints:n,isAtMost:s,getBreakpointsBoundary:i,isBreakpointKeyword:a}}function kf(){const t=r.inject(Ys);if(!t)throw new Error("No provider");return t}function xf(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Sf(){const t=xf();return{emitData(e){t==null||t("dialog:emit-data",e)},emitAction(e){t==null||t(`dialog:${e}-action`)}}}function xn(){const t=r.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}function Zs(t,e){const n=r.ref([]);function o(){const s=[];if(e.value&&e.value.length>0)for(const a of e.value){const d=(typeof a=="function"?a:()=>a)(t.value);d!==!0&&s.push(d)}return n.value=s,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function $s(t,e=null,n=null){let o=null;const i=J(t,"modelValue"),s=r.ref(!0),a=r.inject(js,null),{validate:l,resetValidation:d,errorMessages:c}=Zs(i,r.toRef(()=>t.rules)),u=(f=n)=>{s.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return r.onMounted(()=>{a&&(o=a.register({validate:l,resetValidation:d,resetValue:u}))}),r.onUnmounted(()=>{a&&a.unregister(o)}),r.watch(()=>i.value,()=>{s.value=!1,i.value!==e&&l()}),r.watch(()=>t.focused,f=>{s.value=!1,f||l()}),{validate:l,resetValidation:d,errorMessages:c,resetValue:u,isPristine:s}}function Cf(){return r.inject(Fr)}var wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _s={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(wf,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",c="day",u="week",f="month",p="quarter",m="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,S={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(k){var B=["th","st","nd","rd"],V=k%100;return"["+k+(B[(V-20)%10]||B[V]||B[0])+"]"}},v=function(k,B,V){var R=String(k);return!R||R.length>=B?k:""+Array(B+1-R.length).join(V)+k},w={s:v,z:function(k){var B=-k.utcOffset(),V=Math.abs(B),R=Math.floor(V/60),O=V%60;return(B<=0?"+":"-")+v(R,2,"0")+":"+v(O,2,"0")},m:function k(B,V){if(B.date()<V.date())return-k(V,B);var R=12*(V.year()-B.year())+(V.month()-B.month()),O=B.clone().add(R,f),T=V-O<0,U=B.clone().add(R+(T?-1:1),f);return+(-(R+(V-O)/(T?O-U:U-O))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:m,w:u,d:c,D:h,h:d,m:l,s:a,ms:s,Q:p}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",F={};F[x]=S;var E="$isDayjsObject",M=function(k){return k instanceof D||!(!k||!k[E])},I=function k(B,V,R){var O;if(!B)return x;if(typeof B=="string"){var T=B.toLowerCase();F[T]&&(O=T),V&&(F[T]=V,O=T);var U=B.split("-");if(!O&&U.length>1)return k(U[0])}else{var W=B.name;F[W]=B,O=W}return!R&&O&&(x=O),O||!R&&x},N=function(k,B){if(M(k))return k.clone();var V=typeof B=="object"?B:{};return V.date=k,V.args=arguments,new D(V)},C=w;C.l=I,C.i=M,C.w=function(k,B){return N(k,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var D=function(){function k(V){this.$L=I(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[E]=!0}var B=k.prototype;return B.parse=function(V){this.$d=function(R){var O=R.date,T=R.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var U=O.match(b);if(U){var W=U[2]-1||0,j=(U[7]||"0").substring(0,3);return T?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)}}return new Date(O)}(V),this.init()},B.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},B.$utils=function(){return C},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(V,R){var O=N(V);return this.startOf(R)<=O&&O<=this.endOf(R)},B.isAfter=function(V,R){return N(V)<this.startOf(R)},B.isBefore=function(V,R){return this.endOf(R)<N(V)},B.$g=function(V,R,O){return C.u(V)?this[R]:this.set(O,V)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(V,R){var O=this,T=!!C.u(R)||R,U=C.p(V),W=function(ze,ge){var Fe=C.w(O.$u?Date.UTC(O.$y,ge,ze):new Date(O.$y,ge,ze),O);return T?Fe:Fe.endOf(c)},j=function(ze,ge){return C.w(O.toDate()[ze].apply(O.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(ge)),O)},K=this.$W,_=this.$M,te=this.$D,he="set"+(this.$u?"UTC":"");switch(U){case m:return T?W(1,0):W(31,11);case f:return T?W(1,_):W(0,_+1);case u:var Te=this.$locale().weekStart||0,qe=(K<Te?K+7:K)-Te;return W(T?te-qe:te+(6-qe),_);case c:case h:return j(he+"Hours",0);case d:return j(he+"Minutes",1);case l:return j(he+"Seconds",2);case a:return j(he+"Milliseconds",3);default:return this.clone()}},B.endOf=function(V){return this.startOf(V,!1)},B.$set=function(V,R){var O,T=C.p(V),U="set"+(this.$u?"UTC":""),W=(O={},O[c]=U+"Date",O[h]=U+"Date",O[f]=U+"Month",O[m]=U+"FullYear",O[d]=U+"Hours",O[l]=U+"Minutes",O[a]=U+"Seconds",O[s]=U+"Milliseconds",O)[T],j=T===c?this.$D+(R-this.$W):R;if(T===f||T===m){var K=this.clone().set(h,1);K.$d[W](j),K.init(),this.$d=K.set(h,Math.min(this.$D,K.daysInMonth())).$d}else W&&this.$d[W](j);return this.init(),this},B.set=function(V,R){return this.clone().$set(V,R)},B.get=function(V){return this[C.p(V)]()},B.add=function(V,R){var O,T=this;V=Number(V);var U=C.p(R),W=function(_){var te=N(T);return C.w(te.date(te.date()+Math.round(_*V)),T)};if(U===f)return this.set(f,this.$M+V);if(U===m)return this.set(m,this.$y+V);if(U===c)return W(1);if(U===u)return W(7);var j=(O={},O[l]=o,O[d]=i,O[a]=n,O)[U]||1,K=this.$d.getTime()+V*j;return C.w(K,this)},B.subtract=function(V,R){return this.add(-1*V,R)},B.format=function(V){var R=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var T=V||"YYYY-MM-DDTHH:mm:ssZ",U=C.z(this),W=this.$H,j=this.$m,K=this.$M,_=O.weekdays,te=O.months,he=O.meridiem,Te=function(ge,Fe,Le,nt){return ge&&(ge[Fe]||ge(R,T))||Le[Fe].slice(0,nt)},qe=function(ge){return C.s(W%12||12,ge,"0")},ze=he||function(ge,Fe,Le){var nt=ge<12?"AM":"PM";return Le?nt.toLowerCase():nt};return T.replace(y,function(ge,Fe){return Fe||function(Le){switch(Le){case"YY":return String(R.$y).slice(-2);case"YYYY":return C.s(R.$y,4,"0");case"M":return K+1;case"MM":return C.s(K+1,2,"0");case"MMM":return Te(O.monthsShort,K,te,3);case"MMMM":return Te(te,K);case"D":return R.$D;case"DD":return C.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Te(O.weekdaysMin,R.$W,_,2);case"ddd":return Te(O.weekdaysShort,R.$W,_,3);case"dddd":return _[R.$W];case"H":return String(W);case"HH":return C.s(W,2,"0");case"h":return qe(1);case"hh":return qe(2);case"a":return ze(W,j,!0);case"A":return ze(W,j,!1);case"m":return String(j);case"mm":return C.s(j,2,"0");case"s":return String(R.$s);case"ss":return C.s(R.$s,2,"0");case"SSS":return C.s(R.$ms,3,"0");case"Z":return U}return null}(ge)||U.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(V,R,O){var T,U=this,W=C.p(R),j=N(V),K=(j.utcOffset()-this.utcOffset())*o,_=this-j,te=function(){return C.m(U,j)};switch(W){case m:T=te()/12;break;case f:T=te();break;case p:T=te()/3;break;case u:T=(_-K)/6048e5;break;case c:T=(_-K)/864e5;break;case d:T=_/i;break;case l:T=_/o;break;case a:T=_/n;break;default:T=_}return O?T:C.a(T)},B.daysInMonth=function(){return this.endOf(f).$D},B.$locale=function(){return F[this.$L]},B.locale=function(V,R){if(!V)return this.$L;var O=this.clone(),T=I(V,R,!0);return T&&(O.$L=T),O},B.clone=function(){return C.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},k}(),A=D.prototype;return N.prototype=A,[["$ms",s],["$s",a],["$m",l],["$H",d],["$W",c],["$M",f],["$y",m],["$D",h]].forEach(function(k){A[k[1]]=function(B){return this.$g(B,k[0],k[1])}}),N.extend=function(k,B){return k.$i||(k(B,D,N),k.$i=!0),N},N.locale=I,N.isDayjs=M,N.unix=function(k){return N(1e3*k)},N.en=F[x],N.Ls=F,N.p={},N})})(_s);var Af=_s.exports;const P=Rr(Af);function Ce(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Ce(t[n],e[n]))}const ea=t=>typeof t=="boolean",ue=(t,e,n)=>t&&e&&n?t.isAfter(e,"day")&&t.isBefore(n,"day"):!1,vf=r.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0},zIndex:{default:void 0},contentScrollable:{type:Boolean,default:!0},contentClass:{},dismissAway:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const o=J(t,"modelValue"),i=r.ref(!1),s=r.computed({get:()=>ea(o)?o:i.value,set:l=>{ea(o)?o.value=l:i.value=l}}),a=document.body.style.overflow;return r.watch(()=>o,l=>{l?document.body.style.overflow="hidden":document.body.style.overflow=a}),(l,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[l.$slots["dialog-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:d[1]||(d[1]=c=>s.value=!0)},[r.renderSlot(l.$slots,"dialog-button",{onClick:d[0]||(d[0]=c=>s.value=!0)})])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[s.value?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":l.dismissAway,"prevent-backdrop-event":!l.overlay,transparent:!l.overlay,"z-index":l.zIndex,"center-content":"",onClose:d[3]||(d[3]=c=>s.value=!1)},{default:r.withCtx(()=>[r.createVNode(Ks,{"close-button":l.closeButton,"content-class":l.contentClass,"content-scrollable":l.contentScrollable,"min-width":l.minWidth,"model-value":s.value,"onUpdate:modelValue":d[2]||(d[2]=c=>s.value=c)},r.createSlots({"dialog-header":r.withCtx(()=>[r.renderSlot(l.$slots,"dialog-header")]),default:r.withCtx(()=>[r.renderSlot(l.$slots,"default")]),_:2},[l.$slots["dialog-footer"]?{name:"dialog-footer",fn:r.withCtx(()=>[r.renderSlot(l.$slots,"dialog-footer")]),key:"0"}:void 0]),1032,["close-button","content-class","content-scrollable","min-width","model-value"])]),_:3},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:3})]))],64))}}),Bf={class:"fm-drop-field"},Df=["accept","disabled"],Vf=Z(r.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.ref(),a=r.ref(),l=r.ref(),d=x=>{n.disabled||(x.stopPropagation(),x.preventDefault())},c=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!0)},u=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1)},f=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1,p(x))},p=x=>{var E;l.value=((E=x.dataTransfer)==null?void 0:E.files)??x.target.files;const F=l.value;if(s.value=h(F[0]),a.value=g(F[0]),s.value&&a.value)o("file-upload",F[0]);else{const M=m();o("file-rejected",[{file:F[0],reason:M}])}},m=()=>{const x=[];return s.value||x.push("invalid-type"),a.value||x.push("invalid-size"),x},h=x=>{if(!n.accept)return!0;const F=n.accept.split(",").map(E=>E.trim());for(const E of F)if(b(E)){if(S(E)===S(x.type))return!0}else if(y(x)===E||x.type===E)return!0;return!1},g=x=>x.size<=n.maxFileSize,b=x=>x.indexOf("*")!==-1,y=x=>"."+x.name.split(".").pop(),S=x=>x.substring(0,x.indexOf("/")),v=r.computed(()=>{if(i.value)return"Drop file to upload";if(s.value){if(!a.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),w=r.computed(()=>l.value?!s.value||!a.value:!1);return(x,F)=>(r.openBlock(),r.createElementBlock("label",Bf,[r.renderSlot(x.$slots,"label",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},r.toDisplayString(x.label),3)],!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":w.value&&!x.disabled,"fm-drop-field__container--disabled":x.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||w.value)&&!x.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":w.value})},r.toDisplayString(v.value),3)):(r.openBlock(),r.createBlock(G,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:x.disabled},null,8,["disabled"])),r.renderSlot(x.$slots,"accept-text",{},()=>[n.accept?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-en-body-md-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Accepts ${n.accept}`),3)):r.createCommentVNode("",!0)],!0),r.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:x.accept,disabled:x.disabled,onChange:p},null,40,Df)],34),r.renderSlot(x.$slots,"helper-text",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-sm-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),[["__scopeId","data-v-5be808dd"]]),Pf={},Ef={class:"flex-grow"};function Ff(t,e){return r.openBlock(),r.createElementBlock("div",Ef)}const St=Z(Pf,[["render",Ff]]),Nf={install:t=>{const e={currentDialog:{dialogCount:0,vNode:null,container:null,uselessContainers:[]},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i=new Array,s={onPrimary:u=>(o.primary.push(u),s),onSecondary:u=>(o.secondary.push(u),s),onTertiary:u=>(o.tertiary.push(u),s),onClose:u=>(i.push(u),s)};function a(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const d=r.markRaw(ta),c=r.createVNode(d,{...n,unmount:a,storedFunctions:o,"onDialog-closed"(u){i.forEach(f=>f(u))}});return c.appContext=t._context,r.render(c,l),e.currentDialog.container&&e.currentDialog.uselessContainers.push(e.currentDialog.container),e.currentDialog.dialogCount+=1,e.currentDialog.vNode=c,e.currentDialog.container=l,s},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(Ys,e)}},Mf={key:0,class:"block relative"},Of={class:"space-y-4"},If={key:0,class:"fm-typo-en-body-sm-400 text-fm-color-typo-secondary"},Rf={key:1,class:"fm-typo-en-body-md-400 text-fm-color-neutral-black"},ta=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},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentScrollable:{type:Boolean,default:!0},contentClass:{},contentComponentProps:{default:null},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(()=>s.primaryActions||s.secondaryActions||s.tertiaryActions),s=t,a=e,l=()=>{s.overlay&&(n.value=!1,setTimeout(()=>{s.unmount()},500))},d=(f,p)=>{s.storedFunctions[p].forEach(m=>m(o.value)),f.close&&l()},c=f=>{const p=s[`${f}Actions`];d(p||{text:null,close:!1},f)};r.onMounted(()=>{a("dialog-opened"),n.value=!0}),r.onUnmounted(()=>{a("dialog-closed",o.value)});const u=f=>r.isRef(f)?f.value:r.ref(f).value;return(f,p)=>(r.openBlock(),r.createBlock(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[n.value?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":f.dismissAway,"prevent-backdrop-event":!f.overlay,transparent:!f.overlay,"z-index":f.zIndex,"center-content":"",onClose:l},{default:r.withCtx(()=>[f.dialogComponent?(r.openBlock(),r.createElementBlock("div",Mf,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.dialogComponent),r.normalizeProps(r.guardReactiveProps(f.dialogComponentProps)),null,16)),f.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:l})):r.createCommentVNode("",!0)])):(r.openBlock(),r.createBlock(Ks,{key:1,modelValue:n.value,"onUpdate:modelValue":p[7]||(p[7]=m=>n.value=m),"close-button":f.closeButton,"content-class":f.contentClass,"content-scrollable":f.contentScrollable,"min-width":f.minWidth},r.createSlots({"dialog-header":r.withCtx(()=>[r.createElementVNode("div",Of,[r.createElementVNode("p",null,r.toDisplayString(f.title??"Notification"),1),f.subTitle?(r.openBlock(),r.createElementBlock("p",If,r.toDisplayString(f.subTitle),1)):r.createCommentVNode("",!0)])]),default:r.withCtx(()=>[f.contentComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.contentComponent),r.mergeProps({key:0},f.contentComponentProps,{"onDialog:emitData":p[0]||(p[0]=m=>o.value=m),"onDialog:primaryAction":p[1]||(p[1]=m=>c("primary")),"onDialog:secondaryAction":p[2]||(p[2]=m=>c("secondary")),"onDialog:tertiaryAction":p[3]||(p[3]=m=>c("tertiary"))}),null,16)):(r.openBlock(),r.createElementBlock("div",Rf,r.toDisplayString(f.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:r.withCtx(()=>[f.tertiaryActions?(r.openBlock(),r.createBlock(G,{key:0,disabled:u(f.tertiaryActions.disabled),label:f.tertiaryActions.text,loading:u(f.tertiaryActions.isLoading),variant:f.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:p[4]||(p[4]=m=>d(f.tertiaryActions,"tertiary"))},null,8,["disabled","label","loading","variant"])):r.createCommentVNode("",!0),r.createVNode(St,{class:"sm:hidden xs:hidden"}),f.secondaryActions?(r.openBlock(),r.createBlock(G,{key:1,disabled:u(f.secondaryActions.disabled),label:f.secondaryActions.text,loading:u(f.secondaryActions.isLoading),variant:f.secondaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:p[5]||(p[5]=m=>d(f.secondaryActions,"secondary"))},null,8,["disabled","label","loading","variant"])):r.createCommentVNode("",!0),f.primaryActions?(r.openBlock(),r.createBlock(G,{key:2,disabled:u(f.primaryActions.disabled),label:f.primaryActions.text,loading:u(f.primaryActions.isLoading),variant:f.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:p[6]||(p[6]=m=>d(f.primaryActions,"primary"))},null,8,["disabled","label","loading","variant"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["modelValue","close-button","content-class","content-scrollable","min-width"]))]),_:1},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:1}))}});/*!
9
+ `),disabled:a.disabled,type:a.type,onMousedown:l[0]||(l[0]=()=>s(!0)),onMouseleave:l[1]||(l[1]=()=>s(!1)),onMouseup:l[2]||(l[2]=()=>s(!1))},[a.icon&&a.iconPosition==="prepend"||a.prependIcon?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass({invisible:a.loading}),color:a.disabled?"neutral-gray-200":a.iconColor??"",name:a.icon||a.prependIcon,outline:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),a.label?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[a.$slots.default?r.renderSlot(a.$slots,"default",{key:0,disabled:a.disabled},void 0,!0):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([{invisible:a.loading},"fm-typo-en-body-lg-600 label line-clamp-1"])},r.toDisplayString(a.label),3))],64)):r.createCommentVNode("",!0),a.icon&&a.iconPosition==="append"||a.appendIcon?(r.openBlock(),r.createBlock(Q,{key:2,class:r.normalizeClass({invisible:a.loading}),color:a.disabled?"neutral-gray-200":a.iconColor??"",name:a.icon||a.appendIcon,outline:!n.value,size:"md"},null,8,["class","color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("div",af,[a.loading?(r.openBlock(),r.createBlock(tn,{key:0,color:"neutral-gray-300",size:"md"})):r.createCommentVNode("",!0)])],42,sf)),[[d,!a.disabled&&!a.loading&&a.variant!=="plain"]])}}}),[["__scopeId","data-v-264930e2"]]),lf={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},df=["disabled","v-wave","onClick","onMousedown"],cf=r.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},s=r.ref(null),a=c=>{s.value=c},l=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(r.openBlock(),r.createElementBlock("div",lf,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.items,(f,p)=>(r.openBlock(),r.createElementBlock("button",{key:p,class:r.normalizeClass([{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":l(f)},"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(f),"v-wave":l(f),type:"button",onClick:m=>i(f),onMousedown:m=>a(f),onMouseleave:u[0]||(u[0]=m=>a(null)),onMouseup:u[1]||(u[1]=m=>a(null))},[f.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:l(f)?"neutral-gray-200":d(f)?"primary":"",name:f.icon,outline:JSON.stringify(s.value)!==JSON.stringify(f)&&!d(f),size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass([[l(f)?"text-fm-color-typo-disabled":d(f)?"text-fm-color-primary":"text-fm-color-typo-primary"],"fm-typo-en-body-lg-600"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0)],42,df))),128))]))}}),js=Symbol.for("fm:form"),re=Symbol.for("fm:form-state"),Qs=Symbol.for("fm:radio-group"),Ws=Symbol.for("fm:stepper"),Ys=Symbol.for("fm:dialog"),Xs=Symbol.for("fm:menu"),Gs=Symbol.for("fm:menu-to-item"),Fr=Symbol.for("fm:snackbar"),xt=Symbol.for("fm:card"),Nr=r.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return r.provide(xt,{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))}}),uf=r.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=r.inject(xt,null);return(n,o)=>{var s,a;const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((s=r.unref(e))!=null&&s.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[r.renderSlot(n.$slots,"default")],2)),[[i,!((a=r.unref(e))!=null&&a.disabled)&&!n.disabled]])}}}),Mr=r.defineComponent({__name:"FmCardSection",setup(t){const e=r.inject(xt,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)}}}),ff={class:"fm-card__actions"},pf=r.defineComponent({__name:"FmCardActions",setup(t){const e=r.inject(xt,null);return(n,o)=>(r.openBlock(),r.createBlock(Mr,null,{default:r.withCtx(()=>{var i;return[r.createElementVNode("div",ff,[r.renderSlot(n.$slots,"default",{disabled:((i=r.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),qs=r.defineComponent({__name:"FmCardTitle",setup(t){const e=r.inject(xt,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)}}}),Js=r.defineComponent({__name:"FmCardSubtitle",setup(t){const e=r.inject(xt,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)}}}),mf={class:"flex flex-col gap-4"},hf=r.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=r.inject(xt,null);return(n,o)=>(r.openBlock(),r.createBlock(Mr,{class:"fm-card__header"},{default:r.withCtx(()=>{var i,s;return[r.createElementVNode("div",mf,[n.title?(r.openBlock(),r.createBlock(qs,{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(Js,{key:1,disabled:(s=r.unref(e))==null?void 0:s.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0)])]}),_:1}))}}),gf=["src","width"],bf=r.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=r.inject(xt,null);return(n,o)=>{var i,s;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},(s=r.unref(e))!=null&&s.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,gf)}}}),Or=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),s=r.ref(!1);function a(h){n.selectable&&(s.value=h)}const l=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=h=>{h.stopPropagation(),!n.disabled&&o("chip-closed")};r.onMounted(()=>{i.value=n.selected}),r.watch(()=>n.selected,()=>{i.value=n.selected});function c(h,g,b){if(h)return"text-fm-color-typo-disabled";switch(b){case"plain":return g?"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 u(h,g,b){if(h)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(b){case"plain":return g?"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 f=r.ref(),p=r.ref(!1);function m(h=0){if(n.label&&!(!f.value&&h>500)){if(!f.value){r.nextTick(()=>m(h+1));return}p.value=f.value.offsetWidth<f.value.scrollWidth}}return r.onMounted(()=>{m()}),(h,g)=>{const b=r.resolveDirective("tooltip");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center",h.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(h.disabled,i.value,h.variant),{"cursor-pointer":h.selectable&&!h.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!h.disabled&&h.selectable}]),onClick:l,onMousedown:g[0]||(g[0]=()=>a(!0)),onMouseleave:g[1]||(g[1]=()=>a(!1)),onMouseup:g[2]||(g[2]=()=>a(!1))},[r.renderSlot(h.$slots,"default",{},()=>[h.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:h.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:h.icon,outline:!s.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),h.label?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:r.normalizeClass(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(h.disabled,i.value,h.variant)])},r.toDisplayString(h.label),3)):r.createCommentVNode("",!0),h.rightIcon?(r.openBlock(),r.createBlock(Q,{key:2,color:h.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:h.rightIcon,outline:!s.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)]),h.removable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!h.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":h.disabled,"cursor-pointer":h.selectable&&!h.disabled}]),onClick:d},[r.createVNode(Q,{color:h.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):r.createCommentVNode("",!0)],34)),[[b,p.value?h.label:null]])}}}),Ir=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),s=r.ref(0),a=r.ref(null),l=r.ref(),d=()=>{var p,m;if(!i.value)return;const u=i.value.getBoundingClientRect();s.value>0&&a.value&&((p=l.value)==null||p.splice(a.value,1)),s.value=0;let f=0;Array.from(i.value.children).forEach((h,g)=>{const b=h.getBoundingClientRect(),y=b.y-u.y;f=Math.max(b.height*2+4,f),y>f&&(s.value+=1,a.value=a.value===null?g:g-s.value)}),s.value>0&&a.value&&((m=l.value)==null||m.splice(a.value,0,{label:`+${s.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return r.onMounted(()=>{l.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),r.watch(()=>n.items,()=>{l.value=n.items,d()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:r.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,m)=>(r.openBlock(),r.createBlock(Or,{key:m,label:p.label,icon:p.icon,selected:p.selected,removable:p.removable!==void 0?p.removable:u.removable,selectable:p.selectable!==void 0?p.selectable:u.selectable,disabled:p.disabled!==void 0?p.disabled:u.disabled,compact:u.compact,variant:p.variant,onChipClosed:h=>c(m)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),yf={class:"flex h-48 items-center justify-center w-48"},Ks=r.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},closeButton:{type:Boolean,default:!0},zIndex:{},contentScrollable:{type:Boolean,default:!0},contentClass:{default:void 0},dismissAway:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=r.ref(null),i=r.ref(!1),s=r.ref(!1),a=d=>{const c=d.scrollHeight,u=d.scrollTop+d.clientHeight;s.value=c===u,i.value=d.scrollTop===0},l=d=>{d.stopPropagation();const c=d.target;a(c)};return r.watchEffect(()=>{o.value&&a(o.value)}),(d,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-dialog",`min-w-[${d.minWidth}px] max-w-[min(calc(100%-48px),560px)] max-h-[600px]`])},[r.createElementVNode("div",{class:r.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-en-title-sm-800 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[r.renderSlot(d.$slots,"dialog-header"),r.createElementVNode("div",yf,[d.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:c[0]||(c[0]=u=>n("update:modelValue",!1))})):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",{ref_key:"contentRef",ref:o,class:r.normalizeClass(["fm-dialog--content",[d.contentScrollable?"overflow-y-auto":"overflow-hidden",d.contentClass]]),onScrollPassive:l},[r.renderSlot(d.$slots,"default")],34),d.$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",!s.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[r.renderSlot(d.$slots,"dialog-footer")],2)):r.createCommentVNode("",!0)],2))}});function St(){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 s(l){const d=o[l][1];return t.value<=d}function a(l){return!!o[l]}return{breakpoints:n,isAtMost:s,getBreakpointsBoundary:i,isBreakpointKeyword:a}}function kf(){const t=r.inject(Ys);if(!t)throw new Error("No provider");return t}function xf(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Sf(){const t=xf();return{emitData(e){t==null||t("dialog:emit-data",e)},emitAction(e){t==null||t(`dialog:${e}-action`)}}}function xn(){const t=r.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}function Zs(t,e){const n=r.ref([]);function o(){const s=[];if(e.value&&e.value.length>0)for(const a of e.value){const d=(typeof a=="function"?a:()=>a)(t.value);d!==!0&&s.push(d)}return n.value=s,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function $s(t,e=null,n=null){let o=null;const i=J(t,"modelValue"),s=r.ref(!0),a=r.inject(js,null),{validate:l,resetValidation:d,errorMessages:c}=Zs(i,r.toRef(()=>t.rules)),u=(f=n)=>{s.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return r.onMounted(()=>{a&&(o=a.register({validate:l,resetValidation:d,resetValue:u}))}),r.onUnmounted(()=>{a&&a.unregister(o)}),r.watch(()=>i.value,()=>{s.value=!1,i.value!==e&&l()}),r.watch(()=>t.focused,f=>{s.value=!1,f||l()}),{validate:l,resetValidation:d,errorMessages:c,resetValue:u,isPristine:s}}function Cf(){return r.inject(Fr)}var wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _s={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(wf,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",c="day",u="week",f="month",p="quarter",m="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,S={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(k){var B=["th","st","nd","rd"],V=k%100;return"["+k+(B[(V-20)%10]||B[V]||B[0])+"]"}},v=function(k,B,V){var R=String(k);return!R||R.length>=B?k:""+Array(B+1-R.length).join(V)+k},w={s:v,z:function(k){var B=-k.utcOffset(),V=Math.abs(B),R=Math.floor(V/60),O=V%60;return(B<=0?"+":"-")+v(R,2,"0")+":"+v(O,2,"0")},m:function k(B,V){if(B.date()<V.date())return-k(V,B);var R=12*(V.year()-B.year())+(V.month()-B.month()),O=B.clone().add(R,f),T=V-O<0,U=B.clone().add(R+(T?-1:1),f);return+(-(R+(V-O)/(T?O-U:U-O))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:m,w:u,d:c,D:h,h:d,m:l,s:a,ms:s,Q:p}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",F={};F[x]=S;var E="$isDayjsObject",M=function(k){return k instanceof D||!(!k||!k[E])},I=function k(B,V,R){var O;if(!B)return x;if(typeof B=="string"){var T=B.toLowerCase();F[T]&&(O=T),V&&(F[T]=V,O=T);var U=B.split("-");if(!O&&U.length>1)return k(U[0])}else{var W=B.name;F[W]=B,O=W}return!R&&O&&(x=O),O||!R&&x},N=function(k,B){if(M(k))return k.clone();var V=typeof B=="object"?B:{};return V.date=k,V.args=arguments,new D(V)},C=w;C.l=I,C.i=M,C.w=function(k,B){return N(k,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var D=function(){function k(V){this.$L=I(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[E]=!0}var B=k.prototype;return B.parse=function(V){this.$d=function(R){var O=R.date,T=R.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var U=O.match(b);if(U){var W=U[2]-1||0,j=(U[7]||"0").substring(0,3);return T?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,j)}}return new Date(O)}(V),this.init()},B.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},B.$utils=function(){return C},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(V,R){var O=N(V);return this.startOf(R)<=O&&O<=this.endOf(R)},B.isAfter=function(V,R){return N(V)<this.startOf(R)},B.isBefore=function(V,R){return this.endOf(R)<N(V)},B.$g=function(V,R,O){return C.u(V)?this[R]:this.set(O,V)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(V,R){var O=this,T=!!C.u(R)||R,U=C.p(V),W=function(ze,ge){var Fe=C.w(O.$u?Date.UTC(O.$y,ge,ze):new Date(O.$y,ge,ze),O);return T?Fe:Fe.endOf(c)},j=function(ze,ge){return C.w(O.toDate()[ze].apply(O.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(ge)),O)},K=this.$W,_=this.$M,te=this.$D,he="set"+(this.$u?"UTC":"");switch(U){case m:return T?W(1,0):W(31,11);case f:return T?W(1,_):W(0,_+1);case u:var Te=this.$locale().weekStart||0,qe=(K<Te?K+7:K)-Te;return W(T?te-qe:te+(6-qe),_);case c:case h:return j(he+"Hours",0);case d:return j(he+"Minutes",1);case l:return j(he+"Seconds",2);case a:return j(he+"Milliseconds",3);default:return this.clone()}},B.endOf=function(V){return this.startOf(V,!1)},B.$set=function(V,R){var O,T=C.p(V),U="set"+(this.$u?"UTC":""),W=(O={},O[c]=U+"Date",O[h]=U+"Date",O[f]=U+"Month",O[m]=U+"FullYear",O[d]=U+"Hours",O[l]=U+"Minutes",O[a]=U+"Seconds",O[s]=U+"Milliseconds",O)[T],j=T===c?this.$D+(R-this.$W):R;if(T===f||T===m){var K=this.clone().set(h,1);K.$d[W](j),K.init(),this.$d=K.set(h,Math.min(this.$D,K.daysInMonth())).$d}else W&&this.$d[W](j);return this.init(),this},B.set=function(V,R){return this.clone().$set(V,R)},B.get=function(V){return this[C.p(V)]()},B.add=function(V,R){var O,T=this;V=Number(V);var U=C.p(R),W=function(_){var te=N(T);return C.w(te.date(te.date()+Math.round(_*V)),T)};if(U===f)return this.set(f,this.$M+V);if(U===m)return this.set(m,this.$y+V);if(U===c)return W(1);if(U===u)return W(7);var j=(O={},O[l]=o,O[d]=i,O[a]=n,O)[U]||1,K=this.$d.getTime()+V*j;return C.w(K,this)},B.subtract=function(V,R){return this.add(-1*V,R)},B.format=function(V){var R=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var T=V||"YYYY-MM-DDTHH:mm:ssZ",U=C.z(this),W=this.$H,j=this.$m,K=this.$M,_=O.weekdays,te=O.months,he=O.meridiem,Te=function(ge,Fe,Le,nt){return ge&&(ge[Fe]||ge(R,T))||Le[Fe].slice(0,nt)},qe=function(ge){return C.s(W%12||12,ge,"0")},ze=he||function(ge,Fe,Le){var nt=ge<12?"AM":"PM";return Le?nt.toLowerCase():nt};return T.replace(y,function(ge,Fe){return Fe||function(Le){switch(Le){case"YY":return String(R.$y).slice(-2);case"YYYY":return C.s(R.$y,4,"0");case"M":return K+1;case"MM":return C.s(K+1,2,"0");case"MMM":return Te(O.monthsShort,K,te,3);case"MMMM":return Te(te,K);case"D":return R.$D;case"DD":return C.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Te(O.weekdaysMin,R.$W,_,2);case"ddd":return Te(O.weekdaysShort,R.$W,_,3);case"dddd":return _[R.$W];case"H":return String(W);case"HH":return C.s(W,2,"0");case"h":return qe(1);case"hh":return qe(2);case"a":return ze(W,j,!0);case"A":return ze(W,j,!1);case"m":return String(j);case"mm":return C.s(j,2,"0");case"s":return String(R.$s);case"ss":return C.s(R.$s,2,"0");case"SSS":return C.s(R.$ms,3,"0");case"Z":return U}return null}(ge)||U.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(V,R,O){var T,U=this,W=C.p(R),j=N(V),K=(j.utcOffset()-this.utcOffset())*o,_=this-j,te=function(){return C.m(U,j)};switch(W){case m:T=te()/12;break;case f:T=te();break;case p:T=te()/3;break;case u:T=(_-K)/6048e5;break;case c:T=(_-K)/864e5;break;case d:T=_/i;break;case l:T=_/o;break;case a:T=_/n;break;default:T=_}return O?T:C.a(T)},B.daysInMonth=function(){return this.endOf(f).$D},B.$locale=function(){return F[this.$L]},B.locale=function(V,R){if(!V)return this.$L;var O=this.clone(),T=I(V,R,!0);return T&&(O.$L=T),O},B.clone=function(){return C.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},k}(),A=D.prototype;return N.prototype=A,[["$ms",s],["$s",a],["$m",l],["$H",d],["$W",c],["$M",f],["$y",m],["$D",h]].forEach(function(k){A[k[1]]=function(B){return this.$g(B,k[0],k[1])}}),N.extend=function(k,B){return k.$i||(k(B,D,N),k.$i=!0),N},N.locale=I,N.isDayjs=M,N.unix=function(k){return N(1e3*k)},N.en=F[x],N.Ls=F,N.p={},N})})(_s);var Af=_s.exports;const P=Rr(Af);function Ce(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Ce(t[n],e[n]))}const ea=t=>typeof t=="boolean",ue=(t,e,n)=>t&&e&&n?t.isAfter(e,"day")&&t.isBefore(n,"day"):!1,vf=r.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0},zIndex:{default:void 0},contentScrollable:{type:Boolean,default:!0},contentClass:{},dismissAway:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const o=J(t,"modelValue"),i=r.ref(!1),s=r.computed({get:()=>ea(o)?o:i.value,set:l=>{ea(o)?o.value=l:i.value=l}}),a=document.body.style.overflow;return r.watch(()=>o,l=>{l?document.body.style.overflow="hidden":document.body.style.overflow=a}),(l,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[l.$slots["dialog-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:d[1]||(d[1]=c=>s.value=!0)},[r.renderSlot(l.$slots,"dialog-button",{onClick:d[0]||(d[0]=c=>s.value=!0)})])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[s.value?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":l.dismissAway,"prevent-backdrop-event":!l.overlay,transparent:!l.overlay,"z-index":l.zIndex,"center-content":"",onClose:d[3]||(d[3]=c=>s.value=!1)},{default:r.withCtx(()=>[r.createVNode(Ks,{"close-button":l.closeButton,"content-class":l.contentClass,"content-scrollable":l.contentScrollable,"min-width":l.minWidth,"model-value":s.value,"onUpdate:modelValue":d[2]||(d[2]=c=>s.value=c)},r.createSlots({"dialog-header":r.withCtx(()=>[r.renderSlot(l.$slots,"dialog-header")]),default:r.withCtx(()=>[r.renderSlot(l.$slots,"default")]),_:2},[l.$slots["dialog-footer"]?{name:"dialog-footer",fn:r.withCtx(()=>[r.renderSlot(l.$slots,"dialog-footer")]),key:"0"}:void 0]),1032,["close-button","content-class","content-scrollable","min-width","model-value"])]),_:3},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:3})]))],64))}}),Bf={class:"fm-drop-field"},Df=["accept","disabled"],Vf=Z(r.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.ref(),a=r.ref(),l=r.ref(),d=x=>{n.disabled||(x.stopPropagation(),x.preventDefault())},c=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!0)},u=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1)},f=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1,p(x))},p=x=>{var E;l.value=((E=x.dataTransfer)==null?void 0:E.files)??x.target.files;const F=l.value;if(s.value=h(F[0]),a.value=g(F[0]),s.value&&a.value)o("file-upload",F[0]);else{const M=m();o("file-rejected",[{file:F[0],reason:M}])}},m=()=>{const x=[];return s.value||x.push("invalid-type"),a.value||x.push("invalid-size"),x},h=x=>{if(!n.accept)return!0;const F=n.accept.split(",").map(E=>E.trim());for(const E of F)if(b(E)){if(S(E)===S(x.type))return!0}else if(y(x)===E||x.type===E)return!0;return!1},g=x=>x.size<=n.maxFileSize,b=x=>x.indexOf("*")!==-1,y=x=>"."+x.name.split(".").pop(),S=x=>x.substring(0,x.indexOf("/")),v=r.computed(()=>{if(i.value)return"Drop file to upload";if(s.value){if(!a.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),w=r.computed(()=>l.value?!s.value||!a.value:!1);return(x,F)=>(r.openBlock(),r.createElementBlock("label",Bf,[r.renderSlot(x.$slots,"label",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},r.toDisplayString(x.label),3)],!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":w.value&&!x.disabled,"fm-drop-field__container--disabled":x.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||w.value)&&!x.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":w.value})},r.toDisplayString(v.value),3)):(r.openBlock(),r.createBlock(G,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:x.disabled},null,8,["disabled"])),r.renderSlot(x.$slots,"accept-text",{},()=>[n.accept?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-en-body-md-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Accepts ${n.accept}`),3)):r.createCommentVNode("",!0)],!0),r.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:x.accept,disabled:x.disabled,onChange:p},null,40,Df)],34),r.renderSlot(x.$slots,"helper-text",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-sm-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),[["__scopeId","data-v-5be808dd"]]),Pf={},Ef={class:"flex-grow"};function Ff(t,e){return r.openBlock(),r.createElementBlock("div",Ef)}const Ct=Z(Pf,[["render",Ff]]),Nf={install:t=>{const e={currentDialog:{dialogCount:0,vNode:null,container:null,uselessContainers:[]},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i=new Array,s={onPrimary:u=>(o.primary.push(u),s),onSecondary:u=>(o.secondary.push(u),s),onTertiary:u=>(o.tertiary.push(u),s),onClose:u=>(i.push(u),s)};function a(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const d=r.markRaw(ta),c=r.createVNode(d,{...n,unmount:a,storedFunctions:o,"onDialog-closed"(u){i.forEach(f=>f(u))}});return c.appContext=t._context,r.render(c,l),e.currentDialog.container&&e.currentDialog.uselessContainers.push(e.currentDialog.container),e.currentDialog.dialogCount+=1,e.currentDialog.vNode=c,e.currentDialog.container=l,s},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(Ys,e)}},Mf={key:0,class:"block relative"},Of={class:"space-y-4"},If={key:0,class:"fm-typo-en-body-sm-400 text-fm-color-typo-secondary"},Rf={key:1,class:"fm-typo-en-body-md-400 text-fm-color-neutral-black"},ta=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},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentScrollable:{type:Boolean,default:!0},contentClass:{},contentComponentProps:{default:null},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(()=>s.primaryActions||s.secondaryActions||s.tertiaryActions),s=t,a=e,l=()=>{s.overlay&&(n.value=!1,setTimeout(()=>{s.unmount()},500))},d=(f,p)=>{s.storedFunctions[p].forEach(m=>m(o.value)),f.close&&l()},c=f=>{const p=s[`${f}Actions`];d(p||{text:null,close:!1},f)};r.onMounted(()=>{a("dialog-opened"),n.value=!0}),r.onUnmounted(()=>{a("dialog-closed",o.value)});const u=f=>r.isRef(f)?f.value:r.ref(f).value;return(f,p)=>(r.openBlock(),r.createBlock(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[n.value?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":f.dismissAway,"prevent-backdrop-event":!f.overlay,transparent:!f.overlay,"z-index":f.zIndex,"center-content":"",onClose:l},{default:r.withCtx(()=>[f.dialogComponent?(r.openBlock(),r.createElementBlock("div",Mf,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.dialogComponent),r.normalizeProps(r.guardReactiveProps(f.dialogComponentProps)),null,16)),f.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:l})):r.createCommentVNode("",!0)])):(r.openBlock(),r.createBlock(Ks,{key:1,modelValue:n.value,"onUpdate:modelValue":p[7]||(p[7]=m=>n.value=m),"close-button":f.closeButton,"content-class":f.contentClass,"content-scrollable":f.contentScrollable,"min-width":f.minWidth},r.createSlots({"dialog-header":r.withCtx(()=>[r.createElementVNode("div",Of,[r.createElementVNode("p",null,r.toDisplayString(f.title??"Notification"),1),f.subTitle?(r.openBlock(),r.createElementBlock("p",If,r.toDisplayString(f.subTitle),1)):r.createCommentVNode("",!0)])]),default:r.withCtx(()=>[f.contentComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.contentComponent),r.mergeProps({key:0},f.contentComponentProps,{"onDialog:emitData":p[0]||(p[0]=m=>o.value=m),"onDialog:primaryAction":p[1]||(p[1]=m=>c("primary")),"onDialog:secondaryAction":p[2]||(p[2]=m=>c("secondary")),"onDialog:tertiaryAction":p[3]||(p[3]=m=>c("tertiary"))}),null,16)):(r.openBlock(),r.createElementBlock("div",Rf,r.toDisplayString(f.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:r.withCtx(()=>[f.tertiaryActions?(r.openBlock(),r.createBlock(G,{key:0,disabled:u(f.tertiaryActions.disabled),label:f.tertiaryActions.text,loading:u(f.tertiaryActions.isLoading),variant:f.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:p[4]||(p[4]=m=>d(f.tertiaryActions,"tertiary"))},null,8,["disabled","label","loading","variant"])):r.createCommentVNode("",!0),r.createVNode(Ct,{class:"sm:hidden xs:hidden"}),f.secondaryActions?(r.openBlock(),r.createBlock(G,{key:1,disabled:u(f.secondaryActions.disabled),label:f.secondaryActions.text,loading:u(f.secondaryActions.isLoading),variant:f.secondaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:p[5]||(p[5]=m=>d(f.secondaryActions,"secondary"))},null,8,["disabled","label","loading","variant"])):r.createCommentVNode("",!0),f.primaryActions?(r.openBlock(),r.createBlock(G,{key:2,disabled:u(f.primaryActions.disabled),label:f.primaryActions.text,loading:u(f.primaryActions.isLoading),variant:f.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:p[6]||(p[6]=m=>d(f.primaryActions,"primary"))},null,8,["disabled","label","loading","variant"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["modelValue","close-button","content-class","content-scrollable","min-width"]))]),_:1},8,["dismiss-away","prevent-backdrop-event","transparent","z-index"])):r.createCommentVNode("",!0)]),_:1}))}});/*!
10
10
  * @kurkle/color v0.3.2
11
11
  * https://github.com/kurkle/color#readme
12
12
  * (c) 2023 Jukka Kurkela
13
13
  * Released under the MIT License
14
- */function Sn(t){return t+.5|0}const Ct=(t,e,n)=>Math.max(Math.min(t,n),e);function Cn(t){return Ct(Sn(t*2.55),0,255)}function wt(t){return Ct(Sn(t*255),0,255)}function ot(t){return Ct(Sn(t/2.55)/100,0,1)}function na(t){return Ct(Sn(t*100),0,100)}const He={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Tr=[..."0123456789ABCDEF"],Tf=t=>Tr[t&15],zf=t=>Tr[(t&240)>>4]+Tr[t&15],po=t=>(t&240)>>4===(t&15),Lf=t=>po(t.r)&&po(t.g)&&po(t.b)&&po(t.a);function Hf(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&He[t[1]]*17,g:255&He[t[2]]*17,b:255&He[t[3]]*17,a:e===5?He[t[4]]*17:255}:(e===7||e===9)&&(n={r:He[t[1]]<<4|He[t[2]],g:He[t[3]]<<4|He[t[4]],b:He[t[5]]<<4|He[t[6]],a:e===9?He[t[7]]<<4|He[t[8]]:255})),n}const Uf=(t,e)=>t<255?e(t):"";function jf(t){var e=Lf(t)?Tf:zf;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Uf(t.a,e):void 0}const Qf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function oa(t,e,n){const o=e*Math.min(n,1-n),i=(s,a=(s+t/30)%12)=>n-o*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function Wf(t,e,n){const o=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[o(5),o(3),o(1)]}function Yf(t,e,n){const o=oa(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function Xf(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function zr(t){const n=t.r/255,o=t.g/255,i=t.b/255,s=Math.max(n,o,i),a=Math.min(n,o,i),l=(s+a)/2;let d,c,u;return s!==a&&(u=s-a,c=l>.5?u/(2-s-a):u/(s+a),d=Xf(n,o,i,u,s),d=d*60+.5),[d|0,c||0,l]}function Lr(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(wt)}function Hr(t,e,n){return Lr(oa,t,e,n)}function Gf(t,e,n){return Lr(Yf,t,e,n)}function qf(t,e,n){return Lr(Wf,t,e,n)}function ra(t){return(t%360+360)%360}function Jf(t){const e=Qf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?Cn(+e[5]):wt(+e[5]));const i=ra(+e[2]),s=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?o=Gf(i,s,a):e[1]==="hsv"?o=qf(i,s,a):o=Hr(i,s,a),{r:o[0],g:o[1],b:o[2],a:n}}function Kf(t,e){var n=zr(t);n[0]=ra(n[0]+e),n=Hr(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Zf(t){if(!t)return;const e=zr(t),n=e[0],o=na(e[1]),i=na(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${ot(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const ia={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},sa={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $f(){const t={},e=Object.keys(sa),n=Object.keys(ia);let o,i,s,a,l;for(o=0;o<e.length;o++){for(a=l=e[o],i=0;i<n.length;i++)s=n[i],l=l.replace(s,ia[s]);s=parseInt(sa[a],16),t[l]=[s>>16&255,s>>8&255,s&255]}return t}let mo;function _f(t){mo||(mo=$f(),mo.transparent=[0,0,0,0]);const e=mo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const ep=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function tp(t){const e=ep.exec(t);let n=255,o,i,s;if(e){if(e[7]!==o){const a=+e[7];n=e[8]?Cn(a):Ct(a*255,0,255)}return o=+e[1],i=+e[3],s=+e[5],o=255&(e[2]?Cn(o):Ct(o,0,255)),i=255&(e[4]?Cn(i):Ct(i,0,255)),s=255&(e[6]?Cn(s):Ct(s,0,255)),{r:o,g:i,b:s,a:n}}}function np(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Ur=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,nn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function op(t,e,n){const o=nn(ot(t.r)),i=nn(ot(t.g)),s=nn(ot(t.b));return{r:wt(Ur(o+n*(nn(ot(e.r))-o))),g:wt(Ur(i+n*(nn(ot(e.g))-i))),b:wt(Ur(s+n*(nn(ot(e.b))-s))),a:t.a+n*(e.a-t.a)}}function ho(t,e,n){if(t){let o=zr(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Hr(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function aa(t,e){return t&&Object.assign(e||{},t)}function la(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=wt(t[3]))):(e=aa(t,{r:0,g:0,b:0,a:1}),e.a=wt(e.a)),e}function rp(t){return t.charAt(0)==="r"?tp(t):Jf(t)}class wn{constructor(e){if(e instanceof wn)return e;const n=typeof e;let o;n==="object"?o=la(e):n==="string"&&(o=Hf(e)||_f(e)||rp(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=aa(this._rgb);return e&&(e.a=ot(e.a)),e}set rgb(e){this._rgb=la(e)}rgbString(){return this._valid?np(this._rgb):void 0}hexString(){return this._valid?jf(this._rgb):void 0}hslString(){return this._valid?Zf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let s;const a=n===s?.5:n,l=2*a-1,d=o.a-i.a,c=((l*d===-1?l:(l+d)/(1+l*d))+1)/2;s=1-c,o.r=255&c*o.r+s*i.r+.5,o.g=255&c*o.g+s*i.g+.5,o.b=255&c*o.b+s*i.b+.5,o.a=a*o.a+(1-a)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=op(this._rgb,e._rgb,n)),this}clone(){return new wn(this.rgb)}alpha(e){return this._rgb.a=wt(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Sn(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ho(this._rgb,2,e),this}darken(e){return ho(this._rgb,2,-e),this}saturate(e){return ho(this._rgb,1,e),this}desaturate(e){return ho(this._rgb,1,-e),this}rotate(e){return Kf(this._rgb,e),this}}/*!
14
+ */function Sn(t){return t+.5|0}const wt=(t,e,n)=>Math.max(Math.min(t,n),e);function Cn(t){return wt(Sn(t*2.55),0,255)}function At(t){return wt(Sn(t*255),0,255)}function ot(t){return wt(Sn(t/2.55)/100,0,1)}function na(t){return wt(Sn(t*100),0,100)}const He={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Tr=[..."0123456789ABCDEF"],Tf=t=>Tr[t&15],zf=t=>Tr[(t&240)>>4]+Tr[t&15],po=t=>(t&240)>>4===(t&15),Lf=t=>po(t.r)&&po(t.g)&&po(t.b)&&po(t.a);function Hf(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&He[t[1]]*17,g:255&He[t[2]]*17,b:255&He[t[3]]*17,a:e===5?He[t[4]]*17:255}:(e===7||e===9)&&(n={r:He[t[1]]<<4|He[t[2]],g:He[t[3]]<<4|He[t[4]],b:He[t[5]]<<4|He[t[6]],a:e===9?He[t[7]]<<4|He[t[8]]:255})),n}const Uf=(t,e)=>t<255?e(t):"";function jf(t){var e=Lf(t)?Tf:zf;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Uf(t.a,e):void 0}const Qf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function oa(t,e,n){const o=e*Math.min(n,1-n),i=(s,a=(s+t/30)%12)=>n-o*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function Wf(t,e,n){const o=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[o(5),o(3),o(1)]}function Yf(t,e,n){const o=oa(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function Xf(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function zr(t){const n=t.r/255,o=t.g/255,i=t.b/255,s=Math.max(n,o,i),a=Math.min(n,o,i),l=(s+a)/2;let d,c,u;return s!==a&&(u=s-a,c=l>.5?u/(2-s-a):u/(s+a),d=Xf(n,o,i,u,s),d=d*60+.5),[d|0,c||0,l]}function Lr(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(At)}function Hr(t,e,n){return Lr(oa,t,e,n)}function Gf(t,e,n){return Lr(Yf,t,e,n)}function qf(t,e,n){return Lr(Wf,t,e,n)}function ra(t){return(t%360+360)%360}function Jf(t){const e=Qf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?Cn(+e[5]):At(+e[5]));const i=ra(+e[2]),s=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?o=Gf(i,s,a):e[1]==="hsv"?o=qf(i,s,a):o=Hr(i,s,a),{r:o[0],g:o[1],b:o[2],a:n}}function Kf(t,e){var n=zr(t);n[0]=ra(n[0]+e),n=Hr(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Zf(t){if(!t)return;const e=zr(t),n=e[0],o=na(e[1]),i=na(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${ot(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const ia={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},sa={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $f(){const t={},e=Object.keys(sa),n=Object.keys(ia);let o,i,s,a,l;for(o=0;o<e.length;o++){for(a=l=e[o],i=0;i<n.length;i++)s=n[i],l=l.replace(s,ia[s]);s=parseInt(sa[a],16),t[l]=[s>>16&255,s>>8&255,s&255]}return t}let mo;function _f(t){mo||(mo=$f(),mo.transparent=[0,0,0,0]);const e=mo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const ep=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function tp(t){const e=ep.exec(t);let n=255,o,i,s;if(e){if(e[7]!==o){const a=+e[7];n=e[8]?Cn(a):wt(a*255,0,255)}return o=+e[1],i=+e[3],s=+e[5],o=255&(e[2]?Cn(o):wt(o,0,255)),i=255&(e[4]?Cn(i):wt(i,0,255)),s=255&(e[6]?Cn(s):wt(s,0,255)),{r:o,g:i,b:s,a:n}}}function np(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Ur=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,nn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function op(t,e,n){const o=nn(ot(t.r)),i=nn(ot(t.g)),s=nn(ot(t.b));return{r:At(Ur(o+n*(nn(ot(e.r))-o))),g:At(Ur(i+n*(nn(ot(e.g))-i))),b:At(Ur(s+n*(nn(ot(e.b))-s))),a:t.a+n*(e.a-t.a)}}function ho(t,e,n){if(t){let o=zr(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Hr(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function aa(t,e){return t&&Object.assign(e||{},t)}function la(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=At(t[3]))):(e=aa(t,{r:0,g:0,b:0,a:1}),e.a=At(e.a)),e}function rp(t){return t.charAt(0)==="r"?tp(t):Jf(t)}class wn{constructor(e){if(e instanceof wn)return e;const n=typeof e;let o;n==="object"?o=la(e):n==="string"&&(o=Hf(e)||_f(e)||rp(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=aa(this._rgb);return e&&(e.a=ot(e.a)),e}set rgb(e){this._rgb=la(e)}rgbString(){return this._valid?np(this._rgb):void 0}hexString(){return this._valid?jf(this._rgb):void 0}hslString(){return this._valid?Zf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let s;const a=n===s?.5:n,l=2*a-1,d=o.a-i.a,c=((l*d===-1?l:(l+d)/(1+l*d))+1)/2;s=1-c,o.r=255&c*o.r+s*i.r+.5,o.g=255&c*o.g+s*i.g+.5,o.b=255&c*o.b+s*i.b+.5,o.a=a*o.a+(1-a)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=op(this._rgb,e._rgb,n)),this}clone(){return new wn(this.rgb)}alpha(e){return this._rgb.a=At(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Sn(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ho(this._rgb,2,e),this}darken(e){return ho(this._rgb,2,-e),this}saturate(e){return ho(this._rgb,1,e),this}desaturate(e){return ho(this._rgb,1,-e),this}rotate(e){return Kf(this._rgb,e),this}}/*!
15
15
  * Chart.js v4.4.2
16
16
  * https://www.chartjs.org
17
17
  * (c) 2024 Chart.js Contributors
18
18
  * Released under the MIT License
19
- */function rt(){}const ip=(()=>{let t=0;return()=>t++})();function ee(t){return t===null||typeof t>"u"}function se(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function $(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function fe(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ne(t,e){return fe(t)?t:e}function q(t,e){return typeof t>"u"?e:t}const sp=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,da=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ie(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function oe(t,e,n,o){let i,s,a;if(se(t))if(s=t.length,o)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if($(t))for(a=Object.keys(t),s=a.length,i=0;i<s;i++)e.call(n,t[a[i]],a[i])}function go(t,e){let n,o,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function bo(t){if(se(t))return t.map(bo);if($(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=bo(t[n[i]]);return e}return t}function ca(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function ap(t,e,n,o){if(!ca(t))return;const i=e[t],s=n[t];$(i)&&$(s)?An(i,s,o):e[t]=bo(s)}function An(t,e,n){const o=se(e)?e:[e],i=o.length;if(!$(t))return t;n=n||{};const s=n.merger||ap;let a;for(let l=0;l<i;++l){if(a=o[l],!$(a))continue;const d=Object.keys(a);for(let c=0,u=d.length;c<u;++c)s(d[c],t,a,n)}return t}function vn(t,e){return An(t,e,{merger:lp})}function lp(t,e,n){if(!ca(t))return;const o=e[t],i=n[t];$(o)&&$(i)?vn(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=bo(i))}const ua={"":t=>t,x:t=>t.x,y:t=>t.y};function dp(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function cp(t){const e=dp(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function At(t,e){return(ua[e]||(ua[e]=cp(e)))(t)}function jr(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Bn=t=>typeof t<"u",vt=t=>typeof t=="function",fa=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function up(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ae=Math.PI,le=2*ae,fp=le+ae,yo=Number.POSITIVE_INFINITY,pp=ae/180,me=ae/2,zt=ae/4,pa=ae*2/3,Bt=Math.log10,Je=Math.sign;function Dn(t,e,n){return Math.abs(t-e)<n}function ma(t){const e=Math.round(t);t=Dn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Bt(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function mp(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function on(t){return!isNaN(parseFloat(t))&&isFinite(t)}function hp(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function ha(t,e,n){let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Qe(t){return t*(ae/180)}function Qr(t){return t*(180/ae)}function ga(t){if(!fe(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function ba(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*ae&&(s+=le),{angle:s,distance:i}}function Wr(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function gp(t,e){return(t-e+fp)%le-ae}function Me(t){return(t%le+le)%le}function Vn(t,e,n,o){const i=Me(t),s=Me(e),a=Me(n),l=Me(s-i),d=Me(a-i),c=Me(i-s),u=Me(i-a);return i===s||i===a||o&&s===a||l>d&&c<u}function ke(t,e,n){return Math.max(e,Math.min(n,t))}function bp(t){return ke(t,-32768,32767)}function it(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Yr(t,e,n){n=n||(a=>t[a]<e);let o=t.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const st=(t,e,n,o)=>Yr(t,n,o?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),yp=(t,e,n)=>Yr(t,n,o=>t[o][e]>=n);function kp(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const ya=["push","pop","shift","splice","unshift"];function xp(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ya.forEach(n=>{const o="_onData"+jr(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return t._chartjs.listeners.forEach(l=>{typeof l[o]=="function"&&l[o](...s)}),a}})})}function ka(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(ya.forEach(s=>{delete t[s]}),delete t._chartjs)}function xa(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Sa=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Ca(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,Sa.call(window,()=>{o=!1,t.apply(e,n)}))}}function Sp(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Xr=t=>t==="start"?"left":t==="end"?"right":"center",we=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Cp=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function wa(t,e,n){const o=e.length;let i=0,s=o;if(t._sorted){const{iScale:a,_parsed:l}=t,d=a.axis,{min:c,max:u,minDefined:f,maxDefined:p}=a.getUserBounds();f&&(i=ke(Math.min(st(l,d,c).lo,n?o:st(e,d,a.getPixelForValue(c)).lo),0,o-1)),p?s=ke(Math.max(st(l,a.axis,u,!0).hi+1,n?0:st(e,d,a.getPixelForValue(u),!0).hi+1),i,o)-i:s=o-i}return{start:i,count:s}}function Aa(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const s=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const ko=t=>t===0||t===1,va=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*le/n)),Ba=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*le/n)+1,Pn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*me)+1,easeOutSine:t=>Math.sin(t*me),easeInOutSine:t=>-.5*(Math.cos(ae*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ko(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ko(t)?t:va(t,.075,.3),easeOutElastic:t=>ko(t)?t:Ba(t,.075,.3),easeInOutElastic(t){return ko(t)?t:t<.5?.5*va(t*2,.1125,.45):.5+.5*Ba(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Pn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Pn.easeInBounce(t*2)*.5:Pn.easeOutBounce(t*2-1)*.5+.5};function Gr(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Da(t){return Gr(t)?t:new wn(t)}function qr(t){return Gr(t)?t:new wn(t).saturate(.5).darken(.1).hexString()}const wp=["x","y","borderWidth","radius","tension"],Ap=["color","borderColor","backgroundColor"];function vp(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Ap},numbers:{type:"number",properties:wp}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Bp(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Va=new Map;function Dp(t,e){e=e||{};const n=t+JSON.stringify(e);let o=Va.get(n);return o||(o=new Intl.NumberFormat(t,e),Va.set(n,o)),o}function En(t,e,n){return Dp(e,n).format(t)}const Pa={values(t){return se(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,s=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=Vp(t,n)}const a=Bt(Math.abs(s)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),d={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(d,this.options.ticks.format),En(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(Bt(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?Pa.numeric.call(this,t,e,n):""}};function Vp(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var xo={formatters:Pa};function Pp(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:xo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Lt=Object.create(null),Jr=Object.create(null);function Fn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];t=t[s]||(t[s]=Object.create(null))}return t}function Kr(t,e,n){return typeof e=="string"?An(Fn(t,e),n):An(Fn(t,""),e)}class Ep{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>qr(i.backgroundColor),this.hoverBorderColor=(o,i)=>qr(i.borderColor),this.hoverColor=(o,i)=>qr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Kr(this,e,n)}get(e){return Fn(this,e)}describe(e,n){return Kr(Jr,e,n)}override(e,n){return Kr(Lt,e,n)}route(e,n,o,i){const s=Fn(this,e),a=Fn(this,o),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[l],c=a[i];return $(d)?Object.assign({},c,d):q(d,c)},set(d){this[l]=d}}})}apply(e){e.forEach(n=>n(this))}}var pe=new Ep({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[vp,Bp,Pp]);function Fp(t){return!t||ee(t.size)||ee(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function So(t,e,n,o,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>o&&(o=s),o}function Np(t,e,n,o){o=o||{};let i=o.data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},s=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let a=0;const l=n.length;let d,c,u,f,p;for(d=0;d<l;d++)if(f=n[d],f!=null&&!se(f))a=So(t,i,s,a,f);else if(se(f))for(c=0,u=f.length;c<u;c++)p=f[c],p!=null&&!se(p)&&(a=So(t,i,s,a,p));t.restore();const m=s.length/2;if(m>n.length){for(d=0;d<m;d++)delete i[s[d]];s.splice(0,m)}return a}function Ht(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function Ea(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Zr(t,e,n,o){Fa(t,e,n,o,null)}function Fa(t,e,n,o,i){let s,a,l,d,c,u,f,p;const m=e.pointStyle,h=e.rotation,g=e.radius;let b=(h||0)*pp;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(b),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),m){default:i?t.ellipse(n,o,i/2,g,0,0,le):t.arc(n,o,g,0,le),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(b)*u,o-Math.cos(b)*g),b+=pa,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*g),b+=pa,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,a=Math.cos(b+zt)*d,f=Math.cos(b+zt)*(i?i/2-c:d),l=Math.sin(b+zt)*d,p=Math.sin(b+zt)*(i?i/2-c:d),t.arc(n-f,o-l,c,b-ae,b-me),t.arc(n+p,o-a,c,b-me,b),t.arc(n+f,o+l,c,b,b+me),t.arc(n-p,o+a,c,b+me,b+ae),t.closePath();break;case"rect":if(!h){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}b+=zt;case"rectRot":f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+p,o-a),t.lineTo(n+f,o+l),t.lineTo(n-p,o+a),t.closePath();break;case"crossRot":b+=zt;case"cross":f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+f,o+l),t.moveTo(n+p,o-a),t.lineTo(n-p,o+a);break;case"star":f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+f,o+l),t.moveTo(n+p,o-a),t.lineTo(n-p,o+a),b+=zt,f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+f,o+l),t.moveTo(n+p,o-a),t.lineTo(n-p,o+a);break;case"line":a=i?i/2:Math.cos(b)*g,l=Math.sin(b)*g,t.moveTo(n-a,o-l),t.lineTo(n+a,o+l);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(b)*(i?i/2:g),o+Math.sin(b)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function at(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Co(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function wo(t){t.restore()}function Mp(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Op(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function Ip(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ee(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Rp(t,e,n,o,i){if(i.strikethrough||i.underline){const s=t.measureText(o),a=e-s.actualBoundingBoxLeft,l=e+s.actualBoundingBoxRight,d=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,u),t.lineTo(l,u),t.stroke()}}function Tp(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Ut(t,e,n,o,i,s={}){const a=se(e)?e:[e],l=s.strokeWidth>0&&s.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,Ip(t,s),d=0;d<a.length;++d)c=a[d],s.backdrop&&Tp(t,s.backdrop),l&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),ee(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,o,s.maxWidth)),t.fillText(c,n,o,s.maxWidth),Rp(t,n,o,c,s),o+=Number(i.lineHeight);t.restore()}function Nn(t,e){const{x:n,y:o,w:i,h:s,radius:a}=e;t.arc(n+a.topLeft,o+a.topLeft,a.topLeft,1.5*ae,ae,!0),t.lineTo(n,o+s-a.bottomLeft),t.arc(n+a.bottomLeft,o+s-a.bottomLeft,a.bottomLeft,ae,me,!0),t.lineTo(n+i-a.bottomRight,o+s),t.arc(n+i-a.bottomRight,o+s-a.bottomRight,a.bottomRight,me,0,!0),t.lineTo(n+i,o+a.topRight),t.arc(n+i-a.topRight,o+a.topRight,a.topRight,0,-me,!0),t.lineTo(n+a.topLeft,o)}const zp=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Lp=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Hp(t,e){const n=(""+t).match(zp);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const Up=t=>+t||0;function $r(t,e){const n={},o=$(e),i=o?Object.keys(e):e,s=$(t)?o?a=>q(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of i)n[a]=Up(s(a));return n}function Na(t){return $r(t,{top:"y",right:"x",bottom:"y",left:"x"})}function jt(t){return $r(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ae(t){const e=Na(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function be(t,e){t=t||{},e=e||pe.font;let n=q(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=q(t.style,e.style);o&&!(""+o).match(Lp)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:q(t.family,e.family),lineHeight:Hp(q(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:q(t.weight,e.weight),string:""};return i.string=Fp(i),i}function Mn(t,e,n,o){let i=!0,s,a,l;for(s=0,a=t.length;s<a;++s)if(l=t[s],l!==void 0&&(e!==void 0&&typeof l=="function"&&(l=l(e),i=!1),n!==void 0&&se(l)&&(l=l[n%l.length],i=!1),l!==void 0))return o&&!i&&(o.cacheable=!1),l}function jp(t,e,n){const{min:o,max:i}=t,s=da(e,(i-o)/2),a=(l,d)=>n&&l===0?0:l+d;return{min:a(o,-Math.abs(s)),max:a(i,s)}}function Dt(t,e){return Object.assign(Object.create(t),e)}function _r(t,e=[""],n,o,i=()=>t[0]){const s=n||t;typeof o>"u"&&(o=Ta("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:o,_getTarget:i,override:l=>_r([l,...t],e,s,o)};return new Proxy(a,{deleteProperty(l,d){return delete l[d],delete l._keys,delete t[0][d],!0},get(l,d){return Oa(l,d,()=>Kp(d,e,t,l))},getOwnPropertyDescriptor(l,d){return Reflect.getOwnPropertyDescriptor(l._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,d){return za(l).includes(d)},ownKeys(l){return za(l)},set(l,d,c){const u=l._storage||(l._storage=i());return l[d]=u[d]=c,delete l._keys,!0}})}function rn(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ma(t,o),setContext:s=>rn(t,s,n,o),override:s=>rn(t.override(s),e,n,o)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete t[a],!0},get(s,a,l){return Oa(s,a,()=>Wp(s,a,l))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(s,a,l){return t[a]=l,delete s[a],!0}})}function Ma(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:vt(n)?n:()=>n,isIndexable:vt(o)?o:()=>o}}const Qp=(t,e)=>t?t+jr(e):e,ei=(t,e)=>$(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Oa(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function Wp(t,e,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:a}=t;let l=o[e];return vt(l)&&a.isScriptable(e)&&(l=Yp(e,l,t,n)),se(l)&&l.length&&(l=Xp(e,l,t,a.isIndexable)),ei(e,l)&&(l=rn(l,i,s&&s[e],a)),l}function Yp(t,e,n,o){const{_proxy:i,_context:s,_subProxy:a,_stack:l}=n;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let d=e(s,a||o);return l.delete(t),ei(t,d)&&(d=ti(i._scopes,i,t,d)),d}function Xp(t,e,n,o){const{_proxy:i,_context:s,_subProxy:a,_descriptors:l}=n;if(typeof s.index<"u"&&o(t))return e[s.index%e.length];if($(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=ti(c,i,t,u);e.push(rn(f,s,a&&a[t],l))}}return e}function Ia(t,e,n){return vt(t)?t(e,n):t}const Gp=(t,e)=>t===!0?e:typeof t=="string"?At(e,t):void 0;function qp(t,e,n,o,i){for(const s of e){const a=Gp(n,s);if(a){t.add(a);const l=Ia(a._fallback,n,i);if(typeof l<"u"&&l!==n&&l!==o)return l}else if(a===!1&&typeof o<"u"&&n!==o)return null}return!1}function ti(t,e,n,o){const i=e._rootScopes,s=Ia(e._fallback,n,o),a=[...t,...i],l=new Set;l.add(o);let d=Ra(l,a,n,s||n,o);return d===null||typeof s<"u"&&s!==n&&(d=Ra(l,a,s,d,o),d===null)?!1:_r(Array.from(l),[""],i,s,()=>Jp(e,n,o))}function Ra(t,e,n,o,i){for(;n;)n=qp(t,e,n,o,i);return n}function Jp(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return se(i)&&$(n)?n:i||{}}function Kp(t,e,n,o){let i;for(const s of e)if(i=Ta(Qp(s,t),n),typeof i<"u")return ei(t,i)?ti(n,o,t,i):i}function Ta(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function za(t){let e=t._keys;return e||(e=t._keys=Zp(t._scopes)),e}function Zp(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function La(t,e,n,o){const{iScale:i}=t,{key:s="r"}=this._parsing,a=new Array(o);let l,d,c,u;for(l=0,d=o;l<d;++l)c=l+n,u=e[c],a[l]={r:i.parse(At(u,s),c)};return a}const $p=Number.EPSILON||1e-14,sn=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ha=t=>t==="x"?"y":"x";function _p(t,e,n,o){const i=t.skip?e:t,s=e,a=n.skip?e:n,l=Wr(s,i),d=Wr(a,s);let c=l/(l+d),u=d/(l+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,p=o*u;return{previous:{x:s.x-f*(a.x-i.x),y:s.y-f*(a.y-i.y)},next:{x:s.x+p*(a.x-i.x),y:s.y+p*(a.y-i.y)}}}function em(t,e,n){const o=t.length;let i,s,a,l,d,c=sn(t,0);for(let u=0;u<o-1;++u)if(d=c,c=sn(t,u+1),!(!d||!c)){if(Dn(e[u],0,$p)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],s=n[u+1]/e[u],l=Math.pow(i,2)+Math.pow(s,2),!(l<=9)&&(a=3/Math.sqrt(l),n[u]=i*a*e[u],n[u+1]=s*a*e[u])}}function tm(t,e,n="x"){const o=Ha(n),i=t.length;let s,a,l,d=sn(t,0);for(let c=0;c<i;++c){if(a=l,l=d,d=sn(t,c+1),!l)continue;const u=l[n],f=l[o];a&&(s=(u-a[n])/3,l[`cp1${n}`]=u-s,l[`cp1${o}`]=f-s*e[c]),d&&(s=(d[n]-u)/3,l[`cp2${n}`]=u+s,l[`cp2${o}`]=f+s*e[c])}}function nm(t,e="x"){const n=Ha(e),o=t.length,i=Array(o).fill(0),s=Array(o);let a,l,d,c=sn(t,0);for(a=0;a<o;++a)if(l=d,d=c,c=sn(t,a+1),!!d){if(c){const u=c[e]-d[e];i[a]=u!==0?(c[n]-d[n])/u:0}s[a]=l?c?Je(i[a-1])!==Je(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}em(t,i,s),tm(t,s,e)}function Ao(t,e,n){return Math.max(Math.min(t,n),e)}function om(t,e){let n,o,i,s,a,l=at(t[0],e);for(n=0,o=t.length;n<o;++n)a=s,s=l,l=n<o-1&&at(t[n+1],e),s&&(i=t[n],a&&(i.cp1x=Ao(i.cp1x,e.left,e.right),i.cp1y=Ao(i.cp1y,e.top,e.bottom)),l&&(i.cp2x=Ao(i.cp2x,e.left,e.right),i.cp2y=Ao(i.cp2y,e.top,e.bottom)))}function rm(t,e,n,o,i){let s,a,l,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")nm(t,i);else{let c=o?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)l=t[s],d=_p(c,l,t[Math.min(s+1,a-(o?0:1))%a],e.tension),l.cp1x=d.previous.x,l.cp1y=d.previous.y,l.cp2x=d.next.x,l.cp2y=d.next.y,c=l}e.capBezierPoints&&om(t,n)}function ni(){return typeof window<"u"&&typeof document<"u"}function oi(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function vo(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const Bo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function im(t,e){return Bo(t).getPropertyValue(e)}const sm=["top","right","bottom","left"];function Qt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=sm[i];o[s]=parseFloat(t[e+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const am=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function lm(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=o;let a=!1,l,d;if(am(i,s,t.target))l=i,d=s;else{const c=e.getBoundingClientRect();l=o.clientX-c.left,d=o.clientY-c.top,a=!0}return{x:l,y:d,box:a}}function Wt(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=Bo(n),s=i.boxSizing==="border-box",a=Qt(i,"padding"),l=Qt(i,"border","width"),{x:d,y:c,box:u}=lm(t,n),f=a.left+(u&&l.left),p=a.top+(u&&l.top);let{width:m,height:h}=e;return s&&(m-=a.width+l.width,h-=a.height+l.height),{x:Math.round((d-f)/m*n.width/o),y:Math.round((c-p)/h*n.height/o)}}function dm(t,e,n){let o,i;if(e===void 0||n===void 0){const s=oi(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const a=s.getBoundingClientRect(),l=Bo(s),d=Qt(l,"border","width"),c=Qt(l,"padding");e=a.width-c.width-d.width,n=a.height-c.height-d.height,o=vo(l.maxWidth,s,"clientWidth"),i=vo(l.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:o||yo,maxHeight:i||yo}}const Do=t=>Math.round(t*10)/10;function cm(t,e,n,o){const i=Bo(t),s=Qt(i,"margin"),a=vo(i.maxWidth,t,"clientWidth")||yo,l=vo(i.maxHeight,t,"clientHeight")||yo,d=dm(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const p=Qt(i,"border","width"),m=Qt(i,"padding");c-=m.width+p.width,u-=m.height+p.height}return c=Math.max(0,c-s.width),u=Math.max(0,o?c/o:u-s.height),c=Do(Math.min(c,a,d.maxWidth)),u=Do(Math.min(u,l,d.maxHeight)),c&&!u&&(u=Do(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=Do(Math.floor(u*o))),{width:c,height:u}}function Ua(t,e,n){const o=e||1,i=Math.floor(t.height*o),s=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||a.height!==i||a.width!==s?(t.currentDevicePixelRatio=o,a.height=i,a.width=s,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const um=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ni()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function ja(t,e){const n=im(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Yt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function fm(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function pm(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Yt(t,i,n),l=Yt(i,s,n),d=Yt(s,e,n),c=Yt(a,l,n),u=Yt(l,d,n);return Yt(c,u,n)}const mm=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},hm=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function an(t,e,n){return t?mm(e,n):hm()}function Qa(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Wa(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ya(t){return t==="angle"?{between:Vn,compare:gp,normalize:Me}:{between:it,compare:(e,n)=>e-n,normalize:e=>e}}function Xa({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function gm(t,e,n){const{property:o,start:i,end:s}=n,{between:a,normalize:l}=Ya(o),d=e.length;let{start:c,end:u,loop:f}=t,p,m;if(f){for(c+=d,u+=d,p=0,m=d;p<m&&a(l(e[c%d][o]),i,s);++p)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function Ga(t,e,n){if(!n)return[t];const{property:o,start:i,end:s}=n,a=e.length,{compare:l,between:d,normalize:c}=Ya(o),{start:u,end:f,loop:p,style:m}=gm(t,e,n),h=[];let g=!1,b=null,y,S,v;const w=()=>d(i,v,y)&&l(i,v)!==0,x=()=>l(s,y)===0||d(s,v,y),F=()=>g||w(),E=()=>!g||x();for(let M=u,I=u;M<=f;++M)S=e[M%a],!S.skip&&(y=c(S[o]),y!==v&&(g=d(y,i,s),b===null&&F()&&(b=l(y,i)===0?M:I),b!==null&&E()&&(h.push(Xa({start:b,end:M,loop:p,count:a,style:m})),b=null),I=M,v=y));return b!==null&&h.push(Xa({start:b,end:f,loop:p,count:a,style:m})),h}function qa(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const s=Ga(o[i],t.points,e);s.length&&n.push(...s)}return n}function bm(t,e,n,o){let i=0,s=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function ym(t,e,n,o){const i=t.length,s=[];let a=e,l=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?l.skip||(o=!1,s.push({start:e%i,end:(d-1)%i,loop:o}),e=a=c.stop?d:null):(a=d,l.skip&&(e=d)),l=c}return a!==null&&s.push({start:e%i,end:a%i,loop:o}),s}function km(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:a,end:l}=bm(n,i,s,o);if(o===!0)return Ja(t,[{start:a,end:l,loop:s}],n,e);const d=l<a?l+i:l,c=!!t._fullLoop&&a===0&&l===i-1;return Ja(t,ym(n,a,d,c),n,e)}function Ja(t,e,n,o){return!o||!o.setContext||!n?e:xm(t,e,n,o)}function xm(t,e,n,o){const i=t._chart.getContext(),s=Ka(t.options),{_datasetIndex:a,options:{spanGaps:l}}=t,d=n.length,c=[];let u=s,f=e[0].start,p=f;function m(h,g,b,y){const S=l?-1:1;if(h!==g){for(h+=d;n[h%d].skip;)h-=S;for(;n[g%d].skip;)g+=S;h%d!==g%d&&(c.push({start:h%d,end:g%d,loop:b,style:y}),u=y,f=g%d)}}for(const h of e){f=l?f:h.start;let g=n[f%d],b;for(p=f+1;p<=h.end;p++){const y=n[p%d];b=Ka(o.setContext(Dt(i,{type:"segment",p0:g,p1:y,p0DataIndex:(p-1)%d,p1DataIndex:p%d,datasetIndex:a}))),Sm(b,u)&&m(f,p-1,h.loop,u),g=y,u=b}f<p-1&&m(f,p-1,h.loop,u)}return c}function Ka(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Sm(t,e){if(!e)return!1;const n=[],o=function(i,s){return Gr(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
19
+ */function rt(){}const ip=(()=>{let t=0;return()=>t++})();function ee(t){return t===null||typeof t>"u"}function se(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function $(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function fe(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ne(t,e){return fe(t)?t:e}function q(t,e){return typeof t>"u"?e:t}const sp=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,da=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ie(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function oe(t,e,n,o){let i,s,a;if(se(t))if(s=t.length,o)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if($(t))for(a=Object.keys(t),s=a.length,i=0;i<s;i++)e.call(n,t[a[i]],a[i])}function go(t,e){let n,o,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function bo(t){if(se(t))return t.map(bo);if($(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=bo(t[n[i]]);return e}return t}function ca(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function ap(t,e,n,o){if(!ca(t))return;const i=e[t],s=n[t];$(i)&&$(s)?An(i,s,o):e[t]=bo(s)}function An(t,e,n){const o=se(e)?e:[e],i=o.length;if(!$(t))return t;n=n||{};const s=n.merger||ap;let a;for(let l=0;l<i;++l){if(a=o[l],!$(a))continue;const d=Object.keys(a);for(let c=0,u=d.length;c<u;++c)s(d[c],t,a,n)}return t}function vn(t,e){return An(t,e,{merger:lp})}function lp(t,e,n){if(!ca(t))return;const o=e[t],i=n[t];$(o)&&$(i)?vn(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=bo(i))}const ua={"":t=>t,x:t=>t.x,y:t=>t.y};function dp(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function cp(t){const e=dp(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function vt(t,e){return(ua[e]||(ua[e]=cp(e)))(t)}function jr(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Bn=t=>typeof t<"u",Bt=t=>typeof t=="function",fa=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function up(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ae=Math.PI,le=2*ae,fp=le+ae,yo=Number.POSITIVE_INFINITY,pp=ae/180,me=ae/2,zt=ae/4,pa=ae*2/3,Dt=Math.log10,Je=Math.sign;function Dn(t,e,n){return Math.abs(t-e)<n}function ma(t){const e=Math.round(t);t=Dn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Dt(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function mp(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function on(t){return!isNaN(parseFloat(t))&&isFinite(t)}function hp(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function ha(t,e,n){let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Qe(t){return t*(ae/180)}function Qr(t){return t*(180/ae)}function ga(t){if(!fe(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function ba(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*ae&&(s+=le),{angle:s,distance:i}}function Wr(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function gp(t,e){return(t-e+fp)%le-ae}function Me(t){return(t%le+le)%le}function Vn(t,e,n,o){const i=Me(t),s=Me(e),a=Me(n),l=Me(s-i),d=Me(a-i),c=Me(i-s),u=Me(i-a);return i===s||i===a||o&&s===a||l>d&&c<u}function ke(t,e,n){return Math.max(e,Math.min(n,t))}function bp(t){return ke(t,-32768,32767)}function it(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Yr(t,e,n){n=n||(a=>t[a]<e);let o=t.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const st=(t,e,n,o)=>Yr(t,n,o?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),yp=(t,e,n)=>Yr(t,n,o=>t[o][e]>=n);function kp(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const ya=["push","pop","shift","splice","unshift"];function xp(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ya.forEach(n=>{const o="_onData"+jr(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return t._chartjs.listeners.forEach(l=>{typeof l[o]=="function"&&l[o](...s)}),a}})})}function ka(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(ya.forEach(s=>{delete t[s]}),delete t._chartjs)}function xa(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Sa=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Ca(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,Sa.call(window,()=>{o=!1,t.apply(e,n)}))}}function Sp(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Xr=t=>t==="start"?"left":t==="end"?"right":"center",we=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Cp=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function wa(t,e,n){const o=e.length;let i=0,s=o;if(t._sorted){const{iScale:a,_parsed:l}=t,d=a.axis,{min:c,max:u,minDefined:f,maxDefined:p}=a.getUserBounds();f&&(i=ke(Math.min(st(l,d,c).lo,n?o:st(e,d,a.getPixelForValue(c)).lo),0,o-1)),p?s=ke(Math.max(st(l,a.axis,u,!0).hi+1,n?0:st(e,d,a.getPixelForValue(u),!0).hi+1),i,o)-i:s=o-i}return{start:i,count:s}}function Aa(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const s=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const ko=t=>t===0||t===1,va=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*le/n)),Ba=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*le/n)+1,Pn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*me)+1,easeOutSine:t=>Math.sin(t*me),easeInOutSine:t=>-.5*(Math.cos(ae*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ko(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ko(t)?t:va(t,.075,.3),easeOutElastic:t=>ko(t)?t:Ba(t,.075,.3),easeInOutElastic(t){return ko(t)?t:t<.5?.5*va(t*2,.1125,.45):.5+.5*Ba(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Pn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Pn.easeInBounce(t*2)*.5:Pn.easeOutBounce(t*2-1)*.5+.5};function Gr(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Da(t){return Gr(t)?t:new wn(t)}function qr(t){return Gr(t)?t:new wn(t).saturate(.5).darken(.1).hexString()}const wp=["x","y","borderWidth","radius","tension"],Ap=["color","borderColor","backgroundColor"];function vp(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Ap},numbers:{type:"number",properties:wp}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Bp(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Va=new Map;function Dp(t,e){e=e||{};const n=t+JSON.stringify(e);let o=Va.get(n);return o||(o=new Intl.NumberFormat(t,e),Va.set(n,o)),o}function En(t,e,n){return Dp(e,n).format(t)}const Pa={values(t){return se(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,s=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=Vp(t,n)}const a=Dt(Math.abs(s)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),d={notation:i,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(d,this.options.ticks.format),En(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(Dt(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?Pa.numeric.call(this,t,e,n):""}};function Vp(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var xo={formatters:Pa};function Pp(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:xo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Lt=Object.create(null),Jr=Object.create(null);function Fn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];t=t[s]||(t[s]=Object.create(null))}return t}function Kr(t,e,n){return typeof e=="string"?An(Fn(t,e),n):An(Fn(t,""),e)}class Ep{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>qr(i.backgroundColor),this.hoverBorderColor=(o,i)=>qr(i.borderColor),this.hoverColor=(o,i)=>qr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Kr(this,e,n)}get(e){return Fn(this,e)}describe(e,n){return Kr(Jr,e,n)}override(e,n){return Kr(Lt,e,n)}route(e,n,o,i){const s=Fn(this,e),a=Fn(this,o),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[l],c=a[i];return $(d)?Object.assign({},c,d):q(d,c)},set(d){this[l]=d}}})}apply(e){e.forEach(n=>n(this))}}var pe=new Ep({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[vp,Bp,Pp]);function Fp(t){return!t||ee(t.size)||ee(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function So(t,e,n,o,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>o&&(o=s),o}function Np(t,e,n,o){o=o||{};let i=o.data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},s=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let a=0;const l=n.length;let d,c,u,f,p;for(d=0;d<l;d++)if(f=n[d],f!=null&&!se(f))a=So(t,i,s,a,f);else if(se(f))for(c=0,u=f.length;c<u;c++)p=f[c],p!=null&&!se(p)&&(a=So(t,i,s,a,p));t.restore();const m=s.length/2;if(m>n.length){for(d=0;d<m;d++)delete i[s[d]];s.splice(0,m)}return a}function Ht(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function Ea(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Zr(t,e,n,o){Fa(t,e,n,o,null)}function Fa(t,e,n,o,i){let s,a,l,d,c,u,f,p;const m=e.pointStyle,h=e.rotation,g=e.radius;let b=(h||0)*pp;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(b),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),m){default:i?t.ellipse(n,o,i/2,g,0,0,le):t.arc(n,o,g,0,le),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(b)*u,o-Math.cos(b)*g),b+=pa,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*g),b+=pa,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,a=Math.cos(b+zt)*d,f=Math.cos(b+zt)*(i?i/2-c:d),l=Math.sin(b+zt)*d,p=Math.sin(b+zt)*(i?i/2-c:d),t.arc(n-f,o-l,c,b-ae,b-me),t.arc(n+p,o-a,c,b-me,b),t.arc(n+f,o+l,c,b,b+me),t.arc(n-p,o+a,c,b+me,b+ae),t.closePath();break;case"rect":if(!h){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}b+=zt;case"rectRot":f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+p,o-a),t.lineTo(n+f,o+l),t.lineTo(n-p,o+a),t.closePath();break;case"crossRot":b+=zt;case"cross":f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+f,o+l),t.moveTo(n+p,o-a),t.lineTo(n-p,o+a);break;case"star":f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+f,o+l),t.moveTo(n+p,o-a),t.lineTo(n-p,o+a),b+=zt,f=Math.cos(b)*(i?i/2:g),a=Math.cos(b)*g,l=Math.sin(b)*g,p=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-l),t.lineTo(n+f,o+l),t.moveTo(n+p,o-a),t.lineTo(n-p,o+a);break;case"line":a=i?i/2:Math.cos(b)*g,l=Math.sin(b)*g,t.moveTo(n-a,o-l),t.lineTo(n+a,o+l);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(b)*(i?i/2:g),o+Math.sin(b)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function at(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Co(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function wo(t){t.restore()}function Mp(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Op(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function Ip(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ee(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Rp(t,e,n,o,i){if(i.strikethrough||i.underline){const s=t.measureText(o),a=e-s.actualBoundingBoxLeft,l=e+s.actualBoundingBoxRight,d=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,u),t.lineTo(l,u),t.stroke()}}function Tp(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Ut(t,e,n,o,i,s={}){const a=se(e)?e:[e],l=s.strokeWidth>0&&s.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,Ip(t,s),d=0;d<a.length;++d)c=a[d],s.backdrop&&Tp(t,s.backdrop),l&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),ee(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,o,s.maxWidth)),t.fillText(c,n,o,s.maxWidth),Rp(t,n,o,c,s),o+=Number(i.lineHeight);t.restore()}function Nn(t,e){const{x:n,y:o,w:i,h:s,radius:a}=e;t.arc(n+a.topLeft,o+a.topLeft,a.topLeft,1.5*ae,ae,!0),t.lineTo(n,o+s-a.bottomLeft),t.arc(n+a.bottomLeft,o+s-a.bottomLeft,a.bottomLeft,ae,me,!0),t.lineTo(n+i-a.bottomRight,o+s),t.arc(n+i-a.bottomRight,o+s-a.bottomRight,a.bottomRight,me,0,!0),t.lineTo(n+i,o+a.topRight),t.arc(n+i-a.topRight,o+a.topRight,a.topRight,0,-me,!0),t.lineTo(n+a.topLeft,o)}const zp=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Lp=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Hp(t,e){const n=(""+t).match(zp);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const Up=t=>+t||0;function $r(t,e){const n={},o=$(e),i=o?Object.keys(e):e,s=$(t)?o?a=>q(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of i)n[a]=Up(s(a));return n}function Na(t){return $r(t,{top:"y",right:"x",bottom:"y",left:"x"})}function jt(t){return $r(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ae(t){const e=Na(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function be(t,e){t=t||{},e=e||pe.font;let n=q(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=q(t.style,e.style);o&&!(""+o).match(Lp)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:q(t.family,e.family),lineHeight:Hp(q(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:q(t.weight,e.weight),string:""};return i.string=Fp(i),i}function Mn(t,e,n,o){let i=!0,s,a,l;for(s=0,a=t.length;s<a;++s)if(l=t[s],l!==void 0&&(e!==void 0&&typeof l=="function"&&(l=l(e),i=!1),n!==void 0&&se(l)&&(l=l[n%l.length],i=!1),l!==void 0))return o&&!i&&(o.cacheable=!1),l}function jp(t,e,n){const{min:o,max:i}=t,s=da(e,(i-o)/2),a=(l,d)=>n&&l===0?0:l+d;return{min:a(o,-Math.abs(s)),max:a(i,s)}}function Vt(t,e){return Object.assign(Object.create(t),e)}function _r(t,e=[""],n,o,i=()=>t[0]){const s=n||t;typeof o>"u"&&(o=Ta("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:o,_getTarget:i,override:l=>_r([l,...t],e,s,o)};return new Proxy(a,{deleteProperty(l,d){return delete l[d],delete l._keys,delete t[0][d],!0},get(l,d){return Oa(l,d,()=>Kp(d,e,t,l))},getOwnPropertyDescriptor(l,d){return Reflect.getOwnPropertyDescriptor(l._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,d){return za(l).includes(d)},ownKeys(l){return za(l)},set(l,d,c){const u=l._storage||(l._storage=i());return l[d]=u[d]=c,delete l._keys,!0}})}function rn(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ma(t,o),setContext:s=>rn(t,s,n,o),override:s=>rn(t.override(s),e,n,o)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete t[a],!0},get(s,a,l){return Oa(s,a,()=>Wp(s,a,l))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(s,a,l){return t[a]=l,delete s[a],!0}})}function Ma(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:Bt(n)?n:()=>n,isIndexable:Bt(o)?o:()=>o}}const Qp=(t,e)=>t?t+jr(e):e,ei=(t,e)=>$(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Oa(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function Wp(t,e,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:a}=t;let l=o[e];return Bt(l)&&a.isScriptable(e)&&(l=Yp(e,l,t,n)),se(l)&&l.length&&(l=Xp(e,l,t,a.isIndexable)),ei(e,l)&&(l=rn(l,i,s&&s[e],a)),l}function Yp(t,e,n,o){const{_proxy:i,_context:s,_subProxy:a,_stack:l}=n;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let d=e(s,a||o);return l.delete(t),ei(t,d)&&(d=ti(i._scopes,i,t,d)),d}function Xp(t,e,n,o){const{_proxy:i,_context:s,_subProxy:a,_descriptors:l}=n;if(typeof s.index<"u"&&o(t))return e[s.index%e.length];if($(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=ti(c,i,t,u);e.push(rn(f,s,a&&a[t],l))}}return e}function Ia(t,e,n){return Bt(t)?t(e,n):t}const Gp=(t,e)=>t===!0?e:typeof t=="string"?vt(e,t):void 0;function qp(t,e,n,o,i){for(const s of e){const a=Gp(n,s);if(a){t.add(a);const l=Ia(a._fallback,n,i);if(typeof l<"u"&&l!==n&&l!==o)return l}else if(a===!1&&typeof o<"u"&&n!==o)return null}return!1}function ti(t,e,n,o){const i=e._rootScopes,s=Ia(e._fallback,n,o),a=[...t,...i],l=new Set;l.add(o);let d=Ra(l,a,n,s||n,o);return d===null||typeof s<"u"&&s!==n&&(d=Ra(l,a,s,d,o),d===null)?!1:_r(Array.from(l),[""],i,s,()=>Jp(e,n,o))}function Ra(t,e,n,o,i){for(;n;)n=qp(t,e,n,o,i);return n}function Jp(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return se(i)&&$(n)?n:i||{}}function Kp(t,e,n,o){let i;for(const s of e)if(i=Ta(Qp(s,t),n),typeof i<"u")return ei(t,i)?ti(n,o,t,i):i}function Ta(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function za(t){let e=t._keys;return e||(e=t._keys=Zp(t._scopes)),e}function Zp(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function La(t,e,n,o){const{iScale:i}=t,{key:s="r"}=this._parsing,a=new Array(o);let l,d,c,u;for(l=0,d=o;l<d;++l)c=l+n,u=e[c],a[l]={r:i.parse(vt(u,s),c)};return a}const $p=Number.EPSILON||1e-14,sn=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ha=t=>t==="x"?"y":"x";function _p(t,e,n,o){const i=t.skip?e:t,s=e,a=n.skip?e:n,l=Wr(s,i),d=Wr(a,s);let c=l/(l+d),u=d/(l+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,p=o*u;return{previous:{x:s.x-f*(a.x-i.x),y:s.y-f*(a.y-i.y)},next:{x:s.x+p*(a.x-i.x),y:s.y+p*(a.y-i.y)}}}function em(t,e,n){const o=t.length;let i,s,a,l,d,c=sn(t,0);for(let u=0;u<o-1;++u)if(d=c,c=sn(t,u+1),!(!d||!c)){if(Dn(e[u],0,$p)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],s=n[u+1]/e[u],l=Math.pow(i,2)+Math.pow(s,2),!(l<=9)&&(a=3/Math.sqrt(l),n[u]=i*a*e[u],n[u+1]=s*a*e[u])}}function tm(t,e,n="x"){const o=Ha(n),i=t.length;let s,a,l,d=sn(t,0);for(let c=0;c<i;++c){if(a=l,l=d,d=sn(t,c+1),!l)continue;const u=l[n],f=l[o];a&&(s=(u-a[n])/3,l[`cp1${n}`]=u-s,l[`cp1${o}`]=f-s*e[c]),d&&(s=(d[n]-u)/3,l[`cp2${n}`]=u+s,l[`cp2${o}`]=f+s*e[c])}}function nm(t,e="x"){const n=Ha(e),o=t.length,i=Array(o).fill(0),s=Array(o);let a,l,d,c=sn(t,0);for(a=0;a<o;++a)if(l=d,d=c,c=sn(t,a+1),!!d){if(c){const u=c[e]-d[e];i[a]=u!==0?(c[n]-d[n])/u:0}s[a]=l?c?Je(i[a-1])!==Je(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}em(t,i,s),tm(t,s,e)}function Ao(t,e,n){return Math.max(Math.min(t,n),e)}function om(t,e){let n,o,i,s,a,l=at(t[0],e);for(n=0,o=t.length;n<o;++n)a=s,s=l,l=n<o-1&&at(t[n+1],e),s&&(i=t[n],a&&(i.cp1x=Ao(i.cp1x,e.left,e.right),i.cp1y=Ao(i.cp1y,e.top,e.bottom)),l&&(i.cp2x=Ao(i.cp2x,e.left,e.right),i.cp2y=Ao(i.cp2y,e.top,e.bottom)))}function rm(t,e,n,o,i){let s,a,l,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")nm(t,i);else{let c=o?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)l=t[s],d=_p(c,l,t[Math.min(s+1,a-(o?0:1))%a],e.tension),l.cp1x=d.previous.x,l.cp1y=d.previous.y,l.cp2x=d.next.x,l.cp2y=d.next.y,c=l}e.capBezierPoints&&om(t,n)}function ni(){return typeof window<"u"&&typeof document<"u"}function oi(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function vo(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const Bo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function im(t,e){return Bo(t).getPropertyValue(e)}const sm=["top","right","bottom","left"];function Qt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=sm[i];o[s]=parseFloat(t[e+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const am=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function lm(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=o;let a=!1,l,d;if(am(i,s,t.target))l=i,d=s;else{const c=e.getBoundingClientRect();l=o.clientX-c.left,d=o.clientY-c.top,a=!0}return{x:l,y:d,box:a}}function Wt(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=Bo(n),s=i.boxSizing==="border-box",a=Qt(i,"padding"),l=Qt(i,"border","width"),{x:d,y:c,box:u}=lm(t,n),f=a.left+(u&&l.left),p=a.top+(u&&l.top);let{width:m,height:h}=e;return s&&(m-=a.width+l.width,h-=a.height+l.height),{x:Math.round((d-f)/m*n.width/o),y:Math.round((c-p)/h*n.height/o)}}function dm(t,e,n){let o,i;if(e===void 0||n===void 0){const s=oi(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const a=s.getBoundingClientRect(),l=Bo(s),d=Qt(l,"border","width"),c=Qt(l,"padding");e=a.width-c.width-d.width,n=a.height-c.height-d.height,o=vo(l.maxWidth,s,"clientWidth"),i=vo(l.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:o||yo,maxHeight:i||yo}}const Do=t=>Math.round(t*10)/10;function cm(t,e,n,o){const i=Bo(t),s=Qt(i,"margin"),a=vo(i.maxWidth,t,"clientWidth")||yo,l=vo(i.maxHeight,t,"clientHeight")||yo,d=dm(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const p=Qt(i,"border","width"),m=Qt(i,"padding");c-=m.width+p.width,u-=m.height+p.height}return c=Math.max(0,c-s.width),u=Math.max(0,o?c/o:u-s.height),c=Do(Math.min(c,a,d.maxWidth)),u=Do(Math.min(u,l,d.maxHeight)),c&&!u&&(u=Do(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=Do(Math.floor(u*o))),{width:c,height:u}}function Ua(t,e,n){const o=e||1,i=Math.floor(t.height*o),s=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||a.height!==i||a.width!==s?(t.currentDevicePixelRatio=o,a.height=i,a.width=s,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const um=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ni()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function ja(t,e){const n=im(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Yt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function fm(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function pm(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Yt(t,i,n),l=Yt(i,s,n),d=Yt(s,e,n),c=Yt(a,l,n),u=Yt(l,d,n);return Yt(c,u,n)}const mm=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},hm=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function an(t,e,n){return t?mm(e,n):hm()}function Qa(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Wa(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ya(t){return t==="angle"?{between:Vn,compare:gp,normalize:Me}:{between:it,compare:(e,n)=>e-n,normalize:e=>e}}function Xa({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function gm(t,e,n){const{property:o,start:i,end:s}=n,{between:a,normalize:l}=Ya(o),d=e.length;let{start:c,end:u,loop:f}=t,p,m;if(f){for(c+=d,u+=d,p=0,m=d;p<m&&a(l(e[c%d][o]),i,s);++p)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function Ga(t,e,n){if(!n)return[t];const{property:o,start:i,end:s}=n,a=e.length,{compare:l,between:d,normalize:c}=Ya(o),{start:u,end:f,loop:p,style:m}=gm(t,e,n),h=[];let g=!1,b=null,y,S,v;const w=()=>d(i,v,y)&&l(i,v)!==0,x=()=>l(s,y)===0||d(s,v,y),F=()=>g||w(),E=()=>!g||x();for(let M=u,I=u;M<=f;++M)S=e[M%a],!S.skip&&(y=c(S[o]),y!==v&&(g=d(y,i,s),b===null&&F()&&(b=l(y,i)===0?M:I),b!==null&&E()&&(h.push(Xa({start:b,end:M,loop:p,count:a,style:m})),b=null),I=M,v=y));return b!==null&&h.push(Xa({start:b,end:f,loop:p,count:a,style:m})),h}function qa(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const s=Ga(o[i],t.points,e);s.length&&n.push(...s)}return n}function bm(t,e,n,o){let i=0,s=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function ym(t,e,n,o){const i=t.length,s=[];let a=e,l=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?l.skip||(o=!1,s.push({start:e%i,end:(d-1)%i,loop:o}),e=a=c.stop?d:null):(a=d,l.skip&&(e=d)),l=c}return a!==null&&s.push({start:e%i,end:a%i,loop:o}),s}function km(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:a,end:l}=bm(n,i,s,o);if(o===!0)return Ja(t,[{start:a,end:l,loop:s}],n,e);const d=l<a?l+i:l,c=!!t._fullLoop&&a===0&&l===i-1;return Ja(t,ym(n,a,d,c),n,e)}function Ja(t,e,n,o){return!o||!o.setContext||!n?e:xm(t,e,n,o)}function xm(t,e,n,o){const i=t._chart.getContext(),s=Ka(t.options),{_datasetIndex:a,options:{spanGaps:l}}=t,d=n.length,c=[];let u=s,f=e[0].start,p=f;function m(h,g,b,y){const S=l?-1:1;if(h!==g){for(h+=d;n[h%d].skip;)h-=S;for(;n[g%d].skip;)g+=S;h%d!==g%d&&(c.push({start:h%d,end:g%d,loop:b,style:y}),u=y,f=g%d)}}for(const h of e){f=l?f:h.start;let g=n[f%d],b;for(p=f+1;p<=h.end;p++){const y=n[p%d];b=Ka(o.setContext(Vt(i,{type:"segment",p0:g,p1:y,p0DataIndex:(p-1)%d,p1DataIndex:p%d,datasetIndex:a}))),Sm(b,u)&&m(f,p-1,h.loop,u),g=y,u=b}f<p-1&&m(f,p-1,h.loop,u)}return c}function Ka(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Sm(t,e){if(!e)return!1;const n=[],o=function(i,s){return Gr(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
20
20
  * Chart.js v4.4.2
21
21
  * https://www.chartjs.org
22
22
  * (c) 2024 Chart.js Contributors
23
23
  * Released under the MIT License
24
- */class Cm{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const s=n.listeners[i],a=n.duration;s.forEach(l=>l({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Sa.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 s=o.items;let a=s.length-1,l=!1,d;for(;a>=0;--a)d=s[a],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),l=!0):(s[a]=s[s.length-1],s.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),s.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=s.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 lt=new Cm;const Za="transparent",wm={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Da(t||Za),i=o.valid&&Da(e||Za);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Am{constructor(e,n,o,i){const s=n[o];i=Mn([e.to,i,s,e.from]);const a=Mn([e.from,s,i]);this._active=!0,this._fn=e.fn||wm[e.type||typeof a],this._easing=Pn[e.easing]||Pn.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=a,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],s=o-this._start,a=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Mn([e.to,n,i,e.from]),this._from=Mn([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,s=this._from,a=this._loop,l=this._to;let d;if(this._active=s!==l&&(a||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=s;return}d=n/o%2,d=a&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(s,l,d)}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 $a{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!$(e))return;const n=Object.keys(pe.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!$(s))return;const a={};for(const l of n)a[l]=s[l];(se(s.properties)&&s.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,a)})})}_animateOptions(e,n){const o=n.options,i=Bm(e,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&vm(e.options.$animations,o).then(()=>{e.options=o},()=>{}),s}_createAnimations(e,n){const o=this._properties,i=[],s=e.$animations||(e.$animations={}),a=Object.keys(n),l=Date.now();let d;for(d=a.length-1;d>=0;--d){const c=a[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=s[c];const p=o.get(c);if(f)if(p&&f.active()){f.update(p,u,l);continue}else f.cancel();if(!p||!p.duration){e[c]=u;continue}s[c]=f=new Am(p,e,c,u),i.push(f)}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 lt.add(this._chart,o),!0}}function vm(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const s=t[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Bm(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 _a(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:o?s:i,end:o?i:s}}function Dm(t,e,n){if(n===!1)return!1;const o=_a(t,n),i=_a(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function Vm(t){let e,n,o,i;return $(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 el(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function tl(t,e,n,o={}){const i=t.keys,s=o.mode==="single";let a,l,d,c;if(e!==null){for(a=0,l=i.length;a<l;++a){if(d=+i[a],d===n){if(o.all)continue;break}c=t.values[d],fe(c)&&(s||e===0||Je(e)===Je(c))&&(e+=c)}return e}}function Pm(t){const e=Object.keys(t),n=new Array(e.length);let o,i,s;for(o=0,i=e.length;o<i;++o)s=e[o],n[o]={x:s,y:t[s]};return n}function nl(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Em(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Fm(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 Nm(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function ol(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function rl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:l}=o,d=s.axis,c=a.axis,u=Em(s,a,o),f=e.length;let p;for(let m=0;m<f;++m){const h=e[m],{[d]:g,[c]:b}=h,y=h._stacks||(h._stacks={});p=y[c]=Nm(i,u,g),p[l]=b,p._top=ol(p,a,!0,o.type),p._bottom=ol(p,a,!1,o.type);const S=p._visualValues||(p._visualValues={});S[l]=b}}function ri(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Mm(t,e){return Dt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Om(t,e,n){return Dt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function On(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 s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const ii=t=>t==="reset"||t==="none",il=(t,e)=>e?t:Object.assign({},t),Im=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:el(n,!0),values:null};class We{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=nl(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&&On(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,p,m,h)=>f==="x"?p:f==="r"?h:m,s=n.xAxisID=q(o.xAxisID,ri(e,"x")),a=n.yAxisID=q(o.yAxisID,ri(e,"y")),l=n.rAxisID=q(o.rAxisID,ri(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,s,a,l),u=n.vAxisID=i(d,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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&&ka(this._data,this),e._stacked&&On(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if($(n))this._data=Pm(n);else if(o!==n){if(o){ka(o,this);const i=this._cachedMeta;On(i),i._parsed=[]}n&&Object.isExtensible(n)&&xp(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 s=n._stacked;n._stacked=nl(n.vScale,n),n.stack!==o.stack&&(i=!0,On(n),n.stack=o.stack),this._resyncElements(e),(i||s!==n._stacked)&&rl(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:s,_stacked:a}=o,l=s.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,p;if(this._parsing===!1)o._parsed=i,o._sorted=!0,p=i;else{se(i[e])?p=this.parseArrayData(o,i,e,n):$(i[e])?p=this.parseObjectData(o,i,e,n):p=this.parsePrimitiveData(o,i,e,n);const m=()=>f[l]===null||c&&f[l]<c[l];for(u=0;u<n;++u)o._parsed[u+e]=f=p[u],d&&(m()&&(d=!1),c=f);o._sorted=d}a&&rl(this,p)}parsePrimitiveData(e,n,o,i){const{iScale:s,vScale:a}=e,l=s.axis,d=a.axis,c=s.getLabels(),u=s===a,f=new Array(i);let p,m,h;for(p=0,m=i;p<m;++p)h=p+o,f[p]={[l]:u||s.parse(c[h],h),[d]:a.parse(n[h],h)};return f}parseArrayData(e,n,o,i){const{xScale:s,yScale:a}=e,l=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],l[d]={x:s.parse(f[0],u),y:a.parse(f[1],u)};return l}parseObjectData(e,n,o,i){const{xScale:s,yScale:a}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,p,m;for(u=0,f=i;u<f;++u)p=u+o,m=n[p],c[u]={x:s.parse(At(m,l),p),y:a.parse(At(m,d),p)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,s=this._cachedMeta,a=n[e.axis],l={keys:el(i,!0),values:n._stacks[e.axis]._visualValues};return tl(l,a,s.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const s=o[n.axis];let a=s===null?NaN:s;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,a=tl(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&e===o.iScale,a=i.length,l=this._getOtherScale(e),d=Im(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Fm(l);let p,m;function h(){m=i[p];const g=m[l.axis];return!fe(m[e.axis])||u>g||f<g}for(p=0;p<a&&!(!h()&&(this.updateRangeFromParsed(c,e,m,d),s));++p);if(s){for(p=a-1;p>=0;--p)if(!h()){this.updateRangeFromParsed(c,e,m,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][e.axis],fe(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Vm(q(this.options.clip,Dm(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,a=[],l=this._drawStart||0,d=this._drawCount||i.length-l,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,s,l,d),u=l;u<l+d;++u){const f=i[u];f.hidden||(f.active&&c?a.push(f):f.draw(e,s))}for(u=0;u<a.length;++u)a[u].draw(e,s)}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 s;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];s=a.$context||(a.$context=Om(this.getContext(),e,a)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Mm(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}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",s=this._cachedDataOpts,a=e+"-"+n,l=s[a],d=this.enableOptionSharing&&Bn(o);if(l)return il(l,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],p=c.getOptionScopes(this.getDataset(),u),m=Object.keys(pe.elements[e]),h=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(p,m,h,f);return g.$shared&&(g.$shared=d,s[a]=Object.freeze(il(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),p=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(p,this.getContext(e,o,n))}const c=new $a(i,d&&d.animations);return d&&d._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||ii(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(o),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:a}}updateElement(e,n,o,i){ii(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!ii(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}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,d,c]of this._syncList)this[l](d,c);this._syncList=[];const i=o.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,o=!0){const i=this._cachedMeta,s=i.data,a=e+n;let l;const d=c=>{for(c.length+=n,l=c.length-1;l>=a;l--)c[l]=c[l-n]};for(d(s),l=e;l<a;++l)s[l]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(s,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&&On(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])}}H(We,"defaults",{}),H(We,"datasetElementType",null),H(We,"dataElementType",null);function Rm(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=xa(o.sort((i,s)=>i-s))}return t._cache.$bar}function Tm(t){const e=t.iScale,n=Rm(e,t.type);let o=e._length,i,s,a,l;const d=()=>{a===32767||a===-32768||(Bn(l)&&(o=Math.min(o,Math.abs(a-l)||o)),l=a)};for(i=0,s=n.length;i<s;++i)a=e.getPixelForValue(n[i]),d();for(l=void 0,i=0,s=e.ticks.length;i<s;++i)a=e.getPixelForTick(i),d();return o}function zm(t,e,n,o){const i=n.barThickness;let s,a;return ee(i)?(s=e.min*n.categoryPercentage,a=n.barPercentage):(s=i*o,a=1),{chunk:s/o,ratio:a,start:e.pixels[t]-s/2}}function Lm(t,e,n,o){const i=e.pixels,s=i[t];let a=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;a===null&&(a=s-(l===null?e.end-e.start:l-s)),l===null&&(l=s+s-a);const c=s-(s-Math.min(a,l))/2*d;return{chunk:Math.abs(l-a)/2*d/o,ratio:n.barPercentage,start:c}}function Hm(t,e,n,o){const i=n.parse(t[0],o),s=n.parse(t[1],o),a=Math.min(i,s),l=Math.max(i,s);let d=a,c=l;Math.abs(a)>Math.abs(l)&&(d=l,c=a),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:s,min:a,max:l}}function sl(t,e,n,o){return se(t)?Hm(t,e,n,o):e[n.axis]=n.parse(t,o),e}function al(t,e,n,o){const i=t.iScale,s=t.vScale,a=i.getLabels(),l=i===s,d=[];let c,u,f,p;for(c=n,u=n+o;c<u;++c)p=e[c],f={},f[i.axis]=l||i.parse(a[c],c),d.push(sl(p,f,s,c));return d}function si(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function Um(t,e,n){return t!==0?Je(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function jm(t){let e,n,o,i,s;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:e,top:i,bottom:s}}function Qm(t,e,n,o){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:d,top:c,bottom:u}=jm(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(s[ll(u,a,l,d)]=!0,i=c)),s[ll(i,a,l,d)]=!0,t.borderSkipped=s}function ll(t,e,n,o){return o?(t=Wm(t,e,n),t=dl(t,n,e)):t=dl(t,e,n),t}function Wm(t,e,n){return t===e?n:t===n?e:t}function dl(t,e,n){return t==="start"?e:t==="end"?n:t}function Ym(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Vo extends We{parsePrimitiveData(e,n,o,i){return al(e,n,o,i)}parseArrayData(e,n,o,i){return al(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:s,vScale:a}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=s.axis==="x"?l:d,u=a.axis==="x"?l:d,f=[];let p,m,h,g;for(p=o,m=o+i;p<m;++p)g=n[p],h={},h[s.axis]=s.parse(At(g,c),p),f.push(sl(At(g,u),h,a,p));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(e),a=s._custom,l=si(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[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 s=i==="reset",{index:a,_cachedMeta:{vScale:l}}=this,d=l.getBasePixel(),c=l.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:p}=this._getSharedOptions(n,i);for(let m=n;m<n+o;m++){const h=this.getParsed(m),g=s||ee(h[l.axis])?{base:d,head:d}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),y=(h._stacks||{})[l.axis],S={horizontal:c,base:g.base,enableBorderRadius:!y||si(h._custom)||a===y._top||a===y._bottom,x:c?g.head:b.center,y:c?b.center:g.head,height:c?b.size:Math.abs(g.size),width:c?Math.abs(g.size):b.size};p&&(S.options=f||this.resolveDataElementOptions(m,e[m].active?"active":i));const v=S.options||e[m].options;Qm(S,v,y,a),Ym(S,v,u.ratio),this.updateElement(e[m],m,S,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),s=o.options.stacked,a=[],l=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(ee(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&l(d))&&((s===!1||a.indexOf(d.stack)===-1||s===void 0&&d.stack===void 0)&&a.push(d.stack),d.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,a;for(s=0,a=n.data.length;s<a;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const l=e.barThickness;return{min:l||Tm(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:s,minBarLength:a}}=this,l=s||0,d=this.getParsed(e),c=d._custom,u=si(c);let f=d[n.axis],p=0,m=o?this.applyStack(n,d,o):f,h,g;m!==f&&(p=m-f,m=f),u&&(f=c.barStart,m=c.barEnd-c.barStart,f!==0&&Je(f)!==Je(c.barEnd)&&(p=0),p+=f);const b=!ee(s)&&!u?s:p;let y=n.getPixelForValue(b);if(this.chart.getDataVisibility(e)?h=n.getPixelForValue(p+m):h=y,g=h-y,Math.abs(g)<a){g=Um(g,n,l)*a,f===l&&(y-=g/2);const S=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),w=Math.min(S,v),x=Math.max(S,v);y=Math.max(Math.min(y,x),w),h=y+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(h)-n.getValueForPixel(y))}if(y===n.getPixelForValue(l)){const S=Je(g)*n.getLineWidthForValue(l)/2;y+=S,g-=S}return{size:g,base:y,head:h,center:h+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,s=i.skipNull,a=q(i.maxBarThickness,1/0);let l,d;if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?Lm(e,n,i,c):zm(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);l=u.start+u.chunk*f+u.chunk/2,d=Math.min(a,u.chunk*u.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(a,n.min*n.ratio);return{base:l-d/2,head:l+d/2,center:l,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&o[s].draw(this._ctx)}}H(Vo,"id","bar"),H(Vo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Vo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Po extends We{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const s=super.parsePrimitiveData(e,n,o,i);for(let a=0;a<s.length;a++)s[a]._custom=this.resolveDataElementOptions(a+o).radius;return s}parseArrayData(e,n,o,i){const s=super.parseArrayData(e,n,o,i);for(let a=0;a<s.length;a++){const l=n[o+a];s[a]._custom=q(l[2],this.resolveDataElementOptions(a+o).radius)}return s}parseObjectData(e,n,o,i){const s=super.parseObjectData(e,n,o,i);for(let a=0;a<s.length;a++){const l=n[o+a];s[a]._custom=q(l&&l.r&&+l.r,this.resolveDataElementOptions(a+o).radius)}return s}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:s}=n,a=this.getParsed(e),l=i.getLabelForValue(a.x),d=s.getLabelForValue(a.y),c=a._custom;return{label:o[e]||"",value:"("+l+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=a.axis,f=l.axis;for(let p=n;p<n+o;p++){const m=e[p],h=!s&&this.getParsed(p),g={},b=g[u]=s?a.getPixelForDecimal(.5):a.getPixelForValue(h[u]),y=g[f]=s?l.getBasePixel():l.getPixelForValue(h[f]);g.skip=isNaN(b)||isNaN(y),c&&(g.options=d||this.resolveDataElementOptions(p,m.active?"active":i),s&&(g.options.radius=0)),this.updateElement(m,p,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=q(o&&o._custom,s),i}}H(Po,"id","bubble"),H(Po,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(Po,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Xm(t,e,n){let o=1,i=1,s=0,a=0;if(e<le){const l=t,d=l+e,c=Math.cos(l),u=Math.sin(l),f=Math.cos(d),p=Math.sin(d),m=(v,w,x)=>Vn(v,l,d,!0)?1:Math.max(w,w*n,x,x*n),h=(v,w,x)=>Vn(v,l,d,!0)?-1:Math.min(w,w*n,x,x*n),g=m(0,c,f),b=m(me,u,p),y=h(ae,c,f),S=h(ae+me,u,p);o=(g-y)/2,i=(b-S)/2,s=-(g+y)/2,a=-(b+S)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:a}}class Xt extends We{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 s=d=>+o[d];if($(o[e])){const{key:d="value"}=this._parsing;s=c=>+At(o[c],d)}let a,l;for(a=e,l=e+n;a<l;++a)i._parsed[a]=s(a)}}_getRotation(){return Qe(this.options.rotation-90)}_getCircumference(){return Qe(this.options.circumference)}_getRotationExtents(){let e=le,n=-le;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,s=i._getRotation(),a=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-a)/2,0),d=Math.min(sp(this.options.cutout,l),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:m,offsetX:h,offsetY:g}=Xm(f,u,d),b=(o.width-a)/p,y=(o.height-a)/m,S=Math.max(Math.min(b,y)/2,0),v=da(this.options.radius,S),w=Math.max(v*d,0),x=(v-w)/this._getVisibleDatasetWeightTotal();this.offsetX=h*v,this.offsetY=g*v,i.total=this.calculateTotal(),this.outerRadius=v-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,s=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]*s/le)}updateElements(e,n,o,i){const s=i==="reset",a=this.chart,l=a.chartArea,c=a.options.animation,u=(l.left+l.right)/2,f=(l.top+l.bottom)/2,p=s&&c.animateScale,m=p?0:this.innerRadius,h=p?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(n,i);let y=this._getRotation(),S;for(S=0;S<n;++S)y+=this._circumference(S,s);for(S=n;S<n+o;++S){const v=this._circumference(S,s),w=e[S],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+v,circumference:v,outerRadius:h,innerRadius:m};b&&(x.options=g||this.resolveDataElementOptions(S,w.active?"active":i)),y+=v,this.updateElement(w,S,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?le*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=En(n._parsed[e],o.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,s,a,l,d;if(!e){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){a=o.getDatasetMeta(i),e=a.data,l=a.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)d=l.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.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(q(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(Xt,"id","doughnut"),H(Xt,"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"}),H(Xt,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),H(Xt,"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((s,a)=>{const d=e.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class Eo extends We{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:l,count:d}=wa(n,i,a);this._drawStart=l,this._drawCount=d,Aa(n)&&(l=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:c},e),this.updateElements(i,l,d,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),p=a.axis,m=l.axis,{spanGaps:h,segment:g}=this.options,b=on(h)?h:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||i==="none",S=n+o,v=e.length;let w=n>0&&this.getParsed(n-1);for(let x=0;x<v;++x){const F=e[x],E=y?F:{};if(x<n||x>=S){E.skip=!0;continue}const M=this.getParsed(x),I=ee(M[m]),N=E[p]=a.getPixelForValue(M[p],x),C=E[m]=s||I?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,M,d):M[m],x);E.skip=isNaN(N)||isNaN(C)||I,E.stop=x>0&&Math.abs(M[p]-w[p])>b,g&&(E.parsed=M,E.raw=c.data[x]),f&&(E.options=u||this.resolveDataElementOptions(x,F.active?"active":i)),y||this.updateElement(F,x,E,i),w=M}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}H(Eo,"id","line"),H(Eo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Eo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class In extends We{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||[],s=En(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,o,i){return La.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 s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),a=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),l=(s-a)/e.getVisibleDatasetCount();this.outerRadius=s-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const s=i==="reset",a=this.chart,d=a.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,p=c.getIndexAngle(0)-.5*ae;let m=p,h;const g=360/this.countVisibleElements();for(h=0;h<n;++h)m+=this._computeAngle(h,i,g);for(h=n;h<n+o;h++){const b=e[h];let y=m,S=m+this._computeAngle(h,i,g),v=a.getDataVisibility(h)?c.getDistanceFromCenterForValue(this.getParsed(h).r):0;m=S,s&&(d.animateScale&&(v=0),d.animateRotate&&(y=S=p));const w={x:u,y:f,innerRadius:0,outerRadius:v,startAngle:y,endAngle:S,options:this.resolveDataElementOptions(h,b.active?"active":i)};this.updateElement(b,h,w,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)?Qe(this.resolveDataElementOptions(e,n).angle||o):0}}H(In,"id","polarArea"),H(In,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(In,"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((s,a)=>{const d=e.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}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 ai extends Xt{}H(ai,"id","pie"),H(ai,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Fo extends We{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 La.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(o.points=i,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const l={_loop:!0,_fullLoop:s.length===i.length,options:a};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const s=this._cachedMeta.rScale,a=i==="reset";for(let l=n;l<n+o;l++){const d=e[l],c=this.resolveDataElementOptions(l,d.active?"active":i),u=s.getPointPositionForValue(l,this.getParsed(l).r),f=a?s.xCenter:u.x,p=a?s.yCenter:u.y,m={x:f,y:p,angle:u.angle,skip:isNaN(f)||isNaN(p),options:c};this.updateElement(d,l,m,i)}}}H(Fo,"id","radar"),H(Fo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Fo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class No extends We{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,a=this.getParsed(e),l=i.getLabelForValue(a.x),d=s.getLabelForValue(a.y);return{label:o[e]||"",value:"("+l+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:a}=wa(n,o,i);if(this._drawStart=s,this._drawCount=a,Aa(n)&&(s=0,a=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:d}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!d._decimated,l.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,s,a,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 s=i==="reset",{iScale:a,vScale:l,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),p=this.includeOptions(i,f),m=a.axis,h=l.axis,{spanGaps:g,segment:b}=this.options,y=on(g)?g:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||s||i==="none";let v=n>0&&this.getParsed(n-1);for(let w=n;w<n+o;++w){const x=e[w],F=this.getParsed(w),E=S?x:{},M=ee(F[h]),I=E[m]=a.getPixelForValue(F[m],w),N=E[h]=s||M?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,F,d):F[h],w);E.skip=isNaN(I)||isNaN(N)||M,E.stop=w>0&&Math.abs(F[m]-v[m])>y,b&&(E.parsed=F,E.raw=c.data[w]),p&&(E.options=f||this.resolveDataElementOptions(w,x.active?"active":i)),S||this.updateElement(x,w,E,i),v=F}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let d=n.length-1;d>=0;--d)l=Math.max(l,n[d].size(this.resolveDataElementOptions(d))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,a)/2}}H(No,"id","scatter"),H(No,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(No,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Gm=Object.freeze({__proto__:null,BarController:Vo,BubbleController:Po,DoughnutController:Xt,LineController:Eo,PieController:ai,PolarAreaController:In,RadarController:Fo,ScatterController:No});function Gt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class li{constructor(e){H(this,"options");this.options=e||{}}static override(e){Object.assign(li.prototype,e)}init(){}formats(){return Gt()}parse(){return Gt()}format(){return Gt()}add(){return Gt()}diff(){return Gt()}startOf(){return Gt()}endOf(){return Gt()}}var qm={_date:li};function Jm(t,e,n,o){const{controller:i,data:s,_sorted:a}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&a&&s.length){const d=l._reversePixels?yp:st;if(o){if(i._sharedOptions){const c=s[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(s,e,n-u),p=d(s,e,n+u);return{lo:f.lo,hi:p.hi}}}}else return d(s,e,n)}return{lo:0,hi:s.length-1}}function Rn(t,e,n,o,i){const s=t.getSortedVisibleDatasetMetas(),a=n[e];for(let l=0,d=s.length;l<d;++l){const{index:c,data:u}=s[l],{lo:f,hi:p}=Jm(s[l],e,a,i);for(let m=f;m<=p;++m){const h=u[m];h.skip||o(h,c,m)}}}function Km(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const s=e?Math.abs(o.x-i.x):0,a=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function di(t,e,n,o,i){const s=[];return!i&&!t.isPointInArea(e)||Rn(t,n,e,function(l,d,c){!i&&!at(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&s.push({element:l,datasetIndex:d,index:c})},!0),s}function Zm(t,e,n,o){let i=[];function s(a,l,d){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],o),{angle:f}=ba(a,{x:e.x,y:e.y});Vn(f,c,u)&&i.push({element:a,datasetIndex:l,index:d})}return Rn(t,n,e,s),i}function $m(t,e,n,o,i,s){let a=[];const l=Km(n);let d=Number.POSITIVE_INFINITY;function c(u,f,p){const m=u.inRange(e.x,e.y,i);if(o&&!m)return;const h=u.getCenterPoint(i);if(!(!!s||t.isPointInArea(h))&&!m)return;const b=l(e,h);b<d?(a=[{element:u,datasetIndex:f,index:p}],d=b):b===d&&a.push({element:u,datasetIndex:f,index:p})}return Rn(t,n,e,c),a}function ci(t,e,n,o,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!o?Zm(t,e,n,i):$m(t,e,n,o,i,s)}function cl(t,e,n,o,i){const s=[],a=n==="x"?"inXRange":"inYRange";let l=!1;return Rn(t,n,e,(d,c,u)=>{d[a](e[n],i)&&(s.push({element:d,datasetIndex:c,index:u}),l=l||d.inRange(e.x,e.y,i))}),o&&!l?[]:s}var _m={evaluateInteractionItems:Rn,modes:{index(t,e,n,o){const i=Wt(e,t),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?di(t,i,s,o,a):ci(t,i,s,!1,o,a),d=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=l[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?di(t,i,s,o,a):ci(t,i,s,!1,o,a);if(l.length>0){const d=l[0].datasetIndex,c=t.getDatasetMeta(d).data;l=[];for(let u=0;u<c.length;++u)l.push({element:c[u],datasetIndex:d,index:u})}return l},point(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return di(t,i,s,o,a)},nearest(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return ci(t,i,s,n.intersect,o,a)},x(t,e,n,o){const i=Wt(e,t);return cl(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Wt(e,t);return cl(t,i,"y",n.intersect,o)}}};const ul=["left","top","right","bottom"];function Tn(t,e){return t.filter(n=>n.pos===e)}function fl(t,e){return t.filter(n=>ul.indexOf(n.pos)===-1&&n.box.axis===e)}function zn(t,e){return t.sort((n,o)=>{const i=e?o:n,s=e?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function eh(t){const e=[];let n,o,i,s,a,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:s,options:{stack:a,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:l});return e}function th(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!ul.includes(i))continue;const a=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}function nh(t,e){const n=th(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let s,a,l;for(s=0,a=t.length;s<a;++s){l=t[s];const{fullSize:d}=l.box,c=n[l.stack],u=c&&l.stackWeight/c.weight;l.horizontal?(l.width=u?u*o:d&&e.availableWidth,l.height=i):(l.width=o,l.height=u?u*i:d&&e.availableHeight)}return n}function oh(t){const e=eh(t),n=zn(e.filter(c=>c.box.fullSize),!0),o=zn(Tn(e,"left"),!0),i=zn(Tn(e,"right")),s=zn(Tn(e,"top"),!0),a=zn(Tn(e,"bottom")),l=fl(e,"x"),d=fl(e,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(d).concat(a).concat(l),chartArea:Tn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:s.concat(a).concat(l)}}function pl(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function ml(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 rh(t,e,n,o){const{pos:i,box:s}=n,a=t.maxPadding;if(!$(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&ml(a,s.getPadding());const l=Math.max(0,e.outerWidth-pl(a,t,"left","right")),d=Math.max(0,e.outerHeight-pl(a,t,"top","bottom")),c=l!==t.w,u=d!==t.h;return t.w=l,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ih(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 sh(t,e){const n=e.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(e[a],n[a])}),s}return o(t?["left","right"]:["top","bottom"])}function Ln(t,e,n,o){const i=[];let s,a,l,d,c,u;for(s=0,a=t.length,c=0;s<a;++s){l=t[s],d=l.box,d.update(l.width||e.w,l.height||e.h,sh(l.horizontal,e));const{same:f,other:p}=rh(e,n,l,o);c|=f&&i.length,u=u||p,d.fullSize||i.push(l)}return c&&Ln(i,e,n,o)||u}function Mo(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 hl(t,e,n,o){const i=n.padding;let{x:s,y:a}=e;for(const l of t){const d=l.box,c=o[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/c.weight||1;if(l.horizontal){const f=e.w*u,p=c.size||d.height;Bn(c.start)&&(a=c.start),d.fullSize?Mo(d,i.left,a,n.outerWidth-i.right-i.left,p):Mo(d,e.left+c.placed,a,f,p),c.start=a,c.placed+=f,a=d.bottom}else{const f=e.h*u,p=c.size||d.width;Bn(c.start)&&(s=c.start),d.fullSize?Mo(d,s,i.top,p,n.outerHeight-i.bottom-i.top):Mo(d,s,e.top+c.placed,p,f),c.start=s,c.placed+=f,s=d.right}}e.x=s,e.y=a}var ve={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=Ae(t.options.layout.padding),s=Math.max(e-i.width,0),a=Math.max(n-i.height,0),l=oh(t.boxes),d=l.vertical,c=l.horizontal;oe(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/u,hBoxMaxHeight:a/2}),p=Object.assign({},i);ml(p,Ae(o));const m=Object.assign({maxPadding:p,w:s,h:a,x:i.left,y:i.top},i),h=nh(d.concat(c),f);Ln(l.fullSize,m,f,h),Ln(d,m,f,h),Ln(c,m,f,h)&&Ln(d,m,f,h),ih(m),hl(l.leftAndTop,m,f,h),m.x+=m.w,m.y+=m.h,hl(l.rightAndBottom,m,f,h),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},oe(l.chartArea,g=>{const b=g.box;Object.assign(b,t.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class gl{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 ah extends gl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Oo="$chartjs",lh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bl=t=>t===null||t==="";function dh(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[Oo]={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",bl(i)){const s=ja(t,"width");s!==void 0&&(t.width=s)}if(bl(o))if(t.style.height==="")t.height=t.width/(e||2);else{const s=ja(t,"height");s!==void 0&&(t.height=s)}return t}const yl=um?{passive:!0}:!1;function ch(t,e,n){t&&t.addEventListener(e,n,yl)}function uh(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,yl)}function fh(t,e){const n=lh[t.type]||t.type,{x:o,y:i}=Wt(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Io(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function ph(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||Io(l.addedNodes,o),a=a&&!Io(l.removedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function mh(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||Io(l.removedNodes,o),a=a&&!Io(l.addedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Hn=new Map;let kl=0;function xl(){const t=window.devicePixelRatio;t!==kl&&(kl=t,Hn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function hh(t,e){Hn.size||window.addEventListener("resize",xl),Hn.set(t,e)}function gh(t){Hn.delete(t),Hn.size||window.removeEventListener("resize",xl)}function bh(t,e,n){const o=t.canvas,i=o&&oi(o);if(!i)return;const s=Ca((l,d)=>{const c=i.clientWidth;n(l,d),c<i.clientWidth&&n()},window),a=new ResizeObserver(l=>{const d=l[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||s(c,u)});return a.observe(i),hh(t,s),a}function ui(t,e,n){n&&n.disconnect(),e==="resize"&&gh(t)}function yh(t,e,n){const o=t.canvas,i=Ca(s=>{t.ctx!==null&&n(fh(s,t))},t);return ch(o,e,i),i}class kh extends gl{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(dh(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[Oo])return!1;const o=n[Oo].initial;["height","width"].forEach(s=>{const a=o[s];ee(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Oo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),a={attach:ph,detach:mh,resize:bh}[n]||yh;i[n]=a(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:ui,detach:ui,resize:ui}[n]||uh)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return cm(e,n,o,i)}isAttached(e){const n=oi(e);return!!(n&&n.isConnected)}}function xh(t){return!ni()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ah:kh}let dt=(Ar=class{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return on(this.x)&&on(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}},H(Ar,"defaults",{}),H(Ar,"defaultRoutes"),Ar);function Sh(t,e){const n=t.options.ticks,o=Ch(t),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?Ah(e):[],a=s.length,l=s[0],d=s[a-1],c=[];if(a>i)return vh(e,c,s,a/i),c;const u=wh(s,e,i);if(a>0){let f,p;const m=a>1?Math.round((d-l)/(a-1)):null;for(Ro(e,c,u,ee(m)?0:l-m,l),f=0,p=a-1;f<p;f++)Ro(e,c,u,s[f],s[f+1]);return Ro(e,c,u,d,ee(m)?e.length:d+m),c}return Ro(e,c,u),c}function Ch(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 wh(t,e,n){const o=Bh(t),i=e.length/n;if(!o)return Math.max(i,1);const s=mp(o);for(let a=0,l=s.length-1;a<l;a++){const d=s[a];if(d>i)return d}return Math.max(i,1)}function Ah(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function vh(t,e,n,o){let i=0,s=n[0],a;for(o=Math.ceil(o),a=0;a<t.length;a++)a===s&&(e.push(t[a]),i++,s=n[i*o])}function Ro(t,e,n,o,i){const s=q(o,0),a=Math.min(q(i,t.length),t.length);let l=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=s;u<0;)l++,u=Math.round(s+l*n);for(c=Math.max(s,0);c<a;c++)c===u&&(e.push(t[c]),l++,u=Math.round(s+l*n))}function Bh(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 Dh=t=>t==="left"?"right":t==="right"?"left":t,Sl=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Cl=(t,e)=>Math.min(e||t,t);function wl(t,e){const n=[],o=t.length/e,i=t.length;let s=0;for(;s<i;s+=o)n.push(t[Math.floor(s)]);return n}function Vh(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),s=t._startPixel,a=t._endPixel,l=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-s,a-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<s-l||d>a+l)))return d}function Ph(t,e){oe(t,n=>{const o=n.gc,i=o.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function Un(t){return t.drawTicks?t.tickLength:0}function Al(t,e){if(!t.display)return 0;const n=be(t.font,e),o=Ae(t.padding);return(se(t.text)?t.text.length:1)*n.lineHeight+o.height}function Eh(t,e){return Dt(t,{scale:e,type:"scale"})}function Fh(t,e,n){return Dt(t,{tick:n,index:e,type:"tick"})}function Nh(t,e,n){let o=Xr(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Dh(o)),o}function Mh(t,e,n,o){const{top:i,left:s,bottom:a,right:l,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,p,m,h;const g=a-i,b=l-s;if(t.isHorizontal()){if(m=we(o,s,l),$(n)){const y=Object.keys(n)[0],S=n[y];h=u[y].getPixelForValue(S)+g-e}else n==="center"?h=(c.bottom+c.top)/2+g-e:h=Sl(t,n,e);p=l-s}else{if($(n)){const y=Object.keys(n)[0],S=n[y];m=u[y].getPixelForValue(S)-b+e}else n==="center"?m=(c.left+c.right)/2-b+e:m=Sl(t,n,e);h=we(o,a,i),f=n==="left"?-me:me}return{titleX:m,titleY:h,maxWidth:p,rotation:f}}class qt extends dt{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=Ne(e,Number.POSITIVE_INFINITY),n=Ne(n,Number.NEGATIVE_INFINITY),o=Ne(o,Number.POSITIVE_INFINITY),i=Ne(i,Number.NEGATIVE_INFINITY),{min:Ne(e,o),max:Ne(n,i),minDefined:fe(e),maxDefined:fe(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let d=0,c=l.length;d<c;++d)a=l[d].controller.getMinMax(this,e),i||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:Ne(n,Ne(o,n)),max:Ne(o,Ne(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(){ie(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:s,ticks:a}=this.options,l=a.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=jp(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=l<this.ticks.length;this._convertTicksToLabels(d?wl(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Sh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&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(){ie(this.options.afterUpdate,[this])}beforeSetDimensions(){ie(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(){ie(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ie(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ie(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o],s.label=ie(n.callback,[s.value,o,e],this)}afterTickToLabelConversion(){ie(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ie(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=Cl(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,l,d,c;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,p=u.highest.height,m=ke(this.chart.width-f,0,this.maxWidth);l=e.offset?this.maxWidth/o:m/(o-1),f+6>l&&(l=m/(o-(e.offset?.5:1)),d=this.maxHeight-Un(e.grid)-n.padding-Al(e.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),a=Qr(Math.min(Math.asin(ke((u.highest.height+6)/l,-1,1)),Math.asin(ke(d/c,-1,1))-Math.asin(ke(p/c,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){ie(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ie(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const d=Al(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=Un(s)+d):(e.height=this.maxHeight,e.width=Un(s)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:p}=this._getLabelSizes(),m=o.padding*2,h=Qe(this.labelRotation),g=Math.cos(h),b=Math.sin(h);if(l){const y=o.mirror?0:b*f.width+g*p.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=o.mirror?0:g*f.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(c,u,b,g)}}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:s,padding:a},position:l}=this.options,d=this.labelRotation!==0,c=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;d?c?(p=i*e.width,m=o*n.height):(p=o*e.height,m=i*n.width):s==="start"?m=n.width:s==="end"?p=e.width:s!=="inner"&&(p=e.width/2,m=n.width/2),this.paddingLeft=Math.max((p-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-f+a)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;s==="start"?(u=0,f=e.height):s==="end"&&(u=n.height,f=0),this.paddingTop=u+a,this.paddingBottom=f+a}}_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(){ie(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++)ee(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=wl(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:s}=this,a=[],l=[],d=Math.floor(n/Cl(n,o));let c=0,u=0,f,p,m,h,g,b,y,S,v,w,x;for(f=0;f<n;f+=d){if(h=e[f].label,g=this._resolveTickFontOptions(f),i.font=b=g.string,y=s[b]=s[b]||{data:{},gc:[]},S=g.lineHeight,v=w=0,!ee(h)&&!se(h))v=So(i,y.data,y.gc,v,h),w=S;else if(se(h))for(p=0,m=h.length;p<m;++p)x=h[p],!ee(x)&&!se(x)&&(v=So(i,y.data,y.gc,v,x),w+=S);a.push(v),l.push(w),c=Math.max(v,c),u=Math.max(w,u)}Ph(s,n);const F=a.indexOf(c),E=l.indexOf(u),M=I=>({width:a[I]||0,height:l[I]||0});return{first:M(0),last:M(n-1),widest:M(F),highest:M(E),widths:a,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 bp(this._alignToPixels?Ht(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=Fh(this.getContext(),e,o))}return this.$context||(this.$context=Eh(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Qe(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=e.autoSkipPadding||0,l=s?s.widest.width+a:0,d=s?s.highest.height+a:0;return this.isHorizontal()?d*o>l*i?l/o:d/i:d*i<l*o?d/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:s,position:a,border:l}=i,d=s.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),p=Un(s),m=[],h=l.setContext(this.getContext()),g=h.display?h.width:0,b=g/2,y=function(V){return Ht(o,V,g)};let S,v,w,x,F,E,M,I,N,C,D,A;if(a==="top")S=y(this.bottom),E=this.bottom-p,I=S-b,C=y(e.top)+b,A=e.bottom;else if(a==="bottom")S=y(this.top),C=e.top,A=y(e.bottom)-b,E=S+b,I=this.top+p;else if(a==="left")S=y(this.right),F=this.right-p,M=S-b,N=y(e.left)+b,D=e.right;else if(a==="right")S=y(this.left),N=e.left,D=y(e.right)-b,F=S+b,M=this.left+p;else if(n==="x"){if(a==="center")S=y((e.top+e.bottom)/2+.5);else if($(a)){const V=Object.keys(a)[0],R=a[V];S=y(this.chart.scales[V].getPixelForValue(R))}C=e.top,A=e.bottom,E=S+b,I=E+p}else if(n==="y"){if(a==="center")S=y((e.left+e.right)/2);else if($(a)){const V=Object.keys(a)[0],R=a[V];S=y(this.chart.scales[V].getPixelForValue(R))}F=S-b,M=F-p,N=e.left,D=e.right}const k=q(i.ticks.maxTicksLimit,f),B=Math.max(1,Math.ceil(f/k));for(v=0;v<f;v+=B){const V=this.getContext(v),R=s.setContext(V),O=l.setContext(V),T=R.lineWidth,U=R.color,W=O.dash||[],j=O.dashOffset,K=R.tickWidth,_=R.tickColor,te=R.tickBorderDash||[],he=R.tickBorderDashOffset;w=Vh(this,v,d),w!==void 0&&(x=Ht(o,w,T),c?F=M=N=D=x:E=I=C=A=x,m.push({tx1:F,ty1:E,tx2:M,ty2:I,x1:N,y1:C,x2:D,y2:A,width:T,color:U,borderDash:W,borderDashOffset:j,tickWidth:K,tickColor:_,tickBorderDash:te,tickBorderDashOffset:he}))}return this._ticksLength=f,this._borderValue=S,m}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:s}=o,a=this.isHorizontal(),l=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=s,p=Un(o.grid),m=p+u,h=f?-u:m,g=-Qe(this.labelRotation),b=[];let y,S,v,w,x,F,E,M,I,N,C,D,A="middle";if(i==="top")F=this.bottom-h,E=this._getXAxisLabelAlignment();else if(i==="bottom")F=this.top+h,E=this._getXAxisLabelAlignment();else if(i==="left"){const B=this._getYAxisLabelAlignment(p);E=B.textAlign,x=B.x}else if(i==="right"){const B=this._getYAxisLabelAlignment(p);E=B.textAlign,x=B.x}else if(n==="x"){if(i==="center")F=(e.top+e.bottom)/2+m;else if($(i)){const B=Object.keys(i)[0],V=i[B];F=this.chart.scales[B].getPixelForValue(V)+m}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-m;else if($(i)){const B=Object.keys(i)[0],V=i[B];x=this.chart.scales[B].getPixelForValue(V)}E=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(d==="start"?A="top":d==="end"&&(A="bottom"));const k=this._getLabelSizes();for(y=0,S=l.length;y<S;++y){v=l[y],w=v.label;const B=s.setContext(this.getContext(y));M=this.getPixelForTick(y)+s.labelOffset,I=this._resolveTickFontOptions(y),N=I.lineHeight,C=se(w)?w.length:1;const V=C/2,R=B.color,O=B.textStrokeColor,T=B.textStrokeWidth;let U=E;a?(x=M,E==="inner"&&(y===S-1?U=this.options.reverse?"left":"right":y===0?U=this.options.reverse?"right":"left":U="center"),i==="top"?c==="near"||g!==0?D=-C*N+N/2:c==="center"?D=-k.highest.height/2-V*N+N:D=-k.highest.height+N/2:c==="near"||g!==0?D=N/2:c==="center"?D=k.highest.height/2-V*N:D=k.highest.height-C*N,f&&(D*=-1),g!==0&&!B.showLabelBackdrop&&(x+=N/2*Math.sin(g))):(F=M,D=(1-C)*N/2);let W;if(B.showLabelBackdrop){const j=Ae(B.backdropPadding),K=k.heights[y],_=k.widths[y];let te=D-j.top,he=0-j.left;switch(A){case"middle":te-=K/2;break;case"bottom":te-=K;break}switch(E){case"center":he-=_/2;break;case"right":he-=_;break;case"inner":y===S-1?he-=_:y>0&&(he-=_/2);break}W={left:he,top:te,width:_+j.width,height:K+j.height,color:B.backdropColor}}b.push({label:w,font:I,textOffset:D,options:{rotation:g,color:R,strokeColor:O,strokeWidth:T,textAlign:U,textBaseline:A,translation:[x,F],backdrop:W}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Qe(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:s}}=this.options,a=this._getLabelSizes(),l=e+s,d=a.widest.width;let c,u;return n==="left"?i?(u=this.right+s,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-l,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+l,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_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:s,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,s,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.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 s,a;const l=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const d=i[s];n.drawOnChartArea&&l({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&l({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),a=o.display?s.width:0;if(!a)return;const l=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,p;this.isHorizontal()?(c=Ht(e,this.left,a)-a/2,u=Ht(e,this.right,l)+l/2,f=p=d):(f=Ht(e,this.top,a)-a/2,p=Ht(e,this.bottom,l)+l/2,c=u=d),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,p),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Co(o,i);const s=this.getLabelItems(e);for(const a of s){const l=a.options,d=a.font,c=a.label,u=a.textOffset;Ut(o,c,0,u,d,l)}i&&wo(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=be(o.font),a=Ae(o.padding),l=o.align;let d=s.lineHeight/2;n==="bottom"||n==="center"||$(n)?(d+=a.bottom,se(o.text)&&(d+=s.lineHeight*(o.text.length-1))):d+=a.top;const{titleX:c,titleY:u,maxWidth:f,rotation:p}=Mh(this,d,n,l);Ut(e,o.text,0,0,s,{color:o.color,maxWidth:f,rotation:p,textAlign:Nh(l,n,i),textBaseline:"middle",translation:[c,u]})}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=q(e.grid&&e.grid.z,-1),i=q(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==qt.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const l=n[s];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 be(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class To{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;Rh(n)&&(o=this.register(n));const i=this.items,s=e.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,Oh(e,a,o),this.override&&pe.override(e.id,e.overrides)),a}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 pe[i]&&(delete pe[i][o],this.override&&delete Lt[o])}}function Oh(t,e,n){const o=An(Object.create(null),[n?pe.get(n):{},pe.get(e),t.defaults]);pe.set(e,o),t.defaultRoutes&&Ih(e,t.defaultRoutes),t.descriptors&&pe.describe(e,t.descriptors)}function Ih(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),s=[t].concat(o).join("."),a=e[n].split("."),l=a.pop(),d=a.join(".");pe.route(s,i,d,l)})}function Rh(t){return"id"in t&&"defaults"in t}class Th{constructor(){this.controllers=new To(We,"datasets",!0),this.elements=new To(dt,"elements"),this.plugins=new To(Object,"plugins"),this.scales=new To(qt,"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 s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):oe(i,a=>{const l=o||this._getRegistryForType(a);this._exec(e,l,a)})})}_exec(e,n,o){const i=jr(e);ie(o["before"+i],[],o),n[e](o),ie(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 Ke=new Th;class zh{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(s,e,n,o);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,o,i){i=i||{};for(const s of e){const a=s.plugin,l=a[o],d=[n,i,s.options];if(ie(l,d,a)===!1&&i.cancelable)return!1}return!0}invalidate(){ee(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=q(o.options&&o.options.plugins,{}),s=Lh(o);return i===!1&&!n?[]:Uh(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(s,a)=>s.filter(l=>!a.some(d=>l.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function Lh(t){const e={},n=[],o=Object.keys(Ke.plugins.items);for(let s=0;s<o.length;s++)n.push(Ke.getPlugin(o[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function Hh(t,e){return!e&&t===!1?null:t===!0?{}:t}function Uh(t,{plugins:e,localIds:n},o,i){const s=[],a=t.getContext();for(const l of e){const d=l.id,c=Hh(o[d],i);c!==null&&s.push({plugin:l,options:jh(t.config,{plugin:l,local:n[d]},c,a)})}return s}function jh(t,{plugin:e,local:n},o,i){const s=t.pluginScopeKeys(e),a=t.getOptionScopes(o,s);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function fi(t,e){const n=pe.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Qh(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Wh(t,e){return t===e?"_index_":"_value_"}function vl(t){if(t==="x"||t==="y"||t==="r")return t}function Yh(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function pi(t,...e){if(vl(t))return t;for(const n of e){const o=n.axis||Yh(n.position)||t.length>1&&vl(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Bl(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Xh(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 Bl(t,"x",n[0])||Bl(t,"y",n[0])}return{}}function Gh(t,e){const n=Lt[t.type]||{scales:{}},o=e.scales||{},i=fi(t.type,e),s=Object.create(null);return Object.keys(o).forEach(a=>{const l=o[a];if(!$(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const d=pi(a,l,Xh(a,t),pe.scales[l.type]),c=Wh(d,i),u=n.scales||{};s[a]=vn(Object.create(null),[{axis:d},l,u[d],u[c]])}),t.data.datasets.forEach(a=>{const l=a.type||t.type,d=a.indexAxis||fi(l,e),u=(Lt[l]||{}).scales||{};Object.keys(u).forEach(f=>{const p=Qh(f,d),m=a[p+"AxisID"]||p;s[m]=s[m]||Object.create(null),vn(s[m],[{axis:p},o[m],u[f]])})}),Object.keys(s).forEach(a=>{const l=s[a];vn(l,[pe.scales[l.type],pe.scale])}),s}function Dl(t){const e=t.options||(t.options={});e.plugins=q(e.plugins,{}),e.scales=Gh(t,e)}function Vl(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function qh(t){return t=t||{},t.data=Vl(t.data),Dl(t),t}const Pl=new Map,El=new Set;function zo(t,e){let n=Pl.get(t);return n||(n=e(),Pl.set(t,n),El.add(n)),n}const jn=(t,e,n)=>{const o=At(e,n);o!==void 0&&t.add(o)};class Jh{constructor(e){this._config=qh(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=Vl(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(),Dl(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return zo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return zo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return zo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return zo(`${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:s}=this,a=this._cachedScopes(e,o),l=a.get(n);if(l)return l;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>jn(d,e,f))),u.forEach(f=>jn(d,i,f)),u.forEach(f=>jn(d,Lt[s]||{},f)),u.forEach(f=>jn(d,pe,f)),u.forEach(f=>jn(d,Jr,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),El.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Lt[n]||{},pe.datasets[n]||{},{type:n},pe,Jr]}resolveNamedOptions(e,n,o,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:l}=Fl(this._resolverCache,e,i);let d=a;if(Zh(a,n)){s.$shared=!1,o=vt(o)?o():o;const c=this.createResolver(e,o,l);d=rn(a,o,c)}for(const c of n)s[c]=d[c];return s}createResolver(e,n,o=[""],i){const{resolver:s}=Fl(this._resolverCache,e,o);return $(n)?rn(s,n,void 0,i):s}}function Fl(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let s=o.get(i);return s||(s={resolver:_r(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,s)),s}const Kh=t=>$(t)&&Object.getOwnPropertyNames(t).some(e=>vt(t[e]));function Zh(t,e){const{isScriptable:n,isIndexable:o}=Ma(t);for(const i of e){const s=n(i),a=o(i),l=(a||s)&&t[i];if(s&&(vt(l)||Kh(l))||a&&se(l))return!0}return!1}var $h="4.4.2";const _h=["top","bottom","left","right","chartArea"];function Nl(t,e){return t==="top"||t==="bottom"||_h.indexOf(t)===-1&&e==="x"}function Ml(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function Ol(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ie(n&&n.onComplete,[t],e)}function eg(t){const e=t.chart,n=e.options.animation;ie(n&&n.onProgress,[t],e)}function Il(t){return ni()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Lo={},Rl=t=>{const e=Il(t);return Object.values(Lo).filter(n=>n.canvas===e).pop()};function tg(t,e,n){const o=Object.keys(t);for(const i of o){const s=+i;if(s>=e){const a=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=a)}}}function ng(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Ho(t,e,n){return t.options.clip?t[n]:e[n]}function og(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Ho(n,e,"left"),right:Ho(n,e,"right"),top:Ho(o,e,"top"),bottom:Ho(o,e,"bottom")}:e}class Ye{static register(...e){Ke.add(...e),Tl()}static unregister(...e){Ke.remove(...e),Tl()}constructor(e,n){const o=this.config=new Jh(n),i=Il(e),s=Rl(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||xh(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,a.aspectRatio),d=l&&l.canvas,c=d&&d.height,u=d&&d.width;if(this.id=ip(),this.ctx=l,this.canvas=d,this.width=u,this.height=c,this._options=a,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 zh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Sp(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Lo[this.id]=this,!l||!d){console.error("Failed to create chart: can't acquire context from the given item");return}lt.listen(this,"complete",Ol),lt.listen(this,"progress",eg),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return ee(e)?n&&s?s: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 Ke}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ua(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ea(this.canvas,this.ctx),this}stop(){return lt.stop(this),this}resize(e,n){lt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,n,s),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ua(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),ie(o.onResize,[this,a],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};oe(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((a,l)=>(a[l]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const l=n[a],d=pi(a,l),c=d==="r",u=d==="x";return{options:l,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),oe(s,a=>{const l=a.options,d=l.id,c=pi(d,l),u=q(l.type,a.dtype);(l.position===void 0||Nl(l.position,c)!==Nl(a.dposition))&&(l.position=a.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const p=Ke.getScale(u);f=new p({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(l,e)}),oe(i,(a,l)=>{a||delete o[l]}),oe(o,a=>{ve.configure(this,a,a.options),ve.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(Ml("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(s=>s===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 s=n[o];let a=this.getDatasetMeta(o);const l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=l,a.indexAxis=s.indexAxis||fi(l,this.options),a.order=s.order||0,a.index=o,a.label=""+s.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const d=Ke.getController(l),{datasetElementType:c,dataElementType:u}=pe.datasets[l];Object.assign(d,{dataElementType:Ke.getElement(u),datasetElementType:c&&Ke.getElement(c)}),a.controller=new d(this,o),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){oe(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 s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),p=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(p),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),i||oe(s,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Ml("z","_idx"));const{_active:l,_lastEvent:d}=this;d?this._eventHandler(d,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){oe(this.scales,e=>{ve.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!fa(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:s}of n){const a=o==="_removeElements"?-s:s;tg(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(e.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!fa(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ve.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],oe(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),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,vt(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&&(lt.has(this)?this.attached&&!lt.running(this)&&lt.start(this):(this.draw(),Ol({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,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!e||a.visible)&&o.push(a)}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,s=og(e,this.chartArea),a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Co(n,{left:o.left===!1?0:s.left-o.left,right:o.right===!1?this.width:s.right+o.right,top:o.top===!1?0:s.top-o.top,bottom:o.bottom===!1?this.height:s.bottom+o.bottom}),e.controller.draw(),i&&wo(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return at(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const s=_m.modes[n];return typeof s=="function"?s(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(s=>s&&s._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=Dt(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",s=this.getDatasetMeta(e),a=s.controller._resolveAnimations(void 0,i);Bn(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),a.update(s,{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(),lt.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(),Ea(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Lo[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=(s,a)=>{n.addEventListener(this,s,a),e[s]=a},i=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};oe(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},s=(d,c)=>{this.canvas&&this.resize(d,c)};let a;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",s),o("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){oe(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},oe(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let s,a,l,d;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),l=0,d=e.length;l<d;++l){a=e[l];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:s,index:a})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!go(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,s=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),a=s(n,e),l=o?e:s(e,n);a.length&&this.updateHoverStyle(a,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=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:s}=this,a=n,l=this._getActiveElements(e,i,o,a),d=up(e),c=ng(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ie(s.onHover,[e,l,this],this),d&&ie(s.onClick,[e,l,this],this));const u=!go(l,i);return(u||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}H(Ye,"defaults",pe),H(Ye,"instances",Lo),H(Ye,"overrides",Lt),H(Ye,"registry",Ke),H(Ye,"version",$h),H(Ye,"getChart",Rl);function Tl(){return oe(Ye.instances,t=>t._plugins.invalidate())}function rg(t,e,n){const{startAngle:o,pixelMargin:i,x:s,y:a,outerRadius:l,innerRadius:d}=e;let c=i/l;t.beginPath(),t.arc(s,a,l,o-c,n+c),d>i?(c=i/d,t.arc(s,a,d,n+c,o-c,!0)):t.arc(s,a,i,n+me,o-me),t.closePath(),t.clip()}function ig(t){return $r(t,["outerStart","outerEnd","innerStart","innerEnd"])}function sg(t,e,n,o){const i=ig(t.options.borderRadius),s=(n-e)/2,a=Math.min(s,o*e/2),l=d=>{const c=(n-Math.min(s,d))*o/2;return ke(d,0,Math.min(s,c))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:ke(i.innerStart,0,a),innerEnd:ke(i.innerEnd,0,a)}}function ln(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Uo(t,e,n,o,i,s){const{x:a,y:l,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),p=u>0?u+o+n+c:0;let m=0;const h=i-d;if(o){const B=u>0?u-o:0,V=f>0?f-o:0,R=(B+V)/2,O=R!==0?h*R/(R+o):h;m=(h-O)/2}const g=Math.max(.001,h*f-n/ae)/f,b=(h-g)/2,y=d+b+m,S=i-b-m,{outerStart:v,outerEnd:w,innerStart:x,innerEnd:F}=sg(e,p,f,S-y),E=f-v,M=f-w,I=y+v/E,N=S-w/M,C=p+x,D=p+F,A=y+x/C,k=S-F/D;if(t.beginPath(),s){const B=(I+N)/2;if(t.arc(a,l,f,I,B),t.arc(a,l,f,B,N),w>0){const T=ln(M,N,a,l);t.arc(T.x,T.y,w,N,S+me)}const V=ln(D,S,a,l);if(t.lineTo(V.x,V.y),F>0){const T=ln(D,k,a,l);t.arc(T.x,T.y,F,S+me,k+Math.PI)}const R=(S-F/p+(y+x/p))/2;if(t.arc(a,l,p,S-F/p,R,!0),t.arc(a,l,p,R,y+x/p,!0),x>0){const T=ln(C,A,a,l);t.arc(T.x,T.y,x,A+Math.PI,y-me)}const O=ln(E,y,a,l);if(t.lineTo(O.x,O.y),v>0){const T=ln(E,I,a,l);t.arc(T.x,T.y,v,y-me,I)}}else{t.moveTo(a,l);const B=Math.cos(I)*f+a,V=Math.sin(I)*f+l;t.lineTo(B,V);const R=Math.cos(N)*f+a,O=Math.sin(N)*f+l;t.lineTo(R,O)}t.closePath()}function ag(t,e,n,o,i){const{fullCircles:s,startAngle:a,circumference:l}=e;let d=e.endAngle;if(s){Uo(t,e,n,o,d,i);for(let c=0;c<s;++c)t.fill();isNaN(l)||(d=a+(l%le||le))}return Uo(t,e,n,o,d,i),t.fill(),d}function lg(t,e,n,o,i){const{fullCircles:s,startAngle:a,circumference:l,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:p}=d,m=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=p,m?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let h=e.endAngle;if(s){Uo(t,e,n,o,h,i);for(let g=0;g<s;++g)t.stroke();isNaN(l)||(h=a+(l%le||le))}m&&rg(t,e,h),s||(Uo(t,e,n,o,h,i),t.stroke())}class Qn extends dt{constructor(n){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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 s=this.getProps(["x","y"],i),{angle:a,distance:l}=ba(s,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),m=(this.options.spacing+this.options.borderWidth)/2,g=q(p,c-d)>=le||Vn(a,d,c),b=it(l,u+m,f+m);return g&&b}getCenterPoint(n){const{x:o,y:i,startAngle:s,endAngle:a,innerRadius:l,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(s+a)/2,p=(l+d+u+c)/2;return{x:o+Math.cos(f)*p,y:i+Math.sin(f)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,s=(o.offset||0)/4,a=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>le?Math.floor(i/le):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*s,Math.sin(d)*s);const c=1-Math.sin(Math.min(ae,i||0)),u=s*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,ag(n,this,u,a,l),lg(n,this,u,a,l),n.restore()}}H(Qn,"id","arc"),H(Qn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H(Qn,"defaultRoutes",{backgroundColor:"backgroundColor"}),H(Qn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function zl(t,e,n=e){t.lineCap=q(n.borderCapStyle,e.borderCapStyle),t.setLineDash(q(n.borderDash,e.borderDash)),t.lineDashOffset=q(n.borderDashOffset,e.borderDashOffset),t.lineJoin=q(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=q(n.borderWidth,e.borderWidth),t.strokeStyle=q(n.borderColor,e.borderColor)}function dg(t,e,n){t.lineTo(n.x,n.y)}function cg(t){return t.stepped?Mp:t.tension||t.cubicInterpolationMode==="monotone"?Op:dg}function Ll(t,e,n={}){const o=t.length,{start:i=0,end:s=o-1}=n,{start:a,end:l}=e,d=Math.max(i,a),c=Math.min(s,l),u=i<a&&s<a||i>l&&s>l;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function ug(t,e,n,o){const{points:i,options:s}=e,{count:a,start:l,loop:d,ilen:c}=Ll(i,n,o),u=cg(s);let{move:f=!0,reverse:p}=o||{},m,h,g;for(m=0;m<=c;++m)h=i[(l+(p?c-m:m))%a],!h.skip&&(f?(t.moveTo(h.x,h.y),f=!1):u(t,g,h,p,s.stepped),g=h);return d&&(h=i[(l+(p?c:0))%a],u(t,g,h,p,s.stepped)),!!d}function fg(t,e,n,o){const i=e.points,{count:s,start:a,ilen:l}=Ll(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,p,m,h,g,b,y;const S=w=>(a+(c?l-w:w))%s,v=()=>{g!==b&&(t.lineTo(u,b),t.lineTo(u,g),t.lineTo(u,y))};for(d&&(m=i[S(0)],t.moveTo(m.x,m.y)),p=0;p<=l;++p){if(m=i[S(p)],m.skip)continue;const w=m.x,x=m.y,F=w|0;F===h?(x<g?g=x:x>b&&(b=x),u=(f*u+w)/++f):(v(),t.lineTo(w,x),h=F,f=0,g=b=x),y=x}v()}function mi(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?fg:ug}function pg(t){return t.stepped?fm:t.tension||t.cubicInterpolationMode==="monotone"?pm:Yt}function mg(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),zl(t,e.options),t.stroke(i)}function hg(t,e,n,o){const{segments:i,options:s}=e,a=mi(e);for(const l of i)zl(t,s,l.style),t.beginPath(),a(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const gg=typeof Path2D=="function";function bg(t,e,n,o){gg&&!e.options.segment?mg(t,e,n,o):hg(t,e,n,o)}class Vt extends dt{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;rm(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=km(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],s=this.points,a=qa(this,{property:n,start:i,end:i});if(!a.length)return;const l=[],d=pg(o);let c,u;for(c=0,u=a.length;c<u;++c){const{start:f,end:p}=a[c],m=s[f],h=s[p];if(m===h){l.push(m);continue}const g=Math.abs((i-m[n])/(h[n]-m[n])),b=d(m,h,g,o.stepped);b[n]=e[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(e,n,o){return mi(this)(e,this,n,o)}path(e,n,o){const i=this.segments,s=mi(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)a&=s(e,this,l,{start:n,end:n+o-1});return!!a}draw(e,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),bg(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(Vt,"id","line"),H(Vt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(Vt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(Vt,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Hl(t,e,n,o){const i=t.options,{[n]:s}=t.getProps([n],o);return Math.abs(e-s)<i.radius+i.hitRadius}class jo extends dt{constructor(n){super();H(this,"parsed");H(this,"skip");H(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 s=this.options,{x:a,y:l}=this.getProps(["x","y"],i);return Math.pow(n-a,2)+Math.pow(o-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,o){return Hl(this,n,"x",o)}inYRange(n,o){return Hl(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||!at(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Zr(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}H(jo,"id","point"),H(jo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(jo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Ul(t,e){const{x:n,y:o,base:i,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let l,d,c,u,f;return t.horizontal?(f=a/2,l=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=s/2,l=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:l,top:c,right:d,bottom:u}}function Pt(t,e,n,o){return t?0:ke(e,n,o)}function yg(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,s=Na(o);return{t:Pt(i.top,s.top,0,n),r:Pt(i.right,s.right,0,e),b:Pt(i.bottom,s.bottom,0,n),l:Pt(i.left,s.left,0,e)}}function kg(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=jt(i),a=Math.min(e,n),l=t.borderSkipped,d=o||$(i);return{topLeft:Pt(!d||l.top||l.left,s.topLeft,0,a),topRight:Pt(!d||l.top||l.right,s.topRight,0,a),bottomLeft:Pt(!d||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Pt(!d||l.bottom||l.right,s.bottomRight,0,a)}}function xg(t){const e=Ul(t),n=e.right-e.left,o=e.bottom-e.top,i=yg(t,n/2,o/2),s=kg(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:s},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,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function hi(t,e,n,o){const i=e===null,s=n===null,l=t&&!(i&&s)&&Ul(t,o);return l&&(i||it(e,l.left,l.right))&&(s||it(n,l.top,l.bottom))}function Sg(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Cg(t,e){t.rect(e.x,e.y,e.w,e.h)}function gi(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-o,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+s,h:t.h+a,radius:t.radius}}class Qo extends dt{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:s,outer:a}=xg(this),l=Sg(a.radius)?Nn:Cg;e.save(),(a.w!==s.w||a.h!==s.h)&&(e.beginPath(),l(e,gi(a,n,s)),e.clip(),l(e,gi(s,-n,a)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,gi(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return hi(this,e,n,o)}inXRange(e,n){return hi(this,e,null,n)}inYRange(e,n){return hi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}H(Qo,"id","bar"),H(Qo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(Qo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var wg=Object.freeze({__proto__:null,ArcElement:Qn,BarElement:Qo,LineElement:Vt,PointElement:jo});const bi=["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)"],jl=bi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ql(t){return bi[t%bi.length]}function Wl(t){return jl[t%jl.length]}function Ag(t,e){return t.borderColor=Ql(e),t.backgroundColor=Wl(e),++e}function vg(t,e){return t.backgroundColor=t.data.map(()=>Ql(e++)),e}function Bg(t,e){return t.backgroundColor=t.data.map(()=>Wl(e++)),e}function Dg(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Xt?e=vg(n,e):i instanceof In?e=Bg(n,e):i&&(e=Ag(n,e))}}function Yl(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function Vg(t){return t&&(t.borderColor||t.backgroundColor)}var Pg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Yl(o)||Vg(i)||s&&Yl(s)))return;const a=Dg(t);o.forEach(a)}};function Eg(t,e,n,o,i){const s=i.samples||o;if(s>=n)return t.slice(e,e+n);const a=[],l=(n-2)/(s-2);let d=0;const c=e+n-1;let u=e,f,p,m,h,g;for(a[d++]=t[u],f=0;f<s-2;f++){let b=0,y=0,S;const v=Math.floor((f+1)*l)+1+e,w=Math.min(Math.floor((f+2)*l)+1,n)+e,x=w-v;for(S=v;S<w;S++)b+=t[S].x,y+=t[S].y;b/=x,y/=x;const F=Math.floor(f*l)+1+e,E=Math.min(Math.floor((f+1)*l)+1,n)+e,{x:M,y:I}=t[u];for(m=h=-1,S=F;S<E;S++)h=.5*Math.abs((M-b)*(t[S].y-I)-(M-t[S].x)*(y-I)),h>m&&(m=h,p=t[S],g=S);a[d++]=p,u=g}return a[d++]=t[c],a}function Fg(t,e,n,o){let i=0,s=0,a,l,d,c,u,f,p,m,h,g;const b=[],y=e+n-1,S=t[e].x,w=t[y].x-S;for(a=e;a<e+n;++a){l=t[a],d=(l.x-S)/w*o,c=l.y;const x=d|0;if(x===u)c<h?(h=c,f=a):c>g&&(g=c,p=a),i=(s*i+l.x)/++s;else{const F=a-1;if(!ee(f)&&!ee(p)){const E=Math.min(f,p),M=Math.max(f,p);E!==m&&E!==F&&b.push({...t[E],x:i}),M!==m&&M!==F&&b.push({...t[M],x:i})}a>0&&F!==m&&b.push(t[F]),b.push(l),u=x,s=0,h=g=c,f=p=m=a}}return b}function Xl(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 Gl(t){t.data.datasets.forEach(e=>{Xl(e)})}function Ng(t,e){const n=e.length;let o=0,i;const{iScale:s}=t,{min:a,max:l,minDefined:d,maxDefined:c}=s.getUserBounds();return d&&(o=ke(st(e,s.axis,a).lo,0,n-1)),c?i=ke(st(e,s.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Mg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Gl(t);return}const o=t.width;t.data.datasets.forEach((i,s)=>{const{_data:a,indexAxis:l}=i,d=t.getDatasetMeta(s),c=a||i.data;if(Mn([l,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:p}=Ng(d,c);const m=n.threshold||4*o;if(p<=m){Xl(i);return}ee(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let h;switch(n.algorithm){case"lttb":h=Eg(c,f,p,o,n);break;case"min-max":h=Fg(c,f,p,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=h})},destroy(t){Gl(t)}};function Og(t,e,n){const o=t.segments,i=t.points,s=e.points,a=[];for(const l of o){let{start:d,end:c}=l;c=ki(d,c,i);const u=yi(n,i[d],i[c],l.loop);if(!e.segments){a.push({source:l,target:u,start:i[d],end:i[c]});continue}const f=qa(e,u);for(const p of f){const m=yi(n,s[p.start],s[p.end],p.loop),h=Ga(l,i,m);for(const g of h)a.push({source:g,target:p,start:{[n]:ql(u,m,"start",Math.max)},end:{[n]:ql(u,m,"end",Math.min)}})}}return a}function yi(t,e,n,o){if(o)return;let i=e[t],s=n[t];return t==="angle"&&(i=Me(i),s=Me(s)),{property:t,start:i,end:s}}function Ig(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:a,end:l})=>{l=ki(a,l,i);const d=i[a],c=i[l];o!==null?(s.push({x:d.x,y:o}),s.push({x:c.x,y:o})):n!==null&&(s.push({x:n,y:d.y}),s.push({x:n,y:c.y}))}),s}function ki(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function ql(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Jl(t,e){let n=[],o=!1;return se(t)?(o=!0,n=t):n=Ig(t,e),n.length?new Vt({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Kl(t){return t&&t.fill!==!1}function Rg(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!fe(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function Tg(t,e,n){const o=Ug(t);if($(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return fe(i)&&Math.floor(i)===i?zg(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function zg(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function Lg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:$(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function Hg(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:$(t)?o=t.value:o=e.getBaseValue(),o}function Ug(t){const e=t.options,n=e.fill;let o=q(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function jg(t){const{scale:e,index:n,line:o}=t,i=[],s=o.segments,a=o.points,l=Qg(e,n);l.push(Jl({x:null,y:e.bottom},o));for(let d=0;d<s.length;d++){const c=s[d];for(let u=c.start;u<=c.end;u++)Wg(i,a[u],l)}return new Vt({points:i,options:{}})}function Qg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function Wg(t,e,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:l,point:d}=Yg(s,e,"x");if(!(!d||a&&l)){if(a)o.unshift(d);else if(t.push(d),!l)break}}t.push(...o)}function Yg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],s=t.segments,a=t.points;let l=!1,d=!1;for(let c=0;c<s.length;c++){const u=s[c],f=a[u.start][n],p=a[u.end][n];if(it(i,f,p)){l=i===f,d=i===p;break}}return{first:l,last:d,point:o}}class Zl{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:le},e.arc(i,s,a,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function Xg(t){const{chart:e,fill:n,line:o}=t;if(fe(n))return Gg(e,n);if(n==="stack")return jg(t);if(n==="shape")return!0;const i=qg(t);return i instanceof Zl?i:Jl(i,o)}function Gg(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function qg(t){return(t.scale||{}).getPointPositionForValue?Kg(t):Jg(t)}function Jg(t){const{scale:e={},fill:n}=t,o=Lg(n,e);if(fe(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function Kg(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,s=o.reverse?e.max:e.min,a=Hg(n,e,s),l=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,s);return new Zl({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(a)})}for(let d=0;d<i;++d)l.push(e.getPointPositionForValue(d,a));return l}function xi(t,e,n){const o=Xg(e),{line:i,scale:s,axis:a}=e,l=i.options,d=l.fill,c=l.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(Co(t,n),Zg(t,{line:i,target:o,above:u,below:f,area:n,scale:s,axis:a}),wo(t))}function Zg(t,e){const{line:n,target:o,above:i,below:s,area:a,scale:l}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&s!==i&&($l(t,o,a.top),_l(t,{line:n,target:o,color:i,scale:l,property:d}),t.restore(),t.save(),$l(t,o,a.bottom)),_l(t,{line:n,target:o,color:s,scale:l,property:d}),t.restore()}function $l(t,e,n){const{segments:o,points:i}=e;let s=!0,a=!1;t.beginPath();for(const l of o){const{start:d,end:c}=l,u=i[d],f=i[ki(d,c,i)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),a=!!e.pathSegment(t,l,{move:a}),a?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function _l(t,e){const{line:n,target:o,property:i,color:s,scale:a}=e,l=Og(n,o,i);for(const{source:d,target:c,start:u,end:f}of l){const{style:{backgroundColor:p=s}={}}=d,m=o!==!0;t.save(),t.fillStyle=p,$g(t,a,m&&yi(i,u,f)),t.beginPath();const h=!!n.pathSegment(t,d);let g;if(m){h?t.closePath():ed(t,o,f,i);const b=!!o.pathSegment(t,c,{move:h,reverse:!0});g=h&&b,g||ed(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function $g(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:s,start:a,end:l}=n||{};s==="x"&&(t.beginPath(),t.rect(a,o,l-a,i-o),t.clip())}function ed(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var _g={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let s,a,l,d;for(a=0;a<o;++a)s=t.getDatasetMeta(a),l=s.dataset,d=null,l&&l.options&&l instanceof Vt&&(d={visible:t.isDatasetVisible(a),index:a,fill:Tg(l,a,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=d,i.push(d);for(a=0;a<o;++a)d=i[a],!(!d||d.fill===!1)&&(d.fill=Rg(i,a,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let a=i.length-1;a>=0;--a){const l=i[a].$filler;l&&(l.line.updateControlPoints(s,l.axis),o&&l.fill&&xi(t.ctx,l,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;Kl(s)&&xi(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Kl(o)||n.drawTime!=="beforeDatasetDraw"||xi(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const td=(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)}},e0=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class nd extends dt{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=ie(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=be(o.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=td(o,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,s,l,d)+10):(u=this.maxHeight,c=this._fitCols(a,i,l,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:s,maxWidth:a,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+l;let f=e;s.textAlign="left",s.textBaseline="middle";let p=-1,m=-u;return this.legendItems.forEach((h,g)=>{const b=o+n/2+s.measureText(h.text).width;(g===0||c[c.length-1]+b+2*l>a)&&(f+=u,c[c.length-(g>0?0:1)]=0,m+=u,p++),d[g]={left:0,top:m,row:p,width:b,height:i},c[c.length-1]+=b+l}),f}_fitCols(e,n,o,i){const{ctx:s,maxHeight:a,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-e;let f=l,p=0,m=0,h=0,g=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:S,itemHeight:v}=t0(o,n,s,b,i);y>0&&m+v+2*l>u&&(f+=p+l,c.push({width:p,height:m}),h+=p+l,g++,p=m=0),d[y]={left:h,top:m,col:g,width:S,height:v},p=Math.max(p,S),m+=v+l}),f+=p,c.push({width:p,height:m}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,a=an(s,this.left,this.width);if(this.isHorizontal()){let l=0,d=we(o,this.left+i,this.right-this.lineWidths[l]);for(const c of n)l!==c.row&&(l=c.row,d=we(o,this.left+i,this.right-this.lineWidths[l])),c.top+=this.top+e+i,c.left=a.leftForLtr(a.x(d),c.width),d+=c.width+i}else{let l=0,d=we(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const c of n)c.col!==l&&(l=c.col,d=we(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),c.top=d,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Co(e,this),this._draw(),wo(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:a}=e,l=pe.color,d=an(e.rtl,this.left,this.width),c=be(a.font),{padding:u}=a,f=c.size,p=f/2;let m;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:h,boxHeight:g,itemHeight:b}=td(a,f),y=function(F,E,M){if(isNaN(h)||h<=0||isNaN(g)||g<0)return;i.save();const I=q(M.lineWidth,1);if(i.fillStyle=q(M.fillStyle,l),i.lineCap=q(M.lineCap,"butt"),i.lineDashOffset=q(M.lineDashOffset,0),i.lineJoin=q(M.lineJoin,"miter"),i.lineWidth=I,i.strokeStyle=q(M.strokeStyle,l),i.setLineDash(q(M.lineDash,[])),a.usePointStyle){const N={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:I},C=d.xPlus(F,h/2),D=E+p;Fa(i,N,C,D,a.pointStyleWidth&&h)}else{const N=E+Math.max((f-g)/2,0),C=d.leftForLtr(F,h),D=jt(M.borderRadius);i.beginPath(),Object.values(D).some(A=>A!==0)?Nn(i,{x:C,y:N,w:h,h:g,radius:D}):i.rect(C,N,h,g),i.fill(),I!==0&&i.stroke()}i.restore()},S=function(F,E,M){Ut(i,M.text,F,E+b/2,c,{strikethrough:M.hidden,textAlign:d.textAlign(M.textAlign)})},v=this.isHorizontal(),w=this._computeTitleHeight();v?m={x:we(s,this.left+u,this.right-o[0]),y:this.top+u+w,line:0}:m={x:this.left+u,y:we(s,this.top+w+u,this.bottom-n[0].height),line:0},Qa(this.ctx,e.textDirection);const x=b+u;this.legendItems.forEach((F,E)=>{i.strokeStyle=F.fontColor,i.fillStyle=F.fontColor;const M=i.measureText(F.text).width,I=d.textAlign(F.textAlign||(F.textAlign=a.textAlign)),N=h+p+M;let C=m.x,D=m.y;d.setWidth(this.width),v?E>0&&C+N+u>this.right&&(D=m.y+=x,m.line++,C=m.x=we(s,this.left+u,this.right-o[m.line])):E>0&&D+x>this.bottom&&(C=m.x=C+n[m.line].width+u,m.line++,D=m.y=we(s,this.top+w+u,this.bottom-n[m.line].height));const A=d.x(C);if(y(A,D,F),C=Cp(I,C+h+p,v?C+N:this.right,e.rtl),S(d.x(C),D,F),v)m.x+=N+u;else if(typeof F.text!="string"){const k=c.lineHeight;m.y+=od(F,k)+u}else m.y+=x}),Wa(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=be(n.font),i=Ae(n.padding);if(!n.display)return;const s=an(e.rtl,this.left,this.width),a=this.ctx,l=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+c,f=we(e.align,f,this.right-p);else{const h=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);u=c+we(e.align,this.top,this.bottom-h-e.labels.padding-this._computeTitleHeight())}const m=we(l,f,f+p);a.textAlign=s.textAlign(Xr(l)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,Ut(a,n.text,m,u,o)}_computeTitleHeight(){const e=this.options.title,n=be(e.font),o=Ae(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,s;if(it(e,this.left,this.right)&&it(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],it(e,i.left,i.left+i.width)&&it(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!r0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=e0(i,o);i&&!s&&ie(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&ie(n.onHover,[e,o,this],this)}else o&&ie(n.onClick,[e,o,this],this)}}function t0(t,e,n,o,i){const s=n0(o,t,e,n),a=o0(i,o,e.lineHeight);return{itemWidth:s,itemHeight:a}}function n0(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),e+n.size/2+o.measureText(i).width}function o0(t,e,n){let o=t;return typeof e.text!="string"&&(o=od(e,n)),o}function od(t,e){const n=t.text?t.text.length:0;return e*n}function r0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var i0={id:"legend",_element:nd,start(t,e,n){const o=t.legend=new nd({ctx:t.ctx,options:n,chart:t});ve.configure(t,o,n),ve.addBox(t,o)},stop(t){ve.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;ve.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:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=Ae(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:d.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 Si extends dt{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=se(o.text)?o.text.length:1;this._padding=Ae(o.padding);const s=i*be(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:s,options:a}=this,l=a.align;let d=0,c,u,f;return this.isHorizontal()?(u=we(l,o,s),f=n+e,c=s-o):(a.position==="left"?(u=o+e,f=we(l,i,n),d=ae*-.5):(u=s-e,f=we(l,n,i),d=ae*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=be(n.font),s=o.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:d,rotation:c}=this._drawArgs(s);Ut(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Xr(n.align),textBaseline:"middle",translation:[a,l]})}}function s0(t,e){const n=new Si({ctx:t.ctx,options:e,chart:t});ve.configure(t,n,e),ve.addBox(t,n),t.titleBlock=n}var a0={id:"title",_element:Si,start(t,e,n){s0(t,n)},stop(t){const e=t.titleBlock;ve.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;ve.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 Wo=new WeakMap;var l0={id:"subtitle",start(t,e,n){const o=new Si({ctx:t.ctx,options:n,chart:t});ve.configure(t,o,n),ve.addBox(t,o),Wo.set(t,o)},stop(t){ve.removeBox(t,Wo.get(t)),Wo.delete(t)},beforeUpdate(t,e,n){const o=Wo.get(t);ve.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 Wn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const d=l.tooltipPosition();o.add(d.x),i+=d.y,++s}}return{x:[...o].reduce((l,d)=>l+d)/o.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,s,a,l;for(s=0,a=t.length;s<a;++s){const d=t[s].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=Wr(e,c);u<i&&(i=u,l=d)}}if(l){const d=l.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ze(t,e){return e&&(se(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ct(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
24
+ */class Cm{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const s=n.listeners[i],a=n.duration;s.forEach(l=>l({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(o-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Sa.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 s=o.items;let a=s.length-1,l=!1,d;for(;a>=0;--a)d=s[a],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),l=!0):(s[a]=s[s.length-1],s.pop());l&&(i.draw(),this._notify(i,o,e,"progress")),s.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=s.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 lt=new Cm;const Za="transparent",wm={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Da(t||Za),i=o.valid&&Da(e||Za);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Am{constructor(e,n,o,i){const s=n[o];i=Mn([e.to,i,s,e.from]);const a=Mn([e.from,s,i]);this._active=!0,this._fn=e.fn||wm[e.type||typeof a],this._easing=Pn[e.easing]||Pn.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=a,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],s=o-this._start,a=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Mn([e.to,n,i,e.from]),this._from=Mn([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,s=this._from,a=this._loop,l=this._to;let d;if(this._active=s!==l&&(a||n<o),!this._active){this._target[i]=l,this._notify(!0);return}if(n<0){this._target[i]=s;return}d=n/o%2,d=a&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(s,l,d)}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 $a{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!$(e))return;const n=Object.keys(pe.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!$(s))return;const a={};for(const l of n)a[l]=s[l];(se(s.properties)&&s.properties||[i]).forEach(l=>{(l===i||!o.has(l))&&o.set(l,a)})})}_animateOptions(e,n){const o=n.options,i=Bm(e,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&vm(e.options.$animations,o).then(()=>{e.options=o},()=>{}),s}_createAnimations(e,n){const o=this._properties,i=[],s=e.$animations||(e.$animations={}),a=Object.keys(n),l=Date.now();let d;for(d=a.length-1;d>=0;--d){const c=a[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=s[c];const p=o.get(c);if(f)if(p&&f.active()){f.update(p,u,l);continue}else f.cancel();if(!p||!p.duration){e[c]=u;continue}s[c]=f=new Am(p,e,c,u),i.push(f)}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 lt.add(this._chart,o),!0}}function vm(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const s=t[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Bm(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 _a(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:o?s:i,end:o?i:s}}function Dm(t,e,n){if(n===!1)return!1;const o=_a(t,n),i=_a(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function Vm(t){let e,n,o,i;return $(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 el(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function tl(t,e,n,o={}){const i=t.keys,s=o.mode==="single";let a,l,d,c;if(e!==null){for(a=0,l=i.length;a<l;++a){if(d=+i[a],d===n){if(o.all)continue;break}c=t.values[d],fe(c)&&(s||e===0||Je(e)===Je(c))&&(e+=c)}return e}}function Pm(t){const e=Object.keys(t),n=new Array(e.length);let o,i,s;for(o=0,i=e.length;o<i;++o)s=e[o],n[o]={x:s,y:t[s]};return n}function nl(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Em(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Fm(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 Nm(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function ol(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function rl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:l}=o,d=s.axis,c=a.axis,u=Em(s,a,o),f=e.length;let p;for(let m=0;m<f;++m){const h=e[m],{[d]:g,[c]:b}=h,y=h._stacks||(h._stacks={});p=y[c]=Nm(i,u,g),p[l]=b,p._top=ol(p,a,!0,o.type),p._bottom=ol(p,a,!1,o.type);const S=p._visualValues||(p._visualValues={});S[l]=b}}function ri(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Mm(t,e){return Vt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Om(t,e,n){return Vt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function On(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 s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const ii=t=>t==="reset"||t==="none",il=(t,e)=>e?t:Object.assign({},t),Im=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:el(n,!0),values:null};class We{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=nl(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&&On(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,p,m,h)=>f==="x"?p:f==="r"?h:m,s=n.xAxisID=q(o.xAxisID,ri(e,"x")),a=n.yAxisID=q(o.yAxisID,ri(e,"y")),l=n.rAxisID=q(o.rAxisID,ri(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,s,a,l),u=n.vAxisID=i(d,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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&&ka(this._data,this),e._stacked&&On(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if($(n))this._data=Pm(n);else if(o!==n){if(o){ka(o,this);const i=this._cachedMeta;On(i),i._parsed=[]}n&&Object.isExtensible(n)&&xp(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 s=n._stacked;n._stacked=nl(n.vScale,n),n.stack!==o.stack&&(i=!0,On(n),n.stack=o.stack),this._resyncElements(e),(i||s!==n._stacked)&&rl(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:s,_stacked:a}=o,l=s.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,p;if(this._parsing===!1)o._parsed=i,o._sorted=!0,p=i;else{se(i[e])?p=this.parseArrayData(o,i,e,n):$(i[e])?p=this.parseObjectData(o,i,e,n):p=this.parsePrimitiveData(o,i,e,n);const m=()=>f[l]===null||c&&f[l]<c[l];for(u=0;u<n;++u)o._parsed[u+e]=f=p[u],d&&(m()&&(d=!1),c=f);o._sorted=d}a&&rl(this,p)}parsePrimitiveData(e,n,o,i){const{iScale:s,vScale:a}=e,l=s.axis,d=a.axis,c=s.getLabels(),u=s===a,f=new Array(i);let p,m,h;for(p=0,m=i;p<m;++p)h=p+o,f[p]={[l]:u||s.parse(c[h],h),[d]:a.parse(n[h],h)};return f}parseArrayData(e,n,o,i){const{xScale:s,yScale:a}=e,l=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],l[d]={x:s.parse(f[0],u),y:a.parse(f[1],u)};return l}parseObjectData(e,n,o,i){const{xScale:s,yScale:a}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,p,m;for(u=0,f=i;u<f;++u)p=u+o,m=n[p],c[u]={x:s.parse(vt(m,l),p),y:a.parse(vt(m,d),p)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,s=this._cachedMeta,a=n[e.axis],l={keys:el(i,!0),values:n._stacks[e.axis]._visualValues};return tl(l,a,s.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const s=o[n.axis];let a=s===null?NaN:s;const l=i&&o._stacks[n.axis];i&&l&&(i.values=l,a=tl(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&e===o.iScale,a=i.length,l=this._getOtherScale(e),d=Im(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Fm(l);let p,m;function h(){m=i[p];const g=m[l.axis];return!fe(m[e.axis])||u>g||f<g}for(p=0;p<a&&!(!h()&&(this.updateRangeFromParsed(c,e,m,d),s));++p);if(s){for(p=a-1;p>=0;--p)if(!h()){this.updateRangeFromParsed(c,e,m,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][e.axis],fe(a)&&o.push(a);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Vm(q(this.options.clip,Dm(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,a=[],l=this._drawStart||0,d=this._drawCount||i.length-l,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,s,l,d),u=l;u<l+d;++u){const f=i[u];f.hidden||(f.active&&c?a.push(f):f.draw(e,s))}for(u=0;u<a.length;++u)a[u].draw(e,s)}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 s;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];s=a.$context||(a.$context=Om(this.getContext(),e,a)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Mm(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}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",s=this._cachedDataOpts,a=e+"-"+n,l=s[a],d=this.enableOptionSharing&&Bn(o);if(l)return il(l,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],p=c.getOptionScopes(this.getDataset(),u),m=Object.keys(pe.elements[e]),h=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(p,m,h,f);return g.$shared&&(g.$shared=d,s[a]=Object.freeze(il(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),p=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(p,this.getContext(e,o,n))}const c=new $a(i,d&&d.animations);return d&&d._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||ii(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(o),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:a}}updateElement(e,n,o,i){ii(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!ii(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}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,d,c]of this._syncList)this[l](d,c);this._syncList=[];const i=o.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,o=!0){const i=this._cachedMeta,s=i.data,a=e+n;let l;const d=c=>{for(c.length+=n,l=c.length-1;l>=a;l--)c[l]=c[l-n]};for(d(s),l=e;l<a;++l)s[l]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(s,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&&On(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])}}H(We,"defaults",{}),H(We,"datasetElementType",null),H(We,"dataElementType",null);function Rm(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=xa(o.sort((i,s)=>i-s))}return t._cache.$bar}function Tm(t){const e=t.iScale,n=Rm(e,t.type);let o=e._length,i,s,a,l;const d=()=>{a===32767||a===-32768||(Bn(l)&&(o=Math.min(o,Math.abs(a-l)||o)),l=a)};for(i=0,s=n.length;i<s;++i)a=e.getPixelForValue(n[i]),d();for(l=void 0,i=0,s=e.ticks.length;i<s;++i)a=e.getPixelForTick(i),d();return o}function zm(t,e,n,o){const i=n.barThickness;let s,a;return ee(i)?(s=e.min*n.categoryPercentage,a=n.barPercentage):(s=i*o,a=1),{chunk:s/o,ratio:a,start:e.pixels[t]-s/2}}function Lm(t,e,n,o){const i=e.pixels,s=i[t];let a=t>0?i[t-1]:null,l=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;a===null&&(a=s-(l===null?e.end-e.start:l-s)),l===null&&(l=s+s-a);const c=s-(s-Math.min(a,l))/2*d;return{chunk:Math.abs(l-a)/2*d/o,ratio:n.barPercentage,start:c}}function Hm(t,e,n,o){const i=n.parse(t[0],o),s=n.parse(t[1],o),a=Math.min(i,s),l=Math.max(i,s);let d=a,c=l;Math.abs(a)>Math.abs(l)&&(d=l,c=a),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:s,min:a,max:l}}function sl(t,e,n,o){return se(t)?Hm(t,e,n,o):e[n.axis]=n.parse(t,o),e}function al(t,e,n,o){const i=t.iScale,s=t.vScale,a=i.getLabels(),l=i===s,d=[];let c,u,f,p;for(c=n,u=n+o;c<u;++c)p=e[c],f={},f[i.axis]=l||i.parse(a[c],c),d.push(sl(p,f,s,c));return d}function si(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function Um(t,e,n){return t!==0?Je(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function jm(t){let e,n,o,i,s;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:e,top:i,bottom:s}}function Qm(t,e,n,o){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:d,top:c,bottom:u}=jm(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(s[ll(u,a,l,d)]=!0,i=c)),s[ll(i,a,l,d)]=!0,t.borderSkipped=s}function ll(t,e,n,o){return o?(t=Wm(t,e,n),t=dl(t,n,e)):t=dl(t,e,n),t}function Wm(t,e,n){return t===e?n:t===n?e:t}function dl(t,e,n){return t==="start"?e:t==="end"?n:t}function Ym(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Vo extends We{parsePrimitiveData(e,n,o,i){return al(e,n,o,i)}parseArrayData(e,n,o,i){return al(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:s,vScale:a}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=s.axis==="x"?l:d,u=a.axis==="x"?l:d,f=[];let p,m,h,g;for(p=o,m=o+i;p<m;++p)g=n[p],h={},h[s.axis]=s.parse(vt(g,c),p),f.push(sl(vt(g,u),h,a,p));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(e),a=s._custom,l=si(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[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 s=i==="reset",{index:a,_cachedMeta:{vScale:l}}=this,d=l.getBasePixel(),c=l.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:p}=this._getSharedOptions(n,i);for(let m=n;m<n+o;m++){const h=this.getParsed(m),g=s||ee(h[l.axis])?{base:d,head:d}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),y=(h._stacks||{})[l.axis],S={horizontal:c,base:g.base,enableBorderRadius:!y||si(h._custom)||a===y._top||a===y._bottom,x:c?g.head:b.center,y:c?b.center:g.head,height:c?b.size:Math.abs(g.size),width:c?Math.abs(g.size):b.size};p&&(S.options=f||this.resolveDataElementOptions(m,e[m].active?"active":i));const v=S.options||e[m].options;Qm(S,v,y,a),Ym(S,v,u.ratio),this.updateElement(e[m],m,S,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),s=o.options.stacked,a=[],l=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(ee(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&l(d))&&((s===!1||a.indexOf(d.stack)===-1||s===void 0&&d.stack===void 0)&&a.push(d.stack),d.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,a;for(s=0,a=n.data.length;s<a;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const l=e.barThickness;return{min:l||Tm(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:s,minBarLength:a}}=this,l=s||0,d=this.getParsed(e),c=d._custom,u=si(c);let f=d[n.axis],p=0,m=o?this.applyStack(n,d,o):f,h,g;m!==f&&(p=m-f,m=f),u&&(f=c.barStart,m=c.barEnd-c.barStart,f!==0&&Je(f)!==Je(c.barEnd)&&(p=0),p+=f);const b=!ee(s)&&!u?s:p;let y=n.getPixelForValue(b);if(this.chart.getDataVisibility(e)?h=n.getPixelForValue(p+m):h=y,g=h-y,Math.abs(g)<a){g=Um(g,n,l)*a,f===l&&(y-=g/2);const S=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),w=Math.min(S,v),x=Math.max(S,v);y=Math.max(Math.min(y,x),w),h=y+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(h)-n.getValueForPixel(y))}if(y===n.getPixelForValue(l)){const S=Je(g)*n.getLineWidthForValue(l)/2;y+=S,g-=S}return{size:g,base:y,head:h,center:h+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,s=i.skipNull,a=q(i.maxBarThickness,1/0);let l,d;if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?Lm(e,n,i,c):zm(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);l=u.start+u.chunk*f+u.chunk/2,d=Math.min(a,u.chunk*u.ratio)}else l=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(a,n.min*n.ratio);return{base:l-d/2,head:l+d/2,center:l,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&o[s].draw(this._ctx)}}H(Vo,"id","bar"),H(Vo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Vo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Po extends We{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const s=super.parsePrimitiveData(e,n,o,i);for(let a=0;a<s.length;a++)s[a]._custom=this.resolveDataElementOptions(a+o).radius;return s}parseArrayData(e,n,o,i){const s=super.parseArrayData(e,n,o,i);for(let a=0;a<s.length;a++){const l=n[o+a];s[a]._custom=q(l[2],this.resolveDataElementOptions(a+o).radius)}return s}parseObjectData(e,n,o,i){const s=super.parseObjectData(e,n,o,i);for(let a=0;a<s.length;a++){const l=n[o+a];s[a]._custom=q(l&&l.r&&+l.r,this.resolveDataElementOptions(a+o).radius)}return s}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:s}=n,a=this.getParsed(e),l=i.getLabelForValue(a.x),d=s.getLabelForValue(a.y),c=a._custom;return{label:o[e]||"",value:"("+l+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=a.axis,f=l.axis;for(let p=n;p<n+o;p++){const m=e[p],h=!s&&this.getParsed(p),g={},b=g[u]=s?a.getPixelForDecimal(.5):a.getPixelForValue(h[u]),y=g[f]=s?l.getBasePixel():l.getPixelForValue(h[f]);g.skip=isNaN(b)||isNaN(y),c&&(g.options=d||this.resolveDataElementOptions(p,m.active?"active":i),s&&(g.options.radius=0)),this.updateElement(m,p,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=q(o&&o._custom,s),i}}H(Po,"id","bubble"),H(Po,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(Po,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Xm(t,e,n){let o=1,i=1,s=0,a=0;if(e<le){const l=t,d=l+e,c=Math.cos(l),u=Math.sin(l),f=Math.cos(d),p=Math.sin(d),m=(v,w,x)=>Vn(v,l,d,!0)?1:Math.max(w,w*n,x,x*n),h=(v,w,x)=>Vn(v,l,d,!0)?-1:Math.min(w,w*n,x,x*n),g=m(0,c,f),b=m(me,u,p),y=h(ae,c,f),S=h(ae+me,u,p);o=(g-y)/2,i=(b-S)/2,s=-(g+y)/2,a=-(b+S)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:a}}class Xt extends We{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 s=d=>+o[d];if($(o[e])){const{key:d="value"}=this._parsing;s=c=>+vt(o[c],d)}let a,l;for(a=e,l=e+n;a<l;++a)i._parsed[a]=s(a)}}_getRotation(){return Qe(this.options.rotation-90)}_getCircumference(){return Qe(this.options.circumference)}_getRotationExtents(){let e=le,n=-le;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,s=i._getRotation(),a=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(o.width,o.height)-a)/2,0),d=Math.min(sp(this.options.cutout,l),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:m,offsetX:h,offsetY:g}=Xm(f,u,d),b=(o.width-a)/p,y=(o.height-a)/m,S=Math.max(Math.min(b,y)/2,0),v=da(this.options.radius,S),w=Math.max(v*d,0),x=(v-w)/this._getVisibleDatasetWeightTotal();this.offsetX=h*v,this.offsetY=g*v,i.total=this.calculateTotal(),this.outerRadius=v-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,s=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]*s/le)}updateElements(e,n,o,i){const s=i==="reset",a=this.chart,l=a.chartArea,c=a.options.animation,u=(l.left+l.right)/2,f=(l.top+l.bottom)/2,p=s&&c.animateScale,m=p?0:this.innerRadius,h=p?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(n,i);let y=this._getRotation(),S;for(S=0;S<n;++S)y+=this._circumference(S,s);for(S=n;S<n+o;++S){const v=this._circumference(S,s),w=e[S],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+v,circumference:v,outerRadius:h,innerRadius:m};b&&(x.options=g||this.resolveDataElementOptions(S,w.active?"active":i)),y+=v,this.updateElement(w,S,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?le*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=En(n._parsed[e],o.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,s,a,l,d;if(!e){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){a=o.getDatasetMeta(i),e=a.data,l=a.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)d=l.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.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(q(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(Xt,"id","doughnut"),H(Xt,"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"}),H(Xt,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),H(Xt,"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((s,a)=>{const d=e.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class Eo extends We{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:l,count:d}=wa(n,i,a);this._drawStart=l,this._drawCount=d,Aa(n)&&(l=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:c},e),this.updateElements(i,l,d,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:a,vScale:l,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),p=a.axis,m=l.axis,{spanGaps:h,segment:g}=this.options,b=on(h)?h:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||i==="none",S=n+o,v=e.length;let w=n>0&&this.getParsed(n-1);for(let x=0;x<v;++x){const F=e[x],E=y?F:{};if(x<n||x>=S){E.skip=!0;continue}const M=this.getParsed(x),I=ee(M[m]),N=E[p]=a.getPixelForValue(M[p],x),C=E[m]=s||I?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,M,d):M[m],x);E.skip=isNaN(N)||isNaN(C)||I,E.stop=x>0&&Math.abs(M[p]-w[p])>b,g&&(E.parsed=M,E.raw=c.data[x]),f&&(E.options=u||this.resolveDataElementOptions(x,F.active?"active":i)),y||this.updateElement(F,x,E,i),w=M}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}H(Eo,"id","line"),H(Eo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Eo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class In extends We{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||[],s=En(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,o,i){return La.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 s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),a=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),l=(s-a)/e.getVisibleDatasetCount();this.outerRadius=s-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,o,i){const s=i==="reset",a=this.chart,d=a.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,p=c.getIndexAngle(0)-.5*ae;let m=p,h;const g=360/this.countVisibleElements();for(h=0;h<n;++h)m+=this._computeAngle(h,i,g);for(h=n;h<n+o;h++){const b=e[h];let y=m,S=m+this._computeAngle(h,i,g),v=a.getDataVisibility(h)?c.getDistanceFromCenterForValue(this.getParsed(h).r):0;m=S,s&&(d.animateScale&&(v=0),d.animateRotate&&(y=S=p));const w={x:u,y:f,innerRadius:0,outerRadius:v,startAngle:y,endAngle:S,options:this.resolveDataElementOptions(h,b.active?"active":i)};this.updateElement(b,h,w,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)?Qe(this.resolveDataElementOptions(e,n).angle||o):0}}H(In,"id","polarArea"),H(In,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(In,"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((s,a)=>{const d=e.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(a),index:a}})}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 ai extends Xt{}H(ai,"id","pie"),H(ai,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Fo extends We{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 La.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(o.points=i,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const l={_loop:!0,_fullLoop:s.length===i.length,options:a};this.updateElement(o,void 0,l,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const s=this._cachedMeta.rScale,a=i==="reset";for(let l=n;l<n+o;l++){const d=e[l],c=this.resolveDataElementOptions(l,d.active?"active":i),u=s.getPointPositionForValue(l,this.getParsed(l).r),f=a?s.xCenter:u.x,p=a?s.yCenter:u.y,m={x:f,y:p,angle:u.angle,skip:isNaN(f)||isNaN(p),options:c};this.updateElement(d,l,m,i)}}}H(Fo,"id","radar"),H(Fo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Fo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class No extends We{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,a=this.getParsed(e),l=i.getLabelForValue(a.x),d=s.getLabelForValue(a.y);return{label:o[e]||"",value:"("+l+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:a}=wa(n,o,i);if(this._drawStart=s,this._drawCount=a,Aa(n)&&(s=0,a=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:d}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!d._decimated,l.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,s,a,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 s=i==="reset",{iScale:a,vScale:l,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),p=this.includeOptions(i,f),m=a.axis,h=l.axis,{spanGaps:g,segment:b}=this.options,y=on(g)?g:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||s||i==="none";let v=n>0&&this.getParsed(n-1);for(let w=n;w<n+o;++w){const x=e[w],F=this.getParsed(w),E=S?x:{},M=ee(F[h]),I=E[m]=a.getPixelForValue(F[m],w),N=E[h]=s||M?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,F,d):F[h],w);E.skip=isNaN(I)||isNaN(N)||M,E.stop=w>0&&Math.abs(F[m]-v[m])>y,b&&(E.parsed=F,E.raw=c.data[w]),p&&(E.options=f||this.resolveDataElementOptions(w,x.active?"active":i)),S||this.updateElement(x,w,E,i),v=F}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let d=n.length-1;d>=0;--d)l=Math.max(l,n[d].size(this.resolveDataElementOptions(d))/2);return l>0&&l}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,a)/2}}H(No,"id","scatter"),H(No,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(No,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Gm=Object.freeze({__proto__:null,BarController:Vo,BubbleController:Po,DoughnutController:Xt,LineController:Eo,PieController:ai,PolarAreaController:In,RadarController:Fo,ScatterController:No});function Gt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class li{constructor(e){H(this,"options");this.options=e||{}}static override(e){Object.assign(li.prototype,e)}init(){}formats(){return Gt()}parse(){return Gt()}format(){return Gt()}add(){return Gt()}diff(){return Gt()}startOf(){return Gt()}endOf(){return Gt()}}var qm={_date:li};function Jm(t,e,n,o){const{controller:i,data:s,_sorted:a}=t,l=i._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&a&&s.length){const d=l._reversePixels?yp:st;if(o){if(i._sharedOptions){const c=s[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(s,e,n-u),p=d(s,e,n+u);return{lo:f.lo,hi:p.hi}}}}else return d(s,e,n)}return{lo:0,hi:s.length-1}}function Rn(t,e,n,o,i){const s=t.getSortedVisibleDatasetMetas(),a=n[e];for(let l=0,d=s.length;l<d;++l){const{index:c,data:u}=s[l],{lo:f,hi:p}=Jm(s[l],e,a,i);for(let m=f;m<=p;++m){const h=u[m];h.skip||o(h,c,m)}}}function Km(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const s=e?Math.abs(o.x-i.x):0,a=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function di(t,e,n,o,i){const s=[];return!i&&!t.isPointInArea(e)||Rn(t,n,e,function(l,d,c){!i&&!at(l,t.chartArea,0)||l.inRange(e.x,e.y,o)&&s.push({element:l,datasetIndex:d,index:c})},!0),s}function Zm(t,e,n,o){let i=[];function s(a,l,d){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],o),{angle:f}=ba(a,{x:e.x,y:e.y});Vn(f,c,u)&&i.push({element:a,datasetIndex:l,index:d})}return Rn(t,n,e,s),i}function $m(t,e,n,o,i,s){let a=[];const l=Km(n);let d=Number.POSITIVE_INFINITY;function c(u,f,p){const m=u.inRange(e.x,e.y,i);if(o&&!m)return;const h=u.getCenterPoint(i);if(!(!!s||t.isPointInArea(h))&&!m)return;const b=l(e,h);b<d?(a=[{element:u,datasetIndex:f,index:p}],d=b):b===d&&a.push({element:u,datasetIndex:f,index:p})}return Rn(t,n,e,c),a}function ci(t,e,n,o,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!o?Zm(t,e,n,i):$m(t,e,n,o,i,s)}function cl(t,e,n,o,i){const s=[],a=n==="x"?"inXRange":"inYRange";let l=!1;return Rn(t,n,e,(d,c,u)=>{d[a](e[n],i)&&(s.push({element:d,datasetIndex:c,index:u}),l=l||d.inRange(e.x,e.y,i))}),o&&!l?[]:s}var _m={evaluateInteractionItems:Rn,modes:{index(t,e,n,o){const i=Wt(e,t),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?di(t,i,s,o,a):ci(t,i,s,!1,o,a),d=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=l[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?di(t,i,s,o,a):ci(t,i,s,!1,o,a);if(l.length>0){const d=l[0].datasetIndex,c=t.getDatasetMeta(d).data;l=[];for(let u=0;u<c.length;++u)l.push({element:c[u],datasetIndex:d,index:u})}return l},point(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return di(t,i,s,o,a)},nearest(t,e,n,o){const i=Wt(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return ci(t,i,s,n.intersect,o,a)},x(t,e,n,o){const i=Wt(e,t);return cl(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Wt(e,t);return cl(t,i,"y",n.intersect,o)}}};const ul=["left","top","right","bottom"];function Tn(t,e){return t.filter(n=>n.pos===e)}function fl(t,e){return t.filter(n=>ul.indexOf(n.pos)===-1&&n.box.axis===e)}function zn(t,e){return t.sort((n,o)=>{const i=e?o:n,s=e?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function eh(t){const e=[];let n,o,i,s,a,l;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:s,options:{stack:a,stackWeight:l=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:l});return e}function th(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!ul.includes(i))continue;const a=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}function nh(t,e){const n=th(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let s,a,l;for(s=0,a=t.length;s<a;++s){l=t[s];const{fullSize:d}=l.box,c=n[l.stack],u=c&&l.stackWeight/c.weight;l.horizontal?(l.width=u?u*o:d&&e.availableWidth,l.height=i):(l.width=o,l.height=u?u*i:d&&e.availableHeight)}return n}function oh(t){const e=eh(t),n=zn(e.filter(c=>c.box.fullSize),!0),o=zn(Tn(e,"left"),!0),i=zn(Tn(e,"right")),s=zn(Tn(e,"top"),!0),a=zn(Tn(e,"bottom")),l=fl(e,"x"),d=fl(e,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(d).concat(a).concat(l),chartArea:Tn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:s.concat(a).concat(l)}}function pl(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function ml(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 rh(t,e,n,o){const{pos:i,box:s}=n,a=t.maxPadding;if(!$(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&ml(a,s.getPadding());const l=Math.max(0,e.outerWidth-pl(a,t,"left","right")),d=Math.max(0,e.outerHeight-pl(a,t,"top","bottom")),c=l!==t.w,u=d!==t.h;return t.w=l,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ih(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 sh(t,e){const n=e.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(e[a],n[a])}),s}return o(t?["left","right"]:["top","bottom"])}function Ln(t,e,n,o){const i=[];let s,a,l,d,c,u;for(s=0,a=t.length,c=0;s<a;++s){l=t[s],d=l.box,d.update(l.width||e.w,l.height||e.h,sh(l.horizontal,e));const{same:f,other:p}=rh(e,n,l,o);c|=f&&i.length,u=u||p,d.fullSize||i.push(l)}return c&&Ln(i,e,n,o)||u}function Mo(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 hl(t,e,n,o){const i=n.padding;let{x:s,y:a}=e;for(const l of t){const d=l.box,c=o[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/c.weight||1;if(l.horizontal){const f=e.w*u,p=c.size||d.height;Bn(c.start)&&(a=c.start),d.fullSize?Mo(d,i.left,a,n.outerWidth-i.right-i.left,p):Mo(d,e.left+c.placed,a,f,p),c.start=a,c.placed+=f,a=d.bottom}else{const f=e.h*u,p=c.size||d.width;Bn(c.start)&&(s=c.start),d.fullSize?Mo(d,s,i.top,p,n.outerHeight-i.bottom-i.top):Mo(d,s,e.top+c.placed,p,f),c.start=s,c.placed+=f,s=d.right}}e.x=s,e.y=a}var ve={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=Ae(t.options.layout.padding),s=Math.max(e-i.width,0),a=Math.max(n-i.height,0),l=oh(t.boxes),d=l.vertical,c=l.horizontal;oe(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/u,hBoxMaxHeight:a/2}),p=Object.assign({},i);ml(p,Ae(o));const m=Object.assign({maxPadding:p,w:s,h:a,x:i.left,y:i.top},i),h=nh(d.concat(c),f);Ln(l.fullSize,m,f,h),Ln(d,m,f,h),Ln(c,m,f,h)&&Ln(d,m,f,h),ih(m),hl(l.leftAndTop,m,f,h),m.x+=m.w,m.y+=m.h,hl(l.rightAndBottom,m,f,h),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},oe(l.chartArea,g=>{const b=g.box;Object.assign(b,t.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class gl{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 ah extends gl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Oo="$chartjs",lh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bl=t=>t===null||t==="";function dh(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[Oo]={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",bl(i)){const s=ja(t,"width");s!==void 0&&(t.width=s)}if(bl(o))if(t.style.height==="")t.height=t.width/(e||2);else{const s=ja(t,"height");s!==void 0&&(t.height=s)}return t}const yl=um?{passive:!0}:!1;function ch(t,e,n){t&&t.addEventListener(e,n,yl)}function uh(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,yl)}function fh(t,e){const n=lh[t.type]||t.type,{x:o,y:i}=Wt(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Io(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function ph(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||Io(l.addedNodes,o),a=a&&!Io(l.removedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function mh(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const l of s)a=a||Io(l.removedNodes,o),a=a&&!Io(l.addedNodes,o);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Hn=new Map;let kl=0;function xl(){const t=window.devicePixelRatio;t!==kl&&(kl=t,Hn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function hh(t,e){Hn.size||window.addEventListener("resize",xl),Hn.set(t,e)}function gh(t){Hn.delete(t),Hn.size||window.removeEventListener("resize",xl)}function bh(t,e,n){const o=t.canvas,i=o&&oi(o);if(!i)return;const s=Ca((l,d)=>{const c=i.clientWidth;n(l,d),c<i.clientWidth&&n()},window),a=new ResizeObserver(l=>{const d=l[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||s(c,u)});return a.observe(i),hh(t,s),a}function ui(t,e,n){n&&n.disconnect(),e==="resize"&&gh(t)}function yh(t,e,n){const o=t.canvas,i=Ca(s=>{t.ctx!==null&&n(fh(s,t))},t);return ch(o,e,i),i}class kh extends gl{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(dh(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[Oo])return!1;const o=n[Oo].initial;["height","width"].forEach(s=>{const a=o[s];ee(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Oo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),a={attach:ph,detach:mh,resize:bh}[n]||yh;i[n]=a(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:ui,detach:ui,resize:ui}[n]||uh)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return cm(e,n,o,i)}isAttached(e){const n=oi(e);return!!(n&&n.isConnected)}}function xh(t){return!ni()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ah:kh}let dt=(Ar=class{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return on(this.x)&&on(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}},H(Ar,"defaults",{}),H(Ar,"defaultRoutes"),Ar);function Sh(t,e){const n=t.options.ticks,o=Ch(t),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?Ah(e):[],a=s.length,l=s[0],d=s[a-1],c=[];if(a>i)return vh(e,c,s,a/i),c;const u=wh(s,e,i);if(a>0){let f,p;const m=a>1?Math.round((d-l)/(a-1)):null;for(Ro(e,c,u,ee(m)?0:l-m,l),f=0,p=a-1;f<p;f++)Ro(e,c,u,s[f],s[f+1]);return Ro(e,c,u,d,ee(m)?e.length:d+m),c}return Ro(e,c,u),c}function Ch(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 wh(t,e,n){const o=Bh(t),i=e.length/n;if(!o)return Math.max(i,1);const s=mp(o);for(let a=0,l=s.length-1;a<l;a++){const d=s[a];if(d>i)return d}return Math.max(i,1)}function Ah(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function vh(t,e,n,o){let i=0,s=n[0],a;for(o=Math.ceil(o),a=0;a<t.length;a++)a===s&&(e.push(t[a]),i++,s=n[i*o])}function Ro(t,e,n,o,i){const s=q(o,0),a=Math.min(q(i,t.length),t.length);let l=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=s;u<0;)l++,u=Math.round(s+l*n);for(c=Math.max(s,0);c<a;c++)c===u&&(e.push(t[c]),l++,u=Math.round(s+l*n))}function Bh(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 Dh=t=>t==="left"?"right":t==="right"?"left":t,Sl=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Cl=(t,e)=>Math.min(e||t,t);function wl(t,e){const n=[],o=t.length/e,i=t.length;let s=0;for(;s<i;s+=o)n.push(t[Math.floor(s)]);return n}function Vh(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),s=t._startPixel,a=t._endPixel,l=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-s,a-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<s-l||d>a+l)))return d}function Ph(t,e){oe(t,n=>{const o=n.gc,i=o.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function Un(t){return t.drawTicks?t.tickLength:0}function Al(t,e){if(!t.display)return 0;const n=be(t.font,e),o=Ae(t.padding);return(se(t.text)?t.text.length:1)*n.lineHeight+o.height}function Eh(t,e){return Vt(t,{scale:e,type:"scale"})}function Fh(t,e,n){return Vt(t,{tick:n,index:e,type:"tick"})}function Nh(t,e,n){let o=Xr(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Dh(o)),o}function Mh(t,e,n,o){const{top:i,left:s,bottom:a,right:l,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,p,m,h;const g=a-i,b=l-s;if(t.isHorizontal()){if(m=we(o,s,l),$(n)){const y=Object.keys(n)[0],S=n[y];h=u[y].getPixelForValue(S)+g-e}else n==="center"?h=(c.bottom+c.top)/2+g-e:h=Sl(t,n,e);p=l-s}else{if($(n)){const y=Object.keys(n)[0],S=n[y];m=u[y].getPixelForValue(S)-b+e}else n==="center"?m=(c.left+c.right)/2-b+e:m=Sl(t,n,e);h=we(o,a,i),f=n==="left"?-me:me}return{titleX:m,titleY:h,maxWidth:p,rotation:f}}class qt extends dt{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=Ne(e,Number.POSITIVE_INFINITY),n=Ne(n,Number.NEGATIVE_INFINITY),o=Ne(o,Number.POSITIVE_INFINITY),i=Ne(i,Number.NEGATIVE_INFINITY),{min:Ne(e,o),max:Ne(n,i),minDefined:fe(e),maxDefined:fe(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let d=0,c=l.length;d<c;++d)a=l[d].controller.getMinMax(this,e),i||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:Ne(n,Ne(o,n)),max:Ne(o,Ne(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(){ie(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:s,ticks:a}=this.options,l=a.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=jp(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=l<this.ticks.length;this._convertTicksToLabels(d?wl(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Sh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&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(){ie(this.options.afterUpdate,[this])}beforeSetDimensions(){ie(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(){ie(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ie(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ie(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o],s.label=ie(n.callback,[s.value,o,e],this)}afterTickToLabelConversion(){ie(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ie(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=Cl(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,l,d,c;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,p=u.highest.height,m=ke(this.chart.width-f,0,this.maxWidth);l=e.offset?this.maxWidth/o:m/(o-1),f+6>l&&(l=m/(o-(e.offset?.5:1)),d=this.maxHeight-Un(e.grid)-n.padding-Al(e.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),a=Qr(Math.min(Math.asin(ke((u.highest.height+6)/l,-1,1)),Math.asin(ke(d/c,-1,1))-Math.asin(ke(p/c,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){ie(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ie(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const d=Al(i,n.options.font);if(l?(e.width=this.maxWidth,e.height=Un(s)+d):(e.height=this.maxHeight,e.width=Un(s)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:p}=this._getLabelSizes(),m=o.padding*2,h=Qe(this.labelRotation),g=Math.cos(h),b=Math.sin(h);if(l){const y=o.mirror?0:b*f.width+g*p.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=o.mirror?0:g*f.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(c,u,b,g)}}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:s,padding:a},position:l}=this.options,d=this.labelRotation!==0,c=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;d?c?(p=i*e.width,m=o*n.height):(p=o*e.height,m=i*n.width):s==="start"?m=n.width:s==="end"?p=e.width:s!=="inner"&&(p=e.width/2,m=n.width/2),this.paddingLeft=Math.max((p-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-f+a)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;s==="start"?(u=0,f=e.height):s==="end"&&(u=n.height,f=0),this.paddingTop=u+a,this.paddingBottom=f+a}}_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(){ie(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++)ee(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=wl(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:s}=this,a=[],l=[],d=Math.floor(n/Cl(n,o));let c=0,u=0,f,p,m,h,g,b,y,S,v,w,x;for(f=0;f<n;f+=d){if(h=e[f].label,g=this._resolveTickFontOptions(f),i.font=b=g.string,y=s[b]=s[b]||{data:{},gc:[]},S=g.lineHeight,v=w=0,!ee(h)&&!se(h))v=So(i,y.data,y.gc,v,h),w=S;else if(se(h))for(p=0,m=h.length;p<m;++p)x=h[p],!ee(x)&&!se(x)&&(v=So(i,y.data,y.gc,v,x),w+=S);a.push(v),l.push(w),c=Math.max(v,c),u=Math.max(w,u)}Ph(s,n);const F=a.indexOf(c),E=l.indexOf(u),M=I=>({width:a[I]||0,height:l[I]||0});return{first:M(0),last:M(n-1),widest:M(F),highest:M(E),widths:a,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 bp(this._alignToPixels?Ht(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=Fh(this.getContext(),e,o))}return this.$context||(this.$context=Eh(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Qe(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=e.autoSkipPadding||0,l=s?s.widest.width+a:0,d=s?s.highest.height+a:0;return this.isHorizontal()?d*o>l*i?l/o:d/i:d*i<l*o?d/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:s,position:a,border:l}=i,d=s.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),p=Un(s),m=[],h=l.setContext(this.getContext()),g=h.display?h.width:0,b=g/2,y=function(V){return Ht(o,V,g)};let S,v,w,x,F,E,M,I,N,C,D,A;if(a==="top")S=y(this.bottom),E=this.bottom-p,I=S-b,C=y(e.top)+b,A=e.bottom;else if(a==="bottom")S=y(this.top),C=e.top,A=y(e.bottom)-b,E=S+b,I=this.top+p;else if(a==="left")S=y(this.right),F=this.right-p,M=S-b,N=y(e.left)+b,D=e.right;else if(a==="right")S=y(this.left),N=e.left,D=y(e.right)-b,F=S+b,M=this.left+p;else if(n==="x"){if(a==="center")S=y((e.top+e.bottom)/2+.5);else if($(a)){const V=Object.keys(a)[0],R=a[V];S=y(this.chart.scales[V].getPixelForValue(R))}C=e.top,A=e.bottom,E=S+b,I=E+p}else if(n==="y"){if(a==="center")S=y((e.left+e.right)/2);else if($(a)){const V=Object.keys(a)[0],R=a[V];S=y(this.chart.scales[V].getPixelForValue(R))}F=S-b,M=F-p,N=e.left,D=e.right}const k=q(i.ticks.maxTicksLimit,f),B=Math.max(1,Math.ceil(f/k));for(v=0;v<f;v+=B){const V=this.getContext(v),R=s.setContext(V),O=l.setContext(V),T=R.lineWidth,U=R.color,W=O.dash||[],j=O.dashOffset,K=R.tickWidth,_=R.tickColor,te=R.tickBorderDash||[],he=R.tickBorderDashOffset;w=Vh(this,v,d),w!==void 0&&(x=Ht(o,w,T),c?F=M=N=D=x:E=I=C=A=x,m.push({tx1:F,ty1:E,tx2:M,ty2:I,x1:N,y1:C,x2:D,y2:A,width:T,color:U,borderDash:W,borderDashOffset:j,tickWidth:K,tickColor:_,tickBorderDash:te,tickBorderDashOffset:he}))}return this._ticksLength=f,this._borderValue=S,m}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:s}=o,a=this.isHorizontal(),l=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=s,p=Un(o.grid),m=p+u,h=f?-u:m,g=-Qe(this.labelRotation),b=[];let y,S,v,w,x,F,E,M,I,N,C,D,A="middle";if(i==="top")F=this.bottom-h,E=this._getXAxisLabelAlignment();else if(i==="bottom")F=this.top+h,E=this._getXAxisLabelAlignment();else if(i==="left"){const B=this._getYAxisLabelAlignment(p);E=B.textAlign,x=B.x}else if(i==="right"){const B=this._getYAxisLabelAlignment(p);E=B.textAlign,x=B.x}else if(n==="x"){if(i==="center")F=(e.top+e.bottom)/2+m;else if($(i)){const B=Object.keys(i)[0],V=i[B];F=this.chart.scales[B].getPixelForValue(V)+m}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-m;else if($(i)){const B=Object.keys(i)[0],V=i[B];x=this.chart.scales[B].getPixelForValue(V)}E=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(d==="start"?A="top":d==="end"&&(A="bottom"));const k=this._getLabelSizes();for(y=0,S=l.length;y<S;++y){v=l[y],w=v.label;const B=s.setContext(this.getContext(y));M=this.getPixelForTick(y)+s.labelOffset,I=this._resolveTickFontOptions(y),N=I.lineHeight,C=se(w)?w.length:1;const V=C/2,R=B.color,O=B.textStrokeColor,T=B.textStrokeWidth;let U=E;a?(x=M,E==="inner"&&(y===S-1?U=this.options.reverse?"left":"right":y===0?U=this.options.reverse?"right":"left":U="center"),i==="top"?c==="near"||g!==0?D=-C*N+N/2:c==="center"?D=-k.highest.height/2-V*N+N:D=-k.highest.height+N/2:c==="near"||g!==0?D=N/2:c==="center"?D=k.highest.height/2-V*N:D=k.highest.height-C*N,f&&(D*=-1),g!==0&&!B.showLabelBackdrop&&(x+=N/2*Math.sin(g))):(F=M,D=(1-C)*N/2);let W;if(B.showLabelBackdrop){const j=Ae(B.backdropPadding),K=k.heights[y],_=k.widths[y];let te=D-j.top,he=0-j.left;switch(A){case"middle":te-=K/2;break;case"bottom":te-=K;break}switch(E){case"center":he-=_/2;break;case"right":he-=_;break;case"inner":y===S-1?he-=_:y>0&&(he-=_/2);break}W={left:he,top:te,width:_+j.width,height:K+j.height,color:B.backdropColor}}b.push({label:w,font:I,textOffset:D,options:{rotation:g,color:R,strokeColor:O,strokeWidth:T,textAlign:U,textBaseline:A,translation:[x,F],backdrop:W}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Qe(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:s}}=this.options,a=this._getLabelSizes(),l=e+s,d=a.widest.width;let c,u;return n==="left"?i?(u=this.right+s,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-l,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+l,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_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:s,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,s,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.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 s,a;const l=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const d=i[s];n.drawOnChartArea&&l({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&l({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),a=o.display?s.width:0;if(!a)return;const l=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,p;this.isHorizontal()?(c=Ht(e,this.left,a)-a/2,u=Ht(e,this.right,l)+l/2,f=p=d):(f=Ht(e,this.top,a)-a/2,p=Ht(e,this.bottom,l)+l/2,c=u=d),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,p),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Co(o,i);const s=this.getLabelItems(e);for(const a of s){const l=a.options,d=a.font,c=a.label,u=a.textOffset;Ut(o,c,0,u,d,l)}i&&wo(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=be(o.font),a=Ae(o.padding),l=o.align;let d=s.lineHeight/2;n==="bottom"||n==="center"||$(n)?(d+=a.bottom,se(o.text)&&(d+=s.lineHeight*(o.text.length-1))):d+=a.top;const{titleX:c,titleY:u,maxWidth:f,rotation:p}=Mh(this,d,n,l);Ut(e,o.text,0,0,s,{color:o.color,maxWidth:f,rotation:p,textAlign:Nh(l,n,i),textBaseline:"middle",translation:[c,u]})}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=q(e.grid&&e.grid.z,-1),i=q(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==qt.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const l=n[s];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 be(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class To{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;Rh(n)&&(o=this.register(n));const i=this.items,s=e.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,Oh(e,a,o),this.override&&pe.override(e.id,e.overrides)),a}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 pe[i]&&(delete pe[i][o],this.override&&delete Lt[o])}}function Oh(t,e,n){const o=An(Object.create(null),[n?pe.get(n):{},pe.get(e),t.defaults]);pe.set(e,o),t.defaultRoutes&&Ih(e,t.defaultRoutes),t.descriptors&&pe.describe(e,t.descriptors)}function Ih(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),s=[t].concat(o).join("."),a=e[n].split("."),l=a.pop(),d=a.join(".");pe.route(s,i,d,l)})}function Rh(t){return"id"in t&&"defaults"in t}class Th{constructor(){this.controllers=new To(We,"datasets",!0),this.elements=new To(dt,"elements"),this.plugins=new To(Object,"plugins"),this.scales=new To(qt,"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 s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):oe(i,a=>{const l=o||this._getRegistryForType(a);this._exec(e,l,a)})})}_exec(e,n,o){const i=jr(e);ie(o["before"+i],[],o),n[e](o),ie(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 Ke=new Th;class zh{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(s,e,n,o);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,o,i){i=i||{};for(const s of e){const a=s.plugin,l=a[o],d=[n,i,s.options];if(ie(l,d,a)===!1&&i.cancelable)return!1}return!0}invalidate(){ee(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=q(o.options&&o.options.plugins,{}),s=Lh(o);return i===!1&&!n?[]:Uh(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(s,a)=>s.filter(l=>!a.some(d=>l.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function Lh(t){const e={},n=[],o=Object.keys(Ke.plugins.items);for(let s=0;s<o.length;s++)n.push(Ke.getPlugin(o[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function Hh(t,e){return!e&&t===!1?null:t===!0?{}:t}function Uh(t,{plugins:e,localIds:n},o,i){const s=[],a=t.getContext();for(const l of e){const d=l.id,c=Hh(o[d],i);c!==null&&s.push({plugin:l,options:jh(t.config,{plugin:l,local:n[d]},c,a)})}return s}function jh(t,{plugin:e,local:n},o,i){const s=t.pluginScopeKeys(e),a=t.getOptionScopes(o,s);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function fi(t,e){const n=pe.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Qh(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Wh(t,e){return t===e?"_index_":"_value_"}function vl(t){if(t==="x"||t==="y"||t==="r")return t}function Yh(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function pi(t,...e){if(vl(t))return t;for(const n of e){const o=n.axis||Yh(n.position)||t.length>1&&vl(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Bl(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Xh(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 Bl(t,"x",n[0])||Bl(t,"y",n[0])}return{}}function Gh(t,e){const n=Lt[t.type]||{scales:{}},o=e.scales||{},i=fi(t.type,e),s=Object.create(null);return Object.keys(o).forEach(a=>{const l=o[a];if(!$(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const d=pi(a,l,Xh(a,t),pe.scales[l.type]),c=Wh(d,i),u=n.scales||{};s[a]=vn(Object.create(null),[{axis:d},l,u[d],u[c]])}),t.data.datasets.forEach(a=>{const l=a.type||t.type,d=a.indexAxis||fi(l,e),u=(Lt[l]||{}).scales||{};Object.keys(u).forEach(f=>{const p=Qh(f,d),m=a[p+"AxisID"]||p;s[m]=s[m]||Object.create(null),vn(s[m],[{axis:p},o[m],u[f]])})}),Object.keys(s).forEach(a=>{const l=s[a];vn(l,[pe.scales[l.type],pe.scale])}),s}function Dl(t){const e=t.options||(t.options={});e.plugins=q(e.plugins,{}),e.scales=Gh(t,e)}function Vl(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function qh(t){return t=t||{},t.data=Vl(t.data),Dl(t),t}const Pl=new Map,El=new Set;function zo(t,e){let n=Pl.get(t);return n||(n=e(),Pl.set(t,n),El.add(n)),n}const jn=(t,e,n)=>{const o=vt(e,n);o!==void 0&&t.add(o)};class Jh{constructor(e){this._config=qh(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=Vl(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(),Dl(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return zo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return zo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return zo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return zo(`${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:s}=this,a=this._cachedScopes(e,o),l=a.get(n);if(l)return l;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>jn(d,e,f))),u.forEach(f=>jn(d,i,f)),u.forEach(f=>jn(d,Lt[s]||{},f)),u.forEach(f=>jn(d,pe,f)),u.forEach(f=>jn(d,Jr,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),El.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Lt[n]||{},pe.datasets[n]||{},{type:n},pe,Jr]}resolveNamedOptions(e,n,o,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:l}=Fl(this._resolverCache,e,i);let d=a;if(Zh(a,n)){s.$shared=!1,o=Bt(o)?o():o;const c=this.createResolver(e,o,l);d=rn(a,o,c)}for(const c of n)s[c]=d[c];return s}createResolver(e,n,o=[""],i){const{resolver:s}=Fl(this._resolverCache,e,o);return $(n)?rn(s,n,void 0,i):s}}function Fl(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let s=o.get(i);return s||(s={resolver:_r(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},o.set(i,s)),s}const Kh=t=>$(t)&&Object.getOwnPropertyNames(t).some(e=>Bt(t[e]));function Zh(t,e){const{isScriptable:n,isIndexable:o}=Ma(t);for(const i of e){const s=n(i),a=o(i),l=(a||s)&&t[i];if(s&&(Bt(l)||Kh(l))||a&&se(l))return!0}return!1}var $h="4.4.2";const _h=["top","bottom","left","right","chartArea"];function Nl(t,e){return t==="top"||t==="bottom"||_h.indexOf(t)===-1&&e==="x"}function Ml(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function Ol(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ie(n&&n.onComplete,[t],e)}function eg(t){const e=t.chart,n=e.options.animation;ie(n&&n.onProgress,[t],e)}function Il(t){return ni()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Lo={},Rl=t=>{const e=Il(t);return Object.values(Lo).filter(n=>n.canvas===e).pop()};function tg(t,e,n){const o=Object.keys(t);for(const i of o){const s=+i;if(s>=e){const a=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=a)}}}function ng(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Ho(t,e,n){return t.options.clip?t[n]:e[n]}function og(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Ho(n,e,"left"),right:Ho(n,e,"right"),top:Ho(o,e,"top"),bottom:Ho(o,e,"bottom")}:e}class Ye{static register(...e){Ke.add(...e),Tl()}static unregister(...e){Ke.remove(...e),Tl()}constructor(e,n){const o=this.config=new Jh(n),i=Il(e),s=Rl(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||xh(i)),this.platform.updateConfig(o);const l=this.platform.acquireContext(i,a.aspectRatio),d=l&&l.canvas,c=d&&d.height,u=d&&d.width;if(this.id=ip(),this.ctx=l,this.canvas=d,this.width=u,this.height=c,this._options=a,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 zh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Sp(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Lo[this.id]=this,!l||!d){console.error("Failed to create chart: can't acquire context from the given item");return}lt.listen(this,"complete",Ol),lt.listen(this,"progress",eg),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return ee(e)?n&&s?s: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 Ke}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ua(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ea(this.canvas,this.ctx),this}stop(){return lt.stop(this),this}resize(e,n){lt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,n,s),l=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ua(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),ie(o.onResize,[this,a],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};oe(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((a,l)=>(a[l]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const l=n[a],d=pi(a,l),c=d==="r",u=d==="x";return{options:l,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),oe(s,a=>{const l=a.options,d=l.id,c=pi(d,l),u=q(l.type,a.dtype);(l.position===void 0||Nl(l.position,c)!==Nl(a.dposition))&&(l.position=a.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const p=Ke.getScale(u);f=new p({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(l,e)}),oe(i,(a,l)=>{a||delete o[l]}),oe(o,a=>{ve.configure(this,a,a.options),ve.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(Ml("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(s=>s===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 s=n[o];let a=this.getDatasetMeta(o);const l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(o),a=this.getDatasetMeta(o)),a.type=l,a.indexAxis=s.indexAxis||fi(l,this.options),a.order=s.order||0,a.index=o,a.label=""+s.label,a.visible=this.isDatasetVisible(o),a.controller)a.controller.updateIndex(o),a.controller.linkScales();else{const d=Ke.getController(l),{datasetElementType:c,dataElementType:u}=pe.datasets[l];Object.assign(d,{dataElementType:Ke.getElement(u),datasetElementType:c&&Ke.getElement(c)}),a.controller=new d(this,o),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){oe(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 s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),p=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(p),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=o.layout.autoPadding?a:0,this._updateLayout(a),i||oe(s,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Ml("z","_idx"));const{_active:l,_lastEvent:d}=this;d?this._eventHandler(d,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){oe(this.scales,e=>{ve.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!fa(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:s}of n){const a=o==="_removeElements"?-s:s;tg(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(e.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!fa(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ve.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],oe(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),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,Bt(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&&(lt.has(this)?this.attached&&!lt.running(this)&&lt.start(this):(this.draw(),Ol({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,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!e||a.visible)&&o.push(a)}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,s=og(e,this.chartArea),a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Co(n,{left:o.left===!1?0:s.left-o.left,right:o.right===!1?this.width:s.right+o.right,top:o.top===!1?0:s.top-o.top,bottom:o.bottom===!1?this.height:s.bottom+o.bottom}),e.controller.draw(),i&&wo(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return at(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const s=_m.modes[n];return typeof s=="function"?s(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(s=>s&&s._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=Vt(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",s=this.getDatasetMeta(e),a=s.controller._resolveAnimations(void 0,i);Bn(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),a.update(s,{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(),lt.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(),Ea(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Lo[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=(s,a)=>{n.addEventListener(this,s,a),e[s]=a},i=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};oe(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},s=(d,c)=>{this.canvas&&this.resize(d,c)};let a;const l=()=>{i("attach",l),this.attached=!0,this.resize(),o("resize",s),o("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){oe(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},oe(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let s,a,l,d;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),l=0,d=e.length;l<d;++l){a=e[l];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:s,index:a})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!go(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,s=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),a=s(n,e),l=o?e:s(e,n);a.length&&this.updateHoverStyle(a,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=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:s}=this,a=n,l=this._getActiveElements(e,i,o,a),d=up(e),c=ng(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ie(s.onHover,[e,l,this],this),d&&ie(s.onClick,[e,l,this],this));const u=!go(l,i);return(u||n)&&(this._active=l,this._updateHoverStyles(l,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}H(Ye,"defaults",pe),H(Ye,"instances",Lo),H(Ye,"overrides",Lt),H(Ye,"registry",Ke),H(Ye,"version",$h),H(Ye,"getChart",Rl);function Tl(){return oe(Ye.instances,t=>t._plugins.invalidate())}function rg(t,e,n){const{startAngle:o,pixelMargin:i,x:s,y:a,outerRadius:l,innerRadius:d}=e;let c=i/l;t.beginPath(),t.arc(s,a,l,o-c,n+c),d>i?(c=i/d,t.arc(s,a,d,n+c,o-c,!0)):t.arc(s,a,i,n+me,o-me),t.closePath(),t.clip()}function ig(t){return $r(t,["outerStart","outerEnd","innerStart","innerEnd"])}function sg(t,e,n,o){const i=ig(t.options.borderRadius),s=(n-e)/2,a=Math.min(s,o*e/2),l=d=>{const c=(n-Math.min(s,d))*o/2;return ke(d,0,Math.min(s,c))};return{outerStart:l(i.outerStart),outerEnd:l(i.outerEnd),innerStart:ke(i.innerStart,0,a),innerEnd:ke(i.innerEnd,0,a)}}function ln(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Uo(t,e,n,o,i,s){const{x:a,y:l,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),p=u>0?u+o+n+c:0;let m=0;const h=i-d;if(o){const B=u>0?u-o:0,V=f>0?f-o:0,R=(B+V)/2,O=R!==0?h*R/(R+o):h;m=(h-O)/2}const g=Math.max(.001,h*f-n/ae)/f,b=(h-g)/2,y=d+b+m,S=i-b-m,{outerStart:v,outerEnd:w,innerStart:x,innerEnd:F}=sg(e,p,f,S-y),E=f-v,M=f-w,I=y+v/E,N=S-w/M,C=p+x,D=p+F,A=y+x/C,k=S-F/D;if(t.beginPath(),s){const B=(I+N)/2;if(t.arc(a,l,f,I,B),t.arc(a,l,f,B,N),w>0){const T=ln(M,N,a,l);t.arc(T.x,T.y,w,N,S+me)}const V=ln(D,S,a,l);if(t.lineTo(V.x,V.y),F>0){const T=ln(D,k,a,l);t.arc(T.x,T.y,F,S+me,k+Math.PI)}const R=(S-F/p+(y+x/p))/2;if(t.arc(a,l,p,S-F/p,R,!0),t.arc(a,l,p,R,y+x/p,!0),x>0){const T=ln(C,A,a,l);t.arc(T.x,T.y,x,A+Math.PI,y-me)}const O=ln(E,y,a,l);if(t.lineTo(O.x,O.y),v>0){const T=ln(E,I,a,l);t.arc(T.x,T.y,v,y-me,I)}}else{t.moveTo(a,l);const B=Math.cos(I)*f+a,V=Math.sin(I)*f+l;t.lineTo(B,V);const R=Math.cos(N)*f+a,O=Math.sin(N)*f+l;t.lineTo(R,O)}t.closePath()}function ag(t,e,n,o,i){const{fullCircles:s,startAngle:a,circumference:l}=e;let d=e.endAngle;if(s){Uo(t,e,n,o,d,i);for(let c=0;c<s;++c)t.fill();isNaN(l)||(d=a+(l%le||le))}return Uo(t,e,n,o,d,i),t.fill(),d}function lg(t,e,n,o,i){const{fullCircles:s,startAngle:a,circumference:l,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:p}=d,m=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=p,m?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let h=e.endAngle;if(s){Uo(t,e,n,o,h,i);for(let g=0;g<s;++g)t.stroke();isNaN(l)||(h=a+(l%le||le))}m&&rg(t,e,h),s||(Uo(t,e,n,o,h,i),t.stroke())}class Qn extends dt{constructor(n){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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 s=this.getProps(["x","y"],i),{angle:a,distance:l}=ba(s,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),m=(this.options.spacing+this.options.borderWidth)/2,g=q(p,c-d)>=le||Vn(a,d,c),b=it(l,u+m,f+m);return g&&b}getCenterPoint(n){const{x:o,y:i,startAngle:s,endAngle:a,innerRadius:l,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(s+a)/2,p=(l+d+u+c)/2;return{x:o+Math.cos(f)*p,y:i+Math.sin(f)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,s=(o.offset||0)/4,a=(o.spacing||0)/2,l=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>le?Math.floor(i/le):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*s,Math.sin(d)*s);const c=1-Math.sin(Math.min(ae,i||0)),u=s*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,ag(n,this,u,a,l),lg(n,this,u,a,l),n.restore()}}H(Qn,"id","arc"),H(Qn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H(Qn,"defaultRoutes",{backgroundColor:"backgroundColor"}),H(Qn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function zl(t,e,n=e){t.lineCap=q(n.borderCapStyle,e.borderCapStyle),t.setLineDash(q(n.borderDash,e.borderDash)),t.lineDashOffset=q(n.borderDashOffset,e.borderDashOffset),t.lineJoin=q(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=q(n.borderWidth,e.borderWidth),t.strokeStyle=q(n.borderColor,e.borderColor)}function dg(t,e,n){t.lineTo(n.x,n.y)}function cg(t){return t.stepped?Mp:t.tension||t.cubicInterpolationMode==="monotone"?Op:dg}function Ll(t,e,n={}){const o=t.length,{start:i=0,end:s=o-1}=n,{start:a,end:l}=e,d=Math.max(i,a),c=Math.min(s,l),u=i<a&&s<a||i>l&&s>l;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function ug(t,e,n,o){const{points:i,options:s}=e,{count:a,start:l,loop:d,ilen:c}=Ll(i,n,o),u=cg(s);let{move:f=!0,reverse:p}=o||{},m,h,g;for(m=0;m<=c;++m)h=i[(l+(p?c-m:m))%a],!h.skip&&(f?(t.moveTo(h.x,h.y),f=!1):u(t,g,h,p,s.stepped),g=h);return d&&(h=i[(l+(p?c:0))%a],u(t,g,h,p,s.stepped)),!!d}function fg(t,e,n,o){const i=e.points,{count:s,start:a,ilen:l}=Ll(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,p,m,h,g,b,y;const S=w=>(a+(c?l-w:w))%s,v=()=>{g!==b&&(t.lineTo(u,b),t.lineTo(u,g),t.lineTo(u,y))};for(d&&(m=i[S(0)],t.moveTo(m.x,m.y)),p=0;p<=l;++p){if(m=i[S(p)],m.skip)continue;const w=m.x,x=m.y,F=w|0;F===h?(x<g?g=x:x>b&&(b=x),u=(f*u+w)/++f):(v(),t.lineTo(w,x),h=F,f=0,g=b=x),y=x}v()}function mi(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?fg:ug}function pg(t){return t.stepped?fm:t.tension||t.cubicInterpolationMode==="monotone"?pm:Yt}function mg(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),zl(t,e.options),t.stroke(i)}function hg(t,e,n,o){const{segments:i,options:s}=e,a=mi(e);for(const l of i)zl(t,s,l.style),t.beginPath(),a(t,e,l,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const gg=typeof Path2D=="function";function bg(t,e,n,o){gg&&!e.options.segment?mg(t,e,n,o):hg(t,e,n,o)}class Pt extends dt{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;rm(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=km(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],s=this.points,a=qa(this,{property:n,start:i,end:i});if(!a.length)return;const l=[],d=pg(o);let c,u;for(c=0,u=a.length;c<u;++c){const{start:f,end:p}=a[c],m=s[f],h=s[p];if(m===h){l.push(m);continue}const g=Math.abs((i-m[n])/(h[n]-m[n])),b=d(m,h,g,o.stepped);b[n]=e[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(e,n,o){return mi(this)(e,this,n,o)}path(e,n,o){const i=this.segments,s=mi(this);let a=this._loop;n=n||0,o=o||this.points.length-n;for(const l of i)a&=s(e,this,l,{start:n,end:n+o-1});return!!a}draw(e,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),bg(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(Pt,"id","line"),H(Pt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(Pt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(Pt,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Hl(t,e,n,o){const i=t.options,{[n]:s}=t.getProps([n],o);return Math.abs(e-s)<i.radius+i.hitRadius}class jo extends dt{constructor(n){super();H(this,"parsed");H(this,"skip");H(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 s=this.options,{x:a,y:l}=this.getProps(["x","y"],i);return Math.pow(n-a,2)+Math.pow(o-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,o){return Hl(this,n,"x",o)}inYRange(n,o){return Hl(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||!at(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Zr(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}H(jo,"id","point"),H(jo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(jo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Ul(t,e){const{x:n,y:o,base:i,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let l,d,c,u,f;return t.horizontal?(f=a/2,l=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=s/2,l=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:l,top:c,right:d,bottom:u}}function Et(t,e,n,o){return t?0:ke(e,n,o)}function yg(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,s=Na(o);return{t:Et(i.top,s.top,0,n),r:Et(i.right,s.right,0,e),b:Et(i.bottom,s.bottom,0,n),l:Et(i.left,s.left,0,e)}}function kg(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=jt(i),a=Math.min(e,n),l=t.borderSkipped,d=o||$(i);return{topLeft:Et(!d||l.top||l.left,s.topLeft,0,a),topRight:Et(!d||l.top||l.right,s.topRight,0,a),bottomLeft:Et(!d||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Et(!d||l.bottom||l.right,s.bottomRight,0,a)}}function xg(t){const e=Ul(t),n=e.right-e.left,o=e.bottom-e.top,i=yg(t,n/2,o/2),s=kg(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:s},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,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function hi(t,e,n,o){const i=e===null,s=n===null,l=t&&!(i&&s)&&Ul(t,o);return l&&(i||it(e,l.left,l.right))&&(s||it(n,l.top,l.bottom))}function Sg(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Cg(t,e){t.rect(e.x,e.y,e.w,e.h)}function gi(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-o,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+s,h:t.h+a,radius:t.radius}}class Qo extends dt{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:s,outer:a}=xg(this),l=Sg(a.radius)?Nn:Cg;e.save(),(a.w!==s.w||a.h!==s.h)&&(e.beginPath(),l(e,gi(a,n,s)),e.clip(),l(e,gi(s,-n,a)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),l(e,gi(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return hi(this,e,n,o)}inXRange(e,n){return hi(this,e,null,n)}inYRange(e,n){return hi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}H(Qo,"id","bar"),H(Qo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(Qo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var wg=Object.freeze({__proto__:null,ArcElement:Qn,BarElement:Qo,LineElement:Pt,PointElement:jo});const bi=["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)"],jl=bi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ql(t){return bi[t%bi.length]}function Wl(t){return jl[t%jl.length]}function Ag(t,e){return t.borderColor=Ql(e),t.backgroundColor=Wl(e),++e}function vg(t,e){return t.backgroundColor=t.data.map(()=>Ql(e++)),e}function Bg(t,e){return t.backgroundColor=t.data.map(()=>Wl(e++)),e}function Dg(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Xt?e=vg(n,e):i instanceof In?e=Bg(n,e):i&&(e=Ag(n,e))}}function Yl(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function Vg(t){return t&&(t.borderColor||t.backgroundColor)}var Pg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Yl(o)||Vg(i)||s&&Yl(s)))return;const a=Dg(t);o.forEach(a)}};function Eg(t,e,n,o,i){const s=i.samples||o;if(s>=n)return t.slice(e,e+n);const a=[],l=(n-2)/(s-2);let d=0;const c=e+n-1;let u=e,f,p,m,h,g;for(a[d++]=t[u],f=0;f<s-2;f++){let b=0,y=0,S;const v=Math.floor((f+1)*l)+1+e,w=Math.min(Math.floor((f+2)*l)+1,n)+e,x=w-v;for(S=v;S<w;S++)b+=t[S].x,y+=t[S].y;b/=x,y/=x;const F=Math.floor(f*l)+1+e,E=Math.min(Math.floor((f+1)*l)+1,n)+e,{x:M,y:I}=t[u];for(m=h=-1,S=F;S<E;S++)h=.5*Math.abs((M-b)*(t[S].y-I)-(M-t[S].x)*(y-I)),h>m&&(m=h,p=t[S],g=S);a[d++]=p,u=g}return a[d++]=t[c],a}function Fg(t,e,n,o){let i=0,s=0,a,l,d,c,u,f,p,m,h,g;const b=[],y=e+n-1,S=t[e].x,w=t[y].x-S;for(a=e;a<e+n;++a){l=t[a],d=(l.x-S)/w*o,c=l.y;const x=d|0;if(x===u)c<h?(h=c,f=a):c>g&&(g=c,p=a),i=(s*i+l.x)/++s;else{const F=a-1;if(!ee(f)&&!ee(p)){const E=Math.min(f,p),M=Math.max(f,p);E!==m&&E!==F&&b.push({...t[E],x:i}),M!==m&&M!==F&&b.push({...t[M],x:i})}a>0&&F!==m&&b.push(t[F]),b.push(l),u=x,s=0,h=g=c,f=p=m=a}}return b}function Xl(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 Gl(t){t.data.datasets.forEach(e=>{Xl(e)})}function Ng(t,e){const n=e.length;let o=0,i;const{iScale:s}=t,{min:a,max:l,minDefined:d,maxDefined:c}=s.getUserBounds();return d&&(o=ke(st(e,s.axis,a).lo,0,n-1)),c?i=ke(st(e,s.axis,l).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Mg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Gl(t);return}const o=t.width;t.data.datasets.forEach((i,s)=>{const{_data:a,indexAxis:l}=i,d=t.getDatasetMeta(s),c=a||i.data;if(Mn([l,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:p}=Ng(d,c);const m=n.threshold||4*o;if(p<=m){Xl(i);return}ee(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let h;switch(n.algorithm){case"lttb":h=Eg(c,f,p,o,n);break;case"min-max":h=Fg(c,f,p,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=h})},destroy(t){Gl(t)}};function Og(t,e,n){const o=t.segments,i=t.points,s=e.points,a=[];for(const l of o){let{start:d,end:c}=l;c=ki(d,c,i);const u=yi(n,i[d],i[c],l.loop);if(!e.segments){a.push({source:l,target:u,start:i[d],end:i[c]});continue}const f=qa(e,u);for(const p of f){const m=yi(n,s[p.start],s[p.end],p.loop),h=Ga(l,i,m);for(const g of h)a.push({source:g,target:p,start:{[n]:ql(u,m,"start",Math.max)},end:{[n]:ql(u,m,"end",Math.min)}})}}return a}function yi(t,e,n,o){if(o)return;let i=e[t],s=n[t];return t==="angle"&&(i=Me(i),s=Me(s)),{property:t,start:i,end:s}}function Ig(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:a,end:l})=>{l=ki(a,l,i);const d=i[a],c=i[l];o!==null?(s.push({x:d.x,y:o}),s.push({x:c.x,y:o})):n!==null&&(s.push({x:n,y:d.y}),s.push({x:n,y:c.y}))}),s}function ki(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function ql(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Jl(t,e){let n=[],o=!1;return se(t)?(o=!0,n=t):n=Ig(t,e),n.length?new Pt({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Kl(t){return t&&t.fill!==!1}function Rg(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!fe(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function Tg(t,e,n){const o=Ug(t);if($(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return fe(i)&&Math.floor(i)===i?zg(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function zg(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function Lg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:$(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function Hg(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:$(t)?o=t.value:o=e.getBaseValue(),o}function Ug(t){const e=t.options,n=e.fill;let o=q(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function jg(t){const{scale:e,index:n,line:o}=t,i=[],s=o.segments,a=o.points,l=Qg(e,n);l.push(Jl({x:null,y:e.bottom},o));for(let d=0;d<s.length;d++){const c=s[d];for(let u=c.start;u<=c.end;u++)Wg(i,a[u],l)}return new Pt({points:i,options:{}})}function Qg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function Wg(t,e,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:l,point:d}=Yg(s,e,"x");if(!(!d||a&&l)){if(a)o.unshift(d);else if(t.push(d),!l)break}}t.push(...o)}function Yg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],s=t.segments,a=t.points;let l=!1,d=!1;for(let c=0;c<s.length;c++){const u=s[c],f=a[u.start][n],p=a[u.end][n];if(it(i,f,p)){l=i===f,d=i===p;break}}return{first:l,last:d,point:o}}class Zl{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:le},e.arc(i,s,a,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function Xg(t){const{chart:e,fill:n,line:o}=t;if(fe(n))return Gg(e,n);if(n==="stack")return jg(t);if(n==="shape")return!0;const i=qg(t);return i instanceof Zl?i:Jl(i,o)}function Gg(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function qg(t){return(t.scale||{}).getPointPositionForValue?Kg(t):Jg(t)}function Jg(t){const{scale:e={},fill:n}=t,o=Lg(n,e);if(fe(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function Kg(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,s=o.reverse?e.max:e.min,a=Hg(n,e,s),l=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,s);return new Zl({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(a)})}for(let d=0;d<i;++d)l.push(e.getPointPositionForValue(d,a));return l}function xi(t,e,n){const o=Xg(e),{line:i,scale:s,axis:a}=e,l=i.options,d=l.fill,c=l.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(Co(t,n),Zg(t,{line:i,target:o,above:u,below:f,area:n,scale:s,axis:a}),wo(t))}function Zg(t,e){const{line:n,target:o,above:i,below:s,area:a,scale:l}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&s!==i&&($l(t,o,a.top),_l(t,{line:n,target:o,color:i,scale:l,property:d}),t.restore(),t.save(),$l(t,o,a.bottom)),_l(t,{line:n,target:o,color:s,scale:l,property:d}),t.restore()}function $l(t,e,n){const{segments:o,points:i}=e;let s=!0,a=!1;t.beginPath();for(const l of o){const{start:d,end:c}=l,u=i[d],f=i[ki(d,c,i)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),a=!!e.pathSegment(t,l,{move:a}),a?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function _l(t,e){const{line:n,target:o,property:i,color:s,scale:a}=e,l=Og(n,o,i);for(const{source:d,target:c,start:u,end:f}of l){const{style:{backgroundColor:p=s}={}}=d,m=o!==!0;t.save(),t.fillStyle=p,$g(t,a,m&&yi(i,u,f)),t.beginPath();const h=!!n.pathSegment(t,d);let g;if(m){h?t.closePath():ed(t,o,f,i);const b=!!o.pathSegment(t,c,{move:h,reverse:!0});g=h&&b,g||ed(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function $g(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:s,start:a,end:l}=n||{};s==="x"&&(t.beginPath(),t.rect(a,o,l-a,i-o),t.clip())}function ed(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var _g={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let s,a,l,d;for(a=0;a<o;++a)s=t.getDatasetMeta(a),l=s.dataset,d=null,l&&l.options&&l instanceof Pt&&(d={visible:t.isDatasetVisible(a),index:a,fill:Tg(l,a,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=d,i.push(d);for(a=0;a<o;++a)d=i[a],!(!d||d.fill===!1)&&(d.fill=Rg(i,a,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let a=i.length-1;a>=0;--a){const l=i[a].$filler;l&&(l.line.updateControlPoints(s,l.axis),o&&l.fill&&xi(t.ctx,l,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;Kl(s)&&xi(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Kl(o)||n.drawTime!=="beforeDatasetDraw"||xi(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const td=(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)}},e0=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class nd extends dt{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=ie(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=be(o.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=td(o,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,s,l,d)+10):(u=this.maxHeight,c=this._fitCols(a,i,l,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:s,maxWidth:a,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+l;let f=e;s.textAlign="left",s.textBaseline="middle";let p=-1,m=-u;return this.legendItems.forEach((h,g)=>{const b=o+n/2+s.measureText(h.text).width;(g===0||c[c.length-1]+b+2*l>a)&&(f+=u,c[c.length-(g>0?0:1)]=0,m+=u,p++),d[g]={left:0,top:m,row:p,width:b,height:i},c[c.length-1]+=b+l}),f}_fitCols(e,n,o,i){const{ctx:s,maxHeight:a,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-e;let f=l,p=0,m=0,h=0,g=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:S,itemHeight:v}=t0(o,n,s,b,i);y>0&&m+v+2*l>u&&(f+=p+l,c.push({width:p,height:m}),h+=p+l,g++,p=m=0),d[y]={left:h,top:m,col:g,width:S,height:v},p=Math.max(p,S),m+=v+l}),f+=p,c.push({width:p,height:m}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,a=an(s,this.left,this.width);if(this.isHorizontal()){let l=0,d=we(o,this.left+i,this.right-this.lineWidths[l]);for(const c of n)l!==c.row&&(l=c.row,d=we(o,this.left+i,this.right-this.lineWidths[l])),c.top+=this.top+e+i,c.left=a.leftForLtr(a.x(d),c.width),d+=c.width+i}else{let l=0,d=we(o,this.top+e+i,this.bottom-this.columnSizes[l].height);for(const c of n)c.col!==l&&(l=c.col,d=we(o,this.top+e+i,this.bottom-this.columnSizes[l].height)),c.top=d,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Co(e,this),this._draw(),wo(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:a}=e,l=pe.color,d=an(e.rtl,this.left,this.width),c=be(a.font),{padding:u}=a,f=c.size,p=f/2;let m;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:h,boxHeight:g,itemHeight:b}=td(a,f),y=function(F,E,M){if(isNaN(h)||h<=0||isNaN(g)||g<0)return;i.save();const I=q(M.lineWidth,1);if(i.fillStyle=q(M.fillStyle,l),i.lineCap=q(M.lineCap,"butt"),i.lineDashOffset=q(M.lineDashOffset,0),i.lineJoin=q(M.lineJoin,"miter"),i.lineWidth=I,i.strokeStyle=q(M.strokeStyle,l),i.setLineDash(q(M.lineDash,[])),a.usePointStyle){const N={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:I},C=d.xPlus(F,h/2),D=E+p;Fa(i,N,C,D,a.pointStyleWidth&&h)}else{const N=E+Math.max((f-g)/2,0),C=d.leftForLtr(F,h),D=jt(M.borderRadius);i.beginPath(),Object.values(D).some(A=>A!==0)?Nn(i,{x:C,y:N,w:h,h:g,radius:D}):i.rect(C,N,h,g),i.fill(),I!==0&&i.stroke()}i.restore()},S=function(F,E,M){Ut(i,M.text,F,E+b/2,c,{strikethrough:M.hidden,textAlign:d.textAlign(M.textAlign)})},v=this.isHorizontal(),w=this._computeTitleHeight();v?m={x:we(s,this.left+u,this.right-o[0]),y:this.top+u+w,line:0}:m={x:this.left+u,y:we(s,this.top+w+u,this.bottom-n[0].height),line:0},Qa(this.ctx,e.textDirection);const x=b+u;this.legendItems.forEach((F,E)=>{i.strokeStyle=F.fontColor,i.fillStyle=F.fontColor;const M=i.measureText(F.text).width,I=d.textAlign(F.textAlign||(F.textAlign=a.textAlign)),N=h+p+M;let C=m.x,D=m.y;d.setWidth(this.width),v?E>0&&C+N+u>this.right&&(D=m.y+=x,m.line++,C=m.x=we(s,this.left+u,this.right-o[m.line])):E>0&&D+x>this.bottom&&(C=m.x=C+n[m.line].width+u,m.line++,D=m.y=we(s,this.top+w+u,this.bottom-n[m.line].height));const A=d.x(C);if(y(A,D,F),C=Cp(I,C+h+p,v?C+N:this.right,e.rtl),S(d.x(C),D,F),v)m.x+=N+u;else if(typeof F.text!="string"){const k=c.lineHeight;m.y+=od(F,k)+u}else m.y+=x}),Wa(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=be(n.font),i=Ae(n.padding);if(!n.display)return;const s=an(e.rtl,this.left,this.width),a=this.ctx,l=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+c,f=we(e.align,f,this.right-p);else{const h=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);u=c+we(e.align,this.top,this.bottom-h-e.labels.padding-this._computeTitleHeight())}const m=we(l,f,f+p);a.textAlign=s.textAlign(Xr(l)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=o.string,Ut(a,n.text,m,u,o)}_computeTitleHeight(){const e=this.options.title,n=be(e.font),o=Ae(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,s;if(it(e,this.left,this.right)&&it(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],it(e,i.left,i.left+i.width)&&it(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!r0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=e0(i,o);i&&!s&&ie(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&ie(n.onHover,[e,o,this],this)}else o&&ie(n.onClick,[e,o,this],this)}}function t0(t,e,n,o,i){const s=n0(o,t,e,n),a=o0(i,o,e.lineHeight);return{itemWidth:s,itemHeight:a}}function n0(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),e+n.size/2+o.measureText(i).width}function o0(t,e,n){let o=t;return typeof e.text!="string"&&(o=od(e,n)),o}function od(t,e){const n=t.text?t.text.length:0;return e*n}function r0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var i0={id:"legend",_element:nd,start(t,e,n){const o=t.legend=new nd({ctx:t.ctx,options:n,chart:t});ve.configure(t,o,n),ve.addBox(t,o)},stop(t){ve.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;ve.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:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=Ae(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:d.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 Si extends dt{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=se(o.text)?o.text.length:1;this._padding=Ae(o.padding);const s=i*be(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:s,options:a}=this,l=a.align;let d=0,c,u,f;return this.isHorizontal()?(u=we(l,o,s),f=n+e,c=s-o):(a.position==="left"?(u=o+e,f=we(l,i,n),d=ae*-.5):(u=s-e,f=we(l,n,i),d=ae*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=be(n.font),s=o.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:d,rotation:c}=this._drawArgs(s);Ut(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Xr(n.align),textBaseline:"middle",translation:[a,l]})}}function s0(t,e){const n=new Si({ctx:t.ctx,options:e,chart:t});ve.configure(t,n,e),ve.addBox(t,n),t.titleBlock=n}var a0={id:"title",_element:Si,start(t,e,n){s0(t,n)},stop(t){const e=t.titleBlock;ve.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;ve.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 Wo=new WeakMap;var l0={id:"subtitle",start(t,e,n){const o=new Si({ctx:t.ctx,options:n,chart:t});ve.configure(t,o,n),ve.addBox(t,o),Wo.set(t,o)},stop(t){ve.removeBox(t,Wo.get(t)),Wo.delete(t)},beforeUpdate(t,e,n){const o=Wo.get(t);ve.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 Wn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const d=l.tooltipPosition();o.add(d.x),i+=d.y,++s}}return{x:[...o].reduce((l,d)=>l+d)/o.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,s,a,l;for(s=0,a=t.length;s<a;++s){const d=t[s].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=Wr(e,c);u<i&&(i=u,l=d)}}if(l){const d=l.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ze(t,e){return e&&(se(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ct(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
25
25
  `)>-1?t.split(`
26
- `):t}function d0(t,e){const{element:n,datasetIndex:o,index:i}=e,s=t.getDatasetMeta(o).controller,{label:a,value:l}=s.getLabelAndValue(i);return{chart:t,label:a,parsed:s.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function rd(t,e){const n=t.chart.ctx,{body:o,footer:i,title:s}=t,{boxWidth:a,boxHeight:l}=e,d=be(e.bodyFont),c=be(e.titleFont),u=be(e.footerFont),f=s.length,p=i.length,m=o.length,h=Ae(e.padding);let g=h.height,b=0,y=o.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(l,d.lineHeight):d.lineHeight;g+=m*w+(y-m)*d.lineHeight+(y-1)*e.bodySpacing}p&&(g+=e.footerMarginTop+p*u.lineHeight+(p-1)*e.footerSpacing);let S=0;const v=function(w){b=Math.max(b,n.measureText(w).width+S)};return n.save(),n.font=c.string,oe(t.title,v),n.font=d.string,oe(t.beforeBody.concat(t.afterBody),v),S=e.displayColors?a+2+e.boxPadding:0,oe(o,w=>{oe(w.before,v),oe(w.lines,v),oe(w.after,v)}),S=0,n.font=u.string,oe(t.footer,v),n.restore(),b+=h.width,{width:b,height:g}}function c0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function u0(t,e,n,o){const{x:i,width:s}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&i+s+a>e.width||t==="right"&&i-s-a<0)return!0}function f0(t,e,n,o){const{x:i,width:s}=n,{width:a,chartArea:{left:l,right:d}}=t;let c="center";return o==="center"?c=i<=(l+d)/2?"left":"right":i<=s/2?c="left":i>=a-s/2&&(c="right"),u0(c,t,e,n)&&(c="center"),c}function id(t,e,n){const o=n.yAlign||e.yAlign||c0(t,n);return{xAlign:n.xAlign||e.xAlign||f0(t,e,n,o),yAlign:o}}function p0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function m0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function sd(t,e,n,o){const{caretSize:i,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:d}=n,c=i+s,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:m}=jt(a);let h=p0(e,l);const g=m0(e,d,c);return d==="center"?l==="left"?h+=c:l==="right"&&(h-=c):l==="left"?h-=Math.max(u,p)+i:l==="right"&&(h+=Math.max(f,m)+i),{x:ke(h,0,o.width-e.width),y:ke(g,0,o.height-e.height)}}function Yo(t,e,n){const o=Ae(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function ad(t){return Ze([],ct(t))}function h0(t,e,n){return Dt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ld(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const dd={beforeTitle:rt,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:rt,beforeBody:rt,beforeLabel:rt,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 ee(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:rt,afterBody:rt,beforeFooter:rt,footer:rt,afterFooter:rt};function Ve(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?dd[e].call(n,o):i}class Ci extends dt{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,s=new $a(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=h0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Ve(o,"beforeTitle",this,e),s=Ve(o,"title",this,e),a=Ve(o,"afterTitle",this,e);let l=[];return l=Ze(l,ct(i)),l=Ze(l,ct(s)),l=Ze(l,ct(a)),l}getBeforeBody(e,n){return ad(Ve(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return oe(e,s=>{const a={before:[],lines:[],after:[]},l=ld(o,s);Ze(a.before,ct(Ve(l,"beforeLabel",this,s))),Ze(a.lines,Ve(l,"label",this,s)),Ze(a.after,ct(Ve(l,"afterLabel",this,s))),i.push(a)}),i}getAfterBody(e,n){return ad(Ve(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Ve(o,"beforeFooter",this,e),s=Ve(o,"footer",this,e),a=Ve(o,"afterFooter",this,e);let l=[];return l=Ze(l,ct(i)),l=Ze(l,ct(s)),l=Ze(l,ct(a)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],s=[],a=[];let l=[],d,c;for(d=0,c=n.length;d<c;++d)l.push(d0(this.chart,n[d]));return e.filter&&(l=l.filter((u,f,p)=>e.filter(u,f,p,o))),e.itemSort&&(l=l.sort((u,f)=>e.itemSort(u,f,o))),oe(l,u=>{const f=ld(e.callbacks,u);i.push(Ve(f,"labelColor",this,u)),s.push(Ve(f,"labelPointStyle",this,u)),a.push(Ve(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const l=Wn[o.position].call(this,i,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const d=this._size=rd(this,o),c=Object.assign({},l,d),u=id(this.chart,o,c),f=sd(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const s=this.getCaretPosition(e,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:l}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=jt(l),{x:p,y:m}=e,{width:h,height:g}=n;let b,y,S,v,w,x;return s==="center"?(w=m+g/2,i==="left"?(b=p,y=b-a,v=w+a,x=w-a):(b=p+h,y=b+a,v=w-a,x=w+a),S=b):(i==="left"?y=p+Math.max(d,u)+a:i==="right"?y=p+h-Math.max(c,f)-a:y=this.caretX,s==="top"?(v=m,w=v-a,b=y-a,S=y+a):(v=m+g,w=v+a,b=y+a,S=y-a),x=v),{x1:b,x2:y,x3:S,y1:v,y2:w,y3:x}}drawTitle(e,n,o){const i=this.title,s=i.length;let a,l,d;if(s){const c=an(o.rtl,this.x,this.width);for(e.x=Yo(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",a=be(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,d=0;d<s;++d)n.fillText(i[d],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+l,d+1===s&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,s){const a=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=s,u=be(s.bodyFont),f=Yo(this,"left",s),p=i.x(f),m=d<u.lineHeight?(u.lineHeight-d)/2:0,h=n.y+m;if(s.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=i.leftForLtr(p,c)+c/2,y=h+d/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Zr(e,g,b,y),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Zr(e,g,b,y)}else{e.lineWidth=$(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const g=i.leftForLtr(p,c),b=i.leftForLtr(i.xPlus(p,1),c-2),y=jt(a.borderRadius);Object.values(y).some(S=>S!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Nn(e,{x:g,y:h,w:c,h:d,radius:y}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Nn(e,{x:b,y:h+1,w:c-2,h:d-2,radius:y}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(g,h,c,d),e.strokeRect(g,h,c,d),e.fillStyle=a.backgroundColor,e.fillRect(b,h+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:l,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=be(o.bodyFont);let p=f.lineHeight,m=0;const h=an(o.rtl,this.x,this.width),g=function(M){n.fillText(M,h.x(e.x+m),e.y+p/2),e.y+=p+s},b=h.textAlign(a);let y,S,v,w,x,F,E;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,e.x=Yo(this,b,o),n.fillStyle=o.bodyColor,oe(this.beforeBody,g),m=l&&b!=="right"?a==="center"?c/2+u:c+2+u:0,w=0,F=i.length;w<F;++w){for(y=i[w],S=this.labelTextColors[w],n.fillStyle=S,oe(y.before,g),v=y.lines,l&&v.length&&(this._drawColorBox(n,e,w,h,o),p=Math.max(f.lineHeight,d)),x=0,E=v.length;x<E;++x)g(v[x]),p=f.lineHeight;oe(y.after,g)}m=0,p=f.lineHeight,oe(this.afterBody,g),e.y-=s}drawFooter(e,n,o){const i=this.footer,s=i.length;let a,l;if(s){const d=an(o.rtl,this.x,this.width);for(e.x=Yo(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",a=be(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,l=0;l<s;++l)n.fillText(i[l],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:s,yAlign:a}=this,{x:l,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:p,bottomLeft:m,bottomRight:h}=jt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+f,d),a==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+c-p,d),n.quadraticCurveTo(l+c,d,l+c,d+p),a==="center"&&s==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+c,d+u-h),n.quadraticCurveTo(l+c,d+u,l+c-h,d+u),a==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+m,d+u),n.quadraticCurveTo(l,d+u,l,d+u-m),a==="center"&&s==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,d+f),n.quadraticCurveTo(l,d,l+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const a=Wn[e.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=rd(this,e),d=Object.assign({},a,this._size),c=id(n,e,d),u=sd(e,d,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_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},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Ae(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(s,e,i,n),Qa(e,n.textDirection),s.y+=a.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),Wa(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:d})=>{const c=this.chart.getDatasetMeta(l);if(!c)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:c.data[d],index:d}}),s=!go(o,i),a=this._positionChanged(i,n);(s||a)&&(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,s=this._active||[],a=this._getActiveElements(e,s,n,o),l=this._positionChanged(a,e),d=n||!go(a,s)||l;return d&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const s=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 a=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:i,options:s}=this,a=Wn[s.position].call(this,e,n);return a!==!1&&(o!==a.x||i!==a.y)}}H(Ci,"positioners",Wn);var g0={id:"tooltip",_element:Ci,positioners:Wn,afterInit(t,e,n){n&&(t.tooltip=new Ci({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:dd},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"]},b0=Object.freeze({__proto__:null,Colors:Pg,Decimation:Mg,Filler:_g,Legend:i0,SubTitle:l0,Title:a0,Tooltip:g0});const y0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function k0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return y0(t,e,n,o);const s=t.lastIndexOf(e);return i!==s?n:i}const x0=(t,e)=>t===null?null:ke(Math.round(t),0,e);function cd(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class wi extends qt{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:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ee(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:k0(o,e,q(n,e),this._addedLabels),x0(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 s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){return cd.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}}H(wi,"id","category"),H(wi,"defaults",{ticks:{callback:cd}});function S0(t,e){const n=[],{bounds:i,step:s,min:a,max:l,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:p}=t,m=s||1,h=u-1,{min:g,max:b}=e,y=!ee(a),S=!ee(l),v=!ee(c),w=(b-g)/(f+1);let x=ma((b-g)/h/m)*m,F,E,M,I;if(x<1e-14&&!y&&!S)return[{value:g},{value:b}];I=Math.ceil(b/x)-Math.floor(g/x),I>h&&(x=ma(I*x/h/m)*m),ee(d)||(F=Math.pow(10,d),x=Math.ceil(x*F)/F),i==="ticks"?(E=Math.floor(g/x)*x,M=Math.ceil(b/x)*x):(E=g,M=b),y&&S&&s&&hp((l-a)/s,x/1e3)?(I=Math.round(Math.min((l-a)/x,u)),x=(l-a)/I,E=a,M=l):v?(E=y?a:E,M=S?l:M,I=c-1,x=(M-E)/I):(I=(M-E)/x,Dn(I,Math.round(I),x/1e3)?I=Math.round(I):I=Math.ceil(I));const N=Math.max(ga(x),ga(E));F=Math.pow(10,ee(d)?N:d),E=Math.round(E*F)/F,M=Math.round(M*F)/F;let C=0;for(y&&(p&&E!==a?(n.push({value:a}),E<a&&C++,Dn(Math.round((E+C*x)*F)/F,a,ud(a,w,t))&&C++):E<a&&C++);C<I;++C){const D=Math.round((E+C*x)*F)/F;if(S&&D>l)break;n.push({value:D})}return S&&p&&M!==l?n.length&&Dn(n[n.length-1].value,l,ud(l,w,t))?n[n.length-1].value=l:n.push({value:l}):(!S||M===l)&&n.push({value:M}),n}function ud(t,e,{horizontal:n,minRotation:o}){const i=Qe(o),s=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class Xo extends qt{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 ee(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:s}=this;const a=d=>i=n?i:d,l=d=>s=o?s:d;if(e){const d=Je(i),c=Je(s);d<0&&c<0?l(0):d>0&&c>0&&a(0)}if(i===s){let d=s===0?1:Math.abs(s*.05);l(s+d),e||a(i-d)}this.min=i,this.max=s}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},s=this._range||this,a=S0(i,s);return e.bounds==="ticks"&&ha(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}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 En(e,this.chart.options.locale,this.options.ticks.format)}}class Ai extends Xo{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=fe(e)?e:0,this.max=fe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Qe(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.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}}H(Ai,"id","linear"),H(Ai,"defaults",{ticks:{callback:xo.formatters.numeric}});const Yn=t=>Math.floor(Bt(t)),Jt=(t,e)=>Math.pow(10,Yn(t)+e);function fd(t){return t/Math.pow(10,Yn(t))===1}function pd(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function C0(t,e){const n=e-t;let o=Yn(n);for(;pd(t,e,o)>10;)o++;for(;pd(t,e,o)<10;)o--;return Math.min(o,Yn(t))}function w0(t,{min:e,max:n}){e=Ne(t.min,e);const o=[],i=Yn(e);let s=C0(e,n),a=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),d=i>s?Math.pow(10,i):0,c=Math.round((e-d)*a)/a,u=Math.floor((e-d)/l/10)*l*10;let f=Math.floor((c-u)/Math.pow(10,s)),p=Ne(t.min,Math.round((d+u+f*Math.pow(10,s))*a)/a);for(;p<n;)o.push({value:p,major:fd(p),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,a=s>=0?1:a),p=Math.round((d+u+f*Math.pow(10,s))*a)/a;const m=Ne(t.max,p);return o.push({value:m,major:fd(m),significand:f}),o}class vi extends qt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Xo.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return fe(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=fe(e)?Math.max(0,e):null,this.max=fe(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!fe(this._userMin)&&(this.min=e===Jt(this.min,0)?Jt(this.min,-1):Jt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const s=l=>o=e?o:l,a=l=>i=n?i:l;o===i&&(o<=0?(s(1),a(10)):(s(Jt(o,-1)),a(Jt(i,1)))),o<=0&&s(Jt(i,-1)),i<=0&&a(Jt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=w0(n,this);return e.bounds==="ticks"&&ha(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":En(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bt(e),this._valueRange=Bt(this.max)-Bt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}H(vi,"id","logarithmic"),H(vi,"defaults",{ticks:{callback:xo.formatters.logarithmic,major:{enabled:!0}}});function Bi(t){const e=t.ticks;if(e.display&&t.display){const n=Ae(e.backdropPadding);return q(e.font&&e.font.size,pe.font.size)+n.height}return 0}function A0(t,e,n){return n=se(n)?n:[n],{w:Np(t,e.string,n),h:n.length*e.lineHeight}}function md(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 v0(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=[],s=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?ae/s:0;for(let d=0;d<s;d++){const c=a.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],l),f=be(c.font),p=A0(t.ctx,f,t._pointLabels[d]);o[d]=p;const m=Me(t.getIndexAngle(d)+l),h=Math.round(Qr(m)),g=md(h,u.x,p.w,0,180),b=md(h,u.y,p.h,90,270);B0(n,e,m,g,b)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=P0(t,o,i)}function B0(t,e,n,o,i){const s=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let l=0,d=0;o.start<e.l?(l=(e.l-o.start)/s,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/s,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(d=(e.t-i.start)/a,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/a,t.b=Math.max(t.b,e.b+d))}function D0(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:s,padding:a,size:l}=n,d=t.getPointPosition(e,o+i+a,s),c=Math.round(Qr(Me(d.angle+me))),u=N0(d.y,l.h,c),f=E0(c),p=F0(d.x,l.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:p,top:u,right:p+l.w,bottom:u+l.h}}function V0(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:s}=t;return!(at({x:n,y:o},e)||at({x:n,y:s},e)||at({x:i,y:o},e)||at({x:i,y:s},e))}function P0(t,e,n){const o=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:a,display:l}=s.pointLabels,d={extra:Bi(s)/2,additionalAngle:a?ae/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=D0(t,u,d);o.push(f),l==="auto"&&(f.visible=V0(f,c),f.visible&&(c=f))}return o}function E0(t){return t===0||t===180?"center":t<180?"left":"right"}function F0(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function N0(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function M0(t,e,n){const{left:o,top:i,right:s,bottom:a}=n,{backdropColor:l}=e;if(!ee(l)){const d=jt(e.borderRadius),c=Ae(e.backdropPadding);t.fillStyle=l;const u=o-c.left,f=i-c.top,p=s-o+c.width,m=a-i+c.height;Object.values(d).some(h=>h!==0)?(t.beginPath(),Nn(t,{x:u,y:f,w:p,h:m,radius:d}),t.fill()):t.fillRect(u,f,p,m)}}function O0(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const a=o.setContext(t.getPointLabelContext(i));M0(n,a,s);const l=be(a.font),{x:d,y:c,textAlign:u}=s;Ut(n,t._pointLabels[i],d,c+l.lineHeight/2,l,{color:a.color,textAlign:u,textBaseline:"middle"})}}function hd(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,le);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let a=1;a<o;a++)s=t.getPointPosition(a,e),i.lineTo(s.x,s.y)}}function I0(t,e,n,o,i){const s=t.ctx,a=e.circular,{color:l,lineWidth:d}=e;!a&&!o||!l||!d||n<0||(s.save(),s.strokeStyle=l,s.lineWidth=d,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),hd(t,n,a,o),s.closePath(),s.stroke(),s.restore())}function R0(t,e,n){return Dt(t,{label:n,index:e,type:"pointLabel"})}class Xn extends Xo{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=Ae(Bi(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=fe(e)&&!isNaN(e)?e:0,this.max=fe(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Bi(this.options))}generateTickLabels(e){Xo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ie(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?v0(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=le/(this._pointLabels.length||1),o=this.options.startAngle||0;return Me(e*n+Qe(o))}getDistanceFromCenterForValue(e){if(ee(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(ee(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 R0(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-me+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:s}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),hd(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:s}=n,a=this._pointLabels.length;let l,d,c;if(n.pointLabels.display&&O0(this,a),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const p=this.getContext(f),m=i.setContext(p),h=s.setContext(p);I0(this,m,d,a,h)}}),o.display){for(e.save(),l=a-1;l>=0;l--){const u=o.setContext(this.getPointLabelContext(l)),{color:f,lineWidth:p}=u;!p||!f||(e.lineWidth=p,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(l,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.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 s,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=be(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,a=e.measureText(l.label).width,e.fillStyle=c.backdropColor;const f=Ae(c.backdropPadding);e.fillRect(-a/2-f.left,-s-u.size/2-f.top,a+f.width,u.size+f.height)}Ut(e,l.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}H(Xn,"id","radialLinear"),H(Xn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:xo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),H(Xn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(Xn,"descriptors",{angleLines:{_fallback:"grid"}});const Go={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}},Pe=Object.keys(Go);function gd(t,e){return t-e}function bd(t,e){if(ee(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:s}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),fe(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(on(s)||s===!0)?n.startOf(a,"isoWeek",s):n.startOf(a,i)),+a)}function yd(t,e,n,o){const i=Pe.length;for(let s=Pe.indexOf(t);s<i-1;++s){const a=Go[Pe[s]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(l*a.size))<=o)return Pe[s]}return Pe[i-1]}function T0(t,e,n,o,i){for(let s=Pe.length-1;s>=Pe.indexOf(n);s--){const a=Pe[s];if(Go[a].common&&t._adapter.diff(i,o,a)>=e-1)return a}return Pe[n?Pe.indexOf(n):0]}function z0(t){for(let e=Pe.indexOf(t)+1,n=Pe.length;e<n;++e)if(Go[Pe[e]].common)return Pe[e]}function kd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Yr(n,e),s=n[o]>=e?n[o]:n[i];t[s]=!0}}function L0(t,e,n,o){const i=t._adapter,s=+i.startOf(e[0].value,o),a=e[e.length-1].value;let l,d;for(l=s;l<=a;l=+i.add(l,1,o))d=n[l],d>=0&&(e[d].major=!0);return e}function xd(t,e,n){const o=[],i={},s=e.length;let a,l;for(a=0;a<s;++a)l=e[a],i[l]=a,o.push({value:l,major:!1});return s===0||!n?o:L0(t,o,i,n)}class Gn extends qt{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 qm._date(e.adapters.date);i.init(n),vn(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:bd(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:s,minDefined:a,maxDefined:l}=this.getUserBounds();function d(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!l&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!a||!l)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=fe(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=fe(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_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 s=this.min,a=this.max,l=kp(i,s,a);return this._unit=n.unit||(o.autoSkip?yd(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):T0(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:z0(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),xd(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=ke(n,0,a),o=ke(o,0,a),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,s=i.time,a=s.unit||yd(s.minUnit,n,o,this._getLabelCapacity(n)),l=q(i.ticks.stepSize,1),d=a==="week"?s.isoWeekday:!1,c=on(d)||d===!0,u={};let f=n,p,m;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":a),e.diff(o,n,a)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+a);const h=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,m=0;p<o;p=+e.add(p,l,a),m++)kd(u,p,h);return(p===o||i.bounds==="ticks"||m===1)&&kd(u,p,h),Object.keys(u).sort(gd).map(g=>+g)}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,s=this._unit,a=n||i[s];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,i){const s=this.options,a=s.ticks.callback;if(a)return ie(a,[e,n,o],this);const l=s.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&l[d],f=c&&l[c],p=o[n],m=c&&f&&p&&p.major;return this._adapter.format(e,i||(m?f:u))}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=Qe(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),a=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*s+l*a,h:o*a+l*s}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(e,0,xd(this,[e],this._majorUnit),i),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.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(bd(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return xa(e.sort(gd))}}H(Gn,"id","time"),H(Gn,"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 qo(t,e,n){let o=0,i=t.length-1,s,a,l,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=st(t,"pos",e)),{pos:s,time:l}=t[o],{pos:a,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=st(t,"time",e)),{time:s,pos:l}=t[o],{time:a,pos:d}=t[i]);const c=a-s;return c?l+(d-l)*(e-s)/c:l}class Di extends Gn{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=qo(n,this.min),this._tableRange=qo(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],s=[];let a,l,d,c,u;for(a=0,l=e.length;a<l;++a)c=e[a],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,l=i.length;a<l;++a)u=i[a+1],d=i[a-1],c=i[a],Math.round((u+d)/2)!==c&&s.push({time:c,pos:a/(l-1)});return s}_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,s)=>i-s)}_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(qo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return qo(this._table,o*this._tableRange+this._minPos,!0)}}H(Di,"id","timeseries"),H(Di,"defaults",Gn.defaults);var H0=Object.freeze({__proto__:null,CategoryScale:wi,LinearScale:Ai,LogarithmicScale:vi,RadialLinearScale:Xn,TimeScale:Gn,TimeSeriesScale:Di});const U0=[Gm,wg,b0,H0];Ye.register(...U0);const j0={class:"flex flex-col h-full m-24 overflow-hidden p-24"},Q0={class:"flex flex-col gap-8"},W0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},Y0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},X0={class:"grow"},Sd=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}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.hideXAxis,()=>e.hideYAxis,()=>e.legend],()=>{o&&o.config.options&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x");function s({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const p=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return p.addColorStop(0,Pr(c,.5)),p.addColorStop(1,Pr(c,0)),p}const a=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=$t(d.color)??"";return{...d,backgroundColor:c?u=>s({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));r.watch(a,()=>{o&&(o.data=a.value,o.update())},{deep:!0});function l(){n.value&&(o=new Ye(n.value,{type:"line",data:a.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",j0,[r.createElementVNode("div",Q0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",W0,r.toDisplayString(d.name),1),r.createElementVNode("div",Y0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",X0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),G0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},q0={class:"flex flex-col gap-8"},J0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},K0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Z0={class:"grow"},$0=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}},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"),s=r.computed(()=>e.text);r.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio,()=>e.percentage],()=>{o&&(o.destroy(),l())});const a=r.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{let c;return typeof d.backgroundColor=="string"?c=d.backgroundColor:typeof d.backgroundColor=="object"&&(c=d.backgroundColor.map(u=>$t(u)??"")),typeof d.backgroundColor=="string"?c=d.backgroundColor:typeof d.backgroundColor=="object"&&(c=d.backgroundColor.map(u=>$t(u)??"")),{...d,backgroundColor:c,hoverOffset:d.hoverOffset??0}})}));function l(){n.value&&(o=new Ye(n.value,{type:"doughnut",data:a.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",s.value&&s.value!==""){const p=s.value.split(`
27
- `);for(let m=0;m<p.length;m++){const h=m===0?1:.7;c.fillStyle=Pr($t(e.textColor)??"",h),c.fillText(p[m],u,f+m*40)}}}}}]}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",G0,[r.createElementVNode("div",q0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",J0,r.toDisplayString(d.name),1),r.createElementVNode("div",K0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",Z0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),_0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},e1={class:"flex flex-col gap-8"},t1={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},n1={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},o1={class:"grow"},r1=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}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.legend,()=>e.hideXAxis,()=>e.hideYAxis],()=>{o&&(o.destroy(),a())});const i=r.computed(()=>e.transpose?"y":"x"),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(l=>{var u;let d,c;return typeof l.backgroundColor=="string"?d=l.backgroundColor:typeof l.backgroundColor=="object"&&(d=l.backgroundColor.map(f=>$t(f)??"")),typeof l.borderColor=="string"?c=l.borderColor:typeof l.borderColor=="object"&&(c=(u=l.borderColor)==null?void 0:u.map(f=>$t(f)??"")),{...l,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function a(){n.value&&(o=new Ye(n.value,{type:"bar",data:s.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{a()}),(l,d)=>(r.openBlock(),r.createElementBlock("div",_0,[r.createElementVNode("div",e1,[r.renderSlot(l.$slots,"title"),r.createElementVNode("div",t1,r.toDisplayString(l.name),1),r.createElementVNode("div",n1,r.toDisplayString(l.paragraph),1)]),r.createElementVNode("div",o1,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),i1={class:"fm-checkbox"},s1={class:"fm-checkbox--wrapper"},a1={class:"fm-checkbox__input--container"},l1=["checked","disabled","indeterminate"],d1={key:0,class:"fm-checkbox__label-container"},c1={class:"fm-typo-en-body-lg-400"},u1={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Cd=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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=J(e,"indeterminate"),a=Array.isArray(i.value),l=r.ref(a?i.value.some(u=>Ce(u,e.value)):i.value),d=r.computed(()=>{const u=a?i.value.some(f=>Ce(f,e.value)):i.value;return s.value&&!u?"remove":i.value?"check_small":""});function c(){if(o.value)return;s.value=!1,l.value=!l.value;let u=i.value;a?u=l.value?u.concat(e.value):u.filter(f=>!Ce(f,e.value)):u=l.value,i.value=u}return r.watch(()=>i.value,()=>{l.value=a?i.value.some(u=>Ce(u,e.value)):i.value}),(u,f)=>(r.openBlock(),r.createElementBlock("div",i1,[r.createElementVNode("label",s1,[r.createElementVNode("div",a1,[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(s),type:"checkbox",onInput:c},null,42,l1),r.unref(s)||l.value?(r.openBlock(),r.createBlock(Q,{key:0,name:d.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]),e.label?(r.openBlock(),r.createElementBlock("div",d1,[r.renderSlot(u.$slots,"label"),r.createElementVNode("div",c1,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",u1,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)])]))}}),f1={class:"w-full"},de=Z(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"}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>(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(Q,{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",f1,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(Q,{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-7eff7cbf"]]),p1={class:"flex gap-4"},wd=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(re,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":""),s=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(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-en-body-sm-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":a.state==="none"&&!o.value,"text-fm-color-typo-success":a.state==="success"&&!o.value,"text-fm-color-typo-warning":a.state==="warning"&&!o.value,"text-fm-color-typo-error":a.state==="error"&&!o.value}])},[a.errorMessages.length===0?r.renderSlot(a.$slots,"default",{key:0},()=>[r.createElementVNode("div",p1,[i.value?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass([s.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(a.text),1)])]):r.renderSlot(a.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.errorMessages,d=>(r.openBlock(),r.createElementBlock("div",{key:d,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(Q,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(d),1)]))),128))])],2))}}),Et=Math.min,Oe=Math.max,Jo=Math.round,Ko=Math.floor,Ft=t=>({x:t,y:t}),m1={left:"right",right:"left",bottom:"top",top:"bottom"},h1={start:"end",end:"start"};function Vi(t,e,n){return Oe(t,Et(e,n))}function dn(t,e){return typeof t=="function"?t(e):t}function Nt(t){return t.split("-")[0]}function cn(t){return t.split("-")[1]}function Ad(t){return t==="x"?"y":"x"}function Pi(t){return t==="y"?"height":"width"}function qn(t){return["top","bottom"].includes(Nt(t))?"y":"x"}function Ei(t){return Ad(qn(t))}function g1(t,e,n){n===void 0&&(n=!1);const o=cn(t),i=Ei(t),s=Pi(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Zo(a)),[a,Zo(a)]}function b1(t){const e=Zo(t);return[Fi(t),e,Fi(e)]}function Fi(t){return t.replace(/start|end/g,e=>h1[e])}function y1(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:a;default:return[]}}function k1(t,e,n,o){const i=cn(t);let s=y1(Nt(t),n==="start",o);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Fi)))),s}function Zo(t){return t.replace(/left|right|bottom|top/g,e=>m1[e])}function x1(t){return{top:0,right:0,bottom:0,left:0,...t}}function vd(t){return typeof t!="number"?x1(t):{top:t,right:t,bottom:t,left:t}}function $o(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Bd(t,e,n){let{reference:o,floating:i}=t;const s=qn(e),a=Ei(e),l=Pi(a),d=Nt(e),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(d){case"top":m={x:u,y:o.y-i.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(cn(e)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const S1=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Bd(c,o,d),p=o,m={},h=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:S,y:v,data:w,reset:x}=await y({x:u,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=S??u,f=v??f,m={...m,[b]:{...m[b],...w}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=Bd(c,p,d)),g=-1)}return{x:u,y:f,placement:p,strategy:i,middlewareData:m}};async function Ni(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=dn(e,t),h=vd(m),b=l[p?f==="floating"?"reference":"floating":f],y=$o(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:d})),S=f==="floating"?{...a.floating,x:o,y:i}:a.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),w=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},x=$o(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:v,strategy:d}):S);return{top:(y.top-x.top+h.top)/w.y,bottom:(x.bottom-y.bottom+h.bottom)/w.y,left:(y.left-x.left+h.left)/w.x,right:(x.right-y.right+h.right)/w.x}}const C1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:d}=e,{element:c,padding:u=0}=dn(t,e)||{};if(c==null)return{};const f=vd(u),p={x:n,y:o},m=Ei(i),h=Pi(m),g=await a.getDimensions(c),b=m==="y",y=b?"top":"left",S=b?"bottom":"right",v=b?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[m]-p[m]-s.floating[h],x=p[m]-s.reference[m],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=F?F[v]:0;(!E||!await(a.isElement==null?void 0:a.isElement(F)))&&(E=l.floating[v]||s.floating[h]);const M=w/2-x/2,I=E/2-g[h]/2-1,N=Et(f[y],I),C=Et(f[S],I),D=N,A=E-g[h]-C,k=E/2-g[h]/2+M,B=Vi(D,k,A),V=!d.arrow&&cn(i)!=null&&k!==B&&s.reference[h]/2-(k<D?N:C)-g[h]/2<0,R=V?k<D?k-D:k-A:0;return{[m]:p[m]+R,data:{[m]:B,centerOffset:k-B-R,...V&&{alignmentOffset:R}},reset:V}}}),w1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=dn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Nt(i),S=Nt(l)===l,v=await(d.isRTL==null?void 0:d.isRTL(c.floating)),w=p||(S||!g?[Zo(l)]:b1(l));!p&&h!=="none"&&w.push(...k1(l,g,h,v));const x=[l,...w],F=await Ni(e,b),E=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&E.push(F[y]),f){const D=g1(i,a,v);E.push(F[D[0]],F[D[1]])}if(M=[...M,{placement:i,overflows:E}],!E.every(D=>D<=0)){var I,N;const D=(((I=s.flip)==null?void 0:I.index)||0)+1,A=x[D];if(A)return{data:{index:D,overflows:M},reset:{placement:A}};let k=(N=M.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:N.placement;if(!k)switch(m){case"bestFit":{var C;const B=(C=M.map(V=>[V.placement,V.overflows.filter(R=>R>0).reduce((R,O)=>R+O,0)]).sort((V,R)=>V[1]-R[1])[0])==null?void 0:C[0];B&&(k=B);break}case"initialPlacement":k=l;break}if(i!==k)return{reset:{placement:k}}}return{}}}};async function A1(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Nt(n),l=cn(n),d=qn(n)==="y",c=["left","top"].includes(a)?-1:1,u=s&&d?-1:1,f=dn(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Jn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:a,middlewareData:l}=e,d=await A1(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:a}}}}},v1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:S}=b;return{x:y,y:S}}},...d}=dn(t,e),c={x:n,y:o},u=await Ni(e,d),f=qn(Nt(i)),p=Ad(f);let m=c[p],h=c[f];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",S=m+u[b],v=m-u[y];m=Vi(S,m,v)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",S=h+u[b],v=h-u[y];h=Vi(S,h,v)}const g=l.fn({...e,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},B1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:a=()=>{},...l}=dn(t,e),d=await Ni(e,l),c=Nt(n),u=cn(n),f=qn(n)==="y",{width:p,height:m}=o.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const b=m-d[h],y=p-d[g],S=!e.middlewareData.shift;let v=b,w=y;if(f){const F=p-d.left-d.right;w=u||S?Et(y,F):F}else{const F=m-d.top-d.bottom;v=u||S?Et(b,F):F}if(S&&!u){const F=Oe(d.left,0),E=Oe(d.right,0),M=Oe(d.top,0),I=Oe(d.bottom,0);f?w=p-2*(F!==0||E!==0?F+E:Oe(d.left,d.right)):v=m-2*(M!==0||I!==0?M+I:Oe(d.top,d.bottom))}await a({...e,availableWidth:w,availableHeight:v});const x=await i.getDimensions(s.floating);return p!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function ut(t){return Mi(t)?(t.nodeName||"").toLowerCase():"#document"}function Ie(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(Mi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Mi(t){return t instanceof Node||t instanceof Ie(t).Node}function pt(t){return t instanceof Element||t instanceof Ie(t).Element}function $e(t){return t instanceof HTMLElement||t instanceof Ie(t).HTMLElement}function Dd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ie(t).ShadowRoot}function Kn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Ue(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function D1(t){return["table","td","th"].includes(ut(t))}function Oi(t){const e=Ii(),n=Ue(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 V1(t){let e=un(t);for(;$e(e)&&!_o(e);){if(Oi(e))return e;e=un(e)}return null}function Ii(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _o(t){return["html","body","#document"].includes(ut(t))}function Ue(t){return Ie(t).getComputedStyle(t)}function er(t){return pt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function un(t){if(ut(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Dd(t)&&t.host||ft(t);return Dd(e)?e.host:e}function Vd(t){const e=un(t);return _o(e)?t.ownerDocument?t.ownerDocument.body:t.body:$e(e)&&Kn(e)?e:Vd(e)}function Zn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Vd(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),a=Ie(i);return s?e.concat(a,a.visualViewport||[],Kn(i)?i:[],a.frameElement&&n?Zn(a.frameElement):[]):e.concat(i,Zn(i,[],n))}function Pd(t){const e=Ue(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=$e(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:o,l=Jo(n)!==s||Jo(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Ri(t){return pt(t)?t:t.contextElement}function fn(t){const e=Ri(t);if(!$e(e))return Ft(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Pd(e);let a=(s?Jo(n.width):n.width)/o,l=(s?Jo(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const P1=Ft(0);function Ed(t){const e=Ie(t);return!Ii()||!e.visualViewport?P1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function E1(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ie(t)?!1:e}function Kt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Ri(t);let a=Ft(1);e&&(o?pt(o)&&(a=fn(o)):a=fn(t));const l=E1(s,n,o)?Ed(s):Ft(0);let d=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(s){const p=Ie(s),m=o&&pt(o)?Ie(o):o;let h=p,g=h.frameElement;for(;g&&o&&m!==h;){const b=fn(g),y=g.getBoundingClientRect(),S=Ue(g),v=y.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,w=y.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;d*=b.x,c*=b.y,u*=b.x,f*=b.y,d+=v,c+=w,h=Ie(g),g=h.frameElement}}return $o({width:u,height:f,x:d,y:c})}const F1=[":popover-open",":modal"];function Fd(t){return F1.some(e=>{try{return t.matches(e)}catch{return!1}})}function N1(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",a=ft(o),l=e?Fd(e.floating):!1;if(o===a||l&&s)return n;let d={scrollLeft:0,scrollTop:0},c=Ft(1);const u=Ft(0),f=$e(o);if((f||!f&&!s)&&((ut(o)!=="body"||Kn(a))&&(d=er(o)),$e(o))){const p=Kt(o);c=fn(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function M1(t){return Array.from(t.getClientRects())}function Nd(t){return Kt(ft(t)).left+er(t).scrollLeft}function O1(t){const e=ft(t),n=er(t),o=t.ownerDocument.body,i=Oe(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=Oe(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Nd(t);const l=-n.scrollTop;return Ue(o).direction==="rtl"&&(a+=Oe(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}function I1(t,e){const n=Ie(t),o=ft(t),i=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,d=0;if(i){s=i.width,a=i.height;const c=Ii();(!c||c&&e==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:s,height:a,x:l,y:d}}function R1(t,e){const n=Kt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=$e(t)?fn(t):Ft(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,d=i*s.x,c=o*s.y;return{width:a,height:l,x:d,y:c}}function Md(t,e,n){let o;if(e==="viewport")o=I1(t,n);else if(e==="document")o=O1(ft(t));else if(pt(e))o=R1(e,n);else{const i=Ed(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return $o(o)}function Od(t,e){const n=un(t);return n===e||!pt(n)||_o(n)?!1:Ue(n).position==="fixed"||Od(n,e)}function T1(t,e){const n=e.get(t);if(n)return n;let o=Zn(t,[],!1).filter(l=>pt(l)&&ut(l)!=="body"),i=null;const s=Ue(t).position==="fixed";let a=s?un(t):t;for(;pt(a)&&!_o(a);){const l=Ue(a),d=Oi(a);!d&&l.position==="fixed"&&(i=null),(s?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Kn(a)&&!d&&Od(t,a))?o=o.filter(u=>u!==a):i=l,a=un(a)}return e.set(t,o),o}function z1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?T1(e,this._c):[].concat(n),o],l=a[0],d=a.reduce((c,u)=>{const f=Md(e,u,i);return c.top=Oe(f.top,c.top),c.right=Et(f.right,c.right),c.bottom=Et(f.bottom,c.bottom),c.left=Oe(f.left,c.left),c},Md(e,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function L1(t){const{width:e,height:n}=Pd(t);return{width:e,height:n}}function H1(t,e,n){const o=$e(e),i=ft(e),s=n==="fixed",a=Kt(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const d=Ft(0);if(o||!o&&!s)if((ut(e)!=="body"||Kn(i))&&(l=er(e)),o){const f=Kt(e,!0,s,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=Nd(i));const c=a.left+l.scrollLeft-d.x,u=a.top+l.scrollTop-d.y;return{x:c,y:u,width:a.width,height:a.height}}function Id(t,e){return!$e(t)||Ue(t).position==="fixed"?null:e?e(t):t.offsetParent}function Rd(t,e){const n=Ie(t);if(!$e(t)||Fd(t))return n;let o=Id(t,e);for(;o&&D1(o)&&Ue(o).position==="static";)o=Id(o,e);return o&&(ut(o)==="html"||ut(o)==="body"&&Ue(o).position==="static"&&!Oi(o))?n:o||V1(t)||n}const U1=async function(t){const e=this.getOffsetParent||Rd,n=this.getDimensions;return{reference:H1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function j1(t){return Ue(t).direction==="rtl"}const Q1={convertOffsetParentRelativeRectToViewportRelativeRect:N1,getDocumentElement:ft,getClippingRect:z1,getOffsetParent:Rd,getElementRects:U1,getClientRects:M1,getDimensions:L1,getScale:fn,isElement:pt,isRTL:j1};function W1(t,e){let n=null,o;const i=ft(t);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function a(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),s();const{left:c,top:u,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const m=Ko(u),h=Ko(i.clientWidth-(c+f)),g=Ko(i.clientHeight-(u+p)),b=Ko(c),S={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:Oe(0,Et(1,d))||1};let v=!0;function w(x){const F=x[0].intersectionRatio;if(F!==d){if(!v)return a();F?a(!1,F):o=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(w,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,S)}n.observe(t)}return a(!0),s}function $n(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=Ri(t),u=i||s?[...c?Zn(c):[],...Zn(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&l?W1(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),c&&!d&&m.observe(c),m.observe(e));let h,g=d?Kt(t):null;d&&b();function b(){const y=Kt(t);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(b)}return n(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(h)}}const Td=v1,_n=w1,Y1=B1,X1=C1,G1=(t,e,n)=>{const o=new Map,i={platform:Q1,...n},s={...i.platform,_c:o};return S1(t,e,{...i,platform:s})};function q1(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ti(t){if(q1(t)){const e=t.$el;return Mi(e)&&ut(e)==="#comment"?null:e}return t}function zd(t){return{name:"arrow",options:t,fn(e){const n=Ti(r.unref(t.element));return n==null?{}:X1({element:n,padding:t.padding}).fn(e)}}}function Ld(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Hd(t,e){const n=Ld(t);return Math.round(e*n)/n}function eo(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var E;return(E=r.unref(n.open))!=null?E:!0}),s=r.computed(()=>r.unref(n.middleware)),a=r.computed(()=>{var E;return(E=r.unref(n.placement))!=null?E:"bottom"}),l=r.computed(()=>{var E;return(E=r.unref(n.strategy))!=null?E:"absolute"}),d=r.computed(()=>{var E;return(E=r.unref(n.transform))!=null?E:!0}),c=r.computed(()=>Ti(t.value)),u=r.computed(()=>Ti(e.value)),f=r.ref(0),p=r.ref(0),m=r.ref(l.value),h=r.ref(a.value),g=r.shallowRef({}),b=r.ref(!1),y=r.computed(()=>{const E={position:m.value,left:"0",top:"0"};if(!u.value)return E;const M=Hd(u.value,f.value),I=Hd(u.value,p.value);return d.value?{...E,transform:"translate("+M+"px, "+I+"px)",...Ld(u.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:M+"px",top:I+"px"}});let S;function v(){c.value==null||u.value==null||G1(c.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(E=>{f.value=E.x,p.value=E.y,m.value=E.strategy,h.value=E.placement,g.value=E.middlewareData,b.value=!0})}function w(){typeof S=="function"&&(S(),S=void 0)}function x(){if(w(),o===void 0){v();return}if(c.value!=null&&u.value!=null){S=o(c.value,u.value,v);return}}function F(){i.value||(b.value=!1)}return r.watch([s,a,l],v,{flush:"sync"}),r.watch([c,u],x,{flush:"sync"}),r.watch(i,F,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(w),{x:r.shallowReadonly(f),y:r.shallowReadonly(p),strategy:r.shallowReadonly(m),placement:r.shallowReadonly(h),middlewareData:r.shallowReadonly(g),isPositioned:r.shallowReadonly(b),floatingStyles:y,update:v}}const Ud={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)}},zi=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:s,middlewareData:a,placement:l}=eo(n,o,{whileElementsMounted:$n,placement:e.placement,middleware:[_n(),Jn({mainAxis:6}),zd({element:i})]}),d="ontouchstart"in window||navigator.maxTouchPoints>0,c=r.ref(!1),u=r.ref(0),f=r.ref(0),p=()=>{e.disabled||(clearTimeout(f.value),u.value=window.setTimeout(()=>{c.value=!0},250))},m=()=>{e.disabled||(clearTimeout(u.value),f.value=window.setTimeout(()=>c.value=!1,250))},h=()=>{d?c.value?m():p():m()},g=()=>{d||m()},b=()=>{d||m()},y=()=>{m()},S=()=>{clearTimeout(f.value),c.value=!0},v=r.computed(()=>{var x,F,E,M;const w={top:"bottom",right:"left",bottom:"top",left:"right"}[l.value];return{left:((x=a.value.arrow)==null?void 0:x.x)!=null?`${(F=a.value.arrow)==null?void 0:F.x}px`:"",top:((E=a.value.arrow)==null?void 0:E.y)!=null?`${(M=a.value.arrow)==null?void 0:M.y}px`:"",[w]:"-3px"}});return(w,x)=>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":w.disabled},w.contentClass],"cursor-pointer flex items-center justify-center relative"]),onPointerdown:h,onPointerleave:b,onPointermove:x[0]||(x[0]=F=>{F.pointerType!=="touch"&&p()}),onPointerup:g},[r.renderSlot(w.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[c.value&&!w.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":w.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-en-body-md-400":w.variant==="rich"},"fm-shadow-light-300 max-w-[240px] px-8 py-4 rounded-md"]),style:r.normalizeStyle([r.unref(s),{zIndex:w.zIndex}]),onMouseenter:S,onMouseleave:m},[r.renderSlot(w.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(w.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass([{"bg-fm-color-neutral-black":w.variant==="plain","bg-fm-color-neutral-white":w.variant==="rich"},"absolute h-8 rotate-45 rounded-[2px] w-8"]),style:r.normalizeStyle(v.value)},null,6),[[r.vShow,!w.hideArrow]])],38)):r.createCommentVNode("",!0)]))])),[[r.unref(Ud),y]])}}),Zt=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:""}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-400 flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info}])},[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"])}," (optional) ",2)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(zi,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(Q,{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)}}),J1={key:1,class:"flex items-center justify-between"},Se=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},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"}},setup(t){const e=t,n=r.inject(re,null),{errorMessages:o,isPristine:i}=$s(e),{focus:s,blur:a}=xn(),l=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),d=r.computed(()=>({label:e.label,disabled:l.value,required:e.required,optional:e.optional,info:e.info})),c=r.computed(()=>({text:e.helperText,disabled:l.value,state:e.helperState,errorMessages:o.value})),u=r.computed(()=>({isPristine:i,invalid:o.value.length>0}));return(f,p)=>(r.openBlock(),r.createBlock(e.tag,{class:"flex flex-col gap-4",onBlur:r.unref(a),onClick:r.unref(s)},{default:r.withCtx(()=>[f.label||f.$slots.label?(r.openBlock(),r.createBlock(Zt,r.normalizeProps(r.mergeProps({key:0},d.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"label")]),_:3},16)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"default",r.normalizeProps(r.guardReactiveProps(u.value))),c.value.text||c.value.errorMessages.length>0||f.$slots["helper-text"]||f.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",J1,[r.createVNode(wd,r.normalizeProps(r.guardReactiveProps(c.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"helper-text")]),_:3},16),r.renderSlot(f.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}}),_e=Z(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},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:{}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([]);let s;const a=r.ref(),l=r.ref(n.maxHeight),d=r.ref(!1),c=r.ref(!1),u=r.inject(Xs,null),f=r.ref(null),p=r.ref(null),{floatingStyles:m}=eo(f,p,{middleware:[Y1({apply({availableHeight:M,elements:I}){if(n.shift)return;const N=M-16,C=Math.min(N,n.maxHeight);n.minHeight&&C<=n.minHeight||(l.value=C,Object.assign(I.floating.style,{maxHeight:`${N}px`}))}}),Jn({mainAxis:n.offset??(u?8:4),crossAxis:u?-12:0}),_n({crossAxis:!1,fallbackStrategy:"initialPlacement"}),Td()],placement:n.placement,whileElementsMounted:$n,strategy:"fixed"}),h=()=>{F.value==="hover"&&b()},g=M=>{if(n.stopClickPropagation&&(M.stopPropagation(),document.body.click()),!n.disabled){if(d.value){d.value=!1;return}F.value==="click"&&b()}},b=()=>{c.value=!0,d.value=!0,u==null||u.setChildId(s)},y=()=>{F.value==="hover"&&(c.value=!1)},S=()=>{c.value=!0},v=()=>{c.value=!1},w=()=>{n.closeOnClick&&setTimeout(()=>{d.value=!1,u==null||u.closeParent()},10)},x=r.computed(()=>({mouseInMenu:c}));r.provide(Xs,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){u?(d.value=!1,u==null||u.closeParent()):d.value=F.value!=="click"},setChildId(M){a.value=M},mouseInChildId:a,trigger:n.trigger}),r.provide(Gs,{handleContentClick:w}),r.onMounted(()=>{window.addEventListener("click",E),u&&(s=u.register({injectProps:x}))}),r.onUnmounted(()=>{window.removeEventListener("click",E)}),r.watch(()=>u==null?void 0:u.mouseInChildId.value,M=>{M!==s&&(d.value=!1)});const F=r.computed(()=>u===null?n.trigger:"hover");r.watch(()=>d.value,()=>o("menu-changed",d.value));const E=M=>{if(!d.value)return;const I=M.path||M.composedPath();for(const N of I)if(N==f.value||N==p.value)return;d.value=!1};return(M,I)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:f,class:"fm-menu",onClick:g,onMouseenter:h,onMouseleave:y},[r.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(u)||M.inPopover,to:"body"},[d.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:p,style:r.normalizeStyle({...r.unref(m),zIndex:n.zIndex}),class:"block",onMouseenter:S,onMouseleave:v},[r.renderSlot(M.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:l.value,width:`${M.width}px`})),()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${l.value}px`,width:M.width}),class:"fm-menu__wrapper"},[r.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-a5f687e1"]]),K1={class:"fm-menu-item--left"},Z1={key:0,class:"fm-menu-item--right"},xe=Z(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.inject(Gs,null),s=e,a=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},l=()=>{s("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:a,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseleave:u[2]||(u[2]=()=>d(!1)),onMouseup:u[3]||(u[3]=()=>d(!1))},[r.createElementVNode("div",K1,[r.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E",name:c.icon,outline:!o.value&&!c.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),c.hasCheckbox?(r.openBlock(),r.createBlock(Cd,{key:1,disabled:c.disabled,indeterminate:c.indeterminate,"model-value":c.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:u[0]||(u[0]=f=>f.preventDefault()),"onUpdate:modelValue":l},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-md-400 max-w-[240px]",c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(c.label),3),c.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-sm-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(c.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(r.openBlock(),r.createElementBlock("div",Z1,[r.createVNode(Q,{color:c.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-b196a86b"]]),$1={class:"fm-typo-en-body-lg-600"},_1={class:"h-[264px] overflow-y-auto w-[160px]"},eb=["onVnodeMounted"],tb=["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),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click","in-popover":"",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"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",$1,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",_1,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,eb))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,tb))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),mt=Z(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),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n(),Td({crossAxis:!0})],placement:o.placement,whileElementsMounted:$n,strategy:"fixed"}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};r.watch(()=>o.showPopover,m=>i.value=m);const p=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(m,h)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-popover",onClick:f},[r.renderSlot(m.$slots,"popover-button",{},void 0,!0)],512),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:a,style:r.normalizeStyle({...r.unref(l),zIndex:o.zIndex}),class:"fm-popover__content",onClick:h[0]||(h[0]=r.withModifiers(()=>{},["stop"]))},[r.renderSlot(m.$slots,"default",{hide:u,show:c},void 0,!0)],4)):r.createCommentVNode("",!0)]))])),[[r.unref(Ud),p,m.excludeElFromClickOutside]])}}),[["__scopeId","data-v-2c43bc65"]]),z="YYYY-MM-DD",Li=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e},jd=(t,e)=>{const n=P().startOf("month"),o=P(t).diff(n,"month"),i=P(e).diff(n,"month"),s=[];for(let a=o-1;a<=i;a++){const l=[],d=n.add(a,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),p=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&p.length>0&&(l.push(p),p=[]),p.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");p.length>0&&l.push(p),s.push({id:d.format("YYYY-MM-DD"),matrix:l,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return s},to=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),nb={class:"p-12 w-[360px]"},ob={class:"w-max"},rb={class:"flex h-40 justify-between px-4 py-8"},ib={class:"flex gap-4 items-center"},sb={class:"flex gap-4 items-center justify-center"},ab={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},lb=["onClick"],db={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},cb=Z(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},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(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,z)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(!1),c=r.ref(!1),u=h=>{i.value=h},f=()=>{o.value=i.value.format(z),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{d.value=!1,c.value=!1,l.value=h};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[5]||(g[5]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"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,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":h.zIndex,onPopoverChanged:g[4]||(g[4]=y=>s.value=y)},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value})),void 0,!0):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.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(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",nb,[r.createElementVNode("div",ob,[r.createElementVNode("div",rb,[r.createElementVNode("div",ib,[r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>m(y))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>m(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",sb,[r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:g[2]||(g[2]=()=>m(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:g[3]||(g[3]=()=>m(l.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",ab,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),y=>(r.openBlock(),r.createElementBlock("div",{key:y,class:"fm-calendar__cell"},r.toDisplayString(y),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(l.value),(y,S)=>(r.openBlock(),r.createElementBlock("div",{key:S,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y,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:()=>u(v.date)},r.toDisplayString(v.date.date()),11,lb)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",db,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-6d34db79"]]),Qd=t=>(r.pushScopeId("data-v-17f2ddbc"),t=t(),r.popScopeId(),t),ub={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},fb={class:"flex items-center justify-center"},pb={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},mb={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},hb=Qd(()=>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)),gb={id:"wrapper",class:"h-full relative w-[336px]"},bb=["id"],yb={class:"flex gap-4 items-center"},kb={class:"fm-typo-en-body-lg-600"},xb={class:"fm-typo-en-body-lg-600"},Sb=["onClick"],Cb={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},wb=Qd(()=>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)),Ab={class:"flex gap-8 items-center justify-end w-full"},Wd=Z(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},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(re,null),o=jd(e.min,e.max),i=J(e,"modelValue"),s=P(),a=r.ref(P(i.value,z)),l=r.ref(!1),d=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),c=r.ref(),u=g=>{a.value=g},f=()=>{i.value=a.value.format(z),setTimeout(()=>{l.value=!1},0)},p=()=>{a.value=i.value?P(i.value):null,l.value=!1},m=()=>{l.value=!0,setTimeout(()=>{c.value.scrollToItem(h(s.startOf("month")))},0)},h=g=>o.findIndex(b=>b.id===g.startOf("month").format(z));return(g,b)=>{const y=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[0]||(b[0]=S=>r.isRef(i)?i.value=S:null),disabled:d.value,focused:l.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:S})=>[g.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:m},[r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:S,opened:l.value,showValidBorder:g.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(de,{key:1,disabled:d.value,focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:m},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.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(P)(r.unref(i)).format("D MMM YYYY"):"DD MM YYYY"),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-screen left-0 top-0 w-screen"},[r.createElementVNode("div",ub,[r.createVNode(de,{focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v,w;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":(v=a.value)!=null&&v.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((w=a.value)!=null&&w.isValid()?r.unref(P)(a.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",fb,[r.createElementVNode("div",pb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))])])]),r.createElementVNode("div",mb,[hb,r.createElementVNode("div",gb,[r.createVNode(y,{ref_key:"scroller",ref:c,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",yb,[r.createElementVNode("div",kb,r.toDisplayString(r.unref(P)(v.id).format("MMMM")),1),r.createElementVNode("div",xb,r.toDisplayString(r.unref(P)(v.id).format("YYYY")),1)])],8,bb),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.matrix,(w,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w,F=>(r.openBlock(),r.createElementBlock("div",{key:F.date.date(),class:"fm-calendar__cell"},[F.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":F.date.isSame(a.value),"fm-typo-en-body-lg-600":F.date.isSame(r.unref(s),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>u(F.date)},r.toDisplayString(F.date.date()),11,Sb)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",Cb,[wb,r.createElementVNode("div",Ab,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!a.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-17f2ddbc"]]),tr=t=>{const e=r.inject(re,null);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},vb=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},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}=xt(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(cb,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$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(Wd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Yd=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))}}),Bb={class:"cursor-pointer fm-switch__container"},Db={key:0},Vb={class:"fm-typo-en-body-lg-400"},Pb={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},Eb={class:"fm-switch__input--container"},Fb=["checked","disabled","value"],Nb={key:1},Mb={class:"fm-typo-en-body-lg-400"},Ob={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Hi=Z(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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=()=>{o.value||(i.value=!i.value)};return(a,l)=>(r.openBlock(),r.createElementBlock("label",Bb,[a.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",Db,[r.renderSlot(a.$slots,"label",{},void 0,!0),r.createElementVNode("div",Vb,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Pb,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",Eb,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:a.value,class:"fm-switch__input--btn",type:"checkbox",onClick:s},null,8,Fb),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":a.showIcon})},[a.showIcon?(r.openBlock(),r.createBlock(Q,{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)]),a.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",Nb,[r.createElementVNode("div",Mb,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Ob,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-4448e953"]]);var ye=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(ye||{});const Xd=t=>(r.pushScopeId("data-v-a35b0ec8"),t=t(),r.popScopeId(),t),Ib={key:0,class:"flex gap-4 items-center relative w-full"},Rb={class:"flex flex-col gap-4 w-full"},Tb=Xd(()=>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)),zb={class:"flex flex-col gap-4 w-full"},Lb={key:1,class:"flex flex-col gap-4 w-full"},Hb={class:"flex gap-4 p-12"},Ub={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},jb={key:0,class:"px-8"},Qb={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Wb={class:"flex flex-col gap-24"},Yb={key:0,class:"flex gap-4 items-center px-12 w-full"},Xb={class:"flex flex-col gap-4 w-full"},Gb=Xd(()=>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)),qb={class:"flex flex-col gap-4 w-full"},Jb={class:"flex gap-24"},Kb={class:"w-max"},Zb={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},$b={class:"flex gap-4 items-center"},_b={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},e2={class:"h-[288px]"},t2={key:0,class:"fm-calendar__cell__button--today"},n2=["onClick","onMouseover"],o2={class:"w-max"},r2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},i2={class:"flex gap-4 items-center"},s2={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},a2={key:0,class:"fm-calendar__cell__button--today"},l2=["onClick","onMouseover"],d2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},c2=Z(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var C,D;const e=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=ye.PrecedingPeriod;const A=a.value;if(A[0].startDate&&A[0].endDate){const k=A[0].startDate.diff(A[0].endDate,"day");A[1]={startDate:A[0].startDate.subtract(+(1-k),"day"),endDate:A[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=ye.PrecedingWeek;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"week");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"week"),endDate:A[0].endDate.subtract(k,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=ye.PrecedingMonth;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"month");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"month"),endDate:A[0].endDate.subtract(k,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{u.value=ye.Custom}}],n=t,o=r.inject(re,null),i=P(),s=J(n,"modelValue"),a=r.ref([{startDate:(C=s.value)!=null&&C.startDate?P(s.value.startDate,z):null,endDate:(D=s.value)!=null&&D.endDate?P(s.value.endDate,z):null},{startDate:null,endDate:null}]),l=r.ref(!1),d=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),c=r.ref(!1),u=r.ref(""),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(null);let g=0;const b=A=>{var k;if(m.value="",a.value[g].startDate&&a.value[g].endDate){g===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),g=0),a.value[0]={startDate:A,endDate:null};return}else if(!a.value[g].startDate&&!a.value[g].endDate)a.value[g].startDate=A;else{if(A.isBefore(a.value[g].startDate)){const B=a.value[g].startDate;a.value[g]={startDate:A,endDate:B}}else a.value[g].endDate=A;c.value&&(g=1),e.find(B=>B.id===u.value)||(u.value=ye.Custom)}(k=e.find(B=>B.id===u.value))==null||k.action()},y=()=>{c.value?s.value=a.value.map(A=>({startDate:A.startDate.format(z),endDate:A.endDate.format(z)})):s.value={startDate:a.value[0].startDate.format(z),endDate:a.value[0].endDate.format(z)},setTimeout(()=>{l.value=!1})},S=()=>{var A,k;Array.isArray(s.value)?a.value=s.value:a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null},l.value=!1},v=(A,k)=>{A==="left"?(f.value=k,p.value=k.add(1,"month")):A==="right"&&(p.value=k,f.value=k.subtract(1,"month"))},w=A=>{const k=a.value[0].startDate,B=a.value[0].endDate,V=a.value[1].startDate,R=a.value[1].endDate,O=h.value,T=k==null?void 0:k.isSame(A),U=B==null?void 0:B.isSame(A),W=V==null?void 0:V.isSame(A),j=R==null?void 0:R.isSame(A),K=O==null?void 0:O.isSame(A),_=T&&B&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isAfter(k))||k&&!B&&K&&(O==null?void 0:O.isBefore(k)),te=W&&R&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isAfter(V))||V&&!R&&K&&(O==null?void 0:O.isBefore(V)),he=U&&k&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isBefore(k))||k&&!B&&K&&(O==null?void 0:O.isAfter(k)),Te=j&&V&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isBefore(V))||V&&!R&&K&&(O==null?void 0:O.isAfter(V)),qe=T&&U||T&&!B,ze=W&&j||W&&!R,ge=k&&(B||O)&&B?A.isAfter(k)&&A.isBefore(B):A.isAfter(O)&&A.isBefore(k)||A.isBefore(O)&&A.isAfter(k),Fe=V&&(R||O)&&R?A.isAfter(V)&&A.isBefore(R):A.isAfter(O)&&A.isBefore(V)||A.isBefore(O)&&A.isAfter(V),Le=()=>{if(a.value.filter(Os=>{var ao;for(const vr in Os)if((ao=Os[vr])!=null&&ao.isSame(A,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(T&&U&&(ue(A,V,R)||ue(A,V,O)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(W&&j&&(ue(A,k,B)||ue(A,k,O)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(_||he)return ue(A,V,R)||ue(A,V,O)?"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(te||Te)return ue(A,k,B)||ue(A,k,O)?"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(qe)return"bg-fm-color-primary";if(ze)return"bg-fm-color-system-info-300";if(ue(A,k,B)&&(ue(A,V,R)||ue(A,V,O)))return"bg-fm-color-system-success-100";if(ge)return"bg-fm-color-system-warning-100";if(Fe)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Le()}`]:_||te,[`fm-calendar__cell__button--selected-end ${Le()}`]:he||Te,[`fm-calendar__cell__button--selected-between ${Le()}`]:ge||Fe,[`fm-calendar__cell__button--selected ${Le()}`]:qe||ze}},x=A=>{const k=a.value;if(k[0].startDate&&!k[0].endDate||k[1].startDate&&!k[1].endDate){h.value=A;return}h.value=null},F=A=>{m.value=A.label,a.value[0]={startDate:P(A.value.startDate,z),endDate:P(A.value.endDate,z)}},E=r.computed(()=>c.value?!a.value.every(A=>A.startDate&&A.endDate):!(a.value[0].startDate&&a.value[0].endDate)),M=A=>{u.value="",c.value=A,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),g=0},I=r.computed(()=>{if(!s.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const A=c.value&&Array.isArray(s.value)?s.value[0].startDate:s.value.startDate,k=c.value&&Array.isArray(s.value)?s.value[0].endDate:s.value.endDate;return{startDate:A?P(A).format("D MMM YYYY"):"DD MM YYYY",endDate:k?P(k).format("D MMM YYYY"):"DD MM YYYY"}}),N=r.computed(()=>{const A=c.value&&Array.isArray(s.value)?s.value[1].startDate:null,k=c.value&&Array.isArray(s.value)?s.value[1].endDate:null;return A&&k?`Compared: ${P(A).format("D MMM YYYY")} - ${P(k).format("D MMM YYYY")}`:""});return r.watch(()=>s.value,()=>{var A,k;c.value?a.value=s.value.map(B=>({startDate:B!=null&&B.startDate?P(B.startDate,z):null,endDate:B!=null&&B.endDate?P(B.endDate,z):null})):a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null}}),(A,k)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":k[8]||(k[8]=B=>r.isRef(s)?s.value=B:null),disabled:d.value,focused:l.value,"helper-state":A.helperState,"helper-text":c.value?N.value:A.helperText,rules:A.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:B})=>[r.createVNode(mt,{disabled:d.value,"show-popover":l.value,"z-index":n.zIndex,onPopoverChanged:k[7]||(k[7]=V=>l.value=V)},{"popover-button":r.withCtx(()=>[A.$slots["trigger-button"]?r.renderSlot(A.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:B,showValidBorder:A.showValidBorder,isComparing:c.value,disabled:d.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[A.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ib,[r.createElementVNode("label",Rb,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.startLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.startDate?r.unref(P)(r.unref(s).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),Tb,r.createElementVNode("label",zb,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.endLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.endDate?r.unref(P)(r.unref(s).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),A.compare?(r.openBlock(),r.createElementBlock("label",Lb,[r.createVNode(Zt,{label:A.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:B,"show-valid-border":A.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(I.value.startDate)+" - "+r.toDisplayString(I.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",Hb,[A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",Ub,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.predefinedRange,(V,R)=>(r.openBlock(),r.createBlock(xe,{key:R,label:V.label,"model-value":m.value===V.label,selectable:"",onClick:O=>F(V)},null,8,["label","model-value","onClick"]))),128)),A.compare&&A.predefinedRange?(r.openBlock(),r.createElementBlock("div",jb,[r.createVNode(Yd,{inset:""})])):r.createCommentVNode("",!0),A.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":c.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":k[0]||(k[0]=V=>M(V))},null,8,["model-value"]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(V,R)=>r.createVNode(xe,{key:R,label:V.label,"model-value":u.value===V.id,sublabel:V.sublabel,selectable:"",onClick:O=>V.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",Qb)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":A.showPredefinedRange})},[r.createElementVNode("div",Wb,[c.value?(r.openBlock(),r.createElementBlock("div",Yb,[r.createElementVNode("label",Xb,[r.createVNode(Zt,{label:"Custom"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[0])!=null&&V.startDate&&((R=a.value[0])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[0].startDate!==null?a.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[0].endDate!==null?a.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Gb,r.createElementVNode("label",qb,[r.createVNode(Zt,{label:"Compare"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[1])!=null&&V.startDate&&((R=a.value[1])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[1].startDate!==null?a.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[1].endDate!==null?a.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",Jb,[r.createElementVNode("div",Kb,[r.createElementVNode("div",Zb,[r.createElementVNode("div",$b,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:k[1]||(k[1]=()=>v("left",f.value.subtract(1,"month")))}),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"month","onUpdate:modelValue":k[2]||(k[2]=V=>v("left",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"year","onUpdate:modelValue":k[3]||(k[3]=V=>v("left",V))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",_b,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",e2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(f.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",t2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,n2)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",o2,[r.createElementVNode("div",r2,[r.createElementVNode("div",i2,[r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"month","onUpdate:modelValue":k[4]||(k[4]=V=>v("right",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"year","onUpdate:modelValue":k[5]||(k[5]=V=>v("right",V))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:k[6]||(k[6]=()=>v("left",f.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",s2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(p.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",a2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,l2)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",d2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:E.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[A.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(A.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-a35b0ec8"]]),u2={class:"flex flex-col gap-4"},f2=["id"],p2={class:"flex flex-col gap-4 justify-center"},mn=Z(r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},menuId:{},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(re,null),i=e,s=J(n,"modelValue"),a=r.ref(!1),l=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),d=(h,g)=>{if(n.multiselect){let b=[];h?b=s.value.length===0?[g]:n.items.filter(y=>s.value.some(S=>Ce(y.value,S)||Ce(y.value,g.value))):b=n.items.filter(y=>s.value.some(S=>Ce(y.value,S)&&!Ce(y.value,g.value))),s.value=b.map(y=>y.value)}else s.value=g.value,setTimeout(()=>{a.value=!1},0)},c=h=>{const g=[...s.value].filter((b,y)=>y!==h);s.value=g},u=r.computed(()=>n.multiselect?n.items.filter(h=>r.toRaw(s.value).some(g=>Ce(g,h.value))):n.items.filter(h=>Ce(s.value,h.value))),f=r.computed(()=>n.items.filter(h=>s.value.some(g=>Ce(h.value,g))).map(h=>({label:h.label}))),p=r.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(g=>Ce(g.value,s.value)))==null?void 0:h.label)??n.placeholder}),m=r.computed(()=>n.multiselect?s.value.length!==0:n.items.some(h=>Ce(h.value,s.value)));return(h,g)=>(r.openBlock(),r.createElementBlock("div",u2,[r.createVNode(Se,{modelValue:r.unref(s),"onUpdate:modelValue":g[1]||(g[1]=b=>r.isRef(s)?s.value=b:null),disabled:l.value,focused:a.value,"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},r.createSlots({default:r.withCtx(({invalid:b})=>[r.createVNode(_e,{"close-on-click":!h.multiselect,disabled:l.value,"max-height":h.maxHeight,placement:h.placement,"show-menu":a.value,width:h.width,onMenuChanged:g[0]||(g[0]=y=>{a.value=y,i("dropdown-changed",a.value)})},{"menu-button":r.withCtx(()=>[r.createVNode(de,{class:r.normalizeClass(l.value?"cursor-not-allowed":"cursor-pointer"),focused:a.value,invalid:b,"show-valid-border":h.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.createVNode(Q,{color:l.value?"#C7C7CC":"black",name:a.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"])]),default:r.withCtx(()=>[r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[l.value?"text-fm-color-typo-disabled":m.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-en-body-lg-400 line-clamp-1"])},r.toDisplayString(p.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(({maxHeight:y,width:S})=>[r.createElementVNode("div",{id:h.menuId,style:r.normalizeStyle({"max-height":`${y}px`,width:`${S}px`}),class:"fm-select__menu__wrapper"},[r.renderSlot(h.$slots,"menu-wrapper",r.mergeProps({handleItemChange:(v,w)=>d(v,w)},{maxHeight:y,width:S}),()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,v=>(r.openBlock(),r.createBlock(xe,{key:v.value,"has-checkbox":h.multiselect,label:v.label,"model-value":u.value.some(w=>r.unref(Ce)(w.value,v.value)),sublabel:v.sublabel,value:v.value,"onUpdate:modelValue":w=>d(w,v)},null,8,["has-checkbox","label","model-value","sublabel","value","onUpdate:modelValue"]))),128))],!0)],12,f2)]),_:2},1032,["close-on-click","disabled","max-height","placement","show-menu","width"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),r.createElementVNode("div",p2,[h.multiselect&&u.value.length>0?(r.openBlock(),r.createBlock(Ir,{key:0,disabled:l.value,items:f.value,removable:"",onChipClosed:c},null,8,["disabled","items"])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-43a21fe7"]]),m2={key:0},h2={class:"flex gap-4 items-center relative w-full"},g2={class:"flex flex-col gap-4 w-full"},b2=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),y2={class:"flex flex-col gap-4 w-full"},k2={key:1,class:"flex flex-col gap-4 w-full"},Ui=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:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};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?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",m2,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",h2,[r.createElementVNode("label",g2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),b2,r.createElementVNode("label",y2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month",disabled:o.disabled,"icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",k2,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{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(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Gd=t=>(r.pushScopeId("data-v-133138e9"),t=t(),r.popScopeId(),t),x2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},S2={class:"flex items-center justify-center"},C2={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},w2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},A2=Gd(()=>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)),v2={id:"wrapper",class:"h-full relative w-[336px]"},B2=["id"],D2={class:"flex gap-4 items-center"},V2={class:"fm-typo-en-body-lg-600"},P2={class:"fm-typo-en-body-lg-600"},E2=["onClick","onMouseover"],F2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},N2=Gd(()=>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)),M2={class:"flex gap-8 items-center justify-end w-full"},qd=Z(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:100},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var D,A;const e=r.ref(),n=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{f.value=ye.PrecedingPeriod;const k=d.value;if(k[0].startDate&&k[0].endDate){const B=k[0].startDate.diff(k[0].endDate,"day");k[1]={startDate:k[0].startDate.subtract(+(1-B),"day"),endDate:k[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{f.value=ye.PrecedingWeek;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"week");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"week"),endDate:k[0].endDate.subtract(B,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{f.value=ye.PrecedingMonth;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"month");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"month"),endDate:k[0].endDate.subtract(B,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{f.value=ye.Custom}}],o=t,i=r.inject(re,null),s=jd(o.min,o.max),a=P(),l=J(o,"modelValue"),d=r.ref([{startDate:(D=l.value)!=null&&D.startDate?P(l.value.startDate,z):null,endDate:(A=l.value)!=null&&A.endDate?P(l.value.endDate,z):null},{startDate:null,endDate:null}]),c=r.ref(!1),u=r.ref(!1),f=r.ref(""),p=r.ref(""),m=r.ref(null);let h=0;const g=k=>{var B;if(p.value="",d.value[h].startDate&&d.value[h].endDate){h===1&&(d.value=d.value.map(()=>({startDate:null,endDate:null})),h=0),d.value[0]={startDate:k,endDate:null};return}else if(!d.value[h].startDate&&!d.value[h].endDate)d.value[h].startDate=k;else{if(k.isBefore(d.value[h].startDate)){const V=d.value[h].startDate;d.value[h]={startDate:k,endDate:V}}else d.value[h].endDate=k;u.value&&(h=1),n.find(V=>V.id===f.value)||(f.value=ye.Custom)}(B=n.find(V=>V.id===f.value))==null||B.action()},b=()=>{u.value?l.value=d.value.map(k=>({startDate:k.startDate.format(z),endDate:k.endDate.format(z)})):l.value={startDate:d.value[0].startDate.format(z),endDate:d.value[0].endDate.format(z)},setTimeout(()=>{c.value=!1})},y=()=>{var k,B;Array.isArray(l.value)?d.value=l.value:d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null},c.value=!1},S=k=>{const B=d.value[0].startDate,V=d.value[0].endDate,R=d.value[1].startDate,O=d.value[1].endDate,T=m.value,U=B==null?void 0:B.isSame(k),W=V==null?void 0:V.isSame(k),j=R==null?void 0:R.isSame(k),K=O==null?void 0:O.isSame(k),_=T==null?void 0:T.isSame(k),te=U&&V&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isAfter(B))||B&&!V&&_&&(T==null?void 0:T.isBefore(B)),he=j&&O&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isAfter(R))||R&&!O&&_&&(T==null?void 0:T.isBefore(R)),Te=W&&B&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isBefore(B))||B&&!V&&_&&(T==null?void 0:T.isAfter(B)),qe=K&&R&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isBefore(R))||R&&!O&&_&&(T==null?void 0:T.isAfter(R)),ze=U&&W||U&&!V,ge=j&&K||j&&!O,Fe=B&&(V||T)&&V?k.isAfter(B)&&k.isBefore(V):k.isAfter(T)&&k.isBefore(B)||k.isBefore(T)&&k.isAfter(B),Le=R&&(O||T)&&O?k.isAfter(R)&&k.isBefore(O):k.isAfter(T)&&k.isBefore(R)||k.isBefore(T)&&k.isAfter(R),nt=()=>{if(d.value.filter(ao=>{var vr;for(const XC in ao)if((vr=ao[XC])!=null&&vr.isSame(k,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(U&&W&&(ue(k,R,O)||ue(k,R,T)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(j&&K&&(ue(k,B,V)||ue(k,B,T)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(te||Te)return ue(k,R,O)||ue(k,R,T)?"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||qe)return ue(k,B,V)||ue(k,B,T)?"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(ze)return"bg-fm-color-primary";if(ge)return"bg-fm-color-system-info-300";if(ue(k,B,V)&&(ue(k,R,O)||ue(k,R,T)))return"bg-fm-color-system-success-100";if(Fe)return"bg-fm-color-system-warning-100";if(Le)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${nt()}`]:te||he,[`fm-calendar__cell__button--selected-end ${nt()}`]:Te||qe,[`fm-calendar__cell__button--selected-between ${nt()}`]:Fe||Le,[`fm-calendar__cell__button--selected ${nt()}`]:ze||ge}},v=k=>{const B=d.value;if(B[0].startDate&&!B[0].endDate||B[1].startDate&&!B[1].endDate){m.value=k;return}m.value=null},w=k=>{d.value[0]={startDate:P(k.startDate,z),endDate:P(k.endDate,z)}},x=k=>{const B=n.find(V=>V.id===k);B==null||B.action()},F=r.computed(()=>u.value?!d.value.every(k=>k.startDate&&k.endDate):!(d.value[0].startDate&&d.value[0].endDate)),E=k=>{f.value="",u.value=k,d.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),h=0},M=r.computed(()=>{const k=u.value&&Array.isArray(l.value)?l.value[1].startDate:null,B=u.value&&Array.isArray(l.value)?l.value[1].endDate:null;return k&&B?`Compared: ${P(k).format("D MMM YYYY")} - ${P(B).format("D MMM YYYY")}`:""}),I=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),N=()=>{I.value||(c.value=!0,setTimeout(()=>{e.value.scrollToItem(C(a.startOf("month")))},0))},C=k=>s.findIndex(B=>B.id===k.startOf("month").format(z));return r.watch(()=>l.value,()=>{var k,B;u.value?d.value=l.value.map(V=>({startDate:V!=null&&V.startDate?P(V.startDate,z):null,endDate:V!=null&&V.endDate?P(V.endDate,z):null})):d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null}}),(k,B)=>{const V=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":B[3]||(B[3]=R=>r.isRef(l)?l.value=R:null),disabled:I.value,focused:c.value,"helper-state":k.helperState,"helper-text":u.value?M.value:k.helperText,rules:k.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:R})=>{var O,T,U,W;return[k.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:N},[r.renderSlot(k.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:c.value,invalid:R,showValidBorder:k.showValidBorder,isComparing:u.value,disabled:I.value})),void 0,!0)])):(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"compare-label":k.compareLabel,disabled:I.value,"end-label":k.endLabel,focused:c.value,invalid:R,"is-comparing":u.value,"model-value":r.unref(l),"show-valid-border":k.showValidBorder,"start-label":k.startLabel,onClick:N},r.createSlots({_:2},[k.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"popover-button",{focused:c.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"])),c.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-screen left-0 top-0 w-screen"},[r.createElementVNode("div",x2,[k.showPredefinedRange?(r.openBlock(),r.createBlock(mn,{key:0,items:k.predefinedRange,"model-value":p.value,"onUpdate:modelValue":B[0]||(B[0]=j=>w(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(Ui,{analytic:k.compare,"compare-label":k.compareLabel,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((O=d.value[0].startDate)==null?void 0:O.format(r.unref(z)))??null,endDate:((T=d.value[0].endDate)==null?void 0:T.format(r.unref(z)))??null},"start-label":k.startLabel},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),k.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":u.value,label:"Compare","label-placement":"right","onUpdate:modelValue":B[1]||(B[1]=j=>E(j))},null,8,["model-value"]),u.value&&k.compare?(r.openBlock(),r.createBlock(mn,{key:0,items:n.map(j=>({label:j.label,sublabel:j.sublabel,value:j.id})),"model-value":f.value,"onUpdate:modelValue":B[2]||(B[2]=j=>x(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),u.value&&k.compare?(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((U=d.value[1].startDate)==null?void 0:U.format(r.unref(z)))??null,endDate:((W=d.value[1].endDate)==null?void 0:W.format(r.unref(z)))??null},"start-label":k.startLabel,"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",S2,[r.createElementVNode("div",C2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),j=>(r.openBlock(),r.createElementBlock("div",{key:j,class:"fm-calendar__cell"},r.toDisplayString(j),1))),128))])])]),r.createElementVNode("div",w2,[A2,r.createElementVNode("div",v2,[r.createVNode(V,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(s),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:j})=>[r.createElementVNode("div",{id:j.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",D2,[r.createElementVNode("div",V2,r.toDisplayString(r.unref(P)(j.id).format("MMMM")),1),r.createElementVNode("div",P2,r.toDisplayString(r.unref(P)(j.id).format("YYYY")),1)])],8,B2),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(j.matrix,(K,_)=>(r.openBlock(),r.createElementBlock("div",{key:_,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(K,te=>(r.openBlock(),r.createElementBlock("div",{key:te.date.date(),class:"fm-calendar__cell"},[te.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[S(te.date),{"fm-typo-en-body-lg-600":te.date.isSame(r.unref(a),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>g(te.date),onMouseover:he=>v(te.date)},r.toDisplayString(te.date.date()),43,E2)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",F2,[N2,r.createElementVNode("div",M2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:F.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]}),_:2},[k.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-133138e9"]]),O2=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{},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}=xt(),o=J(e,"modelValue"),i=tr(e);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(c2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$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(qd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),L="YYYY-MM-DD",hn=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e.length<6&&e.push([]),e},I2=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),Jd=(t,e)=>({startAt:t?P(t,L):null,endAt:e?P(e,L):null}),R2={class:"fm-typo-en-body-md-600"},T2={id:"in-calendar-app",class:"h-[264px] overflow-y-auto w-[160px]"},z2=["onVnodeMounted"],L2=["onVnodeMounted"],je=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),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"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",R2,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",T2,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,z2))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,L2))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),H2={class:"fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary"},U2=["id"],j2={key:0,class:"fm-calendar__cell__button--today"},Q2=["onClick","onMouseover"],gn=Z(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=P(),n=(i,s)=>typeof i=="function"?i(...s):i,o=(i,s)=>{if(!s)return;const a={"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 s=="function"){const{status:d,className:c}=s(i);d&&(a["fm-calendar__cell--selected"]=d.isSelected??!1,a["fm-calendar__cell--selected-start"]=d.isStart??!1,a["fm-calendar__cell--selected-end"]=d.isEnd??!1,a["fm-calendar__cell--selected-between"]=d.isBetween??!1),l=c??""}else{const{status:d,className:c}=s;d&&(a["fm-calendar__cell--selected"]=n(d.isSelected,[i])??!1,a["fm-calendar__cell--selected-start"]=n(d.isStart,[i])??!1,a["fm-calendar__cell--selected-end"]=n(d.isEnd,[i])??!1,a["fm-calendar__cell--selected-between"]=n(d.isBetween,[i])??!1),l=n(c,[i])??""}return[a,l]};return(i,s)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",H2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(I2),a=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass(["fm-calendar__cell",`fm-calendar__cell__${i.cellSize}`])},r.toDisplayString(a),3))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.days,(a,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(a,d=>(r.openBlock(),r.createElementBlock("div",{id:`${d.date.toISOString()}`,key:d.date.date(),class:r.normalizeClass(["fm-calendar__cell",[`fm-calendar__cell__${i.cellSize}`,o(d.date,i.dayCellClass),!d.isCurrentMonth&&"fm-calendar__cell--not-current-month"]])},[d.date.isSame(r.unref(e),"day")&&d.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",j2)):r.createCommentVNode("",!0),d.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-calendar__cell__button",type:"button",onClick:c=>i.onDayClick(d),onMouseover:c=>{var u;return(u=i.onCellMouseOver)==null?void 0:u.call(i,d.date)}},r.toDisplayString(d.date.date()),41,Q2)):r.createCommentVNode("",!0)],10,U2))),128))]))),128))])]))}}),[["__scopeId","data-v-c82f9b53"]]),W2={class:"p-12 space-y-4 w-[552px]"},Y2={class:"w-max"},X2={class:"flex space-x-24"},G2={class:"flex items-center py-8 space-x-16"},q2={class:"flex space-x-4"},J2={class:"flex items-center justify-end py-8 space-x-16"},K2={class:"flex space-x-4"},Z2={class:"flex gap-8 items-center justify-end w-full"},$2=r.defineComponent({__name:"FmSimpleDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(P().startOf("month").add(1,"month")),c=(b,y)=>{b==="left"?(l.value=y,d.value=y.add(1,"month")):b==="right"&&(d.value=y,l.value=y.subtract(1,"month"))},u=b=>{i.value=b},f=r.computed(()=>hn(l.value)),p=r.computed(()=>hn(l.value.add(1,"month"))),m=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},h=()=>{i.value=o.value?P(o.value):null,s.value=!1},g=b=>{s.value=b,b||h()};return(b,y)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":y[6]||(y[6]=S=>r.isRef(o)?o.value=S:null),disabled:a.value,focused:s.value,"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,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(b.$slots,"label")]),default:r.withCtx(({invalid:S})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:g},{"popover-button":r.withCtx(()=>[b.$slots["trigger-button"]?r.renderSlot(b.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:S,opened:s.value,showValidBorder:b.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:S,"show-valid-border":b.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(b.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(b.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.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(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",W2,[r.createElementVNode("div",Y2,[r.createElementVNode("div",X2,[r.createElementVNode("div",null,[r.createElementVNode("div",G2,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:y[0]||(y[0]=()=>c("left",l.value.subtract(1,"month")))}),r.createElementVNode("div",q2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"month","onUpdate:modelValue":y[1]||(y[1]=v=>c("left",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"year","onUpdate:modelValue":y[2]||(y[2]=v=>c("left",v))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:f.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",J2,[r.createElementVNode("div",K2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"month","onUpdate:modelValue":y[3]||(y[3]=v=>c("right",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"year","onUpdate:modelValue":y[4]||(y[4]=v=>c("right",v))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:y[5]||(y[5]=()=>c("left",l.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:p.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",Z2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:h}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:m},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(b.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),_2={class:"p-12 space-y-4 w-[276px]"},ey={class:"w-max"},ty={class:"flex space-x-24"},ny={class:"flex items-center justify-between py-8"},oy={class:"flex space-x-4"},ry={class:"flex space-x-4"},iy={class:"flex gap-8 items-center justify-end w-full"},Kd=r.defineComponent({__name:"FmSimpleDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=h=>{l.value=h},c=h=>{i.value=h},u=r.computed(()=>hn(l.value)),f=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{s.value=h,h||p()};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[4]||(g[4]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"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,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label")]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.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(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",_2,[r.createElementVNode("div",ey,[r.createElementVNode("div",ty,[r.createElementVNode("div",null,[r.createElementVNode("div",ny,[r.createElementVNode("div",oy,[r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>d(y))},null,8,["max","min","model-value"]),r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>d(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",ry,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:g[2]||(g[2]=()=>d(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:g[3]||(g[3]=()=>d(l.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:y=>y.isSame(i.value,"date")}},days:u.value,"on-day-click":y=>c(y.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",iy,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),sy=r.defineComponent({__name:"FmSimpleDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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}=xt(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock($2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$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(Kd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}});var ne=(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))(ne||{});const ay={key:1,class:"flex gap-4 items-center relative w-full"},ly={class:"flex flex-col gap-4 w-full"},dy=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),cy={class:"flex flex-col gap-4 w-full"},uy={class:"flex h-[360px]"},fy={class:"flex flex-col items-start p-12 pr-4"},py={key:0},my={key:1},hy=r.createElementVNode("div",{class:"bg-fm-color-neutral-gray-100 h-full mx-4 w-px"},null,-1),gy={class:"w-max"},by={class:"flex space-x-24"},yy={class:"flex items-center py-8 space-x-16"},ky={class:"flex space-x-4"},xy={class:"flex items-center justify-end py-8 space-x-16"},Sy={class:"flex space-x-4"},Cy={class:"flex gap-8 items-center justify-end w-full"},wy=r.defineComponent({__name:"FmSimpleDateRangePickerDesktop",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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 I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=Jd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return v("right",k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},h.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Same period last week",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},h.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last month",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},h.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},h.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},h.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{h.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(s.defaultCompareType),g=r.ref(null),b=C=>{if(m.value="",h.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},y=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",h.value),setTimeout(()=>{c.value=!1})},S=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},v=(C,D)=>{C==="left"?(f.value=D,p.value=D.add(1,"month")):C==="right"&&(p.value=D,f.value=D.subtract(1,"month"))},w=C=>{const D=d.value.startDate,A=d.value.endDate,k=g.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},x=C=>{const D=d.value;if(D.startDate&&!D.endDate){g.value=C;return}g.value=null},F=C=>{m.value=C.label;const D=P(C.value.startDate,L),A=P(C.value.endDate,L);d.value={startDate:D,endDate:A},v("right",A.startOf("month"))},E=C=>{c.value=C,C||S()},M=r.computed(()=>!h.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||h.value===ne.Custom)return;const C=o.value.find(A=>A.id===h.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createElementBlock("div",ay,[r.createElementVNode("label",ly,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.startLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.startDate?r.unref(P)(r.unref(l).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),dy,r.createElementVNode("label",cy,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.endLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.endDate?r.unref(P)(r.unref(l).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])]))]),default:r.withCtx(()=>[r.createElementVNode("div",uy,[C.showPredefinedRange||C.compareTarget?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",fy,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createElementBlock("div",py,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.predefinedRange,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":m.value===k.label,class:"min-w-[158px]",selectable:"",onClick:V=>F(k)},null,8,["label","model-value","onClick"]))),128))])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createElementBlock("div",my,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":h.value===k.id,sublabel:k.sublabel,class:"min-w-[158px]",selectable:"",onClick:V=>k.action()},null,8,["label","model-value","sublabel","onClick"]))),128))])):r.createCommentVNode("",!0)]),hy],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pl-4":C.showPredefinedRange||C.compareTarget},"p-12 space-y-4"])},[r.createElementVNode("div",gy,[r.createElementVNode("div",by,[r.createElementVNode("div",null,[r.createElementVNode("div",yy,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[0]||(D[0]=()=>v("left",f.value.subtract(1,"month")))}),r.createElementVNode("div",ky,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[1]||(D[1]=k=>v("left",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[2]||(D[2]=k=>v("left",k))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":w,days:r.unref(hn)(f.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",xy,[r.createElementVNode("div",Sy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"month","onUpdate:modelValue":D[3]||(D[3]=k=>v("right",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[4]||(D[4]=k=>v("right",k))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>v("left",f.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":k=>w(k),days:r.unref(hn)(p.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",Cy,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ay={key:0},vy={class:"flex gap-4 items-center relative w-full"},By={class:"flex flex-col gap-4 w-full"},Dy=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),Vy={class:"flex flex-col gap-4 w-full"},Py={key:1,class:"flex flex-col gap-4 w-full"},Ey=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:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};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?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ay,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",vy,[r.createElementVNode("label",By,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),Dy,r.createElementVNode("label",Vy,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",Py,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{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(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Fy={class:"p-12 space-y-4"},Ny={class:"w-max"},My={class:"flex space-x-24"},Oy={class:"flex items-center justify-between py-8"},Iy={class:"flex space-x-4"},Ry={class:"flex space-x-4"},Ty={class:"flex gap-8 items-center justify-end w-full"},Zd=r.defineComponent({__name:"FmSimpleDateRangePickerMobile",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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 I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=Jd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return S(k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},m.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},m.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last week",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},m.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},m.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},m.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{m.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(""),m=r.ref(s.defaultCompareType),h=r.ref(null),g=C=>{if(p.value="",m.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},b=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",m.value),setTimeout(()=>{c.value=!1})},y=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},S=C=>{f.value=C},v=C=>{const D=d.value.startDate,A=d.value.endDate,k=h.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},w=C=>{const D=d.value;if(D.startDate&&!D.endDate){h.value=C;return}h.value=null},x=C=>{const D=P(C.startDate,L),A=P(C.endDate,L);d.value={startDate:D,endDate:A},S(A.startOf("month"))},F=C=>{const D=o.value.find(A=>A.id===C);D==null||D.action()},E=C=>{c.value=C,C||y()},M=r.computed(()=>!m.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||m.value===ne.Custom)return;const C=o.value.find(A=>A.id===m.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["exclude-from-click-outside","in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createBlock(Ey,{key:1,disabled:u.value,"end-label":C.endLabel,focused:c.value,invalid:A,"model-value":r.unref(l),"show-valid-border":C.showValidBorder,"start-label":C.startLabel},r.createSlots({_:2},[C.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"popover-button",{focused:c.value})]),key:"0"}:void 0]),1032,["disabled","end-label","focused","invalid","model-value","show-valid-border","start-label"]))]),default:r.withCtx(()=>[r.createElementVNode("div",Fy,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:0,items:C.predefinedRange,"model-value":p.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[0]||(D[0]=k=>x(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:1,items:o.value.map(k=>({label:k.label,sublabel:k.sublabel,value:k.id})),"model-value":m.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[1]||(D[1]=k=>F(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createElementVNode("div",Ny,[r.createElementVNode("div",My,[r.createElementVNode("div",null,[r.createElementVNode("div",Oy,[r.createElementVNode("div",Iy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[2]||(D[2]=k=>S(k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"year","onUpdate:modelValue":D[3]||(D[3]=k=>S(k))},null,8,["max","min","model-value"])]),r.createElementVNode("div",Ry,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[4]||(D[4]=()=>S(f.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>S(f.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":v,days:r.unref(hn)(f.value),"on-day-click":k=>g(k.date),"cell-size":"lg",onCellMouseOver:w},null,8,["days","on-day-click"])])])]),r.createElementVNode("div",Ty,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),zy=r.defineComponent({__name:"FmSimpleDateRangePicker",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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}=xt(),i=J(n,"modelValue"),s=e,a=tr(n);return(l,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(o).md||r.unref(o).lg?(r.openBlock(),r.createBlock(wy,r.mergeProps({key:0},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[0]||(d[0]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[1]||(d[1]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(o).xs||r.unref(o).sm?(r.openBlock(),r.createBlock(Zd,r.mergeProps({key:1},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[2]||(d[2]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[3]||(d[3]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Ly=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),s=r.ref(0),a=r.ref(!1),l=n,d=async()=>{var p,m;a.value=!0;let f=[];for(let h=0;h<i.value.length;h++){const g=i.value[h];f=[...f,...g.validate()]}f.length?await((m=o.onValidationFailed)==null?void 0:m.call(o,f)):await((p=o.onValidationSuccess)==null?void 0:p.call(o)),a.value=!1},c=()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValue();l("reset")};return e({validateInputs:d,resetInputsValidation:()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValidation();l("validation-reset")},resetInputs:c,isSubmitting:a}),r.provide(js,{register({validate:f,resetValidation:p,resetValue:m}){return i.value.push({componentId:s.value,validate:f,resetValidation:p,resetValue:m}),s.value++},unregister(f){i.value.filter(p=>p.componentId!==f)}}),r.provide(re,{getDisabled:()=>o.disabled}),(f,p)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(d,["prevent"]),onReset:r.withModifiers(c,["prevent"])},[r.renderSlot(f.$slots,"default")],32))}}),Hy={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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-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)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-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[3-79]|[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[0235])|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-2]))|(?: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",["60|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[013-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]","1(?:(?:22|44|7[27]|87|9[69])[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-578])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",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[047]"]]]],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[27]|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]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\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|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],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[1-5]"]],["(\\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,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?: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-57-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}"]]],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","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],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 $d(t,e){var n=Array.prototype.slice.call(e);return n.push(Hy),t.apply(this,n)}function ji(t){"@babel/helpers - typeof";return ji=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},ji(t)}function _d(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 Uy(t,e,n){return e&&_d(t.prototype,e),n&&_d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function jy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qy(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&&no(t,e)}function Wy(t){var e=tc();return function(){var o=oo(t),i;if(e){var s=oo(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return Yy(this,i)}}function Yy(t,e){if(e&&(ji(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ec(t)}function ec(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qi(t){var e=typeof Map=="function"?new Map:void 0;return Qi=function(o){if(o===null||!Xy(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 nr(o,arguments,oo(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),no(i,o)},Qi(t)}function nr(t,e,n){return tc()?nr=Reflect.construct:nr=function(i,s,a){var l=[null];l.push.apply(l,s);var d=Function.bind.apply(i,l),c=new d;return a&&no(c,a.prototype),c},nr.apply(null,arguments)}function tc(){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 Xy(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function no(t,e){return no=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},no(t,e)}function oo(t){return oo=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oo(t)}var ht=function(t){Qy(n,t);var e=Wy(n);function n(o){var i;return jy(this,n),i=e.call(this,o),Object.setPrototypeOf(ec(i),n.prototype),i.name=i.constructor.name,i}return Uy(n)}(Qi(Error)),Wi=2,Gy=17,qy=3,Xe="0-90-9٠-٩۰-۹",Jy="-‐-―−ー-",Ky="//",Zy="..",$y="  ­​⁠ ",_y="()()[]\\[\\]",e3="~⁓∼~",or="".concat(Jy).concat(Ky).concat(Zy).concat($y).concat(_y).concat(e3),Yi="++";function nc(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var s=Number(n[i]),a=Number(o[i]);if(s>a)return 1;if(a>s)return-1;if(!isNaN(s)&&isNaN(a))return 1;if(isNaN(s)&&!isNaN(a))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 t3={}.constructor;function rr(t){return t!=null&&t.constructor===t3}function Xi(t){"@babel/helpers - typeof";return Xi=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},Xi(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oc(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 sr(t,e,n){return e&&oc(t.prototype,e),n&&oc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var n3="1.2.0",o3="1.7.35",rc=" ext. ",r3=/^\d+$/,De=function(){function t(e){ir(this,t),l3(e),this.metadata=e,ac.call(this,e)}return sr(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&&r3.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new ic(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new ic(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 s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[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}(),ic=function(){function t(e,n){ir(this,t),this.globalMetadataObject=n,this.metadata=e,ac.call(this,n.metadata)}return sr(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 i3(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()&&sc(this.types(),n))return new a3(sc(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?rc:this.metadata[13]||rc}}]),t}(),i3=function(){function t(e,n){ir(this,t),this._format=e,this.metadata=n}return sr(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()&&!s3.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),s3=/^\(?\$1\)?$/,a3=function(){function t(e,n){ir(this,t),this.type=e,this.metadata=n}return sr(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 sc(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 l3(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!rr(t)||!rr(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(rr(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+d3(t)+": "+t,"."))}var d3=function(e){return Xi(e)};function ar(t,e){if(e=new De(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function c3(t,e){return e.countries.hasOwnProperty(t)}function ac(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?nc(e,n3)===-1?this.v2=!0:nc(e,o3)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var u3=";ext=",bn=function(e){return"([".concat(Xe,"]{1,").concat(e,"})")};function lc(t){var e="20",n="15",o="9",i="6",s="[  \\t,]*",a="[:\\..]?[  \\t,-]*",l="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",p="(?:,{2}|;)",m=u3+bn(e),h=s+d+a+bn(e)+l,g=s+c+a+bn(o)+l,b=u+bn(i)+"#",y=f+p+a+bn(n)+l,S=f+"(?:,)+"+a+bn(o)+l;return m+"|"+h+"|"+g+"|"+b+"|"+y+"|"+S}var f3="["+Xe+"]{"+Wi+"}",p3="["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){3,}["+or+Xe+"]*",m3=new RegExp("^["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){1,2}$","i"),h3=p3+"(?:"+lc()+")?",g3=new RegExp("^"+f3+"$|^"+h3+"$","i");function b3(t){return t.length>=Wi&&g3.test(t)}function y3(t){return m3.test(t)}var dc=new RegExp("(?:"+lc()+")$","i");function k3(t){var e=t.search(dc);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(dc),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var x3={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 S3(t){return x3[t]}function C3(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=w3(t))||e&&t&&typeof t.length=="number"){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.
26
+ `):t}function d0(t,e){const{element:n,datasetIndex:o,index:i}=e,s=t.getDatasetMeta(o).controller,{label:a,value:l}=s.getLabelAndValue(i);return{chart:t,label:a,parsed:s.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:l,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function rd(t,e){const n=t.chart.ctx,{body:o,footer:i,title:s}=t,{boxWidth:a,boxHeight:l}=e,d=be(e.bodyFont),c=be(e.titleFont),u=be(e.footerFont),f=s.length,p=i.length,m=o.length,h=Ae(e.padding);let g=h.height,b=0,y=o.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(l,d.lineHeight):d.lineHeight;g+=m*w+(y-m)*d.lineHeight+(y-1)*e.bodySpacing}p&&(g+=e.footerMarginTop+p*u.lineHeight+(p-1)*e.footerSpacing);let S=0;const v=function(w){b=Math.max(b,n.measureText(w).width+S)};return n.save(),n.font=c.string,oe(t.title,v),n.font=d.string,oe(t.beforeBody.concat(t.afterBody),v),S=e.displayColors?a+2+e.boxPadding:0,oe(o,w=>{oe(w.before,v),oe(w.lines,v),oe(w.after,v)}),S=0,n.font=u.string,oe(t.footer,v),n.restore(),b+=h.width,{width:b,height:g}}function c0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function u0(t,e,n,o){const{x:i,width:s}=o,a=n.caretSize+n.caretPadding;if(t==="left"&&i+s+a>e.width||t==="right"&&i-s-a<0)return!0}function f0(t,e,n,o){const{x:i,width:s}=n,{width:a,chartArea:{left:l,right:d}}=t;let c="center";return o==="center"?c=i<=(l+d)/2?"left":"right":i<=s/2?c="left":i>=a-s/2&&(c="right"),u0(c,t,e,n)&&(c="center"),c}function id(t,e,n){const o=n.yAlign||e.yAlign||c0(t,n);return{xAlign:n.xAlign||e.xAlign||f0(t,e,n,o),yAlign:o}}function p0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function m0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function sd(t,e,n,o){const{caretSize:i,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:d}=n,c=i+s,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:m}=jt(a);let h=p0(e,l);const g=m0(e,d,c);return d==="center"?l==="left"?h+=c:l==="right"&&(h-=c):l==="left"?h-=Math.max(u,p)+i:l==="right"&&(h+=Math.max(f,m)+i),{x:ke(h,0,o.width-e.width),y:ke(g,0,o.height-e.height)}}function Yo(t,e,n){const o=Ae(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function ad(t){return Ze([],ct(t))}function h0(t,e,n){return Vt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ld(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const dd={beforeTitle:rt,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:rt,beforeBody:rt,beforeLabel:rt,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 ee(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:rt,afterBody:rt,beforeFooter:rt,footer:rt,afterFooter:rt};function Ve(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?dd[e].call(n,o):i}class Ci extends dt{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,s=new $a(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=h0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Ve(o,"beforeTitle",this,e),s=Ve(o,"title",this,e),a=Ve(o,"afterTitle",this,e);let l=[];return l=Ze(l,ct(i)),l=Ze(l,ct(s)),l=Ze(l,ct(a)),l}getBeforeBody(e,n){return ad(Ve(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return oe(e,s=>{const a={before:[],lines:[],after:[]},l=ld(o,s);Ze(a.before,ct(Ve(l,"beforeLabel",this,s))),Ze(a.lines,Ve(l,"label",this,s)),Ze(a.after,ct(Ve(l,"afterLabel",this,s))),i.push(a)}),i}getAfterBody(e,n){return ad(Ve(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Ve(o,"beforeFooter",this,e),s=Ve(o,"footer",this,e),a=Ve(o,"afterFooter",this,e);let l=[];return l=Ze(l,ct(i)),l=Ze(l,ct(s)),l=Ze(l,ct(a)),l}_createItems(e){const n=this._active,o=this.chart.data,i=[],s=[],a=[];let l=[],d,c;for(d=0,c=n.length;d<c;++d)l.push(d0(this.chart,n[d]));return e.filter&&(l=l.filter((u,f,p)=>e.filter(u,f,p,o))),e.itemSort&&(l=l.sort((u,f)=>e.itemSort(u,f,o))),oe(l,u=>{const f=ld(e.callbacks,u);i.push(Ve(f,"labelColor",this,u)),s.push(Ve(f,"labelPointStyle",this,u)),a.push(Ve(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=l,l}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const l=Wn[o.position].call(this,i,this._eventPosition);a=this._createItems(o),this.title=this.getTitle(a,o),this.beforeBody=this.getBeforeBody(a,o),this.body=this.getBody(a,o),this.afterBody=this.getAfterBody(a,o),this.footer=this.getFooter(a,o);const d=this._size=rd(this,o),c=Object.assign({},l,d),u=id(this.chart,o,c),f=sd(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const s=this.getCaretPosition(e,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:l}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=jt(l),{x:p,y:m}=e,{width:h,height:g}=n;let b,y,S,v,w,x;return s==="center"?(w=m+g/2,i==="left"?(b=p,y=b-a,v=w+a,x=w-a):(b=p+h,y=b+a,v=w-a,x=w+a),S=b):(i==="left"?y=p+Math.max(d,u)+a:i==="right"?y=p+h-Math.max(c,f)-a:y=this.caretX,s==="top"?(v=m,w=v-a,b=y-a,S=y+a):(v=m+g,w=v+a,b=y+a,S=y-a),x=v),{x1:b,x2:y,x3:S,y1:v,y2:w,y3:x}}drawTitle(e,n,o){const i=this.title,s=i.length;let a,l,d;if(s){const c=an(o.rtl,this.x,this.width);for(e.x=Yo(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",a=be(o.titleFont),l=o.titleSpacing,n.fillStyle=o.titleColor,n.font=a.string,d=0;d<s;++d)n.fillText(i[d],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+l,d+1===s&&(e.y+=o.titleMarginBottom-l)}}_drawColorBox(e,n,o,i,s){const a=this.labelColors[o],l=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=s,u=be(s.bodyFont),f=Yo(this,"left",s),p=i.x(f),m=d<u.lineHeight?(u.lineHeight-d)/2:0,h=n.y+m;if(s.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=i.leftForLtr(p,c)+c/2,y=h+d/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Zr(e,g,b,y),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Zr(e,g,b,y)}else{e.lineWidth=$(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const g=i.leftForLtr(p,c),b=i.leftForLtr(i.xPlus(p,1),c-2),y=jt(a.borderRadius);Object.values(y).some(S=>S!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Nn(e,{x:g,y:h,w:c,h:d,radius:y}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Nn(e,{x:b,y:h+1,w:c-2,h:d-2,radius:y}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(g,h,c,d),e.strokeRect(g,h,c,d),e.fillStyle=a.backgroundColor,e.fillRect(b,h+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:l,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=be(o.bodyFont);let p=f.lineHeight,m=0;const h=an(o.rtl,this.x,this.width),g=function(M){n.fillText(M,h.x(e.x+m),e.y+p/2),e.y+=p+s},b=h.textAlign(a);let y,S,v,w,x,F,E;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,e.x=Yo(this,b,o),n.fillStyle=o.bodyColor,oe(this.beforeBody,g),m=l&&b!=="right"?a==="center"?c/2+u:c+2+u:0,w=0,F=i.length;w<F;++w){for(y=i[w],S=this.labelTextColors[w],n.fillStyle=S,oe(y.before,g),v=y.lines,l&&v.length&&(this._drawColorBox(n,e,w,h,o),p=Math.max(f.lineHeight,d)),x=0,E=v.length;x<E;++x)g(v[x]),p=f.lineHeight;oe(y.after,g)}m=0,p=f.lineHeight,oe(this.afterBody,g),e.y-=s}drawFooter(e,n,o){const i=this.footer,s=i.length;let a,l;if(s){const d=an(o.rtl,this.x,this.width);for(e.x=Yo(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",a=be(o.footerFont),n.fillStyle=o.footerColor,n.font=a.string,l=0;l<s;++l)n.fillText(i[l],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:s,yAlign:a}=this,{x:l,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:p,bottomLeft:m,bottomRight:h}=jt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(l+f,d),a==="top"&&this.drawCaret(e,n,o,i),n.lineTo(l+c-p,d),n.quadraticCurveTo(l+c,d,l+c,d+p),a==="center"&&s==="right"&&this.drawCaret(e,n,o,i),n.lineTo(l+c,d+u-h),n.quadraticCurveTo(l+c,d+u,l+c-h,d+u),a==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(l+m,d+u),n.quadraticCurveTo(l,d+u,l,d+u-m),a==="center"&&s==="left"&&this.drawCaret(e,n,o,i),n.lineTo(l,d+f),n.quadraticCurveTo(l,d,l+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const a=Wn[e.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=rd(this,e),d=Object.assign({},a,this._size),c=id(n,e,d),u=sd(e,d,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_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},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const a=Ae(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(s,e,i,n),Qa(e,n.textDirection),s.y+=a.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),Wa(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:l,index:d})=>{const c=this.chart.getDatasetMeta(l);if(!c)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:c.data[d],index:d}}),s=!go(o,i),a=this._positionChanged(i,n);(s||a)&&(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,s=this._active||[],a=this._getActiveElements(e,s,n,o),l=this._positionChanged(a,e),d=n||!go(a,s)||l;return d&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const s=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 a=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:o,caretY:i,options:s}=this,a=Wn[s.position].call(this,e,n);return a!==!1&&(o!==a.x||i!==a.y)}}H(Ci,"positioners",Wn);var g0={id:"tooltip",_element:Ci,positioners:Wn,afterInit(t,e,n){n&&(t.tooltip=new Ci({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:dd},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"]},b0=Object.freeze({__proto__:null,Colors:Pg,Decimation:Mg,Filler:_g,Legend:i0,SubTitle:l0,Title:a0,Tooltip:g0});const y0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function k0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return y0(t,e,n,o);const s=t.lastIndexOf(e);return i!==s?n:i}const x0=(t,e)=>t===null?null:ke(Math.round(t),0,e);function cd(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class wi extends qt{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:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ee(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:k0(o,e,q(n,e),this._addedLabels),x0(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 s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let a=e;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){return cd.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}}H(wi,"id","category"),H(wi,"defaults",{ticks:{callback:cd}});function S0(t,e){const n=[],{bounds:i,step:s,min:a,max:l,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:p}=t,m=s||1,h=u-1,{min:g,max:b}=e,y=!ee(a),S=!ee(l),v=!ee(c),w=(b-g)/(f+1);let x=ma((b-g)/h/m)*m,F,E,M,I;if(x<1e-14&&!y&&!S)return[{value:g},{value:b}];I=Math.ceil(b/x)-Math.floor(g/x),I>h&&(x=ma(I*x/h/m)*m),ee(d)||(F=Math.pow(10,d),x=Math.ceil(x*F)/F),i==="ticks"?(E=Math.floor(g/x)*x,M=Math.ceil(b/x)*x):(E=g,M=b),y&&S&&s&&hp((l-a)/s,x/1e3)?(I=Math.round(Math.min((l-a)/x,u)),x=(l-a)/I,E=a,M=l):v?(E=y?a:E,M=S?l:M,I=c-1,x=(M-E)/I):(I=(M-E)/x,Dn(I,Math.round(I),x/1e3)?I=Math.round(I):I=Math.ceil(I));const N=Math.max(ga(x),ga(E));F=Math.pow(10,ee(d)?N:d),E=Math.round(E*F)/F,M=Math.round(M*F)/F;let C=0;for(y&&(p&&E!==a?(n.push({value:a}),E<a&&C++,Dn(Math.round((E+C*x)*F)/F,a,ud(a,w,t))&&C++):E<a&&C++);C<I;++C){const D=Math.round((E+C*x)*F)/F;if(S&&D>l)break;n.push({value:D})}return S&&p&&M!==l?n.length&&Dn(n[n.length-1].value,l,ud(l,w,t))?n[n.length-1].value=l:n.push({value:l}):(!S||M===l)&&n.push({value:M}),n}function ud(t,e,{horizontal:n,minRotation:o}){const i=Qe(o),s=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class Xo extends qt{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 ee(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:s}=this;const a=d=>i=n?i:d,l=d=>s=o?s:d;if(e){const d=Je(i),c=Je(s);d<0&&c<0?l(0):d>0&&c>0&&a(0)}if(i===s){let d=s===0?1:Math.abs(s*.05);l(s+d),e||a(i-d)}this.min=i,this.max=s}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},s=this._range||this,a=S0(i,s);return e.bounds==="ticks"&&ha(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}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 En(e,this.chart.options.locale,this.options.ticks.format)}}class Ai extends Xo{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=fe(e)?e:0,this.max=fe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Qe(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.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}}H(Ai,"id","linear"),H(Ai,"defaults",{ticks:{callback:xo.formatters.numeric}});const Yn=t=>Math.floor(Dt(t)),Jt=(t,e)=>Math.pow(10,Yn(t)+e);function fd(t){return t/Math.pow(10,Yn(t))===1}function pd(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function C0(t,e){const n=e-t;let o=Yn(n);for(;pd(t,e,o)>10;)o++;for(;pd(t,e,o)<10;)o--;return Math.min(o,Yn(t))}function w0(t,{min:e,max:n}){e=Ne(t.min,e);const o=[],i=Yn(e);let s=C0(e,n),a=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),d=i>s?Math.pow(10,i):0,c=Math.round((e-d)*a)/a,u=Math.floor((e-d)/l/10)*l*10;let f=Math.floor((c-u)/Math.pow(10,s)),p=Ne(t.min,Math.round((d+u+f*Math.pow(10,s))*a)/a);for(;p<n;)o.push({value:p,major:fd(p),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,a=s>=0?1:a),p=Math.round((d+u+f*Math.pow(10,s))*a)/a;const m=Ne(t.max,p);return o.push({value:m,major:fd(m),significand:f}),o}class vi extends qt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Xo.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return fe(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=fe(e)?Math.max(0,e):null,this.max=fe(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!fe(this._userMin)&&(this.min=e===Jt(this.min,0)?Jt(this.min,-1):Jt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const s=l=>o=e?o:l,a=l=>i=n?i:l;o===i&&(o<=0?(s(1),a(10)):(s(Jt(o,-1)),a(Jt(i,1)))),o<=0&&s(Jt(i,-1)),i<=0&&a(Jt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=w0(n,this);return e.bounds==="ticks"&&ha(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":En(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Dt(e),this._valueRange=Dt(this.max)-Dt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Dt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}H(vi,"id","logarithmic"),H(vi,"defaults",{ticks:{callback:xo.formatters.logarithmic,major:{enabled:!0}}});function Bi(t){const e=t.ticks;if(e.display&&t.display){const n=Ae(e.backdropPadding);return q(e.font&&e.font.size,pe.font.size)+n.height}return 0}function A0(t,e,n){return n=se(n)?n:[n],{w:Np(t,e.string,n),h:n.length*e.lineHeight}}function md(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 v0(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=[],s=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?ae/s:0;for(let d=0;d<s;d++){const c=a.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],l),f=be(c.font),p=A0(t.ctx,f,t._pointLabels[d]);o[d]=p;const m=Me(t.getIndexAngle(d)+l),h=Math.round(Qr(m)),g=md(h,u.x,p.w,0,180),b=md(h,u.y,p.h,90,270);B0(n,e,m,g,b)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=P0(t,o,i)}function B0(t,e,n,o,i){const s=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let l=0,d=0;o.start<e.l?(l=(e.l-o.start)/s,t.l=Math.min(t.l,e.l-l)):o.end>e.r&&(l=(o.end-e.r)/s,t.r=Math.max(t.r,e.r+l)),i.start<e.t?(d=(e.t-i.start)/a,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/a,t.b=Math.max(t.b,e.b+d))}function D0(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:s,padding:a,size:l}=n,d=t.getPointPosition(e,o+i+a,s),c=Math.round(Qr(Me(d.angle+me))),u=N0(d.y,l.h,c),f=E0(c),p=F0(d.x,l.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:p,top:u,right:p+l.w,bottom:u+l.h}}function V0(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:s}=t;return!(at({x:n,y:o},e)||at({x:n,y:s},e)||at({x:i,y:o},e)||at({x:i,y:s},e))}function P0(t,e,n){const o=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:a,display:l}=s.pointLabels,d={extra:Bi(s)/2,additionalAngle:a?ae/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=D0(t,u,d);o.push(f),l==="auto"&&(f.visible=V0(f,c),f.visible&&(c=f))}return o}function E0(t){return t===0||t===180?"center":t<180?"left":"right"}function F0(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function N0(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function M0(t,e,n){const{left:o,top:i,right:s,bottom:a}=n,{backdropColor:l}=e;if(!ee(l)){const d=jt(e.borderRadius),c=Ae(e.backdropPadding);t.fillStyle=l;const u=o-c.left,f=i-c.top,p=s-o+c.width,m=a-i+c.height;Object.values(d).some(h=>h!==0)?(t.beginPath(),Nn(t,{x:u,y:f,w:p,h:m,radius:d}),t.fill()):t.fillRect(u,f,p,m)}}function O0(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const a=o.setContext(t.getPointLabelContext(i));M0(n,a,s);const l=be(a.font),{x:d,y:c,textAlign:u}=s;Ut(n,t._pointLabels[i],d,c+l.lineHeight/2,l,{color:a.color,textAlign:u,textBaseline:"middle"})}}function hd(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,le);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let a=1;a<o;a++)s=t.getPointPosition(a,e),i.lineTo(s.x,s.y)}}function I0(t,e,n,o,i){const s=t.ctx,a=e.circular,{color:l,lineWidth:d}=e;!a&&!o||!l||!d||n<0||(s.save(),s.strokeStyle=l,s.lineWidth=d,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),hd(t,n,a,o),s.closePath(),s.stroke(),s.restore())}function R0(t,e,n){return Vt(t,{label:n,index:e,type:"pointLabel"})}class Xn extends Xo{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=Ae(Bi(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=fe(e)&&!isNaN(e)?e:0,this.max=fe(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Bi(this.options))}generateTickLabels(e){Xo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ie(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?v0(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=le/(this._pointLabels.length||1),o=this.options.startAngle||0;return Me(e*n+Qe(o))}getDistanceFromCenterForValue(e){if(ee(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(ee(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 R0(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-me+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:s}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),hd(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:s}=n,a=this._pointLabels.length;let l,d,c;if(n.pointLabels.display&&O0(this,a),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const p=this.getContext(f),m=i.setContext(p),h=s.setContext(p);I0(this,m,d,a,h)}}),o.display){for(e.save(),l=a-1;l>=0;l--){const u=o.setContext(this.getPointLabelContext(l)),{color:f,lineWidth:p}=u;!p||!f||(e.lineWidth=p,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(l,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.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 s,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=be(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,a=e.measureText(l.label).width,e.fillStyle=c.backdropColor;const f=Ae(c.backdropPadding);e.fillRect(-a/2-f.left,-s-u.size/2-f.top,a+f.width,u.size+f.height)}Ut(e,l.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}H(Xn,"id","radialLinear"),H(Xn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:xo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),H(Xn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(Xn,"descriptors",{angleLines:{_fallback:"grid"}});const Go={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}},Pe=Object.keys(Go);function gd(t,e){return t-e}function bd(t,e){if(ee(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:s}=t._parseOpts;let a=e;return typeof o=="function"&&(a=o(a)),fe(a)||(a=typeof o=="string"?n.parse(a,o):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(on(s)||s===!0)?n.startOf(a,"isoWeek",s):n.startOf(a,i)),+a)}function yd(t,e,n,o){const i=Pe.length;for(let s=Pe.indexOf(t);s<i-1;++s){const a=Go[Pe[s]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(l*a.size))<=o)return Pe[s]}return Pe[i-1]}function T0(t,e,n,o,i){for(let s=Pe.length-1;s>=Pe.indexOf(n);s--){const a=Pe[s];if(Go[a].common&&t._adapter.diff(i,o,a)>=e-1)return a}return Pe[n?Pe.indexOf(n):0]}function z0(t){for(let e=Pe.indexOf(t)+1,n=Pe.length;e<n;++e)if(Go[Pe[e]].common)return Pe[e]}function kd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Yr(n,e),s=n[o]>=e?n[o]:n[i];t[s]=!0}}function L0(t,e,n,o){const i=t._adapter,s=+i.startOf(e[0].value,o),a=e[e.length-1].value;let l,d;for(l=s;l<=a;l=+i.add(l,1,o))d=n[l],d>=0&&(e[d].major=!0);return e}function xd(t,e,n){const o=[],i={},s=e.length;let a,l;for(a=0;a<s;++a)l=e[a],i[l]=a,o.push({value:l,major:!1});return s===0||!n?o:L0(t,o,i,n)}class Gn extends qt{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 qm._date(e.adapters.date);i.init(n),vn(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:bd(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:s,minDefined:a,maxDefined:l}=this.getUserBounds();function d(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!l&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!a||!l)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=fe(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=fe(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_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 s=this.min,a=this.max,l=kp(i,s,a);return this._unit=n.unit||(o.autoSkip?yd(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):T0(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:z0(this._unit),this.initOffsets(i),e.reverse&&l.reverse(),xd(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=ke(n,0,a),o=ke(o,0,a),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,s=i.time,a=s.unit||yd(s.minUnit,n,o,this._getLabelCapacity(n)),l=q(i.ticks.stepSize,1),d=a==="week"?s.isoWeekday:!1,c=on(d)||d===!0,u={};let f=n,p,m;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":a),e.diff(o,n,a)>1e5*l)throw new Error(n+" and "+o+" are too far apart with stepSize of "+l+" "+a);const h=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,m=0;p<o;p=+e.add(p,l,a),m++)kd(u,p,h);return(p===o||i.bounds==="ticks"||m===1)&&kd(u,p,h),Object.keys(u).sort(gd).map(g=>+g)}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,s=this._unit,a=n||i[s];return this._adapter.format(e,a)}_tickFormatFunction(e,n,o,i){const s=this.options,a=s.ticks.callback;if(a)return ie(a,[e,n,o],this);const l=s.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&l[d],f=c&&l[c],p=o[n],m=c&&f&&p&&p.major;return this._adapter.format(e,i||(m?f:u))}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=Qe(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),a=Math.sin(i),l=this._resolveTickFontOptions(0).size;return{w:o*s+l*a,h:o*a+l*s}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(e,0,xd(this,[e],this._majorUnit),i),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.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(bd(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return xa(e.sort(gd))}}H(Gn,"id","time"),H(Gn,"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 qo(t,e,n){let o=0,i=t.length-1,s,a,l,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=st(t,"pos",e)),{pos:s,time:l}=t[o],{pos:a,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=st(t,"time",e)),{time:s,pos:l}=t[o],{time:a,pos:d}=t[i]);const c=a-s;return c?l+(d-l)*(e-s)/c:l}class Di extends Gn{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=qo(n,this.min),this._tableRange=qo(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],s=[];let a,l,d,c,u;for(a=0,l=e.length;a<l;++a)c=e[a],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(a=0,l=i.length;a<l;++a)u=i[a+1],d=i[a-1],c=i[a],Math.round((u+d)/2)!==c&&s.push({time:c,pos:a/(l-1)});return s}_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,s)=>i-s)}_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(qo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return qo(this._table,o*this._tableRange+this._minPos,!0)}}H(Di,"id","timeseries"),H(Di,"defaults",Gn.defaults);var H0=Object.freeze({__proto__:null,CategoryScale:wi,LinearScale:Ai,LogarithmicScale:vi,RadialLinearScale:Xn,TimeScale:Gn,TimeSeriesScale:Di});const U0=[Gm,wg,b0,H0];Ye.register(...U0);const j0={class:"flex flex-col h-full m-24 overflow-hidden p-24"},Q0={class:"flex flex-col gap-8"},W0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},Y0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},X0={class:"grow"},Sd=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}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.hideXAxis,()=>e.hideYAxis,()=>e.legend],()=>{o&&o.config.options&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x");function s({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const p=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return p.addColorStop(0,Pr(c,.5)),p.addColorStop(1,Pr(c,0)),p}const a=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=$t(d.color)??"";return{...d,backgroundColor:c?u=>s({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));r.watch(a,()=>{o&&(o.data=a.value,o.update())},{deep:!0});function l(){n.value&&(o=new Ye(n.value,{type:"line",data:a.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",j0,[r.createElementVNode("div",Q0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",W0,r.toDisplayString(d.name),1),r.createElementVNode("div",Y0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",X0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),G0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},q0={class:"flex flex-col gap-8"},J0={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},K0={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Z0={class:"grow"},$0=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}},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"),s=r.computed(()=>e.text);r.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio,()=>e.percentage],()=>{o&&(o.destroy(),l())});const a=r.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{let c;return typeof d.backgroundColor=="string"?c=d.backgroundColor:typeof d.backgroundColor=="object"&&(c=d.backgroundColor.map(u=>$t(u)??"")),typeof d.backgroundColor=="string"?c=d.backgroundColor:typeof d.backgroundColor=="object"&&(c=d.backgroundColor.map(u=>$t(u)??"")),{...d,backgroundColor:c,hoverOffset:d.hoverOffset??0}})}));function l(){n.value&&(o=new Ye(n.value,{type:"doughnut",data:a.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",s.value&&s.value!==""){const p=s.value.split(`
27
+ `);for(let m=0;m<p.length;m++){const h=m===0?1:.7;c.fillStyle=Pr($t(e.textColor)??"",h),c.fillText(p[m],u,f+m*40)}}}}}]}))}return r.onMounted(()=>{l()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",G0,[r.createElementVNode("div",q0,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",J0,r.toDisplayString(d.name),1),r.createElementVNode("div",K0,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",Z0,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),_0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},e1={class:"flex flex-col gap-8"},t1={class:"fm-color-typo-primary fm-typo-en-body-lg-400"},n1={class:"fm-color-typo-secondary fm-typo-en-body-md-400"},o1={class:"grow"},r1=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}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio,()=>e.legend,()=>e.hideXAxis,()=>e.hideYAxis],()=>{o&&(o.destroy(),a())});const i=r.computed(()=>e.transpose?"y":"x"),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(l=>{var u;let d,c;return typeof l.backgroundColor=="string"?d=l.backgroundColor:typeof l.backgroundColor=="object"&&(d=l.backgroundColor.map(f=>$t(f)??"")),typeof l.borderColor=="string"?c=l.borderColor:typeof l.borderColor=="object"&&(c=(u=l.borderColor)==null?void 0:u.map(f=>$t(f)??"")),{...l,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function a(){n.value&&(o=new Ye(n.value,{type:"bar",data:s.value,options:{plugins:{legend:e.legend||{display:!0,position:"bottom",maxHeight:60,labels:{usePointStyle:!0}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{display:!e.hideXAxis,stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{display:!e.hideYAxis,stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{a()}),(l,d)=>(r.openBlock(),r.createElementBlock("div",_0,[r.createElementVNode("div",e1,[r.renderSlot(l.$slots,"title"),r.createElementVNode("div",t1,r.toDisplayString(l.name),1),r.createElementVNode("div",n1,r.toDisplayString(l.paragraph),1)]),r.createElementVNode("div",o1,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),i1={class:"fm-checkbox"},s1={class:"fm-checkbox--wrapper"},a1={class:"fm-checkbox__input--container"},l1=["checked","disabled","indeterminate"],d1={key:0,class:"fm-checkbox__label-container"},c1={class:"fm-typo-en-body-lg-400"},u1={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Cd=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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=J(e,"indeterminate"),a=Array.isArray(i.value),l=r.ref(a?i.value.some(u=>Ce(u,e.value)):i.value),d=r.computed(()=>{const u=a?i.value.some(f=>Ce(f,e.value)):i.value;return s.value&&!u?"remove":i.value?"check_small":""});function c(){if(o.value)return;s.value=!1,l.value=!l.value;let u=i.value;a?u=l.value?u.concat(e.value):u.filter(f=>!Ce(f,e.value)):u=l.value,i.value=u}return r.watch(()=>i.value,()=>{l.value=a?i.value.some(u=>Ce(u,e.value)):i.value}),(u,f)=>(r.openBlock(),r.createElementBlock("div",i1,[r.createElementVNode("label",s1,[r.createElementVNode("div",a1,[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(s),type:"checkbox",onInput:c},null,42,l1),r.unref(s)||l.value?(r.openBlock(),r.createBlock(Q,{key:0,name:d.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]),e.label?(r.openBlock(),r.createElementBlock("div",d1,[r.renderSlot(u.$slots,"label"),r.createElementVNode("div",c1,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",u1,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)])]))}}),f1={class:"w-full"},de=Z(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"}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>(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(Q,{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",f1,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(Q,{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-7eff7cbf"]]),p1={class:"flex gap-4"},wd=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(re,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":""),s=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(a,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-en-body-sm-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":a.state==="none"&&!o.value,"text-fm-color-typo-success":a.state==="success"&&!o.value,"text-fm-color-typo-warning":a.state==="warning"&&!o.value,"text-fm-color-typo-error":a.state==="error"&&!o.value}])},[a.errorMessages.length===0?r.renderSlot(a.$slots,"default",{key:0},()=>[r.createElementVNode("div",p1,[i.value?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass([s.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(a.text),1)])]):r.renderSlot(a.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.errorMessages,d=>(r.openBlock(),r.createElementBlock("div",{key:d,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(Q,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(d),1)]))),128))])],2))}}),Ft=Math.min,Oe=Math.max,Jo=Math.round,Ko=Math.floor,Nt=t=>({x:t,y:t}),m1={left:"right",right:"left",bottom:"top",top:"bottom"},h1={start:"end",end:"start"};function Vi(t,e,n){return Oe(t,Ft(e,n))}function dn(t,e){return typeof t=="function"?t(e):t}function Mt(t){return t.split("-")[0]}function cn(t){return t.split("-")[1]}function Ad(t){return t==="x"?"y":"x"}function Pi(t){return t==="y"?"height":"width"}function qn(t){return["top","bottom"].includes(Mt(t))?"y":"x"}function Ei(t){return Ad(qn(t))}function g1(t,e,n){n===void 0&&(n=!1);const o=cn(t),i=Ei(t),s=Pi(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Zo(a)),[a,Zo(a)]}function b1(t){const e=Zo(t);return[Fi(t),e,Fi(e)]}function Fi(t){return t.replace(/start|end/g,e=>h1[e])}function y1(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:a;default:return[]}}function k1(t,e,n,o){const i=cn(t);let s=y1(Mt(t),n==="start",o);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Fi)))),s}function Zo(t){return t.replace(/left|right|bottom|top/g,e=>m1[e])}function x1(t){return{top:0,right:0,bottom:0,left:0,...t}}function vd(t){return typeof t!="number"?x1(t):{top:t,right:t,bottom:t,left:t}}function $o(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Bd(t,e,n){let{reference:o,floating:i}=t;const s=qn(e),a=Ei(e),l=Pi(a),d=Mt(e),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let m;switch(d){case"top":m={x:u,y:o.y-i.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-i.width,y:f};break;default:m={x:o.x,y:o.y}}switch(cn(e)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const S1=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Bd(c,o,d),p=o,m={},h=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:S,y:v,data:w,reset:x}=await y({x:u,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=S??u,f=v??f,m={...m,[b]:{...m[b],...w}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=Bd(c,p,d)),g=-1)}return{x:u,y:f,placement:p,strategy:i,middlewareData:m}};async function Ni(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=dn(e,t),h=vd(m),b=l[p?f==="floating"?"reference":"floating":f],y=$o(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:d})),S=f==="floating"?{...a.floating,x:o,y:i}:a.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),w=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},x=$o(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:v,strategy:d}):S);return{top:(y.top-x.top+h.top)/w.y,bottom:(x.bottom-y.bottom+h.bottom)/w.y,left:(y.left-x.left+h.left)/w.x,right:(x.right-y.right+h.right)/w.x}}const C1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:d}=e,{element:c,padding:u=0}=dn(t,e)||{};if(c==null)return{};const f=vd(u),p={x:n,y:o},m=Ei(i),h=Pi(m),g=await a.getDimensions(c),b=m==="y",y=b?"top":"left",S=b?"bottom":"right",v=b?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[m]-p[m]-s.floating[h],x=p[m]-s.reference[m],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=F?F[v]:0;(!E||!await(a.isElement==null?void 0:a.isElement(F)))&&(E=l.floating[v]||s.floating[h]);const M=w/2-x/2,I=E/2-g[h]/2-1,N=Ft(f[y],I),C=Ft(f[S],I),D=N,A=E-g[h]-C,k=E/2-g[h]/2+M,B=Vi(D,k,A),V=!d.arrow&&cn(i)!=null&&k!==B&&s.reference[h]/2-(k<D?N:C)-g[h]/2<0,R=V?k<D?k-D:k-A:0;return{[m]:p[m]+R,data:{[m]:B,centerOffset:k-B-R,...V&&{alignmentOffset:R}},reset:V}}}),w1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...b}=dn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Mt(i),S=Mt(l)===l,v=await(d.isRTL==null?void 0:d.isRTL(c.floating)),w=p||(S||!g?[Zo(l)]:b1(l));!p&&h!=="none"&&w.push(...k1(l,g,h,v));const x=[l,...w],F=await Ni(e,b),E=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&E.push(F[y]),f){const D=g1(i,a,v);E.push(F[D[0]],F[D[1]])}if(M=[...M,{placement:i,overflows:E}],!E.every(D=>D<=0)){var I,N;const D=(((I=s.flip)==null?void 0:I.index)||0)+1,A=x[D];if(A)return{data:{index:D,overflows:M},reset:{placement:A}};let k=(N=M.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:N.placement;if(!k)switch(m){case"bestFit":{var C;const B=(C=M.map(V=>[V.placement,V.overflows.filter(R=>R>0).reduce((R,O)=>R+O,0)]).sort((V,R)=>V[1]-R[1])[0])==null?void 0:C[0];B&&(k=B);break}case"initialPlacement":k=l;break}if(i!==k)return{reset:{placement:k}}}return{}}}};async function A1(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=Mt(n),l=cn(n),d=qn(n)==="y",c=["left","top"].includes(a)?-1:1,u=s&&d?-1:1,f=dn(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Jn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:a,middlewareData:l}=e,d=await A1(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:a}}}}},v1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:S}=b;return{x:y,y:S}}},...d}=dn(t,e),c={x:n,y:o},u=await Ni(e,d),f=qn(Mt(i)),p=Ad(f);let m=c[p],h=c[f];if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",S=m+u[b],v=m-u[y];m=Vi(S,m,v)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",S=h+u[b],v=h-u[y];h=Vi(S,h,v)}const g=l.fn({...e,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},B1=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:s}=e,{apply:a=()=>{},...l}=dn(t,e),d=await Ni(e,l),c=Mt(n),u=cn(n),f=qn(n)==="y",{width:p,height:m}=o.floating;let h,g;c==="top"||c==="bottom"?(h=c,g=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,h=u==="end"?"top":"bottom");const b=m-d[h],y=p-d[g],S=!e.middlewareData.shift;let v=b,w=y;if(f){const F=p-d.left-d.right;w=u||S?Ft(y,F):F}else{const F=m-d.top-d.bottom;v=u||S?Ft(b,F):F}if(S&&!u){const F=Oe(d.left,0),E=Oe(d.right,0),M=Oe(d.top,0),I=Oe(d.bottom,0);f?w=p-2*(F!==0||E!==0?F+E:Oe(d.left,d.right)):v=m-2*(M!==0||I!==0?M+I:Oe(d.top,d.bottom))}await a({...e,availableWidth:w,availableHeight:v});const x=await i.getDimensions(s.floating);return p!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function ut(t){return Mi(t)?(t.nodeName||"").toLowerCase():"#document"}function Ie(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(Mi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Mi(t){return t instanceof Node||t instanceof Ie(t).Node}function pt(t){return t instanceof Element||t instanceof Ie(t).Element}function $e(t){return t instanceof HTMLElement||t instanceof Ie(t).HTMLElement}function Dd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ie(t).ShadowRoot}function Kn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Ue(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function D1(t){return["table","td","th"].includes(ut(t))}function Oi(t){const e=Ii(),n=Ue(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 V1(t){let e=un(t);for(;$e(e)&&!_o(e);){if(Oi(e))return e;e=un(e)}return null}function Ii(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _o(t){return["html","body","#document"].includes(ut(t))}function Ue(t){return Ie(t).getComputedStyle(t)}function er(t){return pt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function un(t){if(ut(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Dd(t)&&t.host||ft(t);return Dd(e)?e.host:e}function Vd(t){const e=un(t);return _o(e)?t.ownerDocument?t.ownerDocument.body:t.body:$e(e)&&Kn(e)?e:Vd(e)}function Zn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Vd(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),a=Ie(i);return s?e.concat(a,a.visualViewport||[],Kn(i)?i:[],a.frameElement&&n?Zn(a.frameElement):[]):e.concat(i,Zn(i,[],n))}function Pd(t){const e=Ue(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=$e(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:o,l=Jo(n)!==s||Jo(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Ri(t){return pt(t)?t:t.contextElement}function fn(t){const e=Ri(t);if(!$e(e))return Nt(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Pd(e);let a=(s?Jo(n.width):n.width)/o,l=(s?Jo(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const P1=Nt(0);function Ed(t){const e=Ie(t);return!Ii()||!e.visualViewport?P1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function E1(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ie(t)?!1:e}function Kt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Ri(t);let a=Nt(1);e&&(o?pt(o)&&(a=fn(o)):a=fn(t));const l=E1(s,n,o)?Ed(s):Nt(0);let d=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(s){const p=Ie(s),m=o&&pt(o)?Ie(o):o;let h=p,g=h.frameElement;for(;g&&o&&m!==h;){const b=fn(g),y=g.getBoundingClientRect(),S=Ue(g),v=y.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,w=y.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;d*=b.x,c*=b.y,u*=b.x,f*=b.y,d+=v,c+=w,h=Ie(g),g=h.frameElement}}return $o({width:u,height:f,x:d,y:c})}const F1=[":popover-open",":modal"];function Fd(t){return F1.some(e=>{try{return t.matches(e)}catch{return!1}})}function N1(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",a=ft(o),l=e?Fd(e.floating):!1;if(o===a||l&&s)return n;let d={scrollLeft:0,scrollTop:0},c=Nt(1);const u=Nt(0),f=$e(o);if((f||!f&&!s)&&((ut(o)!=="body"||Kn(a))&&(d=er(o)),$e(o))){const p=Kt(o);c=fn(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function M1(t){return Array.from(t.getClientRects())}function Nd(t){return Kt(ft(t)).left+er(t).scrollLeft}function O1(t){const e=ft(t),n=er(t),o=t.ownerDocument.body,i=Oe(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=Oe(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Nd(t);const l=-n.scrollTop;return Ue(o).direction==="rtl"&&(a+=Oe(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}function I1(t,e){const n=Ie(t),o=ft(t),i=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,d=0;if(i){s=i.width,a=i.height;const c=Ii();(!c||c&&e==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:s,height:a,x:l,y:d}}function R1(t,e){const n=Kt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=$e(t)?fn(t):Nt(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,d=i*s.x,c=o*s.y;return{width:a,height:l,x:d,y:c}}function Md(t,e,n){let o;if(e==="viewport")o=I1(t,n);else if(e==="document")o=O1(ft(t));else if(pt(e))o=R1(e,n);else{const i=Ed(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return $o(o)}function Od(t,e){const n=un(t);return n===e||!pt(n)||_o(n)?!1:Ue(n).position==="fixed"||Od(n,e)}function T1(t,e){const n=e.get(t);if(n)return n;let o=Zn(t,[],!1).filter(l=>pt(l)&&ut(l)!=="body"),i=null;const s=Ue(t).position==="fixed";let a=s?un(t):t;for(;pt(a)&&!_o(a);){const l=Ue(a),d=Oi(a);!d&&l.position==="fixed"&&(i=null),(s?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Kn(a)&&!d&&Od(t,a))?o=o.filter(u=>u!==a):i=l,a=un(a)}return e.set(t,o),o}function z1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?T1(e,this._c):[].concat(n),o],l=a[0],d=a.reduce((c,u)=>{const f=Md(e,u,i);return c.top=Oe(f.top,c.top),c.right=Ft(f.right,c.right),c.bottom=Ft(f.bottom,c.bottom),c.left=Oe(f.left,c.left),c},Md(e,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function L1(t){const{width:e,height:n}=Pd(t);return{width:e,height:n}}function H1(t,e,n){const o=$e(e),i=ft(e),s=n==="fixed",a=Kt(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const d=Nt(0);if(o||!o&&!s)if((ut(e)!=="body"||Kn(i))&&(l=er(e)),o){const f=Kt(e,!0,s,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=Nd(i));const c=a.left+l.scrollLeft-d.x,u=a.top+l.scrollTop-d.y;return{x:c,y:u,width:a.width,height:a.height}}function Id(t,e){return!$e(t)||Ue(t).position==="fixed"?null:e?e(t):t.offsetParent}function Rd(t,e){const n=Ie(t);if(!$e(t)||Fd(t))return n;let o=Id(t,e);for(;o&&D1(o)&&Ue(o).position==="static";)o=Id(o,e);return o&&(ut(o)==="html"||ut(o)==="body"&&Ue(o).position==="static"&&!Oi(o))?n:o||V1(t)||n}const U1=async function(t){const e=this.getOffsetParent||Rd,n=this.getDimensions;return{reference:H1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function j1(t){return Ue(t).direction==="rtl"}const Q1={convertOffsetParentRelativeRectToViewportRelativeRect:N1,getDocumentElement:ft,getClippingRect:z1,getOffsetParent:Rd,getElementRects:U1,getClientRects:M1,getDimensions:L1,getScale:fn,isElement:pt,isRTL:j1};function W1(t,e){let n=null,o;const i=ft(t);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function a(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),s();const{left:c,top:u,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const m=Ko(u),h=Ko(i.clientWidth-(c+f)),g=Ko(i.clientHeight-(u+p)),b=Ko(c),S={rootMargin:-m+"px "+-h+"px "+-g+"px "+-b+"px",threshold:Oe(0,Ft(1,d))||1};let v=!0;function w(x){const F=x[0].intersectionRatio;if(F!==d){if(!v)return a();F?a(!1,F):o=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(w,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,S)}n.observe(t)}return a(!0),s}function $n(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=Ri(t),u=i||s?[...c?Zn(c):[],...Zn(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&l?W1(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(e)})),n()}),c&&!d&&m.observe(c),m.observe(e));let h,g=d?Kt(t):null;d&&b();function b(){const y=Kt(t);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(b)}return n(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),f==null||f(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(h)}}const Td=v1,_n=w1,Y1=B1,X1=C1,G1=(t,e,n)=>{const o=new Map,i={platform:Q1,...n},s={...i.platform,_c:o};return S1(t,e,{...i,platform:s})};function q1(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ti(t){if(q1(t)){const e=t.$el;return Mi(e)&&ut(e)==="#comment"?null:e}return t}function zd(t){return{name:"arrow",options:t,fn(e){const n=Ti(r.unref(t.element));return n==null?{}:X1({element:n,padding:t.padding}).fn(e)}}}function Ld(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Hd(t,e){const n=Ld(t);return Math.round(e*n)/n}function eo(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var E;return(E=r.unref(n.open))!=null?E:!0}),s=r.computed(()=>r.unref(n.middleware)),a=r.computed(()=>{var E;return(E=r.unref(n.placement))!=null?E:"bottom"}),l=r.computed(()=>{var E;return(E=r.unref(n.strategy))!=null?E:"absolute"}),d=r.computed(()=>{var E;return(E=r.unref(n.transform))!=null?E:!0}),c=r.computed(()=>Ti(t.value)),u=r.computed(()=>Ti(e.value)),f=r.ref(0),p=r.ref(0),m=r.ref(l.value),h=r.ref(a.value),g=r.shallowRef({}),b=r.ref(!1),y=r.computed(()=>{const E={position:m.value,left:"0",top:"0"};if(!u.value)return E;const M=Hd(u.value,f.value),I=Hd(u.value,p.value);return d.value?{...E,transform:"translate("+M+"px, "+I+"px)",...Ld(u.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:M+"px",top:I+"px"}});let S;function v(){c.value==null||u.value==null||G1(c.value,u.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(E=>{f.value=E.x,p.value=E.y,m.value=E.strategy,h.value=E.placement,g.value=E.middlewareData,b.value=!0})}function w(){typeof S=="function"&&(S(),S=void 0)}function x(){if(w(),o===void 0){v();return}if(c.value!=null&&u.value!=null){S=o(c.value,u.value,v);return}}function F(){i.value||(b.value=!1)}return r.watch([s,a,l],v,{flush:"sync"}),r.watch([c,u],x,{flush:"sync"}),r.watch(i,F,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(w),{x:r.shallowReadonly(f),y:r.shallowReadonly(p),strategy:r.shallowReadonly(m),placement:r.shallowReadonly(h),middlewareData:r.shallowReadonly(g),isPositioned:r.shallowReadonly(b),floatingStyles:y,update:v}}const Ud={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)}},zi=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:s,middlewareData:a,placement:l}=eo(n,o,{whileElementsMounted:$n,placement:e.placement,middleware:[_n(),Jn({mainAxis:6}),zd({element:i})]}),d="ontouchstart"in window||navigator.maxTouchPoints>0,c=r.ref(!1),u=r.ref(0),f=r.ref(0),p=()=>{e.disabled||(clearTimeout(f.value),u.value=window.setTimeout(()=>{c.value=!0},250))},m=()=>{e.disabled||(clearTimeout(u.value),f.value=window.setTimeout(()=>c.value=!1,250))},h=()=>{d?c.value?m():p():m()},g=()=>{d||m()},b=()=>{d||m()},y=()=>{m()},S=()=>{clearTimeout(f.value),c.value=!0},v=r.computed(()=>{var x,F,E,M;const w={top:"bottom",right:"left",bottom:"top",left:"right"}[l.value];return{left:((x=a.value.arrow)==null?void 0:x.x)!=null?`${(F=a.value.arrow)==null?void 0:F.x}px`:"",top:((E=a.value.arrow)==null?void 0:E.y)!=null?`${(M=a.value.arrow)==null?void 0:M.y}px`:"",[w]:"-3px"}});return(w,x)=>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":w.disabled},w.contentClass],"cursor-pointer flex items-center justify-center relative"]),onPointerdown:h,onPointerleave:b,onPointermove:x[0]||(x[0]=F=>{F.pointerType!=="touch"&&p()}),onPointerup:g},[r.renderSlot(w.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[c.value&&!w.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":w.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-en-body-md-400":w.variant==="rich"},"fm-shadow-light-300 max-w-[240px] px-8 py-4 rounded-md"]),style:r.normalizeStyle([r.unref(s),{zIndex:w.zIndex}]),onMouseenter:S,onMouseleave:m},[r.renderSlot(w.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(w.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass([{"bg-fm-color-neutral-black":w.variant==="plain","bg-fm-color-neutral-white":w.variant==="rich"},"absolute h-8 rotate-45 rounded-[2px] w-8"]),style:r.normalizeStyle(v.value)},null,6),[[r.vShow,!w.hideArrow]])],38)):r.createCommentVNode("",!0)]))])),[[r.unref(Ud),y]])}}),Zt=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:""}},setup(t){const e=t,n=r.inject(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-en-body-lg-400 flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info}])},[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"])}," (optional) ",2)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(zi,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(Q,{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)}}),J1={key:1,class:"flex items-center justify-between"},Se=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},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"}},setup(t){const e=t,n=r.inject(re,null),{errorMessages:o,isPristine:i}=$s(e),{focus:s,blur:a}=xn(),l=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),d=r.computed(()=>({label:e.label,disabled:l.value,required:e.required,optional:e.optional,info:e.info})),c=r.computed(()=>({text:e.helperText,disabled:l.value,state:e.helperState,errorMessages:o.value})),u=r.computed(()=>({isPristine:i,invalid:o.value.length>0}));return(f,p)=>(r.openBlock(),r.createBlock(e.tag,{class:"flex flex-col gap-4",onBlur:r.unref(a),onClick:r.unref(s)},{default:r.withCtx(()=>[f.label||f.$slots.label?(r.openBlock(),r.createBlock(Zt,r.normalizeProps(r.mergeProps({key:0},d.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"label")]),_:3},16)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"default",r.normalizeProps(r.guardReactiveProps(u.value))),c.value.text||c.value.errorMessages.length>0||f.$slots["helper-text"]||f.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",J1,[r.createVNode(wd,r.normalizeProps(r.guardReactiveProps(c.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"helper-text")]),_:3},16),r.renderSlot(f.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}}),_e=Z(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},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:{}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([]);let s;const a=r.ref(),l=r.ref(n.maxHeight),d=r.ref(!1),c=r.ref(!1),u=r.inject(Xs,null),f=r.ref(null),p=r.ref(null),{floatingStyles:m}=eo(f,p,{middleware:[Y1({apply({availableHeight:M,elements:I}){if(n.shift)return;const N=M-16,C=Math.min(N,n.maxHeight);n.minHeight&&C<=n.minHeight||(l.value=C,Object.assign(I.floating.style,{maxHeight:`${N}px`}))}}),Jn({mainAxis:n.offset??(u?8:4),crossAxis:u?-12:0}),_n({crossAxis:!1,fallbackStrategy:"initialPlacement"}),Td()],placement:n.placement,whileElementsMounted:$n,strategy:"fixed"}),h=()=>{F.value==="hover"&&b()},g=M=>{if(n.stopClickPropagation&&(M.stopPropagation(),document.body.click()),!n.disabled){if(d.value){d.value=!1;return}F.value==="click"&&b()}},b=()=>{c.value=!0,d.value=!0,u==null||u.setChildId(s)},y=()=>{F.value==="hover"&&(c.value=!1)},S=()=>{c.value=!0},v=()=>{c.value=!1},w=()=>{n.closeOnClick&&setTimeout(()=>{d.value=!1,u==null||u.closeParent()},10)},x=r.computed(()=>({mouseInMenu:c}));r.provide(Xs,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){u?(d.value=!1,u==null||u.closeParent()):d.value=F.value!=="click"},setChildId(M){a.value=M},mouseInChildId:a,trigger:n.trigger}),r.provide(Gs,{handleContentClick:w}),r.onMounted(()=>{window.addEventListener("click",E),u&&(s=u.register({injectProps:x}))}),r.onUnmounted(()=>{window.removeEventListener("click",E)}),r.watch(()=>u==null?void 0:u.mouseInChildId.value,M=>{M!==s&&(d.value=!1)});const F=r.computed(()=>u===null?n.trigger:"hover");r.watch(()=>d.value,()=>o("menu-changed",d.value));const E=M=>{if(!d.value)return;const I=M.path||M.composedPath();for(const N of I)if(N==f.value||N==p.value)return;d.value=!1};return(M,I)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:f,class:"fm-menu",onClick:g,onMouseenter:h,onMouseleave:y},[r.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(u)||M.inPopover,to:"body"},[d.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:p,style:r.normalizeStyle({...r.unref(m),zIndex:n.zIndex}),class:"block",onMouseenter:S,onMouseleave:v},[r.renderSlot(M.$slots,"menu-wrapper",r.normalizeProps(r.guardReactiveProps({maxHeight:l.value,width:`${M.width}px`})),()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${l.value}px`,width:M.width}),class:"fm-menu__wrapper"},[r.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-a5f687e1"]]),K1={class:"fm-menu-item--left"},Z1={key:0,class:"fm-menu-item--right"},xe=Z(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.inject(Gs,null),s=e,a=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},l=()=>{s("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:a,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseleave:u[2]||(u[2]=()=>d(!1)),onMouseup:u[3]||(u[3]=()=>d(!1))},[r.createElementVNode("div",K1,[r.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E",name:c.icon,outline:!o.value&&!c.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),c.hasCheckbox?(r.openBlock(),r.createBlock(Cd,{key:1,disabled:c.disabled,indeterminate:c.indeterminate,"model-value":c.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:u[0]||(u[0]=f=>f.preventDefault()),"onUpdate:modelValue":l},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-md-400 max-w-[240px]",c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(c.label),3),c.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-sm-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(c.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(r.openBlock(),r.createElementBlock("div",Z1,[r.createVNode(Q,{color:c.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-b196a86b"]]),$1={class:"fm-typo-en-body-lg-600"},_1={class:"h-[264px] overflow-y-auto w-[160px]"},eb=["onVnodeMounted"],tb=["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),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click","in-popover":"",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"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",$1,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",_1,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,eb))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,tb))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),mt=Z(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),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n(),Td({crossAxis:!0})],placement:o.placement,whileElementsMounted:$n,strategy:"fixed"}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};r.watch(()=>o.showPopover,m=>i.value=m);const p=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(m,h)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-popover",onClick:f},[r.renderSlot(m.$slots,"popover-button",{},void 0,!0)],512),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:a,style:r.normalizeStyle({...r.unref(l),zIndex:o.zIndex}),class:"fm-popover__content",onClick:h[0]||(h[0]=r.withModifiers(()=>{},["stop"]))},[r.renderSlot(m.$slots,"default",{hide:u,show:c},void 0,!0)],4)):r.createCommentVNode("",!0)]))])),[[r.unref(Ud),p,m.excludeElFromClickOutside]])}}),[["__scopeId","data-v-2c43bc65"]]),z="YYYY-MM-DD",Li=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e},jd=(t,e)=>{const n=P().startOf("month"),o=P(t).diff(n,"month"),i=P(e).diff(n,"month"),s=[];for(let a=o-1;a<=i;a++){const l=[],d=n.add(a,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),p=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&p.length>0&&(l.push(p),p=[]),p.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");p.length>0&&l.push(p),s.push({id:d.format("YYYY-MM-DD"),matrix:l,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return s},to=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),nb={class:"p-12 w-[360px]"},ob={class:"w-max"},rb={class:"flex h-40 justify-between px-4 py-8"},ib={class:"flex gap-4 items-center"},sb={class:"flex gap-4 items-center justify-center"},ab={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},lb=["onClick"],db={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},cb=Z(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},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(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,z)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(!1),c=r.ref(!1),u=h=>{i.value=h},f=()=>{o.value=i.value.format(z),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{d.value=!1,c.value=!1,l.value=h};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[5]||(g[5]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"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,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":h.zIndex,onPopoverChanged:g[4]||(g[4]=y=>s.value=y)},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value})),void 0,!0):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.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(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",nb,[r.createElementVNode("div",ob,[r.createElementVNode("div",rb,[r.createElementVNode("div",ib,[r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>m(y))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>m(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",sb,[r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:g[2]||(g[2]=()=>m(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:g[3]||(g[3]=()=>m(l.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",ab,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),y=>(r.openBlock(),r.createElementBlock("div",{key:y,class:"fm-calendar__cell"},r.toDisplayString(y),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(l.value),(y,S)=>(r.openBlock(),r.createElementBlock("div",{key:S,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y,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:()=>u(v.date)},r.toDisplayString(v.date.date()),11,lb)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",db,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-6d34db79"]]),Qd=t=>(r.pushScopeId("data-v-17f2ddbc"),t=t(),r.popScopeId(),t),ub={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},fb={class:"flex items-center justify-center"},pb={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},mb={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},hb=Qd(()=>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)),gb={id:"wrapper",class:"h-full relative w-[336px]"},bb=["id"],yb={class:"flex gap-4 items-center"},kb={class:"fm-typo-en-body-lg-600"},xb={class:"fm-typo-en-body-lg-600"},Sb=["onClick"],Cb={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},wb=Qd(()=>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)),Ab={class:"flex gap-8 items-center justify-end w-full"},Wd=Z(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},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(re,null),o=jd(e.min,e.max),i=J(e,"modelValue"),s=P(),a=r.ref(P(i.value,z)),l=r.ref(!1),d=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),c=r.ref(),u=g=>{a.value=g},f=()=>{i.value=a.value.format(z),setTimeout(()=>{l.value=!1},0)},p=()=>{a.value=i.value?P(i.value):null,l.value=!1},m=()=>{l.value=!0,setTimeout(()=>{c.value.scrollToItem(h(s.startOf("month")))},0)},h=g=>o.findIndex(b=>b.id===g.startOf("month").format(z));return(g,b)=>{const y=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[0]||(b[0]=S=>r.isRef(i)?i.value=S:null),disabled:d.value,focused:l.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:S})=>[g.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:m},[r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:S,opened:l.value,showValidBorder:g.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(de,{key:1,disabled:d.value,focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:m},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.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(P)(r.unref(i)).format("D MMM YYYY"):"DD MM YYYY"),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-screen left-0 top-0 w-screen"},[r.createElementVNode("div",ub,[r.createVNode(de,{focused:l.value,invalid:S,"show-valid-border":g.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(g.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(g.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v,w;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":(v=a.value)!=null&&v.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((w=a.value)!=null&&w.isValid()?r.unref(P)(a.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",fb,[r.createElementVNode("div",pb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))])])]),r.createElementVNode("div",mb,[hb,r.createElementVNode("div",gb,[r.createVNode(y,{ref_key:"scroller",ref:c,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",yb,[r.createElementVNode("div",kb,r.toDisplayString(r.unref(P)(v.id).format("MMMM")),1),r.createElementVNode("div",xb,r.toDisplayString(r.unref(P)(v.id).format("YYYY")),1)])],8,bb),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v.matrix,(w,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w,F=>(r.openBlock(),r.createElementBlock("div",{key:F.date.date(),class:"fm-calendar__cell"},[F.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":F.date.isSame(a.value),"fm-typo-en-body-lg-600":F.date.isSame(r.unref(s),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>u(F.date)},r.toDisplayString(F.date.date()),11,Sb)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",Cb,[wb,r.createElementVNode("div",Ab,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!a.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-17f2ddbc"]]),tr=t=>{const e=r.inject(re,null);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},vb=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},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}=St(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(cb,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$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(Wd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Yd=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))}}),Bb={class:"cursor-pointer fm-switch__container"},Db={key:0},Vb={class:"fm-typo-en-body-lg-400"},Pb={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},Eb={class:"fm-switch__input--container"},Fb=["checked","disabled","value"],Nb={key:1},Mb={class:"fm-typo-en-body-lg-400"},Ob={key:0,class:"fm-color-typo-secondary fm-typo-en-body-md-400"},Hi=Z(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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=()=>{o.value||(i.value=!i.value)};return(a,l)=>(r.openBlock(),r.createElementBlock("label",Bb,[a.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",Db,[r.renderSlot(a.$slots,"label",{},void 0,!0),r.createElementVNode("div",Vb,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Pb,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",Eb,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:a.value,class:"fm-switch__input--btn",type:"checkbox",onClick:s},null,8,Fb),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":a.showIcon})},[a.showIcon?(r.openBlock(),r.createBlock(Q,{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)]),a.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",Nb,[r.createElementVNode("div",Mb,r.toDisplayString(a.label),1),a.sublabel?(r.openBlock(),r.createElementBlock("div",Ob,r.toDisplayString(a.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-4448e953"]]);var ye=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(ye||{});const Xd=t=>(r.pushScopeId("data-v-a35b0ec8"),t=t(),r.popScopeId(),t),Ib={key:0,class:"flex gap-4 items-center relative w-full"},Rb={class:"flex flex-col gap-4 w-full"},Tb=Xd(()=>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)),zb={class:"flex flex-col gap-4 w-full"},Lb={key:1,class:"flex flex-col gap-4 w-full"},Hb={class:"flex gap-4 p-12"},Ub={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},jb={key:0,class:"px-8"},Qb={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Wb={class:"flex flex-col gap-24"},Yb={key:0,class:"flex gap-4 items-center px-12 w-full"},Xb={class:"flex flex-col gap-4 w-full"},Gb=Xd(()=>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)),qb={class:"flex flex-col gap-4 w-full"},Jb={class:"flex gap-24"},Kb={class:"w-max"},Zb={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},$b={class:"flex gap-4 items-center"},_b={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},e2={class:"h-[288px]"},t2={key:0,class:"fm-calendar__cell__button--today"},n2=["onClick","onMouseover"],o2={class:"w-max"},r2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},i2={class:"flex gap-4 items-center"},s2={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},a2={key:0,class:"fm-calendar__cell__button--today"},l2=["onClick","onMouseover"],d2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},c2=Z(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var C,D;const e=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=ye.PrecedingPeriod;const A=a.value;if(A[0].startDate&&A[0].endDate){const k=A[0].startDate.diff(A[0].endDate,"day");A[1]={startDate:A[0].startDate.subtract(+(1-k),"day"),endDate:A[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=ye.PrecedingWeek;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"week");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"week"),endDate:A[0].endDate.subtract(k,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=ye.PrecedingMonth;const A=a.value;if(A[0].startDate&&A[0].endDate){let k=A[0].endDate.diff(A[0].startDate,"month");k===0&&(k+=1),A[1]={startDate:A[0].startDate.subtract(k,"month"),endDate:A[0].endDate.subtract(k,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{u.value=ye.Custom}}],n=t,o=r.inject(re,null),i=P(),s=J(n,"modelValue"),a=r.ref([{startDate:(C=s.value)!=null&&C.startDate?P(s.value.startDate,z):null,endDate:(D=s.value)!=null&&D.endDate?P(s.value.endDate,z):null},{startDate:null,endDate:null}]),l=r.ref(!1),d=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),c=r.ref(!1),u=r.ref(""),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(null);let g=0;const b=A=>{var k;if(m.value="",a.value[g].startDate&&a.value[g].endDate){g===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),g=0),a.value[0]={startDate:A,endDate:null};return}else if(!a.value[g].startDate&&!a.value[g].endDate)a.value[g].startDate=A;else{if(A.isBefore(a.value[g].startDate)){const B=a.value[g].startDate;a.value[g]={startDate:A,endDate:B}}else a.value[g].endDate=A;c.value&&(g=1),e.find(B=>B.id===u.value)||(u.value=ye.Custom)}(k=e.find(B=>B.id===u.value))==null||k.action()},y=()=>{c.value?s.value=a.value.map(A=>({startDate:A.startDate.format(z),endDate:A.endDate.format(z)})):s.value={startDate:a.value[0].startDate.format(z),endDate:a.value[0].endDate.format(z)},setTimeout(()=>{l.value=!1})},S=()=>{var A,k;Array.isArray(s.value)?a.value=s.value:a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null},l.value=!1},v=(A,k)=>{A==="left"?(f.value=k,p.value=k.add(1,"month")):A==="right"&&(p.value=k,f.value=k.subtract(1,"month"))},w=A=>{const k=a.value[0].startDate,B=a.value[0].endDate,V=a.value[1].startDate,R=a.value[1].endDate,O=h.value,T=k==null?void 0:k.isSame(A),U=B==null?void 0:B.isSame(A),W=V==null?void 0:V.isSame(A),j=R==null?void 0:R.isSame(A),K=O==null?void 0:O.isSame(A),_=T&&B&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isAfter(k))||k&&!B&&K&&(O==null?void 0:O.isBefore(k)),te=W&&R&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isAfter(V))||V&&!R&&K&&(O==null?void 0:O.isBefore(V)),he=U&&k&&!(T&&U)||k&&!B&&T&&(O==null?void 0:O.isBefore(k))||k&&!B&&K&&(O==null?void 0:O.isAfter(k)),Te=j&&V&&!(W&&j)||V&&!R&&W&&(O==null?void 0:O.isBefore(V))||V&&!R&&K&&(O==null?void 0:O.isAfter(V)),qe=T&&U||T&&!B,ze=W&&j||W&&!R,ge=k&&(B||O)&&B?A.isAfter(k)&&A.isBefore(B):A.isAfter(O)&&A.isBefore(k)||A.isBefore(O)&&A.isAfter(k),Fe=V&&(R||O)&&R?A.isAfter(V)&&A.isBefore(R):A.isAfter(O)&&A.isBefore(V)||A.isBefore(O)&&A.isAfter(V),Le=()=>{if(a.value.filter(Os=>{var ao;for(const vr in Os)if((ao=Os[vr])!=null&&ao.isSame(A,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(T&&U&&(ue(A,V,R)||ue(A,V,O)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(W&&j&&(ue(A,k,B)||ue(A,k,O)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(_||he)return ue(A,V,R)||ue(A,V,O)?"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(te||Te)return ue(A,k,B)||ue(A,k,O)?"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(qe)return"bg-fm-color-primary";if(ze)return"bg-fm-color-system-info-300";if(ue(A,k,B)&&(ue(A,V,R)||ue(A,V,O)))return"bg-fm-color-system-success-100";if(ge)return"bg-fm-color-system-warning-100";if(Fe)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Le()}`]:_||te,[`fm-calendar__cell__button--selected-end ${Le()}`]:he||Te,[`fm-calendar__cell__button--selected-between ${Le()}`]:ge||Fe,[`fm-calendar__cell__button--selected ${Le()}`]:qe||ze}},x=A=>{const k=a.value;if(k[0].startDate&&!k[0].endDate||k[1].startDate&&!k[1].endDate){h.value=A;return}h.value=null},F=A=>{m.value=A.label,a.value[0]={startDate:P(A.value.startDate,z),endDate:P(A.value.endDate,z)}},E=r.computed(()=>c.value?!a.value.every(A=>A.startDate&&A.endDate):!(a.value[0].startDate&&a.value[0].endDate)),M=A=>{u.value="",c.value=A,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),g=0},I=r.computed(()=>{if(!s.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const A=c.value&&Array.isArray(s.value)?s.value[0].startDate:s.value.startDate,k=c.value&&Array.isArray(s.value)?s.value[0].endDate:s.value.endDate;return{startDate:A?P(A).format("D MMM YYYY"):"DD MM YYYY",endDate:k?P(k).format("D MMM YYYY"):"DD MM YYYY"}}),N=r.computed(()=>{const A=c.value&&Array.isArray(s.value)?s.value[1].startDate:null,k=c.value&&Array.isArray(s.value)?s.value[1].endDate:null;return A&&k?`Compared: ${P(A).format("D MMM YYYY")} - ${P(k).format("D MMM YYYY")}`:""});return r.watch(()=>s.value,()=>{var A,k;c.value?a.value=s.value.map(B=>({startDate:B!=null&&B.startDate?P(B.startDate,z):null,endDate:B!=null&&B.endDate?P(B.endDate,z):null})):a.value[0]={startDate:(A=s.value)!=null&&A.startDate?P(s.value.startDate,z):null,endDate:(k=s.value)!=null&&k.endDate?P(s.value.endDate,z):null}}),(A,k)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":k[8]||(k[8]=B=>r.isRef(s)?s.value=B:null),disabled:d.value,focused:l.value,"helper-state":A.helperState,"helper-text":c.value?N.value:A.helperText,rules:A.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:B})=>[r.createVNode(mt,{disabled:d.value,"show-popover":l.value,"z-index":n.zIndex,onPopoverChanged:k[7]||(k[7]=V=>l.value=V)},{"popover-button":r.withCtx(()=>[A.$slots["trigger-button"]?r.renderSlot(A.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:B,showValidBorder:A.showValidBorder,isComparing:c.value,disabled:d.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[A.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ib,[r.createElementVNode("label",Rb,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.startLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.startDate?r.unref(P)(r.unref(s).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),Tb,r.createElementVNode("label",zb,[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(n.endLabel),3),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),disabled:d.value,focused:l.value,"icon-outlined":!l.value,invalid:B,"show-valid-border":A.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var V;return[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString((V=r.unref(s))!=null&&V.endDate?r.unref(P)(r.unref(s).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),A.compare?(r.openBlock(),r.createElementBlock("label",Lb,[r.createVNode(Zt,{label:A.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(d.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:B,"show-valid-border":A.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(A.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(A.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[d.value?"text-fm-color-typo-disabled":I.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(I.value.startDate)+" - "+r.toDisplayString(I.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",Hb,[A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",Ub,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.predefinedRange,(V,R)=>(r.openBlock(),r.createBlock(xe,{key:R,label:V.label,"model-value":m.value===V.label,selectable:"",onClick:O=>F(V)},null,8,["label","model-value","onClick"]))),128)),A.compare&&A.predefinedRange?(r.openBlock(),r.createElementBlock("div",jb,[r.createVNode(Yd,{inset:""})])):r.createCommentVNode("",!0),A.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":c.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":k[0]||(k[0]=V=>M(V))},null,8,["model-value"]),c.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(V,R)=>r.createVNode(xe,{key:R,label:V.label,"model-value":u.value===V.id,sublabel:V.sublabel,selectable:"",onClick:O=>V.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),A.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",Qb)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":A.showPredefinedRange})},[r.createElementVNode("div",Wb,[c.value?(r.openBlock(),r.createElementBlock("div",Yb,[r.createElementVNode("label",Xb,[r.createVNode(Zt,{label:"Custom"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[0])!=null&&V.startDate&&((R=a.value[0])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[0].startDate!==null?a.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[0].endDate!==null?a.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Gb,r.createElementVNode("label",qb,[r.createVNode(Zt,{label:"Compare"}),r.createVNode(de,{focused:!1},{default:r.withCtx(()=>{var V,R;return[r.createElementVNode("div",{class:r.normalizeClass([[(V=a.value[1])!=null&&V.startDate&&((R=a.value[1])!=null&&R.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},r.toDisplayString(a.value[1].startDate!==null?a.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(a.value[1].endDate!==null?a.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",Jb,[r.createElementVNode("div",Kb,[r.createElementVNode("div",Zb,[r.createElementVNode("div",$b,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:k[1]||(k[1]=()=>v("left",f.value.subtract(1,"month")))}),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"month","onUpdate:modelValue":k[2]||(k[2]=V=>v("left",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":f.value,picker:"year","onUpdate:modelValue":k[3]||(k[3]=V=>v("left",V))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",_b,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",e2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(f.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",t2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,n2)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",o2,[r.createElementVNode("div",r2,[r.createElementVNode("div",i2,[r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"month","onUpdate:modelValue":k[4]||(k[4]=V=>v("right",V))},null,8,["max","min","model-value"]),r.createVNode(pn,{max:A.max,min:A.min,"model-value":p.value,picker:"year","onUpdate:modelValue":k[5]||(k[5]=V=>v("right",V))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:k[6]||(k[6]=()=>v("left",f.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",s2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),V=>(r.openBlock(),r.createElementBlock("div",{key:V,class:"fm-calendar__cell"},r.toDisplayString(V),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Li)(p.value),(V,R)=>(r.openBlock(),r.createElementBlock("div",{key:R,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V,O=>(r.openBlock(),r.createElementBlock("div",{key:O.date.date(),class:"fm-calendar__cell"},[O.date.isSame(r.unref(i),"day")&&O.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",a2)):r.createCommentVNode("",!0),O.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[w(O.date),{"fm-typo-en-body-lg-600":O.date.isSame(r.unref(i),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>b(O.date),onMouseover:T=>x(O.date)},r.toDisplayString(O.date.date()),43,l2)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",d2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:E.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[A.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(A.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-a35b0ec8"]]),u2={class:"flex flex-col gap-4"},f2=["id"],p2={class:"flex flex-col gap-4 justify-center"},mn=Z(r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},menuId:{},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(re,null),i=e,s=J(n,"modelValue"),a=r.ref(!1),l=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),d=(h,g)=>{if(n.multiselect){let b=[];h?b=s.value.length===0?[g]:n.items.filter(y=>s.value.some(S=>Ce(y.value,S)||Ce(y.value,g.value))):b=n.items.filter(y=>s.value.some(S=>Ce(y.value,S)&&!Ce(y.value,g.value))),s.value=b.map(y=>y.value)}else s.value=g.value,setTimeout(()=>{a.value=!1},0)},c=h=>{const g=[...s.value].filter((b,y)=>y!==h);s.value=g},u=r.computed(()=>n.multiselect?n.items.filter(h=>r.toRaw(s.value).some(g=>Ce(g,h.value))):n.items.filter(h=>Ce(s.value,h.value))),f=r.computed(()=>n.items.filter(h=>s.value.some(g=>Ce(h.value,g))).map(h=>({label:h.label}))),p=r.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(g=>Ce(g.value,s.value)))==null?void 0:h.label)??n.placeholder}),m=r.computed(()=>n.multiselect?s.value.length!==0:n.items.some(h=>Ce(h.value,s.value)));return(h,g)=>(r.openBlock(),r.createElementBlock("div",u2,[r.createVNode(Se,{modelValue:r.unref(s),"onUpdate:modelValue":g[1]||(g[1]=b=>r.isRef(s)?s.value=b:null),disabled:l.value,focused:a.value,"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},r.createSlots({default:r.withCtx(({invalid:b})=>[r.createVNode(_e,{"close-on-click":!h.multiselect,disabled:l.value,"max-height":h.maxHeight,placement:h.placement,"show-menu":a.value,width:h.width,onMenuChanged:g[0]||(g[0]=y=>{a.value=y,i("dropdown-changed",a.value)})},{"menu-button":r.withCtx(()=>[r.createVNode(de,{class:r.normalizeClass(l.value?"cursor-not-allowed":"cursor-pointer"),focused:a.value,invalid:b,"show-valid-border":h.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.createVNode(Q,{color:l.value?"#C7C7CC":"black",name:a.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"])]),default:r.withCtx(()=>[r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[l.value?"text-fm-color-typo-disabled":m.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-en-body-lg-400 line-clamp-1"])},r.toDisplayString(p.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(({maxHeight:y,width:S})=>[r.createElementVNode("div",{id:h.menuId,style:r.normalizeStyle({"max-height":`${y}px`,width:`${S}px`}),class:"fm-select__menu__wrapper"},[r.renderSlot(h.$slots,"menu-wrapper",r.mergeProps({handleItemChange:(v,w)=>d(v,w)},{maxHeight:y,width:S}),()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,v=>(r.openBlock(),r.createBlock(xe,{key:v.value,"has-checkbox":h.multiselect,label:v.label,"model-value":u.value.some(w=>r.unref(Ce)(w.value,v.value)),sublabel:v.sublabel,value:v.value,"onUpdate:modelValue":w=>d(w,v)},null,8,["has-checkbox","label","model-value","sublabel","value","onUpdate:modelValue"]))),128))],!0)],12,f2)]),_:2},1032,["close-on-click","disabled","max-height","placement","show-menu","width"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),r.createElementVNode("div",p2,[h.multiselect&&u.value.length>0?(r.openBlock(),r.createBlock(Ir,{key:0,disabled:l.value,items:f.value,removable:"",onChipClosed:c},null,8,["disabled","items"])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-43a21fe7"]]),m2={key:0},h2={class:"flex gap-4 items-center relative w-full"},g2={class:"flex flex-col gap-4 w-full"},b2=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),y2={class:"flex flex-col gap-4 w-full"},k2={key:1,class:"flex flex-col gap-4 w-full"},Ui=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:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};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?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",m2,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",h2,[r.createElementVNode("label",g2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),b2,r.createElementVNode("label",y2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month",disabled:o.disabled,"icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",k2,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{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(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Gd=t=>(r.pushScopeId("data-v-133138e9"),t=t(),r.popScopeId(),t),x2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},S2={class:"flex items-center justify-center"},C2={class:"flex fm-typo-en-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},w2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},A2=Gd(()=>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)),v2={id:"wrapper",class:"h-full relative w-[336px]"},B2=["id"],D2={class:"flex gap-4 items-center"},V2={class:"fm-typo-en-body-lg-600"},P2={class:"fm-typo-en-body-lg-600"},E2=["onClick","onMouseover"],F2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},N2=Gd(()=>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)),M2={class:"flex gap-8 items-center justify-end w-full"},qd=Z(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{default:100},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var D,A;const e=r.ref(),n=[{id:ye.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{f.value=ye.PrecedingPeriod;const k=d.value;if(k[0].startDate&&k[0].endDate){const B=k[0].startDate.diff(k[0].endDate,"day");k[1]={startDate:k[0].startDate.subtract(+(1-B),"day"),endDate:k[0].startDate.subtract(1,"day")}}}},{id:ye.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{f.value=ye.PrecedingWeek;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"week");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"week"),endDate:k[0].endDate.subtract(B,"week")}}}},{id:ye.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{f.value=ye.PrecedingMonth;const k=d.value;if(k[0].startDate&&k[0].endDate){let B=k[0].endDate.diff(k[0].startDate,"month");B===0&&(B+=1),k[1]={startDate:k[0].startDate.subtract(B,"month"),endDate:k[0].endDate.subtract(B,"month")}}}},{id:ye.Custom,label:"Custom",sublabel:"",action:()=>{f.value=ye.Custom}}],o=t,i=r.inject(re,null),s=jd(o.min,o.max),a=P(),l=J(o,"modelValue"),d=r.ref([{startDate:(D=l.value)!=null&&D.startDate?P(l.value.startDate,z):null,endDate:(A=l.value)!=null&&A.endDate?P(l.value.endDate,z):null},{startDate:null,endDate:null}]),c=r.ref(!1),u=r.ref(!1),f=r.ref(""),p=r.ref(""),m=r.ref(null);let h=0;const g=k=>{var B;if(p.value="",d.value[h].startDate&&d.value[h].endDate){h===1&&(d.value=d.value.map(()=>({startDate:null,endDate:null})),h=0),d.value[0]={startDate:k,endDate:null};return}else if(!d.value[h].startDate&&!d.value[h].endDate)d.value[h].startDate=k;else{if(k.isBefore(d.value[h].startDate)){const V=d.value[h].startDate;d.value[h]={startDate:k,endDate:V}}else d.value[h].endDate=k;u.value&&(h=1),n.find(V=>V.id===f.value)||(f.value=ye.Custom)}(B=n.find(V=>V.id===f.value))==null||B.action()},b=()=>{u.value?l.value=d.value.map(k=>({startDate:k.startDate.format(z),endDate:k.endDate.format(z)})):l.value={startDate:d.value[0].startDate.format(z),endDate:d.value[0].endDate.format(z)},setTimeout(()=>{c.value=!1})},y=()=>{var k,B;Array.isArray(l.value)?d.value=l.value:d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null},c.value=!1},S=k=>{const B=d.value[0].startDate,V=d.value[0].endDate,R=d.value[1].startDate,O=d.value[1].endDate,T=m.value,U=B==null?void 0:B.isSame(k),W=V==null?void 0:V.isSame(k),j=R==null?void 0:R.isSame(k),K=O==null?void 0:O.isSame(k),_=T==null?void 0:T.isSame(k),te=U&&V&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isAfter(B))||B&&!V&&_&&(T==null?void 0:T.isBefore(B)),he=j&&O&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isAfter(R))||R&&!O&&_&&(T==null?void 0:T.isBefore(R)),Te=W&&B&&!(U&&W)||B&&!V&&U&&(T==null?void 0:T.isBefore(B))||B&&!V&&_&&(T==null?void 0:T.isAfter(B)),qe=K&&R&&!(j&&K)||R&&!O&&j&&(T==null?void 0:T.isBefore(R))||R&&!O&&_&&(T==null?void 0:T.isAfter(R)),ze=U&&W||U&&!V,ge=j&&K||j&&!O,Fe=B&&(V||T)&&V?k.isAfter(B)&&k.isBefore(V):k.isAfter(T)&&k.isBefore(B)||k.isBefore(T)&&k.isAfter(B),Le=R&&(O||T)&&O?k.isAfter(R)&&k.isBefore(O):k.isAfter(T)&&k.isBefore(R)||k.isBefore(T)&&k.isAfter(R),nt=()=>{if(d.value.filter(ao=>{var vr;for(const JC in ao)if((vr=ao[JC])!=null&&vr.isSame(k,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(U&&W&&(ue(k,R,O)||ue(k,R,T)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(j&&K&&(ue(k,B,V)||ue(k,B,T)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(te||Te)return ue(k,R,O)||ue(k,R,T)?"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||qe)return ue(k,B,V)||ue(k,B,T)?"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(ze)return"bg-fm-color-primary";if(ge)return"bg-fm-color-system-info-300";if(ue(k,B,V)&&(ue(k,R,O)||ue(k,R,T)))return"bg-fm-color-system-success-100";if(Fe)return"bg-fm-color-system-warning-100";if(Le)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${nt()}`]:te||he,[`fm-calendar__cell__button--selected-end ${nt()}`]:Te||qe,[`fm-calendar__cell__button--selected-between ${nt()}`]:Fe||Le,[`fm-calendar__cell__button--selected ${nt()}`]:ze||ge}},v=k=>{const B=d.value;if(B[0].startDate&&!B[0].endDate||B[1].startDate&&!B[1].endDate){m.value=k;return}m.value=null},w=k=>{d.value[0]={startDate:P(k.startDate,z),endDate:P(k.endDate,z)}},x=k=>{const B=n.find(V=>V.id===k);B==null||B.action()},F=r.computed(()=>u.value?!d.value.every(k=>k.startDate&&k.endDate):!(d.value[0].startDate&&d.value[0].endDate)),E=k=>{f.value="",u.value=k,d.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),h=0},M=r.computed(()=>{const k=u.value&&Array.isArray(l.value)?l.value[1].startDate:null,B=u.value&&Array.isArray(l.value)?l.value[1].endDate:null;return k&&B?`Compared: ${P(k).format("D MMM YYYY")} - ${P(B).format("D MMM YYYY")}`:""}),I=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),N=()=>{I.value||(c.value=!0,setTimeout(()=>{e.value.scrollToItem(C(a.startOf("month")))},0))},C=k=>s.findIndex(B=>B.id===k.startOf("month").format(z));return r.watch(()=>l.value,()=>{var k,B;u.value?d.value=l.value.map(V=>({startDate:V!=null&&V.startDate?P(V.startDate,z):null,endDate:V!=null&&V.endDate?P(V.endDate,z):null})):d.value[0]={startDate:(k=l.value)!=null&&k.startDate?P(l.value.startDate,z):null,endDate:(B=l.value)!=null&&B.endDate?P(l.value.endDate,z):null}}),(k,B)=>{const V=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":B[3]||(B[3]=R=>r.isRef(l)?l.value=R:null),disabled:I.value,focused:c.value,"helper-state":k.helperState,"helper-text":u.value?M.value:k.helperText,rules:k.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:R})=>{var O,T,U,W;return[k.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:N},[r.renderSlot(k.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:c.value,invalid:R,showValidBorder:k.showValidBorder,isComparing:u.value,disabled:I.value})),void 0,!0)])):(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"compare-label":k.compareLabel,disabled:I.value,"end-label":k.endLabel,focused:c.value,invalid:R,"is-comparing":u.value,"model-value":r.unref(l),"show-valid-border":k.showValidBorder,"start-label":k.startLabel,onClick:N},r.createSlots({_:2},[k.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"popover-button",{focused:c.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"])),c.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-screen left-0 top-0 w-screen"},[r.createElementVNode("div",x2,[k.showPredefinedRange?(r.openBlock(),r.createBlock(mn,{key:0,items:k.predefinedRange,"model-value":p.value,"onUpdate:modelValue":B[0]||(B[0]=j=>w(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(Ui,{analytic:k.compare,"compare-label":k.compareLabel,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((O=d.value[0].startDate)==null?void 0:O.format(r.unref(z)))??null,endDate:((T=d.value[0].endDate)==null?void 0:T.format(r.unref(z)))??null},"start-label":k.startLabel},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),k.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Hi,{"model-value":u.value,label:"Compare","label-placement":"right","onUpdate:modelValue":B[1]||(B[1]=j=>E(j))},null,8,["model-value"]),u.value&&k.compare?(r.openBlock(),r.createBlock(mn,{key:0,items:n.map(j=>({label:j.label,sublabel:j.sublabel,value:j.id})),"model-value":f.value,"onUpdate:modelValue":B[2]||(B[2]=j=>x(j))},null,8,["items","model-value"])):r.createCommentVNode("",!0),u.value&&k.compare?(r.openBlock(),r.createBlock(Ui,{key:1,analytic:k.compare,"end-label":k.endLabel,"is-comparing":u.value,"model-value":{startDate:((U=d.value[1].startDate)==null?void 0:U.format(r.unref(z)))??null,endDate:((W=d.value[1].endDate)==null?void 0:W.format(r.unref(z)))??null},"start-label":k.startLabel,"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",S2,[r.createElementVNode("div",C2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(to),j=>(r.openBlock(),r.createElementBlock("div",{key:j,class:"fm-calendar__cell"},r.toDisplayString(j),1))),128))])])]),r.createElementVNode("div",w2,[A2,r.createElementVNode("div",v2,[r.createVNode(V,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(s),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:j})=>[r.createElementVNode("div",{id:j.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",D2,[r.createElementVNode("div",V2,r.toDisplayString(r.unref(P)(j.id).format("MMMM")),1),r.createElementVNode("div",P2,r.toDisplayString(r.unref(P)(j.id).format("YYYY")),1)])],8,B2),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(j.matrix,(K,_)=>(r.openBlock(),r.createElementBlock("div",{key:_,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(K,te=>(r.openBlock(),r.createElementBlock("div",{key:te.date.date(),class:"fm-calendar__cell"},[te.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[S(te.date),{"fm-typo-en-body-lg-600":te.date.isSame(r.unref(a),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>g(te.date),onMouseover:he=>v(te.date)},r.toDisplayString(te.date.date()),43,E2)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",F2,[N2,r.createElementVNode("div",M2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:F.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])],4)])):r.createCommentVNode("",!0)]}),_:2},[k.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-133138e9"]]),O2=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(z),endDate:P().format(z)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This week",value:{startDate:P().startOf("week").format(z),endDate:P().endOf("week").format(z)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(z),endDate:P().subtract(1,"week").endOf("week").format(z)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(z),endDate:P().subtract(1,"day").format(z)}},{label:"This month",value:{startDate:P().startOf("month").format(z),endDate:P().endOf("month").format(z)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(z),endDate:P().subtract(1,"month").endOf("month").format(z)}},{label:"This year",value:{startDate:P().startOf("year").format(z),endDate:P().endOf("year").format(z)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>P().subtract(50,"year").format(z)},max:{default:()=>P().add(25,"year").format(z)},zIndex:{},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}=St(),o=J(e,"modelValue"),i=tr(e);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(c2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$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(qd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),L="YYYY-MM-DD",hn=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e.length<6&&e.push([]),e},I2=Array.from(Array(7),(t,e)=>P().day(e).format("ddd")),Jd=(t,e)=>({startAt:t?P(t,L):null,endAt:e?P(e,L):null}),R2={class:"fm-typo-en-body-md-600"},T2={id:"in-calendar-app",class:"h-[264px] overflow-y-auto w-[160px]"},z2=["onVnodeMounted"],L2=["onVnodeMounted"],je=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),s=r.computed(()=>{const c=P(n.min).startOf("year"),u=P(n.max).startOf("year"),f=u.diff(c,"year"),p=[];for(let m=0;m<=f;m++)p.push(u.subtract(m,"year"));return p}),a=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},l=c=>{const u=P(n.min).startOf("month"),f=P(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,p=f==null?void 0:f.parentElement;!f||!p||p.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(_e,{trigger:"click",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"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",R2,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(Q,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",T2,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,p)=>c.modelValue.month(p)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:p=>d(p,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(xe,{disabled:!a(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":p=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,z2))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:p=>d(p,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(xe,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":p=>l(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,L2))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),H2={class:"fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary"},U2=["id"],j2={key:0,class:"fm-calendar__cell__button--today"},Q2=["onClick","onMouseover"],gn=Z(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=P(),n=(i,s)=>typeof i=="function"?i(...s):i,o=(i,s)=>{if(!s)return;const a={"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 s=="function"){const{status:d,className:c}=s(i);d&&(a["fm-calendar__cell--selected"]=d.isSelected??!1,a["fm-calendar__cell--selected-start"]=d.isStart??!1,a["fm-calendar__cell--selected-end"]=d.isEnd??!1,a["fm-calendar__cell--selected-between"]=d.isBetween??!1),l=c??""}else{const{status:d,className:c}=s;d&&(a["fm-calendar__cell--selected"]=n(d.isSelected,[i])??!1,a["fm-calendar__cell--selected-start"]=n(d.isStart,[i])??!1,a["fm-calendar__cell--selected-end"]=n(d.isEnd,[i])??!1,a["fm-calendar__cell--selected-between"]=n(d.isBetween,[i])??!1),l=n(c,[i])??""}return[a,l]};return(i,s)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",H2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(I2),a=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass(["fm-calendar__cell",`fm-calendar__cell__${i.cellSize}`])},r.toDisplayString(a),3))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.days,(a,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(a,d=>(r.openBlock(),r.createElementBlock("div",{id:`${d.date.toISOString()}`,key:d.date.date(),class:r.normalizeClass(["fm-calendar__cell",[`fm-calendar__cell__${i.cellSize}`,o(d.date,i.dayCellClass),!d.isCurrentMonth&&"fm-calendar__cell--not-current-month"]])},[d.date.isSame(r.unref(e),"day")&&d.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",j2)):r.createCommentVNode("",!0),d.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:"fm-calendar__cell__button",type:"button",onClick:c=>i.onDayClick(d),onMouseover:c=>{var u;return(u=i.onCellMouseOver)==null?void 0:u.call(i,d.date)}},r.toDisplayString(d.date.date()),41,Q2)):r.createCommentVNode("",!0)],10,U2))),128))]))),128))])]))}}),[["__scopeId","data-v-c82f9b53"]]),W2={class:"p-12 space-y-4 w-[552px]"},Y2={class:"w-max"},X2={class:"flex space-x-24"},G2={class:"flex items-center py-8 space-x-16"},q2={class:"flex space-x-4"},J2={class:"flex items-center justify-end py-8 space-x-16"},K2={class:"flex space-x-4"},Z2={class:"flex gap-8 items-center justify-end w-full"},$2=r.defineComponent({__name:"FmSimpleDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=r.ref(P().startOf("month").add(1,"month")),c=(b,y)=>{b==="left"?(l.value=y,d.value=y.add(1,"month")):b==="right"&&(d.value=y,l.value=y.subtract(1,"month"))},u=b=>{i.value=b},f=r.computed(()=>hn(l.value)),p=r.computed(()=>hn(l.value.add(1,"month"))),m=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},h=()=>{i.value=o.value?P(o.value):null,s.value=!1},g=b=>{s.value=b,b||h()};return(b,y)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":y[6]||(y[6]=S=>r.isRef(o)?o.value=S:null),disabled:a.value,focused:s.value,"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,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(b.$slots,"label")]),default:r.withCtx(({invalid:S})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:g},{"popover-button":r.withCtx(()=>[b.$slots["trigger-button"]?r.renderSlot(b.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:S,opened:s.value,showValidBorder:b.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:S,"show-valid-border":b.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(b.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(b.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.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(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",W2,[r.createElementVNode("div",Y2,[r.createElementVNode("div",X2,[r.createElementVNode("div",null,[r.createElementVNode("div",G2,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:y[0]||(y[0]=()=>c("left",l.value.subtract(1,"month")))}),r.createElementVNode("div",q2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"month","onUpdate:modelValue":y[1]||(y[1]=v=>c("left",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":l.value,picker:"year","onUpdate:modelValue":y[2]||(y[2]=v=>c("left",v))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:f.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",J2,[r.createElementVNode("div",K2,[r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"month","onUpdate:modelValue":y[3]||(y[3]=v=>c("right",v))},null,8,["max","min","model-value"]),r.createVNode(je,{max:b.max,min:b.min,"model-value":d.value,picker:"year","onUpdate:modelValue":y[4]||(y[4]=v=>c("right",v))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:y[5]||(y[5]=()=>c("left",l.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:v=>v.isSame(i.value,"date")}},days:p.value,"on-day-click":v=>u(v.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",Z2,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:h}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:m},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(b.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),_2={class:"p-12 space-y-4 w-[276px]"},ey={class:"w-max"},ty={class:"flex space-x-24"},ny={class:"flex items-center justify-between py-8"},oy={class:"flex space-x-4"},ry={class:"flex space-x-4"},iy={class:"flex gap-8 items-center justify-end w-full"},Kd=r.defineComponent({__name:"FmSimpleDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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(re,null),o=J(e,"modelValue"),i=r.ref(P(o.value,L)),s=r.ref(!1),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),l=r.ref(P().startOf("month")),d=h=>{l.value=h},c=h=>{i.value=h},u=r.computed(()=>hn(l.value)),f=()=>{o.value=i.value.format(L),setTimeout(()=>{s.value=!1},0)},p=()=>{i.value=o.value?P(o.value):null,s.value=!1},m=h=>{s.value=h,h||p()};return(h,g)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(o),"onUpdate:modelValue":g[4]||(g[4]=b=>r.isRef(o)?o.value=b:null),disabled:a.value,focused:s.value,"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,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label")]),default:r.withCtx(({invalid:b})=>[r.createVNode(mt,{disabled:a.value,"show-popover":s.value,"z-index":e.zIndex,onPopoverChanged:m},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:b,opened:s.value,showValidBorder:h.showValidBorder,disabled:a.value}))):(r.openBlock(),r.createBlock(de,{key:1,disabled:a.value,focused:s.value,"icon-outlined":!s.value,invalid:b,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.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(P)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",_2,[r.createElementVNode("div",ey,[r.createElementVNode("div",ty,[r.createElementVNode("div",null,[r.createElementVNode("div",ny,[r.createElementVNode("div",oy,[r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"month","onUpdate:modelValue":g[0]||(g[0]=y=>d(y))},null,8,["max","min","model-value"]),r.createVNode(je,{max:h.max,min:h.min,"model-value":l.value,picker:"year","onUpdate:modelValue":g[1]||(g[1]=y=>d(y))},null,8,["max","min","model-value"])]),r.createElementVNode("div",ry,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:g[2]||(g[2]=()=>d(l.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:g[3]||(g[3]=()=>d(l.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":{status:{isSelected:y=>y.isSame(i.value,"date")}},days:u.value,"on-day-click":y=>c(y.date)},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",iy,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:p}),r.createVNode(G,{disabled:!i.value,label:"Apply",size:"md",variant:"primary",onClick:f},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),sy=r.defineComponent({__name:"FmSimpleDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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}=St(),n=t,o=J(n,"modelValue"),i=tr(n);return(s,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock($2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$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(Kd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":a[1]||(a[1]=l=>r.isRef(o)?o.value=l:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(l=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(l)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}});var ne=(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))(ne||{});const ay={key:1,class:"flex gap-4 items-center relative w-full"},ly={class:"flex flex-col gap-4 w-full"},dy=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),cy={class:"flex flex-col gap-4 w-full"},uy={class:"flex h-[360px]"},fy={class:"flex flex-col items-start p-12 pr-4"},py={key:0},my={key:1},hy=r.createElementVNode("div",{class:"bg-fm-color-neutral-gray-100 h-full mx-4 w-px"},null,-1),gy={class:"w-max"},by={class:"flex space-x-24"},yy={class:"flex items-center py-8 space-x-16"},ky={class:"flex space-x-4"},xy={class:"flex items-center justify-end py-8 space-x-16"},Sy={class:"flex space-x-4"},Cy={class:"flex gap-8 items-center justify-end w-full"},wy=r.defineComponent({__name:"FmSimpleDateRangePickerDesktop",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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 I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=Jd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return v("right",k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},h.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Same period last week",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},h.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last month",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},h.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},h.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},h.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{h.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(P().startOf("month").add(1,"month")),m=r.ref(""),h=r.ref(s.defaultCompareType),g=r.ref(null),b=C=>{if(m.value="",h.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},y=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",h.value),setTimeout(()=>{c.value=!1})},S=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},v=(C,D)=>{C==="left"?(f.value=D,p.value=D.add(1,"month")):C==="right"&&(p.value=D,f.value=D.subtract(1,"month"))},w=C=>{const D=d.value.startDate,A=d.value.endDate,k=g.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},x=C=>{const D=d.value;if(D.startDate&&!D.endDate){g.value=C;return}g.value=null},F=C=>{m.value=C.label;const D=P(C.value.startDate,L),A=P(C.value.endDate,L);d.value={startDate:D,endDate:A},v("right",A.startOf("month"))},E=C=>{c.value=C,C||S()},M=r.computed(()=>!h.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||h.value===ne.Custom)return;const C=o.value.find(A=>A.id===h.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createElementBlock("div",ay,[r.createElementVNode("label",ly,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.startLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.startDate?r.unref(P)(r.unref(l).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),dy,r.createElementVNode("label",cy,[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString(s.endLabel),3),r.createVNode(de,{class:r.normalizeClass(u.value?"cursor-not-allowed":"cursor-pointer"),disabled:u.value,focused:c.value,"icon-outlined":!c.value,invalid:A,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(C.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(C.$slots,"append")]),default:r.withCtx(()=>{var k;return[r.createElementVNode("div",{class:r.normalizeClass([[u.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},r.toDisplayString((k=r.unref(l))!=null&&k.endDate?r.unref(P)(r.unref(l).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])]))]),default:r.withCtx(()=>[r.createElementVNode("div",uy,[C.showPredefinedRange||C.compareTarget?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",fy,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createElementBlock("div",py,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.predefinedRange,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":m.value===k.label,class:"min-w-[158px]",selectable:"",onClick:V=>F(k)},null,8,["label","model-value","onClick"]))),128))])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createElementBlock("div",my,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(k,B)=>(r.openBlock(),r.createBlock(xe,{key:B,label:k.label,"model-value":h.value===k.id,sublabel:k.sublabel,class:"min-w-[158px]",selectable:"",onClick:V=>k.action()},null,8,["label","model-value","sublabel","onClick"]))),128))])):r.createCommentVNode("",!0)]),hy],64)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pl-4":C.showPredefinedRange||C.compareTarget},"p-12 space-y-4"])},[r.createElementVNode("div",gy,[r.createElementVNode("div",by,[r.createElementVNode("div",null,[r.createElementVNode("div",yy,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[0]||(D[0]=()=>v("left",f.value.subtract(1,"month")))}),r.createElementVNode("div",ky,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[1]||(D[1]=k=>v("left",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[2]||(D[2]=k=>v("left",k))},null,8,["max","min","model-value"])])]),r.createVNode(gn,{"day-cell-class":w,days:r.unref(hn)(f.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["days","on-day-click"])]),r.createElementVNode("div",null,[r.createElementVNode("div",xy,[r.createElementVNode("div",Sy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"month","onUpdate:modelValue":D[3]||(D[3]=k=>v("right",k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":p.value,picker:"year","onUpdate:modelValue":D[4]||(D[4]=k=>v("right",k))},null,8,["max","min","model-value"])]),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>v("left",f.value.add(1,"month")))})]),r.createVNode(gn,{"day-cell-class":k=>w(k),days:r.unref(hn)(p.value),"on-day-click":k=>b(k.date),onCellMouseOver:x},null,8,["day-cell-class","days","on-day-click"])])])]),r.createElementVNode("div",Cy,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:S}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:y},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ay={key:0},vy={class:"flex gap-4 items-center relative w-full"},By={class:"flex flex-col gap-4 w-full"},Dy=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),Vy={class:"flex flex-col gap-4 w-full"},Py={key:1,class:"flex flex-col gap-4 w-full"},Ey=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:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};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?P(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?P(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ay,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",vy,[r.createElementVNode("label",By,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.startDate?r.unref(P)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])]),Dy,r.createElementVNode("label",Vy,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",disabled:o.disabled},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,a;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((a=o.modelValue)!=null&&a.endDate?r.unref(P)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border","disabled"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",Py,[r.createVNode(Zt,{label:o.compareLabel},null,8,["label"]),r.createVNode(de,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{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(["fm-typo-en-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Fy={class:"p-12 space-y-4"},Ny={class:"w-max"},My={class:"flex space-x-24"},Oy={class:"flex items-center justify-between py-8"},Iy={class:"flex space-x-4"},Ry={class:"flex space-x-4"},Ty={class:"flex gap-8 items-center justify-end w-full"},Zd=r.defineComponent({__name:"FmSimpleDateRangePickerMobile",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{default:ne.PrecedingPeriod},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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 I,N;const n=C=>()=>{var B,V;const{startAt:D,endAt:A}=Jd((B=s.compareTarget)==null?void 0:B.startDate,(V=s.compareTarget)==null?void 0:V.endDate);if(!D||!A)return;const k=C({startAt:D,endAt:A});return S(k.endDate.startOf("month")),k},o=r.computed(()=>[{id:ne.NoComparison,label:"No Comparison",sublabel:"",action:()=>{d.value={startDate:null,endDate:null},m.value=ne.NoComparison}},{id:ne.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"week")+1;return d.value={startDate:C.subtract(A,"week"),endDate:D.subtract(A,"week")},m.value=ne.PrecedingWeek,d.value})},{id:ne.PrecedingMonth,label:"Same period last week",sublabel:"Match day of month",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"month")+1;return d.value={startDate:C.subtract(A,"month"),endDate:D.subtract(A,"month")},m.value=ne.PrecedingMonth,d.value})},{id:ne.PrecedingPeriod,label:"Preceding period",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"day")+1;return d.value={startDate:C.subtract(A,"day"),endDate:D.subtract(A,"day")},m.value=ne.PrecedingPeriod,d.value})},{id:ne.PrecedingYear,label:"Same period last year",sublabel:"",action:n(({startAt:C,endAt:D})=>{const A=D.diff(C,"year")+1;return d.value={startDate:C.subtract(A,"year"),endDate:D.subtract(A,"year")},m.value=ne.PrecedingYear,d.value})},{id:ne.Custom,label:"Custom",sublabel:"",action:()=>{m.value=ne.Custom}}]),i=e,s=t,a=r.inject(re,null),l=J(s,"modelValue"),d=r.ref({startDate:(I=l.value)!=null&&I.startDate?P(l.value.startDate,L):null,endDate:(N=l.value)!=null&&N.endDate?P(l.value.endDate,L):null}),c=r.ref(!1),u=r.computed(()=>s.disabled??(a==null?void 0:a.getDisabled())??!1),f=r.ref(P().startOf("month")),p=r.ref(""),m=r.ref(s.defaultCompareType),h=r.ref(null),g=C=>{if(p.value="",m.value=ne.Custom,d.value.startDate&&d.value.endDate){d.value={startDate:C,endDate:null};return}else if(!d.value.startDate&&!d.value.endDate)d.value.startDate=C;else if(C.isBefore(d.value.startDate)){const D=d.value.startDate;d.value={startDate:C,endDate:D}}else d.value.endDate=C},b=()=>{var C,D;l.value={startDate:(C=d.value.startDate)==null?void 0:C.format(L),endDate:(D=d.value.endDate)==null?void 0:D.format(L)},i("select-comparison",m.value),setTimeout(()=>{c.value=!1})},y=()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null},c.value=!1},S=C=>{f.value=C},v=C=>{const D=d.value.startDate,A=d.value.endDate,k=h.value,B=D==null?void 0:D.isSame(C),V=A==null?void 0:A.isSame(C),R=k==null?void 0:k.isSame(C),O=B&&A&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isAfter(D))||D&&!A&&R&&(k==null?void 0:k.isBefore(D)),T=V&&D&&!(B&&V)||D&&!A&&B&&(k==null?void 0:k.isBefore(D))||D&&!A&&R&&(k==null?void 0:k.isAfter(D)),U=B&&V||B&&!A,W=D&&(A||k)&&A?C.isAfter(D)&&C.isBefore(A):C.isAfter(k)&&C.isBefore(D)||C.isBefore(k)&&C.isAfter(D);return{status:{isStart:O??!1,isEnd:T??!1,isBetween:W??!1,isSelected:U??!1}}},w=C=>{const D=d.value;if(D.startDate&&!D.endDate){h.value=C;return}h.value=null},x=C=>{const D=P(C.startDate,L),A=P(C.endDate,L);d.value={startDate:D,endDate:A},S(A.startOf("month"))},F=C=>{const D=o.value.find(A=>A.id===C);D==null||D.action()},E=C=>{c.value=C,C||y()},M=r.computed(()=>!m.value&&!(d.value.startDate&&d.value.endDate));return r.watch(()=>l.value,()=>{var C,D;d.value={startDate:(C=l.value)!=null&&C.startDate?P(l.value.startDate,L):null,endDate:(D=l.value)!=null&&D.endDate?P(l.value.endDate,L):null}}),r.watch(()=>s.compareTarget,()=>{if(!s.compareTarget||m.value===ne.Custom)return;const C=o.value.find(A=>A.id===m.value),D=C==null?void 0:C.action();D&&(l.value=D)}),(C,D)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(l),"onUpdate:modelValue":D[6]||(D[6]=A=>r.isRef(l)?l.value=A:null),disabled:u.value,focused:c.value,"helper-state":C.helperState,"helper-text":C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:A})=>[r.createVNode(mt,{disabled:u.value,"exclude-el-from-click-outside":["exclude-from-click-outside","in-calendar-app"],"show-popover":c.value,"z-index":s.zIndex,onPopoverChanged:E},{"popover-button":r.withCtx(()=>[C.$slots["trigger-button"]?r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:c.value,invalid:A,showValidBorder:C.showValidBorder,disabled:u.value}))):(r.openBlock(),r.createBlock(Ey,{key:1,disabled:u.value,"end-label":C.endLabel,focused:c.value,invalid:A,"model-value":r.unref(l),"show-valid-border":C.showValidBorder,"start-label":C.startLabel},r.createSlots({_:2},[C.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"popover-button",{focused:c.value})]),key:"0"}:void 0]),1032,["disabled","end-label","focused","invalid","model-value","show-valid-border","start-label"]))]),default:r.withCtx(()=>[r.createElementVNode("div",Fy,[C.showPredefinedRange&&!C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:0,items:C.predefinedRange,"model-value":p.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[0]||(D[0]=k=>x(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),C.compareTarget?(r.openBlock(),r.createBlock(mn,{key:1,items:o.value.map(k=>({label:k.label,sublabel:k.sublabel,value:k.id})),"model-value":m.value,"menu-id":"exclude-from-click-outside","onUpdate:modelValue":D[1]||(D[1]=k=>F(k))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createElementVNode("div",Ny,[r.createElementVNode("div",My,[r.createElementVNode("div",null,[r.createElementVNode("div",Oy,[r.createElementVNode("div",Iy,[r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"month","onUpdate:modelValue":D[2]||(D[2]=k=>S(k))},null,8,["max","min","model-value"]),r.createVNode(je,{max:C.max,min:C.min,"model-value":f.value,picker:"year","onUpdate:modelValue":D[3]||(D[3]=k=>S(k))},null,8,["max","min","model-value"])]),r.createElementVNode("div",Ry,[r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",size:"md",onClick:D[4]||(D[4]=()=>S(f.value.subtract(1,"month")))}),r.createVNode(Q,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",size:"md",onClick:D[5]||(D[5]=()=>S(f.value.add(1,"month")))})])]),r.createVNode(gn,{"day-cell-class":v,days:r.unref(hn)(f.value),"on-day-click":k=>g(k.date),"cell-size":"lg",onCellMouseOver:w},null,8,["days","on-day-click"])])])]),r.createElementVNode("div",Ty,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(G,{disabled:M.value,label:"Apply",size:"md",variant:"primary",onClick:b},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text")]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),zy=r.defineComponent({__name:"FmSimpleDateRangePicker",props:{modelValue:{},compareTarget:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:P().format(L),endDate:P().format(L)}},{label:"Yesterday",value:{startDate:P().subtract(1,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This week",value:{startDate:P().startOf("week").format(L),endDate:P().endOf("week").format(L)}},{label:"Last week",value:{startDate:P().subtract(1,"week").startOf("week").format(L),endDate:P().subtract(1,"week").endOf("week").format(L)}},{label:"Last 7 days",value:{startDate:P().subtract(7,"day").format(L),endDate:P().subtract(1,"day").format(L)}},{label:"This month",value:{startDate:P().startOf("month").format(L),endDate:P().endOf("month").format(L)}},{label:"Last month",value:{startDate:P().subtract(1,"month").startOf("month").format(L),endDate:P().subtract(1,"month").endOf("month").format(L)}},{label:"This year",value:{startDate:P().startOf("year").format(L),endDate:P().endOf("year").format(L)}}]},defaultCompareType:{},min:{default:()=>P().subtract(50,"year").format(L)},max:{default:()=>P().add(25,"year").format(L)},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}=St(),i=J(n,"modelValue"),s=e,a=tr(n);return(l,d)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(o).md||r.unref(o).lg?(r.openBlock(),r.createBlock(wy,r.mergeProps({key:0},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[0]||(d[0]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[1]||(d[1]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(o).xs||r.unref(o).sm?(r.openBlock(),r.createBlock(Zd,r.mergeProps({key:1},r.unref(a),{modelValue:r.unref(i),"onUpdate:modelValue":d[2]||(d[2]=c=>r.isRef(i)?i.value=c:null),onSelectComparison:d[3]||(d[3]=c=>s("select-comparison",c))}),r.createSlots({_:2},[l.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(c=>[r.renderSlot(l.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(c)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Ly=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),s=r.ref(0),a=r.ref(!1),l=n,d=async()=>{var p,m;a.value=!0;let f=[];for(let h=0;h<i.value.length;h++){const g=i.value[h];f=[...f,...g.validate()]}f.length?await((m=o.onValidationFailed)==null?void 0:m.call(o,f)):await((p=o.onValidationSuccess)==null?void 0:p.call(o)),a.value=!1},c=()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValue();l("reset")};return e({validateInputs:d,resetInputsValidation:()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValidation();l("validation-reset")},resetInputs:c,isSubmitting:a}),r.provide(js,{register({validate:f,resetValidation:p,resetValue:m}){return i.value.push({componentId:s.value,validate:f,resetValidation:p,resetValue:m}),s.value++},unregister(f){i.value.filter(p=>p.componentId!==f)}}),r.provide(re,{getDisabled:()=>o.disabled}),(f,p)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(d,["prevent"]),onReset:r.withModifiers(c,["prevent"])},[r.renderSlot(f.$slots,"default")],32))}}),Hy={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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-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)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-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[3-79]|[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[0235])|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-2]))|(?: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",["60|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[013-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]","1(?:(?:22|44|7[27]|87|9[69])[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-578])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",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[047]"]]]],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[27]|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]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\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|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],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[1-5]"]],["(\\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,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?: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-57-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}"]]],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","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],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 $d(t,e){var n=Array.prototype.slice.call(e);return n.push(Hy),t.apply(this,n)}function ji(t){"@babel/helpers - typeof";return ji=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},ji(t)}function _d(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 Uy(t,e,n){return e&&_d(t.prototype,e),n&&_d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function jy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qy(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&&no(t,e)}function Wy(t){var e=tc();return function(){var o=oo(t),i;if(e){var s=oo(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return Yy(this,i)}}function Yy(t,e){if(e&&(ji(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ec(t)}function ec(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qi(t){var e=typeof Map=="function"?new Map:void 0;return Qi=function(o){if(o===null||!Xy(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 nr(o,arguments,oo(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),no(i,o)},Qi(t)}function nr(t,e,n){return tc()?nr=Reflect.construct:nr=function(i,s,a){var l=[null];l.push.apply(l,s);var d=Function.bind.apply(i,l),c=new d;return a&&no(c,a.prototype),c},nr.apply(null,arguments)}function tc(){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 Xy(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function no(t,e){return no=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},no(t,e)}function oo(t){return oo=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oo(t)}var ht=function(t){Qy(n,t);var e=Wy(n);function n(o){var i;return jy(this,n),i=e.call(this,o),Object.setPrototypeOf(ec(i),n.prototype),i.name=i.constructor.name,i}return Uy(n)}(Qi(Error)),Wi=2,Gy=17,qy=3,Xe="0-90-9٠-٩۰-۹",Jy="-‐-―−ー-",Ky="//",Zy="..",$y="  ­​⁠ ",_y="()()[]\\[\\]",e3="~⁓∼~",or="".concat(Jy).concat(Ky).concat(Zy).concat($y).concat(_y).concat(e3),Yi="++";function nc(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var s=Number(n[i]),a=Number(o[i]);if(s>a)return 1;if(a>s)return-1;if(!isNaN(s)&&isNaN(a))return 1;if(isNaN(s)&&!isNaN(a))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 t3={}.constructor;function rr(t){return t!=null&&t.constructor===t3}function Xi(t){"@babel/helpers - typeof";return Xi=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},Xi(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oc(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 sr(t,e,n){return e&&oc(t.prototype,e),n&&oc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var n3="1.2.0",o3="1.7.35",rc=" ext. ",r3=/^\d+$/,De=function(){function t(e){ir(this,t),l3(e),this.metadata=e,ac.call(this,e)}return sr(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&&r3.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new ic(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new ic(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 s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[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}(),ic=function(){function t(e,n){ir(this,t),this.globalMetadataObject=n,this.metadata=e,ac.call(this,n.metadata)}return sr(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 i3(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()&&sc(this.types(),n))return new a3(sc(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?rc:this.metadata[13]||rc}}]),t}(),i3=function(){function t(e,n){ir(this,t),this._format=e,this.metadata=n}return sr(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()&&!s3.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),s3=/^\(?\$1\)?$/,a3=function(){function t(e,n){ir(this,t),this.type=e,this.metadata=n}return sr(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 sc(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 l3(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!rr(t)||!rr(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(rr(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+d3(t)+": "+t,"."))}var d3=function(e){return Xi(e)};function ar(t,e){if(e=new De(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function c3(t,e){return e.countries.hasOwnProperty(t)}function ac(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?nc(e,n3)===-1?this.v2=!0:nc(e,o3)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var u3=";ext=",bn=function(e){return"([".concat(Xe,"]{1,").concat(e,"})")};function lc(t){var e="20",n="15",o="9",i="6",s="[  \\t,]*",a="[:\\..]?[  \\t,-]*",l="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",p="(?:,{2}|;)",m=u3+bn(e),h=s+d+a+bn(e)+l,g=s+c+a+bn(o)+l,b=u+bn(i)+"#",y=f+p+a+bn(n)+l,S=f+"(?:,)+"+a+bn(o)+l;return m+"|"+h+"|"+g+"|"+b+"|"+y+"|"+S}var f3="["+Xe+"]{"+Wi+"}",p3="["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){3,}["+or+Xe+"]*",m3=new RegExp("^["+Yi+"]{0,1}(?:["+or+"]*["+Xe+"]){1,2}$","i"),h3=p3+"(?:"+lc()+")?",g3=new RegExp("^"+f3+"$|^"+h3+"$","i");function b3(t){return t.length>=Wi&&g3.test(t)}function y3(t){return m3.test(t)}var dc=new RegExp("(?:"+lc()+")$","i");function k3(t){var e=t.search(dc);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(dc),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var x3={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 S3(t){return x3[t]}function C3(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=w3(t))||e&&t&&typeof t.length=="number"){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.
28
28
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w3(t,e){if(t){if(typeof t=="string")return cc(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 cc(t,e)}}function cc(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 uc(t){for(var e="",n=C3(t.split("")),o;!(o=n()).done;){var i=o.value;e+=A3(i,e)||""}return e}function A3(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return S3(t)}function v3(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=B3(t))||e&&t&&typeof t.length=="number"){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.
29
29
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B3(t,e){if(t){if(typeof t=="string")return fc(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 fc(t,e)}}function fc(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 D3(t,e){for(var n=t.slice(),o=v3(e),i;!(i=o()).done;){var s=i.value;t.indexOf(s)<0&&n.push(s)}return n.sort(function(a,l){return a-l})}function Gi(t,e){return pc(t,void 0,e)}function pc(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return pc(t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=D3(i,s.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var a=t.length,l=i[0];return l===a?"IS_POSSIBLE":l>a?"TOO_SHORT":i[i.length-1]<a?"TOO_LONG":i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function V3(t,e,n){if(e===void 0&&(e={}),n=new De(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 mc(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 mc(t,e){switch(Gi(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function gt(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function P3(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=E3(t))||e&&t&&typeof t.length=="number"){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.
30
30
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E3(t,e){if(t){if(typeof t=="string")return hc(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 hc(t,e)}}function hc(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 F3=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function qi(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new De(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(gt(o,n.nationalNumberPattern())){if(Ji(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Ji(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=P3(F3),s;!(s=i()).done;){var a=s.value;if(Ji(o,a,n))return a}}}}function Ji(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:gt(t,e.pattern())}function N3(t,e,n){if(e=e||{},n=new De(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return qi(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return gt(o,n.nationalNumberPattern())}function M3(t,e,n){var o=new De(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(s){return O3(e,s,n)}):[]}function O3(t,e,n){var o=new De(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function I3(t){return t.replace(new RegExp("[".concat(or,"]+"),"g")," ").trim()}var R3=/(\$\d)/;function T3(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var s=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(R3,e.nationalPrefixFormattingRule()):e.format());return o?I3(s):s}var z3=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function L3(t,e,n){var o=new De(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(z3.test(o.IDDPrefix()))return o.IDDPrefix()}function H3(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 U3(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=j3(t))||e&&t&&typeof t.length=="number"){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.
@@ -75,10 +75,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
75
75
  -moz-box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
76
76
  box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
77
77
  }
78
- `;Mc(qk),ns.render=Gk,ns.__scopeId="data-v-60be6971";var Jk=(()=>{const t=ns;return t.install=e=>{e.component("CountryFlag",t)},t})();const Kk=Jk,Zk={class:"flex items-center justify-center w-[20px] overflow-hidden"},Oc=Z(r.defineComponent({__name:"FmCountryFlag",props:{countryCode:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Zk,[r.createVNode(r.unref(Kk),{country:e.countryCode,class:"fm-country-flag flex-shrink-0"},null,8,["country"])]))}}),[["__scopeId","data-v-66513277"]]),$k={class:"flex gap-4"},_k=r.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},extraCountryCodes:{default:()=>[]},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.inject(re,null),i=e,s=J(n,"modelValue"),a=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),l=r.ref(["MY","SG","ID",...n.extraCountryCodes]),d=l.value.reduce((y,S)=>(y[S]=`+${Wk(S)}`,y),{}),c=l.value.map(y=>({label:"",value:y}));function u(y){var S;return y?((S=Object.entries(d).find(([,v])=>y.startsWith(v)))==null?void 0:S[0])??null:n.defaultCountry}const f=r.computed(()=>u(n.modelValue)),p=r.computed(()=>!f.value||!n.modelValue?d[n.defaultCountry]:n.modelValue),m=r.computed({get(){const y=es(p.value);return y?y.formatInternational().replace(d[f.value],"").trim():p.value.replace(d[f.value],"").trim()},set(y){const S=`${d[f.value]}${y}`,v=es(S);if(!v){s.value=S;return}s.value=v.formatInternational()}}),h=r.computed({get(){return f.value??n.defaultCountry},set(y){if(!f.value){i("update:modelValue",d[n.defaultCountry]);return}const v=d[f.value],w=d[y];s.value=p.value.replace(v,w)}}),g=r.ref({dropdown:!1,textField:!1});function b(y){const S=f.value;if(!y.replace(d[S],"").trim().length)return!0;const w=es(s.value,S);return!w||!w.isValid()?"Invalid phone number":!0}return(y,S)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":S[4]||(S[4]=v=>r.isRef(s)?s.value=v:null),disabled:a.value,focused:g.value.dropdown||g.value.textField,"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,b],class:"flex gap-4"},r.createSlots({default:r.withCtx(({invalid:v})=>[r.createElementVNode("div",$k,[r.createVNode(mn,{"model-value":h.value,"onUpdate:modelValue":S[0]||(S[0]=w=>h.value=w),disabled:a.value,items:r.unref(c),onDropdownChanged:S[1]||(S[1]=w=>g.value.dropdown=w)},{default:r.withCtx(()=>[r.createVNode(Oc,{"country-code":h.value},null,8,["country-code"])]),"menu-wrapper":r.withCtx(({handleItemChange:w})=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,x=>(r.openBlock(),r.createBlock(xe,{key:x,"model-value":h.value===x,"onUpdate:modelValue":F=>w(F,r.unref(c).find(E=>E.value===x))},{label:r.withCtx(()=>[r.createVNode(Oc,{"country-code":x},null,8,["country-code"])]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:1},8,["model-value","disabled","items"]),r.createVNode(ts,{"model-value":m.value,"onUpdate:modelValue":S[2]||(S[2]=w=>m.value=w),disabled:a.value,invalid:v,class:"flex-1",inputmode:"tel",onFocusChanged:S[3]||(S[3]=w=>g.value.textField=w)},{prepend:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass([a.value?"text-fm-color-typo-disabled":""])},"("+r.toDisplayString(r.unref(d)[f.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),e8={class:"flex gap-8 items-center"},t8=["onInput","onKeydown"],n8=Z(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=J(o,"modelValue"),s=r.ref([]),a=(f,p)=>{const m=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(m.value)){m.value="";return}m.value=m.value.slice(-1),c(m.value,p),s.value[p+1]?s.value[p+1].focus():s.value[p].blur()},l=(f,p)=>{f.preventDefault();const m=f.target;m.value="",c(null,p),s.value[p-1]?s.value[p-1].focus():s.value[p].focus()},d=(f,p)=>{f.preventDefault(),f.key==="ArrowLeft"&&(s.value[p-1]?s.value[p-1].focus():s.value[p].focus()),f.key==="ArrowRight"&&(s.value[p+1]?s.value[p+1].focus():s.value[p].focus())},c=(f,p)=>{i.value=i.value.toSpliced(p,1,f)},u=(f,p)=>{s.value[p]=f};return r.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),r.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,p)=>(r.openBlock(),r.createElementBlock("div",e8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.length,(m,h)=>(r.openBlock(),r.createElementBlock("input",{key:m,ref_for:!0,ref:g=>u(g,h),class:r.normalizeClass(["fm-pin-field",{[f.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[h]!==null}]),type:"text",onInput:g=>a(g,h),onKeydown:[r.withKeys(g=>l(g,h),["backspace"]),r.withKeys(g=>d(g,h),["arrow-left","arrow-right"])]},null,42,t8))),128))]))}}),[["__scopeId","data-v-69d9a64d"]]),o8={class:"fm-radio-btn"},r8={class:"fm-radio-btn__input--container"},i8=["checked","disabled","value"],s8={class:"py-8"},a8={class:"fm-typo-en-body-lg-400"},l8={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},d8=Z(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=J(e,"modelValue"),o=r.ref(),i=r.inject(Qs,null),s=r.inject(re,null),a=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(s==null?void 0:s.getDisabled())??!1),d=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(c,u)=>{const f=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",o8,[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}),onClick:a},[r.withDirectives((r.openBlock(),r.createElementBlock("div",r8,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:d.value,disabled:l.value,value:c.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,i8)])),[[f,!l.value]]),r.createElementVNode("div",s8,[r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",a8,r.toDisplayString(c.label),1),c.sublabel?(r.openBlock(),r.createElementBlock("div",l8,r.toDisplayString(c.sublabel),1)):r.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-2eaf3939"]]),c8=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=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue"),o=r.inject(re,null);r.provide(Qs,{groupValue:n,getDisabled:()=>i.value,updateValue(s){n.value=s}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(s,a)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(n),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.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},{label:r.withCtx(()=>[r.renderSlot(s.$slots,"label")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":s.inline})},[r.renderSlot(s.$slots,"default")],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(s.$slots,"helper-text")]),_:3},8,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),os=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},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(re,null),o=r.computed(()=>{const{modelValue:p,disabled:m,...h}=e;return h}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),s=J(e,"modelValue"),a=r.ref(!1),l=r.ref(),d=r.ref(e.collapsible),c=r.ref(e.collapsible);function u(){d.value=!1,r.nextTick(()=>{var p,m,h,g;(g=(h=(m=(p=l.value)==null?void 0:p.querySelector)==null?void 0:m.call(p,"input"))==null?void 0:h.focus)==null||g.call(h)})}function f(p){if(a.value=p,!!e.collapsible){if(p){c.value=!1;return}d.value=s.value.length===0,d.value&&setTimeout(()=>{c.value=!0},250)}}return(p,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createVNode(ts,r.mergeProps({modelValue:r.unref(s),"onUpdate:modelValue":m[1]||(m[1]=h=>r.isRef(s)?s.value=h:null),class:["transition-all",{"opacity-100":!p.collapsible||!d.value,"opacity-0 pointer-events-none":p.collapsible&&d.value}],disabled:i.value||p.collapsible&&d.value,style:{width:p.collapsible&&d.value?"24px":"100%"}},o.value,{onFocusChanged:f}),r.createSlots({_:2},[a.value?void 0:{name:"prepend",fn:r.withCtx(()=>[r.createVNode(Q,{name:"search"})]),key:"0"},r.unref(s).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(Q,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:m[0]||(m[0]=h=>s.value="")})]),key:"1"}:void 0]),1040,["modelValue","class","disabled","style"]),p.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-0 right-0",d.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:d.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(G,{icon:"search",variant:"tertiary",onClick:u})],6)):r.createCommentVNode("",!0)],512))}}),u8={key:0,class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},f8={key:0},p8={class:"overflow-y-auto"},m8={key:1,class:"flex gap-8 items-center"},Ic=Z(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}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>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(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[1]||(i[1]=s=>n.value=!1)},{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}`])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",u8,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",f8,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",p8,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",m8,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-2e7518aa"]]);var rs={exports:{}};function Rc(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,s,a,l,d;function c(){const f=Date.now()-l;if(f<e&&f>=0)a=setTimeout(c,e-f);else if(a=void 0,!o){const p=i,m=s;i=void 0,s=void 0,d=t.apply(p,m)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,s=f,l=Date.now();const p=o&&!a;if(a||(a=setTimeout(c,e)),p){const m=i,h=s;i=void 0,s=void 0,d=t.apply(m,h)}return d};return u.clear=()=>{a&&(clearTimeout(a),a=void 0)},u.flush=()=>{if(!a)return;const f=i,p=s;i=void 0,s=void 0,d=t.apply(f,p),clearTimeout(a),a=void 0},u}rs.exports.debounce=Rc,rs.exports=Rc;var h8=rs.exports;const is=Rr(h8);var Tc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(s){return n.test(o,s)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,s){s=s||{};var a=0,l=[],d=i.length,c=0,u=0,f=s.pre||"",p=s.post||"",m=s.caseSensitive&&i||i.toLowerCase(),h;o=s.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)h=i[g],m[g]===o[a]?(h=f+h+p,a+=1,u+=1+u):u=0,c+=u,l[l.length]=h;return a===o.length?(c=m===o?1/0:c,{rendered:l.join(""),score:c}):null},n.filter=function(o,i,s){return!i||i.length===0?[]:typeof o!="string"?i:(s=s||{},i.reduce(function(a,l,d,c){var u=l;s.extract&&(u=s.extract(l));var f=n.match(o,u,s);return f!=null&&(a[a.length]={string:f.rendered,score:f.score,index:d,original:l}),a},[]).sort(function(a,l){var d=l.score-a.score;return d||a.index-l.index}))}})()})(Tc);var g8=Tc.exports;const b8=Rr(g8);function dr(t,e){const[n]=b8.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,s,a)=>(i.push({segment:s,isMatch:a%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const y8={class:"flex flex-col gap-4"},k8={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},x8={class:"hidden sm:inline xs:inline"},S8={key:0},C8={key:0,class:"flex flex-col"},w8={class:"flex flex-col"},A8={class:"flex items-center px-24 py-12"},v8=r.createElementVNode("div",{class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),B8=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),D8=["onClick"],V8={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},P8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},E8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},F8={key:3,class:"flex flex-col"},N8=["onClick"],M8={class:"flex flex-col gap-4"},O8={key:0,class:"text-fm-color-typo-secondary"},I8={class:"px-16 py-4"},R8=5,T8=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 I=n.recentSearchKey;localStorage.removeItem(I),l.value=[]}function s(){if(!n.recentSearchKey)return;const I=n.recentSearchKey,N=localStorage.getItem(I);if(!N)return[];try{return JSON.parse(N)}catch{return new Array}}const a=is(function(N){if(!n.recentSearchKey)return;const C=n.recentSearchKey,D=N().trim();if(!C||!D)return;const A=s()??[],k=[...new Set([D,...A])].slice(0,R8),B=JSON.stringify(k);return localStorage.setItem(C,B),l.value=k,k},800),l=r.ref(s()),d=J(n,"show");r.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&S()):o("dismiss")});const c=J(n,"modelValue"),u=r.ref(n.modelValue);r.watch([()=>u.value],()=>{w()});const f=r.ref(null),p=r.ref(!0),m=r.computed(()=>{var I;return p.value?(I=f.value)==null?void 0:I.slice(0,5):f.value});r.watch([()=>f.value],([])=>{p.value=!0});const h=r.computed(()=>f.value===null),g=r.ref(!1),b=r.ref(""),y=()=>u.value;async function S(){if(!d.value)return;const I=y();if(!I)return;const N=Math.random().toString();if(b.value=N,n.suggestions){f.value=n.suggestions.map(C=>({label:dr(I,C.label),sublabel:C.sublabel?dr(I,C.sublabel):null})).filter(C=>{var D;return C.label.matched||((D=C.sublabel)==null?void 0:D.matched)}),a(y);return}if(n.onSearch)try{g.value=!0;const C=await n.onSearch(I);N===b.value&&(f.value=C.map(D=>({label:dr(I,D.label),sublabel:D.sublabel?dr(I,D.sublabel):null})))}catch{N===b.value&&(f.value=[])}finally{N===b.value&&(g.value=!1,a(y))}}function v(I){d.value=!1,o("dismiss"),c.value=I}const w=is(S),x=r.computed(()=>l.value&&l.value.length===0),F=r.computed(()=>(!u.value||h.value)&&!x.value),E=r.computed(()=>(!u.value||h.value)&&x.value),M=r.computed(()=>u.value&&f.value&&f.value.length===0);return(I,N)=>(r.openBlock(),r.createBlock(Ic,{"model-value":r.unref(d),"onUpdate:modelValue":N[4]||(N[4]=C=>r.isRef(d)?d.value=C:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var C,D;return[r.createElementVNode("div",y8,[r.createElementVNode("div",k8,[r.createElementVNode("div",x8,[r.createVNode(G,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:N[0]||(N[0]=A=>d.value=!1)})]),r.createVNode(os,{"model-value":u.value,"onUpdate:modelValue":N[1]||(N[1]=A=>u.value=A),class:"flex-1",placeholder:I.placeholder},null,8,["model-value","placeholder"])]),g.value?(r.openBlock(),r.createElementBlock("div",S8,[r.createVNode(tn,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[F.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[I.recentSearchKey&&((C=l.value)!=null&&C.length)?(r.openBlock(),r.createElementBlock("div",C8,[r.createElementVNode("div",w8,[r.createElementVNode("div",A8,[v8,r.createVNode(St),r.createVNode(G,{label:"Clear history",variant:"plain",size:"md",onClick:N[2]||(N[2]=A=>i())})]),B8]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(A,k)=>(r.openBlock(),r.createElementBlock("div",{key:k,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:B=>u.value=A},[r.createVNode(Q,{size:"lg",name:"history"}),r.createElementVNode("div",V8,r.toDisplayString(A),1)],8,D8))),128))])])):r.createCommentVNode("",!0)],64)):E.value?r.renderSlot(I.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",P8,r.toDisplayString(I.hintPlaceholder),1)]):M.value?r.renderSlot(I.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",E8,r.toDisplayString(I.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",F8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(A,k)=>r.renderSlot(I.$slots,"search-result-item",r.mergeProps({key:k},{result:A}),()=>[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:B=>v(A.label.label)},[r.createVNode(Q,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",M8,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.label.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-lg-400":!B.isMatch,"fm-typo-en-body-lg-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))]),A.sublabel?(r.openBlock(),r.createElementBlock("div",O8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.sublabel.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-md-400":!B.isMatch,"fm-typo-en-body-md-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))])):r.createCommentVNode("",!0)])],8,N8)])),128)),r.createElementVNode("div",I8,[p.value&&(((D=f.value)==null?void 0:D.length)??0)>5?(r.openBlock(),r.createBlock(G,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:N[3]||(N[3]=A=>p.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),z8=["disabled","inputMode","placeholder","readOnly","value"],L8={key:0},H8=["disabled"],U8=["disabled"],j8=Z(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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,blur:a,focus:l}=xn(),d=r.ref(null);let c;const u=w=>{if(w!==""){const x=+w.replace(/,/g,"");return isNaN(x)?null:x}return null},f=w=>c.format(w),p=w=>{if(typeof i.value!="number"){i.value=+i.value;return}if(w>0&&y.value||w<0&&S.value)return;let x=v(i.value)?i.value+w:0;x=m(x),i.value=x},m=w=>e.max!==void 0&&w>e.max?e.max:e.min!==void 0&&w<e.min?e.min:w,h=()=>{var w;i.value=u(((w=d.value)==null?void 0:w.value)??"")},g=w=>{if(![...Array(10).keys()].map(x=>x.toString()).includes(w.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(w.key)){w.preventDefault();return}},b=r.computed(()=>i.value!=null?f(i.value):""),y=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>=e.max),e.min!==void 0&&(w=i.value<e.min),w}),S=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>e.max),e.min!==void 0&&(w=i.value<=e.min),w});r.onBeforeMount(()=>{c=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function v(w){return typeof w=="number"&&isFinite(w)}return(w,x)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":x[8]||(x[8]=F=>r.isRef(i)?i.value=F:null),disabled:o.value,focused:r.unref(s),"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},{label:r.withCtx(()=>[r.renderSlot(w.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:F})=>[r.createVNode(de,{"append-icon":w.appendIcon,focused:r.unref(s),invalid:F,"prepend-icon":w.prependIcon,"show-valid-border":w.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":w.showSteppers},"flex items-center justify-center"])},[w.appendText?(r.openBlock(),r.createElementBlock("div",L8,r.toDisplayString(w.appendText),1)):r.createCommentVNode("",!0),w.appendIcon?(r.openBlock(),r.createBlock(Q,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:w.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),w.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(s)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||y.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:x[2]||(x[2]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[3]||(x[3]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[4]||(x[4]=()=>p(w.step))},[r.createVNode(Q,{color:o.value||y.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,H8),r.createElementVNode("button",{disabled:o.value||S.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:x[5]||(x[5]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[6]||(x[6]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[7]||(x[7]=()=>p(-w.step))},[r.createVNode(Q,{color:o.value||S.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,U8)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:d,disabled:o.value,inputMode:w.inputmode,placeholder:w.placeholder,readOnly:w.readonly,value:b.value,class:"fm-stepper-field--input",type:"text",onBlur:x[0]||(x[0]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[1]||(x[1]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onInput:h,onKeydown:g},null,40,z8)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-a5abfe4a"]]),Q8=["disabled","maxlength","minlength","placeholder","readOnly","value"],W8=Z(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},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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,focus:a,blur:l}=xn(),d=c=>{i.value=c.target.value};return(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[2]||(u[2]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:r.unref(s),"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules},r.createSlots({label:r.withCtx(()=>[r.renderSlot(c.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:f})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(s),"fm-textarea__container--invalid":!!r.unref(i)&&f,"fm-textarea__container--valid":c.showValidBorder&&c.showSuccess&&!!r.unref(i)&&!f,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{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}),disabled:o.value,maxlength:c.maxLength,minlength:c.minLength,placeholder:c.placeholder,readOnly:c.readonly,value:r.unref(i),onBlur:u[0]||(u[0]=(...p)=>r.unref(l)&&r.unref(l)(...p)),onFocus:u[1]||(u[1]=(...p)=>r.unref(a)&&r.unref(a)(...p)),onInput:d},null,42,Q8)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text",{},void 0,!0)]),_:2},[c.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(c.maxLength?`${r.unref(i).length} / ${c.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-bcae4c20"]]),Y8={class:"flex flex-col fm-time-input items-center"},X8=["value"],zc=Z(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function s(u){i.value&&(i.value.value=u)}r.watch(()=>n.modelValue,s);function a(){if(!i.value)return;const u=l(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function l(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)+1)}function c(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)-1)}return(u,f)=>(r.openBlock(),r.createElementBlock("div",Y8,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[r.createVNode(Q,{name:"expand_less",size:"lg"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:a},null,40,X8),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[r.createVNode(Q,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-7e58409e"]]);var et=(t=>(t.AM="AM",t.PM="PM",t))(et||{});function tt(t){return t.toString().padStart(2,"0")}function G8(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),s=o>11?"PM":"AM";let a=o;return a===0?a=12:a>12&&(a-=12),`${tt(a)}:${tt(i)}:${s}`}function Ee(t){const[e,n,o]=G8(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function ss({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${tt(o)}:${tt(e)}`}const q8={class:"flex fm-time-input gap-16 items-center"},J8=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800"},":",-1),K8={class:"fm-time-input-periods"},Z8=["onClick"],cr=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(s){const a={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},l=n.modelValue.hours;(l===12&&a.hours===11||l===11&&a.hours===12)&&(a.period=n.modelValue.period===et.AM?et.PM:et.AM),a.hours>12?a.hours=1:a.hours<1&&(a.hours=12),a.minutes>59?a.minutes=0:a.minutes<0&&(a.minutes=59),o("update:model-value",a)}return(s,a)=>(r.openBlock(),r.createElementBlock("div",q8,[r.createVNode(zc,{"model-value":r.unref(tt)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":a[0]||(a[0]=l=>i({hours:l}))},null,8,["model-value"]),J8,r.createVNode(zc,{"model-value":r.unref(tt)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":a[1]||(a[1]=l=>i({minutes:l}))},null,8,["model-value"]),r.createElementVNode("div",K8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(et),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,Z8))),128))])]))}}),$8={class:"flex gap-8"},_8={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},ex=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),tx={class:"flex items-center justify-center py-16 w-full"},nx={class:"flex justify-end"},ox=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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.computed(()=>{if(!i.value)return null;const{hours:c,minutes:u,period:f}=Ee(i.value);return`${tt(c)}:${tt(u)} ${f}`});function l(){if(!s.value){i.value=null;return}const c=ss(s.value);i.value=c,d.value=!1}r.onMounted(()=>{i.value&&(s.value=Ee(i.value))}),r.watch(()=>i.value,c=>{c&&(s.value=Ee(c))});const d=r.ref(!1);return r.watchEffect(()=>{o.value||(d.value?s.value=Ee(i.value??"00:00"):s.value=i.value?Ee(i.value):null)}),(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[3]||(u[3]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:d.value,"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules,"disable-auto-focus":"",tag:"div"},{label:r.withCtx(()=>[r.renderSlot(c.$slots,"label")]),default:r.withCtx(({invalid:f})=>[r.createVNode(mt,{disabled:o.value,"show-popover":d.value,"z-index":c.zIndex,onPopoverChanged:u[2]||(u[2]=p=>d.value=p)},{"popover-button":r.withCtx(()=>[c.$slots["trigger-button"]?r.renderSlot(c.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:f,dropdownShowed:d.value,showValidBorder:c.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:f,"show-valid-border":c.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",$8,[r.createVNode(Q,{outline:!d.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!a.value},"grow"])},r.toDisplayString(a.value??c.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",_8,[ex,r.createElementVNode("div",tx,[r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":u[0]||(u[0]=p=>s.value=p)},null,8,["model-value"])]),r.createElementVNode("div",nx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u[1]||(u[1]=p=>d.value=!1)}),r.createVNode(G,{label:"Apply",size:"md",variant:"primary",onClick:l})])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),rx={class:"flex gap-8"},ix={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},sx=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),ax={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},lx=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Starting Time ",-1),dx=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Ending Time ",-1),cx={class:"flex gap-8 items-center justify-end"},ux=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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.ref(null),l=r.computed(()=>{const g=Array.isArray(i.value);return!i.value||!g||g&&i.value.every(b=>!m(b))?null:i.value.map(b=>{const{hours:y,minutes:S,period:v}=Ee(b);return`${tt(y)}:${tt(S)} ${v}`}).join(" - ")});function d(){if(console.log(s.value,a.value),!s.value||!a.value){i.value=null;return}let g=!1;const b=s.value,y=a.value;console.log(e.disableTimeCheck),!e.disableTimeCheck&&(b.period===et.PM&&y.period===et.AM||b.period===y.period&&(b.hours>y.hours||b.hours===y.hours&&b.minutes>y.minutes))&&(g=!0);const S=ss(s.value),v=ss(a.value);i.value=g?[v,S]:[S,v],u()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(g=>!!g)&&(s.value=Ee(i.value[0]),a.value=Ee(i.value[1]))}),r.watch(()=>i.value,g=>{const b=Array.isArray(g);g&&b&&g.every(y=>m(y))&&(s.value=Ee(g[0]),a.value=Ee(g[1]))});const c=r.ref();function u(){var g;(g=c.value)==null||g.hide()}const f=r.ref(!1);function p(g){var b,y,S,v;g?(s.value=Ee(((S=i.value)==null?void 0:S[0])??"00:00"),a.value=Ee(((v=i.value)==null?void 0:v[1])??"23:59")):(s.value=(b=i.value)!=null&&b[0]?Ee(i.value[0]):null,a.value=(y=i.value)!=null&&y[1]?Ee(i.value[1]):null),f.value=g}const m=g=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(g),h=r.computed(()=>e.disableTimeCheck?!1:Ce(s.value,a.value));return(g,b)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[2]||(b[2]=y=>r.isRef(i)?i.value=y:null),disabled:o.value,focused:f.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label")]),default:r.withCtx(({invalid:y})=>[r.createVNode(mt,{ref_key:"dropdownRef",ref:c,"show-popover":f.value,width:343,"z-index":e.zIndex,onPopoverChanged:p},{"popover-button":r.withCtx(()=>[g.$slots["trigger-button"]?r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:y,dropdownShowed:f.value,showValidBorder:g.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:f.value,invalid:y,"show-valid-border":g.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",rx,[r.createVNode(Q,{outline:!f.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??g.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",ix,[sx,r.createElementVNode("div",ax,[r.createElementVNode("div",null,[lx,r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[0]||(b[0]=S=>s.value=S)},null,8,["model-value"])]),r.createElementVNode("div",null,[dx,r.createVNode(cr,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[1]||(b[1]=S=>a.value=S)},null,8,["model-value"])])]),r.createElementVNode("div",cx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(G,{disabled:h.value,label:"Apply",size:"md",variant:"primary",onClick:d},null,8,["disabled"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),as=Z(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),ls=Z(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;return(n,o)=>{const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=r.withModifiers(()=>{},["prevent"]))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},void 0,!0),r.renderSlot(n.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(n.label),3),n.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(n.sublabel),3)):r.createCommentVNode("",!0)])],!0),n.$slots.append?(r.openBlock(),r.createBlock(St,{key:0})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-884f99a5"]]);function fx(t){for(;t;){if(px(t))return t;t=t.parentElement}return document.scrollingElement}function px(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 mx{constructor(e,n){H(this,"onScroll");H(this,"scrollParent");this.onScroll=n,this.scrollParent=fx(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const hx={class:"fm-menu__wrapper"},gx=Z(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),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n()],placement:o.placement,whileElementsMounted:$n});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=m=>{m.preventDefault(),m.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=m=>{if(!i.value)return;const h=m.path||m.composedPath();for(const g of h)if(g==s.value||g==a.value)return;i.value=!1,c("dropdown-changed",i.value)},p=()=>{c("dropdown-changed",!1)};return r.watch(()=>o.showMenu,m=>i.value=m),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new mx(s.value,p),d.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(m,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[r.renderSlot(m.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:a,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(m.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",hx,[r.renderSlot(m.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),bx={class:"fm-typo-en-body-lg-600 mx-8 p-8 text-fm-color-typo-primary"},yx=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",bx,r.toDisplayString(e.label),1))}}),kx=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),xx={class:"relative"},Sx={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},Cx=kx(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),wx=Z(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(kn(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",xx,[r.createElementVNode("div",Sx,[Cx,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"]]),Ax={class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},vx={key:0},Bx={class:"h-full overflow-y-auto"},Dx={class:"pt-24"},Vx=Z(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:()=>({})}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$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(n)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[2]||(i[2]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.isContainer),r.mergeProps({class:[!o.maxWidth&&"max-w-[400px]","fm-side-sheet xs:w-full"],style:{maxWidth:`${o.maxWidth}px`}},o.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",Ax,[r.renderSlot(o.$slots,"side-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",vx,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0),o.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:i[1]||(i[1]=s=>n.value=!1)})):r.createCommentVNode("",!0)]),r.createElementVNode("div",Bx,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Dx,[r.renderSlot(o.$slots,"side-sheet-footer",{},void 0,!0)])]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-25ca39ba"]]),Px={class:"flex"},Ex={key:0,class:"mt-8"},Lc=Z(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}},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}`)}}),s=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),a=r.computed(()=>n.bgColor?kn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?kn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(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"},a.value),[r.createElementVNode("div",Px,[i.value.icon?(r.openBlock(),r.createBlock(Q,{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(`${s.value.classes} grow ellipsis`)},r.toDisplayString(s.value.text),3),n.dismissable?(r.openBlock(),r.createBlock(Q,{key:1,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:c[0]||(c[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",Ex,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(d.$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:c[1]||(c[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-5fe933ca"]]),Fx={class:"fm-step-description fm-typo-en-body-sm-400 line-clamp-1 mt-4"},ds=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(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-en-title-sm-800":"fm-typo-en-body-md-400"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",Fx,r.toDisplayString(t.description),1)])],2))}}),Nx=["data-title","data-description","data-disabled"],Mx={class:"flex fm-step-container gap-12 grow"},Ox=Z(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(Ws);function i(){s.value||o(e.value)}const s=r.computed(()=>e.disabled?e.disabled():!1),a=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),d=r.computed(()=>e.complete()),c=r.computed(()=>l.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:a.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,p)=>{const m=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:r.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),r.createElementVNode("div",Mx,[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]",u.value.className])},[u.value.config?(r.openBlock(),r.createBlock(Q,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(ds,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,Nx)),[[m,!s.value]])}}}),[["__scopeId","data-v-ee172cad"]]),Ix={class:"hidden items-center xs:flex"},Rx={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},Tx=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=u=>{o("update:model-value",u)};r.provide(Ws,{currentStep:()=>n.modelValue,goToStep:i});const s=r.ref(),a=r.ref([]),l=r.computed(()=>a.value[n.modelValue-1]),d=r.computed(()=>`${n.modelValue} of ${a.value.length}`),c=()=>{var f;const u=Array.from(((f=s.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);a.value=u.map(p=>({title:p.dataset.title??"",description:p.dataset.description,disabled:p.dataset.disabled=="true"}))};return r.onMounted(()=>{c()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(u.$slots,"default")],2),r.createElementVNode("div",Ix,[r.createVNode(tn,{"current-step":t.modelValue,"total-steps":a.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(ds,{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)]),u.$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(u.$slots,"contents"),r.createElementVNode("div",Rx,[r.renderSlot(u.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let zx=0;function Lx(){return zx++}const Hx=t=>(r.pushScopeId("data-v-93cbd978"),t=t(),r.popScopeId(),t),Ux=["disabled"],jx=[Hx(()=>r.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],Hc=Z(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:()=>Lx()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,s=r.ref(!1);function a(f){n.value=f}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(s.value=f)},c=r.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,p)=>(r.openBlock(),r.createBlock(_e,{"show-menu":s.value,disabled:f.children.length===0,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:p[0]||(p[0]=()=>a(!0)),onMouseup:p[1]||(p[1]=()=>a(!1)),onMouseleave:p[2]||(p[2]=()=>a(!1)),onClick:l},[r.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(r.openBlock(),r.createBlock(Q,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-en-body-lg-600 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(["fm-typo-en-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.badge?(r.openBlock(),r.createBlock(Tt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),f.children.length>0?(r.openBlock(),r.createBlock(Q,{key:4,size:"md",name:s.value?"expand_less":"expand_more"},null,8,["name"])):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(r.openBlock(),r.createElementBlock("div",{key:5,class:r.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},jx,2)):r.createCommentVNode("",!0)],42,Ux)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,m=>(r.openBlock(),r.createBlock(xe,{key:m.value,"model-value":o.modelValue===m.value,label:m.label,icon:m.icon,disabled:m.disabled,onClick:h=>u(m.value)},{append:r.withCtx(()=>[m.badge?(r.openBlock(),r.createBlock(Tt,{key:0,value:m.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-93cbd978"]]),Qx={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},Wx={class:"flex flex-1 gap-8"},Yx=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}=xt(),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 d=l.concat(e.actions);if(n.value.xs){const[h,g,b,...y]=d;return y.length===0?{actionButtons:[h,g,b].filter(S=>S),collapse:y}:{actionButtons:[h,g].filter(S=>S),collapse:[b,...y]}}const[c,u,f,p,...m]=d;return m.length===0?{actionButtons:[c,u,f,p].filter(h=>h),collapse:m}:{actionButtons:[c,u,f].filter(h=>h),collapse:[p,...m]}}),i=r.ref(!1);function s(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const a=J(e,"searchModel");return(l,d)=>(r.openBlock(),r.createElementBlock("div",Qx,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(Ir,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:d[0]||(d[0]=c=>l.$emit("click:remove-chip",c))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Wx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.key},[c.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(os,{"model-value":r.unref(a),"onUpdate:modelValue":d[1]||(d[1]=u=>r.isRef(a)?a.value=u:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${c.key}`,{key:1},()=>[r.createVNode(G,{"prepend-icon":c.icon,variant:"tertiary",onClick:u=>l.$emit(`click:action-${c.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(_e,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(G,{"prepend-icon":"more_vert",variant:"tertiary",onClick:s})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(xe,{key:c.key,label:c.label,icon:c.icon,onClick:u=>{l.$emit(`click:action-${c.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(Er,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=c=>i.value=c),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(as,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(ls,{key:c.key,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{l.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var Xx={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1ba11c89-4614-499d-82a9-6fa572b332a5",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",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_config_user_agent:"pnpm/8.15.8 npm/? node/v16.20.2 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_1ba11c89-4614-499d-82a9-6fa572b332a5",PIPX_HOME:"/opt/pipx",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/16.20.2/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-8.8",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.3.11579264",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",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-ubuntu22",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_scripts_copy_tailwind_plugin:"cp ./tailwind-plugin.js ./dist/tailwind-plugin.js && cp ./tailwind-styling.js ./dist/tailwind-styling.js",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"471",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",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",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",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.11/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240624.1.0",npm_package_scripts_dev:"vite --port 5273",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.4/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",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18086",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",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",STATS_D:"false",GITHUB_RUN_ID:"9740914706",STATS_VMFE:"true",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b38e86b5a0202f3ff0f9465dd9c2b897f93f3f17",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",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/release/vue",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/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@8.15.8/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@8.15.8/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@8.15.8/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@8.15.8/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/16.20.2/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_c680ccda-edf3-4962-be00-3fa827fb9205",INVOCATION_ID:"6bc6613b32114326b38573c325b99cb2",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"79",GITHUB_TRIGGERING_ACTOR:"sp0033212000",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",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 32",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"release/vue",GITHUB_REPOSITORY:"feedmepos/ui-library",STATS_D_D:"false",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_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",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",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/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.1.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.1.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"1.2.9-rc.4",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",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",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"b38e86b5a0202f3ff0f9465dd9c2b897f93f3f17",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/release/vue",GITHUB_ACTOR:"sp0033212000",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",LEIN_HOME:"/usr/local/lib/lein",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1ba11c89-4614-499d-82a9-6fa572b332a5",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"56681081",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",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",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1ba11c89-4614-499d-82a9-6fa572b332a5",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",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/25.2.9519653",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",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data",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/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1ba11c89-4614-499d-82a9-6fa572b332a5",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_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function Mt(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:Mt(n,o[t])}))}}function ur(t){return t instanceof Function}function Gx(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function qx(t,e){const n=[],o=i=>{i.forEach(s=>{n.push(s);const a=e(s);a!=null&&a.length&&o(a)})};return o(t),n}function Y(t,e,n){let o=[],i;return s=>{let a;n.key&&n.debug&&(a=Date.now());const l=t(s);if(!(l.length!==o.length||l.some((u,f)=>o[f]!==u)))return i;o=l;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,m=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c⏱ ${m(f,5)} /${m(u,5)} ms`,`
78
+ `;Mc(qk),ns.render=Gk,ns.__scopeId="data-v-60be6971";var Jk=(()=>{const t=ns;return t.install=e=>{e.component("CountryFlag",t)},t})();const Kk=Jk,Zk={class:"flex items-center justify-center w-[20px] overflow-hidden"},Oc=Z(r.defineComponent({__name:"FmCountryFlag",props:{countryCode:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Zk,[r.createVNode(r.unref(Kk),{country:e.countryCode,class:"fm-country-flag flex-shrink-0"},null,8,["country"])]))}}),[["__scopeId","data-v-66513277"]]),$k={class:"flex gap-4"},_k=r.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},extraCountryCodes:{default:()=>[]},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.inject(re,null),i=e,s=J(n,"modelValue"),a=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),l=r.ref(["MY","SG","ID",...n.extraCountryCodes]),d=l.value.reduce((y,S)=>(y[S]=`+${Wk(S)}`,y),{}),c=l.value.map(y=>({label:"",value:y}));function u(y){var S;return y?((S=Object.entries(d).find(([,v])=>y.startsWith(v)))==null?void 0:S[0])??null:n.defaultCountry}const f=r.computed(()=>u(n.modelValue)),p=r.computed(()=>!f.value||!n.modelValue?d[n.defaultCountry]:n.modelValue),m=r.computed({get(){const y=es(p.value);return y?y.formatInternational().replace(d[f.value],"").trim():p.value.replace(d[f.value],"").trim()},set(y){const S=`${d[f.value]}${y}`,v=es(S);if(!v){s.value=S;return}s.value=v.formatInternational()}}),h=r.computed({get(){return f.value??n.defaultCountry},set(y){if(!f.value){i("update:modelValue",d[n.defaultCountry]);return}const v=d[f.value],w=d[y];s.value=p.value.replace(v,w)}}),g=r.ref({dropdown:!1,textField:!1});function b(y){const S=f.value;if(!y.replace(d[S],"").trim().length)return!0;const w=es(s.value,S);return!w||!w.isValid()?"Invalid phone number":!0}return(y,S)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(s),"onUpdate:modelValue":S[4]||(S[4]=v=>r.isRef(s)?s.value=v:null),disabled:a.value,focused:g.value.dropdown||g.value.textField,"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,b],class:"flex gap-4"},r.createSlots({default:r.withCtx(({invalid:v})=>[r.createElementVNode("div",$k,[r.createVNode(mn,{"model-value":h.value,"onUpdate:modelValue":S[0]||(S[0]=w=>h.value=w),disabled:a.value,items:r.unref(c),onDropdownChanged:S[1]||(S[1]=w=>g.value.dropdown=w)},{default:r.withCtx(()=>[r.createVNode(Oc,{"country-code":h.value},null,8,["country-code"])]),"menu-wrapper":r.withCtx(({handleItemChange:w})=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,x=>(r.openBlock(),r.createBlock(xe,{key:x,"model-value":h.value===x,"onUpdate:modelValue":F=>w(F,r.unref(c).find(E=>E.value===x))},{label:r.withCtx(()=>[r.createVNode(Oc,{"country-code":x},null,8,["country-code"])]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:1},8,["model-value","disabled","items"]),r.createVNode(ts,{"model-value":m.value,"onUpdate:modelValue":S[2]||(S[2]=w=>m.value=w),disabled:a.value,invalid:v,class:"flex-1",inputmode:"tel",onFocusChanged:S[3]||(S[3]=w=>g.value.textField=w)},{prepend:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass([a.value?"text-fm-color-typo-disabled":""])},"("+r.toDisplayString(r.unref(d)[f.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),e8={class:"flex gap-8 items-center"},t8=["onInput","onKeydown"],n8=Z(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"},isError:{type:Boolean}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=J(o,"modelValue"),s=r.ref([]),a=(f,p)=>{const m=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(m.value)){m.value="";return}m.value=m.value.slice(-1),c(m.value,p),s.value[p+1]?s.value[p+1].focus():s.value[p].blur()},l=(f,p)=>{f.preventDefault();const m=f.target;m.value="",c(null,p),s.value[p-1]?s.value[p-1].focus():s.value[p].focus()},d=(f,p)=>{f.preventDefault(),f.key==="ArrowLeft"&&(s.value[p-1]?s.value[p-1].focus():s.value[p].focus()),f.key==="ArrowRight"&&(s.value[p+1]?s.value[p+1].focus():s.value[p].focus())},c=(f,p)=>{i.value=i.value.toSpliced(p,1,f)},u=(f,p)=>{s.value[p]=f};return r.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),r.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,p)=>(r.openBlock(),r.createElementBlock("div",e8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.length,(m,h)=>(r.openBlock(),r.createElementBlock("input",{key:m,ref_for:!0,ref:g=>u(g,h),class:r.normalizeClass(["fm-pin-field",{[f.isError?"fm-pin-field--error":"fm-pin-field--populated"]:r.unref(i)[h]!==null}]),type:"text",onInput:g=>a(g,h),onKeydown:[r.withKeys(g=>l(g,h),["backspace"]),r.withKeys(g=>d(g,h),["arrow-left","arrow-right"])]},null,42,t8))),128))]))}}),[["__scopeId","data-v-69d9a64d"]]),o8={class:"fm-radio-btn"},r8={class:"fm-radio-btn__input--container"},i8=["checked","disabled","value"],s8={class:"py-8"},a8={class:"fm-typo-en-body-lg-400"},l8={key:0,class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"},d8=Z(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=J(e,"modelValue"),o=r.ref(),i=r.inject(Qs,null),s=r.inject(re,null),a=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(s==null?void 0:s.getDisabled())??!1),d=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(c,u)=>{const f=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",o8,[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}),onClick:a},[r.withDirectives((r.openBlock(),r.createElementBlock("div",r8,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:d.value,disabled:l.value,value:c.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,i8)])),[[f,!l.value]]),r.createElementVNode("div",s8,[r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",a8,r.toDisplayString(c.label),1),c.sublabel?(r.openBlock(),r.createElementBlock("div",l8,r.toDisplayString(c.sublabel),1)):r.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-2eaf3939"]]),c8=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=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue"),o=r.inject(re,null);r.provide(Qs,{groupValue:n,getDisabled:()=>i.value,updateValue(s){n.value=s}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(s,a)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(n),"onUpdate:modelValue":a[0]||(a[0]=l=>r.isRef(n)?n.value=l:null),disabled:i.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},{label:r.withCtx(()=>[r.renderSlot(s.$slots,"label")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":s.inline})},[r.renderSlot(s.$slots,"default")],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(s.$slots,"helper-text")]),_:3},8,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),os=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},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(re,null),o=r.computed(()=>{const{modelValue:p,disabled:m,...h}=e;return h}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),s=J(e,"modelValue"),a=r.ref(!1),l=r.ref(),d=r.ref(e.collapsible),c=r.ref(e.collapsible);function u(){d.value=!1,r.nextTick(()=>{var p,m,h,g;(g=(h=(m=(p=l.value)==null?void 0:p.querySelector)==null?void 0:m.call(p,"input"))==null?void 0:h.focus)==null||g.call(h)})}function f(p){if(a.value=p,!!e.collapsible){if(p){c.value=!1;return}d.value=s.value.length===0,d.value&&setTimeout(()=>{c.value=!0},250)}}return(p,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:l,class:"flex items-center justify-end min-w-48 relative"},[r.createVNode(ts,r.mergeProps({modelValue:r.unref(s),"onUpdate:modelValue":m[1]||(m[1]=h=>r.isRef(s)?s.value=h:null),class:["transition-all",{"opacity-100":!p.collapsible||!d.value,"opacity-0 pointer-events-none":p.collapsible&&d.value}],disabled:i.value||p.collapsible&&d.value,style:{width:p.collapsible&&d.value?"24px":"100%"}},o.value,{onFocusChanged:f}),r.createSlots({_:2},[a.value?void 0:{name:"prepend",fn:r.withCtx(()=>[r.createVNode(Q,{name:"search"})]),key:"0"},r.unref(s).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(Q,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:m[0]||(m[0]=h=>s.value="")})]),key:"1"}:void 0]),1040,["modelValue","class","disabled","style"]),p.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-0 right-0",d.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:d.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(G,{icon:"search",variant:"tertiary",onClick:u})],6)):r.createCommentVNode("",!0)],512))}}),u8={key:0,class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},f8={key:0},p8={class:"overflow-y-auto"},m8={key:1,class:"flex gap-8 items-center"},Ic=Z(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}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>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(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[1]||(i[1]=s=>n.value=!1)},{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}`])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",u8,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",f8,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",p8,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",m8,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-2e7518aa"]]);var rs={exports:{}};function Rc(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,s,a,l,d;function c(){const f=Date.now()-l;if(f<e&&f>=0)a=setTimeout(c,e-f);else if(a=void 0,!o){const p=i,m=s;i=void 0,s=void 0,d=t.apply(p,m)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,s=f,l=Date.now();const p=o&&!a;if(a||(a=setTimeout(c,e)),p){const m=i,h=s;i=void 0,s=void 0,d=t.apply(m,h)}return d};return u.clear=()=>{a&&(clearTimeout(a),a=void 0)},u.flush=()=>{if(!a)return;const f=i,p=s;i=void 0,s=void 0,d=t.apply(f,p),clearTimeout(a),a=void 0},u}rs.exports.debounce=Rc,rs.exports=Rc;var h8=rs.exports;const is=Rr(h8);var Tc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(s){return n.test(o,s)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,s){s=s||{};var a=0,l=[],d=i.length,c=0,u=0,f=s.pre||"",p=s.post||"",m=s.caseSensitive&&i||i.toLowerCase(),h;o=s.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)h=i[g],m[g]===o[a]?(h=f+h+p,a+=1,u+=1+u):u=0,c+=u,l[l.length]=h;return a===o.length?(c=m===o?1/0:c,{rendered:l.join(""),score:c}):null},n.filter=function(o,i,s){return!i||i.length===0?[]:typeof o!="string"?i:(s=s||{},i.reduce(function(a,l,d,c){var u=l;s.extract&&(u=s.extract(l));var f=n.match(o,u,s);return f!=null&&(a[a.length]={string:f.rendered,score:f.score,index:d,original:l}),a},[]).sort(function(a,l){var d=l.score-a.score;return d||a.index-l.index}))}})()})(Tc);var g8=Tc.exports;const b8=Rr(g8);function dr(t,e){const[n]=b8.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,s,a)=>(i.push({segment:s,isMatch:a%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const y8={class:"flex flex-col gap-4"},k8={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},x8={class:"hidden sm:inline xs:inline"},S8={key:0},C8={key:0,class:"flex flex-col"},w8={class:"flex flex-col"},A8={class:"flex items-center px-24 py-12"},v8=r.createElementVNode("div",{class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),B8=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),D8=["onClick"],V8={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},P8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},E8={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},F8={key:3,class:"flex flex-col"},N8=["onClick"],M8={class:"flex flex-col gap-4"},O8={key:0,class:"text-fm-color-typo-secondary"},I8={class:"px-16 py-4"},R8=5,T8=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 I=n.recentSearchKey;localStorage.removeItem(I),l.value=[]}function s(){if(!n.recentSearchKey)return;const I=n.recentSearchKey,N=localStorage.getItem(I);if(!N)return[];try{return JSON.parse(N)}catch{return new Array}}const a=is(function(N){if(!n.recentSearchKey)return;const C=n.recentSearchKey,D=N().trim();if(!C||!D)return;const A=s()??[],k=[...new Set([D,...A])].slice(0,R8),B=JSON.stringify(k);return localStorage.setItem(C,B),l.value=k,k},800),l=r.ref(s()),d=J(n,"show");r.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&S()):o("dismiss")});const c=J(n,"modelValue"),u=r.ref(n.modelValue);r.watch([()=>u.value],()=>{w()});const f=r.ref(null),p=r.ref(!0),m=r.computed(()=>{var I;return p.value?(I=f.value)==null?void 0:I.slice(0,5):f.value});r.watch([()=>f.value],([])=>{p.value=!0});const h=r.computed(()=>f.value===null),g=r.ref(!1),b=r.ref(""),y=()=>u.value;async function S(){if(!d.value)return;const I=y();if(!I)return;const N=Math.random().toString();if(b.value=N,n.suggestions){f.value=n.suggestions.map(C=>({label:dr(I,C.label),sublabel:C.sublabel?dr(I,C.sublabel):null})).filter(C=>{var D;return C.label.matched||((D=C.sublabel)==null?void 0:D.matched)}),a(y);return}if(n.onSearch)try{g.value=!0;const C=await n.onSearch(I);N===b.value&&(f.value=C.map(D=>({label:dr(I,D.label),sublabel:D.sublabel?dr(I,D.sublabel):null})))}catch{N===b.value&&(f.value=[])}finally{N===b.value&&(g.value=!1,a(y))}}function v(I){d.value=!1,o("dismiss"),c.value=I}const w=is(S),x=r.computed(()=>l.value&&l.value.length===0),F=r.computed(()=>(!u.value||h.value)&&!x.value),E=r.computed(()=>(!u.value||h.value)&&x.value),M=r.computed(()=>u.value&&f.value&&f.value.length===0);return(I,N)=>(r.openBlock(),r.createBlock(Ic,{"model-value":r.unref(d),"onUpdate:modelValue":N[4]||(N[4]=C=>r.isRef(d)?d.value=C:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var C,D;return[r.createElementVNode("div",y8,[r.createElementVNode("div",k8,[r.createElementVNode("div",x8,[r.createVNode(G,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:N[0]||(N[0]=A=>d.value=!1)})]),r.createVNode(os,{"model-value":u.value,"onUpdate:modelValue":N[1]||(N[1]=A=>u.value=A),class:"flex-1",placeholder:I.placeholder},null,8,["model-value","placeholder"])]),g.value?(r.openBlock(),r.createElementBlock("div",S8,[r.createVNode(tn,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[F.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[I.recentSearchKey&&((C=l.value)!=null&&C.length)?(r.openBlock(),r.createElementBlock("div",C8,[r.createElementVNode("div",w8,[r.createElementVNode("div",A8,[v8,r.createVNode(Ct),r.createVNode(G,{label:"Clear history",variant:"plain",size:"md",onClick:N[2]||(N[2]=A=>i())})]),B8]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(A,k)=>(r.openBlock(),r.createElementBlock("div",{key:k,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:B=>u.value=A},[r.createVNode(Q,{size:"lg",name:"history"}),r.createElementVNode("div",V8,r.toDisplayString(A),1)],8,D8))),128))])])):r.createCommentVNode("",!0)],64)):E.value?r.renderSlot(I.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",P8,r.toDisplayString(I.hintPlaceholder),1)]):M.value?r.renderSlot(I.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",E8,r.toDisplayString(I.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",F8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(A,k)=>r.renderSlot(I.$slots,"search-result-item",r.mergeProps({key:k},{result:A}),()=>[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:B=>v(A.label.label)},[r.createVNode(Q,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",M8,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.label.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-lg-400":!B.isMatch,"fm-typo-en-body-lg-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))]),A.sublabel?(r.openBlock(),r.createElementBlock("div",O8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.sublabel.segments,(B,V)=>(r.openBlock(),r.createElementBlock("span",{key:V,class:r.normalizeClass({"fm-typo-en-body-md-400":!B.isMatch,"fm-typo-en-body-md-600":B.isMatch})},r.toDisplayString(B.segment),3))),128))])):r.createCommentVNode("",!0)])],8,N8)])),128)),r.createElementVNode("div",I8,[p.value&&(((D=f.value)==null?void 0:D.length)??0)>5?(r.openBlock(),r.createBlock(G,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:N[3]||(N[3]=A=>p.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),z8=["disabled","inputMode","placeholder","readOnly","value"],L8={key:0},H8=["disabled"],U8=["disabled"],j8=Z(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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,blur:a,focus:l}=xn(),d=r.ref(null);let c;const u=w=>{if(w!==""){const x=+w.replace(/,/g,"");return isNaN(x)?null:x}return null},f=w=>c.format(w),p=w=>{if(typeof i.value!="number"){i.value=+i.value;return}if(w>0&&y.value||w<0&&S.value)return;let x=v(i.value)?i.value+w:0;x=m(x),i.value=x},m=w=>e.max!==void 0&&w>e.max?e.max:e.min!==void 0&&w<e.min?e.min:w,h=()=>{var w;i.value=u(((w=d.value)==null?void 0:w.value)??"")},g=w=>{if(![...Array(10).keys()].map(x=>x.toString()).includes(w.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(w.key)){w.preventDefault();return}},b=r.computed(()=>i.value!=null?f(i.value):""),y=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>=e.max),e.min!==void 0&&(w=i.value<e.min),w}),S=r.computed(()=>{let w=!1;return e.max!==void 0&&(w=i.value>e.max),e.min!==void 0&&(w=i.value<=e.min),w});r.onBeforeMount(()=>{c=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function v(w){return typeof w=="number"&&isFinite(w)}return(w,x)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":x[8]||(x[8]=F=>r.isRef(i)?i.value=F:null),disabled:o.value,focused:r.unref(s),"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},{label:r.withCtx(()=>[r.renderSlot(w.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:F})=>[r.createVNode(de,{"append-icon":w.appendIcon,focused:r.unref(s),invalid:F,"prepend-icon":w.prependIcon,"show-valid-border":w.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":w.showSteppers},"flex items-center justify-center"])},[w.appendText?(r.openBlock(),r.createElementBlock("div",L8,r.toDisplayString(w.appendText),1)):r.createCommentVNode("",!0),w.appendIcon?(r.openBlock(),r.createBlock(Q,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:w.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),w.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(s)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{disabled:o.value||y.value,class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:x[2]||(x[2]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[3]||(x[3]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[4]||(x[4]=()=>p(w.step))},[r.createVNode(Q,{color:o.value||y.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],40,H8),r.createElementVNode("button",{disabled:o.value||S.value,class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:x[5]||(x[5]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[6]||(x[6]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onMousedown:x[7]||(x[7]=()=>p(-w.step))},[r.createVNode(Q,{color:o.value||S.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],40,U8)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:d,disabled:o.value,inputMode:w.inputmode,placeholder:w.placeholder,readOnly:w.readonly,value:b.value,class:"fm-stepper-field--input",type:"text",onBlur:x[0]||(x[0]=(...E)=>r.unref(a)&&r.unref(a)(...E)),onFocus:x[1]||(x[1]=(...E)=>r.unref(l)&&r.unref(l)(...E)),onInput:h,onKeydown:g},null,40,z8)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-a5abfe4a"]]),Q8=["disabled","maxlength","minlength","placeholder","readOnly","value"],W8=Z(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},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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),{isFocused:s,focus:a,blur:l}=xn(),d=c=>{i.value=c.target.value};return(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[2]||(u[2]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:r.unref(s),"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules},r.createSlots({label:r.withCtx(()=>[r.renderSlot(c.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:f})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(s),"fm-textarea__container--invalid":!!r.unref(i)&&f,"fm-textarea__container--valid":c.showValidBorder&&c.showSuccess&&!!r.unref(i)&&!f,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{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}),disabled:o.value,maxlength:c.maxLength,minlength:c.minLength,placeholder:c.placeholder,readOnly:c.readonly,value:r.unref(i),onBlur:u[0]||(u[0]=(...p)=>r.unref(l)&&r.unref(l)(...p)),onFocus:u[1]||(u[1]=(...p)=>r.unref(a)&&r.unref(a)(...p)),onInput:d},null,42,Q8)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text",{},void 0,!0)]),_:2},[c.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(c.maxLength?`${r.unref(i).length} / ${c.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-bcae4c20"]]),Y8={class:"flex flex-col fm-time-input items-center"},X8=["value"],zc=Z(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function s(u){i.value&&(i.value.value=u)}r.watch(()=>n.modelValue,s);function a(){if(!i.value)return;const u=l(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function l(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)+1)}function c(){var u;(u=i.value)==null||u.focus(),o("update:model-value",l(n.modelValue)-1)}return(u,f)=>(r.openBlock(),r.createElementBlock("div",Y8,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[r.createVNode(Q,{name:"expand_less",size:"lg"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:a},null,40,X8),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[r.createVNode(Q,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-7e58409e"]]);var et=(t=>(t.AM="AM",t.PM="PM",t))(et||{});function tt(t){return t.toString().padStart(2,"0")}function G8(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),s=o>11?"PM":"AM";let a=o;return a===0?a=12:a>12&&(a-=12),`${tt(a)}:${tt(i)}:${s}`}function Ee(t){const[e,n,o]=G8(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function ss({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${tt(o)}:${tt(e)}`}const q8={class:"flex fm-time-input gap-16 items-center"},J8=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800"},":",-1),K8={class:"fm-time-input-periods"},Z8=["onClick"],cr=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(s){const a={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},l=n.modelValue.hours;(l===12&&a.hours===11||l===11&&a.hours===12)&&(a.period=n.modelValue.period===et.AM?et.PM:et.AM),a.hours>12?a.hours=1:a.hours<1&&(a.hours=12),a.minutes>59?a.minutes=0:a.minutes<0&&(a.minutes=59),o("update:model-value",a)}return(s,a)=>(r.openBlock(),r.createElementBlock("div",q8,[r.createVNode(zc,{"model-value":r.unref(tt)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":a[0]||(a[0]=l=>i({hours:l}))},null,8,["model-value"]),J8,r.createVNode(zc,{"model-value":r.unref(tt)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":a[1]||(a[1]=l=>i({minutes:l}))},null,8,["model-value"]),r.createElementVNode("div",K8,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(et),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,Z8))),128))])]))}}),$8={class:"flex gap-8"},_8={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},ex=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),tx={class:"flex items-center justify-center py-16 w-full"},nx={class:"flex justify-end"},ox=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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.computed(()=>{if(!i.value)return null;const{hours:c,minutes:u,period:f}=Ee(i.value);return`${tt(c)}:${tt(u)} ${f}`});function l(){if(!s.value){i.value=null;return}const c=ss(s.value);i.value=c,d.value=!1}r.onMounted(()=>{i.value&&(s.value=Ee(i.value))}),r.watch(()=>i.value,c=>{c&&(s.value=Ee(c))});const d=r.ref(!1);return r.watchEffect(()=>{o.value||(d.value?s.value=Ee(i.value??"00:00"):s.value=i.value?Ee(i.value):null)}),(c,u)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":u[3]||(u[3]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:d.value,"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules,"disable-auto-focus":"",tag:"div"},{label:r.withCtx(()=>[r.renderSlot(c.$slots,"label")]),default:r.withCtx(({invalid:f})=>[r.createVNode(mt,{disabled:o.value,"show-popover":d.value,"z-index":c.zIndex,onPopoverChanged:u[2]||(u[2]=p=>d.value=p)},{"popover-button":r.withCtx(()=>[c.$slots["trigger-button"]?r.renderSlot(c.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:f,dropdownShowed:d.value,showValidBorder:c.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:f,"show-valid-border":c.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",$8,[r.createVNode(Q,{outline:!d.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!a.value},"grow"])},r.toDisplayString(a.value??c.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",_8,[ex,r.createElementVNode("div",tx,[r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":u[0]||(u[0]=p=>s.value=p)},null,8,["model-value"])]),r.createElementVNode("div",nx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u[1]||(u[1]=p=>d.value=!1)}),r.createVNode(G,{label:"Apply",size:"md",variant:"primary",onClick:l})])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),rx={class:"flex gap-8"},ix={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},sx=r.createElementVNode("div",{class:"fm-typo-en-title-sm-800 mb-8"},"Enter time",-1),ax={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},lx=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Starting Time ",-1),dx=r.createElementVNode("div",{class:"fm-typo-en-body-lg-600 text-left w-full"}," Ending Time ",-1),cx={class:"flex gap-8 items-center justify-end"},ux=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(re,null),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=J(e,"modelValue"),s=r.ref(null),a=r.ref(null),l=r.computed(()=>{const g=Array.isArray(i.value);return!i.value||!g||g&&i.value.every(b=>!m(b))?null:i.value.map(b=>{const{hours:y,minutes:S,period:v}=Ee(b);return`${tt(y)}:${tt(S)} ${v}`}).join(" - ")});function d(){if(console.log(s.value,a.value),!s.value||!a.value){i.value=null;return}let g=!1;const b=s.value,y=a.value;console.log(e.disableTimeCheck),!e.disableTimeCheck&&(b.period===et.PM&&y.period===et.AM||b.period===y.period&&(b.hours>y.hours||b.hours===y.hours&&b.minutes>y.minutes))&&(g=!0);const S=ss(s.value),v=ss(a.value);i.value=g?[v,S]:[S,v],u()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(g=>!!g)&&(s.value=Ee(i.value[0]),a.value=Ee(i.value[1]))}),r.watch(()=>i.value,g=>{const b=Array.isArray(g);g&&b&&g.every(y=>m(y))&&(s.value=Ee(g[0]),a.value=Ee(g[1]))});const c=r.ref();function u(){var g;(g=c.value)==null||g.hide()}const f=r.ref(!1);function p(g){var b,y,S,v;g?(s.value=Ee(((S=i.value)==null?void 0:S[0])??"00:00"),a.value=Ee(((v=i.value)==null?void 0:v[1])??"23:59")):(s.value=(b=i.value)!=null&&b[0]?Ee(i.value[0]):null,a.value=(y=i.value)!=null&&y[1]?Ee(i.value[1]):null),f.value=g}const m=g=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(g),h=r.computed(()=>e.disableTimeCheck?!1:Ce(s.value,a.value));return(g,b)=>(r.openBlock(),r.createBlock(Se,{modelValue:r.unref(i),"onUpdate:modelValue":b[2]||(b[2]=y=>r.isRef(i)?i.value=y:null),disabled:o.value,focused:f.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label")]),default:r.withCtx(({invalid:y})=>[r.createVNode(mt,{ref_key:"dropdownRef",ref:c,"show-popover":f.value,width:343,"z-index":e.zIndex,onPopoverChanged:p},{"popover-button":r.withCtx(()=>[g.$slots["trigger-button"]?r.renderSlot(g.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:y,dropdownShowed:f.value,showValidBorder:g.showValidBorder,shouldDisable:o.value}))):(r.openBlock(),r.createBlock(de,{key:1,class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:f.value,invalid:y,"show-valid-border":g.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",rx,[r.createVNode(Q,{outline:!f.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??g.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",ix,[sx,r.createElementVNode("div",ax,[r.createElementVNode("div",null,[lx,r.createVNode(cr,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[0]||(b[0]=S=>s.value=S)},null,8,["model-value"])]),r.createElementVNode("div",null,[dx,r.createVNode(cr,{"model-value":a.value??{hours:0,minutes:0,period:r.unref(et).AM},"onUpdate:modelValue":b[1]||(b[1]=S=>a.value=S)},null,8,["model-value"])])]),r.createElementVNode("div",cx,[r.createVNode(G,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(G,{disabled:h.value,label:"Apply",size:"md",variant:"primary",onClick:d},null,8,["disabled"])])])]),_:2},1032,["show-popover","z-index"])]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),as=Z(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),ls=Z(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;return(n,o)=>{const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=r.withModifiers(()=>{},["prevent"]))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},void 0,!0),r.renderSlot(n.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-en-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(n.label),3),n.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-en-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(n.sublabel),3)):r.createCommentVNode("",!0)])],!0),n.$slots.append?(r.openBlock(),r.createBlock(Ct,{key:0})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-884f99a5"]]);function fx(t){for(;t;){if(px(t))return t;t=t.parentElement}return document.scrollingElement}function px(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 mx{constructor(e,n){H(this,"onScroll");H(this,"scrollParent");this.onScroll=n,this.scrollParent=fx(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const hx={class:"fm-menu__wrapper"},gx=Z(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),s=r.ref(null),a=r.ref(null),{floatingStyles:l}=eo(s,a,{middleware:[Jn(4),_n()],placement:o.placement,whileElementsMounted:$n});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=m=>{m.preventDefault(),m.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=m=>{if(!i.value)return;const h=m.path||m.composedPath();for(const g of h)if(g==s.value||g==a.value)return;i.value=!1,c("dropdown-changed",i.value)},p=()=>{c("dropdown-changed",!1)};return r.watch(()=>o.showMenu,m=>i.value=m),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new mx(s.value,p),d.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(m,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[r.renderSlot(m.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:a,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(l))},[r.renderSlot(m.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",hx,[r.renderSlot(m.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),bx={class:"fm-typo-en-body-lg-600 mx-8 p-8 text-fm-color-typo-primary"},yx=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",bx,r.toDisplayString(e.label),1))}}),kx=t=>(r.pushScopeId("data-v-6d0e6490"),t=t(),r.popScopeId(),t),xx={class:"relative"},Sx={class:"fm-progress-linear fm-typo-en-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},Cx=kx(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),wx=Z(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(kn(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",xx,[r.createElementVNode("div",Sx,[Cx,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"]]),Ax={class:"flex fm-typo-en-title-sm-800 items-center justify-between text-fm-color-typo-primary"},vx={key:0},Bx={class:"h-full overflow-y-auto"},Dx={class:"pt-24"},Vx=Z(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:()=>({})}},emits:["update:modelValue"],setup(t){const e=t,n=J(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$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(n)?(r.openBlock(),r.createBlock(en,{key:0,"dismiss-away":e.dismissAway,"z-index":e.zIndex,onClose:i[2]||(i[2]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o.isContainer),r.mergeProps({class:[!o.maxWidth&&"max-w-[400px]","fm-side-sheet xs:w-full"],style:{maxWidth:`${o.maxWidth}px`}},o.isContainerProps),{default:r.withCtx(()=>[r.createElementVNode("div",Ax,[r.renderSlot(o.$slots,"side-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",vx,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0),o.closeButton?(r.openBlock(),r.createBlock(Q,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:i[1]||(i[1]=s=>n.value=!1)})):r.createCommentVNode("",!0)]),r.createElementVNode("div",Bx,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Dx,[r.renderSlot(o.$slots,"side-sheet-footer",{},void 0,!0)])]),_:3},16,["class","style"]))]),_:3})]),_:3},8,["dismiss-away","z-index"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-25ca39ba"]]),Px={class:"flex"},Ex={key:0,class:"mt-8"},Lc=Z(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}},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}`)}}),s=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-en-body-lg-600"}:{text:n.description,classes:""}),a=r.computed(()=>n.bgColor?kn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),l=r.computed(()=>n.color?kn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(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"},a.value),[r.createElementVNode("div",Px,[i.value.icon?(r.openBlock(),r.createBlock(Q,{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(`${s.value.classes} grow ellipsis`)},r.toDisplayString(s.value.text),3),n.dismissable?(r.openBlock(),r.createBlock(Q,{key:1,class:"cursor-pointer",name:"close",style:{"{ flex":"none}"},onClick:c[0]||(c[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",Ex,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(d.$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:c[1]||(c[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-5fe933ca"]]),Fx={class:"fm-step-description fm-typo-en-body-sm-400 line-clamp-1 mt-4"},ds=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(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-en-title-sm-800":"fm-typo-en-body-md-400"])},r.toDisplayString(t.title),3)]),r.renderSlot(e.$slots,"description",{},()=>[r.createElementVNode("div",Fx,r.toDisplayString(t.description),1)])],2))}}),Nx=["data-title","data-description","data-disabled"],Mx={class:"flex fm-step-container gap-12 grow"},Ox=Z(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(Ws);function i(){s.value||o(e.value)}const s=r.computed(()=>e.disabled?e.disabled():!1),a=r.computed(()=>e.error?e.error():!1),l=r.computed(()=>n()===e.value),d=r.computed(()=>e.complete()),c=r.computed(()=>l.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=r.computed(()=>l.value?{className:"bg-fm-color-primary"}:a.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,p)=>{const m=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:r.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),r.createElementVNode("div",Mx,[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]",u.value.className])},[u.value.config?(r.openBlock(),r.createBlock(Q,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(ds,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,Nx)),[[m,!s.value]])}}}),[["__scopeId","data-v-ee172cad"]]),Ix={class:"hidden items-center xs:flex"},Rx={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},Tx=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=u=>{o("update:model-value",u)};r.provide(Ws,{currentStep:()=>n.modelValue,goToStep:i});const s=r.ref(),a=r.ref([]),l=r.computed(()=>a.value[n.modelValue-1]),d=r.computed(()=>`${n.modelValue} of ${a.value.length}`),c=()=>{var f;const u=Array.from(((f=s.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);a.value=u.map(p=>({title:p.dataset.title??"",description:p.dataset.description,disabled:p.dataset.disabled=="true"}))};return r.onMounted(()=>{c()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(u.$slots,"default")],2),r.createElementVNode("div",Ix,[r.createVNode(tn,{"current-step":t.modelValue,"total-steps":a.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),l.value?(r.openBlock(),r.createBlock(ds,{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)]),u.$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(u.$slots,"contents"),r.createElementVNode("div",Rx,[r.renderSlot(u.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let zx=0;function Lx(){return zx++}const Hx=t=>(r.pushScopeId("data-v-33fda7d5"),t=t(),r.popScopeId(),t),Ux=["disabled"],jx={key:1,class:"ml-4"},Qx={key:0,class:"ml-4"},Wx={key:0,class:r.normalizeClass(["block","absolute bottom-0 left-0","h-0.5 w-full"])},Yx=[Hx(()=>r.createElementVNode("span",{class:r.normalizeClass(["block","bg-fm-color-primary rounded-xxxl","w-full h-full"])},null,-1))],Hc=Z(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:()=>Lx()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,s=r.ref(!1);function a(f){n.value=f}const l=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(s.value=f)},c=r.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,p)=>{const m=r.resolveDirective("wave");return r.openBlock(),r.createBlock(_e,{class:r.normalizeClass([{"w-full":f.vertical},"max-w-[360px] min-w-[90px] rounded-sm"]),disabled:f.children.length===0,placement:f.vertical?"right-start":"bottom-start","show-menu":s.value,onMenuChanged:d},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass([f.vertical?["px-16 py-8"]:["px-8 pt-8"],f.vertical?["max-w-[360px] w-full"]:["min-w-[90px] max-w-[360px]"]]),disabled:f.disabled,type:"button",onClick:l,onMousedown:p[0]||(p[0]=()=>a(!0)),onMouseleave:p[1]||(p[1]=()=>a(!1)),onMouseup:p[2]||(p[2]=()=>a(!1))},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",f.vertical?["justify-start"]:["justify-center"],"relative"])},[r.createElementVNode("span",{class:r.normalizeClass([[f.vertical&&"w-full"],"block"])},[r.createElementVNode("span",{class:r.normalizeClass(["flex items-center",!f.vertical&&"pb-1.5",f.vertical&&"w-full"])},[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["rounded-xxxl",!f.vertical&&"hover:bg-fm-color-opacity-sm group",f.vertical&&"w-full"])},[r.createElementVNode("button",{class:r.normalizeClass(["relative","flex items-center","px-8",f.vertical?"py-1":"py-1.5 space-x-8",f.vertical&&"w-full"])},[r.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(r.openBlock(),r.createBlock(Q,{key:0,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",name:f.icon,outline:!n.value&&!c.value,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400",f.disabled?"text-fm-color-typo-disabled":c.value?"text-fm-color-primary":"text-fm-color-typo-secondary"])},r.toDisplayString(f.label),3),f.badge&&f.vertical?(r.openBlock(),r.createElementBlock("span",jx,[r.createVNode(kt,{value:f.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0),f.children.length>0?(r.openBlock(),r.createBlock(Q,{key:2,class:r.normalizeClass(["text-fm-color-neutral-gray-400",f.vertical&&"block ml-auto"]),name:s.value?"expand_less":"expand_more",size:"md"},null,8,["class","name"])):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"append",{},void 0,!0)],2)],2)),[[m,f.vertical?!1:{color:"rgba(28, 28, 30, 0.16)"}]]),f.badge&&!f.vertical?(r.openBlock(),r.createElementBlock("span",Qx,[r.createVNode(kt,{value:f.badge,inline:"",variant:"numeric"},null,8,["value"])])):r.createCommentVNode("",!0)],2),c.value&&!f.vertical?(r.openBlock(),r.createElementBlock("span",Wx,Yx)):r.createCommentVNode("",!0)],2)],2)],42,Ux)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,h=>(r.openBlock(),r.createBlock(xe,{key:h.value,disabled:h.disabled,icon:h.icon,label:h.label,"model-value":o.modelValue===h.value,onClick:g=>u(h.value)},{append:r.withCtx(()=>[h.badge?(r.openBlock(),r.createBlock(kt,{key:0,value:h.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-33fda7d5"]]),Xx={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},Gx={class:"flex flex-1 gap-8"},qx=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}=St(),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 d=l.concat(e.actions);if(n.value.xs){const[h,g,b,...y]=d;return y.length===0?{actionButtons:[h,g,b].filter(S=>S),collapse:y}:{actionButtons:[h,g].filter(S=>S),collapse:[b,...y]}}const[c,u,f,p,...m]=d;return m.length===0?{actionButtons:[c,u,f,p].filter(h=>h),collapse:m}:{actionButtons:[c,u,f].filter(h=>h),collapse:[p,...m]}}),i=r.ref(!1);function s(l){if(n.value.xs){l.stopPropagation(),i.value=!0;return}}const a=J(e,"searchModel");return(l,d)=>(r.openBlock(),r.createElementBlock("div",Xx,[r.renderSlot(l.$slots,"chips",{},()=>[l.chips.length?(r.openBlock(),r.createBlock(Ir,{key:0,class:"min-w-0 mr-auto",items:l.chips,removable:"",onChipClosed:d[0]||(d[0]=c=>l.$emit("click:remove-chip",c))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",Gx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.key},[c.key==="search"?r.renderSlot(l.$slots,"action-search",{key:0},()=>[r.createVNode(os,{"model-value":r.unref(a),"onUpdate:modelValue":d[1]||(d[1]=u=>r.isRef(a)?a.value=u:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(l.$slots,`action-${c.key}`,{key:1},()=>[r.createVNode(G,{"prepend-icon":c.icon,variant:"tertiary",onClick:u=>l.$emit(`click:action-${c.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(_e,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(G,{"prepend-icon":"more_vert",variant:"tertiary",onClick:s})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(xe,{key:c.key,label:c.label,icon:c.icon,onClick:u=>{l.$emit(`click:action-${c.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(Er,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=c=>i.value=c),"dismiss-away":"","z-index":e.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(as,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(ls,{key:c.key,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{l.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue","z-index"])]))]))}});var Jx={env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_d003616c-3f85-4808-a5e5-125658bb4be3",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",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_devDependencies__originjs_vite_plugin_federation:"^1.3.5",USER:"runner",npm_config_user_agent:"pnpm/8.15.8 npm/? node/v16.20.2 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_d003616c-3f85-4808-a5e5-125658bb4be3",PIPX_HOME:"/opt/pipx",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/16.20.2/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-8.8",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.3.11579264",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_scripts_type_check:"vue-tsc --noEmit -p tsconfig.app.json --composite false",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-ubuntu22",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_scripts_copy_tailwind_plugin:"cp ./tailwind-plugin.js ./dist/tailwind-plugin.js && cp ./tailwind-styling.js ./dist/tailwind-styling.js",npm_package_devDependencies_vue_component_meta:"^2.0.13",SYSTEMD_EXEC_PID:"470",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",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.14/x64",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",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.11/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240624.1.0",npm_package_scripts_dev:"vite --port 5273",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.4/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",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18229",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",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",STATS_D:"false",GITHUB_RUN_ID:"9743348350",STATS_VMFE:"true",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"4610e8f845ac4da5dc901fa7c3288df8d376e2bc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",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/release/vue",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/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@8.15.8/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@8.15.8/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@8.15.8/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@8.15.8/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/16.20.2/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_e0e3d7f1-8577-4e6b-831d-7e49cab26418",INVOCATION_ID:"dc710a23bcbc4852bb7ad5f04518f95a",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",npm_package_name:"@feedmepos/ui-library",npm_package_repository_type:"git",GITHUB_ACTION:"__run_4",GITHUB_RUN_NUMBER:"80",GITHUB_TRIGGERING_ACTOR:"sp0033212000",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",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 443",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"release/vue",GITHUB_REPOSITORY:"feedmepos/ui-library",STATS_D_D:"false",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_devDependencies__types_debounce:"^1.2.4",npm_lifecycle_script:"vite build --mode library",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",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",GITHUB_REPOSITORY_ID:"677015340",GITHUB_ACTIONS:"true",NODE_PATH:"/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/node_modules/vite/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/vite@5.2.9_@types+node@18.19.31_sass@1.75.0/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.1.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.1.2/node_modules/npm-run-all2/bin/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules/npm-run-all2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/npm-run-all2@6.1.2/node_modules:/home/runner/work/ui-library/ui-library/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"1.2.9",npm_package_repository_url:"git+https://github.com/feedmepos/ui-library.git",npm_package_dependencies__tanstack_vue_table:"^8.13.2",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",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"4610e8f845ac4da5dc901fa7c3288df8d376e2bc",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/release/vue",GITHUB_ACTOR:"sp0033212000",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_pack:"pnpm build:lib && cd ./dist/ && pnpm pack --pack-destination ../../",LEIN_HOME:"/usr/local/lib/lein",npm_package_exports___tailwind_styling:"./dist/tailwind-styling.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_d003616c-3f85-4808-a5e5-125658bb4be3",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/ui-library/ui-library/packages/vue",GITHUB_ACTOR_ID:"56681081",RUNNER_WORKSPACE:"/home/runner/work/ui-library",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.15.8/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",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",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_d003616c-3f85-4808-a5e5-125658bb4be3",npm_package_exports___types:"./dist/index.d.ts",npm_package_devDependencies__types_chart_js:"^2.9.41",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",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/25.2.9519653",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",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data",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/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_d003616c-3f85-4808-a5e5-125658bb4be3",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_libphonenumber_js:"^1.10.57",NODE_ENV:"production"}};function Ot(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:Ot(n,o[t])}))}}function ur(t){return t instanceof Function}function Kx(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function Zx(t,e){const n=[],o=i=>{i.forEach(s=>{n.push(s);const a=e(s);a!=null&&a.length&&o(a)})};return o(t),n}function Y(t,e,n){let o=[],i;return s=>{let a;n.key&&n.debug&&(a=Date.now());const l=t(s);if(!(l.length!==o.length||l.some((u,f)=>o[f]!==u)))return i;o=l;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,m=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c⏱ ${m(f,5)} /${m(u,5)} ms`,`
79
79
  font-size: .6rem;
80
80
  font-weight: bold;
81
- color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function X(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:Xx.env.NODE_ENV==="development",onChange:o}}function Jx(t,e,n,o){const i=()=>{var a;return(a=s.getValue())!=null?a:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:Y(()=>[t,n,e,s],(a,l,d,c)=>({table:a,column:l,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),X(t.options,"debugCells"))};return t._features.forEach(a=>{a.createCell==null||a.createCell(s,n,e,t)},{}),s}function Kx(t,e,n,o){var i,s;const l={...t._getDefaultColumnDef(),...e},d=l.accessorKey;let c=(i=(s=l.id)!=null?s:d?d.replace(".","_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,u;if(l.accessorFn?u=l.accessorFn:d&&(d.includes(".")?u=p=>{let m=p;for(const g of d.split(".")){var h;m=(h=m)==null?void 0:h[g]}return m}:u=p=>p[l.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:Y(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},X(t.options,"debugColumns")),getLeafColumns:Y(()=>[t._getOrderColumnsFn()],p=>{var m;if((m=f.columns)!=null&&m.length){let h=f.columns.flatMap(g=>g.getLeafColumns());return p(h)}return[f]},X(t.options,"debugColumns"))};for(const p of t._features)p.createColumn==null||p.createColumn(f,t);return f}const Be="debugHeaders";function Uc(t,e,n){var o;let s={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 a=[],l=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(l),a.push(d)};return l(s),a},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(a=>{a.createHeader==null||a.createHeader(s,t)}),s}const Zx={createTable:t=>{t.getHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var s,a;const l=(s=o==null?void 0:o.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?s:[],d=(a=i==null?void 0:i.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?a:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return fr(e,[...l,...c,...d],t)},X(t.options,Be)),t.getCenterHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),fr(e,n,t,"center")),X(t.options,Be)),t.getLeftHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return fr(e,s,t,"left")},X(t.options,Be)),t.getRightHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return fr(e,s,t,"right")},X(t.options,Be)),t.getFooterGroups=Y(()=>[t.getHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getLeftFooterGroups=Y(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getCenterFooterGroups=Y(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getRightFooterGroups=Y(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getFlatHeaders=Y(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getLeftFlatHeaders=Y(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getCenterFlatHeaders=Y(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getRightFlatHeaders=Y(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getCenterLeafHeaders=Y(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getLeftLeafHeaders=Y(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getRightLeafHeaders=Y(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getLeafHeaders=Y(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,s,a,l,d,c;return[...(i=(s=e[0])==null?void 0:s.headers)!=null?i:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},X(t.options,Be))}};function fr(t,e,n,o){var i,s;let a=0;const l=function(p,m){m===void 0&&(m=1),a=Math.max(a,m),p.filter(h=>h.getIsVisible()).forEach(h=>{var g;(g=h.columns)!=null&&g.length&&l(h.columns,m+1)},0)};l(t);let d=[];const c=(p,m)=>{const h={depth:m,id:[o,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];p.forEach(b=>{const y=[...g].reverse()[0],S=b.column.depth===h.depth;let v,w=!1;if(S&&b.column.parent?v=b.column.parent:(v=b.column,w=!0),y&&(y==null?void 0:y.column)===v)y.subHeaders.push(b);else{const x=Uc(n,v,{id:[o,m,v.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(F=>F.column===v).length}`:void 0,depth:m,index:g.length});x.subHeaders.push(b),g.push(x)}h.headers.push(b),b.headerGroup=h}),d.push(h),m>0&&c(g,m-1)},u=e.map((p,m)=>Uc(n,p,{depth:a,index:m}));c(u,a-1),d.reverse();const f=p=>p.filter(h=>h.column.getIsVisible()).map(h=>{let g=0,b=0,y=[0];h.subHeaders&&h.subHeaders.length?(y=[],f(h.subHeaders).forEach(v=>{let{colSpan:w,rowSpan:x}=v;g+=w,y.push(x)})):g=1;const S=Math.min(...y);return b=b+S,h.colSpan=g,h.rowSpan=b,{colSpan:g,rowSpan:b}});return f((i=(s=d[0])==null?void 0:s.headers)!=null?i:[]),d}const cs=(t,e,n,o,i,s,a)=>{let l={id:e,index:o,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(l._valuesCache.hasOwnProperty(d))return l._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return l._valuesCache[d]=c.accessorFn(l.original,o),l._valuesCache[d]},getUniqueValues:d=>{if(l._uniqueValuesCache.hasOwnProperty(d))return l._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(l._uniqueValuesCache[d]=c.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[d]):(l._uniqueValuesCache[d]=[l.getValue(d)],l._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=l.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>qx(l.subRows,d=>d.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let d=[],c=l;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:Y(()=>[t.getAllLeafColumns()],d=>d.map(c=>Jx(t,l,c,c.id)),X(t.options,"debugRows")),_getAllCellsByColumnId:Y(()=>[l.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),X(t.options,"debugRows"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(l,t)}return l},$x={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()}}},jc=(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))};jc.autoRemove=t=>Ge(t);const Qc=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};Qc.autoRemove=t=>Ge(t);const Wc=(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())};Wc.autoRemove=t=>Ge(t);const Yc=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};Yc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Xc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});Xc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Gc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});Gc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const qc=(t,e,n)=>t.getValue(e)===n;qc.autoRemove=t=>Ge(t);const Jc=(t,e,n)=>t.getValue(e)==n;Jc.autoRemove=t=>Ge(t);const us=(t,e,n)=>{let[o,i]=n;const s=t.getValue(e);return s>=o&&s<=i};us.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(o)?-1/0:o,a=n===null||Number.isNaN(i)?1/0:i;if(s>a){const l=s;s=a,a=l}return[s,a]},us.autoRemove=t=>Ge(t)||Ge(t[0])&&Ge(t[1]);const bt={includesString:jc,includesStringSensitive:Qc,equalsString:Wc,arrIncludes:Yc,arrIncludesAll:Xc,arrIncludesSome:Gc,equals:qc,weakEquals:Jc,inNumberRange:us};function Ge(t){return t==null||t===""}const _x={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("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"?bt.includesString:typeof o=="number"?bt.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?bt.equals:Array.isArray(o)?bt.arrIncludes:bt.weakEquals},t.getFilterFn=()=>{var n,o;return ur(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:bt[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(),s=o==null?void 0:o.find(u=>u.id===t.id),a=Mt(n,s?s.value:void 0);if(Kc(i,a,t)){var l;return(l=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?l:[]}const d={id:t.id,value:a};if(s){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var s;return(s=Mt(e,i))==null?void 0:s.filter(a=>{const l=n.find(d=>d.id===a.id);if(l){const d=l.getFilterFn();if(Kc(d,a.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 Kc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const fs={sum:(t,e,n)=>n.reduce((o,i)=>{const s=i.getValue(t);return o+(typeof s=="number"?s:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(s=>{const a=s.getValue(t);a!=null&&(o===void 0?a>=a&&(o=i=a):(o>a&&(o=a),i<a&&(i=a)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let s=i.getValue(t);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Gx(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,a)=>s-a);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},eS={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:Re("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 fs.sum;if(Object.prototype.toString.call(o)==="[object Date]")return fs.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ur(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:fs[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 tS(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(s=>!e.includes(s.id));return n==="remove"?o:[...e.map(s=>t.find(a=>a.id===s)).filter(Boolean),...o]}const nS={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=Y(n=>[ro(e,n)],n=>n.findIndex(o=>o.id===t.id),X(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var o;return((o=ro(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=ro(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=Y(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let s=[];if(!(e!=null&&e.length))s=i;else{const a=[...e],l=[...i];for(;l.length&&a.length;){const d=a.shift(),c=l.findIndex(u=>u.id===d);c>-1&&s.push(l.splice(c,1)[0])}s=[...s,...l]}return tS(s,n,o)},X(t.options,"debugTable"))}},ps=()=>({left:[],right:[]}),oS={getInitialState:t=>({columnPinning:ps(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var s,a;if(n==="right"){var l,d;return{left:((l=i==null?void 0:i.left)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((a=i==null?void 0:i.right)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,s,a;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(a=e.options.enableColumnPinning)!=null?a:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(l=>l.id),{left:o,right:i}=e.getState().columnPinning,s=n.some(l=>o==null?void 0:o.includes(l)),a=n.some(l=>i==null?void 0:i.includes(l));return s?"left":a?"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=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(a=>!s.includes(a.column.id))},X(e.options,"debugRows")),t.getLeftVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),X(e.options,"debugRows")),t.getRightVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),X(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?ps():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:ps())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),X(t.options,"debugColumns")),t.getRightLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),X(t.options,"debugColumns")),t.getCenterLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(s=>!i.includes(s.id))},X(t.options,"debugColumns"))}},pr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ms=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),rS={getDefaultColumnDef:()=>pr,getInitialState:t=>({columnSizing:{},columnSizingInfo:ms(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:pr.minSize,(o=s??t.columnDef.size)!=null?o:pr.size),(i=t.columnDef.maxSize)!=null?i:pr.maxSize)},t.getStart=Y(n=>[n,ro(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),X(e.options,"debugColumns")),t.getAfter=Y(n=>[n,ro(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),X(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 s;n+=(s=i.column.getSize())!=null?s: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 s=>{if(!o||!i||(s.persist==null||s.persist(),hs(s)&&s.touches&&s.touches.length>1))return;const a=t.getSize(),l=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[o.id,o.getSize()]],d=hs(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(y,S)=>{typeof S=="number"&&(e.setColumnSizingInfo(v=>{var w,x;const F=e.options.columnResizeDirection==="rtl"?-1:1,E=(S-((w=v==null?void 0:v.startOffset)!=null?w:0))*F,M=Math.max(E/((x=v==null?void 0:v.startSize)!=null?x:0),-.999999);return v.columnSizingStart.forEach(I=>{let[N,C]=I;c[N]=Math.round(Math.max(C+C*M,0)*100)/100}),{...v,deltaOffset:E,deltaPercentage:M}}),(e.options.columnResizeMode==="onChange"||y==="end")&&e.setColumnSizing(v=>({...v,...c})))},f=y=>u("move",y),p=y=>{u("end",y),e.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=n||typeof document<"u"?document:null,h={moveHandler:y=>f(y.clientX),upHandler:y=>{m==null||m.removeEventListener("mousemove",h.moveHandler),m==null||m.removeEventListener("mouseup",h.upHandler),p(y.clientX)}},g={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),f(y.touches[0].clientX),!1),upHandler:y=>{var S;m==null||m.removeEventListener("touchmove",g.moveHandler),m==null||m.removeEventListener("touchend",g.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((S=y.touches[0])==null?void 0:S.clientX)}},b=iS()?{passive:!1}:!1;hs(s)?(m==null||m.addEventListener("touchmove",g.moveHandler,b),m==null||m.addEventListener("touchend",g.upHandler,b)):(m==null||m.addEventListener("mousemove",h.moveHandler,b),m==null||m.addEventListener("mouseup",h.upHandler,b)),e.setColumnSizingInfo(y=>({...y,startOffset:d,startSize:a,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?ms():(n=t.initialState.columnSizingInfo)!=null?n:ms())},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 mr=null;function iS(){if(typeof mr=="boolean")return mr;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 mr=t,mr}function hs(t){return t.type==="touchstart"}const sS={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("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(s=>s.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=Y(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),X(e.options,"debugRows")),t.getVisibleCells=Y(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],X(e.options,"debugRows"))},createTable:t=>{const e=(n,o)=>Y(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),X(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,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.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 ro(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const aS={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()}}},lS={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Re("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,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>bt.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ur(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:bt[o]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},dS={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("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,s;t.setExpanded(o?{}:(i=(s=t.initialState)==null?void 0:s.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(s=>{const a=s.split(".");o=Math.max(o,a.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 s=o===!0?!0:!!(o!=null&&o[t.id]);let a={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=o,n=(i=n)!=null?i:!s,!s&&n)return{...a,[t.id]:!0};if(s&&!n){const{[t.id]:l,...d}=a;return d}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()}}}},gs=0,bs=10,ys=()=>({pageIndex:gs,pageSize:bs}),cS={getInitialState:t=>({...t,pagination:{...ys(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("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=s=>Mt(o,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?ys():(i=t.initialState.pagination)!=null?i:ys())},t.setPageIndex=o=>{t.setPagination(i=>{let s=Mt(o,i.pageIndex);const a=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...i,pageIndex:s}})},t.resetPageIndex=o=>{var i,s;t.setPageIndex(o?gs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:gs)},t.resetPageSize=o=>{var i,s;t.setPageSize(o?bs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:bs)},t.setPageSize=o=>{t.setPagination(i=>{const s=Math.max(1,Mt(o,i.pageSize)),a=i.pageSize*i.pageIndex,l=Math.floor(a/s);return{...i,pageIndex:l,pageSize:s}})},t.setPageCount=o=>t.setPagination(i=>{var s;let a=Mt(o,(s=t.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),t.getPageOptions=Y(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,a)=>a)),i},X(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}}},ks=()=>({top:[],bottom:[]}),uS={getInitialState:t=>({rowPinning:ks(),...t}),getDefaultOptions:t=>({onRowPinningChange:Re("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,o,i)=>{const s=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],a=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],l=new Set([...a,t.id,...s]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,p;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(l!=null&&l.has(g))),bottom:[...((p=d==null?void 0:d.bottom)!=null?p:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)]}}if(n==="top"){var m,h;return{top:[...((m=d==null?void 0:d.top)!=null?m:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)],bottom:((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(l!=null&&l.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(l!=null&&l.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(l!=null&&l.has(g)))}})},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,s=n.some(l=>o==null?void 0:o.includes(l)),a=n.some(l=>i==null?void 0:i.includes(l));return s?"top":a?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const s=(n=e._getPinnedRows(i))==null?void 0:n.map(a=>{let{id:l}=a;return l});return(o=s==null?void 0:s.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?ks():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:ks())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=Y(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const l=t.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>e.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:o}))},X(t.options,"debugRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=Y(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(s=>!i.has(s.id))},X(t.options,"debugRows"))}},fS={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("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(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(s=>{xs(i,s.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getFilteredSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getGroupedSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(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(s=>{var a;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return s;const l={...s};return xs(l,t.id,n,(a=o==null?void 0:o.selectChildren)!=null?a:!0,e),l})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Cs(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return ws(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return ws(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)}}}},xs=(t,e,n,o,i)=>{var s;const a=i.getRow(e,!0);n?(a.getCanMultiSelect()||Object.keys(t).forEach(l=>delete t[l]),a.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>xs(t,l.id,n,o,i))};function Ss(t,e){const n=t.getState().rowSelection,o=[],i={},s=function(a,l){return a.map(d=>{var c;const u=Cs(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:s(d.subRows)}),u)return d}).filter(Boolean)};return{rows:s(e.rows),flatRows:o,rowsById:i}}function Cs(t,e){var n;return(n=e[t.id])!=null?n:!1}function ws(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return t.subRows.forEach(a=>{if(!(s&&!i)&&(a.getCanSelect()&&(Cs(a,e)?s=!0:i=!1),a.subRows&&a.subRows.length)){const l=ws(a,e);l==="all"?s=!0:(l==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const As=/([0-9]+)/gm,pS=(t,e,n)=>Zc(Ot(t.getValue(n)).toLowerCase(),Ot(e.getValue(n)).toLowerCase()),mS=(t,e,n)=>Zc(Ot(t.getValue(n)),Ot(e.getValue(n))),hS=(t,e,n)=>vs(Ot(t.getValue(n)).toLowerCase(),Ot(e.getValue(n)).toLowerCase()),gS=(t,e,n)=>vs(Ot(t.getValue(n)),Ot(e.getValue(n))),bS=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},yS=(t,e,n)=>vs(t.getValue(n),e.getValue(n));function vs(t,e){return t===e?0:t>e?1:-1}function Ot(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Zc(t,e){const n=t.split(As).filter(Boolean),o=e.split(As).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),a=parseInt(i,10),l=parseInt(s,10),d=[a,l].sort();if(isNaN(d[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(d[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-o.length}const io={alphanumeric:pS,alphanumericCaseSensitive:mS,text:hS,textCaseSensitive:gS,datetime:bS,basic:yS},kS=[Zx,sS,nS,oS,$x,_x,aS,lS,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("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 s=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return io.datetime;if(typeof s=="string"&&(o=!0,s.split(As).length>1))return io.alphanumeric}return o?io.text:io.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 ur(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:io[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(a=>{const l=a==null?void 0:a.find(m=>m.id===t.id),d=a==null?void 0:a.findIndex(m=>m.id===t.id);let c=[],u,f=s?n:i==="desc";if(a!=null&&a.length&&t.getCanMultiSort()&&o?l?u="toggle":u="add":a!=null&&a.length&&d!==a.length-1?u="replace":l?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var p;c=[...a,{id:t.id,desc:f}],c.splice(0,c.length-((p=e.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=a.map(m=>m.id===t.id?{...m,desc:f}:m):u==="remove"?c=a.filter(m=>m.id!==t.id):c=[{id:t.id,desc:f}];return c})},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 s=t.getFirstSortDir(),a=t.getIsSorted();return a?a!==s&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":s},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())}},eS,dS,cS,uS,fS,rS];function xS(t){var e,n;const o=[...kS,...(e=t._features)!=null?e:[]];let i={_features:o};const s=i._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),a=p=>i.options.mergeOptions?i.options.mergeOptions(s,p):{...s,...p};let d={...{},...(n=t.initialState)!=null?n:{}};i._features.forEach(p=>{var m;d=(m=p.getInitialState==null?void 0:p.getInitialState(d))!=null?m:d});const c=[];let u=!1;const f={_features:o,options:{...s,...t},initialState:d,_queue:p=>{c.push(p),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:p=>{const m=Mt(p,i.options);i.options=a(m)},getState:()=>i.options.state,setState:p=>{i.options.onStateChange==null||i.options.onStateChange(p)},_getRowId:(p,m,h)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(p,m,h))!=null?g:`${h?[h.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(p,m)=>{let h=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[p];if(!h&&(h=i.getCoreRowModel().rowsById[p],!h))throw new Error;return h},_getDefaultColumnDef:Y(()=>[i.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:h=>{const g=h.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:h=>{var g,b;return(g=(b=h.renderValue())==null||b.toString==null?void 0:b.toString())!=null?g:null},...i._features.reduce((h,g)=>Object.assign(h,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...p}},X(t,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Y(()=>[i._getColumnDefs()],p=>{const m=function(h,g,b){return b===void 0&&(b=0),h.map(y=>{const S=Kx(i,y,b,g),v=y;return S.columns=v.columns?m(v.columns,S,b+1):[],S})};return m(p)},X(t,"debugColumns")),getAllFlatColumns:Y(()=>[i.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),X(t,"debugColumns")),_getAllFlatColumnsById:Y(()=>[i.getAllFlatColumns()],p=>p.reduce((m,h)=>(m[h.id]=h,m),{}),X(t,"debugColumns")),getAllLeafColumns:Y(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(p,m)=>{let h=p.flatMap(g=>g.getLeafColumns());return m(h)},X(t,"debugColumns")),getColumn:p=>i._getAllFlatColumnsById()[p]};Object.assign(i,f);for(let p=0;p<i._features.length;p++){const m=i._features[p];m==null||m.createTable==null||m.createTable(i)}return i}function SS(){return t=>Y(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,a){s===void 0&&(s=0);const l=[];for(let c=0;c<i.length;c++){const u=cs(t,t._getRowId(i[c],c,a),i[c],c,s,void 0,a==null?void 0:a.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return l};return n.rows=o(e),n},X(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function CS(){return t=>Y(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:$c(n),X(t.options,"debugTable"))}function $c(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 wS(t,e,n){return n.options.filterFromLeafRows?AS(t,e,n):vS(t,e,n)}function AS(t,e,n){var o;const i=[],s={},a=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(d,c){c===void 0&&(c=0);const u=[];for(let p=0;p<d.length;p++){var f;let m=d[p];const h=cs(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(h.columnFilters=m.columnFilters,(f=m.subRows)!=null&&f.length&&c<a){if(h.subRows=l(m.subRows,c+1),m=h,e(m)&&!h.subRows.length){u.push(m),s[m.id]=m,i.push(m);continue}if(e(m)||h.subRows.length){u.push(m),s[m.id]=m,i.push(m);continue}}else m=h,e(m)&&(u.push(m),s[m.id]=m,i.push(m))}return u};return{rows:l(t),flatRows:i,rowsById:s}}function vS(t,e,n){var o;const i=[],s={},a=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(d,c){c===void 0&&(c=0);const u=[];for(let p=0;p<d.length;p++){let m=d[p];if(e(m)){var f;if((f=m.subRows)!=null&&f.length&&c<a){const g=cs(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=l(m.subRows,c+1),m=g}u.push(m),i.push(m),s[m.id]=m}}return u};return{rows:l(t),flatRows:i,rowsById:s}}function BS(){return t=>Y(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let p=0;p<e.flatRows.length;p++)e.flatRows[p].columnFilters={},e.flatRows[p].columnFiltersMeta={};return e}const i=[],s=[];(n??[]).forEach(p=>{var m;const h=t.getColumn(p.id);if(!h)return;const g=h.getFilterFn();g&&i.push({id:p.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(p.value))!=null?m:p.value})});const a=n.map(p=>p.id),l=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());o&&l&&d.length&&(a.push("__global__"),d.forEach(p=>{var m;s.push({id:p.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?m:o})}));let c,u;for(let p=0;p<e.flatRows.length;p++){const m=e.flatRows[p];if(m.columnFilters={},i.length)for(let h=0;h<i.length;h++){c=i[h];const g=c.id;m.columnFilters[g]=c.filterFn(m,g,c.resolvedValue,b=>{m.columnFiltersMeta[g]=b})}if(s.length){for(let h=0;h<s.length;h++){u=s[h];const g=u.id;if(u.filterFn(m,g,u.resolvedValue,b=>{m.columnFiltersMeta[g]=b})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const f=p=>{for(let m=0;m<a.length;m++)if(p.columnFilters[a[m]]===!1)return!1;return!0};return wS(e.rows,f,t)},X(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function DS(t){return e=>Y(()=>[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:s}=n;let{rows:a,flatRows:l,rowsById:d}=o;const c=i*s,u=c+i;a=a.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:a,flatRows:l,rowsById:d}:f=$c({rows:a,flatRows:l,rowsById:d}),f.flatRows=[];const p=m=>{f.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return f.rows.forEach(p),f},X(e.options,"debugTable"))}function VS(){return t=>Y(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],s=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),a={};s.forEach(d=>{const c=t.getColumn(d.id);c&&(a[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const l=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let m=0;m<s.length;m+=1){var p;const h=s[m],g=a[h.id],b=g.sortUndefined,y=(p=h==null?void 0:h.desc)!=null?p:!1;let S=0;if(b){const v=u.getValue(h.id),w=f.getValue(h.id),x=v===void 0,F=w===void 0;if(x||F){if(b==="first")return x?-1:1;if(b==="last")return x?1:-1;S=x&&F?0:x?b:-b}}if(S===0&&(S=g.sortingFn(u,f,h.id)),S!==0)return y&&(S*=-1),g.invertSorting&&(S*=-1),S}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=l(u.subRows))}),c};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},X(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
81
+ color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function X(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:Jx.env.NODE_ENV==="development",onChange:o}}function $x(t,e,n,o){const i=()=>{var a;return(a=s.getValue())!=null?a:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:Y(()=>[t,n,e,s],(a,l,d,c)=>({table:a,column:l,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),X(t.options,"debugCells"))};return t._features.forEach(a=>{a.createCell==null||a.createCell(s,n,e,t)},{}),s}function _x(t,e,n,o){var i,s;const l={...t._getDefaultColumnDef(),...e},d=l.accessorKey;let c=(i=(s=l.id)!=null?s:d?d.replace(".","_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,u;if(l.accessorFn?u=l.accessorFn:d&&(d.includes(".")?u=p=>{let m=p;for(const g of d.split(".")){var h;m=(h=m)==null?void 0:h[g]}return m}:u=p=>p[l.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:l,columns:[],getFlatColumns:Y(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},X(t.options,"debugColumns")),getLeafColumns:Y(()=>[t._getOrderColumnsFn()],p=>{var m;if((m=f.columns)!=null&&m.length){let h=f.columns.flatMap(g=>g.getLeafColumns());return p(h)}return[f]},X(t.options,"debugColumns"))};for(const p of t._features)p.createColumn==null||p.createColumn(f,t);return f}const Be="debugHeaders";function Uc(t,e,n){var o;let s={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 a=[],l=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(l),a.push(d)};return l(s),a},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(a=>{a.createHeader==null||a.createHeader(s,t)}),s}const eS={createTable:t=>{t.getHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var s,a;const l=(s=o==null?void 0:o.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?s:[],d=(a=i==null?void 0:i.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?a:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return fr(e,[...l,...c,...d],t)},X(t.options,Be)),t.getCenterHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),fr(e,n,t,"center")),X(t.options,Be)),t.getLeftHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return fr(e,s,t,"left")},X(t.options,Be)),t.getRightHeaderGroups=Y(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(a=>n.find(l=>l.id===a)).filter(Boolean))!=null?i:[];return fr(e,s,t,"right")},X(t.options,Be)),t.getFooterGroups=Y(()=>[t.getHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getLeftFooterGroups=Y(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getCenterFooterGroups=Y(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getRightFooterGroups=Y(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),X(t.options,Be)),t.getFlatHeaders=Y(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getLeftFlatHeaders=Y(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getCenterFlatHeaders=Y(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getRightFlatHeaders=Y(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),X(t.options,Be)),t.getCenterLeafHeaders=Y(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getLeftLeafHeaders=Y(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getRightLeafHeaders=Y(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),X(t.options,Be)),t.getLeafHeaders=Y(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,s,a,l,d,c;return[...(i=(s=e[0])==null?void 0:s.headers)!=null?i:[],...(a=(l=n[0])==null?void 0:l.headers)!=null?a:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},X(t.options,Be))}};function fr(t,e,n,o){var i,s;let a=0;const l=function(p,m){m===void 0&&(m=1),a=Math.max(a,m),p.filter(h=>h.getIsVisible()).forEach(h=>{var g;(g=h.columns)!=null&&g.length&&l(h.columns,m+1)},0)};l(t);let d=[];const c=(p,m)=>{const h={depth:m,id:[o,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];p.forEach(b=>{const y=[...g].reverse()[0],S=b.column.depth===h.depth;let v,w=!1;if(S&&b.column.parent?v=b.column.parent:(v=b.column,w=!0),y&&(y==null?void 0:y.column)===v)y.subHeaders.push(b);else{const x=Uc(n,v,{id:[o,m,v.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${g.filter(F=>F.column===v).length}`:void 0,depth:m,index:g.length});x.subHeaders.push(b),g.push(x)}h.headers.push(b),b.headerGroup=h}),d.push(h),m>0&&c(g,m-1)},u=e.map((p,m)=>Uc(n,p,{depth:a,index:m}));c(u,a-1),d.reverse();const f=p=>p.filter(h=>h.column.getIsVisible()).map(h=>{let g=0,b=0,y=[0];h.subHeaders&&h.subHeaders.length?(y=[],f(h.subHeaders).forEach(v=>{let{colSpan:w,rowSpan:x}=v;g+=w,y.push(x)})):g=1;const S=Math.min(...y);return b=b+S,h.colSpan=g,h.rowSpan=b,{colSpan:g,rowSpan:b}});return f((i=(s=d[0])==null?void 0:s.headers)!=null?i:[]),d}const cs=(t,e,n,o,i,s,a)=>{let l={id:e,index:o,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(l._valuesCache.hasOwnProperty(d))return l._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return l._valuesCache[d]=c.accessorFn(l.original,o),l._valuesCache[d]},getUniqueValues:d=>{if(l._uniqueValuesCache.hasOwnProperty(d))return l._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(l._uniqueValuesCache[d]=c.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[d]):(l._uniqueValuesCache[d]=[l.getValue(d)],l._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=l.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>Zx(l.subRows,d=>d.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let d=[],c=l;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:Y(()=>[t.getAllLeafColumns()],d=>d.map(c=>$x(t,l,c,c.id)),X(t.options,"debugRows")),_getAllCellsByColumnId:Y(()=>[l.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),X(t.options,"debugRows"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(l,t)}return l},tS={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()}}},jc=(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))};jc.autoRemove=t=>Ge(t);const Qc=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};Qc.autoRemove=t=>Ge(t);const Wc=(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())};Wc.autoRemove=t=>Ge(t);const Yc=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};Yc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Xc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});Xc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const Gc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});Gc.autoRemove=t=>Ge(t)||!(t!=null&&t.length);const qc=(t,e,n)=>t.getValue(e)===n;qc.autoRemove=t=>Ge(t);const Jc=(t,e,n)=>t.getValue(e)==n;Jc.autoRemove=t=>Ge(t);const us=(t,e,n)=>{let[o,i]=n;const s=t.getValue(e);return s>=o&&s<=i};us.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(o)?-1/0:o,a=n===null||Number.isNaN(i)?1/0:i;if(s>a){const l=s;s=a,a=l}return[s,a]},us.autoRemove=t=>Ge(t)||Ge(t[0])&&Ge(t[1]);const bt={includesString:jc,includesStringSensitive:Qc,equalsString:Wc,arrIncludes:Yc,arrIncludesAll:Xc,arrIncludesSome:Gc,equals:qc,weakEquals:Jc,inNumberRange:us};function Ge(t){return t==null||t===""}const nS={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("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"?bt.includesString:typeof o=="number"?bt.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?bt.equals:Array.isArray(o)?bt.arrIncludes:bt.weakEquals},t.getFilterFn=()=>{var n,o;return ur(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:bt[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(),s=o==null?void 0:o.find(u=>u.id===t.id),a=Ot(n,s?s.value:void 0);if(Kc(i,a,t)){var l;return(l=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?l:[]}const d={id:t.id,value:a};if(s){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var s;return(s=Ot(e,i))==null?void 0:s.filter(a=>{const l=n.find(d=>d.id===a.id);if(l){const d=l.getFilterFn();if(Kc(d,a.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 Kc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const fs={sum:(t,e,n)=>n.reduce((o,i)=>{const s=i.getValue(t);return o+(typeof s=="number"?s:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(s=>{const a=s.getValue(t);a!=null&&(o===void 0?a>=a&&(o=i=a):(o>a&&(o=a),i<a&&(i=a)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let s=i.getValue(t);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Kx(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,a)=>s-a);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},oS={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:Re("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 fs.sum;if(Object.prototype.toString.call(o)==="[object Date]")return fs.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ur(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:fs[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 rS(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(s=>!e.includes(s.id));return n==="remove"?o:[...e.map(s=>t.find(a=>a.id===s)).filter(Boolean),...o]}const iS={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=Y(n=>[ro(e,n)],n=>n.findIndex(o=>o.id===t.id),X(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var o;return((o=ro(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=ro(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=Y(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let s=[];if(!(e!=null&&e.length))s=i;else{const a=[...e],l=[...i];for(;l.length&&a.length;){const d=a.shift(),c=l.findIndex(u=>u.id===d);c>-1&&s.push(l.splice(c,1)[0])}s=[...s,...l]}return rS(s,n,o)},X(t.options,"debugTable"))}},ps=()=>({left:[],right:[]}),sS={getInitialState:t=>({columnPinning:ps(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var s,a;if(n==="right"){var l,d;return{left:((l=i==null?void 0:i.left)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((a=i==null?void 0:i.right)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,s,a;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(a=e.options.enableColumnPinning)!=null?a:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(l=>l.id),{left:o,right:i}=e.getState().columnPinning,s=n.some(l=>o==null?void 0:o.includes(l)),a=n.some(l=>i==null?void 0:i.includes(l));return s?"left":a?"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=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(a=>!s.includes(a.column.id))},X(e.options,"debugRows")),t.getLeftVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),X(e.options,"debugRows")),t.getRightVisibleCells=Y(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),X(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?ps():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:ps())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),X(t.options,"debugColumns")),t.getRightLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),X(t.options,"debugColumns")),t.getCenterLeafColumns=Y(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(s=>!i.includes(s.id))},X(t.options,"debugColumns"))}},pr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ms=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),aS={getDefaultColumnDef:()=>pr,getInitialState:t=>({columnSizing:{},columnSizingInfo:ms(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:pr.minSize,(o=s??t.columnDef.size)!=null?o:pr.size),(i=t.columnDef.maxSize)!=null?i:pr.maxSize)},t.getStart=Y(n=>[n,ro(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),X(e.options,"debugColumns")),t.getAfter=Y(n=>[n,ro(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),X(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 s;n+=(s=i.column.getSize())!=null?s: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 s=>{if(!o||!i||(s.persist==null||s.persist(),hs(s)&&s.touches&&s.touches.length>1))return;const a=t.getSize(),l=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[o.id,o.getSize()]],d=hs(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(y,S)=>{typeof S=="number"&&(e.setColumnSizingInfo(v=>{var w,x;const F=e.options.columnResizeDirection==="rtl"?-1:1,E=(S-((w=v==null?void 0:v.startOffset)!=null?w:0))*F,M=Math.max(E/((x=v==null?void 0:v.startSize)!=null?x:0),-.999999);return v.columnSizingStart.forEach(I=>{let[N,C]=I;c[N]=Math.round(Math.max(C+C*M,0)*100)/100}),{...v,deltaOffset:E,deltaPercentage:M}}),(e.options.columnResizeMode==="onChange"||y==="end")&&e.setColumnSizing(v=>({...v,...c})))},f=y=>u("move",y),p=y=>{u("end",y),e.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=n||typeof document<"u"?document:null,h={moveHandler:y=>f(y.clientX),upHandler:y=>{m==null||m.removeEventListener("mousemove",h.moveHandler),m==null||m.removeEventListener("mouseup",h.upHandler),p(y.clientX)}},g={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),f(y.touches[0].clientX),!1),upHandler:y=>{var S;m==null||m.removeEventListener("touchmove",g.moveHandler),m==null||m.removeEventListener("touchend",g.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((S=y.touches[0])==null?void 0:S.clientX)}},b=lS()?{passive:!1}:!1;hs(s)?(m==null||m.addEventListener("touchmove",g.moveHandler,b),m==null||m.addEventListener("touchend",g.upHandler,b)):(m==null||m.addEventListener("mousemove",h.moveHandler,b),m==null||m.addEventListener("mouseup",h.upHandler,b)),e.setColumnSizingInfo(y=>({...y,startOffset:d,startSize:a,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?ms():(n=t.initialState.columnSizingInfo)!=null?n:ms())},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 mr=null;function lS(){if(typeof mr=="boolean")return mr;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 mr=t,mr}function hs(t){return t.type==="touchstart"}const dS={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("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(s=>s.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=Y(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),X(e.options,"debugRows")),t.getVisibleCells=Y(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],X(e.options,"debugRows"))},createTable:t=>{const e=(n,o)=>Y(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),X(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,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.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 ro(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const cS={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()}}},uS={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Re("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,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>bt.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ur(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:bt[o]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},fS={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("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,s;t.setExpanded(o?{}:(i=(s=t.initialState)==null?void 0:s.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(s=>{const a=s.split(".");o=Math.max(o,a.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 s=o===!0?!0:!!(o!=null&&o[t.id]);let a={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(l=>{a[l]=!0}):a=o,n=(i=n)!=null?i:!s,!s&&n)return{...a,[t.id]:!0};if(s&&!n){const{[t.id]:l,...d}=a;return d}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()}}}},gs=0,bs=10,ys=()=>({pageIndex:gs,pageSize:bs}),pS={getInitialState:t=>({...t,pagination:{...ys(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("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=s=>Ot(o,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?ys():(i=t.initialState.pagination)!=null?i:ys())},t.setPageIndex=o=>{t.setPagination(i=>{let s=Ot(o,i.pageIndex);const a=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...i,pageIndex:s}})},t.resetPageIndex=o=>{var i,s;t.setPageIndex(o?gs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:gs)},t.resetPageSize=o=>{var i,s;t.setPageSize(o?bs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:bs)},t.setPageSize=o=>{t.setPagination(i=>{const s=Math.max(1,Ot(o,i.pageSize)),a=i.pageSize*i.pageIndex,l=Math.floor(a/s);return{...i,pageIndex:l,pageSize:s}})},t.setPageCount=o=>t.setPagination(i=>{var s;let a=Ot(o,(s=t.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),t.getPageOptions=Y(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,a)=>a)),i},X(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}}},ks=()=>({top:[],bottom:[]}),mS={getInitialState:t=>({rowPinning:ks(),...t}),getDefaultOptions:t=>({onRowPinningChange:Re("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,o,i)=>{const s=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],a=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],l=new Set([...a,t.id,...s]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,p;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(l!=null&&l.has(g))),bottom:[...((p=d==null?void 0:d.bottom)!=null?p:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)]}}if(n==="top"){var m,h;return{top:[...((m=d==null?void 0:d.top)!=null?m:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)],bottom:((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(l!=null&&l.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(l!=null&&l.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(l!=null&&l.has(g)))}})},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,s=n.some(l=>o==null?void 0:o.includes(l)),a=n.some(l=>i==null?void 0:i.includes(l));return s?"top":a?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const s=(n=e._getPinnedRows(i))==null?void 0:n.map(a=>{let{id:l}=a;return l});return(o=s==null?void 0:s.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?ks():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:ks())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=Y(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const l=t.getRow(a,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(a=>e.find(l=>l.id===a))).filter(Boolean).map(a=>({...a,position:o}))},X(t.options,"debugRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=Y(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(s=>!i.has(s.id))},X(t.options,"debugRows"))}},hS={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("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(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(s=>{xs(i,s.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getFilteredSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(t.options,"debugTable")),t.getGroupedSelectedRowModel=Y(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Ss(t,n):{rows:[],flatRows:[],rowsById:{}},X(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(s=>{var a;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return s;const l={...s};return xs(l,t.id,n,(a=o==null?void 0:o.selectChildren)!=null?a:!0,e),l})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Cs(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return ws(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return ws(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)}}}},xs=(t,e,n,o,i)=>{var s;const a=i.getRow(e,!0);n?(a.getCanMultiSelect()||Object.keys(t).forEach(l=>delete t[l]),a.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(l=>xs(t,l.id,n,o,i))};function Ss(t,e){const n=t.getState().rowSelection,o=[],i={},s=function(a,l){return a.map(d=>{var c;const u=Cs(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:s(d.subRows)}),u)return d}).filter(Boolean)};return{rows:s(e.rows),flatRows:o,rowsById:i}}function Cs(t,e){var n;return(n=e[t.id])!=null?n:!1}function ws(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return t.subRows.forEach(a=>{if(!(s&&!i)&&(a.getCanSelect()&&(Cs(a,e)?s=!0:i=!1),a.subRows&&a.subRows.length)){const l=ws(a,e);l==="all"?s=!0:(l==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const As=/([0-9]+)/gm,gS=(t,e,n)=>Zc(It(t.getValue(n)).toLowerCase(),It(e.getValue(n)).toLowerCase()),bS=(t,e,n)=>Zc(It(t.getValue(n)),It(e.getValue(n))),yS=(t,e,n)=>vs(It(t.getValue(n)).toLowerCase(),It(e.getValue(n)).toLowerCase()),kS=(t,e,n)=>vs(It(t.getValue(n)),It(e.getValue(n))),xS=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},SS=(t,e,n)=>vs(t.getValue(n),e.getValue(n));function vs(t,e){return t===e?0:t>e?1:-1}function It(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Zc(t,e){const n=t.split(As).filter(Boolean),o=e.split(As).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),a=parseInt(i,10),l=parseInt(s,10),d=[a,l].sort();if(isNaN(d[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(d[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}return n.length-o.length}const io={alphanumeric:gS,alphanumericCaseSensitive:bS,text:yS,textCaseSensitive:kS,datetime:xS,basic:SS},CS=[eS,dS,iS,sS,tS,nS,cS,uS,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("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 s=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return io.datetime;if(typeof s=="string"&&(o=!0,s.split(As).length>1))return io.alphanumeric}return o?io.text:io.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 ur(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:io[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(a=>{const l=a==null?void 0:a.find(m=>m.id===t.id),d=a==null?void 0:a.findIndex(m=>m.id===t.id);let c=[],u,f=s?n:i==="desc";if(a!=null&&a.length&&t.getCanMultiSort()&&o?l?u="toggle":u="add":a!=null&&a.length&&d!==a.length-1?u="replace":l?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var p;c=[...a,{id:t.id,desc:f}],c.splice(0,c.length-((p=e.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=a.map(m=>m.id===t.id?{...m,desc:f}:m):u==="remove"?c=a.filter(m=>m.id!==t.id):c=[{id:t.id,desc:f}];return c})},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 s=t.getFirstSortDir(),a=t.getIsSorted();return a?a!==s&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":s},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())}},oS,fS,pS,mS,hS,aS];function wS(t){var e,n;const o=[...CS,...(e=t._features)!=null?e:[]];let i={_features:o};const s=i._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),a=p=>i.options.mergeOptions?i.options.mergeOptions(s,p):{...s,...p};let d={...{},...(n=t.initialState)!=null?n:{}};i._features.forEach(p=>{var m;d=(m=p.getInitialState==null?void 0:p.getInitialState(d))!=null?m:d});const c=[];let u=!1;const f={_features:o,options:{...s,...t},initialState:d,_queue:p=>{c.push(p),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:p=>{const m=Ot(p,i.options);i.options=a(m)},getState:()=>i.options.state,setState:p=>{i.options.onStateChange==null||i.options.onStateChange(p)},_getRowId:(p,m,h)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(p,m,h))!=null?g:`${h?[h.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(p,m)=>{let h=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[p];if(!h&&(h=i.getCoreRowModel().rowsById[p],!h))throw new Error;return h},_getDefaultColumnDef:Y(()=>[i.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:h=>{const g=h.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:h=>{var g,b;return(g=(b=h.renderValue())==null||b.toString==null?void 0:b.toString())!=null?g:null},...i._features.reduce((h,g)=>Object.assign(h,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...p}},X(t,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Y(()=>[i._getColumnDefs()],p=>{const m=function(h,g,b){return b===void 0&&(b=0),h.map(y=>{const S=_x(i,y,b,g),v=y;return S.columns=v.columns?m(v.columns,S,b+1):[],S})};return m(p)},X(t,"debugColumns")),getAllFlatColumns:Y(()=>[i.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),X(t,"debugColumns")),_getAllFlatColumnsById:Y(()=>[i.getAllFlatColumns()],p=>p.reduce((m,h)=>(m[h.id]=h,m),{}),X(t,"debugColumns")),getAllLeafColumns:Y(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(p,m)=>{let h=p.flatMap(g=>g.getLeafColumns());return m(h)},X(t,"debugColumns")),getColumn:p=>i._getAllFlatColumnsById()[p]};Object.assign(i,f);for(let p=0;p<i._features.length;p++){const m=i._features[p];m==null||m.createTable==null||m.createTable(i)}return i}function AS(){return t=>Y(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,a){s===void 0&&(s=0);const l=[];for(let c=0;c<i.length;c++){const u=cs(t,t._getRowId(i[c],c,a),i[c],c,s,void 0,a==null?void 0:a.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return l};return n.rows=o(e),n},X(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function vS(){return t=>Y(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:$c(n),X(t.options,"debugTable"))}function $c(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 BS(t,e,n){return n.options.filterFromLeafRows?DS(t,e,n):VS(t,e,n)}function DS(t,e,n){var o;const i=[],s={},a=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(d,c){c===void 0&&(c=0);const u=[];for(let p=0;p<d.length;p++){var f;let m=d[p];const h=cs(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(h.columnFilters=m.columnFilters,(f=m.subRows)!=null&&f.length&&c<a){if(h.subRows=l(m.subRows,c+1),m=h,e(m)&&!h.subRows.length){u.push(m),s[m.id]=m,i.push(m);continue}if(e(m)||h.subRows.length){u.push(m),s[m.id]=m,i.push(m);continue}}else m=h,e(m)&&(u.push(m),s[m.id]=m,i.push(m))}return u};return{rows:l(t),flatRows:i,rowsById:s}}function VS(t,e,n){var o;const i=[],s={},a=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,l=function(d,c){c===void 0&&(c=0);const u=[];for(let p=0;p<d.length;p++){let m=d[p];if(e(m)){var f;if((f=m.subRows)!=null&&f.length&&c<a){const g=cs(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=l(m.subRows,c+1),m=g}u.push(m),i.push(m),s[m.id]=m}}return u};return{rows:l(t),flatRows:i,rowsById:s}}function PS(){return t=>Y(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let p=0;p<e.flatRows.length;p++)e.flatRows[p].columnFilters={},e.flatRows[p].columnFiltersMeta={};return e}const i=[],s=[];(n??[]).forEach(p=>{var m;const h=t.getColumn(p.id);if(!h)return;const g=h.getFilterFn();g&&i.push({id:p.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(p.value))!=null?m:p.value})});const a=n.map(p=>p.id),l=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());o&&l&&d.length&&(a.push("__global__"),d.forEach(p=>{var m;s.push({id:p.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?m:o})}));let c,u;for(let p=0;p<e.flatRows.length;p++){const m=e.flatRows[p];if(m.columnFilters={},i.length)for(let h=0;h<i.length;h++){c=i[h];const g=c.id;m.columnFilters[g]=c.filterFn(m,g,c.resolvedValue,b=>{m.columnFiltersMeta[g]=b})}if(s.length){for(let h=0;h<s.length;h++){u=s[h];const g=u.id;if(u.filterFn(m,g,u.resolvedValue,b=>{m.columnFiltersMeta[g]=b})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const f=p=>{for(let m=0;m<a.length;m++)if(p.columnFilters[a[m]]===!1)return!1;return!0};return BS(e.rows,f,t)},X(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function ES(t){return e=>Y(()=>[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:s}=n;let{rows:a,flatRows:l,rowsById:d}=o;const c=i*s,u=c+i;a=a.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:a,flatRows:l,rowsById:d}:f=$c({rows:a,flatRows:l,rowsById:d}),f.flatRows=[];const p=m=>{f.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return f.rows.forEach(p),f},X(e.options,"debugTable"))}function FS(){return t=>Y(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],s=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),a={};s.forEach(d=>{const c=t.getColumn(d.id);c&&(a[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const l=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let m=0;m<s.length;m+=1){var p;const h=s[m],g=a[h.id],b=g.sortUndefined,y=(p=h==null?void 0:h.desc)!=null?p:!1;let S=0;if(b){const v=u.getValue(h.id),w=f.getValue(h.id),x=v===void 0,F=w===void 0;if(x||F){if(b==="first")return x?-1:1;if(b==="last")return x?1:-1;S=x&&F?0:x?b:-b}}if(S===0&&(S=g.sortingFn(u,f,h.id)),S!==0)return y&&(S*=-1),g.invertSorting&&(S*=-1),S}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=l(u.subRows))}),c};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},X(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
82
82
  * vue-table
83
83
  *
84
84
  * Copyright (c) TanStack
@@ -87,5 +87,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
87
87
  * LICENSE.md file in the root directory of this source tree.
88
88
  *
89
89
  * @license MIT
90
- */function hr(){return!0}const PS=Symbol("merge-proxy"),ES={get(t,e,n){return e===PS?n:t.get(e)},has(t,e){return t.has(e)},set:hr,deleteProperty:hr,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:hr,deleteProperty:hr}},ownKeys(t){return t.keys()}};function Bs(t){return"value"in t?t.value:t}function gr(){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 s=Bs(e[i])[o];if(s!==void 0)return s}},has(o){for(let i=e.length-1;i>=0;i--)if(o in Bs(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(Bs(e[i])));return[...Array.from(new Set(o))]}},ES)}const br=r.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?r.h(t.render,t.props):t.render});function FS(t){const e=gr({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return gr(i,s)}},t),n=xS(e),o=r.ref(n.initialState);return r.watchEffect(()=>{n.setOptions(i=>{var s;const a=new Proxy({},{get:(l,d)=>o.value[d]});return gr(i,t,{state:gr(a,(s=t.state)!=null?s:{}),onStateChange:l=>{l instanceof Function?o.value=l(o.value):o.value=l,t.onStateChange==null||t.onStateChange(l)}})})}),n}const NS=["checked","disabled","indeterminate"],_c=Z(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((...s)=>o.onChange&&o.onChange(...s),["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,NS),o.indeterminate||o.checked?(r.openBlock(),r.createBlock(Q,{key:0,name:n.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-dbf1ded4"]]),eu=r.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=J(t,"modelValue"),o=r.ref(!1);return(i,s)=>(r.openBlock(),r.createBlock(_e,{"max-height":264,shift:"",onMenuChanged:s[0]||(s[0]=a=>o.value=a)},{"menu-button":r.withCtx(()=>{var a;return[r.createVNode(G,{icon:o.value?"expand_less":"expand_more",label:(a=i.items.find(l=>l.value===i.modelValue))==null?void 0:a.label,"icon-position":"append",size:"md",variant:"tertiary"},null,8,["icon","label"])]}),"menu-wrapper":r.withCtx(({maxHeight:a})=>[r.createElementVNode("div",{style:r.normalizeStyle({maxHeight:a}),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(xe,{key:l.value,label:l.label,"model-value":l.value===r.unref(n),value:l.value,"onUpdate:modelValue":d=>n.value=l.value},null,8,["label","model-value","value","onUpdate:modelValue"]))),128))],4)]),_:1}))}}),MS={class:"overflow-y-auto"},OS={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},IS=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),RS=["onClick"],TS={key:0},zS={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},LS={key:1,class:"w-full"},HS={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},US=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),jS=["onClick"],QS={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},WS={class:"flex gap-8 items-center"},YS=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),XS={class:"flex gap-8"},GS=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},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean}},setup(t){const e=t,n=J(e,"modelValue"),o=J(e,"searchValue"),i=r.ref(e.rowData),s=()=>{let x=e.columnDefs;return e.selection&&(x=[{id:"row-selection",header:({table:F})=>r.createVNode(_c,{checked:F.getIsAllPageRowsSelected(),indeterminate:F.getIsSomePageRowsSelected(),onChange:F.getToggleAllPageRowsSelectedHandler()},null),cell:({row:F})=>r.createVNode(_c,{checked:F.getIsSelected(),disabled:!F.getCanSelect(),onChange:F.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"}},...x]),x},a=r.ref([]);r.watch(()=>e.rowData,x=>{i.value=[...x]},{deep:!0});const l=r.ref({pageIndex:0,pageSize:e.pageSize}),d=FS({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:s(),get data(){return i.value},state:{get pagination(){return typeof e.fetchFn=="function"?l.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return a.value}},getCoreRowModel:SS(),getSortedRowModel:VS(),getFilteredRowModel:BS(),getPaginationRowModel:DS(),onRowSelectionChange:x=>{if(!p.value)return n.value=typeof x=="function"?x(n.value):x},onSortingChange:x=>{a.value=typeof x=="function"?x(a.value):x},onGlobalFilterChange:x=>{o.value=typeof x=="function"?x(o.value):x},autoResetPageIndex:e.autoResetPageIndex,manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:x=>l.value=typeof x=="function"?x(l.value):x},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0,getSubRows:x=>x.subRows,getExpandedRowModel:CS()});r.watch(()=>l.value,x=>{f(x)});const c=r.ref(""),u=r.ref(!1);async function f(x){if(!e.fetchFn)return;u.value=!0;const F=`${Math.random()}`;c.value=F;try{await e.fetchFn(x)}catch{}finally{c.value===F&&(u.value=!1)}}const p=r.computed(()=>{const x=u.value;return typeof e.loading=="boolean"?e.loading:x});r.watch(()=>e.rowData,()=>{d.setOptions(x=>({...x,data:e.rowData}))}),r.watch([()=>e.pageCount,()=>e.rowCount],()=>{d.setOptions(x=>({...x,pageCount:e.pageCount,rowCount:e.rowCount}))}),r.watch(()=>e.pageSize,()=>{d.setPageSize(e.pageSize)}),r.watch([()=>e.columnFilter],([x])=>{d.setColumnFilters(()=>x??[])}),r.watch(()=>e.columnDefs,()=>{d.setOptions(x=>({...x,columns:s()}))}),r.onMounted(()=>{e.fetchFn&&e.fetchFn(d.getState().pagination),d.setPageSize(e.pageSize)});const m=r.ref(380);function h(x){var E;const F=((E=x.el)==null?void 0:E.scrollHeight)??0;m.value=Math.max(100,F)}const g=xt(),b=r.ref(),y=r.ref(typeof e.shrinkAt=="boolean"&&!e.shrinkAt?!1:g.isBreakpointKeyword(e.shrinkAt)&&g.isAtMost(e.shrinkAt)),S=r.computed(()=>{const x=[...Array.from(Array(5),(E,M)=>(M+1)*10).map(E=>({label:E.toString(),value:E}))],F={label:"All",value:e.rowData.length};return e.pageSize&&e.pageSize>0&&(x.some(E=>E.value===e.pageSize)||(x.push({label:e.pageSize.toString(),value:e.pageSize}),x.sort((E,M)=>E.value-M.value))),[...x,F]});function v(x){const F=x.el;if(!F||typeof e.shrinkAt>"u"||typeof e.shrinkAt=="boolean"&&!e.shrinkAt)return;const E=is(function(){if(b.value=F.clientWidth,g.isBreakpointKeyword(e.shrinkAt)){y.value=g.isAtMost(e.shrinkAt);return}const M=Number(e.shrinkAt);if(isNaN(M)){y.value=!1;return}y.value=F.scrollWidth>=M},200);F.resizeTable??(F.resizeTable=function(){y.value=g.isBreakpointKeyword(e.shrinkAt)&&g.isAtMost(e.shrinkAt),E()}),window.addEventListener("resize",F.resizeTable),F.resizeTable()}function w(x){const F=x.el;!F||typeof e.shrinkAt>"u"||typeof e.shrinkAt=="boolean"&&!e.shrinkAt||F.resizeTable&&window.removeEventListener("resize",F.resizeTable)}return(x,F)=>{const E=r.resolveComponent("FmListItem"),M=r.resolveComponent("FmList"),I=r.resolveComponent("FmTableHeader");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:v,onVnodeUnmounted:w},[r.createElementVNode("div",MS,[y.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[p.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${m.value}px`})},[r.createElementVNode("div",OS,[r.createVNode(St),r.createVNode(tn,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(x.$slots,"loading-text",{},()=>[IS])]),r.createVNode(St)])],4)):(r.openBlock(),r.createBlock(M,{key:1,onVnodeMounted:h},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d).getRowModel().rows,N=>r.renderSlot(x.$slots,"list-row",r.normalizeProps(r.mergeProps({key:N.id},N)),()=>[r.createVNode(E,{style:{padding:"0"},class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":N.getIsSelected(),"cursor-pointer":typeof x.onRowClick=="function"}]),tag:"label"},{prepend:r.withCtx(()=>{var C,D,A,k,B;return[r.createVNode(r.unref(br),{render:(A=(D=(C=N.getVisibleCells().find(V=>V.column.id==="row-selection"))==null?void 0:C.column)==null?void 0:D.columnDef)==null?void 0:A.cell,props:(B=(k=N.getVisibleCells().find(V=>V.column.id==="row-selection"))==null?void 0:k.getContext)==null?void 0:B.call(k)},null,8,["render","props"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:C=>{var D;return(D=x.onRowClick)==null?void 0:D.call(x,N)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N.getVisibleCells(),C=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:C.id},[C.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",TS,[r.createElementVNode("span",zS,[r.createVNode(r.unref(br),{render:C.column.columnDef.cell,props:C.getContext()},null,8,["render","props"])])])):r.createCommentVNode("",!0)],64))),128))],8,RS)]),_:2},1032,["class"])])),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock("table",LS,[x.pinHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(I,{key:0,table:r.unref(d)},null,8,["table"])),r.renderSlot(x.$slots,"pin-top"),r.createElementVNode("tbody",{onVnodeMounted:h},[p.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${m.value}px`})},[r.createElementVNode("div",HS,[r.createVNode(St),r.createVNode(tn,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(x.$slots,"loading-text",{},()=>[US])]),r.createVNode(St)])],4)):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(r.unref(d).getRowModel().rows,N=>r.renderSlot(x.$slots,"table-row",r.normalizeProps(r.mergeProps({key:N.id},N)),()=>[r.createElementVNode("tr",{class:r.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",[{"bg-fm-color-neutral-gray-100":N.getIsSelected(),"cursor-pointer":typeof x.onRowClick=="function"},x.rowClassName]]),onClick:C=>{var D;return(D=x.onRowClick)==null?void 0:D.call(x,N)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N.getVisibleCells(),C=>{var D,A,k,B;return r.openBlock(),r.createElementBlock("td",{key:C.id,class:r.normalizeClass([p.value?"hidden":"","h-[52px] px-16 text-fm-color-typo-primary",((D=C.column.columnDef.meta)==null?void 0:D.cellClass)??"px-16"]),style:r.normalizeStyle({width:(A=C.column.columnDef.meta)==null?void 0:A.width,maxWidth:(k=C.column.columnDef.meta)==null?void 0:k.maxWidth,textAlign:((B=C.column.columnDef.meta)==null?void 0:B.textAlign)??"left"})},[r.createElementVNode("span",QS,[r.createVNode(r.unref(br),{render:C.column.columnDef.cell,props:C.getContext()},null,8,["render","props"])])],6)}),128))],10,jS)])),128))],512),x.pinHeaderRow?(r.openBlock(),r.createBlock(I,{key:1,class:"bg-fm-color-neutral-gray-100 sticky top-0",table:r.unref(d)},null,8,["table"])):r.createCommentVNode("",!0)]))]),x.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"basis-72 bg-white flex items-center justify-between px-24",style:r.normalizeStyle({maxWidth:b.value?`${b.value}px`:void 0})},[y.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex gap-24 items-center justify-between xs:hidden xs:invisible",{"hidden invisible":x.forceMobileFooter}])},[r.createElementVNode("div",WS,[YS,r.createVNode(eu,{"model-value":r.unref(d).getState().pagination.pageSize,items:S.value,"onUpdate:modelValue":F[0]||(F[0]=N=>r.unref(d).setPageSize(N))},null,8,["model-value","items"])]),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible",{"hidden invisible":x.forceMobileFooter}])},r.toDisplayString(e.rowData.length<r.unref(d).getState().pagination.pageSize?e.rowData.length:r.unref(d).getState().pagination.pageIndex*r.unref(d).getState().pagination.pageSize+1)+" - "+r.toDisplayString((r.unref(d).getState().pagination.pageIndex+1)*r.unref(d).getState().pagination.pageSize)+" of "+r.toDisplayString(e.rowCount??e.rowData.length)+" items ",3)],2)),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":y.value||x.forceMobileFooter,"xs:w-full xs:justify-between":!y.value}])},[r.createVNode(eu,{"model-value":r.unref(d).getState().pagination.pageIndex+1,items:Array.from(Array(r.unref(d).getPageCount()),(N,C)=>C+1).map(N=>({label:N.toString(),value:N})),"onUpdate:modelValue":F[1]||(F[1]=N=>r.unref(d).setPageIndex(N?N-1:0))},null,8,["model-value","items"]),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto",{"mr-auto":y.value||x.forceMobileFooter}])}," of "+r.toDisplayString(r.unref(d).getPageCount())+" pages ",3),r.createElementVNode("div",XS,[r.createVNode(G,{disabled:!r.unref(d).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:F[2]||(F[2]=()=>r.unref(d).previousPage())},null,8,["disabled"]),r.createVNode(G,{disabled:!r.unref(d).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:F[3]||(F[3]=()=>r.unref(d).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),qS=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),JS=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),s=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),a=r.computed(()=>{const c=n.items.slice(0,n.showMoreAt-1),u=n.items.find(p=>{var m;return p.value===n.modelValue||((m=p.children)==null?void 0:m.find(h=>h.value===n.modelValue))}),f=c.map(p=>p.value);return u&&f.includes(u.value)?n.items.slice(0,n.showMoreAt):u?[...c,u]:c}),l=r.computed(()=>{const c=a.value.map(u=>u.value);return n.items.filter(u=>!c.includes(u.value))}),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,f=>r.renderSlot(c.$slots,"default",r.normalizeProps(r.guardReactiveProps({...f,tabsProps:s.value})),()=>[r.createVNode(Hc,r.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:s.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=p=>o("update:modelValue",p))}),null,16,["model-value","disabled","vertical"])])),256)),l.value.length>0?(r.openBlock(),r.createBlock(_e,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onMenuChanged:u[1]||(u[1]=f=>i.value=f)},{"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",[c.vertical?"h-40":"h-[46px]"]])},[r.createVNode(Q,{name:"more_vert"}),qS],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,f=>{var p;return r.openBlock(),r.createElementBlock(r.Fragment,{key:f.value},[(p=f.children)!=null&&p.length?(r.openBlock(),r.createBlock(_e,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(xe,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,expandable:""},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(Tt,{key:0,value:f.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(f.children,m=>(r.openBlock(),r.createBlock(xe,{key:m.value,"model-value":n.modelValue===m.value,label:m.label,icon:m.icon,disabled:m.disabled,onClick:h=>d(m.value)},{append:r.withCtx(()=>[m.badge?(r.openBlock(),r.createBlock(Tt,{key:0,value:m.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(xe,{key:1,"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:m=>d(f.value)},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(Tt,{key:0,value:f.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))}}),KS=["tabindex"],ZS=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},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=J(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),s=r.computed(()=>{if(!o.value)return 0;function p(h){return h.children?[h,...h.children.flatMap(p)]:[h]}return 56*(e.children?e.children.flatMap(p):[]).length});function a(){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 d(p){return p.children&&p.children.length?p.children.some(d):e.modelValue===p.value}const c=r.computed(()=>{const p=d(e);return o.value?p&&i.value:p}),u=r.computed(()=>e.children?e.children.map(({modelValue:p,indentation:m,active:h,focusable:g,...b})=>{const y=d(b);return{...b,expand:y,focusable:!b.disabled&&!i.value}}):[]),f=r.computed(()=>{switch(e.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(p,m)=>{const h=r.resolveComponent("FmCollapsibleTab",!0),g=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({paddingLeft:`${f.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 ":!p.disabled,"cursor-not-allowed":p.disabled,"bg-fm-color-system-warning-100":c.value}]),tabindex:l.value?"0":"-1",type:"button",onClick:a},[p.icon?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass({"text-fm-color-typo-disabled":p.disabled,"text-fm-color-typo-primary":!p.disabled&&!c.value,"text-fm-color-primary":!p.disabled&&c.value}),name:p.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":!p.disabled&&!c.value,"text-fm-color-primary":!p.disabled&&c.value,"text-fm-color-typo-disabled":p.disabled}])},r.toDisplayString(p.label),3),p.badge?(r.openBlock(),r.createBlock(Tt,{key:1,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):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(Q,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!p.disabled,"text-fm-color-typo-disabled":p.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):r.createCommentVNode("",!0)],10,KS)),[[g,!p.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxHeight:i.value?0:`${s.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(u.value,(b,y)=>(r.openBlock(),r.createBlock(h,r.mergeProps({key:y,"model-value":r.unref(n),"onUpdate:modelValue":m[0]||(m[0]=S=>r.isRef(n)?n.value=S:null),indentation:p.indentation+1},b),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)],4)}}}),$S={class:"flex flex-col"},_S=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=J(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:s,...a})=>a):[]);function i(s){function a(d){return d.children?d.children.flatMap(a):[d.value]}return(s.children?s.children.flatMap(a):[s.value]).includes(e.modelValue)}return(s,a)=>(r.openBlock(),r.createElementBlock("div",$S,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(l,d)=>(r.openBlock(),r.createBlock(ZS,r.mergeProps({key:d},l,{"model-value":r.unref(n),"onUpdate:modelValue":a[0]||(a[0]=c=>r.isRef(n)?n.value=c:null),active:i(l),expand:i(l)}),null,16,["model-value","active","expand"]))),128))]))}}),eC=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))}}),tC=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(Q,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),nC={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},oC={class:"flex gap-4 items-center xs:hidden"},rC={key:1,class:"hidden xs:flex"},iC={class:"absolute bottom-16 hidden right-16 xs:inline"},sC=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}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const a=[...n.actions],l=a.findIndex(p=>p.isPrimary),d=a[l],[c,u,...f]=a.filter((p,m)=>m!==l);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:a.filter(p=>!p.isPrimary),fabActions:a.filter(p=>p.isPrimary)}}),s=r.ref(!1);return(a,l)=>(r.openBlock(),r.createElementBlock("div",nC,[a.backButton?(r.openBlock(),r.createBlock(G,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:l[0]||(l[0]=d=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(a.$slots,"prepend"),r.createVNode(ds,{class:"flex-grow",title:a.title,description:a.description,"title-bold":a.titleBold},{title:r.withCtx(()=>[r.renderSlot(a.$slots,"title")]),description:r.withCtx(()=>[r.renderSlot(a.$slots,"description")]),_:3},8,["title","description","title-bold"]),r.createElementVNode("div",oC,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(G,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:l[1]||(l[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(G,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:l[2]||(l[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(_e,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(G,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,d=>(r.openBlock(),r.createBlock(xe,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(G,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:l[3]||(l[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(G,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:l[4]||(l[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",rC,[r.createVNode(G,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:l[5]||(l[5]=d=>s.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(a.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Er,{"model-value":s.value,"onUpdate:modelValue":l[6]||(l[6]=d=>s.value=d),"dismiss-away":"","z-index":n.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(as,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,d=>(r.openBlock(),r.createBlock(ls,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),s.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),r.createElementVNode("div",iC,[i.value.primaryAction?(r.openBlock(),r.createBlock(G,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:l[7]||(l[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)])]))]))}}),aC=["colSpan","onClick"],lC={class:"flex gap-8 items-center justify-between"},dC=r.defineComponent({__name:"FmTableHeader",props:{table:{}},setup(t){function e(n){return n.column.columnDef.meta}return(n,o)=>{const i=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("thead",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.table.getHeaderGroups(),s=>(r.openBlock(),r.createElementBlock("tr",{key:s.id},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.headers,a=>{var l,d,c,u;return r.openBlock(),r.createElementBlock("th",{key:a.id,colSpan:a.colSpan,class:r.normalizeClass(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",a.column.getCanSort()?"cursor-pointer select-none":"",((l=e(a))==null?void 0:l.headerClass)??"px-16 py-12"]),style:r.normalizeStyle({width:`${(d=e(a))==null?void 0:d.width}`,maxWidth:(c=e(a))==null?void 0:c.maxWidth,textAlign:((u=e(a))==null?void 0:u.textAlign)??"left"}),onClick:f=>{var p;return(p=a.column.getToggleSortingHandler())==null?void 0:p(f)}},[r.createElementVNode("div",lC,[a.isPlaceholder?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(br),{key:0,render:a.column.columnDef.header,props:a.getContext()},null,8,["render","props"])),a.column.getCanSort()?(r.openBlock(),r.createBlock(i,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[a.column.getIsSorted()]??"unfold_more"},null,8,["name"])):r.createCommentVNode("",!0)])],14,aC)}),128))]))),128))])}}}),cC={class:"fm-typo-title-sm-700 font-bold"},uC={class:"flex"},tu={FmBadge:Tt,FmBottomSheet:Er,FmBreadcrumb:_u,FmButton:G,FmButtonGroup:cf,FmCard:Nr,FmCardActionArea:uf,FmCardActions:pf,FmCardHeader:hf,FmCardMedia:bf,FmCardSection:Mr,FmCardSubtitle:Js,FmCardTitle:qs,FmChip:Or,FmChipGroup:Ir,FmDialog:vf,FmDropField:Vf,FmDynamicDialog:ta,FmLineChart:Sd,FmPieChart:$0,FmBarChart:r1,FmScorecard:Z(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=(a,l)=>{if(a===""||l==="")return null;const d=Number(a),c=Number(l);let u=0;c===0?d===0?u=0:u=1:u=(d-c)/c;const f=o(u);return{value:isNaN(u)?"":`${(u*100).toFixed(0)}%`,icon:f}};function o(a){return a>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:a<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:a,compareValue:l}=e;return l?n(a,l):null}),s=r.computed(()=>{var a;return((a=e.sparklineData)==null?void 0:a.datasets.map(l=>{var d;return{label:l.name,data:l.values,fill:!0,color:((d=i.value)==null?void 0:d.icon.color)??"fm-color-system-info-300"}}))??[]});return(a,l)=>(r.openBlock(),r.createBlock(Nr,{variant:"outlined",class:"flex flex-col gap-2 p-5"},{default:r.withCtx(()=>[r.createVNode(zi,{content:e.description},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"title",{},()=>[r.createElementVNode("p",{class:r.normalizeClass(["fm-typo-body-md-400 w-full truncate",e.description?"border-b-2 border-dotted":""])},r.toDisplayString(e.title),3)],!0)]),_:3},8,["content"]),r.createElementVNode("p",cC,r.toDisplayString(e.value),1),a.hideCompare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",uC,[i.value?(r.openBlock(),r.createBlock(Or,{key:0,compact:"",class:r.normalizeClass(`bg-${i.value.icon.tailwind}`)},{default:r.withCtx(()=>[r.createVNode(Q,{name:i.value.icon.name,color:i.value.icon.color},null,8,["name","color"]),r.createElementVNode("p",{class:"fm-typo-body-md-700",style:r.normalizeStyle({color:i.value.icon.color})},r.toDisplayString(i.value.value),5)]),_:1},8,["class"])):r.createCommentVNode("",!0)]),r.renderSlot(a.$slots,"compare",{},void 0,!0)],64)),e.sparklineData?(r.openBlock(),r.createBlock(Nr,{key:1},{default:r.withCtx(()=>[r.createVNode(Sd,{class:"sparkline",datasets:s.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:e.sparklineData.dimension}},null,8,["datasets","x-axis"])]),_:1})):r.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-271136dc"]]),FmCheckbox:Cd,FmDatePicker:vb,FmDatePickerMobile:Wd,FmDateRangePicker:O2,FmDateRangePickerMobile:qd,FmSimpleDatePicker:sy,FmSimpleDatePickerMobile:Kd,FmSimpleDateRangePicker:zy,FmSimpleDateRangePickerMobile:Zd,FmField:de,FmForm:Ly,FmFormGroup:Se,FmHelperText:wd,FmLabel:Zt,FmPhoneNumber:_k,FmPinField:n8,FmRadio:d8,FmRadioGroup:c8,FmSearch:os,FmGlobalSearch:T8,FmSelect:mn,FmStepperField:j8,FmSwitch:Hi,FmTextField:ts,FmTextarea:W8,FmTimeInput:cr,FmTimePicker:ox,FmTimeRangePicker:ux,FmIcon:Q,FmList:as,FmListItem:ls,FmMenu:_e,FmMenuDeprecated:gx,FmMenuDivider:Yd,FmMenuHeader:yx,FmMenuItem:xe,FmCircularProgress:tn,FmLinearProgress:wx,FmSideSheet:Vx,FmSnackbar:Lc,FmSpacer:St,FmStep:Ox,FmStepper:Tx,FmTab:Hc,FmTable:GS,FmTableToolbar:Yx,FmTableHeader:dC,FmTabs:JS,FmCollapsibleTabs:_S,FmTooltip:zi,FmAvatar:eC,FmThumbnail:tC,FmPageHead:sC,FmTopSheet:Ic,FmPopover:mt,FmOverlay:en},fC=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),s=r.computed(()=>e.reference());let a;const{floatingStyles:l,middlewareData:d,placement:c}=eo(s,o,{whileElementsMounted:$n,placement:e.placement,middleware:[_n(),Jn({mainAxis:6}),zd({element:i})]}),u=r.computed(()=>{var h,g,b,y;const m={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((h=d.value.arrow)==null?void 0:h.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((b=d.value.arrow)==null?void 0:b.y)!=null?`${(y=d.value.arrow)==null?void 0:y.y}px`:"",[m]:"-3px"}}),f=()=>{e.disabled||(a&&clearTimeout(a),a=setTimeout(()=>{n.value=!0},250))},p=()=>{e.disabled||(a&&clearTimeout(a),a=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{s.value.addEventListener("pointerdown",f),s.value.addEventListener("pointermove",m=>{m.pointerType!=="touch"&&f()}),s.value.addEventListener("pointerleave",p),s.value.addEventListener("pointerup",p)}),r.onBeforeUnmount(()=>{s.value.removeEventListener("pointerdown",f),s.value.removeEventListener("pointermove",m=>{m.pointerType!=="touch"&&f()}),s.value.removeEventListener("pointerleave",p),s.value.removeEventListener("pointerup",p)}),(m,h)=>n.value&&!m.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))},[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(u.value)},null,4),[[r.vShow,!m.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(m.content),1)],4)):r.createCommentVNode("",!0)}});let Ds;const It=r.ref([]);let nu=0;const pC=()=>{if(Ds)return;const t=document.createElement("div");document.body.appendChild(t),Ds=r.createApp({render:()=>It.value.map(e=>r.h(fC,e))}),Ds.mount(t)},yr=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},ou=(t,e)=>{const{value:n,modifiers:o}=e;pC(),t.$_fmTooltipId=nu,nu+=1,typeof n=="string"?It.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:yr(o),hideArrow:!1}):n&&typeof n=="object"&&It.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:yr(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},mC={mounted:ou,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=It.value.findIndex(s=>s.id===t.$_fmTooltipId);if(i===-1){ou(t,e);return}typeof n=="string"?It.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:yr(o),hideArrow:!1}:n&&typeof n=="object"&&(It.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:yr(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=It.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&It.value.splice(e,1)}},kr=16,hC=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=xt(),n=r.inject(Fr),o=r.computed(()=>{var a;return[...((a=n==null?void 0:n.store)==null?void 0:a.snackbars)??[]].reduce(({currentSum:l,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:l});const u=c.mountStage===Rt.EXPIRED?0:kr+c.renderedHeight;return{currentSum:l+u,tops:d}},{currentSum:kr,tops:new Array}).tops}),i=r.computed(()=>{var s,a;return(a=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:a.map(l=>{var c,u,f,p,m,h;let d=0;switch(l.mountStage){case Rt.PREMOUNT:{d=e.value.xs?0:kr;break}case Rt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===l.id))==null?void 0:f.accumulatedHeight)||kr;break}case Rt.EXPIRED:{d=((h=(m=(p=o.value)==null?void 0:p.find)==null?void 0:m.call(p,g=>g.id===l.id))==null?void 0:h.accumulatedHeight)||0,d=Math.max(0,d-l.renderedHeight);break}}return{...l,top:d}})});return(s,a)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,l=>(r.openBlock(),r.createBlock(r.Teleport,{key:l.id,to:"body"},[r.createVNode(Lc,{action:l.action,description:l.message,dismissable:l.dismissable,style:r.normalizeStyle(r.unref(e).xs?{bottom:`${l.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:l.mountStage===r.unref(Rt).EXPIRED?0:1}:{top:`${l.top}px`,right:l.mountStage===r.unref(Rt).PREMOUNT?"-20px":"16px",opacity:l.mountStage===r.unref(Rt).EXPIRED?0:1}),title:l.title,variant:l.type,"z-index":l.zIndex,class:"fixed transition-all z-10",onVnodeMounted:d=>{var c;return(c=r.unref(n))==null?void 0:c.onSnackbarMounted(l.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=l==null?void 0:l.onAction)==null||d.call(l),(c=r.unref(n))==null||c.close(l.id)},onOnDismiss:()=>{var d;return(d=r.unref(n))==null?void 0:d.close(l.id)}},null,8,["action","description","dismissable","style","title","variant","z-index","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var Rt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(Rt||{});class gC{constructor(){H(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},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(s=>s.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[o];this.store.snackbars[o]={...s,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.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)}}const bC={install(t){t.provide(Fr,new gC);const e=document.body,n=r.createVNode(hC);n.appContext=t._context,r.render(n,e)}};function yC(){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 xr;function Vs(){Vs.init||(Vs.init=!0,xr=yC()!==-1)}var Sr={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Vs(),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",xr&&this.$el.appendChild(t),t.data="about:blank",xr||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&&(!xr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const kC=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const xC={class:"resize-observer",tabindex:"-1"};r.popScopeId();const SC=kC((t,e,n,o,i,s)=>(r.openBlock(),r.createBlock("div",xC)));Sr.render=SC,Sr.__scopeId="data-v-b329ee4c",Sr.__file="src/components/ResizeObserver.vue";function Cr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cr=function(e){return typeof e}:Cr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cr(t)}function CC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ru(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 wC(t,e,n){return e&&ru(t.prototype,e),n&&ru(t,n),t}function iu(t){return AC(t)||vC(t)||BC(t)||DC()}function AC(t){if(Array.isArray(t))return Ps(t)}function vC(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function BC(t,e){if(t){if(typeof t=="string")return Ps(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 Ps(t,e)}}function Ps(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 DC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
91
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VC(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function PC(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s,a=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(s=u,!(o&&d===i)){var p=n.leading;typeof p=="function"&&(p=p(d,i)),(!o||d!==i)&&p&&t.apply(void 0,[d].concat(iu(s))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(iu(s))),o=0},e)}};return a._clear=function(){clearTimeout(o),o=null},a}function su(t,e){if(t===e)return!0;if(Cr(t)==="object"){for(var n in t)if(!su(t[n],e[n]))return!1;return!0}return!1}var EC=function(){function t(e,n,o){CC(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return wC(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=VC(n),this.callback=function(l,d){i.options.callback(l,d),l&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},a=s.leading;this.callback=PC(this.callback,this.options.throttle,{leading:function(d){return a==="both"||a==="visible"&&d||a==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var d=l[0];if(l.length>1){var c=l.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},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 au(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 EC(t,o,n);t._vue_visibilityState=i}}function FC(t,e,n){var o=e.value,i=e.oldValue;if(!su(o,i)){var s=t._vue_visibilityState;if(!o){lu(t);return}s?s.createObserver(o,n):au(t,{value:o},n)}}function lu(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var NC={beforeMount:au,updated:FC,unmounted:lu};function MC(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 du={itemsLimit:1e3},OC=/(auto|scroll)/;function cu(t,e){return t.parentNode===null?e:cu(t.parentNode,e.concat([t]))}var Es=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},IC=function(e){return Es(e,"overflow")+Es(e,"overflow-y")+Es(e,"overflow-x")},RC=function(e){return OC.test(IC(e))};function uu(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=cu(t.parentNode,[]),n=0;n<e.length;n+=1)if(RC(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Fs(t){"@babel/helpers - typeof";return Fs=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},Fs(t)}var fu={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 pu(){return this.items.length&&Fs(this.items[0])!=="object"}var Ns=!1;if(typeof window<"u"){Ns=!1;try{var TC=Object.defineProperty({},"passive",{get:function(){Ns=!0}});window.addEventListener("test",null,TC)}catch{}}let zC=0;var so={name:"RecycleScroller",components:{ResizeObserver:Sr},directives:{ObserveVisibility:NC},props:{...fu,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,s=0,a;for(let l=0,d=e.length;l<d;l++)a=e[l][n]||o,a<i&&(i=a),s+=a,t[l]={accumulator:s,size:a};return this.$_computedMinItemSize=i,t}return[]},simpleArray:pu,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 s=r.markRaw({id:zC++,index:e,used:!0,key:o,type:i}),a=r.shallowReactive({item:n,position:0,nr:s});return t.push(a),a},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,s=this.$_computedMinItemSize,a=this.typeField,l=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,p=this.$_unusedViews,m=this.pool,h=this.itemIndexByKey;let g,b,y,S,v;if(!c)g=b=S=v=y=0;else if(this.$_prerender)g=S=0,b=v=Math.min(this.prerender,d.length),y=null;else{const N=this.getScroll();if(e){let A=N.start-this.$_lastUpdateScrollPosition;if(A<0&&(A=-A),n===null&&A<s||A<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=N.start;const C=this.buffer;N.start-=C,N.end+=C;let D=0;if(this.$refs.before&&(D=this.$refs.before.scrollHeight,N.start-=D),this.$refs.after){const A=this.$refs.after.scrollHeight;N.end+=A}if(n===null){let A,k=0,B=c-1,V=~~(c/2),R;do R=V,A=u[V].accumulator,A<N.start?k=V:V<c-1&&u[V+1].accumulator>N.start&&(B=V),V=~~((k+B)/2);while(V!==R);for(V<0&&(V=0),g=V,y=u[c-1].accumulator,b=V;b<c&&u[b].accumulator<N.end;b++);for(b===-1?b=d.length-1:(b++,b>c&&(b=c)),S=g;S<c&&D+u[S].accumulator<N.start;S++);for(v=S;v<c&&D+u[v].accumulator<N.end;v++);}else{g=~~(N.start/n*o);const A=g%o;g-=A,b=Math.ceil(N.end/n*o),S=Math.max(0,Math.floor((N.start-D)/n*o)),v=Math.floor((N.end-D)/n*o),g<0&&(g=0),b>c&&(b=c),S<0&&(S=0),v>c&&(v=c),y=Math.ceil(c/o)*n}}b-g>du.itemsLimit&&this.itemsLimitError(),this.totalSize=y;let w;const x=g<=this.$_endIndex&&b>=this.$_startIndex;if(x)for(let N=0,C=m.length;N<C;N++)w=m[N],w.nr.used&&(t&&(w.nr.index=h[w.item[l]]),(w.nr.index==null||w.nr.index<g||w.nr.index>=b)&&this.unuseView(w));const F=x?null:new Map;let E,M,I;for(let N=g;N<b;N++){E=d[N];const C=l?E[l]:E;if(C==null)throw new Error(`Key is ${C} on item (keyField is '${l}')`);if(w=f.get(C),!n&&!u[N].size){w&&this.unuseView(w);continue}M=E[a];let D=p.get(M),A=!1;if(!w)x?D&&D.length?w=D.pop():w=this.addView(m,N,E,C,M):(I=F.get(M)||0,(!D||I>=D.length)&&(w=this.addView(m,N,E,C,M),this.unuseView(w,!0),D=p.get(M)),w=D[I],F.set(M,I+1)),f.delete(w.nr.key),w.nr.used=!0,w.nr.index=N,w.nr.key=C,w.nr.type=M,f.set(C,w),A=!0;else if(!w.nr.used&&(w.nr.used=!0,A=!0,D)){const k=D.indexOf(w);k!==-1&&D.splice(k,1)}w.item=E,A&&(N===d.length-1&&this.$emit("scroll-end"),N===0&&this.$emit("scroll-start")),n===null?(w.position=u[N-1].accumulator,w.offset=0):(w.position=Math.floor(N/o)*n,w.offset=N%o*i)}return this.$_startIndex=g,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",g,b,S,v),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let t=uu(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(),s=n?i.height:i.width;let a=-(n?i.top:i.left),l=n?window.innerHeight:window.innerWidth;a<0&&(l+=a,a=0),a+l>s&&(l=s-a),o={start:a,end:a+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,Ns?{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 s=uu(this.$el),a=s.tagName==="HTML"?0:s[e.scroll],l=s.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-l[e.start];n=s,o=e.scroll,i=t+a+c}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 LC={key:0,ref:"before",class:"vue-recycle-scroller__slot"},HC={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function UC(t,e,n,o,i,s){const a=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]=(...d)=>s.handleScroll&&s.handleScroll(...d))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",LC,[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,d=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.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===d.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",HC,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(a,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[l,s.handleVisibilityChange]])}so.render=UC,so.__file="src/components/RecycleScroller.vue";var wr={name:"DynamicScroller",components:{RecycleScroller:so},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:{...fu,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:pu,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,s=e.length;for(let a=0;a<s;a++){const l=e[a],d=o?a:l[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:l,id:d,size:c})}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 s=Math.min(t.length,e.length);for(let l=0;l<s&&!(o>=n);l++)o+=e[l].size||this.minItemSize,i+=t[l].size||this.minItemSize;const a=i-o;a!==0&&(this.$el.scrollTop+=a)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=MC()},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 jC(t,e,n,o,i,s){const a=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(a,r.mergeProps({ref:"scroller",items:s.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:s.onScrollerResize,onVisible:s.onScrollerVisible}),{default:r.withCtx(({item:l,index:d,active:c})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:l.item,index:d,active:c,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"])}wr.render=jC,wr.__file="src/components/DynamicScroller.vue";var Ms={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())}};Ms.__file="src/components/DynamicScrollerItem.vue";function QC(t,e){t.component("".concat(e,"recycle-scroller"),so),t.component("".concat(e,"RecycleScroller"),so),t.component("".concat(e,"dynamic-scroller"),wr),t.component("".concat(e,"DynamicScroller"),wr),t.component("".concat(e,"dynamic-scroller-item"),Ms),t.component("".concat(e,"DynamicScrollerItem"),Ms)}var WC={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"&&(du[i]=o[i]);o.installComponents&&QC(e,o.componentsPrefix)}};const YC=t=>{t.use(wu,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",mC),t.use(Nf),t.use(bC),t.use(WC),Object.entries(tu).forEach(([e,n])=>{t.component(e,n)})};ce.FeedMeUI=YC,ce.components=tu,ce.useBreakpoints=xt,ce.useDialog=kf,ce.useDialogChild=Sf,ce.useFocus=xn,ce.useFormChild=$s,ce.useProxiedModel=J,ce.useSnackbar=Cf,ce.useValidation=Zs,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});
90
+ */function hr(){return!0}const NS=Symbol("merge-proxy"),MS={get(t,e,n){return e===NS?n:t.get(e)},has(t,e){return t.has(e)},set:hr,deleteProperty:hr,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:hr,deleteProperty:hr}},ownKeys(t){return t.keys()}};function Bs(t){return"value"in t?t.value:t}function gr(){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 s=Bs(e[i])[o];if(s!==void 0)return s}},has(o){for(let i=e.length-1;i>=0;i--)if(o in Bs(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(Bs(e[i])));return[...Array.from(new Set(o))]}},MS)}const br=r.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?r.h(t.render,t.props):t.render});function OS(t){const e=gr({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return gr(i,s)}},t),n=wS(e),o=r.ref(n.initialState);return r.watchEffect(()=>{n.setOptions(i=>{var s;const a=new Proxy({},{get:(l,d)=>o.value[d]});return gr(i,t,{state:gr(a,(s=t.state)!=null?s:{}),onStateChange:l=>{l instanceof Function?o.value=l(o.value):o.value=l,t.onStateChange==null||t.onStateChange(l)}})})}),n}const IS=["checked","disabled","indeterminate"],_c=Z(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((...s)=>o.onChange&&o.onChange(...s),["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,IS),o.indeterminate||o.checked?(r.openBlock(),r.createBlock(Q,{key:0,name:n.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-dbf1ded4"]]),eu=r.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=J(t,"modelValue"),o=r.ref(!1);return(i,s)=>(r.openBlock(),r.createBlock(_e,{"max-height":264,shift:"",onMenuChanged:s[0]||(s[0]=a=>o.value=a)},{"menu-button":r.withCtx(()=>{var a;return[r.createVNode(G,{icon:o.value?"expand_less":"expand_more",label:(a=i.items.find(l=>l.value===i.modelValue))==null?void 0:a.label,"icon-position":"append",size:"md",variant:"tertiary"},null,8,["icon","label"])]}),"menu-wrapper":r.withCtx(({maxHeight:a})=>[r.createElementVNode("div",{style:r.normalizeStyle({maxHeight:a}),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(xe,{key:l.value,label:l.label,"model-value":l.value===r.unref(n),value:l.value,"onUpdate:modelValue":d=>n.value=l.value},null,8,["label","model-value","value","onUpdate:modelValue"]))),128))],4)]),_:1}))}}),RS={class:"overflow-y-auto"},TS={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},zS=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),LS=["onClick"],HS={key:0},US={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},jS={key:1,class:"w-full"},QS={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},WS=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),YS=["onClick"],XS={class:"fm-typo-en-body-md-400 line-clamp-2 w-full"},GS={class:"flex gap-8 items-center"},qS=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),JS={class:"flex gap-8"},KS=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},rowClassName:{},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{type:[String,Number,Boolean],default:"sm"},hideFooter:{type:Boolean},forceMobileFooter:{type:Boolean}},setup(t){const e=t,n=J(e,"modelValue"),o=J(e,"searchValue"),i=r.ref(e.rowData),s=()=>{let x=e.columnDefs;return e.selection&&(x=[{id:"row-selection",header:({table:F})=>r.createVNode(_c,{checked:F.getIsAllPageRowsSelected(),indeterminate:F.getIsSomePageRowsSelected(),onChange:F.getToggleAllPageRowsSelectedHandler()},null),cell:({row:F})=>r.createVNode(_c,{checked:F.getIsSelected(),disabled:!F.getCanSelect(),onChange:F.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"}},...x]),x},a=r.ref([]);r.watch(()=>e.rowData,x=>{i.value=[...x]},{deep:!0});const l=r.ref({pageIndex:0,pageSize:e.pageSize}),d=OS({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:s(),get data(){return i.value},state:{get pagination(){return typeof e.fetchFn=="function"?l.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return a.value}},getCoreRowModel:AS(),getSortedRowModel:FS(),getFilteredRowModel:PS(),getPaginationRowModel:ES(),onRowSelectionChange:x=>{if(!p.value)return n.value=typeof x=="function"?x(n.value):x},onSortingChange:x=>{a.value=typeof x=="function"?x(a.value):x},onGlobalFilterChange:x=>{o.value=typeof x=="function"?x(o.value):x},autoResetPageIndex:e.autoResetPageIndex,manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:x=>l.value=typeof x=="function"?x(l.value):x},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0,getSubRows:x=>x.subRows,getExpandedRowModel:vS()});r.watch(()=>l.value,x=>{f(x)});const c=r.ref(""),u=r.ref(!1);async function f(x){if(!e.fetchFn)return;u.value=!0;const F=`${Math.random()}`;c.value=F;try{await e.fetchFn(x)}catch{}finally{c.value===F&&(u.value=!1)}}const p=r.computed(()=>{const x=u.value;return typeof e.loading=="boolean"?e.loading:x});r.watch(()=>e.rowData,()=>{d.setOptions(x=>({...x,data:e.rowData}))}),r.watch([()=>e.pageCount,()=>e.rowCount],()=>{d.setOptions(x=>({...x,pageCount:e.pageCount,rowCount:e.rowCount}))}),r.watch(()=>e.pageSize,()=>{d.setPageSize(e.pageSize)}),r.watch([()=>e.columnFilter],([x])=>{d.setColumnFilters(()=>x??[])}),r.watch(()=>e.columnDefs,()=>{d.setOptions(x=>({...x,columns:s()}))}),r.onMounted(()=>{e.fetchFn&&e.fetchFn(d.getState().pagination),d.setPageSize(e.pageSize)});const m=r.ref(380);function h(x){var E;const F=((E=x.el)==null?void 0:E.scrollHeight)??0;m.value=Math.max(100,F)}const g=St(),b=r.ref(),y=r.ref(typeof e.shrinkAt=="boolean"&&!e.shrinkAt?!1:g.isBreakpointKeyword(e.shrinkAt)&&g.isAtMost(e.shrinkAt)),S=r.computed(()=>{const x=[...Array.from(Array(5),(E,M)=>(M+1)*10).map(E=>({label:E.toString(),value:E}))],F={label:"All",value:e.rowData.length};return e.pageSize&&e.pageSize>0&&(x.some(E=>E.value===e.pageSize)||(x.push({label:e.pageSize.toString(),value:e.pageSize}),x.sort((E,M)=>E.value-M.value))),[...x,F]});function v(x){const F=x.el;if(!F||typeof e.shrinkAt>"u"||typeof e.shrinkAt=="boolean"&&!e.shrinkAt)return;const E=is(function(){if(b.value=F.clientWidth,g.isBreakpointKeyword(e.shrinkAt)){y.value=g.isAtMost(e.shrinkAt);return}const M=Number(e.shrinkAt);if(isNaN(M)){y.value=!1;return}y.value=F.scrollWidth>=M},200);F.resizeTable??(F.resizeTable=function(){y.value=g.isBreakpointKeyword(e.shrinkAt)&&g.isAtMost(e.shrinkAt),E()}),window.addEventListener("resize",F.resizeTable),F.resizeTable()}function w(x){const F=x.el;!F||typeof e.shrinkAt>"u"||typeof e.shrinkAt=="boolean"&&!e.shrinkAt||F.resizeTable&&window.removeEventListener("resize",F.resizeTable)}return(x,F)=>{const E=r.resolveComponent("FmListItem"),M=r.resolveComponent("FmList"),I=r.resolveComponent("FmTableHeader");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:v,onVnodeUnmounted:w},[r.createElementVNode("div",RS,[y.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[p.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${m.value}px`})},[r.createElementVNode("div",TS,[r.createVNode(Ct),r.createVNode(tn,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(x.$slots,"loading-text",{},()=>[zS])]),r.createVNode(Ct)])],4)):(r.openBlock(),r.createBlock(M,{key:1,onVnodeMounted:h},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d).getRowModel().rows,N=>r.renderSlot(x.$slots,"list-row",r.normalizeProps(r.mergeProps({key:N.id},N)),()=>[r.createVNode(E,{style:{padding:"0"},class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":N.getIsSelected(),"cursor-pointer":typeof x.onRowClick=="function"}]),tag:"label"},{prepend:r.withCtx(()=>{var C,D,A,k,B;return[r.createVNode(r.unref(br),{render:(A=(D=(C=N.getVisibleCells().find(V=>V.column.id==="row-selection"))==null?void 0:C.column)==null?void 0:D.columnDef)==null?void 0:A.cell,props:(B=(k=N.getVisibleCells().find(V=>V.column.id==="row-selection"))==null?void 0:k.getContext)==null?void 0:B.call(k)},null,8,["render","props"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:C=>{var D;return(D=x.onRowClick)==null?void 0:D.call(x,N)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N.getVisibleCells(),C=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:C.id},[C.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",HS,[r.createElementVNode("span",US,[r.createVNode(r.unref(br),{render:C.column.columnDef.cell,props:C.getContext()},null,8,["render","props"])])])):r.createCommentVNode("",!0)],64))),128))],8,LS)]),_:2},1032,["class"])])),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock("table",jS,[x.pinHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(I,{key:0,table:r.unref(d)},null,8,["table"])),r.renderSlot(x.$slots,"pin-top"),r.createElementVNode("tbody",{onVnodeMounted:h},[p.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${m.value}px`})},[r.createElementVNode("div",QS,[r.createVNode(Ct),r.createVNode(tn,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(x.$slots,"loading-text",{},()=>[WS])]),r.createVNode(Ct)])],4)):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(r.unref(d).getRowModel().rows,N=>r.renderSlot(x.$slots,"table-row",r.normalizeProps(r.mergeProps({key:N.id},N)),()=>[r.createElementVNode("tr",{class:r.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",[{"bg-fm-color-neutral-gray-100":N.getIsSelected(),"cursor-pointer":typeof x.onRowClick=="function"},x.rowClassName]]),onClick:C=>{var D;return(D=x.onRowClick)==null?void 0:D.call(x,N)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N.getVisibleCells(),C=>{var D,A,k,B;return r.openBlock(),r.createElementBlock("td",{key:C.id,class:r.normalizeClass([p.value?"hidden":"","h-[52px] px-16 text-fm-color-typo-primary",((D=C.column.columnDef.meta)==null?void 0:D.cellClass)??"px-16"]),style:r.normalizeStyle({width:(A=C.column.columnDef.meta)==null?void 0:A.width,maxWidth:(k=C.column.columnDef.meta)==null?void 0:k.maxWidth,textAlign:((B=C.column.columnDef.meta)==null?void 0:B.textAlign)??"left"})},[r.createElementVNode("span",XS,[r.createVNode(r.unref(br),{render:C.column.columnDef.cell,props:C.getContext()},null,8,["render","props"])])],6)}),128))],10,YS)])),128))],512),x.pinHeaderRow?(r.openBlock(),r.createBlock(I,{key:1,class:"bg-fm-color-neutral-gray-100 sticky top-0",table:r.unref(d)},null,8,["table"])):r.createCommentVNode("",!0)]))]),x.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"basis-72 bg-white flex items-center justify-between px-24",style:r.normalizeStyle({maxWidth:b.value?`${b.value}px`:void 0})},[y.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex gap-24 items-center justify-between xs:hidden xs:invisible",{"hidden invisible":x.forceMobileFooter}])},[r.createElementVNode("div",GS,[qS,r.createVNode(eu,{"model-value":r.unref(d).getState().pagination.pageSize,items:S.value,"onUpdate:modelValue":F[0]||(F[0]=N=>r.unref(d).setPageSize(N))},null,8,["model-value","items"])]),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible",{"hidden invisible":x.forceMobileFooter}])},r.toDisplayString(e.rowData.length<r.unref(d).getState().pagination.pageSize?e.rowData.length:r.unref(d).getState().pagination.pageIndex*r.unref(d).getState().pagination.pageSize+1)+" - "+r.toDisplayString((r.unref(d).getState().pagination.pageIndex+1)*r.unref(d).getState().pagination.pageSize)+" of "+r.toDisplayString(e.rowCount??e.rowData.length)+" items ",3)],2)),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{"w-full justify-between":y.value||x.forceMobileFooter,"xs:w-full xs:justify-between":!y.value}])},[r.createVNode(eu,{"model-value":r.unref(d).getState().pagination.pageIndex+1,items:Array.from(Array(r.unref(d).getPageCount()),(N,C)=>C+1).map(N=>({label:N.toString(),value:N})),"onUpdate:modelValue":F[1]||(F[1]=N=>r.unref(d).setPageIndex(N?N-1:0))},null,8,["model-value","items"]),r.createElementVNode("span",{class:r.normalizeClass(["fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto",{"mr-auto":y.value||x.forceMobileFooter}])}," of "+r.toDisplayString(r.unref(d).getPageCount())+" pages ",3),r.createElementVNode("div",JS,[r.createVNode(G,{disabled:!r.unref(d).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:F[2]||(F[2]=()=>r.unref(d).previousPage())},null,8,["disabled"]),r.createVNode(G,{disabled:!r.unref(d).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:F[3]||(F[3]=()=>r.unref(d).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),ZS=r.createElementVNode("span",{class:"fm-typo-en-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),$S=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),s=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),a=r.computed(()=>{const c=n.items.slice(0,n.showMoreAt-1),u=n.items.find(p=>{var m;return p.value===n.modelValue||((m=p.children)==null?void 0:m.find(h=>h.value===n.modelValue))}),f=c.map(p=>p.value);return u&&f.includes(u.value)?n.items.slice(0,n.showMoreAt):u?[...c,u]:c}),l=r.computed(()=>{const c=a.value.map(u=>u.value);return n.items.filter(u=>!c.includes(u.value))}),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,f=>r.renderSlot(c.$slots,"default",r.normalizeProps(r.guardReactiveProps({...f,tabsProps:s.value})),()=>[r.createVNode(Hc,r.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:s.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=p=>o("update:modelValue",p))}),null,16,["model-value","disabled","vertical"])])),256)),l.value.length>0?(r.openBlock(),r.createBlock(_e,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onMenuChanged:u[1]||(u[1]=f=>i.value=f)},{"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",[c.vertical?"h-40":"h-[46px]"]])},[r.createVNode(Q,{name:"more_vert"}),ZS],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,f=>{var p;return r.openBlock(),r.createElementBlock(r.Fragment,{key:f.value},[(p=f.children)!=null&&p.length?(r.openBlock(),r.createBlock(_e,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(xe,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,expandable:""},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(kt,{key:0,value:f.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(f.children,m=>(r.openBlock(),r.createBlock(xe,{key:m.value,"model-value":n.modelValue===m.value,label:m.label,icon:m.icon,disabled:m.disabled,onClick:h=>d(m.value)},{append:r.withCtx(()=>[m.badge?(r.openBlock(),r.createBlock(kt,{key:0,value:m.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(xe,{key:1,"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:m=>d(f.value)},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(kt,{key:0,value:f.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))}}),_S=["tabindex"],eC=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},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=J(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),s=r.computed(()=>{if(!o.value)return 0;function p(h){return h.children?[h,...h.children.flatMap(p)]:[h]}return 56*(e.children?e.children.flatMap(p):[]).length});function a(){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 d(p){return p.children&&p.children.length?p.children.some(d):e.modelValue===p.value}const c=r.computed(()=>{const p=d(e);return o.value?p&&i.value:p}),u=r.computed(()=>e.children?e.children.map(({modelValue:p,indentation:m,active:h,focusable:g,...b})=>{const y=d(b);return{...b,expand:y,focusable:!b.disabled&&!i.value}}):[]),f=r.computed(()=>{switch(e.indentation){case 1:return 8;case 2:return 16;case 3:return 24;default:return 32}});return(p,m)=>{const h=r.resolveComponent("FmCollapsibleTab",!0),g=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",{style:r.normalizeStyle({paddingLeft:`${f.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 ":!p.disabled,"cursor-not-allowed":p.disabled,"bg-fm-color-system-warning-100":c.value}]),tabindex:l.value?"0":"-1",type:"button",onClick:a},[p.icon?(r.openBlock(),r.createBlock(Q,{key:0,class:r.normalizeClass({"text-fm-color-typo-disabled":p.disabled,"text-fm-color-typo-primary":!p.disabled&&!c.value,"text-fm-color-primary":!p.disabled&&c.value}),name:p.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":!p.disabled&&!c.value,"text-fm-color-primary":!p.disabled&&c.value,"text-fm-color-typo-disabled":p.disabled}])},r.toDisplayString(p.label),3),p.badge?(r.openBlock(),r.createBlock(kt,{key:1,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):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(Q,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!p.disabled,"text-fm-color-typo-disabled":p.disabled}),name:"expand_more",size:"md"},null,8,["class"])],4)):r.createCommentVNode("",!0)],10,_S)),[[g,!p.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,style:r.normalizeStyle({maxHeight:i.value?0:`${s.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(u.value,(b,y)=>(r.openBlock(),r.createBlock(h,r.mergeProps({key:y,"model-value":r.unref(n),"onUpdate:modelValue":m[0]||(m[0]=S=>r.isRef(n)?n.value=S:null),indentation:p.indentation+1},b),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)],4)}}}),tC={class:"flex flex-col"},nC=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=J(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:s,...a})=>a):[]);function i(s){function a(d){return d.children?d.children.flatMap(a):[d.value]}return(s.children?s.children.flatMap(a):[s.value]).includes(e.modelValue)}return(s,a)=>(r.openBlock(),r.createElementBlock("div",tC,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(l,d)=>(r.openBlock(),r.createBlock(eC,r.mergeProps({key:d},l,{"model-value":r.unref(n),"onUpdate:modelValue":a[0]||(a[0]=c=>r.isRef(n)?n.value=c:null),active:i(l),expand:i(l)}),null,16,["model-value","active","expand"]))),128))]))}}),oC=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))}}),rC=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(Q,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),iC={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},sC={class:"flex gap-4 items-center xs:hidden"},aC={key:1,class:"hidden xs:flex"},lC={class:"absolute bottom-16 hidden right-16 xs:inline"},dC=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}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const a=[...n.actions],l=a.findIndex(p=>p.isPrimary),d=a[l],[c,u,...f]=a.filter((p,m)=>m!==l);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:a.filter(p=>!p.isPrimary),fabActions:a.filter(p=>p.isPrimary)}}),s=r.ref(!1);return(a,l)=>(r.openBlock(),r.createElementBlock("div",iC,[a.backButton?(r.openBlock(),r.createBlock(G,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:l[0]||(l[0]=d=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(a.$slots,"prepend"),r.createVNode(ds,{class:"flex-grow",title:a.title,description:a.description,"title-bold":a.titleBold},{title:r.withCtx(()=>[r.renderSlot(a.$slots,"title")]),description:r.withCtx(()=>[r.renderSlot(a.$slots,"description")]),_:3},8,["title","description","title-bold"]),r.createElementVNode("div",sC,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(G,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:l[1]||(l[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(G,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:l[2]||(l[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(_e,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(G,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,d=>(r.openBlock(),r.createBlock(xe,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(G,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:l[3]||(l[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(G,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:l[4]||(l[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",aC,[r.createVNode(G,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:l[5]||(l[5]=d=>s.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(a.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Er,{"model-value":s.value,"onUpdate:modelValue":l[6]||(l[6]=d=>s.value=d),"dismiss-away":"","z-index":n.zIndexForBottomSheet},{default:r.withCtx(()=>[r.createVNode(as,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,d=>(r.openBlock(),r.createBlock(ls,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),s.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value","z-index"]),r.createElementVNode("div",lC,[i.value.primaryAction?(r.openBlock(),r.createBlock(G,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:l[7]||(l[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)])]))]))}}),cC=["colSpan","onClick"],uC={class:"flex gap-8 items-center justify-between"},fC=r.defineComponent({__name:"FmTableHeader",props:{table:{}},setup(t){function e(n){return n.column.columnDef.meta}return(n,o)=>{const i=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("thead",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.table.getHeaderGroups(),s=>(r.openBlock(),r.createElementBlock("tr",{key:s.id},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.headers,a=>{var l,d,c,u;return r.openBlock(),r.createElementBlock("th",{key:a.id,colSpan:a.colSpan,class:r.normalizeClass(["fm-typo-en-body-md-600 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",a.column.getCanSort()?"cursor-pointer select-none":"",((l=e(a))==null?void 0:l.headerClass)??"px-16 py-12"]),style:r.normalizeStyle({width:`${(d=e(a))==null?void 0:d.width}`,maxWidth:(c=e(a))==null?void 0:c.maxWidth,textAlign:((u=e(a))==null?void 0:u.textAlign)??"left"}),onClick:f=>{var p;return(p=a.column.getToggleSortingHandler())==null?void 0:p(f)}},[r.createElementVNode("div",uC,[a.isPlaceholder?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(br),{key:0,render:a.column.columnDef.header,props:a.getContext()},null,8,["render","props"])),a.column.getCanSort()?(r.openBlock(),r.createBlock(i,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[a.column.getIsSorted()]??"unfold_more"},null,8,["name"])):r.createCommentVNode("",!0)])],14,cC)}),128))]))),128))])}}}),pC={class:"fm-typo-title-sm-700 font-bold"},mC={class:"flex"},tu={FmBadge:kt,FmBottomSheet:Er,FmBreadcrumb:_u,FmButton:G,FmButtonGroup:cf,FmCard:Nr,FmCardActionArea:uf,FmCardActions:pf,FmCardHeader:hf,FmCardMedia:bf,FmCardSection:Mr,FmCardSubtitle:Js,FmCardTitle:qs,FmChip:Or,FmChipGroup:Ir,FmDialog:vf,FmDropField:Vf,FmDynamicDialog:ta,FmLineChart:Sd,FmPieChart:$0,FmBarChart:r1,FmScorecard:Z(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=(a,l)=>{if(a===""||l==="")return null;const d=Number(a),c=Number(l);let u=0;c===0?d===0?u=0:u=1:u=(d-c)/c;const f=o(u);return{value:isNaN(u)?"":`${(u*100).toFixed(0)}%`,icon:f}};function o(a){return a>0?{name:"moving",color:"#1F7735",tailwind:"fm-color-system-success-100"}:a<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:a,compareValue:l}=e;return l?n(a,l):null}),s=r.computed(()=>{var a;return((a=e.sparklineData)==null?void 0:a.datasets.map(l=>{var d;return{label:l.name,data:l.values,fill:!0,color:((d=i.value)==null?void 0:d.icon.color)??"fm-color-system-info-300"}}))??[]});return(a,l)=>(r.openBlock(),r.createBlock(Nr,{variant:"outlined",class:"flex flex-col gap-2 p-5"},{default:r.withCtx(()=>[r.createVNode(zi,{content:e.description},{default:r.withCtx(()=>[r.renderSlot(a.$slots,"title",{},()=>[r.createElementVNode("p",{class:r.normalizeClass(["fm-typo-body-md-400 w-full truncate",e.description?"border-b-2 border-dotted":""])},r.toDisplayString(e.title),3)],!0)]),_:3},8,["content"]),r.createElementVNode("p",pC,r.toDisplayString(e.value),1),a.hideCompare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",mC,[i.value?(r.openBlock(),r.createBlock(Or,{key:0,compact:"",class:r.normalizeClass(`bg-${i.value.icon.tailwind}`)},{default:r.withCtx(()=>[r.createVNode(Q,{name:i.value.icon.name,color:i.value.icon.color},null,8,["name","color"]),r.createElementVNode("p",{class:"fm-typo-body-md-700",style:r.normalizeStyle({color:i.value.icon.color})},r.toDisplayString(i.value.value),5)]),_:1},8,["class"])):r.createCommentVNode("",!0)]),r.renderSlot(a.$slots,"compare",{},void 0,!0)],64)),e.sparklineData?(r.openBlock(),r.createBlock(Nr,{key:1},{default:r.withCtx(()=>[r.createVNode(Sd,{class:"sparkline",datasets:s.value,"hide-x-axis":!0,"hide-y-axis":!0,legend:{display:!1},"x-axis":{categories:e.sparklineData.dimension}},null,8,["datasets","x-axis"])]),_:1})):r.createCommentVNode("",!0)]),_:3}))}}),[["__scopeId","data-v-271136dc"]]),FmCheckbox:Cd,FmDatePicker:vb,FmDatePickerMobile:Wd,FmDateRangePicker:O2,FmDateRangePickerMobile:qd,FmSimpleDatePicker:sy,FmSimpleDatePickerMobile:Kd,FmSimpleDateRangePicker:zy,FmSimpleDateRangePickerMobile:Zd,FmField:de,FmForm:Ly,FmFormGroup:Se,FmHelperText:wd,FmLabel:Zt,FmPhoneNumber:_k,FmPinField:n8,FmRadio:d8,FmRadioGroup:c8,FmSearch:os,FmGlobalSearch:T8,FmSelect:mn,FmStepperField:j8,FmSwitch:Hi,FmTextField:ts,FmTextarea:W8,FmTimeInput:cr,FmTimePicker:ox,FmTimeRangePicker:ux,FmIcon:Q,FmList:as,FmListItem:ls,FmMenu:_e,FmMenuDeprecated:gx,FmMenuDivider:Yd,FmMenuHeader:yx,FmMenuItem:xe,FmCircularProgress:tn,FmLinearProgress:wx,FmSideSheet:Vx,FmSnackbar:Lc,FmSpacer:Ct,FmStep:Ox,FmStepper:Tx,FmTab:Hc,FmTable:KS,FmTableToolbar:qx,FmTableHeader:fC,FmTabs:$S,FmCollapsibleTabs:nC,FmTooltip:zi,FmAvatar:oC,FmThumbnail:rC,FmPageHead:dC,FmTopSheet:Ic,FmPopover:mt,FmOverlay:en},hC=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),s=r.computed(()=>e.reference());let a;const{floatingStyles:l,middlewareData:d,placement:c}=eo(s,o,{whileElementsMounted:$n,placement:e.placement,middleware:[_n(),Jn({mainAxis:6}),zd({element:i})]}),u=r.computed(()=>{var h,g,b,y;const m={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((h=d.value.arrow)==null?void 0:h.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((b=d.value.arrow)==null?void 0:b.y)!=null?`${(y=d.value.arrow)==null?void 0:y.y}px`:"",[m]:"-3px"}}),f=()=>{e.disabled||(a&&clearTimeout(a),a=setTimeout(()=>{n.value=!0},250))},p=()=>{e.disabled||(a&&clearTimeout(a),a=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{s.value.addEventListener("pointerdown",f),s.value.addEventListener("pointermove",m=>{m.pointerType!=="touch"&&f()}),s.value.addEventListener("pointerleave",p),s.value.addEventListener("pointerup",p)}),r.onBeforeUnmount(()=>{s.value.removeEventListener("pointerdown",f),s.value.removeEventListener("pointermove",m=>{m.pointerType!=="touch"&&f()}),s.value.removeEventListener("pointerleave",p),s.value.removeEventListener("pointerup",p)}),(m,h)=>n.value&&!m.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))},[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(u.value)},null,4),[[r.vShow,!m.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(m.content),1)],4)):r.createCommentVNode("",!0)}});let Ds;const Rt=r.ref([]);let nu=0;const gC=()=>{if(Ds)return;const t=document.createElement("div");document.body.appendChild(t),Ds=r.createApp({render:()=>Rt.value.map(e=>r.h(hC,e))}),Ds.mount(t)},yr=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},ou=(t,e)=>{const{value:n,modifiers:o}=e;gC(),t.$_fmTooltipId=nu,nu+=1,typeof n=="string"?Rt.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:yr(o),hideArrow:!1}):n&&typeof n=="object"&&Rt.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:yr(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},bC={mounted:ou,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=Rt.value.findIndex(s=>s.id===t.$_fmTooltipId);if(i===-1){ou(t,e);return}typeof n=="string"?Rt.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:yr(o),hideArrow:!1}:n&&typeof n=="object"&&(Rt.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:yr(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=Rt.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&Rt.value.splice(e,1)}},kr=16,yC=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=St(),n=r.inject(Fr),o=r.computed(()=>{var a;return[...((a=n==null?void 0:n.store)==null?void 0:a.snackbars)??[]].reduce(({currentSum:l,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:l});const u=c.mountStage===Tt.EXPIRED?0:kr+c.renderedHeight;return{currentSum:l+u,tops:d}},{currentSum:kr,tops:new Array}).tops}),i=r.computed(()=>{var s,a;return(a=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:a.map(l=>{var c,u,f,p,m,h;let d=0;switch(l.mountStage){case Tt.PREMOUNT:{d=e.value.xs?0:kr;break}case Tt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===l.id))==null?void 0:f.accumulatedHeight)||kr;break}case Tt.EXPIRED:{d=((h=(m=(p=o.value)==null?void 0:p.find)==null?void 0:m.call(p,g=>g.id===l.id))==null?void 0:h.accumulatedHeight)||0,d=Math.max(0,d-l.renderedHeight);break}}return{...l,top:d}})});return(s,a)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,l=>(r.openBlock(),r.createBlock(r.Teleport,{key:l.id,to:"body"},[r.createVNode(Lc,{action:l.action,description:l.message,dismissable:l.dismissable,style:r.normalizeStyle(r.unref(e).xs?{bottom:`${l.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:l.mountStage===r.unref(Tt).EXPIRED?0:1}:{top:`${l.top}px`,right:l.mountStage===r.unref(Tt).PREMOUNT?"-20px":"16px",opacity:l.mountStage===r.unref(Tt).EXPIRED?0:1}),title:l.title,variant:l.type,"z-index":l.zIndex,class:"fixed transition-all z-10",onVnodeMounted:d=>{var c;return(c=r.unref(n))==null?void 0:c.onSnackbarMounted(l.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=l==null?void 0:l.onAction)==null||d.call(l),(c=r.unref(n))==null||c.close(l.id)},onOnDismiss:()=>{var d;return(d=r.unref(n))==null?void 0:d.close(l.id)}},null,8,["action","description","dismissable","style","title","variant","z-index","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var Tt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(Tt||{});class kC{constructor(){H(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},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(s=>s.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[o];this.store.snackbars[o]={...s,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.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)}}const xC={install(t){t.provide(Fr,new kC);const e=document.body,n=r.createVNode(yC);n.appContext=t._context,r.render(n,e)}};function SC(){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 xr;function Vs(){Vs.init||(Vs.init=!0,xr=SC()!==-1)}var Sr={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Vs(),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",xr&&this.$el.appendChild(t),t.data="about:blank",xr||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&&(!xr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const CC=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const wC={class:"resize-observer",tabindex:"-1"};r.popScopeId();const AC=CC((t,e,n,o,i,s)=>(r.openBlock(),r.createBlock("div",wC)));Sr.render=AC,Sr.__scopeId="data-v-b329ee4c",Sr.__file="src/components/ResizeObserver.vue";function Cr(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cr=function(e){return typeof e}:Cr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cr(t)}function vC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ru(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 BC(t,e,n){return e&&ru(t.prototype,e),n&&ru(t,n),t}function iu(t){return DC(t)||VC(t)||PC(t)||EC()}function DC(t){if(Array.isArray(t))return Ps(t)}function VC(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function PC(t,e){if(t){if(typeof t=="string")return Ps(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 Ps(t,e)}}function Ps(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 EC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
91
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FC(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function NC(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s,a=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(s=u,!(o&&d===i)){var p=n.leading;typeof p=="function"&&(p=p(d,i)),(!o||d!==i)&&p&&t.apply(void 0,[d].concat(iu(s))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(iu(s))),o=0},e)}};return a._clear=function(){clearTimeout(o),o=null},a}function su(t,e){if(t===e)return!0;if(Cr(t)==="object"){for(var n in t)if(!su(t[n],e[n]))return!1;return!0}return!1}var MC=function(){function t(e,n,o){vC(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return BC(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=FC(n),this.callback=function(l,d){i.options.callback(l,d),l&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},a=s.leading;this.callback=NC(this.callback,this.options.throttle,{leading:function(d){return a==="both"||a==="visible"&&d||a==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var d=l[0];if(l.length>1){var c=l.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},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 au(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 MC(t,o,n);t._vue_visibilityState=i}}function OC(t,e,n){var o=e.value,i=e.oldValue;if(!su(o,i)){var s=t._vue_visibilityState;if(!o){lu(t);return}s?s.createObserver(o,n):au(t,{value:o},n)}}function lu(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var IC={beforeMount:au,updated:OC,unmounted:lu};function RC(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 du={itemsLimit:1e3},TC=/(auto|scroll)/;function cu(t,e){return t.parentNode===null?e:cu(t.parentNode,e.concat([t]))}var Es=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},zC=function(e){return Es(e,"overflow")+Es(e,"overflow-y")+Es(e,"overflow-x")},LC=function(e){return TC.test(zC(e))};function uu(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=cu(t.parentNode,[]),n=0;n<e.length;n+=1)if(LC(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Fs(t){"@babel/helpers - typeof";return Fs=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},Fs(t)}var fu={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 pu(){return this.items.length&&Fs(this.items[0])!=="object"}var Ns=!1;if(typeof window<"u"){Ns=!1;try{var HC=Object.defineProperty({},"passive",{get:function(){Ns=!0}});window.addEventListener("test",null,HC)}catch{}}let UC=0;var so={name:"RecycleScroller",components:{ResizeObserver:Sr},directives:{ObserveVisibility:IC},props:{...fu,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,s=0,a;for(let l=0,d=e.length;l<d;l++)a=e[l][n]||o,a<i&&(i=a),s+=a,t[l]={accumulator:s,size:a};return this.$_computedMinItemSize=i,t}return[]},simpleArray:pu,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 s=r.markRaw({id:UC++,index:e,used:!0,key:o,type:i}),a=r.shallowReactive({item:n,position:0,nr:s});return t.push(a),a},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,s=this.$_computedMinItemSize,a=this.typeField,l=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,p=this.$_unusedViews,m=this.pool,h=this.itemIndexByKey;let g,b,y,S,v;if(!c)g=b=S=v=y=0;else if(this.$_prerender)g=S=0,b=v=Math.min(this.prerender,d.length),y=null;else{const N=this.getScroll();if(e){let A=N.start-this.$_lastUpdateScrollPosition;if(A<0&&(A=-A),n===null&&A<s||A<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=N.start;const C=this.buffer;N.start-=C,N.end+=C;let D=0;if(this.$refs.before&&(D=this.$refs.before.scrollHeight,N.start-=D),this.$refs.after){const A=this.$refs.after.scrollHeight;N.end+=A}if(n===null){let A,k=0,B=c-1,V=~~(c/2),R;do R=V,A=u[V].accumulator,A<N.start?k=V:V<c-1&&u[V+1].accumulator>N.start&&(B=V),V=~~((k+B)/2);while(V!==R);for(V<0&&(V=0),g=V,y=u[c-1].accumulator,b=V;b<c&&u[b].accumulator<N.end;b++);for(b===-1?b=d.length-1:(b++,b>c&&(b=c)),S=g;S<c&&D+u[S].accumulator<N.start;S++);for(v=S;v<c&&D+u[v].accumulator<N.end;v++);}else{g=~~(N.start/n*o);const A=g%o;g-=A,b=Math.ceil(N.end/n*o),S=Math.max(0,Math.floor((N.start-D)/n*o)),v=Math.floor((N.end-D)/n*o),g<0&&(g=0),b>c&&(b=c),S<0&&(S=0),v>c&&(v=c),y=Math.ceil(c/o)*n}}b-g>du.itemsLimit&&this.itemsLimitError(),this.totalSize=y;let w;const x=g<=this.$_endIndex&&b>=this.$_startIndex;if(x)for(let N=0,C=m.length;N<C;N++)w=m[N],w.nr.used&&(t&&(w.nr.index=h[w.item[l]]),(w.nr.index==null||w.nr.index<g||w.nr.index>=b)&&this.unuseView(w));const F=x?null:new Map;let E,M,I;for(let N=g;N<b;N++){E=d[N];const C=l?E[l]:E;if(C==null)throw new Error(`Key is ${C} on item (keyField is '${l}')`);if(w=f.get(C),!n&&!u[N].size){w&&this.unuseView(w);continue}M=E[a];let D=p.get(M),A=!1;if(!w)x?D&&D.length?w=D.pop():w=this.addView(m,N,E,C,M):(I=F.get(M)||0,(!D||I>=D.length)&&(w=this.addView(m,N,E,C,M),this.unuseView(w,!0),D=p.get(M)),w=D[I],F.set(M,I+1)),f.delete(w.nr.key),w.nr.used=!0,w.nr.index=N,w.nr.key=C,w.nr.type=M,f.set(C,w),A=!0;else if(!w.nr.used&&(w.nr.used=!0,A=!0,D)){const k=D.indexOf(w);k!==-1&&D.splice(k,1)}w.item=E,A&&(N===d.length-1&&this.$emit("scroll-end"),N===0&&this.$emit("scroll-start")),n===null?(w.position=u[N-1].accumulator,w.offset=0):(w.position=Math.floor(N/o)*n,w.offset=N%o*i)}return this.$_startIndex=g,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",g,b,S,v),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let t=uu(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(),s=n?i.height:i.width;let a=-(n?i.top:i.left),l=n?window.innerHeight:window.innerWidth;a<0&&(l+=a,a=0),a+l>s&&(l=s-a),o={start:a,end:a+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,Ns?{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 s=uu(this.$el),a=s.tagName==="HTML"?0:s[e.scroll],l=s.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-l[e.start];n=s,o=e.scroll,i=t+a+c}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 jC={key:0,ref:"before",class:"vue-recycle-scroller__slot"},QC={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function WC(t,e,n,o,i,s){const a=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]=(...d)=>s.handleScroll&&s.handleScroll(...d))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",jC,[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,d=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.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===d.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",QC,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(a,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[l,s.handleVisibilityChange]])}so.render=WC,so.__file="src/components/RecycleScroller.vue";var wr={name:"DynamicScroller",components:{RecycleScroller:so},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:{...fu,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:pu,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,s=e.length;for(let a=0;a<s;a++){const l=e[a],d=o?a:l[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:l,id:d,size:c})}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 s=Math.min(t.length,e.length);for(let l=0;l<s&&!(o>=n);l++)o+=e[l].size||this.minItemSize,i+=t[l].size||this.minItemSize;const a=i-o;a!==0&&(this.$el.scrollTop+=a)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=RC()},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 YC(t,e,n,o,i,s){const a=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(a,r.mergeProps({ref:"scroller",items:s.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:s.onScrollerResize,onVisible:s.onScrollerVisible}),{default:r.withCtx(({item:l,index:d,active:c})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:l.item,index:d,active:c,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"])}wr.render=YC,wr.__file="src/components/DynamicScroller.vue";var Ms={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())}};Ms.__file="src/components/DynamicScrollerItem.vue";function XC(t,e){t.component("".concat(e,"recycle-scroller"),so),t.component("".concat(e,"RecycleScroller"),so),t.component("".concat(e,"dynamic-scroller"),wr),t.component("".concat(e,"DynamicScroller"),wr),t.component("".concat(e,"dynamic-scroller-item"),Ms),t.component("".concat(e,"DynamicScrollerItem"),Ms)}var GC={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"&&(du[i]=o[i]);o.installComponents&&XC(e,o.componentsPrefix)}};const qC=t=>{t.use(wu,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",bC),t.use(Nf),t.use(xC),t.use(GC),Object.entries(tu).forEach(([e,n])=>{t.component(e,n)})};ce.FeedMeUI=qC,ce.components=tu,ce.useBreakpoints=St,ce.useDialog=kf,ce.useDialogChild=Sf,ce.useFocus=xn,ce.useFormChild=$s,ce.useProxiedModel=J,ce.useSnackbar=Cf,ce.useValidation=Zs,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});