@mui-toolpad-extended-tuni/core 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +162 -161
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -120,7 +120,7 @@ export default theme;`}function am(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
120
120
|
`))}v[m]={}}}};Object.keys(w.components).forEach(v=>{const g=w.components[v].styleOverrides;g&&v.startsWith("Mui")&&y(g,v)})}return w.unstable_sxConfig={...ws,...h==null?void 0:h.unstable_sxConfig},w.unstable_sx=function(y){return Si({sx:y,theme:this})},w.toRuntimeSource=Sy,eR(w),w}function tR(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const nR=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=tR(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ey(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Oy(e){return e==="dark"?nR:[]}function rR(e){const{palette:t={mode:"light"},opacity:n,overlays:i,colorSpace:s,...a}=e,u=gf({...t,colorSpace:s});return{palette:u,opacity:{...Ey(u.mode),...n},overlays:i||Oy(u.mode),...a}}function iR(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const oR=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],sR=e=>(t,n)=>{const i=e.rootSelector||":root",s=e.colorSchemeSelector;let a=s;if(s==="class"&&(a=".%s"),s==="data"&&(a="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(a=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return oR(e.cssVarPrefix).forEach(c=>{u[c]=n[c],delete n[c]}),a==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:u}}:a?{[a.replace("%s",t)]:u,[`${i}, ${a.replace("%s",t)}`]:n}:{[i]:{...n,...u}}}if(a&&a!=="media")return`${i}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[i]:n}};if(a)return a.replace("%s",String(t))}return i};function aR(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function ne(e,t,n){!e[t]&&n&&(e[t]=n)}function Qo(e){return typeof e!="string"||!e.startsWith("hsl")?e:my(e)}function fr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Ko(Qo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
121
121
|
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function uR(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const qn=e=>{try{return e()}catch{}},lR=(e="mui")=>T_(e);function gc(e,t,n,i,s){if(!n)return;n=n===!0?{}:n;const a=s==="dark"?"dark":"light";if(!i){t[s]=rR({...n,palette:{mode:a,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:u,...c}=kc({...i,palette:{mode:a,...n==null?void 0:n.palette},colorSpace:e});return t[s]={...n,palette:u,opacity:{...Ey(a),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||Oy(a)},c}function cR(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:s=!1,cssVarPrefix:a="mui",nativeColor:u=!1,shouldSkipGeneratingVar:c=iR,colorSchemeSelector:f=n.light&&n.dark?"media":void 0,rootSelector:p=":root",...h}=e,x=Object.keys(n)[0],R=i||(n.light&&x!=="light"?"light":x),w=lR(a),{[R]:C,light:y,dark:v,...g}=n,m={...g};let S=C;if((R==="dark"&&!("dark"in n)||R==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${R}\` option is either missing or invalid.`:ls(21,R));let E;u&&(E="oklch");const T=gc(E,m,S,h,R);y&&!m.light&&gc(E,m,y,void 0,"light"),v&&!m.dark&&gc(E,m,v,void 0,"dark");let M={defaultColorScheme:R,...T,cssVarPrefix:a,colorSchemeSelector:f,rootSelector:p,getCssVar:w,colorSchemes:m,font:{...z_(T.typography),...T.font},spacing:uR(h.spacing)};Object.keys(M.colorSchemes).forEach(Z=>{const _=M.colorSchemes[Z].palette,H=K=>{const q=K.split("-"),X=q[1],fe=q[2];return w(K,_[X][fe])};_.mode==="light"&&(ne(_.common,"background","#fff"),ne(_.common,"onBackground","#000")),_.mode==="dark"&&(ne(_.common,"background","#000"),ne(_.common,"onBackground","#fff"));function B(K,q,X){if(E){let fe;return K===ri&&(fe=`transparent ${((1-X)*100).toFixed(0)}%`),K===tt&&(fe=`#000 ${(X*100).toFixed(0)}%`),K===nt&&(fe=`#fff ${(X*100).toFixed(0)}%`),`color-mix(in ${E}, ${q}, ${fe})`}return K(q,X)}if(aR(_,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),_.mode==="light"){ne(_.Alert,"errorColor",B(tt,_.error.light,.6)),ne(_.Alert,"infoColor",B(tt,_.info.light,.6)),ne(_.Alert,"successColor",B(tt,_.success.light,.6)),ne(_.Alert,"warningColor",B(tt,_.warning.light,.6)),ne(_.Alert,"errorFilledBg",H("palette-error-main")),ne(_.Alert,"infoFilledBg",H("palette-info-main")),ne(_.Alert,"successFilledBg",H("palette-success-main")),ne(_.Alert,"warningFilledBg",H("palette-warning-main")),ne(_.Alert,"errorFilledColor",qn(()=>_.getContrastText(_.error.main))),ne(_.Alert,"infoFilledColor",qn(()=>_.getContrastText(_.info.main))),ne(_.Alert,"successFilledColor",qn(()=>_.getContrastText(_.success.main))),ne(_.Alert,"warningFilledColor",qn(()=>_.getContrastText(_.warning.main))),ne(_.Alert,"errorStandardBg",B(nt,_.error.light,.9)),ne(_.Alert,"infoStandardBg",B(nt,_.info.light,.9)),ne(_.Alert,"successStandardBg",B(nt,_.success.light,.9)),ne(_.Alert,"warningStandardBg",B(nt,_.warning.light,.9)),ne(_.Alert,"errorIconColor",H("palette-error-main")),ne(_.Alert,"infoIconColor",H("palette-info-main")),ne(_.Alert,"successIconColor",H("palette-success-main")),ne(_.Alert,"warningIconColor",H("palette-warning-main")),ne(_.AppBar,"defaultBg",H("palette-grey-100")),ne(_.Avatar,"defaultBg",H("palette-grey-400")),ne(_.Button,"inheritContainedBg",H("palette-grey-300")),ne(_.Button,"inheritContainedHoverBg",H("palette-grey-A100")),ne(_.Chip,"defaultBorder",H("palette-grey-400")),ne(_.Chip,"defaultAvatarColor",H("palette-grey-700")),ne(_.Chip,"defaultIconColor",H("palette-grey-700")),ne(_.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ne(_.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ne(_.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ne(_.LinearProgress,"primaryBg",B(nt,_.primary.main,.62)),ne(_.LinearProgress,"secondaryBg",B(nt,_.secondary.main,.62)),ne(_.LinearProgress,"errorBg",B(nt,_.error.main,.62)),ne(_.LinearProgress,"infoBg",B(nt,_.info.main,.62)),ne(_.LinearProgress,"successBg",B(nt,_.success.main,.62)),ne(_.LinearProgress,"warningBg",B(nt,_.warning.main,.62)),ne(_.Skeleton,"bg",E?B(ri,_.text.primary,.11):`rgba(${H("palette-text-primaryChannel")} / 0.11)`),ne(_.Slider,"primaryTrack",B(nt,_.primary.main,.62)),ne(_.Slider,"secondaryTrack",B(nt,_.secondary.main,.62)),ne(_.Slider,"errorTrack",B(nt,_.error.main,.62)),ne(_.Slider,"infoTrack",B(nt,_.info.main,.62)),ne(_.Slider,"successTrack",B(nt,_.success.main,.62)),ne(_.Slider,"warningTrack",B(nt,_.warning.main,.62));const K=E?B(tt,_.background.default,.6825):Ta(_.background.default,.8);ne(_.SnackbarContent,"bg",K),ne(_.SnackbarContent,"color",qn(()=>E?Ac.text.primary:_.getContrastText(K))),ne(_.SpeedDialAction,"fabHoverBg",Ta(_.background.paper,.15)),ne(_.StepConnector,"border",H("palette-grey-400")),ne(_.StepContent,"border",H("palette-grey-400")),ne(_.Switch,"defaultColor",H("palette-common-white")),ne(_.Switch,"defaultDisabledColor",H("palette-grey-100")),ne(_.Switch,"primaryDisabledColor",B(nt,_.primary.main,.62)),ne(_.Switch,"secondaryDisabledColor",B(nt,_.secondary.main,.62)),ne(_.Switch,"errorDisabledColor",B(nt,_.error.main,.62)),ne(_.Switch,"infoDisabledColor",B(nt,_.info.main,.62)),ne(_.Switch,"successDisabledColor",B(nt,_.success.main,.62)),ne(_.Switch,"warningDisabledColor",B(nt,_.warning.main,.62)),ne(_.TableCell,"border",B(nt,B(ri,_.divider,1),.88)),ne(_.Tooltip,"bg",B(ri,_.grey[700],.92))}if(_.mode==="dark"){ne(_.Alert,"errorColor",B(nt,_.error.light,.6)),ne(_.Alert,"infoColor",B(nt,_.info.light,.6)),ne(_.Alert,"successColor",B(nt,_.success.light,.6)),ne(_.Alert,"warningColor",B(nt,_.warning.light,.6)),ne(_.Alert,"errorFilledBg",H("palette-error-dark")),ne(_.Alert,"infoFilledBg",H("palette-info-dark")),ne(_.Alert,"successFilledBg",H("palette-success-dark")),ne(_.Alert,"warningFilledBg",H("palette-warning-dark")),ne(_.Alert,"errorFilledColor",qn(()=>_.getContrastText(_.error.dark))),ne(_.Alert,"infoFilledColor",qn(()=>_.getContrastText(_.info.dark))),ne(_.Alert,"successFilledColor",qn(()=>_.getContrastText(_.success.dark))),ne(_.Alert,"warningFilledColor",qn(()=>_.getContrastText(_.warning.dark))),ne(_.Alert,"errorStandardBg",B(tt,_.error.light,.9)),ne(_.Alert,"infoStandardBg",B(tt,_.info.light,.9)),ne(_.Alert,"successStandardBg",B(tt,_.success.light,.9)),ne(_.Alert,"warningStandardBg",B(tt,_.warning.light,.9)),ne(_.Alert,"errorIconColor",H("palette-error-main")),ne(_.Alert,"infoIconColor",H("palette-info-main")),ne(_.Alert,"successIconColor",H("palette-success-main")),ne(_.Alert,"warningIconColor",H("palette-warning-main")),ne(_.AppBar,"defaultBg",H("palette-grey-900")),ne(_.AppBar,"darkBg",H("palette-background-paper")),ne(_.AppBar,"darkColor",H("palette-text-primary")),ne(_.Avatar,"defaultBg",H("palette-grey-600")),ne(_.Button,"inheritContainedBg",H("palette-grey-800")),ne(_.Button,"inheritContainedHoverBg",H("palette-grey-700")),ne(_.Chip,"defaultBorder",H("palette-grey-700")),ne(_.Chip,"defaultAvatarColor",H("palette-grey-300")),ne(_.Chip,"defaultIconColor",H("palette-grey-300")),ne(_.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ne(_.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ne(_.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ne(_.LinearProgress,"primaryBg",B(tt,_.primary.main,.5)),ne(_.LinearProgress,"secondaryBg",B(tt,_.secondary.main,.5)),ne(_.LinearProgress,"errorBg",B(tt,_.error.main,.5)),ne(_.LinearProgress,"infoBg",B(tt,_.info.main,.5)),ne(_.LinearProgress,"successBg",B(tt,_.success.main,.5)),ne(_.LinearProgress,"warningBg",B(tt,_.warning.main,.5)),ne(_.Skeleton,"bg",E?B(ri,_.text.primary,.13):`rgba(${H("palette-text-primaryChannel")} / 0.13)`),ne(_.Slider,"primaryTrack",B(tt,_.primary.main,.5)),ne(_.Slider,"secondaryTrack",B(tt,_.secondary.main,.5)),ne(_.Slider,"errorTrack",B(tt,_.error.main,.5)),ne(_.Slider,"infoTrack",B(tt,_.info.main,.5)),ne(_.Slider,"successTrack",B(tt,_.success.main,.5)),ne(_.Slider,"warningTrack",B(tt,_.warning.main,.5));const K=E?B(nt,_.background.default,.985):Ta(_.background.default,.98);ne(_.SnackbarContent,"bg",K),ne(_.SnackbarContent,"color",qn(()=>E?wy.text.primary:_.getContrastText(K))),ne(_.SpeedDialAction,"fabHoverBg",Ta(_.background.paper,.15)),ne(_.StepConnector,"border",H("palette-grey-600")),ne(_.StepContent,"border",H("palette-grey-600")),ne(_.Switch,"defaultColor",H("palette-grey-300")),ne(_.Switch,"defaultDisabledColor",H("palette-grey-600")),ne(_.Switch,"primaryDisabledColor",B(tt,_.primary.main,.55)),ne(_.Switch,"secondaryDisabledColor",B(tt,_.secondary.main,.55)),ne(_.Switch,"errorDisabledColor",B(tt,_.error.main,.55)),ne(_.Switch,"infoDisabledColor",B(tt,_.info.main,.55)),ne(_.Switch,"successDisabledColor",B(tt,_.success.main,.55)),ne(_.Switch,"warningDisabledColor",B(tt,_.warning.main,.55)),ne(_.TableCell,"border",B(tt,B(ri,_.divider,1),.68)),ne(_.Tooltip,"bg",B(ri,_.grey[700],.92))}fr(_.background,"default"),fr(_.background,"paper"),fr(_.common,"background"),fr(_.common,"onBackground"),fr(_,"divider"),Object.keys(_).forEach(K=>{const q=_[K];K!=="tonalOffset"&&q&&typeof q=="object"&&(q.main&&ne(_[K],"mainChannel",Ko(Qo(q.main))),q.light&&ne(_[K],"lightChannel",Ko(Qo(q.light))),q.dark&&ne(_[K],"darkChannel",Ko(Qo(q.dark))),q.contrastText&&ne(_[K],"contrastTextChannel",Ko(Qo(q.contrastText))),K==="text"&&(fr(_[K],"primary"),fr(_[K],"secondary")),K==="action"&&(q.active&&fr(_[K],"active"),q.selected&&fr(_[K],"selected")))})}),M=t.reduce((Z,_)=>bi(Z,_),M);const D={prefix:a,disableCssColorScheme:s,shouldSkipGeneratingVar:c,getSelector:sR(M),enableContrastVars:u},{vars:A,generateThemeVars:z,generateStyleSheets:J}=R_(M,D);return M.vars=A,Object.entries(M.colorSchemes[M.defaultColorScheme]).forEach(([Z,_])=>{M[Z]=_}),M.generateThemeVars=z,M.generateStyleSheets=J,M.generateSpacing=function(){return ly(h.spacing,df(this))},M.getColorSchemeSelector=D_(f),M.spacing=M.generateSpacing(),M.shouldSkipGeneratingVar=c,M.unstable_sxConfig={...ws,...h==null?void 0:h.unstable_sxConfig},M.unstable_sx=function(_){return Si({sx:_,theme:this})},M.toRuntimeSource=Sy,M}function um(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:gf({...n===!0?{}:n.palette,mode:t})})}function Ty(e={},...t){const{palette:n,cssVariables:i=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...u}=e,c=a||"light",f=s==null?void 0:s[c],p={...s,...n?{[c]:{...typeof f!="boolean"&&f,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in e))return kc(e,...t);let h=n;"palette"in e||p[c]&&(p[c]!==!0?h=p[c].palette:c==="dark"&&(h={mode:"dark"}));const x=kc({...e,palette:h},...t);return x.defaultColorScheme=c,x.colorSchemes=p,x.palette.mode==="light"&&(x.colorSchemes.light={...p.light!==!0&&p.light,palette:x.palette},um(x,"dark",p.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:x.palette},um(x,"light",p.light)),x}return!n&&!("light"in p)&&c==="light"&&(p.light=!0),cR({...u,colorSchemes:p,defaultColorScheme:c,...typeof i!="boolean"&&i},...t)}const Cy=Ty(),yf="$$material";function xs(){const e=cy(Cy);return process.env.NODE_ENV!=="production"&&oe.useDebugValue(e),e[yf]||e}function fR(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const _y=e=>fR(e)&&e!=="classes",Lt=d_({themeId:yf,defaultTheme:Cy,rootShouldForwardProp:_y}),Cn=O_;process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function xr(e){return E_(e)}function Qn(e,t,n="Mui"){const i={};return t.forEach(s=>{i[s]=Kn(e,s,n)}),i}function dR(e){return Kn("MuiSvgIcon",e)}Qn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pR=e=>{const{color:t,fontSize:n,classes:i}=e,s={root:["root",t!=="inherit"&&`color${fn(t)}`,`fontSize${fn(n)}`]};return jr(s,dR,i)},hR=Lt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${fn(n.color)}`],t[`fontSize${fn(n.fontSize)}`]]}})(Cn(({theme:e})=>{var t,n,i,s,a,u,c,f,p,h,x,R,w,C;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(i=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:i.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((f=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:f.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:h.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var v,g;return{props:{color:y},style:{color:(g=(v=(e.vars??e).palette)==null?void 0:v[y])==null?void 0:g.main}}}),{props:{color:"action"},style:{color:(R=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:R.active}},{props:{color:"disabled"},style:{color:(C=(w=(e.vars??e).palette)==null?void 0:w.action)==null?void 0:C.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Qa=oe.forwardRef(function(t,n){const i=xr({props:t,name:"MuiSvgIcon"}),{children:s,className:a,color:u="inherit",component:c="svg",fontSize:f="medium",htmlColor:p,inheritViewBox:h=!1,titleAccess:x,viewBox:R="0 0 24 24",...w}=i,C=oe.isValidElement(s)&&s.type==="svg",y={...i,color:u,component:c,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:R,hasSvgAsChild:C},v={};h||(v.viewBox=R);const g=pR(y);return F.jsxs(hR,{as:c,className:at(g.root,a),focusable:"false",color:p,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:n,...v,...w,...C&&s.props,ownerState:y,children:[C?s.props.children:s,x?F.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(Qa.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});Qa.muiName="SvgIcon";function jt(e,t){function n(i,s){return F.jsx(Qa,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:s,...i,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Qa.muiName,oe.memo(oe.forwardRef(n))}function mR(e,t){var n,i,s;return oe.isValidElement(e)&&t.indexOf(e.type.muiName??((s=(i=(n=e.type)==null?void 0:n._payload)==null?void 0:i.value)==null?void 0:s.muiName))!==-1}function lm(e){return e&&e.ownerDocument||document}function cm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const fs=typeof window<"u"?oe.useLayoutEffect:oe.useEffect;let fm=0;function gR(e){const[t,n]=oe.useState(e),i=e||t;return oe.useEffect(()=>{t==null&&(fm+=1,n(`mui-${fm}`))},[t]),i}const yR={...oe},dm=yR.useId;function vR(e){if(dm!==void 0){const t=dm();return e??t}return gR(e)}function Ry(e){const{controlled:t,default:n,name:i,state:s="value"}=e,{current:a}=oe.useRef(t!==void 0),[u,c]=oe.useState(n),f=a?t:u;if(process.env.NODE_ENV!=="production"){oe.useEffect(()=>{a!==(t!==void 0)&&console.error([`MUI: A component is changing the ${a?"":"un"}controlled ${s} state of ${i} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${i} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
122
122
|
`))},[s,i,t]);const{current:h}=oe.useRef(n);oe.useEffect(()=>{!a&&JSON.stringify(n)!==JSON.stringify(h)&&console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${i} after being initialized. To suppress this warning opt to use a controlled ${i}.`].join(`
|
|
123
|
-
`))},[JSON.stringify(n)])}const p=oe.useCallback(h=>{a||c(h)},[]);return[f,p]}function to(e){const t=oe.useRef(e);return fs(()=>{t.current=e}),oe.useRef((...n)=>(0,t.current)(...n)).current}function Fn(...e){const t=oe.useRef(void 0),n=oe.useCallback(i=>{const s=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const u=a,c=u(i);return typeof c=="function"?c:()=>{u(null)}}return a.current=i,()=>{a.current=null}});return()=>{s.forEach(a=>a==null?void 0:a())}},e);return oe.useMemo(()=>e.every(i=>i==null)?null:i=>{t.current&&(t.current(),t.current=void 0),i!=null&&(t.current=n(i))},e)}function bR(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function wR(e,t){if(!e)return t;function n(u,c){const f={};return Object.keys(c).forEach(p=>{bR(p,c[p])&&typeof u[p]=="function"&&(f[p]=(...h)=>{u[p](...h),c[p](...h)})}),f}if(typeof e=="function"||typeof t=="function")return u=>{const c=typeof t=="function"?t(u):t,f=typeof e=="function"?e({...u,...c}):e,p=at(u==null?void 0:u.className,c==null?void 0:c.className,f==null?void 0:f.className),h=n(f,c);return{...c,...f,...h,...!!p&&{className:p},...(c==null?void 0:c.style)&&(f==null?void 0:f.style)&&{style:{...c.style,...f.style}},...(c==null?void 0:c.sx)&&(f==null?void 0:f.sx)&&{sx:[...Array.isArray(c.sx)?c.sx:[c.sx],...Array.isArray(f.sx)?f.sx:[f.sx]]}}};const i=t,s=n(e,i),a=at(i==null?void 0:i.className,e==null?void 0:e.className);return{...t,...e,...s,...!!a&&{className:a},...(i==null?void 0:i.style)&&(e==null?void 0:e.style)&&{style:{...i.style,...e.style}},...(i==null?void 0:i.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const xR=jt(F.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),SR=()=>{const e=xs(),[t,n]=j.useState(null),{sectionOrder:i,setVisibleSections:s,recalculateNavigation:a}=gr(),{filterOptions:u,setFilterOptions:c}=Br(),f=j.useMemo(()=>({...u}),[u]);j.useEffect(()=>{const R={...u};let w=!1;i.forEach(g=>{u[g]===void 0&&(R[g]=g==="Courses",w=!0)});const C=w?R:u,y=gr.getState().visibleSections,v=JSON.stringify(y)!==JSON.stringify(C);(w||v)&&(w&&c(R),s(C))},[i,u,c,s]);const p=j.useCallback(R=>{R.preventDefault(),R.stopPropagation(),n(R.currentTarget)},[]),h=j.useCallback(()=>{n(null)},[]),x=j.useCallback((R,w)=>{R.preventDefault(),R.stopPropagation();const C={...u,[w]:!u[w]};c(C),s(C),a()},[u,c,s,a]);return Object.keys(f).length===0?null:F.jsxs(me.Box,{children:[F.jsx(me.Tooltip,{title:"Filter navigation sections",children:F.jsx(me.IconButton,{disabled:Object.keys(f).length===0,onClick:p,size:"small",children:F.jsx(xR,{htmlColor:Object.keys(f).length===0?e.palette.text.disabled:e.palette.text.primary})})}),F.jsx(me.Menu,{anchorEl:t,open:!!t,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:Object.keys(f).map(R=>F.jsxs(me.MenuItem,{onClick:w=>x(w,R),children:[F.jsx(me.Checkbox,{checked:f[R]}),F.jsx(me.ListItemText,{primary:R})]},R))})]})},ER=({sections:e})=>{const{addSection:t,recalculateNavigation:n}=gr(),i=j.useRef([]),s=j.useMemo(()=>e.map(a=>({underHeader:a.underHeader,pages:a.pages.map(u=>({segment:u.segment,title:u.title,Icon:u.Icon,instances:u.instances,description:u.description,microservices:u.microservices,actionFC:u.actionFC}))})),[e]);return j.useEffect(()=>()=>{},[]),j.useEffect(()=>{Pc.isEqual(i.current,s)||(s.forEach(a=>{t(a)}),n(),i.current=s)},[s,t,n]),null},OR=({heading:e,subheading:t})=>F.jsxs(F.Fragment,{children:[F.jsx(me.Typography,{variant:"h1",sx:{textAlign:"center",mt:5,color:"text.secondary"},children:e}),t&&F.jsx(me.Typography,{variant:"h4",sx:{textAlign:"center",mt:2,color:"text.secondary"},children:t})]});let pm=0,hm=0;const mm=500,gm=200,ym=5,TR=({direction:e,itemSize:t,itemsPerPage:n=1,itemCount:i})=>{const s=j.useRef(null),[a,u]=j.useState(!1),[c,f]=j.useState(!1),[p,h]=j.useState(!1),[x,R]=j.useState(!1),[w,C]=j.useState({pos:0,scroll:0}),[y,v]=j.useState(0),[g,m]=j.useState(1),S=j.useRef(null),E=j.useRef(null);j.useEffect(()=>{const q=s.current;if(!q)return;let X=null;const fe=()=>{const ue=s.current;if(!ue)return;const ye=e==="horizontal",pe=ye?ue.scrollLeft:ue.scrollTop,Oe=i??ue.children.length,Te=5;if(ye){const ve=Math.max(1,Math.round((ue.clientWidth+Te)/t)),ee=Math.max(1,Oe-ve+1),ce=Math.min(Math.floor(pe/t),ee-1);m(ee),v(ce),u(ce>0),f(ce<ee-1)}else{const ve=Math.max(1,Math.round((ue.clientHeight+Te)/t)),ee=Math.max(1,Oe-ve+1),ce=Math.min(Math.floor(pe/t),ee-1);m(ee),v(ce),u(ce>0),f(ce<ee-1)}},ae=()=>{X===null&&(X=setTimeout(()=>{X=null,fe()},100))},Y=new ResizeObserver(fe);Y.observe(q),q.addEventListener("scroll",ae);const $=new MutationObserver(fe);return $.observe(q,{childList:!0,subtree:!0}),requestAnimationFrame(()=>{requestAnimationFrame(fe)}),()=>{q.removeEventListener("scroll",ae),Y.disconnect(),$.disconnect(),X&&clearTimeout(X)}},[e,t,n,i]),j.useEffect(()=>{const q=s.current;if(!q||!i)return;const X=e==="horizontal"?q.scrollLeft:q.scrollTop,fe=Math.max(1,Math.ceil(i/n)),ae=Math.min(Math.floor(X/t),fe-1);m(fe),v(ae),u(ae>0),f(ae<fe-1)},[i,n,t,e]);const T=j.useCallback(()=>{const q=s.current;if(!q)return;const X=e==="horizontal",fe=X?q.scrollLeft:q.scrollTop,ae=Math.round(fe/t)*t;q.style.scrollBehavior="smooth",X?q.scrollLeft=ae:q.scrollTop=ae},[e,t]);j.useEffect(()=>{const q=X=>{X.preventDefault(),p&&(h(!1),T()),E.current&&(clearTimeout(E.current),E.current=null)};return window.addEventListener("mouseup",q),()=>window.removeEventListener("mouseup",q)},[p,T]);const M=q=>{const X=s.current;if(!X)return;const ae=(e==="horizontal"?X.scrollLeft:X.scrollTop)+(q?t:-t);X.style.scrollBehavior="smooth",e==="horizontal"?X.scrollLeft=ae:X.scrollTop=ae},D=q=>{M(q==="end")},A=q=>{if(!s.current)return;const X=q*t;s.current.style.scrollBehavior="smooth",e==="horizontal"?s.current.scrollLeft=X:s.current.scrollTop=X},z=q=>{q.preventDefault(),R(!1);const X=e==="horizontal"?q.pageX:q.pageY,fe=e==="horizontal"?s.current.scrollLeft:s.current.scrollTop;C({pos:X,scroll:fe}),S.current=null,s.current&&(s.current.style.scrollBehavior="auto"),E.current=window.setTimeout(()=>{h(!0),E.current=null},gm)},J=q=>{if(!s.current)return;if(q.buttons===0){h(!1),E.current&&(clearTimeout(E.current),E.current=null);return}const X=e==="horizontal"?q.pageX:q.pageY,fe=w.pos-X;if(Math.abs(fe)>ym){R(!0),p||(h(!0),E.current&&(clearTimeout(E.current),E.current=null));const ae=performance.now();if(e==="horizontal"){if(ae-hm<mm)return;pm=ae}else{if(ae-pm<mm)return;hm=ae}const Y=fe>0?"end":"start";Y!==S.current&&(S.current=Y,D(Y))}},Z=q=>{s.current&&(q.preventDefault(),h(!1),S.current=null,E.current&&(clearTimeout(E.current),E.current=null),T())},_=q=>{const X=q.touches[0],fe=e==="horizontal"?X.pageX:X.pageY,ae=e==="horizontal"?s.current.scrollLeft:s.current.scrollTop;R(!1),C({pos:fe,scroll:ae}),E.current=window.setTimeout(()=>{h(!0),E.current=null},gm)},H=q=>{if(!s.current)return;const X=q.touches[0],fe=e==="horizontal"?X.pageX:X.pageY,ae=w.pos-fe;Math.abs(ae)>ym&&(R(!0),p||(h(!0),E.current&&(clearTimeout(E.current),E.current=null)),q.preventDefault(),e==="horizontal"?s.current.scrollLeft=w.scroll+ae:s.current.scrollTop=w.scroll+ae)},B=()=>{h(!1),E.current&&(clearTimeout(E.current),E.current=null),s.current&&x&&T()},K=g>1;return{containerRef:s,showStartButton:a,showEndButton:c,isDragging:p,hasDragged:x,setHasDragged:R,scroll:D,handleMouseDown:z,handleMouseMove:J,handleMouseUp:Z,currentPage:y,totalPages:g,scrollToPage:A,disableStartButton:!a,disableEndButton:!c,handleTouchStart:_,handleTouchMove:H,handleTouchEnd:B,canScroll:K}},CR=jt(F.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),_R=jt(F.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),RR=jt(F.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),DR=jt(F.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),vm=({total:e,current:t,onDotClick:n,vertical:i=!1,onArrowClick:s,disableStart:a=!1,disableEnd:u=!1})=>{const c=Math.max(0,e);return c<=0?null:F.jsxs(me.Box,{"data-testid":"pagination-dots",sx:{width:"fit-content",display:"flex",alignItems:"center",borderRadius:1,...i?{flexDirection:"column"}:{flexDirection:"row"}},children:[F.jsx(me.IconButton,{size:"small",disabled:a,onClick:()=>!a&&(s==null?void 0:s("start")),sx:{p:.5,opacity:a?0:1,transition:"opacity 0.2s ease"},children:i?F.jsx(CR,{}):F.jsx(RR,{})}),F.jsx(me.Box,{sx:{display:"flex",flexDirection:i?"column":"row",gap:.5},children:Array.from({length:c}).map((f,p)=>F.jsx(me.Box,{onClick:h=>{h.stopPropagation(),n==null||n(p)},sx:{width:6,height:6,borderRadius:"50%",bgcolor:t===p?"primary.main":"action.disabled",transition:"all 0.2s ease",cursor:n?"pointer":"default","&:hover":n?{transform:"scale(1.2)",bgcolor:t===p?"primary.dark":"primary.light"}:{}}},p))}),F.jsx(me.IconButton,{size:"small",onClick:()=>!u&&(s==null?void 0:s("end")),disabled:u,sx:{p:.5,opacity:u?0:1,transition:"opacity 0.2s ease"},children:i?F.jsx(_R,{}):F.jsx(DR,{})})]})},Dy=j.createContext({itemCounts:{horizontal:1,vertical:1},setItemCounts:()=>{}}),My=({children:e})=>{const[t,n]=j.useState({horizontal:1,vertical:1});return F.jsx(Dy.Provider,{value:{itemCounts:t,setItemCounts:n},children:e})},Py=()=>{const e=j.useContext(Dy);if(!e)throw new Error("useResizeContext must be used within a ResizeProvider");return e},MR=25,pi=({direction:e,children:t,itemSize:n,containerSize:i="100%",hideScrollbar:s=!0,snapScroll:a=!0,title:u,priority:c})=>{const{itemCounts:f}=Py(),p=e==="vertical"?f.vertical:f.horizontal,{containerRef:h,showStartButton:x,showEndButton:R,isDragging:w,hasDragged:C,scroll:y,handleMouseDown:v,handleMouseMove:g,handleMouseUp:m,currentPage:S,totalPages:E,scrollToPage:T,disableStartButton:M,disableEndButton:D,handleTouchStart:A,handleTouchMove:z,handleTouchEnd:J,canScroll:Z,setHasDragged:_}=TR({direction:e,itemSize:n,itemsPerPage:p}),H=e==="vertical",B=()=>u?F.jsx(me.Typography,{variant:"h6",sx:{color:c==="high"?"primary.main":c==="low"?"text.secondary":"text.primary"},children:u}):null;let K={zIndex:1,padding:1,width:"100%",height:"100%",display:"flex",overflow:"hidden",position:"relative",flexDirection:H?"column":"row",cursor:w?"grabbing":"grab",touchAction:H?"pan-y":"pan-x",scrollSnapType:a?"x mandatory":"none",scrollbarWidth:s?"none":"auto",userSelect:"none",scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",msOverflowStyle:"none","&::-webkit-scrollbar":{display:s?"none":"auto"}};H&&(K={...K,"& > div":{scrollSnapAlign:a?"start":"none",minHeight:n,flex:"0 0 auto",height:n,willChange:"transform"}});const q={onMouseDown:v,onMouseMove:g,onMouseUp:m,onMouseLeave:m,onTouchStart:A,onTouchMove:z,onTouchEnd:J,onClickCapture:X=>{C&&(X.stopPropagation(),X.preventDefault(),_(!1))}};return F.jsxs(me.Box,{sx:{display:"flex",flexDirection:"column",height:i,width:"100%"},children:[B(),H?F.jsxs(me.Box,{sx:{display:"flex",flexDirection:"row",height:"100%"},children:[F.jsx(me.Box,{"data-testid":"reel-container",ref:h,sx:K,...q,children:t}),F.jsx(me.Box,{"data-testid":"pagination-dots-container",sx:{width:MR,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:F.jsx(vm,{total:E,current:S,onDotClick:T,onArrowClick:y,vertical:!0,showArrows:x||R,disableStart:M,disableEnd:D})})]}):F.jsxs(me.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[F.jsx(me.Box,{ref:h,sx:K,...q,children:j.Children.map(t,X=>F.jsx(me.Box,{"data-testid":"reel-item",sx:{width:n,scrollSnapAlign:"start",display:"flex",flexShrink:0},children:X}))}),F.jsx(vm,{total:E,current:S,onDotClick:T,onArrowClick:y,showArrows:Z,disableStart:M,disableEnd:D})]})]})},PR=me.keyframes`
|
|
123
|
+
`))},[JSON.stringify(n)])}const p=oe.useCallback(h=>{a||c(h)},[]);return[f,p]}function to(e){const t=oe.useRef(e);return fs(()=>{t.current=e}),oe.useRef((...n)=>(0,t.current)(...n)).current}function Fn(...e){const t=oe.useRef(void 0),n=oe.useCallback(i=>{const s=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const u=a,c=u(i);return typeof c=="function"?c:()=>{u(null)}}return a.current=i,()=>{a.current=null}});return()=>{s.forEach(a=>a==null?void 0:a())}},e);return oe.useMemo(()=>e.every(i=>i==null)?null:i=>{t.current&&(t.current(),t.current=void 0),i!=null&&(t.current=n(i))},e)}function bR(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function wR(e,t){if(!e)return t;function n(u,c){const f={};return Object.keys(c).forEach(p=>{bR(p,c[p])&&typeof u[p]=="function"&&(f[p]=(...h)=>{u[p](...h),c[p](...h)})}),f}if(typeof e=="function"||typeof t=="function")return u=>{const c=typeof t=="function"?t(u):t,f=typeof e=="function"?e({...u,...c}):e,p=at(u==null?void 0:u.className,c==null?void 0:c.className,f==null?void 0:f.className),h=n(f,c);return{...c,...f,...h,...!!p&&{className:p},...(c==null?void 0:c.style)&&(f==null?void 0:f.style)&&{style:{...c.style,...f.style}},...(c==null?void 0:c.sx)&&(f==null?void 0:f.sx)&&{sx:[...Array.isArray(c.sx)?c.sx:[c.sx],...Array.isArray(f.sx)?f.sx:[f.sx]]}}};const i=t,s=n(e,i),a=at(i==null?void 0:i.className,e==null?void 0:e.className);return{...t,...e,...s,...!!a&&{className:a},...(i==null?void 0:i.style)&&(e==null?void 0:e.style)&&{style:{...i.style,...e.style}},...(i==null?void 0:i.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const xR=jt(F.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),SR=()=>{const e=xs(),[t,n]=j.useState(null),{sectionOrder:i,setVisibleSections:s,recalculateNavigation:a}=gr(),{filterOptions:u,setFilterOptions:c}=Br(),f=j.useMemo(()=>({...u}),[u]);j.useEffect(()=>{const R={...u};let w=!1;i.forEach(g=>{u[g]===void 0&&(R[g]=g==="Courses",w=!0)});const C=w?R:u,y=gr.getState().visibleSections,v=JSON.stringify(y)!==JSON.stringify(C);(w||v)&&(w&&c(R),s(C))},[i,u,c,s]);const p=j.useCallback(R=>{R.preventDefault(),R.stopPropagation(),n(R.currentTarget)},[]),h=j.useCallback(()=>{n(null)},[]),x=j.useCallback((R,w)=>{R.preventDefault(),R.stopPropagation();const C={...u,[w]:!u[w]};c(C),s(C),a()},[u,c,s,a]);return Object.keys(f).length===0?null:F.jsxs(me.Box,{children:[F.jsx(me.Tooltip,{title:"Filter navigation sections",children:F.jsx(me.IconButton,{disabled:Object.keys(f).length===0,onClick:p,size:"small",children:F.jsx(xR,{htmlColor:Object.keys(f).length===0?e.palette.text.disabled:e.palette.text.primary})})}),F.jsx(me.Menu,{anchorEl:t,open:!!t,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:Object.keys(f).map(R=>F.jsxs(me.MenuItem,{onClick:w=>x(w,R),children:[F.jsx(me.Checkbox,{checked:f[R]}),F.jsx(me.ListItemText,{primary:R})]},R))})]})},ER=({sections:e})=>{const{addSection:t,recalculateNavigation:n}=gr(),i=j.useRef([]),s=j.useMemo(()=>e.map(a=>({underHeader:a.underHeader,keepVisible:a.keepVisible,pages:a.pages.map(u=>({segment:u.segment,title:u.title,Icon:u.Icon,instances:u.instances,description:u.description,microservices:u.microservices,actionFC:u.actionFC}))})),[e]);return j.useEffect(()=>()=>{},[]),j.useEffect(()=>{Pc.isEqual(i.current,s)||(s.forEach(a=>{t(a)}),n(),i.current=s)},[s]),null},OR=({heading:e,subheading:t})=>F.jsxs(F.Fragment,{children:[F.jsx(me.Typography,{variant:"h1",sx:{textAlign:"center",mt:5,color:"text.secondary"},children:e}),t&&F.jsx(me.Typography,{variant:"h4",sx:{textAlign:"center",mt:2,color:"text.secondary"},children:t})]});let pm=0,hm=0;const mm=500,gm=200,ym=5,TR=({direction:e,itemSize:t,itemsPerPage:n=1,itemCount:i})=>{const s=j.useRef(null),[a,u]=j.useState(!1),[c,f]=j.useState(!1),[p,h]=j.useState(!1),[x,R]=j.useState(!1),[w,C]=j.useState({pos:0,scroll:0}),[y,v]=j.useState(0),[g,m]=j.useState(1),S=j.useRef(null),E=j.useRef(null);j.useEffect(()=>{const q=s.current;if(!q)return;let X=null;const fe=()=>{const ue=s.current;if(!ue)return;const ye=e==="horizontal",pe=ye?ue.scrollLeft:ue.scrollTop,Oe=i??ue.children.length,Te=5;if(ye){const ve=Math.max(1,Math.round((ue.clientWidth+Te)/t)),ee=Math.max(1,Oe-ve+1),ce=Math.min(Math.floor(pe/t),ee-1);m(ee),v(ce),u(ce>0),f(ce<ee-1)}else{const ve=Math.max(1,Math.round((ue.clientHeight+Te)/t)),ee=Math.max(1,Oe-ve+1),ce=Math.min(Math.floor(pe/t),ee-1);m(ee),v(ce),u(ce>0),f(ce<ee-1)}},ae=()=>{X===null&&(X=setTimeout(()=>{X=null,fe()},100))},Y=new ResizeObserver(fe);Y.observe(q),q.addEventListener("scroll",ae);const $=new MutationObserver(fe);return $.observe(q,{childList:!0,subtree:!0}),requestAnimationFrame(()=>{requestAnimationFrame(fe)}),()=>{q.removeEventListener("scroll",ae),Y.disconnect(),$.disconnect(),X&&clearTimeout(X)}},[e,t,n,i]),j.useEffect(()=>{const q=s.current;if(!q||!i)return;const X=e==="horizontal"?q.scrollLeft:q.scrollTop,fe=Math.max(1,Math.ceil(i/n)),ae=Math.min(Math.floor(X/t),fe-1);m(fe),v(ae),u(ae>0),f(ae<fe-1)},[i,n,t,e]);const T=j.useCallback(()=>{const q=s.current;if(!q)return;const X=e==="horizontal",fe=X?q.scrollLeft:q.scrollTop,ae=Math.round(fe/t)*t;q.style.scrollBehavior="smooth",X?q.scrollLeft=ae:q.scrollTop=ae},[e,t]);j.useEffect(()=>{const q=X=>{X.preventDefault(),p&&(h(!1),T()),E.current&&(clearTimeout(E.current),E.current=null)};return window.addEventListener("mouseup",q),()=>window.removeEventListener("mouseup",q)},[p,T]);const M=q=>{const X=s.current;if(!X)return;const ae=(e==="horizontal"?X.scrollLeft:X.scrollTop)+(q?t:-t);X.style.scrollBehavior="smooth",e==="horizontal"?X.scrollLeft=ae:X.scrollTop=ae},D=q=>{M(q==="end")},A=q=>{if(!s.current)return;const X=q*t;s.current.style.scrollBehavior="smooth",e==="horizontal"?s.current.scrollLeft=X:s.current.scrollTop=X},z=q=>{q.preventDefault(),R(!1);const X=e==="horizontal"?q.pageX:q.pageY,fe=e==="horizontal"?s.current.scrollLeft:s.current.scrollTop;C({pos:X,scroll:fe}),S.current=null,s.current&&(s.current.style.scrollBehavior="auto"),E.current=window.setTimeout(()=>{h(!0),E.current=null},gm)},J=q=>{if(!s.current)return;if(q.buttons===0){h(!1),E.current&&(clearTimeout(E.current),E.current=null);return}const X=e==="horizontal"?q.pageX:q.pageY,fe=w.pos-X;if(Math.abs(fe)>ym){R(!0),p||(h(!0),E.current&&(clearTimeout(E.current),E.current=null));const ae=performance.now();if(e==="horizontal"){if(ae-hm<mm)return;pm=ae}else{if(ae-pm<mm)return;hm=ae}const Y=fe>0?"end":"start";Y!==S.current&&(S.current=Y,D(Y))}},Z=q=>{s.current&&(q.preventDefault(),h(!1),S.current=null,E.current&&(clearTimeout(E.current),E.current=null),T())},_=q=>{const X=q.touches[0],fe=e==="horizontal"?X.pageX:X.pageY,ae=e==="horizontal"?s.current.scrollLeft:s.current.scrollTop;R(!1),C({pos:fe,scroll:ae}),E.current=window.setTimeout(()=>{h(!0),E.current=null},gm)},H=q=>{if(!s.current)return;const X=q.touches[0],fe=e==="horizontal"?X.pageX:X.pageY,ae=w.pos-fe;Math.abs(ae)>ym&&(R(!0),p||(h(!0),E.current&&(clearTimeout(E.current),E.current=null)),q.preventDefault(),e==="horizontal"?s.current.scrollLeft=w.scroll+ae:s.current.scrollTop=w.scroll+ae)},B=()=>{h(!1),E.current&&(clearTimeout(E.current),E.current=null),s.current&&x&&T()},K=g>1;return{containerRef:s,showStartButton:a,showEndButton:c,isDragging:p,hasDragged:x,setHasDragged:R,scroll:D,handleMouseDown:z,handleMouseMove:J,handleMouseUp:Z,currentPage:y,totalPages:g,scrollToPage:A,disableStartButton:!a,disableEndButton:!c,handleTouchStart:_,handleTouchMove:H,handleTouchEnd:B,canScroll:K}},CR=jt(F.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),_R=jt(F.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),RR=jt(F.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),DR=jt(F.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),vm=({total:e,current:t,onDotClick:n,vertical:i=!1,onArrowClick:s,disableStart:a=!1,disableEnd:u=!1})=>{const c=Math.max(0,e);return c<=0?null:F.jsxs(me.Box,{"data-testid":"pagination-dots",sx:{width:"fit-content",display:"flex",alignItems:"center",borderRadius:1,...i?{flexDirection:"column"}:{flexDirection:"row"}},children:[F.jsx(me.IconButton,{size:"small",disabled:a,onClick:()=>!a&&(s==null?void 0:s("start")),sx:{p:.5,opacity:a?0:1,transition:"opacity 0.2s ease"},children:i?F.jsx(CR,{}):F.jsx(RR,{})}),F.jsx(me.Box,{sx:{display:"flex",flexDirection:i?"column":"row",gap:.5},children:Array.from({length:c}).map((f,p)=>F.jsx(me.Box,{onClick:h=>{h.stopPropagation(),n==null||n(p)},sx:{width:6,height:6,borderRadius:"50%",bgcolor:t===p?"primary.main":"action.disabled",transition:"all 0.2s ease",cursor:n?"pointer":"default","&:hover":n?{transform:"scale(1.2)",bgcolor:t===p?"primary.dark":"primary.light"}:{}}},p))}),F.jsx(me.IconButton,{size:"small",onClick:()=>!u&&(s==null?void 0:s("end")),disabled:u,sx:{p:.5,opacity:u?0:1,transition:"opacity 0.2s ease"},children:i?F.jsx(_R,{}):F.jsx(DR,{})})]})},Dy=j.createContext({itemCounts:{horizontal:1,vertical:1},setItemCounts:()=>{}}),My=({children:e})=>{const[t,n]=j.useState({horizontal:1,vertical:1});return F.jsx(Dy.Provider,{value:{itemCounts:t,setItemCounts:n},children:e})},Py=()=>{const e=j.useContext(Dy);if(!e)throw new Error("useResizeContext must be used within a ResizeProvider");return e},MR=25,pi=({direction:e,children:t,itemSize:n,containerSize:i="100%",hideScrollbar:s=!0,snapScroll:a=!0,title:u,priority:c})=>{const{itemCounts:f}=Py(),p=e==="vertical"?f.vertical:f.horizontal,{containerRef:h,showStartButton:x,showEndButton:R,isDragging:w,hasDragged:C,scroll:y,handleMouseDown:v,handleMouseMove:g,handleMouseUp:m,currentPage:S,totalPages:E,scrollToPage:T,disableStartButton:M,disableEndButton:D,handleTouchStart:A,handleTouchMove:z,handleTouchEnd:J,canScroll:Z,setHasDragged:_}=TR({direction:e,itemSize:n,itemsPerPage:p}),H=e==="vertical",B=()=>u?F.jsx(me.Typography,{variant:"h6",sx:{color:c==="high"?"primary.main":c==="low"?"text.secondary":"text.primary"},children:u}):null;let K={zIndex:1,padding:1,width:"100%",height:"100%",display:"flex",overflow:"hidden",position:"relative",flexDirection:H?"column":"row",cursor:w?"grabbing":"grab",touchAction:H?"pan-y":"pan-x",scrollSnapType:a?"x mandatory":"none",scrollbarWidth:s?"none":"auto",userSelect:"none",scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",msOverflowStyle:"none","&::-webkit-scrollbar":{display:s?"none":"auto"}};H&&(K={...K,"& > div":{scrollSnapAlign:a?"start":"none",minHeight:n,flex:"0 0 auto",height:n,willChange:"transform"}});const q={onMouseDown:v,onMouseMove:g,onMouseUp:m,onMouseLeave:m,onTouchStart:A,onTouchMove:z,onTouchEnd:J,onClickCapture:X=>{C&&(X.stopPropagation(),X.preventDefault(),_(!1))}};return F.jsxs(me.Box,{sx:{display:"flex",flexDirection:"column",height:i,width:"100%"},children:[B(),H?F.jsxs(me.Box,{sx:{display:"flex",flexDirection:"row",height:"100%"},children:[F.jsx(me.Box,{"data-testid":"reel-container",ref:h,sx:K,...q,children:t}),F.jsx(me.Box,{"data-testid":"pagination-dots-container",sx:{width:MR,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:F.jsx(vm,{total:E,current:S,onDotClick:T,onArrowClick:y,vertical:!0,showArrows:x||R,disableStart:M,disableEnd:D})})]}):F.jsxs(me.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[F.jsx(me.Box,{ref:h,sx:K,...q,children:j.Children.map(t,X=>F.jsx(me.Box,{"data-testid":"reel-item",sx:{width:n,scrollSnapAlign:"start",display:"flex",flexShrink:0},children:X}))}),F.jsx(vm,{total:E,current:S,onDotClick:T,onArrowClick:y,showArrows:Z,disableStart:M,disableEnd:D})]})]})},PR=me.keyframes`
|
|
124
124
|
0% { transform: scale(0.95); opacity: 0.5; }
|
|
125
125
|
50% { transform: scale(1.05); opacity: 0.8; }
|
|
126
126
|
100% { transform: scale(0.95); opacity: 0.5; }
|
|
@@ -216,4 +216,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
216
216
|
`))},[Y]));const tr={};w||(It.onTouchStart=_t,It.onTouchEnd=Et),x||(It.onMouseOver=Pa(te,It.onMouseOver),It.onMouseLeave=Pa(he,It.onMouseLeave),Oe||(tr.onMouseOver=te,tr.onMouseLeave=he)),h||(It.onFocus=Pa(_e,It.onFocus),It.onBlur=Pa(Ne,It.onBlur),Oe||(tr.onFocus=_e,tr.onBlur=Ne)),process.env.NODE_ENV!=="production"&&X.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${X.props.title}\` or the Tooltip component.`].join(`
|
|
217
217
|
`));const Pn={...i,isRtl:ae,arrow:s,disableInteractive:Oe,placement:A,PopperComponentProp:z,touch:pe.current},zt=typeof Z.popper=="function"?Z.popper(Pn):Z.popper,vo=oe.useMemo(()=>{var Qt,Ps;let $e=[{name:"arrow",enabled:!!ue,options:{element:ue,padding:4}}];return(Qt=J.popperOptions)!=null&&Qt.modifiers&&($e=$e.concat(J.popperOptions.modifiers)),(Ps=zt==null?void 0:zt.popperOptions)!=null&&Ps.modifiers&&($e=$e.concat(zt.popperOptions.modifiers)),{...J.popperOptions,...zt==null?void 0:zt.popperOptions,modifiers:$e}},[ue,J.popperOptions,zt==null?void 0:zt.popperOptions]),Gr=_P(Pn),bo=typeof Z.transition=="function"?Z.transition(Pn):Z.transition,Ti={slots:{popper:c.Popper,transition:c.Transition??B,tooltip:c.Tooltip,arrow:c.Arrow,..._},slotProps:{arrow:Z.arrow??f.arrow,popper:{...J,...zt??f.popper},tooltip:Z.tooltip??f.tooltip,transition:{...K,...bo??f.transition}}},[ju,Hu]=Zn("popper",{elementType:RP,externalForwardedProps:Ti,ownerState:Pn,className:at(Gr.popper,J==null?void 0:J.className)}),[Ds,Ms]=Zn("transition",{elementType:iu,externalForwardedProps:Ti,ownerState:Pn}),[qu,Vu]=Zn("tooltip",{elementType:DP,className:Gr.tooltip,externalForwardedProps:Ti,ownerState:Pn}),[Gu,Yu]=Zn("arrow",{elementType:MP,className:Gr.arrow,externalForwardedProps:Ti,ownerState:Pn,ref:ye});return F.jsxs(oe.Fragment,{children:[oe.cloneElement(X,It),F.jsx(ju,{as:z??Mf,placement:A,anchorEl:g?{getBoundingClientRect:()=>({top:Wo.y,left:Wo.x,right:Wo.x,bottom:Wo.y,width:0,height:0})}:Y,popperRef:Pt,open:Y?N:!1,id:W,transition:!0,...tr,...Hu,popperOptions:vo,children:({TransitionProps:$e})=>F.jsx(Ds,{timeout:fe.transitions.duration.shorter,...$e,...Ms,children:F.jsxs(qu,{...Vu,children:[H,s?F.jsx(Gu,{...Yu}):null]})})})]})});process.env.NODE_ENV!=="production"&&(pv.propTypes={arrow:b.bool,children:Pu.isRequired,classes:b.object,className:b.string,components:b.shape({Arrow:b.elementType,Popper:b.elementType,Tooltip:b.elementType,Transition:b.elementType}),componentsProps:b.shape({arrow:b.object,popper:b.object,tooltip:b.object,transition:b.object}),describeChild:b.bool,disableFocusListener:b.bool,disableHoverListener:b.bool,disableInteractive:b.bool,disableTouchListener:b.bool,enterDelay:b.number,enterNextDelay:b.number,enterTouchDelay:b.number,followCursor:b.bool,id:b.string,leaveDelay:b.number,leaveTouchDelay:b.number,onClose:b.func,onOpen:b.func,open:b.bool,placement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:b.elementType,PopperProps:b.object,slotProps:b.shape({arrow:b.oneOfType([b.func,b.object]),popper:b.oneOfType([b.func,b.object]),tooltip:b.oneOfType([b.func,b.object]),transition:b.oneOfType([b.func,b.object])}),slots:b.shape({arrow:b.elementType,popper:b.elementType,tooltip:b.elementType,transition:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),title:b.node,TransitionComponent:b.elementType,TransitionProps:b.object});function PP(e){return Kn("MuiSpeedDialAction",e)}const Ia=Qn("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]),IP=e=>{const{open:t,tooltipPlacement:n,classes:i}=e,s={fab:["fab",!t&&"fabClosed"],staticTooltip:["staticTooltip",`tooltipPlacement${fn(n)}`,!t&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return jr(s,PP,i)},NP=Lt(xf,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.fab,!n.open&&t.fabClosed]}})(Cn(({theme:e})=>({margin:8,color:(e.vars||e).palette.text.secondary,backgroundColor:(e.vars||e).palette.background.paper,"&:hover":{backgroundColor:e.vars?e.vars.palette.SpeedDialAction.fabHoverBg:gy(e.palette.background.paper,.15)},transition:`${e.transitions.create("transform",{duration:e.transitions.duration.shorter})}, opacity 0.8s`,opacity:1,variants:[{props:({ownerState:t})=>!t.open,style:{opacity:0,transform:"scale(0)"}}]}))),AP=Lt("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.staticTooltip,!n.open&&t.staticTooltipClosed,t[`tooltipPlacement${fn(n.tooltipPlacement)}`]]}})(Cn(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",[`& .${Ia.staticTooltipLabel}`]:{transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.shorter}),opacity:1},variants:[{props:({ownerState:t})=>!t.open,style:{[`& .${Ia.staticTooltipLabel}`]:{opacity:0,transform:"scale(0.5)"}}},{props:{tooltipPlacement:"left"},style:{[`& .${Ia.staticTooltipLabel}`]:{transformOrigin:"100% 50%",right:"100%",marginRight:8}}},{props:{tooltipPlacement:"right"},style:{[`& .${Ia.staticTooltipLabel}`]:{transformOrigin:"0% 50%",left:"100%",marginLeft:8}}}]}))),kP=Lt("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel"})(Cn(({theme:e})=>({position:"absolute",...e.typography.body1,backgroundColor:(e.vars||e).palette.background.paper,borderRadius:(e.vars||e).shape.borderRadius,boxShadow:(e.vars||e).shadows[1],color:(e.vars||e).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"}))),hv=oe.forwardRef(function(t,n){var fe;const i=xr({props:t,name:"MuiSpeedDialAction"}),{className:s,delay:a=0,FabProps:u={},icon:c,id:f,open:p,TooltipClasses:h,tooltipOpen:x=!1,tooltipPlacement:R="left",tooltipTitle:w,slots:C={},slotProps:y={},...v}=i,g={...i,tooltipPlacement:R},m=IP(g),S={slots:C,slotProps:{fab:u,...y,tooltip:wR(typeof y.tooltip=="function"?y.tooltip(g):y.tooltip,{title:w,open:x,placement:R,classes:h})}},[E,T]=oe.useState((fe=S.slotProps.tooltip)==null?void 0:fe.open),M=()=>{T(!1)},D=()=>{T(!0)},A={transitionDelay:`${a}ms`},[z,J]=Zn("fab",{elementType:NP,externalForwardedProps:S,ownerState:g,shouldForwardComponentProp:!0,className:at(m.fab,s),additionalProps:{style:A,tabIndex:-1,role:"menuitem",size:"small"}}),[Z,_]=Zn("tooltip",{elementType:pv,externalForwardedProps:S,shouldForwardComponentProp:!0,ref:n,additionalProps:{id:f},ownerState:g,getSlotProps:ae=>({...ae,onClose:Y=>{var $;($=ae.onClose)==null||$.call(ae,Y),M()},onOpen:Y=>{var $;($=ae.onOpen)==null||$.call(ae,Y),D()}})}),[H,B]=Zn("staticTooltip",{elementType:AP,externalForwardedProps:S,ownerState:g,ref:n,className:m.staticTooltip,additionalProps:{id:f}}),[K,q]=Zn("staticTooltipLabel",{elementType:kP,externalForwardedProps:S,ownerState:g,className:m.staticTooltipLabel,additionalProps:{style:A,id:`${f}-label`}}),X=F.jsx(z,{...J,children:c});return _.open?F.jsxs(H,{...B,...v,children:[F.jsx(K,{...q,children:_.title}),oe.cloneElement(X,{"aria-labelledby":`${f}-label`})]}):(!p&&E&&T(!1),F.jsx(Z,{..._,title:_.title,open:p&&E,placement:_.placement,classes:_.classes,...v,children:X}))});process.env.NODE_ENV!=="production"&&(hv.propTypes={classes:b.object,className:b.string,delay:b.number,FabProps:b.object,icon:b.node,id:b.string,open:b.bool,slotProps:b.shape({fab:b.oneOfType([b.func,b.object]),staticTooltip:b.oneOfType([b.func,b.object]),staticTooltipLabel:b.oneOfType([b.func,b.object]),tooltip:b.oneOfType([b.func,b.object])}),slots:b.shape({fab:b.elementType,staticTooltip:b.elementType,staticTooltipLabel:b.elementType,tooltip:b.elementType}),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),TooltipClasses:b.object,tooltipOpen:b.bool,tooltipPlacement:b.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),tooltipTitle:b.node});const $P=Qn("MuiBox",["root"]),LP=Ty(),mv=a_({themeId:yf,defaultTheme:LP,defaultClassName:$P.root,generateClassName:ty.generate});process.env.NODE_ENV!=="production"&&(mv.propTypes={children:b.node,component:b.elementType,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});const zP=({actions:e,value:t,direction:n="down",onChange:i,icons:s,openIcon:a,size:u=40})=>{const[c,f]=j.useState(!1),p=me.useTheme();return F.jsx(mv,{sx:{position:"relative",width:u,height:u},children:F.jsx(nv,{"data-testid":"speed-dial",ariaLabel:"Options",direction:n,onOpen:()=>f(!0),onClose:()=>f(!1),open:c,icon:F.jsx(Sf,{icon:s[t],openIcon:a}),FabProps:{sx:{zIndex:10,border:"none",backgroundColor:"transparent",boxShadow:"none",color:p.palette.text.primary,width:u,height:u,"&:hover":{zIndex:100,backgroundColor:"transparent",color:"transparent"}}},sx:{zIndex:10,position:"absolute",top:0,right:0,boxShadow:"none","& .MuiSpeedDial-actions":{backgroundColor:c?p.palette.background.paper:"transparent",boxShadow:"none",borderRadius:1,padding:0},"& .MuiSpeedDial-fab":{width:u,height:u,boxShadow:"none",border:"none"}},children:e.map(h=>F.jsx(hv,{icon:h.icon,tooltipTitle:h.name,onClick:()=>{i(h.value),f(!1)},FabProps:{sx:{backgroundColor:p.palette.background.paper,boxShadow:"none",color:p.palette.text.primary,width:u-4,height:u-4,"&:hover":{backgroundColor:p.palette.action.hover}}}},h.name))})})},gv=j.createContext(void 0),FP=()=>{const e=j.useContext(gv);if(!e)throw new Error("useGridItemContext must be used within a GridItemProvider");return e},WP=({children:e})=>{const[t,n]=j.useState([]),i=j.useCallback((f,p,h)=>{n(x=>{const R=x.findIndex(C=>C.id===f),w={id:f,content:p,layout:h};if(R>=0){const C=[...x];return C[R]=w,C}else return[...x,w]})},[]),s=j.useCallback(f=>{n(p=>p.filter(h=>h.id!==f))},[]),a=j.useCallback(f=>t.find(p=>p.id===f),[t]),u=j.useCallback(()=>t,[t]),c={gridItems:t,registerGridItem:i,unregisterGridItem:s,getGridItem:a,getAllGridItems:u};return F.jsx(gv.Provider,{value:c,children:e})};function BP(e){const{id:t=`grid-item-${Math.random().toString(36).substr(2,9)}`,x:n=0,y:i=0,w:s=1,h:a=1,minW:u=1,maxW:c=null,minH:f=1,maxH:p=null,static:h=!1}=e;return{i:t,x:n,y:i,w:s??12,h:a??1,minW:u,maxW:c??void 0,minH:f,maxH:p??void 0,static:h}}const Pf=()=>{const{editMode:e,toggleEditMode:t}=fo();return{editMode:e,toggleEditMode:t}},UP=({children:e,id:t,isFlexContainer:n=!1})=>{const i=me.useTheme(),{editMode:s}=Pf();return F.jsx(me.Box,{"data-grid-item-id":t,sx:{bgcolor:i.palette.background.paper,borderRadius:1,boxShadow:1,overflow:"hidden",p:1,height:"100%",display:n?"flex":"block",flexDirection:n?"column":"initial",outline:s?`2px dashed ${i.palette.primary.main}`:"none",transition:"outline 0.2s ease-in-out",position:"relative","&:hover":{outline:s?`2px solid ${i.palette.primary.main}`:"none"}},children:e})};var vc={exports:{}},Bo={},ts={exports:{}},jP=ts.exports,Am;function If(){return Am||(Am=1,function(e,t){(function(n,i){i(t)})(jP,function(n){function i(ee){return function(Ee,Re,N,W,G,le,be){return ee(Ee,Re,be)}}function s(ee){return function(Ee,Re,N,W){if(!Ee||!Re||typeof Ee!="object"||typeof Re!="object")return ee(Ee,Re,N,W);var G=W.get(Ee),le=W.get(Re);if(G&&le)return G===Re&&le===Ee;W.set(Ee,Re),W.set(Re,Ee);var be=ee(Ee,Re,N,W);return W.delete(Ee),W.delete(Re),be}}function a(ee,ce){var Ee={};for(var Re in ee)Ee[Re]=ee[Re];for(var Re in ce)Ee[Re]=ce[Re];return Ee}function u(ee){return ee.constructor===Object||ee.constructor==null}function c(ee){return typeof ee.then=="function"}function f(ee,ce){return ee===ce||ee!==ee&&ce!==ce}var p="[object Arguments]",h="[object Boolean]",x="[object Date]",R="[object RegExp]",w="[object Map]",C="[object Number]",y="[object Object]",v="[object Set]",g="[object String]",m=Object.prototype.toString;function S(ee){var ce=ee.areArraysEqual,Ee=ee.areDatesEqual,Re=ee.areMapsEqual,N=ee.areObjectsEqual,W=ee.areRegExpsEqual,G=ee.areSetsEqual,le=ee.createIsNestedEqual,be=le(ge);function ge(te,he,we){if(te===he)return!0;if(!te||!he||typeof te!="object"||typeof he!="object")return te!==te&&he!==he;if(u(te)&&u(he))return N(te,he,be,we);var Ne=Array.isArray(te),_e=Array.isArray(he);if(Ne||_e)return Ne===_e&&ce(te,he,be,we);var Ve=m.call(te);return Ve!==m.call(he)?!1:Ve===x?Ee(te,he,be,we):Ve===R?W(te,he,be,we):Ve===w?Re(te,he,be,we):Ve===v?G(te,he,be,we):Ve===y||Ve===p?c(te)||c(he)?!1:N(te,he,be,we):Ve===h||Ve===C||Ve===g?f(te.valueOf(),he.valueOf()):!1}return ge}function E(ee,ce,Ee,Re){var N=ee.length;if(ce.length!==N)return!1;for(;N-- >0;)if(!Ee(ee[N],ce[N],N,N,ee,ce,Re))return!1;return!0}var T=s(E);function M(ee,ce){return f(ee.valueOf(),ce.valueOf())}function D(ee,ce,Ee,Re){var N=ee.size===ce.size;if(!N)return!1;if(!ee.size)return!0;var W={},G=0;return ee.forEach(function(le,be){if(N){var ge=!1,te=0;ce.forEach(function(he,we){!ge&&!W[te]&&(ge=Ee(be,we,G,te,ee,ce,Re)&&Ee(le,he,be,we,ee,ce,Re))&&(W[te]=!0),te++}),G++,N=ge}}),N}var A=s(D),z="_owner",J=Object.prototype.hasOwnProperty;function Z(ee,ce,Ee,Re){var N=Object.keys(ee),W=N.length;if(Object.keys(ce).length!==W)return!1;for(var G;W-- >0;){if(G=N[W],G===z){var le=!!ee.$$typeof,be=!!ce.$$typeof;if((le||be)&&le!==be)return!1}if(!J.call(ce,G)||!Ee(ee[G],ce[G],G,G,ee,ce,Re))return!1}return!0}var _=s(Z);function H(ee,ce){return ee.source===ce.source&&ee.flags===ce.flags}function B(ee,ce,Ee,Re){var N=ee.size===ce.size;if(!N)return!1;if(!ee.size)return!0;var W={};return ee.forEach(function(G,le){if(N){var be=!1,ge=0;ce.forEach(function(te,he){!be&&!W[ge]&&(be=Ee(G,te,le,he,ee,ce,Re))&&(W[ge]=!0),ge++}),N=be}}),N}var K=s(B),q=Object.freeze({areArraysEqual:E,areDatesEqual:M,areMapsEqual:D,areObjectsEqual:Z,areRegExpsEqual:H,areSetsEqual:B,createIsNestedEqual:i}),X=Object.freeze({areArraysEqual:T,areDatesEqual:M,areMapsEqual:A,areObjectsEqual:_,areRegExpsEqual:H,areSetsEqual:K,createIsNestedEqual:i}),fe=S(q);function ae(ee,ce){return fe(ee,ce,void 0)}var Y=S(a(q,{createIsNestedEqual:function(){return f}}));function $(ee,ce){return Y(ee,ce,void 0)}var ue=S(X);function ye(ee,ce){return ue(ee,ce,new WeakMap)}var pe=S(a(X,{createIsNestedEqual:function(){return f}}));function Oe(ee,ce){return pe(ee,ce,new WeakMap)}function Te(ee){return S(a(q,ee(q)))}function ve(ee){var ce=S(a(X,ee(X)));return function(Ee,Re,N){return N===void 0&&(N=new WeakMap),ce(Ee,Re,N)}}n.circularDeepEqual=ye,n.circularShallowEqual=Oe,n.createCustomCircularEqual=ve,n.createCustomEqual=Te,n.deepEqual=ae,n.sameValueZeroEqual=f,n.shallowEqual=$,Object.defineProperty(n,"__esModule",{value:!0})})}(ts,ts.exports)),ts.exports}var Na={exports:{}},km;function Nf(){if(km)return Na.exports;km=1;function e(n){var i,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(i=0;i<u;i++)n[i]&&(s=e(n[i]))&&(a&&(a+=" "),a+=s)}else for(s in n)n[s]&&(a&&(a+=" "),a+=s);return a}function t(){for(var n,i,s=0,a="",u=arguments.length;s<u;s++)(n=arguments[s])&&(i=e(n))&&(a&&(a+=" "),a+=i);return a}return Na.exports=t,Na.exports.clsx=t,Na.exports}var qe={},bc,$m;function HP(){return $m||($m=1,bc=function(t,n,i){return t===n?!0:t.className===n.className&&i(t.style,n.style)&&t.width===n.width&&t.autoSize===n.autoSize&&t.cols===n.cols&&t.draggableCancel===n.draggableCancel&&t.draggableHandle===n.draggableHandle&&i(t.verticalCompact,n.verticalCompact)&&i(t.compactType,n.compactType)&&i(t.layout,n.layout)&&i(t.margin,n.margin)&&i(t.containerPadding,n.containerPadding)&&t.rowHeight===n.rowHeight&&t.maxRows===n.maxRows&&t.isBounded===n.isBounded&&t.isDraggable===n.isDraggable&&t.isResizable===n.isResizable&&t.allowOverlap===n.allowOverlap&&t.preventCollision===n.preventCollision&&t.useCSSTransforms===n.useCSSTransforms&&t.transformScale===n.transformScale&&t.isDroppable===n.isDroppable&&i(t.resizeHandles,n.resizeHandles)&&i(t.resizeHandle,n.resizeHandle)&&t.onLayoutChange===n.onLayoutChange&&t.onDragStart===n.onDragStart&&t.onDrag===n.onDrag&&t.onDragStop===n.onDragStop&&t.onResizeStart===n.onResizeStart&&t.onResize===n.onResize&&t.onResizeStop===n.onResizeStop&&t.onDrop===n.onDrop&&i(t.droppingItem,n.droppingItem)&&i(t.innerRef,n.innerRef)}),bc}var Lm;function po(){if(Lm)return qe;Lm=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.bottom=s,qe.childrenEqual=p,qe.cloneLayout=a,qe.cloneLayoutItem=f,qe.collides=x,qe.compact=R,qe.compactItem=y,qe.compactType=ce,qe.correctBounds=v,qe.fastPositionEqual=h,qe.fastRGLPropsEqual=void 0,qe.getAllCollisions=S,qe.getFirstCollision=m,qe.getLayoutItem=g,qe.getStatics=E,qe.modifyLayout=u,qe.moveElement=T,qe.moveElementAwayFromCollision=M,qe.noop=void 0,qe.perc=D,qe.resizeItemInDirection=$,qe.setTopLeft=ye,qe.setTransform=ue,qe.sortLayoutItems=pe,qe.sortLayoutItemsByColRow=Te,qe.sortLayoutItemsByRowCol=Oe,qe.synchronizeLayoutWithChildren=ve,qe.validateLayout=ee,qe.withLayoutItem=c;var e=If(),t=n(j);function n(N){return N&&N.__esModule?N:{default:N}}const i=process.env.NODE_ENV==="production";function s(N){let W=0,G;for(let le=0,be=N.length;le<be;le++)G=N[le].y+N[le].h,G>W&&(W=G);return W}function a(N){const W=Array(N.length);for(let G=0,le=N.length;G<le;G++)W[G]=f(N[G]);return W}function u(N,W){const G=Array(N.length);for(let le=0,be=N.length;le<be;le++)W.i===N[le].i?G[le]=W:G[le]=N[le];return G}function c(N,W,G){let le=g(N,W);return le?(le=G(f(le)),N=u(N,le),[N,le]):[N,null]}function f(N){return{w:N.w,h:N.h,x:N.x,y:N.y,i:N.i,minW:N.minW,maxW:N.maxW,minH:N.minH,maxH:N.maxH,moved:!!N.moved,static:!!N.static,isDraggable:N.isDraggable,isResizable:N.isResizable,resizeHandles:N.resizeHandles,isBounded:N.isBounded}}function p(N,W){return(0,e.deepEqual)(t.default.Children.map(N,G=>G==null?void 0:G.key),t.default.Children.map(W,G=>G==null?void 0:G.key))&&(0,e.deepEqual)(t.default.Children.map(N,G=>G==null?void 0:G.props["data-grid"]),t.default.Children.map(W,G=>G==null?void 0:G.props["data-grid"]))}qe.fastRGLPropsEqual=HP();function h(N,W){return N.left===W.left&&N.top===W.top&&N.width===W.width&&N.height===W.height}function x(N,W){return!(N.i===W.i||N.x+N.w<=W.x||N.x>=W.x+W.w||N.y+N.h<=W.y||N.y>=W.y+W.h)}function R(N,W,G,le){const be=E(N),ge=pe(N,W),te=Array(N.length);for(let he=0,we=ge.length;he<we;he++){let Ne=f(ge[he]);Ne.static||(Ne=y(be,Ne,W,G,ge,le),be.push(Ne)),te[N.indexOf(ge[he])]=Ne,Ne.moved=!1}return te}const w={x:"w",y:"h"};function C(N,W,G,le){const be=w[le];W[le]+=1;const ge=N.map(te=>te.i).indexOf(W.i);for(let te=ge+1;te<N.length;te++){const he=N[te];if(!he.static){if(he.y>W.y+W.h)break;x(W,he)&&C(N,he,G+W[be],le)}}W[le]=G}function y(N,W,G,le,be,ge){const te=G==="vertical",he=G==="horizontal";if(te)for(W.y=Math.min(s(N),W.y);W.y>0&&!m(N,W);)W.y--;else if(he)for(;W.x>0&&!m(N,W);)W.x--;let we;for(;(we=m(N,W))&&!(G===null&&ge);)if(he?C(be,W,we.x+we.w,"x"):C(be,W,we.y+we.h,"y"),he&&W.x+W.w>le)for(W.x=le-W.w,W.y++;W.x>0&&!m(N,W);)W.x--;return W.y=Math.max(W.y,0),W.x=Math.max(W.x,0),W}function v(N,W){const G=E(N);for(let le=0,be=N.length;le<be;le++){const ge=N[le];if(ge.x+ge.w>W.cols&&(ge.x=W.cols-ge.w),ge.x<0&&(ge.x=0,ge.w=W.cols),!ge.static)G.push(ge);else for(;m(G,ge);)ge.y++}return N}function g(N,W){for(let G=0,le=N.length;G<le;G++)if(N[G].i===W)return N[G]}function m(N,W){for(let G=0,le=N.length;G<le;G++)if(x(N[G],W))return N[G]}function S(N,W){return N.filter(G=>x(G,W))}function E(N){return N.filter(W=>W.static)}function T(N,W,G,le,be,ge,te,he,we){if(W.static&&W.isDraggable!==!0||W.y===le&&W.x===G)return N;`${W.i}${String(G)}${String(le)}${W.x}${W.y}`;const Ne=W.x,_e=W.y;typeof G=="number"&&(W.x=G),typeof le=="number"&&(W.y=le),W.moved=!0;let Ve=pe(N,te);(te==="vertical"&&typeof le=="number"?_e>=le:te==="horizontal"&&typeof G=="number"?Ne>=G:!1)&&(Ve=Ve.reverse());const Et=S(Ve,W),Jt=Et.length>0;if(Jt&&we)return a(N);if(Jt&&ge)return`${W.i}`,W.x=Ne,W.y=_e,W.moved=!1,N;for(let Pt=0,Kt=Et.length;Pt<Kt;Pt++){const Rt=Et[Pt];`${W.i}${W.x}${W.y}${Rt.i}${Rt.x}${Rt.y}`,!Rt.moved&&(Rt.static?N=M(N,Rt,W,be,te):N=M(N,W,Rt,be,te))}return N}function M(N,W,G,le,be,ge){const te=be==="horizontal",he=be==="vertical",we=W.static;if(le){le=!1;const Ve={x:te?Math.max(W.x-G.w,0):G.x,y:he?Math.max(W.y-G.h,0):G.y,w:G.w,h:G.h,i:"-1"},_t=m(N,Ve),Et=_t&&_t.y+_t.h>W.y,Jt=_t&&W.x+W.w>_t.x;if(_t){if(Et&&he)return T(N,G,void 0,W.y+1,le,we,be);if(Et&&be==null)return W.y=G.y,G.y=G.y+G.h,N;if(Jt&&te)return T(N,W,G.x,void 0,le,we,be)}else return`${G.i}${Ve.x}${Ve.y}`,T(N,G,te?Ve.x:void 0,he?Ve.y:void 0,le,we,be)}const Ne=te?G.x+1:void 0,_e=he?G.y+1:void 0;return Ne==null&&_e==null?N:T(N,G,te?G.x+1:void 0,he?G.y+1:void 0,le,we,be)}function D(N){return N*100+"%"}const A=(N,W,G,le)=>N+G>le?W:G,z=(N,W,G)=>N<0?W:G,J=N=>Math.max(0,N),Z=N=>Math.max(0,N),_=(N,W,G)=>{let{left:le,height:be,width:ge}=W;const te=N.top-(be-N.height);return{left:le,width:ge,height:z(te,N.height,be),top:Z(te)}},H=(N,W,G)=>{let{top:le,left:be,height:ge,width:te}=W;return{top:le,height:ge,width:A(N.left,N.width,te,G),left:J(be)}},B=(N,W,G)=>{let{top:le,height:be,width:ge}=W;const te=N.left-(ge-N.width);return{height:be,width:te<0?N.width:A(N.left,N.width,ge,G),top:Z(le),left:J(te)}},K=(N,W,G)=>{let{top:le,left:be,height:ge,width:te}=W;return{width:te,left:be,height:z(le,N.height,ge),top:Z(le)}},Y={n:_,ne:function(){return _(arguments.length<=0?void 0:arguments[0],H(...arguments))},e:H,se:function(){return K(arguments.length<=0?void 0:arguments[0],H(...arguments))},s:K,sw:function(){return K(arguments.length<=0?void 0:arguments[0],B(...arguments))},w:B,nw:function(){return _(arguments.length<=0?void 0:arguments[0],B(...arguments))}};function $(N,W,G,le){const be=Y[N];return be?be(W,{...W,...G},le):G}function ue(N){let{top:W,left:G,width:le,height:be}=N;const ge=`translate(${G}px,${W}px)`;return{transform:ge,WebkitTransform:ge,MozTransform:ge,msTransform:ge,OTransform:ge,width:`${le}px`,height:`${be}px`,position:"absolute"}}function ye(N){let{top:W,left:G,width:le,height:be}=N;return{top:`${W}px`,left:`${G}px`,width:`${le}px`,height:`${be}px`,position:"absolute"}}function pe(N,W){return W==="horizontal"?Te(N):W==="vertical"?Oe(N):N}function Oe(N){return N.slice(0).sort(function(W,G){return W.y>G.y||W.y===G.y&&W.x>G.x?1:W.y===G.y&&W.x===G.x?0:-1})}function Te(N){return N.slice(0).sort(function(W,G){return W.x>G.x||W.x===G.x&&W.y>G.y?1:-1})}function ve(N,W,G,le,be){N=N||[];const ge=[];t.default.Children.forEach(W,he=>{if((he==null?void 0:he.key)==null)return;const we=g(N,String(he.key)),Ne=he.props["data-grid"];we&&Ne==null?ge.push(f(we)):Ne?(i||ee([Ne],"ReactGridLayout.children"),ge.push(f({...Ne,i:he.key}))):ge.push(f({w:1,h:1,x:0,y:s(ge),i:String(he.key)}))});const te=v(ge,{cols:G});return be?te:R(te,le,G)}function ee(N){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const G=["x","y","w","h"];if(!Array.isArray(N))throw new Error(W+" must be an array!");for(let le=0,be=N.length;le<be;le++){const ge=N[le];for(let te=0;te<G.length;te++){const he=G[te],we=ge[he];if(typeof we!="number"||Number.isNaN(we))throw new Error(`ReactGridLayout: ${W}[${le}].${he} must be a number! Received: ${we} (${typeof we})`)}if(typeof ge.i<"u"&&typeof ge.i!="string")throw new Error(`ReactGridLayout: ${W}[${le}].i must be a string! Received: ${ge.i} (${typeof ge.i})`)}}function ce(N){const{verticalCompact:W,compactType:G}=N||{};return W===!1?null:G}function Ee(){}const Re=()=>{};return qe.noop=Re,qe}var pr={},zm;function Af(){if(zm)return pr;zm=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.calcGridColWidth=e,pr.calcGridItemPosition=n,pr.calcGridItemWHPx=t,pr.calcWH=s,pr.calcXY=i,pr.clamp=a;function e(u){const{margin:c,containerPadding:f,containerWidth:p,cols:h}=u;return(p-c[0]*(h-1)-f[0]*2)/h}function t(u,c,f){return Number.isFinite(u)?Math.round(c*u+Math.max(0,u-1)*f):u}function n(u,c,f,p,h,x){const{margin:R,containerPadding:w,rowHeight:C}=u,y=e(u),v={};return x&&x.resizing?(v.width=Math.round(x.resizing.width),v.height=Math.round(x.resizing.height)):(v.width=t(p,y,R[0]),v.height=t(h,C,R[1])),x&&x.dragging?(v.top=Math.round(x.dragging.top),v.left=Math.round(x.dragging.left)):x&&x.resizing&&typeof x.resizing.top=="number"&&typeof x.resizing.left=="number"?(v.top=Math.round(x.resizing.top),v.left=Math.round(x.resizing.left)):(v.top=Math.round((C+R[1])*f+w[1]),v.left=Math.round((y+R[0])*c+w[0])),v}function i(u,c,f,p,h){const{margin:x,containerPadding:R,cols:w,rowHeight:C,maxRows:y}=u,v=e(u);let g=Math.round((f-R[0])/(v+x[0])),m=Math.round((c-R[1])/(C+x[1]));return g=a(g,0,w-p),m=a(m,0,y-h),{x:g,y:m}}function s(u,c,f,p,h,x){const{margin:R,maxRows:w,cols:C,rowHeight:y}=u,v=e(u);let g=Math.round((c+R[0])/(v+R[0])),m=Math.round((f+R[1])/(y+R[1])),S=a(g,0,C-p),E=a(m,0,w-h);return["sw","w","nw"].indexOf(x)!==-1&&(S=a(g,0,C)),["nw","n","ne"].indexOf(x)!==-1&&(E=a(m,0,w)),{w:S,h:E}}function a(u,c,f){return Math.max(Math.min(u,f),c)}return pr}var Uo={},jo={exports:{}},wc={};function yv(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=yv(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Fm(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=yv(e))&&(i&&(i+=" "),i+=t);return i}const qP=Object.freeze(Object.defineProperty({__proto__:null,clsx:Fm,default:Fm},Symbol.toStringTag,{value:"Module"})),VP=Xg(qP);var wt={},Pr={},Wm;function ku(){if(Wm)return Pr;Wm=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.dontSetMe=s,Pr.findInArray=e,Pr.int=i,Pr.isFunction=t,Pr.isNum=n;function e(a,u){for(let c=0,f=a.length;c<f;c++)if(u.apply(u,[a[c],c,a]))return a[c]}function t(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Function]"}function n(a){return typeof a=="number"&&!isNaN(a)}function i(a){return parseInt(a,10)}function s(a,u,c){if(a[u])return new Error("Invalid prop ".concat(u," passed to ").concat(c," - do not set this, set it on the child."))}return Pr}var Ir={},Bm;function GP(){if(Bm)return Ir;Bm=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.browserPrefixToKey=n,Ir.browserPrefixToStyle=i,Ir.default=void 0,Ir.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var a;let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const c=(a=window.document)===null||a===void 0||(a=a.documentElement)===null||a===void 0?void 0:a.style;if(!c||u in c)return"";for(let f=0;f<e.length;f++)if(n(u,e[f])in c)return e[f];return""}function n(a,u){return u?"".concat(u).concat(s(a)):a}function i(a,u){return u?"-".concat(u.toLowerCase(),"-").concat(a):a}function s(a){let u="",c=!0;for(let f=0;f<a.length;f++)c?(u+=a[f].toUpperCase(),c=!1):a[f]==="-"?c=!0:u+=a[f];return u}return Ir.default=t(),Ir}var Um;function kf(){if(Um)return wt;Um=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.addClassName=T,wt.addEvent=c,wt.addUserSelectStyles=S,wt.createCSSTransform=C,wt.createSVGTransform=y,wt.getTouch=g,wt.getTouchIdentifier=m,wt.getTranslation=v,wt.innerHeight=x,wt.innerWidth=R,wt.matchesSelector=a,wt.matchesSelectorAndParentsTo=u,wt.offsetXYFromParent=w,wt.outerHeight=p,wt.outerWidth=h,wt.removeClassName=M,wt.removeEvent=f,wt.removeUserSelectStyles=E;var e=ku(),t=i(GP());function n(D){if(typeof WeakMap!="function")return null;var A=new WeakMap,z=new WeakMap;return(n=function(J){return J?z:A})(D)}function i(D,A){if(D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var z=n(A);if(z&&z.has(D))return z.get(D);var J={},Z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in D)if(_!=="default"&&Object.prototype.hasOwnProperty.call(D,_)){var H=Z?Object.getOwnPropertyDescriptor(D,_):null;H&&(H.get||H.set)?Object.defineProperty(J,_,H):J[_]=D[_]}return J.default=D,z&&z.set(D,J),J}let s="";function a(D,A){return s||(s=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(z){return(0,e.isFunction)(D[z])})),(0,e.isFunction)(D[s])?D[s](A):!1}function u(D,A,z){let J=D;do{if(a(J,A))return!0;if(J===z)return!1;J=J.parentNode}while(J);return!1}function c(D,A,z,J){if(!D)return;const Z={capture:!0,...J};D.addEventListener?D.addEventListener(A,z,Z):D.attachEvent?D.attachEvent("on"+A,z):D["on"+A]=z}function f(D,A,z,J){if(!D)return;const Z={capture:!0,...J};D.removeEventListener?D.removeEventListener(A,z,Z):D.detachEvent?D.detachEvent("on"+A,z):D["on"+A]=null}function p(D){let A=D.clientHeight;const z=D.ownerDocument.defaultView.getComputedStyle(D);return A+=(0,e.int)(z.borderTopWidth),A+=(0,e.int)(z.borderBottomWidth),A}function h(D){let A=D.clientWidth;const z=D.ownerDocument.defaultView.getComputedStyle(D);return A+=(0,e.int)(z.borderLeftWidth),A+=(0,e.int)(z.borderRightWidth),A}function x(D){let A=D.clientHeight;const z=D.ownerDocument.defaultView.getComputedStyle(D);return A-=(0,e.int)(z.paddingTop),A-=(0,e.int)(z.paddingBottom),A}function R(D){let A=D.clientWidth;const z=D.ownerDocument.defaultView.getComputedStyle(D);return A-=(0,e.int)(z.paddingLeft),A-=(0,e.int)(z.paddingRight),A}function w(D,A,z){const Z=A===A.ownerDocument.body?{left:0,top:0}:A.getBoundingClientRect(),_=(D.clientX+A.scrollLeft-Z.left)/z,H=(D.clientY+A.scrollTop-Z.top)/z;return{x:_,y:H}}function C(D,A){const z=v(D,A,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:z}}function y(D,A){return v(D,A,"")}function v(D,A,z){let{x:J,y:Z}=D,_="translate(".concat(J).concat(z,",").concat(Z).concat(z,")");if(A){const H="".concat(typeof A.x=="string"?A.x:A.x+z),B="".concat(typeof A.y=="string"?A.y:A.y+z);_="translate(".concat(H,", ").concat(B,")")+_}return _}function g(D,A){return D.targetTouches&&(0,e.findInArray)(D.targetTouches,z=>A===z.identifier)||D.changedTouches&&(0,e.findInArray)(D.changedTouches,z=>A===z.identifier)}function m(D){if(D.targetTouches&&D.targetTouches[0])return D.targetTouches[0].identifier;if(D.changedTouches&&D.changedTouches[0])return D.changedTouches[0].identifier}function S(D){if(!D)return;let A=D.getElementById("react-draggable-style-el");A||(A=D.createElement("style"),A.type="text/css",A.id="react-draggable-style-el",A.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
218
218
|
`,A.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
219
|
-
`,D.getElementsByTagName("head")[0].appendChild(A)),D.body&&T(D.body,"react-draggable-transparent-selection")}function E(D){if(D)try{if(D.body&&M(D.body,"react-draggable-transparent-selection"),D.selection)D.selection.empty();else{const A=(D.defaultView||window).getSelection();A&&A.type!=="Caret"&&A.removeAllRanges()}}catch{}}function T(D,A){D.classList?D.classList.add(A):D.className.match(new RegExp("(?:^|\\s)".concat(A,"(?!\\S)")))||(D.className+=" ".concat(A))}function M(D,A){D.classList?D.classList.remove(A):D.className=D.className.replace(new RegExp("(?:^|\\s)".concat(A,"(?!\\S)"),"g"),"")}return wt}var Gn={},jm;function vv(){if(jm)return Gn;jm=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.canDragX=s,Gn.canDragY=a,Gn.createCoreData=c,Gn.createDraggableData=f,Gn.getBoundPosition=n,Gn.getControlPosition=u,Gn.snapToGrid=i;var e=ku(),t=kf();function n(x,R,w){if(!x.props.bounds)return[R,w];let{bounds:C}=x.props;C=typeof C=="string"?C:p(C);const y=h(x);if(typeof C=="string"){const{ownerDocument:v}=y,g=v.defaultView;let m;if(C==="parent"?m=y.parentNode:m=v.querySelector(C),!(m instanceof g.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const S=m,E=g.getComputedStyle(y),T=g.getComputedStyle(S);C={left:-y.offsetLeft+(0,e.int)(T.paddingLeft)+(0,e.int)(E.marginLeft),top:-y.offsetTop+(0,e.int)(T.paddingTop)+(0,e.int)(E.marginTop),right:(0,t.innerWidth)(S)-(0,t.outerWidth)(y)-y.offsetLeft+(0,e.int)(T.paddingRight)-(0,e.int)(E.marginRight),bottom:(0,t.innerHeight)(S)-(0,t.outerHeight)(y)-y.offsetTop+(0,e.int)(T.paddingBottom)-(0,e.int)(E.marginBottom)}}return(0,e.isNum)(C.right)&&(R=Math.min(R,C.right)),(0,e.isNum)(C.bottom)&&(w=Math.min(w,C.bottom)),(0,e.isNum)(C.left)&&(R=Math.max(R,C.left)),(0,e.isNum)(C.top)&&(w=Math.max(w,C.top)),[R,w]}function i(x,R,w){const C=Math.round(R/x[0])*x[0],y=Math.round(w/x[1])*x[1];return[C,y]}function s(x){return x.props.axis==="both"||x.props.axis==="x"}function a(x){return x.props.axis==="both"||x.props.axis==="y"}function u(x,R,w){const C=typeof R=="number"?(0,t.getTouch)(x,R):null;if(typeof R=="number"&&!C)return null;const y=h(w),v=w.props.offsetParent||y.offsetParent||y.ownerDocument.body;return(0,t.offsetXYFromParent)(C||x,v,w.props.scale)}function c(x,R,w){const C=!(0,e.isNum)(x.lastX),y=h(x);return C?{node:y,deltaX:0,deltaY:0,lastX:R,lastY:w,x:R,y:w}:{node:y,deltaX:R-x.lastX,deltaY:w-x.lastY,lastX:x.lastX,lastY:x.lastY,x:R,y:w}}function f(x,R){const w=x.props.scale;return{node:R.node,x:x.state.x+R.deltaX/w,y:x.state.y+R.deltaY/w,deltaX:R.deltaX/w,deltaY:R.deltaY/w,lastX:x.state.x,lastY:x.state.y}}function p(x){return{left:x.left,top:x.top,right:x.right,bottom:x.bottom}}function h(x){const R=x.findDOMNode();if(!R)throw new Error("<DraggableCore>: Unmounted during event!");return R}return Gn}var Ho={},Aa={},Hm;function bv(){if(Hm)return Aa;Hm=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.default=e;function e(){}return Aa}var qm;function YP(){if(qm)return Ho;qm=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var e=p(j),t=c(wr()),n=c(fi),i=kf(),s=vv(),a=ku(),u=c(bv());function c(v){return v&&v.__esModule?v:{default:v}}function f(v){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(f=function(S){return S?m:g})(v)}function p(v,g){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var m=f(g);if(m&&m.has(v))return m.get(v);var S={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in v)if(T!=="default"&&Object.prototype.hasOwnProperty.call(v,T)){var M=E?Object.getOwnPropertyDescriptor(v,T):null;M&&(M.get||M.set)?Object.defineProperty(S,T,M):S[T]=v[T]}return S.default=v,m&&m.set(v,S),S}function h(v,g,m){return g=x(g),g in v?Object.defineProperty(v,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[g]=m,v}function x(v){var g=R(v,"string");return typeof g=="symbol"?g:String(g)}function R(v,g){if(typeof v!="object"||v===null)return v;var m=v[Symbol.toPrimitive];if(m!==void 0){var S=m.call(v,g);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}const w={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=w.mouse,y=class extends e.Component{constructor(){super(...arguments),h(this,"dragging",!1),h(this,"lastX",NaN),h(this,"lastY",NaN),h(this,"touchIdentifier",null),h(this,"mounted",!1),h(this,"handleDragStart",g=>{if(this.props.onMouseDown(g),!this.props.allowAnyClick&&typeof g.button=="number"&&g.button!==0)return!1;const m=this.findDOMNode();if(!m||!m.ownerDocument||!m.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:S}=m;if(this.props.disabled||!(g.target instanceof S.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(g.target,this.props.handle,m)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(g.target,this.props.cancel,m))return;g.type==="touchstart"&&g.preventDefault();const E=(0,i.getTouchIdentifier)(g);this.touchIdentifier=E;const T=(0,s.getControlPosition)(g,E,this);if(T==null)return;const{x:M,y:D}=T,A=(0,s.createCoreData)(this,M,D);(0,u.default)("DraggableCore: handleDragStart: %j",A),(0,u.default)("calling",this.props.onStart),!(this.props.onStart(g,A)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(S),this.dragging=!0,this.lastX=M,this.lastY=D,(0,i.addEvent)(S,C.move,this.handleDrag),(0,i.addEvent)(S,C.stop,this.handleDragStop))}),h(this,"handleDrag",g=>{const m=(0,s.getControlPosition)(g,this.touchIdentifier,this);if(m==null)return;let{x:S,y:E}=m;if(Array.isArray(this.props.grid)){let D=S-this.lastX,A=E-this.lastY;if([D,A]=(0,s.snapToGrid)(this.props.grid,D,A),!D&&!A)return;S=this.lastX+D,E=this.lastY+A}const T=(0,s.createCoreData)(this,S,E);if((0,u.default)("DraggableCore: handleDrag: %j",T),this.props.onDrag(g,T)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const A=document.createEvent("MouseEvents");A.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(A)}return}this.lastX=S,this.lastY=E}),h(this,"handleDragStop",g=>{if(!this.dragging)return;const m=(0,s.getControlPosition)(g,this.touchIdentifier,this);if(m==null)return;let{x:S,y:E}=m;if(Array.isArray(this.props.grid)){let A=S-this.lastX||0,z=E-this.lastY||0;[A,z]=(0,s.snapToGrid)(this.props.grid,A,z),S=this.lastX+A,E=this.lastY+z}const T=(0,s.createCoreData)(this,S,E);if(this.props.onStop(g,T)===!1||this.mounted===!1)return!1;const D=this.findDOMNode();D&&this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(D.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",T),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,D&&((0,u.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(D.ownerDocument,C.move,this.handleDrag),(0,i.removeEvent)(D.ownerDocument,C.stop,this.handleDragStop))}),h(this,"onMouseDown",g=>(C=w.mouse,this.handleDragStart(g))),h(this,"onMouseUp",g=>(C=w.mouse,this.handleDragStop(g))),h(this,"onTouchStart",g=>(C=w.touch,this.handleDragStart(g))),h(this,"onTouchEnd",g=>(C=w.touch,this.handleDragStop(g)))}componentDidMount(){this.mounted=!0;const g=this.findDOMNode();g&&(0,i.addEvent)(g,w.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const g=this.findDOMNode();if(g){const{ownerDocument:m}=g;(0,i.removeEvent)(m,w.mouse.move,this.handleDrag),(0,i.removeEvent)(m,w.touch.move,this.handleDrag),(0,i.removeEvent)(m,w.mouse.stop,this.handleDragStop),(0,i.removeEvent)(m,w.touch.stop,this.handleDragStop),(0,i.removeEvent)(g,w.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(m)}}findDOMNode(){var g,m;return(g=this.props)!==null&&g!==void 0&&g.nodeRef?(m=this.props)===null||m===void 0||(m=m.nodeRef)===null||m===void 0?void 0:m.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ho.default=y,h(y,"displayName","DraggableCore"),h(y,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(v,g){if(v[g]&&v[g].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),h(y,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ho}var Vm;function ZP(){return Vm||(Vm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),e.default=void 0;var t=R(j),n=h(wr()),i=h(fi),s=h(VP),a=kf(),u=vv(),c=ku(),f=h(YP()),p=h(bv());function h(m){return m&&m.__esModule?m:{default:m}}function x(m){if(typeof WeakMap!="function")return null;var S=new WeakMap,E=new WeakMap;return(x=function(T){return T?E:S})(m)}function R(m,S){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var E=x(S);if(E&&E.has(m))return E.get(m);var T={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in m)if(D!=="default"&&Object.prototype.hasOwnProperty.call(m,D)){var A=M?Object.getOwnPropertyDescriptor(m,D):null;A&&(A.get||A.set)?Object.defineProperty(T,D,A):T[D]=m[D]}return T.default=m,E&&E.set(m,T),T}function w(){return w=Object.assign?Object.assign.bind():function(m){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(m[T]=E[T])}return m},w.apply(this,arguments)}function C(m,S,E){return S=y(S),S in m?Object.defineProperty(m,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[S]=E,m}function y(m){var S=v(m,"string");return typeof S=="symbol"?S:String(S)}function v(m,S){if(typeof m!="object"||m===null)return m;var E=m[Symbol.toPrimitive];if(E!==void 0){var T=E.call(m,S);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(m)}class g extends t.Component{static getDerivedStateFromProps(S,E){let{position:T}=S,{prevPropsPosition:M}=E;return T&&(!M||T.x!==M.x||T.y!==M.y)?((0,p.default)("Draggable: getDerivedStateFromProps %j",{position:T,prevPropsPosition:M}),{x:T.x,y:T.y,prevPropsPosition:{...T}}):null}constructor(S){super(S),C(this,"onDragStart",(E,T)=>{if((0,p.default)("Draggable: onDragStart: %j",T),this.props.onStart(E,(0,u.createDraggableData)(this,T))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(E,T)=>{if(!this.state.dragging)return!1;(0,p.default)("Draggable: onDrag: %j",T);const M=(0,u.createDraggableData)(this,T),D={x:M.x,y:M.y,slackX:0,slackY:0};if(this.props.bounds){const{x:z,y:J}=D;D.x+=this.state.slackX,D.y+=this.state.slackY;const[Z,_]=(0,u.getBoundPosition)(this,D.x,D.y);D.x=Z,D.y=_,D.slackX=this.state.slackX+(z-D.x),D.slackY=this.state.slackY+(J-D.y),M.x=D.x,M.y=D.y,M.deltaX=D.x-this.state.x,M.deltaY=D.y-this.state.y}if(this.props.onDrag(E,M)===!1)return!1;this.setState(D)}),C(this,"onDragStop",(E,T)=>{if(!this.state.dragging||this.props.onStop(E,(0,u.createDraggableData)(this,T))===!1)return!1;(0,p.default)("Draggable: onDragStop: %j",T);const D={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:z,y:J}=this.props.position;D.x=z,D.y=J}this.setState(D)}),this.state={dragging:!1,dragged:!1,x:S.position?S.position.x:S.defaultPosition.x,y:S.position?S.position.y:S.defaultPosition.y,prevPropsPosition:{...S.position},slackX:0,slackY:0,isElementSVG:!1},S.position&&!(S.onDrag||S.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var S,E;return(S=(E=this.props)===null||E===void 0||(E=E.nodeRef)===null||E===void 0?void 0:E.current)!==null&&S!==void 0?S:i.default.findDOMNode(this)}render(){const{axis:S,bounds:E,children:T,defaultPosition:M,defaultClassName:D,defaultClassNameDragging:A,defaultClassNameDragged:z,position:J,positionOffset:Z,scale:_,...H}=this.props;let B={},K=null;const X=!!!J||this.state.dragging,fe=J||M,ae={x:(0,u.canDragX)(this)&&X?this.state.x:fe.x,y:(0,u.canDragY)(this)&&X?this.state.y:fe.y};this.state.isElementSVG?K=(0,a.createSVGTransform)(ae,Z):B=(0,a.createCSSTransform)(ae,Z);const Y=(0,s.default)(T.props.className||"",D,{[A]:this.state.dragging,[z]:this.state.dragged});return t.createElement(f.default,w({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(T),{className:Y,style:{...T.props.style,...B},transform:K}))}}e.default=g,C(g,"displayName","Draggable"),C(g,"propTypes",{...f.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),C(g,"defaultProps",{...f.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(wc)),wc}var Gm;function $f(){if(Gm)return jo.exports;Gm=1;const{default:e,DraggableCore:t}=ZP();return jo.exports=e,jo.exports.default=e,jo.exports.DraggableCore=t,jo.exports}var qo={exports:{}},Vo={},ka={},Ym;function XP(){if(Ym)return ka;Ym=1,ka.__esModule=!0,ka.cloneElement=c;var e=t(j);function t(f){return f&&f.__esModule?f:{default:f}}function n(f,p){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);p&&(x=x.filter(function(R){return Object.getOwnPropertyDescriptor(f,R).enumerable})),h.push.apply(h,x)}return h}function i(f){for(var p=1;p<arguments.length;p++){var h=arguments[p]!=null?arguments[p]:{};p%2?n(Object(h),!0).forEach(function(x){s(f,x,h[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):n(Object(h)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(h,x))})}return f}function s(f,p,h){return p=a(p),p in f?Object.defineProperty(f,p,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[p]=h,f}function a(f){var p=u(f,"string");return typeof p=="symbol"?p:String(p)}function u(f,p){if(typeof f!="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var x=h.call(f,p);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(f)}function c(f,p){return p.style&&f.props.style&&(p.style=i(i({},f.props.style),p.style)),p.className&&f.props.className&&(p.className=f.props.className+" "+p.className),e.default.cloneElement(f,p)}return ka}var Go={},Zm;function wv(){if(Zm)return Go;Zm=1,Go.__esModule=!0,Go.resizableProps=void 0;var e=t(wr());$f();function t(i){return i&&i.__esModule?i:{default:i}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];var c=a[0];if(c.axis==="both"||c.axis==="y"){var f;return(f=e.default.number).isRequired.apply(f,a)}return e.default.number.apply(e.default,a)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];var c=a[0];if(c.axis==="both"||c.axis==="x"){var f;return(f=e.default.number).isRequired.apply(f,a)}return e.default.number.apply(e.default,a)}};return Go.resizableProps=n,Go}var Xm;function xv(){if(Xm)return Vo;Xm=1,Vo.__esModule=!0,Vo.default=void 0;var e=u(j),t=$f(),n=XP(),i=wv(),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function a(g){if(typeof WeakMap!="function")return null;var m=new WeakMap,S=new WeakMap;return(a=function(T){return T?S:m})(g)}function u(g,m){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var S=a(m);if(S&&S.has(g))return S.get(g);var E={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in g)if(M!=="default"&&Object.prototype.hasOwnProperty.call(g,M)){var D=T?Object.getOwnPropertyDescriptor(g,M):null;D&&(D.get||D.set)?Object.defineProperty(E,M,D):E[M]=g[M]}return E.default=g,S&&S.set(g,E),E}function c(){return c=Object.assign?Object.assign.bind():function(g){for(var m=1;m<arguments.length;m++){var S=arguments[m];for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(g[E]=S[E])}return g},c.apply(this,arguments)}function f(g,m){if(g==null)return{};var S={},E=Object.keys(g),T,M;for(M=0;M<E.length;M++)T=E[M],!(m.indexOf(T)>=0)&&(S[T]=g[T]);return S}function p(g,m){var S=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);m&&(E=E.filter(function(T){return Object.getOwnPropertyDescriptor(g,T).enumerable})),S.push.apply(S,E)}return S}function h(g){for(var m=1;m<arguments.length;m++){var S=arguments[m]!=null?arguments[m]:{};m%2?p(Object(S),!0).forEach(function(E){x(g,E,S[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(S)):p(Object(S)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(S,E))})}return g}function x(g,m,S){return m=R(m),m in g?Object.defineProperty(g,m,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[m]=S,g}function R(g){var m=w(g,"string");return typeof m=="symbol"?m:String(m)}function w(g,m){if(typeof g!="object"||g===null)return g;var S=g[Symbol.toPrimitive];if(S!==void 0){var E=S.call(g,m);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(g)}function C(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,y(g,m)}function y(g,m){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,T){return E.__proto__=T,E},y(g,m)}var v=function(g){C(m,g);function m(){for(var E,T=arguments.length,M=new Array(T),D=0;D<T;D++)M[D]=arguments[D];return E=g.call.apply(g,[this].concat(M))||this,E.handleRefs={},E.lastHandleRect=null,E.slack=null,E}var S=m.prototype;return S.componentWillUnmount=function(){this.resetData()},S.resetData=function(){this.lastHandleRect=this.slack=null},S.runConstraints=function(T,M){var D=this.props,A=D.minConstraints,z=D.maxConstraints,J=D.lockAspectRatio;if(!A&&!z&&!J)return[T,M];if(J){var Z=this.props.width/this.props.height,_=T-this.props.width,H=M-this.props.height;Math.abs(_)>Math.abs(H*Z)?M=T/Z:T=M*Z}var B=T,K=M,q=this.slack||[0,0],X=q[0],fe=q[1];return T+=X,M+=fe,A&&(T=Math.max(A[0],T),M=Math.max(A[1],M)),z&&(T=Math.min(z[0],T),M=Math.min(z[1],M)),this.slack=[X+(B-T),fe+(K-M)],[T,M]},S.resizeHandler=function(T,M){var D=this;return function(A,z){var J=z.node,Z=z.deltaX,_=z.deltaY;T==="onResizeStart"&&D.resetData();var H=(D.props.axis==="both"||D.props.axis==="x")&&M!=="n"&&M!=="s",B=(D.props.axis==="both"||D.props.axis==="y")&&M!=="e"&&M!=="w";if(!(!H&&!B)){var K=M[0],q=M[M.length-1],X=J.getBoundingClientRect();if(D.lastHandleRect!=null){if(q==="w"){var fe=X.left-D.lastHandleRect.left;Z+=fe}if(K==="n"){var ae=X.top-D.lastHandleRect.top;_+=ae}}D.lastHandleRect=X,q==="w"&&(Z=-Z),K==="n"&&(_=-_);var Y=D.props.width+(H?Z/D.props.transformScale:0),$=D.props.height+(B?_/D.props.transformScale:0),ue=D.runConstraints(Y,$);Y=ue[0],$=ue[1];var ye=Y!==D.props.width||$!==D.props.height,pe=typeof D.props[T]=="function"?D.props[T]:null,Oe=T==="onResize"&&!ye;pe&&!Oe&&(A.persist==null||A.persist(),pe(A,{node:J,size:{width:Y,height:$},handle:M})),T==="onResizeStop"&&D.resetData()}}},S.renderResizeHandle=function(T,M){var D=this.props.handle;if(!D)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+T,ref:M});if(typeof D=="function")return D(T,M);var A=typeof D.type=="string",z=h({ref:M},A?{}:{handleAxis:T});return e.cloneElement(D,z)},S.render=function(){var T=this,M=this.props,D=M.children,A=M.className,z=M.draggableOpts;M.width,M.height,M.handle,M.handleSize,M.lockAspectRatio,M.axis,M.minConstraints,M.maxConstraints,M.onResize,M.onResizeStop,M.onResizeStart;var J=M.resizeHandles;M.transformScale;var Z=f(M,s);return(0,n.cloneElement)(D,h(h({},Z),{},{className:(A?A+" ":"")+"react-resizable",children:[].concat(D.props.children,J.map(function(_){var H,B=(H=T.handleRefs[_])!=null?H:T.handleRefs[_]=e.createRef();return e.createElement(t.DraggableCore,c({},z,{nodeRef:B,key:"resizableHandle-"+_,onStop:T.resizeHandler("onResizeStop",_),onStart:T.resizeHandler("onResizeStart",_),onDrag:T.resizeHandler("onResize",_)}),T.renderResizeHandle(_,B))}))}))},m}(e.Component);return Vo.default=v,v.propTypes=i.resizableProps,v.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},Vo}var Yo={},Jm;function JP(){if(Jm)return Yo;Jm=1,Yo.__esModule=!0,Yo.default=void 0;var e=c(j),t=a(wr()),n=a(xv()),i=wv(),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function a(m){return m&&m.__esModule?m:{default:m}}function u(m){if(typeof WeakMap!="function")return null;var S=new WeakMap,E=new WeakMap;return(u=function(M){return M?E:S})(m)}function c(m,S){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var E=u(S);if(E&&E.has(m))return E.get(m);var T={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in m)if(D!=="default"&&Object.prototype.hasOwnProperty.call(m,D)){var A=M?Object.getOwnPropertyDescriptor(m,D):null;A&&(A.get||A.set)?Object.defineProperty(T,D,A):T[D]=m[D]}return T.default=m,E&&E.set(m,T),T}function f(){return f=Object.assign?Object.assign.bind():function(m){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(m[T]=E[T])}return m},f.apply(this,arguments)}function p(m,S){var E=Object.keys(m);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(m);S&&(T=T.filter(function(M){return Object.getOwnPropertyDescriptor(m,M).enumerable})),E.push.apply(E,T)}return E}function h(m){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?p(Object(E),!0).forEach(function(T){x(m,T,E[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(E)):p(Object(E)).forEach(function(T){Object.defineProperty(m,T,Object.getOwnPropertyDescriptor(E,T))})}return m}function x(m,S,E){return S=R(S),S in m?Object.defineProperty(m,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[S]=E,m}function R(m){var S=w(m,"string");return typeof S=="symbol"?S:String(S)}function w(m,S){if(typeof m!="object"||m===null)return m;var E=m[Symbol.toPrimitive];if(E!==void 0){var T=E.call(m,S);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(m)}function C(m,S){if(m==null)return{};var E={},T=Object.keys(m),M,D;for(D=0;D<T.length;D++)M=T[D],!(S.indexOf(M)>=0)&&(E[M]=m[M]);return E}function y(m,S){m.prototype=Object.create(S.prototype),m.prototype.constructor=m,v(m,S)}function v(m,S){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,M){return T.__proto__=M,T},v(m,S)}var g=function(m){y(S,m);function S(){for(var T,M=arguments.length,D=new Array(M),A=0;A<M;A++)D[A]=arguments[A];return T=m.call.apply(m,[this].concat(D))||this,T.state={width:T.props.width,height:T.props.height,propsWidth:T.props.width,propsHeight:T.props.height},T.onResize=function(z,J){var Z=J.size;T.props.onResize?(z.persist==null||z.persist(),T.setState(Z,function(){return T.props.onResize&&T.props.onResize(z,J)})):T.setState(Z)},T}S.getDerivedStateFromProps=function(M,D){return D.propsWidth!==M.width||D.propsHeight!==M.height?{width:M.width,height:M.height,propsWidth:M.width,propsHeight:M.height}:null};var E=S.prototype;return E.render=function(){var M=this.props,D=M.handle,A=M.handleSize;M.onResize;var z=M.onResizeStart,J=M.onResizeStop,Z=M.draggableOpts,_=M.minConstraints,H=M.maxConstraints,B=M.lockAspectRatio,K=M.axis;M.width,M.height;var q=M.resizeHandles,X=M.style,fe=M.transformScale,ae=C(M,s);return e.createElement(n.default,{axis:K,draggableOpts:Z,handle:D,handleSize:A,height:this.state.height,lockAspectRatio:B,maxConstraints:H,minConstraints:_,onResizeStart:z,onResize:this.onResize,onResizeStop:J,resizeHandles:q,transformScale:fe,width:this.state.width},e.createElement("div",f({},ae,{style:h(h({},X),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},S}(e.Component);return Yo.default=g,g.propTypes=h(h({},i.resizableProps),{},{children:t.default.element}),Yo}var Km;function KP(){return Km||(Km=1,qo.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},qo.exports.Resizable=xv().default,qo.exports.ResizableBox=JP().default),qo.exports}var hr={},Qm;function Sv(){if(Qm)return hr;Qm=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.resizeHandleType=hr.resizeHandleAxesType=hr.default=void 0;var e=n(wr()),t=n(j);function n(a){return a&&a.__esModule?a:{default:a}}const i=hr.resizeHandleAxesType=e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),s=hr.resizeHandleType=e.default.oneOfType([e.default.node,e.default.func]);return hr.default={className:e.default.string,style:e.default.object,width:e.default.number,autoSize:e.default.bool,cols:e.default.number,draggableCancel:e.default.string,draggableHandle:e.default.string,verticalCompact:function(a){a.verticalCompact===!1&&process.env.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:e.default.oneOf(["vertical","horizontal"]),layout:function(a){var u=a.layout;u!==void 0&&po().validateLayout(u,"layout")},margin:e.default.arrayOf(e.default.number),containerPadding:e.default.arrayOf(e.default.number),rowHeight:e.default.number,maxRows:e.default.number,isBounded:e.default.bool,isDraggable:e.default.bool,isResizable:e.default.bool,allowOverlap:e.default.bool,preventCollision:e.default.bool,useCSSTransforms:e.default.bool,transformScale:e.default.number,isDroppable:e.default.bool,resizeHandles:i,resizeHandle:s,onLayoutChange:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onDragStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,onResizeStop:e.default.func,onDrop:e.default.func,droppingItem:e.default.shape({i:e.default.string.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired}),children:function(a,u){const c=a[u],f={};t.default.Children.forEach(c,function(p){if((p==null?void 0:p.key)!=null){if(f[p.key])throw new Error('Duplicate child key "'+p.key+'" found! This will cause problems in ReactGridLayout.');f[p.key]=!0}})},innerRef:e.default.any},hr}var eg;function QP(){if(eg)return Uo;eg=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=void 0;var e=f(j),t=f(wr()),n=$f(),i=KP(),s=po(),a=Af(),u=Sv(),c=f(Nf());function f(w){return w&&w.__esModule?w:{default:w}}function p(w,C,y){return C=h(C),C in w?Object.defineProperty(w,C,{value:y,enumerable:!0,configurable:!0,writable:!0}):w[C]=y,w}function h(w){var C=x(w,"string");return typeof C=="symbol"?C:String(C)}function x(w,C){if(typeof w!="object"||w===null)return w;var y=w[Symbol.toPrimitive];if(y!==void 0){var v=y.call(w,C);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(w)}let R=class extends e.default.Component{constructor(){super(...arguments),p(this,"state",{resizing:null,dragging:null,className:""}),p(this,"elementRef",e.default.createRef()),p(this,"onDragStart",(C,y)=>{let{node:v}=y;const{onDragStart:g,transformScale:m}=this.props;if(!g)return;const S={top:0,left:0},{offsetParent:E}=v;if(!E)return;const T=E.getBoundingClientRect(),M=v.getBoundingClientRect(),D=M.left/m,A=T.left/m,z=M.top/m,J=T.top/m;S.left=D-A+E.scrollLeft,S.top=z-J+E.scrollTop,this.setState({dragging:S});const{x:Z,y:_}=(0,a.calcXY)(this.getPositionParams(),S.top,S.left,this.props.w,this.props.h);return g.call(this,this.props.i,Z,_,{e:C,node:v,newPosition:S})}),p(this,"onDrag",(C,y)=>{let{node:v,deltaX:g,deltaY:m}=y;const{onDrag:S}=this.props;if(!S)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let E=this.state.dragging.top+m,T=this.state.dragging.left+g;const{isBounded:M,i:D,w:A,h:z,containerWidth:J}=this.props,Z=this.getPositionParams();if(M){const{offsetParent:K}=v;if(K){const{margin:q,rowHeight:X,containerPadding:fe}=this.props,ae=K.clientHeight-(0,a.calcGridItemWHPx)(z,X,q[1]);E=(0,a.clamp)(E-fe[1],0,ae);const Y=(0,a.calcGridColWidth)(Z),$=J-(0,a.calcGridItemWHPx)(A,Y,q[0]);T=(0,a.clamp)(T-fe[0],0,$)}}const _={top:E,left:T};this.setState({dragging:_});const{x:H,y:B}=(0,a.calcXY)(Z,E,T,A,z);return S.call(this,D,H,B,{e:C,node:v,newPosition:_})}),p(this,"onDragStop",(C,y)=>{let{node:v}=y;const{onDragStop:g}=this.props;if(!g)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:m,h:S,i:E}=this.props,{left:T,top:M}=this.state.dragging,D={top:M,left:T};this.setState({dragging:null});const{x:A,y:z}=(0,a.calcXY)(this.getPositionParams(),M,T,m,S);return g.call(this,E,A,z,{e:C,node:v,newPosition:D})}),p(this,"onResizeStop",(C,y,v)=>this.onResizeHandler(C,y,v,"onResizeStop")),p(this,"onResizeStart",(C,y,v)=>this.onResizeHandler(C,y,v,"onResizeStart")),p(this,"onResize",(C,y,v)=>this.onResizeHandler(C,y,v,"onResize"))}shouldComponentUpdate(C,y){if(this.props.children!==C.children||this.props.droppingPosition!==C.droppingPosition)return!0;const v=(0,a.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),g=(0,a.calcGridItemPosition)(this.getPositionParams(C),C.x,C.y,C.w,C.h,y);return!(0,s.fastPositionEqual)(v,g)||this.props.useCSSTransforms!==C.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(C){this.moveDroppingItem(C)}moveDroppingItem(C){const{droppingPosition:y}=this.props;if(!y)return;const v=this.elementRef.current;if(!v)return;const g=C.droppingPosition||{left:0,top:0},{dragging:m}=this.state,S=m&&y.left!==g.left||y.top!==g.top;if(!m)this.onDragStart(y.e,{node:v,deltaX:y.left,deltaY:y.top});else if(S){const E=y.left-m.left,T=y.top-m.top;this.onDrag(y.e,{node:v,deltaX:E,deltaY:T})}}getPositionParams(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:C.cols,containerPadding:C.containerPadding,containerWidth:C.containerWidth,margin:C.margin,maxRows:C.maxRows,rowHeight:C.rowHeight}}createStyle(C){const{usePercentages:y,containerWidth:v,useCSSTransforms:g}=this.props;let m;return g?m=(0,s.setTransform)(C):(m=(0,s.setTopLeft)(C),y&&(m.left=(0,s.perc)(C.left/v),m.width=(0,s.perc)(C.width/v))),m}mixinDraggable(C,y){return e.default.createElement(n.DraggableCore,{disabled:!y,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},C)}curryResizeHandler(C,y){return(v,g)=>y(v,g,C)}mixinResizable(C,y,v){const{cols:g,minW:m,minH:S,maxW:E,maxH:T,transformScale:M,resizeHandles:D,resizeHandle:A}=this.props,z=this.getPositionParams(),J=(0,a.calcGridItemPosition)(z,0,0,g,0).width,Z=(0,a.calcGridItemPosition)(z,0,0,m,S),_=(0,a.calcGridItemPosition)(z,0,0,E,T),H=[Z.width,Z.height],B=[Math.min(_.width,J),Math.min(_.height,1/0)];return e.default.createElement(i.Resizable,{draggableOpts:{disabled:!v},className:v?void 0:"react-resizable-hide",width:y.width,height:y.height,minConstraints:H,maxConstraints:B,onResizeStop:this.curryResizeHandler(y,this.onResizeStop),onResizeStart:this.curryResizeHandler(y,this.onResizeStart),onResize:this.curryResizeHandler(y,this.onResize),transformScale:M,resizeHandles:D,handle:A},C)}onResizeHandler(C,y,v,g){let{node:m,size:S,handle:E}=y;const T=this.props[g];if(!T)return;const{x:M,y:D,i:A,maxH:z,minH:J,containerWidth:Z}=this.props,{minW:_,maxW:H}=this.props;let B=S;m&&(B=(0,s.resizeItemInDirection)(E,v,S,Z),this.setState({resizing:g==="onResizeStop"?null:B}));let{w:K,h:q}=(0,a.calcWH)(this.getPositionParams(),B.width,B.height,M,D,E);K=(0,a.clamp)(K,Math.max(_,1),H),q=(0,a.clamp)(q,J,z),T.call(this,A,K,q,{e:C,node:m,size:B,handle:E})}render(){const{x:C,y,w:v,h:g,isDraggable:m,isResizable:S,droppingPosition:E,useCSSTransforms:T}=this.props,M=(0,a.calcGridItemPosition)(this.getPositionParams(),C,y,v,g,this.state),D=e.default.Children.only(this.props.children);let A=e.default.cloneElement(D,{ref:this.elementRef,className:(0,c.default)("react-grid-item",D.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":m,"react-draggable-dragging":!!this.state.dragging,dropping:!!E,cssTransforms:T}),style:{...this.props.style,...D.props.style,...this.createStyle(M)}});return A=this.mixinResizable(A,M,S),A=this.mixinDraggable(A,m),A}};return Uo.default=R,p(R,"propTypes",{children:t.default.element,cols:t.default.number.isRequired,containerWidth:t.default.number.isRequired,rowHeight:t.default.number.isRequired,margin:t.default.array.isRequired,maxRows:t.default.number.isRequired,containerPadding:t.default.array.isRequired,x:t.default.number.isRequired,y:t.default.number.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired,minW:function(w,C){const y=w[C];if(typeof y!="number")return new Error("minWidth not Number");if(y>w.w||y>w.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(w,C){const y=w[C];if(typeof y!="number")return new Error("maxWidth not Number");if(y<w.w||y<w.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(w,C){const y=w[C];if(typeof y!="number")return new Error("minHeight not Number");if(y>w.h||y>w.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(w,C){const y=w[C];if(typeof y!="number")return new Error("maxHeight not Number");if(y<w.h||y<w.minH)return new Error("maxHeight smaller than item height/minHeight")},i:t.default.string.isRequired,resizeHandles:u.resizeHandleAxesType,resizeHandle:u.resizeHandleType,onDragStop:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,isDraggable:t.default.bool.isRequired,isResizable:t.default.bool.isRequired,isBounded:t.default.bool.isRequired,static:t.default.bool,useCSSTransforms:t.default.bool.isRequired,transformScale:t.default.number,className:t.default.string,handle:t.default.string,cancel:t.default.string,droppingPosition:t.default.shape({e:t.default.object.isRequired,left:t.default.number.isRequired,top:t.default.number.isRequired})}),p(R,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),Uo}var tg;function Ev(){if(tg)return Bo;tg=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.default=void 0;var e=p(j),t=If(),n=c(Nf()),i=po(),s=Af(),a=c(QP()),u=c(Sv());function c(v){return v&&v.__esModule?v:{default:v}}function f(v){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(f=function(S){return S?m:g})(v)}function p(v,g){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var m=f(g);if(m&&m.has(v))return m.get(v);var S={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in v)if(T!=="default"&&Object.prototype.hasOwnProperty.call(v,T)){var M=E?Object.getOwnPropertyDescriptor(v,T):null;M&&(M.get||M.set)?Object.defineProperty(S,T,M):S[T]=v[T]}return S.default=v,m&&m.set(v,S),S}function h(v,g,m){return g=x(g),g in v?Object.defineProperty(v,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[g]=m,v}function x(v){var g=R(v,"string");return typeof g=="symbol"?g:String(g)}function R(v,g){if(typeof v!="object"||v===null)return v;var m=v[Symbol.toPrimitive];if(m!==void 0){var S=m.call(v,g);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}const w="react-grid-layout";let C=!1;try{C=/firefox/i.test(navigator.userAgent)}catch{}class y extends e.Component{constructor(){super(...arguments),h(this,"state",{activeDrag:null,layout:(0,i.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,i.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),h(this,"dragEnterCounter",0),h(this,"onDragStart",(g,m,S,E)=>{let{e:T,node:M}=E;const{layout:D}=this.state,A=(0,i.getLayoutItem)(D,g);if(!A)return;const z={w:A.w,h:A.h,x:A.x,y:A.y,placeholder:!0,i:g};return this.setState({oldDragItem:(0,i.cloneLayoutItem)(A),oldLayout:D,activeDrag:z}),this.props.onDragStart(D,A,A,null,T,M)}),h(this,"onDrag",(g,m,S,E)=>{let{e:T,node:M}=E;const{oldDragItem:D}=this.state;let{layout:A}=this.state;const{cols:z,allowOverlap:J,preventCollision:Z}=this.props,_=(0,i.getLayoutItem)(A,g);if(!_)return;const H={w:_.w,h:_.h,x:_.x,y:_.y,placeholder:!0,i:g};A=(0,i.moveElement)(A,_,m,S,!0,Z,(0,i.compactType)(this.props),z,J),this.props.onDrag(A,D,_,H,T,M),this.setState({layout:J?A:(0,i.compact)(A,(0,i.compactType)(this.props),z),activeDrag:H})}),h(this,"onDragStop",(g,m,S,E)=>{let{e:T,node:M}=E;if(!this.state.activeDrag)return;const{oldDragItem:D}=this.state;let{layout:A}=this.state;const{cols:z,preventCollision:J,allowOverlap:Z}=this.props,_=(0,i.getLayoutItem)(A,g);if(!_)return;A=(0,i.moveElement)(A,_,m,S,!0,J,(0,i.compactType)(this.props),z,Z);const B=Z?A:(0,i.compact)(A,(0,i.compactType)(this.props),z);this.props.onDragStop(B,D,_,null,T,M);const{oldLayout:K}=this.state;this.setState({activeDrag:null,layout:B,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(B,K)}),h(this,"onResizeStart",(g,m,S,E)=>{let{e:T,node:M}=E;const{layout:D}=this.state,A=(0,i.getLayoutItem)(D,g);A&&(this.setState({oldResizeItem:(0,i.cloneLayoutItem)(A),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(D,A,A,null,T,M))}),h(this,"onResize",(g,m,S,E)=>{let{e:T,node:M,size:D,handle:A}=E;const{oldResizeItem:z}=this.state,{layout:J}=this.state,{cols:Z,preventCollision:_,allowOverlap:H}=this.props;let B=!1,K,q,X;const[fe,ae]=(0,i.withLayoutItem)(J,g,$=>{let ue;return q=$.x,X=$.y,["sw","w","nw","n","ne"].indexOf(A)!==-1&&(["sw","nw","w"].indexOf(A)!==-1&&(q=$.x+($.w-m),m=$.x!==q&&q<0?$.w:m,q=q<0?0:q),["ne","n","nw"].indexOf(A)!==-1&&(X=$.y+($.h-S),S=$.y!==X&&X<0?$.h:S,X=X<0?0:X),B=!0),_&&!H&&(ue=(0,i.getAllCollisions)(J,{...$,w:m,h:S,x:q,y:X}).filter(pe=>pe.i!==$.i).length>0,ue&&(X=$.y,S=$.h,q=$.x,m=$.w,B=!1)),$.w=m,$.h=S,$});if(!ae)return;K=fe,B&&(K=(0,i.moveElement)(fe,ae,q,X,!0,this.props.preventCollision,(0,i.compactType)(this.props),Z,H));const Y={w:ae.w,h:ae.h,x:ae.x,y:ae.y,static:!0,i:g};this.props.onResize(K,z,ae,Y,T,M),this.setState({layout:H?K:(0,i.compact)(K,(0,i.compactType)(this.props),Z),activeDrag:Y})}),h(this,"onResizeStop",(g,m,S,E)=>{let{e:T,node:M}=E;const{layout:D,oldResizeItem:A}=this.state,{cols:z,allowOverlap:J}=this.props,Z=(0,i.getLayoutItem)(D,g),_=J?D:(0,i.compact)(D,(0,i.compactType)(this.props),z);this.props.onResizeStop(_,A,Z,null,T,M);const{oldLayout:H}=this.state;this.setState({activeDrag:null,layout:_,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(_,H)}),h(this,"onDragOver",g=>{var fe;if(g.preventDefault(),g.stopPropagation(),C&&!((fe=g.nativeEvent.target)!=null&&fe.classList.contains(w)))return!1;const{droppingItem:m,onDropDragOver:S,margin:E,cols:T,rowHeight:M,maxRows:D,width:A,containerPadding:z,transformScale:J}=this.props,Z=S==null?void 0:S(g);if(Z===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const _={...m,...Z},{layout:H}=this.state,B=g.currentTarget.getBoundingClientRect(),K=g.clientX-B.left,q=g.clientY-B.top,X={left:K/J,top:q/J,e:g};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ae,top:Y}=this.state.droppingPosition;(ae!=K||Y!=q)&&this.setState({droppingPosition:X})}}else{const ae={cols:T,margin:E,maxRows:D,rowHeight:M,containerWidth:A,containerPadding:z||E},Y=(0,s.calcXY)(ae,q,K,_.w,_.h);this.setState({droppingDOMNode:e.createElement("div",{key:_.i}),droppingPosition:X,layout:[...H,{..._,x:Y.x,y:Y.y,static:!1,isDraggable:!0}]})}}),h(this,"removeDroppingPlaceholder",()=>{const{droppingItem:g,cols:m}=this.props,{layout:S}=this.state,E=(0,i.compact)(S.filter(T=>T.i!==g.i),(0,i.compactType)(this.props),m,this.props.allowOverlap);this.setState({layout:E,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),h(this,"onDragLeave",g=>{g.preventDefault(),g.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),h(this,"onDragEnter",g=>{g.preventDefault(),g.stopPropagation(),this.dragEnterCounter++}),h(this,"onDrop",g=>{g.preventDefault(),g.stopPropagation();const{droppingItem:m}=this.props,{layout:S}=this.state,E=S.find(T=>T.i===m.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(S,E,g)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(g,m){let S;return m.activeDrag?null:(!(0,t.deepEqual)(g.layout,m.propsLayout)||g.compactType!==m.compactType?S=g.layout:(0,i.childrenEqual)(g.children,m.children)||(S=m.layout),S?{layout:(0,i.synchronizeLayoutWithChildren)(S,g.children,g.cols,(0,i.compactType)(g),g.allowOverlap),compactType:g.compactType,children:g.children,propsLayout:g.layout}:null)}shouldComponentUpdate(g,m){return this.props.children!==g.children||!(0,i.fastRGLPropsEqual)(this.props,g,t.deepEqual)||this.state.activeDrag!==m.activeDrag||this.state.mounted!==m.mounted||this.state.droppingPosition!==m.droppingPosition}componentDidUpdate(g,m){if(!this.state.activeDrag){const S=this.state.layout,E=m.layout;this.onLayoutMaybeChanged(S,E)}}containerHeight(){if(!this.props.autoSize)return;const g=(0,i.bottom)(this.state.layout),m=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return g*this.props.rowHeight+(g-1)*this.props.margin[1]+m*2+"px"}onLayoutMaybeChanged(g,m){m||(m=this.state.layout),(0,t.deepEqual)(m,g)||this.props.onLayoutChange(g)}placeholder(){const{activeDrag:g}=this.state;if(!g)return null;const{width:m,cols:S,margin:E,containerPadding:T,rowHeight:M,maxRows:D,useCSSTransforms:A,transformScale:z}=this.props;return e.createElement(a.default,{w:g.w,h:g.h,x:g.x,y:g.y,i:g.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:m,cols:S,margin:E,containerPadding:T||E,maxRows:D,rowHeight:M,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:A,transformScale:z},e.createElement("div",null))}processGridItem(g,m){if(!g||!g.key)return;const S=(0,i.getLayoutItem)(this.state.layout,String(g.key));if(!S)return null;const{width:E,cols:T,margin:M,containerPadding:D,rowHeight:A,maxRows:z,isDraggable:J,isResizable:Z,isBounded:_,useCSSTransforms:H,transformScale:B,draggableCancel:K,draggableHandle:q,resizeHandles:X,resizeHandle:fe}=this.props,{mounted:ae,droppingPosition:Y}=this.state,$=typeof S.isDraggable=="boolean"?S.isDraggable:!S.static&&J,ue=typeof S.isResizable=="boolean"?S.isResizable:!S.static&&Z,ye=S.resizeHandles||X,pe=$&&_&&S.isBounded!==!1;return e.createElement(a.default,{containerWidth:E,cols:T,margin:M,containerPadding:D||M,maxRows:z,rowHeight:A,cancel:K,handle:q,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:$,isResizable:ue,isBounded:pe,useCSSTransforms:H&&ae,usePercentages:!ae,transformScale:B,w:S.w,h:S.h,x:S.x,y:S.y,i:S.i,minH:S.minH,minW:S.minW,maxH:S.maxH,maxW:S.maxW,static:S.static,droppingPosition:m?Y:void 0,resizeHandles:ye,resizeHandle:fe},g)}render(){const{className:g,style:m,isDroppable:S,innerRef:E}=this.props,T=(0,n.default)(w,g),M={height:this.containerHeight(),...m};return e.createElement("div",{ref:E,className:T,style:M,onDrop:S?this.onDrop:i.noop,onDragLeave:S?this.onDragLeave:i.noop,onDragEnter:S?this.onDragEnter:i.noop,onDragOver:S?this.onDragOver:i.noop},e.Children.map(this.props.children,D=>this.processGridItem(D)),S&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}return Bo.default=y,h(y,"displayName","ReactGridLayout"),h(y,"propTypes",u.default),h(y,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:i.noop,onDragStart:i.noop,onDrag:i.noop,onDragStop:i.noop,onResizeStart:i.noop,onResize:i.noop,onResizeStop:i.noop,onDrop:i.noop,onDropDragOver:i.noop}),Bo}var Zo={},ii={},ng;function Ov(){if(ng)return ii;ng=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.findOrGenerateResponsiveLayout=i,ii.getBreakpointFromWidth=t,ii.getColsFromBreakpoint=n,ii.sortBreakpoints=s;var e=po();function t(a,u){const c=s(a);let f=c[0];for(let p=1,h=c.length;p<h;p++){const x=c[p];u>a[x]&&(f=x)}return f}function n(a,u){if(!u[a])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+a+" is missing!");return u[a]}function i(a,u,c,f,p,h){if(a[c])return(0,e.cloneLayout)(a[c]);let x=a[f];const R=s(u),w=R.slice(R.indexOf(c));for(let C=0,y=w.length;C<y;C++){const v=w[C];if(a[v]){x=a[v];break}}return x=(0,e.cloneLayout)(x||[]),(0,e.compact)((0,e.correctBounds)(x,{cols:p}),h,p)}function s(a){return Object.keys(a).sort(function(c,f){return a[c]-a[f]})}return ii}var rg;function eI(){if(rg)return Zo;rg=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=void 0;var e=f(j),t=u(wr()),n=If(),i=po(),s=Ov(),a=u(Ev());function u(v){return v&&v.__esModule?v:{default:v}}function c(v){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(c=function(S){return S?m:g})(v)}function f(v,g){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var m=c(g);if(m&&m.has(v))return m.get(v);var S={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in v)if(T!=="default"&&Object.prototype.hasOwnProperty.call(v,T)){var M=E?Object.getOwnPropertyDescriptor(v,T):null;M&&(M.get||M.set)?Object.defineProperty(S,T,M):S[T]=v[T]}return S.default=v,m&&m.set(v,S),S}function p(){return p=Object.assign?Object.assign.bind():function(v){for(var g=1;g<arguments.length;g++){var m=arguments[g];for(var S in m)Object.prototype.hasOwnProperty.call(m,S)&&(v[S]=m[S])}return v},p.apply(this,arguments)}function h(v,g,m){return g=x(g),g in v?Object.defineProperty(v,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[g]=m,v}function x(v){var g=R(v,"string");return typeof g=="symbol"?g:String(g)}function R(v,g){if(typeof v!="object"||v===null)return v;var m=v[Symbol.toPrimitive];if(m!==void 0){var S=m.call(v,g);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}const w=v=>Object.prototype.toString.call(v);function C(v,g){return v==null?null:Array.isArray(v)?v:v[g]}let y=class extends e.Component{constructor(){super(...arguments),h(this,"state",this.generateInitialState()),h(this,"onLayoutChange",g=>{this.props.onLayoutChange(g,{...this.props.layouts,[this.state.breakpoint]:g})})}generateInitialState(){const{width:g,breakpoints:m,layouts:S,cols:E}=this.props,T=(0,s.getBreakpointFromWidth)(m,g),M=(0,s.getColsFromBreakpoint)(T,E),D=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,s.findOrGenerateResponsiveLayout)(S,m,T,T,M,D),breakpoint:T,cols:M}}static getDerivedStateFromProps(g,m){if(!(0,n.deepEqual)(g.layouts,m.layouts)){const{breakpoint:S,cols:E}=m;return{layout:(0,s.findOrGenerateResponsiveLayout)(g.layouts,g.breakpoints,S,S,E,g.compactType),layouts:g.layouts}}return null}componentDidUpdate(g){(this.props.width!=g.width||this.props.breakpoint!==g.breakpoint||!(0,n.deepEqual)(this.props.breakpoints,g.breakpoints)||!(0,n.deepEqual)(this.props.cols,g.cols))&&this.onWidthChange(g)}onWidthChange(g){const{breakpoints:m,cols:S,layouts:E,compactType:T}=this.props,M=this.props.breakpoint||(0,s.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),D=this.state.breakpoint,A=(0,s.getColsFromBreakpoint)(M,S),z={...E};if(D!==M||g.breakpoints!==m||g.cols!==S){D in z||(z[D]=(0,i.cloneLayout)(this.state.layout));let _=(0,s.findOrGenerateResponsiveLayout)(z,m,M,D,A,T);_=(0,i.synchronizeLayoutWithChildren)(_,this.props.children,A,T,this.props.allowOverlap),z[M]=_,this.props.onBreakpointChange(M,A),this.props.onLayoutChange(_,z),this.setState({breakpoint:M,layout:_,cols:A})}const J=C(this.props.margin,M),Z=C(this.props.containerPadding,M);this.props.onWidthChange(this.props.width,J,A,Z)}render(){const{breakpoint:g,breakpoints:m,cols:S,layouts:E,margin:T,containerPadding:M,onBreakpointChange:D,onLayoutChange:A,onWidthChange:z,...J}=this.props;return e.createElement(a.default,p({},J,{margin:C(T,this.state.breakpoint),containerPadding:C(M,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return Zo.default=y,h(y,"propTypes",{breakpoint:t.default.string,breakpoints:t.default.object,allowOverlap:t.default.bool,cols:t.default.object,margin:t.default.oneOfType([t.default.array,t.default.object]),containerPadding:t.default.oneOfType([t.default.array,t.default.object]),layouts(v,g){if(w(v[g])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+w(v[g]));Object.keys(v[g]).forEach(m=>{if(!(m in v.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,i.validateLayout)(v.layouts[m],"layouts."+m)})},width:t.default.number.isRequired,onBreakpointChange:t.default.func,onLayoutChange:t.default.func,onWidthChange:t.default.func}),h(y,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:i.noop,onLayoutChange:i.noop,onWidthChange:i.noop}),Zo}var $a={},Tv=function(){if(typeof Map<"u")return Map;function e(t,n){var i=-1;return t.some(function(s,a){return s[0]===n?(i=a,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var i=e(this.__entries__,n),s=this.__entries__[i];return s&&s[1]},t.prototype.set=function(n,i){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=i:this.__entries__.push([n,i])},t.prototype.delete=function(n){var i=this.__entries__,s=e(i,n);~s&&i.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,i){i===void 0&&(i=null);for(var s=0,a=this.__entries__;s<a.length;s++){var u=a[s];n.call(i,u[1],u[0])}},t}()}(),jc=typeof window<"u"&&typeof document<"u"&&window.document===document,uu=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),tI=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(uu):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),nI=2;function rI(e,t){var n=!1,i=!1,s=0;function a(){n&&(n=!1,e()),i&&c()}function u(){tI(a)}function c(){var f=Date.now();if(n){if(f-s<nI)return;i=!0}else n=!0,i=!1,setTimeout(u,t);s=f}return c}var iI=20,oI=["top","right","bottom","left","width","height","size","weight"],sI=typeof MutationObserver<"u",aI=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=rI(this.refresh.bind(this),iI)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,i=n.indexOf(t);~i&&n.splice(i,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!jc||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),sI?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!jc||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,i=n===void 0?"":n,s=oI.some(function(a){return!!~i.indexOf(a)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Cv=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},uo=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||uu},_v=$u(0,0,0,0);function lu(e){return parseFloat(e)||0}function ig(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(i,s){var a=e["border-"+s+"-width"];return i+lu(a)},0)}function uI(e){for(var t=["top","right","bottom","left"],n={},i=0,s=t;i<s.length;i++){var a=s[i],u=e["padding-"+a];n[a]=lu(u)}return n}function lI(e){var t=e.getBBox();return $u(0,0,t.width,t.height)}function cI(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return _v;var i=uo(e).getComputedStyle(e),s=uI(i),a=s.left+s.right,u=s.top+s.bottom,c=lu(i.width),f=lu(i.height);if(i.boxSizing==="border-box"&&(Math.round(c+a)!==t&&(c-=ig(i,"left","right")+a),Math.round(f+u)!==n&&(f-=ig(i,"top","bottom")+u)),!dI(e)){var p=Math.round(c+a)-t,h=Math.round(f+u)-n;Math.abs(p)!==1&&(c-=p),Math.abs(h)!==1&&(f-=h)}return $u(s.left,s.top,c,f)}var fI=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof uo(e).SVGGraphicsElement}:function(e){return e instanceof uo(e).SVGElement&&typeof e.getBBox=="function"}}();function dI(e){return e===uo(e).document.documentElement}function pI(e){return jc?fI(e)?lI(e):cI(e):_v}function hI(e){var t=e.x,n=e.y,i=e.width,s=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,u=Object.create(a.prototype);return Cv(u,{x:t,y:n,width:i,height:s,top:n,right:t+i,bottom:s+n,left:t}),u}function $u(e,t,n,i){return{x:e,y:t,width:n,height:i}}var mI=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=$u(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=pI(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),gI=function(){function e(t,n){var i=hI(n);Cv(this,{target:t,contentRect:i})}return e}(),yI=function(){function e(t,n,i){if(this.activeObservations_=[],this.observations_=new Tv,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=i}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof uo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new mI(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof uo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new gI(i.target,i.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Rv=typeof WeakMap<"u"?new WeakMap:new Tv,Dv=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=aI.getInstance(),i=new yI(t,n,this);Rv.set(this,i)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Dv.prototype[e]=function(){var t;return(t=Rv.get(this))[e].apply(t,arguments)}});var vI=function(){return typeof uu.ResizeObserver<"u"?uu.ResizeObserver:Dv}();const bI=Object.freeze(Object.defineProperty({__proto__:null,default:vI},Symbol.toStringTag,{value:"Module"})),wI=Xg(bI);var og;function xI(){if(og)return $a;og=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.default=R;var e=u(j),t=s(wr()),n=s(wI),i=s(Nf());function s(w){return w&&w.__esModule?w:{default:w}}function a(w){if(typeof WeakMap!="function")return null;var C=new WeakMap,y=new WeakMap;return(a=function(v){return v?y:C})(w)}function u(w,C){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var y=a(C);if(y&&y.has(w))return y.get(w);var v={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in w)if(m!=="default"&&Object.prototype.hasOwnProperty.call(w,m)){var S=g?Object.getOwnPropertyDescriptor(w,m):null;S&&(S.get||S.set)?Object.defineProperty(v,m,S):v[m]=w[m]}return v.default=w,y&&y.set(w,v),v}function c(){return c=Object.assign?Object.assign.bind():function(w){for(var C=1;C<arguments.length;C++){var y=arguments[C];for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(w[v]=y[v])}return w},c.apply(this,arguments)}function f(w,C,y){return C=p(C),C in w?Object.defineProperty(w,C,{value:y,enumerable:!0,configurable:!0,writable:!0}):w[C]=y,w}function p(w){var C=h(w,"string");return typeof C=="symbol"?C:String(C)}function h(w,C){if(typeof w!="object"||w===null)return w;var y=w[Symbol.toPrimitive];if(y!==void 0){var v=y.call(w,C);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(w)}const x="react-grid-layout";function R(w){var C;return C=class extends e.Component{constructor(){super(...arguments),f(this,"state",{width:1280}),f(this,"elementRef",e.createRef()),f(this,"mounted",!1),f(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default(g=>{if(this.elementRef.current instanceof HTMLElement){const S=g[0].contentRect.width;this.setState({width:S})}});const v=this.elementRef.current;v instanceof HTMLElement&&this.resizeObserver.observe(v)}componentWillUnmount(){this.mounted=!1;const v=this.elementRef.current;v instanceof HTMLElement&&this.resizeObserver.unobserve(v),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:v,...g}=this.props;return v&&!this.mounted?e.createElement("div",{className:(0,i.default)(this.props.className,x),style:this.props.style,ref:this.elementRef}):e.createElement(w,c({innerRef:this.elementRef},g,this.state))}},f(C,"defaultProps",{measureBeforeMount:!1}),f(C,"propTypes",{measureBeforeMount:t.default.bool}),C}return $a}var sg;function SI(){return sg||(sg=1,function(e){e.exports=Ev().default,e.exports.utils=po(),e.exports.calculateUtils=Af(),e.exports.Responsive=eI().default,e.exports.Responsive.utils=Ov(),e.exports.WidthProvider=xI().default}(vc)),vc.exports}var ag=SI();const EI=ag.WidthProvider(ag.Responsive),OI=({items:e,storageKey:t,defaultLayouts:n})=>{const i=j.useRef(null),s=me.useTheme(),[a,u]=j.useState(!1),[c,f]=j.useState(n),[p,h]=j.useState(1200),{editMode:x}=Pf();j.useEffect(()=>{try{const w=localStorage.getItem(t),C=["lg","md","sm","xs"],y={lg:[],md:[],sm:[],xs:[]};let v=n;if(w)try{v=JSON.parse(w)}catch(g){console.error("Failed to parse saved layouts:",g)}for(const g of C){const m=v[g]||[],S=new Map(m.map(E=>[E.i,E]));e.forEach(E=>{const T=S.get(E.id);T?T.w===1&&T.h===1&&E.layout?y[g].push({...E.layout}):y[g].push({...T}):E.layout?y[g].push({...E.layout}):console.warn(`Grid item "${E.id}" has no registered layout. Components should register with default sizes via registerGridItem().`)})}f(y)}catch(w){console.error("Failed to load layouts:",w)}},[t,e,n]);const R=j.useCallback((w,C)=>{f(C);try{localStorage.setItem(t,JSON.stringify(C))}catch(y){console.error("Failed to save layouts:",y)}},[t]);return j.useEffect(()=>{u(!0),i.current&&h(i.current.getBoundingClientRect().width)},[]),a?F.jsxs(me.Box,{sx:{width:"100%",height:"100%",position:"relative"},ref:i,children:[x&&F.jsx(me.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0,pointerEvents:"none",backgroundSize:"30px 30px",backgroundImage:`linear-gradient(to right, ${Ka(s.palette.primary.main,.05)} 1px, transparent 1px), linear-gradient(to bottom, ${Ka(s.palette.primary.main,.05)} 1px, transparent 1px)`}}),F.jsx(EI,{className:"layout",layouts:c,breakpoints:{lg:1200,md:996,sm:768,xs:480},cols:{lg:15,md:15,sm:15,xs:15},rowHeight:200,width:p,containerPadding:[0,0],isResizable:x,isDraggable:x,compactType:null,preventCollision:!0,useCSSTransforms:a,onLayoutChange:R,resizeHandles:["se","sw","ne","nw"],children:e.map(w=>F.jsx(me.Box,{sx:{borderRadius:1,overflow:"hidden",position:"relative",outline:x?`2px dashed ${s.palette.primary.main}`:"none","&:hover":{outline:x?`2px solid ${s.palette.primary.main}`:"none"}},children:F.jsx(me.Box,{sx:{pointerEvents:x?"none":"auto",overflow:"hidden",position:"relative",height:"100%",width:"100%"},children:w.content})},w.id))})]}):null};function Mv(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.error("Error loading from localStorage:",t),null}}function Hc(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error("Error saving to localStorage:",n)}}const Os="user-layout-presets";function Lu(){try{const e=localStorage.getItem(Os);return e?JSON.parse(e):[]}catch(e){return console.error("Failed to load user presets:",e),[]}}function TI(e,t){try{const n=Lu(),i=`preset-${Date.now()}`,s=Date.now(),a=JSON.parse(JSON.stringify(t));return n.push({id:i,name:e,layouts:a,createdAt:s,updatedAt:s}),localStorage.setItem(Os,JSON.stringify(n)),i}catch(n){return console.error("Failed to save user preset:",n),""}}function CI(e){try{const t=Lu();if(!t.some(s=>s.id===e))return!1;const i=t.filter(s=>s.id!==e);return localStorage.setItem(Os,JSON.stringify(i)),!0}catch(t){return console.error("Failed to delete user preset:",t),!1}}function _I(e,t){try{const n=Lu(),i=n.findIndex(s=>s.id===e);return i===-1?!1:(n[i]={...n[i],...t,updatedAt:Date.now()},localStorage.setItem(Os,JSON.stringify(n)),!0)}catch(n){return console.error("Failed to update user preset:",n),!1}}function RI(e,t){try{const n=Object.keys(e).sort(),i=Object.keys(t).sort();if(n.length!==i.length||n.join(",")!==i.join(","))return!1;for(const s of n){const a=e[s]||[],u=t[s]||[];if(a.length!==u.length)return!1;const c=new Map(a.map(p=>[p.i,p])),f=new Map(u.map(p=>[p.i,p]));if(c.size!==f.size)return!1;for(const[p,h]of c.entries()){const x=f.get(p);if(!x||h.x!==x.x||h.y!==x.y||h.w!==x.w||h.h!==x.h||h.minW!==x.minW||h.minH!==x.minH||h.maxW!==x.maxW||h.maxH!==x.maxH||h.static!==x.static)return!1}}return!0}catch(n){return console.error("Error comparing layouts:",n),!1}}function DI({storageKey:e,defaultLayouts:t,onLayoutChangeCallback:n,debounceTime:i=500}){const[s,a]=j.useState(()=>Mv(e)||JSON.parse(JSON.stringify(t))),u=j.useRef(s),c=j.useRef(null),f=j.useRef(!1),p=j.useCallback((R,w)=>{if(f.current||RI(w,u.current))return;f.current=!0,u.current=w,a(w),c.current&&clearTimeout(c.current);const C=()=>{Hc(e,w),n&&n(w),f.current=!1};c.current=window.setTimeout(C,i)},[e,n,i]),h=j.useCallback(R=>{const w=JSON.parse(JSON.stringify(R));u.current=w,a(w),Hc(e,w),n&&n(w)},[e,n,s]),x=j.useCallback(()=>{h(t)},[h,t]);return j.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]),{layouts:s,onLayoutChange:p,applyLayout:h,resetToDefault:x}}const MI=jt(F.jsx("path",{d:"M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"}),"ViewModule"),PI=jt(F.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"DesktopWindows"),ug=jt(F.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"}),"Tablet"),II=jt(F.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphone"),Ji={lg:{description:"Large screens (≥1200px)",color:"primary",icon:"desktop"},md:{description:"Medium screens (≥996px)",color:"success",icon:"tablet"},sm:{description:"Small screens (≥768px)",color:"info",icon:"tabletRotated"},xs:{description:"Extra small screens (<768px)",color:"warning",icon:"phone"}},Pv=({showLabel:e=!1})=>{const t=me.useTheme(),n=me.useMediaQuery(t.breakpoints.between("sm","md")),i=me.useMediaQuery(t.breakpoints.between("md","lg")),s=me.useMediaQuery(t.breakpoints.up("lg"));let a,u,c;return s?(a="lg",u=F.jsx(PI,{fontSize:"small"}),c=Ji.lg.color):i?(a="md",u=F.jsx(ug,{fontSize:"small"}),c=Ji.md.color):n?(a="sm",u=F.jsx(ug,{fontSize:"small",sx:{transform:"rotate(90deg)"}}),c=Ji.sm.color):(a="xs",u=F.jsx(II,{fontSize:"small"}),c=Ji.xs.color),F.jsx(me.Tooltip,{title:Ji[a].description,children:F.jsx(me.Chip,{icon:u,label:e?a.toUpperCase():void 0,color:c,size:"small",variant:"outlined",sx:{height:24,minWidth:e?48:32,".MuiChip-icon":{ml:e?void 0:"0px",mr:e?void 0:"-6px"}}})})},NI=()=>{const{editMode:e,toggleEditMode:t}=fo(),n=()=>{t()};return F.jsxs(me.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[F.jsx(me.Tooltip,{title:e?"Exit Layout Edit Mode":"Edit Layout",children:F.jsx(me.IconButton,{onClick:n,size:"small",color:e?"primary":"default",sx:{border:e?"1px solid":"none","&:hover":{backgroundColor:e?"rgba(25, 118, 210, 0.08)":void 0}},children:F.jsx(MI,{})})}),e&&F.jsxs(F.Fragment,{children:[F.jsx(me.Divider,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),F.jsx(Pv,{showLabel:!0})]})]})},AI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Lf=AI?j.useLayoutEffect:j.useEffect;function kI(e){const t=j.useRef(e);return Lf(()=>{t.current=e}),j.useCallback(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return t.current==null?void 0:t.current(...i)},[])}function $I(e,t){t===void 0&&(t=[e]);const n=j.useRef(e);return Lf(()=>{n.current!==e&&(n.current=e)},t),n}function lg(e){const t=kI(e),n=j.useRef(null),i=j.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,i]}let xc={};function LI(e,t){return j.useMemo(()=>{const n=xc[e]==null?0:xc[e]+1;return xc[e]=n,e+"-"+n},[e,t])}var cg;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(cg||(cg={}));function fg(){}const zI=Object.freeze({x:0,y:0});var Ki;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ki||(Ki={}));var dg;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(dg||(dg={}));var Ar;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ar||(Ar={}));Ar.Space,Ar.Enter,Ar.Esc,Ar.Space,Ar.Enter,Ar.Tab;var pg;(function(e){e[e.RightClick=2]="RightClick"})(pg||(pg={}));var hg;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hg||(hg={}));var mg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(mg||(mg={}));Ki.Backward+"",Ki.Forward+"",Ki.Backward+"",Ki.Forward+"";var qc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qc||(qc={}));var Vc;(function(e){e.Optimized="optimized"})(Vc||(Vc={}));function FI(e,t){return j.useMemo(()=>e.reduce((n,i)=>{let{eventName:s,handler:a}=i;return n[s]=u=>{a(u,t)},n},{}),[e,t])}qc.WhileDragging,Vc.Optimized;const WI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:fg,draggableNodes:new Map,over:null,measureDroppableContainers:fg},BI=j.createContext(WI),UI=j.createContext({...zI,scaleX:1,scaleY:1});var gg;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(gg||(gg={}));const jI=j.createContext(null),yg="button",HI="Draggable";function qI(e){let{id:t,data:n,disabled:i=!1,attributes:s}=e;const a=LI(HI),{activators:u,activatorEvent:c,active:f,activeNodeRect:p,ariaDescribedById:h,draggableNodes:x,over:R}=j.useContext(BI),{role:w=yg,roleDescription:C="draggable",tabIndex:y=0}=s??{},v=(f==null?void 0:f.id)===t,g=j.useContext(v?UI:jI),[m,S]=lg(),[E,T]=lg(),M=FI(u,t),D=$I(n);Lf(()=>(x.set(t,{id:t,key:a,node:m,activatorNode:E,data:D}),()=>{const z=x.get(t);z&&z.key===a&&x.delete(t)}),[x,t]);const A=j.useMemo(()=>({role:w,tabIndex:y,"aria-disabled":i,"aria-pressed":v&&w===yg?!0:void 0,"aria-roledescription":C,"aria-describedby":h.draggable}),[i,w,y,v,C,h.draggable]);return{active:f,activatorEvent:c,activeNodeRect:p,attributes:A,isDragging:v,listeners:i?void 0:M,node:m,over:R,setNodeRef:S,setActivatorNodeRef:T,transform:g}}function VI({id:e,children:t}){const{attributes:n,listeners:i,setNodeRef:s,transform:a}=qI({id:e}),u={transform:a?`translate(${a.x}px, ${a.y}px)`:void 0,cursor:"pointer",userSelect:"none"};return F.jsx("div",{ref:s,style:u,...n,...i,children:t})}const GI=e=>{if(!e)return!0;const t=`notification_shown_${e}`;return localStorage.getItem(t)?!1:(localStorage.setItem(t,"true"),!0)},zf=co.create(e=>({notifications:[],addNotificationData:t=>{t.singular&&!GI(t.singularId)||e(n=>({notifications:[...n.notifications,{...t,id:`${Date.now()*Math.random()}`}]}))},removeNotificationData:t=>{e(n=>({notifications:n.notifications.filter(i=>i.id!==`${t}`)}))},clearNotificationsByType:t=>{e(n=>({notifications:n.notifications.filter(i=>i.type!==t)}))}})),YI=({action:e,maxAttempts:t=3,delay:n=1e3,successMessage:i="Operation successful",errorMessage:s="Operation failed, retrying...",condition:a=!0})=>{const[u,c]=j.useState(0),{addNotificationData:f,clearNotificationsByType:p}=zf(),h=j.useCallback(()=>{if(a&&u<t){const x=setTimeout(()=>{e(),c(R=>R+1)},n);return()=>clearTimeout(x)}else u>=t?f({type:"error",message:s}):a||(p("error"),f({type:"success",message:i}))},[e,u,a,t,n,s,i,p]);return j.useEffect(()=>h(),[h]),{attempts:u}},ZI=({title:e,dialogId:t,callOnOpen:n,showTitle:i=!0,onOpenDialog:s,icon:a})=>{const u=c=>{c.stopPropagation(),c.preventDefault(),s?s(t):console.warn("DialogOpener: onOpenDialog prop not provided. Please provide a dialog store handler."),n&&n(c)};return F.jsxs(me.MenuItem,{component:me.Button,onClick:u,style:{marginLeft:"auto",zIndex:1e3,width:"100%",display:"flex",justifyContent:"left",columnGap:2},children:[a," ",i&&e]})},Iv=jt(F.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Nv=({children:e,open:t,onClose:n,...i})=>{const s=me.useTheme(),a=me.useMediaQuery(s.breakpoints.down("sm"));return F.jsx(me.Dialog,{sx:{"& .MuiDialog-paper":{borderRadius:a?"0px !important":"14px",height:a?"100vh":"90vh",display:"flex",flexDirection:"column",maxHeight:a?"100vh":"90vh",margin:a?0:void 0}},open:t,onClose:n,fullScreen:a,...i,children:e})},XI=({onSubmit:e,title:t,children:n,submitText:i="Submit",disableSubmit:s=!1,showUnsavedChangesWarning:a=!1,isDirty:u=!1,onClose:c,...f})=>{const[p,h]=j.useState(!1),x=()=>{a&&u?h(!0):c?c():console.warn("FormDialog: onClose prop not provided. Please provide a close handler.")},R=()=>{h(!1),c&&c()};return F.jsxs(F.Fragment,{children:[F.jsxs(Nv,{open:!0,onClose:x,...f,children:[F.jsxs(me.DialogTitle,{sx:{m:0,p:2,pr:6},children:[t,F.jsx(me.IconButton,{"aria-label":"close",onClick:x,sx:{position:"absolute",right:8,top:8,color:w=>w.palette.grey[500]},children:F.jsx(Iv,{})})]}),F.jsx(me.DialogContent,{sx:{p:"24px",overflow:"hidden",display:"flex",flexDirection:"column",minHeight:0},children:F.jsxs("form",{onSubmit:e,style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[F.jsx(me.Box,{sx:{flex:1,minHeight:0,overflow:"auto"},children:n}),F.jsxs(me.DialogActions,{sx:{borderTop:1,borderColor:"divider"},children:[F.jsx(me.Button,{onClick:x,children:"Cancel"}),F.jsx(me.Button,{type:"submit",variant:"contained",disabled:!u||s,color:"primary",children:i})]})]})})]}),F.jsxs(me.Dialog,{open:p,onClose:()=>h(!1),children:[F.jsx(me.DialogTitle,{children:"Unsaved Changes"}),F.jsx(me.DialogContent,{children:F.jsx(me.DialogContentText,{children:"You have unsaved changes. Are you sure you want to close?"})}),F.jsxs(me.DialogActions,{children:[F.jsx(me.Button,{onClick:()=>h(!1),children:"Cancel"}),F.jsx(me.Button,{onClick:R,color:"warning",children:"Close Without Saving"})]})]})]})},Av=new Map;function JI(e,t){Av.set(e,t)}function KI(e){return Av.get(e)}function QI(e){console.warn("openDialog called but no dialog store is configured. Please use a dialog store from the main package.")}function eN(){console.warn("closeDialog called but no dialog store is configured. Please use a dialog store from the main package.")}const tN=({openDialog:e})=>{if(!e)return null;const t=KI(e);return t?F.jsx(t,{}):null},nN=jt(F.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),rN=jt(F.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),iN=6e3,oN=({notificationKey:e})=>{const[t,n]=j.useState(100),[i,s]=j.useState(!1),a=j.useRef(null),u=j.useRef(Date.now()),c=j.useRef(0);return j.useEffect(()=>{if(i){a.current&&(clearInterval(a.current),c.current+=Date.now()-u.current);return}return u.current=Date.now(),a.current=setInterval(()=>{const f=c.current+(Date.now()-u.current),p=Math.max(0,100*(1-f/iN));n(p),p<=0&&(clearInterval(a.current),af.closeSnackbar(e))},50),()=>{a.current&&clearInterval(a.current)}},[i,e]),F.jsxs(me.Box,{sx:{position:"relative",display:"inline-flex",mr:1},children:[F.jsx(me.CircularProgress,{variant:"determinate",value:t,size:24,sx:{color:"rgba(255, 255, 255, 0.7)"}}),F.jsx(me.IconButton,{size:"small",onClick:()=>s(!i),sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"rgba(255, 255, 255, 0.7)",padding:0,"&:hover":{color:"white"},width:16,height:16},children:i?F.jsx(nN,{sx:{fontSize:12}}):F.jsx(rN,{sx:{fontSize:12}})})]})},sN=e=>F.jsx(me.IconButton,{onClick:()=>{af.closeSnackbar(e)},children:F.jsx(Iv,{})}),aN=e=>F.jsxs(me.Box,{sx:{display:"flex",alignItems:"center"},children:[F.jsx(oN,{notificationKey:e}),sN(e)]}),uN=()=>{const{notifications:e,removeNotificationData:t}=zf(),{enqueueSnackbar:n}=af.useSnackbar();return j.useEffect(()=>{e.length>0&&e.forEach(i=>{n(i.message,{variant:i.type,action:aN,autoHideDuration:null,persist:!0}),t(Number(i.id))})},[e,n,t]),F.jsx(F.Fragment,{})},lN=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,""),cN=e=>e.toLowerCase().replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),Gc=e=>{if(e==null)return e;if(Array.isArray(e))return e.map(n=>Gc(n));if(typeof e!="object")return e;const t={};return Object.entries(e).forEach(([n,i])=>{const s=cN(n);t[s]=Gc(i)}),t},Yc=e=>{if(e==null)return e;if(Array.isArray(e))return e.map(n=>Yc(n));if(typeof e!="object")return e;const t={};return Object.entries(e).forEach(([n,i])=>{const s=lN(n);t[s]=Yc(i)}),t};class Oi extends Error{}class fN extends Oi{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class dN extends Oi{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class pN extends Oi{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Qi extends Oi{}class kv extends Oi{constructor(t){super(`Invalid unit ${t}`)}}class kt extends Oi{}class Nr extends Oi{constructor(){super("Zone is an abstract class")}}const Se="numeric",Wn="short",cn="long",cu={year:Se,month:Se,day:Se},$v={year:Se,month:Wn,day:Se},hN={year:Se,month:Wn,day:Se,weekday:Wn},Lv={year:Se,month:cn,day:Se},zv={year:Se,month:cn,day:Se,weekday:cn},Fv={hour:Se,minute:Se},Wv={hour:Se,minute:Se,second:Se},Bv={hour:Se,minute:Se,second:Se,timeZoneName:Wn},Uv={hour:Se,minute:Se,second:Se,timeZoneName:cn},jv={hour:Se,minute:Se,hourCycle:"h23"},Hv={hour:Se,minute:Se,second:Se,hourCycle:"h23"},qv={hour:Se,minute:Se,second:Se,hourCycle:"h23",timeZoneName:Wn},Vv={hour:Se,minute:Se,second:Se,hourCycle:"h23",timeZoneName:cn},Gv={year:Se,month:Se,day:Se,hour:Se,minute:Se},Yv={year:Se,month:Se,day:Se,hour:Se,minute:Se,second:Se},Zv={year:Se,month:Wn,day:Se,hour:Se,minute:Se},Xv={year:Se,month:Wn,day:Se,hour:Se,minute:Se,second:Se},mN={year:Se,month:Wn,day:Se,weekday:Wn,hour:Se,minute:Se},Jv={year:Se,month:cn,day:Se,hour:Se,minute:Se,timeZoneName:Wn},Kv={year:Se,month:cn,day:Se,hour:Se,minute:Se,second:Se,timeZoneName:Wn},Qv={year:Se,month:cn,day:Se,weekday:cn,hour:Se,minute:Se,timeZoneName:cn},e0={year:Se,month:cn,day:Se,weekday:cn,hour:Se,minute:Se,second:Se,timeZoneName:cn};class Ts{get type(){throw new Nr}get name(){throw new Nr}get ianaName(){return this.name}get isUniversal(){throw new Nr}offsetName(t,n){throw new Nr}formatOffset(t,n){throw new Nr}offset(t){throw new Nr}equals(t){throw new Nr}get isValid(){throw new Nr}}let Sc=null;class zu extends Ts{static get instance(){return Sc===null&&(Sc=new zu),Sc}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return f0(t,n,i)}formatOffset(t,n){return us(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const Zc=new Map;function gN(e){let t=Zc.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Zc.set(e,t)),t}const yN={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function vN(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,u,c,f,p,h]=i;return[u,s,a,c,f,p,h]}function bN(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:a,value:u}=n[s],c=yN[a];a==="era"?i[c]=u:Ae(c)||(i[c]=parseInt(u,10))}return i}const Ec=new Map;class br extends Ts{static create(t){let n=Ec.get(t);return n===void 0&&Ec.set(t,n=new br(t)),n}static resetCache(){Ec.clear(),Zc.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=br.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return f0(t,n,i,this.name)}formatOffset(t,n){return us(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=gN(this.name);let[s,a,u,c,f,p,h]=i.formatToParts?bN(i,n):vN(i,n);c==="BC"&&(s=-Math.abs(s)+1);const R=Wu({year:s,month:a,day:u,hour:f===24?0:f,minute:p,second:h,millisecond:0});let w=+n;const C=w%1e3;return w-=C>=0?C:1e3+C,(R-w)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let vg={};function wN(e,t={}){const n=JSON.stringify([e,t]);let i=vg[n];return i||(i=new Intl.ListFormat(e,t),vg[n]=i),i}const Xc=new Map;function Jc(e,t={}){const n=JSON.stringify([e,t]);let i=Xc.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Xc.set(n,i)),i}const Kc=new Map;function xN(e,t={}){const n=JSON.stringify([e,t]);let i=Kc.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),Kc.set(n,i)),i}const Qc=new Map;function SN(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let a=Qc.get(s);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),Qc.set(s,a)),a}let ns=null;function EN(){return ns||(ns=new Intl.DateTimeFormat().resolvedOptions().locale,ns)}const ef=new Map;function t0(e){let t=ef.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),ef.set(e,t)),t}const tf=new Map;function ON(e){let t=tf.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...n0,...t}),tf.set(e,t)}return t}function TN(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,s;try{i=Jc(e).resolvedOptions(),s=e}catch{const f=e.substring(0,n);i=Jc(f).resolvedOptions(),s=f}const{numberingSystem:a,calendar:u}=i;return[s,a,u]}}function CN(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function _N(e){const t=[];for(let n=1;n<=12;n++){const i=ke.utc(2009,n,1);t.push(e(i))}return t}function RN(e){const t=[];for(let n=1;n<=7;n++){const i=ke.utc(2016,11,13+n);t.push(e(i))}return t}function La(e,t,n,i){const s=e.listingMode();return s==="error"?null:s==="en"?n(t):i(t)}function DN(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||t0(e.locale).numberingSystem==="latn"}class MN{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:a,...u}=i;if(!n||Object.keys(u).length>0){const c={useGrouping:!1,...i};i.padTo>0&&(c.minimumIntegerDigits=i.padTo),this.inf=xN(t,c)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):jf(t,3);return St(n,this.padTo)}}}class PN{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const u=-1*(t.offset/60),c=u>=0?`Etc/GMT+${u}`:`Etc/GMT${u}`;t.offset!==0&&br.create(c).valid?(s=c,this.dt=t):(s="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,s=t.zone.name):(s="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Jc(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class IN{constructor(t,n,i){this.opts={style:"long",...i},!n&&l0()&&(this.rtf=SN(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):eA(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const n0={firstDay:1,minimalDays:4,weekend:[6,7]};class Qe{static fromOpts(t){return Qe.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,s,a=!1){const u=t||yt.defaultLocale,c=u||(a?"en-US":EN()),f=n||yt.defaultNumberingSystem,p=i||yt.defaultOutputCalendar,h=rf(s)||yt.defaultWeekSettings;return new Qe(c,f,p,h,u)}static resetCache(){ns=null,Xc.clear(),Kc.clear(),Qc.clear(),ef.clear(),tf.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return Qe.create(t,n,i,s)}constructor(t,n,i,s,a){const[u,c,f]=TN(t);this.locale=u,this.numberingSystem=n||c||null,this.outputCalendar=i||f||null,this.weekSettings=s,this.intl=CN(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=DN(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Qe.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,rf(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return La(this,t,h0,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const s=n?{month:t,day:"numeric"}:{month:t},a=n?"format":"standalone";if(!this.monthsCache[a][t]){const u=i?c=>this.dtFormatter(c,s).format():c=>this.extract(c,s,"month");this.monthsCache[a][t]=_N(u)}return this.monthsCache[a][t]})}weekdays(t,n=!1){return La(this,t,y0,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},s=n?"format":"standalone";return this.weekdaysCache[s][t]||(this.weekdaysCache[s][t]=RN(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][t]})}meridiems(){return La(this,void 0,()=>v0,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ke.utc(2016,11,13,9),ke.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return La(this,t,b0,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[ke.utc(-40,1,1),ke.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const s=this.dtFormatter(t,n),a=s.formatToParts(),u=a.find(c=>c.type.toLowerCase()===i);return u?u.value:null}numberFormatter(t={}){return new MN(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new PN(t,this.intl,n)}relFormatter(t={}){return new IN(this.intl,this.isEnglish(),t)}listFormatter(t={}){return wN(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||t0(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:c0()?ON(this.locale):n0}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Oc=null;class Ut extends Ts{static get utcInstance(){return Oc===null&&(Oc=new Ut(0)),Oc}static instance(t){return t===0?Ut.utcInstance:new Ut(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ut(Bu(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${us(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${us(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return us(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class NN extends Ts{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function zr(e,t){if(Ae(e)||e===null)return t;if(e instanceof Ts)return e;if(FN(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?zu.instance:n==="utc"||n==="gmt"?Ut.utcInstance:Ut.parseSpecifier(n)||br.create(e)}else return Wr(e)?Ut.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new NN(e)}const Ff={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},bg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},AN=Ff.hanidec.replace(/[\[|\]]/g,"").split("");function kN(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(Ff.hanidec)!==-1)t+=AN.indexOf(e[n]);else for(const s in bg){const[a,u]=bg[s];i>=a&&i<=u&&(t+=i-a)}}return parseInt(t,10)}else return t}const nf=new Map;function $N(){nf.clear()}function $n({numberingSystem:e},t=""){const n=e||"latn";let i=nf.get(n);i===void 0&&(i=new Map,nf.set(n,i));let s=i.get(t);return s===void 0&&(s=new RegExp(`${Ff[n]}${t}`),i.set(t,s)),s}let wg=()=>Date.now(),xg="system",Sg=null,Eg=null,Og=null,Tg=60,Cg,_g=null;class yt{static get now(){return wg}static set now(t){wg=t}static set defaultZone(t){xg=t}static get defaultZone(){return zr(xg,zu.instance)}static get defaultLocale(){return Sg}static set defaultLocale(t){Sg=t}static get defaultNumberingSystem(){return Eg}static set defaultNumberingSystem(t){Eg=t}static get defaultOutputCalendar(){return Og}static set defaultOutputCalendar(t){Og=t}static get defaultWeekSettings(){return _g}static set defaultWeekSettings(t){_g=rf(t)}static get twoDigitCutoffYear(){return Tg}static set twoDigitCutoffYear(t){Tg=t%100}static get throwOnInvalid(){return Cg}static set throwOnInvalid(t){Cg=t}static resetCaches(){Qe.resetCache(),br.resetCache(),ke.resetCache(),$N()}}class zn{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const r0=[0,31,59,90,120,151,181,212,243,273,304,334],i0=[0,31,60,91,121,152,182,213,244,274,305,335];function On(e,t){return new zn("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Wf(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function o0(e,t,n){return n+(Cs(e)?i0:r0)[t-1]}function s0(e,t){const n=Cs(e)?i0:r0,i=n.findIndex(a=>a<t),s=t-n[i];return{month:i+1,day:s}}function Bf(e,t){return(e-t+7)%7+1}function fu(e,t=4,n=1){const{year:i,month:s,day:a}=e,u=o0(i,s,a),c=Bf(Wf(i,s,a),n);let f=Math.floor((u-c+14-t)/7),p;return f<1?(p=i-1,f=gs(p,t,n)):f>gs(i,t,n)?(p=i+1,f=1):p=i,{weekYear:p,weekNumber:f,weekday:c,...Uu(e)}}function Rg(e,t=4,n=1){const{weekYear:i,weekNumber:s,weekday:a}=e,u=Bf(Wf(i,1,t),n),c=no(i);let f=s*7+a-u-7+t,p;f<1?(p=i-1,f+=no(p)):f>c?(p=i+1,f-=no(i)):p=i;const{month:h,day:x}=s0(p,f);return{year:p,month:h,day:x,...Uu(e)}}function Tc(e){const{year:t,month:n,day:i}=e,s=o0(t,n,i);return{year:t,ordinal:s,...Uu(e)}}function Dg(e){const{year:t,ordinal:n}=e,{month:i,day:s}=s0(t,n);return{year:t,month:i,day:s,...Uu(e)}}function Mg(e,t){if(!Ae(e.localWeekday)||!Ae(e.localWeekNumber)||!Ae(e.localWeekYear)){if(!Ae(e.weekday)||!Ae(e.weekNumber)||!Ae(e.weekYear))throw new Qi("Cannot mix locale-based week fields with ISO-based week fields");return Ae(e.localWeekday)||(e.weekday=e.localWeekday),Ae(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ae(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function LN(e,t=4,n=1){const i=Fu(e.weekYear),s=Tn(e.weekNumber,1,gs(e.weekYear,t,n)),a=Tn(e.weekday,1,7);return i?s?a?!1:On("weekday",e.weekday):On("week",e.weekNumber):On("weekYear",e.weekYear)}function zN(e){const t=Fu(e.year),n=Tn(e.ordinal,1,no(e.year));return t?n?!1:On("ordinal",e.ordinal):On("year",e.year)}function a0(e){const t=Fu(e.year),n=Tn(e.month,1,12),i=Tn(e.day,1,du(e.year,e.month));return t?n?i?!1:On("day",e.day):On("month",e.month):On("year",e.year)}function u0(e){const{hour:t,minute:n,second:i,millisecond:s}=e,a=Tn(t,0,23)||t===24&&n===0&&i===0&&s===0,u=Tn(n,0,59),c=Tn(i,0,59),f=Tn(s,0,999);return a?u?c?f?!1:On("millisecond",s):On("second",i):On("minute",n):On("hour",t)}function Ae(e){return typeof e>"u"}function Wr(e){return typeof e=="number"}function Fu(e){return typeof e=="number"&&e%1===0}function FN(e){return typeof e=="string"}function WN(e){return Object.prototype.toString.call(e)==="[object Date]"}function l0(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function c0(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function BN(e){return Array.isArray(e)?e:[e]}function Pg(e,t,n){if(e.length!==0)return e.reduce((i,s)=>{const a=[t(s),s];return i&&n(i[0],a[0])===i[0]?i:a},null)[1]}function UN(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function lo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function rf(e){if(e==null)return null;if(typeof e!="object")throw new kt("Week settings must be an object");if(!Tn(e.firstDay,1,7)||!Tn(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Tn(t,1,7)))throw new kt("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Tn(e,t,n){return Fu(e)&&e>=t&&e<=n}function jN(e,t){return e-t*Math.floor(e/t)}function St(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function kr(e){if(!(Ae(e)||e===null||e===""))return parseInt(e,10)}function oi(e){if(!(Ae(e)||e===null||e===""))return parseFloat(e)}function Uf(e){if(!(Ae(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function jf(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Cs(e){return e%4===0&&(e%100!==0||e%400===0)}function no(e){return Cs(e)?366:365}function du(e,t){const n=jN(t-1,12)+1,i=e+(t-n)/12;return n===2?Cs(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Wu(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Ig(e,t,n){return-Bf(Wf(e,1,t),n)+t-1}function gs(e,t=4,n=1){const i=Ig(e,t,n),s=Ig(e+1,t,n);return(no(e)-i+s)/7}function of(e){return e>99?e:e>yt.twoDigitCutoffYear?1900+e:2e3+e}function f0(e,t,n,i=null){const s=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(a.timeZone=i);const u={timeZoneName:t,...a},c=new Intl.DateTimeFormat(n,u).formatToParts(s).find(f=>f.type.toLowerCase()==="timezonename");return c?c.value:null}function Bu(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function d0(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new kt(`Invalid unit value ${e}`);return t}function pu(e,t){const n={};for(const i in e)if(lo(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=d0(s)}return n}function us(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${St(n,2)}:${St(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${St(n,2)}${St(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Uu(e){return UN(e,["hour","minute","second","millisecond"])}const HN=["January","February","March","April","May","June","July","August","September","October","November","December"],p0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qN=["J","F","M","A","M","J","J","A","S","O","N","D"];function h0(e){switch(e){case"narrow":return[...qN];case"short":return[...p0];case"long":return[...HN];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const m0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],g0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],VN=["M","T","W","T","F","S","S"];function y0(e){switch(e){case"narrow":return[...VN];case"short":return[...g0];case"long":return[...m0];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const v0=["AM","PM"],GN=["Before Christ","Anno Domini"],YN=["BC","AD"],ZN=["B","A"];function b0(e){switch(e){case"narrow":return[...ZN];case"short":return[...YN];case"long":return[...GN];default:return null}}function XN(e){return v0[e.hour<12?0:1]}function JN(e,t){return y0(t)[e.weekday-1]}function KN(e,t){return h0(t)[e.month-1]}function QN(e,t){return b0(t)[e.year<0?0:1]}function eA(e,t,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&a){const x=e==="days";switch(t){case 1:return x?"tomorrow":`next ${s[e][0]}`;case-1:return x?"yesterday":`last ${s[e][0]}`;case 0:return x?"today":`this ${s[e][0]}`}}const u=Object.is(t,-0)||t<0,c=Math.abs(t),f=c===1,p=s[e],h=i?f?p[1]:p[2]||p[1]:f?s[e][0]:e;return u?`${c} ${h} ago`:`in ${c} ${h}`}function Ng(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const tA={D:cu,DD:$v,DDD:Lv,DDDD:zv,t:Fv,tt:Wv,ttt:Bv,tttt:Uv,T:jv,TT:Hv,TTT:qv,TTTT:Vv,f:Gv,ff:Zv,fff:Jv,ffff:Qv,F:Yv,FF:Xv,FFF:Kv,FFFF:e0};class $t{static create(t,n={}){return new $t(t,n)}static parseFormat(t){let n=null,i="",s=!1;const a=[];for(let u=0;u<t.length;u++){const c=t.charAt(u);c==="'"?((i.length>0||s)&&a.push({literal:s||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",s=!s):s||c===n?i+=c:(i.length>0&&a.push({literal:/^\s+$/.test(i),val:i}),i=c,n=c)}return i.length>0&&a.push({literal:s||/^\s+$/.test(i),val:i}),a}static macroTokenToFormatOpts(t){return tA[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,i=void 0){if(this.opts.forceSimple)return St(t,n);const s={...this.opts};return n>0&&(s.padTo=n),i&&(s.signDisplay=i),this.loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(w,C)=>this.loc.extract(t,w,C),u=w=>t.isOffsetFixed&&t.offset===0&&w.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,w.format):"",c=()=>i?XN(t):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),f=(w,C)=>i?KN(t,w):a(C?{month:w}:{month:w,day:"numeric"},"month"),p=(w,C)=>i?JN(t,w):a(C?{weekday:w}:{weekday:w,month:"long",day:"numeric"},"weekday"),h=w=>{const C=$t.macroTokenToFormatOpts(w);return C?this.formatWithSystemDefault(t,C):w},x=w=>i?QN(t,w):a({era:w},"era"),R=w=>{switch(w){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return u({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return u({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return u({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return s?a({day:"numeric"},"day"):this.num(t.day);case"dd":return s?a({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return s?a({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?a({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return f("short",!0);case"LLLL":return f("long",!0);case"LLLLL":return f("narrow",!0);case"M":return s?a({month:"numeric"},"month"):this.num(t.month);case"MM":return s?a({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return f("short",!1);case"MMMM":return f("long",!1);case"MMMMM":return f("narrow",!1);case"y":return s?a({year:"numeric"},"year"):this.num(t.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?a({year:"numeric"},"year"):this.num(t.year,6);case"G":return x("short");case"GG":return x("long");case"GGGGG":return x("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(w)}};return Ng($t.parseFormat(n),R)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,s=h=>{switch(h[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},a=(h,x)=>R=>{const w=s(R);if(w){const C=x.isNegativeDuration&&w!==x.largestUnit?i:1;let y;return this.opts.signMode==="negativeLargestOnly"&&w!==x.largestUnit?y="never":this.opts.signMode==="all"?y="always":y="auto",this.num(h.get(w)*C,R.length,y)}else return R},u=$t.parseFormat(n),c=u.reduce((h,{literal:x,val:R})=>x?h:h.concat(R),[]),f=t.shiftTo(...c.map(s).filter(h=>h)),p={isNegativeDuration:f<0,largestUnit:Object.keys(f.values)[0]};return Ng(u,a(f,p))}}const w0=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ho(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function mo(...e){return t=>e.reduce(([n,i,s],a)=>{const[u,c,f]=a(t,s);return[{...n,...u},c||i,f]},[{},null,1]).slice(0,2)}function go(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const s=n.exec(e);if(s)return i(s)}return[null,null]}function x0(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=kr(t[n+s]);return[i,null,n+s]}}const S0=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,nA=`(?:${S0.source}?(?:\\[(${w0.source})\\])?)?`,Hf=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,E0=RegExp(`${Hf.source}${nA}`),qf=RegExp(`(?:[Tt]${E0.source})?`),rA=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,iA=/(\d{4})-?W(\d\d)(?:-?(\d))?/,oA=/(\d{4})-?(\d{3})/,sA=x0("weekYear","weekNumber","weekDay"),aA=x0("year","ordinal"),uA=/(\d{4})-(\d\d)-(\d\d)/,O0=RegExp(`${Hf.source} ?(?:${S0.source}|(${w0.source}))?`),lA=RegExp(`(?: ${O0.source})?`);function ro(e,t,n){const i=e[t];return Ae(i)?n:kr(i)}function cA(e,t){return[{year:ro(e,t),month:ro(e,t+1,1),day:ro(e,t+2,1)},null,t+3]}function yo(e,t){return[{hours:ro(e,t,0),minutes:ro(e,t+1,0),seconds:ro(e,t+2,0),milliseconds:Uf(e[t+3])},null,t+4]}function _s(e,t){const n=!e[t]&&!e[t+1],i=Bu(e[t+1],e[t+2]),s=n?null:Ut.instance(i);return[{},s,t+3]}function Rs(e,t){const n=e[t]?br.create(e[t]):null;return[{},n,t+1]}const fA=RegExp(`^T?${Hf.source}$`),dA=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function pA(e){const[t,n,i,s,a,u,c,f,p]=e,h=t[0]==="-",x=f&&f[0]==="-",R=(w,C=!1)=>w!==void 0&&(C||w&&h)?-w:w;return[{years:R(oi(n)),months:R(oi(i)),weeks:R(oi(s)),days:R(oi(a)),hours:R(oi(u)),minutes:R(oi(c)),seconds:R(oi(f),f==="-0"),milliseconds:R(Uf(p),x)}]}const hA={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Vf(e,t,n,i,s,a,u){const c={year:t.length===2?of(kr(t)):kr(t),month:p0.indexOf(n)+1,day:kr(i),hour:kr(s),minute:kr(a)};return u&&(c.second=kr(u)),e&&(c.weekday=e.length>3?m0.indexOf(e)+1:g0.indexOf(e)+1),c}const mA=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function gA(e){const[,t,n,i,s,a,u,c,f,p,h,x]=e,R=Vf(t,s,i,n,a,u,c);let w;return f?w=hA[f]:p?w=0:w=Bu(h,x),[R,new Ut(w)]}function yA(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const vA=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,bA=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,wA=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ag(e){const[,t,n,i,s,a,u,c]=e;return[Vf(t,s,i,n,a,u,c),Ut.utcInstance]}function xA(e){const[,t,n,i,s,a,u,c]=e;return[Vf(t,c,n,i,s,a,u),Ut.utcInstance]}const SA=ho(rA,qf),EA=ho(iA,qf),OA=ho(oA,qf),TA=ho(E0),T0=mo(cA,yo,_s,Rs),CA=mo(sA,yo,_s,Rs),_A=mo(aA,yo,_s,Rs),RA=mo(yo,_s,Rs);function DA(e){return go(e,[SA,T0],[EA,CA],[OA,_A],[TA,RA])}function MA(e){return go(yA(e),[mA,gA])}function PA(e){return go(e,[vA,Ag],[bA,Ag],[wA,xA])}function IA(e){return go(e,[dA,pA])}const NA=mo(yo);function AA(e){return go(e,[fA,NA])}const kA=ho(uA,lA),$A=ho(O0),LA=mo(yo,_s,Rs);function zA(e){return go(e,[kA,T0],[$A,LA])}const kg="Invalid Duration",C0={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},FA={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...C0},xn=146097/400,Gi=146097/4800,WA={years:{quarters:4,months:12,weeks:xn/7,days:xn,hours:xn*24,minutes:xn*24*60,seconds:xn*24*60*60,milliseconds:xn*24*60*60*1e3},quarters:{months:3,weeks:xn/28,days:xn/4,hours:xn*24/4,minutes:xn*24*60/4,seconds:xn*24*60*60/4,milliseconds:xn*24*60*60*1e3/4},months:{weeks:Gi/7,days:Gi,hours:Gi*24,minutes:Gi*24*60,seconds:Gi*24*60*60,milliseconds:Gi*24*60*60*1e3},...C0},gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],BA=gi.slice(0).reverse();function mr(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Ge(i)}function _0(e,t){let n=t.milliseconds??0;for(const i of BA.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function $g(e,t){const n=_0(e,t)<0?-1:1;gi.reduceRight((i,s)=>{if(Ae(t[s]))return i;if(i){const a=t[i]*n,u=e[s][i],c=Math.floor(a/u);t[s]+=c*n,t[i]-=c*u*n}return s},null),gi.reduce((i,s)=>{if(Ae(t[s]))return i;if(i){const a=t[i]%1;t[i]-=a,t[s]+=a*e[i][s]}return s},null)}function Lg(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Ge{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?WA:FA;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Qe.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return Ge.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new kt(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Ge({values:pu(t,Ge.normalizeUnit),loc:Qe.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Wr(t))return Ge.fromMillis(t);if(Ge.isDuration(t))return t;if(typeof t=="object")return Ge.fromObject(t);throw new kt(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=IA(t);return i?Ge.fromObject(i,n):Ge.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=AA(t);return i?Ge.fromObject(i,n):Ge.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new kt("need to specify a reason the Duration is invalid");const i=t instanceof zn?t:new zn(t,n);if(yt.throwOnInvalid)throw new pN(i);return new Ge({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new kv(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?$t.create(this.loc,i).formatDurationFromString(this,t):kg}toHuman(t={}){if(!this.isValid)return kg;const n=t.showZeros!==!1,i=gi.map(s=>{const a=this.values[s];return Ae(a)||a===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:s.slice(0,-1)}).format(a)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=jf(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},ke.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?_0(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t),i={};for(const s of gi)(lo(n.values,s)||lo(this.values,s))&&(i[s]=n.get(s)+this.get(s));return mr(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=d0(t(this.values[i],i));return mr(this,{values:n},!0)}get(t){return this[Ge.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...pu(t,Ge.normalizeUnit)};return mr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const u={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:s,conversionAccuracy:i};return mr(this,u)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return $g(this.matrix,t),mr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Lg(this.normalize().shiftToAll().toObject());return mr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(u=>Ge.normalizeUnit(u));const n={},i={},s=this.toObject();let a;for(const u of gi)if(t.indexOf(u)>=0){a=u;let c=0;for(const p in i)c+=this.matrix[p][u]*i[p],i[p]=0;Wr(s[u])&&(c+=s[u]);const f=Math.trunc(c);n[u]=f,i[u]=(c*1e3-f*1e3)/1e3}else Wr(s[u])&&(i[u]=s[u]);for(const u in i)i[u]!==0&&(n[a]+=u===a?i[u]:i[u]/this.matrix[a][u]);return $g(this.matrix,n),mr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return mr(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=Lg(this.values);return mr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of gi)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Yi="Invalid Interval";function UA(e,t){return!e||!e.isValid?mt.invalid("missing or invalid start"):!t||!t.isValid?mt.invalid("missing or invalid end"):t<e?mt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class mt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new kt("need to specify a reason the Interval is invalid");const i=t instanceof zn?t:new zn(t,n);if(yt.throwOnInvalid)throw new dN(i);return new mt({invalid:i})}static fromDateTimes(t,n){const i=Xo(t),s=Xo(n),a=UA(i,s);return a??new mt({start:i,end:s})}static after(t,n){const i=Ge.fromDurationLike(n),s=Xo(t);return mt.fromDateTimes(s,s.plus(i))}static before(t,n){const i=Ge.fromDurationLike(n),s=Xo(t);return mt.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let a,u;try{a=ke.fromISO(i,n),u=a.isValid}catch{u=!1}let c,f;try{c=ke.fromISO(s,n),f=c.isValid}catch{f=!1}if(u&&f)return mt.fromDateTimes(a,c);if(u){const p=Ge.fromISO(s,n);if(p.isValid)return mt.after(a,p)}else if(f){const p=Ge.fromISO(i,n);if(p.isValid)return mt.before(c,p)}}return mt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:i.locale}):s=this.end,s=s.startOf(t,n),Math.floor(s.diff(i,t).get(t))+(s.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?mt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Xo).filter(u=>this.contains(u)).sort((u,c)=>u.toMillis()-c.toMillis()),i=[];let{s}=this,a=0;for(;s<this.e;){const u=n[a]||this.e,c=+u>+this.e?this.e:u;i.push(mt.fromDateTimes(s,c)),s=c,a+=1}return i}splitBy(t){const n=Ge.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,a;const u=[];for(;i<this.e;){const c=this.start.plus(n.mapUnits(f=>f*s));a=+c>+this.e?this.e:c,u.push(mt.fromDateTimes(i,a)),i=a,s+=1}return u}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:mt.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return mt.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((s,a)=>s.s-a.s).reduce(([s,a],u)=>a?a.overlaps(u)||a.abutsStart(u)?[s,a.union(u)]:[s.concat([a]),u]:[s,u],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const s=[],a=t.map(f=>[{time:f.s,type:"s"},{time:f.e,type:"e"}]),u=Array.prototype.concat(...a),c=u.sort((f,p)=>f.time-p.time);for(const f of c)i+=f.type==="s"?1:-1,i===1?n=f.time:(n&&+n!=+f.time&&s.push(mt.fromDateTimes(n,f.time)),n=null);return mt.merge(s)}difference(...t){return mt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Yi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=cu,n={}){return this.isValid?$t.create(this.s.loc.clone(n),t).formatInterval(this):Yi}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Yi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Yi}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Yi}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Yi}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Ge.invalid(this.invalidReason)}mapEndpoints(t){return mt.fromDateTimes(t(this.s),t(this.e))}}class za{static hasDST(t=yt.defaultZone){const n=ke.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return br.isValidZone(t)}static normalizeZone(t){return zr(t,yt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Qe.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Qe.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Qe.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Qe.create(n,i,a)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Qe.create(n,i,a)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Qe.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Qe.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Qe.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Qe.create(n,null,"gregory").eras(t)}static features(){return{relative:l0(),localeWeek:c0()}}}function zg(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Ge.fromMillis(i).as("days"))}function jA(e,t,n){const i=[["years",(f,p)=>p.year-f.year],["quarters",(f,p)=>p.quarter-f.quarter+(p.year-f.year)*4],["months",(f,p)=>p.month-f.month+(p.year-f.year)*12],["weeks",(f,p)=>{const h=zg(f,p);return(h-h%7)/7}],["days",zg]],s={},a=e;let u,c;for(const[f,p]of i)n.indexOf(f)>=0&&(u=f,s[f]=p(e,t),c=a.plus(s),c>t?(s[f]--,e=a.plus(s),e>t&&(c=e,s[f]--,e=a.plus(s))):e=c);return[e,s,c,u]}function HA(e,t,n,i){let[s,a,u,c]=jA(e,t,n);const f=t-s,p=n.filter(x=>["hours","minutes","seconds","milliseconds"].indexOf(x)>=0);p.length===0&&(u<t&&(u=s.plus({[c]:1})),u!==s&&(a[c]=(a[c]||0)+f/(u-s)));const h=Ge.fromObject(a,i);return p.length>0?Ge.fromMillis(f,i).shiftTo(...p).plus(h):h}const qA="missing Intl.DateTimeFormat.formatToParts support";function Ze(e,t=n=>n){return{regex:e,deser:([n])=>t(kN(n))}}const VA=" ",R0=`[ ${VA}]`,D0=new RegExp(R0,"g");function GA(e){return e.replace(/\./g,"\\.?").replace(D0,R0)}function Fg(e){return e.replace(/\./g,"").replace(D0," ").toLowerCase()}function Ln(e,t){return e===null?null:{regex:RegExp(e.map(GA).join("|")),deser:([n])=>e.findIndex(i=>Fg(n)===Fg(i))+t}}function Wg(e,t){return{regex:e,deser:([,n,i])=>Bu(n,i),groups:t}}function Fa(e){return{regex:e,deser:([t])=>t}}function YA(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ZA(e,t){const n=$n(t),i=$n(t,"{2}"),s=$n(t,"{3}"),a=$n(t,"{4}"),u=$n(t,"{6}"),c=$n(t,"{1,2}"),f=$n(t,"{1,3}"),p=$n(t,"{1,6}"),h=$n(t,"{1,9}"),x=$n(t,"{2,4}"),R=$n(t,"{4,6}"),w=v=>({regex:RegExp(YA(v.val)),deser:([g])=>g,literal:!0}),y=(v=>{if(e.literal)return w(v);switch(v.val){case"G":return Ln(t.eras("short"),0);case"GG":return Ln(t.eras("long"),0);case"y":return Ze(p);case"yy":return Ze(x,of);case"yyyy":return Ze(a);case"yyyyy":return Ze(R);case"yyyyyy":return Ze(u);case"M":return Ze(c);case"MM":return Ze(i);case"MMM":return Ln(t.months("short",!0),1);case"MMMM":return Ln(t.months("long",!0),1);case"L":return Ze(c);case"LL":return Ze(i);case"LLL":return Ln(t.months("short",!1),1);case"LLLL":return Ln(t.months("long",!1),1);case"d":return Ze(c);case"dd":return Ze(i);case"o":return Ze(f);case"ooo":return Ze(s);case"HH":return Ze(i);case"H":return Ze(c);case"hh":return Ze(i);case"h":return Ze(c);case"mm":return Ze(i);case"m":return Ze(c);case"q":return Ze(c);case"qq":return Ze(i);case"s":return Ze(c);case"ss":return Ze(i);case"S":return Ze(f);case"SSS":return Ze(s);case"u":return Fa(h);case"uu":return Fa(c);case"uuu":return Ze(n);case"a":return Ln(t.meridiems(),0);case"kkkk":return Ze(a);case"kk":return Ze(x,of);case"W":return Ze(c);case"WW":return Ze(i);case"E":case"c":return Ze(n);case"EEE":return Ln(t.weekdays("short",!1),1);case"EEEE":return Ln(t.weekdays("long",!1),1);case"ccc":return Ln(t.weekdays("short",!0),1);case"cccc":return Ln(t.weekdays("long",!0),1);case"Z":case"ZZ":return Wg(new RegExp(`([+-]${c.source})(?::(${i.source}))?`),2);case"ZZZ":return Wg(new RegExp(`([+-]${c.source})(${i.source})?`),2);case"z":return Fa(/[a-z_+-/]{1,256}?/i);case" ":return Fa(/[^\S\n\r]/);default:return w(v)}})(e)||{invalidReason:qA};return y.token=e,y}const XA={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function JA(e,t,n){const{type:i,value:s}=e;if(i==="literal"){const f=/^\s+$/.test(s);return{literal:!f,val:f?" ":s}}const a=t[i];let u=i;i==="hour"&&(t.hour12!=null?u=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?u="hour12":u="hour24":u=n.hour12?"hour12":"hour24");let c=XA[u];if(typeof c=="object"&&(c=c[a]),c)return{literal:!1,val:c}}function KA(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function QA(e,t,n){const i=e.match(t);if(i){const s={};let a=1;for(const u in n)if(lo(n,u)){const c=n[u],f=c.groups?c.groups+1:1;!c.literal&&c.token&&(s[c.token.val[0]]=c.deser(i.slice(a,a+f))),a+=f}return[i,s]}else return[i,{}]}function ek(e){const t=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Ae(e.z)||(n=br.create(e.z)),Ae(e.Z)||(n||(n=new Ut(e.Z)),i=e.Z),Ae(e.q)||(e.M=(e.q-1)*3+1),Ae(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ae(e.u)||(e.S=Uf(e.u)),[Object.keys(e).reduce((a,u)=>{const c=t(u);return c&&(a[c]=e[u]),a},{}),n,i]}let Cc=null;function tk(){return Cc||(Cc=ke.fromMillis(1555555555555)),Cc}function nk(e,t){if(e.literal)return e;const n=$t.macroTokenToFormatOpts(e.val),i=N0(n,t);return i==null||i.includes(void 0)?e:i}function M0(e,t){return Array.prototype.concat(...e.map(n=>nk(n,t)))}class P0{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=M0($t.parseFormat(n),t),this.units=this.tokens.map(i=>ZA(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,s]=KA(this.units);this.regex=RegExp(i,"i"),this.handlers=s}}explainFromTokens(t){if(this.isValid){const[n,i]=QA(t,this.regex,this.handlers),[s,a,u]=i?ek(i):[null,null,void 0];if(lo(i,"a")&&lo(i,"H"))throw new Qi("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:s,zone:a,specificOffset:u}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function I0(e,t,n){return new P0(e,n).explainFromTokens(t)}function rk(e,t,n){const{result:i,zone:s,specificOffset:a,invalidReason:u}=I0(e,t,n);return[i,s,a,u]}function N0(e,t){if(!e)return null;const i=$t.create(t,e).dtFormatter(tk()),s=i.formatToParts(),a=i.resolvedOptions();return s.map(u=>JA(u,e,a))}const _c="Invalid DateTime",ik=864e13;function rs(e){return new zn("unsupported zone",`the zone "${e.name}" is not supported`)}function Rc(e){return e.weekData===null&&(e.weekData=fu(e.c)),e.weekData}function Dc(e){return e.localWeekData===null&&(e.localWeekData=fu(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function si(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new ke({...n,...t,old:n})}function A0(e,t,n){let i=e-t*60*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=(s-t)*60*1e3;const a=n.offset(i);return s===a?[i,s]:[e-Math.min(s,a)*60*1e3,Math.max(s,a)]}function Wa(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Ha(e,t,n){return A0(Wu(e),t,n)}function Bg(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:i,month:s,day:Math.min(e.c.day,du(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},u=Ge.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),c=Wu(a);let[f,p]=A0(c,n,e.zone);return u!==0&&(f+=u,p=e.zone.offset(f)),{ts:f,o:p}}function Zi(e,t,n,i,s,a){const{setZone:u,zone:c}=n;if(e&&Object.keys(e).length!==0||t){const f=t||c,p=ke.fromObject(e,{...n,zone:f,specificOffset:a});return u?p:p.setZone(c)}else return ke.invalid(new zn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Ba(e,t,n=!0){return e.isValid?$t.create(Qe.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Mc(e,t,n){const i=e.c.year>9999||e.c.year<0;let s="";if(i&&e.c.year>=0&&(s+="+"),s+=St(e.c.year,i?6:4),n==="year")return s;if(t){if(s+="-",s+=St(e.c.month),n==="month")return s;s+="-"}else if(s+=St(e.c.month),n==="month")return s;return s+=St(e.c.day),s}function Ug(e,t,n,i,s,a,u){let c=!n||e.c.millisecond!==0||e.c.second!==0,f="";switch(u){case"day":case"month":case"year":break;default:if(f+=St(e.c.hour),u==="hour")break;if(t){if(f+=":",f+=St(e.c.minute),u==="minute")break;c&&(f+=":",f+=St(e.c.second))}else{if(f+=St(e.c.minute),u==="minute")break;c&&(f+=St(e.c.second))}if(u==="second")break;c&&(!i||e.c.millisecond!==0)&&(f+=".",f+=St(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&e.offset===0&&!a?f+="Z":e.o<0?(f+="-",f+=St(Math.trunc(-e.o/60)),f+=":",f+=St(Math.trunc(-e.o%60))):(f+="+",f+=St(Math.trunc(e.o/60)),f+=":",f+=St(Math.trunc(e.o%60)))),a&&(f+="["+e.zone.ianaName+"]"),f}const k0={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ok={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},qa=["year","month","day","hour","minute","second","millisecond"],ak=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],uk=["year","ordinal","hour","minute","second","millisecond"];function Va(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new kv(e);return t}function jg(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Va(e)}}function lk(e){if(is===void 0&&(is=yt.now()),e.type!=="iana")return e.offset(is);const t=e.name;let n=sf.get(t);return n===void 0&&(n=e.offset(is),sf.set(t,n)),n}function Hg(e,t){const n=zr(t.zone,yt.defaultZone);if(!n.isValid)return ke.invalid(rs(n));const i=Qe.fromObject(t);let s,a;if(Ae(e.year))s=yt.now();else{for(const f of qa)Ae(e[f])&&(e[f]=k0[f]);const u=a0(e)||u0(e);if(u)return ke.invalid(u);const c=lk(n);[s,a]=Ha(e,c,n)}return new ke({ts:s,zone:n,loc:i,o:a})}function qg(e,t,n){const i=Ae(n.round)?!0:n.round,s=Ae(n.rounding)?"trunc":n.rounding,a=(c,f)=>(c=jf(c,i||n.calendary?0:2,n.calendary?"round":s),t.loc.clone(n).relFormatter(n).format(c,f)),u=c=>n.calendary?t.hasSame(e,c)?0:t.startOf(c).diff(e.startOf(c),c).get(c):t.diff(e,c).get(c);if(n.unit)return a(u(n.unit),n.unit);for(const c of n.units){const f=u(c);if(Math.abs(f)>=1)return a(f,c)}return a(e>t?-0:0,n.units[n.units.length-1])}function Vg(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let is;const sf=new Map;class ke{constructor(t){const n=t.zone||yt.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new zn("invalid input"):null)||(n.isValid?null:rs(n));this.ts=Ae(t.ts)?yt.now():t.ts;let s=null,a=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[s,a]=[t.old.c,t.old.o];else{const c=Wr(t.o)&&!t.old?t.o:n.offset(this.ts);s=Wa(this.ts,c),i=Number.isNaN(s.year)?new zn("invalid input"):null,s=i?null:s,a=i?null:c}this._zone=n,this.loc=t.loc||Qe.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new ke({})}static local(){const[t,n]=Vg(arguments),[i,s,a,u,c,f,p]=n;return Hg({year:i,month:s,day:a,hour:u,minute:c,second:f,millisecond:p},t)}static utc(){const[t,n]=Vg(arguments),[i,s,a,u,c,f,p]=n;return t.zone=Ut.utcInstance,Hg({year:i,month:s,day:a,hour:u,minute:c,second:f,millisecond:p},t)}static fromJSDate(t,n={}){const i=WN(t)?t.valueOf():NaN;if(Number.isNaN(i))return ke.invalid("invalid input");const s=zr(n.zone,yt.defaultZone);return s.isValid?new ke({ts:i,zone:s,loc:Qe.fromObject(n)}):ke.invalid(rs(s))}static fromMillis(t,n={}){if(Wr(t))return t<-864e13||t>ik?ke.invalid("Timestamp out of range"):new ke({ts:t,zone:zr(n.zone,yt.defaultZone),loc:Qe.fromObject(n)});throw new kt(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Wr(t))return new ke({ts:t*1e3,zone:zr(n.zone,yt.defaultZone),loc:Qe.fromObject(n)});throw new kt("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=zr(n.zone,yt.defaultZone);if(!i.isValid)return ke.invalid(rs(i));const s=Qe.fromObject(n),a=pu(t,jg),{minDaysInFirstWeek:u,startOfWeek:c}=Mg(a,s),f=yt.now(),p=Ae(n.specificOffset)?i.offset(f):n.specificOffset,h=!Ae(a.ordinal),x=!Ae(a.year),R=!Ae(a.month)||!Ae(a.day),w=x||R,C=a.weekYear||a.weekNumber;if((w||h)&&C)throw new Qi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(R&&h)throw new Qi("Can't mix ordinal dates with month/day");const y=C||a.weekday&&!w;let v,g,m=Wa(f,p);y?(v=ak,g=ok,m=fu(m,u,c)):h?(v=uk,g=sk,m=Tc(m)):(v=qa,g=k0);let S=!1;for(const J of v){const Z=a[J];Ae(Z)?S?a[J]=g[J]:a[J]=m[J]:S=!0}const E=y?LN(a,u,c):h?zN(a):a0(a),T=E||u0(a);if(T)return ke.invalid(T);const M=y?Rg(a,u,c):h?Dg(a):a,[D,A]=Ha(M,p,i),z=new ke({ts:D,zone:i,o:A,loc:s});return a.weekday&&w&&t.weekday!==z.weekday?ke.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${z.toISO()}`):z.isValid?z:ke.invalid(z.invalid)}static fromISO(t,n={}){const[i,s]=DA(t);return Zi(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=MA(t);return Zi(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=PA(t);return Zi(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Ae(t)||Ae(n))throw new kt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=i,u=Qe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[c,f,p,h]=rk(u,t,n);return h?ke.invalid(h):Zi(c,f,i,`format ${n}`,t,p)}static fromString(t,n,i={}){return ke.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=zA(t);return Zi(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new kt("need to specify a reason the DateTime is invalid");const i=t instanceof zn?t:new zn(t,n);if(yt.throwOnInvalid)throw new fN(i);return new ke({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=N0(t,Qe.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return M0($t.parseFormat(t),Qe.fromObject(n)).map(s=>s.val).join("")}static resetCache(){is=void 0,sf.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Rc(this).weekYear:NaN}get weekNumber(){return this.isValid?Rc(this).weekNumber:NaN}get weekday(){return this.isValid?Rc(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Dc(this).weekday:NaN}get localWeekNumber(){return this.isValid?Dc(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Dc(this).weekYear:NaN}get ordinal(){return this.isValid?Tc(this.c).ordinal:NaN}get monthShort(){return this.isValid?za.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?za.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?za.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?za.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=Wu(this.c),s=this.zone.offset(i-t),a=this.zone.offset(i+t),u=this.zone.offset(i-s*n),c=this.zone.offset(i-a*n);if(u===c)return[this];const f=i-u*n,p=i-c*n,h=Wa(f,u),x=Wa(p,c);return h.hour===x.hour&&h.minute===x.minute&&h.second===x.second&&h.millisecond===x.millisecond?[si(this,{ts:f}),si(this,{ts:p})]:[this]}get isInLeapYear(){return Cs(this.year)}get daysInMonth(){return du(this.year,this.month)}get daysInYear(){return this.isValid?no(this.year):NaN}get weeksInWeekYear(){return this.isValid?gs(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?gs(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=$t.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(t=0,n={}){return this.setZone(Ut.instance(t),n)}toLocal(){return this.setZone(yt.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=zr(t,yt.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(n||i){const a=t.offset(this.ts),u=this.toObject();[s]=Ha(u,a,t)}return si(this,{ts:s,zone:t})}else return ke.invalid(rs(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return si(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=pu(t,jg),{minDaysInFirstWeek:i,startOfWeek:s}=Mg(n,this.loc),a=!Ae(n.weekYear)||!Ae(n.weekNumber)||!Ae(n.weekday),u=!Ae(n.ordinal),c=!Ae(n.year),f=!Ae(n.month)||!Ae(n.day),p=c||f,h=n.weekYear||n.weekNumber;if((p||u)&&h)throw new Qi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Qi("Can't mix ordinal dates with month/day");let x;a?x=Rg({...fu(this.c,i,s),...n},i,s):Ae(n.ordinal)?(x={...this.toObject(),...n},Ae(n.day)&&(x.day=Math.min(du(x.year,x.month),x.day))):x=Dg({...Tc(this.c),...n});const[R,w]=Ha(x,this.o,this.zone);return si(this,{ts:R,o:w})}plus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t);return si(this,Bg(this,n))}minus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t).negate();return si(this,Bg(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Ge.normalizeUnit(t);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(s==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:u}=this;u<a&&(i.weekNumber=this.weekNumber-1),i.weekday=a}else i.weekday=1;if(s==="quarters"){const a=Math.ceil(this.month/3);i.month=(a-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?$t.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):_c}toLocaleString(t=cu,n={}){return this.isValid?$t.create(this.loc.clone(n),t).formatDateTime(this):_c}toLocaleParts(t={}){return this.isValid?$t.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:a=!1,precision:u="milliseconds"}={}){if(!this.isValid)return null;u=Va(u);const c=t==="extended";let f=Mc(this,c,u);return qa.indexOf(u)>=3&&(f+="T"),f+=Ug(this,c,n,i,s,a,u),f}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?Mc(this,t==="extended",Va(n)):null}toISOWeekDate(){return Ba(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:a=!1,format:u="extended",precision:c="milliseconds"}={}){return this.isValid?(c=Va(c),(s&&qa.indexOf(c)>=3?"T":"")+Ug(this,u==="extended",n,t,i,a,c)):null}toRFC2822(){return Ba(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ba(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Mc(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||t)&&(i&&(s+=" "),n?s+="z":t&&(s+="ZZ")),Ba(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():_c}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return Ge.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},a=BN(n).map(Ge.normalizeUnit),u=t.valueOf()>this.valueOf(),c=u?this:t,f=u?t:this,p=HA(c,f,a,s);return u?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(ke.now(),t,n)}until(t){return this.isValid?mt.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const s=t.valueOf(),a=this.setZone(t.zone,{keepLocalTime:!0});return a.startOf(n,i)<=s&&s<=a.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||ke.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=t.unit;return Array.isArray(t.unit)&&(s=t.unit,a=void 0),qg(n,this.plus(i),{...t,numeric:"always",units:s,unit:a})}toRelativeCalendar(t={}){return this.isValid?qg(t.base||ke.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(ke.isDateTime))throw new kt("min requires all arguments be DateTimes");return Pg(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(ke.isDateTime))throw new kt("max requires all arguments be DateTimes");return Pg(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:a=null}=i,u=Qe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return I0(u,t,n)}static fromStringExplain(t,n,i={}){return ke.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:s=null}=n,a=Qe.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return new P0(a,t)}static fromFormatParser(t,n,i={}){if(Ae(t)||Ae(n))throw new kt("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:a=null}=i,u=Qe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});if(!u.equals(n.locale))throw new kt(`fromFormatParser called with a locale of ${u}, but the format parser was created for ${n.locale}`);const{result:c,zone:f,specificOffset:p,invalidReason:h}=n.explainFromTokens(t);return h?ke.invalid(h):Zi(c,f,i,`format ${n.format}`,t,p)}static get DATE_SHORT(){return cu}static get DATE_MED(){return $v}static get DATE_MED_WITH_WEEKDAY(){return hN}static get DATE_FULL(){return Lv}static get DATE_HUGE(){return zv}static get TIME_SIMPLE(){return Fv}static get TIME_WITH_SECONDS(){return Wv}static get TIME_WITH_SHORT_OFFSET(){return Bv}static get TIME_WITH_LONG_OFFSET(){return Uv}static get TIME_24_SIMPLE(){return jv}static get TIME_24_WITH_SECONDS(){return Hv}static get TIME_24_WITH_SHORT_OFFSET(){return qv}static get TIME_24_WITH_LONG_OFFSET(){return Vv}static get DATETIME_SHORT(){return Gv}static get DATETIME_SHORT_WITH_SECONDS(){return Yv}static get DATETIME_MED(){return Zv}static get DATETIME_MED_WITH_SECONDS(){return Xv}static get DATETIME_MED_WITH_WEEKDAY(){return mN}static get DATETIME_FULL(){return Jv}static get DATETIME_FULL_WITH_SECONDS(){return Kv}static get DATETIME_HUGE(){return Qv}static get DATETIME_HUGE_WITH_SECONDS(){return e0}}function Xo(e){if(ke.isDateTime(e))return e;if(e&&e.valueOf&&Wr(e.valueOf()))return ke.fromJSDate(e);if(e&&typeof e=="object")return ke.fromObject(e);throw new kt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ck=e=>e?ke.fromISO(e):null,fk=e=>e.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,""),$0=()=>"",L0="color-scheme";function z0(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.substring(0,e.length+1)===e+"=")return decodeURIComponent(i.substring(e.length+1))}return null}function F0(e,t,n=365){if(typeof document>"u")return;const i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),document.cookie=`${e}=${encodeURIComponent(t)};expires=${i.toUTCString()};path=/;SameSite=Lax`}function dk(){const e=z0(L0);return e==="light"||e==="dark"||e==="system"?e:"system"}function pk(e){F0(L0,e)}function hk(e){return e==="system"?typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function mk(e){typeof document>"u"||(document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;SameSite=Lax`)}function gk(e,t,n){if(!t)return e;if(t.startsWith("http://")||t.startsWith("https://")){let u=t;return n&&Object.entries(n).forEach(([c,f])=>{u=u.replace(`:${c}`,encodeURIComponent(String(f)))}),u}let i=t;n&&Object.entries(n).forEach(([u,c])=>{const f=encodeURIComponent(String(c));i=i.replace(`:${u}`,f)});const s=e.endsWith("/")?e.slice(0,-1):e,a=i.startsWith("/")?i:`/${i}`;return`${s}${a}`}function Gf(e){switch(e){case"courses":return{get:"api/courses/",getById:"api/courses/:id",getByUrl:"api/courses/?encoded_url=:encodedUrl",post:"api/courses/",put:"api/courses/:id/",delete:"api/chat/courses/:id"};case"users":return{getCurrent:"api/users/current/",get:"api/users/",post:"api/users/",put:"api/users/:id/",delete:"api/users/:id/",logout:"/auth/lti_logout/"};case"calendar":return{get:"api/calendar/",getById:"api/calendar/:id",post:"api/calendar/",put:"api/calendar/:id/",delete:"api/calendar/:id/"};default:return{}}}function Yf(e,t){return t?{...e,...t}:e}let hu=null,mu=null;const yk=()=>hu,Zf=j.createContext(void 0),vk=({baseUrl:e="/",children:t})=>{const[n,i]=j.useState(new Map),s=j.useMemo(()=>({endpoints:n,baseUrl:e}),[n,e]);j.useEffect(()=>{hu=s},[s]);const a=j.useCallback((u,c)=>{i(f=>{const p=Gf(u),h=Yf(p,c),x=new Map(f);return x.set(u,h),x})},[]);return j.useEffect(()=>(mu=a,()=>{mu=null}),[a]),F.jsx(Zf.Provider,{value:s,children:t})},bk=(e,t)=>{if(mu)mu(e,t);else if(hu){const n=Gf(e),i=Yf(n,t);hu.endpoints.set(e,i)}else console.warn(`ApiConfig not initialized. Cannot register endpoints for '${e}'. Make sure ApiConfigProvider is rendered.`)},wk=e=>{const t=j.useContext(Zf);if(t===void 0)throw new Error("useServiceApiConfig must be used within an ApiConfigProvider");return t.endpoints.get(e)},xk=()=>{const e=j.useContext(Zf);if(e===void 0)throw new Error("useApiConfigContext must be used within an ApiConfigProvider");return e};exports.ApiConfigProvider=vk;exports.BREAKPOINT_INFO=Ji;exports.BreakpointIndicator=Pv;exports.CenteredHeading=OR;exports.CollapsingButtons=mD;exports.CompoundPanel=fD;exports.DialogOpener=ZI;exports.Dialogs=tN;exports.DraggableItem=VI;exports.EditModeToggler=NI;exports.EventBus=Ga;exports.ExtendedDialog=Nv;exports.FormDialog=XI;exports.GridItem=UP;exports.GridItemProvider=WP;exports.LoadingScreen=AR;exports.NavigationFilter=SR;exports.NavigationSectionBuilder=ER;exports.Notifications=uN;exports.Panel=Uy;exports.PanelProvider=ky;exports.ResponsiveGridLayout=OI;exports.Scroller=pi;exports.ScrollerProvider=My;exports.Section=jy;exports.SpeedDialButton=zP;exports.USER_PRESETS_KEY=Os;exports.UserBus=Ya;exports.apiPrefix=$0;exports.buildUrl=gk;exports.calculateNavigationFromSections=uf;exports.closeDialog=eN;exports.convertObjectKeysToCamelCase=Gc;exports.convertObjectKeysToUnderscore=Yc;exports.createGridItem=BP;exports.deleteCookie=mk;exports.deleteUserPreset=CI;exports.eventBus=mT;exports.filterNavigationByRole=CT;exports.getAllMicroservices=ey;exports.getAllRegisteredMicroservices=Jg;exports.getApiConfig=yk;exports.getApiPrefix=$0;exports.getColorSchemePreference=dk;exports.getCookie=z0;exports.getDefaultEndpoints=Gf;exports.getEffectiveColorScheme=hk;exports.getFromLS=Mv;exports.getMicroservice=DT;exports.getMicroserviceIds=MT;exports.getUserPresets=Lu;exports.isMicroserviceRegistered=PT;exports.mergeEndpoints=Yf;exports.openDialog=QI;exports.parseDate=ck;exports.registerApiEndpoints=bk;exports.registerDialog=JI;exports.registerMicroservice=_T;exports.registerRouteProvider=IT;exports.saveToLS=Hc;exports.saveUserPreset=TI;exports.setColorSchemePreference=pk;exports.setCookie=F0;exports.slugify=fk;exports.unregisterMicroservice=RT;exports.unregisterRouteProvider=NT;exports.updateMicroserviceNavigationForSections=Kg;exports.updateUserPreset=_I;exports.useApiConfigContext=xk;exports.useCurrentUser=Yg;exports.useGridItemContext=FP;exports.useGridLayout=Pf;exports.useGridLayoutManagement=DI;exports.useMicroserviceNavigation=kT;exports.useMicroserviceRegistryStore=lf;exports.useMicroserviceRoutes=AT;exports.useNavigationFilterStore=Br;exports.useNavigationSectionManager=$T;exports.useNavigationStore=gr;exports.useNotificationStore=zf;exports.usePanelContext=Bn;exports.usePanelStore=fo;exports.useRetry=YI;exports.useScrollContext=Py;exports.useServiceApiConfig=wk;exports.useSyncNavigationFilters=BT;exports.useUserActions=Zg;exports.useUserPreferences=gT;exports.userBus=Yt;
|
|
219
|
+
`,D.getElementsByTagName("head")[0].appendChild(A)),D.body&&T(D.body,"react-draggable-transparent-selection")}function E(D){if(D)try{if(D.body&&M(D.body,"react-draggable-transparent-selection"),D.selection)D.selection.empty();else{const A=(D.defaultView||window).getSelection();A&&A.type!=="Caret"&&A.removeAllRanges()}}catch{}}function T(D,A){D.classList?D.classList.add(A):D.className.match(new RegExp("(?:^|\\s)".concat(A,"(?!\\S)")))||(D.className+=" ".concat(A))}function M(D,A){D.classList?D.classList.remove(A):D.className=D.className.replace(new RegExp("(?:^|\\s)".concat(A,"(?!\\S)"),"g"),"")}return wt}var Gn={},jm;function vv(){if(jm)return Gn;jm=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.canDragX=s,Gn.canDragY=a,Gn.createCoreData=c,Gn.createDraggableData=f,Gn.getBoundPosition=n,Gn.getControlPosition=u,Gn.snapToGrid=i;var e=ku(),t=kf();function n(x,R,w){if(!x.props.bounds)return[R,w];let{bounds:C}=x.props;C=typeof C=="string"?C:p(C);const y=h(x);if(typeof C=="string"){const{ownerDocument:v}=y,g=v.defaultView;let m;if(C==="parent"?m=y.parentNode:m=v.querySelector(C),!(m instanceof g.HTMLElement))throw new Error('Bounds selector "'+C+'" could not find an element.');const S=m,E=g.getComputedStyle(y),T=g.getComputedStyle(S);C={left:-y.offsetLeft+(0,e.int)(T.paddingLeft)+(0,e.int)(E.marginLeft),top:-y.offsetTop+(0,e.int)(T.paddingTop)+(0,e.int)(E.marginTop),right:(0,t.innerWidth)(S)-(0,t.outerWidth)(y)-y.offsetLeft+(0,e.int)(T.paddingRight)-(0,e.int)(E.marginRight),bottom:(0,t.innerHeight)(S)-(0,t.outerHeight)(y)-y.offsetTop+(0,e.int)(T.paddingBottom)-(0,e.int)(E.marginBottom)}}return(0,e.isNum)(C.right)&&(R=Math.min(R,C.right)),(0,e.isNum)(C.bottom)&&(w=Math.min(w,C.bottom)),(0,e.isNum)(C.left)&&(R=Math.max(R,C.left)),(0,e.isNum)(C.top)&&(w=Math.max(w,C.top)),[R,w]}function i(x,R,w){const C=Math.round(R/x[0])*x[0],y=Math.round(w/x[1])*x[1];return[C,y]}function s(x){return x.props.axis==="both"||x.props.axis==="x"}function a(x){return x.props.axis==="both"||x.props.axis==="y"}function u(x,R,w){const C=typeof R=="number"?(0,t.getTouch)(x,R):null;if(typeof R=="number"&&!C)return null;const y=h(w),v=w.props.offsetParent||y.offsetParent||y.ownerDocument.body;return(0,t.offsetXYFromParent)(C||x,v,w.props.scale)}function c(x,R,w){const C=!(0,e.isNum)(x.lastX),y=h(x);return C?{node:y,deltaX:0,deltaY:0,lastX:R,lastY:w,x:R,y:w}:{node:y,deltaX:R-x.lastX,deltaY:w-x.lastY,lastX:x.lastX,lastY:x.lastY,x:R,y:w}}function f(x,R){const w=x.props.scale;return{node:R.node,x:x.state.x+R.deltaX/w,y:x.state.y+R.deltaY/w,deltaX:R.deltaX/w,deltaY:R.deltaY/w,lastX:x.state.x,lastY:x.state.y}}function p(x){return{left:x.left,top:x.top,right:x.right,bottom:x.bottom}}function h(x){const R=x.findDOMNode();if(!R)throw new Error("<DraggableCore>: Unmounted during event!");return R}return Gn}var Ho={},Aa={},Hm;function bv(){if(Hm)return Aa;Hm=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.default=e;function e(){}return Aa}var qm;function YP(){if(qm)return Ho;qm=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var e=p(j),t=c(wr()),n=c(fi),i=kf(),s=vv(),a=ku(),u=c(bv());function c(v){return v&&v.__esModule?v:{default:v}}function f(v){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(f=function(S){return S?m:g})(v)}function p(v,g){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var m=f(g);if(m&&m.has(v))return m.get(v);var S={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in v)if(T!=="default"&&Object.prototype.hasOwnProperty.call(v,T)){var M=E?Object.getOwnPropertyDescriptor(v,T):null;M&&(M.get||M.set)?Object.defineProperty(S,T,M):S[T]=v[T]}return S.default=v,m&&m.set(v,S),S}function h(v,g,m){return g=x(g),g in v?Object.defineProperty(v,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[g]=m,v}function x(v){var g=R(v,"string");return typeof g=="symbol"?g:String(g)}function R(v,g){if(typeof v!="object"||v===null)return v;var m=v[Symbol.toPrimitive];if(m!==void 0){var S=m.call(v,g);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}const w={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let C=w.mouse,y=class extends e.Component{constructor(){super(...arguments),h(this,"dragging",!1),h(this,"lastX",NaN),h(this,"lastY",NaN),h(this,"touchIdentifier",null),h(this,"mounted",!1),h(this,"handleDragStart",g=>{if(this.props.onMouseDown(g),!this.props.allowAnyClick&&typeof g.button=="number"&&g.button!==0)return!1;const m=this.findDOMNode();if(!m||!m.ownerDocument||!m.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:S}=m;if(this.props.disabled||!(g.target instanceof S.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(g.target,this.props.handle,m)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(g.target,this.props.cancel,m))return;g.type==="touchstart"&&g.preventDefault();const E=(0,i.getTouchIdentifier)(g);this.touchIdentifier=E;const T=(0,s.getControlPosition)(g,E,this);if(T==null)return;const{x:M,y:D}=T,A=(0,s.createCoreData)(this,M,D);(0,u.default)("DraggableCore: handleDragStart: %j",A),(0,u.default)("calling",this.props.onStart),!(this.props.onStart(g,A)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(S),this.dragging=!0,this.lastX=M,this.lastY=D,(0,i.addEvent)(S,C.move,this.handleDrag),(0,i.addEvent)(S,C.stop,this.handleDragStop))}),h(this,"handleDrag",g=>{const m=(0,s.getControlPosition)(g,this.touchIdentifier,this);if(m==null)return;let{x:S,y:E}=m;if(Array.isArray(this.props.grid)){let D=S-this.lastX,A=E-this.lastY;if([D,A]=(0,s.snapToGrid)(this.props.grid,D,A),!D&&!A)return;S=this.lastX+D,E=this.lastY+A}const T=(0,s.createCoreData)(this,S,E);if((0,u.default)("DraggableCore: handleDrag: %j",T),this.props.onDrag(g,T)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const A=document.createEvent("MouseEvents");A.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(A)}return}this.lastX=S,this.lastY=E}),h(this,"handleDragStop",g=>{if(!this.dragging)return;const m=(0,s.getControlPosition)(g,this.touchIdentifier,this);if(m==null)return;let{x:S,y:E}=m;if(Array.isArray(this.props.grid)){let A=S-this.lastX||0,z=E-this.lastY||0;[A,z]=(0,s.snapToGrid)(this.props.grid,A,z),S=this.lastX+A,E=this.lastY+z}const T=(0,s.createCoreData)(this,S,E);if(this.props.onStop(g,T)===!1||this.mounted===!1)return!1;const D=this.findDOMNode();D&&this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(D.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",T),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,D&&((0,u.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(D.ownerDocument,C.move,this.handleDrag),(0,i.removeEvent)(D.ownerDocument,C.stop,this.handleDragStop))}),h(this,"onMouseDown",g=>(C=w.mouse,this.handleDragStart(g))),h(this,"onMouseUp",g=>(C=w.mouse,this.handleDragStop(g))),h(this,"onTouchStart",g=>(C=w.touch,this.handleDragStart(g))),h(this,"onTouchEnd",g=>(C=w.touch,this.handleDragStop(g)))}componentDidMount(){this.mounted=!0;const g=this.findDOMNode();g&&(0,i.addEvent)(g,w.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const g=this.findDOMNode();if(g){const{ownerDocument:m}=g;(0,i.removeEvent)(m,w.mouse.move,this.handleDrag),(0,i.removeEvent)(m,w.touch.move,this.handleDrag),(0,i.removeEvent)(m,w.mouse.stop,this.handleDragStop),(0,i.removeEvent)(m,w.touch.stop,this.handleDragStop),(0,i.removeEvent)(g,w.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(m)}}findDOMNode(){var g,m;return(g=this.props)!==null&&g!==void 0&&g.nodeRef?(m=this.props)===null||m===void 0||(m=m.nodeRef)===null||m===void 0?void 0:m.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ho.default=y,h(y,"displayName","DraggableCore"),h(y,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(v,g){if(v[g]&&v[g].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),h(y,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ho}var Vm;function ZP(){return Vm||(Vm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),e.default=void 0;var t=R(j),n=h(wr()),i=h(fi),s=h(VP),a=kf(),u=vv(),c=ku(),f=h(YP()),p=h(bv());function h(m){return m&&m.__esModule?m:{default:m}}function x(m){if(typeof WeakMap!="function")return null;var S=new WeakMap,E=new WeakMap;return(x=function(T){return T?E:S})(m)}function R(m,S){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var E=x(S);if(E&&E.has(m))return E.get(m);var T={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in m)if(D!=="default"&&Object.prototype.hasOwnProperty.call(m,D)){var A=M?Object.getOwnPropertyDescriptor(m,D):null;A&&(A.get||A.set)?Object.defineProperty(T,D,A):T[D]=m[D]}return T.default=m,E&&E.set(m,T),T}function w(){return w=Object.assign?Object.assign.bind():function(m){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(m[T]=E[T])}return m},w.apply(this,arguments)}function C(m,S,E){return S=y(S),S in m?Object.defineProperty(m,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[S]=E,m}function y(m){var S=v(m,"string");return typeof S=="symbol"?S:String(S)}function v(m,S){if(typeof m!="object"||m===null)return m;var E=m[Symbol.toPrimitive];if(E!==void 0){var T=E.call(m,S);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(m)}class g extends t.Component{static getDerivedStateFromProps(S,E){let{position:T}=S,{prevPropsPosition:M}=E;return T&&(!M||T.x!==M.x||T.y!==M.y)?((0,p.default)("Draggable: getDerivedStateFromProps %j",{position:T,prevPropsPosition:M}),{x:T.x,y:T.y,prevPropsPosition:{...T}}):null}constructor(S){super(S),C(this,"onDragStart",(E,T)=>{if((0,p.default)("Draggable: onDragStart: %j",T),this.props.onStart(E,(0,u.createDraggableData)(this,T))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),C(this,"onDrag",(E,T)=>{if(!this.state.dragging)return!1;(0,p.default)("Draggable: onDrag: %j",T);const M=(0,u.createDraggableData)(this,T),D={x:M.x,y:M.y,slackX:0,slackY:0};if(this.props.bounds){const{x:z,y:J}=D;D.x+=this.state.slackX,D.y+=this.state.slackY;const[Z,_]=(0,u.getBoundPosition)(this,D.x,D.y);D.x=Z,D.y=_,D.slackX=this.state.slackX+(z-D.x),D.slackY=this.state.slackY+(J-D.y),M.x=D.x,M.y=D.y,M.deltaX=D.x-this.state.x,M.deltaY=D.y-this.state.y}if(this.props.onDrag(E,M)===!1)return!1;this.setState(D)}),C(this,"onDragStop",(E,T)=>{if(!this.state.dragging||this.props.onStop(E,(0,u.createDraggableData)(this,T))===!1)return!1;(0,p.default)("Draggable: onDragStop: %j",T);const D={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:z,y:J}=this.props.position;D.x=z,D.y=J}this.setState(D)}),this.state={dragging:!1,dragged:!1,x:S.position?S.position.x:S.defaultPosition.x,y:S.position?S.position.y:S.defaultPosition.y,prevPropsPosition:{...S.position},slackX:0,slackY:0,isElementSVG:!1},S.position&&!(S.onDrag||S.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var S,E;return(S=(E=this.props)===null||E===void 0||(E=E.nodeRef)===null||E===void 0?void 0:E.current)!==null&&S!==void 0?S:i.default.findDOMNode(this)}render(){const{axis:S,bounds:E,children:T,defaultPosition:M,defaultClassName:D,defaultClassNameDragging:A,defaultClassNameDragged:z,position:J,positionOffset:Z,scale:_,...H}=this.props;let B={},K=null;const X=!!!J||this.state.dragging,fe=J||M,ae={x:(0,u.canDragX)(this)&&X?this.state.x:fe.x,y:(0,u.canDragY)(this)&&X?this.state.y:fe.y};this.state.isElementSVG?K=(0,a.createSVGTransform)(ae,Z):B=(0,a.createCSSTransform)(ae,Z);const Y=(0,s.default)(T.props.className||"",D,{[A]:this.state.dragging,[z]:this.state.dragged});return t.createElement(f.default,w({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(T),{className:Y,style:{...T.props.style,...B},transform:K}))}}e.default=g,C(g,"displayName","Draggable"),C(g,"propTypes",{...f.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),C(g,"defaultProps",{...f.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(wc)),wc}var Gm;function $f(){if(Gm)return jo.exports;Gm=1;const{default:e,DraggableCore:t}=ZP();return jo.exports=e,jo.exports.default=e,jo.exports.DraggableCore=t,jo.exports}var qo={exports:{}},Vo={},ka={},Ym;function XP(){if(Ym)return ka;Ym=1,ka.__esModule=!0,ka.cloneElement=c;var e=t(j);function t(f){return f&&f.__esModule?f:{default:f}}function n(f,p){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);p&&(x=x.filter(function(R){return Object.getOwnPropertyDescriptor(f,R).enumerable})),h.push.apply(h,x)}return h}function i(f){for(var p=1;p<arguments.length;p++){var h=arguments[p]!=null?arguments[p]:{};p%2?n(Object(h),!0).forEach(function(x){s(f,x,h[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):n(Object(h)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(h,x))})}return f}function s(f,p,h){return p=a(p),p in f?Object.defineProperty(f,p,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[p]=h,f}function a(f){var p=u(f,"string");return typeof p=="symbol"?p:String(p)}function u(f,p){if(typeof f!="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var x=h.call(f,p);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(f)}function c(f,p){return p.style&&f.props.style&&(p.style=i(i({},f.props.style),p.style)),p.className&&f.props.className&&(p.className=f.props.className+" "+p.className),e.default.cloneElement(f,p)}return ka}var Go={},Zm;function wv(){if(Zm)return Go;Zm=1,Go.__esModule=!0,Go.resizableProps=void 0;var e=t(wr());$f();function t(i){return i&&i.__esModule?i:{default:i}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];var c=a[0];if(c.axis==="both"||c.axis==="y"){var f;return(f=e.default.number).isRequired.apply(f,a)}return e.default.number.apply(e.default,a)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];var c=a[0];if(c.axis==="both"||c.axis==="x"){var f;return(f=e.default.number).isRequired.apply(f,a)}return e.default.number.apply(e.default,a)}};return Go.resizableProps=n,Go}var Xm;function xv(){if(Xm)return Vo;Xm=1,Vo.__esModule=!0,Vo.default=void 0;var e=u(j),t=$f(),n=XP(),i=wv(),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function a(g){if(typeof WeakMap!="function")return null;var m=new WeakMap,S=new WeakMap;return(a=function(T){return T?S:m})(g)}function u(g,m){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var S=a(m);if(S&&S.has(g))return S.get(g);var E={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in g)if(M!=="default"&&Object.prototype.hasOwnProperty.call(g,M)){var D=T?Object.getOwnPropertyDescriptor(g,M):null;D&&(D.get||D.set)?Object.defineProperty(E,M,D):E[M]=g[M]}return E.default=g,S&&S.set(g,E),E}function c(){return c=Object.assign?Object.assign.bind():function(g){for(var m=1;m<arguments.length;m++){var S=arguments[m];for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(g[E]=S[E])}return g},c.apply(this,arguments)}function f(g,m){if(g==null)return{};var S={},E=Object.keys(g),T,M;for(M=0;M<E.length;M++)T=E[M],!(m.indexOf(T)>=0)&&(S[T]=g[T]);return S}function p(g,m){var S=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);m&&(E=E.filter(function(T){return Object.getOwnPropertyDescriptor(g,T).enumerable})),S.push.apply(S,E)}return S}function h(g){for(var m=1;m<arguments.length;m++){var S=arguments[m]!=null?arguments[m]:{};m%2?p(Object(S),!0).forEach(function(E){x(g,E,S[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(S)):p(Object(S)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(S,E))})}return g}function x(g,m,S){return m=R(m),m in g?Object.defineProperty(g,m,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[m]=S,g}function R(g){var m=w(g,"string");return typeof m=="symbol"?m:String(m)}function w(g,m){if(typeof g!="object"||g===null)return g;var S=g[Symbol.toPrimitive];if(S!==void 0){var E=S.call(g,m);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(g)}function C(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,y(g,m)}function y(g,m){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,T){return E.__proto__=T,E},y(g,m)}var v=function(g){C(m,g);function m(){for(var E,T=arguments.length,M=new Array(T),D=0;D<T;D++)M[D]=arguments[D];return E=g.call.apply(g,[this].concat(M))||this,E.handleRefs={},E.lastHandleRect=null,E.slack=null,E}var S=m.prototype;return S.componentWillUnmount=function(){this.resetData()},S.resetData=function(){this.lastHandleRect=this.slack=null},S.runConstraints=function(T,M){var D=this.props,A=D.minConstraints,z=D.maxConstraints,J=D.lockAspectRatio;if(!A&&!z&&!J)return[T,M];if(J){var Z=this.props.width/this.props.height,_=T-this.props.width,H=M-this.props.height;Math.abs(_)>Math.abs(H*Z)?M=T/Z:T=M*Z}var B=T,K=M,q=this.slack||[0,0],X=q[0],fe=q[1];return T+=X,M+=fe,A&&(T=Math.max(A[0],T),M=Math.max(A[1],M)),z&&(T=Math.min(z[0],T),M=Math.min(z[1],M)),this.slack=[X+(B-T),fe+(K-M)],[T,M]},S.resizeHandler=function(T,M){var D=this;return function(A,z){var J=z.node,Z=z.deltaX,_=z.deltaY;T==="onResizeStart"&&D.resetData();var H=(D.props.axis==="both"||D.props.axis==="x")&&M!=="n"&&M!=="s",B=(D.props.axis==="both"||D.props.axis==="y")&&M!=="e"&&M!=="w";if(!(!H&&!B)){var K=M[0],q=M[M.length-1],X=J.getBoundingClientRect();if(D.lastHandleRect!=null){if(q==="w"){var fe=X.left-D.lastHandleRect.left;Z+=fe}if(K==="n"){var ae=X.top-D.lastHandleRect.top;_+=ae}}D.lastHandleRect=X,q==="w"&&(Z=-Z),K==="n"&&(_=-_);var Y=D.props.width+(H?Z/D.props.transformScale:0),$=D.props.height+(B?_/D.props.transformScale:0),ue=D.runConstraints(Y,$);Y=ue[0],$=ue[1];var ye=Y!==D.props.width||$!==D.props.height,pe=typeof D.props[T]=="function"?D.props[T]:null,Oe=T==="onResize"&&!ye;pe&&!Oe&&(A.persist==null||A.persist(),pe(A,{node:J,size:{width:Y,height:$},handle:M})),T==="onResizeStop"&&D.resetData()}}},S.renderResizeHandle=function(T,M){var D=this.props.handle;if(!D)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+T,ref:M});if(typeof D=="function")return D(T,M);var A=typeof D.type=="string",z=h({ref:M},A?{}:{handleAxis:T});return e.cloneElement(D,z)},S.render=function(){var T=this,M=this.props,D=M.children,A=M.className,z=M.draggableOpts;M.width,M.height,M.handle,M.handleSize,M.lockAspectRatio,M.axis,M.minConstraints,M.maxConstraints,M.onResize,M.onResizeStop,M.onResizeStart;var J=M.resizeHandles;M.transformScale;var Z=f(M,s);return(0,n.cloneElement)(D,h(h({},Z),{},{className:(A?A+" ":"")+"react-resizable",children:[].concat(D.props.children,J.map(function(_){var H,B=(H=T.handleRefs[_])!=null?H:T.handleRefs[_]=e.createRef();return e.createElement(t.DraggableCore,c({},z,{nodeRef:B,key:"resizableHandle-"+_,onStop:T.resizeHandler("onResizeStop",_),onStart:T.resizeHandler("onResizeStart",_),onDrag:T.resizeHandler("onResize",_)}),T.renderResizeHandle(_,B))}))}))},m}(e.Component);return Vo.default=v,v.propTypes=i.resizableProps,v.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},Vo}var Yo={},Jm;function JP(){if(Jm)return Yo;Jm=1,Yo.__esModule=!0,Yo.default=void 0;var e=c(j),t=a(wr()),n=a(xv()),i=wv(),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function a(m){return m&&m.__esModule?m:{default:m}}function u(m){if(typeof WeakMap!="function")return null;var S=new WeakMap,E=new WeakMap;return(u=function(M){return M?E:S})(m)}function c(m,S){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var E=u(S);if(E&&E.has(m))return E.get(m);var T={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in m)if(D!=="default"&&Object.prototype.hasOwnProperty.call(m,D)){var A=M?Object.getOwnPropertyDescriptor(m,D):null;A&&(A.get||A.set)?Object.defineProperty(T,D,A):T[D]=m[D]}return T.default=m,E&&E.set(m,T),T}function f(){return f=Object.assign?Object.assign.bind():function(m){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(m[T]=E[T])}return m},f.apply(this,arguments)}function p(m,S){var E=Object.keys(m);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(m);S&&(T=T.filter(function(M){return Object.getOwnPropertyDescriptor(m,M).enumerable})),E.push.apply(E,T)}return E}function h(m){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?p(Object(E),!0).forEach(function(T){x(m,T,E[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(E)):p(Object(E)).forEach(function(T){Object.defineProperty(m,T,Object.getOwnPropertyDescriptor(E,T))})}return m}function x(m,S,E){return S=R(S),S in m?Object.defineProperty(m,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[S]=E,m}function R(m){var S=w(m,"string");return typeof S=="symbol"?S:String(S)}function w(m,S){if(typeof m!="object"||m===null)return m;var E=m[Symbol.toPrimitive];if(E!==void 0){var T=E.call(m,S);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(m)}function C(m,S){if(m==null)return{};var E={},T=Object.keys(m),M,D;for(D=0;D<T.length;D++)M=T[D],!(S.indexOf(M)>=0)&&(E[M]=m[M]);return E}function y(m,S){m.prototype=Object.create(S.prototype),m.prototype.constructor=m,v(m,S)}function v(m,S){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,M){return T.__proto__=M,T},v(m,S)}var g=function(m){y(S,m);function S(){for(var T,M=arguments.length,D=new Array(M),A=0;A<M;A++)D[A]=arguments[A];return T=m.call.apply(m,[this].concat(D))||this,T.state={width:T.props.width,height:T.props.height,propsWidth:T.props.width,propsHeight:T.props.height},T.onResize=function(z,J){var Z=J.size;T.props.onResize?(z.persist==null||z.persist(),T.setState(Z,function(){return T.props.onResize&&T.props.onResize(z,J)})):T.setState(Z)},T}S.getDerivedStateFromProps=function(M,D){return D.propsWidth!==M.width||D.propsHeight!==M.height?{width:M.width,height:M.height,propsWidth:M.width,propsHeight:M.height}:null};var E=S.prototype;return E.render=function(){var M=this.props,D=M.handle,A=M.handleSize;M.onResize;var z=M.onResizeStart,J=M.onResizeStop,Z=M.draggableOpts,_=M.minConstraints,H=M.maxConstraints,B=M.lockAspectRatio,K=M.axis;M.width,M.height;var q=M.resizeHandles,X=M.style,fe=M.transformScale,ae=C(M,s);return e.createElement(n.default,{axis:K,draggableOpts:Z,handle:D,handleSize:A,height:this.state.height,lockAspectRatio:B,maxConstraints:H,minConstraints:_,onResizeStart:z,onResize:this.onResize,onResizeStop:J,resizeHandles:q,transformScale:fe,width:this.state.width},e.createElement("div",f({},ae,{style:h(h({},X),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},S}(e.Component);return Yo.default=g,g.propTypes=h(h({},i.resizableProps),{},{children:t.default.element}),Yo}var Km;function KP(){return Km||(Km=1,qo.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},qo.exports.Resizable=xv().default,qo.exports.ResizableBox=JP().default),qo.exports}var hr={},Qm;function Sv(){if(Qm)return hr;Qm=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.resizeHandleType=hr.resizeHandleAxesType=hr.default=void 0;var e=n(wr()),t=n(j);function n(a){return a&&a.__esModule?a:{default:a}}const i=hr.resizeHandleAxesType=e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),s=hr.resizeHandleType=e.default.oneOfType([e.default.node,e.default.func]);return hr.default={className:e.default.string,style:e.default.object,width:e.default.number,autoSize:e.default.bool,cols:e.default.number,draggableCancel:e.default.string,draggableHandle:e.default.string,verticalCompact:function(a){a.verticalCompact===!1&&process.env.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:e.default.oneOf(["vertical","horizontal"]),layout:function(a){var u=a.layout;u!==void 0&&po().validateLayout(u,"layout")},margin:e.default.arrayOf(e.default.number),containerPadding:e.default.arrayOf(e.default.number),rowHeight:e.default.number,maxRows:e.default.number,isBounded:e.default.bool,isDraggable:e.default.bool,isResizable:e.default.bool,allowOverlap:e.default.bool,preventCollision:e.default.bool,useCSSTransforms:e.default.bool,transformScale:e.default.number,isDroppable:e.default.bool,resizeHandles:i,resizeHandle:s,onLayoutChange:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onDragStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,onResizeStop:e.default.func,onDrop:e.default.func,droppingItem:e.default.shape({i:e.default.string.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired}),children:function(a,u){const c=a[u],f={};t.default.Children.forEach(c,function(p){if((p==null?void 0:p.key)!=null){if(f[p.key])throw new Error('Duplicate child key "'+p.key+'" found! This will cause problems in ReactGridLayout.');f[p.key]=!0}})},innerRef:e.default.any},hr}var eg;function QP(){if(eg)return Uo;eg=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=void 0;var e=f(j),t=f(wr()),n=$f(),i=KP(),s=po(),a=Af(),u=Sv(),c=f(Nf());function f(w){return w&&w.__esModule?w:{default:w}}function p(w,C,y){return C=h(C),C in w?Object.defineProperty(w,C,{value:y,enumerable:!0,configurable:!0,writable:!0}):w[C]=y,w}function h(w){var C=x(w,"string");return typeof C=="symbol"?C:String(C)}function x(w,C){if(typeof w!="object"||w===null)return w;var y=w[Symbol.toPrimitive];if(y!==void 0){var v=y.call(w,C);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(w)}let R=class extends e.default.Component{constructor(){super(...arguments),p(this,"state",{resizing:null,dragging:null,className:""}),p(this,"elementRef",e.default.createRef()),p(this,"onDragStart",(C,y)=>{let{node:v}=y;const{onDragStart:g,transformScale:m}=this.props;if(!g)return;const S={top:0,left:0},{offsetParent:E}=v;if(!E)return;const T=E.getBoundingClientRect(),M=v.getBoundingClientRect(),D=M.left/m,A=T.left/m,z=M.top/m,J=T.top/m;S.left=D-A+E.scrollLeft,S.top=z-J+E.scrollTop,this.setState({dragging:S});const{x:Z,y:_}=(0,a.calcXY)(this.getPositionParams(),S.top,S.left,this.props.w,this.props.h);return g.call(this,this.props.i,Z,_,{e:C,node:v,newPosition:S})}),p(this,"onDrag",(C,y)=>{let{node:v,deltaX:g,deltaY:m}=y;const{onDrag:S}=this.props;if(!S)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let E=this.state.dragging.top+m,T=this.state.dragging.left+g;const{isBounded:M,i:D,w:A,h:z,containerWidth:J}=this.props,Z=this.getPositionParams();if(M){const{offsetParent:K}=v;if(K){const{margin:q,rowHeight:X,containerPadding:fe}=this.props,ae=K.clientHeight-(0,a.calcGridItemWHPx)(z,X,q[1]);E=(0,a.clamp)(E-fe[1],0,ae);const Y=(0,a.calcGridColWidth)(Z),$=J-(0,a.calcGridItemWHPx)(A,Y,q[0]);T=(0,a.clamp)(T-fe[0],0,$)}}const _={top:E,left:T};this.setState({dragging:_});const{x:H,y:B}=(0,a.calcXY)(Z,E,T,A,z);return S.call(this,D,H,B,{e:C,node:v,newPosition:_})}),p(this,"onDragStop",(C,y)=>{let{node:v}=y;const{onDragStop:g}=this.props;if(!g)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:m,h:S,i:E}=this.props,{left:T,top:M}=this.state.dragging,D={top:M,left:T};this.setState({dragging:null});const{x:A,y:z}=(0,a.calcXY)(this.getPositionParams(),M,T,m,S);return g.call(this,E,A,z,{e:C,node:v,newPosition:D})}),p(this,"onResizeStop",(C,y,v)=>this.onResizeHandler(C,y,v,"onResizeStop")),p(this,"onResizeStart",(C,y,v)=>this.onResizeHandler(C,y,v,"onResizeStart")),p(this,"onResize",(C,y,v)=>this.onResizeHandler(C,y,v,"onResize"))}shouldComponentUpdate(C,y){if(this.props.children!==C.children||this.props.droppingPosition!==C.droppingPosition)return!0;const v=(0,a.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),g=(0,a.calcGridItemPosition)(this.getPositionParams(C),C.x,C.y,C.w,C.h,y);return!(0,s.fastPositionEqual)(v,g)||this.props.useCSSTransforms!==C.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(C){this.moveDroppingItem(C)}moveDroppingItem(C){const{droppingPosition:y}=this.props;if(!y)return;const v=this.elementRef.current;if(!v)return;const g=C.droppingPosition||{left:0,top:0},{dragging:m}=this.state,S=m&&y.left!==g.left||y.top!==g.top;if(!m)this.onDragStart(y.e,{node:v,deltaX:y.left,deltaY:y.top});else if(S){const E=y.left-m.left,T=y.top-m.top;this.onDrag(y.e,{node:v,deltaX:E,deltaY:T})}}getPositionParams(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:C.cols,containerPadding:C.containerPadding,containerWidth:C.containerWidth,margin:C.margin,maxRows:C.maxRows,rowHeight:C.rowHeight}}createStyle(C){const{usePercentages:y,containerWidth:v,useCSSTransforms:g}=this.props;let m;return g?m=(0,s.setTransform)(C):(m=(0,s.setTopLeft)(C),y&&(m.left=(0,s.perc)(C.left/v),m.width=(0,s.perc)(C.width/v))),m}mixinDraggable(C,y){return e.default.createElement(n.DraggableCore,{disabled:!y,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},C)}curryResizeHandler(C,y){return(v,g)=>y(v,g,C)}mixinResizable(C,y,v){const{cols:g,minW:m,minH:S,maxW:E,maxH:T,transformScale:M,resizeHandles:D,resizeHandle:A}=this.props,z=this.getPositionParams(),J=(0,a.calcGridItemPosition)(z,0,0,g,0).width,Z=(0,a.calcGridItemPosition)(z,0,0,m,S),_=(0,a.calcGridItemPosition)(z,0,0,E,T),H=[Z.width,Z.height],B=[Math.min(_.width,J),Math.min(_.height,1/0)];return e.default.createElement(i.Resizable,{draggableOpts:{disabled:!v},className:v?void 0:"react-resizable-hide",width:y.width,height:y.height,minConstraints:H,maxConstraints:B,onResizeStop:this.curryResizeHandler(y,this.onResizeStop),onResizeStart:this.curryResizeHandler(y,this.onResizeStart),onResize:this.curryResizeHandler(y,this.onResize),transformScale:M,resizeHandles:D,handle:A},C)}onResizeHandler(C,y,v,g){let{node:m,size:S,handle:E}=y;const T=this.props[g];if(!T)return;const{x:M,y:D,i:A,maxH:z,minH:J,containerWidth:Z}=this.props,{minW:_,maxW:H}=this.props;let B=S;m&&(B=(0,s.resizeItemInDirection)(E,v,S,Z),this.setState({resizing:g==="onResizeStop"?null:B}));let{w:K,h:q}=(0,a.calcWH)(this.getPositionParams(),B.width,B.height,M,D,E);K=(0,a.clamp)(K,Math.max(_,1),H),q=(0,a.clamp)(q,J,z),T.call(this,A,K,q,{e:C,node:m,size:B,handle:E})}render(){const{x:C,y,w:v,h:g,isDraggable:m,isResizable:S,droppingPosition:E,useCSSTransforms:T}=this.props,M=(0,a.calcGridItemPosition)(this.getPositionParams(),C,y,v,g,this.state),D=e.default.Children.only(this.props.children);let A=e.default.cloneElement(D,{ref:this.elementRef,className:(0,c.default)("react-grid-item",D.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":m,"react-draggable-dragging":!!this.state.dragging,dropping:!!E,cssTransforms:T}),style:{...this.props.style,...D.props.style,...this.createStyle(M)}});return A=this.mixinResizable(A,M,S),A=this.mixinDraggable(A,m),A}};return Uo.default=R,p(R,"propTypes",{children:t.default.element,cols:t.default.number.isRequired,containerWidth:t.default.number.isRequired,rowHeight:t.default.number.isRequired,margin:t.default.array.isRequired,maxRows:t.default.number.isRequired,containerPadding:t.default.array.isRequired,x:t.default.number.isRequired,y:t.default.number.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired,minW:function(w,C){const y=w[C];if(typeof y!="number")return new Error("minWidth not Number");if(y>w.w||y>w.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(w,C){const y=w[C];if(typeof y!="number")return new Error("maxWidth not Number");if(y<w.w||y<w.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(w,C){const y=w[C];if(typeof y!="number")return new Error("minHeight not Number");if(y>w.h||y>w.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(w,C){const y=w[C];if(typeof y!="number")return new Error("maxHeight not Number");if(y<w.h||y<w.minH)return new Error("maxHeight smaller than item height/minHeight")},i:t.default.string.isRequired,resizeHandles:u.resizeHandleAxesType,resizeHandle:u.resizeHandleType,onDragStop:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,isDraggable:t.default.bool.isRequired,isResizable:t.default.bool.isRequired,isBounded:t.default.bool.isRequired,static:t.default.bool,useCSSTransforms:t.default.bool.isRequired,transformScale:t.default.number,className:t.default.string,handle:t.default.string,cancel:t.default.string,droppingPosition:t.default.shape({e:t.default.object.isRequired,left:t.default.number.isRequired,top:t.default.number.isRequired})}),p(R,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),Uo}var tg;function Ev(){if(tg)return Bo;tg=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.default=void 0;var e=p(j),t=If(),n=c(Nf()),i=po(),s=Af(),a=c(QP()),u=c(Sv());function c(v){return v&&v.__esModule?v:{default:v}}function f(v){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(f=function(S){return S?m:g})(v)}function p(v,g){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var m=f(g);if(m&&m.has(v))return m.get(v);var S={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in v)if(T!=="default"&&Object.prototype.hasOwnProperty.call(v,T)){var M=E?Object.getOwnPropertyDescriptor(v,T):null;M&&(M.get||M.set)?Object.defineProperty(S,T,M):S[T]=v[T]}return S.default=v,m&&m.set(v,S),S}function h(v,g,m){return g=x(g),g in v?Object.defineProperty(v,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[g]=m,v}function x(v){var g=R(v,"string");return typeof g=="symbol"?g:String(g)}function R(v,g){if(typeof v!="object"||v===null)return v;var m=v[Symbol.toPrimitive];if(m!==void 0){var S=m.call(v,g);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}const w="react-grid-layout";let C=!1;try{C=/firefox/i.test(navigator.userAgent)}catch{}class y extends e.Component{constructor(){super(...arguments),h(this,"state",{activeDrag:null,layout:(0,i.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,i.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),h(this,"dragEnterCounter",0),h(this,"onDragStart",(g,m,S,E)=>{let{e:T,node:M}=E;const{layout:D}=this.state,A=(0,i.getLayoutItem)(D,g);if(!A)return;const z={w:A.w,h:A.h,x:A.x,y:A.y,placeholder:!0,i:g};return this.setState({oldDragItem:(0,i.cloneLayoutItem)(A),oldLayout:D,activeDrag:z}),this.props.onDragStart(D,A,A,null,T,M)}),h(this,"onDrag",(g,m,S,E)=>{let{e:T,node:M}=E;const{oldDragItem:D}=this.state;let{layout:A}=this.state;const{cols:z,allowOverlap:J,preventCollision:Z}=this.props,_=(0,i.getLayoutItem)(A,g);if(!_)return;const H={w:_.w,h:_.h,x:_.x,y:_.y,placeholder:!0,i:g};A=(0,i.moveElement)(A,_,m,S,!0,Z,(0,i.compactType)(this.props),z,J),this.props.onDrag(A,D,_,H,T,M),this.setState({layout:J?A:(0,i.compact)(A,(0,i.compactType)(this.props),z),activeDrag:H})}),h(this,"onDragStop",(g,m,S,E)=>{let{e:T,node:M}=E;if(!this.state.activeDrag)return;const{oldDragItem:D}=this.state;let{layout:A}=this.state;const{cols:z,preventCollision:J,allowOverlap:Z}=this.props,_=(0,i.getLayoutItem)(A,g);if(!_)return;A=(0,i.moveElement)(A,_,m,S,!0,J,(0,i.compactType)(this.props),z,Z);const B=Z?A:(0,i.compact)(A,(0,i.compactType)(this.props),z);this.props.onDragStop(B,D,_,null,T,M);const{oldLayout:K}=this.state;this.setState({activeDrag:null,layout:B,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(B,K)}),h(this,"onResizeStart",(g,m,S,E)=>{let{e:T,node:M}=E;const{layout:D}=this.state,A=(0,i.getLayoutItem)(D,g);A&&(this.setState({oldResizeItem:(0,i.cloneLayoutItem)(A),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(D,A,A,null,T,M))}),h(this,"onResize",(g,m,S,E)=>{let{e:T,node:M,size:D,handle:A}=E;const{oldResizeItem:z}=this.state,{layout:J}=this.state,{cols:Z,preventCollision:_,allowOverlap:H}=this.props;let B=!1,K,q,X;const[fe,ae]=(0,i.withLayoutItem)(J,g,$=>{let ue;return q=$.x,X=$.y,["sw","w","nw","n","ne"].indexOf(A)!==-1&&(["sw","nw","w"].indexOf(A)!==-1&&(q=$.x+($.w-m),m=$.x!==q&&q<0?$.w:m,q=q<0?0:q),["ne","n","nw"].indexOf(A)!==-1&&(X=$.y+($.h-S),S=$.y!==X&&X<0?$.h:S,X=X<0?0:X),B=!0),_&&!H&&(ue=(0,i.getAllCollisions)(J,{...$,w:m,h:S,x:q,y:X}).filter(pe=>pe.i!==$.i).length>0,ue&&(X=$.y,S=$.h,q=$.x,m=$.w,B=!1)),$.w=m,$.h=S,$});if(!ae)return;K=fe,B&&(K=(0,i.moveElement)(fe,ae,q,X,!0,this.props.preventCollision,(0,i.compactType)(this.props),Z,H));const Y={w:ae.w,h:ae.h,x:ae.x,y:ae.y,static:!0,i:g};this.props.onResize(K,z,ae,Y,T,M),this.setState({layout:H?K:(0,i.compact)(K,(0,i.compactType)(this.props),Z),activeDrag:Y})}),h(this,"onResizeStop",(g,m,S,E)=>{let{e:T,node:M}=E;const{layout:D,oldResizeItem:A}=this.state,{cols:z,allowOverlap:J}=this.props,Z=(0,i.getLayoutItem)(D,g),_=J?D:(0,i.compact)(D,(0,i.compactType)(this.props),z);this.props.onResizeStop(_,A,Z,null,T,M);const{oldLayout:H}=this.state;this.setState({activeDrag:null,layout:_,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(_,H)}),h(this,"onDragOver",g=>{var fe;if(g.preventDefault(),g.stopPropagation(),C&&!((fe=g.nativeEvent.target)!=null&&fe.classList.contains(w)))return!1;const{droppingItem:m,onDropDragOver:S,margin:E,cols:T,rowHeight:M,maxRows:D,width:A,containerPadding:z,transformScale:J}=this.props,Z=S==null?void 0:S(g);if(Z===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const _={...m,...Z},{layout:H}=this.state,B=g.currentTarget.getBoundingClientRect(),K=g.clientX-B.left,q=g.clientY-B.top,X={left:K/J,top:q/J,e:g};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ae,top:Y}=this.state.droppingPosition;(ae!=K||Y!=q)&&this.setState({droppingPosition:X})}}else{const ae={cols:T,margin:E,maxRows:D,rowHeight:M,containerWidth:A,containerPadding:z||E},Y=(0,s.calcXY)(ae,q,K,_.w,_.h);this.setState({droppingDOMNode:e.createElement("div",{key:_.i}),droppingPosition:X,layout:[...H,{..._,x:Y.x,y:Y.y,static:!1,isDraggable:!0}]})}}),h(this,"removeDroppingPlaceholder",()=>{const{droppingItem:g,cols:m}=this.props,{layout:S}=this.state,E=(0,i.compact)(S.filter(T=>T.i!==g.i),(0,i.compactType)(this.props),m,this.props.allowOverlap);this.setState({layout:E,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),h(this,"onDragLeave",g=>{g.preventDefault(),g.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),h(this,"onDragEnter",g=>{g.preventDefault(),g.stopPropagation(),this.dragEnterCounter++}),h(this,"onDrop",g=>{g.preventDefault(),g.stopPropagation();const{droppingItem:m}=this.props,{layout:S}=this.state,E=S.find(T=>T.i===m.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(S,E,g)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(g,m){let S;return m.activeDrag?null:(!(0,t.deepEqual)(g.layout,m.propsLayout)||g.compactType!==m.compactType?S=g.layout:(0,i.childrenEqual)(g.children,m.children)||(S=m.layout),S?{layout:(0,i.synchronizeLayoutWithChildren)(S,g.children,g.cols,(0,i.compactType)(g),g.allowOverlap),compactType:g.compactType,children:g.children,propsLayout:g.layout}:null)}shouldComponentUpdate(g,m){return this.props.children!==g.children||!(0,i.fastRGLPropsEqual)(this.props,g,t.deepEqual)||this.state.activeDrag!==m.activeDrag||this.state.mounted!==m.mounted||this.state.droppingPosition!==m.droppingPosition}componentDidUpdate(g,m){if(!this.state.activeDrag){const S=this.state.layout,E=m.layout;this.onLayoutMaybeChanged(S,E)}}containerHeight(){if(!this.props.autoSize)return;const g=(0,i.bottom)(this.state.layout),m=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return g*this.props.rowHeight+(g-1)*this.props.margin[1]+m*2+"px"}onLayoutMaybeChanged(g,m){m||(m=this.state.layout),(0,t.deepEqual)(m,g)||this.props.onLayoutChange(g)}placeholder(){const{activeDrag:g}=this.state;if(!g)return null;const{width:m,cols:S,margin:E,containerPadding:T,rowHeight:M,maxRows:D,useCSSTransforms:A,transformScale:z}=this.props;return e.createElement(a.default,{w:g.w,h:g.h,x:g.x,y:g.y,i:g.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:m,cols:S,margin:E,containerPadding:T||E,maxRows:D,rowHeight:M,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:A,transformScale:z},e.createElement("div",null))}processGridItem(g,m){if(!g||!g.key)return;const S=(0,i.getLayoutItem)(this.state.layout,String(g.key));if(!S)return null;const{width:E,cols:T,margin:M,containerPadding:D,rowHeight:A,maxRows:z,isDraggable:J,isResizable:Z,isBounded:_,useCSSTransforms:H,transformScale:B,draggableCancel:K,draggableHandle:q,resizeHandles:X,resizeHandle:fe}=this.props,{mounted:ae,droppingPosition:Y}=this.state,$=typeof S.isDraggable=="boolean"?S.isDraggable:!S.static&&J,ue=typeof S.isResizable=="boolean"?S.isResizable:!S.static&&Z,ye=S.resizeHandles||X,pe=$&&_&&S.isBounded!==!1;return e.createElement(a.default,{containerWidth:E,cols:T,margin:M,containerPadding:D||M,maxRows:z,rowHeight:A,cancel:K,handle:q,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:$,isResizable:ue,isBounded:pe,useCSSTransforms:H&&ae,usePercentages:!ae,transformScale:B,w:S.w,h:S.h,x:S.x,y:S.y,i:S.i,minH:S.minH,minW:S.minW,maxH:S.maxH,maxW:S.maxW,static:S.static,droppingPosition:m?Y:void 0,resizeHandles:ye,resizeHandle:fe},g)}render(){const{className:g,style:m,isDroppable:S,innerRef:E}=this.props,T=(0,n.default)(w,g),M={height:this.containerHeight(),...m};return e.createElement("div",{ref:E,className:T,style:M,onDrop:S?this.onDrop:i.noop,onDragLeave:S?this.onDragLeave:i.noop,onDragEnter:S?this.onDragEnter:i.noop,onDragOver:S?this.onDragOver:i.noop},e.Children.map(this.props.children,D=>this.processGridItem(D)),S&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}return Bo.default=y,h(y,"displayName","ReactGridLayout"),h(y,"propTypes",u.default),h(y,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:i.noop,onDragStart:i.noop,onDrag:i.noop,onDragStop:i.noop,onResizeStart:i.noop,onResize:i.noop,onResizeStop:i.noop,onDrop:i.noop,onDropDragOver:i.noop}),Bo}var Zo={},ii={},ng;function Ov(){if(ng)return ii;ng=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.findOrGenerateResponsiveLayout=i,ii.getBreakpointFromWidth=t,ii.getColsFromBreakpoint=n,ii.sortBreakpoints=s;var e=po();function t(a,u){const c=s(a);let f=c[0];for(let p=1,h=c.length;p<h;p++){const x=c[p];u>a[x]&&(f=x)}return f}function n(a,u){if(!u[a])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+a+" is missing!");return u[a]}function i(a,u,c,f,p,h){if(a[c])return(0,e.cloneLayout)(a[c]);let x=a[f];const R=s(u),w=R.slice(R.indexOf(c));for(let C=0,y=w.length;C<y;C++){const v=w[C];if(a[v]){x=a[v];break}}return x=(0,e.cloneLayout)(x||[]),(0,e.compact)((0,e.correctBounds)(x,{cols:p}),h,p)}function s(a){return Object.keys(a).sort(function(c,f){return a[c]-a[f]})}return ii}var rg;function eI(){if(rg)return Zo;rg=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=void 0;var e=f(j),t=u(wr()),n=If(),i=po(),s=Ov(),a=u(Ev());function u(v){return v&&v.__esModule?v:{default:v}}function c(v){if(typeof WeakMap!="function")return null;var g=new WeakMap,m=new WeakMap;return(c=function(S){return S?m:g})(v)}function f(v,g){if(v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var m=c(g);if(m&&m.has(v))return m.get(v);var S={__proto__:null},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in v)if(T!=="default"&&Object.prototype.hasOwnProperty.call(v,T)){var M=E?Object.getOwnPropertyDescriptor(v,T):null;M&&(M.get||M.set)?Object.defineProperty(S,T,M):S[T]=v[T]}return S.default=v,m&&m.set(v,S),S}function p(){return p=Object.assign?Object.assign.bind():function(v){for(var g=1;g<arguments.length;g++){var m=arguments[g];for(var S in m)Object.prototype.hasOwnProperty.call(m,S)&&(v[S]=m[S])}return v},p.apply(this,arguments)}function h(v,g,m){return g=x(g),g in v?Object.defineProperty(v,g,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[g]=m,v}function x(v){var g=R(v,"string");return typeof g=="symbol"?g:String(g)}function R(v,g){if(typeof v!="object"||v===null)return v;var m=v[Symbol.toPrimitive];if(m!==void 0){var S=m.call(v,g);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(v)}const w=v=>Object.prototype.toString.call(v);function C(v,g){return v==null?null:Array.isArray(v)?v:v[g]}let y=class extends e.Component{constructor(){super(...arguments),h(this,"state",this.generateInitialState()),h(this,"onLayoutChange",g=>{this.props.onLayoutChange(g,{...this.props.layouts,[this.state.breakpoint]:g})})}generateInitialState(){const{width:g,breakpoints:m,layouts:S,cols:E}=this.props,T=(0,s.getBreakpointFromWidth)(m,g),M=(0,s.getColsFromBreakpoint)(T,E),D=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,s.findOrGenerateResponsiveLayout)(S,m,T,T,M,D),breakpoint:T,cols:M}}static getDerivedStateFromProps(g,m){if(!(0,n.deepEqual)(g.layouts,m.layouts)){const{breakpoint:S,cols:E}=m;return{layout:(0,s.findOrGenerateResponsiveLayout)(g.layouts,g.breakpoints,S,S,E,g.compactType),layouts:g.layouts}}return null}componentDidUpdate(g){(this.props.width!=g.width||this.props.breakpoint!==g.breakpoint||!(0,n.deepEqual)(this.props.breakpoints,g.breakpoints)||!(0,n.deepEqual)(this.props.cols,g.cols))&&this.onWidthChange(g)}onWidthChange(g){const{breakpoints:m,cols:S,layouts:E,compactType:T}=this.props,M=this.props.breakpoint||(0,s.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),D=this.state.breakpoint,A=(0,s.getColsFromBreakpoint)(M,S),z={...E};if(D!==M||g.breakpoints!==m||g.cols!==S){D in z||(z[D]=(0,i.cloneLayout)(this.state.layout));let _=(0,s.findOrGenerateResponsiveLayout)(z,m,M,D,A,T);_=(0,i.synchronizeLayoutWithChildren)(_,this.props.children,A,T,this.props.allowOverlap),z[M]=_,this.props.onBreakpointChange(M,A),this.props.onLayoutChange(_,z),this.setState({breakpoint:M,layout:_,cols:A})}const J=C(this.props.margin,M),Z=C(this.props.containerPadding,M);this.props.onWidthChange(this.props.width,J,A,Z)}render(){const{breakpoint:g,breakpoints:m,cols:S,layouts:E,margin:T,containerPadding:M,onBreakpointChange:D,onLayoutChange:A,onWidthChange:z,...J}=this.props;return e.createElement(a.default,p({},J,{margin:C(T,this.state.breakpoint),containerPadding:C(M,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return Zo.default=y,h(y,"propTypes",{breakpoint:t.default.string,breakpoints:t.default.object,allowOverlap:t.default.bool,cols:t.default.object,margin:t.default.oneOfType([t.default.array,t.default.object]),containerPadding:t.default.oneOfType([t.default.array,t.default.object]),layouts(v,g){if(w(v[g])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+w(v[g]));Object.keys(v[g]).forEach(m=>{if(!(m in v.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,i.validateLayout)(v.layouts[m],"layouts."+m)})},width:t.default.number.isRequired,onBreakpointChange:t.default.func,onLayoutChange:t.default.func,onWidthChange:t.default.func}),h(y,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:i.noop,onLayoutChange:i.noop,onWidthChange:i.noop}),Zo}var $a={},Tv=function(){if(typeof Map<"u")return Map;function e(t,n){var i=-1;return t.some(function(s,a){return s[0]===n?(i=a,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var i=e(this.__entries__,n),s=this.__entries__[i];return s&&s[1]},t.prototype.set=function(n,i){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=i:this.__entries__.push([n,i])},t.prototype.delete=function(n){var i=this.__entries__,s=e(i,n);~s&&i.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,i){i===void 0&&(i=null);for(var s=0,a=this.__entries__;s<a.length;s++){var u=a[s];n.call(i,u[1],u[0])}},t}()}(),jc=typeof window<"u"&&typeof document<"u"&&window.document===document,uu=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),tI=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(uu):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),nI=2;function rI(e,t){var n=!1,i=!1,s=0;function a(){n&&(n=!1,e()),i&&c()}function u(){tI(a)}function c(){var f=Date.now();if(n){if(f-s<nI)return;i=!0}else n=!0,i=!1,setTimeout(u,t);s=f}return c}var iI=20,oI=["top","right","bottom","left","width","height","size","weight"],sI=typeof MutationObserver<"u",aI=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=rI(this.refresh.bind(this),iI)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,i=n.indexOf(t);~i&&n.splice(i,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!jc||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),sI?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!jc||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,i=n===void 0?"":n,s=oI.some(function(a){return!!~i.indexOf(a)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Cv=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},uo=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||uu},_v=$u(0,0,0,0);function lu(e){return parseFloat(e)||0}function ig(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(i,s){var a=e["border-"+s+"-width"];return i+lu(a)},0)}function uI(e){for(var t=["top","right","bottom","left"],n={},i=0,s=t;i<s.length;i++){var a=s[i],u=e["padding-"+a];n[a]=lu(u)}return n}function lI(e){var t=e.getBBox();return $u(0,0,t.width,t.height)}function cI(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return _v;var i=uo(e).getComputedStyle(e),s=uI(i),a=s.left+s.right,u=s.top+s.bottom,c=lu(i.width),f=lu(i.height);if(i.boxSizing==="border-box"&&(Math.round(c+a)!==t&&(c-=ig(i,"left","right")+a),Math.round(f+u)!==n&&(f-=ig(i,"top","bottom")+u)),!dI(e)){var p=Math.round(c+a)-t,h=Math.round(f+u)-n;Math.abs(p)!==1&&(c-=p),Math.abs(h)!==1&&(f-=h)}return $u(s.left,s.top,c,f)}var fI=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof uo(e).SVGGraphicsElement}:function(e){return e instanceof uo(e).SVGElement&&typeof e.getBBox=="function"}}();function dI(e){return e===uo(e).document.documentElement}function pI(e){return jc?fI(e)?lI(e):cI(e):_v}function hI(e){var t=e.x,n=e.y,i=e.width,s=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,u=Object.create(a.prototype);return Cv(u,{x:t,y:n,width:i,height:s,top:n,right:t+i,bottom:s+n,left:t}),u}function $u(e,t,n,i){return{x:e,y:t,width:n,height:i}}var mI=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=$u(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=pI(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),gI=function(){function e(t,n){var i=hI(n);Cv(this,{target:t,contentRect:i})}return e}(),yI=function(){function e(t,n,i){if(this.activeObservations_=[],this.observations_=new Tv,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=i}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof uo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new mI(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof uo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new gI(i.target,i.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Rv=typeof WeakMap<"u"?new WeakMap:new Tv,Dv=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=aI.getInstance(),i=new yI(t,n,this);Rv.set(this,i)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Dv.prototype[e]=function(){var t;return(t=Rv.get(this))[e].apply(t,arguments)}});var vI=function(){return typeof uu.ResizeObserver<"u"?uu.ResizeObserver:Dv}();const bI=Object.freeze(Object.defineProperty({__proto__:null,default:vI},Symbol.toStringTag,{value:"Module"})),wI=Xg(bI);var og;function xI(){if(og)return $a;og=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.default=R;var e=u(j),t=s(wr()),n=s(wI),i=s(Nf());function s(w){return w&&w.__esModule?w:{default:w}}function a(w){if(typeof WeakMap!="function")return null;var C=new WeakMap,y=new WeakMap;return(a=function(v){return v?y:C})(w)}function u(w,C){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var y=a(C);if(y&&y.has(w))return y.get(w);var v={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in w)if(m!=="default"&&Object.prototype.hasOwnProperty.call(w,m)){var S=g?Object.getOwnPropertyDescriptor(w,m):null;S&&(S.get||S.set)?Object.defineProperty(v,m,S):v[m]=w[m]}return v.default=w,y&&y.set(w,v),v}function c(){return c=Object.assign?Object.assign.bind():function(w){for(var C=1;C<arguments.length;C++){var y=arguments[C];for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(w[v]=y[v])}return w},c.apply(this,arguments)}function f(w,C,y){return C=p(C),C in w?Object.defineProperty(w,C,{value:y,enumerable:!0,configurable:!0,writable:!0}):w[C]=y,w}function p(w){var C=h(w,"string");return typeof C=="symbol"?C:String(C)}function h(w,C){if(typeof w!="object"||w===null)return w;var y=w[Symbol.toPrimitive];if(y!==void 0){var v=y.call(w,C);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(w)}const x="react-grid-layout";function R(w){var C;return C=class extends e.Component{constructor(){super(...arguments),f(this,"state",{width:1280}),f(this,"elementRef",e.createRef()),f(this,"mounted",!1),f(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default(g=>{if(this.elementRef.current instanceof HTMLElement){const S=g[0].contentRect.width;this.setState({width:S})}});const v=this.elementRef.current;v instanceof HTMLElement&&this.resizeObserver.observe(v)}componentWillUnmount(){this.mounted=!1;const v=this.elementRef.current;v instanceof HTMLElement&&this.resizeObserver.unobserve(v),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:v,...g}=this.props;return v&&!this.mounted?e.createElement("div",{className:(0,i.default)(this.props.className,x),style:this.props.style,ref:this.elementRef}):e.createElement(w,c({innerRef:this.elementRef},g,this.state))}},f(C,"defaultProps",{measureBeforeMount:!1}),f(C,"propTypes",{measureBeforeMount:t.default.bool}),C}return $a}var sg;function SI(){return sg||(sg=1,function(e){e.exports=Ev().default,e.exports.utils=po(),e.exports.calculateUtils=Af(),e.exports.Responsive=eI().default,e.exports.Responsive.utils=Ov(),e.exports.WidthProvider=xI().default}(vc)),vc.exports}var ag=SI();const EI=ag.WidthProvider(ag.Responsive),OI=({items:e,storageKey:t,defaultLayouts:n})=>{const i=j.useRef(null),s=me.useTheme(),[a,u]=j.useState(!1),[c,f]=j.useState(n),[p,h]=j.useState(1200),{editMode:x}=Pf();j.useEffect(()=>{try{const w=localStorage.getItem(t),C=["lg","md","sm","xs"],y={lg:[],md:[],sm:[],xs:[]};let v=n;if(w)try{v=JSON.parse(w)}catch(g){console.error("Failed to parse saved layouts:",g)}for(const g of C){const m=v[g]||[],S=new Map(m.map(E=>[E.i,E]));e.forEach(E=>{const T=S.get(E.id);T?T.w===1&&T.h===1&&E.layout?y[g].push({...E.layout}):y[g].push({...T}):E.layout?y[g].push({...E.layout}):console.warn(`Grid item "${E.id}" has no registered layout. Components should register with default sizes via registerGridItem().`)})}f(y)}catch(w){console.error("Failed to load layouts:",w)}},[t,e,n]);const R=j.useCallback((w,C)=>{f(C);try{localStorage.setItem(t,JSON.stringify(C))}catch(y){console.error("Failed to save layouts:",y)}},[t]);return j.useEffect(()=>{u(!0),i.current&&h(i.current.getBoundingClientRect().width)},[]),a?F.jsxs(me.Box,{sx:{width:"100%",height:"100%",position:"relative"},ref:i,children:[x&&F.jsx(me.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0,pointerEvents:"none",backgroundSize:"30px 30px",backgroundImage:`linear-gradient(to right, ${Ka(s.palette.primary.main,.05)} 1px, transparent 1px), linear-gradient(to bottom, ${Ka(s.palette.primary.main,.05)} 1px, transparent 1px)`}}),F.jsx(EI,{className:"layout",layouts:c,breakpoints:{lg:1200,md:996,sm:768,xs:480},cols:{lg:15,md:15,sm:15,xs:15},rowHeight:200,width:p,containerPadding:[0,0],isResizable:x,isDraggable:x,compactType:null,preventCollision:!0,useCSSTransforms:a,onLayoutChange:R,resizeHandles:["se","sw","ne","nw"],children:e.map(w=>F.jsx(me.Box,{sx:{borderRadius:1,overflow:"hidden",position:"relative",outline:x?`2px dashed ${s.palette.primary.main}`:"none","&:hover":{outline:x?`2px solid ${s.palette.primary.main}`:"none"}},children:F.jsx(me.Box,{sx:{pointerEvents:x?"none":"auto",overflow:"hidden",position:"relative",height:"100%",width:"100%"},children:w.content})},w.id))})]}):null};function Mv(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.error("Error loading from localStorage:",t),null}}function Hc(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error("Error saving to localStorage:",n)}}const Os="user-layout-presets";function Lu(){try{const e=localStorage.getItem(Os);return e?JSON.parse(e):[]}catch(e){return console.error("Failed to load user presets:",e),[]}}function TI(e,t){try{const n=Lu(),i=`preset-${Date.now()}`,s=Date.now(),a=JSON.parse(JSON.stringify(t));return n.push({id:i,name:e,layouts:a,createdAt:s,updatedAt:s}),localStorage.setItem(Os,JSON.stringify(n)),i}catch(n){return console.error("Failed to save user preset:",n),""}}function CI(e){try{const t=Lu();if(!t.some(s=>s.id===e))return!1;const i=t.filter(s=>s.id!==e);return localStorage.setItem(Os,JSON.stringify(i)),!0}catch(t){return console.error("Failed to delete user preset:",t),!1}}function _I(e,t){try{const n=Lu(),i=n.findIndex(s=>s.id===e);return i===-1?!1:(n[i]={...n[i],...t,updatedAt:Date.now()},localStorage.setItem(Os,JSON.stringify(n)),!0)}catch(n){return console.error("Failed to update user preset:",n),!1}}function RI(e,t){try{const n=Object.keys(e).sort(),i=Object.keys(t).sort();if(n.length!==i.length||n.join(",")!==i.join(","))return!1;for(const s of n){const a=e[s]||[],u=t[s]||[];if(a.length!==u.length)return!1;const c=new Map(a.map(p=>[p.i,p])),f=new Map(u.map(p=>[p.i,p]));if(c.size!==f.size)return!1;for(const[p,h]of c.entries()){const x=f.get(p);if(!x||h.x!==x.x||h.y!==x.y||h.w!==x.w||h.h!==x.h||h.minW!==x.minW||h.minH!==x.minH||h.maxW!==x.maxW||h.maxH!==x.maxH||h.static!==x.static)return!1}}return!0}catch(n){return console.error("Error comparing layouts:",n),!1}}function DI({storageKey:e,defaultLayouts:t,onLayoutChangeCallback:n,debounceTime:i=500}){const[s,a]=j.useState(()=>Mv(e)||JSON.parse(JSON.stringify(t))),u=j.useRef(s),c=j.useRef(null),f=j.useRef(!1),p=j.useCallback((R,w)=>{if(f.current||RI(w,u.current))return;f.current=!0,u.current=w,a(w),c.current&&clearTimeout(c.current);const C=()=>{Hc(e,w),n&&n(w),f.current=!1};c.current=window.setTimeout(C,i)},[e,n,i]),h=j.useCallback(R=>{const w=JSON.parse(JSON.stringify(R));u.current=w,a(w),Hc(e,w),n&&n(w)},[e,n,s]),x=j.useCallback(()=>{h(t)},[h,t]);return j.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]),{layouts:s,onLayoutChange:p,applyLayout:h,resetToDefault:x}}const MI=jt(F.jsx("path",{d:"M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"}),"ViewModule"),PI=jt(F.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"DesktopWindows"),ug=jt(F.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"}),"Tablet"),II=jt(F.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphone"),Ji={lg:{description:"Large screens (≥1200px)",color:"primary",icon:"desktop"},md:{description:"Medium screens (≥996px)",color:"success",icon:"tablet"},sm:{description:"Small screens (≥768px)",color:"info",icon:"tabletRotated"},xs:{description:"Extra small screens (<768px)",color:"warning",icon:"phone"}},Pv=({showLabel:e=!1})=>{const t=me.useTheme(),n=me.useMediaQuery(t.breakpoints.between("sm","md")),i=me.useMediaQuery(t.breakpoints.between("md","lg")),s=me.useMediaQuery(t.breakpoints.up("lg"));let a,u,c;return s?(a="lg",u=F.jsx(PI,{fontSize:"small"}),c=Ji.lg.color):i?(a="md",u=F.jsx(ug,{fontSize:"small"}),c=Ji.md.color):n?(a="sm",u=F.jsx(ug,{fontSize:"small",sx:{transform:"rotate(90deg)"}}),c=Ji.sm.color):(a="xs",u=F.jsx(II,{fontSize:"small"}),c=Ji.xs.color),F.jsx(me.Tooltip,{title:Ji[a].description,children:F.jsx(me.Chip,{icon:u,label:e?a.toUpperCase():void 0,color:c,size:"small",variant:"outlined",sx:{height:24,minWidth:e?48:32,".MuiChip-icon":{ml:e?void 0:"0px",mr:e?void 0:"-6px"}}})})},NI=()=>{const{editMode:e,toggleEditMode:t}=fo(),n=()=>{t()};return F.jsxs(me.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[F.jsx(me.Tooltip,{title:e?"Exit Layout Edit Mode":"Edit Layout",children:F.jsx(me.IconButton,{onClick:n,size:"small",color:e?"primary":"default",sx:{border:e?"1px solid":"none","&:hover":{backgroundColor:e?"rgba(25, 118, 210, 0.08)":void 0}},children:F.jsx(MI,{})})}),e&&F.jsxs(F.Fragment,{children:[F.jsx(me.Divider,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),F.jsx(Pv,{showLabel:!0})]})]})},AI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Lf=AI?j.useLayoutEffect:j.useEffect;function kI(e){const t=j.useRef(e);return Lf(()=>{t.current=e}),j.useCallback(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return t.current==null?void 0:t.current(...i)},[])}function $I(e,t){t===void 0&&(t=[e]);const n=j.useRef(e);return Lf(()=>{n.current!==e&&(n.current=e)},t),n}function lg(e){const t=kI(e),n=j.useRef(null),i=j.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,i]}let xc={};function LI(e,t){return j.useMemo(()=>{const n=xc[e]==null?0:xc[e]+1;return xc[e]=n,e+"-"+n},[e,t])}var cg;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(cg||(cg={}));function fg(){}const zI=Object.freeze({x:0,y:0});var Ki;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ki||(Ki={}));var dg;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(dg||(dg={}));var Ar;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ar||(Ar={}));Ar.Space,Ar.Enter,Ar.Esc,Ar.Space,Ar.Enter,Ar.Tab;var pg;(function(e){e[e.RightClick=2]="RightClick"})(pg||(pg={}));var hg;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hg||(hg={}));var mg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(mg||(mg={}));Ki.Backward+"",Ki.Forward+"",Ki.Backward+"",Ki.Forward+"";var qc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qc||(qc={}));var Vc;(function(e){e.Optimized="optimized"})(Vc||(Vc={}));function FI(e,t){return j.useMemo(()=>e.reduce((n,i)=>{let{eventName:s,handler:a}=i;return n[s]=u=>{a(u,t)},n},{}),[e,t])}qc.WhileDragging,Vc.Optimized;const WI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:fg,draggableNodes:new Map,over:null,measureDroppableContainers:fg},BI=j.createContext(WI),UI=j.createContext({...zI,scaleX:1,scaleY:1});var gg;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(gg||(gg={}));const jI=j.createContext(null),yg="button",HI="Draggable";function qI(e){let{id:t,data:n,disabled:i=!1,attributes:s}=e;const a=LI(HI),{activators:u,activatorEvent:c,active:f,activeNodeRect:p,ariaDescribedById:h,draggableNodes:x,over:R}=j.useContext(BI),{role:w=yg,roleDescription:C="draggable",tabIndex:y=0}=s??{},v=(f==null?void 0:f.id)===t,g=j.useContext(v?UI:jI),[m,S]=lg(),[E,T]=lg(),M=FI(u,t),D=$I(n);Lf(()=>(x.set(t,{id:t,key:a,node:m,activatorNode:E,data:D}),()=>{const z=x.get(t);z&&z.key===a&&x.delete(t)}),[x,t]);const A=j.useMemo(()=>({role:w,tabIndex:y,"aria-disabled":i,"aria-pressed":v&&w===yg?!0:void 0,"aria-roledescription":C,"aria-describedby":h.draggable}),[i,w,y,v,C,h.draggable]);return{active:f,activatorEvent:c,activeNodeRect:p,attributes:A,isDragging:v,listeners:i?void 0:M,node:m,over:R,setNodeRef:S,setActivatorNodeRef:T,transform:g}}function VI({id:e,children:t}){const{attributes:n,listeners:i,setNodeRef:s,transform:a}=qI({id:e}),u={transform:a?`translate(${a.x}px, ${a.y}px)`:void 0,cursor:"pointer",userSelect:"none"};return F.jsx("div",{ref:s,style:u,...n,...i,children:t})}const GI=e=>{if(!e)return!0;const t=`notification_shown_${e}`;return localStorage.getItem(t)?!1:(localStorage.setItem(t,"true"),!0)},zf=co.create(e=>({notifications:[],addNotificationData:t=>{t.singular&&!GI(t.singularId)||e(n=>({notifications:[...n.notifications,{...t,id:`${Date.now()*Math.random()}`}]}))},removeNotificationData:t=>{e(n=>({notifications:n.notifications.filter(i=>i.id!==`${t}`)}))},clearNotificationsByType:t=>{e(n=>({notifications:n.notifications.filter(i=>i.type!==t)}))}})),YI=({action:e,maxAttempts:t=3,delay:n=1e3,successMessage:i="Operation successful",errorMessage:s="Operation failed, retrying...",condition:a=!0})=>{const[u,c]=j.useState(0),{addNotificationData:f,clearNotificationsByType:p}=zf(),h=j.useCallback(()=>{if(a&&u<t){const x=setTimeout(()=>{e(),c(R=>R+1)},n);return()=>clearTimeout(x)}else u>=t?f({type:"error",message:s}):a||(p("error"),f({type:"success",message:i}))},[e,u,a,t,n,s,i,p]);return j.useEffect(()=>h(),[h]),{attempts:u}},ZI=({title:e,dialogId:t,callOnOpen:n,showTitle:i=!0,onOpenDialog:s,icon:a})=>{const u=c=>{c.stopPropagation(),c.preventDefault(),s?s(t):console.warn("DialogOpener: onOpenDialog prop not provided. Please provide a dialog store handler."),n&&n(c)};return F.jsxs(me.MenuItem,{component:me.Button,onClick:u,style:{marginLeft:"auto",zIndex:1e3,width:"100%",display:"flex",justifyContent:"left",columnGap:2},children:[a," ",i&&e]})},Iv=jt(F.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Nv=({children:e,open:t,onClose:n,...i})=>{const s=me.useTheme(),a=me.useMediaQuery(s.breakpoints.down("sm"));return F.jsx(me.Dialog,{sx:{"& .MuiDialog-paper":{borderRadius:a?"0px !important":"14px",height:a?"100vh":"90vh",display:"flex",flexDirection:"column",maxHeight:a?"100vh":"90vh",margin:a?0:void 0}},open:t,onClose:n,fullScreen:a,...i,children:e})},XI=({onSubmit:e,title:t,children:n,submitText:i="Submit",disableSubmit:s=!1,showUnsavedChangesWarning:a=!1,isDirty:u=!1,onClose:c,...f})=>{const[p,h]=j.useState(!1),x=()=>{a&&u?h(!0):c?c():console.warn("FormDialog: onClose prop not provided. Please provide a close handler.")},R=()=>{h(!1),c&&c()};return F.jsxs(F.Fragment,{children:[F.jsxs(Nv,{open:!0,onClose:x,...f,children:[F.jsxs(me.DialogTitle,{sx:{m:0,p:2,pr:6},children:[t,F.jsx(me.IconButton,{"aria-label":"close",onClick:x,sx:{position:"absolute",right:8,top:8,color:w=>w.palette.grey[500]},children:F.jsx(Iv,{})})]}),F.jsx(me.DialogContent,{sx:{p:"24px",overflow:"hidden",display:"flex",flexDirection:"column",minHeight:0},children:F.jsxs("form",{onSubmit:e,style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[F.jsx(me.Box,{sx:{flex:1,minHeight:0,overflow:"auto"},children:n}),F.jsxs(me.DialogActions,{sx:{borderTop:1,borderColor:"divider"},children:[F.jsx(me.Button,{onClick:x,children:"Cancel"}),F.jsx(me.Button,{type:"submit",variant:"contained",disabled:!u||s,color:"primary",children:i})]})]})})]}),F.jsxs(me.Dialog,{open:p,onClose:()=>h(!1),children:[F.jsx(me.DialogTitle,{children:"Unsaved Changes"}),F.jsx(me.DialogContent,{children:F.jsx(me.DialogContentText,{children:"You have unsaved changes. Are you sure you want to close?"})}),F.jsxs(me.DialogActions,{children:[F.jsx(me.Button,{onClick:()=>h(!1),children:"Cancel"}),F.jsx(me.Button,{onClick:R,color:"warning",children:"Close Without Saving"})]})]})]})},Av=new Map;function JI(e,t){Av.set(e,t)}function KI(e){return Av.get(e)}function QI(e){console.warn("openDialog called but no dialog store is configured. Please use a dialog store from the main package.")}function eN(){console.warn("closeDialog called but no dialog store is configured. Please use a dialog store from the main package.")}const tN=({openDialog:e})=>{if(!e)return null;const t=KI(e);return t?F.jsx(t,{}):null},nN=jt(F.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),rN=jt(F.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),iN=6e3,oN=({notificationKey:e})=>{const[t,n]=j.useState(100),[i,s]=j.useState(!1),a=j.useRef(null),u=j.useRef(Date.now()),c=j.useRef(0);return j.useEffect(()=>{if(i){a.current&&(clearInterval(a.current),c.current+=Date.now()-u.current);return}return u.current=Date.now(),a.current=setInterval(()=>{const f=c.current+(Date.now()-u.current),p=Math.max(0,100*(1-f/iN));n(p),p<=0&&(clearInterval(a.current),af.closeSnackbar(e))},50),()=>{a.current&&clearInterval(a.current)}},[i,e]),F.jsxs(me.Box,{sx:{position:"relative",display:"inline-flex",mr:1},children:[F.jsx(me.CircularProgress,{variant:"determinate",value:t,size:24,sx:{color:"rgba(255, 255, 255, 0.7)"}}),F.jsx(me.IconButton,{size:"small",onClick:()=>s(!i),sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"rgba(255, 255, 255, 0.7)",padding:0,"&:hover":{color:"white"},width:16,height:16},children:i?F.jsx(nN,{sx:{fontSize:12}}):F.jsx(rN,{sx:{fontSize:12}})})]})},sN=e=>F.jsx(me.IconButton,{onClick:()=>{af.closeSnackbar(e)},children:F.jsx(Iv,{})}),aN=e=>F.jsxs(me.Box,{sx:{display:"flex",alignItems:"center"},children:[F.jsx(oN,{notificationKey:e}),sN(e)]}),uN=()=>{const{notifications:e,removeNotificationData:t}=zf(),{enqueueSnackbar:n}=af.useSnackbar();return j.useEffect(()=>{e.length>0&&e.forEach(i=>{n(i.message,{variant:i.type,action:aN,autoHideDuration:null,persist:!0}),t(Number(i.id))})},[e,n,t]),F.jsx(F.Fragment,{})},lN=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,""),cN=e=>e.toLowerCase().replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),Gc=e=>{if(e==null)return e;if(Array.isArray(e))return e.map(n=>Gc(n));if(typeof e!="object")return e;const t={};return Object.entries(e).forEach(([n,i])=>{const s=cN(n);t[s]=Gc(i)}),t},Yc=e=>{if(e==null)return e;if(Array.isArray(e))return e.map(n=>Yc(n));if(typeof e!="object")return e;const t={};return Object.entries(e).forEach(([n,i])=>{const s=lN(n);t[s]=Yc(i)}),t};class Oi extends Error{}class fN extends Oi{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class dN extends Oi{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class pN extends Oi{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Qi extends Oi{}class kv extends Oi{constructor(t){super(`Invalid unit ${t}`)}}class kt extends Oi{}class Nr extends Oi{constructor(){super("Zone is an abstract class")}}const Se="numeric",Wn="short",cn="long",cu={year:Se,month:Se,day:Se},$v={year:Se,month:Wn,day:Se},hN={year:Se,month:Wn,day:Se,weekday:Wn},Lv={year:Se,month:cn,day:Se},zv={year:Se,month:cn,day:Se,weekday:cn},Fv={hour:Se,minute:Se},Wv={hour:Se,minute:Se,second:Se},Bv={hour:Se,minute:Se,second:Se,timeZoneName:Wn},Uv={hour:Se,minute:Se,second:Se,timeZoneName:cn},jv={hour:Se,minute:Se,hourCycle:"h23"},Hv={hour:Se,minute:Se,second:Se,hourCycle:"h23"},qv={hour:Se,minute:Se,second:Se,hourCycle:"h23",timeZoneName:Wn},Vv={hour:Se,minute:Se,second:Se,hourCycle:"h23",timeZoneName:cn},Gv={year:Se,month:Se,day:Se,hour:Se,minute:Se},Yv={year:Se,month:Se,day:Se,hour:Se,minute:Se,second:Se},Zv={year:Se,month:Wn,day:Se,hour:Se,minute:Se},Xv={year:Se,month:Wn,day:Se,hour:Se,minute:Se,second:Se},mN={year:Se,month:Wn,day:Se,weekday:Wn,hour:Se,minute:Se},Jv={year:Se,month:cn,day:Se,hour:Se,minute:Se,timeZoneName:Wn},Kv={year:Se,month:cn,day:Se,hour:Se,minute:Se,second:Se,timeZoneName:Wn},Qv={year:Se,month:cn,day:Se,weekday:cn,hour:Se,minute:Se,timeZoneName:cn},e0={year:Se,month:cn,day:Se,weekday:cn,hour:Se,minute:Se,second:Se,timeZoneName:cn};class Ts{get type(){throw new Nr}get name(){throw new Nr}get ianaName(){return this.name}get isUniversal(){throw new Nr}offsetName(t,n){throw new Nr}formatOffset(t,n){throw new Nr}offset(t){throw new Nr}equals(t){throw new Nr}get isValid(){throw new Nr}}let Sc=null;class zu extends Ts{static get instance(){return Sc===null&&(Sc=new zu),Sc}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return f0(t,n,i)}formatOffset(t,n){return us(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const Zc=new Map;function gN(e){let t=Zc.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Zc.set(e,t)),t}const yN={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function vN(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,u,c,f,p,h]=i;return[u,s,a,c,f,p,h]}function bN(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:a,value:u}=n[s],c=yN[a];a==="era"?i[c]=u:Ae(c)||(i[c]=parseInt(u,10))}return i}const Ec=new Map;class br extends Ts{static create(t){let n=Ec.get(t);return n===void 0&&Ec.set(t,n=new br(t)),n}static resetCache(){Ec.clear(),Zc.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=br.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return f0(t,n,i,this.name)}formatOffset(t,n){return us(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=gN(this.name);let[s,a,u,c,f,p,h]=i.formatToParts?bN(i,n):vN(i,n);c==="BC"&&(s=-Math.abs(s)+1);const R=Wu({year:s,month:a,day:u,hour:f===24?0:f,minute:p,second:h,millisecond:0});let w=+n;const C=w%1e3;return w-=C>=0?C:1e3+C,(R-w)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let vg={};function wN(e,t={}){const n=JSON.stringify([e,t]);let i=vg[n];return i||(i=new Intl.ListFormat(e,t),vg[n]=i),i}const Xc=new Map;function Jc(e,t={}){const n=JSON.stringify([e,t]);let i=Xc.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Xc.set(n,i)),i}const Kc=new Map;function xN(e,t={}){const n=JSON.stringify([e,t]);let i=Kc.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),Kc.set(n,i)),i}const Qc=new Map;function SN(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let a=Qc.get(s);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),Qc.set(s,a)),a}let ns=null;function EN(){return ns||(ns=new Intl.DateTimeFormat().resolvedOptions().locale,ns)}const ef=new Map;function t0(e){let t=ef.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),ef.set(e,t)),t}const tf=new Map;function ON(e){let t=tf.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...n0,...t}),tf.set(e,t)}return t}function TN(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,s;try{i=Jc(e).resolvedOptions(),s=e}catch{const f=e.substring(0,n);i=Jc(f).resolvedOptions(),s=f}const{numberingSystem:a,calendar:u}=i;return[s,a,u]}}function CN(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function _N(e){const t=[];for(let n=1;n<=12;n++){const i=ke.utc(2009,n,1);t.push(e(i))}return t}function RN(e){const t=[];for(let n=1;n<=7;n++){const i=ke.utc(2016,11,13+n);t.push(e(i))}return t}function La(e,t,n,i){const s=e.listingMode();return s==="error"?null:s==="en"?n(t):i(t)}function DN(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||t0(e.locale).numberingSystem==="latn"}class MN{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:a,...u}=i;if(!n||Object.keys(u).length>0){const c={useGrouping:!1,...i};i.padTo>0&&(c.minimumIntegerDigits=i.padTo),this.inf=xN(t,c)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):jf(t,3);return St(n,this.padTo)}}}class PN{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const u=-1*(t.offset/60),c=u>=0?`Etc/GMT+${u}`:`Etc/GMT${u}`;t.offset!==0&&br.create(c).valid?(s=c,this.dt=t):(s="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,s=t.zone.name):(s="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Jc(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class IN{constructor(t,n,i){this.opts={style:"long",...i},!n&&l0()&&(this.rtf=SN(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):eA(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const n0={firstDay:1,minimalDays:4,weekend:[6,7]};class Qe{static fromOpts(t){return Qe.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,s,a=!1){const u=t||yt.defaultLocale,c=u||(a?"en-US":EN()),f=n||yt.defaultNumberingSystem,p=i||yt.defaultOutputCalendar,h=rf(s)||yt.defaultWeekSettings;return new Qe(c,f,p,h,u)}static resetCache(){ns=null,Xc.clear(),Kc.clear(),Qc.clear(),ef.clear(),tf.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return Qe.create(t,n,i,s)}constructor(t,n,i,s,a){const[u,c,f]=TN(t);this.locale=u,this.numberingSystem=n||c||null,this.outputCalendar=i||f||null,this.weekSettings=s,this.intl=CN(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=DN(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Qe.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,rf(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return La(this,t,h0,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const s=n?{month:t,day:"numeric"}:{month:t},a=n?"format":"standalone";if(!this.monthsCache[a][t]){const u=i?c=>this.dtFormatter(c,s).format():c=>this.extract(c,s,"month");this.monthsCache[a][t]=_N(u)}return this.monthsCache[a][t]})}weekdays(t,n=!1){return La(this,t,y0,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},s=n?"format":"standalone";return this.weekdaysCache[s][t]||(this.weekdaysCache[s][t]=RN(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][t]})}meridiems(){return La(this,void 0,()=>v0,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ke.utc(2016,11,13,9),ke.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return La(this,t,b0,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[ke.utc(-40,1,1),ke.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const s=this.dtFormatter(t,n),a=s.formatToParts(),u=a.find(c=>c.type.toLowerCase()===i);return u?u.value:null}numberFormatter(t={}){return new MN(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new PN(t,this.intl,n)}relFormatter(t={}){return new IN(this.intl,this.isEnglish(),t)}listFormatter(t={}){return wN(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||t0(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:c0()?ON(this.locale):n0}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Oc=null;class Ut extends Ts{static get utcInstance(){return Oc===null&&(Oc=new Ut(0)),Oc}static instance(t){return t===0?Ut.utcInstance:new Ut(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ut(Bu(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${us(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${us(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return us(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class NN extends Ts{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function zr(e,t){if(Ae(e)||e===null)return t;if(e instanceof Ts)return e;if(FN(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?zu.instance:n==="utc"||n==="gmt"?Ut.utcInstance:Ut.parseSpecifier(n)||br.create(e)}else return Wr(e)?Ut.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new NN(e)}const Ff={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},bg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},AN=Ff.hanidec.replace(/[\[|\]]/g,"").split("");function kN(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(Ff.hanidec)!==-1)t+=AN.indexOf(e[n]);else for(const s in bg){const[a,u]=bg[s];i>=a&&i<=u&&(t+=i-a)}}return parseInt(t,10)}else return t}const nf=new Map;function $N(){nf.clear()}function $n({numberingSystem:e},t=""){const n=e||"latn";let i=nf.get(n);i===void 0&&(i=new Map,nf.set(n,i));let s=i.get(t);return s===void 0&&(s=new RegExp(`${Ff[n]}${t}`),i.set(t,s)),s}let wg=()=>Date.now(),xg="system",Sg=null,Eg=null,Og=null,Tg=60,Cg,_g=null;class yt{static get now(){return wg}static set now(t){wg=t}static set defaultZone(t){xg=t}static get defaultZone(){return zr(xg,zu.instance)}static get defaultLocale(){return Sg}static set defaultLocale(t){Sg=t}static get defaultNumberingSystem(){return Eg}static set defaultNumberingSystem(t){Eg=t}static get defaultOutputCalendar(){return Og}static set defaultOutputCalendar(t){Og=t}static get defaultWeekSettings(){return _g}static set defaultWeekSettings(t){_g=rf(t)}static get twoDigitCutoffYear(){return Tg}static set twoDigitCutoffYear(t){Tg=t%100}static get throwOnInvalid(){return Cg}static set throwOnInvalid(t){Cg=t}static resetCaches(){Qe.resetCache(),br.resetCache(),ke.resetCache(),$N()}}class zn{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const r0=[0,31,59,90,120,151,181,212,243,273,304,334],i0=[0,31,60,91,121,152,182,213,244,274,305,335];function On(e,t){return new zn("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Wf(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function o0(e,t,n){return n+(Cs(e)?i0:r0)[t-1]}function s0(e,t){const n=Cs(e)?i0:r0,i=n.findIndex(a=>a<t),s=t-n[i];return{month:i+1,day:s}}function Bf(e,t){return(e-t+7)%7+1}function fu(e,t=4,n=1){const{year:i,month:s,day:a}=e,u=o0(i,s,a),c=Bf(Wf(i,s,a),n);let f=Math.floor((u-c+14-t)/7),p;return f<1?(p=i-1,f=gs(p,t,n)):f>gs(i,t,n)?(p=i+1,f=1):p=i,{weekYear:p,weekNumber:f,weekday:c,...Uu(e)}}function Rg(e,t=4,n=1){const{weekYear:i,weekNumber:s,weekday:a}=e,u=Bf(Wf(i,1,t),n),c=no(i);let f=s*7+a-u-7+t,p;f<1?(p=i-1,f+=no(p)):f>c?(p=i+1,f-=no(i)):p=i;const{month:h,day:x}=s0(p,f);return{year:p,month:h,day:x,...Uu(e)}}function Tc(e){const{year:t,month:n,day:i}=e,s=o0(t,n,i);return{year:t,ordinal:s,...Uu(e)}}function Dg(e){const{year:t,ordinal:n}=e,{month:i,day:s}=s0(t,n);return{year:t,month:i,day:s,...Uu(e)}}function Mg(e,t){if(!Ae(e.localWeekday)||!Ae(e.localWeekNumber)||!Ae(e.localWeekYear)){if(!Ae(e.weekday)||!Ae(e.weekNumber)||!Ae(e.weekYear))throw new Qi("Cannot mix locale-based week fields with ISO-based week fields");return Ae(e.localWeekday)||(e.weekday=e.localWeekday),Ae(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ae(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function LN(e,t=4,n=1){const i=Fu(e.weekYear),s=Tn(e.weekNumber,1,gs(e.weekYear,t,n)),a=Tn(e.weekday,1,7);return i?s?a?!1:On("weekday",e.weekday):On("week",e.weekNumber):On("weekYear",e.weekYear)}function zN(e){const t=Fu(e.year),n=Tn(e.ordinal,1,no(e.year));return t?n?!1:On("ordinal",e.ordinal):On("year",e.year)}function a0(e){const t=Fu(e.year),n=Tn(e.month,1,12),i=Tn(e.day,1,du(e.year,e.month));return t?n?i?!1:On("day",e.day):On("month",e.month):On("year",e.year)}function u0(e){const{hour:t,minute:n,second:i,millisecond:s}=e,a=Tn(t,0,23)||t===24&&n===0&&i===0&&s===0,u=Tn(n,0,59),c=Tn(i,0,59),f=Tn(s,0,999);return a?u?c?f?!1:On("millisecond",s):On("second",i):On("minute",n):On("hour",t)}function Ae(e){return typeof e>"u"}function Wr(e){return typeof e=="number"}function Fu(e){return typeof e=="number"&&e%1===0}function FN(e){return typeof e=="string"}function WN(e){return Object.prototype.toString.call(e)==="[object Date]"}function l0(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function c0(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function BN(e){return Array.isArray(e)?e:[e]}function Pg(e,t,n){if(e.length!==0)return e.reduce((i,s)=>{const a=[t(s),s];return i&&n(i[0],a[0])===i[0]?i:a},null)[1]}function UN(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function lo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function rf(e){if(e==null)return null;if(typeof e!="object")throw new kt("Week settings must be an object");if(!Tn(e.firstDay,1,7)||!Tn(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Tn(t,1,7)))throw new kt("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Tn(e,t,n){return Fu(e)&&e>=t&&e<=n}function jN(e,t){return e-t*Math.floor(e/t)}function St(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function kr(e){if(!(Ae(e)||e===null||e===""))return parseInt(e,10)}function oi(e){if(!(Ae(e)||e===null||e===""))return parseFloat(e)}function Uf(e){if(!(Ae(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function jf(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Cs(e){return e%4===0&&(e%100!==0||e%400===0)}function no(e){return Cs(e)?366:365}function du(e,t){const n=jN(t-1,12)+1,i=e+(t-n)/12;return n===2?Cs(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Wu(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Ig(e,t,n){return-Bf(Wf(e,1,t),n)+t-1}function gs(e,t=4,n=1){const i=Ig(e,t,n),s=Ig(e+1,t,n);return(no(e)-i+s)/7}function of(e){return e>99?e:e>yt.twoDigitCutoffYear?1900+e:2e3+e}function f0(e,t,n,i=null){const s=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(a.timeZone=i);const u={timeZoneName:t,...a},c=new Intl.DateTimeFormat(n,u).formatToParts(s).find(f=>f.type.toLowerCase()==="timezonename");return c?c.value:null}function Bu(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function d0(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new kt(`Invalid unit value ${e}`);return t}function pu(e,t){const n={};for(const i in e)if(lo(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=d0(s)}return n}function us(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${St(n,2)}:${St(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${St(n,2)}${St(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Uu(e){return UN(e,["hour","minute","second","millisecond"])}const HN=["January","February","March","April","May","June","July","August","September","October","November","December"],p0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qN=["J","F","M","A","M","J","J","A","S","O","N","D"];function h0(e){switch(e){case"narrow":return[...qN];case"short":return[...p0];case"long":return[...HN];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const m0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],g0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],VN=["M","T","W","T","F","S","S"];function y0(e){switch(e){case"narrow":return[...VN];case"short":return[...g0];case"long":return[...m0];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const v0=["AM","PM"],GN=["Before Christ","Anno Domini"],YN=["BC","AD"],ZN=["B","A"];function b0(e){switch(e){case"narrow":return[...ZN];case"short":return[...YN];case"long":return[...GN];default:return null}}function XN(e){return v0[e.hour<12?0:1]}function JN(e,t){return y0(t)[e.weekday-1]}function KN(e,t){return h0(t)[e.month-1]}function QN(e,t){return b0(t)[e.year<0?0:1]}function eA(e,t,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&a){const x=e==="days";switch(t){case 1:return x?"tomorrow":`next ${s[e][0]}`;case-1:return x?"yesterday":`last ${s[e][0]}`;case 0:return x?"today":`this ${s[e][0]}`}}const u=Object.is(t,-0)||t<0,c=Math.abs(t),f=c===1,p=s[e],h=i?f?p[1]:p[2]||p[1]:f?s[e][0]:e;return u?`${c} ${h} ago`:`in ${c} ${h}`}function Ng(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const tA={D:cu,DD:$v,DDD:Lv,DDDD:zv,t:Fv,tt:Wv,ttt:Bv,tttt:Uv,T:jv,TT:Hv,TTT:qv,TTTT:Vv,f:Gv,ff:Zv,fff:Jv,ffff:Qv,F:Yv,FF:Xv,FFF:Kv,FFFF:e0};class $t{static create(t,n={}){return new $t(t,n)}static parseFormat(t){let n=null,i="",s=!1;const a=[];for(let u=0;u<t.length;u++){const c=t.charAt(u);c==="'"?((i.length>0||s)&&a.push({literal:s||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",s=!s):s||c===n?i+=c:(i.length>0&&a.push({literal:/^\s+$/.test(i),val:i}),i=c,n=c)}return i.length>0&&a.push({literal:s||/^\s+$/.test(i),val:i}),a}static macroTokenToFormatOpts(t){return tA[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,i=void 0){if(this.opts.forceSimple)return St(t,n);const s={...this.opts};return n>0&&(s.padTo=n),i&&(s.signDisplay=i),this.loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(w,C)=>this.loc.extract(t,w,C),u=w=>t.isOffsetFixed&&t.offset===0&&w.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,w.format):"",c=()=>i?XN(t):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),f=(w,C)=>i?KN(t,w):a(C?{month:w}:{month:w,day:"numeric"},"month"),p=(w,C)=>i?JN(t,w):a(C?{weekday:w}:{weekday:w,month:"long",day:"numeric"},"weekday"),h=w=>{const C=$t.macroTokenToFormatOpts(w);return C?this.formatWithSystemDefault(t,C):w},x=w=>i?QN(t,w):a({era:w},"era"),R=w=>{switch(w){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return u({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return u({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return u({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return s?a({day:"numeric"},"day"):this.num(t.day);case"dd":return s?a({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return s?a({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?a({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return f("short",!0);case"LLLL":return f("long",!0);case"LLLLL":return f("narrow",!0);case"M":return s?a({month:"numeric"},"month"):this.num(t.month);case"MM":return s?a({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return f("short",!1);case"MMMM":return f("long",!1);case"MMMMM":return f("narrow",!1);case"y":return s?a({year:"numeric"},"year"):this.num(t.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?a({year:"numeric"},"year"):this.num(t.year,6);case"G":return x("short");case"GG":return x("long");case"GGGGG":return x("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(w)}};return Ng($t.parseFormat(n),R)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,s=h=>{switch(h[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},a=(h,x)=>R=>{const w=s(R);if(w){const C=x.isNegativeDuration&&w!==x.largestUnit?i:1;let y;return this.opts.signMode==="negativeLargestOnly"&&w!==x.largestUnit?y="never":this.opts.signMode==="all"?y="always":y="auto",this.num(h.get(w)*C,R.length,y)}else return R},u=$t.parseFormat(n),c=u.reduce((h,{literal:x,val:R})=>x?h:h.concat(R),[]),f=t.shiftTo(...c.map(s).filter(h=>h)),p={isNegativeDuration:f<0,largestUnit:Object.keys(f.values)[0]};return Ng(u,a(f,p))}}const w0=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ho(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function mo(...e){return t=>e.reduce(([n,i,s],a)=>{const[u,c,f]=a(t,s);return[{...n,...u},c||i,f]},[{},null,1]).slice(0,2)}function go(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const s=n.exec(e);if(s)return i(s)}return[null,null]}function x0(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=kr(t[n+s]);return[i,null,n+s]}}const S0=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,nA=`(?:${S0.source}?(?:\\[(${w0.source})\\])?)?`,Hf=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,E0=RegExp(`${Hf.source}${nA}`),qf=RegExp(`(?:[Tt]${E0.source})?`),rA=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,iA=/(\d{4})-?W(\d\d)(?:-?(\d))?/,oA=/(\d{4})-?(\d{3})/,sA=x0("weekYear","weekNumber","weekDay"),aA=x0("year","ordinal"),uA=/(\d{4})-(\d\d)-(\d\d)/,O0=RegExp(`${Hf.source} ?(?:${S0.source}|(${w0.source}))?`),lA=RegExp(`(?: ${O0.source})?`);function ro(e,t,n){const i=e[t];return Ae(i)?n:kr(i)}function cA(e,t){return[{year:ro(e,t),month:ro(e,t+1,1),day:ro(e,t+2,1)},null,t+3]}function yo(e,t){return[{hours:ro(e,t,0),minutes:ro(e,t+1,0),seconds:ro(e,t+2,0),milliseconds:Uf(e[t+3])},null,t+4]}function _s(e,t){const n=!e[t]&&!e[t+1],i=Bu(e[t+1],e[t+2]),s=n?null:Ut.instance(i);return[{},s,t+3]}function Rs(e,t){const n=e[t]?br.create(e[t]):null;return[{},n,t+1]}const fA=RegExp(`^T?${Hf.source}$`),dA=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function pA(e){const[t,n,i,s,a,u,c,f,p]=e,h=t[0]==="-",x=f&&f[0]==="-",R=(w,C=!1)=>w!==void 0&&(C||w&&h)?-w:w;return[{years:R(oi(n)),months:R(oi(i)),weeks:R(oi(s)),days:R(oi(a)),hours:R(oi(u)),minutes:R(oi(c)),seconds:R(oi(f),f==="-0"),milliseconds:R(Uf(p),x)}]}const hA={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Vf(e,t,n,i,s,a,u){const c={year:t.length===2?of(kr(t)):kr(t),month:p0.indexOf(n)+1,day:kr(i),hour:kr(s),minute:kr(a)};return u&&(c.second=kr(u)),e&&(c.weekday=e.length>3?m0.indexOf(e)+1:g0.indexOf(e)+1),c}const mA=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function gA(e){const[,t,n,i,s,a,u,c,f,p,h,x]=e,R=Vf(t,s,i,n,a,u,c);let w;return f?w=hA[f]:p?w=0:w=Bu(h,x),[R,new Ut(w)]}function yA(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const vA=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,bA=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,wA=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ag(e){const[,t,n,i,s,a,u,c]=e;return[Vf(t,s,i,n,a,u,c),Ut.utcInstance]}function xA(e){const[,t,n,i,s,a,u,c]=e;return[Vf(t,c,n,i,s,a,u),Ut.utcInstance]}const SA=ho(rA,qf),EA=ho(iA,qf),OA=ho(oA,qf),TA=ho(E0),T0=mo(cA,yo,_s,Rs),CA=mo(sA,yo,_s,Rs),_A=mo(aA,yo,_s,Rs),RA=mo(yo,_s,Rs);function DA(e){return go(e,[SA,T0],[EA,CA],[OA,_A],[TA,RA])}function MA(e){return go(yA(e),[mA,gA])}function PA(e){return go(e,[vA,Ag],[bA,Ag],[wA,xA])}function IA(e){return go(e,[dA,pA])}const NA=mo(yo);function AA(e){return go(e,[fA,NA])}const kA=ho(uA,lA),$A=ho(O0),LA=mo(yo,_s,Rs);function zA(e){return go(e,[kA,T0],[$A,LA])}const kg="Invalid Duration",C0={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},FA={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...C0},xn=146097/400,Gi=146097/4800,WA={years:{quarters:4,months:12,weeks:xn/7,days:xn,hours:xn*24,minutes:xn*24*60,seconds:xn*24*60*60,milliseconds:xn*24*60*60*1e3},quarters:{months:3,weeks:xn/28,days:xn/4,hours:xn*24/4,minutes:xn*24*60/4,seconds:xn*24*60*60/4,milliseconds:xn*24*60*60*1e3/4},months:{weeks:Gi/7,days:Gi,hours:Gi*24,minutes:Gi*24*60,seconds:Gi*24*60*60,milliseconds:Gi*24*60*60*1e3},...C0},gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],BA=gi.slice(0).reverse();function mr(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Ge(i)}function _0(e,t){let n=t.milliseconds??0;for(const i of BA.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function $g(e,t){const n=_0(e,t)<0?-1:1;gi.reduceRight((i,s)=>{if(Ae(t[s]))return i;if(i){const a=t[i]*n,u=e[s][i],c=Math.floor(a/u);t[s]+=c*n,t[i]-=c*u*n}return s},null),gi.reduce((i,s)=>{if(Ae(t[s]))return i;if(i){const a=t[i]%1;t[i]-=a,t[s]+=a*e[i][s]}return s},null)}function Lg(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Ge{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?WA:FA;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Qe.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return Ge.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new kt(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Ge({values:pu(t,Ge.normalizeUnit),loc:Qe.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Wr(t))return Ge.fromMillis(t);if(Ge.isDuration(t))return t;if(typeof t=="object")return Ge.fromObject(t);throw new kt(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=IA(t);return i?Ge.fromObject(i,n):Ge.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=AA(t);return i?Ge.fromObject(i,n):Ge.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new kt("need to specify a reason the Duration is invalid");const i=t instanceof zn?t:new zn(t,n);if(yt.throwOnInvalid)throw new pN(i);return new Ge({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new kv(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?$t.create(this.loc,i).formatDurationFromString(this,t):kg}toHuman(t={}){if(!this.isValid)return kg;const n=t.showZeros!==!1,i=gi.map(s=>{const a=this.values[s];return Ae(a)||a===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:s.slice(0,-1)}).format(a)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=jf(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},ke.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?_0(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t),i={};for(const s of gi)(lo(n.values,s)||lo(this.values,s))&&(i[s]=n.get(s)+this.get(s));return mr(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=d0(t(this.values[i],i));return mr(this,{values:n},!0)}get(t){return this[Ge.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...pu(t,Ge.normalizeUnit)};return mr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const u={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:s,conversionAccuracy:i};return mr(this,u)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return $g(this.matrix,t),mr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Lg(this.normalize().shiftToAll().toObject());return mr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(u=>Ge.normalizeUnit(u));const n={},i={},s=this.toObject();let a;for(const u of gi)if(t.indexOf(u)>=0){a=u;let c=0;for(const p in i)c+=this.matrix[p][u]*i[p],i[p]=0;Wr(s[u])&&(c+=s[u]);const f=Math.trunc(c);n[u]=f,i[u]=(c*1e3-f*1e3)/1e3}else Wr(s[u])&&(i[u]=s[u]);for(const u in i)i[u]!==0&&(n[a]+=u===a?i[u]:i[u]/this.matrix[a][u]);return $g(this.matrix,n),mr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return mr(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=Lg(this.values);return mr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of gi)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Yi="Invalid Interval";function UA(e,t){return!e||!e.isValid?mt.invalid("missing or invalid start"):!t||!t.isValid?mt.invalid("missing or invalid end"):t<e?mt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class mt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new kt("need to specify a reason the Interval is invalid");const i=t instanceof zn?t:new zn(t,n);if(yt.throwOnInvalid)throw new dN(i);return new mt({invalid:i})}static fromDateTimes(t,n){const i=Xo(t),s=Xo(n),a=UA(i,s);return a??new mt({start:i,end:s})}static after(t,n){const i=Ge.fromDurationLike(n),s=Xo(t);return mt.fromDateTimes(s,s.plus(i))}static before(t,n){const i=Ge.fromDurationLike(n),s=Xo(t);return mt.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let a,u;try{a=ke.fromISO(i,n),u=a.isValid}catch{u=!1}let c,f;try{c=ke.fromISO(s,n),f=c.isValid}catch{f=!1}if(u&&f)return mt.fromDateTimes(a,c);if(u){const p=Ge.fromISO(s,n);if(p.isValid)return mt.after(a,p)}else if(f){const p=Ge.fromISO(i,n);if(p.isValid)return mt.before(c,p)}}return mt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:i.locale}):s=this.end,s=s.startOf(t,n),Math.floor(s.diff(i,t).get(t))+(s.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?mt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Xo).filter(u=>this.contains(u)).sort((u,c)=>u.toMillis()-c.toMillis()),i=[];let{s}=this,a=0;for(;s<this.e;){const u=n[a]||this.e,c=+u>+this.e?this.e:u;i.push(mt.fromDateTimes(s,c)),s=c,a+=1}return i}splitBy(t){const n=Ge.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,a;const u=[];for(;i<this.e;){const c=this.start.plus(n.mapUnits(f=>f*s));a=+c>+this.e?this.e:c,u.push(mt.fromDateTimes(i,a)),i=a,s+=1}return u}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:mt.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return mt.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((s,a)=>s.s-a.s).reduce(([s,a],u)=>a?a.overlaps(u)||a.abutsStart(u)?[s,a.union(u)]:[s.concat([a]),u]:[s,u],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const s=[],a=t.map(f=>[{time:f.s,type:"s"},{time:f.e,type:"e"}]),u=Array.prototype.concat(...a),c=u.sort((f,p)=>f.time-p.time);for(const f of c)i+=f.type==="s"?1:-1,i===1?n=f.time:(n&&+n!=+f.time&&s.push(mt.fromDateTimes(n,f.time)),n=null);return mt.merge(s)}difference(...t){return mt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Yi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=cu,n={}){return this.isValid?$t.create(this.s.loc.clone(n),t).formatInterval(this):Yi}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Yi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Yi}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Yi}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Yi}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Ge.invalid(this.invalidReason)}mapEndpoints(t){return mt.fromDateTimes(t(this.s),t(this.e))}}class za{static hasDST(t=yt.defaultZone){const n=ke.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return br.isValidZone(t)}static normalizeZone(t){return zr(t,yt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Qe.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Qe.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Qe.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Qe.create(n,i,a)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Qe.create(n,i,a)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Qe.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Qe.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Qe.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Qe.create(n,null,"gregory").eras(t)}static features(){return{relative:l0(),localeWeek:c0()}}}function zg(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Ge.fromMillis(i).as("days"))}function jA(e,t,n){const i=[["years",(f,p)=>p.year-f.year],["quarters",(f,p)=>p.quarter-f.quarter+(p.year-f.year)*4],["months",(f,p)=>p.month-f.month+(p.year-f.year)*12],["weeks",(f,p)=>{const h=zg(f,p);return(h-h%7)/7}],["days",zg]],s={},a=e;let u,c;for(const[f,p]of i)n.indexOf(f)>=0&&(u=f,s[f]=p(e,t),c=a.plus(s),c>t?(s[f]--,e=a.plus(s),e>t&&(c=e,s[f]--,e=a.plus(s))):e=c);return[e,s,c,u]}function HA(e,t,n,i){let[s,a,u,c]=jA(e,t,n);const f=t-s,p=n.filter(x=>["hours","minutes","seconds","milliseconds"].indexOf(x)>=0);p.length===0&&(u<t&&(u=s.plus({[c]:1})),u!==s&&(a[c]=(a[c]||0)+f/(u-s)));const h=Ge.fromObject(a,i);return p.length>0?Ge.fromMillis(f,i).shiftTo(...p).plus(h):h}const qA="missing Intl.DateTimeFormat.formatToParts support";function Ze(e,t=n=>n){return{regex:e,deser:([n])=>t(kN(n))}}const VA=" ",R0=`[ ${VA}]`,D0=new RegExp(R0,"g");function GA(e){return e.replace(/\./g,"\\.?").replace(D0,R0)}function Fg(e){return e.replace(/\./g,"").replace(D0," ").toLowerCase()}function Ln(e,t){return e===null?null:{regex:RegExp(e.map(GA).join("|")),deser:([n])=>e.findIndex(i=>Fg(n)===Fg(i))+t}}function Wg(e,t){return{regex:e,deser:([,n,i])=>Bu(n,i),groups:t}}function Fa(e){return{regex:e,deser:([t])=>t}}function YA(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ZA(e,t){const n=$n(t),i=$n(t,"{2}"),s=$n(t,"{3}"),a=$n(t,"{4}"),u=$n(t,"{6}"),c=$n(t,"{1,2}"),f=$n(t,"{1,3}"),p=$n(t,"{1,6}"),h=$n(t,"{1,9}"),x=$n(t,"{2,4}"),R=$n(t,"{4,6}"),w=v=>({regex:RegExp(YA(v.val)),deser:([g])=>g,literal:!0}),y=(v=>{if(e.literal)return w(v);switch(v.val){case"G":return Ln(t.eras("short"),0);case"GG":return Ln(t.eras("long"),0);case"y":return Ze(p);case"yy":return Ze(x,of);case"yyyy":return Ze(a);case"yyyyy":return Ze(R);case"yyyyyy":return Ze(u);case"M":return Ze(c);case"MM":return Ze(i);case"MMM":return Ln(t.months("short",!0),1);case"MMMM":return Ln(t.months("long",!0),1);case"L":return Ze(c);case"LL":return Ze(i);case"LLL":return Ln(t.months("short",!1),1);case"LLLL":return Ln(t.months("long",!1),1);case"d":return Ze(c);case"dd":return Ze(i);case"o":return Ze(f);case"ooo":return Ze(s);case"HH":return Ze(i);case"H":return Ze(c);case"hh":return Ze(i);case"h":return Ze(c);case"mm":return Ze(i);case"m":return Ze(c);case"q":return Ze(c);case"qq":return Ze(i);case"s":return Ze(c);case"ss":return Ze(i);case"S":return Ze(f);case"SSS":return Ze(s);case"u":return Fa(h);case"uu":return Fa(c);case"uuu":return Ze(n);case"a":return Ln(t.meridiems(),0);case"kkkk":return Ze(a);case"kk":return Ze(x,of);case"W":return Ze(c);case"WW":return Ze(i);case"E":case"c":return Ze(n);case"EEE":return Ln(t.weekdays("short",!1),1);case"EEEE":return Ln(t.weekdays("long",!1),1);case"ccc":return Ln(t.weekdays("short",!0),1);case"cccc":return Ln(t.weekdays("long",!0),1);case"Z":case"ZZ":return Wg(new RegExp(`([+-]${c.source})(?::(${i.source}))?`),2);case"ZZZ":return Wg(new RegExp(`([+-]${c.source})(${i.source})?`),2);case"z":return Fa(/[a-z_+-/]{1,256}?/i);case" ":return Fa(/[^\S\n\r]/);default:return w(v)}})(e)||{invalidReason:qA};return y.token=e,y}const XA={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function JA(e,t,n){const{type:i,value:s}=e;if(i==="literal"){const f=/^\s+$/.test(s);return{literal:!f,val:f?" ":s}}const a=t[i];let u=i;i==="hour"&&(t.hour12!=null?u=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?u="hour12":u="hour24":u=n.hour12?"hour12":"hour24");let c=XA[u];if(typeof c=="object"&&(c=c[a]),c)return{literal:!1,val:c}}function KA(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function QA(e,t,n){const i=e.match(t);if(i){const s={};let a=1;for(const u in n)if(lo(n,u)){const c=n[u],f=c.groups?c.groups+1:1;!c.literal&&c.token&&(s[c.token.val[0]]=c.deser(i.slice(a,a+f))),a+=f}return[i,s]}else return[i,{}]}function ek(e){const t=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Ae(e.z)||(n=br.create(e.z)),Ae(e.Z)||(n||(n=new Ut(e.Z)),i=e.Z),Ae(e.q)||(e.M=(e.q-1)*3+1),Ae(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ae(e.u)||(e.S=Uf(e.u)),[Object.keys(e).reduce((a,u)=>{const c=t(u);return c&&(a[c]=e[u]),a},{}),n,i]}let Cc=null;function tk(){return Cc||(Cc=ke.fromMillis(1555555555555)),Cc}function nk(e,t){if(e.literal)return e;const n=$t.macroTokenToFormatOpts(e.val),i=N0(n,t);return i==null||i.includes(void 0)?e:i}function M0(e,t){return Array.prototype.concat(...e.map(n=>nk(n,t)))}class P0{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=M0($t.parseFormat(n),t),this.units=this.tokens.map(i=>ZA(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,s]=KA(this.units);this.regex=RegExp(i,"i"),this.handlers=s}}explainFromTokens(t){if(this.isValid){const[n,i]=QA(t,this.regex,this.handlers),[s,a,u]=i?ek(i):[null,null,void 0];if(lo(i,"a")&&lo(i,"H"))throw new Qi("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:s,zone:a,specificOffset:u}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function I0(e,t,n){return new P0(e,n).explainFromTokens(t)}function rk(e,t,n){const{result:i,zone:s,specificOffset:a,invalidReason:u}=I0(e,t,n);return[i,s,a,u]}function N0(e,t){if(!e)return null;const i=$t.create(t,e).dtFormatter(tk()),s=i.formatToParts(),a=i.resolvedOptions();return s.map(u=>JA(u,e,a))}const _c="Invalid DateTime",ik=864e13;function rs(e){return new zn("unsupported zone",`the zone "${e.name}" is not supported`)}function Rc(e){return e.weekData===null&&(e.weekData=fu(e.c)),e.weekData}function Dc(e){return e.localWeekData===null&&(e.localWeekData=fu(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function si(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new ke({...n,...t,old:n})}function A0(e,t,n){let i=e-t*60*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=(s-t)*60*1e3;const a=n.offset(i);return s===a?[i,s]:[e-Math.min(s,a)*60*1e3,Math.max(s,a)]}function Wa(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Ha(e,t,n){return A0(Wu(e),t,n)}function Bg(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:i,month:s,day:Math.min(e.c.day,du(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},u=Ge.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),c=Wu(a);let[f,p]=A0(c,n,e.zone);return u!==0&&(f+=u,p=e.zone.offset(f)),{ts:f,o:p}}function Zi(e,t,n,i,s,a){const{setZone:u,zone:c}=n;if(e&&Object.keys(e).length!==0||t){const f=t||c,p=ke.fromObject(e,{...n,zone:f,specificOffset:a});return u?p:p.setZone(c)}else return ke.invalid(new zn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Ba(e,t,n=!0){return e.isValid?$t.create(Qe.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Mc(e,t,n){const i=e.c.year>9999||e.c.year<0;let s="";if(i&&e.c.year>=0&&(s+="+"),s+=St(e.c.year,i?6:4),n==="year")return s;if(t){if(s+="-",s+=St(e.c.month),n==="month")return s;s+="-"}else if(s+=St(e.c.month),n==="month")return s;return s+=St(e.c.day),s}function Ug(e,t,n,i,s,a,u){let c=!n||e.c.millisecond!==0||e.c.second!==0,f="";switch(u){case"day":case"month":case"year":break;default:if(f+=St(e.c.hour),u==="hour")break;if(t){if(f+=":",f+=St(e.c.minute),u==="minute")break;c&&(f+=":",f+=St(e.c.second))}else{if(f+=St(e.c.minute),u==="minute")break;c&&(f+=St(e.c.second))}if(u==="second")break;c&&(!i||e.c.millisecond!==0)&&(f+=".",f+=St(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&e.offset===0&&!a?f+="Z":e.o<0?(f+="-",f+=St(Math.trunc(-e.o/60)),f+=":",f+=St(Math.trunc(-e.o%60))):(f+="+",f+=St(Math.trunc(e.o/60)),f+=":",f+=St(Math.trunc(e.o%60)))),a&&(f+="["+e.zone.ianaName+"]"),f}const k0={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ok={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},qa=["year","month","day","hour","minute","second","millisecond"],ak=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],uk=["year","ordinal","hour","minute","second","millisecond"];function Va(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new kv(e);return t}function jg(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Va(e)}}function lk(e){if(is===void 0&&(is=yt.now()),e.type!=="iana")return e.offset(is);const t=e.name;let n=sf.get(t);return n===void 0&&(n=e.offset(is),sf.set(t,n)),n}function Hg(e,t){const n=zr(t.zone,yt.defaultZone);if(!n.isValid)return ke.invalid(rs(n));const i=Qe.fromObject(t);let s,a;if(Ae(e.year))s=yt.now();else{for(const f of qa)Ae(e[f])&&(e[f]=k0[f]);const u=a0(e)||u0(e);if(u)return ke.invalid(u);const c=lk(n);[s,a]=Ha(e,c,n)}return new ke({ts:s,zone:n,loc:i,o:a})}function qg(e,t,n){const i=Ae(n.round)?!0:n.round,s=Ae(n.rounding)?"trunc":n.rounding,a=(c,f)=>(c=jf(c,i||n.calendary?0:2,n.calendary?"round":s),t.loc.clone(n).relFormatter(n).format(c,f)),u=c=>n.calendary?t.hasSame(e,c)?0:t.startOf(c).diff(e.startOf(c),c).get(c):t.diff(e,c).get(c);if(n.unit)return a(u(n.unit),n.unit);for(const c of n.units){const f=u(c);if(Math.abs(f)>=1)return a(f,c)}return a(e>t?-0:0,n.units[n.units.length-1])}function Vg(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let is;const sf=new Map;class ke{constructor(t){const n=t.zone||yt.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new zn("invalid input"):null)||(n.isValid?null:rs(n));this.ts=Ae(t.ts)?yt.now():t.ts;let s=null,a=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[s,a]=[t.old.c,t.old.o];else{const c=Wr(t.o)&&!t.old?t.o:n.offset(this.ts);s=Wa(this.ts,c),i=Number.isNaN(s.year)?new zn("invalid input"):null,s=i?null:s,a=i?null:c}this._zone=n,this.loc=t.loc||Qe.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new ke({})}static local(){const[t,n]=Vg(arguments),[i,s,a,u,c,f,p]=n;return Hg({year:i,month:s,day:a,hour:u,minute:c,second:f,millisecond:p},t)}static utc(){const[t,n]=Vg(arguments),[i,s,a,u,c,f,p]=n;return t.zone=Ut.utcInstance,Hg({year:i,month:s,day:a,hour:u,minute:c,second:f,millisecond:p},t)}static fromJSDate(t,n={}){const i=WN(t)?t.valueOf():NaN;if(Number.isNaN(i))return ke.invalid("invalid input");const s=zr(n.zone,yt.defaultZone);return s.isValid?new ke({ts:i,zone:s,loc:Qe.fromObject(n)}):ke.invalid(rs(s))}static fromMillis(t,n={}){if(Wr(t))return t<-864e13||t>ik?ke.invalid("Timestamp out of range"):new ke({ts:t,zone:zr(n.zone,yt.defaultZone),loc:Qe.fromObject(n)});throw new kt(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Wr(t))return new ke({ts:t*1e3,zone:zr(n.zone,yt.defaultZone),loc:Qe.fromObject(n)});throw new kt("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=zr(n.zone,yt.defaultZone);if(!i.isValid)return ke.invalid(rs(i));const s=Qe.fromObject(n),a=pu(t,jg),{minDaysInFirstWeek:u,startOfWeek:c}=Mg(a,s),f=yt.now(),p=Ae(n.specificOffset)?i.offset(f):n.specificOffset,h=!Ae(a.ordinal),x=!Ae(a.year),R=!Ae(a.month)||!Ae(a.day),w=x||R,C=a.weekYear||a.weekNumber;if((w||h)&&C)throw new Qi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(R&&h)throw new Qi("Can't mix ordinal dates with month/day");const y=C||a.weekday&&!w;let v,g,m=Wa(f,p);y?(v=ak,g=ok,m=fu(m,u,c)):h?(v=uk,g=sk,m=Tc(m)):(v=qa,g=k0);let S=!1;for(const J of v){const Z=a[J];Ae(Z)?S?a[J]=g[J]:a[J]=m[J]:S=!0}const E=y?LN(a,u,c):h?zN(a):a0(a),T=E||u0(a);if(T)return ke.invalid(T);const M=y?Rg(a,u,c):h?Dg(a):a,[D,A]=Ha(M,p,i),z=new ke({ts:D,zone:i,o:A,loc:s});return a.weekday&&w&&t.weekday!==z.weekday?ke.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${z.toISO()}`):z.isValid?z:ke.invalid(z.invalid)}static fromISO(t,n={}){const[i,s]=DA(t);return Zi(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=MA(t);return Zi(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=PA(t);return Zi(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Ae(t)||Ae(n))throw new kt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=i,u=Qe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[c,f,p,h]=rk(u,t,n);return h?ke.invalid(h):Zi(c,f,i,`format ${n}`,t,p)}static fromString(t,n,i={}){return ke.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=zA(t);return Zi(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new kt("need to specify a reason the DateTime is invalid");const i=t instanceof zn?t:new zn(t,n);if(yt.throwOnInvalid)throw new fN(i);return new ke({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=N0(t,Qe.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return M0($t.parseFormat(t),Qe.fromObject(n)).map(s=>s.val).join("")}static resetCache(){is=void 0,sf.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Rc(this).weekYear:NaN}get weekNumber(){return this.isValid?Rc(this).weekNumber:NaN}get weekday(){return this.isValid?Rc(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Dc(this).weekday:NaN}get localWeekNumber(){return this.isValid?Dc(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Dc(this).weekYear:NaN}get ordinal(){return this.isValid?Tc(this.c).ordinal:NaN}get monthShort(){return this.isValid?za.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?za.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?za.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?za.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=Wu(this.c),s=this.zone.offset(i-t),a=this.zone.offset(i+t),u=this.zone.offset(i-s*n),c=this.zone.offset(i-a*n);if(u===c)return[this];const f=i-u*n,p=i-c*n,h=Wa(f,u),x=Wa(p,c);return h.hour===x.hour&&h.minute===x.minute&&h.second===x.second&&h.millisecond===x.millisecond?[si(this,{ts:f}),si(this,{ts:p})]:[this]}get isInLeapYear(){return Cs(this.year)}get daysInMonth(){return du(this.year,this.month)}get daysInYear(){return this.isValid?no(this.year):NaN}get weeksInWeekYear(){return this.isValid?gs(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?gs(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=$t.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(t=0,n={}){return this.setZone(Ut.instance(t),n)}toLocal(){return this.setZone(yt.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=zr(t,yt.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(n||i){const a=t.offset(this.ts),u=this.toObject();[s]=Ha(u,a,t)}return si(this,{ts:s,zone:t})}else return ke.invalid(rs(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return si(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=pu(t,jg),{minDaysInFirstWeek:i,startOfWeek:s}=Mg(n,this.loc),a=!Ae(n.weekYear)||!Ae(n.weekNumber)||!Ae(n.weekday),u=!Ae(n.ordinal),c=!Ae(n.year),f=!Ae(n.month)||!Ae(n.day),p=c||f,h=n.weekYear||n.weekNumber;if((p||u)&&h)throw new Qi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Qi("Can't mix ordinal dates with month/day");let x;a?x=Rg({...fu(this.c,i,s),...n},i,s):Ae(n.ordinal)?(x={...this.toObject(),...n},Ae(n.day)&&(x.day=Math.min(du(x.year,x.month),x.day))):x=Dg({...Tc(this.c),...n});const[R,w]=Ha(x,this.o,this.zone);return si(this,{ts:R,o:w})}plus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t);return si(this,Bg(this,n))}minus(t){if(!this.isValid)return this;const n=Ge.fromDurationLike(t).negate();return si(this,Bg(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Ge.normalizeUnit(t);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(s==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:u}=this;u<a&&(i.weekNumber=this.weekNumber-1),i.weekday=a}else i.weekday=1;if(s==="quarters"){const a=Math.ceil(this.month/3);i.month=(a-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?$t.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):_c}toLocaleString(t=cu,n={}){return this.isValid?$t.create(this.loc.clone(n),t).formatDateTime(this):_c}toLocaleParts(t={}){return this.isValid?$t.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:a=!1,precision:u="milliseconds"}={}){if(!this.isValid)return null;u=Va(u);const c=t==="extended";let f=Mc(this,c,u);return qa.indexOf(u)>=3&&(f+="T"),f+=Ug(this,c,n,i,s,a,u),f}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?Mc(this,t==="extended",Va(n)):null}toISOWeekDate(){return Ba(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:a=!1,format:u="extended",precision:c="milliseconds"}={}){return this.isValid?(c=Va(c),(s&&qa.indexOf(c)>=3?"T":"")+Ug(this,u==="extended",n,t,i,a,c)):null}toRFC2822(){return Ba(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ba(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Mc(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||t)&&(i&&(s+=" "),n?s+="z":t&&(s+="ZZ")),Ba(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():_c}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return Ge.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},a=BN(n).map(Ge.normalizeUnit),u=t.valueOf()>this.valueOf(),c=u?this:t,f=u?t:this,p=HA(c,f,a,s);return u?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(ke.now(),t,n)}until(t){return this.isValid?mt.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const s=t.valueOf(),a=this.setZone(t.zone,{keepLocalTime:!0});return a.startOf(n,i)<=s&&s<=a.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||ke.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=t.unit;return Array.isArray(t.unit)&&(s=t.unit,a=void 0),qg(n,this.plus(i),{...t,numeric:"always",units:s,unit:a})}toRelativeCalendar(t={}){return this.isValid?qg(t.base||ke.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(ke.isDateTime))throw new kt("min requires all arguments be DateTimes");return Pg(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(ke.isDateTime))throw new kt("max requires all arguments be DateTimes");return Pg(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:a=null}=i,u=Qe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return I0(u,t,n)}static fromStringExplain(t,n,i={}){return ke.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:s=null}=n,a=Qe.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return new P0(a,t)}static fromFormatParser(t,n,i={}){if(Ae(t)||Ae(n))throw new kt("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:a=null}=i,u=Qe.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});if(!u.equals(n.locale))throw new kt(`fromFormatParser called with a locale of ${u}, but the format parser was created for ${n.locale}`);const{result:c,zone:f,specificOffset:p,invalidReason:h}=n.explainFromTokens(t);return h?ke.invalid(h):Zi(c,f,i,`format ${n.format}`,t,p)}static get DATE_SHORT(){return cu}static get DATE_MED(){return $v}static get DATE_MED_WITH_WEEKDAY(){return hN}static get DATE_FULL(){return Lv}static get DATE_HUGE(){return zv}static get TIME_SIMPLE(){return Fv}static get TIME_WITH_SECONDS(){return Wv}static get TIME_WITH_SHORT_OFFSET(){return Bv}static get TIME_WITH_LONG_OFFSET(){return Uv}static get TIME_24_SIMPLE(){return jv}static get TIME_24_WITH_SECONDS(){return Hv}static get TIME_24_WITH_SHORT_OFFSET(){return qv}static get TIME_24_WITH_LONG_OFFSET(){return Vv}static get DATETIME_SHORT(){return Gv}static get DATETIME_SHORT_WITH_SECONDS(){return Yv}static get DATETIME_MED(){return Zv}static get DATETIME_MED_WITH_SECONDS(){return Xv}static get DATETIME_MED_WITH_WEEKDAY(){return mN}static get DATETIME_FULL(){return Jv}static get DATETIME_FULL_WITH_SECONDS(){return Kv}static get DATETIME_HUGE(){return Qv}static get DATETIME_HUGE_WITH_SECONDS(){return e0}}function Xo(e){if(ke.isDateTime(e))return e;if(e&&e.valueOf&&Wr(e.valueOf()))return ke.fromJSDate(e);if(e&&typeof e=="object")return ke.fromObject(e);throw new kt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ck=e=>e?ke.fromISO(e):null,fk=e=>e.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,""),$0=()=>"",L0="color-scheme";function z0(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.substring(0,e.length+1)===e+"=")return decodeURIComponent(i.substring(e.length+1))}return null}function F0(e,t,n=365){if(typeof document>"u")return;const i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),document.cookie=`${e}=${encodeURIComponent(t)};expires=${i.toUTCString()};path=/;SameSite=Lax`}function dk(){const e=z0(L0);return e==="light"||e==="dark"||e==="system"?e:"system"}function pk(e){F0(L0,e)}function hk(e){return e==="system"?typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function mk(e){typeof document>"u"||(document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;SameSite=Lax`)}function gk(e,t,n){if(!t)return e;if(t.startsWith("http://")||t.startsWith("https://")){let u=t;return n&&Object.entries(n).forEach(([c,f])=>{u=u.replace(`:${c}`,encodeURIComponent(String(f)))}),u}let i=t;n&&Object.entries(n).forEach(([u,c])=>{const f=encodeURIComponent(String(c));i=i.replace(`:${u}`,f)});const s=e.endsWith("/")?e.slice(0,-1):e,a=i.startsWith("/")?i:`/${i}`;return`${s}${a}`}function Gf(e){switch(e){case"courses":return{get:"api/courses/",getById:"api/courses/:id",getByUrl:"api/courses/?encoded_url=:encodedUrl",post:"api/courses/",put:"api/courses/:id/",delete:"api/chat/courses/:id"};case"users":return{getCurrent:"api/users/current/",get:"api/users/",post:"api/users/",put:"api/users/:id/",delete:"api/users/:id/",logout:"/auth/lti_logout/"};case"calendar":return{get:"api/calendar/",getById:"api/calendar/:id",post:"api/calendar/",put:"api/calendar/:id/",delete:"api/calendar/:id/"};default:return{}}}function Yf(e,t){return t?{...e,...t}:e}let hu=null,mu=null;const yk=()=>hu,Zf=j.createContext(void 0),vk=({baseUrl:e="/",children:t})=>{const[n,i]=j.useState(new Map),s=j.useMemo(()=>{const c={endpoints:n,baseUrl:e};return hu=c,c},[n,e]),a=j.useCallback((c,f)=>{i(p=>{const h=Gf(c),x=Yf(h,f),R=new Map(p);return R.set(c,x),R})},[]),u=j.useRef(a);return u.current=a,mu=u.current,j.useEffect(()=>()=>{mu=null},[]),F.jsx(Zf.Provider,{value:s,children:t})},bk=(e,t)=>{if(mu)mu(e,t);else if(hu){const n=Gf(e),i=Yf(n,t);hu.endpoints.set(e,i)}else console.warn(`ApiConfig not initialized. Cannot register endpoints for '${e}'. Make sure ApiConfigProvider is rendered.`)},wk=e=>{const t=j.useContext(Zf);if(t===void 0)throw new Error("useServiceApiConfig must be used within an ApiConfigProvider");return t.endpoints.get(e)},xk=()=>{const e=j.useContext(Zf);if(e===void 0)throw new Error("useApiConfigContext must be used within an ApiConfigProvider");return e};exports.ApiConfigProvider=vk;exports.BREAKPOINT_INFO=Ji;exports.BreakpointIndicator=Pv;exports.CenteredHeading=OR;exports.CollapsingButtons=mD;exports.CompoundPanel=fD;exports.DialogOpener=ZI;exports.Dialogs=tN;exports.DraggableItem=VI;exports.EditModeToggler=NI;exports.EventBus=Ga;exports.ExtendedDialog=Nv;exports.FormDialog=XI;exports.GridItem=UP;exports.GridItemProvider=WP;exports.LoadingScreen=AR;exports.NavigationFilter=SR;exports.NavigationSectionBuilder=ER;exports.Notifications=uN;exports.Panel=Uy;exports.PanelProvider=ky;exports.ResponsiveGridLayout=OI;exports.Scroller=pi;exports.ScrollerProvider=My;exports.Section=jy;exports.SpeedDialButton=zP;exports.USER_PRESETS_KEY=Os;exports.UserBus=Ya;exports.apiPrefix=$0;exports.buildUrl=gk;exports.calculateNavigationFromSections=uf;exports.closeDialog=eN;exports.convertObjectKeysToCamelCase=Gc;exports.convertObjectKeysToUnderscore=Yc;exports.createGridItem=BP;exports.deleteCookie=mk;exports.deleteUserPreset=CI;exports.eventBus=mT;exports.filterNavigationByRole=CT;exports.getAllMicroservices=ey;exports.getAllRegisteredMicroservices=Jg;exports.getApiConfig=yk;exports.getApiPrefix=$0;exports.getColorSchemePreference=dk;exports.getCookie=z0;exports.getDefaultEndpoints=Gf;exports.getEffectiveColorScheme=hk;exports.getFromLS=Mv;exports.getMicroservice=DT;exports.getMicroserviceIds=MT;exports.getUserPresets=Lu;exports.isMicroserviceRegistered=PT;exports.mergeEndpoints=Yf;exports.openDialog=QI;exports.parseDate=ck;exports.registerApiEndpoints=bk;exports.registerDialog=JI;exports.registerMicroservice=_T;exports.registerRouteProvider=IT;exports.saveToLS=Hc;exports.saveUserPreset=TI;exports.setColorSchemePreference=pk;exports.setCookie=F0;exports.slugify=fk;exports.unregisterMicroservice=RT;exports.unregisterRouteProvider=NT;exports.updateMicroserviceNavigationForSections=Kg;exports.updateUserPreset=_I;exports.useApiConfigContext=xk;exports.useCurrentUser=Yg;exports.useGridItemContext=FP;exports.useGridLayout=Pf;exports.useGridLayoutManagement=DI;exports.useMicroserviceNavigation=kT;exports.useMicroserviceRegistryStore=lf;exports.useMicroserviceRoutes=AT;exports.useNavigationFilterStore=Br;exports.useNavigationSectionManager=$T;exports.useNavigationStore=gr;exports.useNotificationStore=zf;exports.usePanelContext=Bn;exports.usePanelStore=fo;exports.useRetry=YI;exports.useScrollContext=Py;exports.useServiceApiConfig=wk;exports.useSyncNavigationFilters=BT;exports.useUserActions=Zg;exports.useUserPreferences=gT;exports.userBus=Yt;
|