@ceed/ads 0.0.138 → 0.0.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/framer/index.js +2 -2
- package/package.json +1 -1
package/framer/index.js
CHANGED
|
@@ -114,7 +114,7 @@ try {
|
|
|
114
114
|
`),t.vars.palette.background.level3,zj),({ownerState:e,theme:t})=>{var r,o,n,i;let a=((r=t.components)==null||(r=r.JoyTypography)==null||(r=r.defaultProps)==null?void 0:r.level)||"body1";return[{display:"block",position:"relative","--unstable_pseudo-zIndex":9,"--unstable_pulse-bg":t.vars.palette.background.level1,overflow:"hidden",cursor:"default",color:"transparent","& *":{visibility:"hidden"},"&::before":{display:"block",content:'" "',top:0,bottom:0,left:0,right:0,zIndex:"var(--unstable_pseudo-zIndex)",borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"--unstable_wave-bg":"rgba(255 255 255 / 0.1)"}},e.variant==="rectangular"&&m({borderRadius:"min(0.15em, 6px)",height:"auto",width:"100%","&::before":{position:"absolute"}},!e.animation&&{backgroundColor:t.vars.palette.background.level3},e.level!=="inherit"&&m({},t.typography[e.level])),e.variant==="circular"&&m({borderRadius:"50%",width:"100%",height:"100%","&::before":{position:"absolute"}},!e.animation&&{backgroundColor:t.vars.palette.background.level3},e.level!=="inherit"&&m({},t.typography[e.level])),e.variant==="text"&&m({borderRadius:"min(0.15em, 6px)",background:"transparent",width:"100%"},e.level!=="inherit"&&m({},t.typography[e.level||a],{paddingBlockStart:`calc((${((o=t.typography[e.level||a])==null?void 0:o.lineHeight)||1} - 1) * 0.56em)`,paddingBlockEnd:`calc((${((n=t.typography[e.level||a])==null?void 0:n.lineHeight)||1} - 1) * 0.44em)`,"&::before":m({height:"1em"},t.typography[e.level||a],e.animation==="wave"&&{backgroundColor:t.vars.palette.background.level3},!e.animation&&{backgroundColor:t.vars.palette.background.level3}),"&::after":m({height:"1em",top:`calc((${((i=t.typography[e.level||a])==null?void 0:i.lineHeight)||1} - 1) * 0.56em)`},t.typography[e.level||a])})),e.variant==="inline"&&m({display:"inline",position:"initial",borderRadius:"min(0.15em, 6px)"},!e.animation&&{backgroundColor:t.vars.palette.background.level3},e.level!=="inherit"&&m({},t.typography[e.level]),{WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::before":{position:"absolute",zIndex:"var(--unstable_pseudo-zIndex)",backgroundColor:t.vars.palette.background.level3}},e.animation==="pulse"&&{"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:"var(--unstable_pseudo-zIndex)",backgroundColor:t.vars.palette.background.level3}}),e.variant==="overlay"&&m({borderRadius:t.vars.radius.xs,position:"absolute",width:"100%",height:"100%",zIndex:"var(--unstable_pseudo-zIndex)"},e.animation==="pulse"&&{backgroundColor:t.vars.palette.background.surface},e.level!=="inherit"&&m({},t.typography[e.level]),{"&::before":{position:"absolute"}})]}),wR=Tn.forwardRef(function(t,r){let o=q({props:t,name:"JoySkeleton"}),{className:n,component:i="span",children:a,animation:s="pulse",overlay:l=!1,loading:p=!0,variant:c="overlay",level:u=c==="text"?"body-md":"inherit",height:f,width:d,sx:h,slots:y={},slotProps:v={}}=o,b=$(o,Mj),x=m({},b,{component:i,slots:y,slotProps:v,sx:[{width:d,height:f},...Array.isArray(h)?h:[h]]}),g=m({},o,{animation:s,component:i,level:u,loading:p,overlay:l,variant:c,width:d,height:f}),C=Bj(g),[T,P]=M("root",{ref:r,className:ye(C.root,n),elementType:Fj,externalForwardedProps:x,ownerState:g});return p?OR(T,m({},P,{children:a})):OR(Tn.Fragment,{children:Tn.Children.map(a,(k,R)=>R===0&&Tn.isValidElement(k)?Tn.cloneElement(k,{"data-first-child":""}):k)})});wR.muiName="Skeleton";var qg=wR;import*as jf from"react";function DR(e){return X("MuiSlider",e)}var $j=Z("MuiSlider",["root","disabled","dragging","focusVisible","marked","vertical","trackInverted","trackFalse","rail","track","mark","markActive","markLabel","thumb","thumbStart","thumbEnd","valueLabel","valueLabelOpen","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","disabled","sizeSm","sizeMd","sizeLg","input"]),cl=$j;import{jsx as ul}from"react/jsx-runtime";import{jsxs as Kg}from"react/jsx-runtime";var Vj=["aria-label","aria-valuetext","className","classes","disableSwap","disabled","defaultValue","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","shiftStep","scale","step","tabIndex","track","value","valueLabelDisplay","valueLabelFormat","isRtl","color","size","variant","component","slots","slotProps"];function AR(e){return e}var jj=e=>{let{disabled:t,dragging:r,marked:o,orientation:n,track:i,variant:a,color:s,size:l}=e,p={root:["root",t&&"disabled",r&&"dragging",o&&"marked",n==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",a&&`variant${F(a)}`,s&&`color${F(s)}`,l&&`size${F(l)}`],rail:["rail"],track:["track"],thumb:["thumb",t&&"disabled"],input:["input"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],valueLabelOpen:["valueLabelOpen"],active:["active"],focusVisible:["focusVisible"]};return J(p,DR,{})},Hj=({theme:e,ownerState:t})=>(r={})=>{var o,n;let i=((o=e.variants[`${t.variant}${r.state||""}`])==null?void 0:o[t.color])||{};return m({},!r.state&&{"--variant-borderWidth":(n=i["--variant-borderWidth"])!=null?n:"0px"},{"--Slider-trackColor":i.color,"--Slider-thumbBackground":i.color,"--Slider-thumbColor":i.backgroundColor||e.vars.palette.background.surface,"--Slider-trackBackground":i.backgroundColor||e.vars.palette.background.surface,"--Slider-trackBorderColor":i.borderColor,"--Slider-railBackground":e.vars.palette.background.level2})},Uj=E("span",{name:"JoySlider",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let r=Hj({theme:e,ownerState:t});return[m({"--Slider-size":"max(42px, max(var(--Slider-thumbSize), var(--Slider-trackSize)))","--Slider-trackRadius":"var(--Slider-size)","--Slider-markBackground":e.vars.palette.text.tertiary,[`& .${cl.markActive}`]:{"--Slider-markBackground":"var(--Slider-trackColor)"}},t.size==="sm"&&{"--Slider-markSize":"2px","--Slider-trackSize":"4px","--Slider-thumbSize":"14px","--Slider-valueLabelArrowSize":"6px"},t.size==="md"&&{"--Slider-markSize":"2px","--Slider-trackSize":"6px","--Slider-thumbSize":"18px","--Slider-valueLabelArrowSize":"8px"},t.size==="lg"&&{"--Slider-markSize":"3px","--Slider-trackSize":"8px","--Slider-thumbSize":"24px","--Slider-valueLabelArrowSize":"10px"},{"--Slider-thumbRadius":"calc(var(--Slider-thumbSize) / 2)","--Slider-thumbWidth":"var(--Slider-thumbSize)"},r(),{"&:hover":{"@media (hover: hover)":m({},r({state:"Hover"}))},"&:active":m({},r({state:"Active"})),[`&.${cl.disabled}`]:m({pointerEvents:"none",color:e.vars.palette.text.tertiary},r({state:"Disabled"})),boxSizing:"border-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&{padding:"calc(var(--Slider-size) / 2) 0",width:"100%"},t.orientation==="vertical"&&{padding:"0 calc(var(--Slider-size) / 2)",height:"100%"},{"@media print":{colorAdjust:"exact"}})]}),Wj=E("span",{name:"JoySlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>[m({display:"block",position:"absolute",backgroundColor:e.track==="inverted"?"var(--Slider-trackBackground)":"var(--Slider-railBackground)",border:e.track==="inverted"?"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)":"initial",borderRadius:"var(--Slider-trackRadius)"},e.orientation==="horizontal"&&{height:"var(--Slider-trackSize)",top:"50%",left:0,right:0,transform:"translateY(-50%)"},e.orientation==="vertical"&&{width:"var(--Slider-trackSize)",top:0,bottom:0,left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})]),Gj=E("span",{name:"JoySlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({ownerState:e})=>[m({display:"block",position:"absolute",color:"var(--Slider-trackColor)",border:e.track==="inverted"?"initial":"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)",backgroundColor:e.track==="inverted"?"var(--Slider-railBackground)":"var(--Slider-trackBackground)"},e.orientation==="horizontal"&&{height:"var(--Slider-trackSize)",top:"50%",transform:"translateY(-50%)",borderRadius:"var(--Slider-trackRadius) 0 0 var(--Slider-trackRadius)"},e.orientation==="vertical"&&{width:"var(--Slider-trackSize)",left:"50%",transform:"translateX(-50%)",borderRadius:"0 0 var(--Slider-trackRadius) var(--Slider-trackRadius)"},e.track===!1&&{display:"none"})]),Jj=E("span",{name:"JoySlider",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({ownerState:e,theme:t})=>{var r;return m({position:"absolute",boxSizing:"border-box",outline:0,display:"flex",alignItems:"center",justifyContent:"center",width:"var(--Slider-thumbWidth)",height:"var(--Slider-thumbSize)",border:"var(--variant-borderWidth, 0px) solid var(--Slider-trackBorderColor)",borderRadius:"var(--Slider-thumbRadius)",boxShadow:"var(--Slider-thumbShadow)",color:"var(--Slider-thumbColor)",backgroundColor:"var(--Slider-thumbBackground)",[t.focus.selector]:m({},t.focus.default,{outlineOffset:0,outlineWidth:"max(4px, var(--Slider-thumbSize) / 3.6)",outlineColor:`rgba(${(r=t.vars.palette)==null||(r=r[e.color])==null?void 0:r.mainChannel} / 0.32)`})},e.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},e.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",background:"transparent",top:0,left:0,width:"100%",height:"100%",border:"2px solid",borderColor:"var(--Slider-thumbColor)",borderRadius:"inherit"}})}),qj=E("span",{name:"JoySlider",slot:"Mark",overridesResolver:(e,t)=>t.mark})(({ownerState:e})=>m({position:"absolute",width:"var(--Slider-markSize)",height:"var(--Slider-markSize)",borderRadius:"var(--Slider-markSize)",backgroundColor:"var(--Slider-markBackground)"},e.orientation==="horizontal"&&m({top:"50%",transform:"translate(calc(var(--Slider-markSize) / -2), -50%)"},e.percent===0&&{transform:"translate(min(var(--Slider-markSize), 3px), -50%)"},e.percent===100&&{transform:"translate(calc(var(--Slider-markSize) * -1 - min(var(--Slider-markSize), 3px)), -50%)"}),e.orientation==="vertical"&&m({left:"50%",transform:"translate(-50%, calc(var(--Slider-markSize) / 2))"},e.percent===0&&{transform:"translate(-50%, calc(min(var(--Slider-markSize), 3px) * -1))"},e.percent===100&&{transform:"translate(-50%, calc(var(--Slider-markSize) * 1 + min(var(--Slider-markSize), 3px)))"}))),Kj=E("span",{name:"JoySlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>m({},t.size==="sm"&&{fontSize:e.fontSize.xs,lineHeight:e.lineHeight.md,paddingInline:"0.25rem",minWidth:"20px"},t.size==="md"&&{fontSize:e.fontSize.sm,lineHeight:e.lineHeight.md,paddingInline:"0.375rem",minWidth:"24px"},t.size==="lg"&&{fontSize:e.fontSize.md,lineHeight:e.lineHeight.md,paddingInline:"0.5rem",minWidth:"28px"},{zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,bottom:0,transformOrigin:"bottom center",transform:"translateY(calc((var(--Slider-thumbSize) + var(--Slider-valueLabelArrowSize)) * -1)) scale(0)",position:"absolute",backgroundColor:e.vars.palette.background.tooltip,boxShadow:e.shadow.sm,borderRadius:e.vars.radius.xs,color:"#fff","&::before":{display:"var(--Slider-valueLabelArrowDisplay)",position:"absolute",content:'""',color:e.vars.palette.background.tooltip,bottom:0,border:"calc(var(--Slider-valueLabelArrowSize) / 2) solid",borderColor:"currentColor",borderRightColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",left:"50%",transform:"translate(-50%, 100%)",backgroundColor:"transparent"},[`&.${cl.valueLabelOpen}`]:{transform:"translateY(calc((var(--Slider-thumbSize) + var(--Slider-valueLabelArrowSize)) * -1)) scale(1)"}})),Yj=E("span",{name:"JoySlider",slot:"MarkLabel",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t})=>m({fontFamily:e.vars.fontFamily.body},t.size==="sm"&&{fontSize:e.vars.fontSize.xs},t.size==="md"&&{fontSize:e.vars.fontSize.sm},t.size==="lg"&&{fontSize:e.vars.fontSize.md},{color:e.palette.text.tertiary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:"calc(50% + 4px + (max(var(--Slider-trackSize), var(--Slider-thumbSize)) / 2))",transform:"translateX(-50%)"},t.orientation==="vertical"&&{left:"calc(50% + 8px + (max(var(--Slider-trackSize), var(--Slider-thumbSize)) / 2))",transform:"translateY(50%)"})),Xj=E("input",{name:"JoySlider",slot:"Input",overridesResolver:(e,t)=>t.input})({}),Zj=jf.forwardRef(function(t,r){let o=q({props:t,name:"JoySlider"}),{"aria-label":n,"aria-valuetext":i,className:a,classes:s,disableSwap:l=!1,disabled:p=!1,defaultValue:c,getAriaLabel:u,getAriaValueText:f,marks:d=!1,max:h=100,min:y=0,orientation:v="horizontal",shiftStep:b=10,scale:x=AR,step:g=1,track:C="normal",valueLabelDisplay:T="off",valueLabelFormat:P=AR,isRtl:k=!1,color:R="primary",size:D="md",variant:O="solid",component:B,slots:A={},slotProps:_={}}=o,j=$(o,Vj),N=m({},o,{marks:d,classes:s,disabled:p,defaultValue:c,disableSwap:l,isRtl:k,max:h,min:y,orientation:v,shiftStep:b,scale:x,step:g,track:C,valueLabelDisplay:T,valueLabelFormat:P,color:R,size:D,variant:O}),{axisProps:w,getRootProps:z,getHiddenInputProps:Y,getThumbProps:V,open:S,active:ee,axis:ne,focusedThumbIndex:I,range:pe,dragging:ge,marks:De,values:ae,trackOffset:W,trackLeap:de,getThumbStyle:fe}=nC(m({},N,{rootRef:r}));N.marked=De.length>0&&De.some(se=>se.label),N.dragging=ge;let Ce=m({},w[ne].offset(W),w[ne].leap(de)),ve=jj(N),Fe=m({},j,{component:B,slots:A,slotProps:_}),[Je,te]=M("root",{ref:r,className:ye(ve.root,a),elementType:Uj,externalForwardedProps:Fe,getSlotProps:z,ownerState:N}),[Q,he]=M("rail",{className:ve.rail,elementType:Wj,externalForwardedProps:Fe,ownerState:N}),[be,$e]=M("track",{additionalProps:{style:Ce},className:ve.track,elementType:Gj,externalForwardedProps:Fe,ownerState:N}),[we,Ae]=M("mark",{className:ve.mark,elementType:qj,externalForwardedProps:Fe,ownerState:N}),[Me,Ge]=M("markLabel",{className:ve.markLabel,elementType:Yj,externalForwardedProps:Fe,ownerState:N,additionalProps:{"aria-hidden":!0}}),[at,K]=M("thumb",{className:ve.thumb,elementType:Jj,externalForwardedProps:Fe,getSlotProps:V,ownerState:N}),[ce,Pe]=M("input",{className:ve.input,elementType:Xj,externalForwardedProps:Fe,getSlotProps:Y,ownerState:N}),[U,G]=M("valueLabel",{className:ve.valueLabel,elementType:Kj,externalForwardedProps:Fe,ownerState:N});return Kg(Je,m({},te,{children:[ul(Q,m({},he)),ul(be,m({},$e)),De.filter(se=>se.value>=y&&se.value<=h).map((se,Ie)=>{let ie=Op(se.value,y,h),oe=w[ne].offset(ie),Se;return C===!1?Se=ae.indexOf(se.value)!==-1:Se=C==="normal"&&(pe?se.value>=ae[0]&&se.value<=ae[ae.length-1]:se.value<=ae[0])||C==="inverted"&&(pe?se.value<=ae[0]||se.value>=ae[ae.length-1]:se.value>=ae[0]),Kg(jf.Fragment,{children:[ul(we,m({"data-index":Ie},Ae,!mp(we)&&{ownerState:m({},Ae.ownerState,{percent:ie})},{style:m({},oe,Ae.style),className:ye(Ae.className,Se&&ve.markActive)})),se.label!=null?ul(Me,m({"data-index":Ie},Ge,{style:m({},oe,Ge.style),className:ye(ve.markLabel,Ge.className,Se&&ve.markLabelActive),children:se.label})):null]},se.value)}),ae.map((se,Ie)=>{let ie=Op(se,y,h),oe=w[ne].offset(ie);return Kg(at,m({"data-index":Ie},K,{className:ye(K.className,ee===Ie&&ve.active,I===Ie&&ve.focusVisible),style:m({},oe,fe(Ie),K.style),children:[ul(ce,m({"data-index":Ie,"aria-label":u?u(Ie):n,"aria-valuenow":x(se),"aria-valuetext":f?f(x(se),Ie):i,value:ae[Ie]},Pe)),T!=="off"?ul(U,m({},G,{className:ye(G.className,(S===Ie||ee===Ie||T==="on")&&ve.valueLabelOpen),children:typeof P=="function"?P(x(se),Ie):P})):null]}),Ie)})]}))}),Yg=Zj;import*as Hn from"react";function NR(e){return X("MuiStepper",e)}var Qj=Z("MuiStepper",["root","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),rn=Qj;import{jsx as tH}from"react/jsx-runtime";var eH=["className","component","size","children","orientation","slots","slotProps"],rH=e=>{let{size:t,orientation:r}=e,o={root:["root",r,t&&`size${F(t)}`]};return J(o,NR,{})},oH=E("ol",{name:"JoyStepper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Stepper-indicatorColumn":"auto","--Step-connectorThickness":"1px","--Step-indicatorDotSize":"0.375rem",boxSizing:"border-box",display:"flex",margin:0,padding:0,variants:[{props:{size:"sm"},style:m({"--Stepper-verticalGap":"0.5rem","--Step-gap":"0.375rem","--Step-connectorInset":"0.25rem","--StepIndicator-size":"1.25rem"},e.typography["title-sm"])},{props:{size:"md"},style:m({"--Stepper-verticalGap":"0.75rem","--Step-gap":"0.5rem","--Step-connectorInset":"0.375rem","--StepIndicator-size":"1.5rem"},e.typography["title-md"])},{props:{size:"lg"},style:m({"--Stepper-verticalGap":"0.75rem","--Step-gap":"0.5rem","--Step-connectorInset":"0.5rem","--StepIndicator-size":"1.75rem"},e.typography["title-lg"])},{props:{orientation:"vertical"},style:{flexDirection:"column",gap:"var(--Stepper-verticalGap)"}}]})),nH=Hn.forwardRef(function(t,r){let o=q({props:t,name:"JoyStepper"}),{className:n,component:i="ol",size:a="md",children:s,orientation:l="horizontal",slots:p={},slotProps:c={}}=o,u=$(o,eH),f=m({},o,{component:i,orientation:l,size:a}),d=rH(f),h=m({},u,{component:i,slots:p,slotProps:c}),[y,v]=M("root",{ref:r,className:ye(d.root,n),elementType:oH,externalForwardedProps:h,ownerState:f});return tH(y,m({},v,{children:Hn.Children.map(s,(b,x)=>{if(!Hn.isValidElement(b))return b;let g={};return x===0&&(g["data-first-child"]=""),x===Hn.Children.count(s)-1&&(g["data-last-child"]=""),Hn.cloneElement(b,g)})}))}),Xg=nH;import*as MR from"react";function LR(e){return X("MuiStep",e)}var iH=Z("MuiStep",["root","indicator","horizontal","vertical","active","completed","disabled"]),wo=iH;import{jsx as sH}from"react/jsx-runtime";import{jsxs as lH}from"react/jsx-runtime";var aH=["active","completed","className","component","children","disabled","orientation","indicator","slots","slotProps"],pH=e=>{let{orientation:t,active:r,completed:o,disabled:n}=e;return J({root:["root",t,r&&"active",o&&"completed",n&&"disabled"],indicator:["indicator"]},LR,{})},cH=E("li",{name:"JoyStep",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",display:"flex",gridTemplateColumns:"var(--Stepper-indicatorColumn) 1fr",gridAutoFlow:"dense",flex:"var(--_Step-flex)",flexDirection:"row",alignItems:"var(--_Step-alignItems, center)",justifyContent:"var(--_Step-justify, center)",gap:"var(--Step-gap)","& > *":{zIndex:1,[`&:not(.${wo.indicator})`]:{gridColumn:"2"}},"&::after":{content:'""',display:"block",borderRadius:"var(--Step-connectorRadius)",height:"var(--Step-connectorThickness)",background:`var(--Step-connectorBg, ${e.vars.palette.divider})`,flex:1,marginInlineStart:"calc(var(--Step-connectorInset) - var(--Step-gap))",marginInlineEnd:"var(--Step-connectorInset)",zIndex:0},"&[data-last-child]::after":{display:"none"},[`.${rn.horizontal} &:not([data-last-child])`]:{"--_Step-flex":"auto",[`&.${wo.vertical}`]:{"--_Step-flex":1}},[`.${rn.vertical} &`]:{display:"grid","--_Step-justify":"flex-start","&::after":{gridColumn:"1",width:"var(--Step-connectorThickness)",height:"auto",margin:"calc(var(--Step-connectorInset) - var(--Step-gap)) auto calc(var(--Step-connectorInset) - var(--Stepper-verticalGap))",alignSelf:"stretch"}},variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`.${rn.horizontal} &`]:{"&[data-last-child]":{"--_Step-flex":1},"&[data-indicator]":{"--_Step-justify":"flex-start"},"&::after":{margin:0,position:"absolute",height:"var(--Step-connectorThickness)",zIndex:0,top:"calc(var(--StepIndicator-size) / 2 - var(--Step-connectorThickness) / 2)",left:"calc(50% + var(--StepIndicator-size) / 2 + var(--Step-connectorInset))",width:"calc(100% - var(--StepIndicator-size) - 2 * var(--Step-connectorInset))"},[`&:has(.${wo.indicator}:empty)::after`]:{"--StepIndicator-size":"0px","--Step-connectorInset":"0px",top:"calc(50% - var(--Step-connectorThickness) / 2)"}}}}]})),uH=E("div",{name:"JoyStep",slot:"Indicator",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",justifyContent:"center",placeSelf:"center",width:"var(--StepIndicator-size)",height:"var(--StepIndicator-size)",[`.${rn.horizontal} &:empty`]:{display:"none"},[`.${rn.vertical} &:empty`]:{height:"auto","&::before":{content:'""',display:"block",width:"var(--Step-indicatorDotSize)",height:"var(--Step-indicatorDotSize)",borderRadius:"var(--Step-indicatorDotSize)",color:"inherit",background:"currentColor"}}}),dH=MR.forwardRef(function(t,r){let o=q({props:t,name:"JoyStep"}),{active:n=!1,completed:i=!1,className:a,component:s="li",children:l,disabled:p=!1,orientation:c="horizontal",indicator:u,slots:f={},slotProps:d={}}=o,h=$(o,aH),y=m({},o,{active:n,completed:i,component:s,disabled:p,orientation:c}),v=pH(y),b=m({},h,{component:s,slots:f,slotProps:d}),[x,g]=M("root",{ref:r,className:ye(v.root,a),elementType:cH,externalForwardedProps:b,ownerState:y,additionalProps:{"data-indicator":u?"":void 0}}),[C,T]=M("indicator",{ref:r,className:v.indicator,elementType:uH,externalForwardedProps:b,ownerState:y});return lH(x,m({},g,{children:[sH(C,m({},T,{children:u})),l]}))}),Zg=dH;import*as BR from"react";var fH=Z("MuiStepButton",["root"]),Hf=fH;import{jsx as hH}from"react/jsx-runtime";var mH=["className","component","children","slots","slotProps"],yH=E("button",{name:"JoyStepButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`.${wo.indicator}:empty + &`]:{"--StepIndicator-size":"0px","--Step-gap":"0px"},[`.${wo.horizontal} &`]:{"--_StepButton-alignSelf":"stretch","--_StepButton-gap":"var(--Step-gap)"},[`.${wo.horizontal} &::before`]:{"--_StepButton-left":"calc(-1 * (var(--StepIndicator-size) + var(--Step-gap)))"},[`.${wo.vertical} &::before`]:{"--_StepButton-top":"calc(-1 * (var(--StepIndicator-size) + var(--Step-gap)))"},[`.${rn.vertical} .${wo.vertical} &`]:{"--_StepButton-alignItems":"flex-start"},[`.${rn.vertical} &::before`]:{"--_StepButton-left":"calc(-1 * (var(--StepIndicator-size) + var(--Step-gap)))","--_StepButton-top":"0px"},WebkitTapHighlightColor:"transparent",boxSizing:"border-box",border:"none",backgroundColor:"transparent",cursor:"pointer",position:"relative",padding:0,textDecoration:"none",font:"inherit",display:"inline-flex",flexDirection:"inherit",alignItems:"var(--_StepButton-alignItems, inherit)",alignSelf:"var(--_StepButton-alignSelf)",gap:"var(--_StepButton-gap)",[e.focus.selector]:e.focus.default,"&::before":{content:'""',display:"block",position:"absolute",top:"var(--_StepButton-top, 0)",right:0,bottom:0,left:"var(--_StepButton-left, 0)"}})),gH=BR.forwardRef(function(t,r){let o=q({props:t,name:"JoyStepButton"}),{className:n,component:i="button",children:a,slots:s={},slotProps:l={}}=o,p=$(o,mH),c=m({},o,{component:i}),u=m({},p,{component:i,slots:s,slotProps:l}),[f,d]=M("root",{ref:r,className:ye(Hf.root,n),elementType:yH,externalForwardedProps:u,ownerState:c,additionalProps:{type:"button"}});return hH(f,m({},d,{children:a}))}),Qg=gH;import*as FR from"react";function zR(e){return X("MuiStepIndicator",e)}var uLe=Z("MuiStepIndicator",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);import{jsx as bH}from"react/jsx-runtime";var vH=["className","component","color","children","variant","slots","slotProps"],xH=e=>{let{color:t,variant:r}=e,o={root:["root",t&&`color${F(t)}`,r&&`variant${F(r)}`]};return J(o,zR,{})},TH=E("div",{name:"JoyStepIndicator",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;return m({"--Icon-fontSize":"calc(var(--StepIndicator-size, 2rem) / 2)","--Icon-color":"currentColor",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",font:"inherit",borderRadius:"50%",width:"var(--StepIndicator-size, 1.5rem)",height:"var(--StepIndicator-size, 1.5rem)"},(r=e.variants[t.variant])==null?void 0:r[t.color])}),PH=FR.forwardRef(function(t,r){let o=q({props:t,name:"JoyStepIndicator"}),{className:n,component:i="div",color:a="neutral",children:s,variant:l="soft",slots:p={},slotProps:c={}}=o,u=$(o,vH),f=m({},o,{component:i,color:a,variant:l}),d=xH(f),h=m({},u,{component:i,slots:p,slotProps:c}),[y,v]=M("root",{ref:r,className:ye(d.root,n),elementType:TH,externalForwardedProps:h,ownerState:f});return bH(y,m({},v,{children:s}))}),ev=PH;var CH=nd({createStyledComponent:E("div",{name:"JoyStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>q({props:e,name:"JoyStack"})}),Uf=CH;var kH=Z("MuiStack",["root"]),$R=kH;import*as Zp from"react";import{jsx as Xp}from"react/jsx-runtime";import{jsxs as VR}from"react/jsx-runtime";var SH=["checked","defaultChecked","disabled","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","id","color","variant","size","startDecorator","endDecorator","component","slots","slotProps"],RH=e=>{let{checked:t,disabled:r,focusVisible:o,readOnly:n,color:i,variant:a,size:s}=e,l={root:["root",t&&"checked",r&&"disabled",o&&"focusVisible",n&&"readOnly",a&&`variant${F(a)}`,i&&`color${F(i)}`,s&&`size${F(s)}`],thumb:["thumb",t&&"checked"],track:["track",t&&"checked"],action:["action",o&&"focusVisible"],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return J(l,OS,{})},EH=({theme:e,ownerState:t})=>(r={})=>{var o,n,i;let a=((o=e.variants[`${t.variant}${r.state||""}`])==null?void 0:o[t.color])||{};return{"--Switch-trackBackground":(n=a.backgroundColor)!=null?n:e.vars.palette.background.surface,"--Switch-trackColor":a.color,"--Switch-trackBorderColor":t.variant==="outlined"?a.borderColor:"currentColor","--Switch-thumbBackground":a.color,"--Switch-thumbColor":(i=a.backgroundColor)!=null?i:e.vars.palette.background.surface}},IH=E("div",{name:"JoySwitch",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;let o=EH({theme:e,ownerState:t});return m({"--Icon-color":"currentColor","--variant-borderWidth":(r=e.variants[t.variant])==null||(r=r[t.color])==null?void 0:r["--variant-borderWidth"],"--Switch-trackRadius":e.vars.radius.xl,"--Switch-thumbShadow":t.variant==="soft"?"none":"0 0 0 1px var(--Switch-trackBackground)"},t.size==="sm"&&{"--Switch-trackWidth":"26px","--Switch-trackHeight":"16px","--Switch-thumbSize":"10px",fontSize:e.vars.fontSize.sm,gap:"var(--Switch-gap, 6px)"},t.size==="md"&&{"--Switch-trackWidth":"32px","--Switch-trackHeight":"20px","--Switch-thumbSize":"14px",fontSize:e.vars.fontSize.md,gap:"var(--Switch-gap, 8px)"},t.size==="lg"&&{"--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-thumbSize":"18px",gap:"var(--Switch-gap, 12px)"},{"--unstable_paddingBlock":"max((var(--Switch-trackHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Switch-thumbSize)) / 2, 0px)","--Switch-thumbRadius":"max(var(--Switch-trackRadius) - var(--unstable_paddingBlock), min(var(--unstable_paddingBlock) / 2, var(--Switch-trackRadius) / 2))","--Switch-thumbWidth":"var(--Switch-thumbSize)","--Switch-thumbOffset":"max((var(--Switch-trackHeight) - var(--Switch-thumbSize)) / 2, 0px)"},o(),{"&:hover":{"@media (hover: hover)":m({},o({state:"Hover"}))},[`&.${xn.checked}`]:m({},o(),{"&:hover":{"@media (hover: hover)":m({},o({state:"Hover"}))}}),[`&.${xn.disabled}`]:m({pointerEvents:"none",color:e.vars.palette.text.tertiary},o({state:"Disabled"})),display:"inline-flex",alignItems:"center",alignSelf:"center",fontFamily:e.vars.fontFamily.body,position:"relative",padding:"calc((var(--Switch-thumbSize) / 2) - (var(--Switch-trackHeight) / 2)) calc(-1 * var(--Switch-thumbOffset))",backgroundColor:"initial",border:"none",margin:"var(--unstable_Switch-margin)"})}),OH=E("div",{name:"JoySwitch",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e})=>({borderRadius:"var(--Switch-trackRadius)",position:"absolute",top:0,left:0,bottom:0,right:0,[e.focus.selector]:e.focus.default})),_H=E("input",{name:"JoySwitch",slot:"Input",overridesResolver:(e,t)=>t.input})({margin:0,height:"100%",width:"100%",opacity:0,position:"absolute",cursor:"pointer"}),wH=E("span",{name:"JoySwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>m({position:"relative",color:"var(--Switch-trackColor)",height:"var(--Switch-trackHeight)",width:"var(--Switch-trackWidth)",display:"flex",flexShrink:0,justifyContent:"space-between",alignItems:"center",boxSizing:"border-box",border:"var(--variant-borderWidth, 0px) solid",borderColor:"var(--Switch-trackBorderColor)",backgroundColor:"var(--Switch-trackBackground)",borderRadius:"var(--Switch-trackRadius)",fontFamily:e.vars.fontFamily.body},t.size==="sm"&&{fontSize:e.vars.fontSize.xs},t.size==="md"&&{fontSize:e.vars.fontSize.sm},t.size==="lg"&&{fontSize:e.vars.fontSize.md})),DH=E("span",{name:"JoySwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"50%",left:"calc(50% - var(--Switch-trackWidth) / 2 + var(--Switch-thumbWidth) / 2 + var(--Switch-thumbOffset))",transform:"translate(-50%, -50%)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${xn.checked}`]:{left:"calc(50% + var(--Switch-trackWidth) / 2 - var(--Switch-thumbWidth) / 2 - var(--Switch-thumbOffset))"}}),AH=E("span",{name:"JoySwitch",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex"}),NH=E("span",{name:"JoySwitch",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex"}),LH=Zp.forwardRef(function(t,r){var o,n,i,a,s,l;let p=q({props:t,name:"JoySwitch"}),{disabled:c,id:u,color:f,variant:d="solid",size:h="md",startDecorator:y,endDecorator:v,component:b,slots:x={},slotProps:g={}}=p,C=$(p,SH),T=Zp.useContext(Dt),P=(o=(n=t.size)!=null?n:T==null?void 0:T.size)!=null?o:h,k=(i=t.color)!=null?i:T!=null&&T.error?"danger":(a=T==null?void 0:T.color)!=null?a:f,R=m({disabled:(s=(l=t.disabled)!=null?l:T==null?void 0:T.disabled)!=null?s:c},p),{getInputProps:D,checked:O,disabled:B,focusVisible:A,readOnly:_}=Oa(R),j=m({},p,{id:u,checked:O,disabled:B,focusVisible:A,readOnly:_,color:O?k||"primary":k||"neutral",variant:d,size:P}),N=RH(j),w=m({},C,{component:b,slots:x,slotProps:g}),[z,Y]=M("root",{ref:r,className:N.root,elementType:IH,externalForwardedProps:w,ownerState:j}),[V,S]=M("startDecorator",{additionalProps:{"aria-hidden":!0},className:N.startDecorator,elementType:AH,externalForwardedProps:w,ownerState:j}),[ee,ne]=M("endDecorator",{additionalProps:{"aria-hidden":!0},className:N.endDecorator,elementType:NH,externalForwardedProps:w,ownerState:j}),[I,pe]=M("track",{className:N.track,elementType:wH,externalForwardedProps:w,ownerState:j}),[ge,De]=M("thumb",{className:N.thumb,elementType:DH,externalForwardedProps:w,ownerState:j}),[ae,W]=M("action",{className:N.action,elementType:OH,externalForwardedProps:w,ownerState:j}),[de,fe]=M("input",{additionalProps:{id:u!=null?u:T==null?void 0:T.htmlFor,"aria-describedby":T==null?void 0:T["aria-describedby"]},className:N.input,elementType:_H,externalForwardedProps:w,getSlotProps:D,ownerState:j});return VR(z,m({},Y,{children:[y&&Xp(V,m({},S,{children:typeof y=="function"?y(j):y})),VR(I,m({},pe,{children:[pe==null?void 0:pe.children,Xp(ge,m({},De))]})),Xp(ae,m({},W,{children:Xp(de,m({},fe))})),v&&Xp(ee,m({},ne,{children:typeof v=="function"?v(j):v}))]}))}),Wf=LH;import*as Bi from"react";function jR(e){return X("MuiTab",e)}var MH=Z("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),Qp=MH;import{jsx as HR}from"react/jsx-runtime";var BH=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],zH=e=>{let{selected:t,disabled:r,focusVisible:o,variant:n,color:i,orientation:a}=e,s={root:["root",a,r&&"disabled",o&&"focusVisible",t&&"selected",n&&`variant${F(n)}`,i&&`color${F(i)}`]};return J(s,jR,{})},FH=E(Jo,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),$H=Bi.forwardRef(function(t,r){let o=q({props:t,name:"JoyTab"}),n=Bi.useContext(Hr),{action:i,children:a,disabled:s=!1,component:l="button",orientation:p="horizontal",variant:c="plain",color:u="neutral",disableIndicator:f=!1,indicatorPlacement:d=n?"bottom":"right",indicatorInset:h=!1,slots:y={},slotProps:v={}}=o,b=$(o,BH),x=Bi.useRef(),g=Ee(x,r),{active:C,focusVisible:T,setFocusVisible:P,selected:k,getRootProps:R}=ug(m({},o,{rootRef:g}));Bi.useImperativeHandle(i,()=>({focusVisible:()=>{P(!0),x.current.focus()}}),[P]);let D=m({},o,{disableIndicator:f,indicatorPlacement:d,indicatorInset:h,orientation:p,row:n,active:C,focusVisible:T,disabled:s,selected:k,variant:c,color:u}),O=zH(D),B=m({},b,{component:l,slots:y,slotProps:v}),[A,_]=M("root",{ref:r,elementType:FH,getSlotProps:R,externalForwardedProps:B,ownerState:D,className:O.root});return HR(Ti.Provider,{value:p,children:HR(A,m({},_,{children:a}))})}),Gf=$H;import*as JR from"react";function UR(e){return X("MuiTable",e)}var VH=Z("MuiTable",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","stickyHeader","stickyFooter","noWrap","hoverRow","borderAxisNone","borderAxisX","borderAxisXBetween","borderAxisY","borderAxisYBetween","borderAxisBoth","borderAxisBothBetween"]),WR=VH;import{jsx as GR}from"react/jsx-runtime";var jH=["className","component","children","borderAxis","hoverRow","noWrap","size","variant","color","stripe","stickyHeader","stickyFooter","slots","slotProps"],HH=e=>{let{size:t,variant:r,color:o,borderAxis:n,stickyHeader:i,stickyFooter:a,noWrap:s,hoverRow:l}=e,p={root:["root",i&&"stickyHeader",a&&"stickyFooter",s&&"noWrap",l&&"hoverRow",n&&`borderAxis${F(n)}`,r&&`variant${F(r)}`,o&&`color${F(o)}`,t&&`size${F(t)}`]};return J(p,UR,{})},er={getColumnExceptFirst(){return"& tr > *:not(:first-of-type), & tr > th + td, & tr > td + th"},getCell(){return"& th, & td"},getHeadCell(){return"& th"},getHeaderCell(){return"& thead th"},getHeaderCellOfRow(e){return`& thead tr:nth-of-type(${e}) th`},getBottomHeaderCell(){return"& thead th:not([colspan])"},getHeaderNestedFirstColumn(){return"& thead tr:not(:first-of-type) th:not([colspan]):first-of-type"},getDataCell(){return"& td"},getDataCellExceptLastRow(){return"& tr:not(:last-of-type) > td"},getBodyCellExceptLastRow(){return`${this.getDataCellExceptLastRow()}, & tr:not(:last-of-type) > th[scope="row"]`},getBodyCellOfRow(e){return typeof e=="number"&&e<0?`& tbody tr:nth-last-of-type(${Math.abs(e)}) td, & tbody tr:nth-last-of-type(${Math.abs(e)}) th[scope="row"]`:`& tbody tr:nth-of-type(${e}) td, & tbody tr:nth-of-type(${e}) th[scope="row"]`},getBodyRow(e){return e===void 0?"& tbody tr":`& tbody tr:nth-of-type(${e})`},getFooterCell(){return"& tfoot th, & tfoot td"},getFooterFirstRowCell(){return"& tfoot tr:not(:last-of-type) th, & tfoot tr:not(:last-of-type) td"}},UH=E("table",{name:"JoyTable",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,o,n,i,a,s,l;let p=(r=e.variants[t.variant])==null?void 0:r[t.color];return[m({"--Table-headerUnderlineThickness":"2px","--TableCell-borderColor":(o=p==null?void 0:p.borderColor)!=null?o:e.vars.palette.divider,"--TableCell-headBackground":`var(--Sheet-background, ${e.vars.palette.background.surface})`},t.size==="sm"&&{"--unstable_TableCell-height":"var(--TableCell-height, 32px)","--TableCell-paddingX":"0.25rem","--TableCell-paddingY":"0.25rem"},t.size==="md"&&{"--unstable_TableCell-height":"var(--TableCell-height, 40px)","--TableCell-paddingX":"0.5rem","--TableCell-paddingY":"0.375rem"},t.size==="lg"&&{"--unstable_TableCell-height":"var(--TableCell-height, 48px)","--TableCell-paddingX":"0.75rem","--TableCell-paddingY":"0.5rem"},{tableLayout:"fixed",width:"100%",borderSpacing:"0px",borderCollapse:"separate",borderRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},e.typography[`body-${{sm:"xs",md:"sm",lg:"md"}[t.size]}`],(n=e.variants[t.variant])==null?void 0:n[t.color],{"& caption":{color:e.vars.palette.text.tertiary,padding:"calc(2 * var(--TableCell-paddingY)) var(--TableCell-paddingX)"},[er.getDataCell()]:m({padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",height:"var(--unstable_TableCell-height)",borderColor:"var(--TableCell-borderColor)",backgroundColor:"var(--TableCell-dataBackground)"},t.noWrap&&{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}),[er.getHeadCell()]:{textAlign:"left",padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",backgroundColor:"var(--TableCell-headBackground)",height:"var(--unstable_TableCell-height)",fontWeight:e.vars.fontWeight.lg,borderColor:"var(--TableCell-borderColor)",color:e.vars.palette.text.secondary,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},[er.getHeaderCell()]:{verticalAlign:"bottom","&:first-of-type":{borderTopLeftRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},"&:last-of-type":{borderTopRightRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"}},"& tfoot tr > *":{backgroundColor:`var(--TableCell-footBackground, ${e.vars.palette.background.level1})`,"&:first-of-type":{borderBottomLeftRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"},"&:last-of-type":{borderBottomRightRadius:"var(--TableCell-cornerRadius, var(--unstable_actionRadius))"}}}),(((i=t.borderAxis)==null?void 0:i.startsWith("x"))||((a=t.borderAxis)==null?void 0:a.startsWith("both")))&&{[er.getHeaderCell()]:{borderBottomWidth:1,borderBottomStyle:"solid"},[er.getBottomHeaderCell()]:{borderBottomWidth:"var(--Table-headerUnderlineThickness)",borderBottomStyle:"solid"},[er.getBodyCellExceptLastRow()]:{borderBottomWidth:1,borderBottomStyle:"solid"},[er.getFooterCell()]:{borderTopWidth:1,borderTopStyle:"solid"}},(((s=t.borderAxis)==null?void 0:s.startsWith("y"))||((l=t.borderAxis)==null?void 0:l.startsWith("both")))&&{[`${er.getColumnExceptFirst()}, ${er.getHeaderNestedFirstColumn()}`]:{borderLeftWidth:1,borderLeftStyle:"solid"}},(t.borderAxis==="x"||t.borderAxis==="both")&&{[er.getHeaderCellOfRow(1)]:{borderTopWidth:1,borderTopStyle:"solid"},[er.getBodyCellOfRow(-1)]:{borderBottomWidth:1,borderBottomStyle:"solid"},[er.getFooterCell()]:{borderBottomWidth:1,borderBottomStyle:"solid"}},(t.borderAxis==="y"||t.borderAxis==="both")&&{"& tr > *:first-of-type":{borderLeftWidth:1,borderLeftStyle:"solid"},"& tr > *:last-of-type:not(:first-of-type)":{borderRightWidth:1,borderRightStyle:"solid"}},t.stripe&&{[er.getBodyRow(t.stripe)]:{background:`var(--TableRow-stripeBackground, ${e.vars.palette.background.level2})`,color:e.vars.palette.text.primary}},t.hoverRow&&{[er.getBodyRow()]:{"&:hover":{background:`var(--TableRow-hoverBackground, ${e.vars.palette.background.level3})`}}},t.stickyHeader&&{[er.getHeaderCell()]:{position:"sticky",top:0,zIndex:e.vars.zIndex.table},[er.getHeaderCellOfRow(2)]:{top:"var(--unstable_TableCell-height)"}},t.stickyFooter&&{[er.getFooterCell()]:{position:"sticky",bottom:0,zIndex:e.vars.zIndex.table,color:e.vars.palette.text.secondary,fontWeight:e.vars.fontWeight.lg},[er.getFooterFirstRowCell()]:{bottom:"var(--unstable_TableCell-height)"}}]}),WH=JR.forwardRef(function(t,r){let o=q({props:t,name:"JoyTable"}),{className:n,component:i,children:a,borderAxis:s="xBetween",hoverRow:l=!1,noWrap:p=!1,size:c="md",variant:u="plain",color:f="neutral",stripe:d,stickyHeader:h=!1,stickyFooter:y=!1,slots:v={},slotProps:b={}}=o,x=$(o,jH),g=m({},o,{borderAxis:s,hoverRow:l,noWrap:p,component:i,size:c,color:f,variant:u,stripe:d,stickyHeader:h,stickyFooter:y}),C=HH(g),T=m({},x,{component:i,slots:v,slotProps:b}),[P,k]=M("root",{ref:r,className:ye(C.root,n),elementType:UH,externalForwardedProps:T,ownerState:g});return GR(Ma.Provider,{value:!0,children:GR(P,m({},k,{children:a}))})}),Jf=WH;import*as qf from"react";import*as qR from"react";var GH=qR.createContext("md"),dl=GH;function KR(e){return X("MuiTabList",e)}var JH=Z("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]),YR=JH;import{jsx as tv}from"react/jsx-runtime";var qH=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],KH=e=>{let{orientation:t,size:r,variant:o,color:n}=e,i={root:["root",t,o&&`variant${F(o)}`,n&&`color${F(n)}`,r&&`size${F(r)}`]};return J(i,KR,{})},YH=E(Go,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;let o=(r=e.variants[t.variant])==null?void 0:r[t.color];return m({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},xi,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(o==null?void 0:o.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&m({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${Qp.root}`]:{flex:t.tabFlex}})}),XH=qf.forwardRef(function(t,r){let o=q({props:t,name:"JoyTabList"}),n=qf.useContext(dl),{isRtl:i,orientation:a,getRootProps:s,contextValue:l}=pg({rootRef:r}),{component:p="div",children:c,variant:u="plain",color:f="neutral",size:d,disableUnderline:h=!1,underlinePlacement:y=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:b,slots:x={},slotProps:g={}}=o,C=$(o,qH),T=d!=null?d:n,P=m({},o,{isRtl:i,orientation:a,variant:u,color:f,size:T,sticky:b,tabFlex:v,nesting:!1,disableUnderline:h,underlinePlacement:y}),k=KH(P),R=m({},C,{component:p,slots:x,slotProps:g}),[D,O]=M("root",{ref:r,elementType:YH,getSlotProps:s,externalForwardedProps:R,ownerState:P,className:k.root});return tv(D,m({},O,{children:tv(cC,{value:l,children:tv(Oo,{row:a==="horizontal",nested:!0,children:c})})}))}),Kf=XH;import*as Yf from"react";function XR(e){return X("MuiTabPanel",e)}var ZH=Z("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),ZR=ZH;import{jsx as QR}from"react/jsx-runtime";var QH=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],e5=e=>{let{hidden:t,size:r,variant:o,color:n,orientation:i}=e,a={root:["root",t&&"hidden",r&&`size${F(r)}`,i,o&&`variant${F(o)}`,n&&`color${F(n)}`,r&&`size${F(r)}`]};return J(a,XR,{})},t5=E("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;return m({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(r=e.variants[t.variant])==null?void 0:r[t.color])}),r5=Yf.forwardRef(function(t,r){let o=q({props:t,name:"JoyTabPanel"}),{orientation:n}=yi()||{orientation:"horizontal"},i=Yf.useContext(dl),{children:a,value:s=0,component:l,color:p="neutral",variant:c="plain",size:u,slots:f={},slotProps:d={},keepMounted:h=!1}=o,y=$(o,QH),{hidden:v,getRootProps:b}=lg(m({},o,{value:s})),x=u!=null?u:i,g=m({},o,{orientation:n,hidden:v,size:x,color:p,variant:c}),C=e5(g),T=m({},y,{component:l,slots:f,slotProps:d}),[P,k]=M("root",{ref:r,elementType:t5,getSlotProps:b,externalForwardedProps:T,additionalProps:{role:"tabpanel",ref:r,as:l},ownerState:g,className:C.root});return h?QR(P,m({},k,{children:a})):QR(P,m({},k,{children:!v&&a}))}),Xf=r5;import*as rE from"react";function eE(e){return X("MuiTabs",e)}var o5=Z("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]),tE=o5;import{jsx as rv}from"react/jsx-runtime";var n5=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],i5=e=>{let{orientation:t,variant:r,color:o,size:n}=e,i={root:["root",t,r&&`variant${F(r)}`,o&&`color${F(o)}`,n&&`size${F(n)}`]};return J(i,eE,{})},a5=E("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var r,o;let n=(r=t.variants[e.variant])==null?void 0:r[e.color],{bgcolor:i,backgroundColor:a,background:s,p:l,padding:p}=Pr({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),c=to(t,`palette.${i}`)||i||to(t,`palette.${a}`)||a||s||(n==null?void 0:n.backgroundColor)||(n==null?void 0:n.background)||t.vars.palette.background.surface;return m({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":c==="transparent"?"initial":c,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(o=t.variants[e.variant])==null?void 0:o[e.color],l!==void 0&&{"--Tabs-padding":l},p!==void 0&&{"--Tabs-padding":p})}),s5=rE.forwardRef(function(t,r){let o=q({props:t,name:"JoyTabs"}),{children:n,value:i,defaultValue:a,orientation:s="horizontal",direction:l="ltr",component:p,variant:c="plain",color:u="neutral",size:f="md",slots:d={},slotProps:h={}}=o,y=$(o,n5),v=a||(i===void 0?0:void 0),{contextValue:b}=iC(m({},o,{orientation:s,defaultValue:v})),x=m({},o,{orientation:s,direction:l,variant:c,color:u,size:f}),g=i5(x),C=m({},y,{component:p,slots:d,slotProps:h}),[T,P]=M("root",{ref:r,elementType:a5,externalForwardedProps:C,additionalProps:{ref:r,as:p},ownerState:x,className:g.root});return rv(T,m({},P,{children:rv(sC,{value:b,children:rv(dl.Provider,{value:f,children:n})})}))}),Zf=s5;import*as nv from"react";function oE(e){return X("MuiTextarea",e)}var l5=Z("MuiTextarea",["root","textarea","startDecorator","endDecorator","formControl","disabled","error","focused","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft"]),ec=l5;import{jsx as ov}from"react/jsx-runtime";import{jsxs as c5}from"react/jsx-runtime";var p5=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","size","color","variant","startDecorator","endDecorator","minRows","maxRows","component","slots","slotProps"],u5=e=>{let{disabled:t,variant:r,color:o,size:n}=e,i={root:["root",t&&"disabled",r&&`variant${F(r)}`,o&&`color${F(o)}`,n&&`size${F(n)}`],textarea:["textarea"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return J(i,oE,{})},d5=E("div",{name:"JoyTextarea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,o,n,i,a,s;let l=(r=e.variants[`${t.variant}`])==null?void 0:r[t.color];return[m({"--Textarea-radius":e.vars.radius.sm,"--Textarea-gap":"0.5rem","--Textarea-placeholderColor":"inherit","--Textarea-placeholderOpacity":.64,"--Textarea-decoratorColor":e.vars.palette.text.icon,"--Textarea-focused":"0","--Textarea-focusedThickness":e.vars.focus.thickness,"--Textarea-focusedHighlight":(o=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:o[500],'&:not([data-inverted-colors="false"])':m({},t.instanceColor&&{"--_Textarea-focusedHighlight":(n=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:n[500]},{"--Textarea-focusedHighlight":`var(--_Textarea-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Textarea-minHeight":"2rem","--Textarea-paddingBlock":"calc(0.375rem - 0.5px - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.5rem","--Textarea-decoratorChildHeight":"min(1.5rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Textarea-minHeight":"2.25rem","--Textarea-paddingBlock":"calc(0.375rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.75rem","--Textarea-decoratorChildHeight":"min(1.75rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Textarea-minHeight":"3rem","--Textarea-paddingBlock":"calc(0.75rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"1rem","--Textarea-gap":"0.75rem","--Textarea-decoratorChildHeight":"min(2.375rem, var(--Textarea-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--_Textarea-paddingBlock":"max((var(--Textarea-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Textarea-decoratorChildHeight)) / 2, 0px)","--Textarea-decoratorChildRadius":"max(var(--Textarea-radius) - var(--variant-borderWidth, 0px) - var(--_Textarea-paddingBlock), min(var(--_Textarea-paddingBlock) + var(--variant-borderWidth, 0px), var(--Textarea-radius) / 2))","--Button-minHeight":"var(--Textarea-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Textarea-decoratorChildHeight)","--Button-radius":"var(--Textarea-decoratorChildRadius)","--IconButton-radius":"var(--Textarea-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Textarea-minHeight)",cursor:"text",position:"relative",display:"flex",flexDirection:"column",paddingInlineStart:"var(--Textarea-paddingInline)",paddingBlock:"var(--Textarea-paddingBlock)",borderRadius:"var(--Textarea-radius)"},e.typography[`body-${t.size}`],l,{backgroundColor:(i=l==null?void 0:l.backgroundColor)!=null?i:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Textarea-focusedInset, inset) 0 0 0 calc(var(--Textarea-focused) * var(--Textarea-focusedThickness)) var(--Textarea-focusedHighlight)"}}),{"&:hover":m({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null,cursor:"text"}),[`&.${ec.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Textarea-focused":"1"}}]}),f5=E(dg,{name:"JoyTextarea",slot:"Textarea",overridesResolver:(e,t)=>t.textarea})({resize:"none",border:"none",minWidth:0,outline:0,padding:0,paddingInlineEnd:"var(--Textarea-paddingInline)",flex:"auto",alignSelf:"stretch",color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit","&::-webkit-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"}}),m5=E("div",{name:"JoyTextarea",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockEnd:"var(--Textarea-gap)",color:"var(--Textarea-decoratorColor)",cursor:"initial"}),h5=E("div",{name:"JoyTextarea",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockStart:"var(--Textarea-gap)",color:"var(--Textarea-decoratorColor)",cursor:"initial"}),y5=nv.forwardRef(function(t,r){var o,n,i,a,s,l,p,c;let u=q({props:t,name:"JoyTextarea"}),f=Np(u,ec),{propsToForward:d,rootStateClasses:h,inputStateClasses:y,getRootProps:v,getInputProps:b,formControl:x,focused:g,error:C=!1,disabled:T=!1,size:P="md",color:k="neutral",variant:R="outlined",startDecorator:D,endDecorator:O,minRows:B,maxRows:A,component:_,slots:j={},slotProps:N={}}=f,w=$(f,p5),z=(o=(n=t.disabled)!=null?n:x==null?void 0:x.disabled)!=null?o:T,Y=(i=(a=t.error)!=null?a:x==null?void 0:x.error)!=null?i:C,V=(s=(l=t.size)!=null?l:x==null?void 0:x.size)!=null?s:P,S=(p=t.color)!=null?p:Y?"danger":(c=x==null?void 0:x.color)!=null?c:k,ee=m({instanceColor:Y?"danger":t.color},u,{color:S,disabled:z,error:Y,focused:g,size:V,variant:R}),ne=u5(ee),I=m({},w,{component:_,slots:j,slotProps:N}),[pe,ge]=M("root",{ref:r,className:[ne.root,h],elementType:d5,externalForwardedProps:I,getSlotProps:v,ownerState:ee}),[De,ae]=M("textarea",{additionalProps:{id:x==null?void 0:x.htmlFor,"aria-describedby":x==null?void 0:x["aria-describedby"]},className:[ne.textarea,y],elementType:f5,internalForwardedProps:m({},d,{minRows:B,maxRows:A}),externalForwardedProps:I,getSlotProps:b,ownerState:ee}),[W,de]=M("startDecorator",{className:ne.startDecorator,elementType:m5,externalForwardedProps:I,ownerState:ee}),[fe,Ce]=M("endDecorator",{className:ne.endDecorator,elementType:h5,externalForwardedProps:I,ownerState:ee});return c5(pe,m({},ge,{children:[D&&ov(W,m({},de,{children:D})),ov(De,m({},ae)),O&&ov(fe,m({},Ce,{children:O}))]}))}),Qf=y5;import*as At from"react";function nE(e){return X("MuiTooltip",e)}var g5=Z("MuiTooltip",["root","tooltipArrow","arrow","touch","placementLeft","placementRight","placementTop","placementBottom","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]),iE=g5;import{jsx as b5}from"react/jsx-runtime";import{jsxs as aE}from"react/jsx-runtime";var v5=["children","className","component","arrow","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","disablePortal","direction","keepMounted","modifiers","placement","title","color","variant","size","slots","slotProps"],x5=e=>{let{arrow:t,variant:r,color:o,size:n,placement:i,touch:a}=e,s={root:["root",t&&"tooltipArrow",a&&"touch",n&&`size${F(n)}`,o&&`color${F(o)}`,r&&`variant${F(r)}`,`tooltipPlacement${F(i.split("-")[0])}`],arrow:["arrow"]};return J(s,nE,{})},T5=E("div",{name:"JoyTooltip",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var r,o,n;let i=(r=t.variants[e.variant])==null?void 0:r[e.color];return m({},e.size==="sm"&&{"--Icon-fontSize":t.vars.fontSize.md,"--Tooltip-arrowSize":"8px",padding:t.spacing(.25,.625)},e.size==="md"&&{"--Icon-fontSize":t.vars.fontSize.lg,"--Tooltip-arrowSize":"10px",padding:t.spacing(.5,.75)},e.size==="lg"&&{"--Icon-fontSize":t.vars.fontSize.xl,"--Tooltip-arrowSize":"12px",padding:t.spacing(.75,1)},{zIndex:t.vars.zIndex.tooltip,borderRadius:t.vars.radius.sm,boxShadow:t.shadow.sm,wordWrap:"break-word",position:"relative"},e.disableInteractive&&{pointerEvents:"none"},t.typography[`body-${{sm:"xs",md:"sm",lg:"md"}[e.size]}`],i,!i.backgroundColor&&{backgroundColor:t.vars.palette.background.surface},{"&::before":{content:'""',display:"block",position:"absolute",width:(o=e.placement)!=null&&o.match(/(top|bottom)/)?"100%":"calc(10px + var(--variant-borderWidth, 0px))",height:(n=e.placement)!=null&&n.match(/(top|bottom)/)?"calc(10px + var(--variant-borderWidth, 0px))":"100%"},'&[data-popper-placement*="bottom"]::before':{top:0,left:0,transform:"translateY(-100%)"},'&[data-popper-placement*="left"]::before':{top:0,right:0,transform:"translateX(100%)"},'&[data-popper-placement*="right"]::before':{top:0,left:0,transform:"translateX(-100%)"},'&[data-popper-placement*="top"]::before':{bottom:0,left:0,transform:"translateY(100%)"}})}),P5=E("span",{name:"JoyTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e,ownerState:t})=>{var r,o,n;let i=(r=e.variants[t.variant])==null?void 0:r[t.color];return{"--unstable_Tooltip-arrowRotation":0,width:"var(--Tooltip-arrowSize)",height:"var(--Tooltip-arrowSize)",boxSizing:"border-box","&::before":{content:'""',display:"block",position:"absolute",width:0,height:0,border:"calc(var(--Tooltip-arrowSize) / 2) solid",borderLeftColor:"transparent",borderBottomColor:"transparent",borderTopColor:(o=i==null?void 0:i.backgroundColor)!=null?o:e.vars.palette.background.surface,borderRightColor:(n=i==null?void 0:i.backgroundColor)!=null?n:e.vars.palette.background.surface,borderRadius:"0px 2px 0px 0px",boxShadow:`var(--variant-borderWidth, 0px) calc(-1 * var(--variant-borderWidth, 0px)) 0px 0px ${i.borderColor}`,transformOrigin:"center center",transform:"rotate(calc(-45deg + 90deg * var(--unstable_Tooltip-arrowRotation)))"},'[data-popper-placement*="bottom"] &':{top:"calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"},'[data-popper-placement*="top"] &':{"--unstable_Tooltip-arrowRotation":2,bottom:"calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"},'[data-popper-placement*="left"] &':{"--unstable_Tooltip-arrowRotation":1,right:"calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"},'[data-popper-placement*="right"] &':{"--unstable_Tooltip-arrowRotation":3,left:"calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"}}}),em=!1,sE=new En,tc={x:0,y:0};function lE(e,t){return r=>{t&&t(r),e(r)}}function pE(e,t){return r=>{t&&t(r),e(r)}}var C5=At.forwardRef(function(t,r){var o;let n=q({props:t,name:"JoyTooltip"}),{children:i,className:a,component:s,arrow:l=!1,describeChild:p=!1,disableFocusListener:c=!1,disableHoverListener:u=!1,disableInteractive:f=!1,disableTouchListener:d=!1,enterDelay:h=100,enterNextDelay:y=0,enterTouchDelay:v=700,followCursor:b=!1,id:x,leaveDelay:g=0,leaveTouchDelay:C=1500,onClose:T,onOpen:P,open:k,disablePortal:R,direction:D,keepMounted:O,modifiers:B,placement:A="bottom",title:_,color:j="neutral",variant:N="solid",size:w="md",slots:z={},slotProps:Y={}}=n,V=$(n,v5),[S,ee]=At.useState(),[ne,I]=At.useState(null),pe=At.useRef(!1),ge=f||b,De=ni(),ae=ni(),W=ni(),de=ni(),[fe,Ce]=jt({controlled:k,default:!1,name:"Tooltip",state:"open"}),ve=fe,Fe=We(x),Je=At.useRef(),te=Ht(()=>{Je.current!==void 0&&(document.body.style.WebkitUserSelect=Je.current,Je.current=void 0),de.clear()});At.useEffect(()=>te,[te]);let Q=Xe=>{sE.clear(),em=!0,Ce(!0),P&&!ve&&P(Xe)},he=Ht(Xe=>{sE.start(800+g,()=>{em=!1}),Ce(!1),T&&ve&&T(Xe),De.start(150,()=>{pe.current=!1})}),be=Xe=>{pe.current&&Xe.type!=="touchstart"||(S&&S.removeAttribute("title"),ae.clear(),W.clear(),h||em&&y?ae.start(em?y:h,()=>{Q(Xe)}):Q(Xe))},$e=Xe=>{ae.clear(),W.start(g,()=>{he(Xe)})},{isFocusVisibleRef:we,onBlur:Ae,onFocus:Me,ref:Ge}=Qr(),[,at]=At.useState(!1),K=Xe=>{Ae(Xe),we.current===!1&&(at(!1),$e(Xe))},ce=Xe=>{S||ee(Xe.currentTarget),Me(Xe),we.current===!0&&(at(!0),be(Xe))},Pe=Xe=>{pe.current=!0;let Kr=i.props;Kr.onTouchStart&&Kr.onTouchStart(Xe)},U=be,G=$e,se=Xe=>{Pe(Xe),W.clear(),De.clear(),te(),Je.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",de.start(v,()=>{document.body.style.WebkitUserSelect=Je.current,be(Xe)})},Ie=Xe=>{i.props.onTouchEnd&&i.props.onTouchEnd(Xe),te(),W.start(C,()=>{he(Xe)})};At.useEffect(()=>{if(!ve)return;function Xe(Kr){(Kr.key==="Escape"||Kr.key==="Esc")&&he(Kr)}return document.addEventListener("keydown",Xe),()=>{document.removeEventListener("keydown",Xe)}},[he,ve]);let ie=Ee(ee,r),oe=Ee(Ge,ie),Se=Ee(i.ref,oe);typeof _!="number"&&!_&&(ve=!1);let Ne=At.useRef(null),nt=Xe=>{let Kr=i.props;Kr.onMouseMove&&Kr.onMouseMove(Xe),tc={x:Xe.clientX,y:Xe.clientY},Ne.current&&Ne.current.update()},qe={},$r=typeof _=="string";p?(qe.title=!ve&&$r&&!u?_:null,qe["aria-describedby"]=ve?Fe:null):(qe["aria-label"]=$r?_:null,qe["aria-labelledby"]=ve&&!$r?Fe:null);let yt=m({},qe,V,{component:s},i.props,{className:ye(a,i.props.className),onTouchStart:Pe,ref:Se},b?{onMouseMove:nt}:{}),st={};d||(yt.onTouchStart=se,yt.onTouchEnd=Ie),u||(yt.onMouseOver=lE(U,yt.onMouseOver),yt.onMouseLeave=lE(G,yt.onMouseLeave),ge||(st.onMouseOver=U,st.onMouseLeave=G)),c||(yt.onFocus=pE(ce,yt.onFocus),yt.onBlur=pE(K,yt.onBlur),ge||(st.onFocus=ce,st.onBlur=K));let dt=m({},n,{arrow:l,disableInteractive:ge,placement:A,touch:pe.current,color:j,variant:N,size:w}),Ct=x5(dt),Bt=m({},V,{component:s,slots:z,slotProps:Y}),ra=At.useMemo(()=>[{name:"arrow",enabled:!!ne,options:{element:ne,padding:6}},{name:"offset",options:{offset:[0,10]}},...B||[]],[ne,B]),[Cn,bt]=M("root",{additionalProps:m({id:Fe,popperRef:Ne,placement:A,anchorEl:b?{getBoundingClientRect:()=>({top:tc.y,left:tc.x,right:tc.x,bottom:tc.y,width:0,height:0})}:S,open:S?ve:!1,disablePortal:R,keepMounted:O,direction:D,modifiers:ra},st),ref:null,className:Ct.root,elementType:T5,externalForwardedProps:Bt,ownerState:dt}),[Qn,kn]=M("arrow",{ref:I,className:Ct.arrow,elementType:P5,externalForwardedProps:Bt,ownerState:dt});return aE(At.Fragment,{children:[At.isValidElement(i)&&At.cloneElement(i,yt),aE(Cn,m({},bt,!((o=n.slots)!=null&&o.root)&&{as:Qt,slots:{root:s||"div"}},{children:[_,l?b5(Qn,m({},kn)):null]}))]})}),tm=C5;import{motion as rm}from"framer-motion";import*as zi from"react/jsx-runtime";import"react";var z$e=cn(ty());var Pn=zi.Fragment;function L(e,t,r){return Ts.call(t,"css")?zi.jsx(Bu,Mu(e,t),r):zi.jsx(e,t,r)}function ke(e,t,r){return Ts.call(t,"css")?zi.jsxs(Bu,Mu(e,t),r):zi.jsxs(e,t,r)}var k5=rm($d),om=k5;om.displayName="AccordionSummary";var S5=rm(Ad),nm=S5;nm.displayName="AccordionDetails";var R5=rm(Dd);function im(e){let s=e,{summary:t,details:r,variant:o,color:n}=s,i=xe(s,["summary","details","variant","color"]),a=o==="solid"?"solid":void 0;return ke(R5,ue(H({variant:a,color:n},i),{children:[L(om,{variant:a,color:n,children:t}),L(nm,{variant:a,color:n,children:r})]}))}im.displayName="Accordion";var E5=rm(Ld);function iv(e){let i=e,{variant:t,color:r,items:o}=i,n=xe(i,["variant","color","items"]);return L(E5,ue(H({variant:t,color:r},n),{children:o.map((a,s)=>L(im,{summary:a.summary,details:a.details,index:s,variant:t,color:r},s))}))}iv.displayName="Accordions";import{motion as D5}from"framer-motion";import{motion as I5}from"framer-motion";var O5=I5(Qd),on=e=>L(O5,H({},e));on.displayName="Typography";var Cr=on;import{motion as _5}from"framer-motion";var w5=_5(Uf),rc=w5;rc.displayName="Stack";var Wr=rc;var A5=E(D5(Vd))({alignItems:"flex-start",fontWeight:"unset"});function av(e){let s=e,{title:t,content:r,actions:o,color:n="primary"}=s,i=xe(s,["title","content","actions","color"]),a=e.invertedColors||e.variant==="solid";return L(A5,ue(H({},i),{color:n,endDecorator:o,invertedColors:a,children:ke(Wr,{children:[t&&L(Cr,{level:"title-sm",color:n,children:t}),L(Cr,{level:"body-sm",color:n,children:r})]})}))}av.displayName="Alert";import vE,{useEffect as q5,useMemo as lm,useRef as K5,useState as Y5}from"react";import*as Un from"react";import{flushSync as F5}from"react-dom";function fl(e,t,r){var i;let o=(i=r.initialDeps)!=null?i:[],n;return()=>{var a,s,l,p;let c;r.key&&((a=r.debug)!=null&&a.call(r))&&(c=Date.now());let u=e();if(!(u.length!==o.length||u.some((h,y)=>o[y]!==h)))return n;o=u;let d;if(r.key&&((s=r.debug)!=null&&s.call(r))&&(d=Date.now()),n=t(...u),r.key&&((l=r.debug)!=null&&l.call(r))){let h=Math.round((Date.now()-c)*100)/100,y=Math.round((Date.now()-d)*100)/100,v=y/16,b=(x,g)=>{for(x=String(x);x.length<g;)x=" "+x;return x};console.info(`%c\u23F1 ${b(y,5)} /${b(h,5)} ms`,`
|
|
115
115
|
font-size: .6rem;
|
|
116
116
|
font-weight: bold;
|
|
117
|
-
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(p=r==null?void 0:r.onChange)==null||p.call(r,n),n}}function am(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var cE=(e,t)=>Math.abs(e-t)<1,uE=(e,t)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>e.apply(this,o),t)}};var N5=e=>e,L5=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let n=t;n<=r;n++)o.push(n);return o},fE=(e,t)=>{let r=e.scrollElement;if(!r)return;let o=i=>{let{width:a,height:s}=i;t({width:Math.round(a),height:Math.round(s)})};if(o(r.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};let n=new ResizeObserver(i=>{let a=i[0];if(a!=null&&a.borderBoxSize){let s=a.borderBoxSize[0];if(s){o({width:s.inlineSize,height:s.blockSize});return}}o(r.getBoundingClientRect())});return n.observe(r,{box:"border-box"}),()=>{n.unobserve(r)}},dE={passive:!0};var M5=typeof window>"u"?!0:"onscrollend"in window,mE=(e,t)=>{let r=e.scrollElement;if(!r)return;let o=0,n=M5?()=>{}:uE(()=>{t(o,!1)},150),i=l=>()=>{o=r[e.options.horizontal?"scrollLeft":"scrollTop"],n(),t(o,l)},a=i(!0),s=i(!1);return s(),r.addEventListener("scroll",a,dE),r.addEventListener("scrollend",s,dE),()=>{r.removeEventListener("scroll",a),r.removeEventListener("scrollend",s)}};var B5=(e,t,r)=>{if(t!=null&&t.borderBoxSize){let o=t.borderBoxSize[0];if(o)return Math.round(o[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])};var hE=(e,{adjustments:t=0,behavior:r},o)=>{var n,i;let a=e+t;(i=(n=o.scrollElement)==null?void 0:n.scrollTo)==null||i.call(n,{[o.options.horizontal?"left":"top"]:a,behavior:r})},sm=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let r=null,o=()=>r||(typeof ResizeObserver<"u"?r=new ResizeObserver(n=>{n.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var n;return(n=o())==null?void 0:n.disconnect()},observe:n=>{var i;return(i=o())==null?void 0:i.observe(n,{box:"border-box"})},unobserve:n=>{var i;return(i=o())==null?void 0:i.unobserve(n)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([o,n])=>{typeof n>"u"&&delete r[o]}),this.options=H({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:N5,rangeExtractor:L5,onChange:()=>{},measureElement:B5,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},r)},this.notify=(r,o)=>{var p;var n,i;let{startIndex:a,endIndex:s}=(p=this.range)!=null?p:{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(r||a!==(l==null?void 0:l.startIndex)||s!==(l==null?void 0:l.endIndex))&&((i=(n=this.options).onChange)==null||i.call(n,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{let r=this.options.getScrollElement();this.scrollElement!==r&&(this.cleanup(),this.scrollElement=r,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.scrollOffset<o?"forward":"backward":null,this.scrollOffset=o;let i=this.isScrolling;this.isScrolling=n,this.notify(i!==n,n)})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=fl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(r,o,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:o,scrollMargin:n,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(r,o)=>{let n=new Map,i=new Map;for(let a=o-1;a>=0;a--){let s=r[a];if(n.has(s.lane))continue;let l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&n.set(s.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurements=fl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:o,scrollMargin:n,getItemKey:i},a)=>{let s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let l=this.measurementsCache.slice(0,s);for(let p=s;p<r;p++){let c=i(p),u=this.options.lanes===1?l[p-1]:this.getFurthestMeasurement(l,p),f=u?u.end+this.options.gap:o+n,d=a.get(c),h=typeof d=="number"?d:this.options.estimateSize(p),y=f+h,v=u?u.lane:p%this.options.lanes;l[p]={index:p,start:f,size:h,end:y,key:c,lane:v}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fl(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(r,o,n)=>this.range=r.length>0&&o>0?z5({measurements:r,outerSize:o,scrollOffset:n}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=fl(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,o,n,i)=>o===null?[]:r({startIndex:o.startIndex,endIndex:o.endIndex,overscan:n,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{let o=this.options.indexAttribute,n=r.getAttribute(o);return n?parseInt(n,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(r,o)=>{let n=this.measurementsCache[this.indexFromElement(r)];if(!n||!r.isConnected){this.measureElementCache.forEach((s,l)=>{s===r&&(this.observer.unobserve(r),this.measureElementCache.delete(l))});return}let i=this.measureElementCache.get(n.key);i!==r&&(i&&this.observer.unobserve(i),this.observer.observe(r),this.measureElementCache.set(n.key,r));let a=this.options.measureElement(r,o,this);this.resizeItem(n,a)},this.resizeItem=(r,o)=>{var a;let n=(a=this.itemSizeCache.get(r.key))!=null?a:r.size,i=o-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.scrollOffset+this.scrollAdjustments)&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,o)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=fl(()=>[this.getIndexes(),this.getMeasurements()],(r,o)=>{let n=[];for(let i=0,a=r.length;i<a;i++){let s=r[i],l=o[s];n.push(l)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{let o=this.getMeasurements();return am(o[yE(0,o.length-1,n=>am(o[n]).start,r)])},this.getOffsetForAlignment=(r,o)=>{let n=this.getSize();o==="auto"&&(r<=this.scrollOffset?o="start":r>=this.scrollOffset+n?o="end":o="start"),o==="start"?r=r:o==="end"?r=r-n:o==="center"&&(r=r-n/2);let i=this.options.horizontal?"scrollWidth":"scrollHeight",s=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,o="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));let n=am(this.getMeasurements()[r]);if(o==="auto")if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)o="end";else if(n.start<=this.scrollOffset+this.options.scrollPaddingStart)o="start";else return[this.scrollOffset,o];let i=o==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,o),o]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:o="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,o),{adjustments:void 0,behavior:n})},this.scrollToIndex=(r,{align:o="auto",behavior:n}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let[i,a]=this.getOffsetForIndex(r,o);this._scrollToOffset(i,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(r))){let[l]=this.getOffsetForIndex(r,a);cE(l,this.scrollOffset)||this.scrollToIndex(r,{align:a,behavior:n})}else this.scrollToIndex(r,{align:a,behavior:n})}))},this.scrollBy=(r,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+r,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var i;var r;let o=this.getMeasurements(),n;return o.length===0?n=this.options.paddingStart:n=this.options.lanes===1?(i=(r=o[o.length-1])==null?void 0:r.end)!=null?i:0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:o,behavior:n})=>{this.options.scrollToFn(r,{behavior:n,adjustments:o},this)},this.measure=()=>{var r,o;this.itemSizeCache=new Map,(o=(r=this.options).onChange)==null||o.call(r,this,!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(r=>{this.itemSizeCache.set(r.key,r.size)}),this.notify(!1,!1)}},yE=(e,t,r,o)=>{for(;e<=t;){let n=(e+t)/2|0,i=r(n);if(i<o)e=n+1;else if(i>o)t=n-1;else return n}return e>0?e-1:0};function z5({measurements:e,outerSize:t,scrollOffset:r}){let o=e.length-1,i=yE(0,o,s=>e[s].start,r),a=i;for(;a<o&&e[a].end<r+t;)a++;return{startIndex:i,endIndex:a}}var $5=typeof document<"u"?Un.useLayoutEffect:Un.useEffect;function V5(e){let t=Un.useReducer(()=>({}),{})[1],r=ue(H({},e),{onChange:(n,i)=>{var a;i?F5(t):t(),(a=e.onChange)==null||a.call(e,n,i)}}),[o]=Un.useState(()=>new sm(r));return o.setOptions(r),Un.useEffect(()=>o._didMount(),[]),$5(()=>o._willUpdate()),o}function gE(e){return V5(H({observeElementRect:fE,observeElementOffset:mE,scrollToFn:hE},e))}import{motion as j5}from"framer-motion";var H5=E(j5(bf))({width:"100%"}),oc=H5;oc.displayName="FormControl";var tr=oc;import{motion as U5}from"framer-motion";var W5=U5(Cf),nc=W5;nc.displayName="FormLabel";var kr=nc;import{motion as G5}from"framer-motion";var J5=G5(Tf),ic=J5;ic.displayName="FormHelperText";var Jt=ic;var X5=E(Qt,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Z5=vE.forwardRef((e,t)=>{let h=e,{anchorEl:r,open:o,modifiers:n,children:i,ownerState:{loading:a}}=h,s=xe(h,["anchorEl","open","modifiers","children","ownerState"]),l=K5(null),p=i[0].every(y=>y.hasOwnProperty("group")),c=a?(console.log(i[1]),[i[1]]):i[0].length===0?[i[2]]:p?i[0].flatMap(y=>[L(La,{component:"li",children:y.group},y.key),...y.children]):i[0],u=gE({count:c.length,estimateSize:()=>36,getScrollElement:()=>l.current,overscan:5}),f=u.getVirtualItems(),d=u.getTotalSize();return q5(()=>{o&&u.measure()},[o]),L(X5,{ref:t,anchorEl:r,open:o,modifiers:n,children:L(Lp,ue(H({},s),{sx:{overflow:"auto"},ref:l,children:L("div",{style:{height:`${d}px`,position:"relative"},children:f.map(({index:y,size:v,start:b})=>vE.cloneElement(c[y],{style:{position:"absolute",top:0,left:0,width:"100%",height:`${v}px`,transform:`translateY(${b}px)`}}))})}))})});function sv(e){let x=e,{label:t,error:r,helperText:o,color:n,size:i,disabled:a,required:s,onChange:l}=x,p=xe(x,["label","error","helperText","color","size","disabled","required","onChange"]),[c,u]=Y5(e.value||e.defaultValue),f=lm(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=lm(()=>e.loading?{value:"",label:"",startDecorator:L(Yo,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof c=="string"&&f.find(g=>g.value===c)||c,[c,e.options,e.loading]),h=lm(()=>(d==null?void 0:d.startDecorator)||e.startDecorator,[d]),y=lm(()=>(d==null?void 0:d.endDecorator)||e.endDecorator,[d]),v=(g,C)=>{u(C);let T=C;l==null||l(ue(H({},g),{target:ue(H({},g.target),{value:T==null?void 0:T.value})}))},b=L(Kd,ue(H({},p),{required:s,onChange:v,color:n,value:d,options:f,size:i,disabled:a,startDecorator:h,endDecorator:y,getOptionLabel:g=>`${g.value||""}`,slots:{listbox:Z5},renderOption:(g,C)=>ke(Mp,ue(H({},g),{children:[C.startDecorator&&L(al,{sx:{marginInlineEnd:"var(--Input-gap)"},children:C.startDecorator}),C.label,C.endDecorator&&L(al,{sx:{marginInlineStart:"var(--Input-gap)"},children:C.endDecorator})]})),renderGroup:g=>g}));return t?ke(tr,{required:s,color:n,size:i,error:r,disabled:a,children:[L(kr,{children:t}),b,o&&L(Jt,{children:o})]}):b}sv.displayName="Autocomplete";import{motion as Q5}from"framer-motion";var eU=Q5(Zd),ac=eU;ac.displayName="Box";var pm=ac;import{motion as lv}from"framer-motion";var tU=lv(Rf),sc=e=>L(tU,H({},e));sc.displayName="Menu";var rU=lv(Of),lc=e=>L(rU,H({},e));lc.displayName="MenuButton";var oU=lv(wf),pc=e=>L(oU,H({},e));pc.displayName="MenuItem";var bE=sc;import{motion as nU}from"framer-motion";var iU=nU(sd),cc=iU;cc.displayName="Dropdown";var xE=cc;function pv(e){let v=e,{crumbs:t,size:r,startCrumbCount:o=1,endCrumbCount:n=3,slots:b={link:$a}}=v,x=b,{link:i}=x,a=xe(x,["link"]),g=v,{slotProps:C={link:{color:"neutral"}}}=g,T=C,{link:s}=T,l=xe(T,["link"]),P=g,{collapsed:p=!0}=P,c=xe(P,["crumbs","size","startCrumbCount","endCrumbCount","slots","slotProps","collapsed"]),u=k=>k.type==="link"&&i?L(i,ue(H({to:k.linkHref,href:k.linkHref},s),{children:k.label})):L(Cr,{children:k.label});if(!p)return L($p,ue(H({size:r,slots:a,slotProps:l},c),{children:t.map(k=>L(u,H({},k)))}));let f=Math.max(1,n),d=t.slice(0,o).map(k=>L(u,H({},k))),h=(o+f>t.length?t.slice(o):t.slice(-f)).map(k=>L(u,H({},k))),y=t.slice(o,-f).map(k=>L(pc,{children:L(u,H({},k))}));return ke($p,ue(H({size:r,slots:a,slotProps:l},c),{children:[d,y.length&&ke(xE,{children:[L(lc,{size:r,variant:"plain",children:"..."}),L(bE,{size:r,children:y})]}),h]}))}pv.displayName="Breadcrumbs";import{forwardRef as aU}from"react";import{motion as sU}from"framer-motion";var lU=sU(tf),uc=aU((e,t)=>L(lU,H({ref:t},e)));uc.displayName="Button";var Et=uc;import{Fragment as mc,forwardRef as YU,useMemo as $E}from"react";var dc=F;import*as mm from"react";import*as dm from"react";function cv(e,t){return m({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var pU={black:"#000",white:"#fff"},ml=pU;var cU={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},TE=cU;var uU={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ja=uU;var dU={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ha=dU;var fU={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},hl=fU;var mU={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ua=mU;var hU={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Wa=hU;var yU={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ga=yU;var gU=["mode","contrastThreshold","tonalOffset"],PE={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ml.white,default:ml.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},uv={text:{primary:ml.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ml.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function CE(e,t,r,o){let n=o.light||o,i=o.dark||o*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=RP(e.main,n):t==="dark"&&(e.dark=SP(e.main,i)))}function vU(e="light"){return e==="dark"?{main:Ua[200],light:Ua[50],dark:Ua[400]}:{main:Ua[700],light:Ua[400],dark:Ua[800]}}function bU(e="light"){return e==="dark"?{main:ja[200],light:ja[50],dark:ja[400]}:{main:ja[500],light:ja[300],dark:ja[700]}}function xU(e="light"){return e==="dark"?{main:Ha[500],light:Ha[300],dark:Ha[700]}:{main:Ha[700],light:Ha[400],dark:Ha[800]}}function TU(e="light"){return e==="dark"?{main:Wa[400],light:Wa[300],dark:Wa[700]}:{main:Wa[700],light:Wa[500],dark:Wa[900]}}function PU(e="light"){return e==="dark"?{main:Ga[400],light:Ga[300],dark:Ga[700]}:{main:Ga[800],light:Ga[500],dark:Ga[900]}}function CU(e="light"){return e==="dark"?{main:hl[400],light:hl[300],dark:hl[700]}:{main:"#ed6c02",light:hl[500],dark:hl[900]}}function dv(e){let{mode:t="light",contrastThreshold:r=3,tonalOffset:o=.2}=e,n=$(e,gU),i=e.primary||vU(t),a=e.secondary||bU(t),s=e.error||xU(t),l=e.info||TU(t),p=e.success||PU(t),c=e.warning||CU(t);function u(y){return kP(y,uv.text.primary)>=r?uv.text.primary:PE.text.primary}let f=({color:y,name:v,mainShade:b=500,lightShade:x=300,darkShade:g=700})=>{if(y=m({},y),!y.main&&y[b]&&(y.main=y[b]),!y.hasOwnProperty("main"))throw new Error(fr(11,v?` (${v})`:"",b));if(typeof y.main!="string")throw new Error(fr(12,v?` (${v})`:"",JSON.stringify(y.main)));return CE(y,"light",x,o),CE(y,"dark",g,o),y.contrastText||(y.contrastText=u(y.main)),y},d={dark:uv,light:PE};return it(m({common:m({},ml),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:p,name:"success"}),grey:TE,contrastThreshold:r,getContrastText:u,augmentColor:f,tonalOffset:o},d[t]),n)}var kU=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function SU(e){return Math.round(e*1e5)/1e5}var kE={textTransform:"uppercase"},SE='"Roboto", "Helvetica", "Arial", sans-serif';function fv(e,t){let r=typeof t=="function"?t(e):t,{fontFamily:o=SE,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:p=16,allVariants:c,pxToRem:u}=r,f=$(r,kU),d=n/14,h=u||(b=>`${b/p*d}rem`),y=(b,x,g,C,T)=>m({fontFamily:o,fontWeight:b,fontSize:h(x),lineHeight:g},o===SE?{letterSpacing:`${SU(C/x)}em`}:{},T,c),v={h1:y(i,96,1.167,-1.5),h2:y(i,60,1.2,-.5),h3:y(a,48,1.167,0),h4:y(a,34,1.235,.25),h5:y(a,24,1.334,0),h6:y(s,20,1.6,.15),subtitle1:y(a,16,1.75,.15),subtitle2:y(s,14,1.57,.1),body1:y(a,16,1.5,.15),body2:y(a,14,1.43,.15),button:y(s,14,1.75,.4,kE),caption:y(a,12,1.66,.4),overline:y(a,12,2.66,1,kE),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return it(m({htmlFontSize:p,pxToRem:h,fontFamily:o,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},v),f,{clone:!1})}function vt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${.2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${.14})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${.12})`].join(",")}var RU=["none",vt(0,2,1,-1,0,1,1,0,0,1,3,0),vt(0,3,1,-2,0,2,2,0,0,1,5,0),vt(0,3,3,-2,0,3,4,0,0,1,8,0),vt(0,2,4,-1,0,4,5,0,0,1,10,0),vt(0,3,5,-1,0,5,8,0,0,1,14,0),vt(0,3,5,-1,0,6,10,0,0,1,18,0),vt(0,4,5,-2,0,7,10,1,0,2,16,1),vt(0,5,5,-3,0,8,10,1,0,3,14,2),vt(0,5,6,-3,0,9,12,1,0,3,16,2),vt(0,6,6,-3,0,10,14,1,0,4,18,3),vt(0,6,7,-4,0,11,15,1,0,4,20,3),vt(0,7,8,-4,0,12,17,2,0,5,22,4),vt(0,7,8,-4,0,13,19,2,0,5,24,4),vt(0,7,9,-4,0,14,21,2,0,5,26,4),vt(0,8,9,-5,0,15,22,2,0,6,28,5),vt(0,8,10,-5,0,16,24,2,0,6,30,5),vt(0,8,11,-5,0,17,26,2,0,6,32,5),vt(0,9,11,-5,0,18,28,2,0,7,34,6),vt(0,9,12,-6,0,19,29,2,0,7,36,6),vt(0,10,13,-6,0,20,31,3,0,8,38,7),vt(0,10,13,-6,0,21,33,3,0,8,40,7),vt(0,10,14,-6,0,22,35,3,0,8,42,7),vt(0,11,14,-7,0,23,36,3,0,9,44,8),vt(0,11,15,-7,0,24,38,3,0,9,46,8)],RE=RU;var EU=["duration","easing","delay"],IU={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},OU={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function EE(e){return`${Math.round(e)}ms`}function _U(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function mv(e){let t=m({},IU,e.easing),r=m({},OU,e.duration);return m({getAutoHeightDuration:_U,create:(n=["all"],i={})=>{let{duration:a=r.standard,easing:s=t.easeInOut,delay:l=0}=i,p=$(i,EU);return(Array.isArray(n)?n:[n]).map(c=>`${c} ${typeof a=="string"?a:EE(a)} ${s} ${typeof l=="string"?l:EE(l)}`).join(",")}},e,{easing:t,duration:r})}var wU={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},IE=wU;var DU=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function AU(e={},...t){let{mixins:r={},palette:o={},transitions:n={},typography:i={}}=e,a=$(e,DU);if(e.vars)throw new Error(fr(18));let s=dv(o),l=bo(e),p=it(l,{mixins:cv(l.breakpoints,r),palette:s,shadows:RE.slice(),typography:fv(s,i),transitions:mv(n),zIndex:m({},IE)});return p=it(p,a),p=t.reduce((c,u)=>it(c,u),p),p.unstable_sxConfig=m({},go,a==null?void 0:a.unstable_sxConfig),p.unstable_sx=function(u){return vo({sx:u,theme:this})},p}var OE=AU;var NU=OE(),cm=NU;var um="$$material";function hv({props:e,name:t}){return zo({props:e,name:t,defaultTheme:cm,themeId:um})}var LU=e=>lp(e)&&e!=="classes";var MU=si({themeId:um,defaultTheme:cm,rootShouldForwardProp:LU}),_E=MU;function wE(e){return mr("MuiSvgIcon",e)}var o5e=eo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);import{jsx as zU}from"react/jsx-runtime";import{jsxs as FU}from"react/jsx-runtime";var BU=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],$U=e=>{let{color:t,fontSize:r,classes:o}=e,n={root:["root",t!=="inherit"&&`color${dc(t)}`,`fontSize${dc(r)}`]};return J(n,wE,o)},VU=_E("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${dc(r.color)}`],t[`fontSize${dc(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,o,n,i,a,s,l,p,c,u,f,d,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(o=r.create)==null?void 0:o.call(r,"fill",{duration:(n=e.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem",large:((p=e.typography)==null||(c=p.pxToRem)==null?void 0:c.call(p,35))||"2.1875rem"}[t.fontSize],color:(u=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?u:{action:(d=(e.vars||e).palette)==null||(d=d.action)==null?void 0:d.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),DE=dm.forwardRef(function(t,r){let o=hv({props:t,name:"MuiSvgIcon"}),{children:n,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:p,inheritViewBox:c=!1,titleAccess:u,viewBox:f="0 0 24 24"}=o,d=$(o,BU),h=dm.isValidElement(n)&&n.type==="svg",y=m({},o,{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:h}),v={};c||(v.viewBox=f);let b=$U(y);return FU(VU,m({as:s,className:ye(b.root,i),focusable:"false",color:p,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:r},v,d,h&&n.props,{ownerState:y,children:[h?n.props.children:n,u?zU("title",{children:u}):null]}))});DE.muiName="SvgIcon";var fm=DE;import{jsx as jU}from"react/jsx-runtime";function ao(e,t){function r(o,n){return jU(fm,m({"data-testid":`${t}Icon`,ref:n},o,{children:e}))}return r.muiName=fm.muiName,mm.memo(mm.forwardRef(r))}import{jsx as HU}from"react/jsx-runtime";var hm=ao(HU("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");import{jsx as UU}from"react/jsx-runtime";var ym=ao(UU("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");import{AnimatePresence as VE,motion as XU}from"framer-motion";var AE=e=>{let t=[],r=new Date(e.getFullYear(),e.getMonth(),1),o=new Date(e.getFullYear(),e.getMonth()+1,0),n=Math.ceil((r.getDay()+1)/7),i=Math.ceil((o.getDate()+r.getDay())/7),a=1;for(let s=1;s<=i;s++){let l=[];for(let p=1;p<=7;p++)s===n&&p<r.getDay()+1||a>o.getDate()?l.push(void 0):(l.push(a),a++);t.push(l)}return t},NE=(e,t)=>e.toLocaleString(t,{year:"numeric"}),yv=(e,t)=>e.toLocaleString(t,{year:"numeric",month:"long"}),LE=(e,t)=>new Date(0,e).toLocaleString(t,{month:"short"}),ME=e=>{let t=new Date().getDay(),r=new Date;return r.setDate(r.getDate()-t),Array.from({length:7}).map(()=>{let o=r.toLocaleString(e,{weekday:"short"});return r.setDate(r.getDate()+1),o})},BE=e=>{let t=new Date,r=new Date(e);return r.setHours(0,0,0,0),t.setHours(0,0,0,0),r.getTime()===t.getTime()},gv=(e,t)=>{let r=new Date(e),o=new Date(t);return r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()},Wn=(e,t,r)=>{let o=new Date(r);o.setHours(0,0,0,0);let n=new Date(Math.min(e.getTime(),t.getTime())),i=new Date(Math.max(e.getTime(),t.getTime()));return o>=n&&o<=i},gm=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();import{motion as WU}from"framer-motion";var GU=WU(Gd),fc=e=>L(GU,H({},e));fc.displayName="IconButton";var Gr=fc;import{useCallback as JU,useMemo as qU,useState as vm}from"react";var KU=(e,t)=>t.includes(e)?e:t[0],zE=e=>{var y,v;let[t,r]=vm(()=>KU(e.view||"day",e.views||["day","month"])),[o,n]=vm(e.defaultValue),[i,a]=vm(()=>{var x,g;let b=new Date;return b.setDate(1),b.setHours(0,0,0,0),((x=e.value)==null?void 0:x[0])||((g=e.defaultValue)==null?void 0:g[0])||b}),[[s,l],p]=vm([0,0]),c=(y=e.view)!=null?y:t,u=b=>{p([s+b,b])},f=JU(b=>{var x;a(b),c==="month"?i.getFullYear()!==b.getFullYear()&&u(b>i?1:-1):u(b>i?1:-1),(x=e.onMonthChange)==null||x.call(e,b)},[e.onMonthChange,i,c]),d=q({props:ue(H({locale:"default",views:["day","month"],view:c,value:(v=e.value)!=null?v:o},e),{onChange:e.value?e.onChange:b=>{var x;n(b),(x=e.onChange)==null||x.call(e,b)},onMonthChange:f,onViewChange:()=>{let b=c==="month"?"day":"month";!(!e.views||e.views.includes(b))||e.view===b||(e.onViewChange?e.onViewChange(b):r(b))}}),name:"Calendar"}),h=qU(()=>ue(H({},d),{viewMonth:i,direction:l}),[d,i,l]);return[d,h]};import{useCallback as yl,useState as FE}from"react";var bm=e=>{let[t,r]=FE(null),[o,n]=FE(null);return{calendarTitle:e.view==="month"?NE(e.viewMonth,e.locale||"default"):yv(e.viewMonth,e.locale||"default"),onPrev:yl(()=>{var i,a;if(e.view==="day"){let s=new Date(e.viewMonth||new Date);s.setMonth(s.getMonth()-1),(i=e.onMonthChange)==null||i.call(e,s)}else if(e.view==="month"){let s=new Date(e.viewMonth||new Date);s.setFullYear(s.getFullYear()-1),(a=e.onMonthChange)==null||a.call(e,s)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:yl(()=>{var i,a;if(e.view==="day"){let s=new Date(e.viewMonth||new Date);s.setMonth(s.getMonth()+1),(i=e.onMonthChange)==null||i.call(e,s)}else if(e.view==="month"){let s=new Date(e.viewMonth||new Date);s.setFullYear(s.getFullYear()+1),(a=e.onMonthChange)==null||a.call(e,s)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:yl(i=>{let a=new Date(e.viewMonth||new Date);a.setHours(0,0,0,0),a.setDate(i);let s=e.rangeSelection&&e.value&&e.value[0]&&(t&&Wn(e.value[0],t,a)||e.value[1]&&Wn(e.value[0],e.value[1],a));return{"aria-label":a.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,t]),getMonthCellProps:yl(i=>{var p;let a=new Date(e.viewMonth||new Date);a.setDate(1),a.setHours(0,0,0,0),a.setMonth(i);let l=!((p=e.views)!=null&&p.find(c=>c==="day"))&&e.rangeSelection&&e.value&&e.value[0]&&(o&&Wn(e.value[0],o,a)||e.value[1]&&Wn(e.value[0],e.value[1],a));return{"aria-label":a.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getPickerDayProps:yl(i=>{var c,u;let a=new Date(e.viewMonth||new Date);a.setHours(0,0,0,0),a.setDate(i);let s=!!e.value&&(gv(a,e.value[0])||e.value[1]&&gv(a,e.value[1])),l=e.rangeSelection&&e.value&&e.value[0]&&(t&&Wn(e.value[0],t,a)||e.value[1]&&Wn(e.value[0],e.value[1],a)),p=()=>{var f,d,h,y;e.rangeSelection?e.value?e.value[0]&&!e.value[1]?(d=e.onChange)==null||d.call(e,[new Date(Math.min(e.value[0].getTime(),a.getTime())),new Date(Math.max(e.value[0].getTime(),a.getTime()))]):(h=e.onChange)==null||h.call(e,[a,void 0]):(f=e.onChange)==null||f.call(e,[a,void 0]):(y=e.onChange)==null||y.call(e,[a,void 0]),r(null)};return{isToday:BE(a),isSelected:s,onClick:p,onMouseEnter:e.rangeSelection&&((c=e.value)!=null&&c[0])&&!((u=e.value)!=null&&u[1])?()=>r(a):void 0,disabled:e.minDate&&a<e.minDate||e.maxDate&&a>e.maxDate||e.disableFuture&&a>new Date||e.disablePast&&a<(()=>{let f=new Date;return f.setHours(0,0,0,0),f})(),tabIndex:-1,"aria-label":a.toLocaleDateString(),"aria-selected":s?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t]),getPickerMonthProps:yl(i=>{var u,f,d;let a=new Date(e.viewMonth||new Date);a.setDate(1),a.setHours(0,0,0,0),a.setMonth(i);let s=!((u=e.views)!=null&&u.find(h=>h==="day"))&&e.rangeSelection,l=!!e.value&&(gm(a,e.value[0])||e.value[1]&&gm(a,e.value[1])),p=s&&e.value&&e.value[0]&&(o&&Wn(e.value[0],o,a)||e.value[1]&&Wn(e.value[0],e.value[1],a)),c=()=>{var h,y,v,b,x;s?e.value?e.value[0]&&!e.value[1]?(y=e.onChange)==null||y.call(e,[new Date(Math.min(e.value[0].getTime(),a.getTime())),new Date(Math.max(e.value[0].getTime(),a.getTime()))]):(v=e.onChange)==null||v.call(e,[a,void 0]):(h=e.onChange)==null||h.call(e,[a,void 0]):((b=e.onViewChange)==null||b.call(e,"day"),(x=e.onMonthChange)==null||x.call(e,a)),n(null)};return{isSelected:l,onMouseEnter:s&&((f=e.value)!=null&&f[0])&&!((d=e.value)!=null&&d[1])?()=>n(a):void 0,disabled:e.minDate&&(()=>{let h=new Date(a);return h.setMonth(h.getMonth()+1),h.setDate(0),h<e.minDate})()||e.maxDate&&(()=>{let h=new Date(a);return h.setDate(0),h>e.maxDate})()||e.disableFuture&&a>new Date||e.disablePast&&a<new Date&&!gm(a,new Date),onClick:c,tabIndex:-1,"aria-label":yv(a,e.locale||"default"),"aria-selected":l?"true":void 0,"aria-current":p?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o])}};var ZU=E("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),QU=E("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),jE=E("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:t})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:t==="datePicker"?"250px":"unset"})),HE=E(XU.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),e3=E("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),t3=E("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),r3=E(Et,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),o3=E("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),n3=E("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),i3=E(Et,{name:"Calendar",slot:"month"})(({theme:e,isSelected:t,disabled:r})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),a3=E(Et,{name:"Calendar",slot:"day"})(({theme:e,isToday:t,isSelected:r,disabled:o})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},t&&!r&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},r&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},o&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),UE={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},xm=1e4,WE=(e,t)=>Math.abs(e)*t,s3=e=>{let{ownerState:t}=e,{getPickerDayProps:r,getDayCellProps:o}=bm(t),n=$E(()=>AE(t.viewMonth),[t.viewMonth]),i=$E(()=>ME(t.locale||"default"),[t.locale]);return L(jE,{calendarType:"datePicker",children:L(VE,{initial:!1,custom:t.direction,children:ke(HE,{custom:t.direction,variants:UE,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(a,{offset:s,velocity:l})=>{var c,u;let p=WE(s.x,l.x);if(p<-xm){let f=new Date(t.viewMonth||new Date);f.setMonth(f.getMonth()+1),(c=t.onMonthChange)==null||c.call(t,f)}else if(p>xm){let f=new Date(t.viewMonth||new Date);f.setMonth(f.getMonth()-1),(u=t.onMonthChange)==null||u.call(t,f)}},children:[L(e3,{children:L("tr",{children:i.map((a,s)=>ke(Pn,{children:[L("th",{children:L(Cr,{level:"body-xs",textAlign:"center",children:a})}),s<6&&L("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})]}))})}),L(t3,{children:n.map((a,s)=>ke(mc,{children:[L("tr",{children:a.map((l,p)=>l?ke(mc,{children:[L(o3,ue(H({},o(l)),{children:L(a3,ue(H({size:"sm",variant:"plain",color:"neutral"},r(l)),{children:l}))})),p<6&&L("td",{"aria-hidden":"true","aria-description":"cell-gap"})]},p):ke(mc,{children:[L("td",{}),p<6&&L("td",{"aria-hidden":"true","aria-description":"cell-gap"})]},p))}),s<n.length-1&&L("tr",{"aria-hidden":"true","aria-description":"row-gap",children:L("td",{colSpan:13,style:{height:4}})})]},`${t.viewMonth}_${s}`))})]},`${t.viewMonth.toString()}_${t.direction}`)})})},l3=e=>{var a;let{ownerState:t}=e,{getPickerMonthProps:r,getMonthCellProps:o}=bm(t),n=Array.from({length:12},(s,l)=>l).reduce((s,l)=>(s[s.length-1].length===4&&s.push([]),s[s.length-1].push(l),s),[[]]),i=!((a=t.views)!=null&&a.find(s=>s==="day"))&&t.rangeSelection;return L(jE,{calendarType:i?"monthPicker":"datePicker",children:L(VE,{initial:!1,custom:t.direction,children:L(HE,{custom:t.direction,variants:UE,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(s,{offset:l,velocity:p})=>{var u,f;let c=WE(l.x,p.x);if(c<-xm){let d=new Date(t.viewMonth||new Date);d.setMonth(d.getMonth()+1),(u=t.onMonthChange)==null||u.call(t,d)}else if(c>xm){let d=new Date(t.viewMonth||new Date);d.setMonth(d.getMonth()-1),(f=t.onMonthChange)==null||f.call(t,d)}},children:L("tbody",{children:n.map((s,l)=>ke(mc,{children:[L("tr",{children:s.map((p,c)=>ke(mc,{children:[L(n3,ue(H({},o(p)),{children:L(i3,ue(H({size:"sm",variant:"plain",color:"neutral"},r(p)),{children:LE(p,t.locale)}))})),c<3&&L("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})]},p))}),l<n.length-1&&L("tr",{"aria-hidden":"true","aria-description":"row-gap",children:L("td",{colSpan:7,style:{height:4}})})]},l))})},`${t.viewMonth.getFullYear()}_${t.direction}`)})})},hc=YU((e,t)=>{let[r,o]=zE(e),b=r,{value:n,defaultValue:i,onChange:a,locale:s,onViewChange:l,onMonthChange:p,view:c,views:u,rangeSelection:f}=b,d=xe(b,["value","defaultValue","onChange","locale","onViewChange","onMonthChange","view","views","rangeSelection"]),{calendarTitle:h,onPrev:y,onNext:v}=bm(o);return ke(ZU,ue(H({ref:t},d),{children:[ke(QU,{children:[L(Gr,{size:"sm",onClick:y,children:L(hm,{})}),L(r3,{ownerState:o,variant:"plain",color:"neutral",onClick:l,children:h}),L(Gr,{size:"sm",onClick:v,children:L(ym,{})})]}),c==="day"&&L(s3,{ownerState:o}),c==="month"&&L(l3,{ownerState:o})]}))});hc.displayName="Calendar";var gl=hc;import{motion as yc}from"framer-motion";var p3=yc(rf),gc=p3;gc.displayName="Card";var c3=yc(af),vv=c3;vv.displayName="CardContent";var u3=yc(sf),bv=u3;bv.displayName="CardCover";var d3=yc(nf),xv=d3;xv.displayName="CardActions";var f3=yc(lf),Tv=f3;Tv.displayName="CardOverflow";import{motion as m3}from"framer-motion";var h3=m3(pf),vc=e=>L(h3,H({},e));vc.displayName="Checkbox";var bc=vc;import{forwardRef as y3}from"react";var g3=E("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:t="lg"})=>H(H(H(H({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},t==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}}),t==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}}),t==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}}),t==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}})),Pv=y3(function(t,r){return L(g3,H({ref:r},t))});Pv.displayName="Container";import MI,{useCallback as TW,useState as LI}from"react";var Cv=function(e,t){return Cv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[n]=o[n])},Cv(e,t)};function xc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Cv(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ze=function(){return Ze=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ze.apply(this,arguments)};function GE(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function Tm(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var Ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ye||(Ye={}));var ht;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(ht||(ht={}));var Ja;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ja||(Ja={}));function kv(e){return e.type===ht.literal}function JE(e){return e.type===ht.argument}function Pm(e){return e.type===ht.number}function Cm(e){return e.type===ht.date}function km(e){return e.type===ht.time}function Sm(e){return e.type===ht.select}function Rm(e){return e.type===ht.plural}function qE(e){return e.type===ht.pound}function Em(e){return e.type===ht.tag}function Im(e){return!!(e&&typeof e=="object"&&e.type===Ja.number)}function Tc(e){return!!(e&&typeof e=="object"&&e.type===Ja.dateTime)}var Sv=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;var v3=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function KE(e){var t={};return e.replace(v3,function(r){var o=r.length;switch(r[0]){case"G":t.era=o===4?"long":o===5?"narrow":"short";break;case"y":t.year=o===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][o-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][o-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=o===4?"long":o===5?"narrow":"short";break;case"e":if(o<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][o-4];break;case"c":if(o<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][o-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][o-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][o-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][o-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][o-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][o-1];break;case"s":t.second=["numeric","2-digit"][o-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=o<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var YE=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function eI(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(YE).filter(function(f){return f.length>0}),r=[],o=0,n=t;o<n.length;o++){var i=n[o],a=i.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],l=a.slice(1),p=0,c=l;p<c.length;p++){var u=c[p];if(u.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:l})}return r}function b3(e){return e.replace(/^(.*?)-/,"")}var XE=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,tI=/^(@+)?(\+|#+)?[rs]?$/g,x3=/(\*)(0+)|(#+)(0+)|(0+)/g,rI=/^(0+)$/;function ZE(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(tI,function(r,o,n){return typeof n!="string"?(t.minimumSignificantDigits=o.length,t.maximumSignificantDigits=o.length):n==="+"?t.minimumSignificantDigits=o.length:o[0]==="#"?t.maximumSignificantDigits=o.length:(t.minimumSignificantDigits=o.length,t.maximumSignificantDigits=o.length+(typeof n=="string"?n.length:0)),""}),t}function oI(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function T3(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!rI.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function QE(e){var t={},r=oI(e);return r||t}function nI(e){for(var t={},r=0,o=e;r<o.length;r++){var n=o[r];switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=b3(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=Ze(Ze(Ze({},t),{notation:"scientific"}),n.options.reduce(function(l,p){return Ze(Ze({},l),QE(p))},{}));continue;case"engineering":t=Ze(Ze(Ze({},t),{notation:"engineering"}),n.options.reduce(function(l,p){return Ze(Ze({},l),QE(p))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(x3,function(l,p,c,u,f,d){if(p)t.minimumIntegerDigits=c.length;else{if(u&&f)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(rI.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(XE.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(XE,function(l,p,c,u,f,d){return c==="*"?t.minimumFractionDigits=p.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:f&&d?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+d.length):(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length),""});var i=n.options[0];i==="w"?t=Ze(Ze({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=Ze(Ze({},t),ZE(i)));continue}if(tI.test(n.stem)){t=Ze(Ze({},t),ZE(n.stem));continue}var a=oI(n.stem);a&&(t=Ze(Ze({},t),a));var s=T3(n.stem);s&&(t=Ze(Ze({},t),s))}return t}var Pc={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function iI(e,t){for(var r="",o=0;o<e.length;o++){var n=e.charAt(o);if(n==="j"){for(var i=0;o+1<e.length&&e.charAt(o+1)===n;)i++,o++;var a=1+(i&1),s=i<2?1:3+(i>>1),l="a",p=P3(t);for((p=="H"||p=="k")&&(s=0);s-- >0;)r+=l;for(;a-- >0;)r=p+r}else n==="J"?r+="H":r+=n}return r}function P3(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,o;r!=="root"&&(o=e.maximize().region);var n=Pc[o||""]||Pc[r||""]||Pc["".concat(r,"-001")]||Pc["001"];return n[0]}var Rv,C3=new RegExp("^".concat(Sv.source,"*")),k3=new RegExp("".concat(Sv.source,"*$"));function tt(e,t){return{start:e,end:t}}var S3=!!String.prototype.startsWith&&"_a".startsWith("a",1),R3=!!String.fromCodePoint,E3=!!Object.fromEntries,I3=!!String.prototype.codePointAt,O3=!!String.prototype.trimStart,_3=!!String.prototype.trimEnd,w3=!!Number.isSafeInteger,D3=w3?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Iv=!0;try{aI=cI("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Iv=((Rv=aI.exec("a"))===null||Rv===void 0?void 0:Rv[0])==="a"}catch(e){Iv=!1}var aI,sI=S3?function(t,r,o){return t.startsWith(r,o)}:function(t,r,o){return t.slice(o,o+r.length)===r},Ov=R3?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var o="",n=t.length,i=0,a;n>i;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");o+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return o},lI=E3?Object.fromEntries:function(t){for(var r={},o=0,n=t;o<n.length;o++){var i=n[o],a=i[0],s=i[1];r[a]=s}return r},pI=I3?function(t,r){return t.codePointAt(r)}:function(t,r){var o=t.length;if(!(r<0||r>=o)){var n=t.charCodeAt(r),i;return n<55296||n>56319||r+1===o||(i=t.charCodeAt(r+1))<56320||i>57343?n:(n-55296<<10)+(i-56320)+65536}},A3=O3?function(t){return t.trimStart()}:function(t){return t.replace(C3,"")},N3=_3?function(t){return t.trimEnd()}:function(t){return t.replace(k3,"")};function cI(e,t){return new RegExp(e,t)}var _v;Iv?(Ev=cI("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),_v=function(t,r){var o;Ev.lastIndex=r;var n=Ev.exec(t);return(o=n[1])!==null&&o!==void 0?o:""}):_v=function(t,r){for(var o=[];;){var n=pI(t,r);if(n===void 0||dI(n)||B3(n))break;o.push(n),r+=n>=65536?2:1}return Ov.apply(void 0,o)};var Ev,uI=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,o){for(var n=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,o);if(a.err)return a;n.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),n.push({type:ht.pound,location:tt(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(o)break;return this.error(Ye.UNMATCHED_CLOSING_TAG,tt(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&wv(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;n.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;n.push(a.val)}}}return{val:n,err:null}},e.prototype.parseTag=function(t,r){var o=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ht.literal,value:"<".concat(n,"/>"),location:tt(o,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!wv(this.char()))return this.error(Ye.INVALID_TAG,tt(s,this.clonePosition()));var l=this.clonePosition(),p=this.parseTagName();return n!==p?this.error(Ye.UNMATCHED_CLOSING_TAG,tt(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ht.tag,value:n,children:a,location:tt(o,this.clonePosition())},err:null}:this.error(Ye.INVALID_TAG,tt(s,this.clonePosition())))}else return this.error(Ye.UNCLOSED_TAG,tt(o,this.clonePosition()))}else return this.error(Ye.INVALID_TAG,tt(o,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&M3(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var o=this.clonePosition(),n="";;){var i=this.tryParseQuote(r);if(i){n+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){n+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){n+=s;continue}break}var l=tt(o,this.clonePosition());return{val:{type:ht.literal,value:n,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!L3(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var o=this.char();if(o===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(o);this.bump()}return Ov.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var o=this.char();return o===60||o===123||o===35&&(r==="plural"||r==="selectordinal")||o===125&&t>0?null:(this.bump(),Ov(o))},e.prototype.parseArgument=function(t,r){var o=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(o,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ye.EMPTY_ARGUMENT,tt(o,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(Ye.MALFORMED_ARGUMENT,tt(o,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(o,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ht.argument,value:n,location:tt(o,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(o,this.clonePosition())):this.parseArgumentOptions(t,r,n,o);default:return this.error(Ye.MALFORMED_ARGUMENT,tt(o,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),o=_v(this.message,r),n=r+o.length;this.bumpTo(n);var i=this.clonePosition(),a=tt(t,i);return{value:o,location:a}},e.prototype.parseArgumentOptions=function(t,r,o,n){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(Ye.EXPECT_ARGUMENT_TYPE,tt(a,l));case"number":case"date":case"time":{this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),u=this.parseSimpleArgStyleIfPossible();if(u.err)return u;var f=N3(u.val);if(f.length===0)return this.error(Ye.EXPECT_ARGUMENT_STYLE,tt(this.clonePosition(),this.clonePosition()));var d=tt(c,this.clonePosition());p={style:f,styleLocation:d}}var h=this.tryParseArgumentClose(n);if(h.err)return h;var y=tt(n,this.clonePosition());if(p&&sI(p==null?void 0:p.style,"::",0)){var v=A3(p.style.slice(2));if(s==="number"){var u=this.parseNumberSkeletonFromString(v,p.styleLocation);return u.err?u:{val:{type:ht.number,value:o,location:y,style:u.val},err:null}}else{if(v.length===0)return this.error(Ye.EXPECT_DATE_TIME_SKELETON,y);var b=v;this.locale&&(b=iI(v,this.locale));var f={type:Ja.dateTime,pattern:b,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?KE(b):{}},x=s==="date"?ht.date:ht.time;return{val:{type:x,value:o,location:y,style:f},err:null}}}return{val:{type:s==="number"?ht.number:s==="date"?ht.date:ht.time,value:o,location:y,style:(i=p==null?void 0:p.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ye.EXPECT_SELECT_ARGUMENT_OPTIONS,tt(g,Ze({},g)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),T=0;if(s!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,tt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var u=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(u.err)return u;this.bumpSpace(),C=this.parseIdentifierIfPossible(),T=u.val}var P=this.tryParsePluralOrSelectOptions(t,s,r,C);if(P.err)return P;var h=this.tryParseArgumentClose(n);if(h.err)return h;var k=tt(n,this.clonePosition());return s==="select"?{val:{type:ht.select,value:o,options:lI(P.val),location:k},err:null}:{val:{type:ht.plural,value:o,options:lI(P.val),offset:T,pluralType:s==="plural"?"cardinal":"ordinal",location:k},err:null}}default:return this.error(Ye.INVALID_ARGUMENT_TYPE,tt(a,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var o=this.char();switch(o){case 39:{this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,tt(n,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var o=[];try{o=eI(t)}catch(n){return this.error(Ye.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ja.number,tokens:o,location:r,parsedOptions:this.shouldParseSkeletons?nI(o):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,o,n){for(var i,a=!1,s=[],l=new Set,p=n.value,c=n.location;;){if(p.length===0){var u=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;c=tt(u,this.clonePosition()),p=this.message.slice(u.offset,this.offset())}else break}if(l.has(p))return this.error(r==="select"?Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);p==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,tt(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(t+1,r,o);if(h.err)return h;var y=this.tryParseArgumentClose(d);if(y.err)return y;s.push([p,{value:h.val,location:tt(d,this.clonePosition())}]),l.add(p),this.bumpSpace(),i=this.parseIdentifierIfPossible(),p=i.value,c=i.location}return s.length===0?this.error(r==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,tt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(Ye.MISSING_OTHER_CLAUSE,tt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var o=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(o=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var l=tt(n,this.clonePosition());return i?(a*=o,D3(a)?{val:a,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=pI(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(sI(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),o=this.message.indexOf(t,r);return o>=0?(this.bumpTo(o),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&dI(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),o=this.message.charCodeAt(r+(t>=65536?2:1));return o!=null?o:null},e}();function wv(e){return e>=97&&e<=122||e>=65&&e<=90}function L3(e){return wv(e)||e===47}function M3(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function dI(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function B3(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dv(e){e.forEach(function(t){if(delete t.location,Sm(t)||Rm(t))for(var r in t.options)delete t.options[r].location,Dv(t.options[r].value);else Pm(t)&&Im(t.style)||(Cm(t)||km(t))&&Tc(t.style)?delete t.style.location:Em(t)&&Dv(t.children)})}function fI(e,t){t===void 0&&(t={}),t=Ze({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new uI(e,t).parse();if(r.err){var o=SyntaxError(Ye[r.err.kind]);throw o.location=r.err.location,o.originalMessage=r.err.message,o}return t!=null&&t.captureLocation||Dv(r.val),r.val}function Om(e,t){var r=t&&t.cache?t.cache:H3,o=t&&t.serializer?t.serializer:j3,n=t&&t.strategy?t.strategy:F3;return n(e,{cache:r,serializer:o})}function z3(e){return e==null||typeof e=="number"||typeof e=="boolean"}function mI(e,t,r,o){var n=z3(o)?o:r(o),i=t.get(n);return typeof i>"u"&&(i=e.call(this,o),t.set(n,i)),i}function hI(e,t,r){var o=Array.prototype.slice.call(arguments,3),n=r(o),i=t.get(n);return typeof i>"u"&&(i=e.apply(this,o),t.set(n,i)),i}function Av(e,t,r,o,n){return r.bind(t,e,o,n)}function F3(e,t){var r=e.length===1?mI:hI;return Av(e,this,r,t.cache.create(),t.serializer)}function $3(e,t){return Av(e,this,hI,t.cache.create(),t.serializer)}function V3(e,t){return Av(e,this,mI,t.cache.create(),t.serializer)}var j3=function(){return JSON.stringify(arguments)};function Nv(){this.cache=Object.create(null)}Nv.prototype.get=function(e){return this.cache[e]};Nv.prototype.set=function(e,t){this.cache[e]=t};var H3={create:function(){return new Nv}},_m={variadic:$3,monadic:V3};var qa;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(qa||(qa={}));var Cc=function(e){xc(t,e);function t(r,o,n){var i=e.call(this,r)||this;return i.code=o,i.originalMessage=n,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Lv=function(e){xc(t,e);function t(r,o,n,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(o,'". Options are "').concat(Object.keys(n).join('", "'),'"'),qa.INVALID_VALUE,i)||this}return t}(Cc);var yI=function(e){xc(t,e);function t(r,o,n){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(o),qa.INVALID_VALUE,n)||this}return t}(Cc);var gI=function(e){xc(t,e);function t(r,o){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(o,'"'),qa.MISSING_VALUE,o)||this}return t}(Cc);var Sr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Sr||(Sr={}));function U3(e){return e.length<2?e:e.reduce(function(t,r){var o=t[t.length-1];return!o||o.type!==Sr.literal||r.type!==Sr.literal?t.push(r):o.value+=r.value,t},[])}function W3(e){return typeof e=="function"}function kc(e,t,r,o,n,i,a){if(e.length===1&&kv(e[0]))return[{type:Sr.literal,value:e[0].value}];for(var s=[],l=0,p=e;l<p.length;l++){var c=p[l];if(kv(c)){s.push({type:Sr.literal,value:c.value});continue}if(qE(c)){typeof i=="number"&&s.push({type:Sr.literal,value:r.getNumberFormat(t).format(i)});continue}var u=c.value;if(!(n&&u in n))throw new gI(u,a);var f=n[u];if(JE(c)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),s.push({type:typeof f=="string"?Sr.literal:Sr.object,value:f});continue}if(Cm(c)){var d=typeof c.style=="string"?o.date[c.style]:Tc(c.style)?c.style.parsedOptions:void 0;s.push({type:Sr.literal,value:r.getDateTimeFormat(t,d).format(f)});continue}if(km(c)){var d=typeof c.style=="string"?o.time[c.style]:Tc(c.style)?c.style.parsedOptions:o.time.medium;s.push({type:Sr.literal,value:r.getDateTimeFormat(t,d).format(f)});continue}if(Pm(c)){var d=typeof c.style=="string"?o.number[c.style]:Im(c.style)?c.style.parsedOptions:void 0;d&&d.scale&&(f=f*(d.scale||1)),s.push({type:Sr.literal,value:r.getNumberFormat(t,d).format(f)});continue}if(Em(c)){var h=c.children,y=c.value,v=n[y];if(!W3(v))throw new yI(y,"function",a);var b=kc(h,t,r,o,n,i),x=v(b.map(function(T){return T.value}));Array.isArray(x)||(x=[x]),s.push.apply(s,x.map(function(T){return{type:typeof T=="string"?Sr.literal:Sr.object,value:T}}))}if(Sm(c)){var g=c.options[f]||c.options.other;if(!g)throw new Lv(c.value,f,Object.keys(c.options),a);s.push.apply(s,kc(g.value,t,r,o,n));continue}if(Rm(c)){var g=c.options["=".concat(f)];if(!g){if(!Intl.PluralRules)throw new Cc(`Intl.PluralRules is not available in this environment.
|
|
117
|
+
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(p=r==null?void 0:r.onChange)==null||p.call(r,n),n}}function am(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var cE=(e,t)=>Math.abs(e-t)<1,uE=(e,t)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>e.apply(this,o),t)}};var N5=e=>e,L5=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let n=t;n<=r;n++)o.push(n);return o},fE=(e,t)=>{let r=e.scrollElement;if(!r)return;let o=i=>{let{width:a,height:s}=i;t({width:Math.round(a),height:Math.round(s)})};if(o(r.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};let n=new ResizeObserver(i=>{let a=i[0];if(a!=null&&a.borderBoxSize){let s=a.borderBoxSize[0];if(s){o({width:s.inlineSize,height:s.blockSize});return}}o(r.getBoundingClientRect())});return n.observe(r,{box:"border-box"}),()=>{n.unobserve(r)}},dE={passive:!0};var M5=typeof window>"u"?!0:"onscrollend"in window,mE=(e,t)=>{let r=e.scrollElement;if(!r)return;let o=0,n=M5?()=>{}:uE(()=>{t(o,!1)},150),i=l=>()=>{o=r[e.options.horizontal?"scrollLeft":"scrollTop"],n(),t(o,l)},a=i(!0),s=i(!1);return s(),r.addEventListener("scroll",a,dE),r.addEventListener("scrollend",s,dE),()=>{r.removeEventListener("scroll",a),r.removeEventListener("scrollend",s)}};var B5=(e,t,r)=>{if(t!=null&&t.borderBoxSize){let o=t.borderBoxSize[0];if(o)return Math.round(o[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[r.options.horizontal?"width":"height"])};var hE=(e,{adjustments:t=0,behavior:r},o)=>{var n,i;let a=e+t;(i=(n=o.scrollElement)==null?void 0:n.scrollTo)==null||i.call(n,{[o.options.horizontal?"left":"top"]:a,behavior:r})},sm=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let r=null,o=()=>r||(typeof ResizeObserver<"u"?r=new ResizeObserver(n=>{n.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var n;return(n=o())==null?void 0:n.disconnect()},observe:n=>{var i;return(i=o())==null?void 0:i.observe(n,{box:"border-box"})},unobserve:n=>{var i;return(i=o())==null?void 0:i.unobserve(n)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([o,n])=>{typeof n>"u"&&delete r[o]}),this.options=H({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:N5,rangeExtractor:L5,onChange:()=>{},measureElement:B5,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},r)},this.notify=(r,o)=>{var p;var n,i;let{startIndex:a,endIndex:s}=(p=this.range)!=null?p:{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(r||a!==(l==null?void 0:l.startIndex)||s!==(l==null?void 0:l.endIndex))&&((i=(n=this.options).onChange)==null||i.call(n,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{let r=this.options.getScrollElement();this.scrollElement!==r&&(this.cleanup(),this.scrollElement=r,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.scrollOffset<o?"forward":"backward":null,this.scrollOffset=o;let i=this.isScrolling;this.isScrolling=n,this.notify(i!==n,n)})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=fl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(r,o,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:o,scrollMargin:n,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(r,o)=>{let n=new Map,i=new Map;for(let a=o-1;a>=0;a--){let s=r[a];if(n.has(s.lane))continue;let l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&n.set(s.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurements=fl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:o,scrollMargin:n,getItemKey:i},a)=>{let s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let l=this.measurementsCache.slice(0,s);for(let p=s;p<r;p++){let c=i(p),u=this.options.lanes===1?l[p-1]:this.getFurthestMeasurement(l,p),f=u?u.end+this.options.gap:o+n,d=a.get(c),h=typeof d=="number"?d:this.options.estimateSize(p),y=f+h,v=u?u.lane:p%this.options.lanes;l[p]={index:p,start:f,size:h,end:y,key:c,lane:v}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fl(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(r,o,n)=>this.range=r.length>0&&o>0?z5({measurements:r,outerSize:o,scrollOffset:n}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=fl(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,o,n,i)=>o===null?[]:r({startIndex:o.startIndex,endIndex:o.endIndex,overscan:n,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{let o=this.options.indexAttribute,n=r.getAttribute(o);return n?parseInt(n,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(r,o)=>{let n=this.measurementsCache[this.indexFromElement(r)];if(!n||!r.isConnected){this.measureElementCache.forEach((s,l)=>{s===r&&(this.observer.unobserve(r),this.measureElementCache.delete(l))});return}let i=this.measureElementCache.get(n.key);i!==r&&(i&&this.observer.unobserve(i),this.observer.observe(r),this.measureElementCache.set(n.key,r));let a=this.options.measureElement(r,o,this);this.resizeItem(n,a)},this.resizeItem=(r,o)=>{var a;let n=(a=this.itemSizeCache.get(r.key))!=null?a:r.size,i=o-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.scrollOffset+this.scrollAdjustments)&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,o)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=fl(()=>[this.getIndexes(),this.getMeasurements()],(r,o)=>{let n=[];for(let i=0,a=r.length;i<a;i++){let s=r[i],l=o[s];n.push(l)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{let o=this.getMeasurements();return am(o[yE(0,o.length-1,n=>am(o[n]).start,r)])},this.getOffsetForAlignment=(r,o)=>{let n=this.getSize();o==="auto"&&(r<=this.scrollOffset?o="start":r>=this.scrollOffset+n?o="end":o="start"),o==="start"?r=r:o==="end"?r=r-n:o==="center"&&(r=r-n/2);let i=this.options.horizontal?"scrollWidth":"scrollHeight",s=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,o="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));let n=am(this.getMeasurements()[r]);if(o==="auto")if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)o="end";else if(n.start<=this.scrollOffset+this.options.scrollPaddingStart)o="start";else return[this.scrollOffset,o];let i=o==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,o),o]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:o="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,o),{adjustments:void 0,behavior:n})},this.scrollToIndex=(r,{align:o="auto",behavior:n}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let[i,a]=this.getOffsetForIndex(r,o);this._scrollToOffset(i,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(r))){let[l]=this.getOffsetForIndex(r,a);cE(l,this.scrollOffset)||this.scrollToIndex(r,{align:a,behavior:n})}else this.scrollToIndex(r,{align:a,behavior:n})}))},this.scrollBy=(r,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+r,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var i;var r;let o=this.getMeasurements(),n;return o.length===0?n=this.options.paddingStart:n=this.options.lanes===1?(i=(r=o[o.length-1])==null?void 0:r.end)!=null?i:0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:o,behavior:n})=>{this.options.scrollToFn(r,{behavior:n,adjustments:o},this)},this.measure=()=>{var r,o;this.itemSizeCache=new Map,(o=(r=this.options).onChange)==null||o.call(r,this,!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(r=>{this.itemSizeCache.set(r.key,r.size)}),this.notify(!1,!1)}},yE=(e,t,r,o)=>{for(;e<=t;){let n=(e+t)/2|0,i=r(n);if(i<o)e=n+1;else if(i>o)t=n-1;else return n}return e>0?e-1:0};function z5({measurements:e,outerSize:t,scrollOffset:r}){let o=e.length-1,i=yE(0,o,s=>e[s].start,r),a=i;for(;a<o&&e[a].end<r+t;)a++;return{startIndex:i,endIndex:a}}var $5=typeof document<"u"?Un.useLayoutEffect:Un.useEffect;function V5(e){let t=Un.useReducer(()=>({}),{})[1],r=ue(H({},e),{onChange:(n,i)=>{var a;i?F5(t):t(),(a=e.onChange)==null||a.call(e,n,i)}}),[o]=Un.useState(()=>new sm(r));return o.setOptions(r),Un.useEffect(()=>o._didMount(),[]),$5(()=>o._willUpdate()),o}function gE(e){return V5(H({observeElementRect:fE,observeElementOffset:mE,scrollToFn:hE},e))}import{motion as j5}from"framer-motion";var H5=E(j5(bf))({width:"100%"}),oc=H5;oc.displayName="FormControl";var tr=oc;import{motion as U5}from"framer-motion";var W5=U5(Cf),nc=W5;nc.displayName="FormLabel";var kr=nc;import{motion as G5}from"framer-motion";var J5=G5(Tf),ic=J5;ic.displayName="FormHelperText";var Jt=ic;var X5=E(Qt,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Z5=vE.forwardRef((e,t)=>{let h=e,{anchorEl:r,open:o,modifiers:n,children:i,ownerState:{loading:a}}=h,s=xe(h,["anchorEl","open","modifiers","children","ownerState"]),l=K5(null),p=i[0].every(y=>y.hasOwnProperty("group")),c=a?[i[1]]:i[0].length===0?[i[2]]:p?i[0].flatMap(y=>[L(La,{component:"li",children:y.group},y.key),...y.children]):i[0],u=gE({count:c.length,estimateSize:()=>36,getScrollElement:()=>l.current,overscan:5}),f=u.getVirtualItems(),d=u.getTotalSize();return q5(()=>{o&&u.measure()},[o]),L(X5,{ref:t,anchorEl:r,open:o,modifiers:n,children:L(Lp,ue(H({},s),{sx:{overflow:"auto"},ref:l,children:L("div",{style:{height:`${d}px`,position:"relative"},children:f.map(({index:y,size:v,start:b})=>vE.cloneElement(c[y],{style:{position:"absolute",top:0,left:0,width:"100%",height:`${v}px`,transform:`translateY(${b}px)`}}))})}))})});function sv(e){let x=e,{label:t,error:r,helperText:o,color:n,size:i,disabled:a,required:s,onChange:l}=x,p=xe(x,["label","error","helperText","color","size","disabled","required","onChange"]),[c,u]=Y5(e.value||e.defaultValue),f=lm(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),d=lm(()=>e.loading?{value:"",label:"",startDecorator:L(Yo,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof c=="string"&&f.find(g=>g.value===c)||c,[c,e.options,e.loading]),h=lm(()=>(d==null?void 0:d.startDecorator)||e.startDecorator,[d]),y=lm(()=>(d==null?void 0:d.endDecorator)||e.endDecorator,[d]),v=(g,C)=>{u(C);let T=C;l==null||l(ue(H({},g),{target:ue(H({},g.target),{value:T==null?void 0:T.value})}))},b=L(Kd,ue(H({},p),{required:s,onChange:v,color:n,value:d,options:f,size:i,disabled:a,startDecorator:h,endDecorator:y,getOptionLabel:g=>`${g.value||""}`,slots:{listbox:Z5},renderOption:(g,C)=>ke(Mp,ue(H({},g),{children:[C.startDecorator&&L(al,{sx:{marginInlineEnd:"var(--Input-gap)"},children:C.startDecorator}),C.label,C.endDecorator&&L(al,{sx:{marginInlineStart:"var(--Input-gap)"},children:C.endDecorator})]})),renderGroup:g=>g}));return t?ke(tr,{required:s,color:n,size:i,error:r,disabled:a,children:[L(kr,{children:t}),b,o&&L(Jt,{children:o})]}):b}sv.displayName="Autocomplete";import{motion as Q5}from"framer-motion";var eU=Q5(Zd),ac=eU;ac.displayName="Box";var pm=ac;import{motion as lv}from"framer-motion";var tU=lv(Rf),sc=e=>L(tU,H({},e));sc.displayName="Menu";var rU=lv(Of),lc=e=>L(rU,H({},e));lc.displayName="MenuButton";var oU=lv(wf),pc=e=>L(oU,H({},e));pc.displayName="MenuItem";var bE=sc;import{motion as nU}from"framer-motion";var iU=nU(sd),cc=iU;cc.displayName="Dropdown";var xE=cc;function pv(e){let v=e,{crumbs:t,size:r,startCrumbCount:o=1,endCrumbCount:n=3,slots:b={link:$a}}=v,x=b,{link:i}=x,a=xe(x,["link"]),g=v,{slotProps:C={link:{color:"neutral"}}}=g,T=C,{link:s}=T,l=xe(T,["link"]),P=g,{collapsed:p=!0}=P,c=xe(P,["crumbs","size","startCrumbCount","endCrumbCount","slots","slotProps","collapsed"]),u=k=>k.type==="link"&&i?L(i,ue(H({to:k.linkHref,href:k.linkHref},s),{children:k.label})):L(Cr,{children:k.label});if(!p)return L($p,ue(H({size:r,slots:a,slotProps:l},c),{children:t.map(k=>L(u,H({},k)))}));let f=Math.max(1,n),d=t.slice(0,o).map(k=>L(u,H({},k))),h=(o+f>t.length?t.slice(o):t.slice(-f)).map(k=>L(u,H({},k))),y=t.slice(o,-f).map(k=>L(pc,{children:L(u,H({},k))}));return ke($p,ue(H({size:r,slots:a,slotProps:l},c),{children:[d,y.length&&ke(xE,{children:[L(lc,{size:r,variant:"plain",children:"..."}),L(bE,{size:r,children:y})]}),h]}))}pv.displayName="Breadcrumbs";import{forwardRef as aU}from"react";import{motion as sU}from"framer-motion";var lU=sU(tf),uc=aU((e,t)=>L(lU,H({ref:t},e)));uc.displayName="Button";var Et=uc;import{Fragment as mc,forwardRef as YU,useMemo as $E}from"react";var dc=F;import*as mm from"react";import*as dm from"react";function cv(e,t){return m({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var pU={black:"#000",white:"#fff"},ml=pU;var cU={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},TE=cU;var uU={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ja=uU;var dU={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ha=dU;var fU={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},hl=fU;var mU={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ua=mU;var hU={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Wa=hU;var yU={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ga=yU;var gU=["mode","contrastThreshold","tonalOffset"],PE={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ml.white,default:ml.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},uv={text:{primary:ml.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ml.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function CE(e,t,r,o){let n=o.light||o,i=o.dark||o*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=RP(e.main,n):t==="dark"&&(e.dark=SP(e.main,i)))}function vU(e="light"){return e==="dark"?{main:Ua[200],light:Ua[50],dark:Ua[400]}:{main:Ua[700],light:Ua[400],dark:Ua[800]}}function bU(e="light"){return e==="dark"?{main:ja[200],light:ja[50],dark:ja[400]}:{main:ja[500],light:ja[300],dark:ja[700]}}function xU(e="light"){return e==="dark"?{main:Ha[500],light:Ha[300],dark:Ha[700]}:{main:Ha[700],light:Ha[400],dark:Ha[800]}}function TU(e="light"){return e==="dark"?{main:Wa[400],light:Wa[300],dark:Wa[700]}:{main:Wa[700],light:Wa[500],dark:Wa[900]}}function PU(e="light"){return e==="dark"?{main:Ga[400],light:Ga[300],dark:Ga[700]}:{main:Ga[800],light:Ga[500],dark:Ga[900]}}function CU(e="light"){return e==="dark"?{main:hl[400],light:hl[300],dark:hl[700]}:{main:"#ed6c02",light:hl[500],dark:hl[900]}}function dv(e){let{mode:t="light",contrastThreshold:r=3,tonalOffset:o=.2}=e,n=$(e,gU),i=e.primary||vU(t),a=e.secondary||bU(t),s=e.error||xU(t),l=e.info||TU(t),p=e.success||PU(t),c=e.warning||CU(t);function u(y){return kP(y,uv.text.primary)>=r?uv.text.primary:PE.text.primary}let f=({color:y,name:v,mainShade:b=500,lightShade:x=300,darkShade:g=700})=>{if(y=m({},y),!y.main&&y[b]&&(y.main=y[b]),!y.hasOwnProperty("main"))throw new Error(fr(11,v?` (${v})`:"",b));if(typeof y.main!="string")throw new Error(fr(12,v?` (${v})`:"",JSON.stringify(y.main)));return CE(y,"light",x,o),CE(y,"dark",g,o),y.contrastText||(y.contrastText=u(y.main)),y},d={dark:uv,light:PE};return it(m({common:m({},ml),mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:p,name:"success"}),grey:TE,contrastThreshold:r,getContrastText:u,augmentColor:f,tonalOffset:o},d[t]),n)}var kU=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function SU(e){return Math.round(e*1e5)/1e5}var kE={textTransform:"uppercase"},SE='"Roboto", "Helvetica", "Arial", sans-serif';function fv(e,t){let r=typeof t=="function"?t(e):t,{fontFamily:o=SE,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:p=16,allVariants:c,pxToRem:u}=r,f=$(r,kU),d=n/14,h=u||(b=>`${b/p*d}rem`),y=(b,x,g,C,T)=>m({fontFamily:o,fontWeight:b,fontSize:h(x),lineHeight:g},o===SE?{letterSpacing:`${SU(C/x)}em`}:{},T,c),v={h1:y(i,96,1.167,-1.5),h2:y(i,60,1.2,-.5),h3:y(a,48,1.167,0),h4:y(a,34,1.235,.25),h5:y(a,24,1.334,0),h6:y(s,20,1.6,.15),subtitle1:y(a,16,1.75,.15),subtitle2:y(s,14,1.57,.1),body1:y(a,16,1.5,.15),body2:y(a,14,1.43,.15),button:y(s,14,1.75,.4,kE),caption:y(a,12,1.66,.4),overline:y(a,12,2.66,1,kE),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return it(m({htmlFontSize:p,pxToRem:h,fontFamily:o,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},v),f,{clone:!1})}function vt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${.2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${.14})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${.12})`].join(",")}var RU=["none",vt(0,2,1,-1,0,1,1,0,0,1,3,0),vt(0,3,1,-2,0,2,2,0,0,1,5,0),vt(0,3,3,-2,0,3,4,0,0,1,8,0),vt(0,2,4,-1,0,4,5,0,0,1,10,0),vt(0,3,5,-1,0,5,8,0,0,1,14,0),vt(0,3,5,-1,0,6,10,0,0,1,18,0),vt(0,4,5,-2,0,7,10,1,0,2,16,1),vt(0,5,5,-3,0,8,10,1,0,3,14,2),vt(0,5,6,-3,0,9,12,1,0,3,16,2),vt(0,6,6,-3,0,10,14,1,0,4,18,3),vt(0,6,7,-4,0,11,15,1,0,4,20,3),vt(0,7,8,-4,0,12,17,2,0,5,22,4),vt(0,7,8,-4,0,13,19,2,0,5,24,4),vt(0,7,9,-4,0,14,21,2,0,5,26,4),vt(0,8,9,-5,0,15,22,2,0,6,28,5),vt(0,8,10,-5,0,16,24,2,0,6,30,5),vt(0,8,11,-5,0,17,26,2,0,6,32,5),vt(0,9,11,-5,0,18,28,2,0,7,34,6),vt(0,9,12,-6,0,19,29,2,0,7,36,6),vt(0,10,13,-6,0,20,31,3,0,8,38,7),vt(0,10,13,-6,0,21,33,3,0,8,40,7),vt(0,10,14,-6,0,22,35,3,0,8,42,7),vt(0,11,14,-7,0,23,36,3,0,9,44,8),vt(0,11,15,-7,0,24,38,3,0,9,46,8)],RE=RU;var EU=["duration","easing","delay"],IU={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},OU={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function EE(e){return`${Math.round(e)}ms`}function _U(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function mv(e){let t=m({},IU,e.easing),r=m({},OU,e.duration);return m({getAutoHeightDuration:_U,create:(n=["all"],i={})=>{let{duration:a=r.standard,easing:s=t.easeInOut,delay:l=0}=i,p=$(i,EU);return(Array.isArray(n)?n:[n]).map(c=>`${c} ${typeof a=="string"?a:EE(a)} ${s} ${typeof l=="string"?l:EE(l)}`).join(",")}},e,{easing:t,duration:r})}var wU={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},IE=wU;var DU=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function AU(e={},...t){let{mixins:r={},palette:o={},transitions:n={},typography:i={}}=e,a=$(e,DU);if(e.vars)throw new Error(fr(18));let s=dv(o),l=bo(e),p=it(l,{mixins:cv(l.breakpoints,r),palette:s,shadows:RE.slice(),typography:fv(s,i),transitions:mv(n),zIndex:m({},IE)});return p=it(p,a),p=t.reduce((c,u)=>it(c,u),p),p.unstable_sxConfig=m({},go,a==null?void 0:a.unstable_sxConfig),p.unstable_sx=function(u){return vo({sx:u,theme:this})},p}var OE=AU;var NU=OE(),cm=NU;var um="$$material";function hv({props:e,name:t}){return zo({props:e,name:t,defaultTheme:cm,themeId:um})}var LU=e=>lp(e)&&e!=="classes";var MU=si({themeId:um,defaultTheme:cm,rootShouldForwardProp:LU}),_E=MU;function wE(e){return mr("MuiSvgIcon",e)}var o5e=eo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);import{jsx as zU}from"react/jsx-runtime";import{jsxs as FU}from"react/jsx-runtime";var BU=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],$U=e=>{let{color:t,fontSize:r,classes:o}=e,n={root:["root",t!=="inherit"&&`color${dc(t)}`,`fontSize${dc(r)}`]};return J(n,wE,o)},VU=_E("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${dc(r.color)}`],t[`fontSize${dc(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,o,n,i,a,s,l,p,c,u,f,d,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(o=r.create)==null?void 0:o.call(r,"fill",{duration:(n=e.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem",large:((p=e.typography)==null||(c=p.pxToRem)==null?void 0:c.call(p,35))||"2.1875rem"}[t.fontSize],color:(u=(f=(e.vars||e).palette)==null||(f=f[t.color])==null?void 0:f.main)!=null?u:{action:(d=(e.vars||e).palette)==null||(d=d.action)==null?void 0:d.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),DE=dm.forwardRef(function(t,r){let o=hv({props:t,name:"MuiSvgIcon"}),{children:n,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:p,inheritViewBox:c=!1,titleAccess:u,viewBox:f="0 0 24 24"}=o,d=$(o,BU),h=dm.isValidElement(n)&&n.type==="svg",y=m({},o,{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:h}),v={};c||(v.viewBox=f);let b=$U(y);return FU(VU,m({as:s,className:ye(b.root,i),focusable:"false",color:p,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:r},v,d,h&&n.props,{ownerState:y,children:[h?n.props.children:n,u?zU("title",{children:u}):null]}))});DE.muiName="SvgIcon";var fm=DE;import{jsx as jU}from"react/jsx-runtime";function ao(e,t){function r(o,n){return jU(fm,m({"data-testid":`${t}Icon`,ref:n},o,{children:e}))}return r.muiName=fm.muiName,mm.memo(mm.forwardRef(r))}import{jsx as HU}from"react/jsx-runtime";var hm=ao(HU("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");import{jsx as UU}from"react/jsx-runtime";var ym=ao(UU("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");import{AnimatePresence as VE,motion as XU}from"framer-motion";var AE=e=>{let t=[],r=new Date(e.getFullYear(),e.getMonth(),1),o=new Date(e.getFullYear(),e.getMonth()+1,0),n=Math.ceil((r.getDay()+1)/7),i=Math.ceil((o.getDate()+r.getDay())/7),a=1;for(let s=1;s<=i;s++){let l=[];for(let p=1;p<=7;p++)s===n&&p<r.getDay()+1||a>o.getDate()?l.push(void 0):(l.push(a),a++);t.push(l)}return t},NE=(e,t)=>e.toLocaleString(t,{year:"numeric"}),yv=(e,t)=>e.toLocaleString(t,{year:"numeric",month:"long"}),LE=(e,t)=>new Date(0,e).toLocaleString(t,{month:"short"}),ME=e=>{let t=new Date().getDay(),r=new Date;return r.setDate(r.getDate()-t),Array.from({length:7}).map(()=>{let o=r.toLocaleString(e,{weekday:"short"});return r.setDate(r.getDate()+1),o})},BE=e=>{let t=new Date,r=new Date(e);return r.setHours(0,0,0,0),t.setHours(0,0,0,0),r.getTime()===t.getTime()},gv=(e,t)=>{let r=new Date(e),o=new Date(t);return r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()},Wn=(e,t,r)=>{let o=new Date(r);o.setHours(0,0,0,0);let n=new Date(Math.min(e.getTime(),t.getTime())),i=new Date(Math.max(e.getTime(),t.getTime()));return o>=n&&o<=i},gm=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();import{motion as WU}from"framer-motion";var GU=WU(Gd),fc=e=>L(GU,H({},e));fc.displayName="IconButton";var Gr=fc;import{useCallback as JU,useMemo as qU,useState as vm}from"react";var KU=(e,t)=>t.includes(e)?e:t[0],zE=e=>{var y,v;let[t,r]=vm(()=>KU(e.view||"day",e.views||["day","month"])),[o,n]=vm(e.defaultValue),[i,a]=vm(()=>{var x,g;let b=new Date;return b.setDate(1),b.setHours(0,0,0,0),((x=e.value)==null?void 0:x[0])||((g=e.defaultValue)==null?void 0:g[0])||b}),[[s,l],p]=vm([0,0]),c=(y=e.view)!=null?y:t,u=b=>{p([s+b,b])},f=JU(b=>{var x;a(b),c==="month"?i.getFullYear()!==b.getFullYear()&&u(b>i?1:-1):u(b>i?1:-1),(x=e.onMonthChange)==null||x.call(e,b)},[e.onMonthChange,i,c]),d=q({props:ue(H({locale:"default",views:["day","month"],view:c,value:(v=e.value)!=null?v:o},e),{onChange:e.value?e.onChange:b=>{var x;n(b),(x=e.onChange)==null||x.call(e,b)},onMonthChange:f,onViewChange:()=>{let b=c==="month"?"day":"month";!(!e.views||e.views.includes(b))||e.view===b||(e.onViewChange?e.onViewChange(b):r(b))}}),name:"Calendar"}),h=qU(()=>ue(H({},d),{viewMonth:i,direction:l}),[d,i,l]);return[d,h]};import{useCallback as yl,useState as FE}from"react";var bm=e=>{let[t,r]=FE(null),[o,n]=FE(null);return{calendarTitle:e.view==="month"?NE(e.viewMonth,e.locale||"default"):yv(e.viewMonth,e.locale||"default"),onPrev:yl(()=>{var i,a;if(e.view==="day"){let s=new Date(e.viewMonth||new Date);s.setMonth(s.getMonth()-1),(i=e.onMonthChange)==null||i.call(e,s)}else if(e.view==="month"){let s=new Date(e.viewMonth||new Date);s.setFullYear(s.getFullYear()-1),(a=e.onMonthChange)==null||a.call(e,s)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:yl(()=>{var i,a;if(e.view==="day"){let s=new Date(e.viewMonth||new Date);s.setMonth(s.getMonth()+1),(i=e.onMonthChange)==null||i.call(e,s)}else if(e.view==="month"){let s=new Date(e.viewMonth||new Date);s.setFullYear(s.getFullYear()+1),(a=e.onMonthChange)==null||a.call(e,s)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:yl(i=>{let a=new Date(e.viewMonth||new Date);a.setHours(0,0,0,0),a.setDate(i);let s=e.rangeSelection&&e.value&&e.value[0]&&(t&&Wn(e.value[0],t,a)||e.value[1]&&Wn(e.value[0],e.value[1],a));return{"aria-label":a.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,t]),getMonthCellProps:yl(i=>{var p;let a=new Date(e.viewMonth||new Date);a.setDate(1),a.setHours(0,0,0,0),a.setMonth(i);let l=!((p=e.views)!=null&&p.find(c=>c==="day"))&&e.rangeSelection&&e.value&&e.value[0]&&(o&&Wn(e.value[0],o,a)||e.value[1]&&Wn(e.value[0],e.value[1],a));return{"aria-label":a.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getPickerDayProps:yl(i=>{var c,u;let a=new Date(e.viewMonth||new Date);a.setHours(0,0,0,0),a.setDate(i);let s=!!e.value&&(gv(a,e.value[0])||e.value[1]&&gv(a,e.value[1])),l=e.rangeSelection&&e.value&&e.value[0]&&(t&&Wn(e.value[0],t,a)||e.value[1]&&Wn(e.value[0],e.value[1],a)),p=()=>{var f,d,h,y;e.rangeSelection?e.value?e.value[0]&&!e.value[1]?(d=e.onChange)==null||d.call(e,[new Date(Math.min(e.value[0].getTime(),a.getTime())),new Date(Math.max(e.value[0].getTime(),a.getTime()))]):(h=e.onChange)==null||h.call(e,[a,void 0]):(f=e.onChange)==null||f.call(e,[a,void 0]):(y=e.onChange)==null||y.call(e,[a,void 0]),r(null)};return{isToday:BE(a),isSelected:s,onClick:p,onMouseEnter:e.rangeSelection&&((c=e.value)!=null&&c[0])&&!((u=e.value)!=null&&u[1])?()=>r(a):void 0,disabled:e.minDate&&a<e.minDate||e.maxDate&&a>e.maxDate||e.disableFuture&&a>new Date||e.disablePast&&a<(()=>{let f=new Date;return f.setHours(0,0,0,0),f})(),tabIndex:-1,"aria-label":a.toLocaleDateString(),"aria-selected":s?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t]),getPickerMonthProps:yl(i=>{var u,f,d;let a=new Date(e.viewMonth||new Date);a.setDate(1),a.setHours(0,0,0,0),a.setMonth(i);let s=!((u=e.views)!=null&&u.find(h=>h==="day"))&&e.rangeSelection,l=!!e.value&&(gm(a,e.value[0])||e.value[1]&&gm(a,e.value[1])),p=s&&e.value&&e.value[0]&&(o&&Wn(e.value[0],o,a)||e.value[1]&&Wn(e.value[0],e.value[1],a)),c=()=>{var h,y,v,b,x;s?e.value?e.value[0]&&!e.value[1]?(y=e.onChange)==null||y.call(e,[new Date(Math.min(e.value[0].getTime(),a.getTime())),new Date(Math.max(e.value[0].getTime(),a.getTime()))]):(v=e.onChange)==null||v.call(e,[a,void 0]):(h=e.onChange)==null||h.call(e,[a,void 0]):((b=e.onViewChange)==null||b.call(e,"day"),(x=e.onMonthChange)==null||x.call(e,a)),n(null)};return{isSelected:l,onMouseEnter:s&&((f=e.value)!=null&&f[0])&&!((d=e.value)!=null&&d[1])?()=>n(a):void 0,disabled:e.minDate&&(()=>{let h=new Date(a);return h.setMonth(h.getMonth()+1),h.setDate(0),h<e.minDate})()||e.maxDate&&(()=>{let h=new Date(a);return h.setDate(0),h>e.maxDate})()||e.disableFuture&&a>new Date||e.disablePast&&a<new Date&&!gm(a,new Date),onClick:c,tabIndex:-1,"aria-label":yv(a,e.locale||"default"),"aria-selected":l?"true":void 0,"aria-current":p?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o])}};var ZU=E("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),QU=E("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),jE=E("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:t})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:t==="datePicker"?"250px":"unset"})),HE=E(XU.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),e3=E("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),t3=E("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),r3=E(Et,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),o3=E("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),n3=E("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),i3=E(Et,{name:"Calendar",slot:"month"})(({theme:e,isSelected:t,disabled:r})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),a3=E(Et,{name:"Calendar",slot:"day"})(({theme:e,isToday:t,isSelected:r,disabled:o})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},t&&!r&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},r&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},o&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),UE={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},xm=1e4,WE=(e,t)=>Math.abs(e)*t,s3=e=>{let{ownerState:t}=e,{getPickerDayProps:r,getDayCellProps:o}=bm(t),n=$E(()=>AE(t.viewMonth),[t.viewMonth]),i=$E(()=>ME(t.locale||"default"),[t.locale]);return L(jE,{calendarType:"datePicker",children:L(VE,{initial:!1,custom:t.direction,children:ke(HE,{custom:t.direction,variants:UE,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(a,{offset:s,velocity:l})=>{var c,u;let p=WE(s.x,l.x);if(p<-xm){let f=new Date(t.viewMonth||new Date);f.setMonth(f.getMonth()+1),(c=t.onMonthChange)==null||c.call(t,f)}else if(p>xm){let f=new Date(t.viewMonth||new Date);f.setMonth(f.getMonth()-1),(u=t.onMonthChange)==null||u.call(t,f)}},children:[L(e3,{children:L("tr",{children:i.map((a,s)=>ke(Pn,{children:[L("th",{children:L(Cr,{level:"body-xs",textAlign:"center",children:a})}),s<6&&L("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})]}))})}),L(t3,{children:n.map((a,s)=>ke(mc,{children:[L("tr",{children:a.map((l,p)=>l?ke(mc,{children:[L(o3,ue(H({},o(l)),{children:L(a3,ue(H({size:"sm",variant:"plain",color:"neutral"},r(l)),{children:l}))})),p<6&&L("td",{"aria-hidden":"true","aria-description":"cell-gap"})]},p):ke(mc,{children:[L("td",{}),p<6&&L("td",{"aria-hidden":"true","aria-description":"cell-gap"})]},p))}),s<n.length-1&&L("tr",{"aria-hidden":"true","aria-description":"row-gap",children:L("td",{colSpan:13,style:{height:4}})})]},`${t.viewMonth}_${s}`))})]},`${t.viewMonth.toString()}_${t.direction}`)})})},l3=e=>{var a;let{ownerState:t}=e,{getPickerMonthProps:r,getMonthCellProps:o}=bm(t),n=Array.from({length:12},(s,l)=>l).reduce((s,l)=>(s[s.length-1].length===4&&s.push([]),s[s.length-1].push(l),s),[[]]),i=!((a=t.views)!=null&&a.find(s=>s==="day"))&&t.rangeSelection;return L(jE,{calendarType:i?"monthPicker":"datePicker",children:L(VE,{initial:!1,custom:t.direction,children:L(HE,{custom:t.direction,variants:UE,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(s,{offset:l,velocity:p})=>{var u,f;let c=WE(l.x,p.x);if(c<-xm){let d=new Date(t.viewMonth||new Date);d.setMonth(d.getMonth()+1),(u=t.onMonthChange)==null||u.call(t,d)}else if(c>xm){let d=new Date(t.viewMonth||new Date);d.setMonth(d.getMonth()-1),(f=t.onMonthChange)==null||f.call(t,d)}},children:L("tbody",{children:n.map((s,l)=>ke(mc,{children:[L("tr",{children:s.map((p,c)=>ke(mc,{children:[L(n3,ue(H({},o(p)),{children:L(i3,ue(H({size:"sm",variant:"plain",color:"neutral"},r(p)),{children:LE(p,t.locale)}))})),c<3&&L("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})]},p))}),l<n.length-1&&L("tr",{"aria-hidden":"true","aria-description":"row-gap",children:L("td",{colSpan:7,style:{height:4}})})]},l))})},`${t.viewMonth.getFullYear()}_${t.direction}`)})})},hc=YU((e,t)=>{let[r,o]=zE(e),b=r,{value:n,defaultValue:i,onChange:a,locale:s,onViewChange:l,onMonthChange:p,view:c,views:u,rangeSelection:f}=b,d=xe(b,["value","defaultValue","onChange","locale","onViewChange","onMonthChange","view","views","rangeSelection"]),{calendarTitle:h,onPrev:y,onNext:v}=bm(o);return ke(ZU,ue(H({ref:t},d),{children:[ke(QU,{children:[L(Gr,{size:"sm",onClick:y,children:L(hm,{})}),L(r3,{ownerState:o,variant:"plain",color:"neutral",onClick:l,children:h}),L(Gr,{size:"sm",onClick:v,children:L(ym,{})})]}),c==="day"&&L(s3,{ownerState:o}),c==="month"&&L(l3,{ownerState:o})]}))});hc.displayName="Calendar";var gl=hc;import{motion as yc}from"framer-motion";var p3=yc(rf),gc=p3;gc.displayName="Card";var c3=yc(af),vv=c3;vv.displayName="CardContent";var u3=yc(sf),bv=u3;bv.displayName="CardCover";var d3=yc(nf),xv=d3;xv.displayName="CardActions";var f3=yc(lf),Tv=f3;Tv.displayName="CardOverflow";import{motion as m3}from"framer-motion";var h3=m3(pf),vc=e=>L(h3,H({},e));vc.displayName="Checkbox";var bc=vc;import{forwardRef as y3}from"react";var g3=E("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:t="lg"})=>H(H(H(H({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},t==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}}),t==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}}),t==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}}),t==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}})),Pv=y3(function(t,r){return L(g3,H({ref:r},t))});Pv.displayName="Container";import MI,{useCallback as TW,useState as LI}from"react";var Cv=function(e,t){return Cv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[n]=o[n])},Cv(e,t)};function xc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Cv(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ze=function(){return Ze=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ze.apply(this,arguments)};function GE(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function Tm(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var Ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ye||(Ye={}));var ht;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(ht||(ht={}));var Ja;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ja||(Ja={}));function kv(e){return e.type===ht.literal}function JE(e){return e.type===ht.argument}function Pm(e){return e.type===ht.number}function Cm(e){return e.type===ht.date}function km(e){return e.type===ht.time}function Sm(e){return e.type===ht.select}function Rm(e){return e.type===ht.plural}function qE(e){return e.type===ht.pound}function Em(e){return e.type===ht.tag}function Im(e){return!!(e&&typeof e=="object"&&e.type===Ja.number)}function Tc(e){return!!(e&&typeof e=="object"&&e.type===Ja.dateTime)}var Sv=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;var v3=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function KE(e){var t={};return e.replace(v3,function(r){var o=r.length;switch(r[0]){case"G":t.era=o===4?"long":o===5?"narrow":"short";break;case"y":t.year=o===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][o-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][o-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=o===4?"long":o===5?"narrow":"short";break;case"e":if(o<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][o-4];break;case"c":if(o<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][o-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][o-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][o-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][o-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][o-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][o-1];break;case"s":t.second=["numeric","2-digit"][o-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=o<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var YE=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function eI(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(YE).filter(function(f){return f.length>0}),r=[],o=0,n=t;o<n.length;o++){var i=n[o],a=i.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],l=a.slice(1),p=0,c=l;p<c.length;p++){var u=c[p];if(u.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:l})}return r}function b3(e){return e.replace(/^(.*?)-/,"")}var XE=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,tI=/^(@+)?(\+|#+)?[rs]?$/g,x3=/(\*)(0+)|(#+)(0+)|(0+)/g,rI=/^(0+)$/;function ZE(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(tI,function(r,o,n){return typeof n!="string"?(t.minimumSignificantDigits=o.length,t.maximumSignificantDigits=o.length):n==="+"?t.minimumSignificantDigits=o.length:o[0]==="#"?t.maximumSignificantDigits=o.length:(t.minimumSignificantDigits=o.length,t.maximumSignificantDigits=o.length+(typeof n=="string"?n.length:0)),""}),t}function oI(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function T3(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!rI.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function QE(e){var t={},r=oI(e);return r||t}function nI(e){for(var t={},r=0,o=e;r<o.length;r++){var n=o[r];switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=b3(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=Ze(Ze(Ze({},t),{notation:"scientific"}),n.options.reduce(function(l,p){return Ze(Ze({},l),QE(p))},{}));continue;case"engineering":t=Ze(Ze(Ze({},t),{notation:"engineering"}),n.options.reduce(function(l,p){return Ze(Ze({},l),QE(p))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(x3,function(l,p,c,u,f,d){if(p)t.minimumIntegerDigits=c.length;else{if(u&&f)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(rI.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(XE.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(XE,function(l,p,c,u,f,d){return c==="*"?t.minimumFractionDigits=p.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:f&&d?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+d.length):(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length),""});var i=n.options[0];i==="w"?t=Ze(Ze({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=Ze(Ze({},t),ZE(i)));continue}if(tI.test(n.stem)){t=Ze(Ze({},t),ZE(n.stem));continue}var a=oI(n.stem);a&&(t=Ze(Ze({},t),a));var s=T3(n.stem);s&&(t=Ze(Ze({},t),s))}return t}var Pc={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function iI(e,t){for(var r="",o=0;o<e.length;o++){var n=e.charAt(o);if(n==="j"){for(var i=0;o+1<e.length&&e.charAt(o+1)===n;)i++,o++;var a=1+(i&1),s=i<2?1:3+(i>>1),l="a",p=P3(t);for((p=="H"||p=="k")&&(s=0);s-- >0;)r+=l;for(;a-- >0;)r=p+r}else n==="J"?r+="H":r+=n}return r}function P3(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,o;r!=="root"&&(o=e.maximize().region);var n=Pc[o||""]||Pc[r||""]||Pc["".concat(r,"-001")]||Pc["001"];return n[0]}var Rv,C3=new RegExp("^".concat(Sv.source,"*")),k3=new RegExp("".concat(Sv.source,"*$"));function tt(e,t){return{start:e,end:t}}var S3=!!String.prototype.startsWith&&"_a".startsWith("a",1),R3=!!String.fromCodePoint,E3=!!Object.fromEntries,I3=!!String.prototype.codePointAt,O3=!!String.prototype.trimStart,_3=!!String.prototype.trimEnd,w3=!!Number.isSafeInteger,D3=w3?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Iv=!0;try{aI=cI("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Iv=((Rv=aI.exec("a"))===null||Rv===void 0?void 0:Rv[0])==="a"}catch(e){Iv=!1}var aI,sI=S3?function(t,r,o){return t.startsWith(r,o)}:function(t,r,o){return t.slice(o,o+r.length)===r},Ov=R3?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var o="",n=t.length,i=0,a;n>i;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");o+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return o},lI=E3?Object.fromEntries:function(t){for(var r={},o=0,n=t;o<n.length;o++){var i=n[o],a=i[0],s=i[1];r[a]=s}return r},pI=I3?function(t,r){return t.codePointAt(r)}:function(t,r){var o=t.length;if(!(r<0||r>=o)){var n=t.charCodeAt(r),i;return n<55296||n>56319||r+1===o||(i=t.charCodeAt(r+1))<56320||i>57343?n:(n-55296<<10)+(i-56320)+65536}},A3=O3?function(t){return t.trimStart()}:function(t){return t.replace(C3,"")},N3=_3?function(t){return t.trimEnd()}:function(t){return t.replace(k3,"")};function cI(e,t){return new RegExp(e,t)}var _v;Iv?(Ev=cI("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),_v=function(t,r){var o;Ev.lastIndex=r;var n=Ev.exec(t);return(o=n[1])!==null&&o!==void 0?o:""}):_v=function(t,r){for(var o=[];;){var n=pI(t,r);if(n===void 0||dI(n)||B3(n))break;o.push(n),r+=n>=65536?2:1}return Ov.apply(void 0,o)};var Ev,uI=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,o){for(var n=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,o);if(a.err)return a;n.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),n.push({type:ht.pound,location:tt(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(o)break;return this.error(Ye.UNMATCHED_CLOSING_TAG,tt(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&wv(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;n.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;n.push(a.val)}}}return{val:n,err:null}},e.prototype.parseTag=function(t,r){var o=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ht.literal,value:"<".concat(n,"/>"),location:tt(o,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!wv(this.char()))return this.error(Ye.INVALID_TAG,tt(s,this.clonePosition()));var l=this.clonePosition(),p=this.parseTagName();return n!==p?this.error(Ye.UNMATCHED_CLOSING_TAG,tt(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ht.tag,value:n,children:a,location:tt(o,this.clonePosition())},err:null}:this.error(Ye.INVALID_TAG,tt(s,this.clonePosition())))}else return this.error(Ye.UNCLOSED_TAG,tt(o,this.clonePosition()))}else return this.error(Ye.INVALID_TAG,tt(o,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&M3(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var o=this.clonePosition(),n="";;){var i=this.tryParseQuote(r);if(i){n+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){n+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){n+=s;continue}break}var l=tt(o,this.clonePosition());return{val:{type:ht.literal,value:n,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!L3(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var o=this.char();if(o===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(o);this.bump()}return Ov.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var o=this.char();return o===60||o===123||o===35&&(r==="plural"||r==="selectordinal")||o===125&&t>0?null:(this.bump(),Ov(o))},e.prototype.parseArgument=function(t,r){var o=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(o,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ye.EMPTY_ARGUMENT,tt(o,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(Ye.MALFORMED_ARGUMENT,tt(o,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(o,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ht.argument,value:n,location:tt(o,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(o,this.clonePosition())):this.parseArgumentOptions(t,r,n,o);default:return this.error(Ye.MALFORMED_ARGUMENT,tt(o,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),o=_v(this.message,r),n=r+o.length;this.bumpTo(n);var i=this.clonePosition(),a=tt(t,i);return{value:o,location:a}},e.prototype.parseArgumentOptions=function(t,r,o,n){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(Ye.EXPECT_ARGUMENT_TYPE,tt(a,l));case"number":case"date":case"time":{this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),u=this.parseSimpleArgStyleIfPossible();if(u.err)return u;var f=N3(u.val);if(f.length===0)return this.error(Ye.EXPECT_ARGUMENT_STYLE,tt(this.clonePosition(),this.clonePosition()));var d=tt(c,this.clonePosition());p={style:f,styleLocation:d}}var h=this.tryParseArgumentClose(n);if(h.err)return h;var y=tt(n,this.clonePosition());if(p&&sI(p==null?void 0:p.style,"::",0)){var v=A3(p.style.slice(2));if(s==="number"){var u=this.parseNumberSkeletonFromString(v,p.styleLocation);return u.err?u:{val:{type:ht.number,value:o,location:y,style:u.val},err:null}}else{if(v.length===0)return this.error(Ye.EXPECT_DATE_TIME_SKELETON,y);var b=v;this.locale&&(b=iI(v,this.locale));var f={type:Ja.dateTime,pattern:b,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?KE(b):{}},x=s==="date"?ht.date:ht.time;return{val:{type:x,value:o,location:y,style:f},err:null}}}return{val:{type:s==="number"?ht.number:s==="date"?ht.date:ht.time,value:o,location:y,style:(i=p==null?void 0:p.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ye.EXPECT_SELECT_ARGUMENT_OPTIONS,tt(g,Ze({},g)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),T=0;if(s!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,tt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var u=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(u.err)return u;this.bumpSpace(),C=this.parseIdentifierIfPossible(),T=u.val}var P=this.tryParsePluralOrSelectOptions(t,s,r,C);if(P.err)return P;var h=this.tryParseArgumentClose(n);if(h.err)return h;var k=tt(n,this.clonePosition());return s==="select"?{val:{type:ht.select,value:o,options:lI(P.val),location:k},err:null}:{val:{type:ht.plural,value:o,options:lI(P.val),offset:T,pluralType:s==="plural"?"cardinal":"ordinal",location:k},err:null}}default:return this.error(Ye.INVALID_ARGUMENT_TYPE,tt(a,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,tt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var o=this.char();switch(o){case 39:{this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,tt(n,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var o=[];try{o=eI(t)}catch(n){return this.error(Ye.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ja.number,tokens:o,location:r,parsedOptions:this.shouldParseSkeletons?nI(o):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,o,n){for(var i,a=!1,s=[],l=new Set,p=n.value,c=n.location;;){if(p.length===0){var u=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;c=tt(u,this.clonePosition()),p=this.message.slice(u.offset,this.offset())}else break}if(l.has(p))return this.error(r==="select"?Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);p==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,tt(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(t+1,r,o);if(h.err)return h;var y=this.tryParseArgumentClose(d);if(y.err)return y;s.push([p,{value:h.val,location:tt(d,this.clonePosition())}]),l.add(p),this.bumpSpace(),i=this.parseIdentifierIfPossible(),p=i.value,c=i.location}return s.length===0?this.error(r==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,tt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(Ye.MISSING_OTHER_CLAUSE,tt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var o=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(o=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var l=tt(n,this.clonePosition());return i?(a*=o,D3(a)?{val:a,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=pI(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(sI(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),o=this.message.indexOf(t,r);return o>=0?(this.bumpTo(o),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&dI(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),o=this.message.charCodeAt(r+(t>=65536?2:1));return o!=null?o:null},e}();function wv(e){return e>=97&&e<=122||e>=65&&e<=90}function L3(e){return wv(e)||e===47}function M3(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function dI(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function B3(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dv(e){e.forEach(function(t){if(delete t.location,Sm(t)||Rm(t))for(var r in t.options)delete t.options[r].location,Dv(t.options[r].value);else Pm(t)&&Im(t.style)||(Cm(t)||km(t))&&Tc(t.style)?delete t.style.location:Em(t)&&Dv(t.children)})}function fI(e,t){t===void 0&&(t={}),t=Ze({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new uI(e,t).parse();if(r.err){var o=SyntaxError(Ye[r.err.kind]);throw o.location=r.err.location,o.originalMessage=r.err.message,o}return t!=null&&t.captureLocation||Dv(r.val),r.val}function Om(e,t){var r=t&&t.cache?t.cache:H3,o=t&&t.serializer?t.serializer:j3,n=t&&t.strategy?t.strategy:F3;return n(e,{cache:r,serializer:o})}function z3(e){return e==null||typeof e=="number"||typeof e=="boolean"}function mI(e,t,r,o){var n=z3(o)?o:r(o),i=t.get(n);return typeof i>"u"&&(i=e.call(this,o),t.set(n,i)),i}function hI(e,t,r){var o=Array.prototype.slice.call(arguments,3),n=r(o),i=t.get(n);return typeof i>"u"&&(i=e.apply(this,o),t.set(n,i)),i}function Av(e,t,r,o,n){return r.bind(t,e,o,n)}function F3(e,t){var r=e.length===1?mI:hI;return Av(e,this,r,t.cache.create(),t.serializer)}function $3(e,t){return Av(e,this,hI,t.cache.create(),t.serializer)}function V3(e,t){return Av(e,this,mI,t.cache.create(),t.serializer)}var j3=function(){return JSON.stringify(arguments)};function Nv(){this.cache=Object.create(null)}Nv.prototype.get=function(e){return this.cache[e]};Nv.prototype.set=function(e,t){this.cache[e]=t};var H3={create:function(){return new Nv}},_m={variadic:$3,monadic:V3};var qa;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(qa||(qa={}));var Cc=function(e){xc(t,e);function t(r,o,n){var i=e.call(this,r)||this;return i.code=o,i.originalMessage=n,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Lv=function(e){xc(t,e);function t(r,o,n,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(o,'". Options are "').concat(Object.keys(n).join('", "'),'"'),qa.INVALID_VALUE,i)||this}return t}(Cc);var yI=function(e){xc(t,e);function t(r,o,n){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(o),qa.INVALID_VALUE,n)||this}return t}(Cc);var gI=function(e){xc(t,e);function t(r,o){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(o,'"'),qa.MISSING_VALUE,o)||this}return t}(Cc);var Sr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Sr||(Sr={}));function U3(e){return e.length<2?e:e.reduce(function(t,r){var o=t[t.length-1];return!o||o.type!==Sr.literal||r.type!==Sr.literal?t.push(r):o.value+=r.value,t},[])}function W3(e){return typeof e=="function"}function kc(e,t,r,o,n,i,a){if(e.length===1&&kv(e[0]))return[{type:Sr.literal,value:e[0].value}];for(var s=[],l=0,p=e;l<p.length;l++){var c=p[l];if(kv(c)){s.push({type:Sr.literal,value:c.value});continue}if(qE(c)){typeof i=="number"&&s.push({type:Sr.literal,value:r.getNumberFormat(t).format(i)});continue}var u=c.value;if(!(n&&u in n))throw new gI(u,a);var f=n[u];if(JE(c)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),s.push({type:typeof f=="string"?Sr.literal:Sr.object,value:f});continue}if(Cm(c)){var d=typeof c.style=="string"?o.date[c.style]:Tc(c.style)?c.style.parsedOptions:void 0;s.push({type:Sr.literal,value:r.getDateTimeFormat(t,d).format(f)});continue}if(km(c)){var d=typeof c.style=="string"?o.time[c.style]:Tc(c.style)?c.style.parsedOptions:o.time.medium;s.push({type:Sr.literal,value:r.getDateTimeFormat(t,d).format(f)});continue}if(Pm(c)){var d=typeof c.style=="string"?o.number[c.style]:Im(c.style)?c.style.parsedOptions:void 0;d&&d.scale&&(f=f*(d.scale||1)),s.push({type:Sr.literal,value:r.getNumberFormat(t,d).format(f)});continue}if(Em(c)){var h=c.children,y=c.value,v=n[y];if(!W3(v))throw new yI(y,"function",a);var b=kc(h,t,r,o,n,i),x=v(b.map(function(T){return T.value}));Array.isArray(x)||(x=[x]),s.push.apply(s,x.map(function(T){return{type:typeof T=="string"?Sr.literal:Sr.object,value:T}}))}if(Sm(c)){var g=c.options[f]||c.options.other;if(!g)throw new Lv(c.value,f,Object.keys(c.options),a);s.push.apply(s,kc(g.value,t,r,o,n));continue}if(Rm(c)){var g=c.options["=".concat(f)];if(!g){if(!Intl.PluralRules)throw new Cc(`Intl.PluralRules is not available in this environment.
|
|
118
118
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
119
119
|
`,qa.MISSING_INTL_API,a);var C=r.getPluralRules(t,{type:c.pluralType}).select(f-(c.offset||0));g=c.options[C]||c.options.other}if(!g)throw new Lv(c.value,f,Object.keys(c.options),a);s.push.apply(s,kc(g.value,t,r,o,n,f-(c.offset||0)));continue}}return U3(s)}function G3(e,t){return t?Ze(Ze(Ze({},e||{}),t||{}),Object.keys(e).reduce(function(r,o){return r[o]=Ze(Ze({},e[o]),t[o]||{}),r},{})):e}function J3(e,t){return t?Object.keys(e).reduce(function(r,o){return r[o]=G3(e[o],t[o]),r},Ze({},e)):e}function Mv(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function q3(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Om(function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return new((t=Intl.NumberFormat).bind.apply(t,Tm([void 0],r,!1)))},{cache:Mv(e.number),strategy:_m.variadic}),getDateTimeFormat:Om(function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return new((t=Intl.DateTimeFormat).bind.apply(t,Tm([void 0],r,!1)))},{cache:Mv(e.dateTime),strategy:_m.variadic}),getPluralRules:Om(function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return new((t=Intl.PluralRules).bind.apply(t,Tm([void 0],r,!1)))},{cache:Mv(e.pluralRules),strategy:_m.variadic})}}var wm=function(){function e(t,r,o,n){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(p){var c=i.formatToParts(p);if(c.length===1)return c[0].value;var u=c.reduce(function(f,d){return!f.length||d.type!==Sr.literal||typeof f[f.length-1]!="string"?f.push(d.value):f[f.length-1]+=d.value,f},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(p){return kc(i.ast,i.locales,i.formatters,i.formats,p,void 0,i.message)},this.resolvedOptions=function(){var p;return{locale:((p=i.resolvedLocale)===null||p===void 0?void 0:p.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=n||{},s=a.formatters,l=GE(a,["formatters"]);this.ast=e.__parse(t,Ze(Ze({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=J3(e.formats,o),this.formatters=n&&n.formatters||q3(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=fI,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var vI=wm;import vl,{useState as CI,useMemo as K3,useRef as Sc,useEffect as Bv,useLayoutEffect as Y3}from"react";function kI(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}var Rc;(function(e){e.event="event",e.props="prop"})(Rc||(Rc={}));function Fi(){}function X3(e){var t,r=void 0;return function(){for(var o=[],n=arguments.length;n--;)o[n]=arguments[n];return t&&o.length===t.length&&o.every(function(i,a){return i===t[a]})||(t=o,r=e.apply(void 0,o)),r}}function Ec(e){return!!(e||"").match(/\d/)}function bl(e){return e==null}function Z3(e){return typeof e=="number"&&isNaN(e)}function SI(e){return bl(e)||Z3(e)||typeof e=="number"&&!isFinite(e)}function RI(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Q3(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function eW(e,t,r){var o=Q3(r),n=e.search(/[1-9]/);return n=n===-1?e.length:n,e.substring(0,n)+e.substring(n,e.length).replace(o,"$1"+t)}function tW(e){var t=Sc(e);t.current=e;var r=Sc(function(){for(var o=[],n=arguments.length;n--;)o[n]=arguments[n];return t.current.apply(t,o)});return r.current}function Fv(e,t){t===void 0&&(t=!0);var r=e[0]==="-",o=r&&t;e=e.replace("-","");var n=e.split("."),i=n[0],a=n[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNegation:r,addNegation:o}}function rW(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),o=r[0].replace(/^0+/,"")||"0",n=r[1]||"";return(t?"-":"")+o+(n?"."+n:"")}function EI(e,t,r){for(var o="",n=r?"0":"",i=0;i<=t-1;i++)o+=e[i]||n;return o}function bI(e,t){return Array(t+1).join(e)}function II(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var o=t.split(/[eE]/g),n=o[0],i=o[1];if(i=Number(i),!i)return r+n;n=n.replace(".","");var a=1+i,s=n.length;return a<0?n="0."+bI("0",Math.abs(a))+n:a>=s?n=n+bI("0",a-s):n=(n.substring(0,a)||"0")+"."+n.substring(a),r+n}function xI(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var o=(e.indexOf(".")!==-1||r)&&t,n=Fv(e),i=n.beforeDecimal,a=n.afterDecimal,s=n.hasNegation,l=parseFloat("0."+(a||"0")),p=a.length<=t?"0."+a:l.toFixed(t),c=p.split("."),u=i;i&&Number(c[0])&&(u=i.split("").reverse().reduce(function(y,v,b){return y.length>b?(Number(y[0])+Number(v)).toString()+y.substring(1,y.length):v+y},c[0]));var f=EI(c[1]||"",t,r),d=s?"-":"",h=o?".":"";return""+d+u+h+f}function Ka(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var OI=X3(function(e,t){for(var r=0,o=0,n=e.length,i=t.length;e[r]===t[r]&&r<n;)r++;for(;e[n-1-o]===t[i-1-o]&&i-o>r&&n-o>r;)o++;return{from:{start:r,end:n-o},to:{start:r,end:i-o}}});function oW(e,t,r){return Math.min(Math.max(e,t),r)}function zv(e){return Math.max(e.selectionStart,e.selectionEnd)}function nW(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function iW(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function aW(e){var t=e.currentValue,r=e.formattedValue,o=e.currentValueIndex,n=e.formattedValueIndex;return t[o]===r[n]}function sW(e,t,r,o,n,i,a){a===void 0&&(a=aW);var s=n.findIndex(function(C){return C}),l=e.slice(0,s);!t&&!r.startsWith(l)&&(t=l,r=l+r,o=o+l.length);for(var p=r.length,c=e.length,u={},f=new Array(p),d=0;d<p;d++){f[d]=-1;for(var h=0,y=c;h<y;h++){var v=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:d,formattedValueIndex:h});if(v&&u[h]!==!0){f[d]=h,u[h]=!0;break}}}for(var b=o;b<p&&(f[b]===-1||!i(r[b]));)b++;var x=b===p||f[b]===-1?c:f[b];for(b=o-1;b>0&&f[b]===-1;)b--;var g=b===-1||f[b]===-1?0:f[b]+1;return g>x?x:o-g<x-o?g:x}function TI(e,t,r,o){var n=e.length;if(t=oW(t,0,n),o==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=n&&!r[t];)t++;t>n&&(t=r.lastIndexOf(!0))}return t===-1&&(t=n),t}function lW(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,o=t.length;r<o;r++)t[r]=!!(Ec(e[r])||Ec(e[r-1]));return t}function _I(e,t,r,o,n,i){i===void 0&&(i=Fi);var a=tW(function(h,y){var v,b;return SI(h)?(b="",v=""):typeof h=="number"||y?(b=typeof h=="number"?II(h):h,v=o(b)):(b=n(h,void 0),v=o(b)),{formattedValue:v,numAsString:b}}),s=CI(function(){return a(bl(e)?t:e,r)}),l=s[0],p=s[1],c=function(h,y){h.formattedValue!==l.formattedValue&&p({formattedValue:h.formattedValue,numAsString:h.value}),i(h,y)},u=e,f=r;bl(e)&&(u=l.numAsString,f=!0);var d=a(u,f);return K3(function(){p(d)},[d.formattedValue]),[l,c]}function pW(e){return e.replace(/[^0-9]/g,"")}function cW(e){return e}function uW(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var o=e.customInput,n=e.renderText,i=e.getInputRef,a=e.format;a===void 0&&(a=cW);var s=e.removeFormatting;s===void 0&&(s=pW);var l=e.defaultValue,p=e.valueIsNumericString,c=e.onValueChange,u=e.isAllowed,f=e.onChange;f===void 0&&(f=Fi);var d=e.onKeyDown;d===void 0&&(d=Fi);var h=e.onMouseUp;h===void 0&&(h=Fi);var y=e.onFocus;y===void 0&&(y=Fi);var v=e.onBlur;v===void 0&&(v=Fi);var b=e.value,x=e.getCaretBoundary;x===void 0&&(x=lW);var g=e.isValidInputCharacter;g===void 0&&(g=Ec);var C=e.isCharacterSame,T=kI(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),P=_I(b,l,!!p,a,s,c),k=P[0],R=k.formattedValue,D=k.numAsString,O=P[1],B=Sc({formattedValue:R,numAsString:D}),A=function(te,Q){B.current={formattedValue:te.formattedValue,numAsString:te.value},O(te,Q)},_=CI(!1),j=_[0],N=_[1],w=Sc(null),z=Sc({setCaretTimeout:null,focusTimeout:null});Bv(function(){return N(!0),function(){clearTimeout(z.current.setCaretTimeout),clearTimeout(z.current.focusTimeout)}},[]);var Y=a,V=function(te,Q){var he=parseFloat(Q);return{formattedValue:te,value:Q,floatValue:isNaN(he)?void 0:he}},S=function(te,Q,he){te.selectionStart===0&&te.selectionEnd===te.value.length||(Ka(te,Q),z.current.setCaretTimeout=setTimeout(function(){te.value===he&&te.selectionStart!==Q&&Ka(te,Q)},0))},ee=function(te,Q,he){return TI(te,Q,x(te),he)},ne=function(te,Q,he){var be=x(Q),$e=sW(Q,R,te,he,be,g,C);return $e=TI(Q,$e,be),$e},I=function(te){var Q=te.formattedValue;Q===void 0&&(Q="");var he=te.input,be=te.source,$e=te.event,we=te.numAsString,Ae;if(he){var Me=te.inputValue||he.value,Ge=zv(he);he.value=Q,Ae=ne(Me,Q,Ge),Ae!==void 0&&S(he,Ae,Q)}Q!==R&&A(V(Q,we),{event:$e,source:be})};Bv(function(){var te=B.current,Q=te.formattedValue,he=te.numAsString;R!==Q&&(R!==D||Q!==he)&&A(V(R,D),{event:void 0,source:Rc.props})},[R,D]);var pe=w.current?zv(w.current):void 0,ge=typeof window<"u"?Y3:Bv;ge(function(){var te=w.current;if(R!==B.current.formattedValue&&te){var Q=ne(B.current.formattedValue,R,pe);te.value=R,S(te,Q,R)}},[R]);var De=function(te,Q,he){var be=OI(R,te),$e=Object.assign(Object.assign({},be),{lastValue:R}),we=s(te,$e),Ae=Y(we);if(we=s(Ae,void 0),u&&!u(V(Ae,we))){var Me=Q.target,Ge=zv(Me),at=ne(te,R,Ge);return Me.value=R,S(Me,at,R),!1}return I({formattedValue:Ae,numAsString:we,inputValue:te,event:Q,source:he,input:Q.target}),!0},ae=function(te){var Q=te.target,he=Q.value,be=De(he,te,Rc.event);be&&f(te)},W=function(te){var Q=te.target,he=te.key,be=Q.selectionStart,$e=Q.selectionEnd,we=Q.value;we===void 0&&(we="");var Ae;if(he==="ArrowLeft"||he==="Backspace"?Ae=Math.max(be-1,0):he==="ArrowRight"?Ae=Math.min(be+1,we.length):he==="Delete"&&(Ae=be),Ae===void 0||be!==$e){d(te);return}var Me=Ae;if(he==="ArrowLeft"||he==="ArrowRight"){var Ge=he==="ArrowLeft"?"left":"right";Me=ee(we,Ae,Ge),Me!==Ae&&te.preventDefault()}else he==="Delete"&&!g(we[Ae])?Me=ee(we,Ae,"right"):he==="Backspace"&&!g(we[Ae])&&(Me=ee(we,Ae,"left"));Me!==Ae&&S(Q,Me,we),te.isUnitTestRun&&S(Q,Me,we),d(te)},de=function(te){var Q=te.target,he=function(){var be=Q.selectionStart,$e=Q.selectionEnd,we=Q.value;if(we===void 0&&(we=""),be===$e){var Ae=ee(we,be);Ae!==be&&S(Q,Ae,we)}};he(),requestAnimationFrame(function(){he()}),h(te)},fe=function(te){te.persist&&te.persist();var Q=te.target,he=te.currentTarget;w.current=Q,z.current.focusTimeout=setTimeout(function(){var be=Q.selectionStart,$e=Q.selectionEnd,we=Q.value;we===void 0&&(we="");var Ae=ee(we,be);Ae!==be&&!(be===0&&$e===we.length)&&S(Q,Ae,we),y(Object.assign(Object.assign({},te),{currentTarget:he}))},0)},Ce=function(te){w.current=null,clearTimeout(z.current.focusTimeout),clearTimeout(z.current.setCaretTimeout),v(te)},ve=j&&nW()?"numeric":void 0,Fe=Object.assign({inputMode:ve},T,{type:t,value:R,onChange:ae,onKeyDown:W,onMouseUp:de,onFocus:fe,onBlur:Ce});if(r==="text")return n?vl.createElement(vl.Fragment,null,n(R,T)||null):vl.createElement("span",Object.assign({},T,{ref:i}),R);if(o){var Je=o;return vl.createElement(Je,Object.assign({},Fe,{ref:i}))}return vl.createElement("input",Object.assign({},Fe,{ref:i}))}function PI(e,t){var r=t.decimalScale,o=t.fixedDecimalScale,n=t.prefix;n===void 0&&(n="");var i=t.suffix;i===void 0&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=Dm(t),p=l.thousandSeparator,c=l.decimalSeparator,u=r!==0&&e.indexOf(".")!==-1||r&&o,f=Fv(e,a),d=f.beforeDecimal,h=f.afterDecimal,y=f.addNegation;return r!==void 0&&(h=EI(h,r,!!o)),p&&(d=eW(d,p,s)),n&&(d=n+d),i&&(h=h+i),y&&(d="-"+d),e=d+(u&&c||"")+h,e}function Dm(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,o=e.allowedDecimalSeparators;return r===!0&&(r=","),o||(o=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:o}}function dW(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),o=new RegExp("(-)(.)*(-)"),n=r.test(e),i=o.test(e);return e=e.replace(/-/g,""),n&&!i&&t&&(e="-"+e),e}function fW(e,t){return new RegExp("(^-)|[0-9]|"+RI(e),t?"g":void 0)}function mW(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function hW(e,t,r){var o;t===void 0&&(t=iW(e));var n=r.allowNegative,i=r.prefix;i===void 0&&(i="");var a=r.suffix;a===void 0&&(a="");var s=r.decimalScale,l=t.from,p=t.to,c=p.start,u=p.end,f=Dm(r),d=f.allowedDecimalSeparators,h=f.decimalSeparator,y=e[u]===h;if(Ec(e)&&(e===i||e===a)&&t.lastValue==="")return e;if(u-c===1&&d.indexOf(e[c])!==-1){var v=s===0?"":h;e=e.substring(0,c)+v+e.substring(c+1,e.length)}var b=function(z,Y,V){var S=!1,ee=!1;i.startsWith("-")?S=!1:z.startsWith("--")?(S=!1,ee=!0):a.startsWith("-")&&z.length===a.length?S=!1:z[0]==="-"&&(S=!0);var ne=S?1:0;return ee&&(ne=2),ne&&(z=z.substring(ne),Y-=ne,V-=ne),{value:z,start:Y,end:V,hasNegation:S}},x=b(e,c,u),g=x.hasNegation;o=x,e=o.value,c=o.start,u=o.end;var C=b(t.lastValue,l.start,l.end),T=C.start,P=C.end,k=C.value,R=e.substring(c,u);e.length&&k.length&&(T>k.length-a.length||P<i.length)&&!(R&&a.startsWith(R))&&(e=k);var D=0;e.startsWith(i)?D+=i.length:c<i.length&&(D=c),e=e.substring(D),u-=D;var O=e.length,B=e.length-a.length;e.endsWith(a)?O=B:(u>B||u>e.length-a.length)&&(O=u),e=e.substring(0,O),e=dW(g?"-"+e:e,n),e=(e.match(fW(h,!0))||[]).join("");var A=e.indexOf(h);e=e.replace(new RegExp(RI(h),"g"),function(z,Y){return Y===A?".":""});var _=Fv(e,n),j=_.beforeDecimal,N=_.afterDecimal,w=_.addNegation;return p.end-p.start<l.end-l.start&&j===""&&y&&!parseFloat(N)&&(e=w?"-":""),e}function yW(e,t){var r=t.prefix;r===void 0&&(r="");var o=t.suffix;o===void 0&&(o="");var n=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";n.fill(!1,0,r.length+(i?1:0));var a=e.length;return n.fill(!1,a-o.length+1,a+1),n}function gW(e){var t=Dm(e),r=t.thousandSeparator,o=t.decimalSeparator,n=e.prefix;n===void 0&&(n="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===o)throw new Error(`
|
|
120
120
|
Decimal separator can't be same as thousand separator.
|
|
@@ -124,7 +124,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
124
124
|
Prefix can't start with '-' when allowNegative is true.
|
|
125
125
|
prefix: `+n+`
|
|
126
126
|
allowNegative: `+i+`
|
|
127
|
-
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function vW(e){e=gW(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=Fi);var l=e.onBlur;l===void 0&&(l=Fi);var p=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,h=e.value,y=e.valueIsNumericString,v=e.onValueChange,b=kI(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=Dm(e),g=x.decimalSeparator,C=x.allowedDecimalSeparators,T=function(V){return PI(V,e)},P=function(V,S){return hW(V,S,e)},k=bl(h)?d:h,R=y!=null?y:mW(k,f,n);bl(h)?bl(d)||(R=R||typeof d=="number"):R=R||typeof h=="number";var D=function(V){return SI(V)?V:(typeof V=="number"&&(V=II(V)),R&&typeof c=="number"?xI(V,c,!!u):V)},O=_I(D(h),D(d),!!R,T,P,v),B=O[0],A=B.numAsString,_=B.formattedValue,j=O[1],N=function(V){var S=V.target,ee=V.key,ne=S.selectionStart,I=S.selectionEnd,pe=S.value;if(pe===void 0&&(pe=""),ne!==I){s(V);return}ee==="Backspace"&&pe[0]==="-"&&ne===f.length+1&&i&&Ka(S,1),c&&u&&(ee==="Backspace"&&pe[ne-1]===g?(Ka(S,ne-1),V.preventDefault()):ee==="Delete"&&pe[ne]===g&&V.preventDefault()),C!=null&&C.includes(ee)&&pe[ne]===g&&Ka(S,ne+1);var ge=p===!0?",":p;ee==="Backspace"&&pe[ne-1]===ge&&Ka(S,ne-1),ee==="Delete"&&pe[ne]===ge&&Ka(S,ne+1),s(V)},w=function(V){var S=A;if(S.match(/\d/g)||(S=""),a||(S=rW(S)),u&&c&&(S=xI(S,c,u)),S!==A){var ee=PI(S,e);j({formattedValue:ee,value:S,floatValue:parseFloat(S)},{event:V,source:Rc.event})}l(V)},z=function(V){return V===g?!0:Ec(V)},Y=function(V){var S=V.currentValue,ee=V.lastValue,ne=V.formattedValue,I=V.currentValueIndex,pe=V.formattedValueIndex,ge=S[I],De=ne[pe],ae=OI(ee,S),W=ae.to;return I>=W.start&&I<W.end&&C&&C.includes(ge)&&De===g?!0:ge===De};return Object.assign(Object.assign({},b),{value:_,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:Y,onValueChange:j,format:T,removeFormatting:P,getCaretBoundary:function(V){return yW(V,e)},onKeyDown:N,onBlur:w})}function wI(e){var t=vW(e);return vl.createElement(uW,Object.assign({},t))}import{jsx as bW}from"react/jsx-runtime";var DI=ao(bW("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");import{motion as xW}from"framer-motion";var AI=xW(qd),Ic=e=>{let c=e,{label:t,helperText:r,error:o,style:n,size:i,color:a,disabled:s,required:l}=c,p=xe(c,["label","helperText","error","style","size","color","disabled","required"]);return t?ke(tr,{required:l,color:a,size:i,error:o,disabled:s,children:[L(kr,{children:t}),L(AI,H({},p)),r&&L(Jt,{children:r})]}):L(AI,H({required:l,color:a,size:i,disabled:s},p))};Ic.displayName="Input";var $i=Ic;var NI=(e="usd")=>{let[t,r,o]=new vI(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}00`:`${t} 0`,fixedDecimalScale:!!o}};var PW=MI.forwardRef(function(t,r){let i=t,{onChange:o}=i,n=xe(i,["onChange"]);return L(wI,ue(H({},n),{onValueChange:({floatValue:a})=>{o==null||o({target:{name:t.name,value:a==null?void 0:a.toString()}})},valueIsNumericString:!0,getInputRef:r,decimalScale:2}))}),BI=MI.forwardRef(function(t,r){let R=t,{currency:o="usd",max:n=1e5,name:i,onChange:a,label:s,error:l,helperText:p,required:c,disabled:u}=R,f=xe(R,["currency","max","name","onChange","label","error","helperText","required","disabled"]),{symbol:d,thousandSeparator:h,decimalSeparator:y,placeholder:v,fixedDecimalScale:b}=NI(o),[x,g]=LI(t.value),[C,T]=LI(!!n&&!!t.value&&t.value>n),P=TW(D=>{let O=Number(D.target.value);g(O),a==null||a(ue(H({},D),{target:{name:i,value:O}})),n&&O>n?T(!0):T(!1)},[]),k=L($i,ue(H({},f),{size:"sm",ref:r,value:x,placeholder:v,onChange:P,disabled:u,required:c,slotProps:{input:{component:PW,decimalSeparator:y,thousandSeparator:h,prefix:d,fixedDecimalScale:b}},sx:{fontFamily:"monospace"}}));return s?ke(tr,{size:"sm",disabled:u,required:c,error:l||C,children:[L(kr,{children:s}),k,C?ke(Jt,{children:[L(DI,{}),new wm(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:n})]}):p&&L(Jt,{children:p})]}):k});import{useCallback as xl,useEffect as jv,useMemo as Tl,useRef as SW,useState as RW}from"react";import{motion as CW}from"framer-motion";var kW=CW(Vf),Oc=kW;Oc.displayName="Sheet";var Vi=Oc;var _c=e=>{let o=e,{children:t}=o,r=xe(o,["children"]);return L(Jf,ue(H({},r),{children:t}))};_c.displayName="Table";function $v(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=bc}={},slotProps:{checkbox:i={}}={}}=e;return L("thead",{children:ke("tr",{children:[r&&L("th",{style:{width:"40px",textAlign:"center"},children:L(n,H({onChange:o},i))}),t.map(a=>L("th",{style:{width:a.width,minWidth:a.minWidth,maxWidth:a.maxWidth,textAlign:a.numeric?"right":"left"},children:a.label},a.label))]})})}$v.displayName="TableHead";function Vv(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:i,slots:{checkbox:a=bc}={},slotProps:{checkbox:s={}}={}}=e;return L("tbody",{children:t.map((l,p)=>ke("tr",{children:[n&&L("td",{style:{textAlign:"center"},children:L(a,H({onChange:c=>i==null?void 0:i(c,p)},s))}),r.map(c=>{var u;return L("td",{style:{textAlign:(u=o==null?void 0:o[c])!=null&&u.numeric?"right":"left"},children:l[c]},c)})]},p))})}Vv.displayName="TableBody";var zI=E("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Am=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function EW(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,i=1,a=Math.ceil(o/r),s=[t-2,t-1].filter(u=>u>1),l=[t+1,t+2].filter(u=>u<=a-1),p=a>1&&t<a-3,c=a>1&&t>4;return L(Wr,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:ke(Wr,{direction:"row",spacing:.5,alignItems:"center",children:[L(Gr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===i,"aria-label":"Previous page",children:L(hm,{})}),t!==i&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),c&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),L(Et,{variant:"soft",size:"sm",children:t}),l.map(u=>L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==a&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),L(Gr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===a,"aria-label":"Next page",children:L(ym,{})})]})})}var IW=e=>L(pm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:t=>{var a;let r=t.clientX,o=(a=e.current)==null?void 0:a.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},i=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)}}),OW=e=>{var n,i,a;let t=SW(null),r={width:e.width,minWidth:(n=e.minWidth)!=null?n:"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},o=(i=e.resizable)==null||i?IW(t):null;return ke("th",{ref:t,style:r,children:[(a=e.headerName)!=null?a:e.field,o]},e.field)};function _W({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:i,onPaginationModelChange:a,selectionModel:s=[],onSelectionModelChange:l,getId:p,isTotalSelected:c}){let[u,f]=RW((i==null?void 0:i.page)||1),d=(i==null?void 0:i.pageSize)||20,h=xl((T,P)=>{var k,R;return(R=(k=p==null?void 0:p(T))!=null?k:T==null?void 0:T.id)!=null?R:`${(P||0)+(u-1)*d}`},[p!=null?p:u,d]),y=Tl(()=>new Set(s),[s]),v=Tl(()=>!o||n==="server"?e:e.slice((u-1)*d,(u-1)*d+d),[e,u,d,n,o]),b=Tl(()=>v.length>0&&v.every((T,P)=>y.has(h(T,P))),[v,y,u,d,h]),x=r||e.length,g=Tl(()=>c!=null?c:x>0&&s.length===x,[c,s,x]),C=xl(T=>{f(T),a==null||a({page:T,pageSize:d})},[a]);return jv(()=>{C(1)},[x]),jv(()=>{u>Math.ceil(x/d)&&C(Math.ceil(x/d))},[x,d]),jv(()=>{l==null||l([])},[u]),{rowCount:x,page:u,pageSize:d,onPaginationModelChange:C,getId:h,HeadCell:OW,dataInPage:v,isAllSelected:b,isTotalSelected:g,isSelectedRow:xl(T=>y.has(T),[y]),onAllCheckboxChange:xl(()=>{l==null||l(b?[]:v.map(h))},[b,v,l]),onCheckboxChange:xl((T,P)=>{if(y.has(P)){let k=s.filter(R=>R!==P);l==null||l(k)}else{let k=[...s,P];l==null||l(k)}},[s,l]),columns:Tl(()=>t||Object.keys(e[0]||{}).map(T=>({field:T})),[e,t]),onTotalSelect:xl(()=>{l==null||l(g?[]:e.map(h),!g)},[g,e,l])}}function Hv(e){let V=e,{rows:t,checkboxSelection:r,selectionModel:o,onSelectionModelChange:n,rowCount:i,columns:a,onPaginationModelChange:s,pagination:l,paginationMode:p,paginationModel:c,loading:u,slots:{checkbox:f=bc,toolbar:d,footer:h,loadingOverlay:y=()=>L(Wp,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:b,background:x={}}={}}=V,g=xe(V,["rows","checkboxSelection","selectionModel","onSelectionModelChange","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","loading","slots","slotProps"]),{columns:C,isAllSelected:T,isSelectedRow:P,onAllCheckboxChange:k,onCheckboxChange:R,getId:D,rowCount:O,page:B,pageSize:A,onPaginationModelChange:_,dataInPage:j,isTotalSelected:N,onTotalSelect:w,HeadCell:z}=_W(e),Y=Tl(()=>({page:B,pageSize:A}),[B,A]);return ke(pm,{children:[ke(Wr,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&ke(Wr,{direction:"row",spacing:1,children:[!T&&ke(Cr,{level:"body-xs",children:[Am((o==null?void 0:o.length)||0)," items selected"]}),T&&!N&&ke(Wr,{direction:"row",spacing:1,alignItems:"center",children:[ke(Cr,{level:"body-xs",children:["All ",Am((o==null?void 0:o.length)||0)," items on this page are selected."]}),ke(Et,{size:"sm",variant:"plain",onClick:w,children:["Select all ",Am(O!=null?O:t.length)," items"]})]}),N&&ke(Wr,{direction:"row",spacing:1,alignItems:"center",children:[ke(Cr,{level:"body-xs",children:["All ",Am(O!=null?O:t.length)," items are selected."]}),L(Et,{size:"sm",variant:"plain",color:"danger",onClick:w,children:"Cancel"})]})]}),d&&L(d,H({},b||{}))]}),L(Vi,ue(H({variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"}},x),{children:ke(_c,ue(H({},g),{children:[L("thead",{children:ke("tr",{children:[r&&L("th",{style:{width:"40px",textAlign:"center"},children:L(f,H({onChange:k,checked:T,indeterminate:(o||[]).length>0&&!T},v))}),C.map(S=>L(z,H({stickyHeader:e.stickyHeader},S),S.field))]})}),ke("tbody",{children:[L(zI,{children:!!u&&L("td",{children:L(pm,{sx:{position:"absolute",top:0,left:0,right:0},children:L(y,{})})})}),L(zI,{}),j.map((S,ee)=>{let ne=D(S,ee);return ke("tr",{role:r?"checkbox":void 0,tabIndex:r?-1:void 0,onClick:r?I=>R(I,ne):void 0,"aria-checked":r?P(ne):void 0,children:[r&&L("th",{scope:"row",style:{textAlign:"center"},children:L(f,H({onChange:I=>R(I,ne),checked:P(ne)},v))}),C.map(I=>{var pe,ge;return L("td",{style:{textAlign:I.type==="number"?"end":"start"},children:(ge=(pe=I.renderCell)==null?void 0:pe.call(I,{row:S,value:S[I.field],id:ne}))!=null?ge:S[I.field]},I.field)})]},ne)})]}),h&&L(h,{})]}))})),l&&L(EW,{paginationModel:Y,rowCount:O,onPageChange:_})]})}Hv.displayName="DataTable";import $W,{forwardRef as VW,useCallback as UI,useEffect as jW,useState as WI}from"react";function so(e){return typeof e=="string"||e instanceof String}function Uv(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function Wv(e,t){return Array.isArray(t)?Wv(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,i]=o;return t(i,n)&&(r[n]=i),r},{})}var Oe={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Gv(e){switch(e){case Oe.LEFT:return Oe.FORCE_LEFT;case Oe.RIGHT:return Oe.FORCE_RIGHT;default:return e}}function Nm(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Pl(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!Pl(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let i=t instanceof Date,a=e instanceof Date;if(i&&a)return t.getTime()==e.getTime();if(i!=a)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!Pl(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var Lm=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Oe.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Oe.RIGHT:Oe.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function Jv(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:so(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function Gn(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:Uv(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=xe(t,["mask"]);if(r){let n=r.mask;return H(ue(H({},Wv(r,(i,a)=>!a.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return Uv(e)?H({},e):{mask:e}}function Rr(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=Gn(e),r=Jv(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Rr;var ji=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=ji;var FI=90,wW=89,Jn=class extends ji{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===FI&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===wW&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===FI&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=Jn;var wc=class extends Jn{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=Jn;var Cl=class extends Jn{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,i=n.getSelection&&n.getSelection();i&&(i.removeAllRanges(),i.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=Cl;var Dc=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};Dc.MAX_LENGTH=100;var Mm=class{constructor(t,r){this.el=t instanceof ji?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Cl(t):new wc(t),this.masked=Rr(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Dc,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===Jv(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Rr({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,i=this.displayValue,a=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==i&&(this.el.value=i),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),a&&this._fireChangeEvents(),!this._historyChanging&&(a||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let a=t,{mask:r}=a,o=xe(a,["mask"]),n=!this.maskEquals(r),i=this.masked.optionsIsChanged(o);n&&(this.mask=r),i&&this.masked.updateOptions(o),(n||i)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Oe.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new Lm({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,i=o===this.masked.rawInputValue?r.removeDirection:Oe.NONE,a=this.masked.nearestInputPos(r.startChangePos+n,i);i!==Oe.NONE&&(a=this.masked.nearestInputPos(a,Oe.NONE)),this.updateControl(a),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=Mm;var ze=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=ze;var Er=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Vt=class e{constructor(t){this._value="",this._update(H(H({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Er(this.extractInput(t,r),t)}appendTail(t){return so(t)&&(t=new Er(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new ze({inserted:t,rawInserted:t})):new ze}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,i;if([t,i]=this.doPrepareChar(t,r),t&&(i=i.aggregate(this._appendCharRaw(t,r)),!i.rawInserted&&this.autofix==="pad")){let a=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(i)?i=s:this.state=a}if(i.inserted){let a,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){a=o.state;for(let c=0;c<i.rawInserted.length;++c)o.unshift(this.displayValue.length-i.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,a=o.state;for(let c=0;c<i.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(i=new ze,this.state=n,o&&a&&(o.state=a))}return i}_appendPlaceholder(){return new ze}_appendEager(){return new ze}append(t,r,o){if(!so(t))throw new Error("value should be string");let n=so(o)?new Er(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let i;[t,i]=this.doPrepare(t,r);for(let a=0;a<t.length;++a){let s=this._appendChar(t[a],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[a],r,n))break;i.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&i.aggregate(this._appendEager()),n!=null&&(i.tailShift+=this.appendTail(n).tailShift),i}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new ze}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),ze.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),ze.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,i){o===void 0&&(o=""),n===void 0&&(n=Oe.NONE),i===void 0&&(i={input:!0});let a=t+r,s=this.extractTail(a),l=this.eager===!0||this.eager==="remove",p;l&&(n=Gv(n),p=this.extractInput(0,a,{raw:!0}));let c=t,u=new ze;if(n!==Oe.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?Oe.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==Oe.NONE&&p===this.rawInputValue)if(n===Oe.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)u.aggregate(new ze({tailShift:-1})).aggregate(this.remove(f-1))}else n===Oe.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,i,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Pl(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ze}};Vt.DEFAULTS={skipInvalid:!0};Vt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Vt;var kl=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=so(t)?new Er(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Er)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Er(this.toString()).appendTo(t);let r=new ze;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],i=t._mapPosToBlock(t.displayValue.length),a=n.stop,s;if(a!=null&&(!i||i.index<=a)&&((n instanceof e||t._stops.indexOf(a)>=0)&&r.aggregate(t._appendPlaceholder(a)),s=n instanceof e&&t._blocks[a]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=xe(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(i=>{let a="chunks"in i?new e:new Er;return a.state=i,a})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],i=n.unshift(r);if(n.toString()){if(!i)break;++o}else this.chunks.splice(o,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var Bm=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}};var Sl=class{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new ze}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this._value.length;switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return o;case Oe.NONE:case Oe.RIGHT:case Oe.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new ze;let o=this.eager===!0||this.eager==="append",i=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,a=new ze({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(r.raw||r.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new ze;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Er("")}appendTail(t){return so(t)&&(t=new Er(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var Hi=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:i,lazy:a,eager:s}=p,l=xe(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Rr(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:i,lazy:a,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new ze}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new ze;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new ze,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ze:(this.isFilled=!0,new ze({inserted:this.placeholderChar}))}_appendEager(){return new ze}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this.value.length,i=Math.min(Math.max(t,o),n);switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return this.isComplete?i:o;case Oe.RIGHT:case Oe.FORCE_RIGHT:return this.isComplete?i:n;case Oe.NONE:default:return i}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return ue(H({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new ze}};Hi.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var zm=class extends Vt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=zm;var qt=class e extends Vt{constructor(t){super(ue(H(H({},e.DEFAULTS),t),{definitions:Object.assign({},Hi.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){let c=r.slice(a),u=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);u.sort((d,h)=>h.length-d.length);let f=u[0];if(f){let i=Gn(this.blocks[f]),{expose:d,repeat:h}=i,y=xe(i,["expose","repeat"]),v=ue(H({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},y),{repeat:h,parent:this}),b=h!=null?new Te.RepeatBlock(v):Rr(v);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let s=r[a],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++a,s=r[a],!s)break;l=!1}let p=l?new Hi(ue(H({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},Gn(t[s])),{parent:this})):new Sl({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return ue(H({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=xe(n,["_blocks"]);this._blocks.forEach((i,a)=>i.state=r[a]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new ze,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let i=this._blocks[n]._appendEager();if(!i.inserted)break;r.aggregate(i)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new ze;if(!o)return n;for(let a=o.index,s;s=this._blocks[a];++a){var i;let l=s._appendChar(t,ue(H({},r),{_beforeTailState:(i=r._beforeTailState)==null||(i=i._blocks)==null?void 0:i[a]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new kl;return t===r||this._forEachBlocksInRange(t,r,(n,i,a,s)=>{let l=n.extractTail(a,s);l.stop=this._findStopBefore(i),l.from=this._blockStartPos(i),l instanceof kl&&(l.blockIndex=i),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(i,a,s,l)=>{n+=i.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new ze;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,i=t!=null?t:this._blocks.length;return this._blocks.slice(n,i).forEach(a=>{if(!a.lazy||t!=null){var s;r.aggregate(a._appendPlaceholder((s=a._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],i=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-i}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let i=this._mapPosToBlock(r),a=i&&n.index===i.index,s=n.offset,l=i&&a?i.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),i&&!a){for(let p=n.index+1;p<i.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[i.index],i.index,0,i.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,i,a,s)=>{o.aggregate(n.remove(a,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=Oe.NONE),!this._blocks.length)return 0;let o=new Bm(this,t);if(r===Oe.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===Oe.LEFT||r===Oe.FORCE_LEFT){if(r===Oe.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===Oe.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===Oe.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===Oe.RIGHT||r===Oe.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===Oe.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,Oe.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,i,a,s)=>{o+=n.totalInputPositions(a,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new ze;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};qt.DEFAULTS=ue(H({},Vt.DEFAULTS),{lazy:!0,placeholderChar:"_"});qt.STOP_CHAR="`";qt.ESCAPE_CHAR="\\";qt.InputDefinition=Hi;qt.FixedDefinition=Sl;Te.MaskedPattern=qt;var Ui=class extends qt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:i=this.autofix}=c,a=xe(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=i;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;a.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(a)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,i]=t.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(r="0".repeat(n.length)+i,o="9".repeat(n.length)+i),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[i,a]=this.boundaries(this.value+t);return Number(a)<this.from?super._appendCharRaw(o[this.value.length],r):Number(i)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,i]=this.boundaries(r);return this.from<=Number(i)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new ze;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let i=0;i<n;++i)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(i=>this._appendCharRaw(i))}return r}};Te.MaskedRange=Ui;var Rl=class e extends qt{static extractPatternOptions(t){let i=t,{mask:r,pattern:o}=i,n=xe(i,["mask","pattern"]);return ue(H({},n),{mask:so(r)?r:o})}constructor(t){super(e.extractPatternOptions(H(H({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=H(H({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,i=xe(s,["mask","pattern","blocks"]),a=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(a.Y.from=t.min.getFullYear()),t.max&&(a.Y.to=t.max.getFullYear()),t.min&&t.max&&a.Y.from===a.Y.to&&(a.m.from=t.min.getMonth()+1,a.m.to=t.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=t.min.getDate(),a.d.to=t.max.getDate())),Object.assign(a,this.blocks,n),super._update(ue(H({},i),{mask:so(r)?r:o,blocks:a}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Rl.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ui,from:1,to:31,maxLength:2},m:{mask:Ui,from:1,to:12,maxLength:2},Y:{mask:Ui,from:1900,to:9999}});Rl.DEFAULTS=ue(H({},qt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=Rl;var Ac=class e extends Vt{constructor(t){super(H(H({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let a=Gn(r),{expose:o}=a,n=xe(a,["expose"]),i=Rr(H({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=i),i}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,i=this.rawInputValue,a=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:i,s=i.slice(a.length),l=this.currentMask,p=new ze,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,H({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),a&&(this.currentMask.append(a,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new ze;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return ue(H({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let i;[o,i]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(i)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let i;[o,i]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(i)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new ze;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return ue(H({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let a=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=a,i=xe(a,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=i}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let a=t[o],{mask:n}=a,i=xe(a,["mask"]);return Pl(r,i)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};Ac.DEFAULTS=ue(H({},Vt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,i=t.compiledMasks.map((a,s)=>{let l=t.currentMask===a,p=l?a.displayValue.length:a.nearestInputPos(a.displayValue.length,Oe.FORCE_LEFT);return a.rawInputValue!==n?(a.reset(),a.append(n,{raw:!0})):l||a.remove(p),a.append(e,t.currentMaskFlags(r)),a.appendTail(o),{index:s,weight:a.rawInputValue.length,totalInputPositions:a.totalInputPositions(0,Math.max(p,a.nearestInputPos(a.displayValue.length,Oe.FORCE_LEFT)))}});return i.sort((a,s)=>s.weight-a.weight||s.totalInputPositions-a.totalInputPositions),t.compiledMasks[i[0].index]}});Te.MaskedDynamic=Ac;var Nc=class e extends qt{constructor(t){super(H(H({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=xe(n,["enum"]);if(r){let i=r.map(l=>l.length),a=Math.min(...i),s=Math.max(...i)-a;o.mask="*".repeat(a),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n=this.enum.filter(i=>this.matchValue(i,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(a,s)=>{let l=n[0][s];s>=this.value.length||l===a.value||(a.reset(),a._appendChar(l,r))});let i=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(a=>i.aggregate(super._appendCharRaw(a))),i}return new ze}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Er("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new ze;let o=Math.min(super.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let i=super.remove(n,r);return i.tailShift+=n-t,i}};Nc.DEFAULTS=ue(H({},qt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=Nc;var Fm=class extends Vt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(ue(H({},t),{validate:t.mask}))}};Te.MaskedFunction=Fm;var $I,Wi=class e extends Vt{constructor(t){super(H(H({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+Nm(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Nm).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Nm(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let i=this._value;this._value+=t;let a=this.number,s=!isNaN(a),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new ze({inserted:this._value.slice(i.length),rawInserted:l?"":t,skip:l}):(this._value=i,p=new ze),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(c);return p.tailShift+=(u-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),i=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let a=this._separatorsCountFromSlice(o);return new ze({tailShift:(a-i)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case Oe.NONE:case Oe.LEFT:case Oe.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===Oe.FORCE_LEFT)return o}break}case Oe.RIGHT:case Oe.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,i,a)=>n+a),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};$I=Wi;Wi.UNMASKED_RADIX=".";Wi.EMPTY_VALUES=[...Vt.EMPTY_VALUES,0];Wi.DEFAULTS=ue(H({},Vt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[$I.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=Wi;var $m={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function qv(e,t,r){t===void 0&&(t=$m.MASKED),r===void 0&&(r=$m.MASKED);let o=Rr(e);return n=>o.runIsolated(i=>(i[t]=n,i[r]))}function VI(e,t,r,o){return qv(t,r,o)(e)}Te.PIPE_TYPE=$m;Te.createPipe=qv;Te.pipe=VI;var Vm=class extends qt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=Gn(t),{repeat:i}=l,a=xe(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,a);let s=Rr(this._blockOpts);this.repeat=(r=(o=i!=null?i:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Rr(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new ze;for(let l=(n=(i=this._mapPosToBlock(this.displayValue.length))==null?void 0:i.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(a=this._blocks[l])!=null?a:c=!c&&this._allocateBlock(l);++l){var n,i,a,s;let u=p._appendChar(t,ue(H({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(u.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(u),u.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let i=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),a;r!=null&&(a=(n=this._mapPosToBlock(r))==null?void 0:n.index),a==null&&(a=this._blocks.length-1);let s=0;for(let l=a;i<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(a-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=Vm;try{globalThis.IMask=Te}catch(e){}import Yv from"react";var Le=cn(eP(),1);import jm from"react";var jI={mask:Le.default.oneOfType([Le.default.array,Le.default.func,Le.default.string,Le.default.instanceOf(RegExp),Le.default.oneOf([Date,Number,Te.Masked]),Le.default.instanceOf(Te.Masked)]),value:Le.default.any,unmask:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["typed"])]),prepare:Le.default.func,prepareChar:Le.default.func,validate:Le.default.func,commit:Le.default.func,overwrite:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["shift"])]),eager:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["append","remove"])]),skipInvalid:Le.default.bool,onAccept:Le.default.func,onComplete:Le.default.func,placeholderChar:Le.default.string,displayChar:Le.default.string,lazy:Le.default.bool,definitions:Le.default.object,blocks:Le.default.object,enum:Le.default.arrayOf(Le.default.string),maxLength:Le.default.number,from:Le.default.number,to:Le.default.number,pattern:Le.default.string,format:Le.default.func,parse:Le.default.func,autofix:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["pad"])]),radix:Le.default.string,thousandsSeparator:Le.default.string,mapToRadix:Le.default.arrayOf(Le.default.string),scale:Le.default.number,normalizeZeros:Le.default.bool,padFractionalZeros:Le.default.bool,min:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),max:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),dispatch:Le.default.func,inputRef:Le.default.oneOfType([Le.default.func,Le.default.shape({current:Le.default.object})])},HI=Object.keys(jI).filter(e=>e!=="value"),DW=["value","unmask","onAccept","onComplete","inputRef"],AW=HI.filter(e=>DW.indexOf(e)<0);function Kv(e){var t;let r=(t=class extends jm.Component{constructor(i){super(i),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let i=this.props,a=this._extractMaskOptionsFromProps(i);if(a.mask)this.maskRef?(this.maskRef.updateOptions(a),"value"in i&&i.value!==void 0&&(this.maskValue=i.value)):this.initMask(a);else if(this.destroyMask(),"value"in i&&i.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=i.value:this.element.value=i.value}}componentWillUnmount(){this.destroyMask()}_inputRef(i){this.element=i,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=i:this.props.inputRef(i))}initMask(i){i===void 0&&(i=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,i).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(i){let a=xe(i,[]);return Object.keys(a).filter(s=>AW.indexOf(s)<0).forEach(s=>{delete a[s]}),a}_extractNonMaskProps(i){let a=xe(i,[]);return HI.forEach(s=>{s!=="maxLength"&&delete a[s]}),"defaultValue"in a||(a.defaultValue=i.mask?"":a.value),delete a.value,a}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(i){this.maskRef&&(i=i==null&&this.props.unmask!=="typed"?"":i,this.props.unmask==="typed"?this.maskRef.typedValue=i:this.props.unmask?this.maskRef.unmaskedValue=i:this.maskRef.value=i)}_onAccept(i){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,i)}_onComplete(i){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,i)}render(){return jm.createElement(e,ue(H({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=jI,jm.forwardRef((n,i)=>jm.createElement(r,ue(H({},n),{ref:i})))}var NW=Kv(e=>{let o=e,{inputRef:t}=o,r=xe(o,["inputRef"]);return Yv.createElement("input",ue(H({},r),{ref:t}))}),LW=(e,t)=>Yv.createElement(NW,ue(H({},e),{ref:t})),Ya=Yv.forwardRef(LW);import{useRef as w7e,useState as D7e,useCallback as A7e,useEffect as N7e}from"react";import"react";import{jsx as MW}from"react/jsx-runtime";var El=ao(MW("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as BW}from"framer-motion";var zW=BW(uf),FW=E(zW)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Lc=FW;Lc.displayName="DialogActions";var Gi=Lc;var HW=E(Qt,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),UW=E(Vi,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),GI=e=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),[o,r,t].join("/")},WW=$W.forwardRef(function(t,r){let i=t,{onChange:o}=i,n=xe(i,["onChange"]);return L(Ya,ue(H({},n),{inputRef:r,onAccept:a=>o({target:{name:t.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:GI,parse:a=>{let s=a.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),Xv=VW((e,t)=>{let T=e,{onChange:r,disabled:o,label:n,error:i,helperText:a,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u}=T,f=xe(T,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required"]),[d,h]=WI(e.value||""),[y,v]=WI(null),b=!!y;jW(()=>{h(e.value||"")},[e.value]);let x=UI(P=>{h(P.target.value),r==null||r(P)},[]),g=UI(P=>{v(y?null:P.currentTarget)},[y,v]),C=ke(Pn,{children:[L($i,ue(H({},f),{ref:t,size:"sm",value:d,onChange:x,placeholder:"YYYY/MM/DD",disabled:o,required:u,slotProps:{input:{component:WW}},sx:{fontFamily:"monospace"},endDecorator:L(Gr,{variant:"plain",onClick:g,children:L(El,{})})})),b&&L(ga,{onClickAway:()=>v(null),children:L(HW,{id:"date-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}],children:L(To,{open:!0,children:ke(UW,{tabIndex:-1,role:"presentation",children:[L(gl,{value:Number.isNaN(new Date(d).getTime())?void 0:[new Date(d),void 0],onChange:([P])=>{h(GI(P)),v(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),L(Gi,{sx:{p:1},children:L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{h(""),v(null)},children:"Clear"})})]})})})})]});return n?ke(tr,{required:u,disabled:o,error:i,size:"sm",children:[L(kr,{children:n}),C,a&&L(Jt,{children:a})]}):C});Xv.displayName="DatePicker";import GW,{forwardRef as JW,useCallback as Zv,useEffect as qW,useMemo as KW,useState as JI}from"react";var YW=E(Qt,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),XW=E(Vi,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qI=([e,t])=>{let r=o=>{let n=`${o.getDate()}`,i=`${o.getMonth()+1}`,a=o.getFullYear();return Number(n)<10&&(n="0"+n),Number(i)<10&&(i="0"+i),[a,i,n].join("/")};return[r(e),t?r(t):""].join(" - ")},KI=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",o=t.split("/"),n=r.split("/");return[new Date(Number(o[0]),Number(o[1])-1,Number(o[2])),new Date(Number(n[0]),Number(n[1])-1,Number(n[2]))]},ZW=GW.forwardRef(function(t,r){let i=t,{onChange:o}=i,n=xe(i,["onChange"]);return L(Ya,ue(H({},n),{inputRef:r,onAccept:a=>o({target:{name:t.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:qI,parse:KI,autofix:"pad",overwrite:!0}))}),Qv=JW((e,t)=>{let k=e,{onChange:r,disabled:o,label:n,error:i,helperText:a,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u}=k,f=xe(k,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required"]),[d,h]=JI(e.value||""),[y,v]=JI(null),b=!!y,x=KW(()=>d?KI(d):void 0,[d]);qW(()=>{h(e.value||"")},[e.value]);let g=Zv(R=>{h(R.target.value),r==null||r(R)},[r]),C=Zv(R=>{v(y?null:R.currentTarget)},[y,v]),T=Zv(([R,D])=>{!R||!D||(h(qI([R,D])),v(null))},[h,v]),P=ke(Pn,{children:[L($i,ue(H({},f),{ref:t,size:"sm",value:d,onChange:g,disabled:o,required:u,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ZW}},sx:{fontFamily:"monospace"},endDecorator:L(Gr,{variant:"plain",onClick:C,children:L(El,{})})})),b&&L(ga,{onClickAway:()=>v(null),children:L(YW,{id:"date-range-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}],children:L(To,{open:!0,children:ke(XW,{tabIndex:-1,role:"presentation",children:[L(gl,{rangeSelection:!0,defaultValue:x,onChange:T,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),L(Gi,{sx:{p:1},children:L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{h(""),v(null)},children:"Clear"})})]})})})})]});return n?ke(tr,{required:u,disabled:o,error:i,size:"sm",children:[L(kr,{children:n}),P,a&&L(Jt,{children:a})]}):P});Qv.displayName="DateRangePicker";import{motion as QW}from"framer-motion";var e4=QW(ff),t4=E(e4)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),Mc=t4;Mc.displayName="DialogContent";var Hm=Mc;import{motion as r4}from"framer-motion";var o4=r4(mf),n4=E(o4)(({theme:e})=>({padding:e.spacing(2,3)})),Bc=n4;Bc.displayName="DialogTitle";var Um=Bc;import p4 from"react";import{motion as Wm}from"framer-motion";var i4=Wm(gf),eb=i4;eb.displayName="Modal";var a4=Wm(Af),YI=E(a4)({padding:0}),zc=YI;zc.displayName="ModalDialog";var s4=E(Wm(Df))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),Gm=s4;Gm.displayName="ModalClose";var l4=Wm(Lf),tb=l4;tb.displayName="ModalOverflow";function rb(e){let n=e,{title:t,children:r}=n,o=xe(n,["title","children"]);return ke(YI,ue(H({},o),{children:[L(Gm,{}),L(Um,{children:t}),L(Hm,{children:r})]}))}rb.displayName="ModalFrame";var c4=E(zc)(({theme:e})=>({padding:0})),ob=p4.forwardRef((e,t)=>{let a=e,{title:r,children:o,actions:n}=a,i=xe(a,["title","children","actions"]);return ke(c4,ue(H({ref:t},i),{children:[L(Um,{children:r}),L(Hm,{children:o}),L(Gi,{children:n})]}))});ob.displayName="DialogFrame";import{motion as u4}from"framer-motion";var d4=u4(hf),Fc=e=>L(d4,H({},e));Fc.displayName="Divider";import{motion as f4}from"framer-motion";var m4=f4(Hp),nb=e=>{var n;let o=e,{children:t}=o,r=xe(o,["children"]);return L(m4,ue(H({},r),{slotProps:ue(H({},r.slotProps),{content:ue(H({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};nb.displayName="InsetDrawer";import $4,{useCallback as Qm,useEffect as V4,useRef as kO,useState as Ib}from"react";import{jsx as h4}from"react/jsx-runtime";var XI=ao(h4("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function $c(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(n){return n()})}}function Il(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function ib(e){if(Array.isArray(e))return Il(e)}function ab(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sb(e,t){if(e){if(typeof e=="string")return Il(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Il(e,t)}}function lb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
127
|
+
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function vW(e){e=gW(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=Fi);var l=e.onBlur;l===void 0&&(l=Fi);var p=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,h=e.value,y=e.valueIsNumericString,v=e.onValueChange,b=kI(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=Dm(e),g=x.decimalSeparator,C=x.allowedDecimalSeparators,T=function(V){return PI(V,e)},P=function(V,S){return hW(V,S,e)},k=bl(h)?d:h,R=y!=null?y:mW(k,f,n);bl(h)?bl(d)||(R=R||typeof d=="number"):R=R||typeof h=="number";var D=function(V){return SI(V)?V:(typeof V=="number"&&(V=II(V)),R&&typeof c=="number"?xI(V,c,!!u):V)},O=_I(D(h),D(d),!!R,T,P,v),B=O[0],A=B.numAsString,_=B.formattedValue,j=O[1],N=function(V){var S=V.target,ee=V.key,ne=S.selectionStart,I=S.selectionEnd,pe=S.value;if(pe===void 0&&(pe=""),ne!==I){s(V);return}ee==="Backspace"&&pe[0]==="-"&&ne===f.length+1&&i&&Ka(S,1),c&&u&&(ee==="Backspace"&&pe[ne-1]===g?(Ka(S,ne-1),V.preventDefault()):ee==="Delete"&&pe[ne]===g&&V.preventDefault()),C!=null&&C.includes(ee)&&pe[ne]===g&&Ka(S,ne+1);var ge=p===!0?",":p;ee==="Backspace"&&pe[ne-1]===ge&&Ka(S,ne-1),ee==="Delete"&&pe[ne]===ge&&Ka(S,ne+1),s(V)},w=function(V){var S=A;if(S.match(/\d/g)||(S=""),a||(S=rW(S)),u&&c&&(S=xI(S,c,u)),S!==A){var ee=PI(S,e);j({formattedValue:ee,value:S,floatValue:parseFloat(S)},{event:V,source:Rc.event})}l(V)},z=function(V){return V===g?!0:Ec(V)},Y=function(V){var S=V.currentValue,ee=V.lastValue,ne=V.formattedValue,I=V.currentValueIndex,pe=V.formattedValueIndex,ge=S[I],De=ne[pe],ae=OI(ee,S),W=ae.to;return I>=W.start&&I<W.end&&C&&C.includes(ge)&&De===g?!0:ge===De};return Object.assign(Object.assign({},b),{value:_,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:Y,onValueChange:j,format:T,removeFormatting:P,getCaretBoundary:function(V){return yW(V,e)},onKeyDown:N,onBlur:w})}function wI(e){var t=vW(e);return vl.createElement(uW,Object.assign({},t))}import{jsx as bW}from"react/jsx-runtime";var DI=ao(bW("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");import{motion as xW}from"framer-motion";var AI=xW(qd),Ic=e=>{let c=e,{label:t,helperText:r,error:o,style:n,size:i,color:a,disabled:s,required:l}=c,p=xe(c,["label","helperText","error","style","size","color","disabled","required"]);return t?ke(tr,{required:l,color:a,size:i,error:o,disabled:s,children:[L(kr,{children:t}),L(AI,H({},p)),r&&L(Jt,{children:r})]}):L(AI,H({required:l,color:a,size:i,disabled:s},p))};Ic.displayName="Input";var $i=Ic;var NI=(e="usd")=>{let[t,r,o]=new vI(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}00`:`${t} 0`,fixedDecimalScale:!!o}};var PW=MI.forwardRef(function(t,r){let i=t,{onChange:o}=i,n=xe(i,["onChange"]);return L(wI,ue(H({},n),{onValueChange:({floatValue:a})=>{o==null||o({target:{name:t.name,value:a==null?void 0:a.toString()}})},valueIsNumericString:!0,getInputRef:r,decimalScale:2}))}),BI=MI.forwardRef(function(t,r){let R=t,{currency:o="usd",max:n=1e5,name:i,onChange:a,label:s,error:l,helperText:p,required:c,disabled:u}=R,f=xe(R,["currency","max","name","onChange","label","error","helperText","required","disabled"]),{symbol:d,thousandSeparator:h,decimalSeparator:y,placeholder:v,fixedDecimalScale:b}=NI(o),[x,g]=LI(t.value),[C,T]=LI(!!n&&!!t.value&&t.value>n),P=TW(D=>{let O=Number(D.target.value);g(O),a==null||a(ue(H({},D),{target:{name:i,value:O}})),n&&O>n?T(!0):T(!1)},[]),k=L($i,ue(H({},f),{size:"sm",ref:r,value:x,placeholder:v,onChange:P,disabled:u,required:c,slotProps:{input:{component:PW,decimalSeparator:y,thousandSeparator:h,prefix:d,fixedDecimalScale:b}},sx:{fontFamily:"monospace"}}));return s?ke(tr,{size:"sm",disabled:u,required:c,error:l||C,children:[L(kr,{children:s}),k,C?ke(Jt,{children:[L(DI,{}),new wm(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:n})]}):p&&L(Jt,{children:p})]}):k});import{useCallback as xl,useEffect as jv,useMemo as Tl,useRef as SW,useState as RW}from"react";import{motion as CW}from"framer-motion";var kW=CW(Vf),Oc=kW;Oc.displayName="Sheet";var Vi=Oc;var _c=e=>{let o=e,{children:t}=o,r=xe(o,["children"]);return L(Jf,ue(H({},r),{children:t}))};_c.displayName="Table";function $v(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=bc}={},slotProps:{checkbox:i={}}={}}=e;return L("thead",{children:ke("tr",{children:[r&&L("th",{style:{width:"40px",textAlign:"center"},children:L(n,H({onChange:o},i))}),t.map(a=>L("th",{style:{width:a.width,minWidth:a.minWidth,maxWidth:a.maxWidth,textAlign:a.numeric?"right":"left"},children:a.label},a.label))]})})}$v.displayName="TableHead";function Vv(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:i,slots:{checkbox:a=bc}={},slotProps:{checkbox:s={}}={}}=e;return L("tbody",{children:t.map((l,p)=>ke("tr",{children:[n&&L("td",{style:{textAlign:"center"},children:L(a,H({onChange:c=>i==null?void 0:i(c,p)},s))}),r.map(c=>{var u;return L("td",{style:{textAlign:(u=o==null?void 0:o[c])!=null&&u.numeric?"right":"left"},children:l[c]},c)})]},p))})}Vv.displayName="TableBody";var zI=E("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Am=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function EW(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,i=1,a=Math.ceil(o/r),s=[t-2,t-1].filter(u=>u>1),l=[t+1,t+2].filter(u=>u<=a-1),p=a>1&&t<a-3,c=a>1&&t>4;return L(Wr,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:ke(Wr,{direction:"row",spacing:.5,alignItems:"center",children:[L(Gr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===i,"aria-label":"Previous page",children:L(hm,{})}),t!==i&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),c&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(u=>L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),L(Et,{variant:"soft",size:"sm",children:t}),l.map(u=>L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(u),children:u},u)),p&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==a&&L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),L(Gr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===a,"aria-label":"Next page",children:L(ym,{})})]})})}var IW=e=>L(pm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:t=>{var a;let r=t.clientX,o=(a=e.current)==null?void 0:a.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},i=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)}}),OW=e=>{var n,i,a;let t=SW(null),r={width:e.width,minWidth:(n=e.minWidth)!=null?n:"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},o=(i=e.resizable)==null||i?IW(t):null;return ke("th",{ref:t,style:r,children:[(a=e.headerName)!=null?a:e.field,o]},e.field)};function _W({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:i,onPaginationModelChange:a,selectionModel:s=[],onSelectionModelChange:l,getId:p,isTotalSelected:c}){let[u,f]=RW((i==null?void 0:i.page)||1),d=(i==null?void 0:i.pageSize)||20,h=xl((T,P)=>{var k,R;return(R=(k=p==null?void 0:p(T))!=null?k:T==null?void 0:T.id)!=null?R:`${(P||0)+(u-1)*d}`},[p!=null?p:u,d]),y=Tl(()=>new Set(s),[s]),v=Tl(()=>!o||n==="server"?e:e.slice((u-1)*d,(u-1)*d+d),[e,u,d,n,o]),b=Tl(()=>v.length>0&&v.every((T,P)=>y.has(h(T,P))),[v,y,u,d,h]),x=r||e.length,g=Tl(()=>c!=null?c:x>0&&s.length===x,[c,s,x]),C=xl(T=>{f(T),a==null||a({page:T,pageSize:d})},[a]);return jv(()=>{C(1)},[x]),jv(()=>{let T=Math.max(1,Math.ceil(x/d));u>T&&C(T)},[u,x,d]),jv(()=>{l==null||l([])},[u]),{rowCount:x,page:u,pageSize:d,onPaginationModelChange:C,getId:h,HeadCell:OW,dataInPage:v,isAllSelected:b,isTotalSelected:g,isSelectedRow:xl(T=>y.has(T),[y]),onAllCheckboxChange:xl(()=>{l==null||l(b?[]:v.map(h))},[b,v,l]),onCheckboxChange:xl((T,P)=>{if(y.has(P)){let k=s.filter(R=>R!==P);l==null||l(k)}else{let k=[...s,P];l==null||l(k)}},[s,l]),columns:Tl(()=>t||Object.keys(e[0]||{}).map(T=>({field:T})),[e,t]),onTotalSelect:xl(()=>{l==null||l(g?[]:e.map(h),!g)},[g,e,l])}}function Hv(e){let V=e,{rows:t,checkboxSelection:r,selectionModel:o,onSelectionModelChange:n,rowCount:i,columns:a,onPaginationModelChange:s,pagination:l,paginationMode:p,paginationModel:c,loading:u,slots:{checkbox:f=bc,toolbar:d,footer:h,loadingOverlay:y=()=>L(Wp,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:b,background:x={}}={}}=V,g=xe(V,["rows","checkboxSelection","selectionModel","onSelectionModelChange","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","loading","slots","slotProps"]),{columns:C,isAllSelected:T,isSelectedRow:P,onAllCheckboxChange:k,onCheckboxChange:R,getId:D,rowCount:O,page:B,pageSize:A,onPaginationModelChange:_,dataInPage:j,isTotalSelected:N,onTotalSelect:w,HeadCell:z}=_W(e),Y=Tl(()=>({page:B,pageSize:A}),[B,A]);return ke(pm,{children:[ke(Wr,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&ke(Wr,{direction:"row",spacing:1,children:[!T&&ke(Cr,{level:"body-xs",children:[Am((o==null?void 0:o.length)||0)," items selected"]}),T&&!N&&ke(Wr,{direction:"row",spacing:1,alignItems:"center",children:[ke(Cr,{level:"body-xs",children:["All ",Am((o==null?void 0:o.length)||0)," items on this page are selected."]}),ke(Et,{size:"sm",variant:"plain",onClick:w,children:["Select all ",Am(O!=null?O:t.length)," items"]})]}),N&&ke(Wr,{direction:"row",spacing:1,alignItems:"center",children:[ke(Cr,{level:"body-xs",children:["All ",Am(O!=null?O:t.length)," items are selected."]}),L(Et,{size:"sm",variant:"plain",color:"danger",onClick:w,children:"Cancel"})]})]}),d&&L(d,H({},b||{}))]}),L(Vi,ue(H({variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"}},x),{children:ke(_c,ue(H({},g),{children:[L("thead",{children:ke("tr",{children:[r&&L("th",{style:{width:"40px",textAlign:"center"},children:L(f,H({onChange:k,checked:T,indeterminate:(o||[]).length>0&&!T},v))}),C.map(S=>L(z,H({stickyHeader:e.stickyHeader},S),S.field))]})}),ke("tbody",{children:[L(zI,{children:!!u&&L("td",{children:L(pm,{sx:{position:"absolute",top:0,left:0,right:0},children:L(y,{})})})}),L(zI,{}),j.map((S,ee)=>{let ne=D(S,ee);return ke("tr",{role:r?"checkbox":void 0,tabIndex:r?-1:void 0,onClick:r?I=>R(I,ne):void 0,"aria-checked":r?P(ne):void 0,children:[r&&L("th",{scope:"row",style:{textAlign:"center"},children:L(f,H({onChange:I=>R(I,ne),checked:P(ne)},v))}),C.map(I=>{var pe,ge;return L("td",{style:{textAlign:I.type==="number"?"end":"start"},children:(ge=(pe=I.renderCell)==null?void 0:pe.call(I,{row:S,value:S[I.field],id:ne}))!=null?ge:S[I.field]},I.field)})]},ne)})]}),h&&L(h,{})]}))})),l&&L(EW,{paginationModel:Y,rowCount:O,onPageChange:_})]})}Hv.displayName="DataTable";import $W,{forwardRef as VW,useCallback as UI,useEffect as jW,useState as WI}from"react";function so(e){return typeof e=="string"||e instanceof String}function Uv(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function Wv(e,t){return Array.isArray(t)?Wv(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,i]=o;return t(i,n)&&(r[n]=i),r},{})}var Oe={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Gv(e){switch(e){case Oe.LEFT:return Oe.FORCE_LEFT;case Oe.RIGHT:return Oe.FORCE_RIGHT;default:return e}}function Nm(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Pl(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!Pl(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let i=t instanceof Date,a=e instanceof Date;if(i&&a)return t.getTime()==e.getTime();if(i!=a)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!Pl(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var Lm=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Oe.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Oe.RIGHT:Oe.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function Jv(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:so(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function Gn(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:Uv(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=xe(t,["mask"]);if(r){let n=r.mask;return H(ue(H({},Wv(r,(i,a)=>!a.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return Uv(e)?H({},e):{mask:e}}function Rr(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=Gn(e),r=Jv(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Rr;var ji=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=ji;var FI=90,wW=89,Jn=class extends ji{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===FI&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===wW&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===FI&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=Jn;var wc=class extends Jn{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=Jn;var Cl=class extends Jn{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,i=n.getSelection&&n.getSelection();i&&(i.removeAllRanges(),i.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=Cl;var Dc=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};Dc.MAX_LENGTH=100;var Mm=class{constructor(t,r){this.el=t instanceof ji?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Cl(t):new wc(t),this.masked=Rr(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Dc,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===Jv(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Rr({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,i=this.displayValue,a=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==i&&(this.el.value=i),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),a&&this._fireChangeEvents(),!this._historyChanging&&(a||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let a=t,{mask:r}=a,o=xe(a,["mask"]),n=!this.maskEquals(r),i=this.masked.optionsIsChanged(o);n&&(this.mask=r),i&&this.masked.updateOptions(o),(n||i)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Oe.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new Lm({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,i=o===this.masked.rawInputValue?r.removeDirection:Oe.NONE,a=this.masked.nearestInputPos(r.startChangePos+n,i);i!==Oe.NONE&&(a=this.masked.nearestInputPos(a,Oe.NONE)),this.updateControl(a),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=Mm;var ze=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=ze;var Er=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Vt=class e{constructor(t){this._value="",this._update(H(H({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Er(this.extractInput(t,r),t)}appendTail(t){return so(t)&&(t=new Er(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new ze({inserted:t,rawInserted:t})):new ze}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,i;if([t,i]=this.doPrepareChar(t,r),t&&(i=i.aggregate(this._appendCharRaw(t,r)),!i.rawInserted&&this.autofix==="pad")){let a=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(i)?i=s:this.state=a}if(i.inserted){let a,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){a=o.state;for(let c=0;c<i.rawInserted.length;++c)o.unshift(this.displayValue.length-i.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,a=o.state;for(let c=0;c<i.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(i=new ze,this.state=n,o&&a&&(o.state=a))}return i}_appendPlaceholder(){return new ze}_appendEager(){return new ze}append(t,r,o){if(!so(t))throw new Error("value should be string");let n=so(o)?new Er(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let i;[t,i]=this.doPrepare(t,r);for(let a=0;a<t.length;++a){let s=this._appendChar(t[a],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[a],r,n))break;i.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&i.aggregate(this._appendEager()),n!=null&&(i.tailShift+=this.appendTail(n).tailShift),i}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new ze}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),ze.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),ze.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,i){o===void 0&&(o=""),n===void 0&&(n=Oe.NONE),i===void 0&&(i={input:!0});let a=t+r,s=this.extractTail(a),l=this.eager===!0||this.eager==="remove",p;l&&(n=Gv(n),p=this.extractInput(0,a,{raw:!0}));let c=t,u=new ze;if(n!==Oe.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?Oe.NONE:n),u.tailShift=c-t),u.aggregate(this.remove(c)),l&&n!==Oe.NONE&&p===this.rawInputValue)if(n===Oe.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)u.aggregate(new ze({tailShift:-1})).aggregate(this.remove(f-1))}else n===Oe.FORCE_RIGHT&&s.unshift();return u.aggregate(this.append(o,i,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Pl(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ze}};Vt.DEFAULTS={skipInvalid:!0};Vt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Vt;var kl=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=so(t)?new Er(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Er)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Er(this.toString()).appendTo(t);let r=new ze;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],i=t._mapPosToBlock(t.displayValue.length),a=n.stop,s;if(a!=null&&(!i||i.index<=a)&&((n instanceof e||t._stops.indexOf(a)>=0)&&r.aggregate(t._appendPlaceholder(a)),s=n instanceof e&&t._blocks[a]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=xe(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(i=>{let a="chunks"in i?new e:new Er;return a.state=i,a})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],i=n.unshift(r);if(n.toString()){if(!i)break;++o}else this.chunks.splice(o,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var Bm=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}};var Sl=class{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new ze}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this._value.length;switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return o;case Oe.NONE:case Oe.RIGHT:case Oe.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new ze;let o=this.eager===!0||this.eager==="append",i=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,a=new ze({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(r.raw||r.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new ze;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Er("")}appendTail(t){return so(t)&&(t=new Er(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var Hi=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:i,lazy:a,eager:s}=p,l=xe(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Rr(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:i,lazy:a,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new ze}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new ze;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new ze,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ze:(this.isFilled=!0,new ze({inserted:this.placeholderChar}))}_appendEager(){return new ze}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this.value.length,i=Math.min(Math.max(t,o),n);switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return this.isComplete?i:o;case Oe.RIGHT:case Oe.FORCE_RIGHT:return this.isComplete?i:n;case Oe.NONE:default:return i}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return ue(H({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new ze}};Hi.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var zm=class extends Vt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=zm;var qt=class e extends Vt{constructor(t){super(ue(H(H({},e.DEFAULTS),t),{definitions:Object.assign({},Hi.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){let c=r.slice(a),u=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);u.sort((d,h)=>h.length-d.length);let f=u[0];if(f){let i=Gn(this.blocks[f]),{expose:d,repeat:h}=i,y=xe(i,["expose","repeat"]),v=ue(H({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},y),{repeat:h,parent:this}),b=h!=null?new Te.RepeatBlock(v):Rr(v);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let s=r[a],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++a,s=r[a],!s)break;l=!1}let p=l?new Hi(ue(H({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},Gn(t[s])),{parent:this})):new Sl({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return ue(H({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=xe(n,["_blocks"]);this._blocks.forEach((i,a)=>i.state=r[a]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new ze,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let i=this._blocks[n]._appendEager();if(!i.inserted)break;r.aggregate(i)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new ze;if(!o)return n;for(let a=o.index,s;s=this._blocks[a];++a){var i;let l=s._appendChar(t,ue(H({},r),{_beforeTailState:(i=r._beforeTailState)==null||(i=i._blocks)==null?void 0:i[a]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new kl;return t===r||this._forEachBlocksInRange(t,r,(n,i,a,s)=>{let l=n.extractTail(a,s);l.stop=this._findStopBefore(i),l.from=this._blockStartPos(i),l instanceof kl&&(l.blockIndex=i),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(i,a,s,l)=>{n+=i.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new ze;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,i=t!=null?t:this._blocks.length;return this._blocks.slice(n,i).forEach(a=>{if(!a.lazy||t!=null){var s;r.aggregate(a._appendPlaceholder((s=a._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],i=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-i}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let i=this._mapPosToBlock(r),a=i&&n.index===i.index,s=n.offset,l=i&&a?i.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),i&&!a){for(let p=n.index+1;p<i.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[i.index],i.index,0,i.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,i,a,s)=>{o.aggregate(n.remove(a,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=Oe.NONE),!this._blocks.length)return 0;let o=new Bm(this,t);if(r===Oe.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===Oe.LEFT||r===Oe.FORCE_LEFT){if(r===Oe.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===Oe.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===Oe.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===Oe.RIGHT||r===Oe.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===Oe.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,Oe.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,i,a,s)=>{o+=n.totalInputPositions(a,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new ze;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};qt.DEFAULTS=ue(H({},Vt.DEFAULTS),{lazy:!0,placeholderChar:"_"});qt.STOP_CHAR="`";qt.ESCAPE_CHAR="\\";qt.InputDefinition=Hi;qt.FixedDefinition=Sl;Te.MaskedPattern=qt;var Ui=class extends qt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:i=this.autofix}=c,a=xe(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=i;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;a.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(a)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,i]=t.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(r="0".repeat(n.length)+i,o="9".repeat(n.length)+i),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[i,a]=this.boundaries(this.value+t);return Number(a)<this.from?super._appendCharRaw(o[this.value.length],r):Number(i)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,i]=this.boundaries(r);return this.from<=Number(i)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new ze;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let i=0;i<n;++i)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(i=>this._appendCharRaw(i))}return r}};Te.MaskedRange=Ui;var Rl=class e extends qt{static extractPatternOptions(t){let i=t,{mask:r,pattern:o}=i,n=xe(i,["mask","pattern"]);return ue(H({},n),{mask:so(r)?r:o})}constructor(t){super(e.extractPatternOptions(H(H({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=H(H({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,i=xe(s,["mask","pattern","blocks"]),a=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(a.Y.from=t.min.getFullYear()),t.max&&(a.Y.to=t.max.getFullYear()),t.min&&t.max&&a.Y.from===a.Y.to&&(a.m.from=t.min.getMonth()+1,a.m.to=t.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=t.min.getDate(),a.d.to=t.max.getDate())),Object.assign(a,this.blocks,n),super._update(ue(H({},i),{mask:so(r)?r:o,blocks:a}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Rl.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ui,from:1,to:31,maxLength:2},m:{mask:Ui,from:1,to:12,maxLength:2},Y:{mask:Ui,from:1900,to:9999}});Rl.DEFAULTS=ue(H({},qt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=Rl;var Ac=class e extends Vt{constructor(t){super(H(H({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let a=Gn(r),{expose:o}=a,n=xe(a,["expose"]),i=Rr(H({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=i),i}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,i=this.rawInputValue,a=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:i,s=i.slice(a.length),l=this.currentMask,p=new ze,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,H({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),a&&(this.currentMask.append(a,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new ze;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return ue(H({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let i;[o,i]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(i)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let i;[o,i]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(i)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new ze;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return ue(H({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let a=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=a,i=xe(a,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=i}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let a=t[o],{mask:n}=a,i=xe(a,["mask"]);return Pl(r,i)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};Ac.DEFAULTS=ue(H({},Vt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,i=t.compiledMasks.map((a,s)=>{let l=t.currentMask===a,p=l?a.displayValue.length:a.nearestInputPos(a.displayValue.length,Oe.FORCE_LEFT);return a.rawInputValue!==n?(a.reset(),a.append(n,{raw:!0})):l||a.remove(p),a.append(e,t.currentMaskFlags(r)),a.appendTail(o),{index:s,weight:a.rawInputValue.length,totalInputPositions:a.totalInputPositions(0,Math.max(p,a.nearestInputPos(a.displayValue.length,Oe.FORCE_LEFT)))}});return i.sort((a,s)=>s.weight-a.weight||s.totalInputPositions-a.totalInputPositions),t.compiledMasks[i[0].index]}});Te.MaskedDynamic=Ac;var Nc=class e extends qt{constructor(t){super(H(H({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=xe(n,["enum"]);if(r){let i=r.map(l=>l.length),a=Math.min(...i),s=Math.max(...i)-a;o.mask="*".repeat(a),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n=this.enum.filter(i=>this.matchValue(i,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(a,s)=>{let l=n[0][s];s>=this.value.length||l===a.value||(a.reset(),a._appendChar(l,r))});let i=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(a=>i.aggregate(super._appendCharRaw(a))),i}return new ze}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Er("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new ze;let o=Math.min(super.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let i=super.remove(n,r);return i.tailShift+=n-t,i}};Nc.DEFAULTS=ue(H({},qt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=Nc;var Fm=class extends Vt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(ue(H({},t),{validate:t.mask}))}};Te.MaskedFunction=Fm;var $I,Wi=class e extends Vt{constructor(t){super(H(H({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+Nm(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Nm).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Nm(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let i=this._value;this._value+=t;let a=this.number,s=!isNaN(a),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new ze({inserted:this._value.slice(i.length),rawInserted:l?"":t,skip:l}):(this._value=i,p=new ze),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(c);return p.tailShift+=(u-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),i=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let a=this._separatorsCountFromSlice(o);return new ze({tailShift:(a-i)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case Oe.NONE:case Oe.LEFT:case Oe.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===Oe.FORCE_LEFT)return o}break}case Oe.RIGHT:case Oe.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,i,a)=>n+a),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};$I=Wi;Wi.UNMASKED_RADIX=".";Wi.EMPTY_VALUES=[...Vt.EMPTY_VALUES,0];Wi.DEFAULTS=ue(H({},Vt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[$I.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=Wi;var $m={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function qv(e,t,r){t===void 0&&(t=$m.MASKED),r===void 0&&(r=$m.MASKED);let o=Rr(e);return n=>o.runIsolated(i=>(i[t]=n,i[r]))}function VI(e,t,r,o){return qv(t,r,o)(e)}Te.PIPE_TYPE=$m;Te.createPipe=qv;Te.pipe=VI;var Vm=class extends qt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=Gn(t),{repeat:i}=l,a=xe(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,a);let s=Rr(this._blockOpts);this.repeat=(r=(o=i!=null?i:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Rr(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new ze;for(let l=(n=(i=this._mapPosToBlock(this.displayValue.length))==null?void 0:i.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(a=this._blocks[l])!=null?a:c=!c&&this._allocateBlock(l);++l){var n,i,a,s;let u=p._appendChar(t,ue(H({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(u.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(u),u.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let i=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),a;r!=null&&(a=(n=this._mapPosToBlock(r))==null?void 0:n.index),a==null&&(a=this._blocks.length-1);let s=0;for(let l=a;i<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(a-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=Vm;try{globalThis.IMask=Te}catch(e){}import Yv from"react";var Le=cn(eP(),1);import jm from"react";var jI={mask:Le.default.oneOfType([Le.default.array,Le.default.func,Le.default.string,Le.default.instanceOf(RegExp),Le.default.oneOf([Date,Number,Te.Masked]),Le.default.instanceOf(Te.Masked)]),value:Le.default.any,unmask:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["typed"])]),prepare:Le.default.func,prepareChar:Le.default.func,validate:Le.default.func,commit:Le.default.func,overwrite:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["shift"])]),eager:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["append","remove"])]),skipInvalid:Le.default.bool,onAccept:Le.default.func,onComplete:Le.default.func,placeholderChar:Le.default.string,displayChar:Le.default.string,lazy:Le.default.bool,definitions:Le.default.object,blocks:Le.default.object,enum:Le.default.arrayOf(Le.default.string),maxLength:Le.default.number,from:Le.default.number,to:Le.default.number,pattern:Le.default.string,format:Le.default.func,parse:Le.default.func,autofix:Le.default.oneOfType([Le.default.bool,Le.default.oneOf(["pad"])]),radix:Le.default.string,thousandsSeparator:Le.default.string,mapToRadix:Le.default.arrayOf(Le.default.string),scale:Le.default.number,normalizeZeros:Le.default.bool,padFractionalZeros:Le.default.bool,min:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),max:Le.default.oneOfType([Le.default.number,Le.default.instanceOf(Date)]),dispatch:Le.default.func,inputRef:Le.default.oneOfType([Le.default.func,Le.default.shape({current:Le.default.object})])},HI=Object.keys(jI).filter(e=>e!=="value"),DW=["value","unmask","onAccept","onComplete","inputRef"],AW=HI.filter(e=>DW.indexOf(e)<0);function Kv(e){var t;let r=(t=class extends jm.Component{constructor(i){super(i),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let i=this.props,a=this._extractMaskOptionsFromProps(i);if(a.mask)this.maskRef?(this.maskRef.updateOptions(a),"value"in i&&i.value!==void 0&&(this.maskValue=i.value)):this.initMask(a);else if(this.destroyMask(),"value"in i&&i.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=i.value:this.element.value=i.value}}componentWillUnmount(){this.destroyMask()}_inputRef(i){this.element=i,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=i:this.props.inputRef(i))}initMask(i){i===void 0&&(i=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,i).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(i){let a=xe(i,[]);return Object.keys(a).filter(s=>AW.indexOf(s)<0).forEach(s=>{delete a[s]}),a}_extractNonMaskProps(i){let a=xe(i,[]);return HI.forEach(s=>{s!=="maxLength"&&delete a[s]}),"defaultValue"in a||(a.defaultValue=i.mask?"":a.value),delete a.value,a}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(i){this.maskRef&&(i=i==null&&this.props.unmask!=="typed"?"":i,this.props.unmask==="typed"?this.maskRef.typedValue=i:this.props.unmask?this.maskRef.unmaskedValue=i:this.maskRef.value=i)}_onAccept(i){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,i)}_onComplete(i){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,i)}render(){return jm.createElement(e,ue(H({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=jI,jm.forwardRef((n,i)=>jm.createElement(r,ue(H({},n),{ref:i})))}var NW=Kv(e=>{let o=e,{inputRef:t}=o,r=xe(o,["inputRef"]);return Yv.createElement("input",ue(H({},r),{ref:t}))}),LW=(e,t)=>Yv.createElement(NW,ue(H({},e),{ref:t})),Ya=Yv.forwardRef(LW);import{useRef as w7e,useState as D7e,useCallback as A7e,useEffect as N7e}from"react";import"react";import{jsx as MW}from"react/jsx-runtime";var El=ao(MW("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as BW}from"framer-motion";var zW=BW(uf),FW=E(zW)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Lc=FW;Lc.displayName="DialogActions";var Gi=Lc;var HW=E(Qt,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),UW=E(Vi,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),GI=e=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),[o,r,t].join("/")},WW=$W.forwardRef(function(t,r){let i=t,{onChange:o}=i,n=xe(i,["onChange"]);return L(Ya,ue(H({},n),{inputRef:r,onAccept:a=>o({target:{name:t.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:GI,parse:a=>{let s=a.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),Xv=VW((e,t)=>{let T=e,{onChange:r,disabled:o,label:n,error:i,helperText:a,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u}=T,f=xe(T,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required"]),[d,h]=WI(e.value||""),[y,v]=WI(null),b=!!y;jW(()=>{h(e.value||"")},[e.value]);let x=UI(P=>{h(P.target.value),r==null||r(P)},[]),g=UI(P=>{v(y?null:P.currentTarget)},[y,v]),C=ke(Pn,{children:[L($i,ue(H({},f),{ref:t,size:"sm",value:d,onChange:x,placeholder:"YYYY/MM/DD",disabled:o,required:u,slotProps:{input:{component:WW}},sx:{fontFamily:"monospace"},endDecorator:L(Gr,{variant:"plain",onClick:g,children:L(El,{})})})),b&&L(ga,{onClickAway:()=>v(null),children:L(HW,{id:"date-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}],children:L(To,{open:!0,children:ke(UW,{tabIndex:-1,role:"presentation",children:[L(gl,{value:Number.isNaN(new Date(d).getTime())?void 0:[new Date(d),void 0],onChange:([P])=>{h(GI(P)),v(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),L(Gi,{sx:{p:1},children:L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{h(""),v(null)},children:"Clear"})})]})})})})]});return n?ke(tr,{required:u,disabled:o,error:i,size:"sm",children:[L(kr,{children:n}),C,a&&L(Jt,{children:a})]}):C});Xv.displayName="DatePicker";import GW,{forwardRef as JW,useCallback as Zv,useEffect as qW,useMemo as KW,useState as JI}from"react";var YW=E(Qt,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),XW=E(Vi,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qI=([e,t])=>{let r=o=>{let n=`${o.getDate()}`,i=`${o.getMonth()+1}`,a=o.getFullYear();return Number(n)<10&&(n="0"+n),Number(i)<10&&(i="0"+i),[a,i,n].join("/")};return[r(e),t?r(t):""].join(" - ")},KI=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",o=t.split("/"),n=r.split("/");return[new Date(Number(o[0]),Number(o[1])-1,Number(o[2])),new Date(Number(n[0]),Number(n[1])-1,Number(n[2]))]},ZW=GW.forwardRef(function(t,r){let i=t,{onChange:o}=i,n=xe(i,["onChange"]);return L(Ya,ue(H({},n),{inputRef:r,onAccept:a=>o({target:{name:t.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:qI,parse:KI,autofix:"pad",overwrite:!0}))}),Qv=JW((e,t)=>{let k=e,{onChange:r,disabled:o,label:n,error:i,helperText:a,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:u}=k,f=xe(k,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required"]),[d,h]=JI(e.value||""),[y,v]=JI(null),b=!!y,x=KW(()=>d?KI(d):void 0,[d]);qW(()=>{h(e.value||"")},[e.value]);let g=Zv(R=>{h(R.target.value),r==null||r(R)},[r]),C=Zv(R=>{v(y?null:R.currentTarget)},[y,v]),T=Zv(([R,D])=>{!R||!D||(h(qI([R,D])),v(null))},[h,v]),P=ke(Pn,{children:[L($i,ue(H({},f),{ref:t,size:"sm",value:d,onChange:g,disabled:o,required:u,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ZW}},sx:{fontFamily:"monospace"},endDecorator:L(Gr,{variant:"plain",onClick:C,children:L(El,{})})})),b&&L(ga,{onClickAway:()=>v(null),children:L(YW,{id:"date-range-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}],children:L(To,{open:!0,children:ke(XW,{tabIndex:-1,role:"presentation",children:[L(gl,{rangeSelection:!0,defaultValue:x,onChange:T,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),L(Gi,{sx:{p:1},children:L(Et,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{h(""),v(null)},children:"Clear"})})]})})})})]});return n?ke(tr,{required:u,disabled:o,error:i,size:"sm",children:[L(kr,{children:n}),P,a&&L(Jt,{children:a})]}):P});Qv.displayName="DateRangePicker";import{motion as QW}from"framer-motion";var e4=QW(ff),t4=E(e4)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),Mc=t4;Mc.displayName="DialogContent";var Hm=Mc;import{motion as r4}from"framer-motion";var o4=r4(mf),n4=E(o4)(({theme:e})=>({padding:e.spacing(2,3)})),Bc=n4;Bc.displayName="DialogTitle";var Um=Bc;import p4 from"react";import{motion as Wm}from"framer-motion";var i4=Wm(gf),eb=i4;eb.displayName="Modal";var a4=Wm(Af),YI=E(a4)({padding:0}),zc=YI;zc.displayName="ModalDialog";var s4=E(Wm(Df))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),Gm=s4;Gm.displayName="ModalClose";var l4=Wm(Lf),tb=l4;tb.displayName="ModalOverflow";function rb(e){let n=e,{title:t,children:r}=n,o=xe(n,["title","children"]);return ke(YI,ue(H({},o),{children:[L(Gm,{}),L(Um,{children:t}),L(Hm,{children:r})]}))}rb.displayName="ModalFrame";var c4=E(zc)(({theme:e})=>({padding:0})),ob=p4.forwardRef((e,t)=>{let a=e,{title:r,children:o,actions:n}=a,i=xe(a,["title","children","actions"]);return ke(c4,ue(H({ref:t},i),{children:[L(Um,{children:r}),L(Hm,{children:o}),L(Gi,{children:n})]}))});ob.displayName="DialogFrame";import{motion as u4}from"framer-motion";var d4=u4(hf),Fc=e=>L(d4,H({},e));Fc.displayName="Divider";import{motion as f4}from"framer-motion";var m4=f4(Hp),nb=e=>{var n;let o=e,{children:t}=o,r=xe(o,["children"]);return L(m4,ue(H({},r),{slotProps:ue(H({},r.slotProps),{content:ue(H({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};nb.displayName="InsetDrawer";import $4,{useCallback as Qm,useEffect as V4,useRef as kO,useState as Ib}from"react";import{jsx as h4}from"react/jsx-runtime";var XI=ao(h4("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function $c(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(n){return n()})}}function Il(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function ib(e){if(Array.isArray(e))return Il(e)}function ab(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sb(e,t){if(e){if(typeof e=="string")return Il(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Il(e,t)}}function lb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
128
128
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qn(e){return ib(e)||ab(e)||sb(e)||lb()}var jc=cn(Dl());var sO=cn(Dl());function qm(e){var t=null;return function(){return t||(t={value:e.apply(void 0,arguments)}),t.value}}var Ji=qm(function(){var t=navigator,r=t.userAgent;return r.includes("AppleWebKit")&&!r.includes("Chrome")});var eO=cn(Dl());var Km={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function tO(e){var t=e.dragEnter;return Ji()?t.hasOwnProperty(Km.isEnteringWindow):!1}function rO(e){var t=e.dragLeave;return Ji()?t.hasOwnProperty(Km.isLeavingWindow):!1}(function(){if(typeof window>"u"||!Ji())return;function t(){return{enterCount:0,isOverWindow:!1}}var r=t();function o(){r=t()}(0,eO.bindAll)(window,[{type:"dragstart",listener:function(){r.enterCount=0,r.isOverWindow=!0}},{type:"drop",listener:o},{type:"dragend",listener:o},{type:"dragenter",listener:function(i){!r.isOverWindow&&r.enterCount===0&&(i[Km.isEnteringWindow]=!0),r.isOverWindow=!0,r.enterCount++}},{type:"dragleave",listener:function(i){r.enterCount--,r.isOverWindow&&r.enterCount===0&&(i[Km.isLeavingWindow]=!0,r.isOverWindow=!1)}}],{capture:!0})})();function P4(e){return"nodeName"in e}function oO(e){var t=e.dragLeave,r=t.type,o=t.relatedTarget;return r!=="dragleave"?!1:Ji()?rO({dragLeave:t}):o==null||o instanceof HTMLIFrameElement?!0:P4(o)&&!document.contains(o)}function Al(e){var t=e.onDragEnd;return[{type:"pointermove",listener:function(){var r=0;return function(){if(r<20){r++;return}t()}}()},{type:"pointerdown",listener:t}]}var nO=cn(Dl());function C4(e,t){var r=t.property,o=t.rule,n=t.priority,i=n===void 0?"":n,a=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);return e.style.setProperty(r,o,i),function(){e.style.setProperty(r,a,s)}}function k4(e){var t=e.current,r=document.elementFromPoint(t.input.clientX,t.input.clientY);return r instanceof HTMLElement?C4(r,{property:"pointer-events",rule:"auto",priority:"important"}):null}function S4(){var e,t=document.createElement("style");return t.setAttribute("pdnd-post-drag-fix","true"),document.head.appendChild(t),(e=t.sheet)===null||e===void 0||e.insertRule("* { pointer-events: none !important; }"),function(){document.head.removeChild(t)}}function cb(e){var t=e.current;queueMicrotask(function(){var r=k4({current:t}),o=S4();function n(){i(),r==null||r(),o()}var i=(0,nO.bindAll)(window,[{type:"pointerdown",listener:n},{type:"pointermove",listener:n},{type:"focusin",listener:n},{type:"focusout",listener:n},{type:"dragstart",listener:n},{type:"dragenter",listener:n},{type:"dragover",listener:n}],{capture:!0})})}function ub(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var R4=function(t){var r=[],o=null,n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r=s,!o&&(o=requestAnimationFrame(function(){o=null,t.apply(void 0,r)}))};return n.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},n},iO=R4;var db=iO(function(e){return e()}),Ym=function(){var e=null;function t(o){var n=requestAnimationFrame(function(){e=null,o()});e={frameId:n,fn:o}}function r(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:t,flush:r}}();function aO(e){var t=e.source,r=e.initial,o=e.dispatchEvent,n={dropTargets:[]};function i(s){o(s),n={dropTargets:s.payload.location.current.dropTargets}}var a={start:function(l){var p=l.nativeSetDragImage,c={current:r,previous:n,initial:r};i({eventName:"onGenerateDragPreview",payload:{source:t,location:c,nativeSetDragImage:p}}),Ym.schedule(function(){i({eventName:"onDragStart",payload:{source:t,location:c}})})},dragUpdate:function(l){var p=l.current;Ym.flush(),db.cancel(),i({eventName:"onDropTargetChange",payload:{source:t,location:{initial:r,previous:n,current:p}}})},drag:function(l){var p=l.current;db(function(){Ym.flush();var c={initial:r,previous:n,current:p};i({eventName:"onDrag",payload:{source:t,location:c}})})},drop:function(l){var p=l.current,c=l.updatedSourcePayload;Ym.flush(),db.cancel(),i({eventName:"onDrop",payload:{source:c!=null?c:t,location:{current:p,previous:n,initial:r}}})}};return a}var mb={isActive:!1};function lO(){return!mb.isActive}function E4(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function I4(e){var t=e.current,r=e.next;if(t.length!==r.length)return!0;for(var o=0;o<t.length;o++)if(t[o].element!==r[o].element)return!0;return!1}function O4(e){var t=e.event,r=e.dragType,o=e.getDropTargetsOver,n=e.dispatchEvent;if(!lO())return;var i=_4({event:t,dragType:r,getDropTargetsOver:o});mb.isActive=!0;var a={current:i};fb({event:t,current:i.dropTargets});var s=aO({source:r.payload,dispatchEvent:n,initial:i});function l(d){var h=I4({current:a.current.dropTargets,next:d.dropTargets});a.current=d,h&&s.dragUpdate({current:a.current})}function p(d){var h=ub(d),y=o({target:d.target,input:h,source:r.payload,current:a.current.dropTargets});y.length&&(d.preventDefault(),fb({event:d,current:y})),l({dropTargets:y,input:h})}function c(){a.current.dropTargets.length&&l({dropTargets:[],input:a.current.input}),s.drop({current:a.current,updatedSourcePayload:null}),u()}function u(){mb.isActive=!1,f()}var f=(0,sO.bindAll)(window,[{type:"dragover",listener:function(h){p(h),s.drag({current:a.current})}},{type:"dragenter",listener:p},{type:"dragleave",listener:function(h){oO({dragLeave:h})&&(l({input:a.current.input,dropTargets:[]}),r.startedFrom==="external"&&c())}},{type:"drop",listener:function(h){h.preventDefault(),fb({event:h,current:a.current.dropTargets}),s.drop({current:a.current,updatedSourcePayload:r.type==="external"?r.getDropPayload(h):null}),u(),r.startedFrom==="internal"&&cb({current:a.current})}},{type:"dragend",listener:function(h){c(),r.startedFrom==="internal"&&cb({current:a.current})}}].concat(qn(Al({onDragEnd:c}))),{capture:!0});s.start({nativeSetDragImage:E4(t)})}function fb(e){var t,r=e.event,o=e.current,n=(t=o[0])===null||t===void 0?void 0:t.dropEffect;n!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=n)}function _4(e){var t=e.event,r=e.dragType,o=e.getDropTargetsOver,n=ub(t);if(r.startedFrom==="external")return{input:n,dropTargets:[]};var i=o({input:n,source:r.payload,target:t.target,current:[]});return{input:n,dropTargets:i}}var hb={canStart:lO,start:O4};var yb=new Map;function w4(e){var t=e.typeKey,r=e.mount,o=yb.get(t);if(o)return o.usageCount++,o;var n={typeKey:t,unmount:r(),usageCount:1};return yb.set(t,n),n}function pO(e){var t=w4(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),yb.delete(e.typeKey))}}function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function gb(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(qi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vb(e){var t=gb(e,"string");return qi(t)=="symbol"?t:t+""}function Vc(e,t,r){return t=vb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cO(e,t){var r=t.attribute,o=t.value;return e.setAttribute(r,o),function(){return e.removeAttribute(r)}}function uO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Ki(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uO(Object(r),!0).forEach(function(o){Vc(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uO(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function bb(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=D4(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
129
129
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){a=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function D4(e,t){if(e){if(typeof e=="string")return dO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dO(e,t)}}function dO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function xb(e){return e.slice(0).reverse()}function fO(e){var t=e.typeKey,r=e.defaultDropEffect,o=new WeakMap,n="data-drop-target-for-".concat(t),i="[".concat(n,"]");function a(d){return o.set(d.element,d),function(){return o.delete(d.element)}}function s(d){if(0)var h;return $c(cO(d.element,{attribute:n,value:"true"}),a(d))}function l(d){var h,y,v,b,x=d.source,g=d.target,C=d.input,T=d.result,P=T===void 0?[]:T;if(g==null)return P;if(!(g instanceof Element))return g instanceof Node?l({source:x,target:g.parentElement,input:C,result:P}):P;var k=g.closest(i);if(k==null)return P;var R=o.get(k);if(R==null)return P;var D={input:C,source:x,element:R.element};if(R.canDrop&&!R.canDrop(D))return l({source:x,target:R.element.parentElement,input:C,result:P});var O=(h=(y=R.getData)===null||y===void 0?void 0:y.call(R,D))!==null&&h!==void 0?h:{},B=(v=(b=R.getDropEffect)===null||b===void 0?void 0:b.call(R,D))!==null&&v!==void 0?v:r,A={data:O,element:R.element,dropEffect:B,isActiveDueToStickiness:!1};return l({source:x,target:R.element.parentElement,input:C,result:[].concat(qn(P),[A])})}function p(d){var h=d.eventName,y=d.payload,v=bb(y.location.current.dropTargets),b;try{for(v.s();!(b=v.n()).done;){var x,g=b.value,C=o.get(g.element),T=Ki(Ki({},y),{},{self:g});C==null||(x=C[h])===null||x===void 0||x.call(C,T)}}catch(P){v.e(P)}finally{v.f()}}var c={onGenerateDragPreview:p,onDrag:p,onDragStart:p,onDrop:p,onDropTargetChange:function(h){var y=h.payload,v=new Set(y.location.current.dropTargets.map(function(z){return z.element})),b=new Set,x=bb(y.location.previous.dropTargets),g;try{for(x.s();!(g=x.n()).done;){var C,T=g.value;b.add(T.element);var P=o.get(T.element),k=v.has(T.element),R=Ki(Ki({},y),{},{self:T});if(P==null||(C=P.onDropTargetChange)===null||C===void 0||C.call(P,R),!k){var D;P==null||(D=P.onDragLeave)===null||D===void 0||D.call(P,R)}}}catch(z){x.e(z)}finally{x.f()}var O=bb(y.location.current.dropTargets),B;try{for(O.s();!(B=O.n()).done;){var A,_,j=B.value;if(!b.has(j.element)){var N=Ki(Ki({},y),{},{self:j}),w=o.get(j.element);w==null||(A=w.onDropTargetChange)===null||A===void 0||A.call(w,N),w==null||(_=w.onDragEnter)===null||_===void 0||_.call(w,N)}}}catch(z){O.e(z)}finally{O.f()}}};function u(d){c[d.eventName](d)}function f(d){var h=d.source,y=d.target,v=d.input,b=d.current,x=l({source:h,target:y,input:v});if(x.length>=b.length)return x;for(var g=xb(b),C=xb(x),T=[],P=0;P<g.length;P++){var k,R=g[P],D=C[P];if(D!=null){T.push(D);continue}var O=T[P-1],B=g[P-1];if((O==null?void 0:O.element)!==(B==null?void 0:B.element))break;var A=o.get(R.element);if(!A)break;var _={input:v,source:h,element:A.element};if(A.canDrop&&!A.canDrop(_)||!((k=A.getIsSticky)!==null&&k!==void 0&&k.call(A,_)))break;T.push(Ki(Ki({},R),{},{isActiveDueToStickiness:!0}))}return xb(T)}return{dropTargetForConsumers:s,getIsOver:f,dispatchEvent:u}}function A4(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=N4(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
130
130
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return i=p.done,p},e:function(p){a=!0,s=p},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function N4(e,t){if(e){if(typeof e=="string")return mO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mO(e,t)}}function mO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function hO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function L4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hO(Object(r),!0).forEach(function(o){Vc(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hO(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function yO(){var e=new Set,t=null;function r(i){t&&(!i.canMonitor||i.canMonitor(t.canMonitorArgs))&&t.active.add(i)}function o(i){var a=L4({},i);return e.add(a),r(a),function(){e.delete(a),t&&t.active.delete(a)}}function n(i){var a=i.eventName,s=i.payload;if(a==="onGenerateDragPreview"){t={canMonitorArgs:{initial:s.location.initial,source:s.source},active:new Set};var l=A4(e),p;try{for(l.s();!(p=l.n()).done;){var c=p.value;r(c)}}catch(v){l.e(v)}finally{l.f()}}if(t){for(var u=Array.from(t.active),f=0,d=u;f<d.length;f++){var h=d[f];if(t.active.has(h)){var y;(y=h[a])===null||y===void 0||y.call(h,s)}}a==="onDrop"&&(t.active.clear(),t=null)}}return{dispatchEvent:n,monitorForConsumers:o}}function gO(e){var t=e.typeKey,r=e.mount,o=e.dispatchEventToSource,n=e.defaultDropEffect,i=yO(),a=fO({typeKey:t,defaultDropEffect:n});function s(c){o==null||o(c),a.dispatchEvent(c),i.dispatchEvent(c)}function l(c){var u=c.event,f=c.dragType;hb.start({event:u,dragType:f,getDropTargetsOver:a.getIsOver,dispatchEvent:s})}function p(){function c(){var u={canStart:hb.canStart,start:l};return r(u)}return pO({typeKey:t,mount:c})}return{registerUsage:p,dropTarget:a.dropTargetForConsumers,monitor:i.monitorForConsumers}}var LJe=qm(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),vO="pdnd:android-fallback";function M4(e){return"nodeName"in e}function bO(e){var t=e.dragEnter,r=t.type,o=t.relatedTarget;return r!=="dragenter"?!1:Ji()?tO({dragEnter:t}):o==null||o instanceof HTMLIFrameElement?!0:M4(o)&&!document.contains(o)}var xO="text/plain";var TO="application/vnd.pdnd";function Pb(e){var t=e.type,r=e.value;return!(t===TO||t===xO&&r===vO)}function B4(e){return Array.from(e.types).filter(function(t){return Pb({type:t,value:e.getData(t)})})}function z4(e){return Array.from(e.items).filter(function(t){return t.kind==="file"||Pb({type:t.type,value:e.getData(t.type)})})}var Tb=!1,Cb=gO({typeKey:"external",defaultDropEffect:"copy",mount:function(t){return(0,jc.bind)(window,{type:"dragenter",listener:function(o){if(!Tb&&o.dataTransfer&&t.canStart(o)&&bO({dragEnter:o})){var n=B4(o.dataTransfer);if(n.length){var i={types:n,items:[],getStringData:function(){return null}};t.start({event:o,dragType:{type:"external",startedFrom:"external",payload:i,getDropPayload:function(s){if(!s.dataTransfer)return i;var l=z4(s.dataTransfer),p=s.dataTransfer.getData.bind(s.dataTransfer);return{types:n,items:l,getStringData:function(u){if(!n.includes(u))return null;var f=p(u);return Pb({type:u,value:f})?f:null}}}}})}}}})}});function kb(e){return Cb.dropTarget(e)}function Sb(e){return Cb.monitor(e)}(function(){if(typeof window>"u")return;Cb.registerUsage();var t={type:"idle"},r=t;function o(){r.type==="dragging"&&(Tb=!1,r.cleanup(),r=t)}function n(){return(0,jc.bindAll)(window,[{type:"dragend",listener:o}].concat(qn(Al({onDragEnd:o}))),{capture:!0})}(0,jc.bind)(window,{type:"dragstart",listener:function(){r.type==="idle"&&(Tb=!0,r={type:"dragging",cleanup:n()})},options:{capture:!0}})})();function Xm(e){var t=e.source;return t.types.includes("Files")}function Rb(e){var t=e.source;return t.items.filter(function(r){return r.kind==="file"}).map(function(r){return r.getAsFile()}).filter(function(r){return r!=null})}var CO=cn(Dl());function PO(e){e.defaultPrevented||(e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.preventDefault())}var Eb=null;function F4(){Hc(),Eb=(0,CO.bindAll)(window,[{type:"dragover",listener:PO},{type:"dragenter",listener:PO},{type:"drop",listener:function(t){t.preventDefault(),Hc()}},{type:"dragend",listener:Hc}].concat(qn(Al({onDragEnd:Hc}))),{capture:!1})}function Hc(){var e;(e=Eb)===null||e===void 0||e(),Eb=null}var Zm={start:F4,stop:Hc};var j4=E("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),H4=E("div",{name:"FileUpload",slot:"PreviewRoot"})(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, auto))",gap:"8px"})),U4=e=>{let{files:t,onDelete:r}=e;return L(H4,{children:t.map(o=>ke(gc,{children:[L(Wr,{style:{aspectRatio:"4/3",height:"200px"},alignItems:"center",justifyContent:"center",children:o.type.startsWith("image/")?L("img",{style:{width:"100%",height:"100%",objectFit:"cover"},src:URL.createObjectURL(o),alt:o.name}):L(Cr,{level:"title-md",textColor:"neutral.400",children:o.type})}),ke(Wr,{direction:"row",justifyContent:"space-between",gap:"8px",children:[ke(Wr,{children:[L(Cr,{level:"title-sm",textColor:"common.black",children:o.name}),ke(Cr,{level:"body-sm",textColor:"neutral.600",children:[(o.size/1e3).toFixed(2),"KB"]})]}),L(Gr,{onClick:()=>r==null?void 0:r(o),children:L(XI,{})})]})]},o.name))})},W4=E(Wr,{name:"FileUpload",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),G4=E("label",{name:"FileUpload",slot:"label"})({}),J4=E("div",{name:"FileUpload",slot:"dropZone"})(({theme:e,state:t})=>({width:"100%",backgroundColor:t==="over"?e.palette.background.level2:e.palette.background.backdrop,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(3),gap:e.spacing(2),border:t==="idle"?"2px solid rgba(0,0,0,0)":`2px dashed ${e.palette.primary[400]}`})),q4=E(Et,{name:"FileUpload",slot:"button"})({}),Ob=$4.memo(e=>{let{accept:t,maxCount:r,name:o,maxTotalSize:n,maxSizePerFile:i,onChange:a}=e,s=kO(null),l=kO(null),[p,c]=Ib([]),[u,f]=Ib("idle"),[d,h]=Ib(),y=Qm(g=>{try{i&&g.forEach(T=>{if(T.size>i)throw new Error(`File size exceeds the limit: ${i}`)});let C=[...p,...g];if(r&&C.length>r)throw new Error(`File count exceeds the limit: ${r}`);if(n&&C.reduce((T,P)=>T+P.size,0)>n)throw new Error(`Total file size exceeds the limit: ${n}`);a==null||a({target:{name:o,value:C}}),h(void 0),c(C)}catch(C){h(C.message)}},[p]);V4(()=>{let g=s.current;if(!g)throw new Error("Drop zone ref is not set");return $c(kb({element:g,canDrop:Xm,onDragEnter:()=>f("over"),onDragLeave:()=>f("potential"),onDrop:async({source:C})=>{let T=await Rb({source:C});y(T)}}),Sb({canMonitor:Xm,onDragStart:()=>{f("potential"),Zm.start()},onDrop:()=>{f("idle"),Zm.stop()}}))});let v=Qm(g=>{let C=Array.from(g.target.files||[]);y(C)},[y]),b=Qm(g=>{c(C=>(a==null||a({target:{name:o,value:C.filter(T=>T!==g)}}),C.filter(T=>T!==g)))},[]),x=Qm(()=>{var g;(g=l.current)==null||g.click()},[]);return ke(W4,{children:[L(tr,{error:!!d,children:ke(J4,{state:u,ref:s,children:[ke(G4,{children:[L(Cr,{level:"h3",textColor:"background.tooltip",children:"Drop files"}),L(j4,{type:"file",onChange:v,multiple:!0,accept:t,ref:l})]}),L(q4,{variant:"soft",color:"neutral",onClick:x,children:"Select Files"}),d&&L(Jt,{children:d})]})}),L(U4,{files:p,onDelete:b})]})});Ob.displayName="FileUpload";import{motion as K4}from"framer-motion";var Y4=K4(kf),_b=Y4;_b.displayName="Grid";function SO(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var X4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Z4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q4={};function eh(e,t){return((t||Q4).jsx?Z4:X4).test(e)}var e9=/[ \t\n\f\r]/g;function wb(e){return typeof e=="object"?e.type==="text"?RO(e.value):!1:RO(e)}function RO(e){return e.replace(e9,"")===""}var Kn=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};Kn.prototype.property={};Kn.prototype.normal={};Kn.prototype.space=null;function Db(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new Kn(r,o,t)}function Uc(e){return e.toLowerCase()}var Ir=class{constructor(t,r){this.property=t,this.attribute=r}};Ir.prototype.space=null;Ir.prototype.boolean=!1;Ir.prototype.booleanish=!1;Ir.prototype.overloadedBoolean=!1;Ir.prototype.number=!1;Ir.prototype.commaSeparated=!1;Ir.prototype.spaceSeparated=!1;Ir.prototype.commaOrSpaceSeparated=!1;Ir.prototype.mustUseProperty=!1;Ir.prototype.defined=!1;var Wc={};rT(Wc,{boolean:()=>Ve,booleanish:()=>It,commaOrSpaceSeparated:()=>Jr,commaSeparated:()=>Yi,number:()=>me,overloadedBoolean:()=>Ab,spaceSeparated:()=>pt});var t9=0,Ve=Xa(),It=Xa(),Ab=Xa(),me=Xa(),pt=Xa(),Yi=Xa(),Jr=Xa();function Xa(){return 2**++t9}var Nb=Object.keys(Wc),Za=class extends Ir{constructor(t,r,o,n){let i=-1;if(super(t,r),EO(this,"space",n),typeof o=="number")for(;++i<Nb.length;){let a=Nb[i];EO(this,Nb[i],(o&Wc[a])===Wc[a])}}};Za.prototype.defined=!0;function EO(e,t,r){r&&(e[t]=r)}var r9={}.hasOwnProperty;function Do(e){let t={},r={},o;for(o in e.properties)if(r9.call(e.properties,o)){let n=e.properties[o],i=new Za(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(i.mustUseProperty=!0),t[o]=i,r[Uc(o)]=o,r[Uc(i.attribute)]=o}return new Kn(t,r,e.space)}var Lb=Do({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Mb=Do({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function th(e,t){return t in e?e[t]:t}function rh(e,t){return th(e,t.toLowerCase())}var Bb=Do({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:rh,properties:{xmlns:null,xmlnsXLink:null}});var zb=Do({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:It,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:pt,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:pt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:It,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}});var IO=Do({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:rh,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yi,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:pt,autoFocus:Ve,autoPlay:Ve,blocking:pt,capture:null,charSet:null,checked:Ve,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:It,controls:Ve,controlsList:pt,coords:me|Yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:Ab,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:pt,height:me,hidden:Ve,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ve,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ve,optimum:me,pattern:null,ping:pt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:pt,required:Ve,reversed:Ve,rows:me,rowSpan:me,sandbox:pt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:It,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:me,security:null,unselectable:null}});var OO=Do({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:th,properties:{about:Jr,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Yi,g2:Yi,glyphName:Yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Jr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jr,rev:Jr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jr,requiredFeatures:Jr,requiredFonts:Jr,requiredFormats:Jr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Jr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jr,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var o9=/^data[-\w.:]+$/i,_O=/-[a-z]/g,n9=/[A-Z]/g;function Fb(e,t){let r=Uc(t),o=t,n=Ir;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&o9.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(_O,a9);o="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!_O.test(i)){let a=i.replace(n9,i9);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}n=Za}return new n(o,t)}function i9(e){return"-"+e.toLowerCase()}function a9(e){return e.charAt(1).toUpperCase()}var $b={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var wO=Db([Mb,Lb,Bb,zb,IO],"html"),oh=Db([Mb,Lb,Bb,zb,OO],"svg");function DO(e){return e.join(" ").trim()}var Vb=cn(FO(),1),$O=Vb.default.default||Vb.default;var nh=VO("end"),Nl=VO("start");function VO(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jb(e){let t=Nl(e),r=nh(e);if(t&&r)return{start:t,end:r}}function Xi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jO(e.position):"start"in e||"end"in e?jO(e):"line"in e||"column"in e?Hb(e):""}function Hb(e){return HO(e&&e.line)+":"+HO(e&&e.column)}function jO(e){return Hb(e&&e.start)+"-"+Hb(e&&e.end)}function HO(e){return e&&typeof e=="number"?e:1}var Nt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",i={},a=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i=H({},r)),typeof t=="string"?n=t:!i.cause&&t&&(a=!0,n=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?i.ruleId=o:(i.source=o.slice(0,l),i.ruleId=o.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){let l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}let s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=Xi(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}};Nt.prototype.file="";Nt.prototype.name="";Nt.prototype.reason="";Nt.prototype.message="";Nt.prototype.stack="";Nt.prototype.column=void 0;Nt.prototype.line=void 0;Nt.prototype.ancestors=void 0;Nt.prototype.cause=void 0;Nt.prototype.fatal=void 0;Nt.prototype.place=void 0;Nt.prototype.ruleId=void 0;Nt.prototype.source=void 0;var Ub={}.hasOwnProperty,x9=new Map,T9=/[A-Z]/g,P9=/-([a-z])/g,C9=new Set(["table","tbody","thead","tfoot","tr"]),k9=new Set(["td","th"]),UO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=D9(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=w9(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?oh:wO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=WO(n,e,void 0);return i&&typeof i!="string"?i:n.create(e,n.Fragment,{children:i||void 0},void 0)}function WO(e,t,r){if(t.type==="element")return S9(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return R9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return I9(e,t,r);if(t.type==="mdxjsEsm")return E9(e,t);if(t.type==="root")return O9(e,t,r);if(t.type==="text")return _9(e,t)}function S9(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=oh,e.schema=n),e.ancestors.push(t);let i=JO(e,t.tagName,!1),a=A9(e,t),s=Jb(e,t);return C9.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!wb(l):!0})),GO(e,a,i,t),Gb(a,s),e.ancestors.pop(),e.schema=o,e.create(t,i,a,r)}function R9(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Jc(e,t.position)}function E9(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jc(e,t.position)}function I9(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=oh,e.schema=n),e.ancestors.push(t);let i=t.name===null?e.Fragment:JO(e,t.name,!0),a=N9(e,t),s=Jb(e,t);return GO(e,a,i,t),Gb(a,s),e.ancestors.pop(),e.schema=o,e.create(t,i,a,r)}function O9(e,t,r){let o={};return Gb(o,Jb(e,t)),e.create(t,e.Fragment,o,r)}function _9(e,t){return t.value}function GO(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Gb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function w9(e,t,r){return o;function o(n,i,a,s){let p=Array.isArray(a.children)?r:t;return s?p(i,a,s):p(i,a)}}function D9(e,t){return r;function r(o,n,i,a){let s=Array.isArray(i.children),l=Nl(o);return t(n,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function A9(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&Ub.call(t.properties,n)){let i=L9(e,n,t.properties[n]);if(i){let[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&k9.has(t.tagName)?o=s:r[a]=s}}if(o){let i=r.style||(r.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function N9(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let i=o.data.estree.body[0];i.type;let a=i.expression;a.type;let s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Jc(e,t.position);else{let n=o.name,i;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Jc(e,t.position);else i=o.value===null?!0:o.value;r[n]=i}return r}function Jb(e,t){let r=[],o=-1,n=e.passKeys?new Map:x9;for(;++o<t.children.length;){let i=t.children[o],a;if(e.passKeys){let l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){let p=n.get(l)||0;a=l+"-"+p,n.set(l,p+1)}}let s=WO(e,i,a);s!==void 0&&r.push(s)}return r}function L9(e,t,r){let o=Fb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?SO(r):DO(r)),o.property==="style"){let n=typeof r=="object"?r:M9(e,String(r));return e.stylePropertyNameCase==="css"&&(n=B9(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?$b[o.property]||o.property:o.attribute,r]}}function M9(e,t){let r={};try{$O(t,o)}catch(n){if(!e.ignoreInvalidStyle){let i=n,a=new Nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=UO+"#cannot-parse-style-attribute",a}}return r;function o(n,i){let a=n;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(P9,F9)),r[a]=i}}function JO(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),i=-1,a;for(;++i<n.length;){let s=eh(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}o=a}else o=eh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return Ub.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Jc(e)}function Jc(e,t){let r=new Nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=UO+"#cannot-handle-mdx-estrees-without-createevaluater",r}function B9(e){let t={},r;for(r in e)Ub.call(e,r)&&(t[z9(r)]=e[r]);return t}function z9(e){let t=e.replace(T9,$9);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function F9(e,t){return t.toUpperCase()}function $9(e){return"-"+e.toLowerCase()}var qc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};import{Fragment as W7,jsx as G7,jsxs as J7}from"react/jsx-runtime";var V9={};function qb(e,t){let r=t||V9,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return KO(e,o,n)}function KO(e,t,r){if(j9(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qO(e.children,t,r)}return Array.isArray(e)?qO(e,t,r):""}function qO(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=KO(e[n],t,r);return o.join("")}function j9(e){return!!(e&&typeof e=="object")}var YO=document.createElement("i");function Ll(e){let t="&"+e+";";YO.innerHTML=t;let r=YO.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Or(e,t,r,o){let n=e.length,i=0,a;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)a=Array.from(o),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);i<o.length;)a=o.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function zr(e,t){return e.length>0?(Or(e,e.length,0,t),e):t}var XO={}.hasOwnProperty;function ZO(e){let t={},r=-1;for(;++r<e.length;)H9(t,e[r]);return t}function H9(e,t){let r;for(r in t){let n=(XO.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r],a;if(i)for(a in i){XO.call(n,a)||(n[a]=[]);let s=i[a];U9(n[a],Array.isArray(s)?s:s?[s]:[])}}}function U9(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);Or(e,0,0,o)}function ih(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var lo=Zi(/[A-Za-z]/),rr=Zi(/[\dA-Za-z]/),QO=Zi(/[#-'*+\--9=?A-Z^-~]/);function Kc(e){return e!==null&&(e<32||e===127)}var Yc=Zi(/\d/),e_=Zi(/[\dA-Fa-f]/),t_=Zi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function Lt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}var r_=Zi(new RegExp("\\p{P}|\\p{S}","u")),o_=Zi(/\s/);function Zi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ao(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let i=e.charCodeAt(r),a="";if(i===37&&rr(e.charCodeAt(r+1))&&rr(e.charCodeAt(r+2)))n=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){let s=e.charCodeAt(r+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),n=1):a="\uFFFD"}else a=String.fromCharCode(i);a&&(t.push(e.slice(o,r),encodeURIComponent(a)),o=r+n+1,a=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function Ue(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,i=0;return a;function a(l){return je(l)?(e.enter(r),s(l)):t(l)}function s(l){return je(l)&&i++<n?(e.consume(l),s):(e.exit(r),t(l))}}var n_={tokenize:W9};function W9(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),i(s)}function i(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return _e(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}var a_={tokenize:G9},i_={tokenize:J9};function G9(e){let t=this,r=[],o=0,n,i,a;return s;function s(g){if(o<r.length){let C=r[o];return t.containerState=C[1],e.attempt(C[0].continuation,l,p)(g)}return p(g)}function l(g){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let C=t.events.length,T=C,P;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){P=t.events[T][1].end;break}b(o);let k=C;for(;k<t.events.length;)t.events[k][1].end=Object.assign({},P),k++;return Or(t.events,T+1,0,t.events.slice(C)),t.events.length=k,p(g)}return s(g)}function p(g){if(o===r.length){if(!n)return f(g);if(n.currentConstruct&&n.currentConstruct.concrete)return h(g);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(i_,c,u)(g)}function c(g){return n&&x(),b(o),f(g)}function u(g){return t.parser.lazy[t.now().line]=o!==r.length,a=t.now().offset,h(g)}function f(g){return t.containerState={},e.attempt(i_,d,h)(g)}function d(g){return o++,r.push([t.currentConstruct,t.containerState]),f(g)}function h(g){if(g===null){n&&x(),b(0),e.consume(g);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),y(g)}function y(g){if(g===null){v(e.exit("chunkFlow"),!0),b(0),e.consume(g);return}return _e(g)?(e.consume(g),v(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(g),y)}function v(g,C){let T=t.sliceStream(g);if(C&&T.push(null),g.previous=i,i&&(i.next=g),i=g,n.defineSkip(g.start),n.write(T),t.parser.lazy[g.start.line]){let P=n.events.length;for(;P--;)if(n.events[P][1].start.offset<a&&(!n.events[P][1].end||n.events[P][1].end.offset>a))return;let k=t.events.length,R=k,D,O;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(D){O=t.events[R][1].end;break}D=!0}for(b(o),P=k;P<t.events.length;)t.events[P][1].end=Object.assign({},O),P++;Or(t.events,R+1,0,t.events.slice(k)),t.events.length=P}}function b(g){let C=r.length;for(;C-- >g;){let T=r[C];t.containerState=T[1],T[0].exit.call(t,e)}r.length=g}function x(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}function J9(e,t,r){return Ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Kb(e){if(e===null||Lt(e)||o_(e))return 1;if(r_(e))return 2}function Ml(e,t,r){let o=[],n=-1;for(;++n<e.length;){let i=e[n].resolveAll;i&&!o.includes(i)&&(t=i(t,r),o.push(i))}return t}var Xc={name:"attention",tokenize:K9,resolveAll:q9};function q9(e,t){let r=-1,o,n,i,a,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let u=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);s_(u,-l),s_(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},a.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=zr(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=zr(p,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",i,t]]),p=zr(p,Ml(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=zr(p,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=zr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Or(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function K9(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=Kb(o),i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;let p=e.exit("attentionSequence"),c=Kb(l),u=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(i===42?u:u&&(n||!f)),p._close=!!(i===42?f:f&&(c||!u)),t(l)}}function s_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Yb={name:"autolink",tokenize:Y9};function Y9(e,t,r){let o=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return lo(d)?(e.consume(d),a):p(d)}function a(d){return d===43||d===45||d===46||rr(d)?(o=1,s(d)):p(d)}function s(d){return d===58?(e.consume(d),o=0,l):(d===43||d===45||d===46||rr(d))&&o++<32?(e.consume(d),s):(o=0,p(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Kc(d)?r(d):(e.consume(d),l)}function p(d){return d===64?(e.consume(d),c):QO(d)?(e.consume(d),p):r(d)}function c(d){return rr(d)?u(d):r(d)}function u(d){return d===46?(e.consume(d),o=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||rr(d))&&o++<63){let h=d===45?f:u;return e.consume(d),h}return r(d)}}var Qi={tokenize:X9,partial:!0};function X9(e,t,r){return o;function o(i){return je(i)?Ue(e,n,"linePrefix")(i):n(i)}function n(i){return i===null||_e(i)?t(i):r(i)}}var ah={name:"blockQuote",tokenize:Z9,continuation:{tokenize:Q9},exit:e6};function Z9(e,t,r){let o=this;return n;function n(a){if(a===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return r(a)}function i(a){return je(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Q9(e,t,r){let o=this;return n;function n(a){return je(a)?Ue(e,i,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(ah,t,r)(a)}}function e6(e){e.exit("blockQuote")}var sh={name:"characterEscape",tokenize:t6};function t6(e,t,r){return o;function o(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),n}function n(i){return t_(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}var lh={name:"characterReference",tokenize:r6};function r6(e,t,r){let o=this,n=0,i,a;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),i=31,a=rr,c(u))}function p(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=e_,c):(e.enter("characterReferenceValue"),i=7,a=Yc,c(u))}function c(u){if(u===59&&n){let f=e.exit("characterReferenceValue");return a===rr&&!Ll(o.sliceSerialize(f))?r(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&n++<i?(e.consume(u),c):r(u)}}var l_={tokenize:n6,partial:!0},ph={name:"codeFenced",tokenize:o6,concrete:!0};function o6(e,t,r){let o=this,n={tokenize:T,partial:!0},i=0,a=0,s;return l;function l(P){return p(P)}function p(P){let k=o.events[o.events.length-1];return i=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,s=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(P)}function c(P){return P===s?(a++,e.consume(P),c):a<3?r(P):(e.exit("codeFencedFenceSequence"),je(P)?Ue(e,u,"whitespace")(P):u(P))}function u(P){return P===null||_e(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(l_,y,C)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(P))}function f(P){return P===null||_e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(P)):je(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,d,"whitespace")(P)):P===96&&P===s?r(P):(e.consume(P),f)}function d(P){return P===null||_e(P)?u(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(P))}function h(P){return P===null||_e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(P)):P===96&&P===s?r(P):(e.consume(P),h)}function y(P){return e.attempt(n,C,v)(P)}function v(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),b}function b(P){return i>0&&je(P)?Ue(e,x,"linePrefix",i+1)(P):x(P)}function x(P){return P===null||_e(P)?e.check(l_,y,C)(P):(e.enter("codeFlowValue"),g(P))}function g(P){return P===null||_e(P)?(e.exit("codeFlowValue"),x(P)):(e.consume(P),g)}function C(P){return e.exit("codeFenced"),t(P)}function T(P,k,R){let D=0;return O;function O(N){return P.enter("lineEnding"),P.consume(N),P.exit("lineEnding"),B}function B(N){return P.enter("codeFencedFence"),je(N)?Ue(P,A,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):A(N)}function A(N){return N===s?(P.enter("codeFencedFenceSequence"),_(N)):R(N)}function _(N){return N===s?(D++,P.consume(N),_):D>=a?(P.exit("codeFencedFenceSequence"),je(N)?Ue(P,j,"whitespace")(N):j(N)):R(N)}function j(N){return N===null||_e(N)?(P.exit("codeFencedFence"),k(N)):R(N)}}}function n6(e,t,r){let o=this;return n;function n(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return o.parser.lazy[o.now().line]?r(a):t(a)}}var Zc={name:"codeIndented",tokenize:a6},i6={tokenize:s6,partial:!0};function a6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),Ue(e,i,"linePrefix",5)(p)}function i(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(p):r(p)}function a(p){return p===null?l(p):_e(p)?e.attempt(i6,a,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||_e(p)?(e.exit("codeFlowValue"),a(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function s6(e,t,r){let o=this;return n;function n(a){return o.parser.lazy[o.now().line]?r(a):_e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n):Ue(e,i,"linePrefix",5)(a)}function i(a){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):_e(a)?n(a):r(a)}}var Xb={name:"codeText",tokenize:c6,resolve:l6,previous:p6};function l6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function p6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function c6(e,t,r){let o=this,n=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(a=e.enter("codeTextSequence"),i=0,u(f)):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||_e(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),i++,u):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}var ch=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&Qc(this.left,o),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);Qc(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qc(this.left,r.reverse())}}};function Qc(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function uh(e){let t={},r=-1,o,n,i,a,s,l,p,c=new ch(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,u6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(i=r,n=void 0;i--&&(a=c.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=i);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return Or(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function u6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,i=[],a=r._tokenizer||o.parser[r.contentType](r.start),s=a.events,l=[],p={},c,u,f=-1,d=r,h=0,y=0,v=[y];for(;d;){for(;e.get(++n)[1]!==d;);i.push(n),d._tokenizer||(c=o.sliceStream(d),d.next||c.push(null),u&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(y=f+1,v.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):v.pop(),f=v.length;f--;){let b=s.slice(v[f],v[f+1]),x=i.pop();l.push([x,x+b.length-1]),e.splice(x,2,b)}for(l.reverse(),f=-1;++f<l.length;)p[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return p}var Zb={tokenize:m6,resolve:f6},d6={tokenize:h6,partial:!0};function f6(e){return uh(e),e}function m6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?i(s):_e(s)?e.check(d6,a,i)(s):(e.consume(s),n)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function h6(e,t,r){let o=this;return n;function n(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ue(e,i,"linePrefix")}function i(a){if(a===null||_e(a))return r(a);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(o.parser.constructs.flow,r,t)(a)}}function dh(e,t,r,o,n,i,a,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return u;function u(b){return b===60?(e.enter(o),e.enter(n),e.enter(i),e.consume(b),e.exit(i),f):b===null||b===32||b===41||Kc(b)?r(b):(e.enter(o),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(b))}function f(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||_e(b)?r(b):(e.consume(b),b===92?h:d)}function h(b){return b===60||b===62||b===92?(e.consume(b),d):d(b)}function y(b){return!c&&(b===null||b===41||Lt(b))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(o),t(b)):c<p&&b===40?(e.consume(b),c++,y):b===41?(e.consume(b),c--,y):b===null||b===32||b===40||Kc(b)?r(b):(e.consume(b),b===92?v:y)}function v(b){return b===40||b===41||b===92?(e.consume(b),y):y(b)}}function fh(e,t,r,o,n,i){let a=this,s=0,l;return p;function p(d){return e.enter(o),e.enter(n),e.consume(d),e.exit(n),e.enter(i),c}function c(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):d===93?(e.exit(i),e.enter(n),e.consume(d),e.exit(n),e.exit(o),t):_e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||_e(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!je(d)),d===92?f:u)}function f(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function mh(e,t,r,o,n,i){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),a=f===40?41:f,l):r(f)}function l(f){return f===a?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(i),p(f))}function p(f){return f===a?(e.exit(i),l(a)):f===null?r(f):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ue(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===a||f===null||_e(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?u:c)}function u(f){return f===a||f===92?(e.consume(f),c):c(f)}}function es(e,t){let r;return o;function o(n){return _e(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):je(n)?Ue(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var Qb={name:"definition",tokenize:g6},y6={tokenize:v6,partial:!0};function g6(e,t,r){let o=this,n;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return fh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return n=Yn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return Lt(d)?es(e,p)(d):p(d)}function p(d){return dh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(y6,u,u)(d)}function u(d){return je(d)?Ue(e,f,"whitespace")(d):f(d)}function f(d){return d===null||_e(d)?(e.exit("definition"),o.parser.defined.push(n),t(d)):r(d)}}function v6(e,t,r){return o;function o(s){return Lt(s)?es(e,n)(s):r(s)}function n(s){return mh(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return je(s)?Ue(e,a,"whitespace")(s):a(s)}function a(s){return s===null||_e(s)?t(s):r(s)}}var ex={name:"hardBreakEscape",tokenize:b6};function b6(e,t,r){return o;function o(i){return e.enter("hardBreakEscape"),e.consume(i),n}function n(i){return _e(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}var tx={name:"headingAtx",tokenize:T6,resolve:x6};function x6(e,t){let r=e.length-2,o=3,n,i;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},i={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Or(e,o,r-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]])),e}function T6(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&o++<6?(e.consume(c),a):c===null||Lt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||_e(c)?(e.exit("atxHeading"),t(c)):je(c)?Ue(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||Lt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var p_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rx=["pre","script","style","textarea"];var ox={name:"htmlFlow",tokenize:S6,resolveTo:k6,concrete:!0},P6={tokenize:E6,partial:!0},C6={tokenize:R6,partial:!0};function k6(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function S6(e,t,r){let o=this,n,i,a,s,l;return p;function p(I){return c(I)}function c(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),u}function u(I){return I===33?(e.consume(I),f):I===47?(e.consume(I),i=!0,y):I===63?(e.consume(I),n=3,o.interrupt?t:S):lo(I)?(e.consume(I),a=String.fromCharCode(I),v):r(I)}function f(I){return I===45?(e.consume(I),n=2,d):I===91?(e.consume(I),n=5,s=0,h):lo(I)?(e.consume(I),n=4,o.interrupt?t:S):r(I)}function d(I){return I===45?(e.consume(I),o.interrupt?t:S):r(I)}function h(I){let pe="CDATA[";return I===pe.charCodeAt(s++)?(e.consume(I),s===pe.length?o.interrupt?t:A:h):r(I)}function y(I){return lo(I)?(e.consume(I),a=String.fromCharCode(I),v):r(I)}function v(I){if(I===null||I===47||I===62||Lt(I)){let pe=I===47,ge=a.toLowerCase();return!pe&&!i&&rx.includes(ge)?(n=1,o.interrupt?t(I):A(I)):p_.includes(a.toLowerCase())?(n=6,pe?(e.consume(I),b):o.interrupt?t(I):A(I)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(I):i?x(I):g(I))}return I===45||rr(I)?(e.consume(I),a+=String.fromCharCode(I),v):r(I)}function b(I){return I===62?(e.consume(I),o.interrupt?t:A):r(I)}function x(I){return je(I)?(e.consume(I),x):O(I)}function g(I){return I===47?(e.consume(I),O):I===58||I===95||lo(I)?(e.consume(I),C):je(I)?(e.consume(I),g):O(I)}function C(I){return I===45||I===46||I===58||I===95||rr(I)?(e.consume(I),C):T(I)}function T(I){return I===61?(e.consume(I),P):je(I)?(e.consume(I),T):g(I)}function P(I){return I===null||I===60||I===61||I===62||I===96?r(I):I===34||I===39?(e.consume(I),l=I,k):je(I)?(e.consume(I),P):R(I)}function k(I){return I===l?(e.consume(I),l=null,D):I===null||_e(I)?r(I):(e.consume(I),k)}function R(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Lt(I)?T(I):(e.consume(I),R)}function D(I){return I===47||I===62||je(I)?g(I):r(I)}function O(I){return I===62?(e.consume(I),B):r(I)}function B(I){return I===null||_e(I)?A(I):je(I)?(e.consume(I),B):r(I)}function A(I){return I===45&&n===2?(e.consume(I),w):I===60&&n===1?(e.consume(I),z):I===62&&n===4?(e.consume(I),ee):I===63&&n===3?(e.consume(I),S):I===93&&n===5?(e.consume(I),V):_e(I)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(P6,ne,_)(I)):I===null||_e(I)?(e.exit("htmlFlowData"),_(I)):(e.consume(I),A)}function _(I){return e.check(C6,j,ne)(I)}function j(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),N}function N(I){return I===null||_e(I)?_(I):(e.enter("htmlFlowData"),A(I))}function w(I){return I===45?(e.consume(I),S):A(I)}function z(I){return I===47?(e.consume(I),a="",Y):A(I)}function Y(I){if(I===62){let pe=a.toLowerCase();return rx.includes(pe)?(e.consume(I),ee):A(I)}return lo(I)&&a.length<8?(e.consume(I),a+=String.fromCharCode(I),Y):A(I)}function V(I){return I===93?(e.consume(I),S):A(I)}function S(I){return I===62?(e.consume(I),ee):I===45&&n===2?(e.consume(I),S):A(I)}function ee(I){return I===null||_e(I)?(e.exit("htmlFlowData"),ne(I)):(e.consume(I),ee)}function ne(I){return e.exit("htmlFlow"),t(I)}}function R6(e,t,r){let o=this;return n;function n(a){return _e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):r(a)}function i(a){return o.parser.lazy[o.now().line]?r(a):t(a)}}function E6(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Qi,t,r)}}var nx={name:"htmlText",tokenize:I6};function I6(e,t,r){let o=this,n,i,a;return s;function s(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),l}function l(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),T):S===63?(e.consume(S),g):lo(S)?(e.consume(S),R):r(S)}function p(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),i=0,h):lo(S)?(e.consume(S),x):r(S)}function c(S){return S===45?(e.consume(S),d):r(S)}function u(S){return S===null?r(S):S===45?(e.consume(S),f):_e(S)?(a=u,z(S)):(e.consume(S),u)}function f(S){return S===45?(e.consume(S),d):u(S)}function d(S){return S===62?w(S):S===45?f(S):u(S)}function h(S){let ee="CDATA[";return S===ee.charCodeAt(i++)?(e.consume(S),i===ee.length?y:h):r(S)}function y(S){return S===null?r(S):S===93?(e.consume(S),v):_e(S)?(a=y,z(S)):(e.consume(S),y)}function v(S){return S===93?(e.consume(S),b):y(S)}function b(S){return S===62?w(S):S===93?(e.consume(S),b):y(S)}function x(S){return S===null||S===62?w(S):_e(S)?(a=x,z(S)):(e.consume(S),x)}function g(S){return S===null?r(S):S===63?(e.consume(S),C):_e(S)?(a=g,z(S)):(e.consume(S),g)}function C(S){return S===62?w(S):g(S)}function T(S){return lo(S)?(e.consume(S),P):r(S)}function P(S){return S===45||rr(S)?(e.consume(S),P):k(S)}function k(S){return _e(S)?(a=k,z(S)):je(S)?(e.consume(S),k):w(S)}function R(S){return S===45||rr(S)?(e.consume(S),R):S===47||S===62||Lt(S)?D(S):r(S)}function D(S){return S===47?(e.consume(S),w):S===58||S===95||lo(S)?(e.consume(S),O):_e(S)?(a=D,z(S)):je(S)?(e.consume(S),D):w(S)}function O(S){return S===45||S===46||S===58||S===95||rr(S)?(e.consume(S),O):B(S)}function B(S){return S===61?(e.consume(S),A):_e(S)?(a=B,z(S)):je(S)?(e.consume(S),B):D(S)}function A(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(e.consume(S),n=S,_):_e(S)?(a=A,z(S)):je(S)?(e.consume(S),A):(e.consume(S),j)}function _(S){return S===n?(e.consume(S),n=void 0,N):S===null?r(S):_e(S)?(a=_,z(S)):(e.consume(S),_)}function j(S){return S===null||S===34||S===39||S===60||S===61||S===96?r(S):S===47||S===62||Lt(S)?D(S):(e.consume(S),j)}function N(S){return S===47||S===62||Lt(S)?D(S):r(S)}function w(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):r(S)}function z(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),Y}function Y(S){return je(S)?Ue(e,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):V(S)}function V(S){return e.enter("htmlTextData"),a(S)}}var ts={name:"labelEnd",tokenize:N6,resolveTo:A6,resolveAll:D6},O6={tokenize:L6},_6={tokenize:M6},w6={tokenize:B6};function D6(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function A6(e,t){let r=e.length,o=0,n,i,a,s;for(;r--;)if(n=e[r][1],i){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(i=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(a=r);let l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[i+o+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=zr(s,e.slice(i+1,i+o+3)),s=zr(s,[["enter",c,t]]),s=zr(s,Ml(t.parser.constructs.insideSpan.null,e.slice(i+o+4,a-3),t)),s=zr(s,[["exit",c,t],e[a-2],e[a-1],["exit",p,t]]),s=zr(s,e.slice(a+1)),s=zr(s,[["exit",l,t]]),Or(e,i,e.length,s),e}function N6(e,t,r){let o=this,n=o.events.length,i,a;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){i=o.events[n][1];break}return s;function s(f){return i?i._inactive?u(f):(a=o.parser.defined.includes(Yn(o.sliceSerialize({start:i.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(O6,c,a?c:u)(f):f===91?e.attempt(_6,c,a?p:u)(f):a?c(f):u(f)}function p(f){return e.attempt(w6,c,u)(f)}function c(f){return t(f)}function u(f){return i._balanced=!0,r(f)}}function L6(e,t,r){return o;function o(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),n}function n(u){return Lt(u)?es(e,i)(u):i(u)}function i(u){return u===41?c(u):dh(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return Lt(u)?es(e,l)(u):c(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?mh(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):c(u)}function p(u){return Lt(u)?es(e,c)(u):c(u)}function c(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):r(u)}}function M6(e,t,r){let o=this;return n;function n(s){return fh.call(o,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return o.parser.defined.includes(Yn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function B6(e,t,r){return o;function o(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),n}function n(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}var ix={name:"labelStartImage",tokenize:z6,resolveAll:ts.resolveAll};function z6(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var ax={name:"labelStartLink",tokenize:F6,resolveAll:ts.resolveAll};function F6(e,t,r){let o=this;return n;function n(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(a):t(a)}}var eu={name:"lineEnding",tokenize:$6};function $6(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}var rs={name:"thematicBreak",tokenize:V6};function V6(e,t,r){let o=0,n;return i;function i(p){return e.enter("thematicBreak"),a(p)}function a(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),je(p)?Ue(e,s,"whitespace")(p):s(p))}}var _r={name:"list",tokenize:U6,continuation:{tokenize:W6},exit:J6},j6={tokenize:q6,partial:!0},H6={tokenize:G6,partial:!0};function U6(e,t,r){let o=this,n=o.events[o.events.length-1],i=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,a=0;return s;function s(d){let h=o.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!o.containerState.marker||d===o.containerState.marker:Yc(d)){if(o.containerState.type||(o.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(rs,r,p)(d):p(d);if(!o.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return Yc(d)&&++a<10?(e.consume(d),l):(!o.interrupt||a<2)&&(o.containerState.marker?d===o.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),p(d)):r(d)}function p(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||d,e.check(Qi,o.interrupt?r:c,e.attempt(j6,f,u))}function c(d){return o.containerState.initialBlankLine=!0,i++,f(d)}function u(d){return je(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):r(d)}function f(d){return o.containerState.size=i+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function W6(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(Qi,n,i);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ue(e,t,"listItemIndent",o.containerState.size+1)(s)}function i(s){return o.containerState.furtherBlankLines||!je(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(H6,t,a)(s))}function a(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ue(e,e.attempt(_r,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function G6(e,t,r){let o=this;return Ue(e,n,"listItemIndent",o.containerState.size+1);function n(i){let a=o.events[o.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===o.containerState.size?t(i):r(i)}}function J6(e){e.exit(this.containerState.type)}function q6(e,t,r){let o=this;return Ue(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(i){let a=o.events[o.events.length-1];return!je(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}var hh={name:"setextUnderline",tokenize:Y6,resolveTo:K6};function K6(e,t){let r=e.length,o,n,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);let a={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",a,t]),e.splice(i+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[i][1].end)):e[o][1]=a,e.push(["exit",a,t]),e}function Y6(e,t,r){let o=this,n;return i;function i(p){let c=o.events.length,u;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){u=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(e.enter("setextHeadingLine"),n=p,a(p)):r(p)}function a(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),je(p)?Ue(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var c_={tokenize:X6};function X6(e){let t=this,r=e.attempt(Qi,o,e.attempt(this.parser.constructs.flowInitial,n,Ue(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Zb,n)),"linePrefix")));return r;function o(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var u_={resolveAll:h_()},d_=m_("string"),f_=m_("text");function m_(e){return{tokenize:t,resolveAll:h_(e==="text"?Z6:void 0)};function t(r){let o=this,n=this.parser.constructs[e],i=r.attempt(n,a,s);return a;function a(c){return p(c)?i(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),i(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let u=n[c],f=-1;if(u)for(;++f<u.length;){let d=u[f];if(!d.previous||d.previous.call(o,o.previous))return!0}return!1}}}function h_(e){return t;function t(r,o){let n=-1,i;for(;++n<=r.length;)i===void 0?r[n]&&r[n][1].type==="data"&&(i=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==i+2&&(r[i][1].end=r[n-1][1].end,r.splice(i+2,n-i-2),n=i+2),i=void 0);return e?e(r,o):r}}function Z6(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),i=n.length,a=-1,s=0,l;for(;i--;){let p=n[i];if(typeof p=="string"){for(a=p.length;p.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(p===-2)l=!0,s++;else if(p!==-1){i++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+i,_bufferIndex:i?a:o.start._bufferIndex+a},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function y_(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},i=[],a=[],s=[],l=!0,p={consume:C,enter:T,exit:P,attempt:D(k),check:D(R),interrupt:D(R,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:y,sliceSerialize:h,now:v,defineSkip:b,write:d},u=t.tokenize.call(c,p),f;return t.resolveAll&&i.push(t),c;function d(_){return a=zr(a,_),x(),a[a.length-1]!==null?[]:(O(t,0),c.events=Ml(i,c.events,c),c.events)}function h(_,j){return e7(y(_),j)}function y(_){return Q6(a,_)}function v(){let{line:_,column:j,offset:N,_index:w,_bufferIndex:z}=o;return{line:_,column:j,offset:N,_index:w,_bufferIndex:z}}function b(_){n[_.line]=_.column,A()}function x(){let _;for(;o._index<a.length;){let j=a[o._index];if(typeof j=="string")for(_=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===_&&o._bufferIndex<j.length;)g(j.charCodeAt(o._bufferIndex));else g(j)}}function g(_){l=void 0,f=_,u=u(_)}function C(_){_e(_)?(o.line++,o.column=1,o.offset+=_===-3?2:1,A()):_!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=_,l=!0}function T(_,j){let N=j||{};return N.type=_,N.start=v(),c.events.push(["enter",N,c]),s.push(N),N}function P(_){let j=s.pop();return j.end=v(),c.events.push(["exit",j,c]),j}function k(_,j){O(_,j.from)}function R(_,j){j.restore()}function D(_,j){return N;function N(w,z,Y){let V,S,ee,ne;return Array.isArray(w)?pe(w):"tokenize"in w?pe([w]):I(w);function I(W){return de;function de(fe){let Ce=fe!==null&&W[fe],ve=fe!==null&&W.null,Fe=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return pe(Fe)(fe)}}function pe(W){return V=W,S=0,W.length===0?Y:ge(W[S])}function ge(W){return de;function de(fe){return ne=B(),ee=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ae(fe):W.tokenize.call(j?Object.assign(Object.create(c),j):c,p,De,ae)(fe)}}function De(W){return l=!0,_(ee,ne),z}function ae(W){return l=!0,ne.restore(),++S<V.length?ge(V[S]):Y}}}function O(_,j){_.resolveAll&&!i.includes(_)&&i.push(_),_.resolve&&Or(c.events,j,c.events.length-j,_.resolve(c.events.slice(j),c)),_.resolveTo&&(c.events=_.resolveTo(c.events,c))}function B(){let _=v(),j=c.previous,N=c.currentConstruct,w=c.events.length,z=Array.from(s);return{restore:Y,from:w};function Y(){o=_,c.previous=j,c.currentConstruct=N,c.events.length=w,s=z,A()}}function A(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function Q6(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,i=t.end._bufferIndex,a;if(r===n)a=[e[r].slice(o,i)];else{if(a=e.slice(r,n),o>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(o):a.shift()}i>0&&a.push(e[n].slice(0,i))}return a}function e7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let i=e[r],a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|