@rovula/ui 0.1.10 → 0.1.12

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.
@@ -9244,7 +9244,7 @@
9244
9244
  *
9245
9245
  * This source code is licensed under the ISC license.
9246
9246
  * See the LICENSE file in the root directory of this source tree.
9247
- */const xme=__("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var _me=Object.freeze({__proto__:null,default:xme});const Mme=e.forwardRef(((r,n)=>{var{id:a,label:o,size:l="md",rounded:i="normal",variant:s="outline",type:c="text",iconMode:d="solid",helperText:u,errorMessage:h,warningMessage:p,status:f,fullwidth:v=!0,disabled:m=!1,error:y=!1,warning:g=!1,required:k=!0,isFloatingLabel:b=!0,keepCloseIconOnValue:w=!1,keepFooterSpace:x=!0,hasClearIcon:_=!0,hasSearchIcon:M=!1,startIcon:j,endIcon:O,labelClassName:E,onClickStartIcon:z,onClickEndIcon:C,renderStartIcon:P,renderEndIcon:R,classes:A,normalize:L,format:I,trimOnCommit:V,normalizeOnCommit:H}=r,S=o_(r,["id","label","size","rounded","variant","type","iconMode","helperText","errorMessage","warningMessage","status","fullwidth","disabled","error","warning","required","isFloatingLabel","keepCloseIconOnValue","keepFooterSpace","hasClearIcon","hasSearchIcon","startIcon","endIcon","labelClassName","onClickStartIcon","onClickEndIcon","renderStartIcon","renderEndIcon","classes","normalize","format","trimOnCommit","normalizeOnCommit"]);const Z=e.useRef(null),N=a||`${c}-${o}-input`,q=!!j||!!P,D=!!O||!!R,B=f||(y||h?"error":g||p?"warning":"default"),F="error"===B,T="warning"===B,W="error"===B?h:"warning"===B?p:u,U=u_({size:l,rounded:i,variant:s,fullwidth:v,disabled:m,error:F,warning:T,hasSearchIcon:"flat"===d&&q||M,hasClearIcon:"flat"===d&&D||_,leftSectionIcon:"solid"===d&&q,rightSectionIcon:"solid"===d&&D}),G=h_({size:l,disabled:m,error:F,hasSearchIcon:"flat"===d&&q||M,hasLeftSectionIcon:"solid"===d&&q,isFloatingLabel:b}),$=p_({size:l,error:F,warning:T,disabled:m}),Y=v_({size:l}),K=m_({size:l}),X=y_({size:l}),Q=g_({size:l}),J=k_({size:l,rounded:i,error:F,warning:T,position:"start"}),ee=k_({size:l,rounded:i,error:F,warning:T,position:"end"});e.useImperativeHandle(n,(()=>null==Z?void 0:Z.current));const te=e.useCallback((e=>{var t;L&&(e.target.value=L(e.target.value)),null===(t=S.onChange)||void 0===t||t.call(S,e)}),[L,S.onChange]),re=e.useCallback((e=>{var t;const r=e.currentTarget;let n=r.value;V&&(n=n.trim()),H&&(n=H(n)),n!==r.value&&(r.value=n,null===(t=S.onChange)||void 0===t||t.call(S,Object.assign(Object.assign({},e),{target:r})))}),[V,H,S.onChange]),ne=e.useCallback((e=>{var t;(V||H)&&re(e),null===(t=S.onBlur)||void 0===t||t.call(S,e)}),[V,H,re,S.onBlur]),ae=e.useCallback((e=>{var t;(V||H)&&"Enter"===e.key&&re(e),null===(t=S.onKeyDown)||void 0===t||t.call(S,e)}),[V,H,re,S.onKeyDown]),oe=I&&"string"==typeof S.value?I(S.value):S.value,le=e.useCallback((()=>{Z.current&&(Z.current.value="",S.onChange&&(new Event("input",{bubbles:!0}),S.onChange({target:{value:""}})))}),[S.onChange]),ie=e.useCallback((()=>{m||(null==z||z(),Z.current&&Z.current.focus())}),[m,z]),se=e.useCallback((()=>{m||(null==C||C(),Z.current&&Z.current.focus())}),[m,C]),ce=e.useMemo((()=>{if(q)return P?t.jsx("div",{className:s_(K,"flex",null==A?void 0:A.iconSearchWrapper),children:P()}):"flat"===d?t.jsx("div",{className:s_(K,null==A?void 0:A.iconSearchWrapper),children:t.jsx("div",{className:s_(X,null==A?void 0:A.icon),onClick:ie,children:j})}):t.jsx("div",{className:s_(J,null==A?void 0:A.startIconWrapper),onClick:ie,children:j})}),[q,j,d,K,J,X,P,ie]),de=e.useMemo((()=>{if(D)return R?t.jsx("div",{className:s_(Y,"flex",null==A?void 0:A.iconWrapper),children:R()}):"flat"===d?t.jsx("div",{className:s_(Y,"flex",null==A?void 0:A.iconWrapper),children:t.jsx("div",{className:s_(X,null==A?void 0:A.icon),onClick:se,children:O})}):t.jsx("div",{className:s_(ee,null==A?void 0:A.endIconWrapper),onClick:se,children:O})}),[D,O,d,Y,ee,X,R,se]);return t.jsxs("div",{className:"inline-flex flex-col "+(v?"w-full":""),children:[t.jsxs("div",{className:"relative",children:[t.jsx("input",Object.assign({},S,{placeholder:" ",ref:Z,type:c,id:N,disabled:m,value:oe,className:s_(U,S.className),onChange:L?te:S.onChange,onBlur:V||H?ne:S.onBlur,onKeyDown:V||H?ae:S.onKeyDown})),M&&!q&&t.jsx("div",{className:s_(K,null==A?void 0:A.iconSearchWrapper),children:t.jsx(zne,{className:s_(Q,null==A?void 0:A.icon)})}),ce,_&&!D&&t.jsx("div",{className:s_(Y,null==A?void 0:A.iconWrapper),style:{display:w&&S.value?"flex":void 0},children:t.jsx(QH,{className:s_(X,null==A?void 0:A.icon),onMouseDown:le})}),de,t.jsxs("label",{htmlFor:N,className:s_(G),children:[o," ",k&&t.jsx("span",{className:s_("text-input-error",{"text-input-disable-text":m}),children:"*"})]})]}),(W||x)&&t.jsxs("span",{className:$,children:[W&&t.jsx("span",{className:"h-full shrink-0",children:t.jsx(OV,{width:14,height:14,className:s_("fill-none stroke-current",F?"text-input-error":T?"text-warning":"text-input-filled-text")})}),x&&!W&&t.jsx("span",{className:"block min-h-[14px]","aria-hidden":!0}),W||""]})]})})),jme={0:{pattern:/[0-9]/,placeholder:"0"},9:{pattern:/[0-9\s]/,placeholder:"9"},"#":{pattern:/[0-9\s+\-]/,placeholder:"#"},L:{pattern:/[a-zA-Z]/,placeholder:"L"},"?":{pattern:/[a-zA-Z\s]/,placeholder:"?"},"&":{pattern:/[^\s]/,placeholder:"&"},C:{pattern:/./,placeholder:"C"},A:{pattern:/[a-zA-Z0-9]/,placeholder:"A"},a:{pattern:/[a-zA-Z0-9\s]/,placeholder:"a"}},Ome=(e,t,r="_",n=!0,a=!0)=>{let o="",l=0;for(let i=0;i<t.length;i++){const s=t[i];if(s.isLiteral)o+=s.placeholder;else{let t=!1;for(;l<e.length;){const r=e[l];l++;if(s.validator?s.validator(r):s.pattern.test(r)){o+=r,t=!0;break}}if(!t&&a&&n)o+=r;else if(!t)break}}return o},Eme=(e,t)=>{let r="";for(let n=0;n<e.length&&n<t.length;n++){const a=t[n],o=e[n];a.isLiteral||(r+=o)}return r},zme=e.forwardRef(((r,n)=>{var{mask:a,maskChar:o="_",showMask:l=!0,guide:i=!0,keepCharPositions:s=!1,rules:c,onMaskedChange:d,onChange:u,value:h,defaultValue:p}=r,f=o_(r,["mask","maskChar","showMask","guide","keepCharPositions","rules","onMaskedChange","onChange","value","defaultValue"]);const v=e.useRef(null),[m,y]=e.useState(""),[g,k]=e.useState(""),b=e.useMemo((()=>a?((e,t)=>{const r=Object.assign(Object.assign({},jme),t),n=[];let a=0;for(;a<e.length;){const t=e[a];if("\\"===t&&a+1<e.length){const t=e[a+1];n.push({pattern:new RegExp(`^${t}$`),placeholder:t,isLiteral:!0}),a+=2}else if(r[t]){const e=r[t];"function"==typeof e?n.push({pattern:/./,placeholder:t,validator:e}):e instanceof RegExp?n.push({pattern:e,placeholder:t}):n.push({pattern:e.pattern,placeholder:e.placeholder}),a++}else n.push({pattern:new RegExp(`^${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),placeholder:t,isLiteral:!0}),a++}return n})(a,c):null),[a,c]);e.useEffect((()=>{const e=h||p||"";if(b&&e){const t=Ome(e,b,o,l,i),r=Eme(t,b);y(t),k(r)}else y(e),k(e)}),[b,o,l,i,h,p]),e.useImperativeHandle(n,(()=>null==v?void 0:v.current));const w=e.useCallback((e=>{const t=e.target.value;if(!b)return y(t),k(t),null==u||u(e),void(null==d||d(t,t));const r=Ome(t,b,o,l,i),n=Eme(r,b);y(r),k(n);const a=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:r})});null==u||u(a),null==d||d(r,n),setTimeout((()=>{if(v.current){const e=n.replace(/[_\s]/g,"").length,t=((e,t,r)=>{let n=0,a=0;for(let o=0;o<r.length&&o<e.length;o++){const l=r[o];if(e[o],l.isLiteral)a=o+1;else if(n++,a=o+1,n>=t)break}return a})(r,e,b);v.current.setSelectionRange(t,t)}}),0)}),[b,o,l,i,u,d]),x=e.useCallback((e=>{var t,r,n;if(!b)return void(null===(t=f.onKeyDown)||void 0===t||t.call(f,e));const{key:a,ctrlKey:o,metaKey:l}=e,i=e.target.selectionStart||0;if("Backspace"===a||"Delete"===a||"ArrowLeft"===a||"ArrowRight"===a||"Home"===a||"End"===a||"Tab"===a||a.length>1||o||l)return void(null===(r=f.onKeyDown)||void 0===r||r.call(f,e));let s=i;for(;s<b.length&&b[s].isLiteral;)s++;if(s<b.length){const t=b[s];if(!(t.validator?t.validator(a):t.pattern.test(a)))return void e.preventDefault()}null===(n=f.onKeyDown)||void 0===n||n.call(f,e)}),[b,f]);return t.jsx(Mme,Object.assign({},f,{ref:v,value:m,onChange:w,onKeyDown:x,className:s_(f.className)}))}));zme.displayName="MaskedTextInput";const Cme=r.cva(["text-inherit"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",tertiary:"text-tertiary",success:"text-success",info:"text-info",warning:"text-warning",error:"text-error",inherit:"text-inherit"},size:{sm:"size-4",md:"size-6",lg:"size-8",inherit:""}},defaultVariants:{size:"inherit",color:"inherit"}}),Pme={sm:16,md:24,lg:32},Rme=r=>{var{name:n,type:a="heroicons",color:o="inherit",variant:l="solid",size:i="md",className:s}=r,c=o_(r,["name","type","color","variant","size","className"]);const[d,u]=e.useState(null);if(e.useEffect((()=>{if("lucide"===a)return void Promise.resolve().then((function(){return zZe})).then((({default:e})=>{const t=e[n];t?t().then((e=>{u((()=>e.default))})):console.warn(`Lucide icon "${n}" not found.`)}));const e=((e,t,r)=>{var n,a;return null===(a=null===(n=Xx[e])||void 0===n?void 0:n[t])||void 0===a?void 0:a[r]})(a,n,l);e?u((()=>e)):console.warn(`Icon "${n}" from "${a}" not found.`)}),[n,a,l]),"lucide"===a){if(!d)return t.jsx("span",{className:s_(Cme({color:o,size:i}),s)});const e="inherit"===i?24:Pme[i];return t.jsx(d,Object.assign({},c,{size:e,strokeWidth:e<=16?1.5:2,absoluteStrokeWidth:!0,shapeRendering:"geometricPrecision",className:s_(Cme({color:o,size:i}),"stroke-current",s)}))}return d?t.jsx(d,Object.assign({className:s_(Cme({color:o,size:i}),s)},c)):t.jsx("svg",Object.assign({className:s_(Cme({color:o,size:i}),s)},c))},Ame=e.forwardRef(((r,n)=>{var a,{showToggle:o=!0,hasClearIcon:l=!1,hideIcon:i,showIcon:s,endIcon:c,renderEndIcon:d,onClickEndIcon:u}=r,h=o_(r,["showToggle","hasClearIcon","hideIcon","showIcon","endIcon","renderEndIcon","onClickEndIcon"]);const p=e.useRef(null),[f,v]=e.useState(!1);e.useImperativeHandle(n,(()=>null==p?void 0:p.current));const m=f?null!=s?s:t.jsx(Rme,{name:"eye",type:"lucide",size:"inherit",className:"size-full","aria-label":"Hide password"}):null!=i?i:t.jsx(Rme,{name:"eye-closed",type:"lucide",size:"inherit",className:"size-full","aria-label":"Show password"});return t.jsx(Mme,Object.assign({iconMode:"flat"},h,{ref:p,type:f?"text":"password",hasClearIcon:l,endIcon:o?m:c,renderEndIcon:d,onClickEndIcon:o?()=>{var e;h.disabled||(v((e=>!e)),null===(e=p.current)||void 0===e||e.focus(),null==u||u())}:u,autoComplete:null!==(a=h.autoComplete)&&void 0!==a?a:"current-password"}))}));Ame.displayName="PasswordInput";const Lme=e.forwardRef(((r,n)=>{var a,{value:o,defaultValue:l,min:i,max:s,step:c=1,precision:d,hideControls:u=!1,allowDecimal:h=!0,allowNegative:p=!0,formatDisplay:f=!1,thousandSeparator:v=",",decimalSeparator:m=".",prefix:y="",suffix:g="",disabled:k=!1,onChange:b,onValueChange:w,className:x,size:_="md"}=r,M=o_(r,["value","defaultValue","min","max","step","precision","hideControls","allowDecimal","allowNegative","formatDisplay","thousandSeparator","decimalSeparator","prefix","suffix","disabled","onChange","onValueChange","className","size"]);const j=e.useRef(null),[O,E]=e.useState((null!==(a=null!=o?o:l)&&void 0!==a?a:"").toString()),[z,C]=e.useState(!1);e.useImperativeHandle(n,(()=>null==j?void 0:j.current));const P=e.useCallback((e=>{let t=e;return y&&(t=t.replace(y,"")),g&&(t=t.replace(g,"")),v&&(t=t.split(v).join("")),"."!==m&&(t=t.replace(m,".")),t.trim()}),[y,g,v,m]),R=e.useCallback((e=>{if(!f||""===e||"-"===e)return e;const t=parseFloat(e);if(isNaN(t))return e;let r=t.toString();void 0!==d&&(r=t.toFixed(d));const n=r.split(".");let a=n[0];const o=n[1];return v&&(a=a.replace(/\B(?=(\d{3})+(?!\d))/g,v)),r=o?`${a}${m}${o}`:a,y&&(r=`${y}${r}`),g&&(r=`${r}${g}`),r}),[f,d,v,m,y,g]),A=e.useCallback((e=>{if(""===e||"-"===e)return e;let t=parseFloat(e);return isNaN(t)?O:(void 0!==i&&t<i&&(t=i),void 0!==s&&t>s&&(t=s),void 0!==d&&(t=parseFloat(t.toFixed(d))),t.toString())}),[i,s,d,O]),L=e.useCallback((e=>{let t=e.target.value;if(f&&(t=P(t)),""===t)return E(""),null==b||b(void 0),void(null==w||w(""));if(p&&"-"===t)return E("-"),void(null==w||w("-"));if(!(h?p?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/:p?/^-?\d*$/:/^\d*$/).test(t))return;E(t),null==w||w(t);const r=parseFloat(t);isNaN(r)||null==b||b(r)}),[h,p,f,P,b,w]),I=e.useCallback((e=>{var t;C(!0),null===(t=M.onFocus)||void 0===t||t.call(M,e)}),[M]),V=e.useCallback((e=>{var t;C(!1);const r=A(O);E(r);const n=parseFloat(r);isNaN(n)||null==b||b(n),null===(t=M.onBlur)||void 0===t||t.call(M,e)}),[O,A,b,M]),H=e.useCallback((e=>{if(k)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(O)||0)+c;void 0!==s&&t>s&&(t=s);const r=A(t.toString());E(r),null==b||b(parseFloat(r)),null==w||w(r)}),[O,c,s,k,A,b,w]),S=e.useCallback((e=>{if(k)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(O)||0)-c;void 0!==i&&t<i&&(t=i);const r=A(t.toString());E(r),null==b||b(parseFloat(r)),null==w||w(r)}),[O,c,i,k,A,b,w]),Z=e.useCallback((e=>{var t;switch(e.key){case"ArrowUp":H(e);break;case"ArrowDown":S(e);break;case"Enter":e.currentTarget.blur()}null===(t=M.onKeyDown)||void 0===t||t.call(M,e)}),[H,S,M]);e.useEffect((()=>{void 0!==o&&E(o.toString())}),[o]);const N=e.useMemo((()=>z||!f?O:R(O)),[z,f,O,R]),q={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6"}[_],D={sm:"absolute top-0.5",md:"absolute top-1",lg:"absolute top-1"}[_];return t.jsx(Mme,Object.assign({},M,{ref:j,type:"text",inputMode:"decimal",value:N,onChange:L,onFocus:I,onBlur:V,onKeyDown:Z,disabled:k,size:_,hasClearIcon:!1,endIcon:u?null:t.jsxs("div",{className:s_("flex flex-col","flat"===M.iconMode&&D),children:[t.jsx("button",{type:"button",onClick:H,disabled:k||void 0!==s&&parseFloat(O)>=s,className:s_(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:t.jsx(bn,{className:q})}),t.jsx("button",{type:"button",onClick:S,disabled:k||void 0!==i&&parseFloat(O)<=i,className:s_(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:t.jsx(hn,{className:q})})]}),className:s_(x)}))}));Lme.displayName="NumberInput";const Ime=r.cva(["peer block w-full bg-transparent outline-none placeholder:text-transparent resize-y ui-scrollbar","text-input-filled-text caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-md",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-stroke"},fullwidth:{true:"w-full"},disabled:{true:["bg-input-disable-bg text-input-disable-text ring-input-disable-stroke placeholder:text-input-disable-text","hover:ring-input-disable-stroke","cursor-not-allowed"]},error:{true:"ring-input-error focus:ring-input-error"},hasClearIcon:{true:""},isFloatingLabel:{true:"",false:"placeholder:text-input-placeholder"}},compoundVariants:[{variant:"underline",className:"rounded-none"},{hasClearIcon:!0,size:"sm",className:"focus:pe-6"},{hasClearIcon:!0,size:"md",className:"focus:pe-8"},{hasClearIcon:!0,size:"lg",className:"focus:pe-10"}],defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hasClearIcon:!1,isFloatingLabel:!0}}),Vme=r.cva(["absolute block duration-450 transition-all px-[2px] text-input-default-text","peer-focus:text-input-filled-text peer-focus:bg-input-label-bg"],{variants:{size:{sm:[],md:[],lg:[]},disabled:{true:"text-input-default-text placeholder:text-input-default-text"},error:{true:"ring-error"},isFloatingLabel:{false:"hidden peer-placeholder-shown:block peer-focus:bg-transparent"}},compoundVariants:[{isFloatingLabel:!0,size:"sm",className:["left-3 -top-1.5 typography-label2 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{isFloatingLabel:!0,size:"md",className:["left-3 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!0,size:"lg",className:["left-4 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!1,size:"sm",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1"]},{isFloatingLabel:!1,size:"md",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4"]},{isFloatingLabel:!1,size:"lg",className:["left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatingLabel:!0}}),Hme=r.cva(["absolute inset-y-0 right-0 items-start justify-center hidden peer-focus:flex"],{variants:{size:{sm:"mr-2 pt-2",md:"mr-3 pt-2",lg:"mr-4 pt-4"}},defaultVariants:{size:"md"}}),Sme=r.cva(["cursor-pointer z-50 fill-input-active-stroke hover:fill-input-default-text"],{variants:{size:{sm:"size-3",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),Zme=r.cva(["typography-small1 flex flex-row items-center gap-1"],{variants:{size:{sm:"mt-1",md:"mt-[6px]",lg:"mt-[6px]"},disabled:{true:"text-input-disable-text"},error:{true:"text-input-error",false:"text-input-filled-text"}},defaultVariants:{size:"md",disabled:!1,error:!1}}),Nme=e.forwardRef(((r,n)=>{var{id:a,label:o,size:l="md",rounded:i="normal",variant:s="outline",helperText:c,errorMessage:d,fullwidth:u=!0,disabled:h=!1,error:p=!1,required:f=!0,isFloatingLabel:v=!0,keepCloseIconOnValue:m=!1,hasClearIcon:y=!0,labelClassName:g,className:k,normalize:b,format:w,trimOnCommit:x,normalizeOnCommit:_}=r,M=o_(r,["id","label","size","rounded","variant","helperText","errorMessage","fullwidth","disabled","error","required","isFloatingLabel","keepCloseIconOnValue","hasClearIcon","labelClassName","className","normalize","format","trimOnCommit","normalizeOnCommit"]);const j=e.useRef(null),O=a||`textarea-${null!=o?o:""}`;e.useImperativeHandle(n,(()=>null==j?void 0:j.current));const E=e.useCallback((e=>{var t;b&&(e.target.value=b(e.target.value)),null===(t=M.onChange)||void 0===t||t.call(M,e)}),[b,M.onChange]),z=e.useCallback((e=>{var t;const r=e.currentTarget;let n=r.value;x&&(n=n.trim()),_&&(n=_(n)),n!==r.value&&(r.value=n,null===(t=M.onChange)||void 0===t||t.call(M,Object.assign(Object.assign({},e),{target:r})))}),[x,_,M.onChange]),C=e.useCallback((e=>{var t;(x||_)&&z(e),null===(t=M.onBlur)||void 0===t||t.call(M,e)}),[x,_,z,M.onBlur]),P=w&&"string"==typeof M.value?w(M.value):M.value,R=e.useMemo((()=>"inline-flex flex-col "+(u?"w-full":"")),[u]),A=Ime({size:l,rounded:i,variant:s,fullwidth:u,disabled:h,error:p,hasClearIcon:y,isFloatingLabel:v});return t.jsxs("div",{className:R,children:[t.jsxs("div",{className:"relative",children:[t.jsx("textarea",Object.assign({},M,{id:O,ref:j,disabled:h,placeholder:v?" ":M.placeholder,className:s_(A,k),value:P,onChange:b?E:M.onChange,onBlur:x||_?C:M.onBlur})),y&&t.jsx("div",{className:Hme({size:l}),style:{display:m&&M.value?"flex":void 0},children:t.jsx(Wd,{type:"button",className:Sme({size:l}),onMouseDown:e=>{if(e.preventDefault(),j.current){const e=j.current.value;j.current.value="",M.onChange&&""!==e&&M.onChange({target:{value:""}}),j.current.focus()}}})}),o&&t.jsxs("label",{htmlFor:O,className:s_(Vme({size:l,disabled:h,error:p,isFloatingLabel:v}),g),children:[o," ",f&&t.jsx("span",{className:s_("text-error",{"text-input-disable-text":h}),children:"*"})]})]}),(d||c)&&t.jsx("span",{className:Zme({size:l,disabled:h,error:p}),children:d||c})]})})),qme=r.cva(["text-common-black"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-success",tertiary:"text-tertiary",info:"text-info",warning:"text-warning",error:"text-error"}}}),Dme={subtitile1:"subtitle1",subtitile2:"subtitle2",subtitile3:"subtitle3",subtitile4:"subtitle4",subtitile5:"subtitle5",subtitile6:"subtitle6"},Bme=e.forwardRef(((e,r)=>{var n,{variant:a="body1",tag:o="p",children:l,className:i="",color:s,style:c}=e,d=o_(e,["variant","tag","children","className","color","style"]);const u=null!==(n=Dme[a])&&void 0!==n?n:a;return t.jsx(o,Object.assign({ref:r,className:s_(`typography-${u}`,qme({color:s}),i),style:c},d,{children:l}))})),Fme=r.cva(["box-border flex items-center justify-center"],{variants:{variant:{solid:["bg-action-button-solid-default border-action-button-solid-default text-action-button-solid-default fill-action-button-solid-default","hover:bg-action-button-solid-hover hover:border-action-button-solid-hover hover:text-action-button-solid-hover hover:fill-action-button-solid-hover","active:bg-action-button-solid-pressed active:border-action-button-solid-pressed active:text-action-button-solid-pressed active:fill-action-button-solid-pressed"],outline:["ring-1 ring-inset","bg-action-button-outline-default text-action-button-outline-default fill-action-button-outline-default ring-[var(--action-button-outline-default-border)]","hover:bg-action-button-outline-hover hover:text-action-button-outline-hover hover:fill-action-button-outline-hover hover:ring-[var(--action-button-outline-hover-border)]","active:bg-action-button-outline-pressed active:text-action-button-outline-pressed active:fill-action-button-outline-pressed active:ring-[var(--action-button-outline-pressed-border)]"],icon:["bg-action-button-icon-default border-action-button-icon-default text-action-button-icon-default fill-action-button-icon-default","hover:bg-action-button-icon-hover hover:border-action-button-icon-hover hover:text-action-button-icon-hover hover:fill-action-button-icon-hover","active:bg-action-button-icon-pressed active:border-action-button-icon-pressed active:text-action-button-icon-pressed active:fill-action-button-icon-pressed"]},size:{xxs:"",xs:"",sm:"",md:"",lg:""},shape:{round:"",capsule:""},disabled:{false:""},active:{false:""}},compoundVariants:[{variant:"solid",active:!0,className:["bg-action-button-solid-active border-action-button-solid-active text-action-button-solid-active fill-action-button-solid-active","hover:bg-action-button-solid-active-hover hover:border-action-button-solid-active-hover hover:text-action-button-solid-active-hover hover:fill-action-button-solid-active-hover","active:bg-action-button-solid-active-pressed active:border-action-button-solid-active-pressed active:text-action-button-solid-active-pressed active:fill-action-button-solid-active-pressed"]},{variant:"outline",active:!0,className:["bg-action-button-outline-active text-action-button-outline-active fill-action-button-outline-active ring-[var(--action-button-outline-active-border)]","hover:bg-action-button-outline-active-hover hover:text-action-button-outline-active-hover hover:fill-action-button-outline-active-hover hover:ring-[var(--action-button-outline-active-hover-border)]","active:bg-action-button-outline-active-pressed active:text-action-button-outline-active-pressed active:fill-action-button-outline-active-pressed active:ring-[var(--action-button-outline-active-pressed-border)]"]},{variant:"icon",active:!0,className:["bg-action-button-icon-active border-action-button-icon-active text-action-button-icon-active fill-action-button-icon-active","hover:bg-action-button-icon-active-hover hover:border-action-button-icon-active-hover hover:text-action-button-icon-active-hover hover:fill-action-button-icon-active-hover","active:bg-action-button-icon-active-pressed active:border-action-button-icon-active-pressed active:text-action-button-icon-active-pressed active:fill-action-button-icon-active-pressed"]},{size:"lg",variant:["solid","outline"],className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:["solid","outline"],className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:["solid","outline"],className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xs",variant:["solid","outline"],className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",variant:"icon",className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:"icon",className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:"icon",className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xxs",variant:"icon",className:"px-[1px] py-[1px] [&_svg]:size-[10px]"},{size:"xs",variant:"icon",className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",shape:"round",className:"rounded-[var(--function-button-l-round)]"},{size:"md",shape:"round",className:"rounded-[var(--function-button-m-round)]"},{size:"sm",shape:"round",className:"rounded-[var(--function-button-s-round)]"},{size:"xs",shape:"round",className:"rounded-[var(--function-button-xs-round)]"},{size:"xxs",shape:"round",className:"rounded-[var(--function-button-xxs-round)]"},{size:"lg",shape:"capsule",className:"rounded-[var(--function-button-l-capsule)]"},{size:"md",shape:"capsule",className:"rounded-[var(--function-button-m-capsule)]"},{size:"sm",shape:"capsule",className:"rounded-[var(--function-button-s-capsule)]"},{size:"xxs",shape:"capsule",className:"rounded-[var(--function-button-xxs-capsule)]"},{size:"xs",shape:"capsule",className:"rounded-[var(--function-button-xs-capsule)]"},{variant:"solid",disabled:!0,className:["pointer-events-none","bg-action-button-solid-disabled border-action-button-solid-disabled text-action-button-solid-disabled fill-action-button-solid-disabled"]},{variant:"outline",disabled:!0,className:["pointer-events-none","bg-action-button-outline-disabled text-action-button-outline-disabled fill-action-button-outline-disabled ring-[var(--action-button-outline-disabled-border)]"]},{variant:"icon",disabled:!0,className:["pointer-events-none","bg-action-button-icon-disabled border-action-button-icon-disabled text-action-button-icon-disabled fill-action-button-icon-disabled"]}],defaultVariants:{size:"md",variant:"solid",shape:"round",disabled:!1,active:!1}}),Tme=e.forwardRef(((e,r)=>{var{children:n,disabled:a,active:o,className:l,size:i,shape:s,variant:c}=e,d=o_(e,["children","disabled","active","className","size","shape","variant"]);const u=Fme({size:i,shape:s,variant:c,active:o,disabled:a});return t.jsx("button",Object.assign({},d,{ref:r,type:"button","aria-disabled":a||void 0,disabled:a,tabIndex:a?-1:0,className:s_(".action-button",u,l),children:n}))}));function Wme(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ume(...e){return t=>{let r=!1;const n=e.map((e=>{const n=Wme(e,t);return r||"function"!=typeof n||(r=!0),n}));if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Wme(e[t],null)}}}}var Gme=l.forwardRef(((e,r)=>{const{children:n,...a}=e,o=l.Children.toArray(n),i=o.find(Kme);if(i){const e=i.props.children,n=o.map((t=>t===i?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t));return t.jsx($me,{...a,ref:r,children:l.isValidElement(e)?l.cloneElement(e,void 0,n):null})}return t.jsx($me,{...a,ref:r,children:n})}));Gme.displayName="Slot";var $me=l.forwardRef(((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r);return l.cloneElement(r,{...Xme(n,r.props),ref:t?Ume(t,e):e})}return l.Children.count(r)>1?l.Children.only(null):null}));$me.displayName="SlotClone";var Yme=({children:e})=>t.jsx(t.Fragment,{children:e});function Kme(e){return l.isValidElement(e)&&e.type===Yme}function Xme(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{o(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}var Qme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?Gme:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),Jme=Boolean(globalThis?.document)?l.useLayoutEffect:()=>{},eye=l.forwardRef(((e,r)=>{const{container:n,...o}=e,[i,s]=l.useState(!1);Jme((()=>s(!0)),[]);const c=n||i&&globalThis?.document?.body;return c?a.createPortal(t.jsx(Qme.div,{...o,ref:r}),c):null}));eye.displayName="Portal";var tye=eye;r.cva(["absolute inset-y-0 right-0 flex items-center justify-center"],{variants:{size:{sm:"mr-2",md:"mr-3",lg:"mr-4"}},defaultVariants:{size:"md"}});const rye=r.cva(["transition-all"],{variants:{disabled:{true:"fill-input-text-disabled",false:"fill-inherit"},isFocus:{true:"fill-input-text-active rotate-180",false:""}},defaultVariants:{disabled:!1,isFocus:!1}}),nye=r.cva([],{variants:{size:{sm:"pe-[30px]",md:"pe-[40px]",lg:"pe-[68px]"}},defaultVariants:{size:"md"}}),aye=e.forwardRef((({items:r,selectedValues:n=[],onSelect:a,className:o,style:l,isAbove:i=!1},s)=>t.jsx("div",{ref:s,className:s_("z-50 min-w-[154px] overflow-hidden rounded-md bg-modal-surface text-text-g-contrast-high","border border-modal-surface",o),style:Object.assign({boxShadow:"var(--dropdown-menu-shadow)"},l),children:r.map(((r,o)=>{var l;if("separator"===r.type)return t.jsx(lye,{},`separator-${o}`);if("label"===r.type)return t.jsx(iye,{children:r.label},`label-${o}`);if("custom"===r.type)return t.jsx(e.Fragment,{children:r.render()},`custom-${o}`);const i=r.item,s=i.type||"default";let c=!1;return c=("checkbox"===s||"radio"===s)&&null!==(l=i.checked)&&void 0!==l?l:n.includes(i.value),t.jsx(oye,{option:i,visualType:s,isChecked:c,onSelect:()=>{var e;null==a||a(i.value,i),null===(e=i.onClick)||void 0===e||e.call(i)}},i.value)}))})));aye.displayName="Menu";const oye=e.forwardRef((({option:e,visualType:r,isChecked:n,onSelect:a,className:o},l)=>t.jsxs("div",{ref:l,className:s_("relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-subtitle4 outline-none transition-colors","bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]","active:opacity-75","hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]",{"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)] typography-subtitle5":n,"pointer-events-none opacity-50":e.disabled,"text-red-500":e.danger},o),onMouseDown:e.disabled?void 0:a,children:["checkbox"===r&&n?t.jsx("span",{className:"absolute left-4 flex items-center justify-center",children:t.jsx(Rme,{type:"heroicons",name:"check",className:"size-4"})}):"radio"===r&&n?t.jsx("span",{className:"absolute left-4 flex items-center justify-center",children:t.jsx(Rme,{type:"heroicons",name:"circle",className:"h-2 w-2 fill-current"})}):null,e.icon&&t.jsx("span",{className:"flex-shrink-0",children:e.icon}),e.label]})));oye.displayName="MenuItem";const lye=e.forwardRef((({className:e},r)=>t.jsx("div",{ref:r,className:s_("-mx-2 my-2 h-px bg-[var(--dropdown-menu-seperator-bg)]",e)})));lye.displayName="MenuSeparator";const iye=e.forwardRef((({children:e,className:r},n)=>t.jsx("div",{ref:n,className:s_("px-3 py-2 typography-small4 text-text-g-contrast-medium",r),children:e})));iye.displayName="MenuLabel";const sye=e.forwardRef(((r,n)=>{var{id:a,options:o=[],value:l,label:i,size:s="md",rounded:c="normal",variant:d="outline",defaultMenuItemType:u="checkbox",helperText:h,errorMessage:p,fullwidth:f=!0,disabled:v=!1,error:m=!1,filterMode:y=!1,required:g=!0,modal:k=!1,onChangeText:b,onSelect:w,renderOptions:x,optionContainerClassName:_,optionItemClassName:M,optionNotFoundItemClassName:j,segmentedInput:O=!0}=r,E=o_(r,["id","options","value","label","size","rounded","variant","defaultMenuItemType","helperText","errorMessage","fullwidth","disabled","error","filterMode","required","modal","onChangeText","onSelect","renderOptions","optionContainerClassName","optionItemClassName","optionNotFoundItemClassName","segmentedInput"]);const z=a||`${i}-select`,[C,P]=e.useState(!1),[R,A]=e.useState(null),[L,I]=e.useState(""),V=e.useRef(""),H=e.useRef(null),S=e.useRef(null),[Z,N]=e.useState({}),[q,D]=e.useState(!1),[B,F]=e.useState(!1);e.useImperativeHandle(n,(()=>null==S?void 0:S.current)),e.useEffect((()=>{var e;A(l),I(null!==(e=null==l?void 0:l.label)&&void 0!==e?e:"")}),[l]),e.useEffect((()=>{let e=S.current;for(;e;){if("dialog"===e.getAttribute("role"))return void F(!0);e=e.parentElement}F(!1)}),[]);const T=e.useCallback((e=>{null==b||b(e),I(e.target.value),e.target.value||X(e)}),[b]),W=e.useCallback((e=>{A(e),I(e.label),null==w||w(e),P(!1)}),[w]),U=e.useMemo((()=>o.filter((e=>{var t;return!y||(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(null==L?void 0:L.toLowerCase()))}))),[o,y,L]),G=!B&&k,$=e.useCallback((()=>{if(S.current&&H.current){const e=S.current.getBoundingClientRect(),t=H.current.offsetHeight,r=window.innerHeight-e.bottom,n=e.top,a=r<t&&n>r;D(a),N(G?{position:"absolute",top:a?e.top-t+"px":`${e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}:{position:"absolute",top:a?`-${t}px`:"100%",left:"0",width:"100%",zIndex:9999})}}),[k,B,G]);e.useEffect((()=>(C&&($(),window.addEventListener("resize",$)),()=>{window.removeEventListener("resize",$)})),[C,$]);const Y=()=>{if(x)return x({optionsFiltered:U,selectedOption:R,onClick:W,style:Z,dropdownRef:H});let r;return r=U.map((r=>r.renderLabel?{type:"custom",render:()=>t.jsx(e.Fragment,{children:r.renderLabel({value:r.value,label:r.label,handleOnClick:()=>W(r),className:s_("relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-subtitle4 outline-none transition-colors","bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]","active:opacity-75","hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]",{"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)] typography-subtitle5":(null==R?void 0:R.value)===r.value},M)})},r.value)}:{type:"item",item:{type:u,value:r.value,label:r.label}})),0===r.length&&r.push({type:"custom",render:()=>t.jsx("div",{className:s_("px-4 py-14 text-center text-input-text",j),children:"Not found"},"not-found")}),t.jsx(aye,{ref:H,items:r,selectedValues:(null==R?void 0:R.value)?[R.value]:[],onSelect:e=>{const t=U.find((t=>t.value===e));t&&W(t)},className:s_("absolute mt-1 w-full max-h-60 overflow-y-auto",!G&&(q?"bottom-full mb-1":"top-full mt-1"),_),style:Z})},K=e.useCallback((e=>{var t;P(!0),null===(t=null==E?void 0:E.onFocus)||void 0===t||t.call(E,e)}),[null==E?void 0:E.onFocus]),X=e.useCallback((e=>{const t=U.find((t=>{var r,n;return t.value===(null===(r=e.target)||void 0===r?void 0:r.value)||t.label===(null===(n=e.target)||void 0===n?void 0:n.value)}));let r=t||{value:"",label:""};!!!t&&L&&(r={value:"",label:""}),"Enter"!==V.current&&(A(r),I(r.label),null==w||w(r))}),[U,L]),Q=e.useCallback((e=>{var t;setTimeout((()=>P(!1)),200),X(e),null===(t=null==E?void 0:E.onBlur)||void 0===t||t.call(E,e)}),[null==E?void 0:E.onBlur,X]),J=e.useCallback((e=>{var t;V.current=e.code,null===(t=null==E?void 0:E.onKeyDown)||void 0===t||t.call(E,e)}),[null==E?void 0:E.onKeyDown]);return t.jsxs("div",{className:"relative "+(f?"w-full":""),children:[t.jsx(Mme,Object.assign({hasClearIcon:!1,endIcon:t.jsx(hn,{className:rye({isFocus:C})})},E,{ref:S,readOnly:!y,value:L,onChange:T,label:i,placeholder:" ",type:"text",autoComplete:"off",rounded:c,variant:d,helperText:h,errorMessage:p,fullwidth:f,error:m,required:g,id:z,disabled:v,size:s,className:O?nye({size:s}):void 0,onFocus:K,onBlur:Q,onKeyDown:J})),C&&(G?t.jsx(tye,{container:document.body,children:Y()}):Y())]})}));function cye(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function dye(...e){return l.useCallback(cye(...e),e)}function uye(e,r=[]){let n=[];const a=()=>{const t=n.map((e=>l.createContext(e)));return function(r){const n=r?.[e]||t;return l.useMemo((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return a.scopeName=e,[function(r,a){const o=l.createContext(a),i=n.length;n=[...n,a];const s=r=>{const{scope:n,children:a,...s}=r,c=n?.[e]?.[i]||o,d=l.useMemo((()=>s),Object.values(s));return t.jsx(c.Provider,{value:d,children:a})};return s.displayName=r+"Provider",[s,function(t,n){const s=n?.[e]?.[i]||o,c=l.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},hye(a,...r)]}function hye(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return l.useMemo((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}function pye(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function fye(e){const t=l.useRef(e);return l.useEffect((()=>{t.current=e})),l.useMemo((()=>(...e)=>t.current?.(...e)),[])}function vye({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=function({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,a=l.useRef(n),o=fye(t);return l.useEffect((()=>{a.current!==n&&(o(n),a.current=n)}),[n,a,o]),r}({defaultProp:t,onChange:r}),o=void 0!==e,i=o?e:n,s=fye(r);return[i,l.useCallback((t=>{if(o){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else a(t)}),[o,e,a,s])]}function mye(e){const t=l.useRef({value:e,previous:e});return l.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function yye(e){const[t,r]=l.useState(void 0);return Jme((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let a,o;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;r({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}var gye=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),o=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=function(e,t){return l.useReducer(((e,r)=>t[e][r]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect((()=>{const e=kye(n.current);o.current="mounted"===s?e:"none"}),[s]),Jme((()=>{const t=n.current,r=a.current;if(r!==e){const n=o.current,l=kye(t);if(e)c("MOUNT");else if("none"===l||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==l?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,c]),Jme((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,l=o=>{const l=kye(n.current).includes(o.animationName);if(o.target===t&&l&&(c("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},i=e=>{e.target===t&&(o.current=kye(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),a="function"==typeof r?r({present:n.isPresent}):l.Children.only(r),o=dye(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||n.isPresent?l.cloneElement(a,{ref:o}):null};function kye(e){return e?.animationName||"none"}gye.displayName="Presence";var bye=l.forwardRef(((e,r)=>{const{children:n,...a}=e,o=l.Children.toArray(n),i=o.find(_ye);if(i){const e=i.props.children,n=o.map((t=>t===i?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t));return t.jsx(wye,{...a,ref:r,children:l.isValidElement(e)?l.cloneElement(e,void 0,n):null})}return t.jsx(wye,{...a,ref:r,children:n})}));bye.displayName="Slot";var wye=l.forwardRef(((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r);return l.cloneElement(r,{...Mye(n,r.props),ref:t?cye(t,e):e})}return l.Children.count(r)>1?l.Children.only(null):null}));wye.displayName="SlotClone";var xye=({children:e})=>t.jsx(t.Fragment,{children:e});function _ye(e){return l.isValidElement(e)&&e.type===xye}function Mye(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{o(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}var jye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),Oye="Checkbox",[Eye,zye]=uye(Oye),[Cye,Pye]=Eye(Oye),Rye=l.forwardRef(((e,r)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:i,required:s,disabled:c,value:d="on",onCheckedChange:u,form:h,...p}=e,[f,v]=l.useState(null),m=dye(r,(e=>v(e))),y=l.useRef(!1),g=!f||(h||!!f.closest("form")),[k=!1,b]=vye({prop:o,defaultProp:i,onChange:u}),w=l.useRef(k);return l.useEffect((()=>{const e=f?.form;if(e){const t=()=>b(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),t.jsxs(Cye,{scope:n,state:k,disabled:c,children:[t.jsx(jye.button,{type:"button",role:"checkbox","aria-checked":Vye(k)?"mixed":k,"aria-required":s,"data-state":Hye(k),"data-disabled":c?"":void 0,disabled:c,value:d,...p,ref:m,onKeyDown:pye(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:pye(e.onClick,(e=>{b((e=>!!Vye(e)||!e)),g&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())}))}),g&&t.jsx(Iye,{control:f,bubbles:!y.current,name:a,value:d,checked:k,required:s,disabled:c,form:h,style:{transform:"translateX(-100%)"},defaultChecked:!Vye(i)&&i})]})}));Rye.displayName=Oye;var Aye="CheckboxIndicator",Lye=l.forwardRef(((e,r)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,l=Pye(Aye,n);return t.jsx(gye,{present:a||Vye(l.state)||!0===l.state,children:t.jsx(jye.span,{"data-state":Hye(l.state),"data-disabled":l.disabled?"":void 0,...o,ref:r,style:{pointerEvents:"none",...e.style}})})}));Lye.displayName=Aye;var Iye=e=>{const{control:r,checked:n,bubbles:a=!0,defaultChecked:o,...i}=e,s=l.useRef(null),c=mye(n),d=yye(r);l.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:a});e.indeterminate=Vye(n),r.call(e,!Vye(n)&&n),e.dispatchEvent(t)}}),[c,n,a]);const u=l.useRef(!Vye(n)&&n);return t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??u.current,...i,tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Vye(e){return"indeterminate"===e}function Hye(e){return Vye(e)?"indeterminate":e?"checked":"unchecked"}var Sye=Rye,Zye=Lye;const Nye=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(Sye,Object.assign({ref:r,className:s_("peer size-4 shrink-0 cursor-pointer rounded-[var(--spacing-spacing-xxs,2px)] border border-function-default-solid ring-offset-bg-bg1","hover:border-function-default-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-input-active-stroke focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:border-state-disable-outline disabled:text-state-disable-outline","disabled:data-[state=checked]:border-state-disable-solid disabled:data-[state=checked]:bg-state-disable-solid","disabled:data-[state=indeterminate]:border-state-disable-solid disabled:data-[state=indeterminate]:bg-state-disable-solid",{"data-[state=checked]:border-function-active-solid data-[state=checked]:bg-function-active-solid data-[state=checked]:text-function-active-icon data-[state=indeterminate]:border-function-active-solid data-[state=indeterminate]:bg-function-active-solid data-[state=indeterminate]:text-function-active-icon":!a.disabled,"hover:data-[state=checked]:border-function-active-hover hover:data-[state=checked]:bg-function-active-hover hover:data-[state=indeterminate]:border-function-active-hover hover:data-[state=indeterminate]:bg-function-active-hover":!a.disabled},n)},a,{children:t.jsxs(Zye,{className:s_("flex size-[14px] items-center justify-center text-current","[&[data-state=checked]_.checkbox-check-icon]:block","[&[data-state=indeterminate]_.checkbox-minus-icon]:block"),children:[t.jsx(tn,{className:"checkbox-check-icon hidden size-[14px]"}),t.jsx(Ri,{className:"checkbox-minus-icon hidden size-[14px]"})]})}))}));Nye.displayName=Sye.displayName;var qye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),Dye=l.forwardRef(((e,r)=>t.jsx(qye.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));Dye.displayName="Label";var Bye=Dye;const Fye=r.cva(["block cursor-pointer duration-450 transition-all px-[2px] text-input-default-text peer-focus:text-input-text-active"],{variants:{size:{sm:"typography-small1",md:"typography-subtitle2",lg:"typography-subtitle1"},disabled:{true:"text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled peer-disabled:cursor-not-allowed"},error:{true:"ring-error"},isFloatable:{true:"absolute peer-focus:text-input-text-active peer-focus:bg-input-label-background",false:""}},compoundVariants:[{size:"sm",isFloatable:!0,className:["left-3 -top-1.5 typography-label2 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{size:"md",isFloatable:!0,className:["left-3 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{size:"lg",isFloatable:!0,className:["left-4 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatable:!1}}),Tye=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(Bye,Object.assign({ref:r,className:s_(Fye({size:a.size,disabled:a.disabled,error:a.error,isFloatable:a.isFloatable}),n)},a))}));Tye.displayName=Bye.displayName;const Wye=r.cva(["border-0 outline-none","p-1 flex w-auto h-fit box-border","peer text-input-filled-text placeholder:text-input-default-text bg-transparent caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-xl",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke hover:text-input-filled-text","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke focus:text-input-filled-text active:text-input-filled-text"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-default-stroke"},hiddenPlaceholder:{true:"placeholder:text-transparent"},fullwidth:{true:"w-full"},disabled:{true:["text-input-disable-text ring-input-disable-stroke bg-input-disable-bg placeholder:text-input-disable-text","hover:text-input-disable-text hover:ring-input-disable-stroke hover:bg-input-disable-bg hover:placeholder:text-input-disable-text","active:text-input-disable-text active:ring-input-disable-stroke active:bg-input-disable-bg active:placeholder:text-input-disable-text"]},error:{true:"ring-input-error focus:ring-input-error"}},defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hiddenPlaceholder:!0}}),Uye=e.forwardRef(((e,r)=>{var{className:n,type:a="text",size:o="md",variant:l="outline",rounded:i="normal",fullwidth:s=!1,disabled:c=!1,error:d=!1,required:u=!1,hiddenPlaceholder:h=!1}=e,p=o_(e,["className","type","size","variant","rounded","fullwidth","disabled","error","required","hiddenPlaceholder"]);return t.jsx("input",Object.assign({type:a,className:s_(Wye({size:o,variant:l,fullwidth:s,error:d,hiddenPlaceholder:h,disabled:c,rounded:i}),n),ref:r,disabled:c},p))}));Uye.displayName="Input";var Gye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),$ye="Avatar",[Yye,Kye]=uye($ye),[Xye,Qye]=Yye($ye),Jye=l.forwardRef(((e,r)=>{const{__scopeAvatar:n,...a}=e,[o,i]=l.useState("idle");return t.jsx(Xye,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:t.jsx(Gye.span,{...a,ref:r})})}));Jye.displayName=$ye;var ege="AvatarImage",tge=l.forwardRef(((e,r)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...i}=e,s=Qye(ege,n),c=function(e,t){const[r,n]=l.useState("idle");return Jme((()=>{if(!e)return void n("error");let r=!0;const a=new window.Image,o=e=>()=>{r&&n(e)};return n("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{r=!1}}),[e,t]),r}(a,i.referrerPolicy),d=fye((e=>{o(e),s.onImageLoadingStatusChange(e)}));return Jme((()=>{"idle"!==c&&d(c)}),[c,d]),"loaded"===c?t.jsx(Gye.img,{...i,ref:r,src:a}):null}));tge.displayName=ege;var rge="AvatarFallback",nge=l.forwardRef(((e,r)=>{const{__scopeAvatar:n,delayMs:a,...o}=e,i=Qye(rge,n),[s,c]=l.useState(void 0===a);return l.useEffect((()=>{if(void 0!==a){const e=window.setTimeout((()=>c(!0)),a);return()=>window.clearTimeout(e)}}),[a]),s&&"loaded"!==i.imageLoadingStatus?t.jsx(Gye.span,{...o,ref:r}):null}));nge.displayName=rge;var age=Jye,oge=tge,lge=nge;const ige=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(age,Object.assign({ref:r,className:s_("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n)},a))}));ige.displayName=age.displayName;const sge=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(oge,Object.assign({ref:r,className:s_("aspect-square h-full w-full",n)},a))}));sge.displayName=oge.displayName;const cge=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(lge,Object.assign({ref:r,className:s_("flex h-full w-full items-center justify-center rounded-full bg-inherit text-inherit",n)},a))}));cge.displayName=lge.displayName;const dge=r.cva(["flex items-center justify-center bg-grey2-700 text-common-black typography-subtitle2 truncate"],{variants:{size:{xxs:"w-[24px] h-[24px] typography-subtitle3",xs:"w-[32px] h-[32px]",sm:"w-[40px] h-[40px]",md:"w-[48px] h-[48px]",lg:"w-[64px] h-[64px]"},rounded:{normal:"rounded",full:"rounded-full",none:"rounded-none"}},defaultVariants:{size:"md",rounded:"normal"}}),uge=e=>{var t,r,n;if(!e.length)return"-";const a=e.split(" ");return`${null==e?void 0:e.charAt(0)}${null!==(n=null!==(r=null===(t=null==a?void 0:a[1])||void 0===t?void 0:t.charAt(0))&&void 0!==r?r:null==e?void 0:e.charAt(1))&&void 0!==n?n:""}`},hge=e.createContext(void 0),pge=()=>{const t=e.useContext(hge);if(!t)throw new Error("useCollapsible must be used within a CollapsibleProvider");return t},fge=({size:r,children:n,isExpandControlled:a,onToggle:o})=>{const[l,i]=e.useState(!1);return e.useEffect((()=>{void 0!==a&&i(a)}),[a]),t.jsx(hge.Provider,{value:{size:r,isExpand:l,toggle:()=>{i((e=>!e)),o&&o(!l)},setIsExpand:i},children:n})},vge=r.cva(["flex flex-1 bg-secondary-default hover:bg-secondary-hover text-state-secondary-text-solid","focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),mge=r.cva(["transition-all flex content-center justify-center "],{variants:{size:{sm:"size-5",md:"size-6",lg:"size-7"},isExpand:{true:"rotate-180"}},defaultVariants:{size:"md",isExpand:!1}}),yge=r.cva(["flex flex-1 border-t border-t-secondary","transition ease-in-out delay-150 duration-300"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),gge=r.cva(["flex flex-col border border-secondary rounded overflow-hidden"]),kge=e.forwardRef((({children:e,className:r,hideExpandIcon:n=!1},a)=>{const{toggle:o,isExpand:l,size:i}=pge(),s=vge({size:i}),c=mge({isExpand:l,size:i});return t.jsxs("button",{onClick:o,className:s_(s,r),ref:a,children:[t.jsx("span",{className:"flex flex-1",children:e}),!n&&t.jsx("span",{className:s_(c),children:t.jsx(hn,{className:s_("size-full")})})]})}));kge.displayName="CollapsibleButton";const bge=e.forwardRef((({children:r,className:n},a)=>{const{isExpand:o,size:l}=pge(),i=yge({size:l}),[s,c]=e.useState("0px"),d=e.useRef(null);return e.useEffect((()=>{d.current&&c(o?`${d.current.scrollHeight}px`:"0px")}),[o,r]),t.jsx("div",{ref:a,className:s_("overflow-hidden transition-all ease-in-out"),style:{height:s},children:t.jsx("div",{ref:d,className:s_(i,n),children:r})})}));bge.displayName="CollapsiblePanel";const wge=e.forwardRef((({children:e,isExpand:r,size:n,className:a,onToggle:o},l)=>{const i=gge();return t.jsx(fge,{size:n,isExpandControlled:r,onToggle:o,children:t.jsx("div",{ref:l,className:s_(i,a),children:e})})}));var xge,_ge,Mge;wge.displayName="Collapsible",wge.Button=kge,wge.Panel=bge,function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(xge||(xge={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(_ge||(_ge={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Mge||(Mge={}));const jge=6048e5,Oge=Symbol.for("constructDateFrom");function Ege(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Oge in e?e[Oge](t):e instanceof Date?new e.constructor(t):new Date(t)}function zge(e,t){return Ege(t||e,e)}function Cge(e,t,r){const n=zge(e,r?.in);return isNaN(t)?Ege(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function Pge(e,t,r){const n=zge(e,r?.in);if(isNaN(t))return Ege(e,NaN);if(!t)return n;const a=n.getDate(),o=Ege(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return a>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}let Rge={};function Age(){return Rge}function Lge(e,t){const r=Age(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zge(e,t?.in),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Ige(e,t){return Lge(e,{...t,weekStartsOn:1})}function Vge(e,t){const r=zge(e,t?.in),n=r.getFullYear(),a=Ege(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=Ige(a),l=Ege(r,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const i=Ige(l);return r.getTime()>=o.getTime()?n+1:r.getTime()>=i.getTime()?n:n-1}function Hge(e){const t=zge(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Sge(e,...t){const r=Ege.bind(null,t.find((e=>"object"==typeof e)));return t.map(r)}function Zge(e,t){const r=zge(e,t?.in);return r.setHours(0,0,0,0),r}function Nge(e,t,r){const[n,a]=Sge(0,e,t),o=Zge(n),l=Zge(a),i=+o-Hge(o),s=+l-Hge(l);return Math.round((i-s)/864e5)}function qge(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Dge(e,t){const r=zge(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Bge(e,t){const r=Age(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zge(e,t?.in),o=a.getDay(),l=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}const Fge={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Tge(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Wge={date:Tge({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Tge({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Tge({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Uge={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Gge(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const $ge={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Gge({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Gge({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gge({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Gge({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Gge({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Yge(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const Kge={ordinalNumber:(Xge={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(Xge.matchPattern);if(!r)return null;const n=r[0],a=e.match(Xge.parsePattern);if(!a)return null;let o=Xge.valueCallback?Xge.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(n.length)}}),era:Yge({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Yge({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Yge({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Yge({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Yge({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Xge;const Qge={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=Fge[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:Wge,formatRelative:(e,t,r,n)=>Uge[e],localize:$ge,match:Kge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jge(e,t){const r=zge(e,t?.in),n=+Ige(r)-+function(e,t){const r=Vge(e,t),n=Ege(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ige(n)}(r);return Math.round(n/jge)+1}function eke(e,t){const r=zge(e,t?.in),n=r.getFullYear(),a=Age(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=Ege(t?.in||e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=Lge(l,t),s=Ege(t?.in||e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=Lge(s,t);return+r>=+i?n+1:+r>=+c?n:n-1}function tke(e,t){const r=zge(e,t?.in),n=+Lge(r,t)-+function(e,t){const r=Age(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=eke(e,t),o=Ege(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),Lge(o,t)}(r,t);return Math.round(n/jge)+1}function rke(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const nke={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return rke("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):rke(r+1,2)},d:(e,t)=>rke(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>rke(e.getHours()%12||12,t.length),H:(e,t)=>rke(e.getHours(),t.length),m:(e,t)=>rke(e.getMinutes(),t.length),s:(e,t)=>rke(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return rke(Math.trunc(n*Math.pow(10,r-3)),t.length)}},ake="midnight",oke="noon",lke="morning",ike="afternoon",ske="evening",cke="night",dke={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return nke.y(e,t)},Y:function(e,t,r,n){const a=eke(e,n),o=a>0?a:1-a;if("YY"===t){return rke(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):rke(o,t.length)},R:function(e,t){return rke(Vge(e),t.length)},u:function(e,t){return rke(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return rke(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return rke(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return nke.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return rke(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=tke(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):rke(a,t.length)},I:function(e,t,r){const n=Jge(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):rke(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):nke.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=zge(e,t?.in);return Nge(r,Dge(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):rke(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return rke(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return rke(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return rke(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?oke:0===n?ake:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?ske:n>=12?ike:n>=4?lke:cke,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return nke.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):nke.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):rke(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):rke(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):nke.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):nke.s(e,t)},S:function(e,t){return nke.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return hke(n);case"XXXX":case"XX":return pke(n);default:return pke(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return hke(n);case"xxxx":case"xx":return pke(n);default:return pke(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+uke(n,":");default:return"GMT"+pke(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+uke(n,":");default:return"GMT"+pke(n,":")}},t:function(e,t,r){return rke(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return rke(+e,t.length)}};function uke(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+rke(o,2)}function hke(e,t){if(e%60==0){return(e>0?"-":"+")+rke(Math.abs(e)/60,2)}return pke(e,t)}function pke(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+rke(Math.trunc(n/60),2)+t+rke(n%60,2)}const fke=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},vke=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},mke={p:vke,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return fke(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",fke(n,t)).replace("{{time}}",vke(a,t))}},yke=/^D+$/,gke=/^Y+$/,kke=["D","DD","YY","YYYY"];const bke=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wke=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xke=/^'([^]*?)'?$/,_ke=/''/g,Mke=/[a-zA-Z]/;function jke(e,t,r){const n=Age(),a=r?.locale??n.locale??Qge,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=zge(e,r?.in);if(!function(e){return!(!qge(e)&&"number"!=typeof e||isNaN(+zge(e)))}(i))throw new RangeError("Invalid time value");let s=t.match(wke).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,mke[t])(e,a.formatLong)}return e})).join("").match(bke).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Oke(e)};if(dke[t])return{isToken:!0,value:e};if(t.match(Mke))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((n=>{if(!n.isToken)return n.value;const o=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return gke.test(e)}(o)||!r?.useAdditionalDayOfYearTokens&&function(e){return yke.test(e)}(o))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),kke.includes(e))throw new RangeError(n)}(o,t,String(e));return(0,dke[o[0]])(i,o,a.localize,c)})).join("")}function Oke(e){const t=e.match(xke);return t?t[1].replace(_ke,"'"):e}function Eke(e,t,r){const n=zge(e,r?.in),a=n.getFullYear(),o=n.getDate(),l=Ege(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const i=function(e,t){const r=zge(e,t?.in),n=r.getFullYear(),a=r.getMonth(),o=Ege(r,0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}(l);return n.setMonth(t,Math.min(o,i)),n}function zke(e,t){const r=t.startOfMonth(e),n=r.getDay();return 1===n?r:0===n?t.addDays(r,-6):t.addDays(r,-1*(n-1))}class Cke{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Cge(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):Pge(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,r){return Cge(e,7*t,r)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,r){return Pge(e,12*t,r)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Nge(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[r,n]=Sge(0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(e,t),this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e,this):function(e,t){const r=zke(e,t),n=function(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,a=t.addDays(e,1-n),o=t.addDays(a,34);return e.getMonth()===o.getMonth()?5:4}(e,t);return t.addDays(r,7*n-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return Bge(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const r=zge(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}(e),this.endOfWeek=e=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,this.options):Bge(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const r=zge(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}(e),this.format=(e,t)=>this.overrides?.format?this.overrides.format(e,t,this.options):jke(e,t,this.options),this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):Jge(e),this.getWeek=e=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):tke(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+zge(e)>+zge(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+zge(e)<+zge(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):qge(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[r,n]=Sge(0,e,t);return+Zge(r)==+Zge(n)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[r,n]=Sge(0,e,t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[r,n]=Sge(0,e,t);return r.getFullYear()===n.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=Ege.bind(null,e));const t=zge(e,n);(!r||r<t||isNaN(+t))&&(r=t)})),Ege(n,r||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=Ege.bind(null,e));const t=zge(e,n);(!r||r>t||isNaN(+t))&&(r=t)})),Ege(n,r||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):Eke(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,r){const n=zge(e,r?.in);return isNaN(+n)?Ege(e,NaN):(n.setFullYear(t),n)}(e,t),this.startOfBroadcastWeek=e=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):zke(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Zge(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Ige(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const r=zge(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}(e),this.startOfWeek=e=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):Lge(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Dge(e),this.options={locale:Qge,...e},this.overrides=t}}const Pke=new Cke;const Rke=e.createContext(void 0);function Ake(){const t=e.useContext(Rke);if(void 0===t)throw new Error("useDayPicker() must be used within a custom component.");return t}var Lke=Object.freeze({__proto__:null,Button:function(t){return e.createElement("button",{...t})},CaptionLabel:function(t){return e.createElement("span",{...t})},Chevron:function(t){const{size:r=24,orientation:n="left",className:a}=t;return e.createElement("svg",{className:a,width:r,height:r,viewBox:"0 0 24 24"},"up"===n&&e.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&e.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&e.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&e.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))},Day:function(t){const{day:r,modifiers:n,...a}=t;return e.createElement("td",{...a})},DayButton:function(t){const{day:r,modifiers:n,...a}=t,o=e.useRef(null);return e.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),e.createElement("button",{ref:o,...a})},Dropdown:function(t){const{options:r,className:n,components:a,classNames:o,...l}=t,i=[o[xge.Dropdown],n].join(" "),s=r?.find((({value:e})=>e===l.value));return e.createElement("span",{"data-disabled":l.disabled,className:o[xge.DropdownRoot]},e.createElement(a.Select,{className:i,...l},r?.map((({value:t,label:r,disabled:n})=>e.createElement(a.Option,{key:t,value:t,disabled:n},r)))),e.createElement("span",{className:o[xge.CaptionLabel],"aria-hidden":!0},s?.label,e.createElement(a.Chevron,{orientation:"down",size:18,className:o[xge.Chevron]})))},DropdownNav:function(t){return e.createElement("div",{...t})},Footer:function(t){return e.createElement("div",{...t})},Month:function(t){const{calendarMonth:r,displayIndex:n,...a}=t;return e.createElement("div",{...a},t.children)},MonthCaption:function(t){const{calendarMonth:r,displayIndex:n,...a}=t;return e.createElement("div",{...a})},MonthGrid:function(t){return e.createElement("table",{...t})},Months:function(t){return e.createElement("div",{...t})},MonthsDropdown:function(t){const{components:r}=Ake();return e.createElement(r.Dropdown,{...t})},Nav:function(t){const{onPreviousClick:r,onNextClick:n,previousMonth:a,nextMonth:o,...l}=t,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=Ake();return e.createElement("nav",{...l},e.createElement(i.PreviousMonthButton,{type:"button",className:s[xge.PreviousMonthButton],tabIndex:a?void 0:-1,disabled:!a||void 0,"aria-label":c(a),onClick:t.onPreviousClick},e.createElement(i.Chevron,{disabled:!a||void 0,className:s[xge.Chevron],orientation:"left"})),e.createElement(i.NextMonthButton,{type:"button",className:s[xge.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":d(o),onClick:t.onNextClick},e.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:s[xge.Chevron]})))},NextMonthButton:function(t){const{components:r}=Ake();return e.createElement(r.Button,{...t})},Option:function(t){return e.createElement("option",{...t})},PreviousMonthButton:function(t){const{components:r}=Ake();return e.createElement(r.Button,{...t})},Root:function(t){return e.createElement("div",{...t})},Select:function(t){return e.createElement("select",{...t})},Week:function(t){const{week:r,...n}=t;return e.createElement("tr",{...n})},WeekNumber:function(t){const{week:r,...n}=t;return e.createElement("th",{...n})},WeekNumberHeader:function(t){return e.createElement("th",{...t})},Weekday:function(t){return e.createElement("th",{...t})},Weekdays:function(t){return e.createElement("thead",{"aria-hidden":!0},e.createElement("tr",{...t}))},Weeks:function(t){return e.createElement("tbody",{...t})},YearsDropdown:function(t){const{components:r}=Ake();return e.createElement(r.Dropdown,{...t})}});function Ike(e){return{...Lke,...e}}function Vke(){const e={};for(const t in xge)e[xge[t]]=`rdp-${xge[t]}`;for(const t in _ge)e[_ge[t]]=`rdp-${_ge[t]}`;for(const t in Mge)e[Mge[t]]=`rdp-${Mge[t]}`;return e}function Hke(e,t,r){return(r??new Cke(t)).format(e,"LLLL y")}const Ske=Hke;function Zke(e){return e.toString()}const Nke=Zke;var qke=Object.freeze({__proto__:null,formatCaption:Hke,formatDay:function(e,t,r){return(r??new Cke(t)).format(e,"d")},formatMonthCaption:Ske,formatMonthDropdown:function(e,t){return t.localize?.month(e)},formatWeekNumber:function(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,r){return(r??new Cke(t)).format(e,"cccccc")},formatYearCaption:Nke,formatYearDropdown:Zke});const Dke={},Bke={};function Fke(e,t){try{const r=(Dke[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in Bke?Bke[r]:Wke(r,r.split(":"))}catch{if(e in Bke)return Bke[e];const t=e?.match(Tke);return t?Wke(e,t.slice(1)):NaN}}const Tke=/([+-]\d\d):?(\d\d)?/;function Wke(e,t){const r=+t[0],n=+(t[1]||0);return Bke[e]=r>0?60*r+n:60*r-n}class Uke extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Fke(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Yke(this),$ke(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Uke(...t,e):new Uke(Date.now(),e)}withTimeZone(e){return new Uke(+this,e)}getTimezoneOffset(){return-Fke(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),$ke(this),+this}[Symbol.for("constructDateFrom")](e){return new Uke(+new Date(e),this.timeZone)}}const Gke=/^(get|set)(?!UTC)/;function $ke(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Yke(e){const t=Fke(e.timeZone,e),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const n=-new Date(+e).getTimezoneOffset(),a=n- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=n-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const i=Fke(e.timeZone,e),s=-new Date(+e).getTimezoneOffset()-i-l;if(i!==t&&s){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const t=i-Fke(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Gke.test(e))return;const t=e.replace(Gke,"$1UTC");Uke.prototype[t]&&(e.startsWith("get")?Uke.prototype[e]=function(){return this.internal[t]()}:(Uke.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Yke(e),+this},Uke.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),$ke(this),+this}))}));class Kke extends Uke{static tz(e,...t){return t.length?new Kke(...t,e):new Kke(Date.now(),e)}toISOString(){const[e,t,r]=this.tzComponents(),n=`${e}${t}:${r}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,r,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${r} ${t} ${n}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,r,n]=this.tzComponents();return`${e} GMT${t}${r}${n} (${a=this.timeZone,o=this,new Intl.DateTimeFormat("en-GB",{timeZone:a,timeZoneName:"long"}).format(o).slice(12)})`;var a,o}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Kke(+this,e)}[Symbol.for("constructDateFrom")](e){return new Kke(+new Date(e),this.timeZone)}}function Xke(e,t,r){return(r??new Cke(t)).format(e,"LLLL y")}const Qke=Xke;function Jke(e,t,r,n){let a=(n??new Cke(r)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const ebe=Jke;var tbe=Object.freeze({__proto__:null,labelCaption:Qke,labelDay:ebe,labelDayButton:Jke,labelGrid:Xke,labelGridcell:function(e,t,r,n){let a=(n??new Cke(r)).format(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelMonthDropdown:function(e){return"Choose the Month"},labelNav:function(){return""},labelNext:function(e){return"Go to the Next Month"},labelPrevious:function(e){return"Go to the Previous Month"},labelWeekNumber:function(e,t){return`Week ${e}`},labelWeekNumberHeader:function(e){return"Week Number"},labelWeekday:function(e,t,r){return(r??new Cke(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});function rbe(e,t){const{month:r,defaultMonth:n,today:a=(e.timeZone?Kke.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:o=1,endMonth:l,startMonth:i}=e;let s=r||n||a;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=t;if(l&&c(l,s)<0){s=d(l,-1*(o-1))}return i&&c(s,i)<0&&(s=i),u(s)}class nbe{constructor(e,t,r=Pke){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!r.isSameMonth(e,t)),this.dateLib=r}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class abe{constructor(e,t){this.date=e,this.weeks=t}}class obe{constructor(e,t){this.days=t,this.weekNumber=e}}function lbe(t,r){const[n,a]=e.useState(t);return[void 0===r?n:r,a]}function ibe(t,r){const[n,a]=function(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:a,startOfDay:o,startOfMonth:l,endOfMonth:i,addYears:s,endOfYear:c}=t,{fromYear:d,toYear:u,fromMonth:h,toMonth:p}=e;!r&&h&&(r=h),!r&&d&&(r=new Date(d,0,1)),!n&&p&&(n=p),!n&&u&&(n=new Date(u,11,31));const f=e.captionLayout?.startsWith("dropdown");r?r=l(r):d?r=new Date(d,0,1):!r&&f&&(r=a(s(e.today??(e.timeZone?Kke.tz(e.timeZone):t.Date?new t.Date:new Date),-100)));n?n=i(n):u?n=new Date(u,11,31):!n&&f&&(n=c(e.today??(e.timeZone?Kke.tz(e.timeZone):t.Date?new t.Date:new Date)));return[r?o(r):r,n?o(n):n]}(t,r),{startOfMonth:o,endOfMonth:l}=r,i=rbe(t,r),[s,c]=lbe(i,t.month?o(t.month):void 0);e.useEffect((()=>{const e=rbe(t,r);c(e)}),[t.timeZone]);const d=function(e,t,r,n){const{numberOfMonths:a=1}=r,o=[];for(let r=0;r<a;r++){const a=n.addMonths(e,r);if(t&&a>t)break;o.push(a)}return o}(s,a,t,r),u=function(e,t,r,n){const a=e[0],o=e[e.length-1],{ISOWeek:l,fixedWeeks:i,broadcastCalendar:s}=r??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:p,endOfMonth:f,endOfWeek:v,isAfter:m,startOfBroadcastWeek:y,startOfISOWeek:g,startOfWeek:k}=n,b=s?y(a,n):l?g(a):k(a),w=d(s?h(o,n):l?p(f(o)):v(f(o)),b),x=u(o,a)+1,_=[];for(let e=0;e<=w;e++){const r=c(b,e);if(t&&m(r,t))break;_.push(r)}const M=(s?35:42)*x;if(i&&_.length<M){const e=M-_.length;for(let t=0;t<e;t++){const e=c(_[_.length-1],1);_.push(e)}}return _}(d,t.endMonth?l(t.endMonth):void 0,t,r),h=function(e,t,r,n){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:l,endOfMonth:i,endOfWeek:s,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:p}=n,f=e.reduce(((e,f)=>{const v=r.broadcastCalendar?u(f,n):r.ISOWeek?h(f):p(f),m=r.broadcastCalendar?o(f,n):r.ISOWeek?l(i(f)):s(i(f)),y=t.filter((e=>e>=v&&e<=m)),g=r.broadcastCalendar?35:42;if(r.fixedWeeks&&y.length<g){const e=t.filter((e=>{const t=g-y.length;return e>m&&e<=a(m,t)}));y.push(...e)}const k=y.reduce(((e,t)=>{const a=r.ISOWeek?c(t):d(t),o=e.find((e=>e.weekNumber===a)),l=new nbe(t,f,n);return o?o.days.push(l):e.push(new obe(a,[l])),e}),[]),b=new abe(f,k);return e.push(b),e}),[]);return r.reverseMonths?f.reverse():f}(d,u,t,r),p=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(h),f=h.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]);const v=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o??1:1,d=l(e);return t&&s(d,t)<=0?void 0:i(d,-c)}(s,n,t,r),m=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o:1,d=l(e);return t&&s(t,e)<o?void 0:i(d,c)}(s,a,t,r),{disableNavigation:y,onMonthChange:g}=t,k=e=>{if(y)return;let t=o(e);n&&t<o(n)&&(t=o(n)),a&&t>o(a)&&(t=o(a)),c(t),g?.(t)};return{months:h,weeks:p,days:f,navStart:n,navEnd:a,previousMonth:v,nextMonth:m,goToMonth:k,goToDay:e=>{(e=>p.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||k(e.date)}}}function sbe(e,t,r=!1,n=Pke){let{from:a,to:o}=e;const{differenceInCalendarDays:l,isSameDay:i}=n;if(a&&o){l(o,a)<0&&([a,o]=[o,a]);return l(t,a)>=(r?1:0)&&l(o,t)>=(r?1:0)}return!r&&o?i(o,t):!(r||!a)&&i(a,t)}function cbe(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function dbe(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function ube(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function hbe(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function pbe(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function fbe(e,t){return Array.isArray(e)&&e.every(t.isDate)}function vbe(e,t,r=Pke){const n=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:l}=r;return n.some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return a(e,t);if(fbe(t,r))return t.includes(e);if(dbe(t))return sbe(t,e,!1,r);if(pbe(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(cbe(t)){const r=o(t.before,e)>0,n=o(t.after,e)<0;return l(t.before,t.after)?n&&r:r||n}return ube(t)?o(e,t.after)>0:hbe(t)?o(t.before,e)>0:"function"==typeof t&&t(e)}))}function mbe(e,t,r,n,a,o,l,i=0){if(i>365)return;const s=function(e,t,r,n,a,o,l){const{ISOWeek:i,broadcastCalendar:s}=o,{addDays:c,addMonths:d,addWeeks:u,addYears:h,endOfBroadcastWeek:p,endOfISOWeek:f,endOfWeek:v,max:m,min:y,startOfBroadcastWeek:g,startOfISOWeek:k,startOfWeek:b}=l;let w={day:c,week:u,month:d,year:h,startOfWeek:e=>s?g(e,l):i?k(e):b(e),endOfWeek:e=>s?p(e,l):i?f(e):v(e)}[e](r,"after"===t?1:-1);return"before"===t&&n?w=m([n,w]):"after"===t&&a&&(w=y([a,w])),w}(e,t,r.date,n,a,o,l),c=Boolean(o.disabled&&vbe(s,o.disabled,l)),d=Boolean(o.hidden&&vbe(s,o.hidden,l)),u=new nbe(s,s,l);return c||d?mbe(e,t,u,n,a,o,l,i+1):u}function ybe(t,r,n,a,o){const{autoFocus:l}=t,[i,s]=e.useState(),c=function(e,t,r,n){let a,o=0,l=!1;for(;o<e.length&&!l;){const i=e[o],s=t(i);s[_ge.disabled]||s[_ge.hidden]||s[_ge.outside]||(s[_ge.focused]||n?.isEqualTo(i)||r(i.date)||s[_ge.today])&&(a=i,l=!0),o++}return a||(a=e.find((e=>{const r=t(e);return!r[_ge.disabled]&&!r[_ge.hidden]&&!r[_ge.outside]}))),a}(r.days,n,a||(()=>!1),i),[d,u]=e.useState(l?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:u,focused:d,blur:()=>{s(d),u(void 0)},moveFocus:(e,n)=>{if(!d)return;const a=mbe(e,n,d,r.navStart,r.navEnd,t,o);a&&(r.goToDay(a),u(a))}}}function gbe(e,t,r=Pke){return sbe(e,t.from,!1,r)||sbe(e,t.to,!1,r)||sbe(t,e.from,!1,r)||sbe(t,e.to,!1,r)}function kbe(e,t,r=Pke){const n=Array.isArray(t)?t:[t],a=n.filter((e=>"function"!=typeof e)).some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return sbe(e,t,!1,r);if(fbe(t,r))return t.some((t=>sbe(e,t,!1,r)));if(dbe(t))return!(!t.from||!t.to)&&gbe(e,{from:t.from,to:t.to},r);if(pbe(t))return function(e,t,r=Pke){const n=Array.isArray(t)?t:[t];let a=e.from;const o=r.differenceInCalendarDays(e.to,e.from),l=Math.min(o,6);for(let e=0;e<=l;e++){if(n.includes(a.getDay()))return!0;a=r.addDays(a,1)}return!1}(e,t.dayOfWeek,r);if(cbe(t)){return r.isAfter(t.before,t.after)?gbe(e,{from:r.addDays(t.after,1),to:r.addDays(t.before,-1)},r):vbe(e.from,t,r)||vbe(e.to,t,r)}return!(!ube(t)&&!hbe(t))&&(vbe(e.from,t,r)||vbe(e.to,t,r))}));if(a)return!0;const o=n.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const n=r.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=n;e++){if(o.some((e=>e(t))))return!0;t=r.addDays(t,1)}}return!1}function bbe(e,t){const{disabled:r,excludeDisabled:n,selected:a,required:o,onSelect:l}=e,[i,s]=lbe(a,l?a:void 0),c=l?a:i;return{selected:c,select:(a,i,d)=>{const{min:u,max:h}=e,p=a?function(e,t,r=0,n=0,a=!1,o=Pke){const{from:l,to:i}=t||{},{isSameDay:s,isAfter:c,isBefore:d}=o;let u;if(l||i){if(l&&!i)u=s(l,e)?a?{from:l,to:void 0}:void 0:d(e,l)?{from:e,to:l}:{from:l,to:e};else if(l&&i)if(s(l,e)&&s(i,e))u=a?{from:l,to:i}:void 0;else if(s(l,e))u={from:l,to:r>0?void 0:e};else if(s(i,e))u={from:e,to:r>0?void 0:e};else if(d(e,l))u={from:e,to:i};else if(c(e,l))u={from:l,to:e};else{if(!c(e,i))throw new Error("Invalid range");u={from:l,to:e}}}else u={from:e,to:r>0?void 0:e};if(u?.from&&u?.to){const t=o.differenceInCalendarDays(u.to,u.from);(n>0&&t>n||r>1&&t<r)&&(u={from:e,to:void 0})}return u}(a,c,u,h,o,t):void 0;return n&&r&&p?.from&&p.to&&kbe({from:p.from,to:p.to},r,t)&&(p.from=a,p.to=void 0),l||s(p),l?.(p,a,i,d),p},isSelected:e=>c&&sbe(c,e,!1,t)}}function wbe(e,t){const r=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=lbe(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t;return{selected:i,select:(e,t,r)=>{let o=e;return!n&&i&&i&&s(e,i)&&(o=void 0),a||l(o),a?.(o,e,t,r),o},isSelected:e=>!!i&&s(i,e)}}(e,t),n=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=lbe(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t,c=e=>i?.some((t=>s(t,e)))??!1,{min:d,max:u}=e;return{selected:i,select:(e,t,r)=>{let o=[...i??[]];if(c(e)){if(i?.length===d)return;if(n&&1===i?.length)return;o=i?.filter((t=>!s(t,e)))}else o=i?.length===u?[e]:[...o,e];return a||l(o),a?.(o,e,t,r),o},isSelected:c}}(e,t),a=bbe(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return a;default:return}}function xbe(t){const{components:r,formatters:n,labels:a,dateLib:o,locale:l,classNames:i}=e.useMemo((()=>{const e={...Qge,...t.locale};return{dateLib:new Cke({locale:e,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens},t.dateLib),components:Ike(t.components),formatters:(r=t.formatters,r?.formatMonthCaption&&!r.formatCaption&&(r.formatCaption=r.formatMonthCaption),r?.formatYearCaption&&!r.formatYearDropdown&&(r.formatYearDropdown=r.formatYearCaption),{...qke,...r}),labels:{...tbe,...t.labels},locale:e,classNames:{...Vke(),...t.classNames}};var r}),[t.classNames,t.components,t.dateLib,t.firstWeekContainsDate,t.formatters,t.labels,t.locale,t.useAdditionalDayOfYearTokens,t.useAdditionalWeekYearTokens,t.weekStartsOn,t.broadcastCalendar]),{captionLayout:s,mode:c,onDayBlur:d,onDayClick:u,onDayFocus:h,onDayKeyDown:p,onDayMouseEnter:f,onDayMouseLeave:v,onNextClick:m,onPrevClick:y,showWeekNumber:g,styles:k}=t,{formatCaption:b,formatDay:w,formatMonthDropdown:x,formatWeekNumber:_,formatWeekNumberHeader:M,formatWeekdayName:j,formatYearDropdown:O}=n,E=ibe(t,o),{days:z,months:C,navStart:P,navEnd:R,previousMonth:A,nextMonth:L,goToMonth:I}=E,V=function(e,t,r){const{disabled:n,hidden:a,modifiers:o,showOutsideDays:l,broadcastCalendar:i,today:s}=t,{isSameDay:c,isSameMonth:d,startOfMonth:u,isBefore:h,endOfMonth:p,isAfter:f}=r,v=t.startMonth&&u(t.startMonth),m=t.endMonth&&p(t.endMonth),y={[_ge.focused]:[],[_ge.outside]:[],[_ge.disabled]:[],[_ge.hidden]:[],[_ge.today]:[]},g={};for(const u of e){const{date:e,displayMonth:p}=u,k=Boolean(p&&!d(e,p)),b=Boolean(v&&h(e,v)),w=Boolean(m&&f(e,m)),x=Boolean(n&&vbe(e,n,r)),_=Boolean(a&&vbe(e,a,r))||b||w||!i&&!l&&k||i&&!1===l&&k,M=c(e,s??(t.timeZone?Kke.tz(t.timeZone):r.Date?new r.Date:new Date));k&&y.outside.push(u),x&&y.disabled.push(u),_&&y.hidden.push(u),M&&y.today.push(u),o&&Object.keys(o).forEach((t=>{const n=o?.[t];n&&vbe(e,n,r)&&(g[t]?g[t].push(u):g[t]=[u])}))}return e=>{const t={[_ge.focused]:!1,[_ge.disabled]:!1,[_ge.hidden]:!1,[_ge.outside]:!1,[_ge.today]:!1},r={};for(const r in y){const n=y[r];t[r]=n.some((t=>t===e))}for(const t in g)r[t]=g[t].some((t=>t===e));return{...t,...r}}}(z,t,o),{isSelected:H,select:S,selected:Z}=wbe(t,o)??{},{blur:N,focused:q,isFocusTarget:D,moveFocus:B,setFocused:F}=ybe(t,E,V,H??(()=>!1),o),{labelDayButton:T,labelGridcell:W,labelGrid:U,labelMonthDropdown:G,labelNav:$,labelWeekday:Y,labelWeekNumber:K,labelWeekNumberHeader:X,labelYearDropdown:Q}=a,J=e.useMemo((()=>function(e,t,r){const n=r?Kke.tz(r):e.Date?new e.Date:new Date,a=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const r=e.addDays(a,t);o.push(r)}return o}(o,t.ISOWeek,t.timeZone)),[o,t.ISOWeek,t.timeZone]),ee=void 0!==c||void 0!==u,te=e.useCallback((()=>{A&&(I(A),y?.(A))}),[A,I,y]),re=e.useCallback((()=>{L&&(I(L),m?.(L))}),[I,L,m]),ne=e.useCallback(((e,t)=>r=>{r.preventDefault(),r.stopPropagation(),F(e),S?.(e.date,t,r),u?.(e.date,t,r)}),[S,u,F]),ae=e.useCallback(((e,t)=>r=>{F(e),h?.(e.date,t,r)}),[h,F]),oe=e.useCallback(((e,t)=>r=>{N(),d?.(e.date,t,r)}),[N,d]),le=e.useCallback(((e,r)=>n=>{const a={ArrowLeft:["day","rtl"===t.dir?"after":"before"],ArrowRight:["day","rtl"===t.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(a[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=a[n.key];B(e,t)}p?.(e.date,r,n)}),[B,p,t.dir]),ie=e.useCallback(((e,t)=>r=>{f?.(e.date,t,r)}),[f]),se=e.useCallback(((e,t)=>r=>{v?.(e.date,t,r)}),[v]),ce=e.useCallback((e=>t=>{const r=Number(t.target.value),n=o.setMonth(o.startOfMonth(e),r);I(n)}),[o,I]),de=e.useCallback((e=>t=>{const r=Number(t.target.value),n=o.setYear(o.startOfMonth(e),r);I(n)}),[o,I]),{className:ue,style:he}=e.useMemo((()=>({className:[i[xge.Root],t.className].filter(Boolean).join(" "),style:{...k?.[xge.Root],...t.style}})),[i,t.className,t.style,k]),pe=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach((([e,r])=>{e.startsWith("data-")&&(t[e]=r)})),t}(t),fe={dayPickerProps:t,selected:Z,select:S,isSelected:H,months:C,nextMonth:L,previousMonth:A,goToMonth:I,getModifiers:V,components:r,classNames:i,styles:k,labels:a,formatters:n};return e.createElement(Rke.Provider,{value:fe},e.createElement(r.Root,{className:ue,style:he,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...pe},e.createElement(r.Months,{className:i[xge.Months],style:k?.[xge.Months]},!t.hideNavigation&&e.createElement(r.Nav,{className:i[xge.Nav],style:k?.[xge.Nav],"aria-label":$(),onPreviousClick:te,onNextClick:re,previousMonth:A,nextMonth:L}),C.map(((a,d)=>{const u=function(e,t,r,n,a){if(!t)return;if(!r)return;const{addMonths:o,startOfMonth:l}=a,i=e.getFullYear(),s=[];let c=t;for(;s.length<12;)s.push(c.getMonth()),c=o(c,1);const d=s.sort(((e,t)=>e-t)).map((e=>{const o=n.formatMonthDropdown(e,a.options.locale??Qge),s=a.Date?new a.Date(i,e):new Date(i,e);return{value:e,label:o,disabled:t&&s<l(t)||r&&s>l(r)||!1}}));return d}(a.date,P,R,n,o),h=function(e,t,r,n){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:o,addYears:l,isBefore:i,isSameYear:s}=n,c=a(e),d=o(t),u=[];let h=c;for(;i(h,d)||s(h,d);)u.push(h.getFullYear()),h=l(h,1);return u.map((e=>({value:e,label:r.formatYearDropdown(e),disabled:!1})))}(P,R,n,o);return e.createElement(r.Month,{className:i[xge.Month],style:k?.[xge.Month],key:d,displayIndex:d,calendarMonth:a},e.createElement(r.MonthCaption,{className:i[xge.MonthCaption],style:k?.[xge.MonthCaption],calendarMonth:a,displayIndex:d},s?.startsWith("dropdown")?e.createElement(r.DropdownNav,{className:i[xge.Dropdowns],style:k?.[xge.Dropdowns]},"dropdown"===s||"dropdown-months"===s?e.createElement(r.MonthsDropdown,{className:i[xge.MonthsDropdown],"aria-label":G(),classNames:i,components:r,disabled:Boolean(t.disableNavigation),onChange:ce(a.date),options:u,style:k?.[xge.Dropdown],value:a.date.getMonth()}):e.createElement("span",{role:"status","aria-live":"polite"},x(a.date.getMonth(),l)),"dropdown"===s||"dropdown-years"===s?e.createElement(r.YearsDropdown,{className:i[xge.YearsDropdown],"aria-label":Q(o.options),classNames:i,components:r,disabled:Boolean(t.disableNavigation),onChange:de(a.date),options:h,style:k?.[xge.Dropdown],value:a.date.getFullYear()}):e.createElement("span",{role:"status","aria-live":"polite"},O(a.date.getFullYear()))):e.createElement(r.CaptionLabel,{className:i[xge.CaptionLabel],role:"status","aria-live":"polite"},b(a.date,o.options,o))),e.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===c||"range"===c,"aria-label":U(a.date,o.options,o)||void 0,className:i[xge.MonthGrid],style:k?.[xge.MonthGrid]},!t.hideWeekdays&&e.createElement(r.Weekdays,{className:i[xge.Weekdays],style:k?.[xge.Weekdays]},g&&e.createElement(r.WeekNumberHeader,{"aria-label":X(o.options),className:i[xge.WeekNumberHeader],style:k?.[xge.WeekNumberHeader],scope:"col"},M()),J.map(((t,n)=>e.createElement(r.Weekday,{"aria-label":Y(t,o.options,o),className:i[xge.Weekday],key:n,style:k?.[xge.Weekday],scope:"col"},j(t,o.options,o))))),e.createElement(r.Weeks,{className:i[xge.Weeks],style:k?.[xge.Weeks]},a.weeks.map(((n,a)=>e.createElement(r.Week,{className:i[xge.Week],key:n.weekNumber,style:k?.[xge.Week],week:n},g&&e.createElement(r.WeekNumber,{week:n,style:k?.[xge.WeekNumber],"aria-label":K(n.weekNumber,{locale:l}),className:i[xge.WeekNumber],scope:"row",role:"rowheader"},_(n.weekNumber)),n.days.map((n=>{const{date:a}=n,l=V(n);if(l[_ge.focused]=!l.hidden&&Boolean(q?.isEqualTo(n)),l[Mge.selected]=!l.disabled&&(H?.(a)||l.selected),dbe(Z)){const{from:e,to:t}=Z;l[Mge.range_start]=Boolean(e&&t&&o.isSameDay(a,e)),l[Mge.range_end]=Boolean(e&&t&&o.isSameDay(a,t)),l[Mge.range_middle]=sbe(Z,a,!0,o)}const s=function(e,t={},r={}){let n={...t?.[xge.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{n={...n,...r?.[e]}})),n}(l,k,t.modifiersStyles),c=function(e,t,r={}){const n=Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[n])=>(r[n]?e.push(r[n]):t[_ge[n]]?e.push(t[_ge[n]]):t[Mge[n]]&&e.push(t[Mge[n]]),e)),[t[xge.Day]]);return n}(l,i,t.modifiersClassNames),d=ee||l.hidden?void 0:W(a,l,o.options,o);return e.createElement(r.Day,{key:`${o.format(a,"yyyy-MM-dd")}_${o.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:l,className:c.join(" "),style:s,role:"gridcell","aria-selected":l.selected||void 0,"aria-label":d,"data-day":o.format(a,"yyyy-MM-dd"),"data-month":n.outside?o.format(a,"yyyy-MM"):void 0,"data-selected":l.selected||void 0,"data-disabled":l.disabled||void 0,"data-hidden":l.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":l.focused||void 0,"data-today":l.today||void 0},!l.hidden&&ee?e.createElement(r.DayButton,{className:i[xge.DayButton],style:k?.[xge.DayButton],type:"button",day:n,modifiers:l,disabled:l.disabled||void 0,tabIndex:D(n)?0:-1,"aria-label":T(a,l,o.options,o),onClick:ne(n,l),onBlur:oe(n,l),onFocus:ae(n,l),onKeyDown:le(n,l),onMouseEnter:ie(n,l),onMouseLeave:se(n,l)},w(a,o.options,o)):!l.hidden&&w(n.date,o.options,o))}))))))))}))),t.footer&&e.createElement(r.Footer,{className:i[xge.Footer],style:k?.[xge.Footer],role:"status","aria-live":"polite"},t.footer)))}function _be(e){var{className:r,classNames:n,showOutsideDays:a=!0}=e,o=o_(e,["className","classNames","showOutsideDays"]);const l=Vke();return t.jsx(xbe,Object.assign({showOutsideDays:a,captionLayout:"dropdown-years"},o,{className:s_("bg-bg-bg1 text-common-black border-bg-bg1",r),classNames:Object.assign(Object.assign(Object.assign({},l),{day_button:s_(l.day_button,"size-9"),day:"typography-subtitle1 ",today:"text-bold text-common-black [&_button]:rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",selected:"bg-primary !text-state-primary-text-solid rounded-full ",weekdays:"text-gray-400",month_caption:s_(l.month_caption,"h-[54px]"),outside:"text-gray-400",nav:s_(l.nav,"gap-6 absolute flex right-0"),chevron:"fill-primary",root:s_(l.root,"px-6 py-4"),caption_label:s_(l.caption_label,"gap-2 flex items-center"),months:"flex flex-col relative",disabled:"[&_button]:rounded-full [&_button]:!text-input-disable-text"}),n),styles:{caption_label:{zIndex:1,position:"relative",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",border:0},dropdown:{zIndex:2,opacity:0,WebkitAppearance:"none",MozAppearance:"none",appearance:"none",position:"absolute",insetBlockStart:0,insetBlockEnd:0,insetInlineStart:0,width:"100%",margin:0,padding:0,cursor:"inherit",border:"none",lineHeight:"inherit"},dropdowns:{position:"relative",display:"inline-flex",alignItems:"center",gap:4},dropdown_root:{position:"relative",display:"inline-flex",alignItems:"center"}}}))}_be.displayName="Calendar";var Mbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{});function jbe(e,t=globalThis?.document){const r=fye(e);l.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[r,t])}var Obe,Ebe="dismissableLayer.update",zbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside",Pbe=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rbe=l.forwardRef(((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...d}=e,u=l.useContext(Pbe),[h,p]=l.useState(null),f=h?.ownerDocument??globalThis?.document,[,v]=l.useState({}),m=dye(r,(e=>p(e))),y=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),k=y.indexOf(g),b=h?y.indexOf(h):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=k,_=function(e,t=globalThis?.document){const r=fye(e),n=l.useRef(!1),a=l.useRef((()=>{}));return l.useEffect((()=>{const e=e=>{if(e.target&&!n.current){let n=function(){Lbe(zbe,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,r]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));x&&!r&&(o?.(e),s?.(e),e.defaultPrevented||c?.())}),f),M=function(e,t=globalThis?.document){const r=fye(e),n=l.useRef(!1);return l.useEffect((()=>{const e=e=>{if(e.target&&!n.current){Lbe(Cbe,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(i?.(e),s?.(e),e.defaultPrevented||c?.())}),f);return jbe((e=>{b===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),f),l.useEffect((()=>{if(h)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Obe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Abe(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Obe)}}),[h,f,n,u]),l.useEffect((()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Abe())}),[h,u]),l.useEffect((()=>{const e=()=>v({});return document.addEventListener(Ebe,e),()=>document.removeEventListener(Ebe,e)}),[]),t.jsx(Mbe.div,{...d,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:pye(e.onFocusCapture,M.onFocusCapture),onBlurCapture:pye(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:pye(e.onPointerDownCapture,_.onPointerDownCapture)})}));Rbe.displayName="DismissableLayer";function Abe(){const e=new CustomEvent(Ebe);document.dispatchEvent(e)}function Lbe(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?function(e,t){e&&i.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}l.forwardRef(((e,r)=>{const n=l.useContext(Pbe),a=l.useRef(null),o=dye(r,a);return l.useEffect((()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),t.jsx(Mbe.div,{...e,ref:o})})).displayName="DismissableLayerBranch";var Ibe=0;function Vbe(){l.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Hbe()),document.body.insertAdjacentElement("beforeend",e[1]??Hbe()),Ibe++,()=>{1===Ibe&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ibe--}}),[])}function Hbe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Sbe="focusScope.autoFocusOnMount",Zbe="focusScope.autoFocusOnUnmount",Nbe={bubbles:!1,cancelable:!0},qbe=l.forwardRef(((e,r)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[c,d]=l.useState(null),u=fye(o),h=fye(i),p=l.useRef(null),f=dye(r,(e=>d(e))),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect((()=>{if(a){let e=function(e){if(v.paused||!c)return;const t=e.target;c.contains(t)?p.current=t:Tbe(p.current,{select:!0})},t=function(e){if(v.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||Tbe(p.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Tbe(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[a,c,v.paused]),l.useEffect((()=>{if(c){Wbe.add(v);const t=document.activeElement;if(!c.contains(t)){const r=new CustomEvent(Sbe,Nbe);c.addEventListener(Sbe,u),c.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Tbe(n,{select:t}),document.activeElement!==r)return}((e=Dbe(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Tbe(c))}return()=>{c.removeEventListener(Sbe,u),setTimeout((()=>{const e=new CustomEvent(Zbe,Nbe);c.addEventListener(Zbe,h),c.dispatchEvent(e),e.defaultPrevented||Tbe(t??document.body,{select:!0}),c.removeEventListener(Zbe,h),Wbe.remove(v)}),0)}}var e}),[c,u,h,v]);const m=l.useCallback((e=>{if(!n&&!a)return;if(v.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[a,o]=function(e){const t=Dbe(e),r=Bbe(t,e),n=Bbe(t.reverse(),e);return[r,n]}(t);a&&o?e.shiftKey||r!==o?e.shiftKey&&r===a&&(e.preventDefault(),n&&Tbe(o,{select:!0})):(e.preventDefault(),n&&Tbe(a,{select:!0})):r===t&&e.preventDefault()}}),[n,a,v.paused]);return t.jsx(Mbe.div,{tabIndex:-1,...s,ref:f,onKeyDown:m})}));function Dbe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Bbe(e,t){for(const r of e)if(!Fbe(r,{upTo:t}))return r}function Fbe(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Tbe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}qbe.displayName="FocusScope";var Wbe=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Ube(e,t),e.unshift(t)},remove(t){e=Ube(e,t),e[0]?.resume()}}}();function Ube(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Gbe=l["useId".toString()]||(()=>{}),$be=0;function Ybe(e){const[t,r]=l.useState(Gbe());return Jme((()=>{e||r((e=>e??String($be++)))}),[e]),e||(t?`radix-${t}`:"")}const Kbe=["top","right","bottom","left"],Xbe=Math.min,Qbe=Math.max,Jbe=Math.round,ewe=Math.floor,twe=e=>({x:e,y:e}),rwe={left:"right",right:"left",bottom:"top",top:"bottom"},nwe={start:"end",end:"start"};function awe(e,t,r){return Qbe(e,Xbe(t,r))}function owe(e,t){return"function"==typeof e?e(t):e}function lwe(e){return e.split("-")[0]}function iwe(e){return e.split("-")[1]}function swe(e){return"x"===e?"y":"x"}function cwe(e){return"y"===e?"height":"width"}function dwe(e){return["top","bottom"].includes(lwe(e))?"y":"x"}function uwe(e){return swe(dwe(e))}function hwe(e){return e.replace(/start|end/g,(e=>nwe[e]))}function pwe(e){return e.replace(/left|right|bottom|top/g,(e=>rwe[e]))}function fwe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function vwe(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function mwe(e,t,r){let{reference:n,floating:a}=e;const o=dwe(t),l=uwe(t),i=cwe(l),s=lwe(t),c="y"===o,d=n.x+n.width/2-a.width/2,u=n.y+n.height/2-a.height/2,h=n[i]/2-a[i]/2;let p;switch(s){case"top":p={x:d,y:n.y-a.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-a.width,y:u};break;default:p={x:n.x,y:n.y}}switch(iwe(t)){case"start":p[l]-=h*(r&&c?-1:1);break;case"end":p[l]+=h*(r&&c?-1:1)}return p}async function ywe(e,t){var r;void 0===t&&(t={});const{x:n,y:a,platform:o,rects:l,elements:i,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=owe(t,e),f=fwe(p),v=i[h?"floating"===u?"reference":"floating":u],m=vwe(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(v)))||r?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:s})),y="floating"===u?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(i.floating)),k=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},b=vwe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:g,strategy:s}):y);return{top:(m.top-b.top+f.top)/k.y,bottom:(b.bottom-m.bottom+f.bottom)/k.y,left:(m.left-b.left+f.left)/k.x,right:(b.right-m.right+f.right)/k.x}}function gwe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kwe(e){return Kbe.some((t=>e[t]>=0))}function bwe(){return"undefined"!=typeof window}function wwe(e){return Mwe(e)?(e.nodeName||"").toLowerCase():"#document"}function xwe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _we(e){var t;return null==(t=(Mwe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Mwe(e){return!!bwe()&&(e instanceof Node||e instanceof xwe(e).Node)}function jwe(e){return!!bwe()&&(e instanceof Element||e instanceof xwe(e).Element)}function Owe(e){return!!bwe()&&(e instanceof HTMLElement||e instanceof xwe(e).HTMLElement)}function Ewe(e){return!(!bwe()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof xwe(e).ShadowRoot)}function zwe(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Iwe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function Cwe(e){return["table","td","th"].includes(wwe(e))}function Pwe(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rwe(e){const t=Awe(),r=jwe(e)?Iwe(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Awe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Lwe(e){return["html","body","#document"].includes(wwe(e))}function Iwe(e){return xwe(e).getComputedStyle(e)}function Vwe(e){return jwe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hwe(e){if("html"===wwe(e))return e;const t=e.assignedSlot||e.parentNode||Ewe(e)&&e.host||_we(e);return Ewe(t)?t.host:t}function Swe(e){const t=Hwe(e);return Lwe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Owe(t)&&zwe(t)?t:Swe(t)}function Zwe(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const a=Swe(e),o=a===(null==(n=e.ownerDocument)?void 0:n.body),l=xwe(a);if(o){const e=Nwe(l);return t.concat(l,l.visualViewport||[],zwe(a)?a:[],e&&r?Zwe(e):[])}return t.concat(a,Zwe(a,[],r))}function Nwe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qwe(e){const t=Iwe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Owe(e),o=a?e.offsetWidth:r,l=a?e.offsetHeight:n,i=Jbe(r)!==o||Jbe(n)!==l;return i&&(r=o,n=l),{width:r,height:n,$:i}}function Dwe(e){return jwe(e)?e:e.contextElement}function Bwe(e){const t=Dwe(e);if(!Owe(t))return twe(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=qwe(t);let l=(o?Jbe(r.width):r.width)/n,i=(o?Jbe(r.height):r.height)/a;return l&&Number.isFinite(l)||(l=1),i&&Number.isFinite(i)||(i=1),{x:l,y:i}}const Fwe=twe(0);function Twe(e){const t=xwe(e);return Awe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fwe}function Wwe(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const a=e.getBoundingClientRect(),o=Dwe(e);let l=twe(1);t&&(n?jwe(n)&&(l=Bwe(n)):l=Bwe(e));const i=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==xwe(e))&&t}(o,r,n)?Twe(o):twe(0);let s=(a.left+i.x)/l.x,c=(a.top+i.y)/l.y,d=a.width/l.x,u=a.height/l.y;if(o){const e=xwe(o),t=n&&jwe(n)?xwe(n):n;let r=e,a=Nwe(r);for(;a&&n&&t!==r;){const e=Bwe(a),t=a.getBoundingClientRect(),n=Iwe(a),o=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=l,r=xwe(a),a=Nwe(r)}}return vwe({width:d,height:u,x:s,y:c})}function Uwe(e,t){const r=Vwe(e).scrollLeft;return t?t.left+r:Wwe(_we(e)).left+r}function Gwe(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Uwe(e,n)),y:n.top+t.scrollTop}}function $we(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=xwe(e),n=_we(e),a=r.visualViewport;let o=n.clientWidth,l=n.clientHeight,i=0,s=0;if(a){o=a.width,l=a.height;const e=Awe();(!e||e&&"fixed"===t)&&(i=a.offsetLeft,s=a.offsetTop)}return{width:o,height:l,x:i,y:s}}(e,r);else if("document"===t)n=function(e){const t=_we(e),r=Vwe(e),n=e.ownerDocument.body,a=Qbe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Qbe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Uwe(e);const i=-r.scrollTop;return"rtl"===Iwe(n).direction&&(l+=Qbe(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:l,y:i}}(_we(e));else if(jwe(t))n=function(e,t){const r=Wwe(e,!0,"fixed"===t),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Owe(e)?Bwe(e):twe(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:n*o.y}}(t,r);else{const r=Twe(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vwe(n)}function Ywe(e,t){const r=Hwe(e);return!(r===t||!jwe(r)||Lwe(r))&&("fixed"===Iwe(r).position||Ywe(r,t))}function Kwe(e,t,r){const n=Owe(t),a=_we(t),o="fixed"===r,l=Wwe(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const s=twe(0);if(n||!n&&!o)if(("body"!==wwe(t)||zwe(a))&&(i=Vwe(t)),n){const e=Wwe(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Uwe(a));const c=!a||n||o?twe(0):Gwe(a,i);return{x:l.left+i.scrollLeft-s.x-c.x,y:l.top+i.scrollTop-s.y-c.y,width:l.width,height:l.height}}function Xwe(e){return"static"===Iwe(e).position}function Qwe(e,t){if(!Owe(e)||"fixed"===Iwe(e).position)return null;if(t)return t(e);let r=e.offsetParent;return _we(e)===r&&(r=r.ownerDocument.body),r}function Jwe(e,t){const r=xwe(e);if(Pwe(e))return r;if(!Owe(e)){let t=Hwe(e);for(;t&&!Lwe(t);){if(jwe(t)&&!Xwe(t))return t;t=Hwe(t)}return r}let n=Qwe(e,t);for(;n&&Cwe(n)&&Xwe(n);)n=Qwe(n,t);return n&&Lwe(n)&&Xwe(n)&&!Rwe(n)?r:n||function(e){let t=Hwe(e);for(;Owe(t)&&!Lwe(t);){if(Rwe(t))return t;if(Pwe(t))return null;t=Hwe(t)}return null}(e)||r}const exe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o="fixed"===a,l=_we(n),i=!!t&&Pwe(t.floating);if(n===l||i&&o)return r;let s={scrollLeft:0,scrollTop:0},c=twe(1);const d=twe(0),u=Owe(n);if((u||!u&&!o)&&(("body"!==wwe(n)||zwe(l))&&(s=Vwe(n)),Owe(n))){const e=Wwe(n);c=Bwe(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!l||u||o?twe(0):Gwe(l,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-s.scrollTop*c.y+d.y+h.y}},getDocumentElement:_we,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[..."clippingAncestors"===r?Pwe(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Zwe(e,[],!1).filter((e=>jwe(e)&&"body"!==wwe(e))),a=null;const o="fixed"===Iwe(e).position;let l=o?Hwe(e):e;for(;jwe(l)&&!Lwe(l);){const t=Iwe(l),r=Rwe(l);r||"fixed"!==t.position||(a=null),(o?!r&&!a:!r&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||zwe(l)&&!r&&Ywe(e,l))?n=n.filter((e=>e!==l)):a=t,l=Hwe(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=o[0],i=o.reduce(((e,r)=>{const n=$we(t,r,a);return e.top=Qbe(n.top,e.top),e.right=Xbe(n.right,e.right),e.bottom=Xbe(n.bottom,e.bottom),e.left=Qbe(n.left,e.left),e}),$we(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:Jwe,getElementRects:async function(e){const t=this.getOffsetParent||Jwe,r=this.getDimensions,n=await r(e.floating);return{reference:Kwe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=qwe(e);return{width:t,height:r}},getScale:Bwe,isElement:jwe,isRTL:function(e){return"rtl"===Iwe(e).direction}};function txe(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Dwe(e),d=a||o?[...c?Zwe(c):[],...Zwe(t)]:[];d.forEach((e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const u=c&&i?function(e,t){let r,n=null;const a=_we(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function l(i,s){void 0===i&&(i=!1),void 0===s&&(s=1),o();const{left:c,top:d,width:u,height:h}=e.getBoundingClientRect();if(i||t(),!u||!h)return;const p={rootMargin:-ewe(d)+"px "+-ewe(a.clientWidth-(c+u))+"px "+-ewe(a.clientHeight-(d+h))+"px "+-ewe(c)+"px",threshold:Qbe(0,Xbe(1,s))||1};let f=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!f)return l();t?l(!1,t):r=setTimeout((()=>{l(!1,1e-7)}),1e3)}f=!1}try{n=new IntersectionObserver(v,{...p,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(v,p)}n.observe(e)}(!0),o}(c,r):null;let h,p=-1,f=null;l&&(f=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),r()})),c&&!s&&f.observe(c),f.observe(t));let v=s?Wwe(e):null;return s&&function t(){const n=Wwe(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||r();v=n,h=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach((e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const rxe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:l,middlewareData:i}=t,s=await async function(e,t){const{placement:r,platform:n,elements:a}=e,o=await(null==n.isRTL?void 0:n.isRTL(a.floating)),l=lwe(r),i=iwe(r),s="y"===dwe(r),c=["left","top"].includes(l)?-1:1,d=o&&s?-1:1,u=owe(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof f&&(p="end"===i?-1*f:f),s?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return l===(null==(r=i.offset)?void 0:r.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:a+s.x,y:o+s.y,data:{...s,placement:l}}}}},nxe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=owe(e,t),c={x:r,y:n},d=await ywe(t,s),u=dwe(lwe(a)),h=swe(u);let p=c[h],f=c[u];if(o){const e="y"===h?"bottom":"right";p=awe(p+d["y"===h?"top":"left"],p,p-d[e])}if(l){const e="y"===u?"bottom":"right";f=awe(f+d["y"===u?"top":"left"],f,f-d[e])}const v=i.fn({...t,[h]:p,[u]:f});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:o,[u]:l}}}}}},axe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:l,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...m}=owe(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const y=lwe(a),g=dwe(i),k=lwe(i)===i,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=h||(k||!v?[pwe(i)]:function(e){const t=pwe(e);return[hwe(e),t,hwe(t)]}(i)),x="none"!==f;!h&&x&&w.push(...function(e,t,r,n){const a=iwe(e);let o=function(e,t,r){const n=["left","right"],a=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:l;default:return[]}}(lwe(e),"start"===r,n);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(hwe)))),o}(i,v,f,b));const _=[i,...w],M=await ywe(t,m),j=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&j.push(M[y]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=iwe(e),a=uwe(e),o=cwe(a);let l="x"===a?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=pwe(l)),[l,pwe(l)]}(a,l,b);j.push(M[e[0]],M[e[1]])}if(O=[...O,{placement:a,overflows:j}],!j.every((e=>e<=0))){var E,z;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let r=null==(z=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:z.placement;if(!r)switch(p){case"bestFit":{var C;const e=null==(C=O.filter((e=>{if(x){const t=dwe(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(r=e);break}case"initialPlacement":r=i}if(a!==r)return{reset:{placement:r}}}return{}}}},oxe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:o,platform:l,elements:i}=t,{apply:s=()=>{},...c}=owe(e,t),d=await ywe(t,c),u=lwe(a),h=iwe(a),p="y"===dwe(a),{width:f,height:v}=o.floating;let m,y;"top"===u||"bottom"===u?(m=u,y=h===(await(null==l.isRTL?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m="end"===h?"top":"bottom");const g=v-d.top-d.bottom,k=f-d.left-d.right,b=Xbe(v-d[m],g),w=Xbe(f-d[y],k),x=!t.middlewareData.shift;let _=b,M=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(M=k),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(_=g),x&&!h){const e=Qbe(d.left,0),t=Qbe(d.right,0),r=Qbe(d.top,0),n=Qbe(d.bottom,0);p?M=f-2*(0!==e||0!==t?e+t:Qbe(d.left,d.right)):_=v-2*(0!==r||0!==n?r+n:Qbe(d.top,d.bottom))}await s({...t,availableWidth:M,availableHeight:_});const j=await l.getDimensions(i.floating);return f!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}},lxe=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=owe(e,t);switch(n){case"referenceHidden":{const e=gwe(await ywe(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:kwe(e)}}}case"escaped":{const e=gwe(await ywe(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:kwe(e)}}}default:return{}}}}},ixe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:l,elements:i,middlewareData:s}=t,{element:c,padding:d=0}=owe(e,t)||{};if(null==c)return{};const u=fwe(d),h={x:r,y:n},p=uwe(a),f=cwe(p),v=await l.getDimensions(c),m="y"===p,y=m?"top":"left",g=m?"bottom":"right",k=m?"clientHeight":"clientWidth",b=o.reference[f]+o.reference[p]-h[p]-o.floating[f],w=h[p]-o.reference[p],x=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let _=x?x[k]:0;_&&await(null==l.isElement?void 0:l.isElement(x))||(_=i.floating[k]||o.floating[f]);const M=b/2-w/2,j=_/2-v[f]/2-1,O=Xbe(u[y],j),E=Xbe(u[g],j),z=O,C=_-v[f]-E,P=_/2-v[f]/2+M,R=awe(z,P,C),A=!s.arrow&&null!=iwe(a)&&P!==R&&o.reference[f]/2-(P<z?O:E)-v[f]/2<0,L=A?P<z?P-z:P-C:0;return{[p]:h[p]+L,data:{[p]:R,centerOffset:P-R-L,...A&&{alignmentOffset:L}},reset:A}}}),sxe=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:l}=t,{offset:i=0,mainAxis:s=!0,crossAxis:c=!0}=owe(e,t),d={x:r,y:n},u=dwe(a),h=swe(u);let p=d[h],f=d[u];const v=owe(i,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===h?"height":"width",t=o.reference[h]-o.floating[e]+m.mainAxis,r=o.reference[h]+o.reference[e]-m.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var y,g;const e="y"===h?"width":"height",t=["top","left"].includes(lwe(a)),r=o.reference[u]-o.floating[e]+(t&&(null==(y=l.offset)?void 0:y[u])||0)+(t?0:m.crossAxis),n=o.reference[u]+o.reference[e]+(t?0:(null==(g=l.offset)?void 0:g[u])||0)-(t?m.crossAxis:0);f<r?f=r:f>n&&(f=n)}return{[h]:p,[u]:f}}}},cxe=(e,t,r)=>{const n=new Map,a={platform:exe,...r},o={...a.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:l}=r,i=o.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:u}=mwe(c,n,s),h=n,p={},f=0;for(let r=0;r<i.length;r++){const{name:o,fn:v}=i[r],{x:m,y:y,data:g,reset:k}=await v({x:d,y:u,initialPlacement:n,placement:h,strategy:a,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=y?y:u,p={...p,[o]:{...p[o],...g}},k&&f<=50&&(f++,"object"==typeof k&&(k.placement&&(h=k.placement),k.rects&&(c=!0===k.rects?await l.getElementRects({reference:e,floating:t,strategy:a}):k.rects),({x:d,y:u}=mwe(c,h,s))),r=-1)}return{x:d,y:u,placement:h,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})};var dxe="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function uxe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!uxe(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;0!=n--;){const r=a[n];if(("_owner"!==r||!e.$$typeof)&&!uxe(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function hxe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pxe(e,t){const r=hxe(e);return Math.round(t*r)/r}function fxe(e){const t=l.useRef(e);return dxe((()=>{t.current=e})),t}function vxe(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[h,p]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=l.useState(n);uxe(f,n)||v(n);const[m,y]=l.useState(null),[g,k]=l.useState(null),b=l.useCallback((e=>{e!==M.current&&(M.current=e,y(e))}),[]),w=l.useCallback((e=>{e!==j.current&&(j.current=e,k(e))}),[]),x=o||m,_=s||g,M=l.useRef(null),j=l.useRef(null),O=l.useRef(h),E=null!=d,z=fxe(d),C=fxe(a),P=fxe(u),R=l.useCallback((()=>{if(!M.current||!j.current)return;const e={placement:t,strategy:r,middleware:f};C.current&&(e.platform=C.current),cxe(M.current,j.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!uxe(O.current,t)&&(O.current=t,i.flushSync((()=>{p(t)})))}))}),[f,t,r,C,P]);dxe((()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const A=l.useRef(!1);dxe((()=>(A.current=!0,()=>{A.current=!1})),[]),dxe((()=>{if(x&&(M.current=x),_&&(j.current=_),x&&_){if(z.current)return z.current(x,_,R);R()}}),[x,_,R,z,E]);const L=l.useMemo((()=>({reference:M,floating:j,setReference:b,setFloating:w})),[b,w]),I=l.useMemo((()=>({reference:x,floating:_})),[x,_]),V=l.useMemo((()=>{const e={position:r,left:0,top:0};if(!I.floating)return e;const t=pxe(I.floating,h.x),n=pxe(I.floating,h.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...hxe(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,I.floating,h.x,h.y]);return l.useMemo((()=>({...h,update:R,refs:L,elements:I,floatingStyles:V})),[h,R,L,I,V])}const mxe=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(a=r,{}.hasOwnProperty.call(a,"current"))?null!=r.current?ixe({element:r.current,padding:n}).fn(t):{}:r?ixe({element:r,padding:n}).fn(t):{};var a}}),yxe=(e,t)=>({...rxe(e),options:[e,t]}),gxe=(e,t)=>({...nxe(e),options:[e,t]}),kxe=(e,t)=>({...sxe(e),options:[e,t]}),bxe=(e,t)=>({...axe(e),options:[e,t]}),wxe=(e,t)=>({...oxe(e),options:[e,t]}),xxe=(e,t)=>({...lxe(e),options:[e,t]}),_xe=(e,t)=>({...mxe(e),options:[e,t]});var Mxe=l.forwardRef(((e,r)=>{const{children:n,width:a=10,height:o=5,...l}=e;return t.jsx(Mbe.svg,{...l,ref:r,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:t.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Mxe.displayName="Arrow";var jxe=Mxe;function Oxe(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return l.useMemo((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}var Exe="Popper",[zxe,Cxe]=function(e,r=[]){let n=[];const a=()=>{const t=n.map((e=>l.createContext(e)));return function(r){const n=r?.[e]||t;return l.useMemo((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return a.scopeName=e,[function(r,a){const o=l.createContext(a),i=n.length;function s(r){const{scope:n,children:a,...s}=r,c=n?.[e][i]||o,d=l.useMemo((()=>s),Object.values(s));return t.jsx(c.Provider,{value:d,children:a})}return n=[...n,a],s.displayName=r+"Provider",[s,function(t,n){const s=n?.[e][i]||o,c=l.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},Oxe(a,...r)]}(Exe),[Pxe,Rxe]=zxe(Exe),Axe=e=>{const{__scopePopper:r,children:n}=e,[a,o]=l.useState(null);return t.jsx(Pxe,{scope:r,anchor:a,onAnchorChange:o,children:n})};Axe.displayName=Exe;var Lxe="PopperAnchor",Ixe=l.forwardRef(((e,r)=>{const{__scopePopper:n,virtualRef:a,...o}=e,i=Rxe(Lxe,n),s=l.useRef(null),c=dye(r,s);return l.useEffect((()=>{i.onAnchorChange(a?.current||s.current)})),a?null:t.jsx(Mbe.div,{...o,ref:c})}));Ixe.displayName=Lxe;var Vxe="PopperContent",[Hxe,Sxe]=zxe(Vxe),Zxe=l.forwardRef(((e,r)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:v="optimized",onPlaced:m,...y}=e,g=Rxe(Vxe,n),[k,b]=l.useState(null),w=dye(r,(e=>b(e))),[x,_]=l.useState(null),M=yye(x),j=M?.width??0,O=M?.height??0,E=a+("center"!==i?"-"+i:""),z="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},C=Array.isArray(u)?u:[u],P=C.length>0,R={padding:z,boundary:C.filter(Bxe),altBoundary:P},{refs:A,floatingStyles:L,placement:I,isPositioned:V,middlewareData:H}=vxe({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>txe(...e,{animationFrame:"always"===v}),elements:{reference:g.anchor},middleware:[yxe({mainAxis:o+O,alignmentAxis:s}),d&&gxe({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?kxe():void 0,...R}),d&&bxe({...R}),wxe({...R,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:a,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${n}px`),l.setProperty("--radix-popper-anchor-width",`${a}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),x&&_xe({element:x,padding:c}),Fxe({arrowWidth:j,arrowHeight:O}),f&&xxe({strategy:"referenceHidden",...R})]}),[S,Z]=Txe(I),N=fye(m);Jme((()=>{V&&N?.()}),[V,N]);const q=H.arrow?.x,D=H.arrow?.y,B=0!==H.arrow?.centerOffset,[F,T]=l.useState();return Jme((()=>{k&&T(window.getComputedStyle(k).zIndex)}),[k]),t.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:V?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(Hxe,{scope:n,placedSide:S,onArrowChange:_,arrowX:q,arrowY:D,shouldHideArrow:B,children:t.jsx(Mbe.div,{"data-side":S,"data-align":Z,...y,ref:w,style:{...y.style,animation:V?void 0:"none"}})})})}));Zxe.displayName=Vxe;var Nxe="PopperArrow",qxe={top:"bottom",right:"left",bottom:"top",left:"right"},Dxe=l.forwardRef((function(e,r){const{__scopePopper:n,...a}=e,o=Sxe(Nxe,n),l=qxe[o.placedSide];return t.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:t.jsx(jxe,{...a,ref:r,style:{...a.style,display:"block"}})})}));function Bxe(e){return null!==e}Dxe.displayName=Nxe;var Fxe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,l=o?0:e.arrowWidth,i=o?0:e.arrowHeight,[s,c]=Txe(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(a.arrow?.x??0)+l/2,h=(a.arrow?.y??0)+i/2;let p="",f="";return"bottom"===s?(p=o?d:`${u}px`,f=-i+"px"):"top"===s?(p=o?d:`${u}px`,f=`${n.floating.height+i}px`):"right"===s?(p=-i+"px",f=o?d:`${h}px`):"left"===s&&(p=`${n.floating.width+i}px`,f=o?d:`${h}px`),{data:{x:p,y:f}}}});function Txe(e){const[t,r="center"]=e.split("-");return[t,r]}var Wxe=Axe,Uxe=Ixe,Gxe=Zxe,$xe=Dxe,Yxe=l.forwardRef(((e,r)=>{const{container:n,...o}=e,[i,s]=l.useState(!1);Jme((()=>s(!0)),[]);const c=n||i&&globalThis?.document?.body;return c?a.createPortal(t.jsx(Mbe.div,{...o,ref:r}),c):null}));Yxe.displayName="Portal";var Kxe=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),o=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=function(e,t){return l.useReducer(((e,r)=>t[e][r]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect((()=>{const e=Xxe(n.current);o.current="mounted"===s?e:"none"}),[s]),Jme((()=>{const t=n.current,r=a.current;if(r!==e){const n=o.current,l=Xxe(t);if(e)c("MOUNT");else if("none"===l||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==l?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,c]),Jme((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,l=o=>{const l=Xxe(n.current).includes(o.animationName);if(o.target===t&&l&&(c("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},i=e=>{e.target===t&&(o.current=Xxe(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),a="function"==typeof r?r({present:n.isPresent}):l.Children.only(r),o=dye(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||n.isPresent?l.cloneElement(a,{ref:o}):null};function Xxe(e){return e?.animationName||"none"}Kxe.displayName="Presence";var Qxe=new WeakMap,Jxe=new WeakMap,e_e={},t_e=0,r_e=function(e){return e&&(e.host||r_e(e.parentNode))},n_e=function(e,t,r,n){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=r_e(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);e_e[r]||(e_e[r]=new WeakMap);var o=e_e[r],l=[],i=new Set,s=new Set(a),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,s=(Qxe.get(e)||0)+1,c=(o.get(e)||0)+1;Qxe.set(e,s),o.set(e,c),l.push(e),1===s&&a&&Jxe.set(e,!0),1===c&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),i.clear(),t_e++,function(){l.forEach((function(e){var t=Qxe.get(e)-1,a=o.get(e)-1;Qxe.set(e,t),o.set(e,a),t||(Jxe.has(e)||e.removeAttribute(n),Jxe.delete(e)),a||e.removeAttribute(r)})),--t_e||(Qxe=new WeakMap,Qxe=new WeakMap,Jxe=new WeakMap,e_e={})}},a_e=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),n_e(n,a,r,"aria-hidden")):function(){return null}},o_e="right-scroll-bar-position",l_e="width-before-scroll-bar";function i_e(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var s_e="undefined"!=typeof window?l.useLayoutEffect:l.useEffect,c_e=new WeakMap;function d_e(t,r){var n,a,o,l=(n=null,a=function(e){return t.forEach((function(t){return i_e(t,e)}))},(o=e.useState((function(){return{value:n,callback:a,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=a,o.facade);return s_e((function(){var e=c_e.get(l);if(e){var r=new Set(e),n=new Set(t),a=l.current;r.forEach((function(e){n.has(e)||i_e(e,null)})),n.forEach((function(e){r.has(e)||i_e(e,a)}))}c_e.set(l,t)}),[t]),l}function u_e(e){return e}var h_e=function(e){var t=e.sideCar,r=o_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return l.createElement(n,a_({},r))};h_e.isSideCarExport=!0;var p_e=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=u_e);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var a=t(e,n);return r.push(a),function(){r=r.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var a=r;r=[],a.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},l=function(){return Promise.resolve().then(o)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}};return a}(null);return t.options=a_({async:!0,ssr:!1},e),t}(),f_e=function(){},v_e=l.forwardRef((function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:f_e,onWheelCapture:f_e,onTouchMoveCapture:f_e}),a=n[0],o=n[1],i=e.forwardProps,s=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,f=e.noIsolation,v=e.inert,m=e.allowPinchZoom,y=e.as,g=void 0===y?"div":y,k=e.gapMode,b=o_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,x=d_e([r,t]),_=a_(a_({},b),a);return l.createElement(l.Fragment,null,u&&l.createElement(w,{sideCar:p_e,removeScrollBar:d,shards:h,noIsolation:f,inert:v,setCallbacks:o,allowPinchZoom:!!m,lockRef:r,gapMode:k}),i?l.cloneElement(l.Children.only(s),a_(a_({},_),{ref:x})):l.createElement(g,a_({},_,{className:c,ref:x}),s))}));v_e.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v_e.classNames={fullWidth:l_e,zeroRight:o_e};function m_e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var y_e=function(){var e=0,t=null;return{add:function(r){0==e&&(t=m_e())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g_e=function(){var e=function(){var e=y_e();return function(t,r){l.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])}}();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},k_e={left:0,top:0,right:0,gap:0},b_e=function(e){return parseInt(e||"",10)||0},w_e=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return k_e;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[b_e(r),b_e(n),b_e(a)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},x_e=g_e(),__e="data-scroll-locked",M_e=function(e,t,r,n){var a=e.left,o=e.top,l=e.right,i=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(i,"px ").concat(n,";\n }\n body[").concat(__e,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(o_e," {\n right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(l_e," {\n margin-right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(o_e," .").concat(o_e," {\n right: 0 ").concat(n,";\n }\n \n .").concat(l_e," .").concat(l_e," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(__e,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},j_e=function(){var e=parseInt(document.body.getAttribute(__e)||"0",10);return isFinite(e)?e:0},O_e=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;l.useEffect((function(){return document.body.setAttribute(__e,(j_e()+1).toString()),function(){var e=j_e()-1;e<=0?document.body.removeAttribute(__e):document.body.setAttribute(__e,e.toString())}}),[]);var o=l.useMemo((function(){return w_e(a)}),[a]);return l.createElement(x_e,{styles:M_e(o,!t,a,r?"":"!important")})},E_e=!1;if("undefined"!=typeof window)try{var z_e=Object.defineProperty({},"passive",{get:function(){return E_e=!0,!0}});window.addEventListener("test",z_e,z_e),window.removeEventListener("test",z_e,z_e)}catch(e){E_e=!1}var C_e=!!E_e&&{passive:!1},P_e=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},R_e=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),A_e(e,n)){var a=L_e(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},A_e=function(e,t){return"v"===e?function(e){return P_e(e,"overflowY")}(t):function(e){return P_e(e,"overflowX")}(t)},L_e=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},I_e=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},V_e=function(e){return[e.deltaX,e.deltaY]},H_e=function(e){return e&&"current"in e?e.current:e},S_e=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Z_e=0,N_e=[];function q_e(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var D_e,B_e=(D_e=function(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),a=l.useState(Z_e++)[0],o=l.useState(g_e)[0],i=l.useRef(e);l.useEffect((function(){i.current=e}),[e]),l.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(H_e),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=l.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=I_e(e),l=r.current,s="deltaX"in e?e.deltaX:l[0]-o[0],c="deltaY"in e?e.deltaY:l[1]-o[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=R_e(u,d);if(!h)return!0;if(h?a=u:(a="v"===u?"h":"v",h=R_e(u,d)),!h)return!1;if(!n.current&&"changedTouches"in e&&(s||c)&&(n.current=a),!a)return!0;var p=n.current||a;return function(e,t,r,n,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),l=o*n,i=r.target,s=t.contains(i),c=!1,d=l>0,u=0,h=0;do{var p=L_e(e,i),f=p[0],v=p[1]-p[2]-o*f;(f||v)&&A_e(e,i)&&(u+=v,h+=f),i=i instanceof ShadowRoot?i.host:i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return d&&(Math.abs(u)<1||!a)?c=!0:d||!(Math.abs(h)<1)&&a||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=l.useCallback((function(e){var r=e;if(N_e.length&&N_e[N_e.length-1]===o){var n="deltaY"in r?V_e(r):I_e(r),a=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)}))[0];if(a&&a.should)r.cancelable&&r.preventDefault();else if(!a){var l=(i.current.shards||[]).map(H_e).filter(Boolean).filter((function(e){return e.contains(r.target)}));(l.length>0?s(r,l[0]):!i.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),d=l.useCallback((function(e,r,n,a){var o={name:e,delta:r,target:n,should:a,shadowParent:q_e(n)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=l.useCallback((function(e){r.current=I_e(e),n.current=void 0}),[]),h=l.useCallback((function(t){d(t.type,V_e(t),t.target,s(t,e.lockRef.current))}),[]),p=l.useCallback((function(t){d(t.type,I_e(t),t.target,s(t,e.lockRef.current))}),[]);l.useEffect((function(){return N_e.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,C_e),document.addEventListener("touchmove",c,C_e),document.addEventListener("touchstart",u,C_e),function(){N_e=N_e.filter((function(e){return e!==o})),document.removeEventListener("wheel",c,C_e),document.removeEventListener("touchmove",c,C_e),document.removeEventListener("touchstart",u,C_e)}}),[]);var f=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(o,{styles:S_e(a)}):null,f?l.createElement(O_e,{gapMode:e.gapMode}):null)},p_e.useMedium(D_e),h_e),F_e=l.forwardRef((function(e,t){return l.createElement(v_e,a_({},e,{ref:t,sideCar:B_e}))}));F_e.classNames=v_e.classNames;var T_e="Popover",[W_e,U_e]=uye(T_e,[Cxe]),G_e=Cxe(),[$_e,Y_e]=W_e(T_e),K_e=e=>{const{__scopePopover:r,children:n,open:a,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,c=G_e(r),d=l.useRef(null),[u,h]=l.useState(!1),[p=!1,f]=vye({prop:a,defaultProp:o,onChange:i});return t.jsx(Wxe,{...c,children:t.jsx($_e,{scope:r,contentId:Ybe(),triggerRef:d,open:p,onOpenChange:f,onOpenToggle:l.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback((()=>h(!0)),[]),onCustomAnchorRemove:l.useCallback((()=>h(!1)),[]),modal:s,children:n})})};K_e.displayName=T_e;var X_e="PopoverAnchor";l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=Y_e(X_e,n),i=G_e(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=o;return l.useEffect((()=>(s(),()=>c())),[s,c]),t.jsx(Uxe,{...i,...a,ref:r})})).displayName=X_e;var Q_e="PopoverTrigger",J_e=l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=Y_e(Q_e,n),l=G_e(n),i=dye(r,o.triggerRef),s=t.jsx(Mbe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":dMe(o.open),...a,ref:i,onClick:pye(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:t.jsx(Uxe,{asChild:!0,...l,children:s})}));J_e.displayName=Q_e;var eMe="PopoverPortal",[tMe,rMe]=W_e(eMe,{forceMount:void 0}),nMe=e=>{const{__scopePopover:r,forceMount:n,children:a,container:o}=e,l=Y_e(eMe,r);return t.jsx(tMe,{scope:r,forceMount:n,children:t.jsx(Kxe,{present:n||l.open,children:t.jsx(Yxe,{asChild:!0,container:o,children:a})})})};nMe.displayName=eMe;var aMe="PopoverContent",oMe=l.forwardRef(((e,r)=>{const n=rMe(aMe,e.__scopePopover),{forceMount:a=n.forceMount,...o}=e,l=Y_e(aMe,e.__scopePopover);return t.jsx(Kxe,{present:a||l.open,children:l.modal?t.jsx(lMe,{...o,ref:r}):t.jsx(iMe,{...o,ref:r})})}));oMe.displayName=aMe;var lMe=l.forwardRef(((e,r)=>{const n=Y_e(aMe,e.__scopePopover),a=l.useRef(null),o=dye(r,a),i=l.useRef(!1);return l.useEffect((()=>{const e=a.current;if(e)return a_e(e)}),[]),t.jsx(F_e,{as:bye,allowPinchZoom:!0,children:t.jsx(sMe,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pye(e.onCloseAutoFocus,(e=>{e.preventDefault(),i.current||n.triggerRef.current?.focus()})),onPointerDownOutside:pye(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;i.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:pye(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),iMe=l.forwardRef(((e,r)=>{const n=Y_e(aMe,e.__scopePopover),a=l.useRef(!1),o=l.useRef(!1);return t.jsx(sMe,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||n.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const r=t.target,l=n.triggerRef.current?.contains(r);l&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),sMe=l.forwardRef(((e,r)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...h}=e,p=Y_e(aMe,n),f=G_e(n);return Vbe(),t.jsx(qbe,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:l,children:t.jsx(Rbe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:t.jsx(Gxe,{"data-state":dMe(p.open),role:"dialog",id:p.contentId,...f,...h,ref:r,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),cMe="PopoverClose";l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=Y_e(cMe,n);return t.jsx(Mbe.button,{type:"button",...a,ref:r,onClick:pye(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=cMe;function dMe(e){return e?"open":"closed"}l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=G_e(n);return t.jsx($xe,{...o,...a,ref:r})})).displayName="PopoverArrow";var uMe=nMe,hMe=oMe;const pMe=K_e,fMe=J_e,vMe=l.forwardRef(((e,r)=>{var{className:n,align:a="center",sideOffset:o=4}=e,l=o_(e,["className","align","sideOffset"]);return t.jsx(uMe,{children:t.jsx(hMe,Object.assign({ref:r,align:a,sideOffset:o,className:s_("z-50 min-w-72 rounded-md border bg-bg-bg1 border-none overflow-hidden p-0 text-common-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n)},l))})}));vMe.displayName=hMe.displayName;const mMe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function yMe(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const gMe={date:yMe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yMe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:yMe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},kMe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function bMe(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const wMe={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:bMe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:bMe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:bMe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:bMe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:bMe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function xMe(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const _Me={ordinalNumber:function(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=r.valueCallback?r.valueCallback(l):l;return{value:l,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:xMe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:xMe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:xMe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:xMe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:xMe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},MMe={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=mMe[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:gMe,formatRelative:(e,t,r,n)=>kMe[e],localize:wMe,match:_Me,options:{weekStartsOn:0,firstWeekContainsDate:1}};let jMe={};function OMe(){return jMe}const EMe=6048e5;function zMe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function CMe(e){const t=zMe(e);return t.setHours(0,0,0,0),t}function PMe(e){const t=zMe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function RMe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function AMe(e){const t=zMe(e),r=function(e,t){const r=CMe(e),n=CMe(t),a=+r-PMe(r),o=+n-PMe(n);return Math.round((a-o)/864e5)}(t,function(e){const t=zMe(e),r=RMe(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}(t));return r+1}function LMe(e,t){const r=OMe(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zMe(e),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function IMe(e){return LMe(e,{weekStartsOn:1})}function VMe(e){const t=zMe(e),r=t.getFullYear(),n=RMe(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=IMe(n),o=RMe(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const l=IMe(o);return t.getTime()>=a.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function HMe(e){const t=zMe(e),r=+IMe(t)-+function(e){const t=VMe(e),r=RMe(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),IMe(r)}(t);return Math.round(r/EMe)+1}function SMe(e,t){const r=zMe(e),n=r.getFullYear(),a=OMe(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=RMe(e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=LMe(l,t),s=RMe(e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=LMe(s,t);return r.getTime()>=i.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function ZMe(e,t){const r=zMe(e),n=+LMe(r,t)-+function(e,t){const r=OMe(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=SMe(e,t),o=RMe(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),LMe(o,t)}(r,t);return Math.round(n/EMe)+1}function NMe(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const qMe={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return NMe("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):NMe(r+1,2)},d:(e,t)=>NMe(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>NMe(e.getHours()%12||12,t.length),H:(e,t)=>NMe(e.getHours(),t.length),m:(e,t)=>NMe(e.getMinutes(),t.length),s:(e,t)=>NMe(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return NMe(Math.trunc(n*Math.pow(10,r-3)),t.length)}},DMe="midnight",BMe="noon",FMe="morning",TMe="afternoon",WMe="evening",UMe="night",GMe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return qMe.y(e,t)},Y:function(e,t,r,n){const a=SMe(e,n),o=a>0?a:1-a;if("YY"===t){return NMe(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):NMe(o,t.length)},R:function(e,t){return NMe(VMe(e),t.length)},u:function(e,t){return NMe(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return NMe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return NMe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return qMe.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return NMe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=ZMe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):NMe(a,t.length)},I:function(e,t,r){const n=HMe(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):NMe(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):qMe.d(e,t)},D:function(e,t,r){const n=AMe(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):NMe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return NMe(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return NMe(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return NMe(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?BMe:0===n?DMe:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?WMe:n>=12?TMe:n>=4?FMe:UMe,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return qMe.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):qMe.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):NMe(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):NMe(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):qMe.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):qMe.s(e,t)},S:function(e,t){return qMe.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return YMe(n);case"XXXX":case"XX":return KMe(n);default:return KMe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return YMe(n);case"xxxx":case"xx":return KMe(n);default:return KMe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$Me(n,":");default:return"GMT"+KMe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$Me(n,":");default:return"GMT"+KMe(n,":")}},t:function(e,t,r){return NMe(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,r){return NMe(e.getTime(),t.length)}};function $Me(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+NMe(o,2)}function YMe(e,t){if(e%60==0){return(e>0?"-":"+")+NMe(Math.abs(e)/60,2)}return KMe(e,t)}function KMe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+NMe(Math.trunc(n/60),2)+t+NMe(n%60,2)}const XMe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},QMe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},JMe={p:QMe,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return XMe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",XMe(n,t)).replace("{{time}}",QMe(a,t))}},eje=/^D+$/,tje=/^Y+$/,rje=["D","DD","YY","YYYY"];function nje(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const r=zMe(e);return!isNaN(Number(r))}const aje=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oje=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lje=/^'([^]*?)'?$/,ije=/''/g,sje=/[a-zA-Z]/;function cje(e,t,r){const n=OMe(),a=n.locale??MMe,o=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=zMe(e);if(!nje(i))throw new RangeError("Invalid time value");let s=t.match(oje).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,JMe[t])(e,a.formatLong)}return e})).join("").match(aje).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:dje(e)};if(GMe[t])return{isToken:!0,value:e};if(t.match(sje))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return tje.test(e)}(n)||function(e){return eje.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),rje.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,GMe[n[0]])(i,n,a.localize,c)})).join("")}function dje(e){const t=e.match(lje);return t?t[1].replace(ije,"'"):e}const uje=(e,t,r)=>Array.from(e).filter((e=>t.test(e))).slice(0,r),hje=e.forwardRef((({value:r,onChange:n,onBlur:a,onComplete:o,length:l=6,disabled:i=!1,invalid:s=!1,autoFocus:c=!1,inputMode:d="numeric",charPattern:u=/^\d$/,className:h,inputClassName:p},f)=>{const v=e.useRef([]),m=e.useRef(null),y=e.useMemo((()=>{const e=r||"";return Array.from({length:l},((t,r)=>e[r]||""))}),[l,r]);e.useImperativeHandle(f,(()=>v.current[0]),[]);const g=e=>{const t=e.join("");n(t),o&&e.every((e=>""!==e))&&o(t)},k=e=>{var t,r;const n=Math.max(0,Math.min(l-1,e));null===(t=v.current[n])||void 0===t||t.focus(),null===(r=v.current[n])||void 0===r||r.select()};return t.jsx("div",{className:s_("flex items-center gap-3",h),ref:m,children:y.map(((e,r)=>t.jsx("input",{ref:e=>{v.current[r]=e},type:"text",inputMode:d,autoComplete:0===r?"one-time-code":"off",value:e,maxLength:1,disabled:i,autoFocus:c&&0===r,"aria-invalid":s||void 0,className:s_("h-14 w-[46px] rounded-[8px] text-input-filled-text border bg-transparent text-center text-2xl font-semibold outline-none transition-all duration-200","border-input-default-stroke focus:border-input-active-stroke","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-input-error focus:border-input-error",p),onFocus:e=>{e.target.select()},onBlur:e=>{var t;const r=e.relatedTarget;r&&(null===(t=m.current)||void 0===t?void 0:t.contains(r))||null==a||a()},onChange:e=>((e,t)=>{if(i)return;if(!t){const t=[...y];return t[e]="",void g(t)}const r=uje(t,u,l);if(!r.length)return;const n=[...y];let a=e;r.forEach((e=>{a<l&&(n[a]=e,a+=1)})),g(n),k(a<l?a:l-1)})(r,e.target.value),onPaste:e=>((e,t)=>{if(t.preventDefault(),i)return;const r=t.clipboardData.getData("text"),n=uje(r,u,l-e);if(!n.length)return;const a=[...y];n.forEach(((t,r)=>{a[e+r]=t})),g(a);const o=Math.min(e+n.length,l-1);k(o)})(r,e),onKeyDown:e=>((e,t)=>{if(!i){if("ArrowLeft"===t.key)return t.preventDefault(),void k(e-1);if("ArrowRight"===t.key)return t.preventDefault(),void k(e+1);if("Backspace"===t.key){if(y[e]){t.preventDefault();const r=[...y];return r[e]="",void g(r)}if(e>0){t.preventDefault();const r=[...y];r[e-1]="",g(r),k(e-1)}}}})(r,e)},r)))})}));hje.displayName="OtpInput";const pje=e.forwardRef(((e,r)=>{var{id:n,label:a,required:o=!1,helperText:l,error:i=!1,errorMessage:s,keepFooterSpace:c=!0,labelClassName:d,messageClassName:u,className:h}=e,p=o_(e,["id","label","required","helperText","error","errorMessage","keepFooterSpace","labelClassName","messageClassName","className"]);const f=Boolean(i||s),v=f?s:l;return t.jsxs("div",{className:s_("inline-flex w-full flex-col gap-2",h),children:[a&&t.jsxs("label",{htmlFor:n,className:s_("typography-overline text-input-default-text",f&&"text-input-error",d),children:[a,o&&t.jsx("span",{className:"ml-1 text-input-error",children:"*"})]}),t.jsx(hje,Object.assign({},p,{ref:r,invalid:f})),(v||c)&&t.jsx("div",{className:s_("typography-small2 min-h-[18px]",f?"text-input-error":"text-text-g-contrast-medium",u),role:f?"alert":void 0,children:v||" "})]})}));pje.displayName="OtpInputGroup";const fje=l.forwardRef(((e,r)=>{var{rootClassName:n,className:a,rootRef:o}=e,l=o_(e,["rootClassName","className","rootRef"]);return t.jsx("div",{className:s_("relative h-full w-full overflow-auto",n),ref:o,children:t.jsx("table",Object.assign({ref:r,className:s_("w-full caption-bottom text-sm border-collapse",a)},l))})}));fje.displayName="Table";const vje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("thead",Object.assign({ref:r,className:s_("[&_tr]:border-b bg-secondary-80",n)},a))}));vje.displayName="TableHeader";const mje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("tbody",Object.assign({ref:r,className:s_("[&_tr:last-child]:border-0",n)},a))}));mje.displayName="TableBody";const yje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("tfoot",Object.assign({ref:r,className:s_("border-t bg-transparent-grey2-8 font-medium [&>tr]:last:border-b-0",n)},a))}));yje.displayName="TableFooter";const gje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("tr",Object.assign({ref:r,className:s_("border-b transition-colors hover:bg-transparent-grey2-8 data-[state=selected]:bg-grey-20",n)},a))}));gje.displayName="TableRow";const kje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("th",Object.assign({ref:r,className:s_(" h-12 py-3 px-6 text-left align-middle typography-body2 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",n)},a))}));kje.displayName="TableHead";const bje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("td",Object.assign({ref:r,className:s_(" py-3 px-6 text-left align-middle typography-body3 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",n)},a))}));bje.displayName="TableCell";const wje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("caption",Object.assign({ref:r,className:s_("mt-4 text-sm text-text-g-contrast-medium",n)},a))}));
9247
+ */const xme=__("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var _me=Object.freeze({__proto__:null,default:xme});const Mme=e.forwardRef(((r,n)=>{var{id:a,label:o,size:l="md",rounded:i="normal",variant:s="outline",type:c="text",iconMode:d="solid",helperText:u,errorMessage:h,warningMessage:p,status:f,fullwidth:v=!0,disabled:m=!1,error:y=!1,warning:g=!1,required:k=!0,isFloatingLabel:b=!0,keepCloseIconOnValue:w=!1,keepFooterSpace:x=!0,hasClearIcon:_=!0,hasSearchIcon:M=!1,startIcon:j,endIcon:O,labelClassName:E,onClickStartIcon:z,onClickEndIcon:C,renderStartIcon:P,renderEndIcon:R,classes:A,normalize:L,format:I,trimOnCommit:V,normalizeOnCommit:H}=r,S=o_(r,["id","label","size","rounded","variant","type","iconMode","helperText","errorMessage","warningMessage","status","fullwidth","disabled","error","warning","required","isFloatingLabel","keepCloseIconOnValue","keepFooterSpace","hasClearIcon","hasSearchIcon","startIcon","endIcon","labelClassName","onClickStartIcon","onClickEndIcon","renderStartIcon","renderEndIcon","classes","normalize","format","trimOnCommit","normalizeOnCommit"]);const Z=e.useRef(null),N=a||`${c}-${o}-input`,q=!!j||!!P,D=!!O||!!R,B=f||(y||h?"error":g||p?"warning":"default"),F="error"===B,T="warning"===B,W="error"===B?h:"warning"===B?p:u,U=u_({size:l,rounded:i,variant:s,fullwidth:v,disabled:m,error:F,warning:T,hasSearchIcon:"flat"===d&&q||M,hasClearIcon:"flat"===d&&D||_,leftSectionIcon:"solid"===d&&q,rightSectionIcon:"solid"===d&&D}),G=h_({size:l,disabled:m,error:F,hasSearchIcon:"flat"===d&&q||M,hasLeftSectionIcon:"solid"===d&&q,isFloatingLabel:b}),$=p_({size:l,error:F,warning:T,disabled:m}),Y=v_({size:l}),K=m_({size:l}),X=y_({size:l}),Q=g_({size:l}),J=k_({size:l,rounded:i,error:F,warning:T,position:"start"}),ee=k_({size:l,rounded:i,error:F,warning:T,position:"end"});e.useImperativeHandle(n,(()=>null==Z?void 0:Z.current));const te=e.useCallback((e=>{var t;L&&(e.target.value=L(e.target.value)),null===(t=S.onChange)||void 0===t||t.call(S,e)}),[L,S.onChange]),re=e.useCallback((e=>{var t;const r=e.currentTarget;let n=r.value;V&&(n=n.trim()),H&&(n=H(n)),n!==r.value&&(r.value=n,null===(t=S.onChange)||void 0===t||t.call(S,Object.assign(Object.assign({},e),{target:r})))}),[V,H,S.onChange]),ne=e.useCallback((e=>{var t;(V||H)&&re(e),null===(t=S.onBlur)||void 0===t||t.call(S,e)}),[V,H,re,S.onBlur]),ae=e.useCallback((e=>{var t;(V||H)&&"Enter"===e.key&&re(e),null===(t=S.onKeyDown)||void 0===t||t.call(S,e)}),[V,H,re,S.onKeyDown]),oe=I&&"string"==typeof S.value?I(S.value):S.value,le=e.useCallback((()=>{Z.current&&(Z.current.value="",S.onChange&&(new Event("input",{bubbles:!0}),S.onChange({target:{value:""}})))}),[S.onChange]),ie=e.useCallback((()=>{m||(null==z||z(),Z.current&&Z.current.focus())}),[m,z]),se=e.useCallback((()=>{m||(null==C||C(),Z.current&&Z.current.focus())}),[m,C]),ce=e.useMemo((()=>{if(q)return P?t.jsx("div",{className:s_(K,"flex",null==A?void 0:A.iconSearchWrapper),children:P()}):"flat"===d?t.jsx("div",{className:s_(K,null==A?void 0:A.iconSearchWrapper),children:t.jsx("div",{className:s_(X,null==A?void 0:A.icon),onClick:ie,children:j})}):t.jsx("div",{className:s_(J,null==A?void 0:A.startIconWrapper),onClick:ie,children:j})}),[q,j,d,K,J,X,P,ie]),de=e.useMemo((()=>{if(D)return R?t.jsx("div",{className:s_(Y,"flex",null==A?void 0:A.iconWrapper),children:R()}):"flat"===d?t.jsx("div",{className:s_(Y,"flex",null==A?void 0:A.iconWrapper),children:t.jsx("div",{className:s_(X,null==A?void 0:A.icon),onClick:se,children:O})}):t.jsx("div",{className:s_(ee,null==A?void 0:A.endIconWrapper),onClick:se,children:O})}),[D,O,d,Y,ee,X,R,se]);return t.jsxs("div",{className:"inline-flex flex-col "+(v?"w-full":""),children:[t.jsxs("div",{className:"relative",children:[t.jsx("input",Object.assign({},S,{placeholder:" ",ref:Z,type:c,id:N,disabled:m,value:oe,className:s_(U,S.className),onChange:L?te:S.onChange,onBlur:V||H?ne:S.onBlur,onKeyDown:V||H?ae:S.onKeyDown})),M&&!q&&t.jsx("div",{className:s_(K,null==A?void 0:A.iconSearchWrapper),children:t.jsx(zne,{className:s_(Q,null==A?void 0:A.icon)})}),ce,_&&!D&&t.jsx("div",{className:s_(Y,null==A?void 0:A.iconWrapper),style:{display:w&&S.value?"flex":void 0},children:t.jsx(QH,{className:s_(X,null==A?void 0:A.icon),onMouseDown:le})}),de,t.jsxs("label",{htmlFor:N,className:s_(G),children:[o," ",k&&t.jsx("span",{className:s_("text-input-error",{"text-input-disable-text":m}),children:"*"})]})]}),(W||x)&&t.jsxs("span",{className:$,children:[W&&t.jsx("span",{className:"h-full shrink-0",children:t.jsx(OV,{width:14,height:14,className:s_("fill-none stroke-current",F?"text-input-error":T?"text-warning":"text-input-filled-text")})}),x&&!W&&t.jsx("span",{className:"block min-h-[14px]","aria-hidden":!0}),W||""]})]})})),jme={0:{pattern:/[0-9]/,placeholder:"0"},9:{pattern:/[0-9\s]/,placeholder:"9"},"#":{pattern:/[0-9\s+\-]/,placeholder:"#"},L:{pattern:/[a-zA-Z]/,placeholder:"L"},"?":{pattern:/[a-zA-Z\s]/,placeholder:"?"},"&":{pattern:/[^\s]/,placeholder:"&"},C:{pattern:/./,placeholder:"C"},A:{pattern:/[a-zA-Z0-9]/,placeholder:"A"},a:{pattern:/[a-zA-Z0-9\s]/,placeholder:"a"}},Ome=(e,t,r="_",n=!0,a=!0)=>{let o="",l=0;for(let i=0;i<t.length;i++){const s=t[i];if(s.isLiteral)o+=s.placeholder;else{let t=!1;for(;l<e.length;){const r=e[l];l++;if(s.validator?s.validator(r):s.pattern.test(r)){o+=r,t=!0;break}}if(!t&&a&&n)o+=r;else if(!t)break}}return o},Eme=(e,t)=>{let r="";for(let n=0;n<e.length&&n<t.length;n++){const a=t[n],o=e[n];a.isLiteral||(r+=o)}return r},zme=e.forwardRef(((r,n)=>{var{mask:a,maskChar:o="_",showMask:l=!0,guide:i=!0,keepCharPositions:s=!1,rules:c,onMaskedChange:d,onChange:u,value:h,defaultValue:p}=r,f=o_(r,["mask","maskChar","showMask","guide","keepCharPositions","rules","onMaskedChange","onChange","value","defaultValue"]);const v=e.useRef(null),[m,y]=e.useState(""),[g,k]=e.useState(""),b=e.useMemo((()=>a?((e,t)=>{const r=Object.assign(Object.assign({},jme),t),n=[];let a=0;for(;a<e.length;){const t=e[a];if("\\"===t&&a+1<e.length){const t=e[a+1];n.push({pattern:new RegExp(`^${t}$`),placeholder:t,isLiteral:!0}),a+=2}else if(r[t]){const e=r[t];"function"==typeof e?n.push({pattern:/./,placeholder:t,validator:e}):e instanceof RegExp?n.push({pattern:e,placeholder:t}):n.push({pattern:e.pattern,placeholder:e.placeholder}),a++}else n.push({pattern:new RegExp(`^${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),placeholder:t,isLiteral:!0}),a++}return n})(a,c):null),[a,c]);e.useEffect((()=>{const e=h||p||"";if(b&&e){const t=Ome(e,b,o,l,i),r=Eme(t,b);y(t),k(r)}else y(e),k(e)}),[b,o,l,i,h,p]),e.useImperativeHandle(n,(()=>null==v?void 0:v.current));const w=e.useCallback((e=>{const t=e.target.value;if(!b)return y(t),k(t),null==u||u(e),void(null==d||d(t,t));const r=Ome(t,b,o,l,i),n=Eme(r,b);y(r),k(n);const a=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:r})});null==u||u(a),null==d||d(r,n),setTimeout((()=>{if(v.current){const e=n.replace(/[_\s]/g,"").length,t=((e,t,r)=>{let n=0,a=0;for(let o=0;o<r.length&&o<e.length;o++){const l=r[o];if(e[o],l.isLiteral)a=o+1;else if(n++,a=o+1,n>=t)break}return a})(r,e,b);v.current.setSelectionRange(t,t)}}),0)}),[b,o,l,i,u,d]),x=e.useCallback((e=>{var t,r,n;if(!b)return void(null===(t=f.onKeyDown)||void 0===t||t.call(f,e));const{key:a,ctrlKey:o,metaKey:l}=e,i=e.target.selectionStart||0;if("Backspace"===a||"Delete"===a||"ArrowLeft"===a||"ArrowRight"===a||"Home"===a||"End"===a||"Tab"===a||a.length>1||o||l)return void(null===(r=f.onKeyDown)||void 0===r||r.call(f,e));let s=i;for(;s<b.length&&b[s].isLiteral;)s++;if(s<b.length){const t=b[s];if(!(t.validator?t.validator(a):t.pattern.test(a)))return void e.preventDefault()}null===(n=f.onKeyDown)||void 0===n||n.call(f,e)}),[b,f]);return t.jsx(Mme,Object.assign({},f,{ref:v,value:m,onChange:w,onKeyDown:x,className:s_(f.className)}))}));zme.displayName="MaskedTextInput";const Cme=r.cva(["text-inherit"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",tertiary:"text-tertiary",success:"text-success",info:"text-info",warning:"text-warning",error:"text-error",inherit:"text-inherit"},size:{sm:"size-4",md:"size-6",lg:"size-8",inherit:""}},defaultVariants:{size:"inherit",color:"inherit"}}),Pme={sm:16,md:24,lg:32},Rme=r=>{var{name:n,type:a="heroicons",color:o="inherit",variant:l="solid",size:i="md",className:s}=r,c=o_(r,["name","type","color","variant","size","className"]);const[d,u]=e.useState(null);if(e.useEffect((()=>{if("lucide"===a)return void Promise.resolve().then((function(){return zZe})).then((({default:e})=>{const t=e[n];t?t().then((e=>{u((()=>e.default))})):console.warn(`Lucide icon "${n}" not found.`)}));const e=((e,t,r)=>{var n,a;return null===(a=null===(n=Xx[e])||void 0===n?void 0:n[t])||void 0===a?void 0:a[r]})(a,n,l);e?u((()=>e)):console.warn(`Icon "${n}" from "${a}" not found.`)}),[n,a,l]),"lucide"===a){if(!d)return t.jsx("span",{className:s_(Cme({color:o,size:i}),s)});const e="inherit"===i?24:Pme[i];return t.jsx(d,Object.assign({},c,{size:e,strokeWidth:e<=16?1.5:2,absoluteStrokeWidth:!0,shapeRendering:"geometricPrecision",className:s_(Cme({color:o,size:i}),"stroke-current",s)}))}return d?t.jsx(d,Object.assign({className:s_(Cme({color:o,size:i}),s)},c)):t.jsx("svg",Object.assign({className:s_(Cme({color:o,size:i}),s)},c))},Ame=e.forwardRef(((r,n)=>{var a,{showToggle:o=!0,hasClearIcon:l=!1,hideIcon:i,showIcon:s,endIcon:c,renderEndIcon:d,onClickEndIcon:u}=r,h=o_(r,["showToggle","hasClearIcon","hideIcon","showIcon","endIcon","renderEndIcon","onClickEndIcon"]);const p=e.useRef(null),[f,v]=e.useState(!1);e.useImperativeHandle(n,(()=>null==p?void 0:p.current));const m=f?null!=s?s:t.jsx(Rme,{name:"eye",type:"lucide",size:"inherit",className:"size-full","aria-label":"Hide password"}):null!=i?i:t.jsx(Rme,{name:"eye-closed",type:"lucide",size:"inherit",className:"size-full","aria-label":"Show password"});return t.jsx(Mme,Object.assign({iconMode:"flat"},h,{ref:p,type:f?"text":"password",hasClearIcon:l,endIcon:o?m:c,renderEndIcon:d,onClickEndIcon:o?()=>{var e;h.disabled||(v((e=>!e)),null===(e=p.current)||void 0===e||e.focus(),null==u||u())}:u,autoComplete:null!==(a=h.autoComplete)&&void 0!==a?a:"current-password"}))}));Ame.displayName="PasswordInput";const Lme=e.forwardRef(((r,n)=>{var a,{value:o,defaultValue:l,min:i,max:s,step:c=1,precision:d,hideControls:u=!1,allowDecimal:h=!0,allowNegative:p=!0,formatDisplay:f=!1,thousandSeparator:v=",",decimalSeparator:m=".",prefix:y="",suffix:g="",disabled:k=!1,onChange:b,onValueChange:w,className:x,size:_="md"}=r,M=o_(r,["value","defaultValue","min","max","step","precision","hideControls","allowDecimal","allowNegative","formatDisplay","thousandSeparator","decimalSeparator","prefix","suffix","disabled","onChange","onValueChange","className","size"]);const j=e.useRef(null),[O,E]=e.useState((null!==(a=null!=o?o:l)&&void 0!==a?a:"").toString()),[z,C]=e.useState(!1);e.useImperativeHandle(n,(()=>null==j?void 0:j.current));const P=e.useCallback((e=>{let t=e;return y&&(t=t.replace(y,"")),g&&(t=t.replace(g,"")),v&&(t=t.split(v).join("")),"."!==m&&(t=t.replace(m,".")),t.trim()}),[y,g,v,m]),R=e.useCallback((e=>{if(!f||""===e||"-"===e)return e;const t=parseFloat(e);if(isNaN(t))return e;let r=t.toString();void 0!==d&&(r=t.toFixed(d));const n=r.split(".");let a=n[0];const o=n[1];return v&&(a=a.replace(/\B(?=(\d{3})+(?!\d))/g,v)),r=o?`${a}${m}${o}`:a,y&&(r=`${y}${r}`),g&&(r=`${r}${g}`),r}),[f,d,v,m,y,g]),A=e.useCallback((e=>{if(""===e||"-"===e)return e;let t=parseFloat(e);return isNaN(t)?O:(void 0!==i&&t<i&&(t=i),void 0!==s&&t>s&&(t=s),void 0!==d&&(t=parseFloat(t.toFixed(d))),t.toString())}),[i,s,d,O]),L=e.useCallback((e=>{let t=e.target.value;if(f&&(t=P(t)),""===t)return E(""),null==b||b(void 0),void(null==w||w(""));if(p&&"-"===t)return E("-"),void(null==w||w("-"));if(!(h?p?/^-?\d*\.?\d*$/:/^\d*\.?\d*$/:p?/^-?\d*$/:/^\d*$/).test(t))return;E(t),null==w||w(t);const r=parseFloat(t);isNaN(r)||null==b||b(r)}),[h,p,f,P,b,w]),I=e.useCallback((e=>{var t;C(!0),null===(t=M.onFocus)||void 0===t||t.call(M,e)}),[M]),V=e.useCallback((e=>{var t;C(!1);const r=A(O);E(r);const n=parseFloat(r);isNaN(n)||null==b||b(n),null===(t=M.onBlur)||void 0===t||t.call(M,e)}),[O,A,b,M]),H=e.useCallback((e=>{if(k)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(O)||0)+c;void 0!==s&&t>s&&(t=s);const r=A(t.toString());E(r),null==b||b(parseFloat(r)),null==w||w(r)}),[O,c,s,k,A,b,w]),S=e.useCallback((e=>{if(k)return;e.stopPropagation(),e.preventDefault();let t=(parseFloat(O)||0)-c;void 0!==i&&t<i&&(t=i);const r=A(t.toString());E(r),null==b||b(parseFloat(r)),null==w||w(r)}),[O,c,i,k,A,b,w]),Z=e.useCallback((e=>{var t;switch(e.key){case"ArrowUp":H(e);break;case"ArrowDown":S(e);break;case"Enter":e.currentTarget.blur()}null===(t=M.onKeyDown)||void 0===t||t.call(M,e)}),[H,S,M]);e.useEffect((()=>{void 0!==o&&E(o.toString())}),[o]);const N=e.useMemo((()=>z||!f?O:R(O)),[z,f,O,R]),q={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6"}[_],D={sm:"absolute top-0.5",md:"absolute top-1",lg:"absolute top-1"}[_];return t.jsx(Mme,Object.assign({},M,{ref:j,type:"text",inputMode:"decimal",value:N,onChange:L,onFocus:I,onBlur:V,onKeyDown:Z,disabled:k,size:_,hasClearIcon:!1,endIcon:u?null:t.jsxs("div",{className:s_("flex flex-col","flat"===M.iconMode&&D),children:[t.jsx("button",{type:"button",onClick:H,disabled:k||void 0!==s&&parseFloat(O)>=s,className:s_(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:t.jsx(bn,{className:q})}),t.jsx("button",{type:"button",onClick:S,disabled:k||void 0!==i&&parseFloat(O)<=i,className:s_(" hover:bg-input-active-stroke/10 disabled:opacity-30 disabled:cursor-not-allowed transition-colors rounded-full text-input-filled-text"),tabIndex:-1,children:t.jsx(hn,{className:q})})]}),className:s_(x)}))}));Lme.displayName="NumberInput";const Ime=r.cva(["peer block w-full bg-transparent outline-none placeholder:text-transparent resize-y ui-scrollbar","text-input-filled-text caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-md",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-stroke"},fullwidth:{true:"w-full"},disabled:{true:["bg-input-disable-bg text-input-disable-text ring-input-disable-stroke placeholder:text-input-disable-text","hover:ring-input-disable-stroke","cursor-not-allowed"]},error:{true:"ring-input-error focus:ring-input-error"},hasClearIcon:{true:""},isFloatingLabel:{true:"",false:"placeholder:text-input-placeholder"}},compoundVariants:[{variant:"underline",className:"rounded-none"},{hasClearIcon:!0,size:"sm",className:"focus:pe-6"},{hasClearIcon:!0,size:"md",className:"focus:pe-8"},{hasClearIcon:!0,size:"lg",className:"focus:pe-10"}],defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hasClearIcon:!1,isFloatingLabel:!0}}),Vme=r.cva(["absolute block duration-450 transition-all px-[2px] text-input-default-text","peer-focus:text-input-filled-text peer-focus:bg-input-label-bg"],{variants:{size:{sm:[],md:[],lg:[]},disabled:{true:"text-input-default-text placeholder:text-input-default-text"},error:{true:"ring-error"},isFloatingLabel:{false:"hidden peer-placeholder-shown:block peer-focus:bg-transparent"}},compoundVariants:[{isFloatingLabel:!0,size:"sm",className:["left-3 -top-1.5 typography-label2 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{isFloatingLabel:!0,size:"md",className:["left-3 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!0,size:"lg",className:["left-4 -top-1.5 typography-label1 bg-input-label-bg","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{isFloatingLabel:!1,size:"sm",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1"]},{isFloatingLabel:!1,size:"md",className:["left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4"]},{isFloatingLabel:!1,size:"lg",className:["left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatingLabel:!0}}),Hme=r.cva(["absolute inset-y-0 right-0 items-start justify-center hidden peer-focus:flex"],{variants:{size:{sm:"mr-2 pt-2",md:"mr-3 pt-2",lg:"mr-4 pt-4"}},defaultVariants:{size:"md"}}),Sme=r.cva(["cursor-pointer z-50 fill-input-active-stroke hover:fill-input-default-text"],{variants:{size:{sm:"size-3",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),Zme=r.cva(["typography-small1 flex flex-row items-center gap-1"],{variants:{size:{sm:"mt-1",md:"mt-[6px]",lg:"mt-[6px]"},disabled:{true:"text-input-disable-text"},error:{true:"text-input-error",false:"text-input-filled-text"}},defaultVariants:{size:"md",disabled:!1,error:!1}}),Nme=e.forwardRef(((r,n)=>{var{id:a,label:o,size:l="md",rounded:i="normal",variant:s="outline",helperText:c,errorMessage:d,fullwidth:u=!0,disabled:h=!1,error:p=!1,required:f=!0,isFloatingLabel:v=!0,keepCloseIconOnValue:m=!1,hasClearIcon:y=!0,labelClassName:g,className:k,normalize:b,format:w,trimOnCommit:x,normalizeOnCommit:_}=r,M=o_(r,["id","label","size","rounded","variant","helperText","errorMessage","fullwidth","disabled","error","required","isFloatingLabel","keepCloseIconOnValue","hasClearIcon","labelClassName","className","normalize","format","trimOnCommit","normalizeOnCommit"]);const j=e.useRef(null),O=a||`textarea-${null!=o?o:""}`;e.useImperativeHandle(n,(()=>null==j?void 0:j.current));const E=e.useCallback((e=>{var t;b&&(e.target.value=b(e.target.value)),null===(t=M.onChange)||void 0===t||t.call(M,e)}),[b,M.onChange]),z=e.useCallback((e=>{var t;const r=e.currentTarget;let n=r.value;x&&(n=n.trim()),_&&(n=_(n)),n!==r.value&&(r.value=n,null===(t=M.onChange)||void 0===t||t.call(M,Object.assign(Object.assign({},e),{target:r})))}),[x,_,M.onChange]),C=e.useCallback((e=>{var t;(x||_)&&z(e),null===(t=M.onBlur)||void 0===t||t.call(M,e)}),[x,_,z,M.onBlur]),P=w&&"string"==typeof M.value?w(M.value):M.value,R=e.useMemo((()=>"inline-flex flex-col "+(u?"w-full":"")),[u]),A=Ime({size:l,rounded:i,variant:s,fullwidth:u,disabled:h,error:p,hasClearIcon:y,isFloatingLabel:v});return t.jsxs("div",{className:R,children:[t.jsxs("div",{className:"relative",children:[t.jsx("textarea",Object.assign({},M,{id:O,ref:j,disabled:h,placeholder:v?" ":M.placeholder,className:s_(A,k),value:P,onChange:b?E:M.onChange,onBlur:x||_?C:M.onBlur})),y&&t.jsx("div",{className:Hme({size:l}),style:{display:m&&M.value?"flex":void 0},children:t.jsx(Wd,{type:"button",className:Sme({size:l}),onMouseDown:e=>{if(e.preventDefault(),j.current){const e=j.current.value;j.current.value="",M.onChange&&""!==e&&M.onChange({target:{value:""}}),j.current.focus()}}})}),o&&t.jsxs("label",{htmlFor:O,className:s_(Vme({size:l,disabled:h,error:p,isFloatingLabel:v}),g),children:[o," ",f&&t.jsx("span",{className:s_("text-error",{"text-input-disable-text":h}),children:"*"})]})]}),(d||c)&&t.jsx("span",{className:Zme({size:l,disabled:h,error:p}),children:d||c})]})})),qme=r.cva(["text-common-black"],{variants:{color:{primary:"text-primary",secondary:"text-secondary",success:"text-success",tertiary:"text-tertiary",info:"text-info",warning:"text-warning",error:"text-error"}}}),Dme={subtitile1:"subtitle1",subtitile2:"subtitle2",subtitile3:"subtitle3",subtitile4:"subtitle4",subtitile5:"subtitle5",subtitile6:"subtitle6"},Bme=e.forwardRef(((e,r)=>{var n,{variant:a="body1",tag:o="p",children:l,className:i="",color:s,style:c}=e,d=o_(e,["variant","tag","children","className","color","style"]);const u=null!==(n=Dme[a])&&void 0!==n?n:a;return t.jsx(o,Object.assign({ref:r,className:s_(`typography-${u}`,qme({color:s}),i),style:c},d,{children:l}))})),Fme=r.cva(["box-border flex items-center justify-center"],{variants:{variant:{solid:["bg-action-button-solid-default border-action-button-solid-default text-action-button-solid-default fill-action-button-solid-default","hover:bg-action-button-solid-hover hover:border-action-button-solid-hover hover:text-action-button-solid-hover hover:fill-action-button-solid-hover","active:bg-action-button-solid-pressed active:border-action-button-solid-pressed active:text-action-button-solid-pressed active:fill-action-button-solid-pressed"],outline:["ring-1 ring-inset","bg-action-button-outline-default text-action-button-outline-default fill-action-button-outline-default ring-[var(--action-button-outline-default-border)]","hover:bg-action-button-outline-hover hover:text-action-button-outline-hover hover:fill-action-button-outline-hover hover:ring-[var(--action-button-outline-hover-border)]","active:bg-action-button-outline-pressed active:text-action-button-outline-pressed active:fill-action-button-outline-pressed active:ring-[var(--action-button-outline-pressed-border)]"],icon:["bg-action-button-icon-default border-action-button-icon-default text-action-button-icon-default fill-action-button-icon-default","hover:bg-action-button-icon-hover hover:border-action-button-icon-hover hover:text-action-button-icon-hover hover:fill-action-button-icon-hover","active:bg-action-button-icon-pressed active:border-action-button-icon-pressed active:text-action-button-icon-pressed active:fill-action-button-icon-pressed"]},size:{xxs:"",xs:"",sm:"",md:"",lg:""},shape:{round:"",capsule:""},disabled:{false:""},active:{false:""}},compoundVariants:[{variant:"solid",active:!0,className:["bg-action-button-solid-active border-action-button-solid-active text-action-button-solid-active fill-action-button-solid-active","hover:bg-action-button-solid-active-hover hover:border-action-button-solid-active-hover hover:text-action-button-solid-active-hover hover:fill-action-button-solid-active-hover","active:bg-action-button-solid-active-pressed active:border-action-button-solid-active-pressed active:text-action-button-solid-active-pressed active:fill-action-button-solid-active-pressed"]},{variant:"outline",active:!0,className:["bg-action-button-outline-active text-action-button-outline-active fill-action-button-outline-active ring-[var(--action-button-outline-active-border)]","hover:bg-action-button-outline-active-hover hover:text-action-button-outline-active-hover hover:fill-action-button-outline-active-hover hover:ring-[var(--action-button-outline-active-hover-border)]","active:bg-action-button-outline-active-pressed active:text-action-button-outline-active-pressed active:fill-action-button-outline-active-pressed active:ring-[var(--action-button-outline-active-pressed-border)]"]},{variant:"icon",active:!0,className:["bg-action-button-icon-active border-action-button-icon-active text-action-button-icon-active fill-action-button-icon-active","hover:bg-action-button-icon-active-hover hover:border-action-button-icon-active-hover hover:text-action-button-icon-active-hover hover:fill-action-button-icon-active-hover","active:bg-action-button-icon-active-pressed active:border-action-button-icon-active-pressed active:text-action-button-icon-active-pressed active:fill-action-button-icon-active-pressed"]},{size:"lg",variant:["solid","outline"],className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:["solid","outline"],className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:["solid","outline"],className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xs",variant:["solid","outline"],className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",variant:"icon",className:"px-[12px] py-[12px] [&_svg]:size-[32px]"},{size:"md",variant:"icon",className:"px-[8px] py-[8px] [&_svg]:size-[22px]"},{size:"sm",variant:"icon",className:"px-[4px] py-[4px] [&_svg]:size-[22px]"},{size:"xxs",variant:"icon",className:"px-[1px] py-[1px] [&_svg]:size-[10px]"},{size:"xs",variant:"icon",className:"px-[2px] py-[2px] [&_svg]:size-[14px]"},{size:"lg",shape:"round",className:"rounded-[var(--function-button-l-round)]"},{size:"md",shape:"round",className:"rounded-[var(--function-button-m-round)]"},{size:"sm",shape:"round",className:"rounded-[var(--function-button-s-round)]"},{size:"xs",shape:"round",className:"rounded-[var(--function-button-xs-round)]"},{size:"xxs",shape:"round",className:"rounded-[var(--function-button-xxs-round)]"},{size:"lg",shape:"capsule",className:"rounded-[var(--function-button-l-capsule)]"},{size:"md",shape:"capsule",className:"rounded-[var(--function-button-m-capsule)]"},{size:"sm",shape:"capsule",className:"rounded-[var(--function-button-s-capsule)]"},{size:"xxs",shape:"capsule",className:"rounded-[var(--function-button-xxs-capsule)]"},{size:"xs",shape:"capsule",className:"rounded-[var(--function-button-xs-capsule)]"},{variant:"solid",disabled:!0,className:["pointer-events-none","bg-action-button-solid-disabled border-action-button-solid-disabled text-action-button-solid-disabled fill-action-button-solid-disabled"]},{variant:"outline",disabled:!0,className:["pointer-events-none","bg-action-button-outline-disabled text-action-button-outline-disabled fill-action-button-outline-disabled ring-[var(--action-button-outline-disabled-border)]"]},{variant:"icon",disabled:!0,className:["pointer-events-none","bg-action-button-icon-disabled border-action-button-icon-disabled text-action-button-icon-disabled fill-action-button-icon-disabled"]}],defaultVariants:{size:"md",variant:"solid",shape:"round",disabled:!1,active:!1}}),Tme=e.forwardRef(((e,r)=>{var{children:n,disabled:a,active:o,className:l,size:i,shape:s,variant:c}=e,d=o_(e,["children","disabled","active","className","size","shape","variant"]);const u=Fme({size:i,shape:s,variant:c,active:o,disabled:a});return t.jsx("button",Object.assign({},d,{ref:r,type:"button","aria-disabled":a||void 0,disabled:a,tabIndex:a?-1:0,className:s_(".action-button",u,l),children:n}))}));function Wme(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ume(...e){return t=>{let r=!1;const n=e.map((e=>{const n=Wme(e,t);return r||"function"!=typeof n||(r=!0),n}));if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Wme(e[t],null)}}}}var Gme=l.forwardRef(((e,r)=>{const{children:n,...a}=e,o=l.Children.toArray(n),i=o.find(Kme);if(i){const e=i.props.children,n=o.map((t=>t===i?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t));return t.jsx($me,{...a,ref:r,children:l.isValidElement(e)?l.cloneElement(e,void 0,n):null})}return t.jsx($me,{...a,ref:r,children:n})}));Gme.displayName="Slot";var $me=l.forwardRef(((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r);return l.cloneElement(r,{...Xme(n,r.props),ref:t?Ume(t,e):e})}return l.Children.count(r)>1?l.Children.only(null):null}));$me.displayName="SlotClone";var Yme=({children:e})=>t.jsx(t.Fragment,{children:e});function Kme(e){return l.isValidElement(e)&&e.type===Yme}function Xme(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{o(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}var Qme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?Gme:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),Jme=Boolean(globalThis?.document)?l.useLayoutEffect:()=>{},eye=l.forwardRef(((e,r)=>{const{container:n,...o}=e,[i,s]=l.useState(!1);Jme((()=>s(!0)),[]);const c=n||i&&globalThis?.document?.body;return c?a.createPortal(t.jsx(Qme.div,{...o,ref:r}),c):null}));eye.displayName="Portal";var tye=eye;r.cva(["absolute inset-y-0 right-0 flex items-center justify-center"],{variants:{size:{sm:"mr-2",md:"mr-3",lg:"mr-4"}},defaultVariants:{size:"md"}});const rye=r.cva(["transition-all"],{variants:{disabled:{true:"fill-input-text-disabled",false:"fill-inherit"},isFocus:{true:"fill-input-text-active rotate-180",false:""}},defaultVariants:{disabled:!1,isFocus:!1}}),nye=r.cva([],{variants:{size:{sm:"pe-[30px]",md:"pe-[40px]",lg:"pe-[68px]"}},defaultVariants:{size:"md"}}),aye=e.forwardRef((({items:r,selectedValues:n=[],onSelect:a,className:o,style:l,isAbove:i=!1},s)=>t.jsx("div",{ref:s,className:s_("z-50 min-w-[154px] overflow-hidden rounded-md bg-modal-surface text-text-g-contrast-high","border border-modal-surface",o),style:Object.assign({boxShadow:"var(--dropdown-menu-shadow)"},l),children:r.map(((r,o)=>{var l;if("separator"===r.type)return t.jsx(lye,{},`separator-${o}`);if("label"===r.type)return t.jsx(iye,{children:r.label},`label-${o}`);if("custom"===r.type)return t.jsx(e.Fragment,{children:r.render()},`custom-${o}`);const i=r.item,s=i.type||"default";let c=!1;return c=("checkbox"===s||"radio"===s)&&null!==(l=i.checked)&&void 0!==l?l:n.includes(i.value),t.jsx(oye,{option:i,visualType:s,isChecked:c,onSelect:()=>{var e;null==a||a(i.value,i),null===(e=i.onClick)||void 0===e||e.call(i)}},i.value)}))})));aye.displayName="Menu";const oye=e.forwardRef((({option:e,visualType:r,isChecked:n,onSelect:a,className:o},l)=>t.jsxs("div",{ref:l,className:s_("relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-subtitle4 outline-none transition-colors","bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]","active:opacity-75","hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]",{"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)] typography-subtitle5":n,"pointer-events-none opacity-50":e.disabled,"text-red-500":e.danger},o),onMouseDown:e.disabled?void 0:a,children:["checkbox"===r&&n?t.jsx("span",{className:"absolute left-4 flex items-center justify-center",children:t.jsx(Rme,{type:"heroicons",name:"check",className:"size-4"})}):"radio"===r&&n?t.jsx("span",{className:"absolute left-4 flex items-center justify-center",children:t.jsx(Rme,{type:"heroicons",name:"circle",className:"h-2 w-2 fill-current"})}):null,e.icon&&t.jsx("span",{className:"flex-shrink-0",children:e.icon}),e.label]})));oye.displayName="MenuItem";const lye=e.forwardRef((({className:e},r)=>t.jsx("div",{ref:r,className:s_("-mx-2 my-2 h-px bg-[var(--dropdown-menu-seperator-bg)]",e)})));lye.displayName="MenuSeparator";const iye=e.forwardRef((({children:e,className:r},n)=>t.jsx("div",{ref:n,className:s_("px-3 py-2 typography-small4 text-text-g-contrast-medium",r),children:e})));iye.displayName="MenuLabel";const sye=e.forwardRef(((r,n)=>{var{id:a,options:o=[],value:l,label:i,size:s="md",rounded:c="normal",variant:d="outline",defaultMenuItemType:u="checkbox",helperText:h,errorMessage:p,fullwidth:f=!0,disabled:v=!1,error:m=!1,filterMode:y=!1,required:g=!0,modal:k=!1,onChangeText:b,onSelect:w,renderOptions:x,optionContainerClassName:_,optionItemClassName:M,optionNotFoundItemClassName:j,segmentedInput:O=!0}=r,E=o_(r,["id","options","value","label","size","rounded","variant","defaultMenuItemType","helperText","errorMessage","fullwidth","disabled","error","filterMode","required","modal","onChangeText","onSelect","renderOptions","optionContainerClassName","optionItemClassName","optionNotFoundItemClassName","segmentedInput"]);const z=a||`${i}-select`,[C,P]=e.useState(!1),[R,A]=e.useState(null),[L,I]=e.useState(""),V=e.useRef(""),H=e.useRef(null),S=e.useRef(null),[Z,N]=e.useState({}),[q,D]=e.useState(!1),[B,F]=e.useState(!1);e.useImperativeHandle(n,(()=>null==S?void 0:S.current)),e.useEffect((()=>{var e;A(l),I(null!==(e=null==l?void 0:l.label)&&void 0!==e?e:"")}),[l]),e.useEffect((()=>{let e=S.current;for(;e;){if("dialog"===e.getAttribute("role"))return void F(!0);e=e.parentElement}F(!1)}),[]);const T=e.useCallback((e=>{null==b||b(e),I(e.target.value),e.target.value||X(e)}),[b]),W=e.useCallback((e=>{A(e),I(e.label),null==w||w(e),P(!1)}),[w]),U=e.useMemo((()=>o.filter((e=>{var t;return!y||(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(null==L?void 0:L.toLowerCase()))}))),[o,y,L]),G=!B&&k,$=e.useCallback((()=>{if(S.current&&H.current){const e=S.current.getBoundingClientRect(),t=H.current.offsetHeight,r=window.innerHeight-e.bottom,n=e.top,a=r<t&&n>r;D(a),N(G?{position:"absolute",top:a?e.top-t+"px":`${e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}:{position:"absolute",top:a?`-${t}px`:"100%",left:"0",width:"100%",zIndex:9999})}}),[k,B,G]);e.useEffect((()=>(C&&($(),window.addEventListener("resize",$)),()=>{window.removeEventListener("resize",$)})),[C,$]);const Y=()=>{if(x)return x({optionsFiltered:U,selectedOption:R,onClick:W,style:Z,dropdownRef:H});let r;return r=U.map((r=>r.renderLabel?{type:"custom",render:()=>t.jsx(e.Fragment,{children:r.renderLabel({value:r.value,label:r.label,handleOnClick:()=>W(r),className:s_("relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-subtitle4 outline-none transition-colors","bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]","active:opacity-75","hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]",{"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)] typography-subtitle5":(null==R?void 0:R.value)===r.value},M)})},r.value)}:{type:"item",item:{type:u,value:r.value,label:r.label}})),0===r.length&&r.push({type:"custom",render:()=>t.jsx("div",{className:s_("px-4 py-14 text-center text-input-text",j),children:"Not found"},"not-found")}),t.jsx(aye,{ref:H,items:r,selectedValues:(null==R?void 0:R.value)?[R.value]:[],onSelect:e=>{const t=U.find((t=>t.value===e));t&&W(t)},className:s_("absolute mt-1 w-full max-h-60 overflow-y-auto",!G&&(q?"bottom-full mb-1":"top-full mt-1"),_),style:Z})},K=e.useCallback((e=>{var t;P(!0),null===(t=null==E?void 0:E.onFocus)||void 0===t||t.call(E,e)}),[null==E?void 0:E.onFocus]),X=e.useCallback((e=>{const t=U.find((t=>{var r,n;return t.value===(null===(r=e.target)||void 0===r?void 0:r.value)||t.label===(null===(n=e.target)||void 0===n?void 0:n.value)}));let r=t||{value:"",label:""};!!!t&&L&&(r={value:"",label:""}),"Enter"!==V.current&&(A(r),I(r.label),null==w||w(r))}),[U,L]),Q=e.useCallback((e=>{var t;setTimeout((()=>P(!1)),200),X(e),null===(t=null==E?void 0:E.onBlur)||void 0===t||t.call(E,e)}),[null==E?void 0:E.onBlur,X]),J=e.useCallback((e=>{var t;V.current=e.code,null===(t=null==E?void 0:E.onKeyDown)||void 0===t||t.call(E,e)}),[null==E?void 0:E.onKeyDown]);return t.jsxs("div",{className:"relative "+(f?"w-full":""),children:[t.jsx(Mme,Object.assign({hasClearIcon:!1,endIcon:t.jsx(hn,{className:rye({isFocus:C})})},E,{ref:S,readOnly:!y,value:L,onChange:T,label:i,placeholder:" ",type:"text",autoComplete:"off",rounded:c,variant:d,helperText:h,errorMessage:p,fullwidth:f,error:m,required:g,id:z,disabled:v,size:s,className:O?nye({size:s}):void 0,onFocus:K,onBlur:Q,onKeyDown:J})),C&&(G?t.jsx(tye,{container:document.body,children:Y()}):Y())]})}));function cye(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function dye(...e){return l.useCallback(cye(...e),e)}function uye(e,r=[]){let n=[];const a=()=>{const t=n.map((e=>l.createContext(e)));return function(r){const n=r?.[e]||t;return l.useMemo((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return a.scopeName=e,[function(r,a){const o=l.createContext(a),i=n.length;n=[...n,a];const s=r=>{const{scope:n,children:a,...s}=r,c=n?.[e]?.[i]||o,d=l.useMemo((()=>s),Object.values(s));return t.jsx(c.Provider,{value:d,children:a})};return s.displayName=r+"Provider",[s,function(t,n){const s=n?.[e]?.[i]||o,c=l.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},hye(a,...r)]}function hye(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return l.useMemo((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}function pye(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function fye(e){const t=l.useRef(e);return l.useEffect((()=>{t.current=e})),l.useMemo((()=>(...e)=>t.current?.(...e)),[])}function vye({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=function({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,a=l.useRef(n),o=fye(t);return l.useEffect((()=>{a.current!==n&&(o(n),a.current=n)}),[n,a,o]),r}({defaultProp:t,onChange:r}),o=void 0!==e,i=o?e:n,s=fye(r);return[i,l.useCallback((t=>{if(o){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else a(t)}),[o,e,a,s])]}function mye(e){const t=l.useRef({value:e,previous:e});return l.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function yye(e){const[t,r]=l.useState(void 0);return Jme((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let a,o;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;r({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}var gye=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),o=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=function(e,t){return l.useReducer(((e,r)=>t[e][r]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect((()=>{const e=kye(n.current);o.current="mounted"===s?e:"none"}),[s]),Jme((()=>{const t=n.current,r=a.current;if(r!==e){const n=o.current,l=kye(t);if(e)c("MOUNT");else if("none"===l||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==l?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,c]),Jme((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,l=o=>{const l=kye(n.current).includes(o.animationName);if(o.target===t&&l&&(c("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},i=e=>{e.target===t&&(o.current=kye(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),a="function"==typeof r?r({present:n.isPresent}):l.Children.only(r),o=dye(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||n.isPresent?l.cloneElement(a,{ref:o}):null};function kye(e){return e?.animationName||"none"}gye.displayName="Presence";var bye=l.forwardRef(((e,r)=>{const{children:n,...a}=e,o=l.Children.toArray(n),i=o.find(_ye);if(i){const e=i.props.children,n=o.map((t=>t===i?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t));return t.jsx(wye,{...a,ref:r,children:l.isValidElement(e)?l.cloneElement(e,void 0,n):null})}return t.jsx(wye,{...a,ref:r,children:n})}));bye.displayName="Slot";var wye=l.forwardRef(((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r);return l.cloneElement(r,{...Mye(n,r.props),ref:t?cye(t,e):e})}return l.Children.count(r)>1?l.Children.only(null):null}));wye.displayName="SlotClone";var xye=({children:e})=>t.jsx(t.Fragment,{children:e});function _ye(e){return l.isValidElement(e)&&e.type===xye}function Mye(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{o(...e),a(...e)}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}var jye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),Oye="Checkbox",[Eye,zye]=uye(Oye),[Cye,Pye]=Eye(Oye),Rye=l.forwardRef(((e,r)=>{const{__scopeCheckbox:n,name:a,checked:o,defaultChecked:i,required:s,disabled:c,value:d="on",onCheckedChange:u,form:h,...p}=e,[f,v]=l.useState(null),m=dye(r,(e=>v(e))),y=l.useRef(!1),g=!f||(h||!!f.closest("form")),[k=!1,b]=vye({prop:o,defaultProp:i,onChange:u}),w=l.useRef(k);return l.useEffect((()=>{const e=f?.form;if(e){const t=()=>b(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),t.jsxs(Cye,{scope:n,state:k,disabled:c,children:[t.jsx(jye.button,{type:"button",role:"checkbox","aria-checked":Vye(k)?"mixed":k,"aria-required":s,"data-state":Hye(k),"data-disabled":c?"":void 0,disabled:c,value:d,...p,ref:m,onKeyDown:pye(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:pye(e.onClick,(e=>{b((e=>!!Vye(e)||!e)),g&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())}))}),g&&t.jsx(Iye,{control:f,bubbles:!y.current,name:a,value:d,checked:k,required:s,disabled:c,form:h,style:{transform:"translateX(-100%)"},defaultChecked:!Vye(i)&&i})]})}));Rye.displayName=Oye;var Aye="CheckboxIndicator",Lye=l.forwardRef(((e,r)=>{const{__scopeCheckbox:n,forceMount:a,...o}=e,l=Pye(Aye,n);return t.jsx(gye,{present:a||Vye(l.state)||!0===l.state,children:t.jsx(jye.span,{"data-state":Hye(l.state),"data-disabled":l.disabled?"":void 0,...o,ref:r,style:{pointerEvents:"none",...e.style}})})}));Lye.displayName=Aye;var Iye=e=>{const{control:r,checked:n,bubbles:a=!0,defaultChecked:o,...i}=e,s=l.useRef(null),c=mye(n),d=yye(r);l.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:a});e.indeterminate=Vye(n),r.call(e,!Vye(n)&&n),e.dispatchEvent(t)}}),[c,n,a]);const u=l.useRef(!Vye(n)&&n);return t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??u.current,...i,tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Vye(e){return"indeterminate"===e}function Hye(e){return Vye(e)?"indeterminate":e?"checked":"unchecked"}var Sye=Rye,Zye=Lye;const Nye=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(Sye,Object.assign({ref:r,className:s_("peer size-4 shrink-0 cursor-pointer rounded-[var(--spacing-spacing-xxs,2px)] border border-function-default-solid ring-offset-bg-bg1","hover:border-function-default-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-input-active-stroke focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:border-state-disable-outline disabled:text-state-disable-outline","disabled:data-[state=checked]:border-state-disable-solid disabled:data-[state=checked]:bg-state-disable-solid","disabled:data-[state=indeterminate]:border-state-disable-solid disabled:data-[state=indeterminate]:bg-state-disable-solid",{"data-[state=checked]:border-function-active-solid data-[state=checked]:bg-function-active-solid data-[state=checked]:text-function-active-icon data-[state=indeterminate]:border-function-active-solid data-[state=indeterminate]:bg-function-active-solid data-[state=indeterminate]:text-function-active-icon":!a.disabled,"hover:data-[state=checked]:border-function-active-hover hover:data-[state=checked]:bg-function-active-hover hover:data-[state=indeterminate]:border-function-active-hover hover:data-[state=indeterminate]:bg-function-active-hover":!a.disabled},n)},a,{children:t.jsxs(Zye,{className:s_("flex size-[14px] items-center justify-center text-current","[&[data-state=checked]_.checkbox-check-icon]:block","[&[data-state=indeterminate]_.checkbox-minus-icon]:block"),children:[t.jsx(tn,{className:"checkbox-check-icon hidden size-[14px]"}),t.jsx(Ri,{className:"checkbox-minus-icon hidden size-[14px]"})]})}))}));Nye.displayName=Sye.displayName;var qye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),Dye=l.forwardRef(((e,r)=>t.jsx(qye.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));Dye.displayName="Label";var Bye=Dye;const Fye=r.cva(["block cursor-pointer duration-450 transition-all px-[2px] text-input-default-text peer-focus:text-input-text-active"],{variants:{size:{sm:"typography-small1",md:"typography-subtitle2",lg:"typography-subtitle1"},disabled:{true:"text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled peer-disabled:cursor-not-allowed"},error:{true:"ring-error"},isFloatable:{true:"absolute peer-focus:text-input-text-active peer-focus:bg-input-label-background",false:""}},compoundVariants:[{size:"sm",isFloatable:!0,className:["left-3 -top-1.5 typography-label2 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label2"]},{size:"md",isFloatable:!0,className:["left-3 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]},{size:"lg",isFloatable:!0,className:["left-4 -top-1.5 typography-label1 bg-input-label-background","peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent","peer-focus:-top-1.5 peer-focus:typography-label1"]}],defaultVariants:{size:"md",disabled:!1,error:!1,isFloatable:!1}}),Tye=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(Bye,Object.assign({ref:r,className:s_(Fye({size:a.size,disabled:a.disabled,error:a.error,isFloatable:a.isFloatable}),n)},a))}));Tye.displayName=Bye.displayName;const Wye=r.cva(["border-0 outline-none","p-1 flex w-auto h-fit box-border","peer text-input-filled-text placeholder:text-input-default-text bg-transparent caret-primary"],{variants:{size:{sm:"p-2 px-3 typography-small1",md:"py-2 px-3 typography-subtitle4",lg:"p-4 typography-subtitle1"},rounded:{none:"rounded-none",normal:"rounded-xl",full:"rounded-full"},variant:{flat:"",outline:["ring-1 ring-inset ring-input-default-stroke","hover:ring-input-active-stroke hover:text-input-filled-text","focus:ring-1 focus:ring-inset focus:ring-input-active-stroke focus:text-input-filled-text active:text-input-filled-text"],underline:"border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-default-stroke"},hiddenPlaceholder:{true:"placeholder:text-transparent"},fullwidth:{true:"w-full"},disabled:{true:["text-input-disable-text ring-input-disable-stroke bg-input-disable-bg placeholder:text-input-disable-text","hover:text-input-disable-text hover:ring-input-disable-stroke hover:bg-input-disable-bg hover:placeholder:text-input-disable-text","active:text-input-disable-text active:ring-input-disable-stroke active:bg-input-disable-bg active:placeholder:text-input-disable-text"]},error:{true:"ring-input-error focus:ring-input-error"}},defaultVariants:{size:"md",variant:"outline",rounded:"normal",fullwidth:!1,disabled:!1,error:!1,hiddenPlaceholder:!0}}),Uye=e.forwardRef(((e,r)=>{var{className:n,type:a="text",size:o="md",variant:l="outline",rounded:i="normal",fullwidth:s=!1,disabled:c=!1,error:d=!1,required:u=!1,hiddenPlaceholder:h=!1}=e,p=o_(e,["className","type","size","variant","rounded","fullwidth","disabled","error","required","hiddenPlaceholder"]);return t.jsx("input",Object.assign({type:a,className:s_(Wye({size:o,variant:l,fullwidth:s,error:d,hiddenPlaceholder:h,disabled:c,rounded:i}),n),ref:r,disabled:c},p))}));Uye.displayName="Input";var Gye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{}),$ye="Avatar",[Yye,Kye]=uye($ye),[Xye,Qye]=Yye($ye),Jye=l.forwardRef(((e,r)=>{const{__scopeAvatar:n,...a}=e,[o,i]=l.useState("idle");return t.jsx(Xye,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:t.jsx(Gye.span,{...a,ref:r})})}));Jye.displayName=$ye;var ege="AvatarImage",tge=l.forwardRef(((e,r)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:o=()=>{},...i}=e,s=Qye(ege,n),c=function(e,t){const[r,n]=l.useState("idle");return Jme((()=>{if(!e)return void n("error");let r=!0;const a=new window.Image,o=e=>()=>{r&&n(e)};return n("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{r=!1}}),[e,t]),r}(a,i.referrerPolicy),d=fye((e=>{o(e),s.onImageLoadingStatusChange(e)}));return Jme((()=>{"idle"!==c&&d(c)}),[c,d]),"loaded"===c?t.jsx(Gye.img,{...i,ref:r,src:a}):null}));tge.displayName=ege;var rge="AvatarFallback",nge=l.forwardRef(((e,r)=>{const{__scopeAvatar:n,delayMs:a,...o}=e,i=Qye(rge,n),[s,c]=l.useState(void 0===a);return l.useEffect((()=>{if(void 0!==a){const e=window.setTimeout((()=>c(!0)),a);return()=>window.clearTimeout(e)}}),[a]),s&&"loaded"!==i.imageLoadingStatus?t.jsx(Gye.span,{...o,ref:r}):null}));nge.displayName=rge;var age=Jye,oge=tge,lge=nge;const ige=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(age,Object.assign({ref:r,className:s_("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n)},a))}));ige.displayName=age.displayName;const sge=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(oge,Object.assign({ref:r,className:s_("aspect-square h-full w-full",n)},a))}));sge.displayName=oge.displayName;const cge=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx(lge,Object.assign({ref:r,className:s_("flex h-full w-full items-center justify-center rounded-full bg-inherit text-inherit",n)},a))}));cge.displayName=lge.displayName;const dge=r.cva(["flex items-center justify-center bg-grey2-700 text-common-black typography-subtitle2 truncate"],{variants:{size:{xxs:"w-[24px] h-[24px] typography-subtitle3",xs:"w-[32px] h-[32px]",sm:"w-[40px] h-[40px]",md:"w-[48px] h-[48px]",lg:"w-[64px] h-[64px]"},rounded:{normal:"rounded",full:"rounded-full",none:"rounded-none"}},defaultVariants:{size:"md",rounded:"normal"}}),uge=e=>{var t,r,n;if(!e.length)return"-";const a=e.split(" ");return`${null==e?void 0:e.charAt(0)}${null!==(n=null!==(r=null===(t=null==a?void 0:a[1])||void 0===t?void 0:t.charAt(0))&&void 0!==r?r:null==e?void 0:e.charAt(1))&&void 0!==n?n:""}`},hge=e.createContext(void 0),pge=()=>{const t=e.useContext(hge);if(!t)throw new Error("useCollapsible must be used within a CollapsibleProvider");return t},fge=({size:r,children:n,isExpandControlled:a,onToggle:o})=>{const[l,i]=e.useState(!1);return e.useEffect((()=>{void 0!==a&&i(a)}),[a]),t.jsx(hge.Provider,{value:{size:r,isExpand:l,toggle:()=>{i((e=>!e)),o&&o(!l)},setIsExpand:i},children:n})},vge=r.cva(["flex flex-1 bg-secondary-default hover:bg-secondary-hover text-state-secondary-text-solid","focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),mge=r.cva(["transition-all flex content-center justify-center "],{variants:{size:{sm:"size-5",md:"size-6",lg:"size-7"},isExpand:{true:"rotate-180"}},defaultVariants:{size:"md",isExpand:!1}}),yge=r.cva(["flex flex-1 border-t border-t-secondary","transition ease-in-out delay-150 duration-300"],{variants:{size:{sm:"py-2 px-3",md:"py-3 px-4",lg:"py-4 px-5"}},defaultVariants:{size:"md"}}),gge=r.cva(["flex flex-col border border-secondary rounded overflow-hidden"]),kge=e.forwardRef((({children:e,className:r,hideExpandIcon:n=!1},a)=>{const{toggle:o,isExpand:l,size:i}=pge(),s=vge({size:i}),c=mge({isExpand:l,size:i});return t.jsxs("button",{onClick:o,className:s_(s,r),ref:a,children:[t.jsx("span",{className:"flex flex-1",children:e}),!n&&t.jsx("span",{className:s_(c),children:t.jsx(hn,{className:s_("size-full")})})]})}));kge.displayName="CollapsibleButton";const bge=e.forwardRef((({children:r,className:n},a)=>{const{isExpand:o,size:l}=pge(),i=yge({size:l}),[s,c]=e.useState("0px"),d=e.useRef(null);return e.useEffect((()=>{d.current&&c(o?`${d.current.scrollHeight}px`:"0px")}),[o,r]),t.jsx("div",{ref:a,className:s_("overflow-hidden transition-all ease-in-out"),style:{height:s},children:t.jsx("div",{ref:d,className:s_(i,n),children:r})})}));bge.displayName="CollapsiblePanel";const wge=e.forwardRef((({children:e,isExpand:r,size:n,className:a,onToggle:o},l)=>{const i=gge();return t.jsx(fge,{size:n,isExpandControlled:r,onToggle:o,children:t.jsx("div",{ref:l,className:s_(i,a),children:e})})}));var xge,_ge,Mge;wge.displayName="Collapsible",wge.Button=kge,wge.Panel=bge,function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(xge||(xge={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(_ge||(_ge={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Mge||(Mge={}));const jge=6048e5,Oge=Symbol.for("constructDateFrom");function Ege(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Oge in e?e[Oge](t):e instanceof Date?new e.constructor(t):new Date(t)}function zge(e,t){return Ege(t||e,e)}function Cge(e,t,r){const n=zge(e,r?.in);return isNaN(t)?Ege(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function Pge(e,t,r){const n=zge(e,r?.in);if(isNaN(t))return Ege(e,NaN);if(!t)return n;const a=n.getDate(),o=Ege(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);return a>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}let Rge={};function Age(){return Rge}function Lge(e,t){const r=Age(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zge(e,t?.in),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Ige(e,t){return Lge(e,{...t,weekStartsOn:1})}function Vge(e,t){const r=zge(e,t?.in),n=r.getFullYear(),a=Ege(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=Ige(a),l=Ege(r,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const i=Ige(l);return r.getTime()>=o.getTime()?n+1:r.getTime()>=i.getTime()?n:n-1}function Hge(e){const t=zge(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Sge(e,...t){const r=Ege.bind(null,t.find((e=>"object"==typeof e)));return t.map(r)}function Zge(e,t){const r=zge(e,t?.in);return r.setHours(0,0,0,0),r}function Nge(e,t,r){const[n,a]=Sge(0,e,t),o=Zge(n),l=Zge(a),i=+o-Hge(o),s=+l-Hge(l);return Math.round((i-s)/864e5)}function qge(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Dge(e,t){const r=zge(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Bge(e,t){const r=Age(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zge(e,t?.in),o=a.getDay(),l=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}const Fge={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Tge(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Wge={date:Tge({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Tge({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Tge({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Uge={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Gge(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const $ge={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Gge({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Gge({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gge({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Gge({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Gge({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Yge(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const Kge={ordinalNumber:(Xge={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(Xge.matchPattern);if(!r)return null;const n=r[0],a=e.match(Xge.parsePattern);if(!a)return null;let o=Xge.valueCallback?Xge.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(n.length)}}),era:Yge({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Yge({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Yge({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Yge({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Yge({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Xge;const Qge={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=Fge[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:Wge,formatRelative:(e,t,r,n)=>Uge[e],localize:$ge,match:Kge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jge(e,t){const r=zge(e,t?.in),n=+Ige(r)-+function(e,t){const r=Vge(e,t),n=Ege(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Ige(n)}(r);return Math.round(n/jge)+1}function eke(e,t){const r=zge(e,t?.in),n=r.getFullYear(),a=Age(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=Ege(t?.in||e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=Lge(l,t),s=Ege(t?.in||e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=Lge(s,t);return+r>=+i?n+1:+r>=+c?n:n-1}function tke(e,t){const r=zge(e,t?.in),n=+Lge(r,t)-+function(e,t){const r=Age(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=eke(e,t),o=Ege(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),Lge(o,t)}(r,t);return Math.round(n/jge)+1}function rke(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const nke={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return rke("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):rke(r+1,2)},d:(e,t)=>rke(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>rke(e.getHours()%12||12,t.length),H:(e,t)=>rke(e.getHours(),t.length),m:(e,t)=>rke(e.getMinutes(),t.length),s:(e,t)=>rke(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return rke(Math.trunc(n*Math.pow(10,r-3)),t.length)}},ake="midnight",oke="noon",lke="morning",ike="afternoon",ske="evening",cke="night",dke={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return nke.y(e,t)},Y:function(e,t,r,n){const a=eke(e,n),o=a>0?a:1-a;if("YY"===t){return rke(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):rke(o,t.length)},R:function(e,t){return rke(Vge(e),t.length)},u:function(e,t){return rke(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return rke(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return rke(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return nke.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return rke(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=tke(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):rke(a,t.length)},I:function(e,t,r){const n=Jge(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):rke(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):nke.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=zge(e,t?.in);return Nge(r,Dge(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):rke(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return rke(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return rke(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return rke(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?oke:0===n?ake:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?ske:n>=12?ike:n>=4?lke:cke,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return nke.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):nke.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):rke(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):rke(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):nke.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):nke.s(e,t)},S:function(e,t){return nke.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return hke(n);case"XXXX":case"XX":return pke(n);default:return pke(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return hke(n);case"xxxx":case"xx":return pke(n);default:return pke(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+uke(n,":");default:return"GMT"+pke(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+uke(n,":");default:return"GMT"+pke(n,":")}},t:function(e,t,r){return rke(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return rke(+e,t.length)}};function uke(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+rke(o,2)}function hke(e,t){if(e%60==0){return(e>0?"-":"+")+rke(Math.abs(e)/60,2)}return pke(e,t)}function pke(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+rke(Math.trunc(n/60),2)+t+rke(n%60,2)}const fke=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},vke=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},mke={p:vke,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return fke(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",fke(n,t)).replace("{{time}}",vke(a,t))}},yke=/^D+$/,gke=/^Y+$/,kke=["D","DD","YY","YYYY"];const bke=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wke=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xke=/^'([^]*?)'?$/,_ke=/''/g,Mke=/[a-zA-Z]/;function jke(e,t,r){const n=Age(),a=r?.locale??n.locale??Qge,o=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=zge(e,r?.in);if(!function(e){return!(!qge(e)&&"number"!=typeof e||isNaN(+zge(e)))}(i))throw new RangeError("Invalid time value");let s=t.match(wke).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,mke[t])(e,a.formatLong)}return e})).join("").match(bke).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Oke(e)};if(dke[t])return{isToken:!0,value:e};if(t.match(Mke))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((n=>{if(!n.isToken)return n.value;const o=n.value;(!r?.useAdditionalWeekYearTokens&&function(e){return gke.test(e)}(o)||!r?.useAdditionalDayOfYearTokens&&function(e){return yke.test(e)}(o))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),kke.includes(e))throw new RangeError(n)}(o,t,String(e));return(0,dke[o[0]])(i,o,a.localize,c)})).join("")}function Oke(e){const t=e.match(xke);return t?t[1].replace(_ke,"'"):e}function Eke(e,t,r){const n=zge(e,r?.in),a=n.getFullYear(),o=n.getDate(),l=Ege(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const i=function(e,t){const r=zge(e,t?.in),n=r.getFullYear(),a=r.getMonth(),o=Ege(r,0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}(l);return n.setMonth(t,Math.min(o,i)),n}function zke(e,t){const r=t.startOfMonth(e),n=r.getDay();return 1===n?r:0===n?t.addDays(r,-6):t.addDays(r,-1*(n-1))}class Cke{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Cge(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):Pge(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,r){return Cge(e,7*t,r)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,r){return Pge(e,12*t,r)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Nge(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[r,n]=Sge(0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(e,t),this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e,this):function(e,t){const r=zke(e,t),n=function(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,a=t.addDays(e,1-n),o=t.addDays(a,34);return e.getMonth()===o.getMonth()?5:4}(e,t);return t.addDays(r,7*n-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return Bge(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const r=zge(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}(e),this.endOfWeek=e=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,this.options):Bge(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const r=zge(e,t?.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}(e),this.format=(e,t)=>this.overrides?.format?this.overrides.format(e,t,this.options):jke(e,t,this.options),this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):Jge(e),this.getWeek=e=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):tke(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+zge(e)>+zge(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+zge(e)<+zge(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):qge(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[r,n]=Sge(0,e,t);return+Zge(r)==+Zge(n)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[r,n]=Sge(0,e,t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[r,n]=Sge(0,e,t);return r.getFullYear()===n.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=Ege.bind(null,e));const t=zge(e,n);(!r||r<t||isNaN(+t))&&(r=t)})),Ege(n,r||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let r,n=t?.in;return e.forEach((e=>{n||"object"!=typeof e||(n=Ege.bind(null,e));const t=zge(e,n);(!r||r>t||isNaN(+t))&&(r=t)})),Ege(n,r||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):Eke(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,r){const n=zge(e,r?.in);return isNaN(+n)?Ege(e,NaN):(n.setFullYear(t),n)}(e,t),this.startOfBroadcastWeek=e=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):zke(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Zge(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):Ige(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const r=zge(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}(e),this.startOfWeek=e=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):Lge(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Dge(e),this.options={locale:Qge,...e},this.overrides=t}}const Pke=new Cke;const Rke=e.createContext(void 0);function Ake(){const t=e.useContext(Rke);if(void 0===t)throw new Error("useDayPicker() must be used within a custom component.");return t}var Lke=Object.freeze({__proto__:null,Button:function(t){return e.createElement("button",{...t})},CaptionLabel:function(t){return e.createElement("span",{...t})},Chevron:function(t){const{size:r=24,orientation:n="left",className:a}=t;return e.createElement("svg",{className:a,width:r,height:r,viewBox:"0 0 24 24"},"up"===n&&e.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&e.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&e.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&e.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))},Day:function(t){const{day:r,modifiers:n,...a}=t;return e.createElement("td",{...a})},DayButton:function(t){const{day:r,modifiers:n,...a}=t,o=e.useRef(null);return e.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),e.createElement("button",{ref:o,...a})},Dropdown:function(t){const{options:r,className:n,components:a,classNames:o,...l}=t,i=[o[xge.Dropdown],n].join(" "),s=r?.find((({value:e})=>e===l.value));return e.createElement("span",{"data-disabled":l.disabled,className:o[xge.DropdownRoot]},e.createElement(a.Select,{className:i,...l},r?.map((({value:t,label:r,disabled:n})=>e.createElement(a.Option,{key:t,value:t,disabled:n},r)))),e.createElement("span",{className:o[xge.CaptionLabel],"aria-hidden":!0},s?.label,e.createElement(a.Chevron,{orientation:"down",size:18,className:o[xge.Chevron]})))},DropdownNav:function(t){return e.createElement("div",{...t})},Footer:function(t){return e.createElement("div",{...t})},Month:function(t){const{calendarMonth:r,displayIndex:n,...a}=t;return e.createElement("div",{...a},t.children)},MonthCaption:function(t){const{calendarMonth:r,displayIndex:n,...a}=t;return e.createElement("div",{...a})},MonthGrid:function(t){return e.createElement("table",{...t})},Months:function(t){return e.createElement("div",{...t})},MonthsDropdown:function(t){const{components:r}=Ake();return e.createElement(r.Dropdown,{...t})},Nav:function(t){const{onPreviousClick:r,onNextClick:n,previousMonth:a,nextMonth:o,...l}=t,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=Ake();return e.createElement("nav",{...l},e.createElement(i.PreviousMonthButton,{type:"button",className:s[xge.PreviousMonthButton],tabIndex:a?void 0:-1,disabled:!a||void 0,"aria-label":c(a),onClick:t.onPreviousClick},e.createElement(i.Chevron,{disabled:!a||void 0,className:s[xge.Chevron],orientation:"left"})),e.createElement(i.NextMonthButton,{type:"button",className:s[xge.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":d(o),onClick:t.onNextClick},e.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:s[xge.Chevron]})))},NextMonthButton:function(t){const{components:r}=Ake();return e.createElement(r.Button,{...t})},Option:function(t){return e.createElement("option",{...t})},PreviousMonthButton:function(t){const{components:r}=Ake();return e.createElement(r.Button,{...t})},Root:function(t){return e.createElement("div",{...t})},Select:function(t){return e.createElement("select",{...t})},Week:function(t){const{week:r,...n}=t;return e.createElement("tr",{...n})},WeekNumber:function(t){const{week:r,...n}=t;return e.createElement("th",{...n})},WeekNumberHeader:function(t){return e.createElement("th",{...t})},Weekday:function(t){return e.createElement("th",{...t})},Weekdays:function(t){return e.createElement("thead",{"aria-hidden":!0},e.createElement("tr",{...t}))},Weeks:function(t){return e.createElement("tbody",{...t})},YearsDropdown:function(t){const{components:r}=Ake();return e.createElement(r.Dropdown,{...t})}});function Ike(e){return{...Lke,...e}}function Vke(){const e={};for(const t in xge)e[xge[t]]=`rdp-${xge[t]}`;for(const t in _ge)e[_ge[t]]=`rdp-${_ge[t]}`;for(const t in Mge)e[Mge[t]]=`rdp-${Mge[t]}`;return e}function Hke(e,t,r){return(r??new Cke(t)).format(e,"LLLL y")}const Ske=Hke;function Zke(e){return e.toString()}const Nke=Zke;var qke=Object.freeze({__proto__:null,formatCaption:Hke,formatDay:function(e,t,r){return(r??new Cke(t)).format(e,"d")},formatMonthCaption:Ske,formatMonthDropdown:function(e,t){return t.localize?.month(e)},formatWeekNumber:function(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,r){return(r??new Cke(t)).format(e,"cccccc")},formatYearCaption:Nke,formatYearDropdown:Zke});const Dke={},Bke={};function Fke(e,t){try{const r=(Dke[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in Bke?Bke[r]:Wke(r,r.split(":"))}catch{if(e in Bke)return Bke[e];const t=e?.match(Tke);return t?Wke(e,t.slice(1)):NaN}}const Tke=/([+-]\d\d):?(\d\d)?/;function Wke(e,t){const r=+t[0],n=+(t[1]||0);return Bke[e]=r>0?60*r+n:60*r-n}class Uke extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Fke(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Yke(this),$ke(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Uke(...t,e):new Uke(Date.now(),e)}withTimeZone(e){return new Uke(+this,e)}getTimezoneOffset(){return-Fke(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),$ke(this),+this}[Symbol.for("constructDateFrom")](e){return new Uke(+new Date(e),this.timeZone)}}const Gke=/^(get|set)(?!UTC)/;function $ke(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Yke(e){const t=Fke(e.timeZone,e),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const n=-new Date(+e).getTimezoneOffset(),a=n- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=n-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const i=Fke(e.timeZone,e),s=-new Date(+e).getTimezoneOffset()-i-l;if(i!==t&&s){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const t=i-Fke(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Gke.test(e))return;const t=e.replace(Gke,"$1UTC");Uke.prototype[t]&&(e.startsWith("get")?Uke.prototype[e]=function(){return this.internal[t]()}:(Uke.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Yke(e),+this},Uke.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),$ke(this),+this}))}));class Kke extends Uke{static tz(e,...t){return t.length?new Kke(...t,e):new Kke(Date.now(),e)}toISOString(){const[e,t,r]=this.tzComponents(),n=`${e}${t}:${r}`;return this.internal.toISOString().slice(0,-1)+n}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,r,n]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${r} ${t} ${n}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,r,n]=this.tzComponents();return`${e} GMT${t}${r}${n} (${a=this.timeZone,o=this,new Intl.DateTimeFormat("en-GB",{timeZone:a,timeZoneName:"long"}).format(o).slice(12)})`;var a,o}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Kke(+this,e)}[Symbol.for("constructDateFrom")](e){return new Kke(+new Date(e),this.timeZone)}}function Xke(e,t,r){return(r??new Cke(t)).format(e,"LLLL y")}const Qke=Xke;function Jke(e,t,r,n){let a=(n??new Cke(r)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const ebe=Jke;var tbe=Object.freeze({__proto__:null,labelCaption:Qke,labelDay:ebe,labelDayButton:Jke,labelGrid:Xke,labelGridcell:function(e,t,r,n){let a=(n??new Cke(r)).format(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelMonthDropdown:function(e){return"Choose the Month"},labelNav:function(){return""},labelNext:function(e){return"Go to the Next Month"},labelPrevious:function(e){return"Go to the Previous Month"},labelWeekNumber:function(e,t){return`Week ${e}`},labelWeekNumberHeader:function(e){return"Week Number"},labelWeekday:function(e,t,r){return(r??new Cke(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});function rbe(e,t){const{month:r,defaultMonth:n,today:a=(e.timeZone?Kke.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:o=1,endMonth:l,startMonth:i}=e;let s=r||n||a;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=t;if(l&&c(l,s)<0){s=d(l,-1*(o-1))}return i&&c(s,i)<0&&(s=i),u(s)}class nbe{constructor(e,t,r=Pke){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!r.isSameMonth(e,t)),this.dateLib=r}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class abe{constructor(e,t){this.date=e,this.weeks=t}}class obe{constructor(e,t){this.days=t,this.weekNumber=e}}function lbe(t,r){const[n,a]=e.useState(t);return[void 0===r?n:r,a]}function ibe(t,r){const[n,a]=function(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:a,startOfDay:o,startOfMonth:l,endOfMonth:i,addYears:s,endOfYear:c}=t,{fromYear:d,toYear:u,fromMonth:h,toMonth:p}=e;!r&&h&&(r=h),!r&&d&&(r=new Date(d,0,1)),!n&&p&&(n=p),!n&&u&&(n=new Date(u,11,31));const f=e.captionLayout?.startsWith("dropdown");r?r=l(r):d?r=new Date(d,0,1):!r&&f&&(r=a(s(e.today??(e.timeZone?Kke.tz(e.timeZone):t.Date?new t.Date:new Date),-100)));n?n=i(n):u?n=new Date(u,11,31):!n&&f&&(n=c(e.today??(e.timeZone?Kke.tz(e.timeZone):t.Date?new t.Date:new Date)));return[r?o(r):r,n?o(n):n]}(t,r),{startOfMonth:o,endOfMonth:l}=r,i=rbe(t,r),[s,c]=lbe(i,t.month?o(t.month):void 0);e.useEffect((()=>{const e=rbe(t,r);c(e)}),[t.timeZone]);const d=function(e,t,r,n){const{numberOfMonths:a=1}=r,o=[];for(let r=0;r<a;r++){const a=n.addMonths(e,r);if(t&&a>t)break;o.push(a)}return o}(s,a,t,r),u=function(e,t,r,n){const a=e[0],o=e[e.length-1],{ISOWeek:l,fixedWeeks:i,broadcastCalendar:s}=r??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:p,endOfMonth:f,endOfWeek:v,isAfter:m,startOfBroadcastWeek:y,startOfISOWeek:g,startOfWeek:k}=n,b=s?y(a,n):l?g(a):k(a),w=d(s?h(o,n):l?p(f(o)):v(f(o)),b),x=u(o,a)+1,_=[];for(let e=0;e<=w;e++){const r=c(b,e);if(t&&m(r,t))break;_.push(r)}const M=(s?35:42)*x;if(i&&_.length<M){const e=M-_.length;for(let t=0;t<e;t++){const e=c(_[_.length-1],1);_.push(e)}}return _}(d,t.endMonth?l(t.endMonth):void 0,t,r),h=function(e,t,r,n){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:l,endOfMonth:i,endOfWeek:s,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:p}=n,f=e.reduce(((e,f)=>{const v=r.broadcastCalendar?u(f,n):r.ISOWeek?h(f):p(f),m=r.broadcastCalendar?o(f,n):r.ISOWeek?l(i(f)):s(i(f)),y=t.filter((e=>e>=v&&e<=m)),g=r.broadcastCalendar?35:42;if(r.fixedWeeks&&y.length<g){const e=t.filter((e=>{const t=g-y.length;return e>m&&e<=a(m,t)}));y.push(...e)}const k=y.reduce(((e,t)=>{const a=r.ISOWeek?c(t):d(t),o=e.find((e=>e.weekNumber===a)),l=new nbe(t,f,n);return o?o.days.push(l):e.push(new obe(a,[l])),e}),[]),b=new abe(f,k);return e.push(b),e}),[]);return r.reverseMonths?f.reverse():f}(d,u,t,r),p=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(h),f=h.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]);const v=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o??1:1,d=l(e);return t&&s(d,t)<=0?void 0:i(d,-c)}(s,n,t,r),m=function(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=r,{startOfMonth:l,addMonths:i,differenceInCalendarMonths:s}=n,c=a?o:1,d=l(e);return t&&s(t,e)<o?void 0:i(d,c)}(s,a,t,r),{disableNavigation:y,onMonthChange:g}=t,k=e=>{if(y)return;let t=o(e);n&&t<o(n)&&(t=o(n)),a&&t>o(a)&&(t=o(a)),c(t),g?.(t)};return{months:h,weeks:p,days:f,navStart:n,navEnd:a,previousMonth:v,nextMonth:m,goToMonth:k,goToDay:e=>{(e=>p.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||k(e.date)}}}function sbe(e,t,r=!1,n=Pke){let{from:a,to:o}=e;const{differenceInCalendarDays:l,isSameDay:i}=n;if(a&&o){l(o,a)<0&&([a,o]=[o,a]);return l(t,a)>=(r?1:0)&&l(o,t)>=(r?1:0)}return!r&&o?i(o,t):!(r||!a)&&i(a,t)}function cbe(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function dbe(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function ube(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function hbe(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function pbe(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function fbe(e,t){return Array.isArray(e)&&e.every(t.isDate)}function vbe(e,t,r=Pke){const n=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:l}=r;return n.some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return a(e,t);if(fbe(t,r))return t.includes(e);if(dbe(t))return sbe(t,e,!1,r);if(pbe(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(cbe(t)){const r=o(t.before,e)>0,n=o(t.after,e)<0;return l(t.before,t.after)?n&&r:r||n}return ube(t)?o(e,t.after)>0:hbe(t)?o(t.before,e)>0:"function"==typeof t&&t(e)}))}function mbe(e,t,r,n,a,o,l,i=0){if(i>365)return;const s=function(e,t,r,n,a,o,l){const{ISOWeek:i,broadcastCalendar:s}=o,{addDays:c,addMonths:d,addWeeks:u,addYears:h,endOfBroadcastWeek:p,endOfISOWeek:f,endOfWeek:v,max:m,min:y,startOfBroadcastWeek:g,startOfISOWeek:k,startOfWeek:b}=l;let w={day:c,week:u,month:d,year:h,startOfWeek:e=>s?g(e,l):i?k(e):b(e),endOfWeek:e=>s?p(e,l):i?f(e):v(e)}[e](r,"after"===t?1:-1);return"before"===t&&n?w=m([n,w]):"after"===t&&a&&(w=y([a,w])),w}(e,t,r.date,n,a,o,l),c=Boolean(o.disabled&&vbe(s,o.disabled,l)),d=Boolean(o.hidden&&vbe(s,o.hidden,l)),u=new nbe(s,s,l);return c||d?mbe(e,t,u,n,a,o,l,i+1):u}function ybe(t,r,n,a,o){const{autoFocus:l}=t,[i,s]=e.useState(),c=function(e,t,r,n){let a,o=0,l=!1;for(;o<e.length&&!l;){const i=e[o],s=t(i);s[_ge.disabled]||s[_ge.hidden]||s[_ge.outside]||(s[_ge.focused]||n?.isEqualTo(i)||r(i.date)||s[_ge.today])&&(a=i,l=!0),o++}return a||(a=e.find((e=>{const r=t(e);return!r[_ge.disabled]&&!r[_ge.hidden]&&!r[_ge.outside]}))),a}(r.days,n,a||(()=>!1),i),[d,u]=e.useState(l?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:u,focused:d,blur:()=>{s(d),u(void 0)},moveFocus:(e,n)=>{if(!d)return;const a=mbe(e,n,d,r.navStart,r.navEnd,t,o);a&&(r.goToDay(a),u(a))}}}function gbe(e,t,r=Pke){return sbe(e,t.from,!1,r)||sbe(e,t.to,!1,r)||sbe(t,e.from,!1,r)||sbe(t,e.to,!1,r)}function kbe(e,t,r=Pke){const n=Array.isArray(t)?t:[t],a=n.filter((e=>"function"!=typeof e)).some((t=>{if("boolean"==typeof t)return t;if(r.isDate(t))return sbe(e,t,!1,r);if(fbe(t,r))return t.some((t=>sbe(e,t,!1,r)));if(dbe(t))return!(!t.from||!t.to)&&gbe(e,{from:t.from,to:t.to},r);if(pbe(t))return function(e,t,r=Pke){const n=Array.isArray(t)?t:[t];let a=e.from;const o=r.differenceInCalendarDays(e.to,e.from),l=Math.min(o,6);for(let e=0;e<=l;e++){if(n.includes(a.getDay()))return!0;a=r.addDays(a,1)}return!1}(e,t.dayOfWeek,r);if(cbe(t)){return r.isAfter(t.before,t.after)?gbe(e,{from:r.addDays(t.after,1),to:r.addDays(t.before,-1)},r):vbe(e.from,t,r)||vbe(e.to,t,r)}return!(!ube(t)&&!hbe(t))&&(vbe(e.from,t,r)||vbe(e.to,t,r))}));if(a)return!0;const o=n.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const n=r.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=n;e++){if(o.some((e=>e(t))))return!0;t=r.addDays(t,1)}}return!1}function bbe(e,t){const{disabled:r,excludeDisabled:n,selected:a,required:o,onSelect:l}=e,[i,s]=lbe(a,l?a:void 0),c=l?a:i;return{selected:c,select:(a,i,d)=>{const{min:u,max:h}=e,p=a?function(e,t,r=0,n=0,a=!1,o=Pke){const{from:l,to:i}=t||{},{isSameDay:s,isAfter:c,isBefore:d}=o;let u;if(l||i){if(l&&!i)u=s(l,e)?a?{from:l,to:void 0}:void 0:d(e,l)?{from:e,to:l}:{from:l,to:e};else if(l&&i)if(s(l,e)&&s(i,e))u=a?{from:l,to:i}:void 0;else if(s(l,e))u={from:l,to:r>0?void 0:e};else if(s(i,e))u={from:e,to:r>0?void 0:e};else if(d(e,l))u={from:e,to:i};else if(c(e,l))u={from:l,to:e};else{if(!c(e,i))throw new Error("Invalid range");u={from:l,to:e}}}else u={from:e,to:r>0?void 0:e};if(u?.from&&u?.to){const t=o.differenceInCalendarDays(u.to,u.from);(n>0&&t>n||r>1&&t<r)&&(u={from:e,to:void 0})}return u}(a,c,u,h,o,t):void 0;return n&&r&&p?.from&&p.to&&kbe({from:p.from,to:p.to},r,t)&&(p.from=a,p.to=void 0),l||s(p),l?.(p,a,i,d),p},isSelected:e=>c&&sbe(c,e,!1,t)}}function wbe(e,t){const r=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=lbe(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t;return{selected:i,select:(e,t,r)=>{let o=e;return!n&&i&&i&&s(e,i)&&(o=void 0),a||l(o),a?.(o,e,t,r),o},isSelected:e=>!!i&&s(i,e)}}(e,t),n=function(e,t){const{selected:r,required:n,onSelect:a}=e,[o,l]=lbe(r,a?r:void 0),i=a?r:o,{isSameDay:s}=t,c=e=>i?.some((t=>s(t,e)))??!1,{min:d,max:u}=e;return{selected:i,select:(e,t,r)=>{let o=[...i??[]];if(c(e)){if(i?.length===d)return;if(n&&1===i?.length)return;o=i?.filter((t=>!s(t,e)))}else o=i?.length===u?[e]:[...o,e];return a||l(o),a?.(o,e,t,r),o},isSelected:c}}(e,t),a=bbe(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return a;default:return}}function xbe(t){const{components:r,formatters:n,labels:a,dateLib:o,locale:l,classNames:i}=e.useMemo((()=>{const e={...Qge,...t.locale};return{dateLib:new Cke({locale:e,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens},t.dateLib),components:Ike(t.components),formatters:(r=t.formatters,r?.formatMonthCaption&&!r.formatCaption&&(r.formatCaption=r.formatMonthCaption),r?.formatYearCaption&&!r.formatYearDropdown&&(r.formatYearDropdown=r.formatYearCaption),{...qke,...r}),labels:{...tbe,...t.labels},locale:e,classNames:{...Vke(),...t.classNames}};var r}),[t.classNames,t.components,t.dateLib,t.firstWeekContainsDate,t.formatters,t.labels,t.locale,t.useAdditionalDayOfYearTokens,t.useAdditionalWeekYearTokens,t.weekStartsOn,t.broadcastCalendar]),{captionLayout:s,mode:c,onDayBlur:d,onDayClick:u,onDayFocus:h,onDayKeyDown:p,onDayMouseEnter:f,onDayMouseLeave:v,onNextClick:m,onPrevClick:y,showWeekNumber:g,styles:k}=t,{formatCaption:b,formatDay:w,formatMonthDropdown:x,formatWeekNumber:_,formatWeekNumberHeader:M,formatWeekdayName:j,formatYearDropdown:O}=n,E=ibe(t,o),{days:z,months:C,navStart:P,navEnd:R,previousMonth:A,nextMonth:L,goToMonth:I}=E,V=function(e,t,r){const{disabled:n,hidden:a,modifiers:o,showOutsideDays:l,broadcastCalendar:i,today:s}=t,{isSameDay:c,isSameMonth:d,startOfMonth:u,isBefore:h,endOfMonth:p,isAfter:f}=r,v=t.startMonth&&u(t.startMonth),m=t.endMonth&&p(t.endMonth),y={[_ge.focused]:[],[_ge.outside]:[],[_ge.disabled]:[],[_ge.hidden]:[],[_ge.today]:[]},g={};for(const u of e){const{date:e,displayMonth:p}=u,k=Boolean(p&&!d(e,p)),b=Boolean(v&&h(e,v)),w=Boolean(m&&f(e,m)),x=Boolean(n&&vbe(e,n,r)),_=Boolean(a&&vbe(e,a,r))||b||w||!i&&!l&&k||i&&!1===l&&k,M=c(e,s??(t.timeZone?Kke.tz(t.timeZone):r.Date?new r.Date:new Date));k&&y.outside.push(u),x&&y.disabled.push(u),_&&y.hidden.push(u),M&&y.today.push(u),o&&Object.keys(o).forEach((t=>{const n=o?.[t];n&&vbe(e,n,r)&&(g[t]?g[t].push(u):g[t]=[u])}))}return e=>{const t={[_ge.focused]:!1,[_ge.disabled]:!1,[_ge.hidden]:!1,[_ge.outside]:!1,[_ge.today]:!1},r={};for(const r in y){const n=y[r];t[r]=n.some((t=>t===e))}for(const t in g)r[t]=g[t].some((t=>t===e));return{...t,...r}}}(z,t,o),{isSelected:H,select:S,selected:Z}=wbe(t,o)??{},{blur:N,focused:q,isFocusTarget:D,moveFocus:B,setFocused:F}=ybe(t,E,V,H??(()=>!1),o),{labelDayButton:T,labelGridcell:W,labelGrid:U,labelMonthDropdown:G,labelNav:$,labelWeekday:Y,labelWeekNumber:K,labelWeekNumberHeader:X,labelYearDropdown:Q}=a,J=e.useMemo((()=>function(e,t,r){const n=r?Kke.tz(r):e.Date?new e.Date:new Date,a=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const r=e.addDays(a,t);o.push(r)}return o}(o,t.ISOWeek,t.timeZone)),[o,t.ISOWeek,t.timeZone]),ee=void 0!==c||void 0!==u,te=e.useCallback((()=>{A&&(I(A),y?.(A))}),[A,I,y]),re=e.useCallback((()=>{L&&(I(L),m?.(L))}),[I,L,m]),ne=e.useCallback(((e,t)=>r=>{r.preventDefault(),r.stopPropagation(),F(e),S?.(e.date,t,r),u?.(e.date,t,r)}),[S,u,F]),ae=e.useCallback(((e,t)=>r=>{F(e),h?.(e.date,t,r)}),[h,F]),oe=e.useCallback(((e,t)=>r=>{N(),d?.(e.date,t,r)}),[N,d]),le=e.useCallback(((e,r)=>n=>{const a={ArrowLeft:["day","rtl"===t.dir?"after":"before"],ArrowRight:["day","rtl"===t.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(a[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=a[n.key];B(e,t)}p?.(e.date,r,n)}),[B,p,t.dir]),ie=e.useCallback(((e,t)=>r=>{f?.(e.date,t,r)}),[f]),se=e.useCallback(((e,t)=>r=>{v?.(e.date,t,r)}),[v]),ce=e.useCallback((e=>t=>{const r=Number(t.target.value),n=o.setMonth(o.startOfMonth(e),r);I(n)}),[o,I]),de=e.useCallback((e=>t=>{const r=Number(t.target.value),n=o.setYear(o.startOfMonth(e),r);I(n)}),[o,I]),{className:ue,style:he}=e.useMemo((()=>({className:[i[xge.Root],t.className].filter(Boolean).join(" "),style:{...k?.[xge.Root],...t.style}})),[i,t.className,t.style,k]),pe=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach((([e,r])=>{e.startsWith("data-")&&(t[e]=r)})),t}(t),fe={dayPickerProps:t,selected:Z,select:S,isSelected:H,months:C,nextMonth:L,previousMonth:A,goToMonth:I,getModifiers:V,components:r,classNames:i,styles:k,labels:a,formatters:n};return e.createElement(Rke.Provider,{value:fe},e.createElement(r.Root,{className:ue,style:he,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...pe},e.createElement(r.Months,{className:i[xge.Months],style:k?.[xge.Months]},!t.hideNavigation&&e.createElement(r.Nav,{className:i[xge.Nav],style:k?.[xge.Nav],"aria-label":$(),onPreviousClick:te,onNextClick:re,previousMonth:A,nextMonth:L}),C.map(((a,d)=>{const u=function(e,t,r,n,a){if(!t)return;if(!r)return;const{addMonths:o,startOfMonth:l}=a,i=e.getFullYear(),s=[];let c=t;for(;s.length<12;)s.push(c.getMonth()),c=o(c,1);const d=s.sort(((e,t)=>e-t)).map((e=>{const o=n.formatMonthDropdown(e,a.options.locale??Qge),s=a.Date?new a.Date(i,e):new Date(i,e);return{value:e,label:o,disabled:t&&s<l(t)||r&&s>l(r)||!1}}));return d}(a.date,P,R,n,o),h=function(e,t,r,n){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:o,addYears:l,isBefore:i,isSameYear:s}=n,c=a(e),d=o(t),u=[];let h=c;for(;i(h,d)||s(h,d);)u.push(h.getFullYear()),h=l(h,1);return u.map((e=>({value:e,label:r.formatYearDropdown(e),disabled:!1})))}(P,R,n,o);return e.createElement(r.Month,{className:i[xge.Month],style:k?.[xge.Month],key:d,displayIndex:d,calendarMonth:a},e.createElement(r.MonthCaption,{className:i[xge.MonthCaption],style:k?.[xge.MonthCaption],calendarMonth:a,displayIndex:d},s?.startsWith("dropdown")?e.createElement(r.DropdownNav,{className:i[xge.Dropdowns],style:k?.[xge.Dropdowns]},"dropdown"===s||"dropdown-months"===s?e.createElement(r.MonthsDropdown,{className:i[xge.MonthsDropdown],"aria-label":G(),classNames:i,components:r,disabled:Boolean(t.disableNavigation),onChange:ce(a.date),options:u,style:k?.[xge.Dropdown],value:a.date.getMonth()}):e.createElement("span",{role:"status","aria-live":"polite"},x(a.date.getMonth(),l)),"dropdown"===s||"dropdown-years"===s?e.createElement(r.YearsDropdown,{className:i[xge.YearsDropdown],"aria-label":Q(o.options),classNames:i,components:r,disabled:Boolean(t.disableNavigation),onChange:de(a.date),options:h,style:k?.[xge.Dropdown],value:a.date.getFullYear()}):e.createElement("span",{role:"status","aria-live":"polite"},O(a.date.getFullYear()))):e.createElement(r.CaptionLabel,{className:i[xge.CaptionLabel],role:"status","aria-live":"polite"},b(a.date,o.options,o))),e.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===c||"range"===c,"aria-label":U(a.date,o.options,o)||void 0,className:i[xge.MonthGrid],style:k?.[xge.MonthGrid]},!t.hideWeekdays&&e.createElement(r.Weekdays,{className:i[xge.Weekdays],style:k?.[xge.Weekdays]},g&&e.createElement(r.WeekNumberHeader,{"aria-label":X(o.options),className:i[xge.WeekNumberHeader],style:k?.[xge.WeekNumberHeader],scope:"col"},M()),J.map(((t,n)=>e.createElement(r.Weekday,{"aria-label":Y(t,o.options,o),className:i[xge.Weekday],key:n,style:k?.[xge.Weekday],scope:"col"},j(t,o.options,o))))),e.createElement(r.Weeks,{className:i[xge.Weeks],style:k?.[xge.Weeks]},a.weeks.map(((n,a)=>e.createElement(r.Week,{className:i[xge.Week],key:n.weekNumber,style:k?.[xge.Week],week:n},g&&e.createElement(r.WeekNumber,{week:n,style:k?.[xge.WeekNumber],"aria-label":K(n.weekNumber,{locale:l}),className:i[xge.WeekNumber],scope:"row",role:"rowheader"},_(n.weekNumber)),n.days.map((n=>{const{date:a}=n,l=V(n);if(l[_ge.focused]=!l.hidden&&Boolean(q?.isEqualTo(n)),l[Mge.selected]=!l.disabled&&(H?.(a)||l.selected),dbe(Z)){const{from:e,to:t}=Z;l[Mge.range_start]=Boolean(e&&t&&o.isSameDay(a,e)),l[Mge.range_end]=Boolean(e&&t&&o.isSameDay(a,t)),l[Mge.range_middle]=sbe(Z,a,!0,o)}const s=function(e,t={},r={}){let n={...t?.[xge.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{n={...n,...r?.[e]}})),n}(l,k,t.modifiersStyles),c=function(e,t,r={}){const n=Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[n])=>(r[n]?e.push(r[n]):t[_ge[n]]?e.push(t[_ge[n]]):t[Mge[n]]&&e.push(t[Mge[n]]),e)),[t[xge.Day]]);return n}(l,i,t.modifiersClassNames),d=ee||l.hidden?void 0:W(a,l,o.options,o);return e.createElement(r.Day,{key:`${o.format(a,"yyyy-MM-dd")}_${o.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:l,className:c.join(" "),style:s,role:"gridcell","aria-selected":l.selected||void 0,"aria-label":d,"data-day":o.format(a,"yyyy-MM-dd"),"data-month":n.outside?o.format(a,"yyyy-MM"):void 0,"data-selected":l.selected||void 0,"data-disabled":l.disabled||void 0,"data-hidden":l.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":l.focused||void 0,"data-today":l.today||void 0},!l.hidden&&ee?e.createElement(r.DayButton,{className:i[xge.DayButton],style:k?.[xge.DayButton],type:"button",day:n,modifiers:l,disabled:l.disabled||void 0,tabIndex:D(n)?0:-1,"aria-label":T(a,l,o.options,o),onClick:ne(n,l),onBlur:oe(n,l),onFocus:ae(n,l),onKeyDown:le(n,l),onMouseEnter:ie(n,l),onMouseLeave:se(n,l)},w(a,o.options,o)):!l.hidden&&w(n.date,o.options,o))}))))))))}))),t.footer&&e.createElement(r.Footer,{className:i[xge.Footer],style:k?.[xge.Footer],role:"status","aria-live":"polite"},t.footer)))}function _be(e){var{className:r,classNames:n,showOutsideDays:a=!0}=e,o=o_(e,["className","classNames","showOutsideDays"]);const l=Vke();return t.jsx(xbe,Object.assign({showOutsideDays:a,captionLayout:"dropdown-years"},o,{className:s_("bg-bg-bg1 text-common-black border-bg-bg1",r),classNames:Object.assign(Object.assign(Object.assign({},l),{day_button:s_(l.day_button,"size-9"),day:"typography-subtitle1 ",today:"text-bold text-common-black [&_button]:rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",selected:"bg-primary !text-state-primary-text-solid rounded-full ",weekdays:"text-gray-400",month_caption:s_(l.month_caption,"h-[54px]"),outside:"text-gray-400",nav:s_(l.nav,"gap-6 absolute flex right-0"),chevron:"fill-primary",root:s_(l.root,"px-6 py-4"),caption_label:s_(l.caption_label,"gap-2 flex items-center"),months:"flex flex-col relative",disabled:"[&_button]:rounded-full [&_button]:!text-input-disable-text"}),n),styles:{caption_label:{zIndex:1,position:"relative",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",border:0},dropdown:{zIndex:2,opacity:0,WebkitAppearance:"none",MozAppearance:"none",appearance:"none",position:"absolute",insetBlockStart:0,insetBlockEnd:0,insetInlineStart:0,width:"100%",margin:0,padding:0,cursor:"inherit",border:"none",lineHeight:"inherit"},dropdowns:{position:"relative",display:"inline-flex",alignItems:"center",gap:4},dropdown_root:{position:"relative",display:"inline-flex",alignItems:"center"}}}))}_be.displayName="Calendar";var Mbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,r)=>{const n=l.forwardRef(((e,n)=>{const{asChild:a,...o}=e,l=a?bye:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(l,{...o,ref:n})}));return n.displayName=`Primitive.${r}`,{...e,[r]:n}}),{});function jbe(e,t=globalThis?.document){const r=fye(e);l.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[r,t])}var Obe,Ebe="dismissableLayer.update",zbe="dismissableLayer.pointerDownOutside",Cbe="dismissableLayer.focusOutside",Pbe=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rbe=l.forwardRef(((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...d}=e,u=l.useContext(Pbe),[h,p]=l.useState(null),f=h?.ownerDocument??globalThis?.document,[,v]=l.useState({}),m=dye(r,(e=>p(e))),y=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),k=y.indexOf(g),b=h?y.indexOf(h):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=k,_=function(e,t=globalThis?.document){const r=fye(e),n=l.useRef(!1),a=l.useRef((()=>{}));return l.useEffect((()=>{const e=e=>{if(e.target&&!n.current){let n=function(){Lbe(zbe,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,r]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,r=[...u.branches].some((e=>e.contains(t)));x&&!r&&(o?.(e),s?.(e),e.defaultPrevented||c?.())}),f),M=function(e,t=globalThis?.document){const r=fye(e),n=l.useRef(!1);return l.useEffect((()=>{const e=e=>{if(e.target&&!n.current){Lbe(Cbe,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(i?.(e),s?.(e),e.defaultPrevented||c?.())}),f);return jbe((e=>{b===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),f),l.useEffect((()=>{if(h)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Obe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Abe(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Obe)}}),[h,f,n,u]),l.useEffect((()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Abe())}),[h,u]),l.useEffect((()=>{const e=()=>v({});return document.addEventListener(Ebe,e),()=>document.removeEventListener(Ebe,e)}),[]),t.jsx(Mbe.div,{...d,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:pye(e.onFocusCapture,M.onFocusCapture),onBlurCapture:pye(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:pye(e.onPointerDownCapture,_.onPointerDownCapture)})}));Rbe.displayName="DismissableLayer";function Abe(){const e=new CustomEvent(Ebe);document.dispatchEvent(e)}function Lbe(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?function(e,t){e&&i.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}l.forwardRef(((e,r)=>{const n=l.useContext(Pbe),a=l.useRef(null),o=dye(r,a);return l.useEffect((()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),t.jsx(Mbe.div,{...e,ref:o})})).displayName="DismissableLayerBranch";var Ibe=0;function Vbe(){l.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Hbe()),document.body.insertAdjacentElement("beforeend",e[1]??Hbe()),Ibe++,()=>{1===Ibe&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ibe--}}),[])}function Hbe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Sbe="focusScope.autoFocusOnMount",Zbe="focusScope.autoFocusOnUnmount",Nbe={bubbles:!1,cancelable:!0},qbe=l.forwardRef(((e,r)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[c,d]=l.useState(null),u=fye(o),h=fye(i),p=l.useRef(null),f=dye(r,(e=>d(e))),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect((()=>{if(a){let e=function(e){if(v.paused||!c)return;const t=e.target;c.contains(t)?p.current=t:Tbe(p.current,{select:!0})},t=function(e){if(v.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||Tbe(p.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Tbe(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}}),[a,c,v.paused]),l.useEffect((()=>{if(c){Wbe.add(v);const t=document.activeElement;if(!c.contains(t)){const r=new CustomEvent(Sbe,Nbe);c.addEventListener(Sbe,u),c.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Tbe(n,{select:t}),document.activeElement!==r)return}((e=Dbe(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Tbe(c))}return()=>{c.removeEventListener(Sbe,u),setTimeout((()=>{const e=new CustomEvent(Zbe,Nbe);c.addEventListener(Zbe,h),c.dispatchEvent(e),e.defaultPrevented||Tbe(t??document.body,{select:!0}),c.removeEventListener(Zbe,h),Wbe.remove(v)}),0)}}var e}),[c,u,h,v]);const m=l.useCallback((e=>{if(!n&&!a)return;if(v.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[a,o]=function(e){const t=Dbe(e),r=Bbe(t,e),n=Bbe(t.reverse(),e);return[r,n]}(t);a&&o?e.shiftKey||r!==o?e.shiftKey&&r===a&&(e.preventDefault(),n&&Tbe(o,{select:!0})):(e.preventDefault(),n&&Tbe(a,{select:!0})):r===t&&e.preventDefault()}}),[n,a,v.paused]);return t.jsx(Mbe.div,{tabIndex:-1,...s,ref:f,onKeyDown:m})}));function Dbe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Bbe(e,t){for(const r of e)if(!Fbe(r,{upTo:t}))return r}function Fbe(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Tbe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}qbe.displayName="FocusScope";var Wbe=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Ube(e,t),e.unshift(t)},remove(t){e=Ube(e,t),e[0]?.resume()}}}();function Ube(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Gbe=l["useId".toString()]||(()=>{}),$be=0;function Ybe(e){const[t,r]=l.useState(Gbe());return Jme((()=>{e||r((e=>e??String($be++)))}),[e]),e||(t?`radix-${t}`:"")}const Kbe=["top","right","bottom","left"],Xbe=Math.min,Qbe=Math.max,Jbe=Math.round,ewe=Math.floor,twe=e=>({x:e,y:e}),rwe={left:"right",right:"left",bottom:"top",top:"bottom"},nwe={start:"end",end:"start"};function awe(e,t,r){return Qbe(e,Xbe(t,r))}function owe(e,t){return"function"==typeof e?e(t):e}function lwe(e){return e.split("-")[0]}function iwe(e){return e.split("-")[1]}function swe(e){return"x"===e?"y":"x"}function cwe(e){return"y"===e?"height":"width"}function dwe(e){return["top","bottom"].includes(lwe(e))?"y":"x"}function uwe(e){return swe(dwe(e))}function hwe(e){return e.replace(/start|end/g,(e=>nwe[e]))}function pwe(e){return e.replace(/left|right|bottom|top/g,(e=>rwe[e]))}function fwe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function vwe(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function mwe(e,t,r){let{reference:n,floating:a}=e;const o=dwe(t),l=uwe(t),i=cwe(l),s=lwe(t),c="y"===o,d=n.x+n.width/2-a.width/2,u=n.y+n.height/2-a.height/2,h=n[i]/2-a[i]/2;let p;switch(s){case"top":p={x:d,y:n.y-a.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-a.width,y:u};break;default:p={x:n.x,y:n.y}}switch(iwe(t)){case"start":p[l]-=h*(r&&c?-1:1);break;case"end":p[l]+=h*(r&&c?-1:1)}return p}async function ywe(e,t){var r;void 0===t&&(t={});const{x:n,y:a,platform:o,rects:l,elements:i,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=owe(t,e),f=fwe(p),v=i[h?"floating"===u?"reference":"floating":u],m=vwe(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(v)))||r?v:v.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:s})),y="floating"===u?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(i.floating)),k=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},b=vwe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:g,strategy:s}):y);return{top:(m.top-b.top+f.top)/k.y,bottom:(b.bottom-m.bottom+f.bottom)/k.y,left:(m.left-b.left+f.left)/k.x,right:(b.right-m.right+f.right)/k.x}}function gwe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kwe(e){return Kbe.some((t=>e[t]>=0))}function bwe(){return"undefined"!=typeof window}function wwe(e){return Mwe(e)?(e.nodeName||"").toLowerCase():"#document"}function xwe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _we(e){var t;return null==(t=(Mwe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Mwe(e){return!!bwe()&&(e instanceof Node||e instanceof xwe(e).Node)}function jwe(e){return!!bwe()&&(e instanceof Element||e instanceof xwe(e).Element)}function Owe(e){return!!bwe()&&(e instanceof HTMLElement||e instanceof xwe(e).HTMLElement)}function Ewe(e){return!(!bwe()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof xwe(e).ShadowRoot)}function zwe(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Iwe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function Cwe(e){return["table","td","th"].includes(wwe(e))}function Pwe(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rwe(e){const t=Awe(),r=jwe(e)?Iwe(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function Awe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Lwe(e){return["html","body","#document"].includes(wwe(e))}function Iwe(e){return xwe(e).getComputedStyle(e)}function Vwe(e){return jwe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hwe(e){if("html"===wwe(e))return e;const t=e.assignedSlot||e.parentNode||Ewe(e)&&e.host||_we(e);return Ewe(t)?t.host:t}function Swe(e){const t=Hwe(e);return Lwe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Owe(t)&&zwe(t)?t:Swe(t)}function Zwe(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const a=Swe(e),o=a===(null==(n=e.ownerDocument)?void 0:n.body),l=xwe(a);if(o){const e=Nwe(l);return t.concat(l,l.visualViewport||[],zwe(a)?a:[],e&&r?Zwe(e):[])}return t.concat(a,Zwe(a,[],r))}function Nwe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qwe(e){const t=Iwe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Owe(e),o=a?e.offsetWidth:r,l=a?e.offsetHeight:n,i=Jbe(r)!==o||Jbe(n)!==l;return i&&(r=o,n=l),{width:r,height:n,$:i}}function Dwe(e){return jwe(e)?e:e.contextElement}function Bwe(e){const t=Dwe(e);if(!Owe(t))return twe(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:o}=qwe(t);let l=(o?Jbe(r.width):r.width)/n,i=(o?Jbe(r.height):r.height)/a;return l&&Number.isFinite(l)||(l=1),i&&Number.isFinite(i)||(i=1),{x:l,y:i}}const Fwe=twe(0);function Twe(e){const t=xwe(e);return Awe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fwe}function Wwe(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const a=e.getBoundingClientRect(),o=Dwe(e);let l=twe(1);t&&(n?jwe(n)&&(l=Bwe(n)):l=Bwe(e));const i=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==xwe(e))&&t}(o,r,n)?Twe(o):twe(0);let s=(a.left+i.x)/l.x,c=(a.top+i.y)/l.y,d=a.width/l.x,u=a.height/l.y;if(o){const e=xwe(o),t=n&&jwe(n)?xwe(n):n;let r=e,a=Nwe(r);for(;a&&n&&t!==r;){const e=Bwe(a),t=a.getBoundingClientRect(),n=Iwe(a),o=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=l,r=xwe(a),a=Nwe(r)}}return vwe({width:d,height:u,x:s,y:c})}function Uwe(e,t){const r=Vwe(e).scrollLeft;return t?t.left+r:Wwe(_we(e)).left+r}function Gwe(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Uwe(e,n)),y:n.top+t.scrollTop}}function $we(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=xwe(e),n=_we(e),a=r.visualViewport;let o=n.clientWidth,l=n.clientHeight,i=0,s=0;if(a){o=a.width,l=a.height;const e=Awe();(!e||e&&"fixed"===t)&&(i=a.offsetLeft,s=a.offsetTop)}return{width:o,height:l,x:i,y:s}}(e,r);else if("document"===t)n=function(e){const t=_we(e),r=Vwe(e),n=e.ownerDocument.body,a=Qbe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Qbe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Uwe(e);const i=-r.scrollTop;return"rtl"===Iwe(n).direction&&(l+=Qbe(t.clientWidth,n.clientWidth)-a),{width:a,height:o,x:l,y:i}}(_we(e));else if(jwe(t))n=function(e,t){const r=Wwe(e,!0,"fixed"===t),n=r.top+e.clientTop,a=r.left+e.clientLeft,o=Owe(e)?Bwe(e):twe(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:n*o.y}}(t,r);else{const r=Twe(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vwe(n)}function Ywe(e,t){const r=Hwe(e);return!(r===t||!jwe(r)||Lwe(r))&&("fixed"===Iwe(r).position||Ywe(r,t))}function Kwe(e,t,r){const n=Owe(t),a=_we(t),o="fixed"===r,l=Wwe(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const s=twe(0);if(n||!n&&!o)if(("body"!==wwe(t)||zwe(a))&&(i=Vwe(t)),n){const e=Wwe(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Uwe(a));const c=!a||n||o?twe(0):Gwe(a,i);return{x:l.left+i.scrollLeft-s.x-c.x,y:l.top+i.scrollTop-s.y-c.y,width:l.width,height:l.height}}function Xwe(e){return"static"===Iwe(e).position}function Qwe(e,t){if(!Owe(e)||"fixed"===Iwe(e).position)return null;if(t)return t(e);let r=e.offsetParent;return _we(e)===r&&(r=r.ownerDocument.body),r}function Jwe(e,t){const r=xwe(e);if(Pwe(e))return r;if(!Owe(e)){let t=Hwe(e);for(;t&&!Lwe(t);){if(jwe(t)&&!Xwe(t))return t;t=Hwe(t)}return r}let n=Qwe(e,t);for(;n&&Cwe(n)&&Xwe(n);)n=Qwe(n,t);return n&&Lwe(n)&&Xwe(n)&&!Rwe(n)?r:n||function(e){let t=Hwe(e);for(;Owe(t)&&!Lwe(t);){if(Rwe(t))return t;if(Pwe(t))return null;t=Hwe(t)}return null}(e)||r}const exe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const o="fixed"===a,l=_we(n),i=!!t&&Pwe(t.floating);if(n===l||i&&o)return r;let s={scrollLeft:0,scrollTop:0},c=twe(1);const d=twe(0),u=Owe(n);if((u||!u&&!o)&&(("body"!==wwe(n)||zwe(l))&&(s=Vwe(n)),Owe(n))){const e=Wwe(n);c=Bwe(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const h=!l||u||o?twe(0):Gwe(l,s,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-s.scrollLeft*c.x+d.x+h.x,y:r.y*c.y-s.scrollTop*c.y+d.y+h.y}},getDocumentElement:_we,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[..."clippingAncestors"===r?Pwe(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Zwe(e,[],!1).filter((e=>jwe(e)&&"body"!==wwe(e))),a=null;const o="fixed"===Iwe(e).position;let l=o?Hwe(e):e;for(;jwe(l)&&!Lwe(l);){const t=Iwe(l),r=Rwe(l);r||"fixed"!==t.position||(a=null),(o?!r&&!a:!r&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||zwe(l)&&!r&&Ywe(e,l))?n=n.filter((e=>e!==l)):a=t,l=Hwe(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=o[0],i=o.reduce(((e,r)=>{const n=$we(t,r,a);return e.top=Qbe(n.top,e.top),e.right=Xbe(n.right,e.right),e.bottom=Xbe(n.bottom,e.bottom),e.left=Qbe(n.left,e.left),e}),$we(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:Jwe,getElementRects:async function(e){const t=this.getOffsetParent||Jwe,r=this.getDimensions,n=await r(e.floating);return{reference:Kwe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=qwe(e);return{width:t,height:r}},getScale:Bwe,isElement:jwe,isRTL:function(e){return"rtl"===Iwe(e).direction}};function txe(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Dwe(e),d=a||o?[...c?Zwe(c):[],...Zwe(t)]:[];d.forEach((e=>{a&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const u=c&&i?function(e,t){let r,n=null;const a=_we(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function l(i,s){void 0===i&&(i=!1),void 0===s&&(s=1),o();const{left:c,top:d,width:u,height:h}=e.getBoundingClientRect();if(i||t(),!u||!h)return;const p={rootMargin:-ewe(d)+"px "+-ewe(a.clientWidth-(c+u))+"px "+-ewe(a.clientHeight-(d+h))+"px "+-ewe(c)+"px",threshold:Qbe(0,Xbe(1,s))||1};let f=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!f)return l();t?l(!1,t):r=setTimeout((()=>{l(!1,1e-7)}),1e3)}f=!1}try{n=new IntersectionObserver(v,{...p,root:a.ownerDocument})}catch(e){n=new IntersectionObserver(v,p)}n.observe(e)}(!0),o}(c,r):null;let h,p=-1,f=null;l&&(f=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),r()})),c&&!s&&f.observe(c),f.observe(t));let v=s?Wwe(e):null;return s&&function t(){const n=Wwe(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||r();v=n,h=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach((e=>{a&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const rxe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:o,placement:l,middlewareData:i}=t,s=await async function(e,t){const{placement:r,platform:n,elements:a}=e,o=await(null==n.isRTL?void 0:n.isRTL(a.floating)),l=lwe(r),i=iwe(r),s="y"===dwe(r),c=["left","top"].includes(l)?-1:1,d=o&&s?-1:1,u=owe(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof f&&(p="end"===i?-1*f:f),s?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return l===(null==(r=i.offset)?void 0:r.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:a+s.x,y:o+s.y,data:{...s,placement:l}}}}},nxe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=owe(e,t),c={x:r,y:n},d=await ywe(t,s),u=dwe(lwe(a)),h=swe(u);let p=c[h],f=c[u];if(o){const e="y"===h?"bottom":"right";p=awe(p+d["y"===h?"top":"left"],p,p-d[e])}if(l){const e="y"===u?"bottom":"right";f=awe(f+d["y"===u?"top":"left"],f,f-d[e])}const v=i.fn({...t,[h]:p,[u]:f});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[h]:o,[u]:l}}}}}},axe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:o,rects:l,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...m}=owe(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const y=lwe(a),g=dwe(i),k=lwe(i)===i,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=h||(k||!v?[pwe(i)]:function(e){const t=pwe(e);return[hwe(e),t,hwe(t)]}(i)),x="none"!==f;!h&&x&&w.push(...function(e,t,r,n){const a=iwe(e);let o=function(e,t,r){const n=["left","right"],a=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?o:l;default:return[]}}(lwe(e),"start"===r,n);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(hwe)))),o}(i,v,f,b));const _=[i,...w],M=await ywe(t,m),j=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&j.push(M[y]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=iwe(e),a=uwe(e),o=cwe(a);let l="x"===a?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=pwe(l)),[l,pwe(l)]}(a,l,b);j.push(M[e[0]],M[e[1]])}if(O=[...O,{placement:a,overflows:j}],!j.every((e=>e<=0))){var E,z;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let r=null==(z=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:z.placement;if(!r)switch(p){case"bestFit":{var C;const e=null==(C=O.filter((e=>{if(x){const t=dwe(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(r=e);break}case"initialPlacement":r=i}if(a!==r)return{reset:{placement:r}}}return{}}}},oxe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:o,platform:l,elements:i}=t,{apply:s=()=>{},...c}=owe(e,t),d=await ywe(t,c),u=lwe(a),h=iwe(a),p="y"===dwe(a),{width:f,height:v}=o.floating;let m,y;"top"===u||"bottom"===u?(m=u,y=h===(await(null==l.isRTL?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m="end"===h?"top":"bottom");const g=v-d.top-d.bottom,k=f-d.left-d.right,b=Xbe(v-d[m],g),w=Xbe(f-d[y],k),x=!t.middlewareData.shift;let _=b,M=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(M=k),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(_=g),x&&!h){const e=Qbe(d.left,0),t=Qbe(d.right,0),r=Qbe(d.top,0),n=Qbe(d.bottom,0);p?M=f-2*(0!==e||0!==t?e+t:Qbe(d.left,d.right)):_=v-2*(0!==r||0!==n?r+n:Qbe(d.top,d.bottom))}await s({...t,availableWidth:M,availableHeight:_});const j=await l.getDimensions(i.floating);return f!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}},lxe=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=owe(e,t);switch(n){case"referenceHidden":{const e=gwe(await ywe(t,{...a,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:kwe(e)}}}case"escaped":{const e=gwe(await ywe(t,{...a,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:kwe(e)}}}default:return{}}}}},ixe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:o,platform:l,elements:i,middlewareData:s}=t,{element:c,padding:d=0}=owe(e,t)||{};if(null==c)return{};const u=fwe(d),h={x:r,y:n},p=uwe(a),f=cwe(p),v=await l.getDimensions(c),m="y"===p,y=m?"top":"left",g=m?"bottom":"right",k=m?"clientHeight":"clientWidth",b=o.reference[f]+o.reference[p]-h[p]-o.floating[f],w=h[p]-o.reference[p],x=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let _=x?x[k]:0;_&&await(null==l.isElement?void 0:l.isElement(x))||(_=i.floating[k]||o.floating[f]);const M=b/2-w/2,j=_/2-v[f]/2-1,O=Xbe(u[y],j),E=Xbe(u[g],j),z=O,C=_-v[f]-E,P=_/2-v[f]/2+M,R=awe(z,P,C),A=!s.arrow&&null!=iwe(a)&&P!==R&&o.reference[f]/2-(P<z?O:E)-v[f]/2<0,L=A?P<z?P-z:P-C:0;return{[p]:h[p]+L,data:{[p]:R,centerOffset:P-R-L,...A&&{alignmentOffset:L}},reset:A}}}),sxe=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:o,middlewareData:l}=t,{offset:i=0,mainAxis:s=!0,crossAxis:c=!0}=owe(e,t),d={x:r,y:n},u=dwe(a),h=swe(u);let p=d[h],f=d[u];const v=owe(i,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===h?"height":"width",t=o.reference[h]-o.floating[e]+m.mainAxis,r=o.reference[h]+o.reference[e]-m.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var y,g;const e="y"===h?"width":"height",t=["top","left"].includes(lwe(a)),r=o.reference[u]-o.floating[e]+(t&&(null==(y=l.offset)?void 0:y[u])||0)+(t?0:m.crossAxis),n=o.reference[u]+o.reference[e]+(t?0:(null==(g=l.offset)?void 0:g[u])||0)-(t?m.crossAxis:0);f<r?f=r:f>n&&(f=n)}return{[h]:p,[u]:f}}}},cxe=(e,t,r)=>{const n=new Map,a={platform:exe,...r},o={...a.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:l}=r,i=o.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:u}=mwe(c,n,s),h=n,p={},f=0;for(let r=0;r<i.length;r++){const{name:o,fn:v}=i[r],{x:m,y:y,data:g,reset:k}=await v({x:d,y:u,initialPlacement:n,placement:h,strategy:a,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=y?y:u,p={...p,[o]:{...p[o],...g}},k&&f<=50&&(f++,"object"==typeof k&&(k.placement&&(h=k.placement),k.rects&&(c=!0===k.rects?await l.getElementRects({reference:e,floating:t,strategy:a}):k.rects),({x:d,y:u}=mwe(c,h,s))),r=-1)}return{x:d,y:u,placement:h,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})};var dxe="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function uxe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!uxe(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;0!=n--;){const r=a[n];if(("_owner"!==r||!e.$$typeof)&&!uxe(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function hxe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pxe(e,t){const r=hxe(e);return Math.round(t*r)/r}function fxe(e){const t=l.useRef(e);return dxe((()=>{t.current=e})),t}function vxe(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[h,p]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=l.useState(n);uxe(f,n)||v(n);const[m,y]=l.useState(null),[g,k]=l.useState(null),b=l.useCallback((e=>{e!==M.current&&(M.current=e,y(e))}),[]),w=l.useCallback((e=>{e!==j.current&&(j.current=e,k(e))}),[]),x=o||m,_=s||g,M=l.useRef(null),j=l.useRef(null),O=l.useRef(h),E=null!=d,z=fxe(d),C=fxe(a),P=fxe(u),R=l.useCallback((()=>{if(!M.current||!j.current)return;const e={placement:t,strategy:r,middleware:f};C.current&&(e.platform=C.current),cxe(M.current,j.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!uxe(O.current,t)&&(O.current=t,i.flushSync((()=>{p(t)})))}))}),[f,t,r,C,P]);dxe((()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const A=l.useRef(!1);dxe((()=>(A.current=!0,()=>{A.current=!1})),[]),dxe((()=>{if(x&&(M.current=x),_&&(j.current=_),x&&_){if(z.current)return z.current(x,_,R);R()}}),[x,_,R,z,E]);const L=l.useMemo((()=>({reference:M,floating:j,setReference:b,setFloating:w})),[b,w]),I=l.useMemo((()=>({reference:x,floating:_})),[x,_]),V=l.useMemo((()=>{const e={position:r,left:0,top:0};if(!I.floating)return e;const t=pxe(I.floating,h.x),n=pxe(I.floating,h.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...hxe(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,I.floating,h.x,h.y]);return l.useMemo((()=>({...h,update:R,refs:L,elements:I,floatingStyles:V})),[h,R,L,I,V])}const mxe=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(a=r,{}.hasOwnProperty.call(a,"current"))?null!=r.current?ixe({element:r.current,padding:n}).fn(t):{}:r?ixe({element:r,padding:n}).fn(t):{};var a}}),yxe=(e,t)=>({...rxe(e),options:[e,t]}),gxe=(e,t)=>({...nxe(e),options:[e,t]}),kxe=(e,t)=>({...sxe(e),options:[e,t]}),bxe=(e,t)=>({...axe(e),options:[e,t]}),wxe=(e,t)=>({...oxe(e),options:[e,t]}),xxe=(e,t)=>({...lxe(e),options:[e,t]}),_xe=(e,t)=>({...mxe(e),options:[e,t]});var Mxe=l.forwardRef(((e,r)=>{const{children:n,width:a=10,height:o=5,...l}=e;return t.jsx(Mbe.svg,{...l,ref:r,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:t.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Mxe.displayName="Arrow";var jxe=Mxe;function Oxe(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const n=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return l.useMemo((()=>({[`__scope${t.scopeName}`]:n})),[n])}};return r.scopeName=t.scopeName,r}var Exe="Popper",[zxe,Cxe]=function(e,r=[]){let n=[];const a=()=>{const t=n.map((e=>l.createContext(e)));return function(r){const n=r?.[e]||t;return l.useMemo((()=>({[`__scope${e}`]:{...r,[e]:n}})),[r,n])}};return a.scopeName=e,[function(r,a){const o=l.createContext(a),i=n.length;function s(r){const{scope:n,children:a,...s}=r,c=n?.[e][i]||o,d=l.useMemo((()=>s),Object.values(s));return t.jsx(c.Provider,{value:d,children:a})}return n=[...n,a],s.displayName=r+"Provider",[s,function(t,n){const s=n?.[e][i]||o,c=l.useContext(s);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${t}\` must be used within \`${r}\``)}]},Oxe(a,...r)]}(Exe),[Pxe,Rxe]=zxe(Exe),Axe=e=>{const{__scopePopper:r,children:n}=e,[a,o]=l.useState(null);return t.jsx(Pxe,{scope:r,anchor:a,onAnchorChange:o,children:n})};Axe.displayName=Exe;var Lxe="PopperAnchor",Ixe=l.forwardRef(((e,r)=>{const{__scopePopper:n,virtualRef:a,...o}=e,i=Rxe(Lxe,n),s=l.useRef(null),c=dye(r,s);return l.useEffect((()=>{i.onAnchorChange(a?.current||s.current)})),a?null:t.jsx(Mbe.div,{...o,ref:c})}));Ixe.displayName=Lxe;var Vxe="PopperContent",[Hxe,Sxe]=zxe(Vxe),Zxe=l.forwardRef(((e,r)=>{const{__scopePopper:n,side:a="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:v="optimized",onPlaced:m,...y}=e,g=Rxe(Vxe,n),[k,b]=l.useState(null),w=dye(r,(e=>b(e))),[x,_]=l.useState(null),M=yye(x),j=M?.width??0,O=M?.height??0,E=a+("center"!==i?"-"+i:""),z="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},C=Array.isArray(u)?u:[u],P=C.length>0,R={padding:z,boundary:C.filter(Bxe),altBoundary:P},{refs:A,floatingStyles:L,placement:I,isPositioned:V,middlewareData:H}=vxe({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>txe(...e,{animationFrame:"always"===v}),elements:{reference:g.anchor},middleware:[yxe({mainAxis:o+O,alignmentAxis:s}),d&&gxe({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?kxe():void 0,...R}),d&&bxe({...R}),wxe({...R,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:a,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${n}px`),l.setProperty("--radix-popper-anchor-width",`${a}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),x&&_xe({element:x,padding:c}),Fxe({arrowWidth:j,arrowHeight:O}),f&&xxe({strategy:"referenceHidden",...R})]}),[S,Z]=Txe(I),N=fye(m);Jme((()=>{V&&N?.()}),[V,N]);const q=H.arrow?.x,D=H.arrow?.y,B=0!==H.arrow?.centerOffset,[F,T]=l.useState();return Jme((()=>{k&&T(window.getComputedStyle(k).zIndex)}),[k]),t.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:V?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(Hxe,{scope:n,placedSide:S,onArrowChange:_,arrowX:q,arrowY:D,shouldHideArrow:B,children:t.jsx(Mbe.div,{"data-side":S,"data-align":Z,...y,ref:w,style:{...y.style,animation:V?void 0:"none"}})})})}));Zxe.displayName=Vxe;var Nxe="PopperArrow",qxe={top:"bottom",right:"left",bottom:"top",left:"right"},Dxe=l.forwardRef((function(e,r){const{__scopePopper:n,...a}=e,o=Sxe(Nxe,n),l=qxe[o.placedSide];return t.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:t.jsx(jxe,{...a,ref:r,style:{...a.style,display:"block"}})})}));function Bxe(e){return null!==e}Dxe.displayName=Nxe;var Fxe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,l=o?0:e.arrowWidth,i=o?0:e.arrowHeight,[s,c]=Txe(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(a.arrow?.x??0)+l/2,h=(a.arrow?.y??0)+i/2;let p="",f="";return"bottom"===s?(p=o?d:`${u}px`,f=-i+"px"):"top"===s?(p=o?d:`${u}px`,f=`${n.floating.height+i}px`):"right"===s?(p=-i+"px",f=o?d:`${h}px`):"left"===s&&(p=`${n.floating.width+i}px`,f=o?d:`${h}px`),{data:{x:p,y:f}}}});function Txe(e){const[t,r="center"]=e.split("-");return[t,r]}var Wxe=Axe,Uxe=Ixe,Gxe=Zxe,$xe=Dxe,Yxe=l.forwardRef(((e,r)=>{const{container:n,...o}=e,[i,s]=l.useState(!1);Jme((()=>s(!0)),[]);const c=n||i&&globalThis?.document?.body;return c?a.createPortal(t.jsx(Mbe.div,{...o,ref:r}),c):null}));Yxe.displayName="Portal";var Kxe=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),o=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=function(e,t){return l.useReducer(((e,r)=>t[e][r]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect((()=>{const e=Xxe(n.current);o.current="mounted"===s?e:"none"}),[s]),Jme((()=>{const t=n.current,r=a.current;if(r!==e){const n=o.current,l=Xxe(t);if(e)c("MOUNT");else if("none"===l||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==l?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,c]),Jme((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,l=o=>{const l=Xxe(n.current).includes(o.animationName);if(o.target===t&&l&&(c("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},i=e=>{e.target===t&&(o.current=Xxe(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),a="function"==typeof r?r({present:n.isPresent}):l.Children.only(r),o=dye(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||n.isPresent?l.cloneElement(a,{ref:o}):null};function Xxe(e){return e?.animationName||"none"}Kxe.displayName="Presence";var Qxe=new WeakMap,Jxe=new WeakMap,e_e={},t_e=0,r_e=function(e){return e&&(e.host||r_e(e.parentNode))},n_e=function(e,t,r,n){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=r_e(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);e_e[r]||(e_e[r]=new WeakMap);var o=e_e[r],l=[],i=new Set,s=new Set(a),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};a.forEach(c);var d=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,s=(Qxe.get(e)||0)+1,c=(o.get(e)||0)+1;Qxe.set(e,s),o.set(e,c),l.push(e),1===s&&a&&Jxe.set(e,!0),1===c&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return d(t),i.clear(),t_e++,function(){l.forEach((function(e){var t=Qxe.get(e)-1,a=o.get(e)-1;Qxe.set(e,t),o.set(e,a),t||(Jxe.has(e)||e.removeAttribute(n),Jxe.delete(e)),a||e.removeAttribute(r)})),--t_e||(Qxe=new WeakMap,Qxe=new WeakMap,Jxe=new WeakMap,e_e={})}},a_e=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),n_e(n,a,r,"aria-hidden")):function(){return null}},o_e="right-scroll-bar-position",l_e="width-before-scroll-bar";function i_e(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var s_e="undefined"!=typeof window?l.useLayoutEffect:l.useEffect,c_e=new WeakMap;function d_e(t,r){var n,a,o,l=(n=null,a=function(e){return t.forEach((function(t){return i_e(t,e)}))},(o=e.useState((function(){return{value:n,callback:a,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=a,o.facade);return s_e((function(){var e=c_e.get(l);if(e){var r=new Set(e),n=new Set(t),a=l.current;r.forEach((function(e){n.has(e)||i_e(e,null)})),n.forEach((function(e){r.has(e)||i_e(e,a)}))}c_e.set(l,t)}),[t]),l}function u_e(e){return e}var h_e=function(e){var t=e.sideCar,r=o_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return l.createElement(n,a_({},r))};h_e.isSideCarExport=!0;var p_e=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=u_e);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var a=t(e,n);return r.push(a),function(){r=r.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var a=r;r=[],a.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},l=function(){return Promise.resolve().then(o)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}};return a}(null);return t.options=a_({async:!0,ssr:!1},e),t}(),f_e=function(){},v_e=l.forwardRef((function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:f_e,onWheelCapture:f_e,onTouchMoveCapture:f_e}),a=n[0],o=n[1],i=e.forwardProps,s=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,f=e.noIsolation,v=e.inert,m=e.allowPinchZoom,y=e.as,g=void 0===y?"div":y,k=e.gapMode,b=o_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,x=d_e([r,t]),_=a_(a_({},b),a);return l.createElement(l.Fragment,null,u&&l.createElement(w,{sideCar:p_e,removeScrollBar:d,shards:h,noIsolation:f,inert:v,setCallbacks:o,allowPinchZoom:!!m,lockRef:r,gapMode:k}),i?l.cloneElement(l.Children.only(s),a_(a_({},_),{ref:x})):l.createElement(g,a_({},_,{className:c,ref:x}),s))}));v_e.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v_e.classNames={fullWidth:l_e,zeroRight:o_e};function m_e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var y_e=function(){var e=0,t=null;return{add:function(r){0==e&&(t=m_e())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g_e=function(){var e=function(){var e=y_e();return function(t,r){l.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])}}();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},k_e={left:0,top:0,right:0,gap:0},b_e=function(e){return parseInt(e||"",10)||0},w_e=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return k_e;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[b_e(r),b_e(n),b_e(a)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},x_e=g_e(),__e="data-scroll-locked",M_e=function(e,t,r,n){var a=e.left,o=e.top,l=e.right,i=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(i,"px ").concat(n,";\n }\n body[").concat(__e,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(o_e," {\n right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(l_e," {\n margin-right: ").concat(i,"px ").concat(n,";\n }\n \n .").concat(o_e," .").concat(o_e," {\n right: 0 ").concat(n,";\n }\n \n .").concat(l_e," .").concat(l_e," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(__e,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},j_e=function(){var e=parseInt(document.body.getAttribute(__e)||"0",10);return isFinite(e)?e:0},O_e=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;l.useEffect((function(){return document.body.setAttribute(__e,(j_e()+1).toString()),function(){var e=j_e()-1;e<=0?document.body.removeAttribute(__e):document.body.setAttribute(__e,e.toString())}}),[]);var o=l.useMemo((function(){return w_e(a)}),[a]);return l.createElement(x_e,{styles:M_e(o,!t,a,r?"":"!important")})},E_e=!1;if("undefined"!=typeof window)try{var z_e=Object.defineProperty({},"passive",{get:function(){return E_e=!0,!0}});window.addEventListener("test",z_e,z_e),window.removeEventListener("test",z_e,z_e)}catch(e){E_e=!1}var C_e=!!E_e&&{passive:!1},P_e=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},R_e=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),A_e(e,n)){var a=L_e(e,n);if(a[1]>a[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},A_e=function(e,t){return"v"===e?function(e){return P_e(e,"overflowY")}(t):function(e){return P_e(e,"overflowX")}(t)},L_e=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},I_e=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},V_e=function(e){return[e.deltaX,e.deltaY]},H_e=function(e){return e&&"current"in e?e.current:e},S_e=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Z_e=0,N_e=[];function q_e(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var D_e,B_e=(D_e=function(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),a=l.useState(Z_e++)[0],o=l.useState(g_e)[0],i=l.useRef(e);l.useEffect((function(){i.current=e}),[e]),l.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(H_e),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=l.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=I_e(e),l=r.current,s="deltaX"in e?e.deltaX:l[0]-o[0],c="deltaY"in e?e.deltaY:l[1]-o[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=R_e(u,d);if(!h)return!0;if(h?a=u:(a="v"===u?"h":"v",h=R_e(u,d)),!h)return!1;if(!n.current&&"changedTouches"in e&&(s||c)&&(n.current=a),!a)return!0;var p=n.current||a;return function(e,t,r,n,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),l=o*n,i=r.target,s=t.contains(i),c=!1,d=l>0,u=0,h=0;do{var p=L_e(e,i),f=p[0],v=p[1]-p[2]-o*f;(f||v)&&A_e(e,i)&&(u+=v,h+=f),i=i instanceof ShadowRoot?i.host:i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return d&&(Math.abs(u)<1||!a)?c=!0:d||!(Math.abs(h)<1)&&a||(c=!0),c}(p,t,e,"h"===p?s:c,!0)}),[]),c=l.useCallback((function(e){var r=e;if(N_e.length&&N_e[N_e.length-1]===o){var n="deltaY"in r?V_e(r):I_e(r),a=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)}))[0];if(a&&a.should)r.cancelable&&r.preventDefault();else if(!a){var l=(i.current.shards||[]).map(H_e).filter(Boolean).filter((function(e){return e.contains(r.target)}));(l.length>0?s(r,l[0]):!i.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),d=l.useCallback((function(e,r,n,a){var o={name:e,delta:r,target:n,should:a,shadowParent:q_e(n)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=l.useCallback((function(e){r.current=I_e(e),n.current=void 0}),[]),h=l.useCallback((function(t){d(t.type,V_e(t),t.target,s(t,e.lockRef.current))}),[]),p=l.useCallback((function(t){d(t.type,I_e(t),t.target,s(t,e.lockRef.current))}),[]);l.useEffect((function(){return N_e.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,C_e),document.addEventListener("touchmove",c,C_e),document.addEventListener("touchstart",u,C_e),function(){N_e=N_e.filter((function(e){return e!==o})),document.removeEventListener("wheel",c,C_e),document.removeEventListener("touchmove",c,C_e),document.removeEventListener("touchstart",u,C_e)}}),[]);var f=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(o,{styles:S_e(a)}):null,f?l.createElement(O_e,{gapMode:e.gapMode}):null)},p_e.useMedium(D_e),h_e),F_e=l.forwardRef((function(e,t){return l.createElement(v_e,a_({},e,{ref:t,sideCar:B_e}))}));F_e.classNames=v_e.classNames;var T_e="Popover",[W_e,U_e]=uye(T_e,[Cxe]),G_e=Cxe(),[$_e,Y_e]=W_e(T_e),K_e=e=>{const{__scopePopover:r,children:n,open:a,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,c=G_e(r),d=l.useRef(null),[u,h]=l.useState(!1),[p=!1,f]=vye({prop:a,defaultProp:o,onChange:i});return t.jsx(Wxe,{...c,children:t.jsx($_e,{scope:r,contentId:Ybe(),triggerRef:d,open:p,onOpenChange:f,onOpenToggle:l.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback((()=>h(!0)),[]),onCustomAnchorRemove:l.useCallback((()=>h(!1)),[]),modal:s,children:n})})};K_e.displayName=T_e;var X_e="PopoverAnchor";l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=Y_e(X_e,n),i=G_e(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=o;return l.useEffect((()=>(s(),()=>c())),[s,c]),t.jsx(Uxe,{...i,...a,ref:r})})).displayName=X_e;var Q_e="PopoverTrigger",J_e=l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=Y_e(Q_e,n),l=G_e(n),i=dye(r,o.triggerRef),s=t.jsx(Mbe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":dMe(o.open),...a,ref:i,onClick:pye(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:t.jsx(Uxe,{asChild:!0,...l,children:s})}));J_e.displayName=Q_e;var eMe="PopoverPortal",[tMe,rMe]=W_e(eMe,{forceMount:void 0}),nMe=e=>{const{__scopePopover:r,forceMount:n,children:a,container:o}=e,l=Y_e(eMe,r);return t.jsx(tMe,{scope:r,forceMount:n,children:t.jsx(Kxe,{present:n||l.open,children:t.jsx(Yxe,{asChild:!0,container:o,children:a})})})};nMe.displayName=eMe;var aMe="PopoverContent",oMe=l.forwardRef(((e,r)=>{const n=rMe(aMe,e.__scopePopover),{forceMount:a=n.forceMount,...o}=e,l=Y_e(aMe,e.__scopePopover);return t.jsx(Kxe,{present:a||l.open,children:l.modal?t.jsx(lMe,{...o,ref:r}):t.jsx(iMe,{...o,ref:r})})}));oMe.displayName=aMe;var lMe=l.forwardRef(((e,r)=>{const n=Y_e(aMe,e.__scopePopover),a=l.useRef(null),o=dye(r,a),i=l.useRef(!1);return l.useEffect((()=>{const e=a.current;if(e)return a_e(e)}),[]),t.jsx(F_e,{as:bye,allowPinchZoom:!0,children:t.jsx(sMe,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pye(e.onCloseAutoFocus,(e=>{e.preventDefault(),i.current||n.triggerRef.current?.focus()})),onPointerDownOutside:pye(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;i.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:pye(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),iMe=l.forwardRef(((e,r)=>{const n=Y_e(aMe,e.__scopePopover),a=l.useRef(!1),o=l.useRef(!1);return t.jsx(sMe,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||n.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const r=t.target,l=n.triggerRef.current?.contains(r);l&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),sMe=l.forwardRef(((e,r)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...h}=e,p=Y_e(aMe,n),f=G_e(n);return Vbe(),t.jsx(qbe,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:l,children:t.jsx(Rbe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:t.jsx(Gxe,{"data-state":dMe(p.open),role:"dialog",id:p.contentId,...f,...h,ref:r,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),cMe="PopoverClose";l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=Y_e(cMe,n);return t.jsx(Mbe.button,{type:"button",...a,ref:r,onClick:pye(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=cMe;function dMe(e){return e?"open":"closed"}l.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,o=G_e(n);return t.jsx($xe,{...o,...a,ref:r})})).displayName="PopoverArrow";var uMe=nMe,hMe=oMe;const pMe=K_e,fMe=J_e,vMe=l.forwardRef(((e,r)=>{var{className:n,align:a="center",sideOffset:o=4}=e,l=o_(e,["className","align","sideOffset"]);return t.jsx(uMe,{children:t.jsx(hMe,Object.assign({ref:r,align:a,sideOffset:o,className:s_("z-50 min-w-72 rounded-md border bg-bg-bg1 border-none overflow-hidden p-0 text-common-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n)},l))})}));vMe.displayName=hMe.displayName;const mMe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function yMe(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const gMe={date:yMe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yMe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:yMe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},kMe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function bMe(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const wMe={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:bMe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:bMe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:bMe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:bMe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:bMe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function xMe(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,(e=>e.test(l))):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,(e=>e.test(l)));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(l.length)}}}const _Me={ordinalNumber:function(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=r.valueCallback?r.valueCallback(l):l;return{value:l,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:xMe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:xMe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:xMe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:xMe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:xMe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},MMe={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=mMe[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:gMe,formatRelative:(e,t,r,n)=>kMe[e],localize:wMe,match:_Me,options:{weekStartsOn:0,firstWeekContainsDate:1}};let jMe={};function OMe(){return jMe}const EMe=6048e5;function zMe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function CMe(e){const t=zMe(e);return t.setHours(0,0,0,0),t}function PMe(e){const t=zMe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function RMe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function AMe(e){const t=zMe(e),r=function(e,t){const r=CMe(e),n=CMe(t),a=+r-PMe(r),o=+n-PMe(n);return Math.round((a-o)/864e5)}(t,function(e){const t=zMe(e),r=RMe(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}(t));return r+1}function LMe(e,t){const r=OMe(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=zMe(e),o=a.getDay(),l=(o<n?7:0)+o-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function IMe(e){return LMe(e,{weekStartsOn:1})}function VMe(e){const t=zMe(e),r=t.getFullYear(),n=RMe(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=IMe(n),o=RMe(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const l=IMe(o);return t.getTime()>=a.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1}function HMe(e){const t=zMe(e),r=+IMe(t)-+function(e){const t=VMe(e),r=RMe(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),IMe(r)}(t);return Math.round(r/EMe)+1}function SMe(e,t){const r=zMe(e),n=r.getFullYear(),a=OMe(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=RMe(e,0);l.setFullYear(n+1,0,o),l.setHours(0,0,0,0);const i=LMe(l,t),s=RMe(e,0);s.setFullYear(n,0,o),s.setHours(0,0,0,0);const c=LMe(s,t);return r.getTime()>=i.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function ZMe(e,t){const r=zMe(e),n=+LMe(r,t)-+function(e,t){const r=OMe(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=SMe(e,t),o=RMe(e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),LMe(o,t)}(r,t);return Math.round(n/EMe)+1}function NMe(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const qMe={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return NMe("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):NMe(r+1,2)},d:(e,t)=>NMe(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>NMe(e.getHours()%12||12,t.length),H:(e,t)=>NMe(e.getHours(),t.length),m:(e,t)=>NMe(e.getMinutes(),t.length),s:(e,t)=>NMe(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return NMe(Math.trunc(n*Math.pow(10,r-3)),t.length)}},DMe="midnight",BMe="noon",FMe="morning",TMe="afternoon",WMe="evening",UMe="night",GMe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return qMe.y(e,t)},Y:function(e,t,r,n){const a=SMe(e,n),o=a>0?a:1-a;if("YY"===t){return NMe(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):NMe(o,t.length)},R:function(e,t){return NMe(VMe(e),t.length)},u:function(e,t){return NMe(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return NMe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return NMe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return qMe.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return NMe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=ZMe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):NMe(a,t.length)},I:function(e,t,r){const n=HMe(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):NMe(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):qMe.d(e,t)},D:function(e,t,r){const n=AMe(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):NMe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return NMe(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return NMe(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return NMe(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?BMe:0===n?DMe:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?WMe:n>=12?TMe:n>=4?FMe:UMe,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return qMe.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):qMe.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):NMe(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):NMe(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):qMe.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):qMe.s(e,t)},S:function(e,t){return qMe.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return YMe(n);case"XXXX":case"XX":return KMe(n);default:return KMe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return YMe(n);case"xxxx":case"xx":return KMe(n);default:return KMe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$Me(n,":");default:return"GMT"+KMe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$Me(n,":");default:return"GMT"+KMe(n,":")}},t:function(e,t,r){return NMe(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,r){return NMe(e.getTime(),t.length)}};function $Me(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+NMe(o,2)}function YMe(e,t){if(e%60==0){return(e>0?"-":"+")+NMe(Math.abs(e)/60,2)}return KMe(e,t)}function KMe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+NMe(Math.trunc(n/60),2)+t+NMe(n%60,2)}const XMe=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},QMe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},JMe={p:QMe,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return XMe(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",XMe(n,t)).replace("{{time}}",QMe(a,t))}},eje=/^D+$/,tje=/^Y+$/,rje=["D","DD","YY","YYYY"];function nje(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const r=zMe(e);return!isNaN(Number(r))}const aje=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oje=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lje=/^'([^]*?)'?$/,ije=/''/g,sje=/[a-zA-Z]/;function cje(e,t,r){const n=OMe(),a=n.locale??MMe,o=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=zMe(e);if(!nje(i))throw new RangeError("Invalid time value");let s=t.match(oje).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,JMe[t])(e,a.formatLong)}return e})).join("").match(aje).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:dje(e)};if(GMe[t])return{isToken:!0,value:e};if(t.match(sje))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(s=a.localize.preprocessor(i,s));const c={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return s.map((r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return tje.test(e)}(n)||function(e){return eje.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),rje.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,GMe[n[0]])(i,n,a.localize,c)})).join("")}function dje(e){const t=e.match(lje);return t?t[1].replace(ije,"'"):e}const uje=(e,t,r)=>Array.from(e).filter((e=>t.test(e))).slice(0,r),hje=e.forwardRef((({value:r,onChange:n,onBlur:a,onComplete:o,length:l=6,disabled:i=!1,invalid:s=!1,autoFocus:c=!1,inputMode:d="numeric",charPattern:u=/^\d$/,className:h,inputClassName:p},f)=>{const v=e.useRef([]),m=e.useRef(null),y=e.useMemo((()=>{const e=r||"";return Array.from({length:l},((t,r)=>e[r]||""))}),[l,r]);e.useImperativeHandle(f,(()=>v.current[0]),[]);const g=e=>{const t=e.join("");n(t),o&&e.every((e=>""!==e))&&o(t)},k=e=>{var t,r;const n=Math.max(0,Math.min(l-1,e));null===(t=v.current[n])||void 0===t||t.focus(),null===(r=v.current[n])||void 0===r||r.select()};return t.jsx("div",{className:s_("flex items-center gap-3",h),ref:m,children:y.map(((e,r)=>t.jsx("input",{ref:e=>{v.current[r]=e},type:"text",inputMode:d,autoComplete:0===r?"one-time-code":"off",value:e,maxLength:1,disabled:i,autoFocus:c&&0===r,"aria-invalid":s||void 0,className:s_("h-14 w-[46px] rounded-[8px] text-input-filled-text border bg-transparent text-center text-2xl font-semibold outline-none transition-all duration-200","border-input-default-stroke focus:border-input-active-stroke","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-input-error focus:border-input-error",p),onFocus:e=>{e.target.select()},onBlur:e=>{var t;const r=e.relatedTarget;r&&(null===(t=m.current)||void 0===t?void 0:t.contains(r))||null==a||a()},onChange:e=>((e,t)=>{if(i)return;if(!t){const t=[...y];return t[e]="",void g(t)}const r=uje(t,u,l);if(!r.length)return;const n=[...y];let a=e;r.forEach((e=>{a<l&&(n[a]=e,a+=1)})),g(n),k(a<l?a:l-1)})(r,e.target.value),onPaste:e=>((e,t)=>{if(t.preventDefault(),i)return;const r=t.clipboardData.getData("text"),n=uje(r,u,l-e);if(!n.length)return;const a=[...y];n.forEach(((t,r)=>{a[e+r]=t})),g(a);const o=Math.min(e+n.length,l-1);k(o)})(r,e),onKeyDown:e=>((e,t)=>{if(!i){if("ArrowLeft"===t.key)return t.preventDefault(),void k(e-1);if("ArrowRight"===t.key)return t.preventDefault(),void k(e+1);if("Backspace"===t.key){if(y[e]){t.preventDefault();const r=[...y];return r[e]="",void g(r)}if(e>0){t.preventDefault();const r=[...y];r[e-1]="",g(r),k(e-1)}}}})(r,e)},r)))})}));hje.displayName="OtpInput";const pje=e.forwardRef(((e,r)=>{var{id:n,label:a,required:o=!1,helperText:l,error:i=!1,errorMessage:s,keepFooterSpace:c=!0,wrapperClassName:d,labelClassName:u,messageClassName:h}=e,p=o_(e,["id","label","required","helperText","error","errorMessage","keepFooterSpace","wrapperClassName","labelClassName","messageClassName"]);const f=Boolean(i||s),v=f?s:l;return t.jsxs("div",{className:s_("inline-flex w-full flex-col gap-2",d),children:[a&&t.jsxs("label",{htmlFor:n,className:s_("typography-overline text-input-default-text",f&&"text-input-error",u),children:[a,o&&t.jsx("span",{className:"ml-1 text-input-error",children:"*"})]}),t.jsx(hje,Object.assign({},p,{ref:r,invalid:f})),(v||c)&&t.jsx("div",{className:s_("typography-small2 min-h-[18px]",f?"text-input-error":"text-text-g-contrast-medium",h),role:f?"alert":void 0,children:v||" "})]})}));pje.displayName="OtpInputGroup";const fje=l.forwardRef(((e,r)=>{var{rootClassName:n,className:a,rootRef:o}=e,l=o_(e,["rootClassName","className","rootRef"]);return t.jsx("div",{className:s_("relative h-full w-full overflow-auto",n),ref:o,children:t.jsx("table",Object.assign({ref:r,className:s_("w-full caption-bottom text-sm border-collapse",a)},l))})}));fje.displayName="Table";const vje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("thead",Object.assign({ref:r,className:s_("[&_tr]:border-b bg-secondary-80",n)},a))}));vje.displayName="TableHeader";const mje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("tbody",Object.assign({ref:r,className:s_("[&_tr:last-child]:border-0",n)},a))}));mje.displayName="TableBody";const yje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("tfoot",Object.assign({ref:r,className:s_("border-t bg-transparent-grey2-8 font-medium [&>tr]:last:border-b-0",n)},a))}));yje.displayName="TableFooter";const gje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("tr",Object.assign({ref:r,className:s_("border-b transition-colors hover:bg-transparent-grey2-8 data-[state=selected]:bg-grey-20",n)},a))}));gje.displayName="TableRow";const kje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("th",Object.assign({ref:r,className:s_(" h-12 py-3 px-6 text-left align-middle typography-body2 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",n)},a))}));kje.displayName="TableHead";const bje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("td",Object.assign({ref:r,className:s_(" py-3 px-6 text-left align-middle typography-body3 text-text-g-contrast-low [&:has([role=checkbox])]:pr-4 [&:has([role=checkbox])]:w-4",n)},a))}));bje.displayName="TableCell";const wje=l.forwardRef(((e,r)=>{var{className:n}=e,a=o_(e,["className"]);return t.jsx("caption",Object.assign({ref:r,className:s_("mt-4 text-sm text-text-g-contrast-medium",n)},a))}));
9248
9248
  /**
9249
9249
  * table-core
9250
9250
  *