@visio-io/design-system 1.5.3 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("@mui/material/styles"),x=require("react"),A=require("@mui/material"),Oe=require("@mui/icons-material"),as=require("@mui/system"),cd=require("@emotion/styled");require("@emotion/react");const ld=require("react-dom");function ud(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ve=ud(x),pe={primary:"#006399",onPrimary:"#ffffff",primaryContainer:"#cfe5ff",onPrimaryContainer:"#001d33",secondary:"#526070",onSecondary:"#ffffff",secondaryContainer:"#d5e4f7",onSecondaryContainer:"#0f1d2a",tertiary:"#68587a",onTertiary:"#ffffff",tertiaryContainer:"#eedcff",onTertiaryContainer:"#231533",error:"#ba1a1a",onError:"#ffffff",errorContainer:"#ffdad6",onErrorContainer:"#410002",surface:"#fdfcff",onSurface:"#1a1c1e",surfaceVariant:"#dee3eb",onSurfaceVariant:"#42474e",outline:"#72787e",inverseSurface:"#2f3033",inverseOnSurface:"#f1f0f4",inversePrimary:"#98cbff"},ge={primary:"#98cbff",onPrimary:"#003354",primaryContainer:"#004a78",onPrimaryContainer:"#cfe5ff",secondary:"#b9c8da",onSecondary:"#233241",secondaryContainer:"#3a4a58",onSecondaryContainer:"#d5e4f7",tertiary:"#d3bee5",onTertiary:"#382a4a",tertiaryContainer:"#4f4062",onTertiaryContainer:"#eedcff",error:"#ffb4ab",onError:"#690005",errorContainer:"#93000a",onErrorContainer:"#ffdad6",surface:"#1a1c1e",onSurface:"#e2e2e6",surfaceVariant:"#42474e",onSurfaceVariant:"#c2c7cf",outline:"#8c9198",inverseSurface:"#e2e2e6",inverseOnSurface:"#2f3033",inversePrimary:"#006399"},Ee={fontFamily:'"Inter", "Helvetica", "Arial", sans-serif',fontSize:{xs:12,sm:14,md:16,lg:18,xl:20,xxl:24},fontWeight:{regular:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.2,normal:1.5,relaxed:1.7}},sc={xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,xxl:32,xxxl:64},Yn={sm:4,md:8,lg:12,xl:16,pill:999},ic={shape:{borderRadius:Yn.md,borderRadiusSm:Yn.sm},spacing:8,components:{MuiButton:{styleOverrides:{root:{borderRadius:Yn.md,fontWeight:Ee.fontWeight.medium,letterSpacing:"0.2px",textTransform:"none","&:focus-visible":{outline:"2px solid currentColor",outlineOffset:"2px"},"&.Mui-disabled":{opacity:.6}}},variants:[{props:{variant:"contained",color:"primary"},style:{boxShadow:"none"}}]}},typography:{fontFamily:Ee.fontFamily,fontWeightRegular:Ee.fontWeight.regular,fontWeightMedium:Ee.fontWeight.medium,fontWeightBold:Ee.fontWeight.bold,h1:{fontSize:Ee.fontSize.xxl,fontWeight:Ee.fontWeight.bold,lineHeight:Ee.lineHeight.tight},h2:{fontSize:Ee.fontSize.xl,fontWeight:Ee.fontWeight.bold,lineHeight:Ee.lineHeight.tight},body1:{fontSize:Ee.fontSize.md,lineHeight:Ee.lineHeight.normal},body2:{fontSize:Ee.fontSize.sm,lineHeight:Ee.lineHeight.normal},button:{fontWeight:Ee.fontWeight.semibold,textTransform:"none"}}},ac=X.createTheme({...ic,palette:{mode:"light",primary:{main:pe.primary,contrastText:pe.onPrimary},secondary:{main:pe.secondary,contrastText:pe.onSecondary},error:{main:pe.error,contrastText:pe.onError},background:{default:pe.surface,paper:pe.surface},text:{primary:pe.onSurface,secondary:pe.onSurfaceVariant},divider:pe.outline},visio:{surfaceVariant:pe.surfaceVariant,onSurfaceVariant:pe.onSurfaceVariant,inverseSurface:pe.inverseSurface,inverseOnSurface:pe.inverseOnSurface,inversePrimary:pe.inversePrimary,outline:pe.outline,tertiary:{main:pe.tertiary,contrastText:pe.onTertiary,container:pe.tertiaryContainer,onContainer:pe.onTertiaryContainer}}}),cc=X.createTheme({...ic,palette:{mode:"dark",primary:{main:ge.primary,contrastText:ge.onPrimary},secondary:{main:ge.secondary,contrastText:ge.onSecondary},error:{main:ge.error,contrastText:ge.onError},background:{default:ge.surface,paper:ge.surface},text:{primary:ge.onSurface,secondary:ge.onSurfaceVariant},divider:ge.outline},visio:{surfaceVariant:ge.surfaceVariant,onSurfaceVariant:ge.onSurfaceVariant,inverseSurface:ge.inverseSurface,inverseOnSurface:ge.inverseOnSurface,inversePrimary:ge.inversePrimary,outline:ge.outline,tertiary:{main:ge.tertiary,contrastText:ge.onTertiary,container:ge.tertiaryContainer,onContainer:ge.onTertiaryContainer}}}),dd=sc;function lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var To={exports:{}},nn={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("@mui/material/styles"),x=require("react"),E=require("@mui/material"),Le=require("@mui/icons-material"),ys=require("@mui/system"),Dd=require("@emotion/styled");require("@emotion/react");const Bd=require("react-dom");function $d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Fe=$d(x),pe={primary:"#006399",onPrimary:"#ffffff",primaryContainer:"#cfe5ff",onPrimaryContainer:"#001d33",secondary:"#526070",onSecondary:"#ffffff",secondaryContainer:"#d5e4f7",onSecondaryContainer:"#0f1d2a",tertiary:"#68587a",onTertiary:"#ffffff",tertiaryContainer:"#eedcff",onTertiaryContainer:"#231533",error:"#ba1a1a",onError:"#ffffff",errorContainer:"#ffdad6",onErrorContainer:"#410002",surface:"#fdfcff",onSurface:"#1a1c1e",surfaceVariant:"#dee3eb",onSurfaceVariant:"#42474e",outline:"#72787e",inverseSurface:"#2f3033",inverseOnSurface:"#f1f0f4",inversePrimary:"#98cbff"},ge={primary:"#98cbff",onPrimary:"#003354",primaryContainer:"#004a78",onPrimaryContainer:"#cfe5ff",secondary:"#b9c8da",onSecondary:"#233241",secondaryContainer:"#3a4a58",onSecondaryContainer:"#d5e4f7",tertiary:"#d3bee5",onTertiary:"#382a4a",tertiaryContainer:"#4f4062",onTertiaryContainer:"#eedcff",error:"#ffb4ab",onError:"#690005",errorContainer:"#93000a",onErrorContainer:"#ffdad6",surface:"#1a1c1e",onSurface:"#e2e2e6",surfaceVariant:"#42474e",onSurfaceVariant:"#c2c7cf",outline:"#8c9198",inverseSurface:"#e2e2e6",inverseOnSurface:"#2f3033",inversePrimary:"#006399"},Ee={fontFamily:'"Inter", "Helvetica", "Arial", sans-serif',fontSize:{xs:12,sm:14,md:16,lg:18,xl:20,xxl:24},fontWeight:{regular:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.2,normal:1.5,relaxed:1.7}},Tl={xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,xxl:32,xxxl:64},tr={sm:4,md:8,lg:12,xl:16,pill:999},wl={shape:{borderRadius:tr.md,borderRadiusSm:tr.sm},spacing:8,components:{MuiButton:{styleOverrides:{root:{borderRadius:tr.md,fontWeight:Ee.fontWeight.medium,letterSpacing:"0.2px",textTransform:"none","&:focus-visible":{outline:"2px solid currentColor",outlineOffset:"2px"},"&.Mui-disabled":{opacity:.6}}},variants:[{props:{variant:"contained",color:"primary"},style:{boxShadow:"none"}}]},MuiList:{styleOverrides:{root:{padding:"4px"}}}},typography:{fontFamily:Ee.fontFamily,fontWeightRegular:Ee.fontWeight.regular,fontWeightMedium:Ee.fontWeight.medium,fontWeightBold:Ee.fontWeight.bold,h1:{fontSize:Ee.fontSize.xxl,fontWeight:Ee.fontWeight.bold,lineHeight:Ee.lineHeight.tight},h2:{fontSize:Ee.fontSize.xl,fontWeight:Ee.fontWeight.bold,lineHeight:Ee.lineHeight.tight},body1:{fontSize:Ee.fontSize.md,lineHeight:Ee.lineHeight.normal},body2:{fontSize:Ee.fontSize.sm,lineHeight:Ee.lineHeight.normal},button:{fontWeight:Ee.fontWeight.semibold,textTransform:"none"}}},_l=X.createTheme({...wl,palette:{mode:"light",primary:{main:pe.primary,contrastText:pe.onPrimary},secondary:{main:pe.secondary,contrastText:pe.onSecondary},error:{main:pe.error,contrastText:pe.onError},background:{default:pe.surface,paper:pe.surface},text:{primary:pe.onSurface,secondary:pe.onSurfaceVariant},divider:pe.outline},visio:{surfaceVariant:pe.surfaceVariant,onSurfaceVariant:pe.onSurfaceVariant,inverseSurface:pe.inverseSurface,inverseOnSurface:pe.inverseOnSurface,inversePrimary:pe.inversePrimary,outline:pe.outline,tertiary:{main:pe.tertiary,contrastText:pe.onTertiary,container:pe.tertiaryContainer,onContainer:pe.onTertiaryContainer}}}),El=X.createTheme({...wl,palette:{mode:"dark",primary:{main:ge.primary,contrastText:ge.onPrimary},secondary:{main:ge.secondary,contrastText:ge.onSecondary},error:{main:ge.error,contrastText:ge.onError},background:{default:ge.surface,paper:ge.surface},text:{primary:ge.onSurface,secondary:ge.onSurfaceVariant},divider:ge.outline},visio:{surfaceVariant:ge.surfaceVariant,onSurfaceVariant:ge.onSurfaceVariant,inverseSurface:ge.inverseSurface,inverseOnSurface:ge.inverseOnSurface,inversePrimary:ge.inversePrimary,outline:ge.outline,tertiary:{main:ge.tertiary,contrastText:ge.onTertiary,container:ge.tertiaryContainer,onContainer:ge.onTertiaryContainer}}}),Nd=Tl;function Al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Io={exports:{}},an={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ti;function fd(){if(ti)return nn;ti=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return nn.Fragment=t,nn.jsx=n,nn.jsxs=n,nn}var rn={};/**
9
+ */var mi;function Vd(){if(mi)return an;mi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return an.Fragment=t,an.jsx=n,an.jsxs=n,an}var ln={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,31 +14,31 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ni;function hd(){return ni||(ni=1,process.env.NODE_ENV!=="production"&&function(){function e(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===D?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case v:return"Fragment";case T:return"Profiler";case S:return"StrictMode";case E:return"Suspense";case P:return"SuspenseList";case V:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case m:return"Portal";case w:return _.displayName||"Context";case b:return(_._context.displayName||"Context")+".Consumer";case C:var N=_.render;return _=_.displayName,_||(_=N.displayName||N.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case M:return N=_.displayName||null,N!==null?N:e(_.type)||"Memo";case I:N=_._payload,_=_._init;try{return e(_(N))}catch{}}return null}function t(_){return""+_}function n(_){try{t(_);var N=!1}catch{N=!0}if(N){N=console;var O=N.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return O.call(N,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(_)}}function r(_){if(_===v)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===I)return"<...>";try{var N=e(_);return N?"<"+N+">":"<...>"}catch{return"<...>"}}function o(){var _=g.A;return _===null?null:_.getOwner()}function s(){return Error("react-stack-top-frame")}function i(_){if($.call(_,"key")){var N=Object.getOwnPropertyDescriptor(_,"key").get;if(N&&N.isReactWarning)return!1}return _.key!==void 0}function a(_,N){function O(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",N))}O.isReactWarning=!0,Object.defineProperty(_,"key",{get:O,configurable:!0})}function c(){var _=e(this.type);return G[_]||(G[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function u(_,N,O,B,Y,U){var z=O.ref;return _={$$typeof:p,type:_,key:N,props:O,_owner:B},(z!==void 0?z:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:c}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function l(_,N,O,B,Y,U){var z=N.children;if(z!==void 0)if(B)if(R(z)){for(B=0;B<z.length;B++)d(z[B]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(z);if($.call(N,"key")){z=e(_);var Z=Object.keys(N).filter(function(J){return J!=="key"});B=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",L[z+B]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var pi;function Fd(){return pi||(pi=1,process.env.NODE_ENV!=="production"&&function(){function e(A){if(A==null)return null;if(typeof A=="function")return A.$$typeof===$?null:A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case v:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case w:return"Suspense";case P:return"SuspenseList";case V:return"Activity"}if(typeof A=="object")switch(typeof A.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),A.$$typeof){case m:return"Portal";case C:return A.displayName||"Context";case b:return(A._context.displayName||"Context")+".Consumer";case T:var N=A.render;return A=A.displayName,A||(A=N.displayName||N.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case M:return N=A.displayName||null,N!==null?N:e(A.type)||"Memo";case I:N=A._payload,A=A._init;try{return e(A(N))}catch{}}return null}function t(A){return""+A}function n(A){try{t(A);var N=!1}catch{N=!0}if(N){N=console;var L=N.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&A[Symbol.toStringTag]||A.constructor.name||"Object";return L.call(N,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(A)}}function r(A){if(A===v)return"<>";if(typeof A=="object"&&A!==null&&A.$$typeof===I)return"<...>";try{var N=e(A);return N?"<"+N+">":"<...>"}catch{return"<...>"}}function o(){var A=y.A;return A===null?null:A.getOwner()}function s(){return Error("react-stack-top-frame")}function i(A){if(R.call(A,"key")){var N=Object.getOwnPropertyDescriptor(A,"key").get;if(N&&N.isReactWarning)return!1}return A.key!==void 0}function a(A,N){function L(){U||(U=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",N))}L.isReactWarning=!0,Object.defineProperty(A,"key",{get:L,configurable:!0})}function l(){var A=e(this.type);return G[A]||(G[A]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),A=this.props.ref,A!==void 0?A:null}function u(A,N,L,B,Y,H){var W=L.ref;return A={$$typeof:p,type:A,key:N,props:L,_owner:B},(W!==void 0?W:null)!==null?Object.defineProperty(A,"ref",{enumerable:!1,get:l}):Object.defineProperty(A,"ref",{enumerable:!1,value:null}),A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(A,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(A,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(A,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A}function c(A,N,L,B,Y,H){var W=N.children;if(W!==void 0)if(B)if(O(W)){for(B=0;B<W.length;B++)d(W[B]);Object.freeze&&Object.freeze(W)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(W);if(R.call(N,"key")){W=e(A);var Z=Object.keys(N).filter(function(J){return J!=="key"});B=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",j[W+B]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,B,z,Z,z),L[z+B]=!0)}if(z=null,O!==void 0&&(n(O),z=""+O),i(N)&&(n(N.key),z=""+N.key),"key"in N){O={};for(var q in N)q!=="key"&&(O[q]=N[q])}else O=N;return z&&a(O,typeof _=="function"?_.displayName||_.name||"Unknown":_),u(_,z,O,o(),Y,U)}function d(_){f(_)?_._store&&(_._store.validated=1):typeof _=="object"&&_!==null&&_.$$typeof===I&&(_._payload.status==="fulfilled"?f(_._payload.value)&&_._payload.value._store&&(_._payload.value._store.validated=1):_._store&&(_._store.validated=1))}function f(_){return typeof _=="object"&&_!==null&&_.$$typeof===p}var h=x,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),g=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,R=Array.isArray,W=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(_){return _()}};var K,G={},j=h.react_stack_bottom_frame.bind(h,s)(),Q=W(r(s)),L={};rn.Fragment=v,rn.jsx=function(_,N,O){var B=1e4>g.recentlyCreatedOwnerStacks++;return l(_,N,O,!1,B?Error("react-stack-top-frame"):j,B?W(r(_)):Q)},rn.jsxs=function(_,N,O){var B=1e4>g.recentlyCreatedOwnerStacks++;return l(_,N,O,!0,B?Error("react-stack-top-frame"):j,B?W(r(_)):Q)}}()),rn}process.env.NODE_ENV==="production"?To.exports=fd():To.exports=hd();var y=To.exports;const uc=x.createContext(null),md=({children:e,defaultMode:t="light",mode:n,onModeChange:r,enableCssBaseline:o=!0})=>{const[s,i]=x.useState(n??t),a=n??s;x.useEffect(()=>{n&&i(n)},[n]);const c=x.useCallback(f=>{n||i(f),r==null||r(f)},[n,r]),u=x.useCallback(()=>{c(a==="light"?"dark":"light")},[a,c]),l=x.useMemo(()=>a==="dark"?cc:ac,[a]),d=x.useMemo(()=>({mode:a,setMode:c,toggleMode:u,theme:l}),[a,c,u,l]);return y.jsx(uc.Provider,{value:d,children:y.jsxs(A.ThemeProvider,{theme:l,children:[o?y.jsx(A.CssBaseline,{}):null,e]})})},pd=()=>{const e=x.useContext(uc);if(!e)throw new Error("useVisioTheme must be used within VisioThemeProvider.");return e},gd="_button_1x96v_1",yd="_borderRadiusNone_1x96v_8",vd="_borderRadiusSmall_1x96v_12",bd="_borderRadiusMedium_1x96v_16",xd="_borderRadiusLarge_1x96v_20",Sd="_borderRadiusRound_1x96v_24",wt={button:gd,borderRadiusNone:yd,borderRadiusSmall:vd,borderRadiusMedium:bd,borderRadiusLarge:xd,borderRadiusRound:Sd},Td=(e,t="medium")=>{const n=e??t;if(typeof n=="number")return"";switch(n){case"none":return wt.borderRadiusNone;case"small":return wt.borderRadiusSmall;case"medium":return wt.borderRadiusMedium;case"large":return wt.borderRadiusLarge;case"round":return wt.borderRadiusRound;default:return wt.borderRadiusMedium}},Cd=e=>{if(typeof e=="number")return`${e}px`},wd=(e,t,n)=>{const r=n||t;if(r)return o=>{if(e){o.preventDefault();return}r(o)}},cs=x.forwardRef(({children:e,loading:t=!1,loadingText:n,startIcon:r,endIcon:o,variant:s="contained",size:i="medium",color:a="primary",borderRadius:c="medium",fullWidth:u=!1,disabled:l=!1,type:d="button",className:f,onClick:h,onAction:p,...m},v)=>{const S=l||t,T=Td(c),b=Cd(c),w=wd(S,h,p),C=`${wt.button} ${T} ${f||""}`.trim();return y.jsx(A.Button,{ref:v,variant:s,size:i,color:a,fullWidth:u,disabled:S,type:d,onClick:w,startIcon:t?y.jsx(A.CircularProgress,{size:i==="small"?16:i==="medium"?20:24,color:"inherit"}):r,endIcon:t?void 0:o,className:C,style:b?{borderRadius:b}:void 0,...m,children:t&&n?n:e})});cs.displayName="Button";const _d=e=>{if(e)return t=>{e(t)}},Ed="_filterButton_8fgad_1",Ad={filterButton:Ed},dc=x.forwardRef(({children:e="Filtros",onClick:t,className:n,...r},o)=>{const i=A.useTheme().palette.mode==="dark",a=_d(t);return y.jsx(A.Button,{ref:o,variant:"outlined",onClick:a,className:`${Ad.filterButton} ${n||""}`,"data-theme":i?"dark":"light",...r,children:e})});dc.displayName="FilterButton";const Md=(e,t)=>n=>{n.stopPropagation(),t==null||t(n),e()},Pd="_filterChip_1ty7d_1",kd="_icon_1ty7d_60",Id="_label_1ty7d_76",Rd="_overlay_1ty7d_88",Od="_deleteIcon_1ty7d_102",on={filterChip:Pd,icon:kd,label:Id,overlay:Rd,deleteIcon:Od},fc=({label:e,icon:t,onRemove:n,className:r,onClick:o,ref:s,...i})=>{const c=A.useTheme().palette.mode==="dark",u=Md(n,o);return y.jsxs(A.Box,{ref:s,className:`${on.filterChip} ${r||""}`.trim(),"data-theme":c?"dark":"light",onClick:u,role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n())},"aria-label":`Remover filtro ${e}`,component:"div",...i,children:[t&&y.jsx(A.Box,{className:on.icon,component:"div",children:t}),y.jsx(A.Box,{className:on.label,component:"span",children:e}),y.jsx(A.Box,{className:on.overlay,component:"div",children:y.jsx(Oe.Delete,{className:on.deleteIcon})})]})};fc.displayName="FilterChip";const ri=e=>e,Ld=()=>{let e=ri;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ri}}},Dd=Ld();function ht(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function It(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ht(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Co={exports:{}},jn={exports:{}},ne={};/** @license React v16.13.1
22
+ <%s key={someKey} {...props} />`,B,W,Z,W),j[W+B]=!0)}if(W=null,L!==void 0&&(n(L),W=""+L),i(N)&&(n(N.key),W=""+N.key),"key"in N){L={};for(var q in N)q!=="key"&&(L[q]=N[q])}else L=N;return W&&a(L,typeof A=="function"?A.displayName||A.name||"Unknown":A),u(A,W,L,o(),Y,H)}function d(A){f(A)?A._store&&(A._store.validated=1):typeof A=="object"&&A!==null&&A.$$typeof===I&&(A._payload.status==="fulfilled"?f(A._payload.value)&&A._payload.value._store&&(A._payload.value._store.validated=1):A._store&&(A._store.validated=1))}function f(A){return typeof A=="object"&&A!==null&&A.$$typeof===p}var h=x,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),y=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,O=Array.isArray,F=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(A){return A()}};var U,G={},D=h.react_stack_bottom_frame.bind(h,s)(),Q=F(r(s)),j={};ln.Fragment=v,ln.jsx=function(A,N,L){var B=1e4>y.recentlyCreatedOwnerStacks++;return c(A,N,L,!1,B?Error("react-stack-top-frame"):D,B?F(r(A)):Q)},ln.jsxs=function(A,N,L){var B=1e4>y.recentlyCreatedOwnerStacks++;return c(A,N,L,!0,B?Error("react-stack-top-frame"):D,B?F(r(A)):Q)}}()),ln}process.env.NODE_ENV==="production"?Io.exports=Vd():Io.exports=Fd();var g=Io.exports;const Ml=x.createContext(null),zd=({children:e,defaultMode:t="light",mode:n,onModeChange:r,enableCssBaseline:o=!0})=>{const[s,i]=x.useState(n??t),a=n??s;x.useEffect(()=>{n&&i(n)},[n]);const l=x.useCallback(f=>{n||i(f),r==null||r(f)},[n,r]),u=x.useCallback(()=>{l(a==="light"?"dark":"light")},[a,l]),c=x.useMemo(()=>a==="dark"?El:_l,[a]),d=x.useMemo(()=>({mode:a,setMode:l,toggleMode:u,theme:c}),[a,l,u,c]);return g.jsx(Ml.Provider,{value:d,children:g.jsxs(E.ThemeProvider,{theme:c,children:[o?g.jsx(E.CssBaseline,{}):null,e]})})},Wd=()=>{const e=x.useContext(Ml);if(!e)throw new Error("useVisioTheme must be used within VisioThemeProvider.");return e},Ud="_button_1x96v_1",Hd="_borderRadiusNone_1x96v_8",Gd="_borderRadiusSmall_1x96v_12",Kd="_borderRadiusMedium_1x96v_16",Yd="_borderRadiusLarge_1x96v_20",Zd="_borderRadiusRound_1x96v_24",At={button:Ud,borderRadiusNone:Hd,borderRadiusSmall:Gd,borderRadiusMedium:Kd,borderRadiusLarge:Yd,borderRadiusRound:Zd},qd=(e,t="medium")=>{const n=e??t;if(typeof n=="number")return"";switch(n){case"none":return At.borderRadiusNone;case"small":return At.borderRadiusSmall;case"medium":return At.borderRadiusMedium;case"large":return At.borderRadiusLarge;case"round":return At.borderRadiusRound;default:return At.borderRadiusMedium}},Xd=e=>{if(typeof e=="number")return`${e}px`},Jd=(e,t,n)=>{const r=n||t;if(r)return o=>{if(e){o.preventDefault();return}r(o)}},vs=x.forwardRef(({children:e,loading:t=!1,loadingText:n,startIcon:r,endIcon:o,variant:s="contained",size:i="medium",color:a="primary",borderRadius:l="medium",fullWidth:u=!1,disabled:c=!1,type:d="button",className:f,onClick:h,onAction:p,...m},v)=>{const S=c||t,_=qd(l),b=Xd(l),C=Jd(S,h,p),T=`${At.button} ${_} ${f||""}`.trim();return g.jsx(E.Button,{ref:v,variant:s,size:i,color:a,fullWidth:u,disabled:S,type:d,onClick:C,startIcon:t?g.jsx(E.CircularProgress,{size:i==="small"?16:i==="medium"?20:24,color:"inherit"}):r,endIcon:t?void 0:o,className:T,style:b?{borderRadius:b}:void 0,...m,children:t&&n?n:e})});vs.displayName="Button";const Qd=e=>{if(e)return t=>{e(t)}},ef="_filterButton_8fgad_1",tf={filterButton:ef},Pl=x.forwardRef(({children:e="Filtros",onClick:t,className:n,...r},o)=>{const i=E.useTheme().palette.mode==="dark",a=Qd(t);return g.jsx(E.Button,{ref:o,variant:"outlined",onClick:a,className:`${tf.filterButton} ${n||""}`,"data-theme":i?"dark":"light",...r,children:e})});Pl.displayName="FilterButton";const nf=(e,t)=>n=>{n.stopPropagation(),t==null||t(n),e()},rf="_filterChip_1ty7d_1",of="_icon_1ty7d_60",sf="_label_1ty7d_76",af="_overlay_1ty7d_88",lf="_deleteIcon_1ty7d_102",cn={filterChip:rf,icon:of,label:sf,overlay:af,deleteIcon:lf},kl=({label:e,icon:t,onRemove:n,className:r,onClick:o,ref:s,...i})=>{const l=E.useTheme().palette.mode==="dark",u=nf(n,o);return g.jsxs(E.Box,{ref:s,className:`${cn.filterChip} ${r||""}`.trim(),"data-theme":l?"dark":"light",onClick:u,role:"button",tabIndex:0,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),n())},"aria-label":`Remover filtro ${e}`,component:"div",...i,children:[t&&g.jsx(E.Box,{className:cn.icon,component:"div",children:t}),g.jsx(E.Box,{className:cn.label,component:"span",children:e}),g.jsx(E.Box,{className:cn.overlay,component:"div",children:g.jsx(Le.Delete,{className:cn.deleteIcon})})]})};kl.displayName="FilterChip";const gi=e=>e,cf=()=>{let e=gi;return{configure(t){e=t},generate(t){return e(t)},reset(){e=gi}}},uf=cf();function pt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Lt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":pt(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Ro={exports:{}},zn={exports:{}},ne={};/** @license React v16.13.1
23
23
  * react-is.production.min.js
24
24
  *
25
25
  * Copyright (c) Facebook, Inc. and its affiliates.
26
26
  *
27
27
  * This source code is licensed under the MIT license found in the
28
28
  * LICENSE file in the root directory of this source tree.
29
- */var oi;function jd(){if(oi)return ne;oi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function b(C){if(typeof C=="object"&&C!==null){var E=C.$$typeof;switch(E){case t:switch(C=C.type,C){case c:case u:case r:case s:case o:case d:return C;default:switch(C=C&&C.$$typeof,C){case a:case l:case p:case h:case i:return C;default:return E}}case n:return E}}}function w(C){return b(C)===u}return ne.AsyncMode=c,ne.ConcurrentMode=u,ne.ContextConsumer=a,ne.ContextProvider=i,ne.Element=t,ne.ForwardRef=l,ne.Fragment=r,ne.Lazy=p,ne.Memo=h,ne.Portal=n,ne.Profiler=s,ne.StrictMode=o,ne.Suspense=d,ne.isAsyncMode=function(C){return w(C)||b(C)===c},ne.isConcurrentMode=w,ne.isContextConsumer=function(C){return b(C)===a},ne.isContextProvider=function(C){return b(C)===i},ne.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},ne.isForwardRef=function(C){return b(C)===l},ne.isFragment=function(C){return b(C)===r},ne.isLazy=function(C){return b(C)===p},ne.isMemo=function(C){return b(C)===h},ne.isPortal=function(C){return b(C)===n},ne.isProfiler=function(C){return b(C)===s},ne.isStrictMode=function(C){return b(C)===o},ne.isSuspense=function(C){return b(C)===d},ne.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===u||C===s||C===o||C===d||C===f||typeof C=="object"&&C!==null&&(C.$$typeof===p||C.$$typeof===h||C.$$typeof===i||C.$$typeof===a||C.$$typeof===l||C.$$typeof===v||C.$$typeof===S||C.$$typeof===T||C.$$typeof===m)},ne.typeOf=b,ne}var re={};/** @license React v16.13.1
29
+ */var yi;function df(){if(yi)return ne;yi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function b(T){if(typeof T=="object"&&T!==null){var w=T.$$typeof;switch(w){case t:switch(T=T.type,T){case l:case u:case r:case s:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case c:case p:case h:case i:return T;default:return w}}case n:return w}}}function C(T){return b(T)===u}return ne.AsyncMode=l,ne.ConcurrentMode=u,ne.ContextConsumer=a,ne.ContextProvider=i,ne.Element=t,ne.ForwardRef=c,ne.Fragment=r,ne.Lazy=p,ne.Memo=h,ne.Portal=n,ne.Profiler=s,ne.StrictMode=o,ne.Suspense=d,ne.isAsyncMode=function(T){return C(T)||b(T)===l},ne.isConcurrentMode=C,ne.isContextConsumer=function(T){return b(T)===a},ne.isContextProvider=function(T){return b(T)===i},ne.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},ne.isForwardRef=function(T){return b(T)===c},ne.isFragment=function(T){return b(T)===r},ne.isLazy=function(T){return b(T)===p},ne.isMemo=function(T){return b(T)===h},ne.isPortal=function(T){return b(T)===n},ne.isProfiler=function(T){return b(T)===s},ne.isStrictMode=function(T){return b(T)===o},ne.isSuspense=function(T){return b(T)===d},ne.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===u||T===s||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===i||T.$$typeof===a||T.$$typeof===c||T.$$typeof===v||T.$$typeof===S||T.$$typeof===_||T.$$typeof===m)},ne.typeOf=b,ne}var re={};/** @license React v16.13.1
30
30
  * react-is.development.js
31
31
  *
32
32
  * Copyright (c) Facebook, Inc. and its affiliates.
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var si;function Bd(){return si||(si=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function b(F){return typeof F=="string"||typeof F=="function"||F===r||F===u||F===s||F===o||F===d||F===f||typeof F=="object"&&F!==null&&(F.$$typeof===p||F.$$typeof===h||F.$$typeof===i||F.$$typeof===a||F.$$typeof===l||F.$$typeof===v||F.$$typeof===S||F.$$typeof===T||F.$$typeof===m)}function w(F){if(typeof F=="object"&&F!==null){var _e=F.$$typeof;switch(_e){case t:var Ue=F.type;switch(Ue){case c:case u:case r:case s:case o:case d:return Ue;default:var it=Ue&&Ue.$$typeof;switch(it){case a:case l:case p:case h:case i:return it;default:return _e}}case n:return _e}}}var C=c,E=u,P=a,M=i,I=t,V=l,D=r,g=p,$=h,R=n,W=s,K=o,G=d,j=!1;function Q(F){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(F)||w(F)===c}function L(F){return w(F)===u}function _(F){return w(F)===a}function N(F){return w(F)===i}function O(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function B(F){return w(F)===l}function Y(F){return w(F)===r}function U(F){return w(F)===p}function z(F){return w(F)===h}function Z(F){return w(F)===n}function q(F){return w(F)===s}function J(F){return w(F)===o}function me(F){return w(F)===d}re.AsyncMode=C,re.ConcurrentMode=E,re.ContextConsumer=P,re.ContextProvider=M,re.Element=I,re.ForwardRef=V,re.Fragment=D,re.Lazy=g,re.Memo=$,re.Portal=R,re.Profiler=W,re.StrictMode=K,re.Suspense=G,re.isAsyncMode=Q,re.isConcurrentMode=L,re.isContextConsumer=_,re.isContextProvider=N,re.isElement=O,re.isForwardRef=B,re.isFragment=Y,re.isLazy=U,re.isMemo=z,re.isPortal=Z,re.isProfiler=q,re.isStrictMode=J,re.isSuspense=me,re.isValidElementType=b,re.typeOf=w}()),re}var ii;function hc(){return ii||(ii=1,process.env.NODE_ENV==="production"?jn.exports=jd():jn.exports=Bd()),jn.exports}/*
36
+ */var vi;function ff(){return vi||(vi=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function b(z){return typeof z=="string"||typeof z=="function"||z===r||z===u||z===s||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===p||z.$$typeof===h||z.$$typeof===i||z.$$typeof===a||z.$$typeof===c||z.$$typeof===v||z.$$typeof===S||z.$$typeof===_||z.$$typeof===m)}function C(z){if(typeof z=="object"&&z!==null){var _e=z.$$typeof;switch(_e){case t:var He=z.type;switch(He){case l:case u:case r:case s:case o:case d:return He;default:var lt=He&&He.$$typeof;switch(lt){case a:case c:case p:case h:case i:return lt;default:return _e}}case n:return _e}}}var T=l,w=u,P=a,M=i,I=t,V=c,$=r,y=p,R=h,O=n,F=s,U=o,G=d,D=!1;function Q(z){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(z)||C(z)===l}function j(z){return C(z)===u}function A(z){return C(z)===a}function N(z){return C(z)===i}function L(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function B(z){return C(z)===c}function Y(z){return C(z)===r}function H(z){return C(z)===p}function W(z){return C(z)===h}function Z(z){return C(z)===n}function q(z){return C(z)===s}function J(z){return C(z)===o}function me(z){return C(z)===d}re.AsyncMode=T,re.ConcurrentMode=w,re.ContextConsumer=P,re.ContextProvider=M,re.Element=I,re.ForwardRef=V,re.Fragment=$,re.Lazy=y,re.Memo=R,re.Portal=O,re.Profiler=F,re.StrictMode=U,re.Suspense=G,re.isAsyncMode=Q,re.isConcurrentMode=j,re.isContextConsumer=A,re.isContextProvider=N,re.isElement=L,re.isForwardRef=B,re.isFragment=Y,re.isLazy=H,re.isMemo=W,re.isPortal=Z,re.isProfiler=q,re.isStrictMode=J,re.isSuspense=me,re.isValidElementType=b,re.typeOf=C}()),re}var bi;function Il(){return bi||(bi=1,process.env.NODE_ENV==="production"?zn.exports=df():zn.exports=ff()),zn.exports}/*
37
37
  object-assign
38
38
  (c) Sindre Sorhus
39
39
  @license MIT
40
- */var Vr,ai;function $d(){if(ai)return Vr;ai=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(l){return i[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Vr=o()?Object.assign:function(s,i){for(var a,c=r(s),u,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var d in a)t.call(a,d)&&(c[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(c[u[f]]=a[u[f]])}}return c},Vr}var Fr,ci;function ls(){if(ci)return Fr;ci=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fr=e,Fr}var zr,li;function mc(){return li||(li=1,zr=Function.call.bind(Object.prototype.hasOwnProperty)),zr}var Wr,ui;function Nd(){if(ui)return Wr;ui=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ls(),n={},r=mc();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var l in s)if(r(s,l)){var d;try{if(typeof s[l]!="function"){var f=Error((c||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[l](i,l,c,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Wr=o,Wr}var Ur,di;function Vd(){if(di)return Ur;di=1;var e=hc(),t=$d(),n=ls(),r=mc(),o=Nd(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Ur=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function d(L){var _=L&&(u&&L[u]||L[l]);if(typeof _=="function")return _}var f="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:T(),arrayOf:b,element:w(),elementType:C(),instanceOf:E,node:V(),objectOf:M,oneOf:P,oneOfType:I,shape:g,exact:$};function p(L,_){return L===_?L!==0||1/L===1/_:L!==L&&_!==_}function m(L,_){this.message=L,this.data=_&&typeof _=="object"?_:{},this.stack=""}m.prototype=Error.prototype;function v(L){if(process.env.NODE_ENV!=="production")var _={},N=0;function O(Y,U,z,Z,q,J,me){if(Z=Z||f,J=J||z,me!==n){if(c){var F=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var _e=Z+":"+z;!_[_e]&&N<3&&(s("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),_[_e]=!0,N++)}}return U[z]==null?Y?U[z]===null?new m("The "+q+" `"+J+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new m("The "+q+" `"+J+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:L(U,z,Z,q,J)}var B=O.bind(null,!1);return B.isRequired=O.bind(null,!0),B}function S(L){function _(N,O,B,Y,U,z){var Z=N[O],q=K(Z);if(q!==L){var J=G(Z);return new m("Invalid "+Y+" `"+U+"` of type "+("`"+J+"` supplied to `"+B+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return v(_)}function T(){return v(i)}function b(L){function _(N,O,B,Y,U){if(typeof L!="function")return new m("Property `"+U+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var z=N[O];if(!Array.isArray(z)){var Z=K(z);return new m("Invalid "+Y+" `"+U+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected an array."))}for(var q=0;q<z.length;q++){var J=L(z,q,B,Y,U+"["+q+"]",n);if(J instanceof Error)return J}return null}return v(_)}function w(){function L(_,N,O,B,Y){var U=_[N];if(!a(U)){var z=K(U);return new m("Invalid "+B+" `"+Y+"` of type "+("`"+z+"` supplied to `"+O+"`, expected a single ReactElement."))}return null}return v(L)}function C(){function L(_,N,O,B,Y){var U=_[N];if(!e.isValidElementType(U)){var z=K(U);return new m("Invalid "+B+" `"+Y+"` of type "+("`"+z+"` supplied to `"+O+"`, expected a single ReactElement type."))}return null}return v(L)}function E(L){function _(N,O,B,Y,U){if(!(N[O]instanceof L)){var z=L.name||f,Z=Q(N[O]);return new m("Invalid "+Y+" `"+U+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected ")+("instance of `"+z+"`."))}return null}return v(_)}function P(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function _(N,O,B,Y,U){for(var z=N[O],Z=0;Z<L.length;Z++)if(p(z,L[Z]))return null;var q=JSON.stringify(L,function(me,F){var _e=G(F);return _e==="symbol"?String(F):F});return new m("Invalid "+Y+" `"+U+"` of value `"+String(z)+"` "+("supplied to `"+B+"`, expected one of "+q+"."))}return v(_)}function M(L){function _(N,O,B,Y,U){if(typeof L!="function")return new m("Property `"+U+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var z=N[O],Z=K(z);if(Z!=="object")return new m("Invalid "+Y+" `"+U+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected an object."));for(var q in z)if(r(z,q)){var J=L(z,q,B,Y,U+"."+q,n);if(J instanceof Error)return J}return null}return v(_)}function I(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var _=0;_<L.length;_++){var N=L[_];if(typeof N!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(N)+" at index "+_+"."),i}function O(B,Y,U,z,Z){for(var q=[],J=0;J<L.length;J++){var me=L[J],F=me(B,Y,U,z,Z,n);if(F==null)return null;F.data&&r(F.data,"expectedType")&&q.push(F.data.expectedType)}var _e=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new m("Invalid "+z+" `"+Z+"` supplied to "+("`"+U+"`"+_e+"."))}return v(O)}function V(){function L(_,N,O,B,Y){return R(_[N])?null:new m("Invalid "+B+" `"+Y+"` supplied to "+("`"+O+"`, expected a ReactNode."))}return v(L)}function D(L,_,N,O,B){return new m((L||"React class")+": "+_+" type `"+N+"."+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function g(L){function _(N,O,B,Y,U){var z=N[O],Z=K(z);if(Z!=="object")return new m("Invalid "+Y+" `"+U+"` of type `"+Z+"` "+("supplied to `"+B+"`, expected `object`."));for(var q in L){var J=L[q];if(typeof J!="function")return D(B,Y,U,q,G(J));var me=J(z,q,B,Y,U+"."+q,n);if(me)return me}return null}return v(_)}function $(L){function _(N,O,B,Y,U){var z=N[O],Z=K(z);if(Z!=="object")return new m("Invalid "+Y+" `"+U+"` of type `"+Z+"` "+("supplied to `"+B+"`, expected `object`."));var q=t({},N[O],L);for(var J in q){var me=L[J];if(r(L,J)&&typeof me!="function")return D(B,Y,U,J,G(me));if(!me)return new m("Invalid "+Y+" `"+U+"` key `"+J+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(N[O],null," ")+`
41
- Valid keys: `+JSON.stringify(Object.keys(L),null," "));var F=me(z,J,B,Y,U+"."+J,n);if(F)return F}return null}return v(_)}function R(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(R);if(L===null||a(L))return!0;var _=d(L);if(_){var N=_.call(L),O;if(_!==L.entries){for(;!(O=N.next()).done;)if(!R(O.value))return!1}else for(;!(O=N.next()).done;){var B=O.value;if(B&&!R(B[1]))return!1}}else return!1;return!0;default:return!1}}function W(L,_){return L==="symbol"?!0:_?_["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&_ instanceof Symbol:!1}function K(L){var _=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":W(_,L)?"symbol":_}function G(L){if(typeof L>"u"||L===null)return""+L;var _=K(L);if(_==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return _}function j(L){var _=G(L);switch(_){case"array":case"object":return"an "+_;case"boolean":case"date":case"regexp":return"a "+_;default:return _}}function Q(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ur}var Hr,fi;function Fd(){if(fi)return Hr;fi=1;var e=ls();function t(){}function n(){}return n.resetWarningCache=t,Hr=function(){function r(i,a,c,u,l,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Hr}if(process.env.NODE_ENV!=="production"){var zd=hc(),Wd=!0;Co.exports=Vd()(zd.isElement,Wd)}else Co.exports=Fd()();var Ud=Co.exports;const te=lc(Ud);function pc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pc(e))&&(r&&(r+=" "),r+=t);return r}function Hd(e,t,n=void 0){const r={};for(const o in e){const s=e[o];let i="",a=!0;for(let c=0;c<s.length;c+=1){const u=s[c];u&&(i+=(a===!0?"":" ")+t(u),a=!1,n&&n[u]&&(i+=" "+n[u]))}r[o]=i}return r}var wo={exports:{}},ie={};/**
40
+ */var Yr,xi;function hf(){if(xi)return Yr;xi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Yr=o()?Object.assign:function(s,i){for(var a,l=r(s),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},Yr}var Zr,Si;function bs(){if(Si)return Zr;Si=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zr=e,Zr}var qr,Ci;function Rl(){return Ci||(Ci=1,qr=Function.call.bind(Object.prototype.hasOwnProperty)),qr}var Xr,Ti;function mf(){if(Ti)return Xr;Ti=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=bs(),n={},r=Rl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,u){if(process.env.NODE_ENV!=="production"){for(var c in s)if(r(s,c)){var d;try{if(typeof s[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[c](i,c,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Xr=o,Xr}var Jr,wi;function pf(){if(wi)return Jr;wi=1;var e=Il(),t=hf(),n=bs(),r=Rl(),o=mf(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return Jr=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(j){var A=j&&(u&&j[u]||j[c]);if(typeof A=="function")return A}var f="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:_(),arrayOf:b,element:C(),elementType:T(),instanceOf:w,node:V(),objectOf:M,oneOf:P,oneOfType:I,shape:y,exact:R};function p(j,A){return j===A?j!==0||1/j===1/A:j!==j&&A!==A}function m(j,A){this.message=j,this.data=A&&typeof A=="object"?A:{},this.stack=""}m.prototype=Error.prototype;function v(j){if(process.env.NODE_ENV!=="production")var A={},N=0;function L(Y,H,W,Z,q,J,me){if(Z=Z||f,J=J||W,me!==n){if(l){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var _e=Z+":"+W;!A[_e]&&N<3&&(s("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[_e]=!0,N++)}}return H[W]==null?Y?H[W]===null?new m("The "+q+" `"+J+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new m("The "+q+" `"+J+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:j(H,W,Z,q,J)}var B=L.bind(null,!1);return B.isRequired=L.bind(null,!0),B}function S(j){function A(N,L,B,Y,H,W){var Z=N[L],q=U(Z);if(q!==j){var J=G(Z);return new m("Invalid "+Y+" `"+H+"` of type "+("`"+J+"` supplied to `"+B+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return v(A)}function _(){return v(i)}function b(j){function A(N,L,B,Y,H){if(typeof j!="function")return new m("Property `"+H+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var W=N[L];if(!Array.isArray(W)){var Z=U(W);return new m("Invalid "+Y+" `"+H+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected an array."))}for(var q=0;q<W.length;q++){var J=j(W,q,B,Y,H+"["+q+"]",n);if(J instanceof Error)return J}return null}return v(A)}function C(){function j(A,N,L,B,Y){var H=A[N];if(!a(H)){var W=U(H);return new m("Invalid "+B+" `"+Y+"` of type "+("`"+W+"` supplied to `"+L+"`, expected a single ReactElement."))}return null}return v(j)}function T(){function j(A,N,L,B,Y){var H=A[N];if(!e.isValidElementType(H)){var W=U(H);return new m("Invalid "+B+" `"+Y+"` of type "+("`"+W+"` supplied to `"+L+"`, expected a single ReactElement type."))}return null}return v(j)}function w(j){function A(N,L,B,Y,H){if(!(N[L]instanceof j)){var W=j.name||f,Z=Q(N[L]);return new m("Invalid "+Y+" `"+H+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected ")+("instance of `"+W+"`."))}return null}return v(A)}function P(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function A(N,L,B,Y,H){for(var W=N[L],Z=0;Z<j.length;Z++)if(p(W,j[Z]))return null;var q=JSON.stringify(j,function(me,z){var _e=G(z);return _e==="symbol"?String(z):z});return new m("Invalid "+Y+" `"+H+"` of value `"+String(W)+"` "+("supplied to `"+B+"`, expected one of "+q+"."))}return v(A)}function M(j){function A(N,L,B,Y,H){if(typeof j!="function")return new m("Property `"+H+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var W=N[L],Z=U(W);if(Z!=="object")return new m("Invalid "+Y+" `"+H+"` of type "+("`"+Z+"` supplied to `"+B+"`, expected an object."));for(var q in W)if(r(W,q)){var J=j(W,q,B,Y,H+"."+q,n);if(J instanceof Error)return J}return null}return v(A)}function I(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var A=0;A<j.length;A++){var N=j[A];if(typeof N!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+D(N)+" at index "+A+"."),i}function L(B,Y,H,W,Z){for(var q=[],J=0;J<j.length;J++){var me=j[J],z=me(B,Y,H,W,Z,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&q.push(z.data.expectedType)}var _e=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new m("Invalid "+W+" `"+Z+"` supplied to "+("`"+H+"`"+_e+"."))}return v(L)}function V(){function j(A,N,L,B,Y){return O(A[N])?null:new m("Invalid "+B+" `"+Y+"` supplied to "+("`"+L+"`, expected a ReactNode."))}return v(j)}function $(j,A,N,L,B){return new m((j||"React class")+": "+A+" type `"+N+"."+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function y(j){function A(N,L,B,Y,H){var W=N[L],Z=U(W);if(Z!=="object")return new m("Invalid "+Y+" `"+H+"` of type `"+Z+"` "+("supplied to `"+B+"`, expected `object`."));for(var q in j){var J=j[q];if(typeof J!="function")return $(B,Y,H,q,G(J));var me=J(W,q,B,Y,H+"."+q,n);if(me)return me}return null}return v(A)}function R(j){function A(N,L,B,Y,H){var W=N[L],Z=U(W);if(Z!=="object")return new m("Invalid "+Y+" `"+H+"` of type `"+Z+"` "+("supplied to `"+B+"`, expected `object`."));var q=t({},N[L],j);for(var J in q){var me=j[J];if(r(j,J)&&typeof me!="function")return $(B,Y,H,J,G(me));if(!me)return new m("Invalid "+Y+" `"+H+"` key `"+J+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(N[L],null," ")+`
41
+ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var z=me(W,J,B,Y,H+"."+J,n);if(z)return z}return null}return v(A)}function O(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(O);if(j===null||a(j))return!0;var A=d(j);if(A){var N=A.call(j),L;if(A!==j.entries){for(;!(L=N.next()).done;)if(!O(L.value))return!1}else for(;!(L=N.next()).done;){var B=L.value;if(B&&!O(B[1]))return!1}}else return!1;return!0;default:return!1}}function F(j,A){return j==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function U(j){var A=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":F(A,j)?"symbol":A}function G(j){if(typeof j>"u"||j===null)return""+j;var A=U(j);if(A==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return A}function D(j){var A=G(j);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function Q(j){return!j.constructor||!j.constructor.name?f:j.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Jr}var Qr,_i;function gf(){if(_i)return Qr;_i=1;var e=bs();function t(){}function n(){}return n.resetWarningCache=t,Qr=function(){function r(i,a,l,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Qr}if(process.env.NODE_ENV!=="production"){var yf=Il(),vf=!0;Ro.exports=pf()(yf.isElement,vf)}else Ro.exports=gf()();var bf=Ro.exports;const te=Al(bf);function Ol(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ol(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ll(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ol(e))&&(r&&(r+=" "),r+=t);return r}function xf(e,t,n=void 0){const r={};for(const o in e){const s=e[o];let i="",a=!0;for(let l=0;l<s.length;l+=1){const u=s[l];u&&(i+=(a===!0?"":" ")+t(u),a=!1,n&&n[u]&&(i+=" "+n[u]))}r[o]=i}return r}var Oo={exports:{}},ie={};/**
42
42
  * @license React
43
43
  * react-is.production.js
44
44
  *
@@ -46,7 +46,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var F=me(z,J,B,Y,U+"."+J
46
46
  *
47
47
  * This source code is licensed under the MIT license found in the
48
48
  * LICENSE file in the root directory of this source tree.
49
- */var hi;function Gd(){if(hi)return ie;hi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function p(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case n:case o:case r:case c:case u:case f:return m;default:switch(m=m&&m.$$typeof,m){case i:case a:case d:case l:return m;case s:return m;default:return v}}case t:return v}}}return ie.ContextConsumer=s,ie.ContextProvider=i,ie.Element=e,ie.ForwardRef=a,ie.Fragment=n,ie.Lazy=d,ie.Memo=l,ie.Portal=t,ie.Profiler=o,ie.StrictMode=r,ie.Suspense=c,ie.SuspenseList=u,ie.isContextConsumer=function(m){return p(m)===s},ie.isContextProvider=function(m){return p(m)===i},ie.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ie.isForwardRef=function(m){return p(m)===a},ie.isFragment=function(m){return p(m)===n},ie.isLazy=function(m){return p(m)===d},ie.isMemo=function(m){return p(m)===l},ie.isPortal=function(m){return p(m)===t},ie.isProfiler=function(m){return p(m)===o},ie.isStrictMode=function(m){return p(m)===r},ie.isSuspense=function(m){return p(m)===c},ie.isSuspenseList=function(m){return p(m)===u},ie.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===l||m.$$typeof===i||m.$$typeof===s||m.$$typeof===a||m.$$typeof===h||m.getModuleId!==void 0)},ie.typeOf=p,ie}var ae={};/**
49
+ */var Ei;function Sf(){if(Ei)return ie;Ei=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function p(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case n:case o:case r:case l:case u:case f:return m;default:switch(m=m&&m.$$typeof,m){case i:case a:case d:case c:return m;case s:return m;default:return v}}case t:return v}}}return ie.ContextConsumer=s,ie.ContextProvider=i,ie.Element=e,ie.ForwardRef=a,ie.Fragment=n,ie.Lazy=d,ie.Memo=c,ie.Portal=t,ie.Profiler=o,ie.StrictMode=r,ie.Suspense=l,ie.SuspenseList=u,ie.isContextConsumer=function(m){return p(m)===s},ie.isContextProvider=function(m){return p(m)===i},ie.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ie.isForwardRef=function(m){return p(m)===a},ie.isFragment=function(m){return p(m)===n},ie.isLazy=function(m){return p(m)===d},ie.isMemo=function(m){return p(m)===c},ie.isPortal=function(m){return p(m)===t},ie.isProfiler=function(m){return p(m)===o},ie.isStrictMode=function(m){return p(m)===r},ie.isSuspense=function(m){return p(m)===l},ie.isSuspenseList=function(m){return p(m)===u},ie.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===l||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===c||m.$$typeof===i||m.$$typeof===s||m.$$typeof===a||m.$$typeof===h||m.getModuleId!==void 0)},ie.typeOf=p,ie}var ae={};/**
50
50
  * @license React
51
51
  * react-is.development.js
52
52
  *
@@ -54,15 +54,15 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var F=me(z,J,B,Y,U+"."+J
54
54
  *
55
55
  * This source code is licensed under the MIT license found in the
56
56
  * LICENSE file in the root directory of this source tree.
57
- */var mi;function Kd(){return mi||(mi=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case t:switch(m=m.type,m){case r:case s:case o:case u:case l:case h:return m;default:switch(m=m&&m.$$typeof,m){case a:case c:case f:case d:return m;case i:return m;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");ae.ContextConsumer=i,ae.ContextProvider=a,ae.Element=t,ae.ForwardRef=c,ae.Fragment=r,ae.Lazy=f,ae.Memo=d,ae.Portal=n,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=u,ae.SuspenseList=l,ae.isContextConsumer=function(m){return e(m)===i},ae.isContextProvider=function(m){return e(m)===a},ae.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ae.isForwardRef=function(m){return e(m)===c},ae.isFragment=function(m){return e(m)===r},ae.isLazy=function(m){return e(m)===f},ae.isMemo=function(m){return e(m)===d},ae.isPortal=function(m){return e(m)===n},ae.isProfiler=function(m){return e(m)===s},ae.isStrictMode=function(m){return e(m)===o},ae.isSuspense=function(m){return e(m)===u},ae.isSuspenseList=function(m){return e(m)===l},ae.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===s||m===o||m===u||m===l||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===a||m.$$typeof===i||m.$$typeof===c||m.$$typeof===p||m.getModuleId!==void 0)},ae.typeOf=e}()),ae}process.env.NODE_ENV==="production"?wo.exports=Gd():wo.exports=Kd();var nr=wo.exports;function Qe(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yc(e){if(Ve.isValidElement(e)||nr.isValidElementType(e)||!Qe(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=yc(e[n])}),t}function De(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Qe(e)&&Qe(t)&&Object.keys(t).forEach(o=>{Ve.isValidElement(t[o])||nr.isValidElementType(t[o])?r[o]=t[o]:Qe(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Qe(e[o])?r[o]=De(e[o],t[o],n):n.clone?r[o]=Qe(t[o])?yc(t[o]):t[o]:r[o]=t[o]}),r}function yn(e,t){return t?De(e,t,{clone:!1}):e}const yt=process.env.NODE_ENV!=="production"?te.oneOfType([te.number,te.string,te.object,te.array]):{};function pi(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,a;const s=/min-width:\s*([0-9.]+)/;return+(((i=r.match(s))==null?void 0:i[1])||0)-+(((a=o.match(s))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const s=t[o];return delete r[o],r[o]=s,r},{...t}):t}function Yd(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Zd(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
58
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ht(18,`(${t})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}function qd(e){const t=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function n(s,i){s.up=(...a)=>t(e.breakpoints.up(...a),i),s.down=(...a)=>t(e.breakpoints.down(...a),i),s.between=(...a)=>t(e.breakpoints.between(...a),i),s.only=(...a)=>t(e.breakpoints.only(...a),i),s.not=(...a)=>{const c=t(e.breakpoints.not(...a),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=s=>(n(r,s),r);return n(o),{...e,containerQueries:o}}const vr={xs:0,sm:600,md:900,lg:1200,xl:1536},gi={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${vr[e]}px)`},Xd={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:vr[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function nt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||gi;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const s=r.breakpoints||gi;return Object.keys(t).reduce((i,a)=>{if(Yd(s.keys,a)){const c=Zd(r.containerQueries?r:Xd,a);c&&(i[c]=n(t[a],a))}else if(Object.keys(s.values||vr).includes(a)){const c=s.up(a);i[c]=n(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return n(t)}function Jd(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const s=e.up(o);return r[s]={},r},{}))||{}}function yi(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function br(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function rr(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=br(e,n)||r,t&&(o=t(o,r,e)),o}function xe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,u=br(c,r)||{};return nt(i,a,d=>{let f=rr(u,o,d);return d===f&&typeof d=="string"&&(f=rr(u,o,`${t}${d==="default"?"":It(d)}`,d)),n===!1?f:{[n]:f}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:yt}:{},s.filterProps=[t],s}function Qd(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const ef={m:"margin",p:"padding"},tf={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},vi={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},nf=Qd(e=>{if(e.length>2)if(vi[e])e=vi[e];else return[e];const[t,n]=e.split(""),r=ef[t],o=tf[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),xr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],rf=[...xr,...Sr];function An(e,t,n,r){const o=br(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
57
+ */var Ai;function Cf(){return Ai||(Ai=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case t:switch(m=m.type,m){case r:case s:case o:case u:case c:case h:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case f:case d:return m;case i:return m;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");ae.ContextConsumer=i,ae.ContextProvider=a,ae.Element=t,ae.ForwardRef=l,ae.Fragment=r,ae.Lazy=f,ae.Memo=d,ae.Portal=n,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=u,ae.SuspenseList=c,ae.isContextConsumer=function(m){return e(m)===i},ae.isContextProvider=function(m){return e(m)===a},ae.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ae.isForwardRef=function(m){return e(m)===l},ae.isFragment=function(m){return e(m)===r},ae.isLazy=function(m){return e(m)===f},ae.isMemo=function(m){return e(m)===d},ae.isPortal=function(m){return e(m)===n},ae.isProfiler=function(m){return e(m)===s},ae.isStrictMode=function(m){return e(m)===o},ae.isSuspense=function(m){return e(m)===u},ae.isSuspenseList=function(m){return e(m)===c},ae.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===s||m===o||m===u||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===a||m.$$typeof===i||m.$$typeof===l||m.$$typeof===p||m.getModuleId!==void 0)},ae.typeOf=e}()),ae}process.env.NODE_ENV==="production"?Oo.exports=Sf():Oo.exports=Cf();var ur=Oo.exports;function nt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function jl(e){if(Fe.isValidElement(e)||ur.isValidElementType(e)||!nt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=jl(e[n])}),t}function De(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return nt(e)&&nt(t)&&Object.keys(t).forEach(o=>{Fe.isValidElement(t[o])||ur.isValidElementType(t[o])?r[o]=t[o]:nt(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&nt(e[o])?r[o]=De(e[o],t[o],n):n.clone?r[o]=nt(t[o])?jl(t[o]):t[o]:r[o]=t[o]}),r}function Tn(e,t){return t?De(e,t,{clone:!1}):e}const bt=process.env.NODE_ENV!=="production"?te.oneOfType([te.number,te.string,te.object,te.array]):{};function Mi(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,a;const s=/min-width:\s*([0-9.]+)/;return+(((i=r.match(s))==null?void 0:i[1])||0)-+(((a=o.match(s))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const s=t[o];return delete r[o],r[o]=s,r},{...t}):t}function Tf(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function wf(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
58
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pt(18,`(${t})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}function _f(e){const t=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function n(s,i){s.up=(...a)=>t(e.breakpoints.up(...a),i),s.down=(...a)=>t(e.breakpoints.down(...a),i),s.between=(...a)=>t(e.breakpoints.between(...a),i),s.only=(...a)=>t(e.breakpoints.only(...a),i),s.not=(...a)=>{const l=t(e.breakpoints.not(...a),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=s=>(n(r,s),r);return n(o),{...e,containerQueries:o}}const Er={xs:0,sm:600,md:900,lg:1200,xl:1536},Pi={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Er[e]}px)`},Ef={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Er[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function st(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||Pi;return t.reduce((i,a,l)=>(i[s.up(s.keys[l])]=n(t[l]),i),{})}if(typeof t=="object"){const s=r.breakpoints||Pi;return Object.keys(t).reduce((i,a)=>{if(Tf(s.keys,a)){const l=wf(r.containerQueries?r:Ef,a);l&&(i[l]=n(t[a],a))}else if(Object.keys(s.values||Er).includes(a)){const l=s.up(a);i[l]=n(t[a],a)}else{const l=a;i[l]=t[l]}return i},{})}return n(t)}function Af(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const s=e.up(o);return r[s]={},r},{}))||{}}function ki(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Ar(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function dr(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Ar(e,n)||r,t&&(o=t(o,r,e)),o}function xe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],l=i.theme,u=Ar(l,r)||{};return st(i,a,d=>{let f=dr(u,o,d);return d===f&&typeof d=="string"&&(f=dr(u,o,`${t}${d==="default"?"":Lt(d)}`,d)),n===!1?f:{[n]:f}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:bt}:{},s.filterProps=[t],s}function Mf(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Pf={m:"margin",p:"padding"},kf={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ii={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},If=Mf(e=>{if(e.length>2)if(Ii[e])e=Ii[e];else return[e];const[t,n]=e.split(""),r=Pf[t],o=kf[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),Mr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Pr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Rf=[...Mr,...Pr];function On(e,t,n,r){const o=Ar(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
59
59
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
60
60
  `)));const a=o[i];return s>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
61
- `)),()=>{})}function us(e){return An(e,"spacing",8,"spacing")}function Mn(e,t){return typeof t=="string"||t==null?t:e(t)}function of(e,t){return n=>e.reduce((r,o)=>(r[o]=Mn(t,n),r),{})}function sf(e,t,n,r){if(!t.includes(n))return null;const o=nf(n),s=of(o,r),i=e[n];return nt(e,i,s)}function vc(e,t){const n=us(e.theme);return Object.keys(e).map(r=>sf(e,t,r,n)).reduce(yn,{})}function ye(e){return vc(e,xr)}ye.propTypes=process.env.NODE_ENV!=="production"?xr.reduce((e,t)=>(e[t]=yt,e),{}):{};ye.filterProps=xr;function ve(e){return vc(e,Sr)}ve.propTypes=process.env.NODE_ENV!=="production"?Sr.reduce((e,t)=>(e[t]=yt,e),{}):{};ve.filterProps=Sr;process.env.NODE_ENV!=="production"&&rf.reduce((e,t)=>(e[t]=yt,e),{});function Tr(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?yn(o,t[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Be(e){return typeof e!="number"?e:`${e}px solid`}function Fe(e,t){return xe({prop:e,themeKey:"borders",transform:t})}const af=Fe("border",Be),cf=Fe("borderTop",Be),lf=Fe("borderRight",Be),uf=Fe("borderBottom",Be),df=Fe("borderLeft",Be),ff=Fe("borderColor"),hf=Fe("borderTopColor"),mf=Fe("borderRightColor"),pf=Fe("borderBottomColor"),gf=Fe("borderLeftColor"),yf=Fe("outline",Be),vf=Fe("outlineColor"),Cr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=An(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Mn(t,r)});return nt(e,e.borderRadius,n)}return null};Cr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:yt}:{};Cr.filterProps=["borderRadius"];Tr(af,cf,lf,uf,df,ff,hf,mf,pf,gf,Cr,yf,vf);const wr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=An(e.theme,"spacing",8,"gap"),n=r=>({gap:Mn(t,r)});return nt(e,e.gap,n)}return null};wr.propTypes=process.env.NODE_ENV!=="production"?{gap:yt}:{};wr.filterProps=["gap"];const _r=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=An(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Mn(t,r)});return nt(e,e.columnGap,n)}return null};_r.propTypes=process.env.NODE_ENV!=="production"?{columnGap:yt}:{};_r.filterProps=["columnGap"];const Er=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=An(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Mn(t,r)});return nt(e,e.rowGap,n)}return null};Er.propTypes=process.env.NODE_ENV!=="production"?{rowGap:yt}:{};Er.filterProps=["rowGap"];const bf=xe({prop:"gridColumn"}),xf=xe({prop:"gridRow"}),Sf=xe({prop:"gridAutoFlow"}),Tf=xe({prop:"gridAutoColumns"}),Cf=xe({prop:"gridAutoRows"}),wf=xe({prop:"gridTemplateColumns"}),_f=xe({prop:"gridTemplateRows"}),Ef=xe({prop:"gridTemplateAreas"}),Af=xe({prop:"gridArea"});Tr(wr,_r,Er,bf,xf,Sf,Tf,Cf,wf,_f,Ef,Af);function Wt(e,t){return t==="grey"?t:e}const Mf=xe({prop:"color",themeKey:"palette",transform:Wt}),Pf=xe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wt}),kf=xe({prop:"backgroundColor",themeKey:"palette",transform:Wt});Tr(Mf,Pf,kf);function Le(e){return e<=1&&e!==0?`${e*100}%`:e}const If=xe({prop:"width",transform:Le}),ds=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,s,i,a,c;const r=((i=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:i[n])||vr[n];return r?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Le(n)}};return nt(e,e.maxWidth,t)}return null};ds.filterProps=["maxWidth"];const Rf=xe({prop:"minWidth",transform:Le}),Of=xe({prop:"height",transform:Le}),Lf=xe({prop:"maxHeight",transform:Le}),Df=xe({prop:"minHeight",transform:Le});xe({prop:"size",cssProperty:"width",transform:Le});xe({prop:"size",cssProperty:"height",transform:Le});const jf=xe({prop:"boxSizing"});Tr(If,ds,Rf,Of,Lf,Df,jf);const Ar={border:{themeKey:"borders",transform:Be},borderTop:{themeKey:"borders",transform:Be},borderRight:{themeKey:"borders",transform:Be},borderBottom:{themeKey:"borders",transform:Be},borderLeft:{themeKey:"borders",transform:Be},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Be},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Cr},color:{themeKey:"palette",transform:Wt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wt},backgroundColor:{themeKey:"palette",transform:Wt},p:{style:ve},pt:{style:ve},pr:{style:ve},pb:{style:ve},pl:{style:ve},px:{style:ve},py:{style:ve},padding:{style:ve},paddingTop:{style:ve},paddingRight:{style:ve},paddingBottom:{style:ve},paddingLeft:{style:ve},paddingX:{style:ve},paddingY:{style:ve},paddingInline:{style:ve},paddingInlineStart:{style:ve},paddingInlineEnd:{style:ve},paddingBlock:{style:ve},paddingBlockStart:{style:ve},paddingBlockEnd:{style:ve},m:{style:ye},mt:{style:ye},mr:{style:ye},mb:{style:ye},ml:{style:ye},mx:{style:ye},my:{style:ye},margin:{style:ye},marginTop:{style:ye},marginRight:{style:ye},marginBottom:{style:ye},marginLeft:{style:ye},marginX:{style:ye},marginY:{style:ye},marginInline:{style:ye},marginInlineStart:{style:ye},marginInlineEnd:{style:ye},marginBlock:{style:ye},marginBlockStart:{style:ye},marginBlockEnd:{style:ye},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:wr},rowGap:{style:Er},columnGap:{style:_r},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Le},maxWidth:{style:ds},minWidth:{transform:Le},height:{transform:Le},maxHeight:{transform:Le},minHeight:{transform:Le},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Bf(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function $f(e,t){return typeof e=="function"?e(t):e}function Nf(){function e(n,r,o,s){const i={[n]:r,theme:o},a=s[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:l,style:d}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=br(o,u)||{};return d?d(i):nt(i,r,p=>{let m=rr(f,l,p);return p===m&&typeof p=="string"&&(m=rr(f,l,`${n}${p==="default"?"":It(p)}`,p)),c===!1?m:{[c]:m}})}function t(n){const{sx:r,theme:o={},nested:s}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Ar;function a(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const l=Jd(o.breakpoints),d=Object.keys(l);let f=l;return Object.keys(u).forEach(h=>{const p=$f(u[h],o);if(p!=null)if(typeof p=="object")if(i[h])f=yn(f,e(h,p,o,i));else{const m=nt({theme:o},p,v=>({[h]:v}));Bf(m,p)?f[h]=t({sx:p,theme:o,nested:!0}):f=yn(f,m)}else f=yn(f,e(h,p,o,i))}),!s&&o.modularCssLayers?{"@layer sx":pi(o,yi(d,f))}:pi(o,yi(d,f))}return Array.isArray(r)?r.map(a):a(r)}return t}const Ht=Nf();Ht.filterProps=["sx"];function Vf(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function fs(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Vf(e,t,n)}function Ff(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function mt(e){if(e.type)return e;if(e.charAt(0)==="#")return mt(Ff(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
62
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ht(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
63
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ht(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const zf=e=>{const t=mt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},fn=(e,t)=>{try{return zf(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Mr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function bc(e){e=mt(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),i=(u,l=(u+n/30)%12)=>o-s*Math.max(Math.min(l-3,9-l,1),-1);let a="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),Mr({type:a,values:c})}function _o(e){e=mt(e);let t=e.type==="hsl"||e.type==="hsla"?mt(bc(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function bi(e,t){const n=_o(e),r=_o(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function xc(e,t){return e=mt(e),t=fs(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Mr(e)}function bt(e,t,n){try{return xc(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Pr(e,t){if(e=mt(e),t=fs(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Mr(e)}function oe(e,t,n){try{return Pr(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function kr(e,t){if(e=mt(e),t=fs(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Mr(e)}function se(e,t,n){try{return kr(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Wf(e,t=.15){return _o(e)>.5?Pr(e,t):kr(e,t)}function Bn(e,t,n){try{return Wf(e,t)}catch{return e}}const Sn={black:"#000",white:"#fff"},Uf={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Rt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ot={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},sn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Lt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Dt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},jt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Sc(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Sn.white,default:Sn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Tc=Sc();function Cc(){return{text:{primary:Sn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Sn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Eo=Cc();function xi(e,t,n,r){const o=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=kr(e.main,o):t==="dark"&&(e.dark=Pr(e.main,s)))}function Si(e,t,n,r,o){const s=o.light||o,i=o.dark||o*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(i*100).toFixed(0)}%)`))}function Hf(e="light"){return e==="dark"?{main:Lt[200],light:Lt[50],dark:Lt[400]}:{main:Lt[700],light:Lt[400],dark:Lt[800]}}function Gf(e="light"){return e==="dark"?{main:Rt[200],light:Rt[50],dark:Rt[400]}:{main:Rt[500],light:Rt[300],dark:Rt[700]}}function Kf(e="light"){return e==="dark"?{main:Ot[500],light:Ot[300],dark:Ot[700]}:{main:Ot[700],light:Ot[400],dark:Ot[800]}}function Yf(e="light"){return e==="dark"?{main:Dt[400],light:Dt[300],dark:Dt[700]}:{main:Dt[700],light:Dt[500],dark:Dt[900]}}function Zf(e="light"){return e==="dark"?{main:jt[400],light:jt[300],dark:jt[700]}:{main:jt[800],light:jt[500],dark:jt[900]}}function qf(e="light"){return e==="dark"?{main:sn[400],light:sn[300],dark:sn[700]}:{main:"#ed6c02",light:sn[500],dark:sn[900]}}function Xf(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function hs(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...s}=e,i=e.primary||Hf(t),a=e.secondary||Gf(t),c=e.error||Kf(t),u=e.info||Yf(t),l=e.success||Zf(t),d=e.warning||qf(t);function f(v){if(o)return Xf(v);const S=bi(v,Eo.text.primary)>=n?Eo.text.primary:Tc.text.primary;if(process.env.NODE_ENV!=="production"){const T=bi(v,S);T<3&&console.error([`MUI: The contrast ratio of ${T}:1 for ${S} on ${v}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
64
- `))}return S}const h=({color:v,name:S,mainShade:T=500,lightShade:b=300,darkShade:w=700})=>{if(v={...v},!v.main&&v[T]&&(v.main=v[T]),!v.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
65
- The color object needs to have a \`main\` property or a \`${T}\` property.`:ht(11,S?` (${S})`:"",T));if(typeof v.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
61
+ `)),()=>{})}function xs(e){return On(e,"spacing",8,"spacing")}function Ln(e,t){return typeof t=="string"||t==null?t:e(t)}function Of(e,t){return n=>e.reduce((r,o)=>(r[o]=Ln(t,n),r),{})}function Lf(e,t,n,r){if(!t.includes(n))return null;const o=If(n),s=Of(o,r),i=e[n];return st(e,i,s)}function Dl(e,t){const n=xs(e.theme);return Object.keys(e).map(r=>Lf(e,t,r,n)).reduce(Tn,{})}function ye(e){return Dl(e,Mr)}ye.propTypes=process.env.NODE_ENV!=="production"?Mr.reduce((e,t)=>(e[t]=bt,e),{}):{};ye.filterProps=Mr;function ve(e){return Dl(e,Pr)}ve.propTypes=process.env.NODE_ENV!=="production"?Pr.reduce((e,t)=>(e[t]=bt,e),{}):{};ve.filterProps=Pr;process.env.NODE_ENV!=="production"&&Rf.reduce((e,t)=>(e[t]=bt,e),{});function kr(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?Tn(o,t[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function $e(e){return typeof e!="number"?e:`${e}px solid`}function ze(e,t){return xe({prop:e,themeKey:"borders",transform:t})}const jf=ze("border",$e),Df=ze("borderTop",$e),Bf=ze("borderRight",$e),$f=ze("borderBottom",$e),Nf=ze("borderLeft",$e),Vf=ze("borderColor"),Ff=ze("borderTopColor"),zf=ze("borderRightColor"),Wf=ze("borderBottomColor"),Uf=ze("borderLeftColor"),Hf=ze("outline",$e),Gf=ze("outlineColor"),Ir=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=On(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Ln(t,r)});return st(e,e.borderRadius,n)}return null};Ir.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:bt}:{};Ir.filterProps=["borderRadius"];kr(jf,Df,Bf,$f,Nf,Vf,Ff,zf,Wf,Uf,Ir,Hf,Gf);const Rr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=On(e.theme,"spacing",8,"gap"),n=r=>({gap:Ln(t,r)});return st(e,e.gap,n)}return null};Rr.propTypes=process.env.NODE_ENV!=="production"?{gap:bt}:{};Rr.filterProps=["gap"];const Or=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=On(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Ln(t,r)});return st(e,e.columnGap,n)}return null};Or.propTypes=process.env.NODE_ENV!=="production"?{columnGap:bt}:{};Or.filterProps=["columnGap"];const Lr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=On(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Ln(t,r)});return st(e,e.rowGap,n)}return null};Lr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:bt}:{};Lr.filterProps=["rowGap"];const Kf=xe({prop:"gridColumn"}),Yf=xe({prop:"gridRow"}),Zf=xe({prop:"gridAutoFlow"}),qf=xe({prop:"gridAutoColumns"}),Xf=xe({prop:"gridAutoRows"}),Jf=xe({prop:"gridTemplateColumns"}),Qf=xe({prop:"gridTemplateRows"}),eh=xe({prop:"gridTemplateAreas"}),th=xe({prop:"gridArea"});kr(Rr,Or,Lr,Kf,Yf,Zf,qf,Xf,Jf,Qf,eh,th);function Kt(e,t){return t==="grey"?t:e}const nh=xe({prop:"color",themeKey:"palette",transform:Kt}),rh=xe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kt}),oh=xe({prop:"backgroundColor",themeKey:"palette",transform:Kt});kr(nh,rh,oh);function je(e){return e<=1&&e!==0?`${e*100}%`:e}const sh=xe({prop:"width",transform:je}),Ss=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,s,i,a,l;const r=((i=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:i[n])||Er[n];return r?((l=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:je(n)}};return st(e,e.maxWidth,t)}return null};Ss.filterProps=["maxWidth"];const ih=xe({prop:"minWidth",transform:je}),ah=xe({prop:"height",transform:je}),lh=xe({prop:"maxHeight",transform:je}),ch=xe({prop:"minHeight",transform:je});xe({prop:"size",cssProperty:"width",transform:je});xe({prop:"size",cssProperty:"height",transform:je});const uh=xe({prop:"boxSizing"});kr(sh,Ss,ih,ah,lh,ch,uh);const jr={border:{themeKey:"borders",transform:$e},borderTop:{themeKey:"borders",transform:$e},borderRight:{themeKey:"borders",transform:$e},borderBottom:{themeKey:"borders",transform:$e},borderLeft:{themeKey:"borders",transform:$e},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:$e},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ir},color:{themeKey:"palette",transform:Kt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kt},backgroundColor:{themeKey:"palette",transform:Kt},p:{style:ve},pt:{style:ve},pr:{style:ve},pb:{style:ve},pl:{style:ve},px:{style:ve},py:{style:ve},padding:{style:ve},paddingTop:{style:ve},paddingRight:{style:ve},paddingBottom:{style:ve},paddingLeft:{style:ve},paddingX:{style:ve},paddingY:{style:ve},paddingInline:{style:ve},paddingInlineStart:{style:ve},paddingInlineEnd:{style:ve},paddingBlock:{style:ve},paddingBlockStart:{style:ve},paddingBlockEnd:{style:ve},m:{style:ye},mt:{style:ye},mr:{style:ye},mb:{style:ye},ml:{style:ye},mx:{style:ye},my:{style:ye},margin:{style:ye},marginTop:{style:ye},marginRight:{style:ye},marginBottom:{style:ye},marginLeft:{style:ye},marginX:{style:ye},marginY:{style:ye},marginInline:{style:ye},marginInlineStart:{style:ye},marginInlineEnd:{style:ye},marginBlock:{style:ye},marginBlockStart:{style:ye},marginBlockEnd:{style:ye},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Rr},rowGap:{style:Lr},columnGap:{style:Or},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:je},maxWidth:{style:Ss},minWidth:{transform:je},height:{transform:je},maxHeight:{transform:je},minHeight:{transform:je},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function dh(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function fh(e,t){return typeof e=="function"?e(t):e}function hh(){function e(n,r,o,s){const i={[n]:r,theme:o},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:d}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=Ar(o,u)||{};return d?d(i):st(i,r,p=>{let m=dr(f,c,p);return p===m&&typeof p=="string"&&(m=dr(f,c,`${n}${p==="default"?"":Lt(p)}`,p)),l===!1?m:{[l]:m}})}function t(n){const{sx:r,theme:o={},nested:s}=n||{};if(!r)return null;const i=o.unstable_sxConfig??jr;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=Af(o.breakpoints),d=Object.keys(c);let f=c;return Object.keys(u).forEach(h=>{const p=fh(u[h],o);if(p!=null)if(typeof p=="object")if(i[h])f=Tn(f,e(h,p,o,i));else{const m=st({theme:o},p,v=>({[h]:v}));dh(m,p)?f[h]=t({sx:p,theme:o,nested:!0}):f=Tn(f,m)}else f=Tn(f,e(h,p,o,i))}),!s&&o.modularCssLayers?{"@layer sx":Mi(o,ki(d,f))}:Mi(o,ki(d,f))}return Array.isArray(r)?r.map(a):a(r)}return t}const Zt=hh();Zt.filterProps=["sx"];function mh(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Cs(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),mh(e,t,n)}function ph(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function gt(e){if(e.type)return e;if(e.charAt(0)==="#")return gt(ph(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
62
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:pt(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
63
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pt(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const gh=e=>{const t=gt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},yn=(e,t)=>{try{return gh(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Dr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Bl(e){e=gt(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),i=(u,c=(u+n/30)%12)=>o-s*Math.max(Math.min(c-3,9-c,1),-1);let a="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Dr({type:a,values:l})}function Lo(e){e=gt(e);let t=e.type==="hsl"||e.type==="hsla"?gt(Bl(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ri(e,t){const n=Lo(e),r=Lo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $l(e,t){return e=gt(e),t=Cs(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Dr(e)}function St(e,t,n){try{return $l(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Br(e,t){if(e=gt(e),t=Cs(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Dr(e)}function oe(e,t,n){try{return Br(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function $r(e,t){if(e=gt(e),t=Cs(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Dr(e)}function se(e,t,n){try{return $r(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function yh(e,t=.15){return Lo(e)>.5?Br(e,t):$r(e,t)}function Wn(e,t,n){try{return yh(e,t)}catch{return e}}const An={black:"#000",white:"#fff"},vh={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Dt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Bt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},un={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},$t={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Nt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Vt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Nl(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:An.white,default:An.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Vl=Nl();function Fl(){return{text:{primary:An.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:An.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const jo=Fl();function Oi(e,t,n,r){const o=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=$r(e.main,o):t==="dark"&&(e.dark=Br(e.main,s)))}function Li(e,t,n,r,o){const s=o.light||o,i=o.dark||o*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(i*100).toFixed(0)}%)`))}function bh(e="light"){return e==="dark"?{main:$t[200],light:$t[50],dark:$t[400]}:{main:$t[700],light:$t[400],dark:$t[800]}}function xh(e="light"){return e==="dark"?{main:Dt[200],light:Dt[50],dark:Dt[400]}:{main:Dt[500],light:Dt[300],dark:Dt[700]}}function Sh(e="light"){return e==="dark"?{main:Bt[500],light:Bt[300],dark:Bt[700]}:{main:Bt[700],light:Bt[400],dark:Bt[800]}}function Ch(e="light"){return e==="dark"?{main:Nt[400],light:Nt[300],dark:Nt[700]}:{main:Nt[700],light:Nt[500],dark:Nt[900]}}function Th(e="light"){return e==="dark"?{main:Vt[400],light:Vt[300],dark:Vt[700]}:{main:Vt[800],light:Vt[500],dark:Vt[900]}}function wh(e="light"){return e==="dark"?{main:un[400],light:un[300],dark:un[700]}:{main:"#ed6c02",light:un[500],dark:un[900]}}function _h(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Ts(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...s}=e,i=e.primary||bh(t),a=e.secondary||xh(t),l=e.error||Sh(t),u=e.info||Ch(t),c=e.success||Th(t),d=e.warning||wh(t);function f(v){if(o)return _h(v);const S=Ri(v,jo.text.primary)>=n?jo.text.primary:Vl.text.primary;if(process.env.NODE_ENV!=="production"){const _=Ri(v,S);_<3&&console.error([`MUI: The contrast ratio of ${_}:1 for ${S} on ${v}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
64
+ `))}return S}const h=({color:v,name:S,mainShade:_=500,lightShade:b=300,darkShade:C=700})=>{if(v={...v},!v.main&&v[_]&&(v.main=v[_]),!v.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
65
+ The color object needs to have a \`main\` property or a \`${_}\` property.`:pt(11,S?` (${S})`:"",_));if(typeof v.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
66
66
  \`color.main\` should be a string, but \`${JSON.stringify(v.main)}\` was provided instead.
67
67
 
68
68
  Did you intend to use one of the following approaches?
@@ -75,34 +75,34 @@ const theme1 = createTheme({ palette: {
75
75
 
76
76
  const theme2 = createTheme({ palette: {
77
77
  primary: { main: green[500] },
78
- } });`:ht(12,S?` (${S})`:"",JSON.stringify(v.main)));return o?(Si(o,v,"light",b,r),Si(o,v,"dark",w,r)):(xi(v,"light",b,r),xi(v,"dark",w,r)),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=Sc():t==="dark"&&(p=Cc()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),De({common:{...Sn},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:c,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:u,name:"info"}),success:h({color:l,name:"success"}),grey:Uf,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r,...p},s)}function Jf(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Qf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function eh(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var th=/[A-Z]|^ms/g,nh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wc=function(t){return t.charCodeAt(1)===45},Ti=function(t){return t!=null&&typeof t!="boolean"},Gr=eh(function(e){return wc(e)?e:e.replace(th,"-$&").toLowerCase()}),Ci=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nh,function(r,o,s){return ut={name:o,styles:s,next:ut},o})}return Qf[t]!==1&&!wc(t)&&typeof n=="number"&&n!==0?n+"px":n};function or(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return ut={name:o.name,styles:o.styles,next:ut},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)ut={name:i.name,styles:i.styles,next:ut},i=i.next;var a=s.styles+";";return a}return rh(e,t,n)}}var c=n;return c}function rh(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=or(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var a=i;Ti(a)&&(r+=Gr(s)+":"+Ci(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var c=0;c<i.length;c++)Ti(i[c])&&(r+=Gr(s)+":"+Ci(s,i[c])+";");else{var u=or(e,t,i);switch(s){case"animation":case"animationName":{r+=Gr(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var wi=/label:\s*([^\s;{]+)\s*(;|$)/g,ut;function oh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";ut=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=or(n,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=or(n,t,e[a]),r){var c=s;o+=c[a]}wi.lastIndex=0;for(var u="",l;(l=wi.exec(o))!==null;)u+="-"+l[1];var d=Jf(o)+u;return{name:d,styles:o,next:ut}}/**
78
+ } });`:pt(12,S?` (${S})`:"",JSON.stringify(v.main)));return o?(Li(o,v,"light",b,r),Li(o,v,"dark",C,r)):(Oi(v,"light",b,r),Oi(v,"dark",C,r)),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=Nl():t==="dark"&&(p=Fl()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),De({common:{...An},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:u,name:"info"}),success:h({color:c,name:"success"}),grey:vh,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r,...p},s)}function Eh(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ah={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Mh(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ph=/[A-Z]|^ms/g,kh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zl=function(t){return t.charCodeAt(1)===45},ji=function(t){return t!=null&&typeof t!="boolean"},eo=Mh(function(e){return zl(e)?e:e.replace(Ph,"-$&").toLowerCase()}),Di=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kh,function(r,o,s){return ft={name:o,styles:s,next:ft},o})}return Ah[t]!==1&&!zl(t)&&typeof n=="number"&&n!==0?n+"px":n};function fr(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return ft={name:o.name,styles:o.styles,next:ft},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)ft={name:i.name,styles:i.styles,next:ft},i=i.next;var a=s.styles+";";return a}return Ih(e,t,n)}}var l=n;return l}function Ih(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=fr(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var a=i;ji(a)&&(r+=eo(s)+":"+Di(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)ji(i[l])&&(r+=eo(s)+":"+Di(s,i[l])+";");else{var u=fr(e,t,i);switch(s){case"animation":case"animationName":{r+=eo(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var Bi=/label:\s*([^\s;{]+)\s*(;|$)/g,ft;function Rh(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";ft=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=fr(n,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=fr(n,t,e[a]),r){var l=s;o+=l[a]}Bi.lastIndex=0;for(var u="",c;(c=Bi.exec(o))!==null;)u+="-"+c[1];var d=Eh(o)+u;return{name:d,styles:o,next:ft}}/**
79
79
  * @mui/styled-engine v7.3.7
80
80
  *
81
81
  * @license MIT
82
82
  * This source code is licensed under the MIT license found in the
83
83
  * LICENSE file in the root directory of this source tree.
84
- */function sh(e,t){const n=cd(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
85
- `)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function ih(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const _i=[];function Pt(e){return _i[0]=e,oh(_i)}function Ao(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const i=e[s],a=t[s];if(!a)r[s]=i||{};else if(!i)r[s]=a;else{r[s]={...a};for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)){const u=c;r[s][u]=Ao(i[u],a[u],n)}}}else s==="className"&&n&&t.className?r.className=gc(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[s]===void 0&&(r[s]=e[s])}return r}const ah=Ve.createContext(void 0);process.env.NODE_ENV!=="production"&&(te.node,te.object);function ch(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Ao(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?Ao(o,r,t.components.mergeClassNameAndStyle):r}function lh({props:e,name:t}){const n=Ve.useContext(ah);return ch({props:e,name:t,theme:{components:n}})}const uh=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function dh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=uh(t),i=Object.keys(s);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function c(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,h){const p=i.indexOf(h);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[i[p]]=="number"?t[i[p]]:h)-r/100}${n})`}function l(f){return i.indexOf(f)+1<i.length?u(f,i[i.indexOf(f)+1]):a(f)}function d(f){const h=i.indexOf(f);return h===0?a(i[1]):h===i.length-1?c(i[h]):u(f,i[i.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:c,between:u,only:l,not:d,unit:n,...o}}const fh={borderRadius:4};function hh(e=8,t=us({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function mh(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function _c(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=dh(n),c=hh(o);let u=De({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...fh,...s}},i);return u=qd(u),u.applyStyles=mh,u=t.reduce((l,d)=>De(l,d),u),u.unstable_sxConfig={...Ar,...i==null?void 0:i.unstable_sxConfig},u.unstable_sx=function(d){return Ht({sx:d,theme:this})},u}const Ei=(e,t,n,r=[])=>{let o=e;t.forEach((s,i)=>{i===t.length-1?Array.isArray(o)?o[Number(s)]=n:o&&typeof o=="object"&&(o[s]=n):o&&typeof o=="object"&&(o[s]||(o[s]=r.includes(s)?[]:{}),o=o[s])})},ph=(e,t,n)=>{function r(o,s=[],i=[]){Object.entries(o).forEach(([a,c])=>{(!n||n&&!n([...s,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...s,a],Array.isArray(c)?[...i,a]:i):t([...s,a],c,i))})}r(e)},gh=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Kr(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},s={},i={};return ph(e,(a,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(a,c))){const l=`--${n?`${n}-`:""}${a.join("-")}`,d=gh(a,c);Object.assign(o,{[l]:d}),Ei(s,a,`var(${l})`,u),Ei(i,a,`var(${l}, ${d})`,u)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function yh(e,t={}){const{getSelector:n=S,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:s}=t,{colorSchemes:i={},components:a,defaultColorScheme:c="light",...u}=e,{vars:l,css:d,varsWithDefaults:f}=Kr(u,t);let h=f;const p={},{[c]:m,...v}=i;if(Object.entries(v||{}).forEach(([w,C])=>{const{vars:E,css:P,varsWithDefaults:M}=Kr(C,t);h=De(h,M),p[w]={css:P,vars:E}}),m){const{css:w,vars:C,varsWithDefaults:E}=Kr(m,t);h=De(h,E),p[c]={css:w,vars:C}}function S(w,C){var P,M;let E=o;if(o==="class"&&(E=".%s"),o==="data"&&(E="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(E=`[${o}="%s"]`),w){if(E==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${((M=(P=i[w])==null?void 0:P.palette)==null?void 0:M.mode)||w})`]:{":root":C}};if(E)return e.defaultColorScheme===w?`:root, ${E.replace("%s",String(w))}`:E.replace("%s",String(w))}return":root"}return{vars:h,generateThemeVars:()=>{let w={...l};return Object.entries(p).forEach(([,{vars:C}])=>{w=De(w,C)}),w},generateStyleSheets:()=>{var I,V;const w=[],C=e.defaultColorScheme||"light";function E(D,g){Object.keys(g).length&&w.push(typeof D=="string"?{[D]:{...g}}:D)}E(n(void 0,{...d}),d);const{[C]:P,...M}=p;if(P){const{css:D}=P,g=(V=(I=i[C])==null?void 0:I.palette)==null?void 0:V.mode,$=!r&&g?{colorScheme:g,...D}:{...D};E(n(C,{...$}),$)}return Object.entries(M).forEach(([D,{css:g}])=>{var W,K;const $=(K=(W=i[D])==null?void 0:W.palette)==null?void 0:K.mode,R=!r&&$?{colorScheme:$,...g}:{...g};E(n(D,{...R}),R)}),s&&w.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),w}}}function vh(e){const t={};return Object.entries(e).forEach(r=>{const[o,s]=r;typeof s=="object"&&(t[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function bh(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const xh={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ms(e,t,n="Mui"){const r=xh[t];return r?`${n}-${r}`:`${Dd.generate(e)}-${t}`}function Sh(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Th(e){return Math.round(e*1e5)/1e5}const Ai={textTransform:"uppercase"},Mi='"Roboto", "Helvetica", "Arial", sans-serif';function Ch(e,t){const{fontFamily:n=Mi,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:u,pxToRem:l,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const f=r/14,h=l||(v=>`${v/c*f}rem`),p=(v,S,T,b,w)=>({fontFamily:n,fontWeight:v,fontSize:h(S),lineHeight:T,...n===Mi?{letterSpacing:`${Th(b/S)}em`}:{},...w,...u}),m={h1:p(o,96,1.167,-1.5),h2:p(o,60,1.2,-.5),h3:p(s,48,1.167,0),h4:p(s,34,1.235,.25),h5:p(s,24,1.334,0),h6:p(i,20,1.6,.15),subtitle1:p(s,16,1.75,.15),subtitle2:p(i,14,1.57,.1),body1:p(s,16,1.5,.15),body2:p(s,14,1.43,.15),button:p(i,14,1.75,.4,Ai),caption:p(s,12,1.66,.4),overline:p(s,12,2.66,1,Ai),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return De({htmlFontSize:c,pxToRem:h,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...m},d,{clone:!1})}const wh=.2,_h=.14,Eh=.12;function ue(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${wh})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${_h})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Eh})`].join(",")}const Ah=["none",ue(0,2,1,-1,0,1,1,0,0,1,3,0),ue(0,3,1,-2,0,2,2,0,0,1,5,0),ue(0,3,3,-2,0,3,4,0,0,1,8,0),ue(0,2,4,-1,0,4,5,0,0,1,10,0),ue(0,3,5,-1,0,5,8,0,0,1,14,0),ue(0,3,5,-1,0,6,10,0,0,1,18,0),ue(0,4,5,-2,0,7,10,1,0,2,16,1),ue(0,5,5,-3,0,8,10,1,0,3,14,2),ue(0,5,6,-3,0,9,12,1,0,3,16,2),ue(0,6,6,-3,0,10,14,1,0,4,18,3),ue(0,6,7,-4,0,11,15,1,0,4,20,3),ue(0,7,8,-4,0,12,17,2,0,5,22,4),ue(0,7,8,-4,0,13,19,2,0,5,24,4),ue(0,7,9,-4,0,14,21,2,0,5,26,4),ue(0,8,9,-5,0,15,22,2,0,6,28,5),ue(0,8,10,-5,0,16,24,2,0,6,30,5),ue(0,8,11,-5,0,17,26,2,0,6,32,5),ue(0,9,11,-5,0,18,28,2,0,7,34,6),ue(0,9,12,-6,0,19,29,2,0,7,36,6),ue(0,10,13,-6,0,20,31,3,0,8,38,7),ue(0,10,13,-6,0,21,33,3,0,8,40,7),ue(0,10,14,-6,0,22,35,3,0,8,42,7),ue(0,11,14,-7,0,23,36,3,0,9,44,8),ue(0,11,15,-7,0,24,38,3,0,9,46,8)],Mh={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ph={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Pi(e){return`${Math.round(e)}ms`}function kh(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Ih(e){const t={...Mh,...e.easing},n={...Ph,...e.duration};return{getAutoHeightDuration:kh,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:c=0,...u}=s;if(process.env.NODE_ENV!=="production"){const l=f=>typeof f=="string",d=f=>!Number.isNaN(parseFloat(f));!l(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(i)&&!l(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),l(a)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!l(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
86
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(l=>`${l} ${typeof i=="string"?i:Pi(i)} ${a} ${typeof c=="string"?c:Pi(c)}`).join(",")},...e,easing:t,duration:n}}const Rh={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Oh(e){return Qe(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ec(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let s=0;s<o.length;s++){const[i,a]=o[s];!Oh(a)||i.startsWith("unstable_")?delete r[i]:Qe(a)&&(r[i]={...a},n(r[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
84
+ */function Oh(e,t){const n=Dd(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
85
+ `)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function Lh(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const $i=[];function Rt(e){return $i[0]=e,Rh($i)}function Do(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const i=e[s],a=t[s];if(!a)r[s]=i||{};else if(!i)r[s]=a;else{r[s]={...a};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const u=l;r[s][u]=Do(i[u],a[u],n)}}}else s==="className"&&n&&t.className?r.className=Ll(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[s]===void 0&&(r[s]=e[s])}return r}const jh=Fe.createContext(void 0);process.env.NODE_ENV!=="production"&&(te.node,te.object);function Dh(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Do(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?Do(o,r,t.components.mergeClassNameAndStyle):r}function Bh({props:e,name:t}){const n=Fe.useContext(jh);return Dh({props:e,name:t,theme:{components:n}})}const $h=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Nh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=$h(t),i=Object.keys(s);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,h){const p=i.indexOf(h);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[i[p]]=="number"?t[i[p]]:h)-r/100}${n})`}function c(f){return i.indexOf(f)+1<i.length?u(f,i[i.indexOf(f)+1]):a(f)}function d(f){const h=i.indexOf(f);return h===0?a(i[1]):h===i.length-1?l(i[h]):u(f,i[i.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:l,between:u,only:c,not:d,unit:n,...o}}const Vh={borderRadius:4};function Fh(e=8,t=xs({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function zh(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function Wl(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=Nh(n),l=Fh(o);let u=De({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Vh,...s}},i);return u=_f(u),u.applyStyles=zh,u=t.reduce((c,d)=>De(c,d),u),u.unstable_sxConfig={...jr,...i==null?void 0:i.unstable_sxConfig},u.unstable_sx=function(d){return Zt({sx:d,theme:this})},u}const Ni=(e,t,n,r=[])=>{let o=e;t.forEach((s,i)=>{i===t.length-1?Array.isArray(o)?o[Number(s)]=n:o&&typeof o=="object"&&(o[s]=n):o&&typeof o=="object"&&(o[s]||(o[s]=r.includes(s)?[]:{}),o=o[s])})},Wh=(e,t,n)=>{function r(o,s=[],i=[]){Object.entries(o).forEach(([a,l])=>{(!n||n&&!n([...s,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...s,a],Array.isArray(l)?[...i,a]:i):t([...s,a],l,i))})}r(e)},Uh=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function to(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},s={},i={};return Wh(e,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const c=`--${n?`${n}-`:""}${a.join("-")}`,d=Uh(a,l);Object.assign(o,{[c]:d}),Ni(s,a,`var(${c})`,u),Ni(i,a,`var(${c}, ${d})`,u)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function Hh(e,t={}){const{getSelector:n=S,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:s}=t,{colorSchemes:i={},components:a,defaultColorScheme:l="light",...u}=e,{vars:c,css:d,varsWithDefaults:f}=to(u,t);let h=f;const p={},{[l]:m,...v}=i;if(Object.entries(v||{}).forEach(([C,T])=>{const{vars:w,css:P,varsWithDefaults:M}=to(T,t);h=De(h,M),p[C]={css:P,vars:w}}),m){const{css:C,vars:T,varsWithDefaults:w}=to(m,t);h=De(h,w),p[l]={css:C,vars:T}}function S(C,T){var P,M;let w=o;if(o==="class"&&(w=".%s"),o==="data"&&(w="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(w=`[${o}="%s"]`),C){if(w==="media")return e.defaultColorScheme===C?":root":{[`@media (prefers-color-scheme: ${((M=(P=i[C])==null?void 0:P.palette)==null?void 0:M.mode)||C})`]:{":root":T}};if(w)return e.defaultColorScheme===C?`:root, ${w.replace("%s",String(C))}`:w.replace("%s",String(C))}return":root"}return{vars:h,generateThemeVars:()=>{let C={...c};return Object.entries(p).forEach(([,{vars:T}])=>{C=De(C,T)}),C},generateStyleSheets:()=>{var I,V;const C=[],T=e.defaultColorScheme||"light";function w($,y){Object.keys(y).length&&C.push(typeof $=="string"?{[$]:{...y}}:$)}w(n(void 0,{...d}),d);const{[T]:P,...M}=p;if(P){const{css:$}=P,y=(V=(I=i[T])==null?void 0:I.palette)==null?void 0:V.mode,R=!r&&y?{colorScheme:y,...$}:{...$};w(n(T,{...R}),R)}return Object.entries(M).forEach(([$,{css:y}])=>{var F,U;const R=(U=(F=i[$])==null?void 0:F.palette)==null?void 0:U.mode,O=!r&&R?{colorScheme:R,...y}:{...y};w(n($,{...O}),O)}),s&&C.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),C}}}function Gh(e){const t={};return Object.entries(e).forEach(r=>{const[o,s]=r;typeof s=="object"&&(t[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function Kh(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Yh={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ws(e,t,n="Mui"){const r=Yh[t];return r?`${n}-${r}`:`${uf.generate(e)}-${t}`}function Zh(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function qh(e){return Math.round(e*1e5)/1e5}const Vi={textTransform:"uppercase"},Fi='"Roboto", "Helvetica", "Arial", sans-serif';function Xh(e,t){const{fontFamily:n=Fi,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:u,pxToRem:c,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const f=r/14,h=c||(v=>`${v/l*f}rem`),p=(v,S,_,b,C)=>({fontFamily:n,fontWeight:v,fontSize:h(S),lineHeight:_,...n===Fi?{letterSpacing:`${qh(b/S)}em`}:{},...C,...u}),m={h1:p(o,96,1.167,-1.5),h2:p(o,60,1.2,-.5),h3:p(s,48,1.167,0),h4:p(s,34,1.235,.25),h5:p(s,24,1.334,0),h6:p(i,20,1.6,.15),subtitle1:p(s,16,1.75,.15),subtitle2:p(i,14,1.57,.1),body1:p(s,16,1.5,.15),body2:p(s,14,1.43,.15),button:p(i,14,1.75,.4,Vi),caption:p(s,12,1.66,.4),overline:p(s,12,2.66,1,Vi),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return De({htmlFontSize:l,pxToRem:h,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...m},d,{clone:!1})}const Jh=.2,Qh=.14,em=.12;function ue(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Jh})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Qh})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${em})`].join(",")}const tm=["none",ue(0,2,1,-1,0,1,1,0,0,1,3,0),ue(0,3,1,-2,0,2,2,0,0,1,5,0),ue(0,3,3,-2,0,3,4,0,0,1,8,0),ue(0,2,4,-1,0,4,5,0,0,1,10,0),ue(0,3,5,-1,0,5,8,0,0,1,14,0),ue(0,3,5,-1,0,6,10,0,0,1,18,0),ue(0,4,5,-2,0,7,10,1,0,2,16,1),ue(0,5,5,-3,0,8,10,1,0,3,14,2),ue(0,5,6,-3,0,9,12,1,0,3,16,2),ue(0,6,6,-3,0,10,14,1,0,4,18,3),ue(0,6,7,-4,0,11,15,1,0,4,20,3),ue(0,7,8,-4,0,12,17,2,0,5,22,4),ue(0,7,8,-4,0,13,19,2,0,5,24,4),ue(0,7,9,-4,0,14,21,2,0,5,26,4),ue(0,8,9,-5,0,15,22,2,0,6,28,5),ue(0,8,10,-5,0,16,24,2,0,6,30,5),ue(0,8,11,-5,0,17,26,2,0,6,32,5),ue(0,9,11,-5,0,18,28,2,0,7,34,6),ue(0,9,12,-6,0,19,29,2,0,7,36,6),ue(0,10,13,-6,0,20,31,3,0,8,38,7),ue(0,10,13,-6,0,21,33,3,0,8,40,7),ue(0,10,14,-6,0,22,35,3,0,8,42,7),ue(0,11,14,-7,0,23,36,3,0,9,44,8),ue(0,11,15,-7,0,24,38,3,0,9,46,8)],nm={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},rm={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function zi(e){return`${Math.round(e)}ms`}function om(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function sm(e){const t={...nm,...e.easing},n={...rm,...e.duration};return{getAutoHeightDuration:om,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:l=0,...u}=s;if(process.env.NODE_ENV!=="production"){const c=f=>typeof f=="string",d=f=>!Number.isNaN(parseFloat(f));!c(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(i)&&!c(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),c(a)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!c(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
86
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof i=="string"?i:zi(i)} ${a} ${typeof l=="string"?l:zi(l)}`).join(",")},...e,easing:t,duration:n}}const im={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function am(e){return nt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ul(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let s=0;s<o.length;s++){const[i,a]=o[s];!am(a)||i.startsWith("unstable_")?delete r[i]:nt(a)&&(r[i]={...a},n(r[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
87
87
 
88
88
  const theme = ${JSON.stringify(t,null,2)};
89
89
 
90
90
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
91
91
  theme.transitions = createTransitions(theme.transitions || {});
92
92
 
93
- export default theme;`}function ki(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Lh=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function Dh(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:xc(t,Lh(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${ki(n)})`:kr(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${ki(n)})`:Pr(t,n)}})}function Mo(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:c,colorSpace:u,...l}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ht(20));const d=hs({...s,colorSpace:u}),f=_c(e);let h=De(f,{mixins:Sh(f.breakpoints,r),palette:d,shadows:Ah.slice(),typography:Ch(d,a),transitions:Ih(i),zIndex:{...Rh}});if(h=De(h,l),h=t.reduce((p,m)=>De(p,m),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(v,S)=>{let T;for(T in v){const b=v[T];if(p.includes(T)&&Object.keys(b).length>0){if(process.env.NODE_ENV!=="production"){const w=ms("",T);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${T}\` internal state.`,"You can not override it like this: ",JSON.stringify(v,null,2),"",`Instead, you need to use the '&.${w}' syntax:`,JSON.stringify({root:{[`&.${w}`]:b}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
94
- `))}v[T]={}}}};Object.keys(h.components).forEach(v=>{const S=h.components[v].styleOverrides;S&&v.startsWith("Mui")&&m(S,v)})}return h.unstable_sxConfig={...Ar,...l==null?void 0:l.unstable_sxConfig},h.unstable_sx=function(m){return Ht({sx:m,theme:this})},h.toRuntimeSource=Ec,Dh(h),h}function jh(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 Bh=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=jh(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ac(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Mc(e){return e==="dark"?Bh:[]}function $h(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...s}=e,i=hs({...t,colorSpace:o});return{palette:i,opacity:{...Ac(i.mode),...n},overlays:r||Mc(i.mode),...s}}function Nh(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 Vh=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Fh=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return Vh(e.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:s?{[s.replace("%s",t)]:i,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function zh(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function k(e,t,n){!e[t]&&n&&(e[t]=n)}function hn(e){return typeof e!="string"||!e.startsWith("hsl")?e:bc(e)}function Xe(e,t){`${t}Channel`in e||(e[`${t}Channel`]=fn(hn(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().
95
- 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 Wh(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ge=e=>{try{return e()}catch{}},Uh=(e="mui")=>as.unstable_createGetCssVar(e);function Yr(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){t[o]=$h({...n,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:i,...a}=Mo({...r,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:i,opacity:{...Ac(s),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||Mc(s)},a}function Hh(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:i=!1,shouldSkipGeneratingVar:a=Nh,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...l}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=Uh(s),{[f]:p,light:m,dark:v,...S}=n,T={...S};let b=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(b=!0),!b)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:ht(21,f));let w;i&&(w="oklch");const C=Yr(w,T,b,l,f);m&&!T.light&&Yr(w,T,m,void 0,"light"),v&&!T.dark&&Yr(w,T,v,void 0,"dark");let E={defaultColorScheme:f,...C,cssVarPrefix:s,colorSchemeSelector:c,rootSelector:u,getCssVar:h,colorSchemes:T,font:{...vh(C.typography),...C.font},spacing:Wh(l.spacing)};Object.keys(E.colorSchemes).forEach(D=>{const g=E.colorSchemes[D].palette,$=W=>{const K=W.split("-"),G=K[1],j=K[2];return h(W,g[G][j])};g.mode==="light"&&(k(g.common,"background","#fff"),k(g.common,"onBackground","#000")),g.mode==="dark"&&(k(g.common,"background","#000"),k(g.common,"onBackground","#fff"));function R(W,K,G){if(w){let j;return W===bt&&(j=`transparent ${((1-G)*100).toFixed(0)}%`),W===oe&&(j=`#000 ${(G*100).toFixed(0)}%`),W===se&&(j=`#fff ${(G*100).toFixed(0)}%`),`color-mix(in ${w}, ${K}, ${j})`}return W(K,G)}if(zh(g,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),g.mode==="light"){k(g.Alert,"errorColor",R(oe,g.error.light,.6)),k(g.Alert,"infoColor",R(oe,g.info.light,.6)),k(g.Alert,"successColor",R(oe,g.success.light,.6)),k(g.Alert,"warningColor",R(oe,g.warning.light,.6)),k(g.Alert,"errorFilledBg",$("palette-error-main")),k(g.Alert,"infoFilledBg",$("palette-info-main")),k(g.Alert,"successFilledBg",$("palette-success-main")),k(g.Alert,"warningFilledBg",$("palette-warning-main")),k(g.Alert,"errorFilledColor",Ge(()=>g.getContrastText(g.error.main))),k(g.Alert,"infoFilledColor",Ge(()=>g.getContrastText(g.info.main))),k(g.Alert,"successFilledColor",Ge(()=>g.getContrastText(g.success.main))),k(g.Alert,"warningFilledColor",Ge(()=>g.getContrastText(g.warning.main))),k(g.Alert,"errorStandardBg",R(se,g.error.light,.9)),k(g.Alert,"infoStandardBg",R(se,g.info.light,.9)),k(g.Alert,"successStandardBg",R(se,g.success.light,.9)),k(g.Alert,"warningStandardBg",R(se,g.warning.light,.9)),k(g.Alert,"errorIconColor",$("palette-error-main")),k(g.Alert,"infoIconColor",$("palette-info-main")),k(g.Alert,"successIconColor",$("palette-success-main")),k(g.Alert,"warningIconColor",$("palette-warning-main")),k(g.AppBar,"defaultBg",$("palette-grey-100")),k(g.Avatar,"defaultBg",$("palette-grey-400")),k(g.Button,"inheritContainedBg",$("palette-grey-300")),k(g.Button,"inheritContainedHoverBg",$("palette-grey-A100")),k(g.Chip,"defaultBorder",$("palette-grey-400")),k(g.Chip,"defaultAvatarColor",$("palette-grey-700")),k(g.Chip,"defaultIconColor",$("palette-grey-700")),k(g.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),k(g.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),k(g.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),k(g.LinearProgress,"primaryBg",R(se,g.primary.main,.62)),k(g.LinearProgress,"secondaryBg",R(se,g.secondary.main,.62)),k(g.LinearProgress,"errorBg",R(se,g.error.main,.62)),k(g.LinearProgress,"infoBg",R(se,g.info.main,.62)),k(g.LinearProgress,"successBg",R(se,g.success.main,.62)),k(g.LinearProgress,"warningBg",R(se,g.warning.main,.62)),k(g.Skeleton,"bg",w?R(bt,g.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),k(g.Slider,"primaryTrack",R(se,g.primary.main,.62)),k(g.Slider,"secondaryTrack",R(se,g.secondary.main,.62)),k(g.Slider,"errorTrack",R(se,g.error.main,.62)),k(g.Slider,"infoTrack",R(se,g.info.main,.62)),k(g.Slider,"successTrack",R(se,g.success.main,.62)),k(g.Slider,"warningTrack",R(se,g.warning.main,.62));const W=w?R(oe,g.background.default,.6825):Bn(g.background.default,.8);k(g.SnackbarContent,"bg",W),k(g.SnackbarContent,"color",Ge(()=>w?Eo.text.primary:g.getContrastText(W))),k(g.SpeedDialAction,"fabHoverBg",Bn(g.background.paper,.15)),k(g.StepConnector,"border",$("palette-grey-400")),k(g.StepContent,"border",$("palette-grey-400")),k(g.Switch,"defaultColor",$("palette-common-white")),k(g.Switch,"defaultDisabledColor",$("palette-grey-100")),k(g.Switch,"primaryDisabledColor",R(se,g.primary.main,.62)),k(g.Switch,"secondaryDisabledColor",R(se,g.secondary.main,.62)),k(g.Switch,"errorDisabledColor",R(se,g.error.main,.62)),k(g.Switch,"infoDisabledColor",R(se,g.info.main,.62)),k(g.Switch,"successDisabledColor",R(se,g.success.main,.62)),k(g.Switch,"warningDisabledColor",R(se,g.warning.main,.62)),k(g.TableCell,"border",R(se,R(bt,g.divider,1),.88)),k(g.Tooltip,"bg",R(bt,g.grey[700],.92))}if(g.mode==="dark"){k(g.Alert,"errorColor",R(se,g.error.light,.6)),k(g.Alert,"infoColor",R(se,g.info.light,.6)),k(g.Alert,"successColor",R(se,g.success.light,.6)),k(g.Alert,"warningColor",R(se,g.warning.light,.6)),k(g.Alert,"errorFilledBg",$("palette-error-dark")),k(g.Alert,"infoFilledBg",$("palette-info-dark")),k(g.Alert,"successFilledBg",$("palette-success-dark")),k(g.Alert,"warningFilledBg",$("palette-warning-dark")),k(g.Alert,"errorFilledColor",Ge(()=>g.getContrastText(g.error.dark))),k(g.Alert,"infoFilledColor",Ge(()=>g.getContrastText(g.info.dark))),k(g.Alert,"successFilledColor",Ge(()=>g.getContrastText(g.success.dark))),k(g.Alert,"warningFilledColor",Ge(()=>g.getContrastText(g.warning.dark))),k(g.Alert,"errorStandardBg",R(oe,g.error.light,.9)),k(g.Alert,"infoStandardBg",R(oe,g.info.light,.9)),k(g.Alert,"successStandardBg",R(oe,g.success.light,.9)),k(g.Alert,"warningStandardBg",R(oe,g.warning.light,.9)),k(g.Alert,"errorIconColor",$("palette-error-main")),k(g.Alert,"infoIconColor",$("palette-info-main")),k(g.Alert,"successIconColor",$("palette-success-main")),k(g.Alert,"warningIconColor",$("palette-warning-main")),k(g.AppBar,"defaultBg",$("palette-grey-900")),k(g.AppBar,"darkBg",$("palette-background-paper")),k(g.AppBar,"darkColor",$("palette-text-primary")),k(g.Avatar,"defaultBg",$("palette-grey-600")),k(g.Button,"inheritContainedBg",$("palette-grey-800")),k(g.Button,"inheritContainedHoverBg",$("palette-grey-700")),k(g.Chip,"defaultBorder",$("palette-grey-700")),k(g.Chip,"defaultAvatarColor",$("palette-grey-300")),k(g.Chip,"defaultIconColor",$("palette-grey-300")),k(g.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),k(g.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),k(g.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),k(g.LinearProgress,"primaryBg",R(oe,g.primary.main,.5)),k(g.LinearProgress,"secondaryBg",R(oe,g.secondary.main,.5)),k(g.LinearProgress,"errorBg",R(oe,g.error.main,.5)),k(g.LinearProgress,"infoBg",R(oe,g.info.main,.5)),k(g.LinearProgress,"successBg",R(oe,g.success.main,.5)),k(g.LinearProgress,"warningBg",R(oe,g.warning.main,.5)),k(g.Skeleton,"bg",w?R(bt,g.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),k(g.Slider,"primaryTrack",R(oe,g.primary.main,.5)),k(g.Slider,"secondaryTrack",R(oe,g.secondary.main,.5)),k(g.Slider,"errorTrack",R(oe,g.error.main,.5)),k(g.Slider,"infoTrack",R(oe,g.info.main,.5)),k(g.Slider,"successTrack",R(oe,g.success.main,.5)),k(g.Slider,"warningTrack",R(oe,g.warning.main,.5));const W=w?R(se,g.background.default,.985):Bn(g.background.default,.98);k(g.SnackbarContent,"bg",W),k(g.SnackbarContent,"color",Ge(()=>w?Tc.text.primary:g.getContrastText(W))),k(g.SpeedDialAction,"fabHoverBg",Bn(g.background.paper,.15)),k(g.StepConnector,"border",$("palette-grey-600")),k(g.StepContent,"border",$("palette-grey-600")),k(g.Switch,"defaultColor",$("palette-grey-300")),k(g.Switch,"defaultDisabledColor",$("palette-grey-600")),k(g.Switch,"primaryDisabledColor",R(oe,g.primary.main,.55)),k(g.Switch,"secondaryDisabledColor",R(oe,g.secondary.main,.55)),k(g.Switch,"errorDisabledColor",R(oe,g.error.main,.55)),k(g.Switch,"infoDisabledColor",R(oe,g.info.main,.55)),k(g.Switch,"successDisabledColor",R(oe,g.success.main,.55)),k(g.Switch,"warningDisabledColor",R(oe,g.warning.main,.55)),k(g.TableCell,"border",R(oe,R(bt,g.divider,1),.68)),k(g.Tooltip,"bg",R(bt,g.grey[700],.92))}Xe(g.background,"default"),Xe(g.background,"paper"),Xe(g.common,"background"),Xe(g.common,"onBackground"),Xe(g,"divider"),Object.keys(g).forEach(W=>{const K=g[W];W!=="tonalOffset"&&K&&typeof K=="object"&&(K.main&&k(g[W],"mainChannel",fn(hn(K.main))),K.light&&k(g[W],"lightChannel",fn(hn(K.light))),K.dark&&k(g[W],"darkChannel",fn(hn(K.dark))),K.contrastText&&k(g[W],"contrastTextChannel",fn(hn(K.contrastText))),W==="text"&&(Xe(g[W],"primary"),Xe(g[W],"secondary")),W==="action"&&(K.active&&Xe(g[W],"active"),K.selected&&Xe(g[W],"selected")))})}),E=t.reduce((D,g)=>De(D,g),E);const P={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Fh(E),enableContrastVars:i},{vars:M,generateThemeVars:I,generateStyleSheets:V}=yh(E,P);return E.vars=M,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([D,g])=>{E[D]=g}),E.generateThemeVars=I,E.generateStyleSheets=V,E.generateSpacing=function(){return as.createSpacing(l.spacing,us(this))},E.getColorSchemeSelector=bh(c),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=a,E.unstable_sxConfig={...Ar,...l==null?void 0:l.unstable_sxConfig},E.unstable_sx=function(g){return Ht({sx:g,theme:this})},E.toRuntimeSource=Ec,E}function Ii(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:hs({...n===!0?{}:n.palette,mode:t})})}function Gh(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...i}=e,a=s||"light",c=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Mo(e,...t);let l=n;"palette"in e||u[a]&&(u[a]!==!0?l=u[a].palette:a==="dark"&&(l={mode:"dark"}));const d=Mo({...e,palette:l},...t);return d.defaultColorScheme=a,d.colorSchemes=u,d.palette.mode==="light"&&(d.colorSchemes.light={...u.light!==!0&&u.light,palette:d.palette},Ii(d,"dark",u.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:d.palette},Ii(d,"light",u.light)),d}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),Hh({...i,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const Kh=Gh(),Yh="$$material";function Pc(e,t=""){return e.displayName||e.name||t}function Ri(e,t,n){const r=Pc(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Zh(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Pc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case nr.ForwardRef:return Ri(e,e.render,"ForwardRef");case nr.Memo:return Ri(e,e.type,"memo");default:return}}}function qh(e){const{variants:t,...n}=e,r={variants:t,style:Pt(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Pt(o.style))}),r}const Xh=_c();function Zr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Et(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Jh(e){return e?(t,n)=>n[e]:null}function Qh(e,t,n){e.theme=rm(e.theme)?n:e.theme[t]||e.theme}function Zn(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>Zn(e,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?Et(r.style,n):r.style;else{const{variants:s,...i}=r;o=n?Et(Pt(i),n):i}return kc(e,r.variants,[o],n)}return r!=null&&r.isProcessed?n?Et(Pt(r.style),n):r.style:n?Et(Pt(r),n):r}function kc(e,t,n=[],r=void 0){var s;let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(o))continue}else for(const c in a.props)if(e[c]!==a.props[c]&&((s=e.ownerState)==null?void 0:s[c])!==a.props[c])continue e;typeof a.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?Et(Pt(a.style(o)),r):a.style(o))):n.push(r?Et(Pt(a.style),r):a.style)}return n}function em(e={}){const{themeId:t,defaultTheme:n=Xh,rootShouldForwardProp:r=Zr,slotShouldForwardProp:o=Zr}=e;function s(a){Qh(a,t,n)}return(a,c={})=>{ih(a,E=>E.filter(P=>P!==Ht));const{name:u,slot:l,skipVariantsResolver:d,skipSx:f,overridesResolver:h=Jh(Ic(l)),...p}=c,m=u&&u.startsWith("Mui")||l?"components":"custom",v=d!==void 0?d:l&&l!=="Root"&&l!=="root"||!1,S=f||!1;let T=Zr;l==="Root"||l==="root"?T=r:l?T=o:om(a)&&(T=void 0);const b=sh(a,{shouldForwardProp:T,label:nm(u,l),...p}),w=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(M){return Zn(M,E,M.theme.modularCssLayers?m:void 0)};if(Qe(E)){const P=qh(E);return function(I){return P.variants?Zn(I,P,I.theme.modularCssLayers?m:void 0):I.theme.modularCssLayers?Et(P.style,m):P.style}}return E},C=(...E)=>{const P=[],M=E.map(w),I=[];if(P.push(s),u&&h&&I.push(function($){var G,j;const W=(j=(G=$.theme.components)==null?void 0:G[u])==null?void 0:j.styleOverrides;if(!W)return null;const K={};for(const Q in W)K[Q]=Zn($,W[Q],$.theme.modularCssLayers?"theme":void 0);return h($,K)}),u&&!v&&I.push(function($){var K,G;const R=$.theme,W=(G=(K=R==null?void 0:R.components)==null?void 0:K[u])==null?void 0:G.variants;return W?kc($,W,[],$.theme.modularCssLayers?"theme":void 0):null}),S||I.push(Ht),Array.isArray(M[0])){const g=M.shift(),$=new Array(P.length).fill(""),R=new Array(I.length).fill("");let W;W=[...$,...g,...R],W.raw=[...$,...g.raw,...R],P.unshift(W)}const V=[...P,...M,...I],D=b(...V);return a.muiName&&(D.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(D.displayName=tm(u,l,a)),D};return b.withConfig&&(C.withConfig=b.withConfig),C}}function tm(e,t,n){return e?`${e}${It(t||"")}`:`Styled(${Zh(n)})`}function nm(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Ic(t||"Root")}`),n}function rm(e){for(const t in e)return!1;return!0}function om(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ic(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function sm(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const im=e=>sm(e)&&e!=="classes",am=em({themeId:Yh,defaultTheme:Kh,rootShouldForwardProp:im}),cm=as.unstable_memoTheme;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function lm(e){return lh(e)}function um(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=ms(e,o,n)}),r}function dm(e){return ms("MuiSvgIcon",e)}um("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const fm=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${It(t)}`,`fontSize${It(n)}`]};return Hd(o,dm,r)},hm=am("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${It(n.color)}`],t[`fontSize${It(n.fontSize)}`]]}})(cm(({theme:e})=>{var t,n,r,o,s,i,a,c,u,l,d,f,h,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((l=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:l.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var v,S;return{props:{color:m},style:{color:(S=(v=(e.vars??e).palette)==null?void 0:v[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(p=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:p.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),sr=Ve.forwardRef(function(t,n){const r=lm({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:l=!1,titleAccess:d,viewBox:f="0 0 24 24",...h}=r,p=Ve.isValidElement(o)&&o.type==="svg",m={...r,color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:l,viewBox:f,hasSvgAsChild:p},v={};l||(v.viewBox=f);const S=fm(m);return y.jsxs(hm,{as:a,className:gc(S.root,s),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...h,...p&&o.props,ownerState:m,children:[p?o.props.children:o,d?y.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(sr.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string});sr.muiName="SvgIcon";function st(e,t){function n(r,o){return y.jsx(sr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=sr.muiName,Ve.memo(Ve.forwardRef(n))}const mm=st(y.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),pm=st(y.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),gm=st(y.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"),ym=(e,t)=>()=>{if(!t)return;const n={};e.forEach(r=>{r.items.forEach(o=>{o.value!==void 0&&o.value!==null&&o.value!==""&&(n[o.id]=o.value)})}),console.log("Filtros ativos:",n),t(n)},vm=(e,t,n)=>()=>{const r=e.map(o=>({...o,items:o.items.map(s=>({...s,value:void 0}))}));n&&n(r),t&&t()},bm=(e,t,n)=>()=>{const r=t.map(o=>o.id===e?{...o,expanded:!o.expanded}:o);n(r)},xm=(e,t,n,r)=>o=>{const s=n.map(i=>i.id===e?{...i,items:i.items.map(a=>a.id===t?{...a,value:o}:a)}:i);r(s)},Sm="_modal_1v49l_1",Tm="_content_1v49l_60",Cm="_contentWrapper_1v49l_67",wm="_closeButton_1v49l_74",_m="_header_1v49l_86",Em="_title_1v49l_93",Am="_description_1v49l_102",Mm="_filtersContent_1v49l_111",Pm="_filterGroup_1v49l_121",km="_expandableHeader_1v49l_128",Im="_expandableLabel_1v49l_138",Rm="_chevronIcon_1v49l_146",Om="_chevron_1v49l_146",Lm="_filterItems_1v49l_159",Dm="_filterItem_1v49l_159",jm="_filterItemSize1_1v49l_171",Bm="_filterItemSize2_1v49l_175",$m="_filterItemSize3_1v49l_179",Nm="_filterItemSize4_1v49l_183",Vm="_filterItemSize5_1v49l_187",Fm="_filterItemSize6_1v49l_191",zm="_filterInput_1v49l_195",Wm="_inputLabel_1v49l_199",Um="_select_1v49l_203",Hm="_placeholder_1v49l_220",Gm="_helperText_1v49l_224",Km="_footer_1v49l_231",Ym="_clearButton_1v49l_238",Zm="_applyButton_1v49l_260",ce={modal:Sm,content:Tm,contentWrapper:Cm,closeButton:wm,header:_m,title:Em,description:Am,filtersContent:Mm,filterGroup:Pm,expandableHeader:km,expandableLabel:Im,chevronIcon:Rm,chevron:Om,filterItems:Lm,filterItem:Dm,filterItemSize1:jm,filterItemSize2:Bm,filterItemSize3:$m,filterItemSize4:Nm,filterItemSize5:Vm,filterItemSize6:Fm,filterInput:zm,inputLabel:Wm,select:Um,"Mui-focused":"_Mui-focused_1v49l_212",placeholder:Hm,helperText:Gm,footer:Km,clearButton:Ym,applyButton:Zm},Rc=({open:e,onClose:t,title:n="Filtros",description:r="Use os filtros abaixo para encontrar câmeras e pontos de interesse.",groups:o,onApply:s,onClear:i,clearButtonText:a="Limpar filtros",applyButtonText:c="Filtrar",className:u,...l})=>{const f=A.useTheme().palette.mode==="dark",[h,p]=x.useState(o);x.useEffect(()=>{p(o)},[o]);const m=ym(h,s),v=vm(h,i,p),S=(T,b)=>{var P;const w=xm(b,T.id,h,p),C=T.size||6,E=ce[`filterItemSize${C}`];if(T.render)return y.jsx(A.Box,{className:`${ce.filterItem} ${E}`,children:T.render(T,w)},T.id);switch(T.type){case"select":case"multi-select":const M=T.type==="multi-select";let I;M?T.value!==void 0&&T.value!==null?I=Array.isArray(T.value)?T.value:[T.value]:I=[]:I=T.value!==void 0&&T.value!==null?T.value:"";const V=M?Array.isArray(I)&&I.length>0:I!==""&&I!==null&&I!==void 0;return y.jsx(A.Box,{className:`${ce.filterItem} ${E}`,children:y.jsxs(A.FormControl,{fullWidth:!0,className:ce.filterInput,children:[y.jsx(A.InputLabel,{id:`${T.id}-label`,className:ce.inputLabel,shrink:V,children:T.label}),y.jsx(A.Select,{labelId:`${T.id}-label`,value:I,onChange:D=>w(D.target.value),multiple:M,label:T.label,className:ce.select,displayEmpty:!0,renderValue:D=>{var $;if(M){const R=Array.isArray(D)?D:[];return R.length===0?y.jsx(A.Box,{component:"span",style:{opacity:0},children:T.label}):R.map(K=>{var G,j;return((j=(G=T.options)==null?void 0:G.find(Q=>Q.value===K))==null?void 0:j.label)||K}).join(", ")}if(!D||D==="")return y.jsx(A.Box,{component:"span",style:{opacity:0},children:T.label});const g=($=T.options)==null?void 0:$.find(R=>R.value===D);return(g==null?void 0:g.label)||D},notched:V,children:(P=T.options)==null?void 0:P.map(D=>y.jsx(A.MenuItem,{value:D.value,children:D.label},D.value))}),T.helperText&&y.jsx(A.Box,{className:ce.helperText,children:T.helperText})]})},T.id);case"text":return y.jsx(A.Box,{className:`${ce.filterItem} ${E}`,children:y.jsx(A.TextField,{fullWidth:!0,label:T.label,placeholder:T.placeholder,value:T.value||"",onChange:D=>w(D.target.value),className:ce.filterInput,helperText:T.helperText,FormHelperTextProps:{className:ce.helperText}})},T.id);default:return null}};return y.jsx(A.Dialog,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,PaperProps:{className:`${ce.modal} ${u||""}`,"data-theme":f?"dark":"light"},...l,children:y.jsx(A.DialogContent,{className:ce.content,children:y.jsxs(A.Box,{className:ce.contentWrapper,children:[y.jsx(A.IconButton,{className:ce.closeButton,onClick:t,"aria-label":"Fechar",size:"small",children:y.jsx(gm,{})}),y.jsxs(A.Box,{className:ce.header,children:[y.jsx(A.Box,{className:ce.title,children:n}),y.jsx(A.Box,{className:ce.description,children:r})]}),y.jsx(A.Box,{className:ce.filtersContent,children:h.map(T=>{const b=bm(T.id,h,p),w=T.expanded!==!1;return y.jsxs(A.Box,{className:ce.filterGroup,children:[y.jsxs(A.Box,{className:ce.expandableHeader,onClick:b,children:[y.jsx(A.Box,{className:ce.expandableLabel,children:T.label}),y.jsx(A.Box,{className:ce.chevronIcon,children:w?y.jsx(pm,{className:ce.chevron}):y.jsx(mm,{className:ce.chevron})})]}),w&&y.jsx(A.Box,{className:ce.filterItems,children:T.items.map(C=>S(C,T.id))})]},T.id)})}),y.jsxs(A.Box,{className:ce.footer,children:[y.jsx(A.Button,{onClick:v,className:ce.clearButton,"data-theme":f?"dark":"light",children:a}),y.jsx(A.Button,{onClick:m,className:ce.applyButton,"data-theme":f?"dark":"light",children:c})]})]})})})};Rc.displayName="FilterModal";const qm="_container_1hyey_1",Xm="_card_1hyey_7",Jm="_icon_1hyey_18",Qm="_text_1hyey_32",$n={container:qm,card:Xm,icon:Jm,text:Qm},ep=({items:e,className:t,sx:n})=>{const r=A.useTheme(),o={backgroundColor:r.palette.background.paper,borderColor:r.palette.divider},s={color:r.palette.text.primary,"& svg":{fill:r.palette.text.primary}},i={color:r.palette.text.secondary,fontFamily:r.typography.fontFamily,fontSize:r.typography.body2.fontSize,fontWeight:r.typography.fontWeightMedium,lineHeight:r.typography.body2.lineHeight};return y.jsx(A.Box,{className:`${$n.container} ${t||""}`,sx:n,children:e.map((a,c)=>y.jsxs(A.Box,{className:$n.card,sx:o,children:[a.icon&&y.jsx(A.Box,{className:$n.icon,sx:s,children:a.icon}),y.jsxs(A.Typography,{component:"span",className:$n.text,sx:i,children:[a.count," ",a.label]})]},c))})},ps=x.createContext({});function gs(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Oc=typeof window<"u",Lc=Oc?x.useLayoutEffect:x.useEffect,Ir=x.createContext(null);function ys(e,t){e.indexOf(t)===-1&&e.push(t)}function vs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qe=(e,t,n)=>n>t?t:n<e?e:n;function Po(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yt=()=>{},rt=()=>{};var oc;typeof process<"u"&&((oc=process.env)==null?void 0:oc.NODE_ENV)!=="production"&&(Yt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Po(t,n))},rt=(e,t,n)=>{if(!e)throw new Error(Po(t,n))});const ot={},Dc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jc(e){return typeof e=="object"&&e!==null}const Bc=e=>/^0[^.\s]+$/u.test(e);function bs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ne=e=>e,tp=(e,t)=>n=>t(e(n)),Pn=(...e)=>e.reduce(tp),Tn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class xs{constructor(){this.subscriptions=[]}add(t){return ys(this.subscriptions,t),()=>vs(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ye=e=>e*1e3,$e=e=>e/1e3;function $c(e,t){return t?e*(1e3/t):0}const Oi=new Set;function Ss(e,t,n){e||Oi.has(t)||(console.warn(Po(t,n)),Oi.add(t))}const Nc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,np=1e-7,rp=12;function op(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Nc(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>np&&++a<rp);return i}function kn(e,t,n,r){if(e===t&&n===r)return Ne;const o=s=>op(s,0,1,e,n);return s=>s===0||s===1?s:Nc(o(s),t,r)}const Vc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fc=e=>t=>1-e(1-t),zc=kn(.33,1.53,.69,.99),Ts=Fc(zc),Wc=Vc(Ts),Uc=e=>(e*=2)<1?.5*Ts(e):.5*(2-Math.pow(2,-10*(e-1))),Cs=e=>1-Math.sin(Math.acos(e)),Hc=Fc(Cs),Gc=Vc(Cs),sp=kn(.42,0,1,1),ip=kn(0,0,.58,1),Kc=kn(.42,0,.58,1),ap=e=>Array.isArray(e)&&typeof e[0]!="number",Yc=e=>Array.isArray(e)&&typeof e[0]=="number",Li={linear:Ne,easeIn:sp,easeInOut:Kc,easeOut:ip,circIn:Cs,circInOut:Gc,circOut:Hc,backIn:Ts,backInOut:Wc,backOut:zc,anticipate:Uc},cp=e=>typeof e=="string",Di=e=>{if(Yc(e)){rt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return kn(t,n,r,o)}else if(cp(e))return rt(Li[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Li[e];return e},Nn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function lp(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(l){i.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,d=!1,f=!1)=>{const p=f&&o?n:r;return d&&i.add(l),p.has(l)||p.add(l),l},cancel:l=>{r.delete(l),i.delete(l)},process:l=>{if(a=l,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,s&&(s=!1,u.process(l))}};return u}const up=40;function Zc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Nn.reduce((b,w)=>(b[w]=lp(s),b),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:d,preRender:f,render:h,postRender:p}=i,m=()=>{const b=ot.useManualTiming?o.timestamp:performance.now();n=!1,ot.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,up),1)),o.timestamp=b,o.isProcessing=!0,a.process(o),c.process(o),u.process(o),l.process(o),d.process(o),f.process(o),h.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},v=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:Nn.reduce((b,w)=>{const C=i[w];return b[w]=(E,P=!1,M=!1)=>(n||v(),C.schedule(E,P,M)),b},{}),cancel:b=>{for(let w=0;w<Nn.length;w++)i[Nn[w]].cancel(b)},state:o,steps:i}}const{schedule:le,cancel:pt,state:Me,steps:qr}=Zc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ne,!0);let qn;function dp(){qn=void 0}const Ie={now:()=>(qn===void 0&&Ie.set(Me.isProcessing||ot.useManualTiming?Me.timestamp:performance.now()),qn),set:e=>{qn=e,queueMicrotask(dp)}},qc=e=>t=>typeof t=="string"&&t.startsWith(e),Xc=qc("--"),fp=qc("var(--"),ws=e=>fp(e)?hp.test(e.split("/*")[0].trim()):!1,hp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ji(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Zt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cn={...Zt,transform:e=>qe(0,1,e)},Vn={...Zt,default:1},vn=e=>Math.round(e*1e5)/1e5,_s=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mp(e){return e==null}const pp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Es=(e,t)=>n=>!!(typeof n=="string"&&pp.test(n)&&n.startsWith(e)||t&&!mp(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jc=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(_s);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},gp=e=>qe(0,255,e),Xr={...Zt,transform:e=>Math.round(gp(e))},At={test:Es("rgb","red"),parse:Jc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xr.transform(e)+", "+Xr.transform(t)+", "+Xr.transform(n)+", "+vn(Cn.transform(r))+")"};function yp(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ko={test:Es("#"),parse:yp,transform:At.transform},In=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),at=In("deg"),Ze=In("%"),H=In("px"),vp=In("vh"),bp=In("vw"),Bi={...Ze,parse:e=>Ze.parse(e)/100,transform:e=>Ze.transform(e*100)},Bt={test:Es("hsl","hue"),parse:Jc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ze.transform(vn(t))+", "+Ze.transform(vn(n))+", "+vn(Cn.transform(r))+")"},Se={test:e=>At.test(e)||ko.test(e)||Bt.test(e),parse:e=>At.test(e)?At.parse(e):Bt.test(e)?Bt.parse(e):ko.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?At.transform(e):Bt.transform(e),getAnimatableNone:e=>{const t=Se.parse(e);return t.alpha=0,Se.transform(t)}},xp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(_s))==null?void 0:t.length)||0)+(((n=e.match(xp))==null?void 0:n.length)||0)>0}const Qc="number",el="color",Tp="var",Cp="var(",$i="${}",wp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(wp,c=>(Se.test(c)?(r.color.push(s),o.push(el),n.push(Se.parse(c))):c.startsWith(Cp)?(r.var.push(s),o.push(Tp),n.push(c)):(r.number.push(s),o.push(Qc),n.push(parseFloat(c))),++s,$i)).split($i);return{values:n,split:a,indexes:r,types:o}}function tl(e){return wn(e).values}function nl(e){const{split:t,types:n}=wn(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Qc?s+=vn(o[i]):a===el?s+=Se.transform(o[i]):s+=o[i]}return s}}const _p=e=>typeof e=="number"?0:Se.test(e)?Se.getAnimatableNone(e):e;function Ep(e){const t=tl(e);return nl(e)(t.map(_p))}const gt={test:Sp,parse:tl,createTransformer:nl,getAnimatableNone:Ep};function Jr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ap({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=Jr(c,a,e+1/3),s=Jr(c,a,e),i=Jr(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function ir(e,t){return n=>n>0?t:e}const he=(e,t,n)=>e+(t-e)*n,Qr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Mp=[ko,At,Bt],Pp=e=>Mp.find(t=>t.test(e));function Ni(e){const t=Pp(e);if(Yt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Bt&&(n=Ap(n)),n}const Vi=(e,t)=>{const n=Ni(e),r=Ni(t);if(!n||!r)return ir(e,t);const o={...n};return s=>(o.red=Qr(n.red,r.red,s),o.green=Qr(n.green,r.green,s),o.blue=Qr(n.blue,r.blue,s),o.alpha=he(n.alpha,r.alpha,s),At.transform(o))},Io=new Set(["none","hidden"]);function kp(e,t){return Io.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ip(e,t){return n=>he(e,t,n)}function As(e){return typeof e=="number"?Ip:typeof e=="string"?ws(e)?ir:Se.test(e)?Vi:Lp:Array.isArray(e)?rl:typeof e=="object"?Se.test(e)?Vi:Rp:ir}function rl(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>As(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function Rp(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=As(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Op(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],a=e.values[i]??0;n[o]=a,r[s]++}return n}const Lp=(e,t)=>{const n=gt.createTransformer(t),r=wn(e),o=wn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Io.has(e)&&!o.values.length||Io.has(t)&&!r.values.length?kp(e,t):Pn(rl(Op(r,o),o.values),n):(Yt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ir(e,t))};function ol(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?he(e,t,n):As(e)(e,t)}const Dp=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>le.update(t,n),stop:()=>pt(t),now:()=>Me.isProcessing?Me.timestamp:Ie.now()}},sl=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ar=2e4;function Ms(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ar;)t+=n,r=e.next(t);return t>=ar?1/0:t}function jp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Ms(r),ar);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:$e(o)}}const Bp=5;function il(e,t,n){const r=Math.max(t-Bp,0);return $c(n-e(r),t-r)}const fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},eo=.001;function $p({duration:e=fe.duration,bounce:t=fe.bounce,velocity:n=fe.velocity,mass:r=fe.mass}){let o,s;Yt(e<=Ye(fe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=qe(fe.minDamping,fe.maxDamping,i),e=qe(fe.minDuration,fe.maxDuration,$e(e)),i<1?(o=u=>{const l=u*i,d=l*e,f=l-n,h=Ro(u,i),p=Math.exp(-d);return eo-f/h*p},s=u=>{const d=u*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(u,2)*e,p=Math.exp(-d),m=Ro(Math.pow(u,2),i);return(-o(u)+eo>0?-1:1)*((f-h)*p)/m}):(o=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-eo+l*d},s=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=Vp(o,s,a);if(e=Ye(e),isNaN(c))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const Np=12;function Vp(e,t,n){let r=n;for(let o=1;o<Np;o++)r=r-e(r)/t(r);return r}function Ro(e,t){return e*Math.sqrt(1-t*t)}const Fp=["duration","bounce"],zp=["stiffness","damping","mass"];function Fi(e,t){return t.some(n=>e[n]!==void 0)}function Wp(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!Fi(e,zp)&&Fi(e,Fp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*qe(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fe.mass,stiffness:o,damping:s}}else{const n=$p(e);t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function cr(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:c,damping:u,mass:l,duration:d,velocity:f,isResolvedFromDuration:h}=Wp({...n,velocity:-$e(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(c*l)),v=i-s,S=$e(Math.sqrt(c/l)),T=Math.abs(v)<5;r||(r=T?fe.restSpeed.granular:fe.restSpeed.default),o||(o=T?fe.restDelta.granular:fe.restDelta.default);let b;if(m<1){const C=Ro(S,m);b=E=>{const P=Math.exp(-m*S*E);return i-P*((p+m*S*v)/C*Math.sin(C*E)+v*Math.cos(C*E))}}else if(m===1)b=C=>i-Math.exp(-S*C)*(v+(p+S*v)*C);else{const C=S*Math.sqrt(m*m-1);b=E=>{const P=Math.exp(-m*S*E),M=Math.min(C*E,300);return i-P*((p+m*S*v)*Math.sinh(M)+C*v*Math.cosh(M))/C}}const w={calculatedDuration:h&&d||null,next:C=>{const E=b(C);if(h)a.done=C>=d;else{let P=C===0?p:0;m<1&&(P=C===0?Ye(p):il(b,C,E));const M=Math.abs(P)<=r,I=Math.abs(i-E)<=o;a.done=M&&I}return a.value=a.done?i:E,a},toString:()=>{const C=Math.min(Ms(w),ar),E=sl(P=>w.next(C*P).value,C,30);return C+"ms "+E},toTransition:()=>{}};return w}cr.applyToOptions=e=>{const t=jp(e,100,cr);return e.ease=t.ease,e.duration=Ye(t.duration),e.type="keyframes",e};function Oo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=e[0],f={done:!1,value:d},h=M=>a!==void 0&&M<a||c!==void 0&&M>c,p=M=>a===void 0?c:c===void 0||Math.abs(a-M)<Math.abs(c-M)?a:c;let m=n*t;const v=d+m,S=i===void 0?v:i(v);S!==v&&(m=S-d);const T=M=>-m*Math.exp(-M/r),b=M=>S+T(M),w=M=>{const I=T(M),V=b(M);f.done=Math.abs(I)<=u,f.value=f.done?S:V};let C,E;const P=M=>{h(f.value)&&(C=M,E=cr({keyframes:[f.value,p(f.value)],velocity:il(b,M,f.value),damping:o,stiffness:s,restDelta:u,restSpeed:l}))};return P(0),{calculatedDuration:null,next:M=>{let I=!1;return!E&&C===void 0&&(I=!0,w(M),P(M)),C!==void 0&&M>=C?E.next(M-C):(!I&&w(M),f)}}}function Up(e,t,n){const r=[],o=n||ot.mix||ol,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||Ne:t;a=Pn(c,a)}r.push(a)}return r}function Hp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(rt(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Up(t,r,o),c=a.length,u=l=>{if(i&&l<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const f=Tn(e[d],e[d+1],l);return a[d](f)};return n?l=>u(qe(e[0],e[s-1],l)):u}function Gp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Tn(0,t,r);e.push(he(n,1,o))}}function Kp(e){const t=[0];return Gp(t,e.length-1),t}function Yp(e,t){return e.map(n=>n*t)}function Zp(e,t){return e.map(()=>t||Kc).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=ap(r)?r.map(Di):Di(r),s={done:!1,value:t[0]},i=Yp(n&&n.length===t.length?n:Kp(t),e),a=Hp(i,t,{ease:Array.isArray(o)?o:Zp(t,o)});return{calculatedDuration:e,next:c=>(s.value=a(c),s.done=c>=e,s)}}const qp=e=>e!==null;function Ps(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(qp),a=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const Xp={decay:Oo,inertia:Oo,tween:$t,keyframes:$t,spring:cr};function al(e){typeof e.type=="string"&&(e.type=Xp[e.type])}class ks{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Jp=e=>e/100;class Is extends ks{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Ie.now()&&this.tick(Ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;al(t);const{type:n=$t,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:a}=t;const c=n||$t;process.env.NODE_ENV!=="production"&&c!==$t&&rt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==$t&&typeof a[0]!="number"&&(this.mixKeyframes=Pn(Jp,ol(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Ms(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:l,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?S<0:S>o;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,w=r;if(d){const M=Math.min(this.currentTime,o)/a;let I=Math.floor(M),V=M%1;!V&&M>=1&&(V=1),V===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(V=1-V,h&&(V-=h/a)):f==="mirror"&&(w=i)),b=qe(0,1,V)*a}const C=T?{done:!1,value:l[0]}:w.next(b);s&&(C.value=s(C.value));let{done:E}=C;!T&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return P&&p!==Oo&&(C.value=Ps(l,this.options,v,this.speed)),m&&m(C.value),P&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return $e(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+$e(t)}get time(){return $e(this.currentTime)}set time(t){var n;t=Ye(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ie.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=$e(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=Dp,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Qp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Mt=e=>e*180/Math.PI,Lo=e=>{const t=Mt(Math.atan2(e[1],e[0]));return Do(t)},eg={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lo,rotateZ:Lo,skewX:e=>Mt(Math.atan(e[1])),skewY:e=>Mt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Do=e=>(e=e%360,e<0&&(e+=360),e),zi=Lo,Wi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ui=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),tg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wi,scaleY:Ui,scale:e=>(Wi(e)+Ui(e))/2,rotateX:e=>Do(Mt(Math.atan2(e[6],e[5]))),rotateY:e=>Do(Mt(Math.atan2(-e[2],e[0]))),rotateZ:zi,rotate:zi,skewX:e=>Mt(Math.atan(e[4])),skewY:e=>Mt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function jo(e){return e.includes("scale")?1:0}function Bo(e,t){if(!e||e==="none")return jo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=tg,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=eg,o=a}if(!o)return jo(t);const s=r[t],i=o[1].split(",").map(rg);return typeof s=="function"?s(i):i[s]}const ng=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bo(n,t)};function rg(e){return parseFloat(e.trim())}const qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xt=new Set(qt),Hi=e=>e===Zt||e===H,og=new Set(["x","y","z"]),sg=qt.filter(e=>!og.has(e));function ig(e){const t=[];return sg.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const dt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Bo(t,"x"),y:(e,{transform:t})=>Bo(t,"y")};dt.translateX=dt.x;dt.translateY=dt.y;const kt=new Set;let $o=!1,No=!1,Vo=!1;function cl(){if(No){const e=Array.from(kt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=ig(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}No=!1,$o=!1,kt.forEach(e=>e.complete(Vo)),kt.clear()}function ll(){kt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(No=!0)})}function ag(){Vo=!0,ll(),cl(),Vo=!1}class Rs{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(kt.add(this),$o||($o=!0,le.read(ll),le.resolveKeyframes(cl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}Qp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),kt.delete(this)}cancel(){this.state==="scheduled"&&(kt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const cg=e=>e.startsWith("--");function lg(e,t,n){cg(t)?e.style.setProperty(t,n):e.style[t]=n}const ug=bs(()=>window.ScrollTimeline!==void 0),dg={};function fg(e,t){const n=bs(e);return()=>dg[t]??n()}const ul=fg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mn([0,.65,.55,1]),circOut:mn([.55,0,1,.45]),backIn:mn([.31,.01,.66,-.59]),backOut:mn([.33,1.53,.69,.99])};function dl(e,t){if(e)return typeof e=="function"?ul()?sl(e,t):"ease-out":Yc(e)?mn(e):Array.isArray(e)?e.map(n=>dl(n,t)||Gi.easeOut):Gi[e]}function hg(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[t]:n};c&&(l.offset=c);const d=dl(a,o);Array.isArray(d)&&(l.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(l,f)}function fl(e){return typeof e=="function"&&"applyToOptions"in e}function mg({type:e,...t}){return fl(e)&&ul()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class pg extends ks{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,rt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=mg(t);this.animation=hg(n,r,o,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const l=Ps(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):lg(n,r,l),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return $e(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+$e(t)}get time(){return $e(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ye(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ug()?(this.animation.timeline=t,Ne):n(this)}}const hl={anticipate:Uc,backInOut:Wc,circInOut:Gc};function gg(e){return e in hl}function yg(e){typeof e.ease=="string"&&gg(e.ease)&&(e.ease=hl[e.ease])}const to=10;class vg extends pg{constructor(t){yg(t),al(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Is({...i,autoplay:!1}),c=Math.max(to,Ie.now()-this.startTime),u=qe(0,to,c-to);n.setWithVelocity(a.sample(Math.max(0,c-u)).value,a.sample(c).value,u),a.stop()}}const Ki=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(gt.test(e)||e==="0")&&!e.startsWith("url("));function bg(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function xg(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Ki(o,t),a=Ki(s,t);return Yt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". "${i?s:o}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:bg(e)||(n==="spring"||fl(n))&&r}function Fo(e){e.duration=0,e.type="keyframes"}const Sg=new Set(["opacity","clipPath","filter","transform"]),Tg=bs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cg(e){var l;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!(((l=t==null?void 0:t.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Tg()&&n&&Sg.has(n)&&(n!=="transform"||!u)&&!c&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const wg=40;class _g extends ks{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:a,name:c,motionValue:u,element:l,...d}){var p;super(),this.stop=()=>{var m,v;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ie.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:c,motionValue:u,element:l,...d},h=(l==null?void 0:l.KeyframeResolver)||Rs;this.keyframeResolver=new h(a,(m,v,S)=>this.onKeyframesResolved(m,v,f,!S),c,u,l),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,S;this.keyframeResolver=void 0;const{name:s,type:i,velocity:a,delay:c,isHandoff:u,onUpdate:l}=r;this.resolvedAt=Ie.now(),xg(t,s,i,a)||((ot.instantAnimations||!c)&&(l==null||l(Ps(t,r,n))),t[0]=t[t.length-1],Fo(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>wg?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&Cg(f),p=(S=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:S.current,m=h?new vg({...f,element:p}):new Is(f);m.finished.then(()=>{this.notifyFinished()}).catch(Ne),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),ag()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function ml(e,t,n,r=0,o=1){const s=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(s,i):o===1?s*r:a-s*r}const Eg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ag(e){const t=Eg.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Mg=4;function pl(e,t,n=1){rt(n<=Mg,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=Ag(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Dc(i)?parseFloat(i):i}return ws(o)?pl(o,t,n+1):o}const Pg={type:"spring",stiffness:500,damping:25,restSpeed:10},kg=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ig={type:"keyframes",duration:.8},Rg={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Og=(e,{keyframes:t})=>t.length>2?Ig:Xt.has(e)?e.startsWith("scale")?kg(t[1]):Pg:Rg,Lg=e=>e!==null;function Dg(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Lg),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function Os(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function jg({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}const Ls=(e,t,n,r={},o,s)=>i=>{const a=Os(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ye(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};jg(a)||Object.assign(l,Og(e,l)),l.duration&&(l.duration=Ye(l.duration)),l.repeatDelay&&(l.repeatDelay=Ye(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let d=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Fo(l),l.delay===0&&(d=!0)),(ot.instantAnimations||ot.skipAnimations)&&(d=!0,Fo(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=Dg(l.keyframes,a);if(f!==void 0){le.update(()=>{l.onUpdate(f),l.onComplete()});return}}return a.isSync?new Is(l):new _g(l)};function Yi(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ds(e,t,n,r){if(typeof t=="function"){const[o,s]=Yi(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Yi(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Ut(e,t,n){const r=e.getProps();return Ds(r,t,n!==void 0?n:r.custom,e)}const gl=new Set(["width","height","top","left","right","bottom",...qt]),Zi=30,Bg=e=>!isNaN(parseFloat(e));class $g{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=Ie.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ie.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Bg(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ss(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xs);const r=this.events[t].add(n);return t==="change"?()=>{r(),le.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zi);return $c(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gt(e,t){return new $g(e,t)}const zo=e=>Array.isArray(e);function Ng(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gt(n))}function Vg(e){return zo(e)?e[e.length-1]||0:e}function Fg(e,t){const n=Ut(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=Vg(s[i]);Ng(e,i,a)}}const Pe=e=>!!(e&&e.getVelocity);function zg(e){return!!(Pe(e)&&e.add)}function Wo(e,t){const n=e.getValue("willChange");if(zg(n))return n.add(t);if(!n&&ot.WillChange){const r=new ot.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function js(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Wg="framerAppearId",yl="data-"+js(Wg);function vl(e){return e.props[yl]}function Ug({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...a}=t;const c=s==null?void 0:s.reduceMotion;r&&(s=r);const u=[],l=o&&e.animationState&&e.animationState.getState()[o];for(const d in a){const f=e.getValue(d,e.latestValues[d]??null),h=a[d];if(h===void 0||l&&Ug(l,d))continue;const p={delay:n,...Os(s||{},d)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===m&&!p.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const b=vl(e);if(b){const w=window.MotionHandoffAnimation(b,d,le);w!==null&&(p.startTime=w,v=!0)}}Wo(e,d);const S=c??e.shouldReduceMotion;f.start(Ls(d,f,h,S&&gl.has(d)?{type:!1}:p,e,v));const T=f.animation;T&&u.push(T)}return i&&Promise.all(u).then(()=>{le.update(()=>{i&&Fg(e,i)})}),u}function Uo(e,t,n={}){var c;const r=Ut(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(bl(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=o;return Hg(e,t,u,l,d,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[u,l]=a==="beforeChildren"?[s,i]:[i,s];return u().then(()=>l())}else return Promise.all([s(),i(n.delay)])}function Hg(e,t,n=0,r=0,o=0,s=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Uo(c,t,{...i,delay:n+(typeof r=="function"?0:r)+ml(e.variantChildren,c,r,o,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Gg(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Uo(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Uo(e,t,n);else{const o=typeof t=="function"?Ut(e,t,n.custom):t;r=Promise.all(bl(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Kg={test:e=>e==="auto",parse:e=>e},xl=e=>t=>t.test(e),Sl=[Zt,H,Ze,at,bp,vp,Kg],qi=e=>Sl.find(xl(e));function Yg(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Bc(e):!0}const Zg=new Set(["brightness","contrast","saturate","opacity"]);function qg(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_s)||[];if(!r)return e;const o=n.replace(r,"");let s=Zg.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Xg=/\b([a-z-]*)\(.*?\)/gu,Ho={...gt,getAnimatableNone:e=>{const t=e.match(Xg);return t?t.map(qg).join(" "):e}},Xi={...Zt,transform:Math.round},Jg={rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:Vn,scaleX:Vn,scaleY:Vn,scaleZ:Vn,skew:at,skewX:at,skewY:at,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:Cn,originX:Bi,originY:Bi,originZ:H},Bs={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,inset:H,insetBlock:H,insetBlockStart:H,insetBlockEnd:H,insetInline:H,insetInlineStart:H,insetInlineEnd:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,paddingBlock:H,paddingBlockStart:H,paddingBlockEnd:H,paddingInline:H,paddingInlineStart:H,paddingInlineEnd:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,marginBlock:H,marginBlockStart:H,marginBlockEnd:H,marginInline:H,marginInlineStart:H,marginInlineEnd:H,fontSize:H,backgroundPositionX:H,backgroundPositionY:H,...Jg,zIndex:Xi,fillOpacity:Cn,strokeOpacity:Cn,numOctaves:Xi},Qg={...Bs,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:Ho,WebkitFilter:Ho},Tl=e=>Qg[e];function Cl(e,t){let n=Tl(e);return n!==Ho&&(n=gt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const e0=new Set(["auto","none","0"]);function t0(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!e0.has(s)&&wn(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Cl(n,o)}class n0 extends Rs{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let d=t[l];if(typeof d=="string"&&(d=d.trim(),ws(d))){const f=pl(d,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!gl.has(r)||t.length!==2)return;const[o,s]=t,i=qi(o),a=qi(s),c=ji(o),u=ji(s);if(c!==u&&dt[r]){this.needsMeasurement=!0;return}if(i!==a)if(Hi(i)&&Hi(a))for(let l=0;l<t.length;l++){const d=t[l];typeof d=="string"&&(t[l]=parseFloat(d))}else dt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Yg(t[o]))&&r.push(o);r.length&&t0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=dt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function r0(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const wl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Go(e){return jc(e)&&"offsetHeight"in e}const{schedule:$s}=Zc(queueMicrotask,!1),We={x:!1,y:!1};function _l(){return We.x||We.y}function o0(e){return e==="x"||e==="y"?We[e]?null:(We[e]=!0,()=>{We[e]=!1}):We.x||We.y?null:(We.x=We.y=!0,()=>{We.x=We.y=!1})}function El(e,t){const n=r0(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Ji(e){return!(e.pointerType==="touch"||_l())}function s0(e,t,n={}){const[r,o,s]=El(e,n),i=a=>{if(!Ji(a))return;const{target:c}=a,u=t(c,a);if(typeof u!="function"||!c)return;const l=d=>{Ji(d)&&(u(d),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const Al=(e,t)=>t?e===t?!0:Al(e,t.parentElement):!1,Ns=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,i0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ml(e){return i0.has(e.tagName)||e.isContentEditable===!0}const Xn=new WeakSet;function Qi(e){return t=>{t.key==="Enter"&&e(t)}}function no(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const a0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qi(()=>{if(Xn.has(n))return;no(n,"down");const o=Qi(()=>{no(n,"up")}),s=()=>no(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ea(e){return Ns(e)&&!_l()}function c0(e,t,n={}){const[r,o,s]=El(e,n),i=a=>{const c=a.currentTarget;if(!ea(a))return;Xn.add(c);const u=t(c,a),l=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Xn.has(c)&&Xn.delete(c),ea(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{l(h,c===window||c===document||n.useGlobalTarget||Al(c,h.target))},f=h=>{l(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),Go(a)&&(a.addEventListener("focus",u=>a0(u,o)),!Ml(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Pl(e){return jc(e)&&"ownerSVGElement"in e}function l0(e){return Pl(e)&&e.tagName==="svg"}const u0=[...Sl,Se,gt],d0=e=>u0.find(xl(e)),ta=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nt=()=>({x:ta(),y:ta()}),na=()=>({min:0,max:0}),Ce=()=>({x:na(),y:na()}),Ko={current:null},kl={current:!1},f0=typeof window<"u";function h0(){if(kl.current=!0,!!f0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ko.current=e.matches;e.addEventListener("change",t),t()}else Ko.current=!1}const m0=new WeakMap;function Rr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _n(e){return typeof e=="string"||Array.isArray(e)}const Vs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fs=["initial",...Vs];function Or(e){return Rr(e.animate)||Fs.some(t=>_n(e[t]))}function Il(e){return!!(Or(e)||e.variants)}function p0(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Pe(o))e.addValue(r,o);else if(Pe(s))e.addValue(r,Gt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Gt(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ra=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let lr={};function Rl(e){lr=e}function g0(){return lr}class y0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Rs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ie.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,le.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Or(n),this.isVariantNode=Il(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];c[f]!==void 0&&Pe(h)&&h.set(c[f])}}mount(t){var n;this.current=t,m0.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(kl.current||h0(),this.shouldReduceMotion=Ko.current),process.env.NODE_ENV!=="production"&&Ss(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),pt(this.notifyUpdate),pt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Xt.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in lr){const n=lr[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ra.length;r++){const o=ra[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=p0(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Dc(r)||Bc(r))?r=parseFloat(r):!d0(r)&&gt.test(n)&&(r=Cl(t,n)),this.setBaseTarget(t,Pe(r)?r.get():r)),Pe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Ds(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Pe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){$s.render(this.render)}}class Ol extends y0{constructor(){super(...arguments),this.KeyframeResolver=n0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class vt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ll({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v0({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function b0(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ro(e){return e===void 0||e===1}function Yo({scale:e,scaleX:t,scaleY:n}){return!ro(e)||!ro(t)||!ro(n)}function _t(e){return Yo(e)||Dl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dl(e){return oa(e.x)||oa(e.y)}function oa(e){return e&&e!=="0%"}function ur(e,t,n){const r=e-n,o=t*r;return n+o}function sa(e,t,n,r,o){return o!==void 0&&(e=ur(e,o,r)),ur(e,n,r)+t}function Zo(e,t=0,n=1,r,o){e.min=sa(e.min,t,n,r,o),e.max=sa(e.max,t,n,r,o)}function jl(e,{x:t,y:n}){Zo(e.x,t.translate,t.scale,t.originPoint),Zo(e.y,n.translate,n.scale,n.originPoint)}const ia=.999999999999,aa=1.0000000000001;function x0(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ft(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,jl(e,i)),r&&_t(s.latestValues)&&Ft(e,s.latestValues))}t.x<aa&&t.x>ia&&(t.x=1),t.y<aa&&t.y>ia&&(t.y=1)}function Vt(e,t){e.min=e.min+t,e.max=e.max+t}function ca(e,t,n,r,o=.5){const s=he(e.min,e.max,o);Zo(e,t,n,s,r)}function Ft(e,t){ca(e.x,t.x,t.scaleX,t.scale,t.originX),ca(e.y,t.y,t.scaleY,t.scale,t.originY)}function Bl(e,t){return Ll(b0(e.getBoundingClientRect(),t))}function S0(e,t,n){const r=Bl(e,n),{scroll:o}=t;return o&&(Vt(r.x,o.offset.x),Vt(r.y,o.offset.y)),r}const T0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},C0=qt.length;function w0(e,t,n){let r="",o=!0;for(let s=0;s<C0;s++){const i=qt[s],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(i.startsWith("scale")?1:0);else{const u=parseFloat(a);c=i.startsWith("scale")?u===1:u===0}if(!c||n){const u=wl(a,Bs[i]);if(!c){o=!1;const l=T0[i]||i;r+=`${l}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function zs(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const c in t){const u=t[c];if(Xt.has(c)){i=!0;continue}else if(Xc(c)){o[c]=u;continue}else{const l=wl(u,Bs[c]);c.startsWith("origin")?(a=!0,s[c]=l):r[c]=l}}if(t.transform||(i||n?r.transform=w0(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=s;r.transformOrigin=`${c} ${u} ${l}`}}function $l(e,{style:t,vars:n},r,o){const s=e.style;let i;for(i in t)s[i]=t[i];o==null||o.applyProjectionStyles(s,r);for(i in n)s.setProperty(i,n[i])}function la(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const an={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(H.test(e))e=parseFloat(e);else return e;const n=la(e,t.target.x),r=la(e,t.target.y);return`${n}% ${r}%`}},_0={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=gt.parse(e);if(o.length>5)return r;const s=gt.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=c;const u=he(a,c,.5);return typeof o[2+i]=="number"&&(o[2+i]/=u),typeof o[3+i]=="number"&&(o[3+i]/=u),s(o)}},qo={borderRadius:{...an,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:an,borderTopRightRadius:an,borderBottomLeftRadius:an,borderBottomRightRadius:an,boxShadow:_0};function Nl(e,{layout:t,layoutId:n}){return Xt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qo[e]||e==="opacity")}function Ws(e,t,n){var i;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const a in r)(Pe(r[a])||o&&Pe(o[a])||Nl(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function E0(e){return window.getComputedStyle(e)}class A0 extends Ol{constructor(){super(...arguments),this.type="html",this.renderInstance=$l}readValueFromInstance(t,n){var r;if(Xt.has(n))return(r=this.projection)!=null&&r.isProjecting?jo(n):ng(t,n);{const o=E0(t),s=(Xc(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Bl(t,n)}build(t,n,r){zs(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ws(t,n,r)}}const M0={offset:"stroke-dashoffset",array:"stroke-dasharray"},P0={offset:"strokeDashoffset",array:"strokeDasharray"};function k0(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?M0:P0;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const I0=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Vl(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...a},c,u,l){if(zs(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(l==null?void 0:l.transformBox)??"fill-box",delete d.transformBox);for(const h of I0)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&k0(d,o,s,i,!1)}const Fl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),zl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function R0(e,t,n,r){$l(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Fl.has(o)?o:js(o),t.attrs[o])}function Wl(e,t,n){const r=Ws(e,t,n);for(const o in e)if(Pe(e[o])||Pe(t[o])){const s=qt.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class O0 extends Ol{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xt.has(n)){const r=Tl(n);return r&&r.default||0}return n=Fl.has(n)?n:js(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Wl(t,n,r)}build(t,n,r){Vl(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){R0(t,n,r,o)}mount(t){this.isSVGTag=zl(t.tagName),super.mount(t)}}const L0=Fs.length;function Ul(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ul(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<L0;n++){const r=Fs[n],o=e.props[r];(_n(o)||o===!1)&&(t[r]=o)}return t}function Hl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const D0=[...Vs].reverse(),j0=Vs.length;function B0(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Gg(e,n,r)))}function $0(e){let t=B0(e),n=ua(),r=!0;const o=c=>(u,l)=>{var f;const d=Ut(e,l,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(c){t=c(e)}function i(c){const{props:u}=e,l=Ul(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<j0;v++){const S=D0[v],T=n[S],b=u[S]!==void 0?u[S]:l[S],w=_n(b),C=S===c?T.isActive:null;C===!1&&(p=v);let E=b===l[S]&&b!==u[S]&&w;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),T.protectedKeys={...h},!T.isActive&&C===null||!b&&!T.prevProp||Rr(b)||typeof b=="boolean")continue;const P=N0(T.prevProp,b);let M=P||S===c&&T.isActive&&!E&&w||v>p&&w,I=!1;const V=Array.isArray(b)?b:[b];let D=V.reduce(o(S),{});C===!1&&(D={});const{prevResolvedValues:g={}}=T,$={...g,...D},R=G=>{M=!0,f.has(G)&&(I=!0,f.delete(G)),T.needsAnimating[G]=!0;const j=e.getValue(G);j&&(j.liveStyle=!1)};for(const G in $){const j=D[G],Q=g[G];if(h.hasOwnProperty(G))continue;let L=!1;zo(j)&&zo(Q)?L=!Hl(j,Q):L=j!==Q,L?j!=null?R(G):f.add(G):j!==void 0&&f.has(G)?R(G):T.protectedKeys[G]=!0}T.prevProp=b,T.prevResolvedValues=D,T.isActive&&(h={...h,...D}),r&&e.blockInitialAnimation&&(M=!1);const W=E&&P;M&&(!W||I)&&d.push(...V.map(G=>{const j={type:S};if(typeof G=="string"&&r&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:Q}=e,L=Ut(Q,G);if(Q.enteringChildren&&L){const{delayChildren:_}=L.transition||{};j.delay=ml(Q.enteringChildren,e,_)}}return{animation:G,options:j}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const S=Ut(e,Array.isArray(u.initial)?u.initial[0]:u.initial);S&&S.transition&&(v.transition=S.transition)}f.forEach(S=>{const T=e.getBaseTarget(S),b=e.getValue(S);b&&(b.liveStyle=!0),v[S]=T??null}),d.push({animation:v})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const l=i(c);for(const f in n)n[f].protectedKeys={};return l}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ua()}}}function N0(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hl(t,e):!1}function xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ua(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}function da(e,t){e.min=t.min,e.max=t.max}function ze(e,t){da(e.x,t.x),da(e.y,t.y)}function fa(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Gl=1e-4,V0=1-Gl,F0=1+Gl,Kl=.01,z0=0-Kl,W0=0+Kl;function Re(e){return e.max-e.min}function U0(e,t,n){return Math.abs(e-t)<=n}function ha(e,t,n,r=.5){e.origin=r,e.originPoint=he(t.min,t.max,e.origin),e.scale=Re(n)/Re(t),e.translate=he(n.min,n.max,e.origin)-e.originPoint,(e.scale>=V0&&e.scale<=F0||isNaN(e.scale))&&(e.scale=1),(e.translate>=z0&&e.translate<=W0||isNaN(e.translate))&&(e.translate=0)}function bn(e,t,n,r){ha(e.x,t.x,n.x,r?r.originX:void 0),ha(e.y,t.y,n.y,r?r.originY:void 0)}function ma(e,t,n){e.min=n.min+t.min,e.max=e.min+Re(t)}function H0(e,t,n){ma(e.x,t.x,n.x),ma(e.y,t.y,n.y)}function pa(e,t,n){e.min=t.min-n.min,e.max=e.min+Re(t)}function dr(e,t,n){pa(e.x,t.x,n.x),pa(e.y,t.y,n.y)}function ga(e,t,n,r,o){return e-=t,e=ur(e,1/n,r),o!==void 0&&(e=ur(e,1/o,r)),e}function G0(e,t=0,n=1,r=.5,o,s=e,i=e){if(Ze.test(t)&&(t=parseFloat(t),t=he(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=he(s.min,s.max,r);e===s&&(a-=t),e.min=ga(e.min,t,n,a,o),e.max=ga(e.max,t,n,a,o)}function ya(e,t,[n,r,o],s,i){G0(e,t[n],t[r],t[o],t.scale,s,i)}const K0=["x","scaleX","originX"],Y0=["y","scaleY","originY"];function va(e,t,n,r){ya(e.x,t,K0,n?n.x:void 0,r?r.x:void 0),ya(e.y,t,Y0,n?n.y:void 0,r?r.y:void 0)}function ba(e){return e.translate===0&&e.scale===1}function Yl(e){return ba(e.x)&&ba(e.y)}function xa(e,t){return e.min===t.min&&e.max===t.max}function Z0(e,t){return xa(e.x,t.x)&&xa(e.y,t.y)}function Sa(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zl(e,t){return Sa(e.x,t.x)&&Sa(e.y,t.y)}function Ta(e){return Re(e.x)/Re(e.y)}function Ca(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function je(e){return[e("x"),e("y")]}function q0(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:l,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),l&&(r+=`rotate(${l}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const ql=["TopLeft","TopRight","BottomLeft","BottomRight"],X0=ql.length,wa=e=>typeof e=="string"?parseFloat(e):e,_a=e=>typeof e=="number"||H.test(e);function J0(e,t,n,r,o,s){o?(e.opacity=he(0,n.opacity??1,Q0(r)),e.opacityExit=he(t.opacity??1,0,ey(r))):s&&(e.opacity=he(t.opacity??1,n.opacity??1,r));for(let i=0;i<X0;i++){const a=`border${ql[i]}Radius`;let c=Ea(t,a),u=Ea(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||_a(c)===_a(u)?(e[a]=Math.max(he(wa(c),wa(u),r),0),(Ze.test(u)||Ze.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=he(t.rotate||0,n.rotate||0,r))}function Ea(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Q0=Xl(0,.5,Hc),ey=Xl(.5,.95,Ne);function Xl(e,t,n){return r=>r<e?0:r>t?1:n(Tn(e,t,r))}function ty(e,t,n){const r=Pe(e)?e:Gt(e);return r.start(Ls("",r,t,n)),r.animation}function En(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ny=(e,t)=>e.depth-t.depth;class ry{constructor(){this.children=[],this.isDirty=!1}add(t){ys(this.children,t),this.isDirty=!0}remove(t){vs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ny),this.isDirty=!1,this.children.forEach(t)}}function oy(e,t){const n=Ie.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(pt(r),e(s-t))};return le.setup(r,!0),()=>pt(r)}function Jn(e){return Pe(e)?e.get():e}class sy{constructor(){this.members=[]}add(t){ys(this.members,t),t.scheduleRender()}remove(t){if(vs(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,s=t.options.layoutDependency;o!==void 0&&s!==void 0&&o===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Qn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},oo=["","X","Y","Z"],iy=1e3;let ay=0;function so(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Jl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Jl(r)}function Ql({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=ay++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(uy),this.nodes.forEach(my),this.nodes.forEach(py),this.nodes.forEach(dy)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new ry)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new xs),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Pl(i)&&!l0(i),this.instance=i;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let l,d=0;const f=()=>this.root.updateBlockedByResize=!1;le.read(()=>{d=window.innerWidth}),e(i,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,l&&l(),l=oy(f,250),Qn.hasAnimatedSinceResize&&(Qn.hasAnimatedSinceResize=!1,this.nodes.forEach(Pa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||xy,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),S=!this.targetLayout||!Zl(this.targetLayout,h),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Os(p,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(l,T)}else d||Pa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),pt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gy),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Jl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const d=this.path[l];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Aa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ma);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hy),this.nodes.forEach(cy),this.nodes.forEach(ly)):this.nodes.forEach(Ma),this.clearAllSnapshots();const a=Ie.now();Me.delta=qe(0,1e3/60,a-Me.timestamp),Me.timestamp=a,Me.isProcessing=!0,qr.update.process(Me),qr.preRender.process(Me),qr.render.process(Me),Me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$s.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fy),this.sharedNodes.forEach(yy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Re(this.snapshot.measuredBox.x)&&!Re(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Yl(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;i&&this.instance&&(a||_t(this.latestValues)||l)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),Sy(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:i}=this.options;if(!i)return Ce();const a=i.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Ty))){const{scroll:l}=this.root;l&&(Vt(a.x,l.offset.x),Vt(a.y,l.offset.y))}return a}removeElementScroll(i){var c;const a=Ce();if(ze(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ze(a,i),Vt(a.x,d.offset.x),Vt(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const c=Ce();ze(c,i);for(let u=0;u<this.path.length;u++){const l=this.path[u];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Ft(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),_t(l.latestValues)&&Ft(c,l.latestValues)}return _t(this.latestValues)&&Ft(c,this.latestValues),c}removeTransform(i){const a=Ce();ze(a,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!_t(u.latestValues))continue;Yo(u.latestValues)&&u.updateSnapshot();const l=Ce(),d=u.measurePageBox();ze(l,d),va(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,l)}return _t(this.latestValues)&&va(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:d}=this.options;if(!this.layout||!(l||d))return;this.resolvedRelativeTargetAt=Me.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),H0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ze(this.target,this.layout.layoutBox),jl(this.target,this.targetDelta)):ze(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Yo(this.parent.latestValues)||Dl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),dr(this.relativeTargetOrigin,a,c),ze(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Me.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;ze(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;x0(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Ce());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fa(this.prevProjectionDelta.x,this.projectionDelta.x),fa(this.prevProjectionDelta.y,this.projectionDelta.y)),bn(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Ca(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ca(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Nt(),this.projectionDelta=Nt(),this.projectionDeltaWithTransform=Nt()}setAnimationOrigin(i,a=!1){const c=this.snapshot,u=c?c.latestValues:{},l={...this.latestValues},d=Nt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ce(),h=c?c.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),S=!v||v.members.length<=1,T=!!(m&&!S&&this.options.crossfade===!0&&!this.path.some(by));this.animationProgress=0;let b;this.mixTargetDelta=w=>{const C=w/1e3;ka(d.x,i.x,C),ka(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vy(this.relativeTarget,this.relativeTargetOrigin,f,C),b&&Z0(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Ce()),ze(b,this.relativeTarget)),m&&(this.animationValues=l,J0(l,u,this.latestValues,C,T,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{Qn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gt(0)),this.currentAnimation=ty(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),i.onUpdate&&i.onUpdate(l)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(iy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=i;if(!(!a||!c||!u)){if(this!==i&&this.layout&&u&&eu(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ce();const d=Re(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+d;const f=Re(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+f}ze(a,c),Ft(a,l),bn(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new sy),this.sharedNodes.get(i).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&so("z",i,u,this.animationValues);for(let l=0;l<oo.length;l++)so(`rotate${oo[l]}`,i,u,this.animationValues),so(`skew${oo[l]}`,i,u,this.animationValues);i.render();for(const l in u)i.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Jn(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Jn(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!_t(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=q0(this.projectionDeltaWithTransform,this.treeScale,l);c&&(d=c(l,d)),i.transform=d;const{x:f,y:h}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?i.opacity=u===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:i.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const p in qo){if(l[p]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:S}=qo[p],T=d==="none"?l[p]:m(l[p],u);if(v){const b=v.length;for(let w=0;w<b;w++)i[v[w]]=T}else S?this.options.visualElement.renderState.vars[p]=T:i[p]=T}this.options.layoutId&&(i.pointerEvents=u===this?Jn(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Aa),this.root.sharedNodes.clear()}}}function cy(e){e.updateLayout()}function ly(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?je(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Re(f);f.min=r[d].min,f.max=f.min+h}):eu(s,t.layoutBox,r)&&je(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Re(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Nt();bn(a,r,t.layoutBox);const c=Nt();i?bn(c,e.applyTransform(o,!0),t.measuredBox):bn(c,r,t.layoutBox);const u=!Yl(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=Ce();dr(p,t.layoutBox,f.layoutBox);const m=Ce();dr(m,r,h.layoutBox),Zl(p,m)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function uy(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function dy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function fy(e){e.clearSnapshot()}function Aa(e){e.clearMeasurements()}function Ma(e){e.isLayoutDirty=!1}function hy(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Pa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function my(e){e.resolveTargetDelta()}function py(e){e.calcProjection()}function gy(e){e.resetSkewAndRotation()}function yy(e){e.removeLeadSnapshot()}function ka(e,t,n){e.translate=he(t.translate,0,n),e.scale=he(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ia(e,t,n,r){e.min=he(t.min,n.min,r),e.max=he(t.max,n.max,r)}function vy(e,t,n,r){Ia(e.x,t.x,n.x,r),Ia(e.y,t.y,n.y,r)}function by(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xy={duration:.45,ease:[.4,0,.1,1]},Ra=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oa=Ra("applewebkit/")&&!Ra("chrome/")?Math.round:Ne;function La(e){e.min=Oa(e.min),e.max=Oa(e.max)}function Sy(e){La(e.x),La(e.y)}function eu(e,t,n){return e==="position"||e==="preserve-aspect"&&!U0(Ta(t),Ta(n),.2)}function Ty(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Cy=Ql({attachResizeListener:(e,t)=>En(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),io={current:void 0},tu=Ql({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!io.current){const e=new Cy({});e.mount(window),e.setOptions({layoutScroll:!0}),io.current=e}return io.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Us=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Da(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wy(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Da(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Da(e[o],null)}}}}function _y(...e){return Ve.useCallback(wy(...e),e)}class Ey extends Ve.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Go(r)&&r.offsetWidth||0,s=Go(r)&&r.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left,i.bottom=s-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ay({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){var d;const s=x.useId(),i=x.useRef(null),a=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=x.useContext(Us),u=((d=e.props)==null?void 0:d.ref)??(e==null?void 0:e.ref),l=_y(i,u);return x.useInsertionEffect(()=>{const{width:f,height:h,top:p,left:m,right:v,bottom:S}=a.current;if(t||!i.current||!f||!h)return;const T=n==="left"?`left: ${m}`:`right: ${v}`,b=r==="bottom"?`bottom: ${S}`:`top: ${p}`;i.current.dataset.motionPopId=s;const w=document.createElement("style");c&&(w.nonce=c);const C=o??document.head;return C.appendChild(w),w.sheet&&w.sheet.insertRule(`
93
+ export default theme;`}function Wi(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const lm=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function cm(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:$l(t,lm(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Wi(n)})`:$r(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Wi(n)})`:Br(t,n)}})}function Bo(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:l,colorSpace:u,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":pt(20));const d=Ts({...s,colorSpace:u}),f=Wl(e);let h=De(f,{mixins:Zh(f.breakpoints,r),palette:d,shadows:tm.slice(),typography:Xh(d,a),transitions:sm(i),zIndex:{...im}});if(h=De(h,c),h=t.reduce((p,m)=>De(p,m),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(v,S)=>{let _;for(_ in v){const b=v[_];if(p.includes(_)&&Object.keys(b).length>0){if(process.env.NODE_ENV!=="production"){const C=ws("",_);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${_}\` internal state.`,"You can not override it like this: ",JSON.stringify(v,null,2),"",`Instead, you need to use the '&.${C}' syntax:`,JSON.stringify({root:{[`&.${C}`]:b}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
94
+ `))}v[_]={}}}};Object.keys(h.components).forEach(v=>{const S=h.components[v].styleOverrides;S&&v.startsWith("Mui")&&m(S,v)})}return h.unstable_sxConfig={...jr,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(m){return Zt({sx:m,theme:this})},h.toRuntimeSource=Ul,cm(h),h}function um(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 dm=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=um(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Hl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Gl(e){return e==="dark"?dm:[]}function fm(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...s}=e,i=Ts({...t,colorSpace:o});return{palette:i,opacity:{...Hl(i.mode),...n},overlays:r||Gl(i.mode),...s}}function hm(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 mm=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],pm=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return mm(e.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:s?{[s.replace("%s",t)]:i,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function gm(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function k(e,t,n){!e[t]&&n&&(e[t]=n)}function vn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Bl(e)}function Qe(e,t){`${t}Channel`in e||(e[`${t}Channel`]=yn(vn(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().
95
+ 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 ym(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ke=e=>{try{return e()}catch{}},vm=(e="mui")=>ys.unstable_createGetCssVar(e);function no(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const s=o==="dark"?"dark":"light";if(!r){t[o]=fm({...n,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:i,...a}=Bo({...r,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:i,opacity:{...Hl(s),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||Gl(s)},a}function bm(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",nativeColor:i=!1,shouldSkipGeneratingVar:a=hm,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...c}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=vm(s),{[f]:p,light:m,dark:v,...S}=n,_={...S};let b=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(b=!0),!b)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pt(21,f));let C;i&&(C="oklch");const T=no(C,_,b,c,f);m&&!_.light&&no(C,_,m,void 0,"light"),v&&!_.dark&&no(C,_,v,void 0,"dark");let w={defaultColorScheme:f,...T,cssVarPrefix:s,colorSchemeSelector:l,rootSelector:u,getCssVar:h,colorSchemes:_,font:{...Gh(T.typography),...T.font},spacing:ym(c.spacing)};Object.keys(w.colorSchemes).forEach($=>{const y=w.colorSchemes[$].palette,R=F=>{const U=F.split("-"),G=U[1],D=U[2];return h(F,y[G][D])};y.mode==="light"&&(k(y.common,"background","#fff"),k(y.common,"onBackground","#000")),y.mode==="dark"&&(k(y.common,"background","#000"),k(y.common,"onBackground","#fff"));function O(F,U,G){if(C){let D;return F===St&&(D=`transparent ${((1-G)*100).toFixed(0)}%`),F===oe&&(D=`#000 ${(G*100).toFixed(0)}%`),F===se&&(D=`#fff ${(G*100).toFixed(0)}%`),`color-mix(in ${C}, ${U}, ${D})`}return F(U,G)}if(gm(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){k(y.Alert,"errorColor",O(oe,y.error.light,.6)),k(y.Alert,"infoColor",O(oe,y.info.light,.6)),k(y.Alert,"successColor",O(oe,y.success.light,.6)),k(y.Alert,"warningColor",O(oe,y.warning.light,.6)),k(y.Alert,"errorFilledBg",R("palette-error-main")),k(y.Alert,"infoFilledBg",R("palette-info-main")),k(y.Alert,"successFilledBg",R("palette-success-main")),k(y.Alert,"warningFilledBg",R("palette-warning-main")),k(y.Alert,"errorFilledColor",Ke(()=>y.getContrastText(y.error.main))),k(y.Alert,"infoFilledColor",Ke(()=>y.getContrastText(y.info.main))),k(y.Alert,"successFilledColor",Ke(()=>y.getContrastText(y.success.main))),k(y.Alert,"warningFilledColor",Ke(()=>y.getContrastText(y.warning.main))),k(y.Alert,"errorStandardBg",O(se,y.error.light,.9)),k(y.Alert,"infoStandardBg",O(se,y.info.light,.9)),k(y.Alert,"successStandardBg",O(se,y.success.light,.9)),k(y.Alert,"warningStandardBg",O(se,y.warning.light,.9)),k(y.Alert,"errorIconColor",R("palette-error-main")),k(y.Alert,"infoIconColor",R("palette-info-main")),k(y.Alert,"successIconColor",R("palette-success-main")),k(y.Alert,"warningIconColor",R("palette-warning-main")),k(y.AppBar,"defaultBg",R("palette-grey-100")),k(y.Avatar,"defaultBg",R("palette-grey-400")),k(y.Button,"inheritContainedBg",R("palette-grey-300")),k(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),k(y.Chip,"defaultBorder",R("palette-grey-400")),k(y.Chip,"defaultAvatarColor",R("palette-grey-700")),k(y.Chip,"defaultIconColor",R("palette-grey-700")),k(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),k(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),k(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),k(y.LinearProgress,"primaryBg",O(se,y.primary.main,.62)),k(y.LinearProgress,"secondaryBg",O(se,y.secondary.main,.62)),k(y.LinearProgress,"errorBg",O(se,y.error.main,.62)),k(y.LinearProgress,"infoBg",O(se,y.info.main,.62)),k(y.LinearProgress,"successBg",O(se,y.success.main,.62)),k(y.LinearProgress,"warningBg",O(se,y.warning.main,.62)),k(y.Skeleton,"bg",C?O(St,y.text.primary,.11):`rgba(${R("palette-text-primaryChannel")} / 0.11)`),k(y.Slider,"primaryTrack",O(se,y.primary.main,.62)),k(y.Slider,"secondaryTrack",O(se,y.secondary.main,.62)),k(y.Slider,"errorTrack",O(se,y.error.main,.62)),k(y.Slider,"infoTrack",O(se,y.info.main,.62)),k(y.Slider,"successTrack",O(se,y.success.main,.62)),k(y.Slider,"warningTrack",O(se,y.warning.main,.62));const F=C?O(oe,y.background.default,.6825):Wn(y.background.default,.8);k(y.SnackbarContent,"bg",F),k(y.SnackbarContent,"color",Ke(()=>C?jo.text.primary:y.getContrastText(F))),k(y.SpeedDialAction,"fabHoverBg",Wn(y.background.paper,.15)),k(y.StepConnector,"border",R("palette-grey-400")),k(y.StepContent,"border",R("palette-grey-400")),k(y.Switch,"defaultColor",R("palette-common-white")),k(y.Switch,"defaultDisabledColor",R("palette-grey-100")),k(y.Switch,"primaryDisabledColor",O(se,y.primary.main,.62)),k(y.Switch,"secondaryDisabledColor",O(se,y.secondary.main,.62)),k(y.Switch,"errorDisabledColor",O(se,y.error.main,.62)),k(y.Switch,"infoDisabledColor",O(se,y.info.main,.62)),k(y.Switch,"successDisabledColor",O(se,y.success.main,.62)),k(y.Switch,"warningDisabledColor",O(se,y.warning.main,.62)),k(y.TableCell,"border",O(se,O(St,y.divider,1),.88)),k(y.Tooltip,"bg",O(St,y.grey[700],.92))}if(y.mode==="dark"){k(y.Alert,"errorColor",O(se,y.error.light,.6)),k(y.Alert,"infoColor",O(se,y.info.light,.6)),k(y.Alert,"successColor",O(se,y.success.light,.6)),k(y.Alert,"warningColor",O(se,y.warning.light,.6)),k(y.Alert,"errorFilledBg",R("palette-error-dark")),k(y.Alert,"infoFilledBg",R("palette-info-dark")),k(y.Alert,"successFilledBg",R("palette-success-dark")),k(y.Alert,"warningFilledBg",R("palette-warning-dark")),k(y.Alert,"errorFilledColor",Ke(()=>y.getContrastText(y.error.dark))),k(y.Alert,"infoFilledColor",Ke(()=>y.getContrastText(y.info.dark))),k(y.Alert,"successFilledColor",Ke(()=>y.getContrastText(y.success.dark))),k(y.Alert,"warningFilledColor",Ke(()=>y.getContrastText(y.warning.dark))),k(y.Alert,"errorStandardBg",O(oe,y.error.light,.9)),k(y.Alert,"infoStandardBg",O(oe,y.info.light,.9)),k(y.Alert,"successStandardBg",O(oe,y.success.light,.9)),k(y.Alert,"warningStandardBg",O(oe,y.warning.light,.9)),k(y.Alert,"errorIconColor",R("palette-error-main")),k(y.Alert,"infoIconColor",R("palette-info-main")),k(y.Alert,"successIconColor",R("palette-success-main")),k(y.Alert,"warningIconColor",R("palette-warning-main")),k(y.AppBar,"defaultBg",R("palette-grey-900")),k(y.AppBar,"darkBg",R("palette-background-paper")),k(y.AppBar,"darkColor",R("palette-text-primary")),k(y.Avatar,"defaultBg",R("palette-grey-600")),k(y.Button,"inheritContainedBg",R("palette-grey-800")),k(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),k(y.Chip,"defaultBorder",R("palette-grey-700")),k(y.Chip,"defaultAvatarColor",R("palette-grey-300")),k(y.Chip,"defaultIconColor",R("palette-grey-300")),k(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),k(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),k(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),k(y.LinearProgress,"primaryBg",O(oe,y.primary.main,.5)),k(y.LinearProgress,"secondaryBg",O(oe,y.secondary.main,.5)),k(y.LinearProgress,"errorBg",O(oe,y.error.main,.5)),k(y.LinearProgress,"infoBg",O(oe,y.info.main,.5)),k(y.LinearProgress,"successBg",O(oe,y.success.main,.5)),k(y.LinearProgress,"warningBg",O(oe,y.warning.main,.5)),k(y.Skeleton,"bg",C?O(St,y.text.primary,.13):`rgba(${R("palette-text-primaryChannel")} / 0.13)`),k(y.Slider,"primaryTrack",O(oe,y.primary.main,.5)),k(y.Slider,"secondaryTrack",O(oe,y.secondary.main,.5)),k(y.Slider,"errorTrack",O(oe,y.error.main,.5)),k(y.Slider,"infoTrack",O(oe,y.info.main,.5)),k(y.Slider,"successTrack",O(oe,y.success.main,.5)),k(y.Slider,"warningTrack",O(oe,y.warning.main,.5));const F=C?O(se,y.background.default,.985):Wn(y.background.default,.98);k(y.SnackbarContent,"bg",F),k(y.SnackbarContent,"color",Ke(()=>C?Vl.text.primary:y.getContrastText(F))),k(y.SpeedDialAction,"fabHoverBg",Wn(y.background.paper,.15)),k(y.StepConnector,"border",R("palette-grey-600")),k(y.StepContent,"border",R("palette-grey-600")),k(y.Switch,"defaultColor",R("palette-grey-300")),k(y.Switch,"defaultDisabledColor",R("palette-grey-600")),k(y.Switch,"primaryDisabledColor",O(oe,y.primary.main,.55)),k(y.Switch,"secondaryDisabledColor",O(oe,y.secondary.main,.55)),k(y.Switch,"errorDisabledColor",O(oe,y.error.main,.55)),k(y.Switch,"infoDisabledColor",O(oe,y.info.main,.55)),k(y.Switch,"successDisabledColor",O(oe,y.success.main,.55)),k(y.Switch,"warningDisabledColor",O(oe,y.warning.main,.55)),k(y.TableCell,"border",O(oe,O(St,y.divider,1),.68)),k(y.Tooltip,"bg",O(St,y.grey[700],.92))}Qe(y.background,"default"),Qe(y.background,"paper"),Qe(y.common,"background"),Qe(y.common,"onBackground"),Qe(y,"divider"),Object.keys(y).forEach(F=>{const U=y[F];F!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&k(y[F],"mainChannel",yn(vn(U.main))),U.light&&k(y[F],"lightChannel",yn(vn(U.light))),U.dark&&k(y[F],"darkChannel",yn(vn(U.dark))),U.contrastText&&k(y[F],"contrastTextChannel",yn(vn(U.contrastText))),F==="text"&&(Qe(y[F],"primary"),Qe(y[F],"secondary")),F==="action"&&(U.active&&Qe(y[F],"active"),U.selected&&Qe(y[F],"selected")))})}),w=t.reduce(($,y)=>De($,y),w);const P={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:pm(w),enableContrastVars:i},{vars:M,generateThemeVars:I,generateStyleSheets:V}=Hh(w,P);return w.vars=M,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([$,y])=>{w[$]=y}),w.generateThemeVars=I,w.generateStyleSheets=V,w.generateSpacing=function(){return ys.createSpacing(c.spacing,xs(this))},w.getColorSchemeSelector=Kh(l),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...jr,...c==null?void 0:c.unstable_sxConfig},w.unstable_sx=function(y){return Zt({sx:y,theme:this})},w.toRuntimeSource=Ul,w}function Ui(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ts({...n===!0?{}:n.palette,mode:t})})}function xm(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...i}=e,a=s||"light",l=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Bo(e,...t);let c=n;"palette"in e||u[a]&&(u[a]!==!0?c=u[a].palette:a==="dark"&&(c={mode:"dark"}));const d=Bo({...e,palette:c},...t);return d.defaultColorScheme=a,d.colorSchemes=u,d.palette.mode==="light"&&(d.colorSchemes.light={...u.light!==!0&&u.light,palette:d.palette},Ui(d,"dark",u.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:d.palette},Ui(d,"light",u.light)),d}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),bm({...i,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const Sm=xm(),Cm="$$material";function Kl(e,t=""){return e.displayName||e.name||t}function Hi(e,t,n){const r=Kl(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Tm(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Kl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ur.ForwardRef:return Hi(e,e.render,"ForwardRef");case ur.Memo:return Hi(e,e.type,"memo");default:return}}}function wm(e){const{variants:t,...n}=e,r={variants:t,style:Rt(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Rt(o.style))}),r}const _m=Wl();function ro(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Pt(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Em(e){return e?(t,n)=>n[e]:null}function Am(e,t,n){e.theme=Im(e.theme)?n:e.theme[t]||e.theme}function nr(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>nr(e,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?Pt(r.style,n):r.style;else{const{variants:s,...i}=r;o=n?Pt(Rt(i),n):i}return Yl(e,r.variants,[o],n)}return r!=null&&r.isProcessed?n?Pt(Rt(r.style),n):r.style:n?Pt(Rt(r),n):r}function Yl(e,t,n=[],r=void 0){var s;let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(o))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((s=e.ownerState)==null?void 0:s[l])!==a.props[l])continue e;typeof a.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?Pt(Rt(a.style(o)),r):a.style(o))):n.push(r?Pt(Rt(a.style),r):a.style)}return n}function Mm(e={}){const{themeId:t,defaultTheme:n=_m,rootShouldForwardProp:r=ro,slotShouldForwardProp:o=ro}=e;function s(a){Am(a,t,n)}return(a,l={})=>{Lh(a,w=>w.filter(P=>P!==Zt));const{name:u,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=Em(Zl(c)),...p}=l,m=u&&u.startsWith("Mui")||c?"components":"custom",v=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,S=f||!1;let _=ro;c==="Root"||c==="root"?_=r:c?_=o:Rm(a)&&(_=void 0);const b=Oh(a,{shouldForwardProp:_,label:km(u,c),...p}),C=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(M){return nr(M,w,M.theme.modularCssLayers?m:void 0)};if(nt(w)){const P=wm(w);return function(I){return P.variants?nr(I,P,I.theme.modularCssLayers?m:void 0):I.theme.modularCssLayers?Pt(P.style,m):P.style}}return w},T=(...w)=>{const P=[],M=w.map(C),I=[];if(P.push(s),u&&h&&I.push(function(R){var G,D;const F=(D=(G=R.theme.components)==null?void 0:G[u])==null?void 0:D.styleOverrides;if(!F)return null;const U={};for(const Q in F)U[Q]=nr(R,F[Q],R.theme.modularCssLayers?"theme":void 0);return h(R,U)}),u&&!v&&I.push(function(R){var U,G;const O=R.theme,F=(G=(U=O==null?void 0:O.components)==null?void 0:U[u])==null?void 0:G.variants;return F?Yl(R,F,[],R.theme.modularCssLayers?"theme":void 0):null}),S||I.push(Zt),Array.isArray(M[0])){const y=M.shift(),R=new Array(P.length).fill(""),O=new Array(I.length).fill("");let F;F=[...R,...y,...O],F.raw=[...R,...y.raw,...O],P.unshift(F)}const V=[...P,...M,...I],$=b(...V);return a.muiName&&($.muiName=a.muiName),process.env.NODE_ENV!=="production"&&($.displayName=Pm(u,c,a)),$};return b.withConfig&&(T.withConfig=b.withConfig),T}}function Pm(e,t,n){return e?`${e}${Lt(t||"")}`:`Styled(${Tm(n)})`}function km(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Zl(t||"Root")}`),n}function Im(e){for(const t in e)return!1;return!0}function Rm(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Zl(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Om(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Lm=e=>Om(e)&&e!=="classes",jm=Mm({themeId:Cm,defaultTheme:Sm,rootShouldForwardProp:Lm}),Dm=ys.unstable_memoTheme;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function Bm(e){return Bh(e)}function $m(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=ws(e,o,n)}),r}function Nm(e){return ws("MuiSvgIcon",e)}$m("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Vm=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Lt(t)}`,`fontSize${Lt(n)}`]};return xf(o,Nm,r)},Fm=jm("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Lt(n.color)}`],t[`fontSize${Lt(n.fontSize)}`]]}})(Dm(({theme:e})=>{var t,n,r,o,s,i,a,l,u,c,d,f,h,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((c=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:c.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var v,S;return{props:{color:m},style:{color:(S=(v=(e.vars??e).palette)==null?void 0:v[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(p=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:p.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),hr=Fe.forwardRef(function(t,n){const r=Bm({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24",...h}=r,p=Fe.isValidElement(o)&&o.type==="svg",m={...r,color:i,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:p},v={};c||(v.viewBox=f);const S=Vm(m);return g.jsxs(Fm,{as:a,className:Ll(S.root,s),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...h,...p&&o.props,ownerState:m,children:[p?o.props.children:o,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(hr.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string});hr.muiName="SvgIcon";function Je(e,t){function n(r,o){return g.jsx(hr,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=hr.muiName,Fe.memo(Fe.forwardRef(n))}const zm=Je(g.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Wm=Je(g.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Um=Je(g.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"),Hm=(e,t)=>()=>{if(!t)return;const n={};e.forEach(r=>{r.items.forEach(o=>{o.value!==void 0&&o.value!==null&&o.value!==""&&(n[o.id]=o.value)})}),console.log("Filtros ativos:",n),t(n)},Gm=(e,t,n)=>()=>{const r=e.map(o=>({...o,items:o.items.map(s=>({...s,value:void 0}))}));n&&n(r),t&&t()},Km=(e,t,n)=>()=>{const r=t.map(o=>o.id===e?{...o,expanded:!o.expanded}:o);n(r)},Ym=(e,t,n,r)=>o=>{const s=n.map(i=>i.id===e?{...i,items:i.items.map(a=>a.id===t?{...a,value:o}:a)}:i);r(s)},Zm="_modal_1v49l_1",qm="_content_1v49l_60",Xm="_contentWrapper_1v49l_67",Jm="_closeButton_1v49l_74",Qm="_header_1v49l_86",ep="_title_1v49l_93",tp="_description_1v49l_102",np="_filtersContent_1v49l_111",rp="_filterGroup_1v49l_121",op="_expandableHeader_1v49l_128",sp="_expandableLabel_1v49l_138",ip="_chevronIcon_1v49l_146",ap="_chevron_1v49l_146",lp="_filterItems_1v49l_159",cp="_filterItem_1v49l_159",up="_filterItemSize1_1v49l_171",dp="_filterItemSize2_1v49l_175",fp="_filterItemSize3_1v49l_179",hp="_filterItemSize4_1v49l_183",mp="_filterItemSize5_1v49l_187",pp="_filterItemSize6_1v49l_191",gp="_filterInput_1v49l_195",yp="_inputLabel_1v49l_199",vp="_select_1v49l_203",bp="_placeholder_1v49l_220",xp="_helperText_1v49l_224",Sp="_footer_1v49l_231",Cp="_clearButton_1v49l_238",Tp="_applyButton_1v49l_260",le={modal:Zm,content:qm,contentWrapper:Xm,closeButton:Jm,header:Qm,title:ep,description:tp,filtersContent:np,filterGroup:rp,expandableHeader:op,expandableLabel:sp,chevronIcon:ip,chevron:ap,filterItems:lp,filterItem:cp,filterItemSize1:up,filterItemSize2:dp,filterItemSize3:fp,filterItemSize4:hp,filterItemSize5:mp,filterItemSize6:pp,filterInput:gp,inputLabel:yp,select:vp,"Mui-focused":"_Mui-focused_1v49l_212",placeholder:bp,helperText:xp,footer:Sp,clearButton:Cp,applyButton:Tp},ql=({open:e,onClose:t,title:n="Filtros",description:r="Use os filtros abaixo para encontrar câmeras e pontos de interesse.",children:o,formId:s,groups:i,onApply:a,onClear:l,onOpened:u,clearButtonText:c="Limpar filtros",applyButtonText:d="Filtrar",className:f,...h})=>{const m=E.useTheme().palette.mode==="dark",[v,S]=x.useState(i??[]),_=!!o;x.useEffect(()=>{S(i??[])},[i]);const b=Hm(v,a),C=Gm(v,l,S),T=(w,P)=>{var $;const M=Ym(P,w.id,v,S),I=w.size||6,V=le[`filterItemSize${I}`];if(w.render)return g.jsx(E.Box,{className:`${le.filterItem} ${V}`,children:w.render(w,M)},w.id);switch(w.type){case"select":case"multi-select":const y=w.type==="multi-select";let R;y?w.value!==void 0&&w.value!==null?R=Array.isArray(w.value)?w.value:[w.value]:R=[]:R=w.value!==void 0&&w.value!==null?w.value:"";const O=y?Array.isArray(R)&&R.length>0:R!==""&&R!==null&&R!==void 0;return g.jsx(E.Box,{className:`${le.filterItem} ${V}`,children:g.jsxs(E.FormControl,{fullWidth:!0,className:le.filterInput,children:[g.jsx(E.InputLabel,{id:`${w.id}-label`,className:le.inputLabel,shrink:O,children:w.label}),g.jsx(E.Select,{labelId:`${w.id}-label`,value:R,onChange:F=>M(F.target.value),multiple:y,label:w.label,className:le.select,displayEmpty:!0,renderValue:F=>{var G;if(y){const D=Array.isArray(F)?F:[];return D.length===0?g.jsx(E.Box,{component:"span",style:{opacity:0},children:w.label}):D.map(j=>{var A,N;return((N=(A=w.options)==null?void 0:A.find(L=>L.value===j))==null?void 0:N.label)||j}).join(", ")}if(!F||F==="")return g.jsx(E.Box,{component:"span",style:{opacity:0},children:w.label});const U=(G=w.options)==null?void 0:G.find(D=>D.value===F);return(U==null?void 0:U.label)||F},notched:O,children:($=w.options)==null?void 0:$.map(F=>g.jsx(E.MenuItem,{value:F.value,children:F.label},F.value))}),w.helperText&&g.jsx(E.Box,{className:le.helperText,children:w.helperText})]})},w.id);case"text":return g.jsx(E.Box,{className:`${le.filterItem} ${V}`,children:g.jsx(E.TextField,{fullWidth:!0,label:w.label,placeholder:w.placeholder,value:w.value||"",onChange:F=>M(F.target.value),className:le.filterInput,helperText:w.helperText,FormHelperTextProps:{className:le.helperText}})},w.id);default:return null}};return g.jsx(E.Dialog,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,TransitionProps:{onEntered:()=>u==null?void 0:u()},PaperProps:{className:`${le.modal} ${f||""}`,"data-theme":m?"dark":"light"},...h,children:g.jsx(E.DialogContent,{className:le.content,children:g.jsxs(E.Box,{className:le.contentWrapper,children:[g.jsx(E.IconButton,{className:le.closeButton,onClick:t,"aria-label":"Fechar",size:"small",children:g.jsx(Um,{})}),g.jsxs(E.Box,{className:le.header,children:[g.jsx(E.Box,{className:le.title,children:n}),g.jsx(E.Box,{className:le.description,children:r})]}),g.jsx(E.Box,{className:le.filtersContent,children:_?o:v.map(w=>{const P=Km(w.id,v,S),M=w.expanded!==!1;return g.jsxs(E.Box,{className:le.filterGroup,children:[g.jsxs(E.Box,{className:le.expandableHeader,onClick:P,children:[g.jsx(E.Box,{className:le.expandableLabel,children:w.label}),g.jsx(E.Box,{className:le.chevronIcon,children:M?g.jsx(Wm,{className:le.chevron}):g.jsx(zm,{className:le.chevron})})]}),M&&g.jsx(E.Box,{className:le.filterItems,children:w.items.map(I=>T(I,w.id))})]},w.id)})}),g.jsxs(E.Box,{className:le.footer,children:[g.jsx(E.Button,{onClick:C,className:le.clearButton,"data-theme":m?"dark":"light",children:c}),g.jsx(E.Button,{type:s?"submit":"button",form:s,onClick:s?void 0:b,className:le.applyButton,"data-theme":m?"dark":"light",children:d})]})]})})})};ql.displayName="FilterModal";const wp="_container_1hyey_1",_p="_card_1hyey_7",Ep="_icon_1hyey_18",Ap="_text_1hyey_32",Un={container:wp,card:_p,icon:Ep,text:Ap},Mp=({items:e,className:t,sx:n})=>{const r=E.useTheme(),o={backgroundColor:r.palette.background.paper,borderColor:r.palette.divider},s={color:r.palette.text.primary,"& svg":{fill:r.palette.text.primary}},i={color:r.palette.text.secondary,fontFamily:r.typography.fontFamily,fontSize:r.typography.body2.fontSize,fontWeight:r.typography.fontWeightMedium,lineHeight:r.typography.body2.lineHeight};return g.jsx(E.Box,{className:`${Un.container} ${t||""}`,sx:n,children:e.map((a,l)=>g.jsxs(E.Box,{className:Un.card,sx:o,children:[a.icon&&g.jsx(E.Box,{className:Un.icon,sx:s,children:a.icon}),g.jsxs(E.Typography,{component:"span",className:Un.text,sx:i,children:[a.count," ",a.label]})]},l))})},_s=x.createContext({});function Es(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Xl=typeof window<"u",Jl=Xl?x.useLayoutEffect:x.useEffect,Nr=x.createContext(null);function As(e,t){e.indexOf(t)===-1&&e.push(t)}function Ms(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Xe=(e,t,n)=>n>t?t:n<e?e:n;function $o(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Jt=()=>{},it=()=>{};var Cl;typeof process<"u"&&((Cl=process.env)==null?void 0:Cl.NODE_ENV)!=="production"&&(Jt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn($o(t,n))},it=(e,t,n)=>{if(!e)throw new Error($o(t,n))});const at={},Ql=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ec(e){return typeof e=="object"&&e!==null}const tc=e=>/^0[^.\s]+$/u.test(e);function Ps(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ve=e=>e,Pp=(e,t)=>n=>t(e(n)),jn=(...e)=>e.reduce(Pp),Mn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ks{constructor(){this.subscriptions=[]}add(t){return As(this.subscriptions,t),()=>Ms(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ze=e=>e*1e3,Ne=e=>e/1e3;function nc(e,t){return t?e*(1e3/t):0}const Gi=new Set;function Is(e,t,n){e||Gi.has(t)||(console.warn($o(t,n)),Gi.add(t))}const rc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kp=1e-7,Ip=12;function Rp(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=rc(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>kp&&++a<Ip);return i}function Dn(e,t,n,r){if(e===t&&n===r)return Ve;const o=s=>Rp(s,0,1,e,n);return s=>s===0||s===1?s:rc(o(s),t,r)}const oc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sc=e=>t=>1-e(1-t),ic=Dn(.33,1.53,.69,.99),Rs=sc(ic),ac=oc(Rs),lc=e=>(e*=2)<1?.5*Rs(e):.5*(2-Math.pow(2,-10*(e-1))),Os=e=>1-Math.sin(Math.acos(e)),cc=sc(Os),uc=oc(Os),Op=Dn(.42,0,1,1),Lp=Dn(0,0,.58,1),dc=Dn(.42,0,.58,1),jp=e=>Array.isArray(e)&&typeof e[0]!="number",fc=e=>Array.isArray(e)&&typeof e[0]=="number",Ki={linear:Ve,easeIn:Op,easeInOut:dc,easeOut:Lp,circIn:Os,circInOut:uc,circOut:cc,backIn:Rs,backInOut:ac,backOut:ic,anticipate:lc},Dp=e=>typeof e=="string",Yi=e=>{if(fc(e)){it(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Dn(t,n,r,o)}else if(Dp(e))return it(Ki[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ki[e];return e},Hn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Bp(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&o?n:r;return d&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{r.delete(c),i.delete(c)},process:c=>{if(a=c,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,s&&(s=!1,u.process(c))}};return u}const $p=40;function hc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Hn.reduce((b,C)=>(b[C]=Bp(s),b),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=i,m=()=>{const b=at.useManualTiming?o.timestamp:performance.now();n=!1,at.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,$p),1)),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),h.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},v=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:Hn.reduce((b,C)=>{const T=i[C];return b[C]=(w,P=!1,M=!1)=>(n||v(),T.schedule(w,P,M)),b},{}),cancel:b=>{for(let C=0;C<Hn.length;C++)i[Hn[C]].cancel(b)},state:o,steps:i}}const{schedule:ce,cancel:yt,state:Me,steps:oo}=hc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ve,!0);let rr;function Np(){rr=void 0}const Ie={now:()=>(rr===void 0&&Ie.set(Me.isProcessing||at.useManualTiming?Me.timestamp:performance.now()),rr),set:e=>{rr=e,queueMicrotask(Np)}},mc=e=>t=>typeof t=="string"&&t.startsWith(e),pc=mc("--"),Vp=mc("var(--"),Ls=e=>Vp(e)?Fp.test(e.split("/*")[0].trim()):!1,Fp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Qt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pn={...Qt,transform:e=>Xe(0,1,e)},Gn={...Qt,default:1},wn=e=>Math.round(e*1e5)/1e5,js=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zp(e){return e==null}const Wp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ds=(e,t)=>n=>!!(typeof n=="string"&&Wp.test(n)&&n.startsWith(e)||t&&!zp(n)&&Object.prototype.hasOwnProperty.call(n,t)),gc=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(js);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Up=e=>Xe(0,255,e),so={...Qt,transform:e=>Math.round(Up(e))},kt={test:Ds("rgb","red"),parse:gc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+so.transform(e)+", "+so.transform(t)+", "+so.transform(n)+", "+wn(Pn.transform(r))+")"};function Hp(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const No={test:Ds("#"),parse:Hp,transform:kt.transform},Bn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ct=Bn("deg"),qe=Bn("%"),K=Bn("px"),Gp=Bn("vh"),Kp=Bn("vw"),qi={...qe,parse:e=>qe.parse(e)/100,transform:e=>qe.transform(e*100)},Ft={test:Ds("hsl","hue"),parse:gc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qe.transform(wn(t))+", "+qe.transform(wn(n))+", "+wn(Pn.transform(r))+")"},Se={test:e=>kt.test(e)||No.test(e)||Ft.test(e),parse:e=>kt.test(e)?kt.parse(e):Ft.test(e)?Ft.parse(e):No.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?kt.transform(e):Ft.transform(e),getAnimatableNone:e=>{const t=Se.parse(e);return t.alpha=0,Se.transform(t)}},Yp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Zp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(js))==null?void 0:t.length)||0)+(((n=e.match(Yp))==null?void 0:n.length)||0)>0}const yc="number",vc="color",qp="var",Xp="var(",Xi="${}",Jp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function kn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Jp,l=>(Se.test(l)?(r.color.push(s),o.push(vc),n.push(Se.parse(l))):l.startsWith(Xp)?(r.var.push(s),o.push(qp),n.push(l)):(r.number.push(s),o.push(yc),n.push(parseFloat(l))),++s,Xi)).split(Xi);return{values:n,split:a,indexes:r,types:o}}function bc(e){return kn(e).values}function xc(e){const{split:t,types:n}=kn(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===yc?s+=wn(o[i]):a===vc?s+=Se.transform(o[i]):s+=o[i]}return s}}const Qp=e=>typeof e=="number"?0:Se.test(e)?Se.getAnimatableNone(e):e;function eg(e){const t=bc(e);return xc(e)(t.map(Qp))}const vt={test:Zp,parse:bc,createTransformer:xc,getAnimatableNone:eg};function io(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tg({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=io(l,a,e+1/3),s=io(l,a,e),i=io(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function mr(e,t){return n=>n>0?t:e}const he=(e,t,n)=>e+(t-e)*n,ao=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ng=[No,kt,Ft],rg=e=>ng.find(t=>t.test(e));function Ji(e){const t=rg(e);if(Jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ft&&(n=tg(n)),n}const Qi=(e,t)=>{const n=Ji(e),r=Ji(t);if(!n||!r)return mr(e,t);const o={...n};return s=>(o.red=ao(n.red,r.red,s),o.green=ao(n.green,r.green,s),o.blue=ao(n.blue,r.blue,s),o.alpha=he(n.alpha,r.alpha,s),kt.transform(o))},Vo=new Set(["none","hidden"]);function og(e,t){return Vo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sg(e,t){return n=>he(e,t,n)}function Bs(e){return typeof e=="number"?sg:typeof e=="string"?Ls(e)?mr:Se.test(e)?Qi:lg:Array.isArray(e)?Sc:typeof e=="object"?Se.test(e)?Qi:ig:mr}function Sc(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Bs(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function ig(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Bs(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function ag(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],a=e.values[i]??0;n[o]=a,r[s]++}return n}const lg=(e,t)=>{const n=vt.createTransformer(t),r=kn(e),o=kn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Vo.has(e)&&!o.values.length||Vo.has(t)&&!r.values.length?og(e,t):jn(Sc(ag(r,o),o.values),n):(Jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),mr(e,t))};function Cc(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?he(e,t,n):Bs(e)(e,t)}const cg=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ce.update(t,n),stop:()=>yt(t),now:()=>Me.isProcessing?Me.timestamp:Ie.now()}},Tc=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},pr=2e4;function $s(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<pr;)t+=n,r=e.next(t);return t>=pr?1/0:t}function ug(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min($s(r),pr);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Ne(o)}}const dg=5;function wc(e,t,n){const r=Math.max(t-dg,0);return nc(n-e(r),t-r)}const fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},lo=.001;function fg({duration:e=fe.duration,bounce:t=fe.bounce,velocity:n=fe.velocity,mass:r=fe.mass}){let o,s;Jt(e<=Ze(fe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Xe(fe.minDamping,fe.maxDamping,i),e=Xe(fe.minDuration,fe.maxDuration,Ne(e)),i<1?(o=u=>{const c=u*i,d=c*e,f=c-n,h=Fo(u,i),p=Math.exp(-d);return lo-f/h*p},s=u=>{const d=u*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(u,2)*e,p=Math.exp(-d),m=Fo(Math.pow(u,2),i);return(-o(u)+lo>0?-1:1)*((f-h)*p)/m}):(o=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-lo+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=mg(o,s,a);if(e=Ze(e),isNaN(l))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const hg=12;function mg(e,t,n){let r=n;for(let o=1;o<hg;o++)r=r-e(r)/t(r);return r}function Fo(e,t){return e*Math.sqrt(1-t*t)}const pg=["duration","bounce"],gg=["stiffness","damping","mass"];function ea(e,t){return t.some(n=>e[n]!==void 0)}function yg(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!ea(e,gg)&&ea(e,pg))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Xe(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fe.mass,stiffness:o,damping:s}}else{const n=fg(e);t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function gr(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=yg({...n,velocity:-Ne(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),v=i-s,S=Ne(Math.sqrt(l/c)),_=Math.abs(v)<5;r||(r=_?fe.restSpeed.granular:fe.restSpeed.default),o||(o=_?fe.restDelta.granular:fe.restDelta.default);let b;if(m<1){const T=Fo(S,m);b=w=>{const P=Math.exp(-m*S*w);return i-P*((p+m*S*v)/T*Math.sin(T*w)+v*Math.cos(T*w))}}else if(m===1)b=T=>i-Math.exp(-S*T)*(v+(p+S*v)*T);else{const T=S*Math.sqrt(m*m-1);b=w=>{const P=Math.exp(-m*S*w),M=Math.min(T*w,300);return i-P*((p+m*S*v)*Math.sinh(M)+T*v*Math.cosh(M))/T}}const C={calculatedDuration:h&&d||null,next:T=>{const w=b(T);if(h)a.done=T>=d;else{let P=T===0?p:0;m<1&&(P=T===0?Ze(p):wc(b,T,w));const M=Math.abs(P)<=r,I=Math.abs(i-w)<=o;a.done=M&&I}return a.value=a.done?i:w,a},toString:()=>{const T=Math.min($s(C),pr),w=Tc(P=>C.next(T*P).value,T,30);return T+"ms "+w},toTransition:()=>{}};return C}gr.applyToOptions=e=>{const t=ug(e,100,gr);return e.ease=t.ease,e.duration=Ze(t.duration),e.type="keyframes",e};function zo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=M=>a!==void 0&&M<a||l!==void 0&&M>l,p=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let m=n*t;const v=d+m,S=i===void 0?v:i(v);S!==v&&(m=S-d);const _=M=>-m*Math.exp(-M/r),b=M=>S+_(M),C=M=>{const I=_(M),V=b(M);f.done=Math.abs(I)<=u,f.value=f.done?S:V};let T,w;const P=M=>{h(f.value)&&(T=M,w=gr({keyframes:[f.value,p(f.value)],velocity:wc(b,M,f.value),damping:o,stiffness:s,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:M=>{let I=!1;return!w&&T===void 0&&(I=!0,C(M),P(M)),T!==void 0&&M>=T?w.next(M-T):(!I&&C(M),f)}}}function vg(e,t,n){const r=[],o=n||at.mix||Cc,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Ve:t;a=jn(l,a)}r.push(a)}return r}function bg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(it(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=vg(t,r,o),l=a.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=Mn(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Xe(e[0],e[s-1],c)):u}function xg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Mn(0,t,r);e.push(he(n,1,o))}}function Sg(e){const t=[0];return xg(t,e.length-1),t}function Cg(e,t){return e.map(n=>n*t)}function Tg(e,t){return e.map(()=>t||dc).splice(0,e.length-1)}function zt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jp(r)?r.map(Yi):Yi(r),s={done:!1,value:t[0]},i=Cg(n&&n.length===t.length?n:Sg(t),e),a=bg(i,t,{ease:Array.isArray(o)?o:Tg(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const wg=e=>e!==null;function Ns(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(wg),a=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const _g={decay:zo,inertia:zo,tween:zt,keyframes:zt,spring:gr};function _c(e){typeof e.type=="string"&&(e.type=_g[e.type])}class Vs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Eg=e=>e/100;class Fs extends Vs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==Ie.now()&&this.tick(Ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;_c(t);const{type:n=zt,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:a}=t;const l=n||zt;process.env.NODE_ENV!=="production"&&l!==zt&&it(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==zt&&typeof a[0]!="number"&&(this.mixKeyframes=jn(Eg,Cc(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=$s(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-u*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?S<0:S>o;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,C=r;if(d){const M=Math.min(this.currentTime,o)/a;let I=Math.floor(M),V=M%1;!V&&M>=1&&(V=1),V===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(V=1-V,h&&(V-=h/a)):f==="mirror"&&(C=i)),b=Xe(0,1,V)*a}const T=_?{done:!1,value:c[0]}:C.next(b);s&&(T.value=s(T.value));let{done:w}=T;!_&&l!==null&&(w=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return P&&p!==zo&&(T.value=Ns(c,this.options,v,this.speed)),m&&m(T.value),P&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return Ne(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ne(t)}get time(){return Ne(this.currentTime)}set time(t){var n;t=Ze(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ie.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ne(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=cg,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Ag(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const It=e=>e*180/Math.PI,Wo=e=>{const t=It(Math.atan2(e[1],e[0]));return Uo(t)},Mg={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wo,rotateZ:Wo,skewX:e=>It(Math.atan(e[1])),skewY:e=>It(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uo=e=>(e=e%360,e<0&&(e+=360),e),ta=Wo,na=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ra=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Pg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:na,scaleY:ra,scale:e=>(na(e)+ra(e))/2,rotateX:e=>Uo(It(Math.atan2(e[6],e[5]))),rotateY:e=>Uo(It(Math.atan2(-e[2],e[0]))),rotateZ:ta,rotate:ta,skewX:e=>It(Math.atan(e[4])),skewY:e=>It(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ho(e){return e.includes("scale")?1:0}function Go(e,t){if(!e||e==="none")return Ho(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Pg,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Mg,o=a}if(!o)return Ho(t);const s=r[t],i=o[1].split(",").map(Ig);return typeof s=="function"?s(i):i[s]}const kg=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Go(n,t)};function Ig(e){return parseFloat(e.trim())}const en=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tn=new Set(en),oa=e=>e===Qt||e===K,Rg=new Set(["x","y","z"]),Og=en.filter(e=>!Rg.has(e));function Lg(e){const t=[];return Og.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ht={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Go(t,"x"),y:(e,{transform:t})=>Go(t,"y")};ht.translateX=ht.x;ht.translateY=ht.y;const Ot=new Set;let Ko=!1,Yo=!1,Zo=!1;function Ec(){if(Yo){const e=Array.from(Ot).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Lg(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yo=!1,Ko=!1,Ot.forEach(e=>e.complete(Zo)),Ot.clear()}function Ac(){Ot.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yo=!0)})}function jg(){Zo=!0,Ac(),Ec(),Zo=!1}class zs{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Ot.add(this),Ko||(Ko=!0,ce.read(Ac),ce.resolveKeyframes(Ec))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}Ag(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ot.delete(this)}cancel(){this.state==="scheduled"&&(Ot.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Dg=e=>e.startsWith("--");function Bg(e,t,n){Dg(t)?e.style.setProperty(t,n):e.style[t]=n}const $g=Ps(()=>window.ScrollTimeline!==void 0),Ng={};function Vg(e,t){const n=Ps(e);return()=>Ng[t]??n()}const Mc=Vg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,sa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bn([0,.65,.55,1]),circOut:bn([.55,0,1,.45]),backIn:bn([.31,.01,.66,-.59]),backOut:bn([.33,1.53,.69,.99])};function Pc(e,t){if(e)return typeof e=="function"?Mc()?Tc(e,t):"ease-out":fc(e)?bn(e):Array.isArray(e)?e.map(n=>Pc(n,t)||sa.easeOut):sa[e]}function Fg(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Pc(a,o);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function kc(e){return typeof e=="function"&&"applyToOptions"in e}function zg({type:e,...t}){return kc(e)&&Mc()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Wg extends Vs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,it(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=zg(t);this.animation=Fg(n,r,o,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=Ns(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Bg(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ne(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ne(t)}get time(){return Ne(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ze(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&$g()?(this.animation.timeline=t,Ve):n(this)}}const Ic={anticipate:lc,backInOut:ac,circInOut:uc};function Ug(e){return e in Ic}function Hg(e){typeof e.ease=="string"&&Ug(e.ease)&&(e.ease=Ic[e.ease])}const co=10;class Gg extends Wg{constructor(t){Hg(t),_c(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Fs({...i,autoplay:!1}),l=Math.max(co,Ie.now()-this.startTime),u=Xe(0,co,l-co);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const ia=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(vt.test(e)||e==="0")&&!e.startsWith("url("));function Kg(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Yg(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=ia(o,t),a=ia(s,t);return Jt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". "${i?s:o}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:Kg(e)||(n==="spring"||kc(n))&&r}function qo(e){e.duration=0,e.type="keyframes"}const Zg=new Set(["opacity","clipPath","filter","transform"]),qg=Ps(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xg(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return qg()&&n&&Zg.has(n)&&(n!=="transform"||!u)&&!l&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const Jg=40;class Qg extends Vs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var p;super(),this.stop=()=>{var m,v;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ie.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||zs;this.keyframeResolver=new h(a,(m,v,S)=>this.onKeyframesResolved(m,v,f,!S),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,o){var v,S;this.keyframeResolver=void 0;const{name:s,type:i,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Ie.now(),Yg(t,s,i,a)||((at.instantAnimations||!l)&&(c==null||c(Ns(t,r,n))),t[0]=t[t.length-1],qo(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Jg?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&Xg(f),p=(S=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:S.current,m=h?new Gg({...f,element:p}):new Fs(f);m.finished.then(()=>{this.notifyFinished()}).catch(Ve),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),jg()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Rc(e,t,n,r=0,o=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(s,i):o===1?s*r:a-s*r}const e0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t0(e){const t=e0.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const n0=4;function Oc(e,t,n=1){it(n<=n0,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=t0(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Ql(i)?parseFloat(i):i}return Ls(o)?Oc(o,t,n+1):o}const r0={type:"spring",stiffness:500,damping:25,restSpeed:10},o0=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),s0={type:"keyframes",duration:.8},i0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},a0=(e,{keyframes:t})=>t.length>2?s0:tn.has(e)?e.startsWith("scale")?o0(t[1]):r0:i0,l0=e=>e!==null;function c0(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(l0),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function Ws(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function u0({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Us=(e,t,n,r={},o,s)=>i=>{const a=Ws(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ze(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};u0(a)||Object.assign(c,a0(e,c)),c.duration&&(c.duration=Ze(c.duration)),c.repeatDelay&&(c.repeatDelay=Ze(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qo(c),c.delay===0&&(d=!0)),(at.instantAnimations||at.skipAnimations)&&(d=!0,qo(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=c0(c.keyframes,a);if(f!==void 0){ce.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Fs(c):new Qg(c)};function aa(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hs(e,t,n,r){if(typeof t=="function"){const[o,s]=aa(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=aa(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Yt(e,t,n){const r=e.getProps();return Hs(r,t,n!==void 0?n:r.custom,e)}const Lc=new Set(["width","height","top","left","right","bottom",...en]),la=30,d0=e=>!isNaN(parseFloat(e));class f0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const o=Ie.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ie.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=d0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Is(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ks);const r=this.events[t].add(n);return t==="change"?()=>{r(),ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>la)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,la);return nc(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qt(e,t){return new f0(e,t)}const Xo=e=>Array.isArray(e);function h0(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qt(n))}function m0(e){return Xo(e)?e[e.length-1]||0:e}function p0(e,t){const n=Yt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=m0(s[i]);h0(e,i,a)}}const Pe=e=>!!(e&&e.getVelocity);function g0(e){return!!(Pe(e)&&e.add)}function Jo(e,t){const n=e.getValue("willChange");if(g0(n))return n.add(t);if(!n&&at.WillChange){const r=new at.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Gs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const y0="framerAppearId",jc="data-"+Gs(y0);function Dc(e){return e.props[jc]}function v0({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bc(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...a}=t;const l=s==null?void 0:s.reduceMotion;r&&(s=r);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const d in a){const f=e.getValue(d,e.latestValues[d]??null),h=a[d];if(h===void 0||c&&v0(c,d))continue;const p={delay:n,...Ws(s||{},d)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===m&&!p.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const b=Dc(e);if(b){const C=window.MotionHandoffAnimation(b,d,ce);C!==null&&(p.startTime=C,v=!0)}}Jo(e,d);const S=l??e.shouldReduceMotion;f.start(Us(d,f,h,S&&Lc.has(d)?{type:!1}:p,e,v));const _=f.animation;_&&u.push(_)}return i&&Promise.all(u).then(()=>{ce.update(()=>{i&&p0(e,i)})}),u}function Qo(e,t,n={}){var l;const r=Yt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Bc(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return b0(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[u,c]=a==="beforeChildren"?[s,i]:[i,s];return u().then(()=>c())}else return Promise.all([s(),i(n.delay)])}function b0(e,t,n=0,r=0,o=0,s=1,i){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Qo(l,t,{...i,delay:n+(typeof r=="function"?0:r)+Rc(e.variantChildren,l,r,o,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function x0(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Qo(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Qo(e,t,n);else{const o=typeof t=="function"?Yt(e,t,n.custom):t;r=Promise.all(Bc(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const S0={test:e=>e==="auto",parse:e=>e},$c=e=>t=>t.test(e),Nc=[Qt,K,qe,ct,Kp,Gp,S0],ca=e=>Nc.find($c(e));function C0(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tc(e):!0}const T0=new Set(["brightness","contrast","saturate","opacity"]);function w0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(js)||[];if(!r)return e;const o=n.replace(r,"");let s=T0.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const _0=/\b([a-z-]*)\(.*?\)/gu,es={...vt,getAnimatableNone:e=>{const t=e.match(_0);return t?t.map(w0).join(" "):e}},ua={...Qt,transform:Math.round},E0={rotate:ct,rotateX:ct,rotateY:ct,rotateZ:ct,scale:Gn,scaleX:Gn,scaleY:Gn,scaleZ:Gn,skew:ct,skewX:ct,skewY:ct,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Pn,originX:qi,originY:qi,originZ:K},Ks={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,...E0,zIndex:ua,fillOpacity:Pn,strokeOpacity:Pn,numOctaves:ua},A0={...Ks,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:es,WebkitFilter:es},Vc=e=>A0[e];function Fc(e,t){let n=Vc(e);return n!==es&&(n=vt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const M0=new Set(["auto","none","0"]);function P0(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!M0.has(s)&&kn(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Fc(n,o)}class k0 extends zs{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Ls(d))){const f=Oc(d,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Lc.has(r)||t.length!==2)return;const[o,s]=t,i=ca(o),a=ca(s),l=Zi(o),u=Zi(s);if(l!==u&&ht[r]){this.needsMeasurement=!0;return}if(i!==a)if(oa(i)&&oa(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else ht[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||C0(t[o]))&&r.push(o);r.length&&P0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ht[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=ht[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function I0(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const zc=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ts(e){return ec(e)&&"offsetHeight"in e}const{schedule:Ys}=hc(queueMicrotask,!1),Ue={x:!1,y:!1};function Wc(){return Ue.x||Ue.y}function R0(e){return e==="x"||e==="y"?Ue[e]?null:(Ue[e]=!0,()=>{Ue[e]=!1}):Ue.x||Ue.y?null:(Ue.x=Ue.y=!0,()=>{Ue.x=Ue.y=!1})}function Uc(e,t){const n=I0(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function da(e){return!(e.pointerType==="touch"||Wc())}function O0(e,t,n={}){const[r,o,s]=Uc(e,n),i=a=>{if(!da(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{da(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const Hc=(e,t)=>t?e===t?!0:Hc(e,t.parentElement):!1,Zs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,L0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Gc(e){return L0.has(e.tagName)||e.isContentEditable===!0}const or=new WeakSet;function fa(e){return t=>{t.key==="Enter"&&e(t)}}function uo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const j0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=fa(()=>{if(or.has(n))return;uo(n,"down");const o=fa(()=>{uo(n,"up")}),s=()=>uo(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ha(e){return Zs(e)&&!Wc()}function D0(e,t,n={}){const[r,o,s]=Uc(e,n),i=a=>{const l=a.currentTarget;if(!ha(a))return;or.add(l);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),or.has(l)&&or.delete(l),ha(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||Hc(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),ts(a)&&(a.addEventListener("focus",u=>j0(u,o)),!Gc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Kc(e){return ec(e)&&"ownerSVGElement"in e}function B0(e){return Kc(e)&&e.tagName==="svg"}const $0=[...Nc,Se,vt],N0=e=>$0.find($c(e)),ma=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wt=()=>({x:ma(),y:ma()}),pa=()=>({min:0,max:0}),Te=()=>({x:pa(),y:pa()}),ns={current:null},Yc={current:!1},V0=typeof window<"u";function F0(){if(Yc.current=!0,!!V0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ns.current=e.matches;e.addEventListener("change",t),t()}else ns.current=!1}const z0=new WeakMap;function Vr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function In(e){return typeof e=="string"||Array.isArray(e)}const qs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xs=["initial",...qs];function Fr(e){return Vr(e.animate)||Xs.some(t=>In(e[t]))}function Zc(e){return!!(Fr(e)||e.variants)}function W0(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Pe(o))e.addValue(r,o);else if(Pe(s))e.addValue(r,qt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,qt(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ga=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yr={};function qc(e){yr=e}function U0(){return yr}class H0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ie.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ce.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Fr(n),this.isVariantNode=Zc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&Pe(h)&&h.set(l[f])}}mount(t){var n;this.current=t,z0.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Yc.current||F0(),this.shouldReduceMotion=ns.current),process.env.NODE_ENV!=="production"&&Is(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),yt(this.notifyUpdate),yt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=tn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yr){const n=yr[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ga.length;r++){const o=ga[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=W0(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Ql(r)||tc(r))?r=parseFloat(r):!N0(r)&&vt.test(n)&&(r=Fc(t,n)),this.setBaseTarget(t,Pe(r)?r.get():r)),Pe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Hs(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Pe(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ks),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ys.render(this.render)}}class Xc extends H0{constructor(){super(...arguments),this.KeyframeResolver=k0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Jc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function G0({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function K0(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function fo(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!fo(e)||!fo(t)||!fo(n)}function Mt(e){return rs(e)||Qc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Qc(e){return ya(e.x)||ya(e.y)}function ya(e){return e&&e!=="0%"}function vr(e,t,n){const r=e-n,o=t*r;return n+o}function va(e,t,n,r,o){return o!==void 0&&(e=vr(e,o,r)),vr(e,n,r)+t}function os(e,t=0,n=1,r,o){e.min=va(e.min,t,n,r,o),e.max=va(e.max,t,n,r,o)}function eu(e,{x:t,y:n}){os(e.x,t.translate,t.scale,t.originPoint),os(e.y,n.translate,n.scale,n.originPoint)}const ba=.999999999999,xa=1.0000000000001;function Y0(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ht(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,eu(e,i)),r&&Mt(s.latestValues)&&Ht(e,s.latestValues))}t.x<xa&&t.x>ba&&(t.x=1),t.y<xa&&t.y>ba&&(t.y=1)}function Ut(e,t){e.min=e.min+t,e.max=e.max+t}function Sa(e,t,n,r,o=.5){const s=he(e.min,e.max,o);os(e,t,n,s,r)}function Ht(e,t){Sa(e.x,t.x,t.scaleX,t.scale,t.originX),Sa(e.y,t.y,t.scaleY,t.scale,t.originY)}function tu(e,t){return Jc(K0(e.getBoundingClientRect(),t))}function Z0(e,t,n){const r=tu(e,n),{scroll:o}=t;return o&&(Ut(r.x,o.offset.x),Ut(r.y,o.offset.y)),r}const q0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},X0=en.length;function J0(e,t,n){let r="",o=!0;for(let s=0;s<X0;s++){const i=en[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(i.startsWith("scale")?1:0);else{const u=parseFloat(a);l=i.startsWith("scale")?u===1:u===0}if(!l||n){const u=zc(a,Ks[i]);if(!l){o=!1;const c=q0[i]||i;r+=`${c}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Js(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const u=t[l];if(tn.has(l)){i=!0;continue}else if(pc(l)){o[l]=u;continue}else{const c=zc(u,Ks[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(i||n?r.transform=J0(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}function nu(e,{style:t,vars:n},r,o){const s=e.style;let i;for(i in t)s[i]=t[i];o==null||o.applyProjectionStyles(s,r);for(i in n)s.setProperty(i,n[i])}function Ca(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const dn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=Ca(e,t.target.x),r=Ca(e,t.target.y);return`${n}% ${r}%`}},Q0={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=vt.parse(e);if(o.length>5)return r;const s=vt.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const u=he(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=u),typeof o[3+i]=="number"&&(o[3+i]/=u),s(o)}},ss={borderRadius:{...dn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dn,borderTopRightRadius:dn,borderBottomLeftRadius:dn,borderBottomRightRadius:dn,boxShadow:Q0};function ru(e,{layout:t,layoutId:n}){return tn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ss[e]||e==="opacity")}function Qs(e,t,n){var i;const r=e.style,o=t==null?void 0:t.style,s={};if(!r)return s;for(const a in r)(Pe(r[a])||o&&Pe(o[a])||ru(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function ey(e){return window.getComputedStyle(e)}class ty extends Xc{constructor(){super(...arguments),this.type="html",this.renderInstance=nu}readValueFromInstance(t,n){var r;if(tn.has(n))return(r=this.projection)!=null&&r.isProjecting?Ho(n):kg(t,n);{const o=ey(t),s=(pc(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tu(t,n)}build(t,n,r){Js(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Qs(t,n,r)}}const ny={offset:"stroke-dashoffset",array:"stroke-dasharray"},ry={offset:"strokeDashoffset",array:"strokeDasharray"};function oy(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?ny:ry;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const sy=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ou(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...a},l,u,c){if(Js(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const h of sy)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&oy(d,o,s,i,!1)}const su=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),iu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iy(e,t,n,r){nu(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(su.has(o)?o:Gs(o),t.attrs[o])}function au(e,t,n){const r=Qs(e,t,n);for(const o in e)if(Pe(e[o])||Pe(t[o])){const s=en.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class ay extends Xc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Te}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tn.has(n)){const r=Vc(n);return r&&r.default||0}return n=su.has(n)?n:Gs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return au(t,n,r)}build(t,n,r){ou(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){iy(t,n,r,o)}mount(t){this.isSVGTag=iu(t.tagName),super.mount(t)}}const ly=Xs.length;function lu(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?lu(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ly;n++){const r=Xs[n],o=e.props[r];(In(o)||o===!1)&&(t[r]=o)}return t}function cu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const cy=[...qs].reverse(),uy=qs.length;function dy(e){return t=>Promise.all(t.map(({animation:n,options:r})=>x0(e,n,r)))}function fy(e){let t=dy(e),n=Ta(),r=!0;const o=l=>(u,c)=>{var f;const d=Yt(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(l){t=l(e)}function i(l){const{props:u}=e,c=lu(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<uy;v++){const S=cy[v],_=n[S],b=u[S]!==void 0?u[S]:c[S],C=In(b),T=S===l?_.isActive:null;T===!1&&(p=v);let w=b===c[S]&&b!==u[S]&&C;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),_.protectedKeys={...h},!_.isActive&&T===null||!b&&!_.prevProp||Vr(b)||typeof b=="boolean")continue;const P=hy(_.prevProp,b);let M=P||S===l&&_.isActive&&!w&&C||v>p&&C,I=!1;const V=Array.isArray(b)?b:[b];let $=V.reduce(o(S),{});T===!1&&($={});const{prevResolvedValues:y={}}=_,R={...y,...$},O=G=>{M=!0,f.has(G)&&(I=!0,f.delete(G)),_.needsAnimating[G]=!0;const D=e.getValue(G);D&&(D.liveStyle=!1)};for(const G in R){const D=$[G],Q=y[G];if(h.hasOwnProperty(G))continue;let j=!1;Xo(D)&&Xo(Q)?j=!cu(D,Q):j=D!==Q,j?D!=null?O(G):f.add(G):D!==void 0&&f.has(G)?O(G):_.protectedKeys[G]=!0}_.prevProp=b,_.prevResolvedValues=$,_.isActive&&(h={...h,...$}),r&&e.blockInitialAnimation&&(M=!1);const F=w&&P;M&&(!F||I)&&d.push(...V.map(G=>{const D={type:S};if(typeof G=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:Q}=e,j=Yt(Q,G);if(Q.enteringChildren&&j){const{delayChildren:A}=j.transition||{};D.delay=Rc(Q.enteringChildren,e,A)}}return{animation:G,options:D}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const S=Yt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);S&&S.transition&&(v.transition=S.transition)}f.forEach(S=>{const _=e.getBaseTarget(S),b=e.getValue(S);b&&(b.liveStyle=!0),v[S]=_??null}),d.push({animation:v})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=i(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ta()}}}function hy(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!cu(t,e):!1}function Ct(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ta(){return{animate:Ct(!0),whileInView:Ct(),whileHover:Ct(),whileTap:Ct(),whileDrag:Ct(),whileFocus:Ct(),exit:Ct()}}function wa(e,t){e.min=t.min,e.max=t.max}function We(e,t){wa(e.x,t.x),wa(e.y,t.y)}function _a(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const uu=1e-4,my=1-uu,py=1+uu,du=.01,gy=0-du,yy=0+du;function Re(e){return e.max-e.min}function vy(e,t,n){return Math.abs(e-t)<=n}function Ea(e,t,n,r=.5){e.origin=r,e.originPoint=he(t.min,t.max,e.origin),e.scale=Re(n)/Re(t),e.translate=he(n.min,n.max,e.origin)-e.originPoint,(e.scale>=my&&e.scale<=py||isNaN(e.scale))&&(e.scale=1),(e.translate>=gy&&e.translate<=yy||isNaN(e.translate))&&(e.translate=0)}function _n(e,t,n,r){Ea(e.x,t.x,n.x,r?r.originX:void 0),Ea(e.y,t.y,n.y,r?r.originY:void 0)}function Aa(e,t,n){e.min=n.min+t.min,e.max=e.min+Re(t)}function by(e,t,n){Aa(e.x,t.x,n.x),Aa(e.y,t.y,n.y)}function Ma(e,t,n){e.min=t.min-n.min,e.max=e.min+Re(t)}function br(e,t,n){Ma(e.x,t.x,n.x),Ma(e.y,t.y,n.y)}function Pa(e,t,n,r,o){return e-=t,e=vr(e,1/n,r),o!==void 0&&(e=vr(e,1/o,r)),e}function xy(e,t=0,n=1,r=.5,o,s=e,i=e){if(qe.test(t)&&(t=parseFloat(t),t=he(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=he(s.min,s.max,r);e===s&&(a-=t),e.min=Pa(e.min,t,n,a,o),e.max=Pa(e.max,t,n,a,o)}function ka(e,t,[n,r,o],s,i){xy(e,t[n],t[r],t[o],t.scale,s,i)}const Sy=["x","scaleX","originX"],Cy=["y","scaleY","originY"];function Ia(e,t,n,r){ka(e.x,t,Sy,n?n.x:void 0,r?r.x:void 0),ka(e.y,t,Cy,n?n.y:void 0,r?r.y:void 0)}function Ra(e){return e.translate===0&&e.scale===1}function fu(e){return Ra(e.x)&&Ra(e.y)}function Oa(e,t){return e.min===t.min&&e.max===t.max}function Ty(e,t){return Oa(e.x,t.x)&&Oa(e.y,t.y)}function La(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hu(e,t){return La(e.x,t.x)&&La(e.y,t.y)}function ja(e){return Re(e.x)/Re(e.y)}function Da(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Be(e){return[e("x"),e("y")]}function wy(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const mu=["TopLeft","TopRight","BottomLeft","BottomRight"],_y=mu.length,Ba=e=>typeof e=="string"?parseFloat(e):e,$a=e=>typeof e=="number"||K.test(e);function Ey(e,t,n,r,o,s){o?(e.opacity=he(0,n.opacity??1,Ay(r)),e.opacityExit=he(t.opacity??1,0,My(r))):s&&(e.opacity=he(t.opacity??1,n.opacity??1,r));for(let i=0;i<_y;i++){const a=`border${mu[i]}Radius`;let l=Na(t,a),u=Na(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||$a(l)===$a(u)?(e[a]=Math.max(he(Ba(l),Ba(u),r),0),(qe.test(u)||qe.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=he(t.rotate||0,n.rotate||0,r))}function Na(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ay=pu(0,.5,cc),My=pu(.5,.95,Ve);function pu(e,t,n){return r=>r<e?0:r>t?1:n(Mn(e,t,r))}function Py(e,t,n){const r=Pe(e)?e:qt(e);return r.start(Us("",r,t,n)),r.animation}function Rn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ky=(e,t)=>e.depth-t.depth;class Iy{constructor(){this.children=[],this.isDirty=!1}add(t){As(this.children,t),this.isDirty=!0}remove(t){Ms(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ky),this.isDirty=!1,this.children.forEach(t)}}function Ry(e,t){const n=Ie.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(yt(r),e(s-t))};return ce.setup(r,!0),()=>yt(r)}function sr(e){return Pe(e)?e.get():e}class Oy{constructor(){this.members=[]}add(t){As(this.members,t),t.scheduleRender()}remove(t){if(Ms(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,s=t.options.layoutDependency;o!==void 0&&s!==void 0&&o===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ir={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ho=["","X","Y","Z"],Ly=1e3;let jy=0;function mo(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Dc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ce,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gu(r)}function yu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=jy++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach($y),this.nodes.forEach(zy),this.nodes.forEach(Wy),this.nodes.forEach(Ny)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Iy)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new ks),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Kc(i)&&!B0(i),this.instance=i;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;ce.read(()=>{d=window.innerWidth}),e(i,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=Ry(f,250),ir.hasAnimatedSinceResize&&(ir.hasAnimatedSinceResize=!1,this.nodes.forEach(za)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Yy,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),S=!this.targetLayout||!hu(this.targetLayout,h),_=!d&&f;if(this.options.layoutRoot||this.resumeFrom||_||d&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Ws(p,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(c,_)}else d||za(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Uy),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Va);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Fa);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fy),this.nodes.forEach(Dy),this.nodes.forEach(By)):this.nodes.forEach(Fa),this.clearAllSnapshots();const a=Ie.now();Me.delta=Xe(0,1e3/60,a-Me.timestamp),Me.timestamp=a,Me.isProcessing=!0,oo.update.process(Me),oo.preRender.process(Me),oo.render.process(Me),Me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ys.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vy),this.sharedNodes.forEach(Hy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Re(this.snapshot.measuredBox.x)&&!Re(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Te(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!fu(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(a||Mt(this.latestValues)||c)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),Zy(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:i}=this.options;if(!i)return Te();const a=i.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(qy))){const{scroll:c}=this.root;c&&(Ut(a.x,c.offset.x),Ut(a.y,c.offset.y))}return a}removeElementScroll(i){var l;const a=Te();if(We(a,i),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&We(a,i),Ut(a.x,d.offset.x),Ut(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const l=Te();We(l,i);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Mt(c.latestValues)&&Ht(l,c.latestValues)}return Mt(this.latestValues)&&Ht(l,this.latestValues),l}removeTransform(i){const a=Te();We(a,i);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Mt(u.latestValues))continue;rs(u.latestValues)&&u.updateSnapshot();const c=Te(),d=u.measurePageBox();We(c,d),Ia(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Mt(this.latestValues)&&Ia(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=Me.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Te(),this.targetWithTransforms=Te()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),by(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):We(this.target,this.layout.layoutBox),eu(this.target,this.targetDelta)):We(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||rs(this.parent.latestValues)||Qc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,l){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Te(),this.relativeTargetOrigin=Te(),br(this.relativeTargetOrigin,a,l),We(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Me.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;We(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Y0(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Te());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_a(this.prevProjectionDelta.x,this.projectionDelta.x),_a(this.prevProjectionDelta.y,this.projectionDelta.y)),_n(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Da(this.projectionDelta.x,this.prevProjectionDelta.x)||!Da(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wt(),this.projectionDelta=Wt(),this.projectionDeltaWithTransform=Wt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Wt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Te(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),S=!v||v.members.length<=1,_=!!(m&&!S&&this.options.crossfade===!0&&!this.path.some(Ky));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const T=C/1e3;Wa(d.x,i.x,T),Wa(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(br(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gy(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&Ty(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Te()),We(b,this.relativeTarget)),m&&(this.animationValues=c,Ey(c,u,this.latestValues,T,_,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ce.update(()=>{ir.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qt(0)),this.currentAnimation=Py(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),i.onUpdate&&i.onUpdate(c)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ly),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=i;if(!(!a||!l||!u)){if(this!==i&&this.layout&&u&&vu(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Te();const d=Re(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Re(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}We(a,l),Ht(a,c),_n(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Oy),this.sharedNodes.get(i).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&mo("z",i,u,this.animationValues);for(let c=0;c<ho.length;c++)mo(`rotate${ho[c]}`,i,u,this.animationValues),mo(`skew${ho[c]}`,i,u,this.animationValues);i.render();for(const c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=sr(a==null?void 0:a.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=sr(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Mt(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=wy(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),i.transform=d;const{x:f,y:h}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?i.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in ss){if(c[p]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:S}=ss[p],_=d==="none"?c[p]:m(c[p],u);if(v){const b=v.length;for(let C=0;C<b;C++)i[v[C]]=_}else S?this.options.visualElement.renderState.vars[p]=_:i[p]=_}this.options.layoutId&&(i.pointerEvents=u===this?sr(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Va),this.root.sharedNodes.clear()}}}function Dy(e){e.updateLayout()}function By(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?Be(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Re(f);f.min=r[d].min,f.max=f.min+h}):vu(s,t.layoutBox,r)&&Be(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Re(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Wt();_n(a,r,t.layoutBox);const l=Wt();i?_n(l,e.applyTransform(o,!0),t.measuredBox):_n(l,r,t.layoutBox);const u=!fu(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=Te();br(p,t.layoutBox,f.layoutBox);const m=Te();br(m,r,h.layoutBox),hu(p,m)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function $y(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ny(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vy(e){e.clearSnapshot()}function Va(e){e.clearMeasurements()}function Fa(e){e.isLayoutDirty=!1}function Fy(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function za(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zy(e){e.resolveTargetDelta()}function Wy(e){e.calcProjection()}function Uy(e){e.resetSkewAndRotation()}function Hy(e){e.removeLeadSnapshot()}function Wa(e,t,n){e.translate=he(t.translate,0,n),e.scale=he(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ua(e,t,n,r){e.min=he(t.min,n.min,r),e.max=he(t.max,n.max,r)}function Gy(e,t,n,r){Ua(e.x,t.x,n.x,r),Ua(e.y,t.y,n.y,r)}function Ky(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Yy={duration:.45,ease:[.4,0,.1,1]},Ha=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ga=Ha("applewebkit/")&&!Ha("chrome/")?Math.round:Ve;function Ka(e){e.min=Ga(e.min),e.max=Ga(e.max)}function Zy(e){Ka(e.x),Ka(e.y)}function vu(e,t,n){return e==="position"||e==="preserve-aspect"&&!vy(ja(t),ja(n),.2)}function qy(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Xy=yu({attachResizeListener:(e,t)=>Rn(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),po={current:void 0},bu=yu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!po.current){const e=new Xy({});e.mount(window),e.setOptions({layoutScroll:!0}),po.current=e}return po.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ei=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ya(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jy(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ya(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ya(e[o],null)}}}}function Qy(...e){return Fe.useCallback(Jy(...e),e)}class e1 extends Fe.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=ts(r)&&r.offsetWidth||0,s=ts(r)&&r.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left,i.bottom=s-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function t1({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){var d;const s=x.useId(),i=x.useRef(null),a=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=x.useContext(ei),u=((d=e.props)==null?void 0:d.ref)??(e==null?void 0:e.ref),c=Qy(i,u);return x.useInsertionEffect(()=>{const{width:f,height:h,top:p,left:m,right:v,bottom:S}=a.current;if(t||!i.current||!f||!h)return;const _=n==="left"?`left: ${m}`:`right: ${v}`,b=r==="bottom"?`bottom: ${S}`:`top: ${p}`;i.current.dataset.motionPopId=s;const C=document.createElement("style");l&&(C.nonce=l);const T=o??document.head;return T.appendChild(C),C.sheet&&C.sheet.insertRule(`
96
96
  [data-motion-pop-id="${s}"] {
97
97
  position: absolute !important;
98
98
  width: ${f}px !important;
99
99
  height: ${h}px !important;
100
- ${T}px !important;
100
+ ${_}px !important;
101
101
  ${b}px !important;
102
102
  }
103
- `),()=>{C.contains(w)&&C.removeChild(w)}},[t]),y.jsx(Ey,{isPresent:t,childRef:i,sizeRef:a,children:Ve.cloneElement(e,{ref:l})})}const My=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a,anchorY:c,root:u})=>{const l=gs(Py),d=x.useId();let f=!0,h=x.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:p=>{l.set(p,!0);for(const m of l.values())if(!m)return;r&&r()},register:p=>(l.set(p,!1),()=>l.delete(p))}),[n,l,r]);return s&&f&&(h={...h}),x.useMemo(()=>{l.forEach((p,m)=>l.set(m,!1))},[n]),Ve.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=y.jsx(Ay,{isPresent:n,anchorX:a,anchorY:c,root:u,children:e})),y.jsx(Ir.Provider,{value:h,children:e})};function Py(){return new Map}function nu(e=!0){const t=x.useContext(Ir);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=x.useId();x.useEffect(()=>{if(e)return o(s)},[e]);const i=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Fn=e=>e.key||"";function ja(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const ky=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[l,d]=nu(i),f=x.useMemo(()=>ja(e),[e]),h=i&&!l?[]:f.map(Fn),p=x.useRef(!0),m=x.useRef(f),v=gs(()=>new Map),S=x.useRef(new Set),[T,b]=x.useState(f),[w,C]=x.useState(f);Lc(()=>{p.current=!1,m.current=f;for(let M=0;M<w.length;M++){const I=Fn(w[M]);h.includes(I)?(v.delete(I),S.current.delete(I)):v.get(I)!==!0&&v.set(I,!1)}},[w,h.length,h.join("-")]);const E=[];if(f!==T){let M=[...f];for(let I=0;I<w.length;I++){const V=w[I],D=Fn(V);h.includes(D)||(M.splice(I,0,V),E.push(V))}return s==="wait"&&E.length&&(M=E),C(ja(M)),b(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=x.useContext(ps);return y.jsx(y.Fragment,{children:w.map(M=>{const I=Fn(M),V=i&&!l?!1:f===w||h.includes(I),D=()=>{if(S.current.has(I))return;if(S.current.add(I),v.has(I))v.set(I,!0);else return;let g=!0;v.forEach($=>{$||(g=!1)}),g&&(P==null||P(),C(m.current),i&&(d==null||d()),r&&r())};return y.jsx(My,{isPresent:V,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:u,onExitComplete:V?void 0:D,anchorX:a,anchorY:c,children:M},I)})})},ru=x.createContext({strict:!1}),Ba={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let $a=!1;function Iy(){if($a)return;const e={};for(const t in Ba)e[t]={isEnabled:n=>Ba[t].some(r=>!!n[r])};Rl(e),$a=!0}function ou(){return Iy(),g0()}function Ry(e){const t=ou();for(const n in e)t[n]={...t[n],...e[n]};Rl(t)}const Oy=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Oy.has(e)}let su=e=>!fr(e);function Ly(e){typeof e=="function"&&(su=t=>t.startsWith("on")?!fr(t):e(t))}try{Ly(require("@emotion/is-prop-valid").default)}catch{}function Dy(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(su(o)||n===!0&&fr(o)||!t&&!fr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Lr=x.createContext({});function jy(e,t){if(Or(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_n(n)?n:void 0,animate:_n(r)?r:void 0}}return e.inherit!==!1?t:{}}function By(e){const{initial:t,animate:n}=jy(e,x.useContext(Lr));return x.useMemo(()=>({initial:t,animate:n}),[Na(t),Na(n)])}function Na(e){return Array.isArray(e)?e.join(" "):e}const Hs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function iu(e,t,n){for(const r in t)!Pe(t[r])&&!Nl(r,n)&&(e[r]=t[r])}function $y({transformTemplate:e},t){return x.useMemo(()=>{const n=Hs();return zs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ny(e,t){const n=e.style||{},r={};return iu(r,n,e),Object.assign(r,$y(e,t)),r}function Vy(e,t){const n={},r=Ny(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const au=()=>({...Hs(),attrs:{}});function Fy(e,t,n,r){const o=x.useMemo(()=>{const s=au();return Vl(s,t,zl(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};iu(s,e.style,e),o.style={...s,...o.style}}return o}const zy=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Gs(e){return typeof e!="string"||e.includes("-")?!1:!!(zy.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wy(e,t,n,{latestValues:r},o,s=!1,i){const c=(i??Gs(e)?Fy:Vy)(t,r,o,e),u=Dy(t,typeof e=="string",s),l=e!==x.Fragment?{...u,...c,ref:n}:{},{children:d}=t,f=x.useMemo(()=>Pe(d)?d.get():d,[d]);return x.createElement(e,{...l,children:f})}function Uy({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Hy(n,r,o,e),renderState:t()}}function Hy(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=Jn(s[f]);let{initial:i,animate:a}=e;const c=Or(e),u=Il(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let l=n?n.initial===!1:!1;l=l||i===!1;const d=l?a:i;if(d&&typeof d!="boolean"&&!Rr(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Ds(e,f[h]);if(p){const{transitionEnd:m,transition:v,...S}=p;for(const T in S){let b=S[T];if(Array.isArray(b)){const w=l?b.length-1:0;b=b[w]}b!==null&&(o[T]=b)}for(const T in m)o[T]=m[T]}}}return o}const cu=e=>(t,n)=>{const r=x.useContext(Lr),o=x.useContext(Ir),s=()=>Uy(e,t,r,o);return n?s():gs(s)},Gy=cu({scrapeMotionValuesFromProps:Ws,createRenderState:Hs}),Ky=cu({scrapeMotionValuesFromProps:Wl,createRenderState:au}),Yy=Symbol.for("motionComponentSymbol");function Zy(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const o=x.useRef(null);return x.useCallback(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());const i=r.current;if(typeof i=="function")if(s){const c=i(s);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):i(s);else i&&(i.current=s)},[t])}const lu=x.createContext({});function pn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qy(e,t,n,r,o,s){var S,T;const{visualElement:i}=x.useContext(Lr),a=x.useContext(ru),c=x.useContext(Ir),u=x.useContext(Us).reducedMotion,l=x.useRef(null),d=x.useRef(!1);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:s}),d.current&&l.current&&(l.current.manuallyAnimateOnMount=!0));const f=l.current,h=x.useContext(lu);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Xy(l.current,n,o,h);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[yl],v=x.useRef(!!m&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,m))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,m)));return Lc(()=>{d.current=!0,f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,m)}),v.current=!1),f.enteringChildren=void 0)}),f}function Xy(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutCrossfade:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:uu(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&pn(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:u})}function uu(e){if(e)return e.options.allowProjection!==!1?e.projection:uu(e.parent)}function ao(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&Ry(r);const s=n?n==="svg":Gs(e),i=s?Ky:Gy;function a(u,l){let d;const f={...x.useContext(Us),...u,layoutId:Jy(u)},{isStatic:h}=f,p=By(u),m=i(u,h);if(!h&&Oc){Qy(f,r);const v=ev(f);d=v.MeasureLayout,p.visualElement=qy(e,m,f,o,v.ProjectionNode,s)}return y.jsxs(Lr.Provider,{value:p,children:[d&&p.visualElement?y.jsx(d,{visualElement:p.visualElement,...f}):null,Wy(e,u,Zy(m,p.visualElement,l),m,h,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(a);return c[Yy]=e,c}function Jy({layoutId:e}){const t=x.useContext(ps).id;return t&&e!==void 0?t+"-"+e:e}function Qy(e,t){const n=x.useContext(ru).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Yt(!1,r,"lazy-strict-mode"):rt(!1,r,"lazy-strict-mode")}}function ev(e){const t=ou(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function tv(e,t){if(typeof Proxy>"u")return ao;const n=new Map,r=(s,i)=>ao(s,i,e,t),o=(s,i)=>(process.env.NODE_ENV!=="production"&&Ss(!1,"motion() is deprecated. Use motion.create() instead."),r(s,i));return new Proxy(o,{get:(s,i)=>i==="create"?r:(n.has(i)||n.set(i,ao(i,void 0,e,t)),n.get(i))})}const nv=(e,t)=>t.isSVG??Gs(e)?new O0(t):new A0(t,{allowProjection:e!==x.Fragment});class rv extends vt{constructor(t){super(t),t.animationState||(t.animationState=$0(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Rr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let ov=0;class sv extends vt{constructor(){super(...arguments),this.id=ov++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const iv={animation:{Feature:rv},exit:{Feature:sv}};function Rn(e){return{point:{x:e.pageX,y:e.pageY}}}const av=e=>t=>Ns(t)&&e(t,Rn(t));function xn(e,t,n,r){return En(e,t,av(n),r)}const du=({current:e})=>e?e.ownerDocument.defaultView:null,Va=(e,t)=>Math.abs(e-t);function cv(e,t){const n=Va(e.x,t.x),r=Va(e.y,t.y);return Math.sqrt(n**2+r**2)}const Fa=new Set(["auto","scroll"]);class fu{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=lo(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=cv(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:v}=h,{timestamp:S}=Me;this.history.push({...v,timestamp:S});const{onStart:T,onMove:b}=this.handlers;p||(T&&T(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=co(p,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:m,onSessionEnd:v,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=lo(h.type==="pointercancel"?this.lastMoveEventInfo:co(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,T),v&&v(h,T)},!Ns(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=o||window;const c=Rn(t),u=co(c,this.transformPagePoint),{point:l}=u,{timestamp:d}=Me;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,lo(u,this.history)),this.removeListeners=Pn(xn(this.contextWindow,"pointermove",this.handlePointerMove),xn(this.contextWindow,"pointerup",this.handlePointerUp),xn(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Fa.has(r.overflowX)||Fa.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),pt(this.updatePoint)}}function co(e,t){return t?{point:t(e.point)}:e}function za(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lo({point:e},t){return{point:e,delta:za(e,hu(t)),offset:za(e,lv(t)),velocity:uv(t,.1)}}function lv(e){return e[0]}function hu(e){return e[e.length-1]}function uv(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=hu(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ye(t)));)n--;if(!r)return{x:0,y:0};const s=$e(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function dv(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?he(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?he(n,e,r.max):Math.min(e,n)),e}function Wa(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function fv(e,{top:t,left:n,bottom:r,right:o}){return{x:Wa(e.x,n,o),y:Wa(e.y,t,r)}}function Ua(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hv(e,t){return{x:Ua(e.x,t.x),y:Ua(e.y,t.y)}}function mv(e,t){let n=.5;const r=Re(e),o=Re(t);return o>r?n=Tn(t.min,t.max-r,e.min):r>o&&(n=Tn(e.min,e.max-o,t.min)),qe(0,1,n)}function pv(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Xo=.35;function gv(e=Xo){return e===!1?e=0:e===!0&&(e=Xo),{x:Ha(e,"left","right"),y:Ha(e,"top","bottom")}}function Ha(e,t,n){return{min:Ga(e,t),max:Ga(e,n)}}function Ga(e,t){return typeof e=="number"?e:e[t]||0}const yv=new WeakMap;class vv{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{n?(this.stopAnimation(),this.snapToCursor(Rn(d).point)):this.pauseAnimation()},i=(d,f)=>{this.stopAnimation();const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=o0(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),je(S=>{let T=this.getAxisMotionValue(S).get()||0;if(Ze.test(T)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[S];w&&(T=Re(w)*(parseFloat(T)/100))}}this.originPoint[S]=T}),m&&le.postRender(()=>m(d,f)),Wo(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:S}=f;if(p&&this.currentDirection===null){this.currentDirection=bv(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),v&&v(d,f)},c=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>je(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new fu(t,{onSessionStart:s,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:du(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:i}=o;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&le.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!zn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=dv(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&pn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=fv(r.layoutBox,t):this.constraints=!1,this.elastic=gv(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&je(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=pv(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pn(t))return!1;const r=t.current;rt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=S0(r,o.root,this.visualElement.getTransformPagePoint());let i=hv(o.layout.layoutBox,s);if(n){const a=n(v0(i));this.hasMutatedConstraints=!!a,a&&(i=Ll(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=je(l=>{if(!zn(l,n,this.currentDirection))return;let d=c&&c[l]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[l]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Wo(this.visualElement,t),r.start(Ls(t,r,0,n,this.visualElement,!1))}stopAnimation(){je(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){je(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){je(n=>{const{drag:r}=this.getProps();if(!zn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n],c=s.get()||0;s.set(t[n]-he(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};je(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();o[i]=mv({min:c,max:c},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),je(i=>{if(!zn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];a.set(he(c,u,o[i]))})}addListeners(){if(!this.visualElement.current)return;yv.set(this.visualElement,this);const t=this.visualElement.current,n=xn(t,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps(),d=c.target,f=d!==t&&Ml(d);u&&l&&!f&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();pn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),le.read(r);const i=En(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(je(l=>{const d=this.getAxisMotionValue(l);d&&(this.originPoint[l]+=c[l].translate,d.set(d.get()+c[l].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Xo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function zn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bv(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class xv extends vt{constructor(t){super(t),this.removeGroupControls=Ne,this.removeListeners=Ne,this.controls=new vv(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ne}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ka=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class Sv extends vt{constructor(){super(...arguments),this.removePointerDownListener=Ne}onPointerDown(t){this.session=new fu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:du(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Ka(t),onStart:Ka(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&le.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=xn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let uo=!1;class Tv extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),uo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Qn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),uo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||le.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$s.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;uo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mu(e){const[t,n]=nu(),r=x.useContext(ps);return y.jsx(Tv,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(lu),isPresent:t,safeToRemove:n})}const Cv={pan:{Feature:Sv},drag:{Feature:xv,ProjectionNode:tu,MeasureLayout:mu}};function Ya(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&le.postRender(()=>s(t,Rn(t)))}class wv extends vt{mount(){const{current:t}=this.node;t&&(this.unmount=s0(t,(n,r)=>(Ya(this.node,r,"Start"),o=>Ya(this.node,o,"End"))))}unmount(){}}class _v extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pn(En(this.node.current,"focus",()=>this.onFocus()),En(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Za(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&le.postRender(()=>s(t,Rn(t)))}class Ev extends vt{mount(){const{current:t}=this.node;t&&(this.unmount=c0(t,(n,r)=>(Za(this.node,r,"Start"),(o,{success:s})=>Za(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Jo=new WeakMap,fo=new WeakMap,Av=e=>{const t=Jo.get(e.target);t&&t(e)},Mv=e=>{e.forEach(Av)};function Pv({root:e,...t}){const n=e||document;fo.has(n)||fo.set(n,{});const r=fo.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Mv,{root:e,...t})),r[o]}function kv(e,t,n){const r=Pv(t);return Jo.set(e,n),r.observe(e),()=>{Jo.delete(e),r.unobserve(e)}}const Iv={some:0,all:1};class Rv extends vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Iv[o]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:d}=this.node.getProps(),f=u?l:d;f&&f(c)};return kv(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ov(t,n))&&this.startObserver()}unmount(){}}function Ov({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Lv={inView:{Feature:Rv},tap:{Feature:Ev},focus:{Feature:_v},hover:{Feature:wv}},Dv={layout:{ProjectionNode:tu,MeasureLayout:mu}},jv={...iv,...Lv,...Cv,...Dv},er=tv(jv,nv),pu="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%203.1875C0.75%201.84104%201.84104%200.75%203.1875%200.75L5.625%200.75V2.25H3.1875C2.66946%202.25%202.25%202.66946%202.25%203.1875V5.625H0.75L0.75%203.1875Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M0.75%2014.8125L0.75%2012.375H2.25V14.8125C2.25%2015.3305%202.66946%2015.75%203.1875%2015.75H5.625V17.25H3.1875C1.84104%2017.25%200.75%2016.159%200.75%2014.8125Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M15.75%2014.8125V12.375H17.25V14.8125C17.25%2016.159%2016.159%2017.25%2014.8125%2017.25H12.375V15.75H14.8125C15.3305%2015.75%2015.75%2015.3305%2015.75%2014.8125Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M15.75%203.1875C15.75%202.66946%2015.3305%202.25%2014.8125%202.25H12.375V0.75L14.8125%200.75C16.159%200.75%2017.25%201.84104%2017.25%203.1875V5.625H15.75V3.1875Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M10.8889%2010.5C11.6372%2010.5%2012.3895%2010.6845%2012.991%2011.053L12.9902%2011.0537C13.3468%2011.2719%2013.6565%2011.5584%2013.8684%2011.9092L14.5298%2013.0049L13.2451%2013.7798L12.5845%2012.6841C12.5191%2012.576%2012.3992%2012.4499%2012.2073%2012.3325C11.8787%2012.1312%2011.4076%2012%2010.8889%2012H7.11108C6.59216%2012%206.1214%2012.1305%205.79199%2012.3318L5.79272%2012.3325C5.64854%2012.4207%205.54509%2012.5138%205.47485%2012.6006L5.41553%2012.6841L4.75488%2013.7798L3.47021%2013.0049L4.13086%2011.9092C4.34281%2011.5583%204.6531%2011.2712%205.00977%2011.053C5.6104%2010.6859%206.36112%2010.5%207.11108%2010.5H10.8889Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M10.5%206.75C10.5%205.92157%209.82843%205.25%209%205.25C8.17157%205.25%207.5%205.92157%207.5%206.75C7.5%207.57843%208.17157%208.25%209%208.25C9.82843%208.25%2010.5%207.57843%2010.5%206.75ZM12%206.75C12%208.40685%2010.6569%209.75%209%209.75C7.34315%209.75%206%208.40685%206%206.75C6%205.09315%207.34315%203.75%209%203.75C10.6569%203.75%2012%205.09315%2012%206.75Z'%20fill='%23FDFCFC'/%3e%3c/svg%3e",gu="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.25%2014.8125C2.25%2015.3305%202.66946%2015.75%203.1875%2015.75H5.625V17.25H3.1875C1.84104%2017.25%200.75%2016.159%200.75%2014.8125L0.75%2012.375H2.25V14.8125ZM17.25%2014.8125C17.25%2016.159%2016.159%2017.25%2014.8125%2017.25H12.375L12.375%2015.75H14.8125C15.3305%2015.75%2015.75%2015.3305%2015.75%2014.8125V12.375L17.25%2012.375V14.8125ZM14.135%206.35229C14.2958%206.19142%2014.5379%206.14314%2014.748%206.22998C14.9583%206.31702%2015.0959%206.52245%2015.0959%206.75V10.5015C15.0959%2010.812%2014.8439%2011.0638%2014.5334%2011.064C14.2228%2011.0639%2013.9709%2010.8121%2013.9709%2010.5015V8.10571C13.7502%208.30415%2013.4107%208.29824%2013.1982%208.08594C12.9785%207.86637%2012.9787%207.51027%2013.1982%207.29053L14.135%206.35229ZM11.3298%206.19336C11.5137%206.21969%2011.6748%206.33566%2011.7568%206.5061C11.8505%206.70099%2011.8245%206.93272%2011.6895%207.10156L9.42041%209.9375H11.25C11.5607%209.9375%2011.8125%2010.1893%2011.8125%2010.5C11.8125%2010.8107%2011.5607%2011.0625%2011.25%2011.0625H8.25C8.03386%2011.0625%207.83688%2010.9386%207.74316%2010.7439C7.6495%2010.549%207.67547%2010.3173%207.81055%2010.1484L10.0796%207.3125L8.25%207.3125C7.93934%207.3125%207.6875%207.06066%207.6875%206.75C7.6875%206.43934%207.93934%206.1875%208.25%206.1875L11.25%206.1875L11.3298%206.19336ZM5.25%206.19482C5.45567%206.22809%205.62952%206.37352%205.69531%206.57642L6.9104%2010.3264C7.00614%2010.6219%206.84405%2010.9396%206.54858%2011.0354C6.25308%2011.1311%205.93539%2010.9691%205.8396%2010.6736L5.72241%2010.3125H3.65259L3.5354%2010.6736C3.43961%2010.9691%203.12192%2011.1311%202.82642%2011.0354C2.53095%2010.9396%202.36886%2010.6219%202.4646%2010.3264L2.68579%209.6416C2.69424%209.59828%202.7083%209.55696%202.72607%209.51782L3.67969%206.57642L3.71411%206.49365C3.80908%206.30792%204.00155%206.1875%204.21509%206.1875H5.15991L5.25%206.19482ZM4.0166%209.1875H5.3584L4.75122%207.3125H4.62378L4.0166%209.1875ZM5.625%202.25H3.1875C2.66946%202.25%202.25%202.66946%202.25%203.1875V5.625H0.75L0.75%203.1875C0.75%201.84104%201.84104%200.75%203.1875%200.75L5.625%200.75V2.25ZM14.8125%200.75C16.159%200.75%2017.25%201.84104%2017.25%203.1875V5.625H15.75V3.1875C15.75%202.66946%2015.3305%202.25%2014.8125%202.25H12.375V0.75L14.8125%200.75Z'%20fill='%23FDFCFC'/%3e%3c/svg%3e",Dr="Facial",jr="LPR",Bv=[Dr,jr];function $v(e){return e===Dr?y.jsx("img",{src:pu,alt:"Facial",width:16,height:16,style:{display:"block"}}):e===jr?y.jsx("img",{src:gu,alt:"LPR",width:16,height:16,style:{display:"block"}}):null}function Nv(e){if(!e||!Array.isArray(e)||e.length===0)return;const t={};return e.forEach(n=>{const r=n.algorithm;r&&Bv.includes(r)&&(t[r]=(t[r]||0)+1)}),Object.entries(t).map(([n,r])=>({count:r,icon:$v(n)}))}const Vv="_spotWrapper_dvp29_1",Fv="_mapSpot_dvp29_8",zv="_selected_dvp29_27",Wv="_count_dvp29_31",Uv="_countSelected_dvp29_39",Hv="_cameraTypesContainer_dvp29_43",Gv="_cameraTypeItem_dvp29_50",Kv="_cameraTypeCount_dvp29_57",Yv="_cameraTypeIcon_dvp29_64",Je={spotWrapper:Vv,mapSpot:Fv,selected:zv,count:Wv,countSelected:Uv,cameraTypesContainer:Hv,cameraTypeItem:Gv,cameraTypeCount:Kv,cameraTypeIcon:Yv},Zv=er(A.Box),qv=16,Ks=({count:e,addressText:t,cameras:n,currentZoom:r=13,isSelected:o,disableClick:s=!1,className:i,onClick:a,sx:c})=>{const u=x.useMemo(()=>Nv(n),[n]),d=u&&u.length>0&&r>=qv;return y.jsx("div",{className:Je.spotWrapper,children:y.jsx(Zv,{className:`${Je.mapSpot} ${o?Je.selected:""} ${i||""}`,onClick:s?void 0:a,sx:{...c},animate:{width:d?"auto":30,height:d?"auto":30,borderRadius:"100px",backgroundColor:o?"var(--Tertiary-Tertiary, #7FCFCF)":d?"var(--Surface-Surface-Tint, #5E5E5E)":"var(--Surface-Inverse-Surface, #3B3B3C)",padding:d?"4px 8px":0,borderWidth:o?1:0,borderStyle:"solid",borderColor:o?"var(--Tertiary-On-Tertiary, #ffffff)":"transparent"},transition:{duration:.2,ease:"easeInOut"},children:y.jsx(ky,{mode:"wait",children:d?y.jsx(er.div,{className:Je.cameraTypesContainer,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2,ease:"easeInOut"},children:u.map((f,h)=>y.jsxs(er.div,{className:Je.cameraTypeItem,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:h*.05},children:[y.jsx(A.Typography,{className:Je.cameraTypeCount,children:f.count}),f.icon&&y.jsx(A.Box,{className:Je.cameraTypeIcon,children:f.icon})]},h))},"expanded"):y.jsx(er.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2,ease:"easeInOut"},children:y.jsx(A.Typography,{className:`${Je.count} ${o?Je.countSelected:""}`,children:e})},"collapsed")})})})};Ks.displayName="MapSpot";const Xv="_cameraCard_1hvrf_2",Jv="_topContainer_1hvrf_52",Qv="_mediaImage_1hvrf_66",e1="_mediaPlaceholder_1hvrf_73",t1="_menuButton_1hvrf_79",n1="_menuButtonIcon_1hvrf_98",r1="_bottomContainer_1hvrf_104",o1="_infoRow_1hvrf_116",s1="_iconWrapper_1hvrf_123",i1="_cameraIcon_1hvrf_131",a1="_cameraTypeImage_1hvrf_138",c1="_textColumn_1hvrf_146",l1="_headerText_1hvrf_155",u1="_subheadText_1hvrf_165",d1="_streetText_1hvrf_175",f1="_supportText_1hvrf_176",h1="_tagsContainer_1hvrf_186",m1="_tag_1hvrf_186",p1="_tagOverflow_1hvrf_199",g1="_cameraCardMenuPaper_1hvrf_220",y1="_cameraCardMenuList_1hvrf_244",v1="_cameraCardMenuItem_1hvrf_252",b1="_cameraCardMenuItemText_1hvrf_291",de={cameraCard:Xv,topContainer:Jv,mediaImage:Qv,mediaPlaceholder:e1,menuButton:t1,menuButtonIcon:n1,bottomContainer:r1,infoRow:o1,iconWrapper:s1,cameraIcon:i1,cameraTypeImage:a1,textColumn:c1,headerText:l1,subheadText:u1,streetText:d1,supportText:f1,tagsContainer:h1,tag:m1,tagOverflow:p1,cameraCardMenuPaper:g1,cameraCardMenuList:y1,cameraCardMenuItem:v1,cameraCardMenuItemText:b1};function x1(e){return e===Dr?y.jsx("img",{src:pu,alt:"Facial",width:20,height:20,className:de.cameraTypeImage}):e===jr?y.jsx("img",{src:gu,alt:"LPR",width:20,height:20,className:de.cameraTypeImage}):y.jsx(Oe.VideocamOutlined,{className:de.cameraIcon})}const S1=({cameraName:e,streetName:t,pointName:n,neighborhoodAndCity:r,tags:o=[],imageUrl:s,algorithm:i,menuItems:a,onMenuClick:c,className:u})=>{const d=X.useTheme().palette.mode==="dark",f=r??"",h=n??"",p=x.useRef(null),m=x.useRef(null),[v,S]=x.useState(o.length),[T,b]=x.useState(!1),w=x.useRef(!1),C=((a==null?void 0:a.length)??0)>0||c,E=((a==null?void 0:a.length)??0)>0;x.useLayoutEffect(()=>{o.length!==0&&(S(o.length),w.current=!1)},[o.length]),x.useLayoutEffect(()=>{const D=p.current;if(!D||o.length===0)return;const g=()=>{if(!D)return;const{scrollWidth:R,clientWidth:W}=D;R>W?(w.current=!0,S(K=>Math.max(0,K-1))):!w.current&&v<o.length?S(K=>Math.min(o.length,K+1)):w.current=!1};g();const $=new ResizeObserver(g);return $.observe(D),()=>$.disconnect()},[o.length,v]);const P=v<o.length,M=P?o.slice(0,v):o,I=P?o.length-v:0,V=o.length>0?o.join(", "):"";return y.jsxs(A.Box,{className:`${de.cameraCard} ${u||""}`.trim(),"data-theme":d?"dark":"light",children:[y.jsxs(A.Box,{className:de.topContainer,children:[s?y.jsx("img",{src:s,alt:"",className:de.mediaImage}):y.jsx(A.Box,{className:de.mediaPlaceholder,"aria-hidden":!0}),C&&y.jsx(A.IconButton,{ref:m,onClick:()=>{E?b(!0):c==null||c()},className:de.menuButton,"aria-label":"Opções","aria-haspopup":E?"menu":void 0,"aria-expanded":T,size:"small",children:y.jsx(Oe.MoreHoriz,{className:de.menuButtonIcon})})]}),E&&y.jsx(A.Popover,{open:T,anchorEl:m.current,onClose:()=>b(!1),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{elevation:0,sx:{padding:0,background:"transparent",marginLeft:2}}},children:y.jsx(A.Box,{className:de.cameraCardMenuPaper,"data-theme":d?"dark":"light",children:y.jsx(A.Box,{className:de.cameraCardMenuList,role:"menu",children:a.map(D=>y.jsx("button",{type:"button",className:de.cameraCardMenuItem,role:"menuitem",onClick:()=>{var g;(g=D.onClick)==null||g.call(D),b(!1)},children:y.jsx("span",{className:de.cameraCardMenuItemText,children:D.label})},D.label))})})}),y.jsxs(A.Box,{className:de.bottomContainer,children:[y.jsxs(A.Box,{className:de.infoRow,children:[y.jsx(A.Box,{className:de.iconWrapper,children:x1(i)}),y.jsxs(A.Box,{className:de.textColumn,children:[y.jsx("span",{className:de.headerText,children:e}),h&&y.jsx("span",{className:de.subheadText,children:h}),y.jsx("span",{className:de.streetText,children:t}),f&&y.jsx("span",{className:de.supportText,children:f})]})]}),o.length>0&&y.jsx(A.Tooltip,{title:V,placement:"top",enterDelay:300,children:y.jsxs(A.Box,{ref:p,className:de.tagsContainer,component:"span",tabIndex:0,role:"group","aria-label":"Tags da câmera",children:[M.map(D=>y.jsx("span",{className:de.tag,children:D},D)),P&&y.jsxs("span",{className:de.tagOverflow,children:["+",I]})]})})]})]})},T1=(e,t=1,n=13)=>()=>{if(!e)return;const r=e.getZoom()??n;e.setZoom(r+t)},C1=(e,t=1,n=1,r=13)=>()=>{if(!e)return;const o=e.getZoom()??r;e.setZoom(Math.max(n,o-t))},w1="_container_1whpg_2",_1="_zoomButton_1whpg_10",E1="_stateLayer_1whpg_43",A1="_icon_1whpg_59",Ke={container:w1,zoomButton:_1,stateLayer:E1,icon:A1},M1=({map:e,className:t,sx:n,zoomIncrement:r=1,minZoom:o=1,fallbackZoom:s=13,onFullscreen:i})=>{const c=A.useTheme().palette.mode==="dark",u=T1(e,r,s),l=C1(e,r,o,s),d={backgroundColor:c?"#DEDDDD":"#101111","&:hover":{backgroundColor:c?"#DEDDDD":"#101111",opacity:.9}},f={fill:c?"#101111":"#FDFCFC",color:c?"#101111":"#FDFCFC"};return y.jsxs(A.Box,{className:`${Ke.container} ${t||""}`,sx:n,children:[y.jsx(A.IconButton,{className:Ke.zoomButton,onClick:u,"aria-label":"Zoom in",sx:d,children:y.jsx(A.Box,{className:Ke.stateLayer,children:y.jsx(Oe.Add,{className:Ke.icon,sx:f})})}),y.jsx(A.IconButton,{className:Ke.zoomButton,onClick:l,"aria-label":"Zoom out",sx:d,children:y.jsx(A.Box,{className:Ke.stateLayer,children:y.jsx(Oe.Remove,{className:Ke.icon,sx:f})})}),y.jsx(A.IconButton,{className:Ke.zoomButton,onClick:i,"aria-label":"Fullscreen",sx:d,children:y.jsx(A.Box,{className:Ke.stateLayer,children:y.jsx(Oe.ZoomOutMap,{className:Ke.icon,sx:f})})})]})};var P1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const k1=lc(P1),I1="1.7.1";function Kt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Qo(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(l){try{u(r.next(l))}catch(d){i(d)}}function c(l){try{u(r.throw(l))}catch(d){i(d)}}function u(l){l.done?s(l.value):o(l.value).then(a,c)}u((r=r.apply(e,[])).next())})}const et={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},R1="https://maps.googleapis.com/maps/api/js";class hr{static load(t,n){return Qo(this,void 0,void 0,function*(){var r,o;const s=t.libraries?t.libraries.split(","):[],i=this.serializeParams(t);this.listeners.push(n),!((o=(r=window.google)===null||r===void 0?void 0:r.maps)===null||o===void 0)&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=et.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=i,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==i&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...s];yield Promise.all(a.map(c=>google.maps.importLibrary(c)))})}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var i;const a=document.createElement("script"),c=new URLSearchParams;for(const[u,l]of Object.entries(t)){const d=u.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());c.set(d,String(l))}c.set("loading","async"),c.set("callback","__googleMapsCallback__"),a.async=!0,a.src=R1+"?"+c.toString(),a.nonce=((i=document.querySelector("script[nonce]"))===null||i===void 0?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=et.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=et.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=et.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=et.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}hr.loadingStatus=et.NOT_LOADED;hr.listeners=[];const O1="GMP_visgl_rgmlibrary_v1_default",L1=[`gmp_visgl_reactgooglemaps_v${I1}`],On=x.createContext(null);function D1(){const[e,t]=x.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Object.assign(Object.assign({},a),{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>{var a=s;i[a];var c=Kt(i,[typeof a=="symbol"?a:a+""]);return c})},clearMapInstances:()=>{t({})}}}function j1(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=Kt(e,["onLoad","onError","apiKey","version","libraries"]),[a,c]=x.useState(hr.loadingStatus),[u,l]=x.useReducer((p,m)=>p[m.name]?p:Object.assign(Object.assign({},p),{[m.name]:m.value}),{}),d=x.useMemo(()=>s==null?void 0:s.join(","),[s]),f=x.useMemo(()=>JSON.stringify(Object.assign({apiKey:r,version:o},i)),[r,o,i]),h=x.useCallback(p=>Qo(this,void 0,void 0,function*(){var m;if(u[p])return u[p];if(!(!((m=google==null?void 0:google.maps)===null||m===void 0)&&m.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const v=yield window.google.maps.importLibrary(p);return l({name:p,value:v}),v}),[u]);return x.useEffect(()=>{Qo(this,void 0,void 0,function*(){try{const p=Object.assign({key:r},i);o&&(p.v=o),(d==null?void 0:d.length)>0&&(p.libraries=d),(p.channel===void 0||p.channel<0||p.channel>999)&&delete p.channel,p.solutionChannel===void 0?p.solutionChannel=O1:p.solutionChannel===""&&delete p.solutionChannel,yield hr.load(p,m=>c(m));for(const m of["core","maps",...s])yield h(m);t&&t()}catch(p){n?n(p):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",p)}})},[r,d,f]),{status:a,loadedLibraries:u,importLibrary:h}}function B1(e){return x.useMemo(()=>e.disableUsageAttribution?null:L1,[e.disableUsageAttribution])}const $1=e=>{const{children:t}=e,n=Kt(e,["children"]),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=D1(),{status:a,loadedLibraries:c,importLibrary:u}=j1(n),l=B1(n),d=x.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:c,importLibrary:u,internalUsageAttributionIds:l}),[r,o,s,i,a,c,u,l]);return x.createElement(On.Provider,{value:d},t)};function N1(e,t){for(const n of W1){const r=t[n],o=yu[n];x.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(V1(o,e,i))});return()=>s.remove()},[e,o,r])}}function V1(e,t,n){var r;const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(F1.includes(e)){const s=o,i=t.getCenter(),a=t.getZoom(),c=t.getHeading()||0,u=t.getTilt()||0,l=t.getBounds();return(!i||!l||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:c,tilt:u,bounds:(l==null?void 0:l.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(z1.includes(e)){if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)===null||r===void 0?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const yu={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},F1=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],z1=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],W1=Object.keys(yu);function U1(e){const t=x.useRef(void 0);return x.useEffect(()=>{t.current=e}),t.current}function H1(e,t){const n=U1(e);return x.useMemo(()=>n&&t(n,e)?n:e,[e,n,t])}function G1(e,t,n){x.useEffect(e,[H1(t,n)])}function K1(e,t){G1(e,t,k1)}const Y1=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Z1(e,t){const n={},r=Object.keys(t);for(const o of r)Y1.has(o)&&(n[o]=t[o]);K1(()=>{e&&e.setOptions(n)},[n])}function vu(){var e;return((e=x.useContext(On))===null||e===void 0?void 0:e.status)||et.NOT_LOADED}function q1(e,t){const{viewport:n,viewState:r}=t,o=!!n;return x.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:c,zoom:u}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:c,zoom:u+1})},[e,r]),o}function X1(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function bu(e){return X1(e)?e:e.toJSON()}function J1(e,t,n){const r=n.center?bu(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,c=Number.isFinite(n.tilt)?n.tilt:null;x.useLayoutEffect(()=>{if(!e)return;const u={};let l=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(u.center={lat:o,lng:s},l=!0),i!==null&&t.current.zoom!==i&&(u.zoom=i,l=!0),a!==null&&t.current.heading!==a&&(u.heading=a,l=!0),c!==null&&t.current.tilt!==c&&(u.tilt=c,l=!0),l&&e.moveCamera(u)})}const Q1=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return x.createElement("div",{style:e},x.createElement("h2",null,"Error: AuthFailure"),x.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",x.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function eb(){const[e,t]=x.useState(null),n=x.useCallback(r=>t(r),[t]);return[e,n]}function xu(){return vu()===et.LOADED}function tb(){const[,e]=x.useReducer(t=>t+1,0);return e}function nb(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function rb(e){const t=tb(),n=x.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return x.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{nb(e,n),t()});return()=>r.remove()},[e,t]),n}class tr{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}tr.entries={};function ob(e,t){const n=xu(),[r,o]=x.useState(null),[s,i]=eb(),a=rb(r),{id:c,defaultBounds:u,defaultCenter:l,defaultZoom:d,defaultHeading:f,defaultTilt:h,reuseMaps:p,renderingType:m,colorScheme:v}=e,S=Kt(e,["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"]),T=e.zoom!==void 0||e.defaultZoom!==void 0,b=e.center!==void 0||e.defaultCenter!==void 0;!u&&(!T||!b)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!S.center&&l&&(S.center=l),!S.zoom&&Number.isFinite(d)&&(S.zoom=d),!S.heading&&Number.isFinite(f)&&(S.heading=f),!S.tilt&&Number.isFinite(h)&&(S.tilt=h);const w=S.internalUsageAttributionIds;w==null?S.internalUsageAttributionIds=t.internalUsageAttributionIds:S.internalUsageAttributionIds=[...t.internalUsageAttributionIds||[],...w];for(const E of Object.keys(S))S[E]===void 0&&delete S[E];const C=x.useRef(void 0);return x.useEffect(()=>{if(!s||!n)return;const{addMapInstance:E,removeMapInstance:P}=t,{mapId:M}=e,I=`${M||"default"}:${m||"default"}:${v||"LIGHT"}`;let V,D;if(p&&tr.has(I)?(D=tr.pop(I),V=D.getDiv(),s.appendChild(V),D.setOptions(S),setTimeout(()=>D.setCenter(D.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",s.appendChild(V),D=new google.maps.Map(V,Object.assign(Object.assign(Object.assign({},S),m?{renderingType:m}:{}),v?{colorScheme:v}:{}))),o(D),E(D,c),u){const{padding:g}=u,$=Kt(u,["padding"]);D.fitBounds($,g)}else(!T||!b)&&D.fitBounds({east:180,west:-180,south:-90,north:90});if(C.current){const{mapId:g,cameraState:$}=C.current;g!==M&&D.setOptions($)}return()=>{C.current={mapId:M,cameraState:a.current},V.remove(),p?tr.push(I,D):google.maps.event.clearInstanceListeners(D),o(null),P(c)}},[s,n,c,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const Su=x.createContext(null),Tu=e=>{const{children:t,id:n,className:r,style:o}=e,s=x.useContext(On),i=vu();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,c,u]=ob(e,s);J1(a,u,e),N1(a,e),Z1(a,e);const l=q1(a,e),d=!!e.controlled;x.useEffect(()=>{if(a)return l&&a.setOptions({disableDefaultUI:!0}),(l||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,l,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?bu(e.center):null;let h=null,p=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(h=f.lat,p=f.lng);const m=x.useMemo(()=>{var T,b,w;return{center:{lat:h??0,lng:p??0},zoom:(T=e.zoom)!==null&&T!==void 0?T:0,heading:(b=e.heading)!==null&&b!==void 0?b:0,tilt:(w=e.tilt)!==null&&w!==void 0?w:0}},[h,p,e.zoom,e.heading,e.tilt]);x.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(m);const T=a.addListener("bounds_changed",()=>{a.moveCamera(m)});return()=>T.remove()},[a,d,m]);const v=x.useMemo(()=>Object.assign({width:"100%",height:"100%",position:"relative",zIndex:l?-1:0},o),[o,l]),S=x.useMemo(()=>({map:a}),[a]);return i===et.AUTH_FAILURE?x.createElement("div",{style:Object.assign({position:"relative"},r?{}:v),className:r},x.createElement(Q1,null)):x.createElement("div",Object.assign({ref:c,"data-testid":"map",style:r?void 0:v,className:r},n?{id:n}:{}),a?x.createElement(Su.Provider,{value:S},t):null)};Tu.deckGLViewProps=!0;const qa=new Set;function sb(...e){const t=JSON.stringify(e);qa.has(t)||(qa.add(t),console.error(...e))}const Br=(e=null)=>{const t=x.useContext(On),{map:n}=x.useContext(Su)||{};if(t===null)return sb("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function ib(e){const t=xu(),n=x.useContext(On);return x.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function Wn(e,t,n){x.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Un(e,t,n){x.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function Xa(e,t,n){x.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}class ab{constructor(){this.renderedStyles=new Set,this.styleElement=null}getStyleElement(){return this.styleElement||(this.styleElement=document.createElement("style"),this.styleElement.setAttribute("data-rgm-anchor-styles",""),document.head.appendChild(this.styleElement)),this.styleElement}addAdvancedMarkerPointerEventsOverwrite(){if(this.renderedStyles.has("marker-pointer-events"))return;const t=this.getStyleElement();t.textContent+=`
103
+ `),()=>{T.contains(C)&&T.removeChild(C)}},[t]),g.jsx(e1,{isPresent:t,childRef:i,sizeRef:a,children:Fe.cloneElement(e,{ref:c})})}const n1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a,anchorY:l,root:u})=>{const c=Es(r1),d=x.useId();let f=!0,h=x.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:p=>{c.set(p,!0);for(const m of c.values())if(!m)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return s&&f&&(h={...h}),x.useMemo(()=>{c.forEach((p,m)=>c.set(m,!1))},[n]),Fe.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),i==="popLayout"&&(e=g.jsx(t1,{isPresent:n,anchorX:a,anchorY:l,root:u,children:e})),g.jsx(Nr.Provider,{value:h,children:e})};function r1(){return new Map}function xu(e=!0){const t=x.useContext(Nr);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=x.useId();x.useEffect(()=>{if(e)return o(s)},[e]);const i=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Kn=e=>e.key||"";function Za(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const o1=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,d]=xu(i),f=x.useMemo(()=>Za(e),[e]),h=i&&!c?[]:f.map(Kn),p=x.useRef(!0),m=x.useRef(f),v=Es(()=>new Map),S=x.useRef(new Set),[_,b]=x.useState(f),[C,T]=x.useState(f);Jl(()=>{p.current=!1,m.current=f;for(let M=0;M<C.length;M++){const I=Kn(C[M]);h.includes(I)?(v.delete(I),S.current.delete(I)):v.get(I)!==!0&&v.set(I,!1)}},[C,h.length,h.join("-")]);const w=[];if(f!==_){let M=[...f];for(let I=0;I<C.length;I++){const V=C[I],$=Kn(V);h.includes($)||(M.splice(I,0,V),w.push(V))}return s==="wait"&&w.length&&(M=w),T(Za(M)),b(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&C.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=x.useContext(_s);return g.jsx(g.Fragment,{children:C.map(M=>{const I=Kn(M),V=i&&!c?!1:f===C||h.includes(I),$=()=>{if(S.current.has(I))return;if(S.current.add(I),v.has(I))v.set(I,!0);else return;let y=!0;v.forEach(R=>{R||(y=!1)}),y&&(P==null||P(),T(m.current),i&&(d==null||d()),r&&r())};return g.jsx(n1,{isPresent:V,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:u,onExitComplete:V?void 0:$,anchorX:a,anchorY:l,children:M},I)})})},Su=x.createContext({strict:!1}),qa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Xa=!1;function s1(){if(Xa)return;const e={};for(const t in qa)e[t]={isEnabled:n=>qa[t].some(r=>!!n[r])};qc(e),Xa=!0}function Cu(){return s1(),U0()}function i1(e){const t=Cu();for(const n in e)t[n]={...t[n],...e[n]};qc(t)}const a1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function xr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||a1.has(e)}let Tu=e=>!xr(e);function l1(e){typeof e=="function"&&(Tu=t=>t.startsWith("on")?!xr(t):e(t))}try{l1(require("@emotion/is-prop-valid").default)}catch{}function c1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Tu(o)||n===!0&&xr(o)||!t&&!xr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const zr=x.createContext({});function u1(e,t){if(Fr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||In(n)?n:void 0,animate:In(r)?r:void 0}}return e.inherit!==!1?t:{}}function d1(e){const{initial:t,animate:n}=u1(e,x.useContext(zr));return x.useMemo(()=>({initial:t,animate:n}),[Ja(t),Ja(n)])}function Ja(e){return Array.isArray(e)?e.join(" "):e}const ti=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wu(e,t,n){for(const r in t)!Pe(t[r])&&!ru(r,n)&&(e[r]=t[r])}function f1({transformTemplate:e},t){return x.useMemo(()=>{const n=ti();return Js(n,t,e),Object.assign({},n.vars,n.style)},[t])}function h1(e,t){const n=e.style||{},r={};return wu(r,n,e),Object.assign(r,f1(e,t)),r}function m1(e,t){const n={},r=h1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const _u=()=>({...ti(),attrs:{}});function p1(e,t,n,r){const o=x.useMemo(()=>{const s=_u();return ou(s,t,iu(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};wu(s,e.style,e),o.style={...s,...o.style}}return o}const g1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ni(e){return typeof e!="string"||e.includes("-")?!1:!!(g1.indexOf(e)>-1||/[A-Z]/u.test(e))}function y1(e,t,n,{latestValues:r},o,s=!1,i){const l=(i??ni(e)?p1:m1)(t,r,o,e),u=c1(t,typeof e=="string",s),c=e!==x.Fragment?{...u,...l,ref:n}:{},{children:d}=t,f=x.useMemo(()=>Pe(d)?d.get():d,[d]);return x.createElement(e,{...c,children:f})}function v1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:b1(n,r,o,e),renderState:t()}}function b1(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=sr(s[f]);let{initial:i,animate:a}=e;const l=Fr(e),u=Zc(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const d=c?a:i;if(d&&typeof d!="boolean"&&!Vr(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Hs(e,f[h]);if(p){const{transitionEnd:m,transition:v,...S}=p;for(const _ in S){let b=S[_];if(Array.isArray(b)){const C=c?b.length-1:0;b=b[C]}b!==null&&(o[_]=b)}for(const _ in m)o[_]=m[_]}}}return o}const Eu=e=>(t,n)=>{const r=x.useContext(zr),o=x.useContext(Nr),s=()=>v1(e,t,r,o);return n?s():Es(s)},x1=Eu({scrapeMotionValuesFromProps:Qs,createRenderState:ti}),S1=Eu({scrapeMotionValuesFromProps:au,createRenderState:_u}),C1=Symbol.for("motionComponentSymbol");function T1(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const o=x.useRef(null);return x.useCallback(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());const i=r.current;if(typeof i=="function")if(s){const l=i(s);typeof l=="function"&&(o.current=l)}else o.current?(o.current(),o.current=null):i(s);else i&&(i.current=s)},[t])}const Au=x.createContext({});function xn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function w1(e,t,n,r,o,s){var S,_;const{visualElement:i}=x.useContext(zr),a=x.useContext(Su),l=x.useContext(Nr),u=x.useContext(ei).reducedMotion,c=x.useRef(null),d=x.useRef(!1);r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,isSVG:s}),d.current&&c.current&&(c.current.manuallyAnimateOnMount=!0));const f=c.current,h=x.useContext(Au);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&_1(c.current,n,o,h);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,l)});const m=n[jc],v=x.useRef(!!m&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,m))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,m)));return Jl(()=>{d.current=!0,f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,m)}),v.current=!1),f.enteringChildren=void 0)}),f}function _1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Mu(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&xn(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function Mu(e){if(e)return e.options.allowProjection!==!1?e.projection:Mu(e.parent)}function go(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&i1(r);const s=n?n==="svg":ni(e),i=s?S1:x1;function a(u,c){let d;const f={...x.useContext(ei),...u,layoutId:E1(u)},{isStatic:h}=f,p=d1(u),m=i(u,h);if(!h&&Xl){A1(f,r);const v=M1(f);d=v.MeasureLayout,p.visualElement=w1(e,m,f,o,v.ProjectionNode,s)}return g.jsxs(zr.Provider,{value:p,children:[d&&p.visualElement?g.jsx(d,{visualElement:p.visualElement,...f}):null,y1(e,u,T1(m,p.visualElement,c),m,h,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=x.forwardRef(a);return l[C1]=e,l}function E1({layoutId:e}){const t=x.useContext(_s).id;return t&&e!==void 0?t+"-"+e:e}function A1(e,t){const n=x.useContext(Su).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Jt(!1,r,"lazy-strict-mode"):it(!1,r,"lazy-strict-mode")}}function M1(e){const t=Cu(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function P1(e,t){if(typeof Proxy>"u")return go;const n=new Map,r=(s,i)=>go(s,i,e,t),o=(s,i)=>(process.env.NODE_ENV!=="production"&&Is(!1,"motion() is deprecated. Use motion.create() instead."),r(s,i));return new Proxy(o,{get:(s,i)=>i==="create"?r:(n.has(i)||n.set(i,go(i,void 0,e,t)),n.get(i))})}const k1=(e,t)=>t.isSVG??ni(e)?new ay(t):new ty(t,{allowProjection:e!==x.Fragment});class I1 extends xt{constructor(t){super(t),t.animationState||(t.animationState=fy(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let R1=0;class O1 extends xt{constructor(){super(...arguments),this.id=R1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const L1={animation:{Feature:I1},exit:{Feature:O1}};function $n(e){return{point:{x:e.pageX,y:e.pageY}}}const j1=e=>t=>Zs(t)&&e(t,$n(t));function En(e,t,n,r){return Rn(e,t,j1(n),r)}const Pu=({current:e})=>e?e.ownerDocument.defaultView:null,Qa=(e,t)=>Math.abs(e-t);function D1(e,t){const n=Qa(e.x,t.x),r=Qa(e.y,t.y);return Math.sqrt(n**2+r**2)}const el=new Set(["auto","scroll"]);class ku{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=vo(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=D1(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:v}=h,{timestamp:S}=Me;this.history.push({...v,timestamp:S});const{onStart:_,onMove:b}=this.handlers;p||(_&&_(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=yo(p,this.transformPagePoint),ce.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:m,onSessionEnd:v,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=vo(h.type==="pointercancel"?this.lastMoveEventInfo:yo(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,_),v&&v(h,_)},!Zs(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=o||window;const l=$n(t),u=yo(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=Me;this.history=[{...c,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,vo(u,this.history)),this.removeListeners=jn(En(this.contextWindow,"pointermove",this.handlePointerMove),En(this.contextWindow,"pointerup",this.handlePointerUp),En(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(el.has(r.overflowX)||el.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),ce.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),yt(this.updatePoint)}}function yo(e,t){return t?{point:t(e.point)}:e}function tl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vo({point:e},t){return{point:e,delta:tl(e,Iu(t)),offset:tl(e,B1(t)),velocity:$1(t,.1)}}function B1(e){return e[0]}function Iu(e){return e[e.length-1]}function $1(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Iu(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ze(t)));)n--;if(!r)return{x:0,y:0};const s=Ne(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function N1(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?he(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?he(n,e,r.max):Math.min(e,n)),e}function nl(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function V1(e,{top:t,left:n,bottom:r,right:o}){return{x:nl(e.x,n,o),y:nl(e.y,t,r)}}function rl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function F1(e,t){return{x:rl(e.x,t.x),y:rl(e.y,t.y)}}function z1(e,t){let n=.5;const r=Re(e),o=Re(t);return o>r?n=Mn(t.min,t.max-r,e.min):r>o&&(n=Mn(e.min,e.max-o,t.min)),Xe(0,1,n)}function W1(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const is=.35;function U1(e=is){return e===!1?e=0:e===!0&&(e=is),{x:ol(e,"left","right"),y:ol(e,"top","bottom")}}function ol(e,t,n){return{min:sl(e,t),max:sl(e,n)}}function sl(e,t){return typeof e=="number"?e:e[t]||0}const H1=new WeakMap;class G1{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Te(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{n?(this.stopAnimation(),this.snapToCursor($n(d).point)):this.pauseAnimation()},i=(d,f)=>{this.stopAnimation();const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=R0(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Be(S=>{let _=this.getAxisMotionValue(S).get()||0;if(qe.test(_)){const{projection:b}=this.visualElement;if(b&&b.layout){const C=b.layout.layoutBox[S];C&&(_=Re(C)*(parseFloat(_)/100))}}this.originPoint[S]=_}),m&&ce.postRender(()=>m(d,f)),Jo(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:S}=f;if(p&&this.currentDirection===null){this.currentDirection=K1(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),v&&v(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Be(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ku(t,{onSessionStart:s,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Pu(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:i}=o;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&ce.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Yn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=N1(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&xn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=V1(r.layoutBox,t):this.constraints=!1,this.elastic=U1(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Be(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=W1(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xn(t))return!1;const r=t.current;it(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Z0(r,o.root,this.visualElement.getTransformPagePoint());let i=F1(o.layout.layoutBox,s);if(n){const a=n(G0(i));this.hasMutatedConstraints=!!a,a&&(i=Jc(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Be(c=>{if(!Yn(c,n,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jo(this.visualElement,t),r.start(Us(t,r,0,n,this.visualElement,!1))}stopAnimation(){Be(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Be(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Be(n=>{const{drag:r}=this.getProps();if(!Yn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-he(i,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Be(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=z1({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Be(i=>{if(!Yn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];a.set(he(l,u,o[i]))})}addListeners(){if(!this.visualElement.current)return;H1.set(this.visualElement,this);const t=this.visualElement.current,n=En(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps(),d=l.target,f=d!==t&&Gc(d);u&&c&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();xn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ce.read(r);const i=Rn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Be(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=is,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Yn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function K1(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Y1 extends xt{constructor(t){super(t),this.removeGroupControls=Ve,this.removeListeners=Ve,this.controls=new G1(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ve}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const il=e=>(t,n)=>{e&&ce.postRender(()=>e(t,n))};class Z1 extends xt{constructor(){super(...arguments),this.removePointerDownListener=Ve}onPointerDown(t){this.session=new ku(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pu(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:il(t),onStart:il(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&ce.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=En(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let bo=!1;class q1 extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),bo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ir.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),bo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||ce.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ys.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;bo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ru(e){const[t,n]=xu(),r=x.useContext(_s);return g.jsx(q1,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Au),isPresent:t,safeToRemove:n})}const X1={pan:{Feature:Z1},drag:{Feature:Y1,ProjectionNode:bu,MeasureLayout:Ru}};function al(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&ce.postRender(()=>s(t,$n(t)))}class J1 extends xt{mount(){const{current:t}=this.node;t&&(this.unmount=O0(t,(n,r)=>(al(this.node,r,"Start"),o=>al(this.node,o,"End"))))}unmount(){}}class Q1 extends xt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=jn(Rn(this.node.current,"focus",()=>this.onFocus()),Rn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ll(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&ce.postRender(()=>s(t,$n(t)))}class ev extends xt{mount(){const{current:t}=this.node;t&&(this.unmount=D0(t,(n,r)=>(ll(this.node,r,"Start"),(o,{success:s})=>ll(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const as=new WeakMap,xo=new WeakMap,tv=e=>{const t=as.get(e.target);t&&t(e)},nv=e=>{e.forEach(tv)};function rv({root:e,...t}){const n=e||document;xo.has(n)||xo.set(n,{});const r=xo.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(nv,{root:e,...t})),r[o]}function ov(e,t,n){const r=rv(t);return as.set(e,n),r.observe(e),()=>{as.delete(e),r.unobserve(e)}}const sv={some:0,all:1};class iv extends xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:sv[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return ov(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(av(t,n))&&this.startObserver()}unmount(){}}function av({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const lv={inView:{Feature:iv},tap:{Feature:ev},focus:{Feature:Q1},hover:{Feature:J1}},cv={layout:{ProjectionNode:bu,MeasureLayout:Ru}},uv={...L1,...lv,...X1,...cv},ar=P1(uv,k1),Ou="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%203.1875C0.75%201.84104%201.84104%200.75%203.1875%200.75L5.625%200.75V2.25H3.1875C2.66946%202.25%202.25%202.66946%202.25%203.1875V5.625H0.75L0.75%203.1875Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M0.75%2014.8125L0.75%2012.375H2.25V14.8125C2.25%2015.3305%202.66946%2015.75%203.1875%2015.75H5.625V17.25H3.1875C1.84104%2017.25%200.75%2016.159%200.75%2014.8125Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M15.75%2014.8125V12.375H17.25V14.8125C17.25%2016.159%2016.159%2017.25%2014.8125%2017.25H12.375V15.75H14.8125C15.3305%2015.75%2015.75%2015.3305%2015.75%2014.8125Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M15.75%203.1875C15.75%202.66946%2015.3305%202.25%2014.8125%202.25H12.375V0.75L14.8125%200.75C16.159%200.75%2017.25%201.84104%2017.25%203.1875V5.625H15.75V3.1875Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M10.8889%2010.5C11.6372%2010.5%2012.3895%2010.6845%2012.991%2011.053L12.9902%2011.0537C13.3468%2011.2719%2013.6565%2011.5584%2013.8684%2011.9092L14.5298%2013.0049L13.2451%2013.7798L12.5845%2012.6841C12.5191%2012.576%2012.3992%2012.4499%2012.2073%2012.3325C11.8787%2012.1312%2011.4076%2012%2010.8889%2012H7.11108C6.59216%2012%206.1214%2012.1305%205.79199%2012.3318L5.79272%2012.3325C5.64854%2012.4207%205.54509%2012.5138%205.47485%2012.6006L5.41553%2012.6841L4.75488%2013.7798L3.47021%2013.0049L4.13086%2011.9092C4.34281%2011.5583%204.6531%2011.2712%205.00977%2011.053C5.6104%2010.6859%206.36112%2010.5%207.11108%2010.5H10.8889Z'%20fill='%23FDFCFC'/%3e%3cpath%20d='M10.5%206.75C10.5%205.92157%209.82843%205.25%209%205.25C8.17157%205.25%207.5%205.92157%207.5%206.75C7.5%207.57843%208.17157%208.25%209%208.25C9.82843%208.25%2010.5%207.57843%2010.5%206.75ZM12%206.75C12%208.40685%2010.6569%209.75%209%209.75C7.34315%209.75%206%208.40685%206%206.75C6%205.09315%207.34315%203.75%209%203.75C10.6569%203.75%2012%205.09315%2012%206.75Z'%20fill='%23FDFCFC'/%3e%3c/svg%3e",Lu="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.25%2014.8125C2.25%2015.3305%202.66946%2015.75%203.1875%2015.75H5.625V17.25H3.1875C1.84104%2017.25%200.75%2016.159%200.75%2014.8125L0.75%2012.375H2.25V14.8125ZM17.25%2014.8125C17.25%2016.159%2016.159%2017.25%2014.8125%2017.25H12.375L12.375%2015.75H14.8125C15.3305%2015.75%2015.75%2015.3305%2015.75%2014.8125V12.375L17.25%2012.375V14.8125ZM14.135%206.35229C14.2958%206.19142%2014.5379%206.14314%2014.748%206.22998C14.9583%206.31702%2015.0959%206.52245%2015.0959%206.75V10.5015C15.0959%2010.812%2014.8439%2011.0638%2014.5334%2011.064C14.2228%2011.0639%2013.9709%2010.8121%2013.9709%2010.5015V8.10571C13.7502%208.30415%2013.4107%208.29824%2013.1982%208.08594C12.9785%207.86637%2012.9787%207.51027%2013.1982%207.29053L14.135%206.35229ZM11.3298%206.19336C11.5137%206.21969%2011.6748%206.33566%2011.7568%206.5061C11.8505%206.70099%2011.8245%206.93272%2011.6895%207.10156L9.42041%209.9375H11.25C11.5607%209.9375%2011.8125%2010.1893%2011.8125%2010.5C11.8125%2010.8107%2011.5607%2011.0625%2011.25%2011.0625H8.25C8.03386%2011.0625%207.83688%2010.9386%207.74316%2010.7439C7.6495%2010.549%207.67547%2010.3173%207.81055%2010.1484L10.0796%207.3125L8.25%207.3125C7.93934%207.3125%207.6875%207.06066%207.6875%206.75C7.6875%206.43934%207.93934%206.1875%208.25%206.1875L11.25%206.1875L11.3298%206.19336ZM5.25%206.19482C5.45567%206.22809%205.62952%206.37352%205.69531%206.57642L6.9104%2010.3264C7.00614%2010.6219%206.84405%2010.9396%206.54858%2011.0354C6.25308%2011.1311%205.93539%2010.9691%205.8396%2010.6736L5.72241%2010.3125H3.65259L3.5354%2010.6736C3.43961%2010.9691%203.12192%2011.1311%202.82642%2011.0354C2.53095%2010.9396%202.36886%2010.6219%202.4646%2010.3264L2.68579%209.6416C2.69424%209.59828%202.7083%209.55696%202.72607%209.51782L3.67969%206.57642L3.71411%206.49365C3.80908%206.30792%204.00155%206.1875%204.21509%206.1875H5.15991L5.25%206.19482ZM4.0166%209.1875H5.3584L4.75122%207.3125H4.62378L4.0166%209.1875ZM5.625%202.25H3.1875C2.66946%202.25%202.25%202.66946%202.25%203.1875V5.625H0.75L0.75%203.1875C0.75%201.84104%201.84104%200.75%203.1875%200.75L5.625%200.75V2.25ZM14.8125%200.75C16.159%200.75%2017.25%201.84104%2017.25%203.1875V5.625H15.75V3.1875C15.75%202.66946%2015.3305%202.25%2014.8125%202.25H12.375V0.75L14.8125%200.75Z'%20fill='%23FDFCFC'/%3e%3c/svg%3e",Wr="Facial",Ur="LPR",dv=[Wr,Ur];function fv(e){return e===Wr?g.jsx("img",{src:Ou,alt:"Facial",width:16,height:16,style:{display:"block"}}):e===Ur?g.jsx("img",{src:Lu,alt:"LPR",width:16,height:16,style:{display:"block"}}):null}function hv(e){if(!e||!Array.isArray(e)||e.length===0)return;const t={};return e.forEach(n=>{const r=n.algorithm;r&&dv.includes(r)&&(t[r]=(t[r]||0)+1)}),Object.entries(t).map(([n,r])=>({count:r,icon:fv(n)}))}const mv="_spotWrapper_1cdqg_1",pv="_mapSpot_1cdqg_8",gv="_selected_1cdqg_27",yv="_count_1cdqg_31",vv="_countSelected_1cdqg_43",bv="_cameraTypesContainer_1cdqg_47",xv="_cameraTypeItem_1cdqg_54",Sv="_cameraTypeCount_1cdqg_61",Cv="_cameraTypeIcon_1cdqg_72",et={spotWrapper:mv,mapSpot:pv,selected:gv,count:yv,countSelected:vv,cameraTypesContainer:bv,cameraTypeItem:xv,cameraTypeCount:Sv,cameraTypeIcon:Cv},Tv=ar(E.Box),wv=16,ri=({count:e,addressText:t,cameras:n,currentZoom:r=13,isSelected:o,disableClick:s=!1,className:i,onClick:a,sx:l})=>{const c=E.useTheme().palette.mode==="dark",d=x.useMemo(()=>hv(n),[n]),h=d&&d.length>0&&r>=wv,m=o?"var(--Tertiary-Tertiary, #7FCFCF)":c?"var(--Surface-Inverse-Surface, #C7C6C6)":"var(--Surface-Inverse-Surface, #3B3B3C)",v=8;return g.jsx("div",{className:et.spotWrapper,"data-theme":c?"dark":"light",children:g.jsx(Tv,{className:`${et.mapSpot} ${o?et.selected:""} ${i||""}`,onClick:s?void 0:a,sx:{...l,position:"relative",overflow:"visible","&::after":{content:'""',position:"absolute",bottom:0,left:"50%",transform:"translate(-50%, 100%)",width:0,height:0,borderLeft:`${v}px solid transparent`,borderRight:`${v}px solid transparent`,borderTop:`${v}px solid var(--arrow-color)`,filter:"drop-shadow(0px 1px 1px rgba(0, 0, 0, 0.2))",opacity:"var(--arrow-opacity)",zIndex:1,pointerEvents:"none"}},style:{"--arrow-color":m,"--arrow-opacity":h?1:0},animate:{width:h?"auto":30,height:h?"auto":30,borderRadius:"100px",backgroundColor:m,padding:h?"4px 8px":0,borderWidth:o?1:0,borderStyle:"solid",borderColor:o?"var(--Tertiary-On-Tertiary, #ffffff)":"transparent",y:h?-v:0,"--arrow-opacity":h?1:0},transition:{duration:.2,ease:"easeInOut"},children:g.jsx(o1,{mode:"wait",children:h?g.jsx(ar.div,{className:et.cameraTypesContainer,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2,ease:"easeInOut"},children:d.map((S,_)=>g.jsxs(ar.div,{className:et.cameraTypeItem,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:_*.05},children:[g.jsx(E.Typography,{className:et.cameraTypeCount,children:S.count}),S.icon&&g.jsx(E.Box,{className:et.cameraTypeIcon,children:S.icon})]},_))},"expanded"):g.jsx(ar.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2,ease:"easeInOut"},children:g.jsx(E.Typography,{className:`${et.count} ${o?et.countSelected:""}`,children:e})},"collapsed")})})})};ri.displayName="MapSpot";const _v="_cameraCard_1hvrf_2",Ev="_topContainer_1hvrf_52",Av="_mediaImage_1hvrf_66",Mv="_mediaPlaceholder_1hvrf_73",Pv="_menuButton_1hvrf_79",kv="_menuButtonIcon_1hvrf_98",Iv="_bottomContainer_1hvrf_104",Rv="_infoRow_1hvrf_116",Ov="_iconWrapper_1hvrf_123",Lv="_cameraIcon_1hvrf_131",jv="_cameraTypeImage_1hvrf_138",Dv="_textColumn_1hvrf_146",Bv="_headerText_1hvrf_155",$v="_subheadText_1hvrf_165",Nv="_streetText_1hvrf_175",Vv="_supportText_1hvrf_176",Fv="_tagsContainer_1hvrf_186",zv="_tag_1hvrf_186",Wv="_tagOverflow_1hvrf_199",Uv="_cameraCardMenuPaper_1hvrf_220",Hv="_cameraCardMenuList_1hvrf_244",Gv="_cameraCardMenuItem_1hvrf_252",Kv="_cameraCardMenuItemText_1hvrf_291",de={cameraCard:_v,topContainer:Ev,mediaImage:Av,mediaPlaceholder:Mv,menuButton:Pv,menuButtonIcon:kv,bottomContainer:Iv,infoRow:Rv,iconWrapper:Ov,cameraIcon:Lv,cameraTypeImage:jv,textColumn:Dv,headerText:Bv,subheadText:$v,streetText:Nv,supportText:Vv,tagsContainer:Fv,tag:zv,tagOverflow:Wv,cameraCardMenuPaper:Uv,cameraCardMenuList:Hv,cameraCardMenuItem:Gv,cameraCardMenuItemText:Kv};function Yv(e){return e===Wr?g.jsx("img",{src:Ou,alt:"Facial",width:20,height:20,className:de.cameraTypeImage}):e===Ur?g.jsx("img",{src:Lu,alt:"LPR",width:20,height:20,className:de.cameraTypeImage}):g.jsx(Le.VideocamOutlined,{className:de.cameraIcon})}const Zv=({cameraName:e,streetName:t,pointName:n,neighborhoodAndCity:r,tags:o=[],imageUrl:s,algorithm:i,menuItems:a,onMenuClick:l,className:u})=>{const d=X.useTheme().palette.mode==="dark",f=r??"",h=n??"",p=x.useRef(null),m=x.useRef(null),[v,S]=x.useState(o.length),[_,b]=x.useState(!1),C=x.useRef(!1),T=((a==null?void 0:a.length)??0)>0||l,w=((a==null?void 0:a.length)??0)>0;x.useLayoutEffect(()=>{o.length!==0&&(S(o.length),C.current=!1)},[o.length]),x.useLayoutEffect(()=>{const $=p.current;if(!$||o.length===0)return;const y=()=>{if(!$)return;const{scrollWidth:O,clientWidth:F}=$;O>F?(C.current=!0,S(U=>Math.max(0,U-1))):!C.current&&v<o.length?S(U=>Math.min(o.length,U+1)):C.current=!1};y();const R=new ResizeObserver(y);return R.observe($),()=>R.disconnect()},[o.length,v]);const P=v<o.length,M=P?o.slice(0,v):o,I=P?o.length-v:0,V=o.length>0?o.join(", "):"";return g.jsxs(E.Box,{className:`${de.cameraCard} ${u||""}`.trim(),"data-theme":d?"dark":"light",children:[g.jsxs(E.Box,{className:de.topContainer,children:[s?g.jsx("img",{src:s,alt:"",className:de.mediaImage}):g.jsx(E.Box,{className:de.mediaPlaceholder,"aria-hidden":!0}),T&&g.jsx(E.IconButton,{ref:m,onClick:()=>{w?b(!0):l==null||l()},className:de.menuButton,"aria-label":"Opções","aria-haspopup":w?"menu":void 0,"aria-expanded":_,size:"small",children:g.jsx(Le.MoreHoriz,{className:de.menuButtonIcon})})]}),w&&g.jsx(E.Popover,{open:_,anchorEl:m.current,onClose:()=>b(!1),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{elevation:0,sx:{padding:0,background:"transparent",marginLeft:2}}},children:g.jsx(E.Box,{className:de.cameraCardMenuPaper,"data-theme":d?"dark":"light",children:g.jsx(E.Box,{className:de.cameraCardMenuList,role:"menu",children:a.map($=>g.jsx("button",{type:"button",className:de.cameraCardMenuItem,role:"menuitem",onClick:()=>{var y;(y=$.onClick)==null||y.call($),b(!1)},children:g.jsx("span",{className:de.cameraCardMenuItemText,children:$.label})},$.label))})})}),g.jsxs(E.Box,{className:de.bottomContainer,children:[g.jsxs(E.Box,{className:de.infoRow,children:[g.jsx(E.Box,{className:de.iconWrapper,children:Yv(i)}),g.jsxs(E.Box,{className:de.textColumn,children:[g.jsx("span",{className:de.headerText,children:e}),h&&g.jsx("span",{className:de.subheadText,children:h}),g.jsx("span",{className:de.streetText,children:t}),f&&g.jsx("span",{className:de.supportText,children:f})]})]}),o.length>0&&g.jsx(E.Tooltip,{title:V,placement:"top",enterDelay:300,children:g.jsxs(E.Box,{ref:p,className:de.tagsContainer,component:"span",tabIndex:0,role:"group","aria-label":"Tags da câmera",children:[M.map($=>g.jsx("span",{className:de.tag,children:$},$)),P&&g.jsxs("span",{className:de.tagOverflow,children:["+",I]})]})})]})]})},qv=(e,t=1,n=13)=>()=>{if(!e)return;const r=e.getZoom()??n;e.setZoom(r+t)},Xv=(e,t=1,n=1,r=13)=>()=>{if(!e)return;const o=e.getZoom()??r;e.setZoom(Math.max(n,o-t))},Jv="_container_1whpg_2",Qv="_zoomButton_1whpg_10",eb="_stateLayer_1whpg_43",tb="_icon_1whpg_59",Ye={container:Jv,zoomButton:Qv,stateLayer:eb,icon:tb},nb=({map:e,className:t,sx:n,zoomIncrement:r=1,minZoom:o=1,fallbackZoom:s=13,onFullscreen:i})=>{const l=E.useTheme().palette.mode==="dark",u=qv(e,r,s),c=Xv(e,r,o,s),d={backgroundColor:l?"#DEDDDD":"#101111","&:hover":{backgroundColor:l?"#DEDDDD":"#101111",opacity:.9}},f={fill:l?"#101111":"#FDFCFC",color:l?"#101111":"#FDFCFC"};return g.jsxs(E.Box,{className:`${Ye.container} ${t||""}`,sx:n,children:[g.jsx(E.IconButton,{className:Ye.zoomButton,onClick:u,"aria-label":"Zoom in",sx:d,children:g.jsx(E.Box,{className:Ye.stateLayer,children:g.jsx(Le.Add,{className:Ye.icon,sx:f})})}),g.jsx(E.IconButton,{className:Ye.zoomButton,onClick:c,"aria-label":"Zoom out",sx:d,children:g.jsx(E.Box,{className:Ye.stateLayer,children:g.jsx(Le.Remove,{className:Ye.icon,sx:f})})}),g.jsx(E.IconButton,{className:Ye.zoomButton,onClick:i,"aria-label":"Fullscreen",sx:d,children:g.jsx(E.Box,{className:Ye.stateLayer,children:g.jsx(Le.ZoomOutMap,{className:Ye.icon,sx:f})})})]})};var rb=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const ob=Al(rb),sb="1.7.1";function Xt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ls(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(c){try{u(r.next(c))}catch(d){i(d)}}function l(c){try{u(r.throw(c))}catch(d){i(d)}}function u(c){c.done?s(c.value):o(c.value).then(a,l)}u((r=r.apply(e,[])).next())})}const rt={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},ib="https://maps.googleapis.com/maps/api/js";class Sr{static load(t,n){return ls(this,void 0,void 0,function*(){var r,o;const s=t.libraries?t.libraries.split(","):[],i=this.serializeParams(t);this.listeners.push(n),!((o=(r=window.google)===null||r===void 0?void 0:r.maps)===null||o===void 0)&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=rt.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=i,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==i&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...s];yield Promise.all(a.map(l=>google.maps.importLibrary(l)))})}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[u,c]of Object.entries(t)){const d=u.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(c))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=ib+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))===null||i===void 0?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=rt.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=rt.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=rt.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=rt.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Sr.loadingStatus=rt.NOT_LOADED;Sr.listeners=[];const ab="GMP_visgl_rgmlibrary_v1_default",lb=[`gmp_visgl_reactgooglemaps_v${sb}`],Nn=x.createContext(null);function cb(){const[e,t]=x.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Object.assign(Object.assign({},a),{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>{var a=s;i[a];var l=Xt(i,[typeof a=="symbol"?a:a+""]);return l})},clearMapInstances:()=>{t({})}}}function ub(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=Xt(e,["onLoad","onError","apiKey","version","libraries"]),[a,l]=x.useState(Sr.loadingStatus),[u,c]=x.useReducer((p,m)=>p[m.name]?p:Object.assign(Object.assign({},p),{[m.name]:m.value}),{}),d=x.useMemo(()=>s==null?void 0:s.join(","),[s]),f=x.useMemo(()=>JSON.stringify(Object.assign({apiKey:r,version:o},i)),[r,o,i]),h=x.useCallback(p=>ls(this,void 0,void 0,function*(){var m;if(u[p])return u[p];if(!(!((m=google==null?void 0:google.maps)===null||m===void 0)&&m.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const v=yield window.google.maps.importLibrary(p);return c({name:p,value:v}),v}),[u]);return x.useEffect(()=>{ls(this,void 0,void 0,function*(){try{const p=Object.assign({key:r},i);o&&(p.v=o),(d==null?void 0:d.length)>0&&(p.libraries=d),(p.channel===void 0||p.channel<0||p.channel>999)&&delete p.channel,p.solutionChannel===void 0?p.solutionChannel=ab:p.solutionChannel===""&&delete p.solutionChannel,yield Sr.load(p,m=>l(m));for(const m of["core","maps",...s])yield h(m);t&&t()}catch(p){n?n(p):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",p)}})},[r,d,f]),{status:a,loadedLibraries:u,importLibrary:h}}function db(e){return x.useMemo(()=>e.disableUsageAttribution?null:lb,[e.disableUsageAttribution])}const fb=e=>{const{children:t}=e,n=Xt(e,["children"]),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=cb(),{status:a,loadedLibraries:l,importLibrary:u}=ub(n),c=db(n),d=x.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:u,internalUsageAttributionIds:c}),[r,o,s,i,a,l,u,c]);return x.createElement(Nn.Provider,{value:d},t)};function hb(e,t){for(const n of yb){const r=t[n],o=ju[n];x.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(mb(o,e,i))});return()=>s.remove()},[e,o,r])}}function mb(e,t,n){var r;const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(pb.includes(e)){const s=o,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,u=t.getTilt()||0,c=t.getBounds();return(!i||!c||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:u,bounds:(c==null?void 0:c.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(gb.includes(e)){if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)===null||r===void 0?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const ju={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},pb=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],gb=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],yb=Object.keys(ju);function vb(e){const t=x.useRef(void 0);return x.useEffect(()=>{t.current=e}),t.current}function bb(e,t){const n=vb(e);return x.useMemo(()=>n&&t(n,e)?n:e,[e,n,t])}function xb(e,t,n){x.useEffect(e,[bb(t,n)])}function Sb(e,t){xb(e,t,ob)}const Cb=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Tb(e,t){const n={},r=Object.keys(t);for(const o of r)Cb.has(o)&&(n[o]=t[o]);Sb(()=>{e&&e.setOptions(n)},[n])}function Du(){var e;return((e=x.useContext(Nn))===null||e===void 0?void 0:e.status)||rt.NOT_LOADED}function wb(e,t){const{viewport:n,viewState:r}=t,o=!!n;return x.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:u}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:u+1})},[e,r]),o}function _b(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Bu(e){return _b(e)?e:e.toJSON()}function Eb(e,t,n){const r=n.center?Bu(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;x.useLayoutEffect(()=>{if(!e)return;const u={};let c=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(u.center={lat:o,lng:s},c=!0),i!==null&&t.current.zoom!==i&&(u.zoom=i,c=!0),a!==null&&t.current.heading!==a&&(u.heading=a,c=!0),l!==null&&t.current.tilt!==l&&(u.tilt=l,c=!0),c&&e.moveCamera(u)})}const Ab=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return x.createElement("div",{style:e},x.createElement("h2",null,"Error: AuthFailure"),x.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",x.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Mb(){const[e,t]=x.useState(null),n=x.useCallback(r=>t(r),[t]);return[e,n]}function $u(){return Du()===rt.LOADED}function Pb(){const[,e]=x.useReducer(t=>t+1,0);return e}function kb(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function Ib(e){const t=Pb(),n=x.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return x.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{kb(e,n),t()});return()=>r.remove()},[e,t]),n}class lr{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}lr.entries={};function Rb(e,t){const n=$u(),[r,o]=x.useState(null),[s,i]=Mb(),a=Ib(r),{id:l,defaultBounds:u,defaultCenter:c,defaultZoom:d,defaultHeading:f,defaultTilt:h,reuseMaps:p,renderingType:m,colorScheme:v}=e,S=Xt(e,["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"]),_=e.zoom!==void 0||e.defaultZoom!==void 0,b=e.center!==void 0||e.defaultCenter!==void 0;!u&&(!_||!b)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!S.center&&c&&(S.center=c),!S.zoom&&Number.isFinite(d)&&(S.zoom=d),!S.heading&&Number.isFinite(f)&&(S.heading=f),!S.tilt&&Number.isFinite(h)&&(S.tilt=h);const C=S.internalUsageAttributionIds;C==null?S.internalUsageAttributionIds=t.internalUsageAttributionIds:S.internalUsageAttributionIds=[...t.internalUsageAttributionIds||[],...C];for(const w of Object.keys(S))S[w]===void 0&&delete S[w];const T=x.useRef(void 0);return x.useEffect(()=>{if(!s||!n)return;const{addMapInstance:w,removeMapInstance:P}=t,{mapId:M}=e,I=`${M||"default"}:${m||"default"}:${v||"LIGHT"}`;let V,$;if(p&&lr.has(I)?($=lr.pop(I),V=$.getDiv(),s.appendChild(V),$.setOptions(S),setTimeout(()=>$.setCenter($.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",s.appendChild(V),$=new google.maps.Map(V,Object.assign(Object.assign(Object.assign({},S),m?{renderingType:m}:{}),v?{colorScheme:v}:{}))),o($),w($,l),u){const{padding:y}=u,R=Xt(u,["padding"]);$.fitBounds(R,y)}else(!_||!b)&&$.fitBounds({east:180,west:-180,south:-90,north:90});if(T.current){const{mapId:y,cameraState:R}=T.current;y!==M&&$.setOptions(R)}return()=>{T.current={mapId:M,cameraState:a.current},V.remove(),p?lr.push(I,$):google.maps.event.clearInstanceListeners($),o(null),P(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const Nu=x.createContext(null),Vu=e=>{const{children:t,id:n,className:r,style:o}=e,s=x.useContext(Nn),i=Du();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,u]=Rb(e,s);Eb(a,u,e),hb(a,e),Tb(a,e);const c=wb(a,e),d=!!e.controlled;x.useEffect(()=>{if(a)return c&&a.setOptions({disableDefaultUI:!0}),(c||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,c,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Bu(e.center):null;let h=null,p=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(h=f.lat,p=f.lng);const m=x.useMemo(()=>{var _,b,C;return{center:{lat:h??0,lng:p??0},zoom:(_=e.zoom)!==null&&_!==void 0?_:0,heading:(b=e.heading)!==null&&b!==void 0?b:0,tilt:(C=e.tilt)!==null&&C!==void 0?C:0}},[h,p,e.zoom,e.heading,e.tilt]);x.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(m);const _=a.addListener("bounds_changed",()=>{a.moveCamera(m)});return()=>_.remove()},[a,d,m]);const v=x.useMemo(()=>Object.assign({width:"100%",height:"100%",position:"relative",zIndex:c?-1:0},o),[o,c]),S=x.useMemo(()=>({map:a}),[a]);return i===rt.AUTH_FAILURE?x.createElement("div",{style:Object.assign({position:"relative"},r?{}:v),className:r},x.createElement(Ab,null)):x.createElement("div",Object.assign({ref:l,"data-testid":"map",style:r?void 0:v,className:r},n?{id:n}:{}),a?x.createElement(Nu.Provider,{value:S},t):null)};Vu.deckGLViewProps=!0;const cl=new Set;function Ob(...e){const t=JSON.stringify(e);cl.has(t)||(cl.add(t),console.error(...e))}const Hr=(e=null)=>{const t=x.useContext(Nn),{map:n}=x.useContext(Nu)||{};if(t===null)return Ob("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function Lb(e){const t=$u(),n=x.useContext(Nn);return x.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function Zn(e,t,n){x.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function qn(e,t,n){x.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function ul(e,t,n){x.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}class jb{constructor(){this.renderedStyles=new Set,this.styleElement=null}getStyleElement(){return this.styleElement||(this.styleElement=document.createElement("style"),this.styleElement.setAttribute("data-rgm-anchor-styles",""),document.head.appendChild(this.styleElement)),this.styleElement}addAdvancedMarkerPointerEventsOverwrite(){if(this.renderedStyles.has("marker-pointer-events"))return;const t=this.getStyleElement();t.textContent+=`
104
104
  gmp-advanced-marker[data-origin='rgm'] {
105
105
  pointer-events: none !important;
106
106
  }
107
- `,this.renderedStyles.add("marker-pointer-events")}cleanup(){this.styleElement&&(this.styleElement.remove(),this.styleElement=null,this.renderedStyles.clear())}}const cb=new ab;function lb(e,t){var n;if(!(!((n=google==null?void 0:google.maps)===null||n===void 0)&&n.version))return;const r=google.maps.version.split("."),o=parseInt(r[0],10),s=parseInt(r[1],10);return o>e||o===e&&s>=t}const ub=x.createContext(null),db={BOTTOM:["50%","100%"]},Cu=x.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[i,a]=hb(e),c=x.useMemo(()=>i?{marker:i}:null,[i]);return x.useImperativeHandle(t,()=>i,[i]),a?x.createElement(ub.Provider,{value:c},ld.createPortal(x.createElement(fb,{anchorPoint:s,styles:r,className:o},n),a)):null});Cu.displayName="AdvancedMarker";function es(e){return e.nodeType===Node.ELEMENT_NODE}const fb=({children:e,styles:t,className:n})=>x.createElement("div",{className:n,style:t},e);function hb(e){const[t,n]=x.useState(null),[r,o]=x.useState(null),s=Br(),i=ib("marker"),{children:a,onClick:c,className:u,onMouseEnter:l,onMouseLeave:d,onDrag:f,onDragStart:h,onDragEnd:p,collisionBehavior:m,clickable:v,draggable:S,position:T,title:b,zIndex:w,anchorPoint:C,anchorLeft:E,anchorTop:P}=e,M=x.Children.count(a);return x.useEffect(()=>{if(!s||!i)return;const I=new i.AdvancedMarkerElement;I.map=s,n(I);let V=null;return M>0&&(V=document.createElement("div"),I.content=V,o(V)),()=>{I.map=null,V==null||V.remove(),n(null),o(null)}},[s,i,M]),x.useEffect(()=>{!(t!=null&&t.content)||!es(t.content)||M>0||(t.content.className=u??"")},[t,u,M]),mb(t,C,E,P,M>0),Un(t,"position",T),Un(t,"title",b??""),Un(t,"zIndex",w),Un(t,"collisionBehavior",m),x.useEffect(()=>{t&&(S!==void 0?t.gmpDraggable=S:f||h||p?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,S,f,p,h]),x.useEffect(()=>{if(!t)return;const I=v!==void 0||!!c||!!l||!!d;t.gmpClickable=I,I&&(t!=null&&t.content)&&es(t.content)&&(t.content.style.pointerEvents="all",c&&(t.content.style.cursor="pointer"))},[t,v,c,l,d]),Wn(t,"click",c),Wn(t,"drag",f),Wn(t,"dragstart",h),Wn(t,"dragend",p),Xa(t==null?void 0:t.element,"mouseenter",l),Xa(t==null?void 0:t.element,"mouseleave",d),[t,r]}function mb(e,t,n,r,o){x.useEffect(()=>{if(!e||!o)return;const s=lb(3,62),i=e.content;if(!(!i||!es(i))){if(n!==void 0||r!==void 0){s||console.warn(`AdvancedMarker: The anchorLeft and anchorTop props are only supported in Google Maps API version 3.62 and above. The current version is ${google.maps.version}.`),e.anchorLeft=n,e.anchorTop=r,t!==void 0&&console.warn("AdvancedMarker: the anchorPoint prop is ignored when anchorLeft and/or anchorTop are set.");return}if(t!==void 0){const[a,c]=t??db.BOTTOM,u=`calc(-1 * ${a})`,l=`calc(-1 * ${c})`;s?(e.anchorLeft=u,e.anchorTop=l,i.style.transform=""):(i.style.transform=`translate(50%, 100%) translate(${u}, ${l})`,e.dataset.origin="rgm",cb.addAdvancedMarkerPointerEventsOverwrite())}}},[e,t,n,r,o])}function pb(e){const[t,n]=x.useState(null),r=Br(),{onClick:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:c,onMouseOut:u}=e,l=Kt(e,["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"]),{position:d,draggable:f}=l;return x.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const h=new google.maps.Marker(l);return h.setMap(r),n(h),()=>{h.setMap(null),n(null)}},[r]),x.useEffect(()=>{if(!t)return;const h=t,p=google.maps.event;return o&&p.addListener(h,"click",o),s&&p.addListener(h,"drag",s),i&&p.addListener(h,"dragstart",i),a&&p.addListener(h,"dragend",a),c&&p.addListener(h,"mouseover",c),u&&p.addListener(h,"mouseout",u),t.setDraggable(!!f),()=>{p.clearInstanceListeners(h)}},[t,f,o,s,i,a,c,u]),x.useEffect(()=>{t&&l&&t.setOptions(l)},[t,l]),x.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const gb=x.forwardRef((e,t)=>{const n=pb(e);return x.useImperativeHandle(t,()=>n,[n]),x.createElement(x.Fragment,null)});gb.displayName="Marker";const wu=x.createContext(void 0),Ys=()=>{const e=x.useContext(wu);if(!e)throw new Error("useGoogleMapContext must be used within GoogleMap component");return e},Zs=({children:e})=>{const t=Br(),[n,r]=x.useState(13),[o,s]=x.useState(null);x.useEffect(()=>{if(!t)return;const a=t.getZoom();a!==void 0&&r(a);const c=t.getBounds();if(c){const d=c.getNorthEast(),f=c.getSouthWest();s([f.lng(),f.lat(),d.lng(),d.lat()])}const u=t.addListener("zoom_changed",()=>{const d=t.getZoom();d!==void 0&&(console.log("[MapContent] Zoom changed:",d),r(d))}),l=t.addListener("bounds_changed",()=>{const d=t.getBounds();if(d){const f=d.getNorthEast(),h=d.getSouthWest();s([h.lng(),h.lat(),f.lng(),f.lat()])}});return()=>{u&&google.maps.event.removeListener(u),l&&google.maps.event.removeListener(l)}},[t]);const i=(a,c=16)=>{t&&(t.setCenter(a),t.setZoom(c))};return t?y.jsx(wu.Provider,{value:{isLoaded:!0,map:t,currentZoom:n,bounds:o,zoomToPosition:i},children:e}):null};Zs.displayName="MapContent";const yb=180,_u=()=>{const{map:e}=Ys(),t=x.useRef(null),n=x.useRef(null);return x.useEffect(()=>{if(!e||!t.current)return;const r=new ResizeObserver(()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{try{google.maps.event.trigger(e,"resize")}finally{n.current=null}},yb)});return r.observe(t.current),()=>{n.current&&clearTimeout(n.current),r.disconnect()}},[e]),y.jsx("div",{ref:t,"aria-hidden":!0,style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",visibility:"hidden"}})};_u.displayName="MapResizeHandler";const vb="_googleMap_j4y4m_1",bb="_container_j4y4m_10",xb="_errorContainer_j4y4m_21",Hn={googleMap:vb,container:bb,errorContainer:xb},Sb={lat:-26.3044,lng:-48.8487},Tb=13,Cb={disableDefaultUI:!0,zoomControl:!1,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,rotateControl:!1,scaleControl:!1,panControl:!1,clickableIcons:!1,keyboardShortcuts:!1},wb=({colorScheme:e,options:t,onLoad:n,children:r})=>{const o=Br();return x.useEffect(()=>{o&&(o.setOptions(Cb),t&&o.setOptions(t),n&&n(o))},[o,t,n]),y.jsx(y.Fragment,{children:r})},Eu=({center:e=Sb,zoom:t=Tb,className:n,children:r,apiKey:o,mapId:s,themeMode:i="light",options:a,onLoad:c,onError:u})=>{if(!o||!s)return y.jsx("div",{className:`${Hn.container} ${Hn.errorContainer} ${n||""}`,children:y.jsxs("div",{children:[y.jsx("p",{children:"Google Maps não configurado"}),y.jsx("p",{style:{fontSize:"14px",marginTop:"8px",opacity:.7},children:"As props apiKey e mapId são obrigatórias"})]})});const l=i==="dark"?"DARK":"LIGHT",d={defaultCenter:e,defaultZoom:t,mapId:s,className:Hn.googleMap,colorScheme:l},f=`${s}-${l}`;return y.jsx($1,{apiKey:o,onLoad:()=>{console.log("Google Maps API carregada com sucesso")},onError:h=>{console.error("Erro ao carregar Google Maps API:",h),u&&h instanceof Error&&u(h)},children:y.jsx("div",{className:`${Hn.container} ${n||""}`,style:{width:"100%",height:"400px",minHeight:"400px",position:"relative"},children:y.jsx(Tu,{...d,style:{width:"100%",height:"100%"},children:y.jsx(wb,{colorScheme:l,options:a,onLoad:c,children:y.jsxs(Zs,{children:[y.jsx(_u,{}),r]})})},f)})})};Eu.displayName="GoogleMap";const Ja=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ho=1,cn=8;class qs{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==ho)throw new Error(`Got v${o} data when expected v${ho}.`);const s=Ja[r&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new qs(a,i,s,t)}constructor(t,n=64,r=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=Ja.indexOf(this.ArrayType),i=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,cn,t),this.coords=new this.ArrayType(this.data,cn+a+c,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(cn+i+a+c),this.ids=new this.IndexArrayType(this.data,cn,t),this.coords=new this.ArrayType(this.data,cn+a+c,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ho<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return ts(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:a}=this,c=[0,s.length-1,0],u=[];for(;c.length;){const l=c.pop()||0,d=c.pop()||0,f=c.pop()||0;if(d-f<=a){for(let v=f;v<=d;v++){const S=i[2*v],T=i[2*v+1];S>=t&&S<=r&&T>=n&&T<=o&&u.push(s[v])}continue}const h=f+d>>1,p=i[2*h],m=i[2*h+1];p>=t&&p<=r&&m>=n&&m<=o&&u.push(s[h]),(l===0?t<=p:n<=m)&&(c.push(f),c.push(h-1),c.push(1-l)),(l===0?r>=p:o>=m)&&(c.push(h+1),c.push(d),c.push(1-l))}return u}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,a=[0,o.length-1,0],c=[],u=r*r;for(;a.length;){const l=a.pop()||0,d=a.pop()||0,f=a.pop()||0;if(d-f<=i){for(let v=f;v<=d;v++)Qa(s[2*v],s[2*v+1],t,n)<=u&&c.push(o[v]);continue}const h=f+d>>1,p=s[2*h],m=s[2*h+1];Qa(p,m,t,n)<=u&&c.push(o[h]),(l===0?t-r<=p:n-r<=m)&&(a.push(f),a.push(h-1),a.push(1-l)),(l===0?t+r>=p:n+r>=m)&&(a.push(h+1),a.push(d),a.push(1-l))}return c}}function ts(e,t,n,r,o,s){if(o-r<=n)return;const i=r+o>>1;Au(e,t,i,r,o,s),ts(e,t,n,r,i-1,1-s),ts(e,t,n,i+1,o,1-s)}function Au(e,t,n,r,o,s){for(;o>r;){if(o-r>600){const u=o-r+1,l=n-r+1,d=Math.log(u),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(r,Math.floor(n-l*f/u+h)),m=Math.min(o,Math.floor(n+(u-l)*f/u+h));Au(e,t,n,p,m,s)}const i=t[2*n+s];let a=r,c=o;for(ln(e,t,r,n),t[2*o+s]>i&&ln(e,t,r,o);a<c;){for(ln(e,t,a,c),a++,c--;t[2*a+s]<i;)a++;for(;t[2*c+s]>i;)c--}t[2*r+s]===i?ln(e,t,r,c):(c++,ln(e,t,c,o)),c<=n&&(r=c+1),n<=c&&(o=c-1)}}function ln(e,t,n,r){mo(e,n,r),mo(t,2*n,2*r),mo(t,2*n+1,2*r+1)}function mo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Qa(e,t,n,r){const o=e-n,s=t-r;return o*o+s*s}const _b={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},ec=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),St=2,lt=3,po=4,ct=5,Mu=6;class Pu{constructor(t){this.options=Object.assign(Object.create(_b),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:o}=this.options;n&&console.time("total time");const s=`prepare ${t.length} points`;n&&console.time(s),this.points=t;const i=[];for(let c=0;c<t.length;c++){const u=t[c];if(!u.geometry)continue;const[l,d]=u.geometry.coordinates,f=ec(Gn(l)),h=ec(Kn(d));i.push(f,h,1/0,c,-1,1),this.options.reduce&&i.push(0)}let a=this.trees[o+1]=this._createTree(i);n&&console.timeEnd(s);for(let c=o;c>=r;c--){const u=+Date.now();a=this.trees[c]=this._createTree(this._cluster(a,c)),n&&console.log("z%d: %d clusters in %dms",c,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const d=this.getClusters([r,o,180,i],n),f=this.getClusters([-180,o,s,i],n);return d.concat(f)}const a=this.trees[this._limitZoom(n)],c=a.range(Gn(r),Kn(i),Gn(s),Kn(o)),u=a.data,l=[];for(const d of c){const f=this.stride*d;l.push(u[f+ct]>1?tc(u,f,this.clusterProps):this.points[u[f+lt]])}return l}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),o="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(o);const i=s.data;if(n*this.stride>=i.length)throw new Error(o);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),c=i[n*this.stride],u=i[n*this.stride+1],l=s.within(c,u,a),d=[];for(const f of l){const h=f*this.stride;i[h+po]===t&&d.push(i[h+ct]>1?tc(i,h,this.clusterProps):this.points[i[h+lt]])}if(d.length===0)throw new Error(o);return d}getLeaves(t,n,r){n=n||10,r=r||0;const o=[];return this._appendLeaves(o,t,n,r,0),o}getTile(t,n,r){const o=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:i,radius:a}=this.options,c=a/i,u=(r-c)/s,l=(r+1+c)/s,d={features:[]};return this._addTileFeatures(o.range((n-c)/s,u,(n+1+c)/s,l),o.data,n,r,s,d),n===0&&this._addTileFeatures(o.range(1-c/s,u,1,l),o.data,s,r,s,d),n===s-1&&this._addTileFeatures(o.range(0,u,c/s,l),o.data,-1,r,s,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,o,s){const i=this.getChildren(n);for(const a of i){const c=a.properties;if(c&&c.cluster?s+c.point_count<=o?s+=c.point_count:s=this._appendLeaves(t,c.cluster_id,r,o,s):s<o?s++:t.push(a),t.length===r)break}return s}_createTree(t){const n=new qs(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,o,s,i){for(const a of t){const c=a*this.stride,u=n[c+ct]>1;let l,d,f;if(u)l=ku(n,c,this.clusterProps),d=n[c],f=n[c+1];else{const m=this.points[n[c+lt]];l=m.properties;const[v,S]=m.geometry.coordinates;d=Gn(v),f=Kn(S)}const h={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(f*s-o))]],tags:l};let p;u||this.options.generateId?p=n[c+lt]:p=this.points[n[c+lt]].id,p!==void 0&&(h.id=p),i.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:o,reduce:s,minPoints:i}=this.options,a=r/(o*Math.pow(2,n)),c=t.data,u=[],l=this.stride;for(let d=0;d<c.length;d+=l){if(c[d+St]<=n)continue;c[d+St]=n;const f=c[d],h=c[d+1],p=t.within(c[d],c[d+1],a),m=c[d+ct];let v=m;for(const S of p){const T=S*l;c[T+St]>n&&(v+=c[T+ct])}if(v>m&&v>=i){let S=f*m,T=h*m,b,w=-1;const C=((d/l|0)<<5)+(n+1)+this.points.length;for(const E of p){const P=E*l;if(c[P+St]<=n)continue;c[P+St]=n;const M=c[P+ct];S+=c[P]*M,T+=c[P+1]*M,c[P+po]=C,s&&(b||(b=this._map(c,d,!0),w=this.clusterProps.length,this.clusterProps.push(b)),s(b,this._map(c,P)))}c[d+po]=C,u.push(S/v,T/v,1/0,C,-1,v),s&&u.push(w)}else{for(let S=0;S<l;S++)u.push(c[d+S]);if(v>1)for(const S of p){const T=S*l;if(!(c[T+St]<=n)){c[T+St]=n;for(let b=0;b<l;b++)u.push(c[T+b])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+ct]>1){const i=this.clusterProps[t[n+Mu]];return r?Object.assign({},i):i}const o=this.points[t[n+lt]].properties,s=this.options.map(o);return r&&s===o?Object.assign({},s):s}}function tc(e,t,n){return{type:"Feature",id:e[t+lt],properties:ku(e,t,n),geometry:{type:"Point",coordinates:[Eb(e[t]),Ab(e[t+1])]}}}function ku(e,t,n){const r=e[t+ct],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=e[t+Mu],i=s===-1?{}:Object.assign({},n[s]);return Object.assign(i,{cluster:!0,cluster_id:e[t+lt],point_count:r,point_count_abbreviated:o})}function Gn(e){return e/360+.5}function Kn(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Eb(e){return(e-.5)*360}function Ab(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}const Mb={radius:30,maxZoom:13,minZoom:0,minPoints:2};function Pb(e,t,n,r={}){const o=x.useRef(null),[s,i]=x.useState([]),a={...Mb,...r};return x.useEffect(()=>{if(!e||e.length===0){i([]);return}const c=e.map(u=>({type:"Feature",properties:u,geometry:{type:"Point",coordinates:[u.lng,u.lat]}}));o.current=new Pu({radius:a.radius,maxZoom:a.maxZoom,minZoom:a.minZoom,minPoints:a.minPoints}),o.current.load(c)},[e,a.radius,a.maxZoom,a.minZoom,a.minPoints]),x.useEffect(()=>{if(!o.current||!n){i(e);return}const u=o.current.getClusters(n,Math.floor(t)).map(l=>{const[d,f]=l.geometry.coordinates,h=l.properties;if(h.cluster){const p=h.cluster_id,m=o.current.getLeaves(p,1/0),v=m.flatMap(T=>T.properties.cameras||[]),S=m.reduce((T,b)=>T+b.properties.count,0);return{id:`cluster-${p}`,lat:f,lng:d,count:S,cameras:v,isCluster:!0,pointCount:h.point_count,clusterId:p}}else{const p=h;return{id:p.id,lat:f,lng:d,count:p.count,addressText:p.addressText,cameras:p.cameras}}});i(u)},[e,t,n]),s}const kb=16,Iu=({spots:e,onSpotClick:t,zoomLevel:n=kb,selectedSpotId:r,animateOnClick:o,disableClick:s})=>{const{isLoaded:i,currentZoom:a,bounds:c,zoomToPosition:u}=Ys(),l=x.useRef(null),d=Pb(e,a,c);if(d.length>0&&c){const h=e.map(p=>({type:"Feature",properties:p,geometry:{type:"Point",coordinates:[p.lng,p.lat]}}));l.current||(l.current=new Pu({radius:30,maxZoom:13,minZoom:0,minPoints:2})),l.current.load(h)}const f=h=>{if(h.isCluster&&h.clusterId&&l.current)try{const p=l.current.getClusterExpansionZoom(h.clusterId);u({lat:h.lat,lng:h.lng},p)}catch(p){console.error("Error getting cluster expansion zoom:",p),u({lat:h.lat,lng:h.lng},n)}else u({lat:h.lat,lng:h.lng},n),s||t==null||t(h)};return i?y.jsx(y.Fragment,{children:d.map((h,p)=>y.jsx(Cu,{position:{lat:h.lat,lng:h.lng},onClick:()=>f(h),children:y.jsx(Ks,{count:h.count,addressText:h.addressText,cameras:h.cameras,currentZoom:a,isSelected:!s&&!h.isCluster&&r===h.id,animateOnClick:o,disableClick:s})},h.id??p))}):null};Iu.displayName="MapMarkers";const Ib="_searchBar_15mix_1",Rb="_startIconContainer_15mix_106",Ob="_endIconContainer_15mix_117",Lb="_endIconContainerClickable_15mix_153",Db="_defaultIcon_15mix_157",gn={searchBar:Ib,startIconContainer:Rb,endIconContainer:Ob,endIconContainerClickable:Lb,defaultIcon:Db},jb=e=>()=>{e&&e()},Bb=e=>t=>{e&&e(t)},$b=()=>y.jsx(Oe.Search,{className:gn.defaultIcon}),Nb=e=>e||$b(),Ru=x.forwardRef(({startIcon:e,endIcon:t,onEndIconClick:n,placeholder:r,value:o,onChange:s,className:i,...a},c)=>{const l=A.useTheme().palette.mode==="dark",d=Nb(t),f=jb(n),h=Bb(s);return y.jsx(A.TextField,{ref:c,value:o,onChange:h,placeholder:r,variant:"outlined",autoComplete:"off",className:`${gn.searchBar} ${i||""}`,"data-theme":l?"dark":"light",InputProps:{startAdornment:e?y.jsx(A.InputAdornment,{position:"start",className:gn.startIconContainer,children:e}):null,endAdornment:y.jsx(A.InputAdornment,{position:"end",className:`${gn.endIconContainer} ${n?gn.endIconContainerClickable:""}`,onClick:f,disablePointerEvents:!n,children:d})},inputProps:{autoComplete:"off","data-form-type":"other"},...a})});Ru.displayName="SearchBar";const Vb=st(y.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),Fb=st([y.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z"},"0"),y.jsx("path",{d:"M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z"},"1")],"SearchOff"),zb="_container_1mb8b_1",Wb="_iconWrapper_1mb8b_11",Ub="_icon_1mb8b_11",Hb="_title_1mb8b_21",Gb="_subtitle_1mb8b_30",Kb="_description_1mb8b_34",Yb="_button_1mb8b_38",Tt={container:zb,iconWrapper:Wb,icon:Ub,title:Hb,subtitle:Gb,description:Kb,button:Yb},Ou=({onGoHome:e,buttonText:t="Voltar para o início",title:n="Página não encontrada",description:r="Desculpe, a página que você está procurando não existe ou foi movida para outro endereço.",errorCode:o="404",className:s})=>y.jsx(A.Container,{maxWidth:"sm",children:y.jsxs(A.Box,{className:`${Tt.container} ${s||""}`,children:[y.jsx(A.Box,{className:Tt.iconWrapper,children:y.jsx(Fb,{className:Tt.icon,color:"primary"})}),y.jsx(A.Typography,{variant:"h1",className:Tt.title,sx:{fontSize:{xs:"6rem",md:"8rem"}},children:o}),y.jsx(A.Typography,{variant:"h4",component:"h2",className:Tt.subtitle,color:"text.primary",children:n}),y.jsx(A.Typography,{variant:"body1",className:Tt.description,color:"text.secondary",children:r}),e&&y.jsx(cs,{variant:"contained",size:"large",startIcon:y.jsx(Vb,{}),onClick:e,className:Tt.button,children:t})]})});Ou.displayName="NotFoundContent";const Zb=e=>{const t=e.find(r=>r.active),n=e.flatMap(r=>{var o;return((o=r.submenu)==null?void 0:o.map(s=>({item:r,subItem:s})))??[]}).find(({subItem:r})=>r.active);return{itemId:(n==null?void 0:n.item.id)??(t==null?void 0:t.id)??null,subItemId:(n==null?void 0:n.subItem.id)??null,expandedItemId:(n==null?void 0:n.item.id)??null}},qb=({items:e,isExpanded:t=!0,onClick:n})=>{const r=x.useMemo(()=>Zb(e),[e]),[o,s]=x.useState(r.itemId),[i,a]=x.useState(r.subItemId),[c,u]=x.useState(r.expandedItemId),[l,d]=x.useState(null),[f,h]=x.useState(null);x.useEffect(()=>{s(r.itemId),a(r.subItemId),u(r.expandedItemId)},[r.itemId,r.subItemId,r.expandedItemId]);const p=f?e.find(E=>E.id===f):void 0,m=(p==null?void 0:p.submenu)??[];return{selectedItemId:o,selectedSubItemId:i,expandedItemId:c,submenuAnchorEl:l,submenuItem:p,submenuItems:m,getIsItemActive:E=>{var M;const P=i?!!((M=E.submenu)!=null&&M.some(I=>I.id===i)):!1;return o?E.id===o:!!(E.active||P)},getIsSubItemActive:E=>i?E.id===i:!!E.active,shouldShowSubmenu:E=>{var P;return!!(t&&((P=E.submenu)!=null&&P.length)&&c===E.id)},handleItemClick:(E,P)=>{var M,I;s(E.id),a(null),(M=E.submenu)!=null&&M.length?t?u(V=>V===E.id?null:E.id):(d(P.currentTarget),h(E.id)):(u(null),d(null),h(null)),(I=E.onClick)==null||I.call(E,P),n==null||n({item:E})},handleSubItemClick:(E,P,M,I)=>{var V;s(E.id),a(P.id),I!=null&&I.closeMenu&&(d(null),h(null)),(V=P.onClick)==null||V.call(P,M),n==null||n({item:E,subItem:P})},closeSubmenu:()=>{d(null),h(null)}}},Lu=e=>typeof e=="number"?`${e*4}px`:e,Xb=({item:e,onClick:t,isActive:n})=>{const r=X.useTheme();return y.jsx(A.ButtonBase,{onClick:t,"aria-label":e.label,"aria-pressed":n||void 0,sx:{width:"100%",borderRadius:Lu(r.shape.borderRadius),px:2,py:1.25,justifyContent:"flex-start",textAlign:"left",color:r.palette.text.primary,backgroundColor:n?r.palette.action.selected:"transparent","&:hover":{backgroundColor:r.palette.action.hover}},children:y.jsx(A.Typography,{variant:"body2",sx:{fontWeight:500},children:e.label})})},Du=({items:e,isExpanded:t=!0,className:n,onClick:r})=>{const o=X.useTheme(),s=Lu(o.shape.borderRadius),{submenuAnchorEl:i,submenuItem:a,submenuItems:c,getIsItemActive:u,getIsSubItemActive:l,shouldShowSubmenu:d,handleItemClick:f,handleSubItemClick:h,closeSubmenu:p}=qb({items:e,isExpanded:t,onClick:r});return y.jsxs(A.Stack,{className:n,direction:"column",spacing:2,sx:{width:"100%"},children:[e.map(m=>{var E,P;const v=u(m),S=d(m),T=t?o.spacing(2):o.spacing(4),b=t?v?o.palette.primary.main:o.palette.action.hover:"transparent",w=t?"transparent":v?o.palette.primary.main:o.palette.action.hover,C=!t&&v?o.palette.primary.contrastText:o.palette.text.primary;return y.jsxs(A.Stack,{direction:"column",spacing:1,sx:{width:"100%"},children:[y.jsx(A.ButtonBase,{onClick:M=>f(m,M),"aria-label":m.label,"aria-pressed":v||void 0,"aria-haspopup":(E=m.submenu)!=null&&E.length?"menu":void 0,sx:{width:"100%",borderRadius:s,px:t?2:1,py:t?1.5:1,justifyContent:t?"flex-start":"center",textAlign:"left",color:o.palette.text.primary,backgroundColor:b,boxShadow:t&&v?o.shadows[1]:"none","&:hover":{backgroundColor:t?o.palette.action.hover:"transparent"}},children:y.jsxs(A.Stack,{direction:t?"row":"column",alignItems:"center",spacing:t?1.5:1,sx:{width:"100%"},children:[y.jsx(A.Box,{sx:{width:64,height:T,borderRadius:s,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:w,color:C,transition:o.transitions.create(["background-color","box-shadow"],{duration:o.transitions.duration.shortest}),...t?{}:{boxShadow:v?o.shadows[1]:"none","&:hover":{backgroundColor:v?X.alpha(o.palette.primary.main,.9):o.palette.action.selected}}},children:m.icon}),y.jsx(A.Typography,{variant:"body2",sx:{width:"100%",textAlign:t?"left":"center",fontWeight:v?600:500},children:m.label}),t&&m.trailingIcon?y.jsx(A.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:m.trailingIcon}):null]})}),S?y.jsx(A.Collapse,{in:S,timeout:"auto",unmountOnExit:!0,children:y.jsx(A.Stack,{direction:"column",spacing:1,sx:{pl:4},children:(P=m.submenu)==null?void 0:P.map(M=>{const I=l(M);return y.jsx(Xb,{item:M,isActive:I,onClick:V=>h(m,M,V)},M.id)})})}):null]},m.id)}),y.jsx(A.Menu,{anchorEl:i,open:!!(i&&c.length),onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},MenuListProps:{dense:!0,"aria-label":(a==null?void 0:a.label)??"submenu"},PaperProps:{sx:{borderRadius:s,minWidth:o.spacing(22),px:1,py:.5,boxShadow:o.shadows[3]}},children:c.map(m=>{const v=l(m);return y.jsx(A.MenuItem,{selected:v,onClick:S=>{a&&h(a,m,S,{closeMenu:!0})},sx:{borderRadius:s,fontWeight:v?600:500},children:m.label},m.id)})})]})};Du.displayName="SidebarMenu";const Jb=e=>{const t=e.find(n=>n.active);return(t==null?void 0:t.id)??null},Qb=({items:e,onSelect:t,isExpanded:n=!0})=>{const r=x.useMemo(()=>Jb(e),[e]),[o,s]=x.useState(r),[i,a]=x.useState(null);x.useEffect(()=>{s(r)},[r]);const c=o?e.find(h=>h.id===o):void 0;return{selectedItemId:o,selectedItem:c,menuAnchorEl:i,getIsItemActive:h=>o?h.id===o:!!h.active,openMenu:h=>{n||a(h.currentTarget)},closeMenu:()=>{n||a(null)},handleItemClick:(h,p)=>{var m;s(h.id),(m=h.onClick)==null||m.call(h,p),t==null||t(h),a(null)}}},ex=e=>typeof e=="number"?`${e*4}px`:e,ju=({items:e,currentLabel:t,headerLabel:n,headerIcon:r,headerTrailingIcon:o,listTitle:s,action:i,isExpanded:a=!0,className:c,onSelect:u})=>{var K,G;const l=X.useTheme(),d=x.useRef(null),f=ex(l.shape.borderRadius),[h,p]=x.useState(!1),m=x.useMemo(()=>Number.parseFloat(l.spacing(2).toString()),[l]),{selectedItem:v,menuAnchorEl:S,getIsItemActive:T,openMenu:b,closeMenu:w,handleItemClick:C}=Qb({items:e,onSelect:u,isExpanded:a}),E=t??(v==null?void 0:v.label)??((K=e[0])==null?void 0:K.label)??"",P=r??(v==null?void 0:v.icon)??((G=e[0])==null?void 0:G.icon)??null,M=a||!P,I=j=>{if(a){p(Q=>!Q);return}b(j)},V=(j,Q)=>{C(j,Q),p(!1)},D=y.jsx(A.Stack,{direction:"column",spacing:.5,children:e.map(j=>{const Q=T(j);return y.jsxs(A.MenuItem,{selected:Q,onClick:L=>V(j,L),sx:{borderRadius:f,gap:1.5,px:2,py:1.25,color:l.palette.text.primary,"&:hover":{backgroundColor:l.palette.action.hover}},children:[j.icon?y.jsx(A.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:j.icon}):null,y.jsx(A.Typography,{variant:"body1",sx:{fontWeight:Q?600:500},children:j.label})]},j.id)})}),g=y.jsxs(A.Box,{sx:{borderRadius:f,backgroundColor:l.palette.background.paper,boxShadow:l.shadows[3],display:"flex",flexDirection:"column",maxHeight:l.spacing(50)},children:[s?y.jsx(A.Box,{sx:{px:2,pt:2,pb:1},children:y.jsx(A.Typography,{variant:"subtitle2",sx:{color:l.palette.text.primary},children:s})}):null,y.jsx(A.Box,{sx:{px:2,pb:2,overflowY:"auto",flex:1,minHeight:0},children:D})]}),$=i?y.jsxs(A.MenuItem,{onClick:i.onClick,sx:{borderRadius:f,gap:1.5,px:2,py:1.25,color:l.palette.text.primary,"&:hover":{backgroundColor:l.palette.action.hover}},children:[i.icon?y.jsx(A.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:i.icon}):null,y.jsx(A.Typography,{variant:"body1",sx:{fontWeight:600},children:i.label})]}):null,R=$?y.jsx(A.Box,{sx:{borderRadius:f,backgroundColor:l.palette.background.paper,boxShadow:l.shadows[3]},children:$}):null,W=y.jsxs(A.Stack,{direction:"column",spacing:1,sx:{minWidth:l.spacing(32)},children:[g,R]});return y.jsxs(A.Stack,{className:c,direction:a?"row":"column",spacing:a?2:1,sx:{width:"100%",alignItems:a?"flex-start":"stretch"},children:[y.jsx(A.ButtonBase,{onClick:I,"aria-label":E,ref:d,sx:{width:a?l.spacing(28):"64px",height:a?"auto":"64px",borderRadius:f,px:a?2:0,py:a?1.25:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left",backgroundColor:l.palette.action.hover,"&:hover":{backgroundColor:l.palette.action.selected}},children:y.jsxs(A.Stack,{direction:"row",alignItems:"center",spacing:a?1:0,sx:{width:a?"100%":"auto",justifyContent:a?"space-between":"center",px:0},children:[P?y.jsx(A.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:P}):null,M?y.jsxs(A.Box,{sx:{minWidth:0,flex:1},children:[n?y.jsx(A.Typography,{variant:"caption",sx:{color:l.palette.text.secondary},children:n}):null,y.jsx(A.Typography,{variant:"body2",sx:{fontWeight:600},noWrap:!0,children:E})]}):null,a&&o?y.jsx(A.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:o}):null]})}),a?h?y.jsx(A.ClickAwayListener,{onClickAway:()=>p(!1),children:y.jsx(A.Popper,{open:h,anchorEl:d.current,placement:"right-start",modifiers:[{name:"offset",options:{offset:[0,m]}}],sx:{zIndex:l.zIndex.modal},children:W})}):null:y.jsx(A.Menu,{anchorEl:S,open:!!S,onClose:w,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},disableAutoFocusItem:!0,slotProps:{paper:{sx:{borderRadius:f,p:0,ml:2,backgroundColor:"transparent",boxShadow:"none",overflow:"visible"}}},MenuListProps:{"aria-label":E?`menu-${E}`:"menu",sx:{p:0}},children:W})]})};ju.displayName="ModuleMenu";const Xs=e=>e.seekable&&e.seekable.length>0?e.seekable.end(e.seekable.length-1):Number.isFinite(e.duration)&&e.duration>0?e.duration:e.currentTime,tx=(e,t,n)=>({...e&&{"--player-width":typeof e=="number"?`${e}px`:e},...t&&{"--player-height":typeof t=="number"?`${t}px`:t},...n&&{"--player-aspect-ratio":n}}),nx=({stream:e,availableQualities:t,initialQuality:n,autoPlay:r,liveThresholdSeconds:o,allowPlaybackRateForStream:s})=>{const i=x.useRef(null),a=x.useRef(null),c=x.useMemo(()=>{if(!t||!t.length)return null;if(n){const j=t.find(Q=>Q.value===n);if(j)return j}return t[0]},[t,n]),[u,l]=x.useState(c),[d,f]=x.useState(!1),[h,p]=x.useState(!0),[m,v]=x.useState(!1),[S,T]=x.useState(0),[b,w]=x.useState(0),[C,E]=x.useState(1),[P,M]=x.useState(1),[I,V]=x.useState(!1),[D,g]=x.useState(!0),$=(u==null?void 0:u.stream)??e??null,R=(u==null?void 0:u.src)??null,K=!!!$||s;x.useEffect(()=>{l(c)},[c]);const G=x.useCallback(()=>{const j=a.current;if(!j)return;if(!j.seekable||j.seekable.length===0){p(!0),v(!1);return}const Q=Xs(j),L=Math.max(0,Q-j.currentTime);w(Q),T(j.currentTime),v(Q>0),p(L<=(o??2))},[o]);return x.useEffect(()=>{const j=a.current;if(!j)return;const Q=()=>f(!0),L=()=>f(!1),_=()=>g(!0),N=()=>g(!0),O=()=>g(!1),B=()=>g(!1);return j.addEventListener("play",Q),j.addEventListener("pause",L),j.addEventListener("waiting",_),j.addEventListener("loadstart",N),j.addEventListener("canplay",O),j.addEventListener("playing",B),j.addEventListener("timeupdate",G),j.addEventListener("durationchange",G),j.addEventListener("loadedmetadata",G),j.addEventListener("progress",G),()=>{j.removeEventListener("play",Q),j.removeEventListener("pause",L),j.removeEventListener("waiting",_),j.removeEventListener("loadstart",N),j.removeEventListener("canplay",O),j.removeEventListener("playing",B),j.removeEventListener("timeupdate",G),j.removeEventListener("durationchange",G),j.removeEventListener("loadedmetadata",G),j.removeEventListener("progress",G)}},[G]),x.useEffect(()=>{const j=a.current;j&&(g(!0),$?(j.srcObject!==$&&(j.srcObject=$),j.getAttribute("src")&&j.removeAttribute("src")):R?(j.srcObject&&(j.srcObject=null),j.src!==R&&(j.src=R,j.load())):(j.srcObject&&(j.srcObject=null),j.getAttribute("src")&&j.removeAttribute("src")),r&&j.play().then(()=>{}).catch(()=>{}))},[$,R,r]),x.useEffect(()=>{const j=a.current;j&&(K?j.playbackRate=C:(j.playbackRate=1,E(1)))},[C,K]),x.useEffect(()=>{const j=()=>{V(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",j),()=>{document.removeEventListener("fullscreenchange",j)}},[]),{containerRef:i,videoRef:a,selectedQuality:u,setSelectedQuality:l,isPlaying:d,isLive:h,canSeek:m,currentTime:S,setCurrentTime:T,seekableEnd:b,playbackRate:C,setPlaybackRate:E,zoom:P,setZoom:M,isFullscreen:I,isLoading:D,canAdjustPlaybackRate:K,updateLiveStatus:G}},rx="_container_zv1tx_1",ox="_loader_zv1tx_19",sx="_video_zv1tx_29",ix="_controlsOverlay_zv1tx_37",ax="_timeline_zv1tx_58",cx="_controlsRow_zv1tx_65",lx="_controlGroup_zv1tx_83",ux="_iconButton_zv1tx_100",dx="_seekButton_zv1tx_113",fx="_menuButton_zv1tx_133",hx="_liveBadge_zv1tx_149",Ae={container:rx,loader:ox,video:sx,controlsOverlay:ix,timeline:ax,controlsRow:cx,controlGroup:lx,iconButton:ux,seekButton:dx,menuButton:fx,liveBadge:hx},go=({label:e,valueLabel:t,selectedValue:n,options:r,onChange:o,disabled:s,ariaLabel:i})=>{const[a,c]=x.useState(null),u=!!a;return y.jsxs(y.Fragment,{children:[y.jsx(A.ButtonBase,{disabled:s,className:Ae.menuButton,"aria-label":i,onClick:l=>c(l.currentTarget),children:e?`${e}: ${t}`:t}),y.jsx(A.Menu,{anchorEl:a,open:u,onClose:()=>c(null),children:r.map(l=>y.jsx(A.MenuItem,{selected:l.value===n,disabled:l.disabled,onClick:()=>{o(l.value),c(null)},children:l.label},`${e}-${String(l.value)}`))})]})},mx=e=>()=>{const t=e.current;t&&(t.paused?t.play().catch(()=>{}):t.pause())},px=(e,t,n)=>r=>{const o=e.current;if(!o||!t)return;const s=Xs(o),i=Math.min(Math.max(o.currentTime+r,0),s);o.currentTime=i,n()},gx=e=>()=>{e.current&&(document.fullscreenElement?document.exitFullscreen().catch(()=>{}):e.current.requestFullscreen().catch(()=>{}))},yx=(e,t,n)=>r=>{const o=e.find(s=>s.value===r)??null;t(o),n==null||n(o)},vx=(e,t)=>(n,r)=>{if(!e)return;const o=Array.isArray(r)?r[0]:r;t(o)},bx=(e,t,n)=>(r,o)=>{const s=e.current;if(!s||!t)return;const i=Array.isArray(o)?o[0]:o,a=Xs(s);s.currentTime=Math.min(Math.max(i,0),a),n()},Bu=({stream:e=null,availableQualities:t=[],initialQuality:n,onQualityChange:r,autoPlay:o=!0,playsInline:s=!0,muted:i=!0,poster:a,className:c,sx:u,liveThresholdSeconds:l=2,allowPlaybackRateForStream:d=!1,playbackRates:f=[.5,1,1.5,2],zoomLevels:h=[1,1.2,1.5],width:p,height:m,aspectRatio:v="16 / 9",showTimestamp:S=!0,showTimeline:T=!0})=>{const b=X.useTheme(),[w,C]=x.useState(""),[E,P]=x.useState(!0),M=x.useRef(null);x.useEffect(()=>{if(!S)return;const Te=()=>{const He=new Date,Dn=String(He.getDate()).padStart(2,"0"),nd=String(He.getMonth()+1).padStart(2,"0"),rd=He.getFullYear(),od=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"][He.getDay()],sd=String(He.getHours()).padStart(2,"0"),id=String(He.getMinutes()).padStart(2,"0"),ad=String(He.getSeconds()).padStart(2,"0");C(`${Dn}-${nd}-${rd}, ${od} ${sd}:${id}:${ad}`)};Te();const Ln=setInterval(Te,1e3);return()=>clearInterval(Ln)},[S]),x.useEffect(()=>{const Te=I.current;if(!Te)return;const Ln=()=>{M.current&&(clearTimeout(M.current),M.current=null),P(!0)},He=()=>{M.current=setTimeout(()=>{P(!1)},1e4)},Dn=()=>{E||P(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{P(!1)},1e4)};return Te.addEventListener("mouseenter",Ln),Te.addEventListener("mouseleave",He),Te.addEventListener("mousemove",Dn),()=>{Te.removeEventListener("mouseenter",Ln),Te.removeEventListener("mouseleave",He),Te.removeEventListener("mousemove",Dn),M.current&&clearTimeout(M.current)}},[E]);const{containerRef:I,videoRef:V,selectedQuality:D,setSelectedQuality:g,isPlaying:$,isLive:R,canSeek:W,currentTime:K,setCurrentTime:G,seekableEnd:j,playbackRate:Q,setPlaybackRate:L,zoom:_,setZoom:N,isFullscreen:O,isLoading:B,canAdjustPlaybackRate:Y,updateLiveStatus:U}=nx({stream:e,availableQualities:t,initialQuality:n,autoPlay:o,liveThresholdSeconds:l,allowPlaybackRateForStream:d}),z=mx(V),Z=px(V,W,U),q=gx(I),J=yx(t,g,r),me=vx(W,G),F=bx(V,W,U),_e=h.map(Te=>({value:Te,label:`${Math.round(Te*100)}%`})),Ue=f.map(Te=>({value:Te,label:`${Te}x`})),it=t.map(Te=>({value:Te.value,label:Te.label})),$r=(D==null?void 0:D.label)??"Auto",Qt=`${Math.round(_*100)}%`,en=`${Q}x`,tn=W&&j>0,Nr=tx(p,m,v);return y.jsxs(A.Box,{ref:I,className:`${Ae.container} ${c||""}`.trim(),style:Nr,sx:{borderRadius:0,backgroundColor:b.palette.common.black,...u},children:[B&&y.jsx(A.Box,{className:Ae.loader,sx:{backgroundColor:b.palette.common.black},children:y.jsx(A.CircularProgress,{size:60,sx:{color:b.palette.primary.contrastText,width:{xs:"48px",sm:"60px"},height:{xs:"48px",sm:"60px"}}})}),y.jsx("video",{ref:V,className:Ae.video,autoPlay:o,playsInline:s,muted:i,poster:a,style:{transform:`scale(${_})`}}),S&&w&&y.jsx(A.Box,{sx:{position:"absolute",top:0,left:0,right:0,padding:{xs:"10px 12px",sm:"12px 16px"}},children:y.jsx(A.Typography,{variant:"body2",sx:{color:b.palette.common.white,fontWeight:500,fontSize:{xs:"12px",sm:"14px"},textShadow:"0 2px 8px rgba(0,0,0,0.8)"},children:w})}),R&&!E&&y.jsx(A.Box,{sx:{position:"absolute",bottom:16,left:20,zIndex:10},children:y.jsx(A.Box,{className:Ae.liveBadge,sx:{backgroundColor:X.alpha(b.palette.common.white,.9),color:b.palette.common.black},component:"span","aria-live":"polite",children:"ao vivo"})}),y.jsxs(A.Box,{className:Ae.controlsOverlay,sx:{opacity:E?1:0,visibility:E?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease"},children:[T&&y.jsx(A.Box,{className:Ae.timeline,children:y.jsx(A.Slider,{size:"small",min:0,max:tn?j:1,step:1,value:tn?K:0,disabled:!tn,onChange:me,onChangeCommitted:F,"aria-label":"Linha do tempo do video",sx:{color:b.palette.common.white,"& .MuiSlider-thumb":{width:12,height:12,backgroundColor:b.palette.common.white},"& .MuiSlider-track":{border:"none",backgroundColor:b.palette.common.white},"& .MuiSlider-rail":{backgroundColor:X.alpha(b.palette.common.white,.3),opacity:1}}})}),y.jsxs(A.Box,{className:Ae.controlsRow,children:[y.jsxs(A.Box,{className:Ae.controlGroup,children:[y.jsx(A.Box,{className:Ae.liveBadge,sx:{backgroundColor:R?X.alpha(b.palette.common.white,.9):X.alpha(b.palette.common.white,.15),color:R?b.palette.common.black:X.alpha(b.palette.common.white,.7)},component:"span","aria-live":"polite",children:"ao vivo"}),y.jsx(A.Box,{className:Ae.seekButton,component:"button",onClick:()=>Z(-15),"aria-label":"Voltar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:"15s"}),y.jsx(A.IconButton,{className:Ae.iconButton,onClick:()=>Z(-15),"aria-label":"Recuar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:y.jsx(Oe.FastRewind,{fontSize:"small"})}),y.jsx(A.IconButton,{className:Ae.iconButton,onClick:z,"aria-label":"Play/Pause",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:$?y.jsx(Oe.Pause,{fontSize:"small"}):y.jsx(Oe.PlayArrow,{fontSize:"small"})}),y.jsx(A.IconButton,{className:Ae.iconButton,onClick:()=>Z(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:y.jsx(Oe.FastForward,{fontSize:"small"})}),y.jsx(A.Box,{className:Ae.seekButton,component:"button",onClick:()=>Z(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:"15s"})]}),y.jsxs(A.Box,{className:Ae.controlGroup,children:[y.jsx(A.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}}},children:y.jsx(go,{label:"",valueLabel:en,selectedValue:Q,options:Ue,ariaLabel:"Selecionar velocidade de reprodução",onChange:L,disabled:!Y})}),it.length>0?y.jsx(A.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}}},children:y.jsx(go,{label:"",valueLabel:$r,selectedValue:(D==null?void 0:D.value)??"auto",options:it,ariaLabel:"Selecionar qualidade do vídeo",onChange:J})}):null,y.jsx(A.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}}},children:y.jsx(go,{label:"",valueLabel:Qt,selectedValue:_,options:_e,ariaLabel:"Selecionar zoom do vídeo",onChange:N})}),y.jsx(A.IconButton,{className:Ae.iconButton,onClick:q,"aria-label":"Fullscreen",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:O?y.jsx(Oe.FullscreenExit,{fontSize:"small"}):y.jsx(Oe.Fullscreen,{fontSize:"small"})})]})]})]})]})};Bu.displayName="VideoPlayer";const xx=st(y.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"UndoOutlined"),Sx=st(y.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Tx=st(y.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),Cx="_root_1gj5n_1",wx="_container_1gj5n_6",_x="_header_1gj5n_13",Ex="_headerText_1gj5n_21",Ax="_controls_1gj5n_27",Mx="_iconButton_1gj5n_34",Px="_zoomGroup_1gj5n_43",kx="_zoomTrack_1gj5n_52",Ix="_zoomTrackFill_1gj5n_59",Rx="_layers_1gj5n_67",Ox="_timeScale_1gj5n_78",Lx="_videoTrack_1gj5n_82",Dx="_eventsTrack_1gj5n_86",jx="_trackBox_1gj5n_90",Bx="_trackLabelRow_1gj5n_95",$x="_label_1gj5n_103",Nx="_trackArea_1gj5n_112",Vx="_tick_1gj5n_118",Fx="_tickMajor_1gj5n_126",zx="_tickMinor_1gj5n_131",Wx="_tickLabel_1gj5n_135",Ux="_segment_1gj5n_146",Hx="_event_1gj5n_86",Gx="_eventDot_1gj5n_166",Kx="_selectionOverlay_1gj5n_172",Yx="_playhead_1gj5n_180",Zx="_playheadLine_1gj5n_190",qx="_playheadHandle_1gj5n_199",ee={root:Cx,container:wx,header:_x,headerText:Ex,controls:Ax,iconButton:Mx,zoomGroup:Px,zoomTrack:kx,zoomTrackFill:Ix,layers:Rx,timeScale:Ox,videoTrack:Lx,eventsTrack:Dx,trackBox:jx,trackLabelRow:Bx,label:$x,trackArea:Nx,tick:Vx,tickMajor:Fx,tickMinor:zx,tickLabel:Wx,segment:Ux,event:Hx,eventDot:Gx,selectionOverlay:Kx,playhead:Yx,playheadLine:Zx,playheadHandle:qx},tt={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function $u(e){return"init"in e}function ns(e){return!!e.write}function nc(e){return"v"in e||"e"in e}function mr(e){if("e"in e)throw e.e;if((tt?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const pr=new WeakMap;function Nu(e){var t;return gr(e)&&!!((t=pr.get(e))!=null&&t[0])}function Xx(e){const t=pr.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function rs(e,t){let n=pr.get(e);if(!n){n=[!0,new Set],pr.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function gr(e){return typeof(e==null?void 0:e.then)=="function"}function Vu(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function Fu(e,t,n){var r;const o=new Set;for(const s of((r=n.get(e))==null?void 0:r.t)||[])o.add(s);for(const s of t.p)o.add(s);return o}const Jx=(e,t,...n)=>t.read(...n),Qx=(e,t,...n)=>t.write(...n),eS=(e,t)=>{if(t.INTERNAL_onInit)return t.INTERNAL_onInit(e);if(t.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),t.unstable_onInit(e)},tS=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},nS=(e,t)=>{var n;const r=ke(e),o=r[0],s=r[6],i=r[9];if((tt?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let a=o.get(t);return a||(a={d:new Map,p:new Set,n:0},o.set(t,a),(n=s.i)==null||n.call(s,t),i==null||i(e,t)),a},rS=e=>{const t=ke(e),n=t[1],r=t[3],o=t[4],s=t[5],i=t[6],a=t[13],c=[],u=l=>{try{l()}catch(d){c.push(d)}};do{i.f&&u(i.f);const l=new Set,d=l.add.bind(l);r.forEach(f=>{var h;return(h=n.get(f))==null?void 0:h.l.forEach(d)}),r.clear(),s.forEach(d),s.clear(),o.forEach(d),o.clear(),l.forEach(u),r.size&&a(e)}while(r.size||s.size||o.size);if(c.length)throw new AggregateError(c)},oS=e=>{const t=ke(e),n=t[1],r=t[2],o=t[3],s=t[11],i=t[14],a=t[17],c=[],u=new WeakSet,l=new WeakSet,d=Array.from(o);for(;d.length;){const f=d[d.length-1],h=s(e,f);if(l.has(f)){d.pop();continue}if(u.has(f)){if(r.get(f)===h.n)c.push([f,h]);else if((tt?"production":void 0)!=="production"&&r.has(f))throw new Error("[Bug] invalidated atom exists");l.add(f),d.pop();continue}u.add(f);for(const p of Fu(f,h,n))u.has(p)||d.push(p)}for(let f=c.length-1;f>=0;--f){const[h,p]=c[f];let m=!1;for(const v of p.d.keys())if(v!==h&&o.has(v)){m=!0;break}m&&(i(e,h),a(e,h)),r.delete(h)}},os=new WeakSet,sS=(e,t)=>{var n,r;const o=ke(e),s=o[1],i=o[2],a=o[3],c=o[6],u=o[7],l=o[11],d=o[12],f=o[13],h=o[14],p=o[16],m=o[17],v=o[20],S=l(e,t);if(nc(S)){if(s.has(t)&&i.get(t)!==S.n)return S;let I=!1;for(const[V,D]of S.d)if(h(e,V).n!==D){I=!0;break}if(!I)return S}S.d.clear();let T=!0;function b(){s.has(t)&&(m(e,t),f(e),d(e))}function w(I){var V;if(I===t){const g=l(e,I);if(!nc(g))if($u(I))v(e,I,I.init);else throw new Error("no atom init");return mr(g)}const D=h(e,I);try{return mr(D)}finally{S.d.set(I,D.n),Nu(S.v)&&Vu(t,S.v,D),s.has(t)&&((V=s.get(I))==null||V.t.add(t)),T||b()}}let C,E;const P={get signal(){return C||(C=new AbortController),C.signal},get setSelf(){return(tt?"production":void 0)!=="production"&&!ns(t)&&console.warn("setSelf function cannot be used with read-only atom"),!E&&ns(t)&&(E=(...I)=>{if((tt?"production":void 0)!=="production"&&T&&console.warn("setSelf function cannot be called in sync"),!T)try{return p(e,t,...I)}finally{f(e),d(e)}}),E}},M=S.n;try{(tt?"production":void 0)!=="production"&&os.delete(e);const I=u(e,t,w,P);return(tt?"production":void 0)!=="production"&&os.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,t,I),gr(I)&&(rs(I,()=>C==null?void 0:C.abort()),I.then(b,b)),(n=c.r)==null||n.call(c,t),S}catch(I){return delete S.v,S.e=I,++S.n,S}finally{T=!1,M!==S.n&&i.get(t)===M&&(i.set(t,S.n),a.add(t),(r=c.c)==null||r.call(c,t))}},iS=(e,t)=>{const n=ke(e),r=n[1],o=n[2],s=n[11],i=[t];for(;i.length;){const a=i.pop(),c=s(e,a);for(const u of Fu(a,c,r)){const l=s(e,u);o.set(u,l.n),i.push(u)}}},aS=(e,t,...n)=>{const r=ke(e),o=r[3],s=r[6],i=r[8],a=r[11],c=r[12],u=r[13],l=r[14],d=r[15],f=r[16],h=r[17],p=r[20];let m=!0;const v=T=>mr(l(e,T)),S=(T,...b)=>{var w;const C=a(e,T);try{if(T===t){if(!$u(T))throw new Error("atom not writable");(tt?"production":void 0)!=="production"&&os.add(e);const E=C.n,P=b[0];p(e,T,P),h(e,T),E!==C.n&&(o.add(T),d(e,T),(w=s.c)==null||w.call(s,T));return}else return f(e,T,...b)}finally{m||(u(e),c(e))}};try{return i(e,t,v,S,...n)}finally{m=!1}},cS=(e,t)=>{var n;const r=ke(e),o=r[1],s=r[3],i=r[6],a=r[11],c=r[15],u=r[18],l=r[19],d=a(e,t),f=o.get(t);if(f&&!Nu(d.v)){for(const[h,p]of d.d)if(!f.d.has(h)){const m=a(e,h);u(e,h).t.add(t),f.d.add(h),p!==m.n&&(s.add(h),c(e,h),(n=i.c)==null||n.call(i,h))}for(const h of f.d)if(!d.d.has(h)){f.d.delete(h);const p=l(e,h);p==null||p.t.delete(t)}}},lS=(e,t)=>{var n;const r=ke(e),o=r[1],s=r[4],i=r[6],a=r[10],c=r[11],u=r[12],l=r[13],d=r[14],f=r[16],h=r[18],p=c(e,t);let m=o.get(t);if(!m){d(e,t);for(const v of p.d.keys())h(e,v).t.add(t);if(m={l:new Set,d:new Set(p.d.keys()),t:new Set},o.set(t,m),ns(t)){const v=()=>{let S=!0;const T=(...b)=>{try{return f(e,t,...b)}finally{S||(l(e),u(e))}};try{const b=a(e,t,T);b&&(m.u=()=>{S=!0;try{b()}finally{S=!1}})}finally{S=!1}};s.add(v)}(n=i.m)==null||n.call(i,t)}return m},uS=(e,t)=>{var n,r;const o=ke(e),s=o[1],i=o[5],a=o[6],c=o[11],u=o[19],l=c(e,t);let d=s.get(t);if(!d||d.l.size)return d;let f=!1;for(const h of d.t)if((n=s.get(h))!=null&&n.d.has(t)){f=!0;break}if(!f){d.u&&i.add(d.u),d=void 0,s.delete(t);for(const h of l.d.keys()){const p=u(e,h);p==null||p.t.delete(t)}(r=a.u)==null||r.call(a,t);return}return d},dS=(e,t,n)=>{const r=ke(e)[11],o=r(e,t),s="v"in o,i=o.v;if(gr(n))for(const a of o.d.keys())Vu(t,n,r(e,a));o.v=n,delete o.e,(!s||!Object.is(i,o.v))&&(++o.n,gr(i)&&Xx(i))},fS=(e,t)=>{const n=ke(e)[14];return mr(n(e,t))},hS=(e,t,...n)=>{const r=ke(e),o=r[12],s=r[13],i=r[16];try{return i(e,t,...n)}finally{s(e),o(e)}},mS=(e,t,n)=>{const r=ke(e),o=r[12],s=r[18],i=r[19],c=s(e,t).l;return c.add(n),o(e),()=>{c.delete(n),i(e,t),o(e)}},zu=new WeakMap,ke=e=>{const t=zu.get(e);if((tt?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function pS(...e){const t={get(r){const o=ke(t)[21];return o(t,r)},set(r,...o){const s=ke(t)[22];return s(t,r,...o)},sub(r,o){const s=ke(t)[23];return s(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Jx,Qx,eS,tS,nS,rS,oS,sS,iS,aS,cS,lS,uS,dS,fS,hS,mS,void 0].map((r,o)=>e[o]||r);return zu.set(t,Object.freeze(n)),t}const Wu={};let gS=0;function Jt(e,t){const n=`atom${++gS}`,r={toString(){return(Wu?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=yS,r.write=vS),r}function yS(e){return e(this)}function vS(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function bS(){return pS()}let un;function xS(){return un||(un=bS(),(Wu?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=un),globalThis.__JOTAI_DEFAULT_STORE__!==un&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),un}const SS={},TS=x.createContext(void 0);function Uu(e){return x.useContext(TS)||xS()}const ss=e=>typeof(e==null?void 0:e.then)=="function",is=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},CS=x.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(is(e),e)}),yo=new WeakMap,rc=(e,t)=>{let n=yo.get(e);return n||(n=new Promise((r,o)=>{let s=e;const i=u=>l=>{s===u&&r(l)},a=u=>l=>{s===u&&o(l)},c=()=>{try{const u=t();ss(u)?(yo.set(u,n),s=u,u.then(i(u),a(u)),rs(u,c)):r(u)}catch(u){o(u)}};e.then(i(e),a(e)),rs(e,c)}),yo.set(e,n)),n};function yr(e,t){const{delay:n,unstable_promiseStatus:r=!x.use}={},o=Uu(),[[s,i,a],c]=x.useReducer(l=>{const d=o.get(e);return Object.is(l[0],d)&&l[1]===o&&l[2]===e?l:[d,o,e]},void 0,()=>[o.get(e),o,e]);let u=s;if((i!==o||a!==e)&&(c(),u=o.get(e)),x.useEffect(()=>{const l=o.sub(e,()=>{if(r)try{const d=o.get(e);ss(d)&&is(rc(d,()=>o.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),l},[o,e,n,r]),x.useDebugValue(u),ss(u)){const l=rc(u,()=>o.get(e));return r&&is(l),CS(l)}return u}function wS(e,t){const n=Uu();return x.useCallback((...o)=>{if((SS?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function zt(e,t){return[yr(e),wS(e)]}const Js=Jt(0),Qs=Jt(!0),ei=Jt(null),Hu=Jt({windowSeconds:24*60*60,fps:30}),Gu=Jt([]),Ku=Jt([]);function be(e,t,n){return Math.min(n,Math.max(t,e))}function ft(e){const{time:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?0:(t-n)/r*o}function dn(e){const{px:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?n:n+t/o*r}function we(e){return String(Math.floor(e)).padStart(2,"0")}function _S(e=Date.now()){const t=new Date(e);return t.getHours()*3600+t.getMinutes()*60+t.getSeconds()+t.getMilliseconds()/1e3}function vo(e){const t=Math.max(0,e),n=Math.floor(t/3600)%24,r=Math.floor(t%3600/60),o=Math.floor(t%60);return`${we(n)}:${we(r)}:${we(o)}`}function ES(e,t){const n=Math.max(0,e),r=Math.floor(n/3600)%24,o=Math.floor(n%3600/60),s=Math.floor(n%60),i=n-Math.floor(n),a=Math.floor(i*t);return`${we(r)}:${we(o)}:${we(s)}:${we(a)}`}function bo(e){const t=Math.max(0,e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=Math.floor(t%60);return n>0?`${we(n)}:${we(r)}:${we(o)}`:`${we(r)}:${we(o)}`}function AS(e,t){const n=Math.max(0,e),r=Math.floor(n/3600),o=Math.floor(n%3600/60),s=Math.floor(n%60),i=n-Math.floor(n),a=Math.floor(i*t);return r>0?`${we(r)}:${we(o)}:${we(s)}:${we(a)}`:`${we(o)}:${we(s)}:${we(a)}`}function MS(e){const{width:t,windowSeconds:n,fps:r}=e,o=t>0?t/n:0,s=1/Math.max(1,r),i=[s,2*s,5*s,.25,.5,1,2,5,10,15,30,60,2*60,5*60,10*60,15*60,30*60,60*60,2*60*60,3*60*60,6*60*60],a=90,c=45;let u=i[i.length-1];for(const f of i)if(f*o>=a){u=f;break}const l=[u/2,u/5,u/10].filter(f=>f>0);let d=l[0]??u;for(const f of l)if(f*o>=c){d=f;break}return{majorStep:u,minorStep:d}}const PS=(e,t,n)=>t>=3600?vo(e).slice(0,2)+":00:00":t>=60?vo(e).slice(0,5):t>=1?vo(e):ES(e,n),kS=(e,t,n)=>t>=3600||t>=60||t>=1?bo(e):AS(e,n);function IS(){const e=x.useRef(null),[t,n]=x.useState(0);return x.useLayoutEffect(()=>{const r=e.current;if(!r)return;const o=new ResizeObserver(()=>{n(r.getBoundingClientRect().width)});return o.observe(r),n(r.getBoundingClientRect().width),()=>o.disconnect()},[]),{ref:e,width:t}}function RS(e){const{totalSeconds:t,enableWheelZoom:n,autoZoomOnSelection:r,tickLabelFormatter:o,clearSelectionOnEventClick:s}=e,[i,a]=zt(Js),[c,u]=zt(Qs),[l,d]=zt(ei),f=yr(Gu),h=yr(Ku),[p,m]=zt(Hu),{ref:v,width:S}=IS(),T=102,w=Math.max(0,S-T-10),[C,E]=x.useState(0),P=x.useMemo(()=>{const O=Math.max(1/Math.max(1,p.fps),.05);return be(p.windowSeconds,O,t)},[p.windowSeconds,p.fps,t]);x.useEffect(()=>{if(!c||S<=0)return;const O=be(i-P*.9,0,Math.max(0,t-P));E(O)},[i,c,S,P,t]);const M=x.useMemo(()=>{const O=be(C,0,Math.max(0,t-P)),B=O+P;return{start:O,end:B,seconds:P}},[C,t,P]),I=x.useMemo(()=>{if(w<=0)return[];const{majorStep:O,minorStep:B}=MS({width:w,windowSeconds:M.seconds,fps:p.fps}),Y=Math.floor(M.start/B)*B,U=M.end,z=[],Z=B*1e-6;for(let q=Y;q<=U+Z;q+=B){const J=ft({time:q,windowStart:M.start,windowSeconds:M.seconds,width:w});if(J<-1||J>w+1)continue;const me=Math.abs(q/O-Math.round(q/O))<1e-6;z.push({time:q,px:J,kind:me?"major":"minor",label:me?o(q,O,p.fps):void 0})}return z},[w,o,M.end,M.seconds,M.start,p.fps]),V=x.useRef(null),D=x.useRef(null),g=O=>{D.current=O,V.current==null&&(V.current=requestAnimationFrame(()=>{V.current=null;const B=D.current;D.current=null,B==null||B()}))};x.useEffect(()=>()=>{V.current!=null&&cancelAnimationFrame(V.current)},[]);const $=x.useRef(null),R=O=>{const B=v.current;if(!B)return 0;const Y=B.getBoundingClientRect();return be(O-Y.left-T,0,w)};return{viewportRef:v,width:S,axisLeft:T,axisWidth:w,totalSeconds:t,zoom:p,setZoom:m,isLive:c,setIsLive:u,currentTime:i,selectedRange:l,setSelectedRange:d,videoSegments:f,events:h,view:M,ticks:I,onWheel:O=>{if(!n||S<=0)return;O.preventDefault(),u(!1);const B=R(O.clientX),Y=be(dn({px:B,windowStart:M.start,windowSeconds:M.seconds,width:w}),0,t),z=O.deltaY<0?.8:1.25,Z=be(M.seconds*z,Math.max(1/Math.max(1,p.fps),.05),t),q=be(Y-B/Math.max(1,w)*Z,0,Math.max(0,t-Z));m(J=>({...J,windowSeconds:Z})),E(q)},onPointerDownScrub:O=>{if(O.button!==0)return;const B=v.current;if(!B)return;B.setPointerCapture(O.pointerId);const Y=R(O.clientX),U=be(dn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:w}),0,t);u(!1),$.current={mode:"playhead",pointerId:O.pointerId,startPx:Y,startTime:U},a(U)},onPointerDownSelect:O=>{if(O.button!==0)return;const B=v.current;if(!B)return;B.setPointerCapture(O.pointerId);const Y=R(O.clientX),U=be(dn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:w}),0,t);u(!1),$.current={mode:"select",pointerId:O.pointerId,startPx:Y,startTime:U},d({start:U,end:U})},onPointerDownPlayhead:O=>{if(O.button!==0)return;const B=v.current;if(!B)return;B.setPointerCapture(O.pointerId);const Y=R(O.clientX),U=be(dn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:w}),0,t);u(!1),$.current={mode:"playhead",pointerId:O.pointerId,startPx:Y,startTime:U},a(U)},onPointerMove:O=>{const B=$.current;if(!B||B.pointerId!==O.pointerId)return;const Y=R(O.clientX);g(()=>{const U=be(dn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:w}),0,t);if(B.mode==="playhead")a(U);else{const z=Math.min(B.startTime,U),Z=Math.max(B.startTime,U);d({start:z,end:Z})}})},onPointerUp:O=>{const B=$.current;if(!(!B||B.pointerId!==O.pointerId)&&($.current=null,B.mode==="select"&&l)){const Y=Math.abs(l.end-l.start);if(Y<Math.max(1/Math.max(1,p.fps),.1))d(null);else if(r){const U=be(Y*1.05,Math.max(1/Math.max(1,p.fps),.05),t),z=be(l.start,0,Math.max(0,t-U));m(Z=>({...Z,windowSeconds:U})),E(z)}}},onClickEvent:O=>{s&&d(null),u(!1),a(be(O,0,t)),E(be(O-M.seconds/2,0,Math.max(0,t-M.seconds)))},resetView:()=>{u(!1),m(O=>({...O,windowSeconds:t})),E(0)}}}const Yu=({ticks:e,tickColor:t,labelColor:n})=>y.jsx("div",{className:ee.trackArea,children:e.map(r=>y.jsxs("div",{children:[y.jsx("div",{className:`${ee.tick} ${r.kind==="minor"?ee.tickMinor:ee.tickMajor}`.trim(),style:{left:`${r.px}px`,backgroundColor:t}}),r.kind==="major"&&r.label?y.jsx("div",{className:ee.tickLabel,style:{left:`${r.px}px`,color:n},children:r.label}):null]},`${r.time}-${r.kind}`))});Yu.displayName="TimeScale";const Zu=({segments:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,segmentColor:s,segmentColorHover:i})=>{const a=e.map(c=>({start:be(c.start,0,o),end:be(c.end,0,o)})).filter(c=>c.end>c.start).map(c=>{const u=Math.max(c.start,t),l=Math.min(c.end,t+n);return{start:u,end:l}}).filter(c=>c.end>c.start);return y.jsx("div",{className:ee.trackArea,children:a.map((c,u)=>{const l=ft({time:c.start,windowStart:t,windowSeconds:n,width:r}),d=ft({time:c.end,windowStart:t,windowSeconds:n,width:r}),f=Math.max(0,d-l);return y.jsx("div",{className:ee.segment,style:{left:`${l}px`,width:`${f}px`,background:s},onMouseEnter:h=>{h.currentTarget.style.background=i},onMouseLeave:h=>{h.currentTarget.style.background=s},"aria-hidden":!0},`${c.start}-${c.end}-${u}`)})})};Zu.displayName="VideoTrack";const qu=({events:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,onClickEvent:s,eventBg:i,eventBgHover:a,eventDot:c})=>{const u=e.map(l=>({...l,time:be(l.time,0,o)})).filter(l=>l.time>=t&&l.time<=t+n);return y.jsx("div",{className:ee.trackArea,children:u.map(l=>{const d=ft({time:l.time,windowStart:t,windowSeconds:n,width:r});return y.jsx("button",{type:"button",className:ee.event,onPointerDown:f=>{f.stopPropagation()},onClick:()=>s(l.time),style:{left:`${d}px`,backgroundColor:i,border:"none",padding:0},onMouseEnter:f=>{f.currentTarget.style.backgroundColor=a},onMouseLeave:f=>{f.currentTarget.style.backgroundColor=i},"aria-label":`Evento em ${l.time.toFixed(2)}s`,children:l.icon?l.icon:y.jsx("span",{className:ee.eventDot,style:{backgroundColor:c}})},l.id)})})};qu.displayName="EventsTrack";const Xu=({className:e,title:t="Timeline",subtitle:n="Arraste para selecionar e aplicar zoom no período desejado",showHeader:r=!0,timeScaleMode:o="day24h",tickLabelFormatter:s,totalSeconds:i=24*60*60,enableWheelZoom:a=!0,height:c=190,autoZoomOnSelection:u=!0,showZoomControls:l=!0,enableScrubOnTracks:d=!1,clearSelectionOnEventClick:f=!0})=>{const h=X.useTheme(),p=s??(o==="duration"?kS:PS),{viewportRef:m,axisLeft:v,axisWidth:S,zoom:T,currentTime:b,selectedRange:w,videoSegments:C,events:E,view:P,ticks:M,onWheel:I,onPointerDownScrub:V,onPointerDownSelect:D,onPointerDownPlayhead:g,onPointerMove:$,onPointerUp:R,onClickEvent:W,resetView:K,setZoom:G}=RS({totalSeconds:i,enableWheelZoom:a,autoZoomOnSelection:u,tickLabelFormatter:p,clearSelectionOnEventClick:f}),j=S?v+ft({time:b,windowStart:P.start,windowSeconds:P.seconds,width:S}):v,Q=h.palette.common.white,L=X.alpha(h.palette.common.black,.16),_="0px 4px 5.3px 0px rgba(0,0,0,0.16)",N=h.palette.mode==="dark"?X.alpha(h.palette.common.white,.7):"#79747e",O=X.alpha(h.palette.common.black,.16),B="#2c2c2c",Y=X.alpha(h.palette.primary.main,.15),U=X.alpha(h.palette.primary.main,.22),z=X.alpha(h.palette.common.white,1),Z=X.alpha(h.palette.common.white,1),q=X.alpha(h.palette.common.black,.55),J=X.alpha(h.palette.primary.main,.12),me=h.palette.primary.main,F=Math.max(1/Math.max(1,T.fps),.5),_e=F/i,Ue=(()=>{const Qt=be(P.seconds,F,i);if(_e<=0||_e>=1)return 0;const en=Math.log(Qt/i)/Math.log(_e)*100;return be(en,0,100)})(),it=Qt=>{const en=be(Qt,0,100),tn=i*Math.pow(_e,en/100);G(Nr=>({...Nr,windowSeconds:be(tn,F,i)}))},$r=`${Math.round(Ue)}%`;return y.jsxs(A.Box,{className:`${ee.root} ${ee.container} ${e??""}`.trim(),sx:{backgroundColor:Q,border:`1px solid ${L}`,boxShadow:_,px:1,py:2},children:[r?y.jsxs("div",{className:ee.header,children:[y.jsxs("div",{className:ee.headerText,children:[y.jsx(A.Typography,{variant:"subtitle1",sx:{color:N,fontWeight:500},children:t}),y.jsx(A.Typography,{variant:"body2",sx:{color:N},children:n})]}),l?y.jsxs("div",{className:ee.controls,children:[y.jsx(A.Box,{className:ee.iconButton,sx:{border:`1px solid ${X.alpha(h.palette.common.black,.22)}`},children:y.jsx(A.IconButton,{size:"small",onClick:K,"aria-label":"Reset zoom",sx:{width:32,height:32},children:y.jsx(xx,{fontSize:"small"})})}),y.jsxs(A.Box,{className:ee.zoomGroup,sx:{backgroundColor:h.palette.common.white,border:`1px solid ${X.alpha(h.palette.common.black,.22)}`},"aria-label":"Zoom controls",children:[y.jsx(A.IconButton,{size:"small","aria-label":"Zoom out",onClick:()=>it(Ue-10),children:y.jsx(Tx,{fontSize:"small"})}),y.jsxs("div",{className:ee.zoomTrack,"aria-hidden":!0,children:[y.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:X.alpha("#f5f5f5",.3),borderRadius:1,boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}}),y.jsx("div",{className:ee.zoomTrackFill,style:{width:$r,backgroundColor:"#f5f5f5",boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}})]}),y.jsx(A.IconButton,{size:"small","aria-label":"Zoom in",onClick:()=>it(Ue+10),children:y.jsx(Sx,{fontSize:"small"})})]})]}):null]}):null,y.jsx(A.Box,{sx:{mt:r?2:0,height:c},children:y.jsxs("div",{ref:m,className:ee.layers,onWheel:I,onPointerMove:$,onPointerUp:R,children:[y.jsxs("div",{className:ee.playhead,style:{left:`${j}px`},onPointerDown:g,role:"slider","aria-label":"Playhead","aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":b,tabIndex:0,children:[y.jsx("div",{className:ee.playheadHandle,style:{borderBottomColor:me}}),y.jsx("div",{className:ee.playheadLine,style:{backgroundColor:me}})]}),y.jsxs("div",{className:`${ee.trackLabelRow} ${ee.timeScale}`.trim(),children:[y.jsx("div",{}),y.jsx("div",{onPointerDown:V,style:{height:"100%",cursor:"ew-resize"},"aria-label":"Régua do tempo",children:y.jsx(Yu,{ticks:M,tickColor:O,labelColor:B})})]}),y.jsxs(A.Box,{className:ee.trackBox,sx:{mt:1,border:`1px solid ${X.alpha(h.palette.common.black,.1)}`,borderRadius:"12px",height:106,position:"relative"},children:[w?y.jsx("div",{className:ee.selectionOverlay,style:{left:`${v+ft({time:w.start,windowStart:P.start,windowSeconds:P.seconds,width:S})}px`,width:`${Math.max(0,ft({time:w.end,windowStart:P.start,windowSeconds:P.seconds,width:S})-ft({time:w.start,windowStart:P.start,windowSeconds:P.seconds,width:S}))}px`,backgroundColor:J}}):null,y.jsxs("div",{className:`${ee.trackLabelRow} ${ee.videoTrack}`.trim(),children:[y.jsx("div",{className:ee.label,style:{color:N},children:"Video"}),y.jsx("div",{onPointerDown:d?V:void 0,style:{height:"100%"},children:y.jsx(Zu,{segments:C,viewStart:P.start,viewSeconds:P.seconds,width:S,totalSeconds:i,segmentColor:Y,segmentColorHover:U})})]}),y.jsxs("div",{className:`${ee.trackLabelRow} ${ee.eventsTrack}`.trim(),children:[y.jsx("div",{className:ee.label,style:{color:N},children:"Eventos"}),y.jsx("div",{onPointerDown:d?V:void 0,style:{height:"100%"},children:y.jsx(qu,{events:E,viewStart:P.start,viewSeconds:P.seconds,width:S,totalSeconds:i,onClickEvent:W,eventBg:z,eventBgHover:Z,eventDot:q})})]}),y.jsx("div",{onPointerDown:D,style:{position:"absolute",left:v,right:10,top:0,bottom:0,cursor:"crosshair"},"aria-label":"Arraste para selecionar"})]})]})})]})};Xu.displayName="VideoTimeline";const Ju=({stream:e=null,src:t,autoPlay:n=!0,muted:r=!0,playsInline:o=!0,className:s,liveEdgeThresholdSeconds:i=2,updateTimeForLiveStream:a=!0,constrainToSelectedRange:c=!0,loopSelection:u=!1})=>{const l=x.useRef(null),[d,f]=zt(Js),[h,p]=zt(Qs),m=yr(ei),v=!!e;x.useEffect(()=>{const b=l.current;if(b){if(e){b.srcObject=e;return}b.srcObject=null,t&&(b.src=t)}},[e,t]),x.useEffect(()=>{const b=l.current;if(!b||v)return;const w=()=>{if(c&&m){const P=Math.max(0,m.start),M=Math.max(P,m.end);b.currentTime<P?b.currentTime=P:b.currentTime>M&&(u?b.currentTime=P:(b.pause(),b.currentTime=M))}if(f(b.currentTime),Number.isFinite(b.duration)&&b.duration>0){const P=b.duration-b.currentTime<=i;p(P)}},C=()=>{if(!c||!m)return;const P=Math.max(0,m.start),M=Math.max(P,m.end);(b.currentTime<P||b.currentTime>M)&&(b.currentTime=P)},E=()=>{h&&Number.isFinite(b.duration)&&b.duration>0&&(b.currentTime=b.duration)};return b.addEventListener("timeupdate",w),b.addEventListener("play",C),b.addEventListener("loadedmetadata",E),()=>{b.removeEventListener("timeupdate",w),b.removeEventListener("play",C),b.removeEventListener("loadedmetadata",E)}},[c,v,h,i,u,m,f,p]);const S=x.useRef(-1);x.useEffect(()=>{const b=l.current;if(!b||v||!t)return;if(h){if(Number.isFinite(b.duration)&&b.duration>0){const C=b.duration;Math.abs(b.currentTime-C)>.25&&(b.currentTime=C,S.current=C)}return}if(Math.abs(S.current-d)<.05)return;let w=d;if(c&&m){const C=Math.max(0,m.start),E=Math.max(C,m.end);w=Math.min(E,Math.max(C,w))}Math.abs(b.currentTime-w)>.25&&(b.currentTime=w,S.current=d)},[c,d,h,v,m,t]),x.useEffect(()=>{const b=l.current;if(!b||v||!t||!c||!m)return;const w=Math.max(0,m.start),C=!b.paused;b.currentTime=w,S.current=w,p(!1),f(w),C&&b.play().catch(()=>{})},[c,v,m,f,p,t]),x.useEffect(()=>{if(!v||(p(!0),!a))return;let b=null,w=!0;const C=()=>{w&&(f(_S()),b=requestAnimationFrame(C))};return b=requestAnimationFrame(C),()=>{w=!1,b!=null&&cancelAnimationFrame(b)}},[v,f,p,a]);const T=x.useMemo(()=>({width:"100%",maxWidth:920,background:"black",aspectRatio:"16 / 9",display:"block"}),[]);return y.jsx("video",{ref:l,className:s,style:T,autoPlay:n,muted:r,playsInline:o,controls:!0})};Ju.displayName="VideoPlayerWebRTC";const OS=st(y.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),LS="_container_1vjy6_1",DS="_segment_1vjy6_7",jS="_selected_1vjy6_20",BS="_label_1vjy6_28",$S="_icon_1vjy6_37",NS="_checkIcon_1vjy6_47",VS="_unselected_1vjy6_53",Ct={container:LS,segment:DS,selected:jS,label:BS,icon:$S,checkIcon:NS,unselected:VS},Qu=({items:e,className:t,sx:n,...r})=>{const s=A.useTheme().palette.mode==="dark",i=(a,c)=>{a.onClick?a.onClick(c):console.log(`Item "${a.label}" clicado`)};return y.jsx(A.Box,{className:`${Ct.container} ${t||""}`,sx:n,"data-theme":s?"dark":"light",...r,children:e.map((a,c)=>y.jsxs(A.Box,{className:`${Ct.segment} ${a.selected?Ct.selected:Ct.unselected}`,onClick:u=>i(a,u),children:[a.selected&&y.jsx(A.Box,{className:Ct.icon,children:y.jsx(OS,{className:Ct.checkIcon})}),y.jsx(A.Box,{className:Ct.label,children:a.label})]},c))})};Qu.displayName="DisplayTypes";const FS=600,xo=[.32,.72,0,1],So=400,ed=({leftContent:e,rightContent:t,gap:n=2,leftRatio:r=.5,leftCollapsed:o=!1,mobileShowOnly:s="both",mobileBreakpointPx:i=FS,className:a,sx:c})=>{const u=A.useTheme(),l=A.useMediaQuery(`(max-width:${i}px)`),d=!l||s==="left"||s==="both",f=!l||s==="right"||s==="both",h=u.spacing(n),p=`flex ${So}ms cubic-bezier(${xo.join(",")}), min-width ${So}ms cubic-bezier(${xo.join(",")})`;if(l&&s!=="both")return y.jsxs(A.Box,{className:a,sx:{display:"grid",gridTemplateColumns:"1fr",width:"100%",height:"100%",minHeight:0,overflow:"hidden",...c},children:[y.jsx(A.Box,{sx:{minWidth:0,minHeight:0,overflow:"hidden",display:d?"flex":"none",flexDirection:"column"},children:e}),y.jsx(A.Box,{sx:{minWidth:0,minHeight:0,overflow:"hidden",display:f?"flex":"none",flexDirection:"column"},children:t})]});const m=o?0:r,v=o?0:void 0,S=o?"none":"auto";return y.jsxs(A.Box,{className:a,sx:{display:"flex",flexDirection:"row",gap:o?0:h,width:"100%",height:"100%",minHeight:0,overflow:"hidden",transition:`gap ${So}ms cubic-bezier(${xo.join(",")})`,...c},children:[y.jsx(A.Box,{sx:{flex:m,minWidth:v,overflow:"hidden",display:"flex",flexDirection:"column",transition:p,pointerEvents:S},children:e}),y.jsx(A.Box,{sx:{flex:1,minWidth:0,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:t})]})};ed.displayName="SplitLayout";const zS=256,td=({children:e,minColumns:t=1,maxColumns:n=3,minItemWidthPx:r=zS,gap:o=2,className:s,sx:i})=>{const c=A.useTheme().spacing(o),u=n-1;return y.jsx(A.Box,{className:s,sx:{"--responsive-grid-gap":c,display:"grid",gap:c,width:"100%",minHeight:0,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, max(${r}px, calc((100% - ${u} * var(--responsive-grid-gap)) / ${n}))), 1fr))`,alignContent:"start",...i},children:e})};td.displayName="ResponsiveGrid";exports.Button=cs;exports.CAMERA_ALGORITHM_FACIAL=Dr;exports.CAMERA_ALGORITHM_LPR=jr;exports.CameraCard=S1;exports.CountCard=ep;exports.DisplayTypes=Qu;exports.FilterButton=dc;exports.FilterChip=fc;exports.FilterModal=Rc;exports.GoogleMap=Eu;exports.MapContent=Zs;exports.MapMarkers=Iu;exports.MapSpot=Ks;exports.ModuleMenu=ju;exports.NotFoundContent=Ou;exports.ResponsiveGrid=td;exports.SearchBar=Ru;exports.SidebarMenu=Du;exports.SplitLayout=ed;exports.VideoPlayer=Bu;exports.VideoPlayerWebRTC=Ju;exports.VideoTimeline=Xu;exports.VisioThemeProvider=md;exports.ZoomControls=M1;exports.currentTimeAtom=Js;exports.darkColors=ge;exports.darkTheme=cc;exports.eventsAtom=Ku;exports.isLiveAtom=Qs;exports.lightColors=pe;exports.lightTheme=ac;exports.radiiTokens=Yn;exports.selectedRangeAtom=ei;exports.spacingScale=dd;exports.spacingTokens=sc;exports.typographyTokens=Ee;exports.useGoogleMapContext=Ys;exports.useVisioTheme=pd;exports.videoSegmentsAtom=Gu;exports.zoomAtom=Hu;
107
+ `,this.renderedStyles.add("marker-pointer-events")}cleanup(){this.styleElement&&(this.styleElement.remove(),this.styleElement=null,this.renderedStyles.clear())}}const Db=new jb;function Bb(e,t){var n;if(!(!((n=google==null?void 0:google.maps)===null||n===void 0)&&n.version))return;const r=google.maps.version.split("."),o=parseInt(r[0],10),s=parseInt(r[1],10);return o>e||o===e&&s>=t}const $b=x.createContext(null),Nb={BOTTOM:["50%","100%"]},Fu=x.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[i,a]=Fb(e),l=x.useMemo(()=>i?{marker:i}:null,[i]);return x.useImperativeHandle(t,()=>i,[i]),a?x.createElement($b.Provider,{value:l},Bd.createPortal(x.createElement(Vb,{anchorPoint:s,styles:r,className:o},n),a)):null});Fu.displayName="AdvancedMarker";function cs(e){return e.nodeType===Node.ELEMENT_NODE}const Vb=({children:e,styles:t,className:n})=>x.createElement("div",{className:n,style:t},e);function Fb(e){const[t,n]=x.useState(null),[r,o]=x.useState(null),s=Hr(),i=Lb("marker"),{children:a,onClick:l,className:u,onMouseEnter:c,onMouseLeave:d,onDrag:f,onDragStart:h,onDragEnd:p,collisionBehavior:m,clickable:v,draggable:S,position:_,title:b,zIndex:C,anchorPoint:T,anchorLeft:w,anchorTop:P}=e,M=x.Children.count(a);return x.useEffect(()=>{if(!s||!i)return;const I=new i.AdvancedMarkerElement;I.map=s,n(I);let V=null;return M>0&&(V=document.createElement("div"),I.content=V,o(V)),()=>{I.map=null,V==null||V.remove(),n(null),o(null)}},[s,i,M]),x.useEffect(()=>{!(t!=null&&t.content)||!cs(t.content)||M>0||(t.content.className=u??"")},[t,u,M]),zb(t,T,w,P,M>0),qn(t,"position",_),qn(t,"title",b??""),qn(t,"zIndex",C),qn(t,"collisionBehavior",m),x.useEffect(()=>{t&&(S!==void 0?t.gmpDraggable=S:f||h||p?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,S,f,p,h]),x.useEffect(()=>{if(!t)return;const I=v!==void 0||!!l||!!c||!!d;t.gmpClickable=I,I&&(t!=null&&t.content)&&cs(t.content)&&(t.content.style.pointerEvents="all",l&&(t.content.style.cursor="pointer"))},[t,v,l,c,d]),Zn(t,"click",l),Zn(t,"drag",f),Zn(t,"dragstart",h),Zn(t,"dragend",p),ul(t==null?void 0:t.element,"mouseenter",c),ul(t==null?void 0:t.element,"mouseleave",d),[t,r]}function zb(e,t,n,r,o){x.useEffect(()=>{if(!e||!o)return;const s=Bb(3,62),i=e.content;if(!(!i||!cs(i))){if(n!==void 0||r!==void 0){s||console.warn(`AdvancedMarker: The anchorLeft and anchorTop props are only supported in Google Maps API version 3.62 and above. The current version is ${google.maps.version}.`),e.anchorLeft=n,e.anchorTop=r,t!==void 0&&console.warn("AdvancedMarker: the anchorPoint prop is ignored when anchorLeft and/or anchorTop are set.");return}if(t!==void 0){const[a,l]=t??Nb.BOTTOM,u=`calc(-1 * ${a})`,c=`calc(-1 * ${l})`;s?(e.anchorLeft=u,e.anchorTop=c,i.style.transform=""):(i.style.transform=`translate(50%, 100%) translate(${u}, ${c})`,e.dataset.origin="rgm",Db.addAdvancedMarkerPointerEventsOverwrite())}}},[e,t,n,r,o])}function Wb(e){const[t,n]=x.useState(null),r=Hr(),{onClick:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:u}=e,c=Xt(e,["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"]),{position:d,draggable:f}=c;return x.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const h=new google.maps.Marker(c);return h.setMap(r),n(h),()=>{h.setMap(null),n(null)}},[r]),x.useEffect(()=>{if(!t)return;const h=t,p=google.maps.event;return o&&p.addListener(h,"click",o),s&&p.addListener(h,"drag",s),i&&p.addListener(h,"dragstart",i),a&&p.addListener(h,"dragend",a),l&&p.addListener(h,"mouseover",l),u&&p.addListener(h,"mouseout",u),t.setDraggable(!!f),()=>{p.clearInstanceListeners(h)}},[t,f,o,s,i,a,l,u]),x.useEffect(()=>{t&&c&&t.setOptions(c)},[t,c]),x.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const Ub=x.forwardRef((e,t)=>{const n=Wb(e);return x.useImperativeHandle(t,()=>n,[n]),x.createElement(x.Fragment,null)});Ub.displayName="Marker";const zu=x.createContext(void 0),oi=()=>{const e=x.useContext(zu);if(!e)throw new Error("useGoogleMapContext must be used within GoogleMap component");return e},si=({children:e})=>{const t=Hr(),[n,r]=x.useState(13),[o,s]=x.useState(null);x.useEffect(()=>{if(!t)return;const a=t.getZoom();a!==void 0&&r(a);const l=t.getBounds();if(l){const d=l.getNorthEast(),f=l.getSouthWest();s([f.lng(),f.lat(),d.lng(),d.lat()])}const u=t.addListener("zoom_changed",()=>{const d=t.getZoom();d!==void 0&&(console.log("[MapContent] Zoom changed:",d),r(d))}),c=t.addListener("bounds_changed",()=>{const d=t.getBounds();if(d){const f=d.getNorthEast(),h=d.getSouthWest();s([h.lng(),h.lat(),f.lng(),f.lat()])}});return()=>{u&&google.maps.event.removeListener(u),c&&google.maps.event.removeListener(c)}},[t]);const i=(a,l=16)=>{t&&(t.setCenter(a),t.setZoom(l))};return t?g.jsx(zu.Provider,{value:{isLoaded:!0,map:t,currentZoom:n,bounds:o,zoomToPosition:i},children:e}):null};si.displayName="MapContent";const Hb=180,Wu=()=>{const{map:e}=oi(),t=x.useRef(null),n=x.useRef(null);return x.useEffect(()=>{if(!e||!t.current)return;const r=new ResizeObserver(()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{try{google.maps.event.trigger(e,"resize")}finally{n.current=null}},Hb)});return r.observe(t.current),()=>{n.current&&clearTimeout(n.current),r.disconnect()}},[e]),g.jsx("div",{ref:t,"aria-hidden":!0,style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",visibility:"hidden"}})};Wu.displayName="MapResizeHandler";const Gb="_googleMap_j4y4m_1",Kb="_container_j4y4m_10",Yb="_errorContainer_j4y4m_21",Xn={googleMap:Gb,container:Kb,errorContainer:Yb},Zb={lat:-26.3044,lng:-48.8487},qb=13,Xb={disableDefaultUI:!0,zoomControl:!1,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,rotateControl:!1,scaleControl:!1,panControl:!1,clickableIcons:!1,keyboardShortcuts:!1},Jb=({colorScheme:e,options:t,onLoad:n,children:r})=>{const o=Hr();return x.useEffect(()=>{o&&(o.setOptions(Xb),t&&o.setOptions(t),n&&n(o))},[o,t,n]),g.jsx(g.Fragment,{children:r})},Uu=({center:e=Zb,zoom:t=qb,className:n,children:r,apiKey:o,mapId:s,themeMode:i="light",options:a,onLoad:l,onError:u})=>{if(!o||!s)return g.jsx("div",{className:`${Xn.container} ${Xn.errorContainer} ${n||""}`,children:g.jsxs("div",{children:[g.jsx("p",{children:"Google Maps não configurado"}),g.jsx("p",{style:{fontSize:"14px",marginTop:"8px",opacity:.7},children:"As props apiKey e mapId são obrigatórias"})]})});const c=i==="dark"?"DARK":"LIGHT",d={defaultCenter:e,defaultZoom:t,mapId:s,className:Xn.googleMap,colorScheme:c},f=`${s}-${c}`;return g.jsx(fb,{apiKey:o,onLoad:()=>{console.log("Google Maps API carregada com sucesso")},onError:h=>{console.error("Erro ao carregar Google Maps API:",h),u&&h instanceof Error&&u(h)},children:g.jsx("div",{className:`${Xn.container} ${n||""}`,style:{width:"100%",height:"400px",minHeight:"400px",position:"relative"},children:g.jsx(Vu,{...d,style:{width:"100%",height:"100%"},children:g.jsx(Jb,{colorScheme:c,options:a,onLoad:l,children:g.jsxs(si,{children:[g.jsx(Wu,{}),r]})})},f)})})};Uu.displayName="GoogleMap";const dl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],So=1,fn=8;class ii{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==So)throw new Error(`Got v${o} data when expected v${So}.`);const s=dl[r&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new ii(a,i,s,t)}constructor(t,n=64,r=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=dl.indexOf(this.ArrayType),i=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,fn,t),this.coords=new this.ArrayType(this.data,fn+a+l,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(fn+i+a+l),this.ids=new this.IndexArrayType(this.data,fn,t),this.coords=new this.ArrayType(this.data,fn+a+l,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(So<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return us(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:a}=this,l=[0,s.length-1,0],u=[];for(;l.length;){const c=l.pop()||0,d=l.pop()||0,f=l.pop()||0;if(d-f<=a){for(let v=f;v<=d;v++){const S=i[2*v],_=i[2*v+1];S>=t&&S<=r&&_>=n&&_<=o&&u.push(s[v])}continue}const h=f+d>>1,p=i[2*h],m=i[2*h+1];p>=t&&p<=r&&m>=n&&m<=o&&u.push(s[h]),(c===0?t<=p:n<=m)&&(l.push(f),l.push(h-1),l.push(1-c)),(c===0?r>=p:o>=m)&&(l.push(h+1),l.push(d),l.push(1-c))}return u}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,a=[0,o.length-1,0],l=[],u=r*r;for(;a.length;){const c=a.pop()||0,d=a.pop()||0,f=a.pop()||0;if(d-f<=i){for(let v=f;v<=d;v++)fl(s[2*v],s[2*v+1],t,n)<=u&&l.push(o[v]);continue}const h=f+d>>1,p=s[2*h],m=s[2*h+1];fl(p,m,t,n)<=u&&l.push(o[h]),(c===0?t-r<=p:n-r<=m)&&(a.push(f),a.push(h-1),a.push(1-c)),(c===0?t+r>=p:n+r>=m)&&(a.push(h+1),a.push(d),a.push(1-c))}return l}}function us(e,t,n,r,o,s){if(o-r<=n)return;const i=r+o>>1;Hu(e,t,i,r,o,s),us(e,t,n,r,i-1,1-s),us(e,t,n,i+1,o,1-s)}function Hu(e,t,n,r,o,s){for(;o>r;){if(o-r>600){const u=o-r+1,c=n-r+1,d=Math.log(u),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(u-f)/u)*(c-u/2<0?-1:1),p=Math.max(r,Math.floor(n-c*f/u+h)),m=Math.min(o,Math.floor(n+(u-c)*f/u+h));Hu(e,t,n,p,m,s)}const i=t[2*n+s];let a=r,l=o;for(hn(e,t,r,n),t[2*o+s]>i&&hn(e,t,r,o);a<l;){for(hn(e,t,a,l),a++,l--;t[2*a+s]<i;)a++;for(;t[2*l+s]>i;)l--}t[2*r+s]===i?hn(e,t,r,l):(l++,hn(e,t,l,o)),l<=n&&(r=l+1),n<=l&&(o=l-1)}}function hn(e,t,n,r){Co(e,n,r),Co(t,2*n,2*r),Co(t,2*n+1,2*r+1)}function Co(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function fl(e,t,n,r){const o=e-n,s=t-r;return o*o+s*s}const Qb={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},hl=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),Tt=2,dt=3,To=4,ut=5,Gu=6;class Ku{constructor(t){this.options=Object.assign(Object.create(Qb),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:o}=this.options;n&&console.time("total time");const s=`prepare ${t.length} points`;n&&console.time(s),this.points=t;const i=[];for(let l=0;l<t.length;l++){const u=t[l];if(!u.geometry)continue;const[c,d]=u.geometry.coordinates,f=hl(Jn(c)),h=hl(Qn(d));i.push(f,h,1/0,l,-1,1),this.options.reduce&&i.push(0)}let a=this.trees[o+1]=this._createTree(i);n&&console.timeEnd(s);for(let l=o;l>=r;l--){const u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const d=this.getClusters([r,o,180,i],n),f=this.getClusters([-180,o,s,i],n);return d.concat(f)}const a=this.trees[this._limitZoom(n)],l=a.range(Jn(r),Qn(i),Jn(s),Qn(o)),u=a.data,c=[];for(const d of l){const f=this.stride*d;c.push(u[f+ut]>1?ml(u,f,this.clusterProps):this.points[u[f+dt]])}return c}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),o="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(o);const i=s.data;if(n*this.stride>=i.length)throw new Error(o);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=i[n*this.stride],u=i[n*this.stride+1],c=s.within(l,u,a),d=[];for(const f of c){const h=f*this.stride;i[h+To]===t&&d.push(i[h+ut]>1?ml(i,h,this.clusterProps):this.points[i[h+dt]])}if(d.length===0)throw new Error(o);return d}getLeaves(t,n,r){n=n||10,r=r||0;const o=[];return this._appendLeaves(o,t,n,r,0),o}getTile(t,n,r){const o=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:i,radius:a}=this.options,l=a/i,u=(r-l)/s,c=(r+1+l)/s,d={features:[]};return this._addTileFeatures(o.range((n-l)/s,u,(n+1+l)/s,c),o.data,n,r,s,d),n===0&&this._addTileFeatures(o.range(1-l/s,u,1,c),o.data,s,r,s,d),n===s-1&&this._addTileFeatures(o.range(0,u,l/s,c),o.data,-1,r,s,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,o,s){const i=this.getChildren(n);for(const a of i){const l=a.properties;if(l&&l.cluster?s+l.point_count<=o?s+=l.point_count:s=this._appendLeaves(t,l.cluster_id,r,o,s):s<o?s++:t.push(a),t.length===r)break}return s}_createTree(t){const n=new ii(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,o,s,i){for(const a of t){const l=a*this.stride,u=n[l+ut]>1;let c,d,f;if(u)c=Yu(n,l,this.clusterProps),d=n[l],f=n[l+1];else{const m=this.points[n[l+dt]];c=m.properties;const[v,S]=m.geometry.coordinates;d=Jn(v),f=Qn(S)}const h={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(f*s-o))]],tags:c};let p;u||this.options.generateId?p=n[l+dt]:p=this.points[n[l+dt]].id,p!==void 0&&(h.id=p),i.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:o,reduce:s,minPoints:i}=this.options,a=r/(o*Math.pow(2,n)),l=t.data,u=[],c=this.stride;for(let d=0;d<l.length;d+=c){if(l[d+Tt]<=n)continue;l[d+Tt]=n;const f=l[d],h=l[d+1],p=t.within(l[d],l[d+1],a),m=l[d+ut];let v=m;for(const S of p){const _=S*c;l[_+Tt]>n&&(v+=l[_+ut])}if(v>m&&v>=i){let S=f*m,_=h*m,b,C=-1;const T=((d/c|0)<<5)+(n+1)+this.points.length;for(const w of p){const P=w*c;if(l[P+Tt]<=n)continue;l[P+Tt]=n;const M=l[P+ut];S+=l[P]*M,_+=l[P+1]*M,l[P+To]=T,s&&(b||(b=this._map(l,d,!0),C=this.clusterProps.length,this.clusterProps.push(b)),s(b,this._map(l,P)))}l[d+To]=T,u.push(S/v,_/v,1/0,T,-1,v),s&&u.push(C)}else{for(let S=0;S<c;S++)u.push(l[d+S]);if(v>1)for(const S of p){const _=S*c;if(!(l[_+Tt]<=n)){l[_+Tt]=n;for(let b=0;b<c;b++)u.push(l[_+b])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+ut]>1){const i=this.clusterProps[t[n+Gu]];return r?Object.assign({},i):i}const o=this.points[t[n+dt]].properties,s=this.options.map(o);return r&&s===o?Object.assign({},s):s}}function ml(e,t,n){return{type:"Feature",id:e[t+dt],properties:Yu(e,t,n),geometry:{type:"Point",coordinates:[ex(e[t]),tx(e[t+1])]}}}function Yu(e,t,n){const r=e[t+ut],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=e[t+Gu],i=s===-1?{}:Object.assign({},n[s]);return Object.assign(i,{cluster:!0,cluster_id:e[t+dt],point_count:r,point_count_abbreviated:o})}function Jn(e){return e/360+.5}function Qn(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function ex(e){return(e-.5)*360}function tx(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}const nx={radius:30,maxZoom:13,minZoom:0,minPoints:2};function rx(e,t,n,r={}){const o=x.useRef(null),[s,i]=x.useState([]),a={...nx,...r};return x.useEffect(()=>{if(!e||e.length===0){i([]);return}const l=e.map(u=>({type:"Feature",properties:u,geometry:{type:"Point",coordinates:[u.lng,u.lat]}}));o.current=new Ku({radius:a.radius,maxZoom:a.maxZoom,minZoom:a.minZoom,minPoints:a.minPoints}),o.current.load(l)},[e,a.radius,a.maxZoom,a.minZoom,a.minPoints]),x.useEffect(()=>{if(!o.current||!n){i(e);return}const u=o.current.getClusters(n,Math.floor(t)).map(c=>{const[d,f]=c.geometry.coordinates,h=c.properties;if(h.cluster){const p=h.cluster_id,m=o.current.getLeaves(p,1/0),v=m.flatMap(_=>_.properties.cameras||[]),S=m.reduce((_,b)=>_+b.properties.count,0);return{id:`cluster-${p}`,lat:f,lng:d,count:S,cameras:v,isCluster:!0,pointCount:h.point_count,clusterId:p}}else{const p=h;return{id:p.id,lat:f,lng:d,count:p.count,addressText:p.addressText,cameras:p.cameras}}});i(u)},[e,t,n]),s}const ox=16,Zu=({spots:e,onSpotClick:t,zoomLevel:n=ox,selectedSpotId:r,animateOnClick:o,disableClick:s})=>{const{isLoaded:i,currentZoom:a,bounds:l,zoomToPosition:u}=oi(),c=x.useRef(null),d=rx(e,a,l);if(d.length>0&&l){const h=e.map(p=>({type:"Feature",properties:p,geometry:{type:"Point",coordinates:[p.lng,p.lat]}}));c.current||(c.current=new Ku({radius:30,maxZoom:13,minZoom:0,minPoints:2})),c.current.load(h)}const f=h=>{if(h.isCluster&&h.clusterId&&c.current)try{const p=c.current.getClusterExpansionZoom(h.clusterId);u({lat:h.lat,lng:h.lng},p)}catch(p){console.error("Error getting cluster expansion zoom:",p),u({lat:h.lat,lng:h.lng},n)}else u({lat:h.lat,lng:h.lng},n),s||t==null||t(h)};return i?g.jsx(g.Fragment,{children:d.map((h,p)=>g.jsx(Fu,{position:{lat:h.lat,lng:h.lng},onClick:()=>f(h),children:g.jsx(ri,{count:h.count,addressText:h.addressText,cameras:h.cameras,currentZoom:a,isSelected:!s&&!h.isCluster&&r===h.id,animateOnClick:o,disableClick:s})},h.id??p))}):null};Zu.displayName="MapMarkers";const sx="_searchBar_15mix_1",ix="_startIconContainer_15mix_106",ax="_endIconContainer_15mix_117",lx="_endIconContainerClickable_15mix_153",cx="_defaultIcon_15mix_157",Sn={searchBar:sx,startIconContainer:ix,endIconContainer:ax,endIconContainerClickable:lx,defaultIcon:cx},ux=e=>()=>{e&&e()},dx=e=>t=>{e&&e(t)},fx=()=>g.jsx(Le.Search,{className:Sn.defaultIcon}),hx=e=>e||fx(),qu=x.forwardRef(({startIcon:e,endIcon:t,onEndIconClick:n,placeholder:r,value:o,onChange:s,className:i,...a},l)=>{const c=E.useTheme().palette.mode==="dark",d=hx(t),f=ux(n),h=dx(s);return g.jsx(E.TextField,{ref:l,value:o,onChange:h,placeholder:r,variant:"outlined",autoComplete:"off",className:`${Sn.searchBar} ${i||""}`,"data-theme":c?"dark":"light",InputProps:{startAdornment:e?g.jsx(E.InputAdornment,{position:"start",className:Sn.startIconContainer,children:e}):null,endAdornment:g.jsx(E.InputAdornment,{position:"end",className:`${Sn.endIconContainer} ${n?Sn.endIconContainerClickable:""}`,onClick:f,disablePointerEvents:!n,children:d})},inputProps:{autoComplete:"off","data-form-type":"other"},...a})});qu.displayName="SearchBar";const mx=Je(g.jsx("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home"),px=Je([g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 9.5 14c-.17 0-.33-.03-.5-.05v2.02c.17.02.33.03.5.03 1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19z"},"0"),g.jsx("path",{d:"M6.47 10.82 4 13.29l-2.47-2.47-.71.71L3.29 14 .82 16.47l.71.71L4 14.71l2.47 2.47.71-.71L4.71 14l2.47-2.47z"},"1")],"SearchOff"),gx="_container_1mb8b_1",yx="_iconWrapper_1mb8b_11",vx="_icon_1mb8b_11",bx="_title_1mb8b_21",xx="_subtitle_1mb8b_30",Sx="_description_1mb8b_34",Cx="_button_1mb8b_38",wt={container:gx,iconWrapper:yx,icon:vx,title:bx,subtitle:xx,description:Sx,button:Cx},Xu=({onGoHome:e,buttonText:t="Voltar para o início",title:n="Página não encontrada",description:r="Desculpe, a página que você está procurando não existe ou foi movida para outro endereço.",errorCode:o="404",className:s})=>g.jsx(E.Container,{maxWidth:"sm",children:g.jsxs(E.Box,{className:`${wt.container} ${s||""}`,children:[g.jsx(E.Box,{className:wt.iconWrapper,children:g.jsx(px,{className:wt.icon,color:"primary"})}),g.jsx(E.Typography,{variant:"h1",className:wt.title,sx:{fontSize:{xs:"6rem",md:"8rem"}},children:o}),g.jsx(E.Typography,{variant:"h4",component:"h2",className:wt.subtitle,color:"text.primary",children:n}),g.jsx(E.Typography,{variant:"body1",className:wt.description,color:"text.secondary",children:r}),e&&g.jsx(vs,{variant:"contained",size:"large",startIcon:g.jsx(mx,{}),onClick:e,className:wt.button,children:t})]})});Xu.displayName="NotFoundContent";const Tx=e=>{const t=e.find(r=>r.active),n=e.flatMap(r=>{var o;return((o=r.submenu)==null?void 0:o.map(s=>({item:r,subItem:s})))??[]}).find(({subItem:r})=>r.active);return{itemId:(n==null?void 0:n.item.id)??(t==null?void 0:t.id)??null,subItemId:(n==null?void 0:n.subItem.id)??null,expandedItemId:(n==null?void 0:n.item.id)??null}},wx=({items:e,isExpanded:t=!0,onClick:n})=>{const r=x.useMemo(()=>Tx(e),[e]),[o,s]=x.useState(r.itemId),[i,a]=x.useState(r.subItemId),[l,u]=x.useState(r.expandedItemId),[c,d]=x.useState(null),[f,h]=x.useState(null);x.useEffect(()=>{s(r.itemId),a(r.subItemId),u(r.expandedItemId)},[r.itemId,r.subItemId,r.expandedItemId]);const p=f?e.find(w=>w.id===f):void 0,m=(p==null?void 0:p.submenu)??[];return{selectedItemId:o,selectedSubItemId:i,expandedItemId:l,submenuAnchorEl:c,submenuItem:p,submenuItems:m,getIsItemActive:w=>{var M;const P=i?!!((M=w.submenu)!=null&&M.some(I=>I.id===i)):!1;return o?w.id===o:!!(w.active||P)},getIsSubItemActive:w=>i?w.id===i:!!w.active,shouldShowSubmenu:w=>{var P;return!!(t&&((P=w.submenu)!=null&&P.length)&&l===w.id)},handleItemClick:(w,P)=>{var M,I;s(w.id),a(null),(M=w.submenu)!=null&&M.length?t?u(V=>V===w.id?null:w.id):(d(P.currentTarget),h(w.id)):(u(null),d(null),h(null)),(I=w.onClick)==null||I.call(w,P),n==null||n({item:w})},handleSubItemClick:(w,P,M,I)=>{var V;s(w.id),a(P.id),I!=null&&I.closeMenu&&(d(null),h(null)),(V=P.onClick)==null||V.call(P,M),n==null||n({item:w,subItem:P})},closeSubmenu:()=>{d(null),h(null)}}},Ju=e=>typeof e=="number"?`${e*4}px`:e,_x=({item:e,onClick:t,isActive:n})=>{const r=X.useTheme();return g.jsx(E.ButtonBase,{onClick:t,"aria-label":e.label,"aria-pressed":n||void 0,sx:{width:"100%",borderRadius:Ju(r.shape.borderRadius),px:2,py:1.25,justifyContent:"flex-start",textAlign:"left",color:r.palette.text.primary,backgroundColor:n?r.palette.action.selected:"transparent","&:hover":{backgroundColor:r.palette.action.hover}},children:g.jsx(E.Typography,{variant:"body2",sx:{fontWeight:500},children:e.label})})},Qu=({items:e,isExpanded:t=!0,className:n,onClick:r})=>{const o=X.useTheme(),s=Ju(o.shape.borderRadius),{submenuAnchorEl:i,submenuItem:a,submenuItems:l,getIsItemActive:u,getIsSubItemActive:c,shouldShowSubmenu:d,handleItemClick:f,handleSubItemClick:h,closeSubmenu:p}=wx({items:e,isExpanded:t,onClick:r});return g.jsxs(E.Stack,{className:n,direction:"column",spacing:2,sx:{width:"100%"},children:[e.map(m=>{var w,P;const v=u(m),S=d(m),_=t?o.spacing(2):o.spacing(4),b=t?v?o.palette.primary.main:o.palette.action.hover:"transparent",C=t?"transparent":v?o.palette.primary.main:o.palette.action.hover,T=!t&&v?o.palette.primary.contrastText:o.palette.text.primary;return g.jsxs(E.Stack,{direction:"column",spacing:1,sx:{width:"100%"},children:[g.jsx(E.ButtonBase,{onClick:M=>f(m,M),"aria-label":m.label,"aria-pressed":v||void 0,"aria-haspopup":(w=m.submenu)!=null&&w.length?"menu":void 0,sx:{width:"100%",borderRadius:s,px:t?2:1,py:t?1.5:1,justifyContent:t?"flex-start":"center",textAlign:"left",color:o.palette.text.primary,backgroundColor:b,boxShadow:t&&v?o.shadows[1]:"none","&:hover":{backgroundColor:t?o.palette.action.hover:"transparent"}},children:g.jsxs(E.Stack,{direction:t?"row":"column",alignItems:"center",spacing:t?1.5:1,sx:{width:"100%"},children:[g.jsx(E.Box,{sx:{width:64,height:_,borderRadius:s,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:C,color:T,transition:o.transitions.create(["background-color","box-shadow"],{duration:o.transitions.duration.shortest}),...t?{}:{boxShadow:v?o.shadows[1]:"none","&:hover":{backgroundColor:v?X.alpha(o.palette.primary.main,.9):o.palette.action.selected}}},children:m.icon}),g.jsx(E.Typography,{variant:"body2",sx:{width:"100%",textAlign:t?"left":"center",fontWeight:v?600:500},children:m.label}),t&&m.trailingIcon?g.jsx(E.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:m.trailingIcon}):null]})}),S?g.jsx(E.Collapse,{in:S,timeout:"auto",unmountOnExit:!0,children:g.jsx(E.Stack,{direction:"column",spacing:1,sx:{pl:4},children:(P=m.submenu)==null?void 0:P.map(M=>{const I=c(M);return g.jsx(_x,{item:M,isActive:I,onClick:V=>h(m,M,V)},M.id)})})}):null]},m.id)}),g.jsx(E.Menu,{anchorEl:i,open:!!(i&&l.length),onClose:p,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},MenuListProps:{dense:!0,"aria-label":(a==null?void 0:a.label)??"submenu"},PaperProps:{sx:{borderRadius:s,minWidth:o.spacing(22),px:1,py:.5,boxShadow:o.shadows[3]}},children:l.map(m=>{const v=c(m);return g.jsx(E.MenuItem,{selected:v,onClick:S=>{a&&h(a,m,S,{closeMenu:!0})},sx:{borderRadius:s,fontWeight:v?600:500},children:m.label},m.id)})})]})};Qu.displayName="SidebarMenu";const Ex=e=>{const t=e.find(n=>n.active);return(t==null?void 0:t.id)??null},Ax=({items:e,onSelect:t,isExpanded:n=!0})=>{const r=x.useMemo(()=>Ex(e),[e]),[o,s]=x.useState(r),[i,a]=x.useState(null);x.useEffect(()=>{s(r)},[r]);const l=o?e.find(h=>h.id===o):void 0;return{selectedItemId:o,selectedItem:l,menuAnchorEl:i,getIsItemActive:h=>o?h.id===o:!!h.active,openMenu:h=>{n||a(h.currentTarget)},closeMenu:()=>{n||a(null)},handleItemClick:(h,p)=>{var m;s(h.id),(m=h.onClick)==null||m.call(h,p),t==null||t(h),a(null)}}},Mx=e=>typeof e=="number"?`${e*4}px`:e,ed=({items:e,currentLabel:t,headerLabel:n,headerIcon:r,headerTrailingIcon:o,listTitle:s,action:i,isExpanded:a=!0,className:l,onSelect:u})=>{var U,G;const c=X.useTheme(),d=x.useRef(null),f=Mx(c.shape.borderRadius),[h,p]=x.useState(!1),m=x.useMemo(()=>Number.parseFloat(c.spacing(2).toString()),[c]),{selectedItem:v,menuAnchorEl:S,getIsItemActive:_,openMenu:b,closeMenu:C,handleItemClick:T}=Ax({items:e,onSelect:u,isExpanded:a}),w=t??(v==null?void 0:v.label)??((U=e[0])==null?void 0:U.label)??"",P=r??(v==null?void 0:v.icon)??((G=e[0])==null?void 0:G.icon)??null,M=a||!P,I=D=>{if(a){p(Q=>!Q);return}b(D)},V=(D,Q)=>{T(D,Q),p(!1)},$=g.jsx(E.Stack,{direction:"column",spacing:.5,children:e.map(D=>{const Q=_(D);return g.jsxs(E.MenuItem,{selected:Q,onClick:j=>V(D,j),sx:{borderRadius:f,gap:1.5,px:2,py:1.25,color:c.palette.text.primary,"&:hover":{backgroundColor:c.palette.action.hover}},children:[D.icon?g.jsx(E.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:D.icon}):null,g.jsx(E.Typography,{variant:"body1",sx:{fontWeight:Q?600:500},children:D.label})]},D.id)})}),y=g.jsxs(E.Box,{sx:{borderRadius:f,backgroundColor:c.palette.background.paper,boxShadow:c.shadows[3],display:"flex",flexDirection:"column",maxHeight:c.spacing(50)},children:[s?g.jsx(E.Box,{sx:{px:2,pt:2,pb:1},children:g.jsx(E.Typography,{variant:"subtitle2",sx:{color:c.palette.text.primary},children:s})}):null,g.jsx(E.Box,{sx:{px:2,pb:2,overflowY:"auto",flex:1,minHeight:0},children:$})]}),R=i?g.jsxs(E.MenuItem,{onClick:i.onClick,sx:{borderRadius:f,gap:1.5,px:2,py:1.25,color:c.palette.text.primary,"&:hover":{backgroundColor:c.palette.action.hover}},children:[i.icon?g.jsx(E.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:i.icon}):null,g.jsx(E.Typography,{variant:"body1",sx:{fontWeight:600},children:i.label})]}):null,O=R?g.jsx(E.Box,{sx:{borderRadius:f,backgroundColor:c.palette.background.paper,boxShadow:c.shadows[3]},children:R}):null,F=g.jsxs(E.Stack,{direction:"column",spacing:1,sx:{minWidth:c.spacing(32)},children:[y,O]});return g.jsxs(E.Stack,{className:l,direction:a?"row":"column",spacing:a?2:1,sx:{width:"100%",alignItems:a?"flex-start":"stretch"},children:[g.jsx(E.ButtonBase,{onClick:I,"aria-label":w,ref:d,sx:{width:a?c.spacing(28):"64px",height:a?"auto":"64px",borderRadius:f,px:a?2:0,py:a?1.25:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left",backgroundColor:c.palette.action.hover,"&:hover":{backgroundColor:c.palette.action.selected}},children:g.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:a?1:0,sx:{width:a?"100%":"auto",justifyContent:a?"space-between":"center",px:0},children:[P?g.jsx(E.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:P}):null,M?g.jsxs(E.Box,{sx:{minWidth:0,flex:1},children:[n?g.jsx(E.Typography,{variant:"caption",sx:{color:c.palette.text.secondary},children:n}):null,g.jsx(E.Typography,{variant:"body2",sx:{fontWeight:600},noWrap:!0,children:w})]}):null,a&&o?g.jsx(E.Box,{sx:{ml:"auto",display:"inline-flex",alignItems:"center"},children:o}):null]})}),a?h?g.jsx(E.ClickAwayListener,{onClickAway:()=>p(!1),children:g.jsx(E.Popper,{open:h,anchorEl:d.current,placement:"right-start",modifiers:[{name:"offset",options:{offset:[0,m]}}],sx:{zIndex:c.zIndex.modal},children:F})}):null:g.jsx(E.Menu,{anchorEl:S,open:!!S,onClose:C,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},disableAutoFocusItem:!0,slotProps:{paper:{sx:{borderRadius:f,p:0,ml:2,backgroundColor:"transparent",boxShadow:"none",overflow:"visible"}}},MenuListProps:{"aria-label":w?`menu-${w}`:"menu",sx:{p:0}},children:F})]})};ed.displayName="ModuleMenu";const ai=e=>e.seekable&&e.seekable.length>0?e.seekable.end(e.seekable.length-1):Number.isFinite(e.duration)&&e.duration>0?e.duration:e.currentTime,Px=(e,t,n)=>({...e&&{"--player-width":typeof e=="number"?`${e}px`:e},...t&&{"--player-height":typeof t=="number"?`${t}px`:t},...n&&{"--player-aspect-ratio":n}}),kx=({stream:e,availableQualities:t,initialQuality:n,autoPlay:r,liveThresholdSeconds:o,allowPlaybackRateForStream:s})=>{const i=x.useRef(null),a=x.useRef(null),l=x.useMemo(()=>{if(!t||!t.length)return null;if(n){const D=t.find(Q=>Q.value===n);if(D)return D}return t[0]},[t,n]),[u,c]=x.useState(l),[d,f]=x.useState(!1),[h,p]=x.useState(!0),[m,v]=x.useState(!1),[S,_]=x.useState(0),[b,C]=x.useState(0),[T,w]=x.useState(1),[P,M]=x.useState(1),[I,V]=x.useState(!1),[$,y]=x.useState(!0),R=(u==null?void 0:u.stream)??e??null,O=(u==null?void 0:u.src)??null,U=!!!R||s;x.useEffect(()=>{c(l)},[l]);const G=x.useCallback(()=>{const D=a.current;if(!D)return;if(!D.seekable||D.seekable.length===0){p(!0),v(!1);return}const Q=ai(D),j=Math.max(0,Q-D.currentTime);C(Q),_(D.currentTime),v(Q>0),p(j<=(o??2))},[o]);return x.useEffect(()=>{const D=a.current;if(!D)return;const Q=()=>f(!0),j=()=>f(!1),A=()=>y(!0),N=()=>y(!0),L=()=>y(!1),B=()=>y(!1);return D.addEventListener("play",Q),D.addEventListener("pause",j),D.addEventListener("waiting",A),D.addEventListener("loadstart",N),D.addEventListener("canplay",L),D.addEventListener("playing",B),D.addEventListener("timeupdate",G),D.addEventListener("durationchange",G),D.addEventListener("loadedmetadata",G),D.addEventListener("progress",G),()=>{D.removeEventListener("play",Q),D.removeEventListener("pause",j),D.removeEventListener("waiting",A),D.removeEventListener("loadstart",N),D.removeEventListener("canplay",L),D.removeEventListener("playing",B),D.removeEventListener("timeupdate",G),D.removeEventListener("durationchange",G),D.removeEventListener("loadedmetadata",G),D.removeEventListener("progress",G)}},[G]),x.useEffect(()=>{const D=a.current;D&&(y(!0),R?(D.srcObject!==R&&(D.srcObject=R),D.getAttribute("src")&&D.removeAttribute("src")):O?(D.srcObject&&(D.srcObject=null),D.src!==O&&(D.src=O,D.load())):(D.srcObject&&(D.srcObject=null),D.getAttribute("src")&&D.removeAttribute("src")),r&&D.play().then(()=>{}).catch(()=>{}))},[R,O,r]),x.useEffect(()=>{const D=a.current;D&&(U?D.playbackRate=T:(D.playbackRate=1,w(1)))},[T,U]),x.useEffect(()=>{const D=()=>{V(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",D),()=>{document.removeEventListener("fullscreenchange",D)}},[]),{containerRef:i,videoRef:a,selectedQuality:u,setSelectedQuality:c,isPlaying:d,isLive:h,canSeek:m,currentTime:S,setCurrentTime:_,seekableEnd:b,playbackRate:T,setPlaybackRate:w,zoom:P,setZoom:M,isFullscreen:I,isLoading:$,canAdjustPlaybackRate:U,updateLiveStatus:G}},Ix="_container_zv1tx_1",Rx="_loader_zv1tx_19",Ox="_video_zv1tx_29",Lx="_controlsOverlay_zv1tx_37",jx="_timeline_zv1tx_58",Dx="_controlsRow_zv1tx_65",Bx="_controlGroup_zv1tx_83",$x="_iconButton_zv1tx_100",Nx="_seekButton_zv1tx_113",Vx="_menuButton_zv1tx_133",Fx="_liveBadge_zv1tx_149",Ae={container:Ix,loader:Rx,video:Ox,controlsOverlay:Lx,timeline:jx,controlsRow:Dx,controlGroup:Bx,iconButton:$x,seekButton:Nx,menuButton:Vx,liveBadge:Fx},wo=({label:e,valueLabel:t,selectedValue:n,options:r,onChange:o,disabled:s,ariaLabel:i})=>{const[a,l]=x.useState(null),u=!!a;return g.jsxs(g.Fragment,{children:[g.jsx(E.ButtonBase,{disabled:s,className:Ae.menuButton,"aria-label":i,onClick:c=>l(c.currentTarget),children:e?`${e}: ${t}`:t}),g.jsx(E.Menu,{anchorEl:a,open:u,onClose:()=>l(null),children:r.map(c=>g.jsx(E.MenuItem,{selected:c.value===n,disabled:c.disabled,onClick:()=>{o(c.value),l(null)},children:c.label},`${e}-${String(c.value)}`))})]})},zx=e=>()=>{const t=e.current;t&&(t.paused?t.play().catch(()=>{}):t.pause())},Wx=(e,t,n)=>r=>{const o=e.current;if(!o||!t)return;const s=ai(o),i=Math.min(Math.max(o.currentTime+r,0),s);o.currentTime=i,n()},Ux=e=>()=>{e.current&&(document.fullscreenElement?document.exitFullscreen().catch(()=>{}):e.current.requestFullscreen().catch(()=>{}))},Hx=(e,t,n)=>r=>{const o=e.find(s=>s.value===r)??null;t(o),n==null||n(o)},Gx=(e,t)=>(n,r)=>{if(!e)return;const o=Array.isArray(r)?r[0]:r;t(o)},Kx=(e,t,n)=>(r,o)=>{const s=e.current;if(!s||!t)return;const i=Array.isArray(o)?o[0]:o,a=ai(s);s.currentTime=Math.min(Math.max(i,0),a),n()},td=({stream:e=null,availableQualities:t=[],initialQuality:n,onQualityChange:r,autoPlay:o=!0,playsInline:s=!0,muted:i=!0,poster:a,className:l,sx:u,liveThresholdSeconds:c=2,allowPlaybackRateForStream:d=!1,playbackRates:f=[.5,1,1.5,2],zoomLevels:h=[1,1.2,1.5],width:p,height:m,aspectRatio:v="16 / 9",showTimestamp:S=!0,showTimeline:_=!0})=>{const b=X.useTheme(),[C,T]=x.useState(""),[w,P]=x.useState(!0),M=x.useRef(null);x.useEffect(()=>{if(!S)return;const Ce=()=>{const Ge=new Date,Fn=String(Ge.getDate()).padStart(2,"0"),kd=String(Ge.getMonth()+1).padStart(2,"0"),Id=Ge.getFullYear(),Rd=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"][Ge.getDay()],Od=String(Ge.getHours()).padStart(2,"0"),Ld=String(Ge.getMinutes()).padStart(2,"0"),jd=String(Ge.getSeconds()).padStart(2,"0");T(`${Fn}-${kd}-${Id}, ${Rd} ${Od}:${Ld}:${jd}`)};Ce();const Vn=setInterval(Ce,1e3);return()=>clearInterval(Vn)},[S]),x.useEffect(()=>{const Ce=I.current;if(!Ce)return;const Vn=()=>{M.current&&(clearTimeout(M.current),M.current=null),P(!0)},Ge=()=>{M.current=setTimeout(()=>{P(!1)},1e4)},Fn=()=>{w||P(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{P(!1)},1e4)};return Ce.addEventListener("mouseenter",Vn),Ce.addEventListener("mouseleave",Ge),Ce.addEventListener("mousemove",Fn),()=>{Ce.removeEventListener("mouseenter",Vn),Ce.removeEventListener("mouseleave",Ge),Ce.removeEventListener("mousemove",Fn),M.current&&clearTimeout(M.current)}},[w]);const{containerRef:I,videoRef:V,selectedQuality:$,setSelectedQuality:y,isPlaying:R,isLive:O,canSeek:F,currentTime:U,setCurrentTime:G,seekableEnd:D,playbackRate:Q,setPlaybackRate:j,zoom:A,setZoom:N,isFullscreen:L,isLoading:B,canAdjustPlaybackRate:Y,updateLiveStatus:H}=kx({stream:e,availableQualities:t,initialQuality:n,autoPlay:o,liveThresholdSeconds:c,allowPlaybackRateForStream:d}),W=zx(V),Z=Wx(V,F,H),q=Ux(I),J=Hx(t,y,r),me=Gx(F,G),z=Kx(V,F,H),_e=h.map(Ce=>({value:Ce,label:`${Math.round(Ce*100)}%`})),He=f.map(Ce=>({value:Ce,label:`${Ce}x`})),lt=t.map(Ce=>({value:Ce.value,label:Ce.label})),Gr=($==null?void 0:$.label)??"Auto",rn=`${Math.round(A*100)}%`,on=`${Q}x`,sn=F&&D>0,Kr=Px(p,m,v);return g.jsxs(E.Box,{ref:I,className:`${Ae.container} ${l||""}`.trim(),style:Kr,sx:{borderRadius:0,backgroundColor:b.palette.common.black,...u},children:[B&&g.jsx(E.Box,{className:Ae.loader,sx:{backgroundColor:b.palette.common.black},children:g.jsx(E.CircularProgress,{size:60,sx:{color:b.palette.primary.contrastText,width:{xs:"48px",sm:"60px"},height:{xs:"48px",sm:"60px"}}})}),g.jsx("video",{ref:V,className:Ae.video,autoPlay:o,playsInline:s,muted:i,poster:a,style:{transform:`scale(${A})`}}),S&&C&&g.jsx(E.Box,{sx:{position:"absolute",top:0,left:0,right:0,padding:{xs:"10px 12px",sm:"12px 16px"}},children:g.jsx(E.Typography,{variant:"body2",sx:{color:b.palette.common.white,fontWeight:500,fontSize:{xs:"12px",sm:"14px"},textShadow:"0 2px 8px rgba(0,0,0,0.8)"},children:C})}),O&&!w&&g.jsx(E.Box,{sx:{position:"absolute",bottom:16,left:20,zIndex:10},children:g.jsx(E.Box,{className:Ae.liveBadge,sx:{backgroundColor:X.alpha(b.palette.common.white,.9),color:b.palette.common.black},component:"span","aria-live":"polite",children:"ao vivo"})}),g.jsxs(E.Box,{className:Ae.controlsOverlay,sx:{opacity:w?1:0,visibility:w?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease"},children:[_&&g.jsx(E.Box,{className:Ae.timeline,children:g.jsx(E.Slider,{size:"small",min:0,max:sn?D:1,step:1,value:sn?U:0,disabled:!sn,onChange:me,onChangeCommitted:z,"aria-label":"Linha do tempo do video",sx:{color:b.palette.common.white,"& .MuiSlider-thumb":{width:12,height:12,backgroundColor:b.palette.common.white},"& .MuiSlider-track":{border:"none",backgroundColor:b.palette.common.white},"& .MuiSlider-rail":{backgroundColor:X.alpha(b.palette.common.white,.3),opacity:1}}})}),g.jsxs(E.Box,{className:Ae.controlsRow,children:[g.jsxs(E.Box,{className:Ae.controlGroup,children:[g.jsx(E.Box,{className:Ae.liveBadge,sx:{backgroundColor:O?X.alpha(b.palette.common.white,.9):X.alpha(b.palette.common.white,.15),color:O?b.palette.common.black:X.alpha(b.palette.common.white,.7)},component:"span","aria-live":"polite",children:"ao vivo"}),g.jsx(E.Box,{className:Ae.seekButton,component:"button",onClick:()=>Z(-15),"aria-label":"Voltar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:"15s"}),g.jsx(E.IconButton,{className:Ae.iconButton,onClick:()=>Z(-15),"aria-label":"Recuar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:g.jsx(Le.FastRewind,{fontSize:"small"})}),g.jsx(E.IconButton,{className:Ae.iconButton,onClick:W,"aria-label":"Play/Pause",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:R?g.jsx(Le.Pause,{fontSize:"small"}):g.jsx(Le.PlayArrow,{fontSize:"small"})}),g.jsx(E.IconButton,{className:Ae.iconButton,onClick:()=>Z(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:g.jsx(Le.FastForward,{fontSize:"small"})}),g.jsx(E.Box,{className:Ae.seekButton,component:"button",onClick:()=>Z(15),"aria-label":"Avançar 15 segundos",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,border:"none",cursor:"pointer","&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:"15s"})]}),g.jsxs(E.Box,{className:Ae.controlGroup,children:[g.jsx(E.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}}},children:g.jsx(wo,{label:"",valueLabel:on,selectedValue:Q,options:He,ariaLabel:"Selecionar velocidade de reprodução",onChange:j,disabled:!Y})}),lt.length>0?g.jsx(E.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}}},children:g.jsx(wo,{label:"",valueLabel:Gr,selectedValue:($==null?void 0:$.value)??"auto",options:lt,ariaLabel:"Selecionar qualidade do vídeo",onChange:J})}):null,g.jsx(E.Box,{sx:{"& .MuiButtonBase-root":{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}}},children:g.jsx(wo,{label:"",valueLabel:rn,selectedValue:A,options:_e,ariaLabel:"Selecionar zoom do vídeo",onChange:N})}),g.jsx(E.IconButton,{className:Ae.iconButton,onClick:q,"aria-label":"Fullscreen",sx:{backgroundColor:X.alpha(b.palette.common.white,.15),color:b.palette.common.white,"&:hover":{backgroundColor:X.alpha(b.palette.common.white,.25)}},children:L?g.jsx(Le.FullscreenExit,{fontSize:"small"}):g.jsx(Le.Fullscreen,{fontSize:"small"})})]})]})]})]})};td.displayName="VideoPlayer";const Yx=Je(g.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"UndoOutlined"),Zx=Je(g.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),qx=Je(g.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),Xx="_root_1gj5n_1",Jx="_container_1gj5n_6",Qx="_header_1gj5n_13",eS="_headerText_1gj5n_21",tS="_controls_1gj5n_27",nS="_iconButton_1gj5n_34",rS="_zoomGroup_1gj5n_43",oS="_zoomTrack_1gj5n_52",sS="_zoomTrackFill_1gj5n_59",iS="_layers_1gj5n_67",aS="_timeScale_1gj5n_78",lS="_videoTrack_1gj5n_82",cS="_eventsTrack_1gj5n_86",uS="_trackBox_1gj5n_90",dS="_trackLabelRow_1gj5n_95",fS="_label_1gj5n_103",hS="_trackArea_1gj5n_112",mS="_tick_1gj5n_118",pS="_tickMajor_1gj5n_126",gS="_tickMinor_1gj5n_131",yS="_tickLabel_1gj5n_135",vS="_segment_1gj5n_146",bS="_event_1gj5n_86",xS="_eventDot_1gj5n_166",SS="_selectionOverlay_1gj5n_172",CS="_playhead_1gj5n_180",TS="_playheadLine_1gj5n_190",wS="_playheadHandle_1gj5n_199",ee={root:Xx,container:Jx,header:Qx,headerText:eS,controls:tS,iconButton:nS,zoomGroup:rS,zoomTrack:oS,zoomTrackFill:sS,layers:iS,timeScale:aS,videoTrack:lS,eventsTrack:cS,trackBox:uS,trackLabelRow:dS,label:fS,trackArea:hS,tick:mS,tickMajor:pS,tickMinor:gS,tickLabel:yS,segment:vS,event:bS,eventDot:xS,selectionOverlay:SS,playhead:CS,playheadLine:TS,playheadHandle:wS},ot={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function nd(e){return"init"in e}function ds(e){return!!e.write}function pl(e){return"v"in e||"e"in e}function Cr(e){if("e"in e)throw e.e;if((ot?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const Tr=new WeakMap;function rd(e){var t;return wr(e)&&!!((t=Tr.get(e))!=null&&t[0])}function _S(e){const t=Tr.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function fs(e,t){let n=Tr.get(e);if(!n){n=[!0,new Set],Tr.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function wr(e){return typeof(e==null?void 0:e.then)=="function"}function od(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function sd(e,t,n){var r;const o=new Set;for(const s of((r=n.get(e))==null?void 0:r.t)||[])o.add(s);for(const s of t.p)o.add(s);return o}const ES=(e,t,...n)=>t.read(...n),AS=(e,t,...n)=>t.write(...n),MS=(e,t)=>{if(t.INTERNAL_onInit)return t.INTERNAL_onInit(e);if(t.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),t.unstable_onInit(e)},PS=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},kS=(e,t)=>{var n;const r=ke(e),o=r[0],s=r[6],i=r[9];if((ot?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let a=o.get(t);return a||(a={d:new Map,p:new Set,n:0},o.set(t,a),(n=s.i)==null||n.call(s,t),i==null||i(e,t)),a},IS=e=>{const t=ke(e),n=t[1],r=t[3],o=t[4],s=t[5],i=t[6],a=t[13],l=[],u=c=>{try{c()}catch(d){l.push(d)}};do{i.f&&u(i.f);const c=new Set,d=c.add.bind(c);r.forEach(f=>{var h;return(h=n.get(f))==null?void 0:h.l.forEach(d)}),r.clear(),s.forEach(d),s.clear(),o.forEach(d),o.clear(),c.forEach(u),r.size&&a(e)}while(r.size||s.size||o.size);if(l.length)throw new AggregateError(l)},RS=e=>{const t=ke(e),n=t[1],r=t[2],o=t[3],s=t[11],i=t[14],a=t[17],l=[],u=new WeakSet,c=new WeakSet,d=Array.from(o);for(;d.length;){const f=d[d.length-1],h=s(e,f);if(c.has(f)){d.pop();continue}if(u.has(f)){if(r.get(f)===h.n)l.push([f,h]);else if((ot?"production":void 0)!=="production"&&r.has(f))throw new Error("[Bug] invalidated atom exists");c.add(f),d.pop();continue}u.add(f);for(const p of sd(f,h,n))u.has(p)||d.push(p)}for(let f=l.length-1;f>=0;--f){const[h,p]=l[f];let m=!1;for(const v of p.d.keys())if(v!==h&&o.has(v)){m=!0;break}m&&(i(e,h),a(e,h)),r.delete(h)}},hs=new WeakSet,OS=(e,t)=>{var n,r;const o=ke(e),s=o[1],i=o[2],a=o[3],l=o[6],u=o[7],c=o[11],d=o[12],f=o[13],h=o[14],p=o[16],m=o[17],v=o[20],S=c(e,t);if(pl(S)){if(s.has(t)&&i.get(t)!==S.n)return S;let I=!1;for(const[V,$]of S.d)if(h(e,V).n!==$){I=!0;break}if(!I)return S}S.d.clear();let _=!0;function b(){s.has(t)&&(m(e,t),f(e),d(e))}function C(I){var V;if(I===t){const y=c(e,I);if(!pl(y))if(nd(I))v(e,I,I.init);else throw new Error("no atom init");return Cr(y)}const $=h(e,I);try{return Cr($)}finally{S.d.set(I,$.n),rd(S.v)&&od(t,S.v,$),s.has(t)&&((V=s.get(I))==null||V.t.add(t)),_||b()}}let T,w;const P={get signal(){return T||(T=new AbortController),T.signal},get setSelf(){return(ot?"production":void 0)!=="production"&&!ds(t)&&console.warn("setSelf function cannot be used with read-only atom"),!w&&ds(t)&&(w=(...I)=>{if((ot?"production":void 0)!=="production"&&_&&console.warn("setSelf function cannot be called in sync"),!_)try{return p(e,t,...I)}finally{f(e),d(e)}}),w}},M=S.n;try{(ot?"production":void 0)!=="production"&&hs.delete(e);const I=u(e,t,C,P);return(ot?"production":void 0)!=="production"&&hs.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,t,I),wr(I)&&(fs(I,()=>T==null?void 0:T.abort()),I.then(b,b)),(n=l.r)==null||n.call(l,t),S}catch(I){return delete S.v,S.e=I,++S.n,S}finally{_=!1,M!==S.n&&i.get(t)===M&&(i.set(t,S.n),a.add(t),(r=l.c)==null||r.call(l,t))}},LS=(e,t)=>{const n=ke(e),r=n[1],o=n[2],s=n[11],i=[t];for(;i.length;){const a=i.pop(),l=s(e,a);for(const u of sd(a,l,r)){const c=s(e,u);o.set(u,c.n),i.push(u)}}},jS=(e,t,...n)=>{const r=ke(e),o=r[3],s=r[6],i=r[8],a=r[11],l=r[12],u=r[13],c=r[14],d=r[15],f=r[16],h=r[17],p=r[20];let m=!0;const v=_=>Cr(c(e,_)),S=(_,...b)=>{var C;const T=a(e,_);try{if(_===t){if(!nd(_))throw new Error("atom not writable");(ot?"production":void 0)!=="production"&&hs.add(e);const w=T.n,P=b[0];p(e,_,P),h(e,_),w!==T.n&&(o.add(_),d(e,_),(C=s.c)==null||C.call(s,_));return}else return f(e,_,...b)}finally{m||(u(e),l(e))}};try{return i(e,t,v,S,...n)}finally{m=!1}},DS=(e,t)=>{var n;const r=ke(e),o=r[1],s=r[3],i=r[6],a=r[11],l=r[15],u=r[18],c=r[19],d=a(e,t),f=o.get(t);if(f&&!rd(d.v)){for(const[h,p]of d.d)if(!f.d.has(h)){const m=a(e,h);u(e,h).t.add(t),f.d.add(h),p!==m.n&&(s.add(h),l(e,h),(n=i.c)==null||n.call(i,h))}for(const h of f.d)if(!d.d.has(h)){f.d.delete(h);const p=c(e,h);p==null||p.t.delete(t)}}},BS=(e,t)=>{var n;const r=ke(e),o=r[1],s=r[4],i=r[6],a=r[10],l=r[11],u=r[12],c=r[13],d=r[14],f=r[16],h=r[18],p=l(e,t);let m=o.get(t);if(!m){d(e,t);for(const v of p.d.keys())h(e,v).t.add(t);if(m={l:new Set,d:new Set(p.d.keys()),t:new Set},o.set(t,m),ds(t)){const v=()=>{let S=!0;const _=(...b)=>{try{return f(e,t,...b)}finally{S||(c(e),u(e))}};try{const b=a(e,t,_);b&&(m.u=()=>{S=!0;try{b()}finally{S=!1}})}finally{S=!1}};s.add(v)}(n=i.m)==null||n.call(i,t)}return m},$S=(e,t)=>{var n,r;const o=ke(e),s=o[1],i=o[5],a=o[6],l=o[11],u=o[19],c=l(e,t);let d=s.get(t);if(!d||d.l.size)return d;let f=!1;for(const h of d.t)if((n=s.get(h))!=null&&n.d.has(t)){f=!0;break}if(!f){d.u&&i.add(d.u),d=void 0,s.delete(t);for(const h of c.d.keys()){const p=u(e,h);p==null||p.t.delete(t)}(r=a.u)==null||r.call(a,t);return}return d},NS=(e,t,n)=>{const r=ke(e)[11],o=r(e,t),s="v"in o,i=o.v;if(wr(n))for(const a of o.d.keys())od(t,n,r(e,a));o.v=n,delete o.e,(!s||!Object.is(i,o.v))&&(++o.n,wr(i)&&_S(i))},VS=(e,t)=>{const n=ke(e)[14];return Cr(n(e,t))},FS=(e,t,...n)=>{const r=ke(e),o=r[12],s=r[13],i=r[16];try{return i(e,t,...n)}finally{s(e),o(e)}},zS=(e,t,n)=>{const r=ke(e),o=r[12],s=r[18],i=r[19],l=s(e,t).l;return l.add(n),o(e),()=>{l.delete(n),i(e,t),o(e)}},id=new WeakMap,ke=e=>{const t=id.get(e);if((ot?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function WS(...e){const t={get(r){const o=ke(t)[21];return o(t,r)},set(r,...o){const s=ke(t)[22];return s(t,r,...o)},sub(r,o){const s=ke(t)[23];return s(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},ES,AS,MS,PS,kS,IS,RS,OS,LS,jS,DS,BS,$S,NS,VS,FS,zS,void 0].map((r,o)=>e[o]||r);return id.set(t,Object.freeze(n)),t}const ad={};let US=0;function nn(e,t){const n=`atom${++US}`,r={toString(){return(ad?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=HS,r.write=GS),r}function HS(e){return e(this)}function GS(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function KS(){return WS()}let mn;function YS(){return mn||(mn=KS(),(ad?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=mn),globalThis.__JOTAI_DEFAULT_STORE__!==mn&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),mn}const ZS={},qS=x.createContext(void 0);function ld(e){return x.useContext(qS)||YS()}const ms=e=>typeof(e==null?void 0:e.then)=="function",ps=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},XS=x.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(ps(e),e)}),_o=new WeakMap,gl=(e,t)=>{let n=_o.get(e);return n||(n=new Promise((r,o)=>{let s=e;const i=u=>c=>{s===u&&r(c)},a=u=>c=>{s===u&&o(c)},l=()=>{try{const u=t();ms(u)?(_o.set(u,n),s=u,u.then(i(u),a(u)),fs(u,l)):r(u)}catch(u){o(u)}};e.then(i(e),a(e)),fs(e,l)}),_o.set(e,n)),n};function _r(e,t){const{delay:n,unstable_promiseStatus:r=!x.use}={},o=ld(),[[s,i,a],l]=x.useReducer(c=>{const d=o.get(e);return Object.is(c[0],d)&&c[1]===o&&c[2]===e?c:[d,o,e]},void 0,()=>[o.get(e),o,e]);let u=s;if((i!==o||a!==e)&&(l(),u=o.get(e)),x.useEffect(()=>{const c=o.sub(e,()=>{if(r)try{const d=o.get(e);ms(d)&&ps(gl(d,()=>o.get(e)))}catch{}if(typeof n=="number"){setTimeout(l,n);return}l()});return l(),c},[o,e,n,r]),x.useDebugValue(u),ms(u)){const c=gl(u,()=>o.get(e));return r&&ps(c),XS(c)}return u}function JS(e,t){const n=ld();return x.useCallback((...o)=>{if((ZS?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function Gt(e,t){return[_r(e),JS(e)]}const li=nn(0),ci=nn(!0),ui=nn(null),cd=nn({windowSeconds:24*60*60,fps:30}),ud=nn([]),dd=nn([]);function be(e,t,n){return Math.min(n,Math.max(t,e))}function mt(e){const{time:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?0:(t-n)/r*o}function pn(e){const{px:t,windowStart:n,windowSeconds:r,width:o}=e;return o<=0||r<=0?n:n+t/o*r}function we(e){return String(Math.floor(e)).padStart(2,"0")}function QS(e=Date.now()){const t=new Date(e);return t.getHours()*3600+t.getMinutes()*60+t.getSeconds()+t.getMilliseconds()/1e3}function Eo(e){const t=Math.max(0,e),n=Math.floor(t/3600)%24,r=Math.floor(t%3600/60),o=Math.floor(t%60);return`${we(n)}:${we(r)}:${we(o)}`}function eC(e,t){const n=Math.max(0,e),r=Math.floor(n/3600)%24,o=Math.floor(n%3600/60),s=Math.floor(n%60),i=n-Math.floor(n),a=Math.floor(i*t);return`${we(r)}:${we(o)}:${we(s)}:${we(a)}`}function Ao(e){const t=Math.max(0,e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),o=Math.floor(t%60);return n>0?`${we(n)}:${we(r)}:${we(o)}`:`${we(r)}:${we(o)}`}function tC(e,t){const n=Math.max(0,e),r=Math.floor(n/3600),o=Math.floor(n%3600/60),s=Math.floor(n%60),i=n-Math.floor(n),a=Math.floor(i*t);return r>0?`${we(r)}:${we(o)}:${we(s)}:${we(a)}`:`${we(o)}:${we(s)}:${we(a)}`}function nC(e){const{width:t,windowSeconds:n,fps:r}=e,o=t>0?t/n:0,s=1/Math.max(1,r),i=[s,2*s,5*s,.25,.5,1,2,5,10,15,30,60,2*60,5*60,10*60,15*60,30*60,60*60,2*60*60,3*60*60,6*60*60],a=90,l=45;let u=i[i.length-1];for(const f of i)if(f*o>=a){u=f;break}const c=[u/2,u/5,u/10].filter(f=>f>0);let d=c[0]??u;for(const f of c)if(f*o>=l){d=f;break}return{majorStep:u,minorStep:d}}const rC=(e,t,n)=>t>=3600?Eo(e).slice(0,2)+":00:00":t>=60?Eo(e).slice(0,5):t>=1?Eo(e):eC(e,n),oC=(e,t,n)=>t>=3600||t>=60||t>=1?Ao(e):tC(e,n);function sC(){const e=x.useRef(null),[t,n]=x.useState(0);return x.useLayoutEffect(()=>{const r=e.current;if(!r)return;const o=new ResizeObserver(()=>{n(r.getBoundingClientRect().width)});return o.observe(r),n(r.getBoundingClientRect().width),()=>o.disconnect()},[]),{ref:e,width:t}}function iC(e){const{totalSeconds:t,enableWheelZoom:n,autoZoomOnSelection:r,tickLabelFormatter:o,clearSelectionOnEventClick:s}=e,[i,a]=Gt(li),[l,u]=Gt(ci),[c,d]=Gt(ui),f=_r(ud),h=_r(dd),[p,m]=Gt(cd),{ref:v,width:S}=sC(),_=102,C=Math.max(0,S-_-10),[T,w]=x.useState(0),P=x.useMemo(()=>{const L=Math.max(1/Math.max(1,p.fps),.05);return be(p.windowSeconds,L,t)},[p.windowSeconds,p.fps,t]);x.useEffect(()=>{if(!l||S<=0)return;const L=be(i-P*.9,0,Math.max(0,t-P));w(L)},[i,l,S,P,t]);const M=x.useMemo(()=>{const L=be(T,0,Math.max(0,t-P)),B=L+P;return{start:L,end:B,seconds:P}},[T,t,P]),I=x.useMemo(()=>{if(C<=0)return[];const{majorStep:L,minorStep:B}=nC({width:C,windowSeconds:M.seconds,fps:p.fps}),Y=Math.floor(M.start/B)*B,H=M.end,W=[],Z=B*1e-6;for(let q=Y;q<=H+Z;q+=B){const J=mt({time:q,windowStart:M.start,windowSeconds:M.seconds,width:C});if(J<-1||J>C+1)continue;const me=Math.abs(q/L-Math.round(q/L))<1e-6;W.push({time:q,px:J,kind:me?"major":"minor",label:me?o(q,L,p.fps):void 0})}return W},[C,o,M.end,M.seconds,M.start,p.fps]),V=x.useRef(null),$=x.useRef(null),y=L=>{$.current=L,V.current==null&&(V.current=requestAnimationFrame(()=>{V.current=null;const B=$.current;$.current=null,B==null||B()}))};x.useEffect(()=>()=>{V.current!=null&&cancelAnimationFrame(V.current)},[]);const R=x.useRef(null),O=L=>{const B=v.current;if(!B)return 0;const Y=B.getBoundingClientRect();return be(L-Y.left-_,0,C)};return{viewportRef:v,width:S,axisLeft:_,axisWidth:C,totalSeconds:t,zoom:p,setZoom:m,isLive:l,setIsLive:u,currentTime:i,selectedRange:c,setSelectedRange:d,videoSegments:f,events:h,view:M,ticks:I,onWheel:L=>{if(!n||S<=0)return;L.preventDefault(),u(!1);const B=O(L.clientX),Y=be(pn({px:B,windowStart:M.start,windowSeconds:M.seconds,width:C}),0,t),W=L.deltaY<0?.8:1.25,Z=be(M.seconds*W,Math.max(1/Math.max(1,p.fps),.05),t),q=be(Y-B/Math.max(1,C)*Z,0,Math.max(0,t-Z));m(J=>({...J,windowSeconds:Z})),w(q)},onPointerDownScrub:L=>{if(L.button!==0)return;const B=v.current;if(!B)return;B.setPointerCapture(L.pointerId);const Y=O(L.clientX),H=be(pn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:C}),0,t);u(!1),R.current={mode:"playhead",pointerId:L.pointerId,startPx:Y,startTime:H},a(H)},onPointerDownSelect:L=>{if(L.button!==0)return;const B=v.current;if(!B)return;B.setPointerCapture(L.pointerId);const Y=O(L.clientX),H=be(pn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:C}),0,t);u(!1),R.current={mode:"select",pointerId:L.pointerId,startPx:Y,startTime:H},d({start:H,end:H})},onPointerDownPlayhead:L=>{if(L.button!==0)return;const B=v.current;if(!B)return;B.setPointerCapture(L.pointerId);const Y=O(L.clientX),H=be(pn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:C}),0,t);u(!1),R.current={mode:"playhead",pointerId:L.pointerId,startPx:Y,startTime:H},a(H)},onPointerMove:L=>{const B=R.current;if(!B||B.pointerId!==L.pointerId)return;const Y=O(L.clientX);y(()=>{const H=be(pn({px:Y,windowStart:M.start,windowSeconds:M.seconds,width:C}),0,t);if(B.mode==="playhead")a(H);else{const W=Math.min(B.startTime,H),Z=Math.max(B.startTime,H);d({start:W,end:Z})}})},onPointerUp:L=>{const B=R.current;if(!(!B||B.pointerId!==L.pointerId)&&(R.current=null,B.mode==="select"&&c)){const Y=Math.abs(c.end-c.start);if(Y<Math.max(1/Math.max(1,p.fps),.1))d(null);else if(r){const H=be(Y*1.05,Math.max(1/Math.max(1,p.fps),.05),t),W=be(c.start,0,Math.max(0,t-H));m(Z=>({...Z,windowSeconds:H})),w(W)}}},onClickEvent:L=>{s&&d(null),u(!1),a(be(L,0,t)),w(be(L-M.seconds/2,0,Math.max(0,t-M.seconds)))},resetView:()=>{u(!1),m(L=>({...L,windowSeconds:t})),w(0)}}}const fd=({ticks:e,tickColor:t,labelColor:n})=>g.jsx("div",{className:ee.trackArea,children:e.map(r=>g.jsxs("div",{children:[g.jsx("div",{className:`${ee.tick} ${r.kind==="minor"?ee.tickMinor:ee.tickMajor}`.trim(),style:{left:`${r.px}px`,backgroundColor:t}}),r.kind==="major"&&r.label?g.jsx("div",{className:ee.tickLabel,style:{left:`${r.px}px`,color:n},children:r.label}):null]},`${r.time}-${r.kind}`))});fd.displayName="TimeScale";const hd=({segments:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,segmentColor:s,segmentColorHover:i})=>{const a=e.map(l=>({start:be(l.start,0,o),end:be(l.end,0,o)})).filter(l=>l.end>l.start).map(l=>{const u=Math.max(l.start,t),c=Math.min(l.end,t+n);return{start:u,end:c}}).filter(l=>l.end>l.start);return g.jsx("div",{className:ee.trackArea,children:a.map((l,u)=>{const c=mt({time:l.start,windowStart:t,windowSeconds:n,width:r}),d=mt({time:l.end,windowStart:t,windowSeconds:n,width:r}),f=Math.max(0,d-c);return g.jsx("div",{className:ee.segment,style:{left:`${c}px`,width:`${f}px`,background:s},onMouseEnter:h=>{h.currentTarget.style.background=i},onMouseLeave:h=>{h.currentTarget.style.background=s},"aria-hidden":!0},`${l.start}-${l.end}-${u}`)})})};hd.displayName="VideoTrack";const md=({events:e,viewStart:t,viewSeconds:n,width:r,totalSeconds:o,onClickEvent:s,eventBg:i,eventBgHover:a,eventDot:l})=>{const u=e.map(c=>({...c,time:be(c.time,0,o)})).filter(c=>c.time>=t&&c.time<=t+n);return g.jsx("div",{className:ee.trackArea,children:u.map(c=>{const d=mt({time:c.time,windowStart:t,windowSeconds:n,width:r});return g.jsx("button",{type:"button",className:ee.event,onPointerDown:f=>{f.stopPropagation()},onClick:()=>s(c.time),style:{left:`${d}px`,backgroundColor:i,border:"none",padding:0},onMouseEnter:f=>{f.currentTarget.style.backgroundColor=a},onMouseLeave:f=>{f.currentTarget.style.backgroundColor=i},"aria-label":`Evento em ${c.time.toFixed(2)}s`,children:c.icon?c.icon:g.jsx("span",{className:ee.eventDot,style:{backgroundColor:l}})},c.id)})})};md.displayName="EventsTrack";const pd=({className:e,title:t="Timeline",subtitle:n="Arraste para selecionar e aplicar zoom no período desejado",showHeader:r=!0,timeScaleMode:o="day24h",tickLabelFormatter:s,totalSeconds:i=24*60*60,enableWheelZoom:a=!0,height:l=190,autoZoomOnSelection:u=!0,showZoomControls:c=!0,enableScrubOnTracks:d=!1,clearSelectionOnEventClick:f=!0})=>{const h=X.useTheme(),p=s??(o==="duration"?oC:rC),{viewportRef:m,axisLeft:v,axisWidth:S,zoom:_,currentTime:b,selectedRange:C,videoSegments:T,events:w,view:P,ticks:M,onWheel:I,onPointerDownScrub:V,onPointerDownSelect:$,onPointerDownPlayhead:y,onPointerMove:R,onPointerUp:O,onClickEvent:F,resetView:U,setZoom:G}=iC({totalSeconds:i,enableWheelZoom:a,autoZoomOnSelection:u,tickLabelFormatter:p,clearSelectionOnEventClick:f}),D=S?v+mt({time:b,windowStart:P.start,windowSeconds:P.seconds,width:S}):v,Q=h.palette.common.white,j=X.alpha(h.palette.common.black,.16),A="0px 4px 5.3px 0px rgba(0,0,0,0.16)",N=h.palette.mode==="dark"?X.alpha(h.palette.common.white,.7):"#79747e",L=X.alpha(h.palette.common.black,.16),B="#2c2c2c",Y=X.alpha(h.palette.primary.main,.15),H=X.alpha(h.palette.primary.main,.22),W=X.alpha(h.palette.common.white,1),Z=X.alpha(h.palette.common.white,1),q=X.alpha(h.palette.common.black,.55),J=X.alpha(h.palette.primary.main,.12),me=h.palette.primary.main,z=Math.max(1/Math.max(1,_.fps),.5),_e=z/i,He=(()=>{const rn=be(P.seconds,z,i);if(_e<=0||_e>=1)return 0;const on=Math.log(rn/i)/Math.log(_e)*100;return be(on,0,100)})(),lt=rn=>{const on=be(rn,0,100),sn=i*Math.pow(_e,on/100);G(Kr=>({...Kr,windowSeconds:be(sn,z,i)}))},Gr=`${Math.round(He)}%`;return g.jsxs(E.Box,{className:`${ee.root} ${ee.container} ${e??""}`.trim(),sx:{backgroundColor:Q,border:`1px solid ${j}`,boxShadow:A,px:1,py:2},children:[r?g.jsxs("div",{className:ee.header,children:[g.jsxs("div",{className:ee.headerText,children:[g.jsx(E.Typography,{variant:"subtitle1",sx:{color:N,fontWeight:500},children:t}),g.jsx(E.Typography,{variant:"body2",sx:{color:N},children:n})]}),c?g.jsxs("div",{className:ee.controls,children:[g.jsx(E.Box,{className:ee.iconButton,sx:{border:`1px solid ${X.alpha(h.palette.common.black,.22)}`},children:g.jsx(E.IconButton,{size:"small",onClick:U,"aria-label":"Reset zoom",sx:{width:32,height:32},children:g.jsx(Yx,{fontSize:"small"})})}),g.jsxs(E.Box,{className:ee.zoomGroup,sx:{backgroundColor:h.palette.common.white,border:`1px solid ${X.alpha(h.palette.common.black,.22)}`},"aria-label":"Zoom controls",children:[g.jsx(E.IconButton,{size:"small","aria-label":"Zoom out",onClick:()=>lt(He-10),children:g.jsx(qx,{fontSize:"small"})}),g.jsxs("div",{className:ee.zoomTrack,"aria-hidden":!0,children:[g.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:X.alpha("#f5f5f5",.3),borderRadius:1,boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}}),g.jsx("div",{className:ee.zoomTrackFill,style:{width:Gr,backgroundColor:"#f5f5f5",boxShadow:"1px 1px 1px rgba(10,10,10,0.04)"}})]}),g.jsx(E.IconButton,{size:"small","aria-label":"Zoom in",onClick:()=>lt(He+10),children:g.jsx(Zx,{fontSize:"small"})})]})]}):null]}):null,g.jsx(E.Box,{sx:{mt:r?2:0,height:l},children:g.jsxs("div",{ref:m,className:ee.layers,onWheel:I,onPointerMove:R,onPointerUp:O,children:[g.jsxs("div",{className:ee.playhead,style:{left:`${D}px`},onPointerDown:y,role:"slider","aria-label":"Playhead","aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":b,tabIndex:0,children:[g.jsx("div",{className:ee.playheadHandle,style:{borderBottomColor:me}}),g.jsx("div",{className:ee.playheadLine,style:{backgroundColor:me}})]}),g.jsxs("div",{className:`${ee.trackLabelRow} ${ee.timeScale}`.trim(),children:[g.jsx("div",{}),g.jsx("div",{onPointerDown:V,style:{height:"100%",cursor:"ew-resize"},"aria-label":"Régua do tempo",children:g.jsx(fd,{ticks:M,tickColor:L,labelColor:B})})]}),g.jsxs(E.Box,{className:ee.trackBox,sx:{mt:1,border:`1px solid ${X.alpha(h.palette.common.black,.1)}`,borderRadius:"12px",height:106,position:"relative"},children:[C?g.jsx("div",{className:ee.selectionOverlay,style:{left:`${v+mt({time:C.start,windowStart:P.start,windowSeconds:P.seconds,width:S})}px`,width:`${Math.max(0,mt({time:C.end,windowStart:P.start,windowSeconds:P.seconds,width:S})-mt({time:C.start,windowStart:P.start,windowSeconds:P.seconds,width:S}))}px`,backgroundColor:J}}):null,g.jsxs("div",{className:`${ee.trackLabelRow} ${ee.videoTrack}`.trim(),children:[g.jsx("div",{className:ee.label,style:{color:N},children:"Video"}),g.jsx("div",{onPointerDown:d?V:void 0,style:{height:"100%"},children:g.jsx(hd,{segments:T,viewStart:P.start,viewSeconds:P.seconds,width:S,totalSeconds:i,segmentColor:Y,segmentColorHover:H})})]}),g.jsxs("div",{className:`${ee.trackLabelRow} ${ee.eventsTrack}`.trim(),children:[g.jsx("div",{className:ee.label,style:{color:N},children:"Eventos"}),g.jsx("div",{onPointerDown:d?V:void 0,style:{height:"100%"},children:g.jsx(md,{events:w,viewStart:P.start,viewSeconds:P.seconds,width:S,totalSeconds:i,onClickEvent:F,eventBg:W,eventBgHover:Z,eventDot:q})})]}),g.jsx("div",{onPointerDown:$,style:{position:"absolute",left:v,right:10,top:0,bottom:0,cursor:"crosshair"},"aria-label":"Arraste para selecionar"})]})]})})]})};pd.displayName="VideoTimeline";const gd=({stream:e=null,src:t,autoPlay:n=!0,muted:r=!0,playsInline:o=!0,className:s,liveEdgeThresholdSeconds:i=2,updateTimeForLiveStream:a=!0,constrainToSelectedRange:l=!0,loopSelection:u=!1})=>{const c=x.useRef(null),[d,f]=Gt(li),[h,p]=Gt(ci),m=_r(ui),v=!!e;x.useEffect(()=>{const b=c.current;if(b){if(e){b.srcObject=e;return}b.srcObject=null,t&&(b.src=t)}},[e,t]),x.useEffect(()=>{const b=c.current;if(!b||v)return;const C=()=>{if(l&&m){const P=Math.max(0,m.start),M=Math.max(P,m.end);b.currentTime<P?b.currentTime=P:b.currentTime>M&&(u?b.currentTime=P:(b.pause(),b.currentTime=M))}if(f(b.currentTime),Number.isFinite(b.duration)&&b.duration>0){const P=b.duration-b.currentTime<=i;p(P)}},T=()=>{if(!l||!m)return;const P=Math.max(0,m.start),M=Math.max(P,m.end);(b.currentTime<P||b.currentTime>M)&&(b.currentTime=P)},w=()=>{h&&Number.isFinite(b.duration)&&b.duration>0&&(b.currentTime=b.duration)};return b.addEventListener("timeupdate",C),b.addEventListener("play",T),b.addEventListener("loadedmetadata",w),()=>{b.removeEventListener("timeupdate",C),b.removeEventListener("play",T),b.removeEventListener("loadedmetadata",w)}},[l,v,h,i,u,m,f,p]);const S=x.useRef(-1);x.useEffect(()=>{const b=c.current;if(!b||v||!t)return;if(h){if(Number.isFinite(b.duration)&&b.duration>0){const T=b.duration;Math.abs(b.currentTime-T)>.25&&(b.currentTime=T,S.current=T)}return}if(Math.abs(S.current-d)<.05)return;let C=d;if(l&&m){const T=Math.max(0,m.start),w=Math.max(T,m.end);C=Math.min(w,Math.max(T,C))}Math.abs(b.currentTime-C)>.25&&(b.currentTime=C,S.current=d)},[l,d,h,v,m,t]),x.useEffect(()=>{const b=c.current;if(!b||v||!t||!l||!m)return;const C=Math.max(0,m.start),T=!b.paused;b.currentTime=C,S.current=C,p(!1),f(C),T&&b.play().catch(()=>{})},[l,v,m,f,p,t]),x.useEffect(()=>{if(!v||(p(!0),!a))return;let b=null,C=!0;const T=()=>{C&&(f(QS()),b=requestAnimationFrame(T))};return b=requestAnimationFrame(T),()=>{C=!1,b!=null&&cancelAnimationFrame(b)}},[v,f,p,a]);const _=x.useMemo(()=>({width:"100%",maxWidth:920,background:"black",aspectRatio:"16 / 9",display:"block"}),[]);return g.jsx("video",{ref:c,className:s,style:_,autoPlay:n,muted:r,playsInline:o,controls:!0})};gd.displayName="VideoPlayerWebRTC";const aC=Je(g.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),lC="_container_1vjy6_1",cC="_segment_1vjy6_7",uC="_selected_1vjy6_20",dC="_label_1vjy6_28",fC="_icon_1vjy6_37",hC="_checkIcon_1vjy6_47",mC="_unselected_1vjy6_53",_t={container:lC,segment:cC,selected:uC,label:dC,icon:fC,checkIcon:hC,unselected:mC},yd=({items:e,className:t,sx:n,...r})=>{const s=E.useTheme().palette.mode==="dark",i=(a,l)=>{a.onClick?a.onClick(l):console.log(`Item "${a.label}" clicado`)};return g.jsx(E.Box,{className:`${_t.container} ${t||""}`,sx:n,"data-theme":s?"dark":"light",...r,children:e.map((a,l)=>g.jsxs(E.Box,{className:`${_t.segment} ${a.selected?_t.selected:_t.unselected}`,onClick:u=>i(a,u),children:[a.selected&&g.jsx(E.Box,{className:_t.icon,children:g.jsx(aC,{className:_t.checkIcon})}),g.jsx(E.Box,{className:_t.label,children:a.label})]},l))})};yd.displayName="DisplayTypes";const pC=600,Mo=[.32,.72,0,1],Po=400,vd=({leftContent:e,rightContent:t,gap:n=2,leftRatio:r=.5,leftCollapsed:o=!1,mobileShowOnly:s="both",mobileBreakpointPx:i=pC,className:a,sx:l})=>{const u=E.useTheme(),c=E.useMediaQuery(`(max-width:${i}px)`),d=!c||s==="left"||s==="both",f=!c||s==="right"||s==="both",h=u.spacing(n),p=`flex ${Po}ms cubic-bezier(${Mo.join(",")}), min-width ${Po}ms cubic-bezier(${Mo.join(",")})`;if(c&&s!=="both")return g.jsxs(E.Box,{className:a,sx:{display:"grid",gridTemplateColumns:"1fr",width:"100%",height:"100%",minHeight:0,overflow:"hidden",...l},children:[g.jsx(E.Box,{sx:{minWidth:0,minHeight:0,overflow:"hidden",display:d?"flex":"none",flexDirection:"column"},children:e}),g.jsx(E.Box,{sx:{minWidth:0,minHeight:0,overflow:"hidden",display:f?"flex":"none",flexDirection:"column"},children:t})]});const m=o?0:r,v=o?0:void 0,S=o?"none":"auto";return g.jsxs(E.Box,{className:a,sx:{display:"flex",flexDirection:"row",gap:o?0:h,width:"100%",height:"100%",minHeight:0,overflow:"hidden",transition:`gap ${Po}ms cubic-bezier(${Mo.join(",")})`,...l},children:[g.jsx(E.Box,{sx:{flex:m,minWidth:v,overflow:"hidden",display:"flex",flexDirection:"column",transition:p,pointerEvents:S},children:e}),g.jsx(E.Box,{sx:{flex:1,minWidth:0,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:t})]})};vd.displayName="SplitLayout";const gC=256,bd=({children:e,minColumns:t=1,maxColumns:n=3,minItemWidthPx:r=gC,gap:o=2,className:s,sx:i})=>{const l=E.useTheme().spacing(o),u=n-1;return g.jsx(E.Box,{className:s,sx:{"--responsive-grid-gap":l,display:"grid",gap:l,width:"100%",minHeight:0,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, max(${r}px, calc((100% - ${u} * var(--responsive-grid-gap)) / ${n}))), 1fr))`,alignContent:"start",...i},children:e})};bd.displayName="ResponsiveGrid";const xd=Je(g.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var yC=e=>e.type==="checkbox",Cn=e=>e instanceof Date,di=e=>e==null;const Sd=e=>typeof e=="object";var jt=e=>!di(e)&&!Array.isArray(e)&&Sd(e)&&!Cn(e),vC=e=>jt(e)&&e.target?yC(e.target)?e.target.checked:e.target.value:e,bC=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xC=(e,t)=>e.has(bC(t)),SC=e=>{const t=e.constructor&&e.constructor.prototype;return jt(t)&&t.hasOwnProperty("isPrototypeOf")},CC=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Cd(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(CC&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(jt(e)&&SC(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Cd(e[o]));return r}var Td=e=>/^\w*$/.test(e),gs=e=>e===void 0,TC=e=>Array.isArray(e)?e.filter(Boolean):[],wd=e=>TC(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,n)=>{if(!t||!jt(e))return n;const r=(Td(t)?[t]:wd(t)).reduce((o,s)=>di(o)?o:o[s],e);return gs(r)||r===e?gs(e[t])?n:e[t]:r},ko=e=>typeof e=="boolean",er=e=>typeof e=="function",yl=(e,t,n)=>{let r=-1;const o=Td(t)?[t]:wd(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const u=e[a];l=jt(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}};const vl={BLUR:"blur",CHANGE:"change"},bl={all:"all"},_d=x.createContext(null);_d.displayName="HookFormControlContext";const fi=()=>x.useContext(_d);var wC=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==bl.all&&(t._proxyFormState[i]=!r||bl.all),n&&(n[i]=!0),e[i]}});return o};const Ed=typeof window<"u"?x.useLayoutEffect:x.useEffect;function _C(e){const t=fi(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[i,a]=x.useState(n._formState),l=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ed(()=>n._subscribe({name:o,formState:l.current,exact:s,callback:u=>{!r&&a({...n._formState,...u})}}),[o,r,s]),x.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),x.useMemo(()=>wC(i,n,l.current,!1),[i,n])}var EC=e=>typeof e=="string",xl=(e,t,n,r,o)=>EC(e)?Oe(n,e,o):Array.isArray(e)?e.map(s=>Oe(n,s)):n,Sl=e=>di(e)||!Sd(e);function cr(e,t,n=new WeakSet){if(Sl(e)||Sl(t))return Object.is(e,t);if(Cn(e)&&Cn(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(Cn(i)&&Cn(a)||jt(i)&&jt(a)||Array.isArray(i)&&Array.isArray(a)?!cr(i,a,n):!Object.is(i,a))return!1}}return!0}function AC(e){const t=fi(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},l=x.useRef(o),u=x.useRef(a),c=x.useRef(void 0),d=x.useRef(n),f=x.useRef(r);u.current=a;const[h,p]=x.useState(()=>{const C=n._getWatch(r,l.current);return u.current?u.current(C):C}),m=x.useCallback(C=>{const T=xl(r,n._names,C||n._formValues,!1,l.current);return u.current?u.current(T):T},[n._formValues,n._names,r]),v=x.useCallback(C=>{if(!s){const T=xl(r,n._names,C||n._formValues,!1,l.current);if(u.current){const w=u.current(T);cr(w,c.current)||(p(w),c.current=w)}else p(T)}},[n._formValues,n._names,s,r]);Ed(()=>((d.current!==n||!cr(f.current,r))&&(d.current=n,f.current=r,v()),n._subscribe({name:r,formState:{values:!0},exact:i,callback:C=>{v(C.values)}})),[n,i,r,v]),x.useEffect(()=>n._removeUnmounted());const S=d.current!==n,_=f.current,b=x.useMemo(()=>{if(s)return null;const C=!S&&!cr(_,r);return S||C?m():null},[s,S,r,_,m]);return b!==null?b:h}function MC(e){const t=fi(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,l=xC(o._names.array,n),u=x.useMemo(()=>Oe(o._formValues,n,Oe(o._defaultValues,n,i)),[o,n,i]),c=AC({control:o,name:n,defaultValue:u,exact:a}),d=_C({control:o,name:n,exact:a}),f=x.useRef(e),h=x.useRef(void 0),p=x.useRef(o.register(n,{...e.rules,value:c,...ko(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Oe(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Oe(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Oe(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Oe(d.validatingFields,n)},error:{enumerable:!0,get:()=>Oe(d.errors,n)}}),[d,n]),v=x.useCallback(C=>p.current.onChange({target:{value:vC(C),name:n},type:vl.CHANGE}),[n]),S=x.useCallback(()=>p.current.onBlur({target:{value:Oe(o._formValues,n),name:n},type:vl.BLUR}),[n,o._formValues]),_=x.useCallback(C=>{const T=Oe(o._fields,n);T&&T._f&&C&&(T._f.ref={focus:()=>er(C.focus)&&C.focus(),select:()=>er(C.select)&&C.select(),setCustomValidity:w=>er(C.setCustomValidity)&&C.setCustomValidity(w),reportValidity:()=>er(C.reportValidity)&&C.reportValidity()})},[o._fields,n]),b=x.useMemo(()=>({name:n,value:c,...ko(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:v,onBlur:S,ref:_}),[n,r,d.disabled,v,S,_,c]);return x.useEffect(()=>{const C=o._options.shouldUnregister||s,T=h.current;T&&T!==n&&!l&&o.unregister(T),o.register(n,{...f.current.rules,...ko(f.current.disabled)?{disabled:f.current.disabled}:{}});const w=(P,M)=>{const I=Oe(o._fields,P);I&&I._f&&(I._f.mount=M)};if(w(n,!0),C){const P=Cd(Oe(o._options.defaultValues,n,f.current.defaultValue));yl(o._defaultValues,n,P),gs(Oe(o._formValues,n))&&yl(o._formValues,n,P)}return!l&&o.register(n),h.current=n,()=>{(l?C&&!o._state.action:C)?o.unregister(n):w(n,!1)}},[n,o,l,s]),x.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),x.useMemo(()=>({field:b,formState:d,fieldState:m}),[b,d,m])}const hi=e=>e.render(MC(e)),PC=x.createContext(null);PC.displayName="HookFormContext";const kC="_formSelect_s09hu_1",IC="_labelWrapper_s09hu_5",RC="_inputLabel_s09hu_9",OC="_placeholder_s09hu_75",LC="_helperText_s09hu_121",Et={formSelect:kC,labelWrapper:IC,inputLabel:RC,placeholder:OC,helperText:LC},Ad=({control:e,name:t,label:n,options:r,placeholder:o,helperText:s,required:i=!1,fullWidth:a=!0,disabled:l=!1,renderValue:u,className:c,...d})=>{const h=E.useTheme().palette.mode==="dark";return g.jsx(hi,{name:t,control:e,render:({field:p,fieldState:m})=>{var b;const v=!!m.error,S=v||!!s,_=v?(b=m.error)==null?void 0:b.message:s;return g.jsxs("div",{className:`${Et.formSelect} ${c||""}`,"data-theme":h?"dark":"light",children:[g.jsx("div",{className:Et.labelWrapper,children:g.jsxs("span",{className:Et.inputLabel,children:[n,i?" *":""]})}),g.jsxs(E.FormControl,{error:v,fullWidth:a,disabled:l,children:[g.jsxs(E.Select,{...p,...d,displayEmpty:!!o,SelectDisplayProps:{"aria-label":n},renderValue:u||(C=>{if(C===""||C===null||C===void 0)return g.jsx("span",{className:Et.placeholder,children:o||""});const T=r.find(w=>w.value===C);return(T==null?void 0:T.label)||String(C)}),className:Et.select,MenuProps:{autoFocus:!1,slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px 0 rgba(0,0,0,0.30)",...h?{bgcolor:"#1A1C1C"}:{bgcolor:"#F1F1F1"},marginTop:"2px"}}},sx:{"& .MuiMenuItem-root":{fontFamily:'"Suisse Intl", "Inter", "Helvetica", "Arial", sans-serif',fontSize:14,fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",whiteSpace:"nowrap",height:"48px",...h?{color:"#FAF9F9"}:{color:"#101111"},marginBottom:"2px",backgroundColor:"transparent"},"& .MuiMenuItem-root.Mui-focusVisible":{backgroundColor:"transparent",...h?{color:"#FAF9F9"}:{color:"#101111"}},"& .MuiMenuItem-root:hover":{...h?{backgroundColor:"#E5FF4B"}:{backgroundColor:"#286672"},borderRadius:"12px",...h?{color:"#101111"}:{color:"#FAF9F9"}},"& .MuiMenuItem-root.Mui-selected":{borderRadius:"12px",...h?{backgroundColor:"#E5FF4B",color:"#101111"}:{backgroundColor:"#286672",color:"#FAF9F9"},gap:"8px"},"& .MuiMenuItem-root.Mui-selected:hover":{...h?{backgroundColor:"#E5FF4B"}:{backgroundColor:"#286672"},borderRadius:"12px",...h?{color:"#101111"}:{color:"#FAF9F9"}},"& .MuiMenuItem-root .MuiListItemIcon-root":{minWidth:20},"& .MuiMenuItem-root.Mui-selected .MuiSvgIcon-root":{fill:h?"#101111":"#FAF9F9",width:20,height:20}}},children:[o&&g.jsx(E.MenuItem,{value:"",disabled:!0,children:g.jsx("span",{className:Et.placeholder,children:o})}),r.map(C=>{const T=p.value===C.value;return g.jsxs(E.MenuItem,{value:C.value,disabled:C.disabled,children:[T&&g.jsx(E.ListItemIcon,{sx:{minWidth:20},children:g.jsx(xd,{sx:{fontSize:20}})}),C.label]},String(C.value))})]}),S&&g.jsx(E.FormHelperText,{className:Et.helperText,children:_})]})]})}})};Ad.displayName="FormSelect";const jC="_formMultiSelect_1d6fa_1",DC="_labelWrapper_1d6fa_5",BC="_inputLabel_1d6fa_9",$C="_placeholder_1d6fa_75",NC="_helperText_1d6fa_124",VC="_chipsContainer_1d6fa_153",FC="_chip_1d6fa_153",tt={formMultiSelect:jC,labelWrapper:DC,inputLabel:BC,placeholder:$C,helperText:NC,chipsContainer:VC,chip:FC},Md=({control:e,name:t,label:n,options:r,placeholder:o,helperText:s,required:i=!1,fullWidth:a=!0,disabled:l=!1,chipVariant:u="filled",maxChipsDisplay:c,renderValue:d,className:f,open:h,onOpen:p,onClose:m,...v})=>{const _=E.useTheme().palette.mode==="dark";return g.jsx(hi,{name:t,control:e,render:({field:b,fieldState:C})=>{var $;const T=!!C.error,w=T||!!s,P=T?($=C.error)==null?void 0:$.message:s,M=Array.isArray(b.value)?b.value:[];M.length>0;const V=d||(y=>{if(!Array.isArray(y)||y.length===0)return g.jsx("span",{className:tt.placeholder,children:o||""});const R=c?y.slice(0,c):y,O=c&&y.length>c?y.length-c:0;return g.jsxs(E.Box,{className:tt.chipsContainer,children:[R.map(F=>{const U=r.find(G=>G.value===F);return g.jsx(E.Chip,{label:(U==null?void 0:U.label)||String(F),size:"small",variant:u,className:tt.chip},String(F))}),O>0&&g.jsx(E.Chip,{label:`+${O}`,size:"small",variant:u,className:tt.chip})]})});return g.jsxs("div",{className:`${tt.formMultiSelect} ${f||""}`,"data-theme":_?"dark":"light",children:[g.jsx("div",{className:tt.labelWrapper,children:g.jsxs("span",{className:tt.inputLabel,children:[n,i?" *":""]})}),g.jsxs(E.FormControl,{error:T,fullWidth:a,disabled:l,children:[g.jsx(E.Select,{...b,...v,variant:"outlined",multiple:!0,value:M,onChange:y=>{b.onChange(y.target.value)},displayEmpty:!!o,renderValue:V,className:tt.select,SelectDisplayProps:{"aria-label":n},open:h,onOpen:p,onClose:m,MenuProps:{autoFocus:!1,slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px 0 rgba(0,0,0,0.30)",..._?{bgcolor:"#1A1C1C"}:{bgcolor:"#F1F1F1"},marginTop:"2px"}}},sx:{"& .MuiMenuItem-root":{fontFamily:'"Suisse Intl", "Inter", "Helvetica", "Arial", sans-serif',fontSize:14,fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",whiteSpace:"nowrap",height:"48px",..._?{color:"#FAF9F9"}:{color:"#101111"},marginBottom:"2px",backgroundColor:"transparent"},"& .MuiMenuItem-root.Mui-focusVisible":{backgroundColor:"transparent",..._?{color:"#FAF9F9"}:{color:"#101111"}},"& .MuiMenuItem-root:hover":{..._?{backgroundColor:"#E5FF4B"}:{backgroundColor:"#286672"},borderRadius:"12px",..._?{color:"#101111"}:{color:"#FAF9F9"}},"& .MuiMenuItem-root.Mui-selected":{borderRadius:"12px",..._?{backgroundColor:"#E5FF4B",color:"#101111"}:{backgroundColor:"#286672",color:"#FAF9F9"},gap:"8px"},"& .MuiMenuItem-root.Mui-selected:hover":{..._?{backgroundColor:"#E5FF4B"}:{backgroundColor:"#286672"},borderRadius:"12px",..._?{color:"#101111"}:{color:"#FAF9F9"}},"& .MuiMenuItem-root .MuiListItemIcon-root":{minWidth:20},"& .MuiMenuItem-root.Mui-selected .MuiSvgIcon-root":{fill:_?"#101111":"#FAF9F9",width:20,height:20}}},children:r.map(y=>{const R=M.includes(y.value);return g.jsxs(E.MenuItem,{value:y.value,disabled:y.disabled,children:[R&&g.jsx(E.ListItemIcon,{sx:{minWidth:20},children:g.jsx(xd,{sx:{fontSize:20}})}),y.label]},String(y.value))})}),w&&g.jsx(E.FormHelperText,{className:tt.helperText,children:P})]})]})}})};Md.displayName="FormMultiSelect";const zC="_formInput_195f5_1",WC="_labelWrapper_195f5_5",UC="_inputLabel_195f5_9",gn={formInput:zC,labelWrapper:WC,inputLabel:UC},Pd=({control:e,name:t,label:n,type:r="text",placeholder:o,helperText:s,required:i=!1,fullWidth:a=!0,disabled:l=!1,className:u,...c})=>{const f=E.useTheme().palette.mode==="dark";return g.jsx(hi,{name:t,control:e,render:({field:h,fieldState:p})=>{var S;const m=!!p.error,v=m?(S=p.error)==null?void 0:S.message:s;return g.jsxs("div",{className:`${gn.formInput} ${u||""}`,"data-theme":f?"dark":"light",children:[g.jsx("div",{className:gn.labelWrapper,children:g.jsxs("span",{className:gn.inputLabel,children:[n,i?" *":""]})}),g.jsx(E.TextField,{...h,...c,type:r,placeholder:o,required:!1,fullWidth:a,disabled:l,error:m,helperText:v,variant:"outlined",className:gn.input,InputLabelProps:{shrink:!1},inputProps:{"aria-label":n},InputProps:{className:gn.inputRoot}})]})}})};Pd.displayName="FormInput";exports.Button=vs;exports.CAMERA_ALGORITHM_FACIAL=Wr;exports.CAMERA_ALGORITHM_LPR=Ur;exports.CameraCard=Zv;exports.CountCard=Mp;exports.DisplayTypes=yd;exports.FilterButton=Pl;exports.FilterChip=kl;exports.FilterModal=ql;exports.FormInput=Pd;exports.FormMultiSelect=Md;exports.FormSelect=Ad;exports.GoogleMap=Uu;exports.MapContent=si;exports.MapMarkers=Zu;exports.MapSpot=ri;exports.ModuleMenu=ed;exports.NotFoundContent=Xu;exports.ResponsiveGrid=bd;exports.SearchBar=qu;exports.SidebarMenu=Qu;exports.SplitLayout=vd;exports.VideoPlayer=td;exports.VideoPlayerWebRTC=gd;exports.VideoTimeline=pd;exports.VisioThemeProvider=zd;exports.ZoomControls=nb;exports.currentTimeAtom=li;exports.darkColors=ge;exports.darkTheme=El;exports.eventsAtom=dd;exports.isLiveAtom=ci;exports.lightColors=pe;exports.lightTheme=_l;exports.radiiTokens=tr;exports.selectedRangeAtom=ui;exports.spacingScale=Nd;exports.spacingTokens=Tl;exports.typographyTokens=Ee;exports.useGoogleMapContext=oi;exports.useVisioTheme=Wd;exports.videoSegmentsAtom=ud;exports.zoomAtom=cd;
108
108
  //# sourceMappingURL=index.cjs.js.map