componentes-exagono 0.1.39 → 0.1.41
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.es.js +5339 -5149
- package/dist/index.umd.js +50 -50
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(dt,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("@mui/material"),require("date-fns"),require("react-dom"),require("notistack")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","date-fns","react-dom","notistack"],w):(dt=typeof globalThis<"u"?globalThis:dt||self,w(dt.exagono={},dt.React,dt.MaterialUI,dt.dateFns,dt.ReactDOM,dt.notistack))})(this,(function(dt,w,E,y,Fs,Wi){"use strict";function Ys(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const W=Ys(w),Jf=Ys(Fs);function Xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fo={exports:{}},xn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.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
|
|
9
|
+
*/var Hs;function ep(){if(Hs)return xn;Hs=1;var e=w,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,l){var u,d={},f=null,m=null;l!==void 0&&(f=""+l),c.key!==void 0&&(f=""+c.key),c.ref!==void 0&&(m=c.ref);for(u in c)r.call(c,u)&&!i.hasOwnProperty(u)&&(d[u]=c[u]);if(s&&s.defaultProps)for(u in c=s.defaultProps,c)d[u]===void 0&&(d[u]=c[u]);return{$$typeof:n,type:s,key:f,ref:m,props:d,_owner:o.current}}return xn.Fragment=t,xn.jsx=a,xn.jsxs=a,xn}var Sn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,39 +14,39 @@
|
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var Us;function tp(){return Us||(Us=1,process.env.NODE_ENV!=="production"&&(function(){var e=w,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,p="@@iterator";function b(_){if(_===null||typeof _!="object")return null;var Z=g&&_[g]||_[p];return typeof Z=="function"?Z:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(_){{for(var Z=arguments.length,ie=new Array(Z>1?Z-1:0),ge=1;ge<Z;ge++)ie[ge-1]=arguments[ge];T("error",_,ie)}}function T(_,Z,ie){{var ge=S.ReactDebugCurrentFrame,Ie=ge.getStackAddendum();Ie!==""&&(Z+="%s",ie=ie.concat([Ie]));var Be=ie.map(function(De){return String(De)});Be.unshift("Warning: "+Z),Function.prototype.apply.call(console[_],console,Be)}}var D=!1,k=!1,O=!1,R=!1,U=!1,H;H=Symbol.for("react.module.reference");function V(_){return!!(typeof _=="string"||typeof _=="function"||_===r||_===i||U||_===o||_===l||_===u||R||_===m||D||k||O||typeof _=="object"&&_!==null&&(_.$$typeof===f||_.$$typeof===d||_.$$typeof===a||_.$$typeof===s||_.$$typeof===c||_.$$typeof===H||_.getModuleId!==void 0))}function K(_,Z,ie){var ge=_.displayName;if(ge)return ge;var Ie=Z.displayName||Z.name||"";return Ie!==""?ie+"("+Ie+")":ie}function v(_){return _.displayName||"Context"}function $(_){if(_==null)return null;if(typeof _.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case r:return"Fragment";case t:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case s:var Z=_;return v(Z)+".Consumer";case a:var ie=_;return v(ie._context)+".Provider";case c:return K(_,_.render,"ForwardRef");case d:var ge=_.displayName||null;return ge!==null?ge:$(_.type)||"Memo";case f:{var Ie=_,Be=Ie._payload,De=Ie._init;try{return $(De(Be))}catch{return null}}}return null}var M=Object.assign,L=0,Y,J,oe,we,F,q,de;function he(){}he.__reactDisabledLog=!0;function fe(){{if(L===0){Y=console.log,J=console.info,oe=console.warn,we=console.error,F=console.group,q=console.groupCollapsed,de=console.groupEnd;var _={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}L++}}function G(){{if(L--,L===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},_,{value:Y}),info:M({},_,{value:J}),warn:M({},_,{value:oe}),error:M({},_,{value:we}),group:M({},_,{value:F}),groupCollapsed:M({},_,{value:q}),groupEnd:M({},_,{value:de})})}L<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=S.ReactCurrentDispatcher,ue;function me(_,Z,ie){{if(ue===void 0)try{throw Error()}catch(Ie){var ge=Ie.stack.trim().match(/\n( *(at )?)/);ue=ge&&ge[1]||""}return`
|
|
18
|
+
`+ue+_}}var ve=!1,pe;{var Ye=typeof WeakMap=="function"?WeakMap:Map;pe=new Ye}function P(_,Z){if(!_||ve)return"";{var ie=pe.get(_);if(ie!==void 0)return ie}var ge;ve=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Be;Be=ae.current,ae.current=null,fe();try{if(Z){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(Ct){ge=Ct}Reflect.construct(_,[],De)}else{try{De.call()}catch(Ct){ge=Ct}_.call(De.prototype)}}else{try{throw Error()}catch(Ct){ge=Ct}_()}}catch(Ct){if(Ct&&ge&&typeof Ct.stack=="string"){for(var ke=Ct.stack.split(`
|
|
19
|
+
`),yt=ge.stack.split(`
|
|
20
|
+
`),nt=ke.length-1,at=yt.length-1;nt>=1&&at>=0&&ke[nt]!==yt[at];)at--;for(;nt>=1&&at>=0;nt--,at--)if(ke[nt]!==yt[at]){if(nt!==1||at!==1)do if(nt--,at--,at<0||ke[nt]!==yt[at]){var zt=`
|
|
21
|
+
`+ke[nt].replace(" at new "," at ");return _.displayName&&zt.includes("<anonymous>")&&(zt=zt.replace("<anonymous>",_.displayName)),typeof _=="function"&&pe.set(_,zt),zt}while(nt>=1&&at>=0);break}}}finally{ve=!1,ae.current=Be,G(),Error.prepareStackTrace=Ie}var _n=_?_.displayName||_.name:"",Wr=_n?me(_n):"";return typeof _=="function"&&pe.set(_,Wr),Wr}function te(_,Z,ie){return P(_,!1)}function _e(_){var Z=_.prototype;return!!(Z&&Z.isReactComponent)}function Ce(_,Z,ie){if(_==null)return"";if(typeof _=="function")return P(_,_e(_));if(typeof _=="string")return me(_);switch(_){case l:return me("Suspense");case u:return me("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case c:return te(_.render);case d:return Ce(_.type,Z,ie);case f:{var ge=_,Ie=ge._payload,Be=ge._init;try{return Ce(Be(Ie),Z,ie)}catch{}}}return""}var ct=Object.prototype.hasOwnProperty,Hi={},Rs=S.ReactDebugCurrentFrame;function Hr(_){if(_){var Z=_._owner,ie=Ce(_.type,_._source,Z?Z.type:null);Rs.setExtraStackFrame(ie)}else Rs.setExtraStackFrame(null)}function C(_,Z,ie,ge,Ie){{var Be=Function.call.bind(ct);for(var De in _)if(Be(_,De)){var ke=void 0;try{if(typeof _[De]!="function"){var yt=Error((ge||"React class")+": "+ie+" type `"+De+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[De]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw yt.name="Invariant Violation",yt}ke=_[De](Z,De,ge,ie,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(nt){ke=nt}ke&&!(ke instanceof Error)&&(Hr(Ie),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ge||"React class",ie,De,typeof ke),Hr(null)),ke instanceof Error&&!(ke.message in Hi)&&(Hi[ke.message]=!0,Hr(Ie),x("Failed %s type: %s",ie,ke.message),Hr(null))}}}var A=Array.isArray;function z(_){return A(_)}function ne(_){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,ie=Z&&_[Symbol.toStringTag]||_.constructor.name||"Object";return ie}}function X(_){try{return Q(_),!1}catch{return!0}}function Q(_){return""+_}function ce(_){if(X(_))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ne(_)),Q(_)}var Ee=S.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},vt,Ur;function sr(_){if(ct.call(_,"ref")){var Z=Object.getOwnPropertyDescriptor(_,"ref").get;if(Z&&Z.isReactWarning)return!1}return _.ref!==void 0}function $s(_){if(ct.call(_,"key")){var Z=Object.getOwnPropertyDescriptor(_,"key").get;if(Z&&Z.isReactWarning)return!1}return _.key!==void 0}function lo(_,Z){typeof _.ref=="string"&&Ee.current}function uo(_,Z){{var ie=function(){vt||(vt=!0,x("%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://reactjs.org/link/special-props)",Z))};ie.isReactWarning=!0,Object.defineProperty(_,"key",{get:ie,configurable:!0})}}function js(_,Z){{var ie=function(){Ur||(Ur=!0,x("%s: `ref` 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://reactjs.org/link/special-props)",Z))};ie.isReactWarning=!0,Object.defineProperty(_,"ref",{get:ie,configurable:!0})}}var Ui=function(_,Z,ie,ge,Ie,Be,De){var ke={$$typeof:n,type:_,key:Z,ref:ie,props:De,_owner:Be};return ke._store={},Object.defineProperty(ke._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ke,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ge}),Object.defineProperty(ke,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(ke.props),Object.freeze(ke)),ke};function Ls(_,Z,ie,ge,Ie){{var Be,De={},ke=null,yt=null;ie!==void 0&&(ce(ie),ke=""+ie),$s(Z)&&(ce(Z.key),ke=""+Z.key),sr(Z)&&(yt=Z.ref,lo(Z,Ie));for(Be in Z)ct.call(Z,Be)&&!ze.hasOwnProperty(Be)&&(De[Be]=Z[Be]);if(_&&_.defaultProps){var nt=_.defaultProps;for(Be in nt)De[Be]===void 0&&(De[Be]=nt[Be])}if(ke||yt){var at=typeof _=="function"?_.displayName||_.name||"Unknown":_;ke&&uo(De,at),yt&&js(De,at)}return Ui(_,ke,yt,Ie,ge,Ee.current,De)}}var bn=S.ReactCurrentOwner,Hf=S.ReactDebugCurrentFrame;function wn(_){if(_){var Z=_._owner,ie=Ce(_.type,_._source,Z?Z.type:null);Hf.setExtraStackFrame(ie)}else Hf.setExtraStackFrame(null)}var zs;zs=!1;function Bs(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function Uf(){{if(bn.current){var _=$(bn.current.type);if(_)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+_+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+_+"`."}return""}}function eC(_){return""}var Wf={};function tC(_){{var Z=Uf();if(!Z){var ie=typeof _=="string"?_:_.displayName||_.name;ie&&(Z=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+ie+">.")}return
|
|
25
|
+
Check the top-level render call using <`+ie+">.")}return Z}}function Zf(_,Z){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var ie=tC(Z);if(Wf[ie])return;Wf[ie]=!0;var ge="";_&&_._owner&&_._owner!==bn.current&&(ge=" It was passed a child from "+$(_._owner.type)+"."),wn(_),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ie,ge),wn(null)}}function qf(_,Z){{if(typeof _!="object")return;if(z(_))for(var ie=0;ie<_.length;ie++){var ge=_[ie];Bs(ge)&&Zf(ge,Z)}else if(Bs(_))_._store&&(_._store.validated=!0);else if(_){var Ie=b(_);if(typeof Ie=="function"&&Ie!==_.entries)for(var Be=Ie.call(_),De;!(De=Be.next()).done;)Bs(De.value)&&Zf(De.value,Z)}}}function rC(_){{var Z=_.type;if(Z==null||typeof Z=="string")return;var ie;if(typeof Z=="function")ie=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===d))ie=Z.propTypes;else return;if(ie){var ge=$(Z);C(ie,_.props,"prop",ge,_)}else if(Z.PropTypes!==void 0&&!zs){zs=!0;var Ie=$(Z);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nC(_){{for(var Z=Object.keys(_.props),ie=0;ie<Z.length;ie++){var ge=Z[ie];if(ge!=="children"&&ge!=="key"){wn(_),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ge),wn(null);break}}_.ref!==null&&(wn(_),x("Invalid attribute `ref` supplied to `React.Fragment`."),wn(null))}}var Kf={};function Gf(_,Z,ie,ge,Ie,Be){{var De=V(_);if(!De){var ke="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(ke+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var yt=eC();yt?ke+=yt:ke+=Uf();var nt;_===null?nt="null":z(_)?nt="array":_!==void 0&&_.$$typeof===n?(nt="<"+($(_.type)||"Unknown")+" />",ke=" Did you accidentally export a JSX literal instead of a component?"):nt=typeof _,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",nt,ke)}var at=Ls(_,Z,ie,Ie,Be);if(at==null)return at;if(De){var zt=Z.children;if(zt!==void 0)if(ge)if(z(zt)){for(var _n=0;_n<zt.length;_n++)qf(zt[_n],_);Object.freeze&&Object.freeze(zt)}else x("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 qf(zt,_)}if(ct.call(Z,"key")){var Wr=$(_),Ct=Object.keys(Z).filter(function(lC){return lC!=="key"}),Vs=Ct.length>0?"{key: someKey, "+Ct.join(": ..., ")+": ...}":"{key: someKey}";if(!Kf[Wr+Vs]){var cC=Ct.length>0?"{"+Ct.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Vs,Wr,cC,Wr),Kf[Wr+Vs]=!0}}return _===r?nC(at):rC(at),at}}function oC(_,Z,ie){return Gf(_,Z,ie,!0)}function iC(_,Z,ie){return Gf(_,Z,ie,!1)}var aC=iC,sC=oC;Sn.Fragment=r,Sn.jsx=aC,Sn.jsxs=sC})()),Sn}var Ws;function rp(){return Ws||(Ws=1,process.env.NODE_ENV==="production"?fo.exports=ep():fo.exports=tp()),fo.exports}var h=rp();const Bt={dashboardContainer:"_dashboardContainer_1aedh_1",sidebar:"_sidebar_1aedh_21",sidebarContent:"_sidebarContent_1aedh_41",header:"_header_1aedh_51",mainContent:"_mainContent_1aedh_75",sidebarCollapsed:"_sidebarCollapsed_1aedh_93",collapseButton:"_collapseButton_1aedh_111",menuButton:"_menuButton_1aedh_131",overlay:"_overlay_1aedh_133",headerContent:"_headerContent_1aedh_143",sidebarOpen:"_sidebarOpen_1aedh_195"},Zs=e=>e,np=(()=>{let e=Zs;return{configure(n){e=n},generate(n){return e(n)},reset(){e=Zs}}})();function gr(e,...n){const t=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(r=>t.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${t} for the full message.`}function kt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":gr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var po={exports:{}},ho={exports:{}},Me={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var qs;function op(){if(qs)return Me;qs=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function T(k){if(typeof k=="object"&&k!==null){var O=k.$$typeof;switch(O){case n:switch(k=k.type,k){case c:case l:case r:case i:case o:case d:return k;default:switch(k=k&&k.$$typeof,k){case s:case u:case g:case m:case a:return k;default:return O}}case t:return O}}}function D(k){return T(k)===l}return Me.AsyncMode=c,Me.ConcurrentMode=l,Me.ContextConsumer=s,Me.ContextProvider=a,Me.Element=n,Me.ForwardRef=u,Me.Fragment=r,Me.Lazy=g,Me.Memo=m,Me.Portal=t,Me.Profiler=i,Me.StrictMode=o,Me.Suspense=d,Me.isAsyncMode=function(k){return D(k)||T(k)===c},Me.isConcurrentMode=D,Me.isContextConsumer=function(k){return T(k)===s},Me.isContextProvider=function(k){return T(k)===a},Me.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===n},Me.isForwardRef=function(k){return T(k)===u},Me.isFragment=function(k){return T(k)===r},Me.isLazy=function(k){return T(k)===g},Me.isMemo=function(k){return T(k)===m},Me.isPortal=function(k){return T(k)===t},Me.isProfiler=function(k){return T(k)===i},Me.isStrictMode=function(k){return T(k)===o},Me.isSuspense=function(k){return T(k)===d},Me.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===l||k===i||k===o||k===d||k===f||typeof k=="object"&&k!==null&&(k.$$typeof===g||k.$$typeof===m||k.$$typeof===a||k.$$typeof===s||k.$$typeof===u||k.$$typeof===b||k.$$typeof===S||k.$$typeof===x||k.$$typeof===p)},Me.typeOf=T,Me}var Ae={};/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
44
|
+
*/var Ks;function ip(){return Ks||(Ks=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function T(P){return typeof P=="string"||typeof P=="function"||P===r||P===l||P===i||P===o||P===d||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===g||P.$$typeof===m||P.$$typeof===a||P.$$typeof===s||P.$$typeof===u||P.$$typeof===b||P.$$typeof===S||P.$$typeof===x||P.$$typeof===p)}function D(P){if(typeof P=="object"&&P!==null){var te=P.$$typeof;switch(te){case n:var _e=P.type;switch(_e){case c:case l:case r:case i:case o:case d:return _e;default:var Ce=_e&&_e.$$typeof;switch(Ce){case s:case u:case g:case m:case a:return Ce;default:return te}}case t:return te}}}var k=c,O=l,R=s,U=a,H=n,V=u,K=r,v=g,$=m,M=t,L=i,Y=o,J=d,oe=!1;function we(P){return oe||(oe=!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.")),F(P)||D(P)===c}function F(P){return D(P)===l}function q(P){return D(P)===s}function de(P){return D(P)===a}function he(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function fe(P){return D(P)===u}function G(P){return D(P)===r}function ae(P){return D(P)===g}function ue(P){return D(P)===m}function me(P){return D(P)===t}function ve(P){return D(P)===i}function pe(P){return D(P)===o}function Ye(P){return D(P)===d}Ae.AsyncMode=k,Ae.ConcurrentMode=O,Ae.ContextConsumer=R,Ae.ContextProvider=U,Ae.Element=H,Ae.ForwardRef=V,Ae.Fragment=K,Ae.Lazy=v,Ae.Memo=$,Ae.Portal=M,Ae.Profiler=L,Ae.StrictMode=Y,Ae.Suspense=J,Ae.isAsyncMode=we,Ae.isConcurrentMode=F,Ae.isContextConsumer=q,Ae.isContextProvider=de,Ae.isElement=he,Ae.isForwardRef=fe,Ae.isFragment=G,Ae.isLazy=ae,Ae.isMemo=ue,Ae.isPortal=me,Ae.isProfiler=ve,Ae.isStrictMode=pe,Ae.isSuspense=Ye,Ae.isValidElementType=T,Ae.typeOf=D})()),Ae}var Gs;function Qs(){return Gs||(Gs=1,process.env.NODE_ENV==="production"?ho.exports=op():ho.exports=ip()),ho.exports}/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
49
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
48
|
+
*/var Zi,Js;function ap(){if(Js)return Zi;Js=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Zi=o()?Object.assign:function(i,a){for(var s,c=r(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)n.call(s,d)&&(c[d]=s[d]);if(e){l=e(s);for(var f=0;f<l.length;f++)t.call(s,l[f])&&(c[l[f]]=s[l[f]])}}return c},Zi}var qi,Xs;function Ki(){if(Xs)return qi;Xs=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qi=e,qi}var Gi,ec;function tc(){return ec||(ec=1,Gi=Function.call.bind(Object.prototype.hasOwnProperty)),Gi}var Qi,rc;function sp(){if(rc)return Qi;rc=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Ki(),t={},r=tc();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](a,u,c,s,null,n)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` 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 t)){t[d.message]=!0;var m=l?l():"";e("Failed "+s+" type: "+d.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Qi=o,Qi}var Ji,nc;function cp(){if(nc)return Ji;nc=1;var e=Qs(),n=ap(),t=Ki(),r=tc(),o=sp(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Ji=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(F){var q=F&&(l&&F[l]||F[u]);if(typeof q=="function")return q}var f="<<anonymous>>",m={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:x(),arrayOf:T,element:D(),elementType:k(),instanceOf:O,node:V(),objectOf:U,oneOf:R,oneOfType:H,shape:v,exact:$};function g(F,q){return F===q?F!==0||1/F===1/q:F!==F&&q!==q}function p(F,q){this.message=F,this.data=q&&typeof q=="object"?q:{},this.stack=""}p.prototype=Error.prototype;function b(F){if(process.env.NODE_ENV!=="production")var q={},de=0;function he(G,ae,ue,me,ve,pe,Ye){if(me=me||f,pe=pe||ue,Ye!==t){if(c){var P=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 P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var te=me+":"+ue;!q[te]&&de<3&&(i("You are manually calling a React.PropTypes validation function for the `"+pe+"` prop on `"+me+"`. 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."),q[te]=!0,de++)}}return ae[ue]==null?G?ae[ue]===null?new p("The "+ve+" `"+pe+"` is marked as required "+("in `"+me+"`, but its value is `null`.")):new p("The "+ve+" `"+pe+"` is marked as required in "+("`"+me+"`, but its value is `undefined`.")):null:F(ae,ue,me,ve,pe)}var fe=he.bind(null,!1);return fe.isRequired=he.bind(null,!0),fe}function S(F){function q(de,he,fe,G,ae,ue){var me=de[he],ve=Y(me);if(ve!==F){var pe=J(me);return new p("Invalid "+G+" `"+ae+"` of type "+("`"+pe+"` supplied to `"+fe+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return b(q)}function x(){return b(a)}function T(F){function q(de,he,fe,G,ae){if(typeof F!="function")return new p("Property `"+ae+"` of component `"+fe+"` has invalid PropType notation inside arrayOf.");var ue=de[he];if(!Array.isArray(ue)){var me=Y(ue);return new p("Invalid "+G+" `"+ae+"` of type "+("`"+me+"` supplied to `"+fe+"`, expected an array."))}for(var ve=0;ve<ue.length;ve++){var pe=F(ue,ve,fe,G,ae+"["+ve+"]",t);if(pe instanceof Error)return pe}return null}return b(q)}function D(){function F(q,de,he,fe,G){var ae=q[de];if(!s(ae)){var ue=Y(ae);return new p("Invalid "+fe+" `"+G+"` of type "+("`"+ue+"` supplied to `"+he+"`, expected a single ReactElement."))}return null}return b(F)}function k(){function F(q,de,he,fe,G){var ae=q[de];if(!e.isValidElementType(ae)){var ue=Y(ae);return new p("Invalid "+fe+" `"+G+"` of type "+("`"+ue+"` supplied to `"+he+"`, expected a single ReactElement type."))}return null}return b(F)}function O(F){function q(de,he,fe,G,ae){if(!(de[he]instanceof F)){var ue=F.name||f,me=we(de[he]);return new p("Invalid "+G+" `"+ae+"` of type "+("`"+me+"` supplied to `"+fe+"`, expected ")+("instance of `"+ue+"`."))}return null}return b(q)}function R(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function q(de,he,fe,G,ae){for(var ue=de[he],me=0;me<F.length;me++)if(g(ue,F[me]))return null;var ve=JSON.stringify(F,function(Ye,P){var te=J(P);return te==="symbol"?String(P):P});return new p("Invalid "+G+" `"+ae+"` of value `"+String(ue)+"` "+("supplied to `"+fe+"`, expected one of "+ve+"."))}return b(q)}function U(F){function q(de,he,fe,G,ae){if(typeof F!="function")return new p("Property `"+ae+"` of component `"+fe+"` has invalid PropType notation inside objectOf.");var ue=de[he],me=Y(ue);if(me!=="object")return new p("Invalid "+G+" `"+ae+"` of type "+("`"+me+"` supplied to `"+fe+"`, expected an object."));for(var ve in ue)if(r(ue,ve)){var pe=F(ue,ve,fe,G,ae+"."+ve,t);if(pe instanceof Error)return pe}return null}return b(q)}function H(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var q=0;q<F.length;q++){var de=F[q];if(typeof de!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+oe(de)+" at index "+q+"."),a}function he(fe,G,ae,ue,me){for(var ve=[],pe=0;pe<F.length;pe++){var Ye=F[pe],P=Ye(fe,G,ae,ue,me,t);if(P==null)return null;P.data&&r(P.data,"expectedType")&&ve.push(P.data.expectedType)}var te=ve.length>0?", expected one of type ["+ve.join(", ")+"]":"";return new p("Invalid "+ue+" `"+me+"` supplied to "+("`"+ae+"`"+te+"."))}return b(he)}function V(){function F(q,de,he,fe,G){return M(q[de])?null:new p("Invalid "+fe+" `"+G+"` supplied to "+("`"+he+"`, expected a ReactNode."))}return b(F)}function K(F,q,de,he,fe){return new p((F||"React class")+": "+q+" type `"+de+"."+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+fe+"`.")}function v(F){function q(de,he,fe,G,ae){var ue=de[he],me=Y(ue);if(me!=="object")return new p("Invalid "+G+" `"+ae+"` of type `"+me+"` "+("supplied to `"+fe+"`, expected `object`."));for(var ve in F){var pe=F[ve];if(typeof pe!="function")return K(fe,G,ae,ve,J(pe));var Ye=pe(ue,ve,fe,G,ae+"."+ve,t);if(Ye)return Ye}return null}return b(q)}function $(F){function q(de,he,fe,G,ae){var ue=de[he],me=Y(ue);if(me!=="object")return new p("Invalid "+G+" `"+ae+"` of type `"+me+"` "+("supplied to `"+fe+"`, expected `object`."));var ve=n({},de[he],F);for(var pe in ve){var Ye=F[pe];if(r(F,pe)&&typeof Ye!="function")return K(fe,G,ae,pe,J(Ye));if(!Ye)return new p("Invalid "+G+" `"+ae+"` key `"+pe+"` supplied to `"+fe+"`.\nBad object: "+JSON.stringify(de[he],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var P=Ye(ue,pe,fe,G,ae+"."+pe,t);if(P)return P}return null}return b(q)}function M(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(M);if(F===null||s(F))return!0;var q=d(F);if(q){var de=q.call(F),he;if(q!==F.entries){for(;!(he=de.next()).done;)if(!M(he.value))return!1}else for(;!(he=de.next()).done;){var fe=he.value;if(fe&&!M(fe[1]))return!1}}else return!1;return!0;default:return!1}}function L(F,q){return F==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function Y(F){var q=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":L(q,F)?"symbol":q}function J(F){if(typeof F>"u"||F===null)return""+F;var q=Y(F);if(q==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return q}function oe(F){var q=J(F);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function we(F){return!F.constructor||!F.constructor.name?f:F.constructor.name}return m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},Ji}var Xi,oc;function lp(){if(oc)return Xi;oc=1;var e=Ki();function n(){}function t(){}return t.resetWarningCache=n,Xi=function(){function r(a,s,c,l,u,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 i={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:t,resetWarningCache:n};return i.PropTypes=i,i},Xi}var ic;function up(){if(ic)return po.exports;if(ic=1,process.env.NODE_ENV!=="production"){var e=Qs(),n=!0;po.exports=cp()(e.isElement,n)}else po.exports=lp()();return po.exports}var dp=up();const I=Xf(dp);function ac(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=ac(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ve(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=ac(e))&&(r&&(r+=" "),r+=n);return r}function vr(e,n,t=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let c=0;c<i.length;c+=1){const l=i[c];l&&(a+=(s===!0?"":" ")+n(l),s=!1,t&&t[l]&&(a+=" "+t[l]))}r[o]=a}return r}var mo={exports:{}},je={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* react-is.production.js
|
|
52
52
|
*
|
|
@@ -54,7 +54,7 @@ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var F=te(de,B,he,G,se+".
|
|
|
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
|
|
57
|
+
*/var sc;function fp(){if(sc)return je;sc=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case t:case o:case r:case c:case l:case f:return p;default:switch(p=p&&p.$$typeof,p){case a:case s:case d:case u:return p;case i:return p;default:return b}}case n:return b}}}return je.ContextConsumer=i,je.ContextProvider=a,je.Element=e,je.ForwardRef=s,je.Fragment=t,je.Lazy=d,je.Memo=u,je.Portal=n,je.Profiler=o,je.StrictMode=r,je.Suspense=c,je.SuspenseList=l,je.isContextConsumer=function(p){return g(p)===i},je.isContextProvider=function(p){return g(p)===a},je.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},je.isForwardRef=function(p){return g(p)===s},je.isFragment=function(p){return g(p)===t},je.isLazy=function(p){return g(p)===d},je.isMemo=function(p){return g(p)===u},je.isPortal=function(p){return g(p)===n},je.isProfiler=function(p){return g(p)===o},je.isStrictMode=function(p){return g(p)===r},je.isSuspense=function(p){return g(p)===c},je.isSuspenseList=function(p){return g(p)===l},je.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===t||p===o||p===r||p===c||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===u||p.$$typeof===a||p.$$typeof===i||p.$$typeof===s||p.$$typeof===m||p.getModuleId!==void 0)},je.typeOf=g,je}var Le={};/**
|
|
58
58
|
* @license React
|
|
59
59
|
* react-is.development.js
|
|
60
60
|
*
|
|
@@ -62,22 +62,22 @@ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var F=te(de,B,he,G,se+".
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var
|
|
66
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
65
|
+
*/var cc;function pp(){return cc||(cc=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case n:switch(p=p.type,p){case r:case i:case o:case l:case u:case m:return p;default:switch(p=p&&p.$$typeof,p){case s:case c:case f:case d:return p;case a:return p;default:return b}}case t:return b}}}var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");Le.ContextConsumer=a,Le.ContextProvider=s,Le.Element=n,Le.ForwardRef=c,Le.Fragment=r,Le.Lazy=f,Le.Memo=d,Le.Portal=t,Le.Profiler=i,Le.StrictMode=o,Le.Suspense=l,Le.SuspenseList=u,Le.isContextConsumer=function(p){return e(p)===a},Le.isContextProvider=function(p){return e(p)===s},Le.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===n},Le.isForwardRef=function(p){return e(p)===c},Le.isFragment=function(p){return e(p)===r},Le.isLazy=function(p){return e(p)===f},Le.isMemo=function(p){return e(p)===d},Le.isPortal=function(p){return e(p)===t},Le.isProfiler=function(p){return e(p)===i},Le.isStrictMode=function(p){return e(p)===o},Le.isSuspense=function(p){return e(p)===l},Le.isSuspenseList=function(p){return e(p)===u},Le.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===i||p===o||p===l||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===s||p.$$typeof===a||p.$$typeof===c||p.$$typeof===g||p.getModuleId!==void 0)},Le.typeOf=e})()),Le}var lc;function hp(){return lc||(lc=1,process.env.NODE_ENV==="production"?mo.exports=fp():mo.exports=pp()),mo.exports}var go=hp();function cr(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function uc(e){if(W.isValidElement(e)||go.isValidElementType(e)||!cr(e))return e;const n={};return Object.keys(e).forEach(t=>{n[t]=uc(e[t])}),n}function Dt(e,n,t={clone:!0}){const r=t.clone?{...e}:e;return cr(e)&&cr(n)&&Object.keys(n).forEach(o=>{W.isValidElement(n[o])||go.isValidElementType(n[o])?r[o]=n[o]:cr(n[o])&&Object.prototype.hasOwnProperty.call(e,o)&&cr(e[o])?r[o]=Dt(e[o],n[o],t):t.clone?r[o]=cr(n[o])?uc(n[o]):n[o]:r[o]=n[o]}),r}function Cn(e,n){return n?Dt(e,n,{clone:!1}):e}const yr=process.env.NODE_ENV!=="production"?I.oneOfType([I.number,I.string,I.object,I.array]):{};function dc(e,n){if(!e.containerQueries)return n;const t=Object.keys(n).filter(r=>r.startsWith("@container")).sort((r,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(r.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return t.length?t.reduce((r,o)=>{const i=n[o];return delete r[o],r[o]=i,r},{...n}):n}function mp(e,n){return n==="@"||n.startsWith("@")&&(e.some(t=>n.startsWith(`@${t}`))||!!n.match(/^@\d/))}function gp(e,n){const t=n.match(/^@([^/]+)?\/?(.+)?$/);if(!t){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${n})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
66
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:gr(18,`(${n})`));return null}const[,r,o]=t,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function vp(e){const n=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function t(i,a){i.up=(...s)=>n(e.breakpoints.up(...s),a),i.down=(...s)=>n(e.breakpoints.down(...s),a),i.between=(...s)=>n(e.breakpoints.between(...s),a),i.only=(...s)=>n(e.breakpoints.only(...s),a),i.not=(...s)=>{const c=n(e.breakpoints.not(...s),a);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=i=>(t(r,i),r);return t(o),{...e,containerQueries:o}}const vo={xs:0,sm:600,md:900,lg:1200,xl:1536},fc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${vo[e]}px)`},yp={containerQueries:e=>({up:n=>{let t=typeof n=="number"?n:vo[n]||n;return typeof t=="number"&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function lr(e,n,t){const r=e.theme||{};if(Array.isArray(n)){const i=r.breakpoints||fc;return n.reduce((a,s,c)=>(a[i.up(i.keys[c])]=t(n[c]),a),{})}if(typeof n=="object"){const i=r.breakpoints||fc;return Object.keys(n).reduce((a,s)=>{if(mp(i.keys,s)){const c=gp(r.containerQueries?r:yp,s);c&&(a[c]=t(n[s],s))}else if(Object.keys(i.values||vo).includes(s)){const c=i.up(s);a[c]=t(n[s],s)}else{const c=s;a[c]=n[c]}return a},{})}return t(n)}function bp(e={}){return e.keys?.reduce((t,r)=>{const o=e.up(r);return t[o]={},t},{})||{}}function pc(e,n){return e.reduce((t,r)=>{const o=t[r];return(!o||Object.keys(o).length===0)&&delete t[r],t},n)}function yo(e,n,t=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&t){const r=`vars.${n}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return n.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function bo(e,n,t,r=t){let o;return typeof e=="function"?o=e(t):Array.isArray(e)?o=e[t]||r:o=yo(e,t)||r,n&&(o=n(o,r,e)),o}function Je(e){const{prop:n,cssProperty:t=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[n]==null)return null;const s=a[n],c=a.theme,l=yo(c,r)||{};return lr(a,s,d=>{let f=bo(l,o,d);return d===f&&typeof d=="string"&&(f=bo(l,o,`${n}${d==="default"?"":kt(d)}`,d)),t===!1?f:{[t]:f}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[n]:yr}:{},i.filterProps=[n],i}function wp(e){const n={};return t=>(n[t]===void 0&&(n[t]=e(t)),n[t])}const _p={m:"margin",p:"padding"},xp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},hc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Sp=wp(e=>{if(e.length>2)if(hc[e])e=hc[e];else return[e];const[n,t]=e.split(""),r=_p[n],o=xp[t]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),wo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_o=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Cp=[...wo,..._o];function kn(e,n,t,r){const o=yo(e,n,!0)??t;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>o.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${a} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
67
67
|
`)):console.error([`MUI: The \`theme.${n}\` 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.${n}\` as a number.`].join(`
|
|
68
|
-
`)));const s=o[
|
|
69
|
-
`)),()=>{})}function ei(e){return kn(e,"spacing",8,"spacing")}function Dn(e,n){return typeof n=="string"||n==null?n:e(n)}function _p(e,n){return t=>e.reduce((r,o)=>(r[o]=Dn(n,t),r),{})}function xp(e,n,t,r){if(!n.includes(t))return null;const o=bp(t),a=_p(o,r),i=e[t];return sr(e,i,a)}function fc(e,n){const t=ei(e.theme);return Object.keys(e).map(r=>xp(e,n,r,t)).reduce(Cn,{})}function qe(e){return fc(e,wo)}qe.propTypes=process.env.NODE_ENV!=="production"?wo.reduce((e,n)=>(e[n]=vr,e),{}):{},qe.filterProps=wo;function Ke(e){return fc(e,_o)}Ke.propTypes=process.env.NODE_ENV!=="production"?_o.reduce((e,n)=>(e[n]=vr,e),{}):{},Ke.filterProps=_o,process.env.NODE_ENV!=="production"&&wp.reduce((e,n)=>(e[n]=vr,e),{});function xo(...e){const n=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),t=r=>Object.keys(r).reduce((o,a)=>n[a]?Cn(o,n[a](r)):o,{});return t.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},t.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),t}function At(e){return typeof e!="number"?e:`${e}px solid`}function Pt(e,n){return Qe({prop:e,themeKey:"borders",transform:n})}const Sp=Pt("border",At),Cp=Pt("borderTop",At),kp=Pt("borderRight",At),Dp=Pt("borderBottom",At),Ep=Pt("borderLeft",At),Tp=Pt("borderColor"),Op=Pt("borderTopColor"),Mp=Pt("borderRightColor"),Ap=Pt("borderBottomColor"),Pp=Pt("borderLeftColor"),Ip=Pt("outline",At),Np=Pt("outlineColor"),So=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=kn(e.theme,"shape.borderRadius",4,"borderRadius"),t=r=>({borderRadius:Dn(n,r)});return sr(e,e.borderRadius,t)}return null};So.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:vr}:{},So.filterProps=["borderRadius"],xo(Sp,Cp,kp,Dp,Ep,Tp,Op,Mp,Ap,Pp,So,Ip,Np);const Co=e=>{if(e.gap!==void 0&&e.gap!==null){const n=kn(e.theme,"spacing",8,"gap"),t=r=>({gap:Dn(n,r)});return sr(e,e.gap,t)}return null};Co.propTypes=process.env.NODE_ENV!=="production"?{gap:vr}:{},Co.filterProps=["gap"];const ko=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=kn(e.theme,"spacing",8,"columnGap"),t=r=>({columnGap:Dn(n,r)});return sr(e,e.columnGap,t)}return null};ko.propTypes=process.env.NODE_ENV!=="production"?{columnGap:vr}:{},ko.filterProps=["columnGap"];const Do=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=kn(e.theme,"spacing",8,"rowGap"),t=r=>({rowGap:Dn(n,r)});return sr(e,e.rowGap,t)}return null};Do.propTypes=process.env.NODE_ENV!=="production"?{rowGap:vr}:{},Do.filterProps=["rowGap"];const Rp=Qe({prop:"gridColumn"}),$p=Qe({prop:"gridRow"}),jp=Qe({prop:"gridAutoFlow"}),Lp=Qe({prop:"gridAutoColumns"}),zp=Qe({prop:"gridAutoRows"}),Bp=Qe({prop:"gridTemplateColumns"}),Vp=Qe({prop:"gridTemplateRows"}),Fp=Qe({prop:"gridTemplateAreas"}),Yp=Qe({prop:"gridArea"});xo(Co,ko,Do,Rp,$p,jp,Lp,zp,Bp,Vp,Fp,Yp);function Zr(e,n){return n==="grey"?n:e}const Hp=Qe({prop:"color",themeKey:"palette",transform:Zr}),Up=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zr}),Wp=Qe({prop:"backgroundColor",themeKey:"palette",transform:Zr});xo(Hp,Up,Wp);function Dt(e){return e<=1&&e!==0?`${e*100}%`:e}const Zp=Qe({prop:"width",transform:Dt}),ti=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=t=>{const r=e.theme?.breakpoints?.values?.[t]||vo[t];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Dt(t)}};return sr(e,e.maxWidth,n)}return null};ti.filterProps=["maxWidth"];const qp=Qe({prop:"minWidth",transform:Dt}),Kp=Qe({prop:"height",transform:Dt}),Gp=Qe({prop:"maxHeight",transform:Dt}),Qp=Qe({prop:"minHeight",transform:Dt});Qe({prop:"size",cssProperty:"width",transform:Dt}),Qe({prop:"size",cssProperty:"height",transform:Dt});const Jp=Qe({prop:"boxSizing"});xo(Zp,ti,qp,Kp,Gp,Qp,Jp);const Eo={border:{themeKey:"borders",transform:At},borderTop:{themeKey:"borders",transform:At},borderRight:{themeKey:"borders",transform:At},borderBottom:{themeKey:"borders",transform:At},borderLeft:{themeKey:"borders",transform:At},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:At},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:So},color:{themeKey:"palette",transform:Zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zr},backgroundColor:{themeKey:"palette",transform:Zr},p:{style:Ke},pt:{style:Ke},pr:{style:Ke},pb:{style:Ke},pl:{style:Ke},px:{style:Ke},py:{style:Ke},padding:{style:Ke},paddingTop:{style:Ke},paddingRight:{style:Ke},paddingBottom:{style:Ke},paddingLeft:{style:Ke},paddingX:{style:Ke},paddingY:{style:Ke},paddingInline:{style:Ke},paddingInlineStart:{style:Ke},paddingInlineEnd:{style:Ke},paddingBlock:{style:Ke},paddingBlockStart:{style:Ke},paddingBlockEnd:{style:Ke},m:{style:qe},mt:{style:qe},mr:{style:qe},mb:{style:qe},ml:{style:qe},mx:{style:qe},my:{style:qe},margin:{style:qe},marginTop:{style:qe},marginRight:{style:qe},marginBottom:{style:qe},marginLeft:{style:qe},marginX:{style:qe},marginY:{style:qe},marginInline:{style:qe},marginInlineStart:{style:qe},marginInlineEnd:{style:qe},marginBlock:{style:qe},marginBlockStart:{style:qe},marginBlockEnd:{style:qe},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:Co},rowGap:{style:Do},columnGap:{style:ko},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Dt},maxWidth:{style:ti},minWidth:{transform:Dt},height:{transform:Dt},maxHeight:{transform:Dt},minHeight:{transform:Dt},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 Xp(...e){const n=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),t=new Set(n);return e.every(r=>t.size===Object.keys(r).length)}function eh(e,n){return typeof e=="function"?e(n):e}function th(){function e(t,r,o,a){const i={[t]:r,theme:o},s=a[t];if(!s)return{[t]:r};const{cssProperty:c=t,themeKey:l,transform:u,style:d}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[t]:r};const f=yo(o,l)||{};return d?d(i):sr(i,r,g=>{let p=bo(f,u,g);return g===p&&typeof g=="string"&&(p=bo(f,u,`${t}${g==="default"?"":Ct(g)}`,g)),c===!1?p:{[c]:p}})}function n(t){const{sx:r,theme:o={},nested:a}=t||{};if(!r)return null;const i=o.unstable_sxConfig??Eo;function s(c){let l=c;if(typeof c=="function")l=c(o);else if(typeof c!="object")return c;if(!l)return null;const u=mp(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(l).forEach(m=>{const g=eh(l[m],o);if(g!=null)if(typeof g=="object")if(i[m])f=Cn(f,e(m,g,o,i));else{const p=sr({theme:o},g,b=>({[m]:b}));Xp(p,g)?f[m]=n({sx:g,theme:o,nested:!0}):f=Cn(f,p)}else f=Cn(f,e(m,g,o,i))}),!a&&o.modularCssLayers?{"@layer sx":cc(o,uc(d,f))}:cc(o,uc(d,f))}return Array.isArray(r)?r.map(s):s(r)}return n}const qr=th();qr.filterProps=["sx"];function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ri.apply(null,arguments)}function rh(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function nh(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var oh=(function(){function e(t){var r=this;this._insertTag=function(o){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,a),r.tags.push(o)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(r){r.forEach(this._insertTag)},n.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(nh(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=rh(o);try{a.insertRule(r,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},n.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),ut="-ms-",To="-moz-",Ee="-webkit-",pc="comm",ni="rule",oi="decl",ah="@import",hc="@keyframes",ih="@layer",sh=Math.abs,Oo=String.fromCharCode,ch=Object.assign;function lh(e,n){return st(e,0)^45?(((n<<2^st(e,0))<<2^st(e,1))<<2^st(e,2))<<2^st(e,3):0}function mc(e){return e.trim()}function uh(e,n){return(e=n.exec(e))?e[0]:e}function Te(e,n,t){return e.replace(n,t)}function ai(e,n){return e.indexOf(n)}function st(e,n){return e.charCodeAt(n)|0}function En(e,n,t){return e.slice(n,t)}function Wt(e){return e.length}function ii(e){return e.length}function Mo(e,n){return n.push(e),e}function dh(e,n){return e.map(n).join("")}var Ao=1,Kr=1,gc=0,yt=0,nt=0,Gr="";function Po(e,n,t,r,o,a,i){return{value:e,root:n,parent:t,type:r,props:o,children:a,line:Ao,column:Kr,length:i,return:""}}function Tn(e,n){return ch(Po("",null,null,"",null,null,0),e,{length:-e.length},n)}function fh(){return nt}function ph(){return nt=yt>0?st(Gr,--yt):0,Kr--,nt===10&&(Kr=1,Ao--),nt}function Et(){return nt=yt<gc?st(Gr,yt++):0,Kr++,nt===10&&(Kr=1,Ao++),nt}function Zt(){return st(Gr,yt)}function Io(){return yt}function On(e,n){return En(Gr,e,n)}function Mn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vc(e){return Ao=Kr=1,gc=Wt(Gr=e),yt=0,[]}function yc(e){return Gr="",e}function No(e){return mc(On(yt-1,si(e===91?e+2:e===40?e+1:e)))}function hh(e){for(;(nt=Zt())&&nt<33;)Et();return Mn(e)>2||Mn(nt)>3?"":" "}function mh(e,n){for(;--n&&Et()&&!(nt<48||nt>102||nt>57&&nt<65||nt>70&&nt<97););return On(e,Io()+(n<6&&Zt()==32&&Et()==32))}function si(e){for(;Et();)switch(nt){case e:return yt;case 34:case 39:e!==34&&e!==39&&si(nt);break;case 40:e===41&&si(e);break;case 92:Et();break}return yt}function gh(e,n){for(;Et()&&e+nt!==57;)if(e+nt===84&&Zt()===47)break;return"/*"+On(n,yt-1)+"*"+Oo(e===47?e:Et())}function vh(e){for(;!Mn(Zt());)Et();return On(e,yt)}function yh(e){return yc(Ro("",null,null,null,[""],e=vc(e),0,[0],e))}function Ro(e,n,t,r,o,a,i,s,c){for(var l=0,u=0,d=i,f=0,m=0,g=0,p=1,b=1,x=1,S=0,T="",D=o,k=a,O=r,I=T;b;)switch(g=S,S=Et()){case 40:if(g!=108&&st(I,d-1)==58){ai(I+=Te(No(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:I+=No(S);break;case 9:case 10:case 13:case 32:I+=hh(g);break;case 92:I+=mh(Io()-1,7);continue;case 47:switch(Zt()){case 42:case 47:Mo(bh(gh(Et(),Io()),n,t),c);break;default:I+="/"}break;case 123*p:s[l++]=Wt(I)*x;case 125*p:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:x==-1&&(I=Te(I,/\f/g,"")),m>0&&Wt(I)-d&&Mo(m>32?wc(I+";",r,t,d-1):wc(Te(I," ","")+";",r,t,d-2),c);break;case 59:I+=";";default:if(Mo(O=bc(I,n,t,l,u,o,s,T,D=[],k=[],d),a),S===123)if(u===0)Ro(I,n,O,O,D,a,d,s,k);else switch(f===99&&st(I,3)===110?100:f){case 100:case 108:case 109:case 115:Ro(e,O,O,r&&Mo(bc(e,O,O,0,0,o,s,T,o,D=[],d),k),o,k,d,s,r?D:k);break;default:Ro(I,O,O,O,[""],k,0,s,k)}}l=u=m=0,p=x=1,T=I="",d=i;break;case 58:d=1+Wt(I),m=g;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&ph()==125)continue}switch(I+=Oo(S),S*p){case 38:x=u>0?1:(I+="\f",-1);break;case 44:s[l++]=(Wt(I)-1)*x,x=1;break;case 64:Zt()===45&&(I+=No(Et())),f=Zt(),u=d=Wt(T=I+=vh(Io())),S++;break;case 45:g===45&&Wt(I)==2&&(p=0)}}return a}function bc(e,n,t,r,o,a,i,s,c,l,u){for(var d=o-1,f=o===0?a:[""],m=ii(f),g=0,p=0,b=0;g<r;++g)for(var x=0,S=En(e,d+1,d=sh(p=i[g])),T=e;x<m;++x)(T=mc(p>0?f[x]+" "+S:Te(S,/&\f/g,f[x])))&&(c[b++]=T);return Po(e,n,t,o===0?ni:s,c,l,u)}function bh(e,n,t){return Po(e,n,t,pc,Oo(fh()),En(e,2,-2),0)}function wc(e,n,t,r){return Po(e,n,t,oi,En(e,0,r),En(e,r+1,-1),r)}function Qr(e,n){for(var t="",r=ii(e),o=0;o<r;o++)t+=n(e[o],o,e,n)||"";return t}function wh(e,n,t,r){switch(e.type){case ih:if(e.children.length)break;case ah:case oi:return e.return=e.return||e.value;case pc:return"";case hc:return e.return=e.value+"{"+Qr(e.children,r)+"}";case ni:e.value=e.props.join(",")}return Wt(t=Qr(e.children,r))?e.return=e.value+"{"+t+"}":""}function _h(e){var n=ii(e);return function(t,r,o,a){for(var i="",s=0;s<n;s++)i+=e[s](t,r,o,a)||"";return i}}function xh(e){return function(n){n.root||(n=n.return)&&e(n)}}function _c(e){var n=Object.create(null);return function(t){return n[t]===void 0&&(n[t]=e(t)),n[t]}}var Sh=function(n,t,r){for(var o=0,a=0;o=a,a=Zt(),o===38&&a===12&&(t[r]=1),!Mn(a);)Et();return On(n,yt)},Ch=function(n,t){var r=-1,o=44;do switch(Mn(o)){case 0:o===38&&Zt()===12&&(t[r]=1),n[r]+=Sh(yt-1,t,r);break;case 2:n[r]+=No(o);break;case 4:if(o===44){n[++r]=Zt()===58?"&\f":"",t[r]=n[r].length;break}default:n[r]+=Oo(o)}while(o=Et());return n},kh=function(n,t){return yc(Ch(vc(n),t))},xc=new WeakMap,Dh=function(n){if(!(n.type!=="rule"||!n.parent||n.length<1)){for(var t=n.value,r=n.parent,o=n.column===r.column&&n.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(n.props.length===1&&t.charCodeAt(0)!==58&&!xc.get(r))&&!o){xc.set(n,!0);for(var a=[],i=kh(t,a),s=r.props,c=0,l=0;c<i.length;c++)for(var u=0;u<s.length;u++,l++)n.props[l]=a[c]?i[c].replace(/&\f/g,s[u]):s[u]+" "+i[c]}}},Eh=function(n){if(n.type==="decl"){var t=n.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(n.return="",n.value="")}};function Sc(e,n){switch(lh(e,n)){case 5103:return Ee+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ee+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ee+e+To+e+ut+e+e;case 6828:case 4268:return Ee+e+ut+e+e;case 6165:return Ee+e+ut+"flex-"+e+e;case 5187:return Ee+e+Te(e,/(\w+).+(:[^]+)/,Ee+"box-$1$2"+ut+"flex-$1$2")+e;case 5443:return Ee+e+ut+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Ee+e+ut+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Ee+e+ut+Te(e,"shrink","negative")+e;case 5292:return Ee+e+ut+Te(e,"basis","preferred-size")+e;case 6060:return Ee+"box-"+Te(e,"-grow","")+Ee+e+ut+Te(e,"grow","positive")+e;case 4554:return Ee+Te(e,/([^-])(transform)/g,"$1"+Ee+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Ee+"$1"),/(image-set)/,Ee+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Ee+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Ee+"box-pack:$3"+ut+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ee+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Ee+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Wt(e)-1-n>6)switch(st(e,n+1)){case 109:if(st(e,n+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ee+"$2-$3$1"+To+(st(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~ai(e,"stretch")?Sc(Te(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(st(e,n+1)!==115)break;case 6444:switch(st(e,Wt(e)-3-(~ai(e,"!important")&&10))){case 107:return Te(e,":",":"+Ee)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ee+(st(e,14)===45?"inline-":"")+"box$3$1"+Ee+"$2$3$1"+ut+"$2box$3")+e}break;case 5936:switch(st(e,n+11)){case 114:return Ee+e+ut+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ee+e+ut+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ee+e+ut+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ee+e+ut+e+e}return e}var Th=function(n,t,r,o){if(n.length>-1&&!n.return)switch(n.type){case oi:n.return=Sc(n.value,n.length);break;case hc:return Qr([Tn(n,{value:Te(n.value,"@","@"+Ee)})],o);case ni:if(n.length)return dh(n.props,function(a){switch(uh(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Qr([Tn(n,{props:[Te(a,/:(read-\w+)/,":"+To+"$1")]})],o);case"::placeholder":return Qr([Tn(n,{props:[Te(a,/:(plac\w+)/,":"+Ee+"input-$1")]}),Tn(n,{props:[Te(a,/:(plac\w+)/,":"+To+"$1")]}),Tn(n,{props:[Te(a,/:(plac\w+)/,ut+"input-$1")]})],o)}return""})}},Oh=[Th],Mh=function(n){var t=n.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var b=p.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=n.stylisPlugins||Oh,a={},i,s=[];i=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(p){for(var b=p.getAttribute("data-emotion").split(" "),x=1;x<b.length;x++)a[b[x]]=!0;s.push(p)});var c,l=[Dh,Eh];{var u,d=[wh,xh(function(p){u.insert(p)})],f=_h(l.concat(o,d)),m=function(b){return Qr(yh(b),f)};c=function(b,x,S,T){u=S,m(b?b+"{"+x.styles+"}":x.styles),T&&(g.inserted[x.name]=!0)}}var g={key:t,sheet:new oh({key:t,container:i,nonce:n.nonce,speedy:n.speedy,prepend:n.prepend,insertionPoint:n.insertionPoint}),nonce:n.nonce,inserted:a,registered:{},insert:c};return g.sheet.hydrate(s),g},Ah=!0;function Ph(e,n,t){var r="";return t.split(" ").forEach(function(o){e[o]!==void 0?n.push(e[o]+";"):o&&(r+=o+" ")}),r}var Cc=function(n,t,r){var o=n.key+"-"+t.name;(r===!1||Ah===!1)&&n.registered[o]===void 0&&(n.registered[o]=t.styles)},Ih=function(n,t,r){Cc(n,t,r);var o=n.key+"-"+t.name;if(n.inserted[t.name]===void 0){var a=t;do n.insert(t===a?"."+o:"",a,n.sheet,!0),a=a.next;while(a!==void 0)}};function Nh(e){for(var n=0,t,r=0,o=e.length;o>=4;++r,o-=4)t=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(t&65535)*1540483477+((t>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(o){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var Rh={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},$h=/[A-Z]|^ms/g,jh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kc=function(n){return n.charCodeAt(1)===45},Dc=function(n){return n!=null&&typeof n!="boolean"},ci=_c(function(e){return kc(e)?e:e.replace($h,"-$&").toLowerCase()}),Ec=function(n,t){switch(n){case"animation":case"animationName":if(typeof t=="string")return t.replace(jh,function(r,o,a){return qt={name:o,styles:a,next:qt},o})}return Rh[n]!==1&&!kc(n)&&typeof t=="number"&&t!==0?t+"px":t};function An(e,n,t){if(t==null)return"";var r=t;if(r.__emotion_styles!==void 0)return r;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return qt={name:o.name,styles:o.styles,next:qt},o.name;var a=t;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)qt={name:i.name,styles:i.styles,next:qt},i=i.next;var s=a.styles+";";return s}return Lh(e,n,t)}case"function":{if(e!==void 0){var c=qt,l=t(e);return qt=c,An(e,n,l)}break}}var u=t;if(n==null)return u;var d=n[u];return d!==void 0?d:u}function Lh(e,n,t){var r="";if(Array.isArray(t))for(var o=0;o<t.length;o++)r+=An(e,n,t[o])+";";else for(var a in t){var i=t[a];if(typeof i!="object"){var s=i;n!=null&&n[s]!==void 0?r+=a+"{"+n[s]+"}":Dc(s)&&(r+=ci(a)+":"+Ec(a,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(n==null||n[i[0]]===void 0))for(var c=0;c<i.length;c++)Dc(i[c])&&(r+=ci(a)+":"+Ec(a,i[c])+";");else{var l=An(e,n,i);switch(a){case"animation":case"animationName":{r+=ci(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}return r}var Tc=/label:\s*([^\s;{]+)\s*(;|$)/g,qt;function Oc(e,n,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";qt=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,o+=An(t,n,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=An(t,n,e[s]),r){var c=a;o+=c[s]}Tc.lastIndex=0;for(var l="",u;(u=Tc.exec(o))!==null;)l+="-"+u[1];var d=Nh(o)+l;return{name:d,styles:o,next:qt}}var zh=function(n){return n()},Bh=Z.useInsertionEffect?Z.useInsertionEffect:!1,Vh=Bh||zh,Mc=Z.createContext(typeof HTMLElement<"u"?Mh({key:"css"}):null);Mc.Provider;var Fh=function(n){return w.forwardRef(function(t,r){var o=w.useContext(Mc);return n(t,o,r)})},Ac=Z.createContext({}),Yh=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Hh=_c(function(e){return Yh.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Uh=Hh,Wh=function(n){return n!=="theme"},Pc=function(n){return typeof n=="string"&&n.charCodeAt(0)>96?Uh:Wh},Ic=function(n,t,r){var o;if(t){var a=t.shouldForwardProp;o=n.__emotion_forwardProp&&a?function(i){return n.__emotion_forwardProp(i)&&a(i)}:a}return typeof o!="function"&&r&&(o=n.__emotion_forwardProp),o},Zh=function(n){var t=n.cache,r=n.serialized,o=n.isStringTag;return Cc(t,r,o),Vh(function(){return Ih(t,r,o)}),null},qh=function e(n,t){var r=n.__emotion_real===n,o=r&&n.__emotion_base||n,a,i;t!==void 0&&(a=t.label,i=t.target);var s=Ic(n,t,r),c=s||Pc(o),l=!c("as");return function(){var u=arguments,d=r&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(a!==void 0&&d.push("label:"+a+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var m=u.length,g=1;g<m;g++)d.push(u[g],f[g])}var p=Fh(function(b,x,S){var T=l&&b.as||o,D="",k=[],O=b;if(b.theme==null){O={};for(var I in b)O[I]=b[I];O.theme=Z.useContext(Ac)}typeof b.className=="string"?D=Ph(x.registered,k,b.className):b.className!=null&&(D=b.className+" ");var W=Oc(d.concat(k),x.registered,O);D+=x.key+"-"+W.name,i!==void 0&&(D+=" "+i);var U=l&&s===void 0?Pc(T):c,$={};for(var Q in b)l&&Q==="as"||U(Q)&&($[Q]=b[Q]);return $.className=D,S&&($.ref=S),Z.createElement(Z.Fragment,null,Z.createElement(Zh,{cache:x,serialized:W,isStringTag:typeof T=="string"}),Z.createElement(T,$))});return p.displayName=a!==void 0?a:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=n.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=d,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return"."+i}}),p.withComponent=function(b,x){var S=e(b,ri({},t,x,{shouldForwardProp:Ic(p,x,!0)}));return S.apply(void 0,d)},p}},Kh=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],li=qh.bind(null);Kh.forEach(function(e){li[e]=li(e)});/**
|
|
68
|
+
`)));const s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${n}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
69
|
+
`)),()=>{})}function ea(e){return kn(e,"spacing",8,"spacing")}function Dn(e,n){return typeof n=="string"||n==null?n:e(n)}function kp(e,n){return t=>e.reduce((r,o)=>(r[o]=Dn(n,t),r),{})}function Dp(e,n,t,r){if(!n.includes(t))return null;const o=Sp(t),i=kp(o,r),a=e[t];return lr(e,a,i)}function mc(e,n){const t=ea(e.theme);return Object.keys(e).map(r=>Dp(e,n,r,t)).reduce(Cn,{})}function Ke(e){return mc(e,wo)}Ke.propTypes=process.env.NODE_ENV!=="production"?wo.reduce((e,n)=>(e[n]=yr,e),{}):{},Ke.filterProps=wo;function Ge(e){return mc(e,_o)}Ge.propTypes=process.env.NODE_ENV!=="production"?_o.reduce((e,n)=>(e[n]=yr,e),{}):{},Ge.filterProps=_o,process.env.NODE_ENV!=="production"&&Cp.reduce((e,n)=>(e[n]=yr,e),{});function xo(...e){const n=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),t=r=>Object.keys(r).reduce((o,i)=>n[i]?Cn(o,n[i](r)):o,{});return t.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},t.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),t}function It(e){return typeof e!="number"?e:`${e}px solid`}function Nt(e,n){return Je({prop:e,themeKey:"borders",transform:n})}const Ep=Nt("border",It),Tp=Nt("borderTop",It),Op=Nt("borderRight",It),Mp=Nt("borderBottom",It),Ap=Nt("borderLeft",It),Pp=Nt("borderColor"),Ip=Nt("borderTopColor"),Np=Nt("borderRightColor"),Rp=Nt("borderBottomColor"),$p=Nt("borderLeftColor"),jp=Nt("outline",It),Lp=Nt("outlineColor"),So=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=kn(e.theme,"shape.borderRadius",4,"borderRadius"),t=r=>({borderRadius:Dn(n,r)});return lr(e,e.borderRadius,t)}return null};So.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:yr}:{},So.filterProps=["borderRadius"],xo(Ep,Tp,Op,Mp,Ap,Pp,Ip,Np,Rp,$p,So,jp,Lp);const Co=e=>{if(e.gap!==void 0&&e.gap!==null){const n=kn(e.theme,"spacing",8,"gap"),t=r=>({gap:Dn(n,r)});return lr(e,e.gap,t)}return null};Co.propTypes=process.env.NODE_ENV!=="production"?{gap:yr}:{},Co.filterProps=["gap"];const ko=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=kn(e.theme,"spacing",8,"columnGap"),t=r=>({columnGap:Dn(n,r)});return lr(e,e.columnGap,t)}return null};ko.propTypes=process.env.NODE_ENV!=="production"?{columnGap:yr}:{},ko.filterProps=["columnGap"];const Do=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=kn(e.theme,"spacing",8,"rowGap"),t=r=>({rowGap:Dn(n,r)});return lr(e,e.rowGap,t)}return null};Do.propTypes=process.env.NODE_ENV!=="production"?{rowGap:yr}:{},Do.filterProps=["rowGap"];const zp=Je({prop:"gridColumn"}),Bp=Je({prop:"gridRow"}),Vp=Je({prop:"gridAutoFlow"}),Fp=Je({prop:"gridAutoColumns"}),Yp=Je({prop:"gridAutoRows"}),Hp=Je({prop:"gridTemplateColumns"}),Up=Je({prop:"gridTemplateRows"}),Wp=Je({prop:"gridTemplateAreas"}),Zp=Je({prop:"gridArea"});xo(Co,ko,Do,zp,Bp,Vp,Fp,Yp,Hp,Up,Wp,Zp);function Zr(e,n){return n==="grey"?n:e}const qp=Je({prop:"color",themeKey:"palette",transform:Zr}),Kp=Je({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zr}),Gp=Je({prop:"backgroundColor",themeKey:"palette",transform:Zr});xo(qp,Kp,Gp);function Et(e){return e<=1&&e!==0?`${e*100}%`:e}const Qp=Je({prop:"width",transform:Et}),ta=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=t=>{const r=e.theme?.breakpoints?.values?.[t]||vo[t];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Et(t)}};return lr(e,e.maxWidth,n)}return null};ta.filterProps=["maxWidth"];const Jp=Je({prop:"minWidth",transform:Et}),Xp=Je({prop:"height",transform:Et}),eh=Je({prop:"maxHeight",transform:Et}),th=Je({prop:"minHeight",transform:Et});Je({prop:"size",cssProperty:"width",transform:Et}),Je({prop:"size",cssProperty:"height",transform:Et});const rh=Je({prop:"boxSizing"});xo(Qp,ta,Jp,Xp,eh,th,rh);const Eo={border:{themeKey:"borders",transform:It},borderTop:{themeKey:"borders",transform:It},borderRight:{themeKey:"borders",transform:It},borderBottom:{themeKey:"borders",transform:It},borderLeft:{themeKey:"borders",transform:It},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:It},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:So},color:{themeKey:"palette",transform:Zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zr},backgroundColor:{themeKey:"palette",transform:Zr},p:{style:Ge},pt:{style:Ge},pr:{style:Ge},pb:{style:Ge},pl:{style:Ge},px:{style:Ge},py:{style:Ge},padding:{style:Ge},paddingTop:{style:Ge},paddingRight:{style:Ge},paddingBottom:{style:Ge},paddingLeft:{style:Ge},paddingX:{style:Ge},paddingY:{style:Ge},paddingInline:{style:Ge},paddingInlineStart:{style:Ge},paddingInlineEnd:{style:Ge},paddingBlock:{style:Ge},paddingBlockStart:{style:Ge},paddingBlockEnd:{style:Ge},m:{style:Ke},mt:{style:Ke},mr:{style:Ke},mb:{style:Ke},ml:{style:Ke},mx:{style:Ke},my:{style:Ke},margin:{style:Ke},marginTop:{style:Ke},marginRight:{style:Ke},marginBottom:{style:Ke},marginLeft:{style:Ke},marginX:{style:Ke},marginY:{style:Ke},marginInline:{style:Ke},marginInlineStart:{style:Ke},marginInlineEnd:{style:Ke},marginBlock:{style:Ke},marginBlockStart:{style:Ke},marginBlockEnd:{style:Ke},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:Co},rowGap:{style:Do},columnGap:{style:ko},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Et},maxWidth:{style:ta},minWidth:{transform:Et},height:{transform:Et},maxHeight:{transform:Et},minHeight:{transform:Et},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 nh(...e){const n=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),t=new Set(n);return e.every(r=>t.size===Object.keys(r).length)}function oh(e,n){return typeof e=="function"?e(n):e}function ih(){function e(t,r,o,i){const a={[t]:r,theme:o},s=i[t];if(!s)return{[t]:r};const{cssProperty:c=t,themeKey:l,transform:u,style:d}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[t]:r};const f=yo(o,l)||{};return d?d(a):lr(a,r,g=>{let p=bo(f,u,g);return g===p&&typeof g=="string"&&(p=bo(f,u,`${t}${g==="default"?"":kt(g)}`,g)),c===!1?p:{[c]:p}})}function n(t){const{sx:r,theme:o={},nested:i}=t||{};if(!r)return null;const a=o.unstable_sxConfig??Eo;function s(c){let l=c;if(typeof c=="function")l=c(o);else if(typeof c!="object")return c;if(!l)return null;const u=bp(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(l).forEach(m=>{const g=oh(l[m],o);if(g!=null)if(typeof g=="object")if(a[m])f=Cn(f,e(m,g,o,a));else{const p=lr({theme:o},g,b=>({[m]:b}));nh(p,g)?f[m]=n({sx:g,theme:o,nested:!0}):f=Cn(f,p)}else f=Cn(f,e(m,g,o,a))}),!i&&o.modularCssLayers?{"@layer sx":dc(o,pc(d,f))}:dc(o,pc(d,f))}return Array.isArray(r)?r.map(s):s(r)}return n}const qr=ih();qr.filterProps=["sx"];function ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ra.apply(null,arguments)}function ah(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function sh(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var ch=(function(){function e(t){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(r){r.forEach(this._insertTag)},n.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sh(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=ah(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},n.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),ft="-ms-",To="-moz-",Te="-webkit-",gc="comm",na="rule",oa="decl",lh="@import",vc="@keyframes",uh="@layer",dh=Math.abs,Oo=String.fromCharCode,fh=Object.assign;function ph(e,n){return lt(e,0)^45?(((n<<2^lt(e,0))<<2^lt(e,1))<<2^lt(e,2))<<2^lt(e,3):0}function yc(e){return e.trim()}function hh(e,n){return(e=n.exec(e))?e[0]:e}function Oe(e,n,t){return e.replace(n,t)}function ia(e,n){return e.indexOf(n)}function lt(e,n){return e.charCodeAt(n)|0}function En(e,n,t){return e.slice(n,t)}function qt(e){return e.length}function aa(e){return e.length}function Mo(e,n){return n.push(e),e}function mh(e,n){return e.map(n).join("")}var Ao=1,Kr=1,bc=0,bt=0,ot=0,Gr="";function Po(e,n,t,r,o,i,a){return{value:e,root:n,parent:t,type:r,props:o,children:i,line:Ao,column:Kr,length:a,return:""}}function Tn(e,n){return fh(Po("",null,null,"",null,null,0),e,{length:-e.length},n)}function gh(){return ot}function vh(){return ot=bt>0?lt(Gr,--bt):0,Kr--,ot===10&&(Kr=1,Ao--),ot}function Tt(){return ot=bt<bc?lt(Gr,bt++):0,Kr++,ot===10&&(Kr=1,Ao++),ot}function Kt(){return lt(Gr,bt)}function Io(){return bt}function On(e,n){return En(Gr,e,n)}function Mn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function wc(e){return Ao=Kr=1,bc=qt(Gr=e),bt=0,[]}function _c(e){return Gr="",e}function No(e){return yc(On(bt-1,sa(e===91?e+2:e===40?e+1:e)))}function yh(e){for(;(ot=Kt())&&ot<33;)Tt();return Mn(e)>2||Mn(ot)>3?"":" "}function bh(e,n){for(;--n&&Tt()&&!(ot<48||ot>102||ot>57&&ot<65||ot>70&&ot<97););return On(e,Io()+(n<6&&Kt()==32&&Tt()==32))}function sa(e){for(;Tt();)switch(ot){case e:return bt;case 34:case 39:e!==34&&e!==39&&sa(ot);break;case 40:e===41&&sa(e);break;case 92:Tt();break}return bt}function wh(e,n){for(;Tt()&&e+ot!==57;)if(e+ot===84&&Kt()===47)break;return"/*"+On(n,bt-1)+"*"+Oo(e===47?e:Tt())}function _h(e){for(;!Mn(Kt());)Tt();return On(e,bt)}function xh(e){return _c(Ro("",null,null,null,[""],e=wc(e),0,[0],e))}function Ro(e,n,t,r,o,i,a,s,c){for(var l=0,u=0,d=a,f=0,m=0,g=0,p=1,b=1,S=1,x=0,T="",D=o,k=i,O=r,R=T;b;)switch(g=x,x=Tt()){case 40:if(g!=108&<(R,d-1)==58){ia(R+=Oe(No(x),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:R+=No(x);break;case 9:case 10:case 13:case 32:R+=yh(g);break;case 92:R+=bh(Io()-1,7);continue;case 47:switch(Kt()){case 42:case 47:Mo(Sh(wh(Tt(),Io()),n,t),c);break;default:R+="/"}break;case 123*p:s[l++]=qt(R)*S;case 125*p:case 59:case 0:switch(x){case 0:case 125:b=0;case 59+u:S==-1&&(R=Oe(R,/\f/g,"")),m>0&&qt(R)-d&&Mo(m>32?Sc(R+";",r,t,d-1):Sc(Oe(R," ","")+";",r,t,d-2),c);break;case 59:R+=";";default:if(Mo(O=xc(R,n,t,l,u,o,s,T,D=[],k=[],d),i),x===123)if(u===0)Ro(R,n,O,O,D,i,d,s,k);else switch(f===99&<(R,3)===110?100:f){case 100:case 108:case 109:case 115:Ro(e,O,O,r&&Mo(xc(e,O,O,0,0,o,s,T,o,D=[],d),k),o,k,d,s,r?D:k);break;default:Ro(R,O,O,O,[""],k,0,s,k)}}l=u=m=0,p=S=1,T=R="",d=a;break;case 58:d=1+qt(R),m=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&vh()==125)continue}switch(R+=Oo(x),x*p){case 38:S=u>0?1:(R+="\f",-1);break;case 44:s[l++]=(qt(R)-1)*S,S=1;break;case 64:Kt()===45&&(R+=No(Tt())),f=Kt(),u=d=qt(T=R+=_h(Io())),x++;break;case 45:g===45&&qt(R)==2&&(p=0)}}return i}function xc(e,n,t,r,o,i,a,s,c,l,u){for(var d=o-1,f=o===0?i:[""],m=aa(f),g=0,p=0,b=0;g<r;++g)for(var S=0,x=En(e,d+1,d=dh(p=a[g])),T=e;S<m;++S)(T=yc(p>0?f[S]+" "+x:Oe(x,/&\f/g,f[S])))&&(c[b++]=T);return Po(e,n,t,o===0?na:s,c,l,u)}function Sh(e,n,t){return Po(e,n,t,gc,Oo(gh()),En(e,2,-2),0)}function Sc(e,n,t,r){return Po(e,n,t,oa,En(e,0,r),En(e,r+1,-1),r)}function Qr(e,n){for(var t="",r=aa(e),o=0;o<r;o++)t+=n(e[o],o,e,n)||"";return t}function Ch(e,n,t,r){switch(e.type){case uh:if(e.children.length)break;case lh:case oa:return e.return=e.return||e.value;case gc:return"";case vc:return e.return=e.value+"{"+Qr(e.children,r)+"}";case na:e.value=e.props.join(",")}return qt(t=Qr(e.children,r))?e.return=e.value+"{"+t+"}":""}function kh(e){var n=aa(e);return function(t,r,o,i){for(var a="",s=0;s<n;s++)a+=e[s](t,r,o,i)||"";return a}}function Dh(e){return function(n){n.root||(n=n.return)&&e(n)}}function Cc(e){var n=Object.create(null);return function(t){return n[t]===void 0&&(n[t]=e(t)),n[t]}}var Eh=function(n,t,r){for(var o=0,i=0;o=i,i=Kt(),o===38&&i===12&&(t[r]=1),!Mn(i);)Tt();return On(n,bt)},Th=function(n,t){var r=-1,o=44;do switch(Mn(o)){case 0:o===38&&Kt()===12&&(t[r]=1),n[r]+=Eh(bt-1,t,r);break;case 2:n[r]+=No(o);break;case 4:if(o===44){n[++r]=Kt()===58?"&\f":"",t[r]=n[r].length;break}default:n[r]+=Oo(o)}while(o=Tt());return n},Oh=function(n,t){return _c(Th(wc(n),t))},kc=new WeakMap,Mh=function(n){if(!(n.type!=="rule"||!n.parent||n.length<1)){for(var t=n.value,r=n.parent,o=n.column===r.column&&n.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(n.props.length===1&&t.charCodeAt(0)!==58&&!kc.get(r))&&!o){kc.set(n,!0);for(var i=[],a=Oh(t,i),s=r.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)n.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},Ah=function(n){if(n.type==="decl"){var t=n.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(n.return="",n.value="")}};function Dc(e,n){switch(ph(e,n)){case 5103:return Te+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Te+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Te+e+To+e+ft+e+e;case 6828:case 4268:return Te+e+ft+e+e;case 6165:return Te+e+ft+"flex-"+e+e;case 5187:return Te+e+Oe(e,/(\w+).+(:[^]+)/,Te+"box-$1$2"+ft+"flex-$1$2")+e;case 5443:return Te+e+ft+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return Te+e+ft+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return Te+e+ft+Oe(e,"shrink","negative")+e;case 5292:return Te+e+ft+Oe(e,"basis","preferred-size")+e;case 6060:return Te+"box-"+Oe(e,"-grow","")+Te+e+ft+Oe(e,"grow","positive")+e;case 4554:return Te+Oe(e,/([^-])(transform)/g,"$1"+Te+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,Te+"$1"),/(image-set)/,Te+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,Te+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,Te+"box-pack:$3"+ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Te+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,Te+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(qt(e)-1-n>6)switch(lt(e,n+1)){case 109:if(lt(e,n+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+Te+"$2-$3$1"+To+(lt(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~ia(e,"stretch")?Dc(Oe(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(lt(e,n+1)!==115)break;case 6444:switch(lt(e,qt(e)-3-(~ia(e,"!important")&&10))){case 107:return Oe(e,":",":"+Te)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Te+(lt(e,14)===45?"inline-":"")+"box$3$1"+Te+"$2$3$1"+ft+"$2box$3")+e}break;case 5936:switch(lt(e,n+11)){case 114:return Te+e+ft+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Te+e+ft+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Te+e+ft+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Te+e+ft+e+e}return e}var Ph=function(n,t,r,o){if(n.length>-1&&!n.return)switch(n.type){case oa:n.return=Dc(n.value,n.length);break;case vc:return Qr([Tn(n,{value:Oe(n.value,"@","@"+Te)})],o);case na:if(n.length)return mh(n.props,function(i){switch(hh(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Qr([Tn(n,{props:[Oe(i,/:(read-\w+)/,":"+To+"$1")]})],o);case"::placeholder":return Qr([Tn(n,{props:[Oe(i,/:(plac\w+)/,":"+Te+"input-$1")]}),Tn(n,{props:[Oe(i,/:(plac\w+)/,":"+To+"$1")]}),Tn(n,{props:[Oe(i,/:(plac\w+)/,ft+"input-$1")]})],o)}return""})}},Ih=[Ph],Nh=function(n){var t=n.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var b=p.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=n.stylisPlugins||Ih,i={},a,s=[];a=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(p){for(var b=p.getAttribute("data-emotion").split(" "),S=1;S<b.length;S++)i[b[S]]=!0;s.push(p)});var c,l=[Mh,Ah];{var u,d=[Ch,Dh(function(p){u.insert(p)})],f=kh(l.concat(o,d)),m=function(b){return Qr(xh(b),f)};c=function(b,S,x,T){u=x,m(b?b+"{"+S.styles+"}":S.styles),T&&(g.inserted[S.name]=!0)}}var g={key:t,sheet:new ch({key:t,container:a,nonce:n.nonce,speedy:n.speedy,prepend:n.prepend,insertionPoint:n.insertionPoint}),nonce:n.nonce,inserted:i,registered:{},insert:c};return g.sheet.hydrate(s),g},Rh=!0;function $h(e,n,t){var r="";return t.split(" ").forEach(function(o){e[o]!==void 0?n.push(e[o]+";"):o&&(r+=o+" ")}),r}var Ec=function(n,t,r){var o=n.key+"-"+t.name;(r===!1||Rh===!1)&&n.registered[o]===void 0&&(n.registered[o]=t.styles)},jh=function(n,t,r){Ec(n,t,r);var o=n.key+"-"+t.name;if(n.inserted[t.name]===void 0){var i=t;do n.insert(t===i?"."+o:"",i,n.sheet,!0),i=i.next;while(i!==void 0)}};function Lh(e){for(var n=0,t,r=0,o=e.length;o>=4;++r,o-=4)t=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(t&65535)*1540483477+((t>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(o){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var zh={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},Bh=/[A-Z]|^ms/g,Vh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Tc=function(n){return n.charCodeAt(1)===45},Oc=function(n){return n!=null&&typeof n!="boolean"},ca=Cc(function(e){return Tc(e)?e:e.replace(Bh,"-$&").toLowerCase()}),Mc=function(n,t){switch(n){case"animation":case"animationName":if(typeof t=="string")return t.replace(Vh,function(r,o,i){return Gt={name:o,styles:i,next:Gt},o})}return zh[n]!==1&&!Tc(n)&&typeof t=="number"&&t!==0?t+"px":t};function An(e,n,t){if(t==null)return"";var r=t;if(r.__emotion_styles!==void 0)return r;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return Gt={name:o.name,styles:o.styles,next:Gt},o.name;var i=t;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Gt={name:a.name,styles:a.styles,next:Gt},a=a.next;var s=i.styles+";";return s}return Fh(e,n,t)}case"function":{if(e!==void 0){var c=Gt,l=t(e);return Gt=c,An(e,n,l)}break}}var u=t;if(n==null)return u;var d=n[u];return d!==void 0?d:u}function Fh(e,n,t){var r="";if(Array.isArray(t))for(var o=0;o<t.length;o++)r+=An(e,n,t[o])+";";else for(var i in t){var a=t[i];if(typeof a!="object"){var s=a;n!=null&&n[s]!==void 0?r+=i+"{"+n[s]+"}":Oc(s)&&(r+=ca(i)+":"+Mc(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(n==null||n[a[0]]===void 0))for(var c=0;c<a.length;c++)Oc(a[c])&&(r+=ca(i)+":"+Mc(i,a[c])+";");else{var l=An(e,n,a);switch(i){case"animation":case"animationName":{r+=ca(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var Ac=/label:\s*([^\s;{]+)\s*(;|$)/g,Gt;function Pc(e,n,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Gt=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=An(t,n,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=An(t,n,e[s]),r){var c=i;o+=c[s]}Ac.lastIndex=0;for(var l="",u;(u=Ac.exec(o))!==null;)l+="-"+u[1];var d=Lh(o)+l;return{name:d,styles:o,next:Gt}}var Yh=function(n){return n()},Hh=W.useInsertionEffect?W.useInsertionEffect:!1,Uh=Hh||Yh,Ic=W.createContext(typeof HTMLElement<"u"?Nh({key:"css"}):null);Ic.Provider;var Wh=function(n){return w.forwardRef(function(t,r){var o=w.useContext(Ic);return n(t,o,r)})},Nc=W.createContext({}),Zh=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qh=Cc(function(e){return Zh.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Kh=qh,Gh=function(n){return n!=="theme"},Rc=function(n){return typeof n=="string"&&n.charCodeAt(0)>96?Kh:Gh},$c=function(n,t,r){var o;if(t){var i=t.shouldForwardProp;o=n.__emotion_forwardProp&&i?function(a){return n.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=n.__emotion_forwardProp),o},Qh=function(n){var t=n.cache,r=n.serialized,o=n.isStringTag;return Ec(t,r,o),Uh(function(){return jh(t,r,o)}),null},Jh=function e(n,t){var r=n.__emotion_real===n,o=r&&n.__emotion_base||n,i,a;t!==void 0&&(i=t.label,a=t.target);var s=$c(n,t,r),c=s||Rc(o),l=!c("as");return function(){var u=arguments,d=r&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var m=u.length,g=1;g<m;g++)d.push(u[g],f[g])}var p=Wh(function(b,S,x){var T=l&&b.as||o,D="",k=[],O=b;if(b.theme==null){O={};for(var R in b)O[R]=b[R];O.theme=W.useContext(Nc)}typeof b.className=="string"?D=$h(S.registered,k,b.className):b.className!=null&&(D=b.className+" ");var U=Pc(d.concat(k),S.registered,O);D+=S.key+"-"+U.name,a!==void 0&&(D+=" "+a);var H=l&&s===void 0?Rc(T):c,V={};for(var K in b)l&&K==="as"||H(K)&&(V[K]=b[K]);return V.className=D,x&&(V.ref=x),W.createElement(W.Fragment,null,W.createElement(Qh,{cache:S,serialized:U,isStringTag:typeof T=="string"}),W.createElement(T,V))});return p.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=n.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=d,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return"."+a}}),p.withComponent=function(b,S){var x=e(b,ra({},t,S,{shouldForwardProp:$c(p,S,!0)}));return x.apply(void 0,d)},p}},Xh=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],la=Jh.bind(null);Xh.forEach(function(e){la[e]=la(e)});/**
|
|
70
70
|
* @mui/styled-engine v7.3.2
|
|
71
71
|
*
|
|
72
72
|
* @license MIT
|
|
73
73
|
* This source code is licensed under the MIT license found in the
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/function
|
|
76
|
-
`)):r.some(
|
|
77
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
78
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
79
|
-
`))}return
|
|
80
|
-
The color object needs to have a \`main\` property or a \`${
|
|
75
|
+
*/function em(e,n){const t=la(e,n);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(`
|
|
76
|
+
`)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),t(...r)}:t}function tm(e,n){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=n(e.__emotion_styles))}const jc=[];function Tr(e){return jc[0]=e,Pc(jc)}const rm=e=>{const n=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return n.sort((t,r)=>t.val-r.val),n.reduce((t,r)=>({...t,[r.key]:r.val}),{})};function nm(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:r=5,...o}=e,i=rm(n),a=Object.keys(i);function s(f){return`@media (min-width:${typeof n[f]=="number"?n[f]:f}${t})`}function c(f){return`@media (max-width:${(typeof n[f]=="number"?n[f]:f)-r/100}${t})`}function l(f,m){const g=a.indexOf(m);return`@media (min-width:${typeof n[f]=="number"?n[f]:f}${t}) and (max-width:${(g!==-1&&typeof n[a[g]]=="number"?n[a[g]]:m)-r/100}${t})`}function u(f){return a.indexOf(f)+1<a.length?l(f,a[a.indexOf(f)+1]):s(f)}function d(f){const m=a.indexOf(f);return m===0?s(a[1]):m===a.length-1?c(a[m]):l(f,a[a.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:c,between:l,only:u,not:d,unit:t,...o}}const om={borderRadius:4};function Lc(e=8,n=ea({spacing:e})){if(e.mui)return e;const t=(...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(i=>{const a=n(i);return typeof a=="number"?`${a}px`:a}).join(" "));return t.mui=!0,t}function im(e,n){const t=this;if(t.vars){if(!t.colorSchemes?.[e]||typeof t.getColorSchemeSelector!="function")return{};let r=t.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return t.palette.mode===e?n:{}}function ua(e={},...n){const{breakpoints:t={},palette:r={},spacing:o,shape:i={},...a}=e,s=nm(t),c=Lc(o);let l=Dt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...om,...i}},a);return l=vp(l),l.applyStyles=im,l=n.reduce((u,d)=>Dt(u,d),l),l.unstable_sxConfig={...Eo,...a?.unstable_sxConfig},l.unstable_sx=function(d){return qr({sx:d,theme:this})},l}function am(e){return Object.keys(e).length===0}function sm(e=null){const n=W.useContext(Nc);return!n||am(n)?e:n}const cm=ua();function lm(e=cm){return sm(e)}const um={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 Qt(e,n,t="Mui"){const r=um[n];return r?`${t}-${r}`:`${np.generate(e)}-${n}`}function br(e,n,t="Mui"){const r={};return n.forEach(o=>{r[o]=Qt(e,o,t)}),r}function zc(e,n=""){return e.displayName||e.name||n}function Bc(e,n,t){const r=zc(n);return e.displayName||(r!==""?`${t}(${r})`:t)}function dm(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return zc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case go.ForwardRef:return Bc(e,e.render,"ForwardRef");case go.Memo:return Bc(e,e.type,"memo");default:return}}}function Vc(e){const{variants:n,...t}=e,r={variants:n,style:Tr(t),isProcessed:!0};return r.style===t||n&&n.forEach(o=>{typeof o.style!="function"&&(o.style=Tr(o.style))}),r}const fm=ua();function da(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Or(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function pm(e){return e?(n,t)=>t[e]:null}function hm(e,n,t){e.theme=ym(e.theme)?t:e.theme[n]||e.theme}function $o(e,n,t){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap(o=>$o(e,o,t));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=t?Or(r.style,t):r.style;else{const{variants:i,...a}=r;o=t?Or(Tr(a),t):a}return Fc(e,r.variants,[o],t)}return r?.isProcessed?t?Or(Tr(r.style),t):r.style:t?Or(Tr(r),t):r}function Fc(e,n,t=[],r=void 0){let o;e:for(let i=0;i<n.length;i+=1){const a=n[i];if(typeof a.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&e.ownerState?.[s]!==a.props[s])continue e;typeof a.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},t.push(r?Or(Tr(a.style(o)),r):a.style(o))):t.push(r?Or(Tr(a.style),r):a.style)}return t}function mm(e={}){const{themeId:n,defaultTheme:t=fm,rootShouldForwardProp:r=da,slotShouldForwardProp:o=da}=e;function i(s){hm(s,n,t)}return(s,c={})=>{tm(s,O=>O.filter(R=>R!==qr));const{name:l,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:m=pm(Yc(u)),...g}=c,p=l&&l.startsWith("Mui")||u?"components":"custom",b=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,S=f||!1;let x=da;u==="Root"||u==="root"?x=r:u?x=o:bm(s)&&(x=void 0);const T=em(s,{shouldForwardProp:x,label:vm(l,u),...g}),D=O=>{if(O.__emotion_real===O)return O;if(typeof O=="function")return function(U){return $o(U,O,U.theme.modularCssLayers?p:void 0)};if(cr(O)){const R=Vc(O);return function(H){return R.variants?$o(H,R,H.theme.modularCssLayers?p:void 0):H.theme.modularCssLayers?Or(R.style,p):R.style}}return O},k=(...O)=>{const R=[],U=O.map(D),H=[];if(R.push(i),l&&m&&H.push(function($){const L=$.theme.components?.[l]?.styleOverrides;if(!L)return null;const Y={};for(const J in L)Y[J]=$o($,L[J],$.theme.modularCssLayers?"theme":void 0);return m($,Y)}),l&&!b&&H.push(function($){const L=$.theme?.components?.[l]?.variants;return L?Fc($,L,[],$.theme.modularCssLayers?"theme":void 0):null}),S||H.push(qr),Array.isArray(U[0])){const v=U.shift(),$=new Array(R.length).fill(""),M=new Array(H.length).fill("");let L;L=[...$,...v,...M],L.raw=[...$,...v.raw,...M],R.unshift(L)}const V=[...R,...U,...H],K=T(...V);return s.muiName&&(K.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(K.displayName=gm(l,u,s)),K};return T.withConfig&&(k.withConfig=T.withConfig),k}}function gm(e,n,t){return e?`${e}${kt(n||"")}`:`Styled(${dm(t)})`}function vm(e,n){let t;return process.env.NODE_ENV!=="production"&&e&&(t=`${e}-${Yc(n||"Root")}`),t}function ym(e){for(const n in e)return!1;return!0}function bm(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Yc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function fa(e,n,t=!1){const r={...n};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],s=n[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const l=c;r[i][l]=fa(a[l],s[l],t)}}}else i==="className"&&t&&n.className?r.className=Ve(e?.className,n?.className):i==="style"&&t&&n.style?r.style={...e?.style,...n?.style}:r[i]===void 0&&(r[i]=e[i])}return r}function wm(e,n=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(e,t))}function pa(e,n=0,t=1){return process.env.NODE_ENV!=="production"&&(e<n||e>t)&&console.error(`MUI: The value provided ${e} is out of range [${n}, ${t}].`),wm(e,n,t)}function _m(e){e=e.slice(1);const n=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let t=e.match(n);return t&&t[0].length===1&&(t=t.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.`),t?`rgb${t.length===4?"a":""}(${t.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function wr(e){if(e.type)return e;if(e.charAt(0)==="#")return wr(_m(e));const n=e.indexOf("("),t=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(t))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
77
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:gr(9,e));let r=e.substring(n+1,e.length-1),o;if(t==="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.
|
|
78
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:gr(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:t,values:r,colorSpace:o}}const xm=e=>{const n=wr(e);return n.values.slice(0,3).map((t,r)=>n.type.includes("hsl")&&r!==0?`${t}%`:t).join(" ")},Pn=(e,n)=>{try{return xm(e)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}};function jo(e){const{type:n,colorSpace:t}=e;let{values:r}=e;return n.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),n.includes("color")?r=`${t} ${r.join(" ")}`:r=`${r.join(", ")}`,`${n}(${r})`}function Hc(e){e=wr(e);const{values:n}=e,t=n[0],r=n[1]/100,o=n[2]/100,i=r*Math.min(o,1-o),a=(l,u=(l+t/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",c.push(n[3])),jo({type:s,values:c})}function ha(e){e=wr(e);let n=e.type==="hsl"||e.type==="hsla"?wr(Hc(e)).values:e.values;return n=n.map(t=>(e.type!=="color"&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function Uc(e,n){const t=ha(e),r=ha(n);return(Math.max(t,r)+.05)/(Math.min(t,r)+.05)}function Lo(e,n){return e=wr(e),n=pa(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,jo(e)}function Mr(e,n,t){try{return Lo(e,n)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function zo(e,n){if(e=wr(e),n=pa(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]*=1-n;return jo(e)}function Ne(e,n,t){try{return zo(e,n)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Bo(e,n){if(e=wr(e),n=pa(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*n;else if(e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]+=(1-e.values[t])*n;return jo(e)}function Re(e,n,t){try{return Bo(e,n)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Sm(e,n=.15){return ha(e)>.5?zo(e,n):Bo(e,n)}function Vo(e,n,t){try{return Sm(e,n)}catch{return e}}const Cm=W.createContext(void 0);process.env.NODE_ENV!=="production"&&(I.node,I.object);function km(e){const{theme:n,name:t,props:r}=e;if(!n||!n.components||!n.components[t])return r;const o=n.components[t];return o.defaultProps?fa(o.defaultProps,r,n.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?fa(o,r,n.components.mergeClassNameAndStyle):r}function Dm({props:e,name:n}){const t=W.useContext(Cm);return km({props:e,name:n,theme:{components:t}})}const Wc={theme:void 0};function Em(e){let n,t;return function(o){let i=n;return(i===void 0||o.theme!==t)&&(Wc.theme=o.theme,i=Vc(e(Wc)),n=i,t=o.theme),i}}function Tm(e=""){function n(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${n(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${n(...o)})`}const Zc=(e,n,t,r=[])=>{let o=e;n.forEach((i,a)=>{a===n.length-1?Array.isArray(o)?o[Number(i)]=t:o&&typeof o=="object"&&(o[i]=t):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},Om=(e,n,t)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,c])=>{(!t||t&&!t([...i,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...i,s],Array.isArray(c)?[...a,s]:a):n([...i,s],c,a))})}r(e)},Mm=(e,n)=>typeof n=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?n:`${n}px`:n;function ma(e,n){const{prefix:t,shouldSkipGeneratingVar:r}=n||{},o={},i={},a={};return Om(e,(s,c,l)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const u=`--${t?`${t}-`:""}${s.join("-")}`,d=Mm(s,c);Object.assign(o,{[u]:d}),Zc(i,s,`var(${u})`,l),Zc(a,s,`var(${u}, ${d})`,l)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function Am(e,n={}){const{getSelector:t=S,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=n,{colorSchemes:a={},components:s,defaultColorScheme:c="light",...l}=e,{vars:u,css:d,varsWithDefaults:f}=ma(l,n);let m=f;const g={},{[c]:p,...b}=a;if(Object.entries(b||{}).forEach(([D,k])=>{const{vars:O,css:R,varsWithDefaults:U}=ma(k,n);m=Dt(m,U),g[D]={css:R,vars:O}}),p){const{css:D,vars:k,varsWithDefaults:O}=ma(p,n);m=Dt(m,O),g[c]={css:D,vars:k}}function S(D,k){let O=o;if(o==="class"&&(O=".%s"),o==="data"&&(O="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(O=`[${o}="%s"]`),D){if(O==="media")return e.defaultColorScheme===D?":root":{[`@media (prefers-color-scheme: ${a[D]?.palette?.mode||D})`]:{":root":k}};if(O)return e.defaultColorScheme===D?`:root, ${O.replace("%s",String(D))}`:O.replace("%s",String(D))}return":root"}return{vars:m,generateThemeVars:()=>{let D={...u};return Object.entries(g).forEach(([,{vars:k}])=>{D=Dt(D,k)}),D},generateStyleSheets:()=>{const D=[],k=e.defaultColorScheme||"light";function O(H,V){Object.keys(V).length&&D.push(typeof H=="string"?{[H]:{...V}}:H)}O(t(void 0,{...d}),d);const{[k]:R,...U}=g;if(R){const{css:H}=R,V=a[k]?.palette?.mode,K=!r&&V?{colorScheme:V,...H}:{...H};O(t(k,{...K}),K)}return Object.entries(U).forEach(([H,{css:V}])=>{const K=a[H]?.palette?.mode,v=!r&&K?{colorScheme:K,...V}:{...V};O(t(H,{...v}),v)}),i&&D.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)"}}),D}}}function Pm(e){return function(t){return e==="media"?(process.env.NODE_ENV!=="production"&&t!=="light"&&t!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:e==="class"?`.${t} &`:e==="data"?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}const In={black:"#000",white:"#fff"},Im={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"},Jr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Xr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Nn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},en={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},tn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},rn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function qc(){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:In.white,default:In.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 Kc=qc();function Gc(){return{text:{primary:In.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:In.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 ga=Gc();function Qc(e,n,t,r){const o=r.light||r,i=r.dark||r*1.5;e[n]||(e.hasOwnProperty(t)?e[n]=e[t]:n==="light"?e.light=Bo(e.main,o):n==="dark"&&(e.dark=zo(e.main,i)))}function Jc(e,n,t,r,o){const i=o.light||o,a=o.dark||o*1.5;n[t]||(n.hasOwnProperty(r)?n[t]=n[r]:t==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(i*100).toFixed(0)}%)`:t==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(a*100).toFixed(0)}%)`))}function Nm(e="light"){return e==="dark"?{main:en[200],light:en[50],dark:en[400]}:{main:en[700],light:en[400],dark:en[800]}}function Rm(e="light"){return e==="dark"?{main:Jr[200],light:Jr[50],dark:Jr[400]}:{main:Jr[500],light:Jr[300],dark:Jr[700]}}function $m(e="light"){return e==="dark"?{main:Xr[500],light:Xr[300],dark:Xr[700]}:{main:Xr[700],light:Xr[400],dark:Xr[800]}}function jm(e="light"){return e==="dark"?{main:tn[400],light:tn[300],dark:tn[700]}:{main:tn[700],light:tn[500],dark:tn[900]}}function Lm(e="light"){return e==="dark"?{main:rn[400],light:rn[300],dark:rn[700]}:{main:rn[800],light:rn[500],dark:rn[900]}}function zm(e="light"){return e==="dark"?{main:Nn[400],light:Nn[300],dark:Nn[700]}:{main:"#ed6c02",light:Nn[500],dark:Nn[900]}}function Bm(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function va(e){const{mode:n="light",contrastThreshold:t=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||Nm(n),s=e.secondary||Rm(n),c=e.error||$m(n),l=e.info||jm(n),u=e.success||Lm(n),d=e.warning||zm(n);function f(b){if(o)return Bm(b);const S=Uc(b,ga.text.primary)>=t?ga.text.primary:Kc.text.primary;if(process.env.NODE_ENV!=="production"){const x=Uc(b,S);x<3&&console.error([`MUI: The contrast ratio of ${x}:1 for ${S} on ${b}`,"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(`
|
|
79
|
+
`))}return S}const m=({color:b,name:S,mainShade:x=500,lightShade:T=300,darkShade:D=700})=>{if(b={...b},!b.main&&b[x]&&(b.main=b[x]),!b.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
|
|
80
|
+
The color object needs to have a \`main\` property or a \`${x}\` property.`:gr(11,S?` (${S})`:"",x));if(typeof b.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
|
|
81
81
|
\`color.main\` should be a string, but \`${JSON.stringify(b.main)}\` was provided instead.
|
|
82
82
|
|
|
83
83
|
Did you intend to use one of the following approaches?
|
|
@@ -90,73 +90,73 @@ const theme1 = createTheme({ palette: {
|
|
|
90
90
|
|
|
91
91
|
const theme2 = createTheme({ palette: {
|
|
92
92
|
primary: { main: green[500] },
|
|
93
|
-
} });`:
|
|
94
|
-
`)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof
|
|
93
|
+
} });`:gr(12,S?` (${S})`:"",JSON.stringify(b.main)));return o?(Jc(o,b,"light",T,r),Jc(o,b,"dark",D,r)):(Qc(b,"light",T,r),Qc(b,"dark",D,r)),b.contrastText||(b.contrastText=f(b.main)),b};let g;return n==="light"?g=qc():n==="dark"&&(g=Gc()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${n}\` is not supported.`)),Dt({common:{...In},mode:n,primary:m({color:a,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:c,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:u,name:"success"}),grey:Im,contrastThreshold:t,getContrastText:f,augmentColor:m,tonalOffset:r,...g},i)}function Vm(e){const n={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(n[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),n}function Fm(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function Ym(e){return Math.round(e*1e5)/1e5}const Xc={textTransform:"uppercase"},el='"Roboto", "Helvetica", "Arial", sans-serif';function Hm(e,n){const{fontFamily:t=el,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof n=="function"?n(e):n;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,m=u||(b=>`${b/c*f}rem`),g=(b,S,x,T,D)=>({fontFamily:t,fontWeight:b,fontSize:m(S),lineHeight:x,...t===el?{letterSpacing:`${Ym(T/S)}em`}:{},...D,...l}),p={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(a,14,1.75,.4,Xc),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,Xc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Dt({htmlFontSize:c,pxToRem:m,fontFamily:t,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...p},d,{clone:!1})}const Um=.2,Wm=.14,Zm=.12;function Ue(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Um})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Wm})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Zm})`].join(",")}const qm=["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)],Km={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)"},Gm={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function tl(e){return`${Math.round(e)}ms`}function Qm(e){if(!e)return 0;const n=e/36;return Math.min(Math.round((4+15*n**.25+n/5)*10),3e3)}function Jm(e){const n={...Km,...e.easing},t={...Gm,...e.duration};return{getAutoHeightDuration:Qm,create:(o=["all"],i={})=>{const{duration:a=t.standard,easing:s=n.easeInOut,delay:c=0,...l}=i;if(process.env.NODE_ENV!=="production"){const u=f=>typeof f=="string",d=f=>!Number.isNaN(parseFloat(f));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(a)&&!u(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),u(s)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="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(`
|
|
94
|
+
`)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:tl(a)} ${s} ${typeof c=="string"?c:tl(c)}`).join(",")},...e,easing:n,duration:t}}const Xm={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function eg(e){return cr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function rl(e={}){const n={...e};function t(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!eg(s)||a.startsWith("unstable_")?delete r[a]:cr(s)&&(r[a]={...s},t(r[a]))}}return t(n),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
95
95
|
|
|
96
96
|
const theme = ${JSON.stringify(n,null,2)};
|
|
97
97
|
|
|
98
98
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
99
99
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
100
100
|
|
|
101
|
-
export default theme;`}function
|
|
102
|
-
`))}b[
|
|
103
|
-
To suppress this warning, you need to explicitly provide the \`palette.${n}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function a0(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Gt=e=>{try{return e()}catch{}},i0=(e="mui")=>Cm(e);function wi(e,n,t,r,o){if(!t)return;t=t===!0?{}:t;const a=o==="dark"?"dark":"light";if(!r){n[o]=e0({...t,palette:{mode:a,...t?.palette},colorSpace:e});return}const{palette:i,...s}=yi({...r,palette:{mode:a,...t?.palette},colorSpace:e});return n[o]={...t,palette:i,opacity:{...tl(a),...t?.opacity},overlays:t?.overlays||rl(a)},s}function s0(e={},...n){const{colorSchemes:t={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",nativeColor:i=!1,shouldSkipGeneratingVar:s=t0,colorSchemeSelector:c=t.light&&t.dark?"media":void 0,rootSelector:l=":root",...u}=e,d=Object.keys(t)[0],f=r||(t.light&&d!=="light"?"light":d),m=i0(a),{[f]:g,light:p,dark:b,...x}=t,S={...x};let T=g;if((f==="dark"&&!("dark"in t)||f==="light"&&!("light"in t))&&(T=!0),!T)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:mr(21,f));let D;i&&(D="oklch");const k=wi(D,S,T,u,f);p&&!S.light&&wi(D,S,p,void 0,"light"),b&&!S.dark&&wi(D,S,b,void 0,"dark");let O={defaultColorScheme:f,...k,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:m,colorSchemes:S,font:{...jm(k.typography),...k.font},spacing:a0(u.spacing)};Object.keys(O.colorSchemes).forEach(Q=>{const v=O.colorSchemes[Q].palette,M=H=>{const Y=H.split("-"),ee=Y[1],ae=Y[2];return m(H,v[ee][ae])};v.mode==="light"&&(j(v.common,"background","#fff"),j(v.common,"onBackground","#000")),v.mode==="dark"&&(j(v.common,"background","#000"),j(v.common,"onBackground","#fff"));function P(H,Y,ee){if(D){let ae;return H===Or&&(ae=`transparent ${((1-ee)*100).toFixed(0)}%`),H===Ie&&(ae=`#000 ${(ee*100).toFixed(0)}%`),H===Ne&&(ae=`#fff ${(ee*100).toFixed(0)}%`),`color-mix(in ${D}, ${Y}, ${ae})`}return H(Y,ee)}if(o0(v,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),v.mode==="light"){j(v.Alert,"errorColor",P(Ie,v.error.light,.6)),j(v.Alert,"infoColor",P(Ie,v.info.light,.6)),j(v.Alert,"successColor",P(Ie,v.success.light,.6)),j(v.Alert,"warningColor",P(Ie,v.warning.light,.6)),j(v.Alert,"errorFilledBg",M("palette-error-main")),j(v.Alert,"infoFilledBg",M("palette-info-main")),j(v.Alert,"successFilledBg",M("palette-success-main")),j(v.Alert,"warningFilledBg",M("palette-warning-main")),j(v.Alert,"errorFilledColor",Gt(()=>v.getContrastText(v.error.main))),j(v.Alert,"infoFilledColor",Gt(()=>v.getContrastText(v.info.main))),j(v.Alert,"successFilledColor",Gt(()=>v.getContrastText(v.success.main))),j(v.Alert,"warningFilledColor",Gt(()=>v.getContrastText(v.warning.main))),j(v.Alert,"errorStandardBg",P(Ne,v.error.light,.9)),j(v.Alert,"infoStandardBg",P(Ne,v.info.light,.9)),j(v.Alert,"successStandardBg",P(Ne,v.success.light,.9)),j(v.Alert,"warningStandardBg",P(Ne,v.warning.light,.9)),j(v.Alert,"errorIconColor",M("palette-error-main")),j(v.Alert,"infoIconColor",M("palette-info-main")),j(v.Alert,"successIconColor",M("palette-success-main")),j(v.Alert,"warningIconColor",M("palette-warning-main")),j(v.AppBar,"defaultBg",M("palette-grey-100")),j(v.Avatar,"defaultBg",M("palette-grey-400")),j(v.Button,"inheritContainedBg",M("palette-grey-300")),j(v.Button,"inheritContainedHoverBg",M("palette-grey-A100")),j(v.Chip,"defaultBorder",M("palette-grey-400")),j(v.Chip,"defaultAvatarColor",M("palette-grey-700")),j(v.Chip,"defaultIconColor",M("palette-grey-700")),j(v.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(v.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(v.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(v.LinearProgress,"primaryBg",P(Ne,v.primary.main,.62)),j(v.LinearProgress,"secondaryBg",P(Ne,v.secondary.main,.62)),j(v.LinearProgress,"errorBg",P(Ne,v.error.main,.62)),j(v.LinearProgress,"infoBg",P(Ne,v.info.main,.62)),j(v.LinearProgress,"successBg",P(Ne,v.success.main,.62)),j(v.LinearProgress,"warningBg",P(Ne,v.warning.main,.62)),j(v.Skeleton,"bg",D?P(Or,v.text.primary,.11):`rgba(${M("palette-text-primaryChannel")} / 0.11)`),j(v.Slider,"primaryTrack",P(Ne,v.primary.main,.62)),j(v.Slider,"secondaryTrack",P(Ne,v.secondary.main,.62)),j(v.Slider,"errorTrack",P(Ne,v.error.main,.62)),j(v.Slider,"infoTrack",P(Ne,v.info.main,.62)),j(v.Slider,"successTrack",P(Ne,v.success.main,.62)),j(v.Slider,"warningTrack",P(Ne,v.warning.main,.62));const H=D?P(Ie,v.background.default,.6825):Vo(v.background.default,.8);j(v.SnackbarContent,"bg",H),j(v.SnackbarContent,"color",Gt(()=>D?gi.text.primary:v.getContrastText(H))),j(v.SpeedDialAction,"fabHoverBg",Vo(v.background.paper,.15)),j(v.StepConnector,"border",M("palette-grey-400")),j(v.StepContent,"border",M("palette-grey-400")),j(v.Switch,"defaultColor",M("palette-common-white")),j(v.Switch,"defaultDisabledColor",M("palette-grey-100")),j(v.Switch,"primaryDisabledColor",P(Ne,v.primary.main,.62)),j(v.Switch,"secondaryDisabledColor",P(Ne,v.secondary.main,.62)),j(v.Switch,"errorDisabledColor",P(Ne,v.error.main,.62)),j(v.Switch,"infoDisabledColor",P(Ne,v.info.main,.62)),j(v.Switch,"successDisabledColor",P(Ne,v.success.main,.62)),j(v.Switch,"warningDisabledColor",P(Ne,v.warning.main,.62)),j(v.TableCell,"border",P(Ne,P(Or,v.divider,1),.88)),j(v.Tooltip,"bg",P(Or,v.grey[700],.92))}if(v.mode==="dark"){j(v.Alert,"errorColor",P(Ne,v.error.light,.6)),j(v.Alert,"infoColor",P(Ne,v.info.light,.6)),j(v.Alert,"successColor",P(Ne,v.success.light,.6)),j(v.Alert,"warningColor",P(Ne,v.warning.light,.6)),j(v.Alert,"errorFilledBg",M("palette-error-dark")),j(v.Alert,"infoFilledBg",M("palette-info-dark")),j(v.Alert,"successFilledBg",M("palette-success-dark")),j(v.Alert,"warningFilledBg",M("palette-warning-dark")),j(v.Alert,"errorFilledColor",Gt(()=>v.getContrastText(v.error.dark))),j(v.Alert,"infoFilledColor",Gt(()=>v.getContrastText(v.info.dark))),j(v.Alert,"successFilledColor",Gt(()=>v.getContrastText(v.success.dark))),j(v.Alert,"warningFilledColor",Gt(()=>v.getContrastText(v.warning.dark))),j(v.Alert,"errorStandardBg",P(Ie,v.error.light,.9)),j(v.Alert,"infoStandardBg",P(Ie,v.info.light,.9)),j(v.Alert,"successStandardBg",P(Ie,v.success.light,.9)),j(v.Alert,"warningStandardBg",P(Ie,v.warning.light,.9)),j(v.Alert,"errorIconColor",M("palette-error-main")),j(v.Alert,"infoIconColor",M("palette-info-main")),j(v.Alert,"successIconColor",M("palette-success-main")),j(v.Alert,"warningIconColor",M("palette-warning-main")),j(v.AppBar,"defaultBg",M("palette-grey-900")),j(v.AppBar,"darkBg",M("palette-background-paper")),j(v.AppBar,"darkColor",M("palette-text-primary")),j(v.Avatar,"defaultBg",M("palette-grey-600")),j(v.Button,"inheritContainedBg",M("palette-grey-800")),j(v.Button,"inheritContainedHoverBg",M("palette-grey-700")),j(v.Chip,"defaultBorder",M("palette-grey-700")),j(v.Chip,"defaultAvatarColor",M("palette-grey-300")),j(v.Chip,"defaultIconColor",M("palette-grey-300")),j(v.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(v.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(v.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(v.LinearProgress,"primaryBg",P(Ie,v.primary.main,.5)),j(v.LinearProgress,"secondaryBg",P(Ie,v.secondary.main,.5)),j(v.LinearProgress,"errorBg",P(Ie,v.error.main,.5)),j(v.LinearProgress,"infoBg",P(Ie,v.info.main,.5)),j(v.LinearProgress,"successBg",P(Ie,v.success.main,.5)),j(v.LinearProgress,"warningBg",P(Ie,v.warning.main,.5)),j(v.Skeleton,"bg",D?P(Or,v.text.primary,.13):`rgba(${M("palette-text-primaryChannel")} / 0.13)`),j(v.Slider,"primaryTrack",P(Ie,v.primary.main,.5)),j(v.Slider,"secondaryTrack",P(Ie,v.secondary.main,.5)),j(v.Slider,"errorTrack",P(Ie,v.error.main,.5)),j(v.Slider,"infoTrack",P(Ie,v.info.main,.5)),j(v.Slider,"successTrack",P(Ie,v.success.main,.5)),j(v.Slider,"warningTrack",P(Ie,v.warning.main,.5));const H=D?P(Ne,v.background.default,.985):Vo(v.background.default,.98);j(v.SnackbarContent,"bg",H),j(v.SnackbarContent,"color",Gt(()=>D?Wc.text.primary:v.getContrastText(H))),j(v.SpeedDialAction,"fabHoverBg",Vo(v.background.paper,.15)),j(v.StepConnector,"border",M("palette-grey-600")),j(v.StepContent,"border",M("palette-grey-600")),j(v.Switch,"defaultColor",M("palette-grey-300")),j(v.Switch,"defaultDisabledColor",M("palette-grey-600")),j(v.Switch,"primaryDisabledColor",P(Ie,v.primary.main,.55)),j(v.Switch,"secondaryDisabledColor",P(Ie,v.secondary.main,.55)),j(v.Switch,"errorDisabledColor",P(Ie,v.error.main,.55)),j(v.Switch,"infoDisabledColor",P(Ie,v.info.main,.55)),j(v.Switch,"successDisabledColor",P(Ie,v.success.main,.55)),j(v.Switch,"warningDisabledColor",P(Ie,v.warning.main,.55)),j(v.TableCell,"border",P(Ie,P(Or,v.divider,1),.68)),j(v.Tooltip,"bg",P(Or,v.grey[700],.92))}cr(v.background,"default"),cr(v.background,"paper"),cr(v.common,"background"),cr(v.common,"onBackground"),cr(v,"divider"),Object.keys(v).forEach(H=>{const Y=v[H];H!=="tonalOffset"&&Y&&typeof Y=="object"&&(Y.main&&j(v[H],"mainChannel",Pn(Rn(Y.main))),Y.light&&j(v[H],"lightChannel",Pn(Rn(Y.light))),Y.dark&&j(v[H],"darkChannel",Pn(Rn(Y.dark))),Y.contrastText&&j(v[H],"contrastTextChannel",Pn(Rn(Y.contrastText))),H==="text"&&(cr(v[H],"primary"),cr(v[H],"secondary")),H==="action"&&(Y.active&&cr(v[H],"active"),Y.selected&&cr(v[H],"selected")))})}),O=n.reduce((Q,v)=>kt(Q,v),O);const I={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:n0(O),enableContrastVars:i},{vars:W,generateThemeVars:U,generateStyleSheets:$}=Em(O,I);return O.vars=W,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([Q,v])=>{O[Q]=v}),O.generateThemeVars=U,O.generateStyleSheets=$,O.generateSpacing=function(){return Rc(u.spacing,ei(this))},O.getColorSchemeSelector=Tm(c),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},O.unstable_sx=function(v){return qr({sx:v,theme:this})},O.toRuntimeSource=Xc,O}function nl(e,n,t){e.colorSchemes&&t&&(e.colorSchemes[n]={...t!==!0&&t,palette:vi({...t===!0?{}:t.palette,mode:n})})}function c0(e={},...n){const{palette:t,cssVariables:r=!1,colorSchemes:o=t?void 0:{light:!0},defaultColorScheme:a=t?.mode,...i}=e,s=a||"light",c=o?.[s],l={...o,...t?{[s]:{...typeof c!="boolean"&&c,palette:t}}:void 0};if(r===!1){if(!("colorSchemes"in e))return yi(e,...n);let u=t;"palette"in e||l[s]&&(l[s]!==!0?u=l[s].palette:s==="dark"&&(u={mode:"dark"}));const d=yi({...e,palette:u},...n);return d.defaultColorScheme=s,d.colorSchemes=l,d.palette.mode==="light"&&(d.colorSchemes.light={...l.light!==!0&&l.light,palette:d.palette},nl(d,"dark",l.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:d.palette},nl(d,"light",l.light)),d}return!t&&!("light"in l)&&s==="light"&&(l.light=!0),s0({...i,colorSchemes:l,defaultColorScheme:s,...typeof r!="boolean"&&r},...n)}const ol=c0(),al="$$material";function l0(){const e=am(ol);return process.env.NODE_ENV!=="production"&&Z.useDebugValue(e),e[al]||e}function u0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wr=dm({themeId:al,defaultTheme:ol,rootShouldForwardProp:e=>u0(e)&&e!=="classes"}),$n=Sm;process.env.NODE_ENV!=="production"&&(N.node,N.object.isRequired);function _r(e){return xm(e)}function d0(e){return Kt("MuiSvgIcon",e)}yr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const f0=e=>{const{color:n,fontSize:t,classes:r}=e,o={root:["root",n!=="inherit"&&`color${Ct(n)}`,`fontSize${Ct(t)}`]};return gr(o,d0,r)},p0=wr("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,t.color!=="inherit"&&n[`color${Ct(t.color)}`],n[`fontSize${Ct(t.fontSize)}`]]}})($n(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:n=>!n.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,n])=>n&&n.main).map(([n])=>({props:{color:n},style:{color:(e.vars??e).palette?.[n]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Fo=Z.forwardRef(function(n,t){const r=_r({props:n,name:"MuiSvgIcon"}),{children:o,className:a,color:i="inherit",component:s="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...m}=r,g=Z.isValidElement(o)&&o.type==="svg",p={...r,color:i,component:s,fontSize:c,instanceFontSize:n.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:g},b={};u||(b.viewBox=f);const x=f0(p);return h.jsxs(p0,{as:s,className:Be(x.root,a),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:t,...b,...m,...g&&o.props,ownerState:p,children:[g?o.props.children:o,d?h.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Fo.propTypes={children:N.node,classes:N.object,className:N.string,color:N.oneOfType([N.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),N.string]),component:N.elementType,fontSize:N.oneOfType([N.oneOf(["inherit","large","medium","small"]),N.string]),htmlColor:N.string,inheritViewBox:N.bool,shapeRendering:N.string,sx:N.oneOfType([N.arrayOf(N.oneOfType([N.func,N.object,N.bool])),N.func,N.object]),titleAccess:N.string,viewBox:N.string}),Fo.muiName="SvgIcon";function lr(e,n){function t(r,o){return h.jsx(Fo,{"data-testid":process.env.NODE_ENV!=="production"?`${n}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${n}Icon`),t.muiName=Fo.muiName,Z.memo(Z.forwardRef(t))}const h0=lr(h.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),m0=lr(h.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),g0=lr(h.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),v0=({header:e,sidebar:n,mainContent:t})=>{const[r,o]=w.useState(!1),[a,i]=w.useState(!1),s=()=>{o(!r)},c=()=>{i(!a)};return h.jsxs("div",{className:`${Lt.dashboardContainer} ${a?Lt.sidebarCollapsed:""}`,children:[h.jsxs("header",{className:Lt.header,children:[h.jsx(E.IconButton,{onClick:s,className:Lt.menuButton,children:h.jsx(h0,{})}),h.jsx("div",{className:Lt.headerContent,children:e})]}),h.jsxs("aside",{className:`${Lt.sidebar} ${r?Lt.sidebarOpen:""}`,children:[h.jsx("div",{className:Lt.sidebarContent,children:n}),h.jsx(E.IconButton,{onClick:c,className:Lt.collapseButton,style:{display:"none"},children:a?h.jsx(g0,{}):h.jsx(m0,{})})]}),h.jsx("main",{className:Lt.mainContent,children:t}),r&&h.jsx("div",{className:Lt.overlay,onClick:s})]})},Mr={headerContainer:"_headerContainer_9sslw_1",navAndDate:"_navAndDate_9sslw_17",navButton:"_navButton_9sslw_29",datePickerInput:"_datePickerInput_9sslw_61",datePickerButton:"_datePickerButton_9sslw_91",addEventButton:"_addEventButton_9sslw_135"};function Yo(){return typeof window<"u"}function nn(e){return il(e)?(e.nodeName||"").toLowerCase():"#document"}function Tt(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Qt(e){var n;return(n=(il(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function il(e){return Yo()?e instanceof Node||e instanceof Tt(e).Node:!1}function dt(e){return Yo()?e instanceof Element||e instanceof Tt(e).Element:!1}function Jt(e){return Yo()?e instanceof HTMLElement||e instanceof Tt(e).HTMLElement:!1}function sl(e){return!Yo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tt(e).ShadowRoot}const y0=new Set(["inline","contents"]);function jn(e){const{overflow:n,overflowX:t,overflowY:r,display:o}=It(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+t)&&!y0.has(o)}const b0=new Set(["table","td","th"]);function w0(e){return b0.has(nn(e))}const _0=[":popover-open",":modal"];function Ho(e){return _0.some(n=>{try{return e.matches(n)}catch{return!1}})}const x0=["transform","translate","scale","rotate","perspective"],S0=["transform","translate","scale","rotate","perspective","filter"],C0=["paint","layout","strict","content"];function _i(e){const n=xi(),t=dt(e)?It(e):e;return x0.some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||S0.some(r=>(t.willChange||"").includes(r))||C0.some(r=>(t.contain||"").includes(r))}function k0(e){let n=xr(e);for(;Jt(n)&&!on(n);){if(_i(n))return n;if(Ho(n))return null;n=xr(n)}return null}function xi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const D0=new Set(["html","body","#document"]);function on(e){return D0.has(nn(e))}function It(e){return Tt(e).getComputedStyle(e)}function Uo(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xr(e){if(nn(e)==="html")return e;const n=e.assignedSlot||e.parentNode||sl(e)&&e.host||Qt(e);return sl(n)?n.host:n}function cl(e){const n=xr(e);return on(n)?e.ownerDocument?e.ownerDocument.body:e.body:Jt(n)&&jn(n)?n:cl(n)}function Ln(e,n,t){var r;n===void 0&&(n=[]),t===void 0&&(t=!0);const o=cl(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=Tt(o);if(a){const s=Si(i);return n.concat(i,i.visualViewport||[],jn(o)?o:[],s&&t?Ln(s):[])}return n.concat(o,Ln(o,[],t))}function Si(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const an=Math.min,Ar=Math.max,Wo=Math.round,Zo=Math.floor,Xt=e=>({x:e,y:e}),E0={left:"right",right:"left",bottom:"top",top:"bottom"},T0={start:"end",end:"start"};function O0(e,n,t){return Ar(e,an(n,t))}function qo(e,n){return typeof e=="function"?e(n):e}function sn(e){return e.split("-")[0]}function zn(e){return e.split("-")[1]}function M0(e){return e==="x"?"y":"x"}function Ci(e){return e==="y"?"height":"width"}const A0=new Set(["top","bottom"]);function Pr(e){return A0.has(sn(e))?"y":"x"}function ki(e){return M0(Pr(e))}function P0(e,n,t){t===void 0&&(t=!1);const r=zn(e),o=ki(e),a=Ci(o);let i=o==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(i=Ko(i)),[i,Ko(i)]}function I0(e){const n=Ko(e);return[Di(e),n,Di(n)]}function Di(e){return e.replace(/start|end/g,n=>T0[n])}const ll=["left","right"],ul=["right","left"],N0=["top","bottom"],R0=["bottom","top"];function $0(e,n,t){switch(e){case"top":case"bottom":return t?n?ul:ll:n?ll:ul;case"left":case"right":return n?N0:R0;default:return[]}}function j0(e,n,t,r){const o=zn(e);let a=$0(sn(e),t==="start",r);return o&&(a=a.map(i=>i+"-"+o),n&&(a=a.concat(a.map(Di)))),a}function Ko(e){return e.replace(/left|right|bottom|top/g,n=>E0[n])}function L0(e){return{top:0,right:0,bottom:0,left:0,...e}}function dl(e){return typeof e!="number"?L0(e):{top:e,right:e,bottom:e,left:e}}function Go(e){const{x:n,y:t,width:r,height:o}=e;return{width:r,height:o,top:t,left:n,right:n+r,bottom:t+o,x:n,y:t}}var z0=typeof document<"u",B0=function(){},Qo=z0?w.useLayoutEffect:B0;const V0={...Z}.useInsertionEffect||(e=>e());function F0(e){const n=Z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return V0(()=>{n.current=e}),Z.useCallback(function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.current==null?void 0:n.current(...r)},[])}function fl(e,n,t){let{reference:r,floating:o}=e;const a=Pr(n),i=ki(n),s=Ci(i),c=sn(n),l=a==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(zn(n)){case"start":m[i]-=f*(t&&l?-1:1);break;case"end":m[i]+=f*(t&&l?-1:1);break}return m}const Y0=async(e,n,t)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=t,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(n));let l=await i.getElementRects({reference:e,floating:n,strategy:o}),{x:u,y:d}=fl(l,r,c),f=r,m={},g=0;for(let p=0;p<s.length;p++){const{name:b,fn:x}=s[p],{x:S,y:T,data:D,reset:k}=await x({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:n}});u=S??u,d=T??d,m={...m,[b]:{...m[b],...D}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(l=k.rects===!0?await i.getElementRects({reference:e,floating:n,strategy:o}):k.rects),{x:u,y:d}=fl(l,f,c)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};async function H0(e,n){var t;n===void 0&&(n={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=qo(n,e),g=dl(m),b=s[f?d==="floating"?"reference":"floating":d],x=Go(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(b)))==null||t?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),S=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),D=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},k=Go(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:S,offsetParent:T,strategy:c}):S);return{top:(x.top-k.top+g.top)/D.y,bottom:(k.bottom-x.bottom+g.bottom)/D.y,left:(x.left-k.left+g.left)/D.x,right:(k.right-x.right+g.right)/D.x}}const U0=e=>({name:"arrow",options:e,async fn(n){const{x:t,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=n,{element:l,padding:u=0}=qo(e,n)||{};if(l==null)return{};const d=dl(u),f={x:t,y:r},m=ki(o),g=Ci(m),p=await i.getDimensions(l),b=m==="y",x=b?"top":"left",S=b?"bottom":"right",T=b?"clientHeight":"clientWidth",D=a.reference[g]+a.reference[m]-f[m]-a.floating[g],k=f[m]-a.reference[m],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let I=O?O[T]:0;(!I||!await(i.isElement==null?void 0:i.isElement(O)))&&(I=s.floating[T]||a.floating[g]);const W=D/2-k/2,U=I/2-p[g]/2-1,$=an(d[x],U),Q=an(d[S],U),v=$,M=I-p[g]-Q,P=I/2-p[g]/2+W,H=O0(v,P,M),Y=!c.arrow&&zn(o)!=null&&P!==H&&a.reference[g]/2-(P<v?$:Q)-p[g]/2<0,ee=Y?P<v?P-v:P-M:0;return{[m]:f[m]+ee,data:{[m]:H,centerOffset:P-H-ee,...Y&&{alignmentOffset:ee}},reset:Y}}}),W0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var t,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=qo(e,n);if((t=a.arrow)!=null&&t.alignmentOffset)return{};const x=sn(o),S=Pr(s),T=sn(s)===s,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),k=f||(T||!p?[Ko(s)]:I0(s)),O=g!=="none";!f&&O&&k.push(...j0(s,p,g,D));const I=[s,...k],W=await H0(n,b),U=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&U.push(W[x]),d){const P=P0(o,i,D);U.push(W[P[0]],W[P[1]])}if($=[...$,{placement:o,overflows:U}],!U.every(P=>P<=0)){var Q,v;const P=(((Q=a.flip)==null?void 0:Q.index)||0)+1,H=I[P];if(H&&(!(d==="alignment"?S!==Pr(H):!1)||$.every(ae=>Pr(ae.placement)===S?ae.overflows[0]>0:!0)))return{data:{index:P,overflows:$},reset:{placement:H}};let Y=(v=$.filter(ee=>ee.overflows[0]<=0).sort((ee,ae)=>ee.overflows[1]-ae.overflows[1])[0])==null?void 0:v.placement;if(!Y)switch(m){case"bestFit":{var M;const ee=(M=$.filter(ae=>{if(O){const be=Pr(ae.placement);return be===S||be==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(be=>be>0).reduce((be,z)=>be+z,0)]).sort((ae,be)=>ae[1]-be[1])[0])==null?void 0:M[0];ee&&(Y=ee);break}case"initialPlacement":Y=s;break}if(o!==Y)return{reset:{placement:Y}}}return{}}}},Z0=new Set(["left","top"]);async function q0(e,n){const{placement:t,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=sn(t),s=zn(t),c=Pr(t)==="y",l=Z0.has(i)?-1:1,u=a&&c?-1:1,d=qo(n,e);let{mainAxis:f,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(m=s==="end"?g*-1:g),c?{x:m*u,y:f*l}:{x:f*l,y:m*u}}const K0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,r;const{x:o,y:a,placement:i,middlewareData:s}=n,c=await q0(n,e);return i===((t=s.offset)==null?void 0:t.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}};function pl(e){const n=It(e);let t=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=Jt(e),a=o?e.offsetWidth:t,i=o?e.offsetHeight:r,s=Wo(t)!==a||Wo(r)!==i;return s&&(t=a,r=i),{width:t,height:r,$:s}}function Ei(e){return dt(e)?e:e.contextElement}function cn(e){const n=Ei(e);if(!Jt(n))return Xt(1);const t=n.getBoundingClientRect(),{width:r,height:o,$:a}=pl(n);let i=(a?Wo(t.width):t.width)/r,s=(a?Wo(t.height):t.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const G0=Xt(0);function hl(e){const n=Tt(e);return!xi()||!n.visualViewport?G0:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Q0(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Tt(e)?!1:n}function Ir(e,n,t,r){n===void 0&&(n=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),a=Ei(e);let i=Xt(1);n&&(r?dt(r)&&(i=cn(r)):i=cn(e));const s=Q0(a,t,r)?hl(a):Xt(0);let c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const f=Tt(a),m=r&&dt(r)?Tt(r):r;let g=f,p=Si(g);for(;p&&r&&m!==g;){const b=cn(p),x=p.getBoundingClientRect(),S=It(p),T=x.left+(p.clientLeft+parseFloat(S.paddingLeft))*b.x,D=x.top+(p.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,d*=b.y,c+=T,l+=D,g=Tt(p),p=Si(g)}}return Go({width:u,height:d,x:c,y:l})}function Jo(e,n){const t=Uo(e).scrollLeft;return n?n.left+t:Ir(Qt(e)).left+t}function ml(e,n){const t=e.getBoundingClientRect(),r=t.left+n.scrollLeft-Jo(e,t),o=t.top+n.scrollTop;return{x:r,y:o}}function J0(e){let{elements:n,rect:t,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Qt(r),s=n?Ho(n.floating):!1;if(r===i||s&&a)return t;let c={scrollLeft:0,scrollTop:0},l=Xt(1);const u=Xt(0),d=Jt(r);if((d||!d&&!a)&&((nn(r)!=="body"||jn(i))&&(c=Uo(r)),Jt(r))){const m=Ir(r);l=cn(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=i&&!d&&!a?ml(i,c):Xt(0);return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:t.y*l.y-c.scrollTop*l.y+u.y+f.y}}function X0(e){return Array.from(e.getClientRects())}function eg(e){const n=Qt(e),t=Uo(e),r=e.ownerDocument.body,o=Ar(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),a=Ar(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let i=-t.scrollLeft+Jo(e);const s=-t.scrollTop;return It(r).direction==="rtl"&&(i+=Ar(n.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}const gl=25;function tg(e,n){const t=Tt(e),r=Qt(e),o=t.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const u=xi();(!u||u&&n==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const l=Jo(r);if(l<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-m);g<=gl&&(a-=g)}else l<=gl&&(a+=l);return{width:a,height:i,x:s,y:c}}const rg=new Set(["absolute","fixed"]);function ng(e,n){const t=Ir(e,!0,n==="fixed"),r=t.top+e.clientTop,o=t.left+e.clientLeft,a=Jt(e)?cn(e):Xt(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,l=r*a.y;return{width:i,height:s,x:c,y:l}}function vl(e,n,t){let r;if(n==="viewport")r=tg(e,t);else if(n==="document")r=eg(Qt(e));else if(dt(n))r=ng(n,t);else{const o=hl(e);r={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Go(r)}function yl(e,n){const t=xr(e);return t===n||!dt(t)||on(t)?!1:It(t).position==="fixed"||yl(t,n)}function og(e,n){const t=n.get(e);if(t)return t;let r=Ln(e,[],!1).filter(s=>dt(s)&&nn(s)!=="body"),o=null;const a=It(e).position==="fixed";let i=a?xr(e):e;for(;dt(i)&&!on(i);){const s=It(i),c=_i(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&rg.has(o.position)||jn(i)&&!c&&yl(e,i))?r=r.filter(u=>u!==i):o=s,i=xr(i)}return n.set(e,r),r}function ag(e){let{element:n,boundary:t,rootBoundary:r,strategy:o}=e;const i=[...t==="clippingAncestors"?Ho(n)?[]:og(n,this._c):[].concat(t),r],s=i[0],c=i.reduce((l,u)=>{const d=vl(n,u,o);return l.top=Ar(d.top,l.top),l.right=an(d.right,l.right),l.bottom=an(d.bottom,l.bottom),l.left=Ar(d.left,l.left),l},vl(n,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ig(e){const{width:n,height:t}=pl(e);return{width:n,height:t}}function sg(e,n,t){const r=Jt(n),o=Qt(n),a=t==="fixed",i=Ir(e,!0,a,n);let s={scrollLeft:0,scrollTop:0};const c=Xt(0);function l(){c.x=Jo(o)}if(r||!r&&!a)if((nn(n)!=="body"||jn(o))&&(s=Uo(n)),r){const m=Ir(n,!0,a,n);c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}else o&&l();a&&!r&&o&&l();const u=o&&!r&&!a?ml(o,s):Xt(0),d=i.left+s.scrollLeft-c.x-u.x,f=i.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function Ti(e){return It(e).position==="static"}function bl(e,n){if(!Jt(e)||It(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return Qt(e)===t&&(t=t.ownerDocument.body),t}function wl(e,n){const t=Tt(e);if(Ho(e))return t;if(!Jt(e)){let o=xr(e);for(;o&&!on(o);){if(dt(o)&&!Ti(o))return o;o=xr(o)}return t}let r=bl(e,n);for(;r&&w0(r)&&Ti(r);)r=bl(r,n);return r&&on(r)&&Ti(r)&&!_i(r)?t:r||k0(e)||t}const cg=async function(e){const n=this.getOffsetParent||wl,t=this.getDimensions,r=await t(e.floating);return{reference:sg(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lg(e){return It(e).direction==="rtl"}const ug={convertOffsetParentRelativeRectToViewportRelativeRect:J0,getDocumentElement:Qt,getClippingRect:ag,getOffsetParent:wl,getElementRects:cg,getClientRects:X0,getDimensions:ig,getScale:cn,isElement:dt,isRTL:lg};function _l(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function dg(e,n){let t=null,r;const o=Qt(e);function a(){var s;clearTimeout(r),(s=t)==null||s.disconnect(),t=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=l;if(s||n(),!f||!m)return;const g=Zo(d),p=Zo(o.clientWidth-(u+f)),b=Zo(o.clientHeight-(d+m)),x=Zo(u),T={rootMargin:-g+"px "+-p+"px "+-b+"px "+-x+"px",threshold:Ar(0,an(1,c))||1};let D=!0;function k(O){const I=O[0].intersectionRatio;if(I!==c){if(!D)return i();I?i(!1,I):r=setTimeout(()=>{i(!1,1e-7)},1e3)}I===1&&!_l(l,e.getBoundingClientRect())&&i(),D=!1}try{t=new IntersectionObserver(k,{...T,root:o.ownerDocument})}catch{t=new IntersectionObserver(k,T)}t.observe(e)}return i(!0),a}function fg(e,n,t,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Ei(e),u=o||a?[...l?Ln(l):[],...Ln(n)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",t,{passive:!0}),a&&x.addEventListener("resize",t)});const d=l&&s?dg(l,t):null;let f=-1,m=null;i&&(m=new ResizeObserver(x=>{let[S]=x;S&&S.target===l&&m&&(m.unobserve(n),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(n)})),t()}),l&&!c&&m.observe(l),m.observe(n));let g,p=c?Ir(e):null;c&&b();function b(){const x=Ir(e);p&&!_l(p,x)&&t(),p=x,g=requestAnimationFrame(b)}return t(),()=>{var x;u.forEach(S=>{o&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d?.(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const pg=K0,hg=W0,xl=U0,mg=(e,n,t)=>{const r=new Map,o={platform:ug,...t},a={...o.platform,_c:r};return Y0(e,n,{...o,platform:a})};var gg=typeof document<"u",vg=function(){},Xo=gg?w.useLayoutEffect:vg;function ea(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,r,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(r=t;r--!==0;)if(!ea(e[r],n[r]))return!1;return!0}if(o=Object.keys(e),t=o.length,t!==Object.keys(n).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(n,o[r]))return!1;for(r=t;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!ea(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Sl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cl(e,n){const t=Sl(e);return Math.round(n*t)/t}function Oi(e){const n=Z.useRef(e);return Xo(()=>{n.current=e}),n}function yg(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Z.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[f,m]=Z.useState(r);ea(f,r)||m(r);const[g,p]=Z.useState(null),[b,x]=Z.useState(null),S=Z.useCallback(ae=>{ae!==O.current&&(O.current=ae,p(ae))},[]),T=Z.useCallback(ae=>{ae!==I.current&&(I.current=ae,x(ae))},[]),D=a||g,k=i||b,O=Z.useRef(null),I=Z.useRef(null),W=Z.useRef(u),U=c!=null,$=Oi(c),Q=Oi(o),v=Oi(l),M=Z.useCallback(()=>{if(!O.current||!I.current)return;const ae={placement:n,strategy:t,middleware:f};Q.current&&(ae.platform=Q.current),mg(O.current,I.current,ae).then(be=>{const z={...be,isPositioned:v.current!==!1};P.current&&!ea(W.current,z)&&(W.current=z,qf.flushSync(()=>{d(z)}))})},[f,n,t,Q,v]);Xo(()=>{l===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,d(ae=>({...ae,isPositioned:!1})))},[l]);const P=Z.useRef(!1);Xo(()=>(P.current=!0,()=>{P.current=!1}),[]),Xo(()=>{if(D&&(O.current=D),k&&(I.current=k),D&&k){if($.current)return $.current(D,k,M);M()}},[D,k,M,$,U]);const H=Z.useMemo(()=>({reference:O,floating:I,setReference:S,setFloating:T}),[S,T]),Y=Z.useMemo(()=>({reference:D,floating:k}),[D,k]),ee=Z.useMemo(()=>{const ae={position:t,left:0,top:0};if(!Y.floating)return ae;const be=Cl(Y.floating,u.x),z=Cl(Y.floating,u.y);return s?{...ae,transform:"translate("+be+"px, "+z+"px)",...Sl(Y.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:be,top:z}},[t,s,Y.floating,u.x,u.y]);return Z.useMemo(()=>({...u,update:M,refs:H,elements:Y,floatingStyles:ee}),[u,M,H,Y,ee])}const bg=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:r,padding:o}=typeof e=="function"?e(t):e;return r&&n(r)?r.current!=null?xl({element:r.current,padding:o}).fn(t):{}:r?xl({element:r,padding:o}).fn(t):{}}}},wg=(e,n)=>({...pg(e),options:[e,n]}),_g=(e,n)=>({...hg(e),options:[e,n]}),xg=(e,n)=>({...bg(e),options:[e,n]}),Sg={...Z};let kl=!1,Cg=0;const Dl=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Cg++;function kg(){const[e,n]=Z.useState(()=>kl?Dl():void 0);return Qo(()=>{e==null&&n(Dl())},[]),Z.useEffect(()=>{kl=!0},[]),e}const El=Sg.useId||kg;let Bn;process.env.NODE_ENV!=="production"&&(Bn=new Set);function Dg(){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];const o="Floating UI: "+t.join(" ");if(!((e=Bn)!=null&&e.has(o))){var a;(a=Bn)==null||a.add(o),console.warn(o)}}function Eg(){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];const o="Floating UI: "+t.join(" ");if(!((e=Bn)!=null&&e.has(o))){var a;(a=Bn)==null||a.add(o),console.error(o)}}const Tg=Z.forwardRef(function(n,t){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:c=7,tipRadius:l=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:m,style:{transform:g,...p}={},...b}=n;process.env.NODE_ENV!=="production"&&(t||Dg("The `ref` prop is required for `FloatingArrow`."));const x=El(),[S,T]=Z.useState(!1);if(Qo(()=>{if(!o)return;It(o).direction==="rtl"&&T(!0)},[o]),!o)return null;const[D,k]=r.split("-"),O=D==="top"||D==="bottom";let I=d;(O&&i!=null&&i.x||!O&&i!=null&&i.y)&&(I=null);const W=u*2,U=W/2,$=s/2*(l/-8+1),Q=c/2*l/4,v=!!m,M=I&&k==="end"?"bottom":"top";let P=I&&k==="end"?"right":"left";I&&S&&(P=k==="end"?"left":"right");const H=a?.x!=null?I||a.x:"",Y=a?.y!=null?I||a.y:"",ee=m||"M0,0"+(" H"+s)+(" L"+(s-$)+","+(c-Q))+(" Q"+s/2+","+c+" "+$+","+(c-Q))+" Z",ae={top:v?"rotate(180deg)":"",left:v?"rotate(90deg)":"rotate(-90deg)",bottom:v?"":"rotate(180deg)",right:v?"rotate(-90deg)":"rotate(90deg)"}[D];return h.jsxs("svg",{...b,"aria-hidden":!0,ref:t,width:v?s:s+W,height:s,viewBox:"0 0 "+s+" "+(c>s?c:s),style:{position:"absolute",pointerEvents:"none",[P]:H,[M]:Y,[D]:O||v?"100%":"calc(100% - "+W/2+"px)",transform:[ae,g].filter(be=>!!be).join(" "),...p},children:[W>0&&h.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:f,strokeWidth:W+(m?0:1),d:ee}),h.jsx("path",{stroke:W&&!m?b.fill:"none",d:ee}),h.jsx("clipPath",{id:x,children:h.jsx("rect",{x:-U,y:U*(v?-1:1),width:s+W,height:s})})]})});function Og(){const e=new Map;return{emit(n,t){var r;(r=e.get(n))==null||r.forEach(o=>o(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;(r=e.get(n))==null||r.delete(t)}}}const Mg=Z.createContext(null),Ag=Z.createContext(null),Pg=()=>{var e;return((e=Z.useContext(Mg))==null?void 0:e.id)||null},Ig=()=>Z.useContext(Ag);function Ng(e){const{open:n=!1,onOpenChange:t,elements:r}=e,o=El(),a=Z.useRef({}),[i]=Z.useState(()=>Og()),s=Pg()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!dt(m)&&Eg("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=Z.useState(r.reference),u=F0((m,g,p)=>{a.current.openEvent=m?g:void 0,i.emit("openchange",{open:m,event:g,reason:p,nested:s}),t?.(m,g,p)}),d=Z.useMemo(()=>({setPositionReference:l}),[]),f=Z.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return Z.useMemo(()=>({dataRef:a,open:n,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[n,u,f,i,o,d])}function Rg(e){e===void 0&&(e={});const{nodeId:n}=e,t=Ng({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,o=r.elements,[a,i]=Z.useState(null),[s,c]=Z.useState(null),u=o?.domReference||a,d=Z.useRef(null),f=Ig();Qo(()=>{u&&(d.current=u)},[u]);const m=yg({...e,elements:{...o,...s&&{reference:s}}}),g=Z.useCallback(T=>{const D=dt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;c(D),m.refs.setReference(D)},[m.refs]),p=Z.useCallback(T=>{(dt(T)||T===null)&&(d.current=T,i(T)),(dt(m.refs.reference.current)||m.refs.reference.current===null||T!==null&&!dt(T))&&m.refs.setReference(T)},[m.refs]),b=Z.useMemo(()=>({...m.refs,setReference:p,setPositionReference:g,domReference:d}),[m.refs,p,g]),x=Z.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),S=Z.useMemo(()=>({...m,...r,refs:b,elements:x,nodeId:n}),[m,b,x,n,r]);return Qo(()=>{r.dataRef.current.floatingContext=S;const T=f?.nodesRef.current.find(D=>D.id===n);T&&(T.context=S)}),Z.useMemo(()=>({...m,context:S,refs:b,elements:x}),[m,b,x,S])}/*!
|
|
101
|
+
export default theme;`}function nl(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const tg=e=>{if(!Number.isNaN(+e))return+e;const n=e.match(/\d*\.?\d+/g);if(!n)return 0;let t=0;for(let r=0;r<n.length;r+=1)t+=+n[r];return t};function rg(e){Object.assign(e,{alpha(n,t){const r=this||e;return r.colorSpace?`oklch(from ${n} l c h / ${typeof t=="string"?`calc(${t})`:t})`:r.vars?`rgba(${n.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof t=="string"?`calc(${t})`:t})`:Lo(n,tg(t))},lighten(n,t){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${n}, #fff ${nl(t)})`:Bo(n,t)},darken(n,t){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${n}, #000 ${nl(t)})`:zo(n,t)}})}function ya(e={},...n){const{breakpoints:t,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:c,colorSpace:l,...u}=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.":gr(20));const d=va({...i,colorSpace:l}),f=ua(e);let m=Dt(f,{mixins:Fm(f.breakpoints,r),palette:d,shadows:qm.slice(),typography:Hm(d,s),transitions:Jm(a),zIndex:{...Xm}});if(m=Dt(m,u),m=n.reduce((g,p)=>Dt(g,p),m),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],p=(b,S)=>{let x;for(x in b){const T=b[x];if(g.includes(x)&&Object.keys(T).length>0){if(process.env.NODE_ENV!=="production"){const D=Qt("",x);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${x}\` internal state.`,"You can not override it like this: ",JSON.stringify(b,null,2),"",`Instead, you need to use the '&.${D}' syntax:`,JSON.stringify({root:{[`&.${D}`]:T}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
102
|
+
`))}b[x]={}}}};Object.keys(m.components).forEach(b=>{const S=m.components[b].styleOverrides;S&&b.startsWith("Mui")&&p(S,b)})}return m.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},m.unstable_sx=function(p){return qr({sx:p,theme:this})},m.toRuntimeSource=rl,rg(m),m}function ba(e){let n;return e<1?n=5.11916*e**2:n=4.5*Math.log(e+1)+2,Math.round(n*10)/1e3}const ng=[...Array(25)].map((e,n)=>{if(n===0)return"none";const t=ba(n);return`linear-gradient(rgba(255 255 255 / ${t}), rgba(255 255 255 / ${t}))`});function ol(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function il(e){return e==="dark"?ng:[]}function og(e){const{palette:n={mode:"light"},opacity:t,overlays:r,colorSpace:o,...i}=e,a=va({...n,colorSpace:o});return{palette:a,opacity:{...ol(a.mode),...t},overlays:r||il(a.mode),...i}}function ig(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const ag=e=>[...[...Array(25)].map((n,t)=>`--${e?`${e}-`:""}overlays-${t}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],sg=e=>(n,t)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===n){if(n==="dark"){const a={};return ag(e.cssVarPrefix).forEach(s=>{a[s]=t[s],delete t[s]}),i==="media"?{[r]:t,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",n)]:a,[`${r}, ${i.replace("%s",n)}`]:t}:{[r]:{...t,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(n))}`}else if(n){if(i==="media")return{[`@media (prefers-color-scheme: ${String(n)})`]:{[r]:t}};if(i)return i.replace("%s",String(n))}return r};function cg(e,n){n.forEach(t=>{e[t]||(e[t]={})})}function j(e,n,t){!e[n]&&t&&(e[n]=t)}function Rn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Hc(e)}function ur(e,n){`${n}Channel`in e||(e[`${n}Channel`]=Pn(Rn(e[n]),`MUI: Can't create \`palette.${n}Channel\` because \`palette.${n}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
103
|
+
To suppress this warning, you need to explicitly provide the \`palette.${n}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function lg(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Jt=e=>{try{return e()}catch{}},ug=(e="mui")=>Tm(e);function wa(e,n,t,r,o){if(!t)return;t=t===!0?{}:t;const i=o==="dark"?"dark":"light";if(!r){n[o]=og({...t,palette:{mode:i,...t?.palette},colorSpace:e});return}const{palette:a,...s}=ya({...r,palette:{mode:i,...t?.palette},colorSpace:e});return n[o]={...t,palette:a,opacity:{...ol(i),...t?.opacity},overlays:t?.overlays||il(i)},s}function dg(e={},...n){const{colorSchemes:t={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=ig,colorSchemeSelector:c=t.light&&t.dark?"media":void 0,rootSelector:l=":root",...u}=e,d=Object.keys(t)[0],f=r||(t.light&&d!=="light"?"light":d),m=ug(i),{[f]:g,light:p,dark:b,...S}=t,x={...S};let T=g;if((f==="dark"&&!("dark"in t)||f==="light"&&!("light"in t))&&(T=!0),!T)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:gr(21,f));let D;a&&(D="oklch");const k=wa(D,x,T,u,f);p&&!x.light&&wa(D,x,p,void 0,"light"),b&&!x.dark&&wa(D,x,b,void 0,"dark");let O={defaultColorScheme:f,...k,cssVarPrefix:i,colorSchemeSelector:c,rootSelector:l,getCssVar:m,colorSchemes:x,font:{...Vm(k.typography),...k.font},spacing:lg(u.spacing)};Object.keys(O.colorSchemes).forEach(K=>{const v=O.colorSchemes[K].palette,$=L=>{const Y=L.split("-"),J=Y[1],oe=Y[2];return m(L,v[J][oe])};v.mode==="light"&&(j(v.common,"background","#fff"),j(v.common,"onBackground","#000")),v.mode==="dark"&&(j(v.common,"background","#000"),j(v.common,"onBackground","#fff"));function M(L,Y,J){if(D){let oe;return L===Mr&&(oe=`transparent ${((1-J)*100).toFixed(0)}%`),L===Ne&&(oe=`#000 ${(J*100).toFixed(0)}%`),L===Re&&(oe=`#fff ${(J*100).toFixed(0)}%`),`color-mix(in ${D}, ${Y}, ${oe})`}return L(Y,J)}if(cg(v,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),v.mode==="light"){j(v.Alert,"errorColor",M(Ne,v.error.light,.6)),j(v.Alert,"infoColor",M(Ne,v.info.light,.6)),j(v.Alert,"successColor",M(Ne,v.success.light,.6)),j(v.Alert,"warningColor",M(Ne,v.warning.light,.6)),j(v.Alert,"errorFilledBg",$("palette-error-main")),j(v.Alert,"infoFilledBg",$("palette-info-main")),j(v.Alert,"successFilledBg",$("palette-success-main")),j(v.Alert,"warningFilledBg",$("palette-warning-main")),j(v.Alert,"errorFilledColor",Jt(()=>v.getContrastText(v.error.main))),j(v.Alert,"infoFilledColor",Jt(()=>v.getContrastText(v.info.main))),j(v.Alert,"successFilledColor",Jt(()=>v.getContrastText(v.success.main))),j(v.Alert,"warningFilledColor",Jt(()=>v.getContrastText(v.warning.main))),j(v.Alert,"errorStandardBg",M(Re,v.error.light,.9)),j(v.Alert,"infoStandardBg",M(Re,v.info.light,.9)),j(v.Alert,"successStandardBg",M(Re,v.success.light,.9)),j(v.Alert,"warningStandardBg",M(Re,v.warning.light,.9)),j(v.Alert,"errorIconColor",$("palette-error-main")),j(v.Alert,"infoIconColor",$("palette-info-main")),j(v.Alert,"successIconColor",$("palette-success-main")),j(v.Alert,"warningIconColor",$("palette-warning-main")),j(v.AppBar,"defaultBg",$("palette-grey-100")),j(v.Avatar,"defaultBg",$("palette-grey-400")),j(v.Button,"inheritContainedBg",$("palette-grey-300")),j(v.Button,"inheritContainedHoverBg",$("palette-grey-A100")),j(v.Chip,"defaultBorder",$("palette-grey-400")),j(v.Chip,"defaultAvatarColor",$("palette-grey-700")),j(v.Chip,"defaultIconColor",$("palette-grey-700")),j(v.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(v.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(v.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(v.LinearProgress,"primaryBg",M(Re,v.primary.main,.62)),j(v.LinearProgress,"secondaryBg",M(Re,v.secondary.main,.62)),j(v.LinearProgress,"errorBg",M(Re,v.error.main,.62)),j(v.LinearProgress,"infoBg",M(Re,v.info.main,.62)),j(v.LinearProgress,"successBg",M(Re,v.success.main,.62)),j(v.LinearProgress,"warningBg",M(Re,v.warning.main,.62)),j(v.Skeleton,"bg",D?M(Mr,v.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),j(v.Slider,"primaryTrack",M(Re,v.primary.main,.62)),j(v.Slider,"secondaryTrack",M(Re,v.secondary.main,.62)),j(v.Slider,"errorTrack",M(Re,v.error.main,.62)),j(v.Slider,"infoTrack",M(Re,v.info.main,.62)),j(v.Slider,"successTrack",M(Re,v.success.main,.62)),j(v.Slider,"warningTrack",M(Re,v.warning.main,.62));const L=D?M(Ne,v.background.default,.6825):Vo(v.background.default,.8);j(v.SnackbarContent,"bg",L),j(v.SnackbarContent,"color",Jt(()=>D?ga.text.primary:v.getContrastText(L))),j(v.SpeedDialAction,"fabHoverBg",Vo(v.background.paper,.15)),j(v.StepConnector,"border",$("palette-grey-400")),j(v.StepContent,"border",$("palette-grey-400")),j(v.Switch,"defaultColor",$("palette-common-white")),j(v.Switch,"defaultDisabledColor",$("palette-grey-100")),j(v.Switch,"primaryDisabledColor",M(Re,v.primary.main,.62)),j(v.Switch,"secondaryDisabledColor",M(Re,v.secondary.main,.62)),j(v.Switch,"errorDisabledColor",M(Re,v.error.main,.62)),j(v.Switch,"infoDisabledColor",M(Re,v.info.main,.62)),j(v.Switch,"successDisabledColor",M(Re,v.success.main,.62)),j(v.Switch,"warningDisabledColor",M(Re,v.warning.main,.62)),j(v.TableCell,"border",M(Re,M(Mr,v.divider,1),.88)),j(v.Tooltip,"bg",M(Mr,v.grey[700],.92))}if(v.mode==="dark"){j(v.Alert,"errorColor",M(Re,v.error.light,.6)),j(v.Alert,"infoColor",M(Re,v.info.light,.6)),j(v.Alert,"successColor",M(Re,v.success.light,.6)),j(v.Alert,"warningColor",M(Re,v.warning.light,.6)),j(v.Alert,"errorFilledBg",$("palette-error-dark")),j(v.Alert,"infoFilledBg",$("palette-info-dark")),j(v.Alert,"successFilledBg",$("palette-success-dark")),j(v.Alert,"warningFilledBg",$("palette-warning-dark")),j(v.Alert,"errorFilledColor",Jt(()=>v.getContrastText(v.error.dark))),j(v.Alert,"infoFilledColor",Jt(()=>v.getContrastText(v.info.dark))),j(v.Alert,"successFilledColor",Jt(()=>v.getContrastText(v.success.dark))),j(v.Alert,"warningFilledColor",Jt(()=>v.getContrastText(v.warning.dark))),j(v.Alert,"errorStandardBg",M(Ne,v.error.light,.9)),j(v.Alert,"infoStandardBg",M(Ne,v.info.light,.9)),j(v.Alert,"successStandardBg",M(Ne,v.success.light,.9)),j(v.Alert,"warningStandardBg",M(Ne,v.warning.light,.9)),j(v.Alert,"errorIconColor",$("palette-error-main")),j(v.Alert,"infoIconColor",$("palette-info-main")),j(v.Alert,"successIconColor",$("palette-success-main")),j(v.Alert,"warningIconColor",$("palette-warning-main")),j(v.AppBar,"defaultBg",$("palette-grey-900")),j(v.AppBar,"darkBg",$("palette-background-paper")),j(v.AppBar,"darkColor",$("palette-text-primary")),j(v.Avatar,"defaultBg",$("palette-grey-600")),j(v.Button,"inheritContainedBg",$("palette-grey-800")),j(v.Button,"inheritContainedHoverBg",$("palette-grey-700")),j(v.Chip,"defaultBorder",$("palette-grey-700")),j(v.Chip,"defaultAvatarColor",$("palette-grey-300")),j(v.Chip,"defaultIconColor",$("palette-grey-300")),j(v.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(v.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(v.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(v.LinearProgress,"primaryBg",M(Ne,v.primary.main,.5)),j(v.LinearProgress,"secondaryBg",M(Ne,v.secondary.main,.5)),j(v.LinearProgress,"errorBg",M(Ne,v.error.main,.5)),j(v.LinearProgress,"infoBg",M(Ne,v.info.main,.5)),j(v.LinearProgress,"successBg",M(Ne,v.success.main,.5)),j(v.LinearProgress,"warningBg",M(Ne,v.warning.main,.5)),j(v.Skeleton,"bg",D?M(Mr,v.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),j(v.Slider,"primaryTrack",M(Ne,v.primary.main,.5)),j(v.Slider,"secondaryTrack",M(Ne,v.secondary.main,.5)),j(v.Slider,"errorTrack",M(Ne,v.error.main,.5)),j(v.Slider,"infoTrack",M(Ne,v.info.main,.5)),j(v.Slider,"successTrack",M(Ne,v.success.main,.5)),j(v.Slider,"warningTrack",M(Ne,v.warning.main,.5));const L=D?M(Re,v.background.default,.985):Vo(v.background.default,.98);j(v.SnackbarContent,"bg",L),j(v.SnackbarContent,"color",Jt(()=>D?Kc.text.primary:v.getContrastText(L))),j(v.SpeedDialAction,"fabHoverBg",Vo(v.background.paper,.15)),j(v.StepConnector,"border",$("palette-grey-600")),j(v.StepContent,"border",$("palette-grey-600")),j(v.Switch,"defaultColor",$("palette-grey-300")),j(v.Switch,"defaultDisabledColor",$("palette-grey-600")),j(v.Switch,"primaryDisabledColor",M(Ne,v.primary.main,.55)),j(v.Switch,"secondaryDisabledColor",M(Ne,v.secondary.main,.55)),j(v.Switch,"errorDisabledColor",M(Ne,v.error.main,.55)),j(v.Switch,"infoDisabledColor",M(Ne,v.info.main,.55)),j(v.Switch,"successDisabledColor",M(Ne,v.success.main,.55)),j(v.Switch,"warningDisabledColor",M(Ne,v.warning.main,.55)),j(v.TableCell,"border",M(Ne,M(Mr,v.divider,1),.68)),j(v.Tooltip,"bg",M(Mr,v.grey[700],.92))}ur(v.background,"default"),ur(v.background,"paper"),ur(v.common,"background"),ur(v.common,"onBackground"),ur(v,"divider"),Object.keys(v).forEach(L=>{const Y=v[L];L!=="tonalOffset"&&Y&&typeof Y=="object"&&(Y.main&&j(v[L],"mainChannel",Pn(Rn(Y.main))),Y.light&&j(v[L],"lightChannel",Pn(Rn(Y.light))),Y.dark&&j(v[L],"darkChannel",Pn(Rn(Y.dark))),Y.contrastText&&j(v[L],"contrastTextChannel",Pn(Rn(Y.contrastText))),L==="text"&&(ur(v[L],"primary"),ur(v[L],"secondary")),L==="action"&&(Y.active&&ur(v[L],"active"),Y.selected&&ur(v[L],"selected")))})}),O=n.reduce((K,v)=>Dt(K,v),O);const R={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:sg(O),enableContrastVars:a},{vars:U,generateThemeVars:H,generateStyleSheets:V}=Am(O,R);return O.vars=U,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([K,v])=>{O[K]=v}),O.generateThemeVars=H,O.generateStyleSheets=V,O.generateSpacing=function(){return Lc(u.spacing,ea(this))},O.getColorSchemeSelector=Pm(c),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Eo,...u?.unstable_sxConfig},O.unstable_sx=function(v){return qr({sx:v,theme:this})},O.toRuntimeSource=rl,O}function al(e,n,t){e.colorSchemes&&t&&(e.colorSchemes[n]={...t!==!0&&t,palette:va({...t===!0?{}:t.palette,mode:n})})}function fg(e={},...n){const{palette:t,cssVariables:r=!1,colorSchemes:o=t?void 0:{light:!0},defaultColorScheme:i=t?.mode,...a}=e,s=i||"light",c=o?.[s],l={...o,...t?{[s]:{...typeof c!="boolean"&&c,palette:t}}:void 0};if(r===!1){if(!("colorSchemes"in e))return ya(e,...n);let u=t;"palette"in e||l[s]&&(l[s]!==!0?u=l[s].palette:s==="dark"&&(u={mode:"dark"}));const d=ya({...e,palette:u},...n);return d.defaultColorScheme=s,d.colorSchemes=l,d.palette.mode==="light"&&(d.colorSchemes.light={...l.light!==!0&&l.light,palette:d.palette},al(d,"dark",l.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:d.palette},al(d,"light",l.light)),d}return!t&&!("light"in l)&&s==="light"&&(l.light=!0),dg({...a,colorSchemes:l,defaultColorScheme:s,...typeof r!="boolean"&&r},...n)}const sl=fg(),cl="$$material";function pg(){const e=lm(sl);return process.env.NODE_ENV!=="production"&&W.useDebugValue(e),e[cl]||e}function hg(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const _r=mm({themeId:cl,defaultTheme:sl,rootShouldForwardProp:e=>hg(e)&&e!=="classes"}),$n=Em;process.env.NODE_ENV!=="production"&&(I.node,I.object.isRequired);function xr(e){return Dm(e)}function mg(e){return Qt("MuiSvgIcon",e)}br("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const gg=e=>{const{color:n,fontSize:t,classes:r}=e,o={root:["root",n!=="inherit"&&`color${kt(n)}`,`fontSize${kt(t)}`]};return vr(o,mg,r)},vg=_r("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,t.color!=="inherit"&&n[`color${kt(t.color)}`],n[`fontSize${kt(t.fontSize)}`]]}})($n(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:n=>!n.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,n])=>n&&n.main).map(([n])=>({props:{color:n},style:{color:(e.vars??e).palette?.[n]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Fo=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...m}=r,g=W.isValidElement(o)&&o.type==="svg",p={...r,color:a,component:s,fontSize:c,instanceFontSize:n.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:g},b={};u||(b.viewBox=f);const S=gg(p);return h.jsxs(vg,{as:s,className:Ve(S.root,i),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:t,...b,...m,...g&&o.props,ownerState:p,children:[g?o.props.children:o,d?h.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Fo.propTypes={children:I.node,classes:I.object,className:I.string,color:I.oneOfType([I.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),I.string]),component:I.elementType,fontSize:I.oneOfType([I.oneOf(["inherit","large","medium","small"]),I.string]),htmlColor:I.string,inheritViewBox:I.bool,shapeRendering:I.string,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object]),titleAccess:I.string,viewBox:I.string}),Fo.muiName="SvgIcon";function Xt(e,n){function t(r,o){return h.jsx(Fo,{"data-testid":process.env.NODE_ENV!=="production"?`${n}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${n}Icon`),t.muiName=Fo.muiName,W.memo(W.forwardRef(t))}const yg=Xt(h.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),bg=Xt(h.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),wg=Xt(h.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),_g=({header:e,sidebar:n,mainContent:t})=>{const[r,o]=w.useState(!1),[i,a]=w.useState(!1),s=()=>{o(!r)},c=()=>{a(!i)};return h.jsxs("div",{className:`${Bt.dashboardContainer} ${i?Bt.sidebarCollapsed:""}`,children:[h.jsxs("header",{className:Bt.header,children:[h.jsx(E.IconButton,{onClick:s,className:Bt.menuButton,children:h.jsx(yg,{})}),h.jsx("div",{className:Bt.headerContent,children:e})]}),h.jsxs("aside",{className:`${Bt.sidebar} ${r?Bt.sidebarOpen:""}`,children:[h.jsx("div",{className:Bt.sidebarContent,children:n}),h.jsx(E.IconButton,{onClick:c,className:Bt.collapseButton,style:{display:"none"},children:i?h.jsx(wg,{}):h.jsx(bg,{})})]}),h.jsx("main",{className:Bt.mainContent,children:t}),r&&h.jsx("div",{className:Bt.overlay,onClick:s})]})},Ar={headerContainer:"_headerContainer_9sslw_1",navAndDate:"_navAndDate_9sslw_17",navButton:"_navButton_9sslw_29",datePickerInput:"_datePickerInput_9sslw_61",datePickerButton:"_datePickerButton_9sslw_91",addEventButton:"_addEventButton_9sslw_135"};function Yo(){return typeof window<"u"}function nn(e){return ll(e)?(e.nodeName||"").toLowerCase():"#document"}function Ot(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function er(e){var n;return(n=(ll(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function ll(e){return Yo()?e instanceof Node||e instanceof Ot(e).Node:!1}function pt(e){return Yo()?e instanceof Element||e instanceof Ot(e).Element:!1}function tr(e){return Yo()?e instanceof HTMLElement||e instanceof Ot(e).HTMLElement:!1}function ul(e){return!Yo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ot(e).ShadowRoot}const xg=new Set(["inline","contents"]);function jn(e){const{overflow:n,overflowX:t,overflowY:r,display:o}=Rt(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+t)&&!xg.has(o)}const Sg=new Set(["table","td","th"]);function Cg(e){return Sg.has(nn(e))}const kg=[":popover-open",":modal"];function Ho(e){return kg.some(n=>{try{return e.matches(n)}catch{return!1}})}const Dg=["transform","translate","scale","rotate","perspective"],Eg=["transform","translate","scale","rotate","perspective","filter"],Tg=["paint","layout","strict","content"];function _a(e){const n=xa(),t=pt(e)?Rt(e):e;return Dg.some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||Eg.some(r=>(t.willChange||"").includes(r))||Tg.some(r=>(t.contain||"").includes(r))}function Og(e){let n=Sr(e);for(;tr(n)&&!on(n);){if(_a(n))return n;if(Ho(n))return null;n=Sr(n)}return null}function xa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Mg=new Set(["html","body","#document"]);function on(e){return Mg.has(nn(e))}function Rt(e){return Ot(e).getComputedStyle(e)}function Uo(e){return pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sr(e){if(nn(e)==="html")return e;const n=e.assignedSlot||e.parentNode||ul(e)&&e.host||er(e);return ul(n)?n.host:n}function dl(e){const n=Sr(e);return on(n)?e.ownerDocument?e.ownerDocument.body:e.body:tr(n)&&jn(n)?n:dl(n)}function Ln(e,n,t){var r;n===void 0&&(n=[]),t===void 0&&(t=!0);const o=dl(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ot(o);if(i){const s=Sa(a);return n.concat(a,a.visualViewport||[],jn(o)?o:[],s&&t?Ln(s):[])}return n.concat(o,Ln(o,[],t))}function Sa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const an=Math.min,Pr=Math.max,Wo=Math.round,Zo=Math.floor,rr=e=>({x:e,y:e}),Ag={left:"right",right:"left",bottom:"top",top:"bottom"},Pg={start:"end",end:"start"};function Ig(e,n,t){return Pr(e,an(n,t))}function qo(e,n){return typeof e=="function"?e(n):e}function sn(e){return e.split("-")[0]}function zn(e){return e.split("-")[1]}function Ng(e){return e==="x"?"y":"x"}function Ca(e){return e==="y"?"height":"width"}const Rg=new Set(["top","bottom"]);function Ir(e){return Rg.has(sn(e))?"y":"x"}function ka(e){return Ng(Ir(e))}function $g(e,n,t){t===void 0&&(t=!1);const r=zn(e),o=ka(e),i=Ca(o);let a=o==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return n.reference[i]>n.floating[i]&&(a=Ko(a)),[a,Ko(a)]}function jg(e){const n=Ko(e);return[Da(e),n,Da(n)]}function Da(e){return e.replace(/start|end/g,n=>Pg[n])}const fl=["left","right"],pl=["right","left"],Lg=["top","bottom"],zg=["bottom","top"];function Bg(e,n,t){switch(e){case"top":case"bottom":return t?n?pl:fl:n?fl:pl;case"left":case"right":return n?Lg:zg;default:return[]}}function Vg(e,n,t,r){const o=zn(e);let i=Bg(sn(e),t==="start",r);return o&&(i=i.map(a=>a+"-"+o),n&&(i=i.concat(i.map(Da)))),i}function Ko(e){return e.replace(/left|right|bottom|top/g,n=>Ag[n])}function Fg(e){return{top:0,right:0,bottom:0,left:0,...e}}function hl(e){return typeof e!="number"?Fg(e):{top:e,right:e,bottom:e,left:e}}function Go(e){const{x:n,y:t,width:r,height:o}=e;return{width:r,height:o,top:t,left:n,right:n+r,bottom:t+o,x:n,y:t}}var Yg=typeof document<"u",Hg=function(){},Qo=Yg?w.useLayoutEffect:Hg;const Ug={...W}.useInsertionEffect||(e=>e());function Wg(e){const n=W.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ug(()=>{n.current=e}),W.useCallback(function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.current==null?void 0:n.current(...r)},[])}function ml(e,n,t){let{reference:r,floating:o}=e;const i=Ir(n),a=ka(n),s=Ca(a),c=sn(n),l=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(zn(n)){case"start":m[a]-=f*(t&&l?-1:1);break;case"end":m[a]+=f*(t&&l?-1:1);break}return m}const Zg=async(e,n,t)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=t,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(n));let l=await a.getElementRects({reference:e,floating:n,strategy:o}),{x:u,y:d}=ml(l,r,c),f=r,m={},g=0;for(let p=0;p<s.length;p++){const{name:b,fn:S}=s[p],{x,y:T,data:D,reset:k}=await S({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:n}});u=x??u,d=T??d,m={...m,[b]:{...m[b],...D}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:o}):k.rects),{x:u,y:d}=ml(l,f,c)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};async function qg(e,n){var t;n===void 0&&(n={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=qo(n,e),g=hl(m),b=s[f?d==="floating"?"reference":"floating":d],S=Go(await i.getClippingRect({element:(t=await(i.isElement==null?void 0:i.isElement(b)))==null||t?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),x=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),D=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},k=Go(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:T,strategy:c}):x);return{top:(S.top-k.top+g.top)/D.y,bottom:(k.bottom-S.bottom+g.bottom)/D.y,left:(S.left-k.left+g.left)/D.x,right:(k.right-S.right+g.right)/D.x}}const Kg=e=>({name:"arrow",options:e,async fn(n){const{x:t,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=n,{element:l,padding:u=0}=qo(e,n)||{};if(l==null)return{};const d=hl(u),f={x:t,y:r},m=ka(o),g=Ca(m),p=await a.getDimensions(l),b=m==="y",S=b?"top":"left",x=b?"bottom":"right",T=b?"clientHeight":"clientWidth",D=i.reference[g]+i.reference[m]-f[m]-i.floating[g],k=f[m]-i.reference[m],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=O?O[T]:0;(!R||!await(a.isElement==null?void 0:a.isElement(O)))&&(R=s.floating[T]||i.floating[g]);const U=D/2-k/2,H=R/2-p[g]/2-1,V=an(d[S],H),K=an(d[x],H),v=V,$=R-p[g]-K,M=R/2-p[g]/2+U,L=Ig(v,M,$),Y=!c.arrow&&zn(o)!=null&&M!==L&&i.reference[g]/2-(M<v?V:K)-p[g]/2<0,J=Y?M<v?M-v:M-$:0;return{[m]:f[m]+J,data:{[m]:L,centerOffset:M-L-J,...Y&&{alignmentOffset:J}},reset:Y}}}),Gg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var t,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=qo(e,n);if((t=i.arrow)!=null&&t.alignmentOffset)return{};const S=sn(o),x=Ir(s),T=sn(s)===s,D=await(c.isRTL==null?void 0:c.isRTL(l.floating)),k=f||(T||!p?[Ko(s)]:jg(s)),O=g!=="none";!f&&O&&k.push(...Vg(s,p,g,D));const R=[s,...k],U=await qg(n,b),H=[];let V=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&H.push(U[S]),d){const M=$g(o,a,D);H.push(U[M[0]],U[M[1]])}if(V=[...V,{placement:o,overflows:H}],!H.every(M=>M<=0)){var K,v;const M=(((K=i.flip)==null?void 0:K.index)||0)+1,L=R[M];if(L&&(!(d==="alignment"?x!==Ir(L):!1)||V.every(oe=>Ir(oe.placement)===x?oe.overflows[0]>0:!0)))return{data:{index:M,overflows:V},reset:{placement:L}};let Y=(v=V.filter(J=>J.overflows[0]<=0).sort((J,oe)=>J.overflows[1]-oe.overflows[1])[0])==null?void 0:v.placement;if(!Y)switch(m){case"bestFit":{var $;const J=($=V.filter(oe=>{if(O){const we=Ir(oe.placement);return we===x||we==="y"}return!0}).map(oe=>[oe.placement,oe.overflows.filter(we=>we>0).reduce((we,F)=>we+F,0)]).sort((oe,we)=>oe[1]-we[1])[0])==null?void 0:$[0];J&&(Y=J);break}case"initialPlacement":Y=s;break}if(o!==Y)return{reset:{placement:Y}}}return{}}}},Qg=new Set(["left","top"]);async function Jg(e,n){const{placement:t,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=sn(t),s=zn(t),c=Ir(t)==="y",l=Qg.has(a)?-1:1,u=i&&c?-1:1,d=qo(n,e);let{mainAxis:f,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(m=s==="end"?g*-1:g),c?{x:m*u,y:f*l}:{x:f*l,y:m*u}}const Xg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,r;const{x:o,y:i,placement:a,middlewareData:s}=n,c=await Jg(n,e);return a===((t=s.offset)==null?void 0:t.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}};function gl(e){const n=Rt(e);let t=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const o=tr(e),i=o?e.offsetWidth:t,a=o?e.offsetHeight:r,s=Wo(t)!==i||Wo(r)!==a;return s&&(t=i,r=a),{width:t,height:r,$:s}}function Ea(e){return pt(e)?e:e.contextElement}function cn(e){const n=Ea(e);if(!tr(n))return rr(1);const t=n.getBoundingClientRect(),{width:r,height:o,$:i}=gl(n);let a=(i?Wo(t.width):t.width)/r,s=(i?Wo(t.height):t.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const e0=rr(0);function vl(e){const n=Ot(e);return!xa()||!n.visualViewport?e0:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function t0(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Ot(e)?!1:n}function Nr(e,n,t,r){n===void 0&&(n=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),i=Ea(e);let a=rr(1);n&&(r?pt(r)&&(a=cn(r)):a=cn(e));const s=t0(i,t,r)?vl(i):rr(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=Ot(i),m=r&&pt(r)?Ot(r):r;let g=f,p=Sa(g);for(;p&&r&&m!==g;){const b=cn(p),S=p.getBoundingClientRect(),x=Rt(p),T=S.left+(p.clientLeft+parseFloat(x.paddingLeft))*b.x,D=S.top+(p.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,d*=b.y,c+=T,l+=D,g=Ot(p),p=Sa(g)}}return Go({width:u,height:d,x:c,y:l})}function Jo(e,n){const t=Uo(e).scrollLeft;return n?n.left+t:Nr(er(e)).left+t}function yl(e,n){const t=e.getBoundingClientRect(),r=t.left+n.scrollLeft-Jo(e,t),o=t.top+n.scrollTop;return{x:r,y:o}}function r0(e){let{elements:n,rect:t,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=er(r),s=n?Ho(n.floating):!1;if(r===a||s&&i)return t;let c={scrollLeft:0,scrollTop:0},l=rr(1);const u=rr(0),d=tr(r);if((d||!d&&!i)&&((nn(r)!=="body"||jn(a))&&(c=Uo(r)),tr(r))){const m=Nr(r);l=cn(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=a&&!d&&!i?yl(a,c):rr(0);return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:t.y*l.y-c.scrollTop*l.y+u.y+f.y}}function n0(e){return Array.from(e.getClientRects())}function o0(e){const n=er(e),t=Uo(e),r=e.ownerDocument.body,o=Pr(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),i=Pr(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let a=-t.scrollLeft+Jo(e);const s=-t.scrollTop;return Rt(r).direction==="rtl"&&(a+=Pr(n.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const bl=25;function i0(e,n){const t=Ot(e),r=er(e),o=t.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=xa();(!u||u&&n==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const l=Jo(r);if(l<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-m);g<=bl&&(i-=g)}else l<=bl&&(i+=l);return{width:i,height:a,x:s,y:c}}const a0=new Set(["absolute","fixed"]);function s0(e,n){const t=Nr(e,!0,n==="fixed"),r=t.top+e.clientTop,o=t.left+e.clientLeft,i=tr(e)?cn(e):rr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function wl(e,n,t){let r;if(n==="viewport")r=i0(e,t);else if(n==="document")r=o0(er(e));else if(pt(n))r=s0(n,t);else{const o=vl(e);r={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return Go(r)}function _l(e,n){const t=Sr(e);return t===n||!pt(t)||on(t)?!1:Rt(t).position==="fixed"||_l(t,n)}function c0(e,n){const t=n.get(e);if(t)return t;let r=Ln(e,[],!1).filter(s=>pt(s)&&nn(s)!=="body"),o=null;const i=Rt(e).position==="fixed";let a=i?Sr(e):e;for(;pt(a)&&!on(a);){const s=Rt(a),c=_a(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&a0.has(o.position)||jn(a)&&!c&&_l(e,a))?r=r.filter(u=>u!==a):o=s,a=Sr(a)}return n.set(e,r),r}function l0(e){let{element:n,boundary:t,rootBoundary:r,strategy:o}=e;const a=[...t==="clippingAncestors"?Ho(n)?[]:c0(n,this._c):[].concat(t),r],s=a[0],c=a.reduce((l,u)=>{const d=wl(n,u,o);return l.top=Pr(d.top,l.top),l.right=an(d.right,l.right),l.bottom=an(d.bottom,l.bottom),l.left=Pr(d.left,l.left),l},wl(n,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u0(e){const{width:n,height:t}=gl(e);return{width:n,height:t}}function d0(e,n,t){const r=tr(n),o=er(n),i=t==="fixed",a=Nr(e,!0,i,n);let s={scrollLeft:0,scrollTop:0};const c=rr(0);function l(){c.x=Jo(o)}if(r||!r&&!i)if((nn(n)!=="body"||jn(o))&&(s=Uo(n)),r){const m=Nr(n,!0,i,n);c.x=m.x+n.clientLeft,c.y=m.y+n.clientTop}else o&&l();i&&!r&&o&&l();const u=o&&!r&&!i?yl(o,s):rr(0),d=a.left+s.scrollLeft-c.x-u.x,f=a.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function Ta(e){return Rt(e).position==="static"}function xl(e,n){if(!tr(e)||Rt(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return er(e)===t&&(t=t.ownerDocument.body),t}function Sl(e,n){const t=Ot(e);if(Ho(e))return t;if(!tr(e)){let o=Sr(e);for(;o&&!on(o);){if(pt(o)&&!Ta(o))return o;o=Sr(o)}return t}let r=xl(e,n);for(;r&&Cg(r)&&Ta(r);)r=xl(r,n);return r&&on(r)&&Ta(r)&&!_a(r)?t:r||Og(e)||t}const f0=async function(e){const n=this.getOffsetParent||Sl,t=this.getDimensions,r=await t(e.floating);return{reference:d0(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function p0(e){return Rt(e).direction==="rtl"}const h0={convertOffsetParentRelativeRectToViewportRelativeRect:r0,getDocumentElement:er,getClippingRect:l0,getOffsetParent:Sl,getElementRects:f0,getClientRects:n0,getDimensions:u0,getScale:cn,isElement:pt,isRTL:p0};function Cl(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function m0(e,n){let t=null,r;const o=er(e);function i(){var s;clearTimeout(r),(s=t)==null||s.disconnect(),t=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=l;if(s||n(),!f||!m)return;const g=Zo(d),p=Zo(o.clientWidth-(u+f)),b=Zo(o.clientHeight-(d+m)),S=Zo(u),T={rootMargin:-g+"px "+-p+"px "+-b+"px "+-S+"px",threshold:Pr(0,an(1,c))||1};let D=!0;function k(O){const R=O[0].intersectionRatio;if(R!==c){if(!D)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Cl(l,e.getBoundingClientRect())&&a(),D=!1}try{t=new IntersectionObserver(k,{...T,root:o.ownerDocument})}catch{t=new IntersectionObserver(k,T)}t.observe(e)}return a(!0),i}function g0(e,n,t,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Ea(e),u=o||i?[...l?Ln(l):[],...Ln(n)]:[];u.forEach(S=>{o&&S.addEventListener("scroll",t,{passive:!0}),i&&S.addEventListener("resize",t)});const d=l&&s?m0(l,t):null;let f=-1,m=null;a&&(m=new ResizeObserver(S=>{let[x]=S;x&&x.target===l&&m&&(m.unobserve(n),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(n)})),t()}),l&&!c&&m.observe(l),m.observe(n));let g,p=c?Nr(e):null;c&&b();function b(){const S=Nr(e);p&&!Cl(p,S)&&t(),p=S,g=requestAnimationFrame(b)}return t(),()=>{var S;u.forEach(x=>{o&&x.removeEventListener("scroll",t),i&&x.removeEventListener("resize",t)}),d?.(),(S=m)==null||S.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const v0=Xg,y0=Gg,kl=Kg,b0=(e,n,t)=>{const r=new Map,o={platform:h0,...t},i={...o.platform,_c:r};return Zg(e,n,{...o,platform:i})};var w0=typeof document<"u",_0=function(){},Xo=w0?w.useLayoutEffect:_0;function ei(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,r,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(r=t;r--!==0;)if(!ei(e[r],n[r]))return!1;return!0}if(o=Object.keys(e),t=o.length,t!==Object.keys(n).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(n,o[r]))return!1;for(r=t;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ei(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}function Dl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function El(e,n){const t=Dl(e);return Math.round(n*t)/t}function Oa(e){const n=W.useRef(e);return Xo(()=>{n.current=e}),n}function x0(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[f,m]=W.useState(r);ei(f,r)||m(r);const[g,p]=W.useState(null),[b,S]=W.useState(null),x=W.useCallback(oe=>{oe!==O.current&&(O.current=oe,p(oe))},[]),T=W.useCallback(oe=>{oe!==R.current&&(R.current=oe,S(oe))},[]),D=i||g,k=a||b,O=W.useRef(null),R=W.useRef(null),U=W.useRef(u),H=c!=null,V=Oa(c),K=Oa(o),v=Oa(l),$=W.useCallback(()=>{if(!O.current||!R.current)return;const oe={placement:n,strategy:t,middleware:f};K.current&&(oe.platform=K.current),b0(O.current,R.current,oe).then(we=>{const F={...we,isPositioned:v.current!==!1};M.current&&!ei(U.current,F)&&(U.current=F,Jf.flushSync(()=>{d(F)}))})},[f,n,t,K,v]);Xo(()=>{l===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,d(oe=>({...oe,isPositioned:!1})))},[l]);const M=W.useRef(!1);Xo(()=>(M.current=!0,()=>{M.current=!1}),[]),Xo(()=>{if(D&&(O.current=D),k&&(R.current=k),D&&k){if(V.current)return V.current(D,k,$);$()}},[D,k,$,V,H]);const L=W.useMemo(()=>({reference:O,floating:R,setReference:x,setFloating:T}),[x,T]),Y=W.useMemo(()=>({reference:D,floating:k}),[D,k]),J=W.useMemo(()=>{const oe={position:t,left:0,top:0};if(!Y.floating)return oe;const we=El(Y.floating,u.x),F=El(Y.floating,u.y);return s?{...oe,transform:"translate("+we+"px, "+F+"px)",...Dl(Y.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:we,top:F}},[t,s,Y.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:$,refs:L,elements:Y,floatingStyles:J}),[u,$,L,Y,J])}const S0=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:r,padding:o}=typeof e=="function"?e(t):e;return r&&n(r)?r.current!=null?kl({element:r.current,padding:o}).fn(t):{}:r?kl({element:r,padding:o}).fn(t):{}}}},C0=(e,n)=>({...v0(e),options:[e,n]}),k0=(e,n)=>({...y0(e),options:[e,n]}),D0=(e,n)=>({...S0(e),options:[e,n]}),E0={...W};let Tl=!1,T0=0;const Ol=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+T0++;function O0(){const[e,n]=W.useState(()=>Tl?Ol():void 0);return Qo(()=>{e==null&&n(Ol())},[]),W.useEffect(()=>{Tl=!0},[]),e}const Ml=E0.useId||O0;let Bn;process.env.NODE_ENV!=="production"&&(Bn=new Set);function M0(){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];const o="Floating UI: "+t.join(" ");if(!((e=Bn)!=null&&e.has(o))){var i;(i=Bn)==null||i.add(o),console.warn(o)}}function A0(){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];const o="Floating UI: "+t.join(" ");if(!((e=Bn)!=null&&e.has(o))){var i;(i=Bn)==null||i.add(o),console.error(o)}}const P0=W.forwardRef(function(n,t){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:c=7,tipRadius:l=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:m,style:{transform:g,...p}={},...b}=n;process.env.NODE_ENV!=="production"&&(t||M0("The `ref` prop is required for `FloatingArrow`."));const S=Ml(),[x,T]=W.useState(!1);if(Qo(()=>{if(!o)return;Rt(o).direction==="rtl"&&T(!0)},[o]),!o)return null;const[D,k]=r.split("-"),O=D==="top"||D==="bottom";let R=d;(O&&a!=null&&a.x||!O&&a!=null&&a.y)&&(R=null);const U=u*2,H=U/2,V=s/2*(l/-8+1),K=c/2*l/4,v=!!m,$=R&&k==="end"?"bottom":"top";let M=R&&k==="end"?"right":"left";R&&x&&(M=k==="end"?"left":"right");const L=i?.x!=null?R||i.x:"",Y=i?.y!=null?R||i.y:"",J=m||"M0,0"+(" H"+s)+(" L"+(s-V)+","+(c-K))+(" Q"+s/2+","+c+" "+V+","+(c-K))+" Z",oe={top:v?"rotate(180deg)":"",left:v?"rotate(90deg)":"rotate(-90deg)",bottom:v?"":"rotate(180deg)",right:v?"rotate(-90deg)":"rotate(90deg)"}[D];return h.jsxs("svg",{...b,"aria-hidden":!0,ref:t,width:v?s:s+U,height:s,viewBox:"0 0 "+s+" "+(c>s?c:s),style:{position:"absolute",pointerEvents:"none",[M]:L,[$]:Y,[D]:O||v?"100%":"calc(100% - "+U/2+"px)",transform:[oe,g].filter(we=>!!we).join(" "),...p},children:[U>0&&h.jsx("path",{clipPath:"url(#"+S+")",fill:"none",stroke:f,strokeWidth:U+(m?0:1),d:J}),h.jsx("path",{stroke:U&&!m?b.fill:"none",d:J}),h.jsx("clipPath",{id:S,children:h.jsx("rect",{x:-H,y:H*(v?-1:1),width:s+U,height:s})})]})});function I0(){const e=new Map;return{emit(n,t){var r;(r=e.get(n))==null||r.forEach(o=>o(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;(r=e.get(n))==null||r.delete(t)}}}const N0=W.createContext(null),R0=W.createContext(null),$0=()=>{var e;return((e=W.useContext(N0))==null?void 0:e.id)||null},j0=()=>W.useContext(R0);function L0(e){const{open:n=!1,onOpenChange:t,elements:r}=e,o=Ml(),i=W.useRef({}),[a]=W.useState(()=>I0()),s=$0()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!pt(m)&&A0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=W.useState(r.reference),u=Wg((m,g,p)=>{i.current.openEvent=m?g:void 0,a.emit("openchange",{open:m,event:g,reason:p,nested:s}),t?.(m,g,p)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:i,open:n,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[n,u,f,a,o,d])}function z0(e){e===void 0&&(e={});const{nodeId:n}=e,t=L0({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,o=r.elements,[i,a]=W.useState(null),[s,c]=W.useState(null),u=o?.domReference||i,d=W.useRef(null),f=j0();Qo(()=>{u&&(d.current=u)},[u]);const m=x0({...e,elements:{...o,...s&&{reference:s}}}),g=W.useCallback(T=>{const D=pt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;c(D),m.refs.setReference(D)},[m.refs]),p=W.useCallback(T=>{(pt(T)||T===null)&&(d.current=T,a(T)),(pt(m.refs.reference.current)||m.refs.reference.current===null||T!==null&&!pt(T))&&m.refs.setReference(T)},[m.refs]),b=W.useMemo(()=>({...m.refs,setReference:p,setPositionReference:g,domReference:d}),[m.refs,p,g]),S=W.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),x=W.useMemo(()=>({...m,...r,refs:b,elements:S,nodeId:n}),[m,b,S,n,r]);return Qo(()=>{r.dataRef.current.floatingContext=x;const T=f?.nodesRef.current.find(D=>D.id===n);T&&(T.context=x)}),W.useMemo(()=>({...m,context:x,refs:b,elements:S}),[m,b,S,x])}/*!
|
|
104
104
|
react-datepicker v8.7.0
|
|
105
105
|
https://github.com/Hacker0x01/react-datepicker
|
|
106
106
|
Released under the MIT License.
|
|
107
|
-
*/var Mi=function(n,t){return Mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},Mi(n,t)};function ct(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Mi(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}var xe=function(){return xe=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},xe.apply(this,arguments)};function er(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,a;r<o;r++)(a||!(r in n))&&(a||(a=Array.prototype.slice.call(n,0,r)),a[r]=n[r]);return e.concat(a||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var $g=function(e){var n=e.showTimeSelectOnly,t=n===void 0?!1:n,r=e.showTime,o=r===void 0?!1:r,a=e.className,i=e.children,s=t?"Choose Time":"Choose Date".concat(o?" and Time":"");return w.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},jg=function(e,n){var t=w.useRef(null),r=w.useRef(e);r.current=e;var o=w.useCallback(function(a){var i,s=a.composed&&a.composedPath&&a.composedPath().find(function(c){return c instanceof Node})||a.target;t.current&&!t.current.contains(s)&&(n&&s instanceof HTMLElement&&s.classList.contains(n)||(i=r.current)===null||i===void 0||i.call(r,a))},[n]);return w.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),t},ta=function(e){var n=e.children,t=e.onClickOutside,r=e.className,o=e.containerRef,a=e.style,i=e.ignoreClass,s=jg(t,i);return w.createElement("div",{className:r,style:a,ref:function(c){s.current=c,o&&(o.current=c)}},n)},ne;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(ne||(ne={}));function Tl(){var e=typeof window<"u"?window:globalThis;return e}var Vn=12;function Ae(e){if(e==null)return new Date;var n=typeof e=="string"?y.parseISO(e):y.toDate(e);return ra(n)?n:new Date}function Ai(e,n,t,r,o){o===void 0&&(o=Ae());for(var a=ln(t)||ln(Ii()),i=Array.isArray(n)?n:[n],s=0,c=i;s<c.length;s++){var l=c[s],u=y.parse(e,l,o,{locale:a,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(ra(u)&&(!r||e===Ye(u,l,t)))return u}return null}function ra(e,n){return y.isValid(e)&&!y.isBefore(e,new Date("1/1/1800"))}function Ye(e,n,t){if(t==="en")return y.format(e,n,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var r=t?ln(t):void 0;return t&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),r=r||ln(Ii()),y.format(e,n,{locale:r,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Nt(e,n){var t=n.dateFormat,r=n.locale,o=Array.isArray(t)&&t.length>0?t[0]:t;return e&&Ye(e,o,r)||""}var Ol=" - ";function Lg(e,n,t){if(!e&&!n)return"";var r=e?Nt(e,t):"",o=n?Nt(n,t):"",a=t.rangeSeparator||Ol;return"".concat(r).concat(a).concat(o)}function zg(e,n){if(!e?.length)return"";var t=e[0]?Nt(e[0],n):"";if(e.length===1)return t;if(e.length===2&&e[1]){var r=Nt(e[1],n);return"".concat(t,", ").concat(r)}var o=e.length-1;return"".concat(t," (+").concat(o,")")}function Pi(e,n){var t=n.hour,r=t===void 0?0:t,o=n.minute,a=o===void 0?0:o,i=n.second,s=i===void 0?0:i;return y.setHours(y.setMinutes(y.setSeconds(e,s),a),r)}function Bg(e){return y.getISOWeek(e)}function Vg(e,n){return Ye(e,"ddd",n)}function na(e){return y.startOfDay(e)}function Sr(e,n,t){var r=ln(n||Ii());return y.startOfWeek(e,{locale:r,weekStartsOn:t})}function ur(e){return y.startOfMonth(e)}function Fn(e){return y.startOfYear(e)}function Ml(e){return y.startOfQuarter(e)}function Al(){return y.startOfDay(Ae())}function Pl(e){return y.endOfDay(e)}function Fg(e){return y.endOfWeek(e)}function Yg(e){return y.endOfMonth(e)}function tr(e,n){return e&&n?y.isSameYear(e,n):!e&&!n}function pt(e,n){return e&&n?y.isSameMonth(e,n):!e&&!n}function oa(e,n){return e&&n?y.isSameQuarter(e,n):!e&&!n}function Se(e,n){return e&&n?y.isSameDay(e,n):!e&&!n}function Nr(e,n){return e&&n?y.isEqual(e,n):!e&&!n}function Rr(e,n,t){var r,o=y.startOfDay(n),a=y.endOfDay(t);try{r=y.isWithinInterval(e,{start:o,end:a})}catch{r=!1}return r}function Ii(){var e=Tl();return e.__localeId__}function ln(e){if(typeof e=="string"){var n=Tl();return n.__localeData__?n.__localeData__[e]:void 0}else return e}function Hg(e,n,t){return n(Ye(e,"EEEE",t))}function Ug(e,n){return Ye(e,"EEEEEE",n)}function Wg(e,n){return Ye(e,"EEE",n)}function Ni(e,n){return Ye(y.setMonth(Ae(),e),"LLLL",n)}function Il(e,n){return Ye(y.setMonth(Ae(),e),"LLL",n)}function Zg(e,n){return Ye(y.setQuarter(Ae(),e),"QQQ",n)}function Rt(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.excludeDateIntervals,s=t.includeDates,c=t.includeDateIntervals,l=t.filterDate;return Yn(e,{minDate:r,maxDate:o})||a&&a.some(function(u){return u instanceof Date?Se(e,u):Se(e,u.date)})||i&&i.some(function(u){var d=u.start,f=u.end;return y.isWithinInterval(e,{start:d,end:f})})||s&&!s.some(function(u){return Se(e,u)})||c&&!c.some(function(u){var d=u.start,f=u.end;return y.isWithinInterval(e,{start:d,end:f})})||l&&!l(Ae(e))||!1}function Ri(e,n){var t=n===void 0?{}:n,r=t.excludeDates,o=t.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return y.isWithinInterval(e,{start:i,end:s})}):r&&r.some(function(a){var i;return a instanceof Date?Se(e,a):Se(e,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Nl(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return Yn(e,{minDate:r?y.startOfMonth(r):void 0,maxDate:o?y.endOfMonth(o):void 0})||a?.some(function(c){return pt(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return pt(e,c)})||s&&!s(Ae(e))||!1}function aa(e,n,t,r){var o=y.getYear(e),a=y.getMonth(e),i=y.getYear(n),s=y.getMonth(n),c=y.getYear(r);return o===i&&o===c?a<=t&&t<=s:o<i?c===o&&a<=t||c===i&&s>=t||c<i&&c>o:!1}function qg(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates;return Yn(e,{minDate:r,maxDate:o})||a&&a.some(function(s){return pt(s instanceof Date?s:s.date,e)})||i&&!i.some(function(s){return pt(s,e)})||!1}function ia(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return Yn(e,{minDate:r,maxDate:o})||a?.some(function(c){return oa(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return oa(e,c)})||s&&!s(Ae(e))||!1}function sa(e,n,t){if(!n||!t||!y.isValid(n)||!y.isValid(t))return!1;var r=y.getYear(n),o=y.getYear(t);return r<=e&&o>=e}function ca(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate,c=new Date(e,0,1);return Yn(c,{minDate:r?y.startOfYear(r):void 0,maxDate:o?y.endOfYear(o):void 0})||a?.some(function(l){return tr(c,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return tr(c,l)})||s&&!s(Ae(c))||!1}function la(e,n,t,r){var o=y.getYear(e),a=y.getQuarter(e),i=y.getYear(n),s=y.getQuarter(n),c=y.getYear(r);return o===i&&o===c?a<=t&&t<=s:o<i?c===o&&a<=t||c===i&&s>=t||c<i&&c>o:!1}function Yn(e,n){var t,r=n===void 0?{}:n,o=r.minDate,a=r.maxDate;return(t=o&&y.differenceInCalendarDays(e,o)<0||a&&y.differenceInCalendarDays(e,a)>0)!==null&&t!==void 0?t:!1}function Rl(e,n){return n.some(function(t){return y.getHours(t)===y.getHours(e)&&y.getMinutes(t)===y.getMinutes(e)&&y.getSeconds(t)===y.getSeconds(e)})}function $l(e,n){var t=n===void 0?{}:n,r=t.excludeTimes,o=t.includeTimes,a=t.filterTime;return r&&Rl(e,r)||o&&!Rl(e,o)||a&&!a(e)||!1}function jl(e,n){var t=n.minTime,r=n.maxTime;if(!t||!r)throw new Error("Both minTime and maxTime props required");var o=Ae();o=y.setHours(o,y.getHours(e)),o=y.setMinutes(o,y.getMinutes(e)),o=y.setSeconds(o,y.getSeconds(e));var a=Ae();a=y.setHours(a,y.getHours(t)),a=y.setMinutes(a,y.getMinutes(t)),a=y.setSeconds(a,y.getSeconds(t));var i=Ae();i=y.setHours(i,y.getHours(r)),i=y.setMinutes(i,y.getMinutes(r)),i=y.setSeconds(i,y.getSeconds(r));var s;try{s=!y.isWithinInterval(o,{start:a,end:i})}catch{s=!1}return s}function Ll(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.includeDates,a=y.subMonths(e,1);return r&&y.differenceInCalendarMonths(r,a)>0||o&&o.every(function(i){return y.differenceInCalendarMonths(i,a)>0})||!1}function zl(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.includeDates,a=y.addMonths(e,1);return r&&y.differenceInCalendarMonths(a,r)>0||o&&o.every(function(i){return y.differenceInCalendarMonths(a,i)>0})||!1}function Kg(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.includeDates,a=y.startOfYear(e),i=y.subQuarters(a,1);return r&&y.differenceInCalendarQuarters(r,i)>0||o&&o.every(function(s){return y.differenceInCalendarQuarters(s,i)>0})||!1}function Gg(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.includeDates,a=y.endOfYear(e),i=y.addQuarters(a,1);return r&&y.differenceInCalendarQuarters(i,r)>0||o&&o.every(function(s){return y.differenceInCalendarQuarters(i,s)>0})||!1}function Bl(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.includeDates,a=y.subYears(e,1);return r&&y.differenceInCalendarYears(r,a)>0||o&&o.every(function(i){return y.differenceInCalendarYears(i,a)>0})||!1}function Qg(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.yearItemNumber,a=o===void 0?Vn:o,i=Fn(y.subYears(e,a)),s=dr(i,a).endPeriod,c=r&&y.getYear(r);return c&&c>s||!1}function Vl(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.includeDates,a=y.addYears(e,1);return r&&y.differenceInCalendarYears(a,r)>0||o&&o.every(function(i){return y.differenceInCalendarYears(a,i)>0})||!1}function Jg(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.yearItemNumber,a=o===void 0?Vn:o,i=y.addYears(e,a),s=dr(i,a).startPeriod,c=r&&y.getYear(r);return c&&c<s||!1}function Fl(e){var n=e.minDate,t=e.includeDates;if(t&&n){var r=t.filter(function(o){return y.differenceInCalendarDays(o,n)>=0});return y.min(r)}else return t?y.min(t):n}function Yl(e){var n=e.maxDate,t=e.includeDates;if(t&&n){var r=t.filter(function(o){return y.differenceInCalendarDays(o,n)<=0});return y.max(r)}else return t?y.max(t):n}function Hl(e,n){var t;e===void 0&&(e=[]),n===void 0&&(n="react-datepicker__day--highlighted");for(var r=new Map,o=0,a=e.length;o<a;o++){var i=e[o];if(y.isDate(i)){var s=Ye(i,"MM.dd.yyyy"),c=r.get(s)||[];c.includes(n)||(c.push(n),r.set(s,c))}else if(typeof i=="object"){var l=Object.keys(i),u=(t=l[0])!==null&&t!==void 0?t:"",d=i[u];if(typeof u=="string"&&Array.isArray(d))for(var f=0,m=d.length;f<m;f++){var g=d[f];if(g){var s=Ye(g,"MM.dd.yyyy"),c=r.get(s)||[];c.includes(u)||(c.push(u),r.set(s,c))}}}}return r}function Xg(e,n){return e.length!==n.length?!1:e.every(function(t,r){return t===n[r]})}function ev(e,n){e===void 0&&(e=[]),n===void 0&&(n="react-datepicker__day--holidays");var t=new Map;return e.forEach(function(r){var o=r.date,a=r.holidayName;if(y.isDate(o)){var i=Ye(o,"MM.dd.yyyy"),s=t.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===n&&Xg(s.holidayNames,[a]))){s.className=n;var c=s.holidayNames;s.holidayNames=c?er(er([],c,!0),[a],!1):[a],t.set(i,s)}}}),t}function tv(e,n,t,r,o){for(var a=o.length,i=[],s=0;s<a;s++){var c=e,l=o[s];l&&(c=y.addHours(c,y.getHours(l)),c=y.addMinutes(c,y.getMinutes(l)),c=y.addSeconds(c,y.getSeconds(l)));var u=y.addMinutes(e,(t+1)*r);y.isAfter(c,n)&&y.isBefore(c,u)&&l!=null&&i.push(l)}return i}function Ul(e){return e<10?"0".concat(e):"".concat(e)}function dr(e,n){n===void 0&&(n=Vn);var t=Math.ceil(y.getYear(e)/n)*n,r=t-(n-1);return{startPeriod:r,endPeriod:t}}function rv(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+t-+n)/36e5)}function Wl(e){var n=e.getSeconds(),t=e.getMilliseconds();return y.toDate(e.getTime()-n*1e3-t)}function nv(e,n){return Wl(e).getTime()===Wl(n).getTime()}function Zl(e){if(!y.isDate(e))throw new Error("Invalid date");var n=new Date(e);return n.setHours(0,0,0,0),n}function $i(e,n){if(!y.isDate(e)||!y.isDate(n))throw new Error("Invalid date received");var t=Zl(e),r=Zl(n);return y.isBefore(t,r)}function ql(e){return e.key===ne.Space}var ov=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.inputRef=w.createRef(),r.onTimeChange=function(o){var a,i;r.setState({time:o});var s=r.props.date,c=s instanceof Date&&!isNaN(+s),l=c?s:new Date;if(o?.includes(":")){var u=o.split(":"),d=u[0],f=u[1];l.setHours(Number(d)),l.setMinutes(Number(f))}(i=(a=r.props).onChange)===null||i===void 0||i.call(a,l)},r.renderTimeInput=function(){var o=r.state.time,a=r.props,i=a.date,s=a.timeString,c=a.customTimeInput;return c?w.cloneElement(c,{date:i,value:o,onChange:r.onTimeChange}):w.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:r.inputRef,onClick:function(){var l;(l=r.inputRef.current)===null||l===void 0||l.focus()},required:!0,value:o,onChange:function(l){r.onTimeChange(l.target.value||s)}})},r.state={time:r.props.timeString},r}return n.getDerivedStateFromProps=function(t,r){return t.timeString!==r.time?{time:t.timeString}:null},n.prototype.render=function(){return w.createElement("div",{className:"react-datepicker__input-time-container"},w.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),w.createElement("div",{className:"react-datepicker-time__input-container"},w.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},n})(w.Component),av=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.dayEl=w.createRef(),t.handleClick=function(r){!t.isDisabled()&&t.props.onClick&&t.props.onClick(r)},t.handleMouseEnter=function(r){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(r)},t.handleOnKeyDown=function(r){var o,a,i=r.key;i===ne.Space&&(r.preventDefault(),r.key=ne.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,r)},t.isSameDay=function(r){return Se(t.props.day,r)},t.isKeyboardSelected=function(){var r;if(t.props.disabledKeyboardNavigation)return!1;var o=t.props.selectsMultiple?(r=t.props.selectedDates)===null||r===void 0?void 0:r.some(function(i){return t.isSameDayOrWeek(i)}):t.isSameDayOrWeek(t.props.selected),a=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!o&&t.isSameDayOrWeek(t.props.preSelection)&&!a},t.isDisabled=function(r){return r===void 0&&(r=t.props.day),Rt(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return Ri(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return Se(t.props.day,Sr(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(r){return t.props.showWeekPicker&&Se(r,Sr(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(r){return t.isSameDay(r)||t.isSameWeek(r)},t.getHighLightedClass=function(){var r=t.props,o=r.day,a=r.highlightDates;if(!a)return!1;var i=Ye(o,"MM.dd.yyyy");return a.get(i)},t.getHolidaysClass=function(){var r,o=t.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=Ye(a,"MM.dd.yyyy");return i.has(s)?[(r=i.get(s))===null||r===void 0?void 0:r.className]:[void 0]},t.isInRange=function(){var r=t.props,o=r.day,a=r.startDate,i=r.endDate;return!a||!i?!1:Rr(o,a,i)},t.isInSelectingRange=function(){var r,o=t.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,c=o.selectsRange,l=o.selectsDisabledDaysInRange,u=o.startDate,d=o.swapRange,f=o.endDate,m=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;if(!(i||s||c)||!m||!l&&t.isDisabled())return!1;if(i&&f&&(y.isBefore(m,f)||Nr(m,f)))return Rr(a,m,f);if(s&&u&&(y.isAfter(m,u)||Nr(m,u)))return Rr(a,u,m);if(c&&u&&!f){if(Nr(m,u)||y.isAfter(m,u))return Rr(a,u,m);if(d&&y.isBefore(m,u))return Rr(a,m,u)}return!1},t.isSelectingRangeStart=function(){var r;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.startDate,s=o.selectsStart,c=o.swapRange,l=o.selectsRange,u=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return s?Se(a,u):l&&c&&i&&u?Se(a,y.isBefore(u,i)?u:i):Se(a,i)},t.isSelectingRangeEnd=function(){var r;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.endDate,s=o.selectsEnd,c=o.selectsRange,l=o.swapRange,u=o.startDate,d=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return s?Se(a,d):c&&l&&u&&d?Se(a,y.isBefore(d,u)?u:d):c?Se(a,d):Se(a,i)},t.isRangeStart=function(){var r=t.props,o=r.day,a=r.startDate,i=r.endDate;return!a||!i?!1:Se(a,o)},t.isRangeEnd=function(){var r=t.props,o=r.day,a=r.startDate,i=r.endDate;return!a||!i?!1:Se(i,o)},t.isWeekend=function(){var r=y.getDay(t.props.day);return r===0||r===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===y.getMonth(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(y.getMonth(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(Ae())},t.isSelected=function(){var r;return t.props.selectsMultiple?(r=t.props.selectedDates)===null||r===void 0?void 0:r.some(function(o){return t.isSameDayOrWeek(o)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(r){var o=t.props.dayClassName?t.props.dayClassName(r):void 0;return Be("react-datepicker__day",o,"react-datepicker__day--"+Vg(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var r=t.props,o=r.day,a=r.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=r.ariaLabelPrefixWhenDisabled,c=s===void 0?"Not available":s,l=t.isDisabled()||t.isExcluded()?c:i;return"".concat(l," ").concat(Ye(o,"PPPP",t.props.locale))},t.getTitle=function(){var r=t.props,o=r.day,a=r.holidays,i=a===void 0?new Map:a,s=r.excludeDates,c=Ye(o,"MM.dd.yyyy"),l=[];return i.has(c)&&l.push.apply(l,i.get(c).holidayNames),t.isExcluded()&&l.push(s?.filter(function(u){return u instanceof Date?Se(u,o):Se(u?.date,o)}).map(function(u){if(!(u instanceof Date))return u?.message})),l.join(", ")},t.getTabIndex=function(){var r=t.props.selected,o=t.props.preSelection,a=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(r)&&Se(o,r))?0:-1;return a},t.handleFocusDay=function(){var r;t.shouldFocusDay()&&((r=t.dayEl.current)===null||r===void 0||r.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(y.getDate(t.props.day),t.props.day):y.getDate(t.props.day)},t.render=function(){return w.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"gridcell",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&w.createElement("span",{className:"overlay"},t.getTitle()))},t}return n.prototype.componentDidMount=function(){this.handleFocusDay()},n.prototype.componentDidUpdate=function(){this.handleFocusDay()},n.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},n.prototype.isDayActiveElement=function(){var t,r,o;return((r=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||r===void 0?void 0:r.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},n.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},n})(w.Component),iv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.weekNumberEl=w.createRef(),t.handleClick=function(r){t.props.onClick&&t.props.onClick(r)},t.handleOnKeyDown=function(r){var o,a,i=r.key;i===ne.Space&&(r.preventDefault(),r.key=ne.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,r)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!Se(t.props.date,t.props.selected)&&Se(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||Se(t.props.date,t.props.selected)&&Se(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(r){var o=!1;t.getTabIndex()===0&&!r?.isInputFocused&&Se(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(o=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},n.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},n.prototype.render=function(){var t=this.props,r=t.weekNumber,o=t.isWeekDisabled,a=t.ariaLabelPrefix,i=a===void 0?n.defaultProps.ariaLabelPrefix:a,s=t.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&Se(this.props.date,this.props.selected)};return w.createElement("div",{ref:this.weekNumberEl,className:Be(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},r)},n})(w.Component),sv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDisabled=function(r){return Rt(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(r,o){t.props.onDayClick&&t.props.onDayClick(r,o)},t.handleDayMouseEnter=function(r){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(r)},t.handleWeekClick=function(r,o,a){for(var i,s,c,l=new Date(r),u=0;u<7;u++){var d=new Date(r);d.setDate(d.getDate()+u);var f=!t.isDisabled(d);if(f){l=d;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(l,o,a),t.props.showWeekPicker&&t.handleDayClick(l,a),((i=t.props.shouldCloseOnSelect)!==null&&i!==void 0?i:n.defaultProps.shouldCloseOnSelect)&&((c=(s=t.props).setOpen)===null||c===void 0||c.call(s,!1))},t.formatWeekNumber=function(r){return t.props.formatWeekNumber?t.props.formatWeekNumber(r):Bg(r)},t.isWeekDisabled=function(){for(var r=t.startOfWeek(),o=y.addDays(r,6),a=new Date(r);a<=o;){if(!t.isDisabled(a))return!1;a=y.addDays(a,1)}return!0},t.renderDays=function(){var r=t.startOfWeek(),o=[],a=t.formatWeekNumber(r);if(t.props.showWeekNumber){var i=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,r,a):void 0;o.push(w.createElement(iv,xe({key:"W"},n.defaultProps,t.props,{weekNumber:a,isWeekDisabled:t.isWeekDisabled(),date:r,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var c=y.addDays(r,s);return w.createElement(av,xe({},n.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:t.handleDayClick.bind(t,c),onMouseEnter:t.handleDayMouseEnter.bind(t,c)}))}))},t.startOfWeek=function(){return Sr(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!Se(t.startOfWeek(),t.props.selected)&&Se(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),n.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":Se(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},r=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return w.createElement("div",{className:Be(t,r),role:"row"},this.renderDays())},n})(w.Component),Hn,cv=6,un={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ji=(Hn={},Hn[un.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Hn[un.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Hn[un.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Hn),ua=1;function Kl(e,n){return e?un.FOUR_COLUMNS:n?un.TWO_COLUMNS:un.THREE_COLUMNS}var lv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.MONTH_REFS=er([],Array(12),!0).map(function(){return w.createRef()}),t.QUARTER_REFS=er([],Array(4),!0).map(function(){return w.createRef()}),t.isDisabled=function(r){return Rt(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(r){return Ri(r,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(r,o){var a,i;(i=(a=t.props).onDayClick)===null||i===void 0||i.call(a,r,o,t.props.orderInDisplay)},t.handleDayMouseEnter=function(r){var o,a;(a=(o=t.props).onDayMouseEnter)===null||a===void 0||a.call(o,r)},t.handleMouseLeave=function(){var r,o;(o=(r=t.props).onMouseLeave)===null||o===void 0||o.call(r)},t.isRangeStartMonth=function(r){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:pt(y.setMonth(a,r),i)},t.isRangeStartQuarter=function(r){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:oa(y.setQuarter(a,r),i)},t.isRangeEndMonth=function(r){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:pt(y.setMonth(a,r),s)},t.isRangeEndQuarter=function(r){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:oa(y.setQuarter(a,r),s)},t.isInSelectingRangeMonth=function(r){var o,a=t.props,i=a.day,s=a.selectsStart,c=a.selectsEnd,l=a.selectsRange,u=a.startDate,d=a.endDate,f=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||c||l)||!f?!1:s&&d?aa(f,d,r,i):c&&u||l&&u&&!d?aa(u,f,r,i):!1},t.isSelectingMonthRangeStart=function(r){var o;if(!t.isInSelectingRangeMonth(r))return!1;var a=t.props,i=a.day,s=a.startDate,c=a.selectsStart,l=y.setMonth(i,r),u=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return c?pt(l,u):pt(l,s)},t.isSelectingMonthRangeEnd=function(r){var o;if(!t.isInSelectingRangeMonth(r))return!1;var a=t.props,i=a.day,s=a.endDate,c=a.selectsEnd,l=a.selectsRange,u=y.setMonth(i,r),d=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return c||l?pt(u,d):pt(u,s)},t.isInSelectingRangeQuarter=function(r){var o,a=t.props,i=a.day,s=a.selectsStart,c=a.selectsEnd,l=a.selectsRange,u=a.startDate,d=a.endDate,f=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||c||l)||!f?!1:s&&d?la(f,d,r,i):c&&u||l&&u&&!d?la(u,f,r,i):!1},t.isWeekInMonth=function(r){var o=t.props.day,a=y.addDays(r,6);return pt(r,o)||pt(a,o)},t.isCurrentMonth=function(r,o){return y.getYear(r)===y.getYear(Ae())&&o===y.getMonth(Ae())},t.isCurrentQuarter=function(r,o){return y.getYear(r)===y.getYear(Ae())&&o===y.getQuarter(Ae())},t.isSelectedMonth=function(r,o,a){return y.getMonth(a)===o&&y.getYear(r)===y.getYear(a)},t.isSelectMonthInList=function(r,o,a){return a.some(function(i){return t.isSelectedMonth(r,o,i)})},t.isSelectedQuarter=function(r,o,a){return y.getQuarter(r)===o&&y.getYear(r)===y.getYear(a)},t.isMonthSelected=function(){var r=t.props,o=r.day,a=r.selected,i=r.selectedDates,s=r.selectsMultiple,c=y.getMonth(o);return s?i?.some(function(l){return t.isSelectedMonth(o,c,l)}):!!a&&t.isSelectedMonth(o,c,a)},t.renderWeeks=function(){for(var r=[],o=t.props.fixedHeight,a=0,i=!1,s=Sr(ur(t.props.day),t.props.locale,t.props.calendarStartDay),c=function(g){return t.props.showWeekPicker?Sr(g,t.props.locale,t.props.calendarStartDay):t.props.preSelection},l=function(g){return t.props.showWeekPicker?Sr(g,t.props.locale,t.props.calendarStartDay):t.props.selected},u=t.props.selected?l(t.props.selected):void 0,d=t.props.preSelection?c(t.props.preSelection):void 0;r.push(w.createElement(sv,xe({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:a,day:s,month:y.getMonth(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:u,preSelection:d,showWeekNumber:t.props.showWeekNumbers}))),!i;){a++,s=y.addWeeks(s,1);var f=o&&a>=cv,m=!o&&!t.isWeekInMonth(s);if(f||m)if(t.props.peekNextMonth)i=!0;else break}return r},t.onMonthClick=function(r,o){var a=t.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||t.handleDayClick(ur(s),r)},t.onMonthMouseEnter=function(r){var o=t.isMonthDisabledForLabelDate(r),a=o.isDisabled,i=o.labelDate;a||t.handleDayMouseEnter(ur(i))},t.handleMonthNavigation=function(r,o){var a,i,s,c;(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(c=(s=t.MONTH_REFS[r])===null||s===void 0?void 0:s.current)===null||c===void 0||c.focus()},t.handleKeyboardNavigation=function(r,o,a){var i,s=t.props,c=s.selected,l=s.preSelection,u=s.setPreSelection,d=s.minDate,f=s.maxDate,m=s.showFourColumnMonthYearPicker,g=s.showTwoColumnMonthYearPicker;if(l){var p=Kl(m,g),b=t.getVerticalOffset(p),x=(i=ji[p])===null||i===void 0?void 0:i.grid,S=function(I,W,U){var $,Q,v=W,M=U;switch(I){case ne.ArrowRight:v=y.addMonths(W,ua),M=U===11?0:U+ua;break;case ne.ArrowLeft:v=y.subMonths(W,ua),M=U===0?11:U-ua;break;case ne.ArrowUp:v=y.subMonths(W,b),M=!(($=x?.[0])===null||$===void 0)&&$.includes(U)?U+12-b:U-b;break;case ne.ArrowDown:v=y.addMonths(W,b),M=!((Q=x?.[x.length-1])===null||Q===void 0)&&Q.includes(U)?U-12+b:U+b;break}return{newCalculatedDate:v,newCalculatedMonth:M}},T=function(I,W,U){for(var $=40,Q=I,v=!1,M=0,P=S(Q,W,U),H=P.newCalculatedDate,Y=P.newCalculatedMonth;!v;){if(M>=$){H=W,Y=U;break}if(d&&H<d){Q=ne.ArrowRight;var ee=S(Q,H,Y);H=ee.newCalculatedDate,Y=ee.newCalculatedMonth}if(f&&H>f){Q=ne.ArrowLeft;var ee=S(Q,H,Y);H=ee.newCalculatedDate,Y=ee.newCalculatedMonth}if(qg(H,t.props)){var ee=S(Q,H,Y);H=ee.newCalculatedDate,Y=ee.newCalculatedMonth}else v=!0;M++}return{newCalculatedDate:H,newCalculatedMonth:Y}};if(o===ne.Enter){t.isMonthDisabled(a)||(t.onMonthClick(r,a),u?.(c));return}var D=T(o,l,a),k=D.newCalculatedDate,O=D.newCalculatedMonth;switch(o){case ne.ArrowRight:case ne.ArrowLeft:case ne.ArrowUp:case ne.ArrowDown:t.handleMonthNavigation(O,k);break}}},t.getVerticalOffset=function(r){var o,a;return(a=(o=ji[r])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},t.onMonthKeyDown=function(r,o){var a=t.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,c=r.key;c!==ne.Tab&&r.preventDefault(),i||t.handleKeyboardNavigation(r,c,o),s&&s(r)},t.onQuarterClick=function(r,o){var a=y.setQuarter(t.props.day,o);ia(a,t.props)||t.handleDayClick(Ml(a),r)},t.onQuarterMouseEnter=function(r){var o=y.setQuarter(t.props.day,r);ia(o,t.props)||t.handleDayMouseEnter(Ml(o))},t.handleQuarterNavigation=function(r,o){var a,i,s,c;t.isDisabled(o)||t.isExcluded(o)||((i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(c=(s=t.QUARTER_REFS[r-1])===null||s===void 0?void 0:s.current)===null||c===void 0||c.focus())},t.onQuarterKeyDown=function(r,o){var a,i,s=r.key;if(!t.props.disabledKeyboardNavigation)switch(s){case ne.Enter:t.onQuarterClick(r,o),(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,t.props.selected);break;case ne.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===4?1:o+1,y.addQuarters(t.props.preSelection,1));break;case ne.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===1?4:o-1,y.subQuarters(t.props.preSelection,1));break}},t.isMonthDisabledForLabelDate=function(r){var o,a=t.props,i=a.day,s=a.minDate,c=a.maxDate,l=a.excludeDates,u=a.includeDates,d=y.setMonth(i,r);return{isDisabled:(o=(s||c||l||u)&&Nl(d,t.props))!==null&&o!==void 0?o:!1,labelDate:d}},t.isMonthDisabled=function(r){var o=t.isMonthDisabledForLabelDate(r).isDisabled;return o},t.getMonthClassNames=function(r){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,c=o.preSelection,l=o.monthClassName,u=l?l(y.setMonth(a,r)):void 0,d=t.getSelection();return Be("react-datepicker__month-text","react-datepicker__month-".concat(r),u,{"react-datepicker__month-text--disabled":t.isMonthDisabled(r),"react-datepicker__month-text--selected":d?t.isSelectMonthInList(a,r,d):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&c&&t.isSelectedMonth(a,r,c)&&!t.isMonthSelected()&&!t.isMonthDisabled(r),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(r),"react-datepicker__month-text--in-range":i&&s?aa(i,s,r,a):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(r),"react-datepicker__month-text--range-end":t.isRangeEndMonth(r),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(r),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(r),"react-datepicker__month-text--today":t.isCurrentMonth(a,r)})},t.getTabIndex=function(r){if(t.props.preSelection==null)return"-1";var o=y.getMonth(t.props.preSelection),a=t.isMonthDisabledForLabelDate(o).isDisabled,i=r===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getQuarterTabIndex=function(r){if(t.props.preSelection==null)return"-1";var o=y.getQuarter(t.props.preSelection),a=ia(t.props.day,t.props),i=r===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getAriaLabel=function(r){var o=t.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,c=s===void 0?"Not available":s,l=o.day,u=o.locale,d=y.setMonth(l,r),f=t.isDisabled(d)||t.isExcluded(d)?c:i;return"".concat(f," ").concat(Ye(d,"MMMM yyyy",u))},t.getQuarterClassNames=function(r){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,c=o.selected,l=o.minDate,u=o.maxDate,d=o.excludeDates,f=o.includeDates,m=o.filterDate,g=o.preSelection,p=o.disabledKeyboardNavigation,b=(l||u||d||f||m)&&ia(y.setQuarter(a,r),t.props);return Be("react-datepicker__quarter-text","react-datepicker__quarter-".concat(r),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":c?t.isSelectedQuarter(a,r,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!p&&g&&t.isSelectedQuarter(a,r,g)&&!b,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(r),"react-datepicker__quarter-text--in-range":i&&s?la(i,s,r,a):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(r),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(r),"react-datepicker__quarter-text--today":t.isCurrentQuarter(a,r)})},t.getMonthContent=function(r){var o=t.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,c=o.day,l=Il(r,s),u=Ni(r,s);return i?i(r,l,u,c):a?u:l},t.getQuarterContent=function(r){var o,a=t.props,i=a.renderQuarterContent,s=a.locale,c=Zg(r,s);return(o=i?.(r,c))!==null&&o!==void 0?o:c},t.renderMonths=function(){var r,o=t.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,c=o.selected,l=(r=ji[Kl(i,a)])===null||r===void 0?void 0:r.grid;return l?.map(function(u,d){return w.createElement("div",{className:"react-datepicker__month-wrapper",key:d},u.map(function(f,m){return w.createElement("div",{ref:t.MONTH_REFS[f],key:m,onClick:function(g){t.onMonthClick(g,f)},onKeyDown:function(g){ql(g)&&(g.preventDefault(),g.key=ne.Enter),t.onMonthKeyDown(g,f)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(f)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(f)}:void 0,tabIndex:Number(t.getTabIndex(f)),className:t.getMonthClassNames(f),"aria-disabled":t.isMonthDisabled(f),role:"option","aria-label":t.getAriaLabel(f),"aria-current":t.isCurrentMonth(s,f)?"date":void 0,"aria-selected":c?t.isSelectedMonth(s,f,c):void 0},t.getMonthContent(f))}))})},t.renderQuarters=function(){var r=t.props,o=r.day,a=r.selected,i=[1,2,3,4];return w.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,c){return w.createElement("div",{key:c,ref:t.QUARTER_REFS[c],role:"option",onClick:function(l){t.onQuarterClick(l,s)},onKeyDown:function(l){t.onQuarterKeyDown(l,s)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(s)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(s)}:void 0,className:t.getQuarterClassNames(s),"aria-selected":a?t.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(t.getQuarterTabIndex(s)),"aria-current":t.isCurrentQuarter(o,s)?"date":void 0},t.getQuarterContent(s))}))},t.getClassNames=function(){var r=t.props,o=r.selectingDate,a=r.selectsStart,i=r.selectsEnd,s=r.showMonthYearPicker,c=r.showQuarterYearPicker,l=r.showWeekPicker;return Be("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":l})},t}return n.prototype.getSelection=function(){var t=this.props,r=t.selected,o=t.selectedDates,a=t.selectsMultiple;if(a)return o;if(r)return[r]},n.prototype.render=function(){var t=this.props,r=t.showMonthYearPicker,o=t.showQuarterYearPicker,a=t.day,i=t.ariaLabelPrefix,s=i===void 0?"Month ":i,c=s?s.trim()+" ":"",l=r||o;return l?w.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(Ye(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},r?this.renderMonths():this.renderQuarters()):w.createElement("div",{role:"table"},this.props.dayNamesHeader&&w.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),w.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(Ye(a,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},n})(w.Component),uv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.monthOptionButtonsRef={},t.isSelectedMonth=function(r){return t.props.month===r},t.handleOptionKeyDown=function(r,o){var a;switch(o.key){case"Enter":o.preventDefault(),t.onChange(r);break;case"Escape":o.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(r+(o.key==="ArrowUp"?-1:1)+t.props.monthNames.length)%t.props.monthNames.length;(a=t.monthOptionButtonsRef[i])===null||a===void 0||a.focus();break}}},t.renderOptions=function(){return t.monthOptionButtonsRef={},t.props.monthNames.map(function(r,o){return w.createElement("div",{ref:function(a){t.monthOptionButtonsRef[o]=a,t.isSelectedMonth(o)&&a?.focus()},role:"button",tabIndex:0,className:t.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:r,onClick:t.onChange.bind(t,o),onKeyDown:t.handleOptionKeyDown.bind(t,o),"aria-selected":t.isSelectedMonth(o)?"true":void 0},t.isSelectedMonth(o)?w.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",r)})},t.onChange=function(r){return t.props.onChange(r)},t.handleClickOutside=function(){return t.props.onCancel()},t}return n.prototype.render=function(){return w.createElement(ta,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},n})(w.Component),dv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(r){return r.map(function(o,a){return w.createElement("option",{key:o,value:a},o)})},t.renderSelectMode=function(r){return w.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(o){return t.onChange(parseInt(o.target.value))}},t.renderSelectOptions(r))},t.renderReadView=function(r,o){return w.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},w.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),w.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[t.props.month]))},t.renderDropdown=function(r){return w.createElement(uv,xe({key:"dropdown"},t.props,{monthNames:r,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(r){var o=t.state.dropdownVisible,a=[t.renderReadView(!o,r)];return o&&a.unshift(t.renderDropdown(r)),a},t.onChange=function(r){t.toggleDropdown(),r!==t.props.month&&t.props.onChange(r)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return n.prototype.render=function(){var t=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Il(a,t.props.locale)}:function(a){return Ni(a,t.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(r);break;case"select":o=this.renderSelectMode(r);break}return w.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},n})(w.Component);function fv(e,n){for(var t=[],r=ur(e),o=ur(n);!y.isAfter(r,o);)t.push(Ae(r)),r=y.addMonths(r,1);return t}var pv=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.renderOptions=function(){return r.state.monthYearsList.map(function(o){var a=y.getTime(o),i=tr(r.props.date,o)&&pt(r.props.date,o);return w.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:r.onChange.bind(r,a),"aria-selected":i?"true":void 0},i?w.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Ye(o,r.props.dateFormat,r.props.locale))})},r.onChange=function(o){return r.props.onChange(o)},r.handleClickOutside=function(){r.props.onCancel()},r.state={monthYearsList:fv(r.props.minDate,r.props.maxDate)},r}return n.prototype.render=function(){var t=Be({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return w.createElement(ta,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},n})(w.Component),hv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var r=ur(t.props.minDate),o=ur(t.props.maxDate),a=[];!y.isAfter(r,o);){var i=y.getTime(r);a.push(w.createElement("option",{key:i,value:i},Ye(r,t.props.dateFormat,t.props.locale))),r=y.addMonths(r,1)}return a},t.onSelectChange=function(r){t.onChange(parseInt(r.target.value))},t.renderSelectMode=function(){return w.createElement("select",{value:y.getTime(ur(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(r){var o=Ye(t.props.date,t.props.dateFormat,t.props.locale);return w.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},w.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),w.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},t.renderDropdown=function(){return w.createElement(pv,xe({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var r=t.state.dropdownVisible,o=[t.renderReadView(!r)];return r&&o.unshift(t.renderDropdown()),o},t.onChange=function(r){t.toggleDropdown();var o=Ae(r);tr(t.props.date,o)&&pt(t.props.date,o)||t.props.onChange(o)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return n.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return w.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},n})(w.Component),mv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var r,o,a;t.list&&(t.list.scrollTop=(a=t.centerLi&&n.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((o=(r=t.header)===null||r===void 0?void 0:r.clientHeight)!==null&&o!==void 0?o:0):t.list.clientHeight,t.centerLi))!==null&&a!==void 0?a:0)})},t.handleClick=function(r){var o,a;(t.props.minTime||t.props.maxTime)&&jl(r,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&$l(r,t.props)||(a=(o=t.props).onChange)===null||a===void 0||a.call(o,r)},t.isSelectedTime=function(r){return t.props.selected&&nv(t.props.selected,r)},t.isDisabledTime=function(r){return(t.props.minTime||t.props.maxTime)&&jl(r,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&$l(r,t.props)},t.liClasses=function(r){var o,a=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(r):void 0];return t.isSelectedTime(r)&&a.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(r)&&a.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(y.getHours(r)*3600+y.getMinutes(r)*60+y.getSeconds(r))%(((o=t.props.intervals)!==null&&o!==void 0?o:n.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},t.handleOnKeyDown=function(r,o){var a,i;r.key===ne.Space&&(r.preventDefault(),r.key=ne.Enter),(r.key===ne.ArrowUp||r.key===ne.ArrowLeft)&&r.target instanceof HTMLElement&&r.target.previousSibling&&(r.preventDefault(),r.target.previousSibling instanceof HTMLElement&&r.target.previousSibling.focus()),(r.key===ne.ArrowDown||r.key===ne.ArrowRight)&&r.target instanceof HTMLElement&&r.target.nextSibling&&(r.preventDefault(),r.target.nextSibling instanceof HTMLElement&&r.target.nextSibling.focus()),r.key===ne.Enter&&t.handleClick(o),(i=(a=t.props).handleOnKeyDown)===null||i===void 0||i.call(a,r)},t.renderTimes=function(){for(var r,o=[],a=typeof t.props.format=="string"?t.props.format:"p",i=(r=t.props.intervals)!==null&&r!==void 0?r:n.defaultProps.intervals,s=t.props.selected||t.props.openToDate||Ae(),c=na(s),l=t.props.injectTimes&&t.props.injectTimes.sort(function(b,x){return b.getTime()-x.getTime()}),u=60*rv(s),d=u/i,f=0;f<d;f++){var m=y.addMinutes(c,f*i);if(o.push(m),l){var g=tv(c,m,f,i,l);o=o.concat(g)}}var p=o.reduce(function(b,x){return x.getTime()<=s.getTime()?x:b},o[0]);return o.map(function(b){return w.createElement("li",{key:b.valueOf(),onClick:t.handleClick.bind(t,b),className:t.liClasses(b),ref:function(x){b===p&&(t.centerLi=x)},onKeyDown:function(x){t.handleOnKeyDown(x,b)},tabIndex:b===p?0:-1,role:"option","aria-selected":t.isSelectedTime(b)?"true":void 0,"aria-disabled":t.isDisabledTime(b)?"true":void 0},Ye(b,a,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?w.createElement(w.Fragment,null):w.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(r){t.header=r}},w.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},n.prototype.componentWillUnmount=function(){var t;(t=this.resizeObserver)===null||t===void 0||t.disconnect()},n.prototype.observeDatePickerHeightChanges=function(){var t=this,r=this.props.monthRef;this.updateContainerHeight(),r&&(this.resizeObserver=new ResizeObserver(function(){t.updateContainerHeight()}),this.resizeObserver.observe(r))},n.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},n.prototype.render=function(){var t=this,r,o=this.state.height;return w.createElement("div",{className:"react-datepicker__time-container ".concat(((r=this.props.todayButton)!==null&&r!==void 0?r:n.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),w.createElement("div",{className:"react-datepicker__time"},w.createElement("div",{className:"react-datepicker__time-box"},w.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){t.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},n.calcCenterPosition=function(t,r){return r.offsetTop-(t/2-r.clientHeight/2)},n})(w.Component),Gl=3,gv=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.YEAR_REFS=er([],Array(r.props.yearItemNumber),!0).map(function(){return w.createRef()}),r.isDisabled=function(o){return Rt(o,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(o){return Ri(o,{excludeDates:r.props.excludeDates})},r.selectingDate=function(){var o;return(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection},r.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=r.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},r.handleYearClick=function(o,a){r.props.onDayClick&&r.props.onDayClick(o,a)},r.handleYearNavigation=function(o,a){var i,s,c,l,u=r.props,d=u.date,f=u.yearItemNumber;if(!(d===void 0||f===void 0)){var m=dr(d,f).startPeriod;r.isDisabled(a)||r.isExcluded(a)||((s=(i=r.props).setPreSelection)===null||s===void 0||s.call(i,a),o-m<0?r.updateFocusOnPaginate(f-(m-o)):o-m>=f?r.updateFocusOnPaginate(Math.abs(f-(o-m))):(l=(c=r.YEAR_REFS[o-m])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())}},r.isSameDay=function(o,a){return Se(o,a)},r.isCurrentYear=function(o){return o===y.getYear(Ae())},r.isRangeStart=function(o){return r.props.startDate&&r.props.endDate&&tr(y.setYear(Ae(),o),r.props.startDate)},r.isRangeEnd=function(o){return r.props.startDate&&r.props.endDate&&tr(y.setYear(Ae(),o),r.props.endDate)},r.isInRange=function(o){return sa(o,r.props.startDate,r.props.endDate)},r.isInSelectingRange=function(o){var a=r.props,i=a.selectsStart,s=a.selectsEnd,c=a.selectsRange,l=a.startDate,u=a.endDate;return!(i||s||c)||!r.selectingDate()?!1:i&&u?sa(o,r.selectingDate(),u):s&&l||c&&l&&!u?sa(o,l,r.selectingDate()):!1},r.isSelectingRangeStart=function(o){var a;if(!r.isInSelectingRange(o))return!1;var i=r.props,s=i.startDate,c=i.selectsStart,l=y.setYear(Ae(),o);return c?tr(l,(a=r.selectingDate())!==null&&a!==void 0?a:null):tr(l,s??null)},r.isSelectingRangeEnd=function(o){var a;if(!r.isInSelectingRange(o))return!1;var i=r.props,s=i.endDate,c=i.selectsEnd,l=i.selectsRange,u=y.setYear(Ae(),o);return c||l?tr(u,(a=r.selectingDate())!==null&&a!==void 0?a:null):tr(u,s??null)},r.isKeyboardSelected=function(o){if(!(r.props.disabledKeyboardNavigation||r.props.date===void 0||r.props.preSelection==null)){var a=r.props,i=a.minDate,s=a.maxDate,c=a.excludeDates,l=a.includeDates,u=a.filterDate,d=a.selected,f=Fn(y.setYear(r.props.date,o)),m=(i||s||c||l||u)&&ca(o,r.props),g=!!d&&Se(f,Fn(d)),p=Se(f,Fn(r.props.preSelection));return!r.props.inline&&!g&&p&&!m}},r.isSelectedYear=function(o){var a=r.props,i=a.selectsMultiple,s=a.selected,c=a.selectedDates;return i?c?.some(function(l){return o===y.getYear(l)}):!!s&&o===y.getYear(s)},r.onYearClick=function(o,a){var i=r.props.date;i!==void 0&&r.handleYearClick(Fn(y.setYear(i,a)),o)},r.onYearKeyDown=function(o,a){var i,s,c=o.key,l=r.props,u=l.date,d=l.yearItemNumber,f=l.handleOnKeyDown;if(c!==ne.Tab&&o.preventDefault(),!r.props.disabledKeyboardNavigation)switch(c){case ne.Enter:if(r.props.selected==null)break;r.onYearClick(o,a),(s=(i=r.props).setPreSelection)===null||s===void 0||s.call(i,r.props.selected);break;case ne.ArrowRight:if(r.props.preSelection==null)break;r.handleYearNavigation(a+1,y.addYears(r.props.preSelection,1));break;case ne.ArrowLeft:if(r.props.preSelection==null)break;r.handleYearNavigation(a-1,y.subYears(r.props.preSelection,1));break;case ne.ArrowUp:{if(u===void 0||d===void 0||r.props.preSelection==null)break;var m=dr(u,d).startPeriod,g=Gl,p=a-g;if(p<m){var b=d%g;a>=m&&a<m+b?g=b:g+=b,p=a-g}r.handleYearNavigation(p,y.subYears(r.props.preSelection,g));break}case ne.ArrowDown:{if(u===void 0||d===void 0||r.props.preSelection==null)break;var x=dr(u,d).endPeriod,g=Gl,p=a+g;if(p>x){var b=d%g;a<=x&&a>x-b?g=b:g+=b,p=a+g}r.handleYearNavigation(p,y.addYears(r.props.preSelection,g));break}}f&&f(o)},r.getYearClassNames=function(o){var a=r.props,i=a.date,s=a.minDate,c=a.maxDate,l=a.excludeDates,u=a.includeDates,d=a.filterDate,f=a.yearClassName;return Be("react-datepicker__year-text","react-datepicker__year-".concat(o),i?f?.(y.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":r.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||c||l||u||d)&&ca(o,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(o),"react-datepicker__year-text--range-start":r.isRangeStart(o),"react-datepicker__year-text--range-end":r.isRangeEnd(o),"react-datepicker__year-text--in-range":r.isInRange(o),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(o),"react-datepicker__year-text--today":r.isCurrentYear(o)})},r.getYearTabIndex=function(o){if(r.props.disabledKeyboardNavigation||r.props.preSelection==null)return"-1";var a=y.getYear(r.props.preSelection),i=ca(o,r.props);return o===a&&!i?"0":"-1"},r.getYearContent=function(o){return r.props.renderYearContent?r.props.renderYearContent(o):o},r}return n.prototype.render=function(){var t=this,r=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,c=o.onYearMouseLeave;if(a===void 0)return null;for(var l=dr(a,i),u=l.startPeriod,d=l.endPeriod,f=function(p){r.push(w.createElement("div",{ref:m.YEAR_REFS[p-u],onClick:function(b){t.onYearClick(b,p)},onKeyDown:function(b){ql(b)&&(b.preventDefault(),b.key=ne.Enter),t.onYearKeyDown(b,p)},tabIndex:Number(m.getYearTabIndex(p)),className:m.getYearClassNames(p),onMouseEnter:m.props.usePointerEvent?void 0:function(b){return s(b,p)},onPointerEnter:m.props.usePointerEvent?function(b){return s(b,p)}:void 0,onMouseLeave:m.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:m.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":m.isCurrentYear(p)?"date":void 0},m.getYearContent(p)))},m=this,g=u;g<=d;g++)f(g);return w.createElement("div",{className:"react-datepicker__year"},w.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},r))},n})(w.Component);function vv(e,n,t,r){for(var o=[],a=0;a<2*n+1;a++){var i=e+n-a,s=!0;t&&(s=y.getYear(t)<=i),r&&s&&(s=y.getYear(r)>=i),s&&o.push(i)}return o}var yv=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;r.yearOptionButtonsRef={},r.handleOptionKeyDown=function(s,c){var l;switch(c.key){case"Enter":c.preventDefault(),r.onChange(s);break;case"Escape":c.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var u=s+(c.key==="ArrowUp"?1:-1);r.yearOptionButtonsRef[u]&&((l=r.yearOptionButtonsRef[u])===null||l===void 0||l.focus());break}}},r.renderOptions=function(){r.yearOptionButtonsRef={};var s=r.props.year,c=r.state.yearsList.map(function(d){return w.createElement("div",{ref:function(f){r.yearOptionButtonsRef[d]=f,d===s&&f?.focus()},role:"button",tabIndex:0,className:s===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:r.onChange.bind(r,d),onKeyDown:r.handleOptionKeyDown.bind(r,d),"aria-selected":s===d?"true":void 0},s===d?w.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),l=r.props.minDate?y.getYear(r.props.minDate):null,u=r.props.maxDate?y.getYear(r.props.maxDate):null;return(!u||!r.state.yearsList.find(function(d){return d===u}))&&c.unshift(w.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},w.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!l||!r.state.yearsList.find(function(d){return d===l}))&&c.push(w.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},w.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},r.onChange=function(s){r.props.onChange(s)},r.handleClickOutside=function(){r.props.onCancel()},r.shiftYears=function(s){var c=r.state.yearsList.map(function(l){return l+s});r.setState({yearsList:c})},r.incrementYears=function(){return r.shiftYears(1)},r.decrementYears=function(){return r.shiftYears(-1)};var o=t.yearDropdownItemNumber,a=t.scrollableYearDropdown,i=o||(a?10:5);return r.state={yearsList:vv(r.props.year,i,r.props.minDate,r.props.maxDate)},r.dropdownRef=w.createRef(),r}return n.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var r=t.children?Array.from(t.children):null,o=r?r.find(function(a){return a.ariaSelected}):null;t.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},n.prototype.render=function(){var t=Be({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return w.createElement(ta,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},n})(w.Component),bv=(function(e){ct(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var r=t.props.minDate?y.getYear(t.props.minDate):1900,o=t.props.maxDate?y.getYear(t.props.maxDate):2100,a=[],i=r;i<=o;i++)a.push(w.createElement("option",{key:i,value:i},i));return a},t.onSelectChange=function(r){t.onChange(parseInt(r.target.value))},t.renderSelectMode=function(){return w.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(r){return w.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:t.toggleDropdown},w.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),w.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return w.createElement(yv,xe({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var r=t.state.dropdownVisible,o=[t.renderReadView(!r)];return r&&o.unshift(t.renderDropdown()),o},t.onChange=function(r){t.toggleDropdown(),r!==t.props.year&&t.props.onChange(r)},t.toggleDropdown=function(r){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,r)})},t.handleYearChange=function(r,o){var a;(a=t.onSelect)===null||a===void 0||a.call(t,r,o),t.setOpen()},t.onSelect=function(r,o){var a,i;(i=(a=t.props).onSelect)===null||i===void 0||i.call(a,r,o)},t.setOpen=function(){var r,o;(o=(r=t.props).setOpen)===null||o===void 0||o.call(r,!0)},t}return n.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return w.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},n})(w.Component),wv=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Ql="react-datepicker-ignore-onclickoutside",_v=function(e){var n=(e.className||"").split(/\s+/);return wv.some(function(t){return n.indexOf(t)>=0})},xv=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.monthContainer=void 0,r.handleClickOutside=function(o){r.props.onClickOutside(o)},r.setClickOutsideRef=function(){return r.containerRef.current},r.handleDropdownFocus=function(o){var a,i;_v(o.target)&&((i=(a=r.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},r.getDateInView=function(){var o=r.props,a=o.preSelection,i=o.selected,s=o.openToDate,c=Fl(r.props),l=Yl(r.props),u=Ae(),d=s||i||a;return d||(c&&y.isBefore(u,c)?c:l&&y.isAfter(u,l)?l:u)},r.increaseMonth=function(){r.setState(function(o){var a=o.date;return{date:y.addMonths(a,1)}},function(){return r.handleMonthChange(r.state.date)})},r.decreaseMonth=function(){r.setState(function(o){var a=o.date;return{date:y.subMonths(a,1)}},function(){return r.handleMonthChange(r.state.date)})},r.handleDayClick=function(o,a,i){r.props.onSelect(o,a,i),r.props.setPreSelection&&r.props.setPreSelection(o)},r.handleDayMouseEnter=function(o){r.setState({selectingDate:o}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(o)},r.handleMonthMouseLeave=function(){r.setState({selectingDate:void 0}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()},r.handleYearMouseEnter=function(o,a){r.setState({selectingDate:y.setYear(Ae(),a)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(o,a)},r.handleYearMouseLeave=function(o,a){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(o,a)},r.handleYearChange=function(o){var a,i,s,c;(i=(a=r.props).onYearChange)===null||i===void 0||i.call(a,o),r.setState({isRenderAriaLiveMessage:!0}),r.props.adjustDateOnChange&&(r.props.onSelect(o),(c=(s=r.props).setOpen)===null||c===void 0||c.call(s,!0)),r.props.setPreSelection&&r.props.setPreSelection(o)},r.getEnabledPreSelectionDateForMonth=function(o){if(!Rt(o,r.props))return o;for(var a=ur(o),i=Yg(o),s=y.differenceInDays(i,a),c=null,l=0;l<=s;l++){var u=y.addDays(a,l);if(!Rt(u,r.props)){c=u;break}}return c},r.handleMonthChange=function(o){var a,i,s,c=(a=r.getEnabledPreSelectionDateForMonth(o))!==null&&a!==void 0?a:o;r.handleCustomMonthChange(c),r.props.adjustDateOnChange&&(r.props.onSelect(c),(s=(i=r.props).setOpen)===null||s===void 0||s.call(i,!0)),r.props.setPreSelection&&r.props.setPreSelection(c)},r.handleCustomMonthChange=function(o){var a,i;(i=(a=r.props).onMonthChange)===null||i===void 0||i.call(a,o),r.setState({isRenderAriaLiveMessage:!0})},r.handleMonthYearChange=function(o){r.handleYearChange(o),r.handleMonthChange(o)},r.changeYear=function(o){r.setState(function(a){var i=a.date;return{date:y.setYear(i,Number(o))}},function(){return r.handleYearChange(r.state.date)})},r.changeMonth=function(o){r.setState(function(a){var i=a.date;return{date:y.setMonth(i,Number(o))}},function(){return r.handleMonthChange(r.state.date)})},r.changeMonthYear=function(o){r.setState(function(a){var i=a.date;return{date:y.setYear(y.setMonth(i,y.getMonth(o)),y.getYear(o))}},function(){return r.handleMonthYearChange(r.state.date)})},r.header=function(o){o===void 0&&(o=r.state.date);var a=Sr(o,r.props.locale,r.props.calendarStartDay),i=[];return r.props.showWeekNumbers&&i.push(w.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},w.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),w.createElement("span",{"aria-hidden":"true"},r.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(s){var c=y.addDays(a,s),l=r.formatWeekday(c,r.props.locale),u=r.props.weekDayClassName?r.props.weekDayClassName(c):void 0;return w.createElement("div",{key:s,role:"columnheader",className:Be("react-datepicker__day-name",u)},w.createElement("span",{className:"react-datepicker__sr-only"},Ye(c,"EEEE",r.props.locale)),w.createElement("span",{"aria-hidden":"true"},l))}))},r.formatWeekday=function(o,a){return r.props.formatWeekDay?Hg(o,r.props.formatWeekDay,a):r.props.useWeekdaysShort?Wg(o,a):Ug(o,a)},r.decreaseYear=function(){r.setState(function(o){var a,i=o.date;return{date:y.subYears(i,r.props.showYearPicker?(a=r.props.yearItemNumber)!==null&&a!==void 0?a:n.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.clearSelectingDate=function(){r.setState({selectingDate:void 0})},r.renderPreviousButton=function(){var o,a,i;if(!r.props.renderCustomHeader){var s=(o=r.props.monthsShown)!==null&&o!==void 0?o:n.defaultProps.monthsShown,c=r.props.showPreviousMonths?s-1:0,l=(a=r.props.monthSelectedIn)!==null&&a!==void 0?a:c,u=y.subMonths(r.state.date,l),d;switch(!0){case r.props.showMonthYearPicker:d=Bl(r.state.date,r.props);break;case r.props.showYearPicker:d=Qg(r.state.date,r.props);break;case r.props.showQuarterYearPicker:d=Kg(r.state.date,r.props);break;default:d=Ll(u,r.props);break}if(!(!((i=r.props.forceShowMonthNavigation)!==null&&i!==void 0?i:n.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&d||r.props.showTimeSelectOnly)){var f=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],m=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(g=r.decreaseYear),d&&r.props.showDisabledMonthNavigation&&(m.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,b=r.props,x=b.previousMonthButtonLabel,S=x===void 0?n.defaultProps.previousMonthButtonLabel:x,T=b.previousYearButtonLabel,D=T===void 0?n.defaultProps.previousYearButtonLabel:T,k=r.props,O=k.previousMonthAriaLabel,I=O===void 0?typeof S=="string"?S:"Previous Month":O,W=k.previousYearAriaLabel,U=W===void 0?typeof D=="string"?D:"Previous Year":W;return w.createElement("button",{type:"button",className:m.join(" "),onClick:g,onKeyDown:r.props.handleOnKeyDown,"aria-label":p?U:I},w.createElement("span",{className:f.join(" ")},p?D:S))}}},r.increaseYear=function(){r.setState(function(o){var a,i=o.date;return{date:y.addYears(i,r.props.showYearPicker?(a=r.props.yearItemNumber)!==null&&a!==void 0?a:n.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.renderNextButton=function(){var o;if(!r.props.renderCustomHeader){var a;switch(!0){case r.props.showMonthYearPicker:a=Vl(r.state.date,r.props);break;case r.props.showYearPicker:a=Jg(r.state.date,r.props);break;case r.props.showQuarterYearPicker:a=Gg(r.state.date,r.props);break;default:a=zl(r.state.date,r.props);break}if(!(!((o=r.props.forceShowMonthNavigation)!==null&&o!==void 0?o:n.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&a||r.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];r.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var c=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(c=r.increaseYear),a&&r.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),c=void 0);var l=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,d=u.nextMonthButtonLabel,f=d===void 0?n.defaultProps.nextMonthButtonLabel:d,m=u.nextYearButtonLabel,g=m===void 0?n.defaultProps.nextYearButtonLabel:m,p=r.props,b=p.nextMonthAriaLabel,x=b===void 0?typeof f=="string"?f:"Next Month":b,S=p.nextYearAriaLabel,T=S===void 0?typeof g=="string"?g:"Next Year":S;return w.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:r.props.handleOnKeyDown,"aria-label":l?T:x},w.createElement("span",{className:s.join(" ")},l?g:f))}}},r.renderCurrentMonth=function(o){o===void 0&&(o=r.state.date);var a=["react-datepicker__current-month"];return r.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),w.createElement("h2",{className:a.join(" ")},Ye(o,r.props.dateFormat,r.props.locale))},r.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!r.props.showYearDropdown||o))return w.createElement(bv,xe({},n.defaultProps,r.props,{date:r.state.date,onChange:r.changeYear,year:y.getYear(r.state.date)}))},r.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!r.props.showMonthDropdown||o))return w.createElement(dv,xe({},n.defaultProps,r.props,{month:y.getMonth(r.state.date),onChange:r.changeMonth}))},r.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!r.props.showMonthYearDropdown||o))return w.createElement(hv,xe({},n.defaultProps,r.props,{date:r.state.date,onChange:r.changeMonthYear}))},r.handleTodayButtonClick=function(o){r.props.onSelect(Al(),o),r.props.setPreSelection&&r.props.setPreSelection(Al())},r.renderTodayButton=function(){if(!(!r.props.todayButton||r.props.showTimeSelectOnly))return w.createElement("div",{className:"react-datepicker__today-button",onClick:r.handleTodayButtonClick},r.props.todayButton)},r.renderDayNamesHeader=function(o){return w.createElement("div",{className:"react-datepicker__day-names",role:"row"},r.header(o))},r.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return w.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(a),w.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(i!==0),r.renderMonthYearDropdown(i!==0),r.renderYearDropdown(i!==0)))},r.renderCustomHeader=function(o){var a,i,s=o.monthDate,c=o.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var l=r.props,u=l.showYearPicker,d=l.yearItemNumber,f;if(u){var m=dr(s,d),g=m.startPeriod,p=m.endPeriod;f={startYear:g,endYear:p}}var b=Ll(r.state.date,r.props),x=zl(r.state.date,r.props),S=Bl(r.state.date,r.props),T=Vl(r.state.date,r.props);return w.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},(i=(a=r.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,xe(xe(xe({},r.state),u&&{visibleYearsRange:f}),{customHeaderCount:c,monthDate:s,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:b,nextMonthButtonDisabled:x,prevYearButtonDisabled:S,nextYearButtonDisabled:T})))},r.renderYearHeader=function(o){var a=o.monthDate,i=r.props,s=i.showYearPicker,c=i.yearItemNumber,l=c===void 0?n.defaultProps.yearItemNumber:c,u=dr(a,l),d=u.startPeriod,f=u.endPeriod;return w.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(d," - ").concat(f):y.getYear(a))},r.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,c={monthDate:a,i:s};switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(c);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(c);default:return r.renderDefaultHeader(c)}},r.renderMonths=function(){var o,a;if(!(r.props.showTimeSelectOnly||r.props.showYearPicker)){for(var i=[],s=(o=r.props.monthsShown)!==null&&o!==void 0?o:n.defaultProps.monthsShown,c=r.props.showPreviousMonths?s-1:0,l=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?y.addYears(r.state.date,c):y.subMonths(r.state.date,c),u=(a=r.props.monthSelectedIn)!==null&&a!==void 0?a:c,d=0;d<s;++d){var f=d-u+c,m=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?y.addYears(l,f):y.addMonths(l,f),g="month-".concat(d),p=d<s-1,b=d>0;i.push(w.createElement("div",{key:g,ref:function(x){r.monthContainer=x??void 0},className:"react-datepicker__month-container"},r.renderHeader({monthDate:m,i:d}),w.createElement(lv,xe({},n.defaultProps,r.props,{containerRef:r.containerRef,ariaLabelPrefix:r.props.monthAriaLabelPrefix,day:m,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,handleOnMonthKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,orderInDisplay:d,selectingDate:r.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:b,dayNamesHeader:r.renderDayNamesHeader(m)}))))}return i}},r.renderYears=function(){if(!r.props.showTimeSelectOnly&&r.props.showYearPicker)return w.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader({monthDate:r.state.date}),w.createElement(gv,xe({},n.defaultProps,r.props,{selectingDate:r.state.selectingDate,date:r.state.date,onDayClick:r.handleDayClick,clearSelectingDate:r.clearSelectingDate,onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave})))},r.renderTimeSection=function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return w.createElement(mv,xe({},n.defaultProps,r.props,{onChange:r.props.onTimeChange,format:r.props.timeFormat,intervals:r.props.timeIntervals,monthRef:r.state.monthContainer}))},r.renderInputTimeSection=function(){var o=r.props.selected?new Date(r.props.selected):void 0,a=o&&ra(o)&&!!r.props.selected,i=a?"".concat(Ul(o.getHours()),":").concat(Ul(o.getMinutes())):"";if(r.props.showTimeInput)return w.createElement(ov,xe({},n.defaultProps,r.props,{date:o,timeString:i,onChange:r.props.onTimeChange}))},r.renderAriaLiveRegion=function(){var o,a=dr(r.state.date,(o=r.props.yearItemNumber)!==null&&o!==void 0?o:n.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,c;return r.props.showYearPicker?c="".concat(i," - ").concat(s):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?c=y.getYear(r.state.date):c="".concat(Ni(y.getMonth(r.state.date),r.props.locale)," ").concat(y.getYear(r.state.date)),w.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&c)},r.renderChildren=function(){if(r.props.children)return w.createElement("div",{className:"react-datepicker__children-container"},r.props.children)},r.containerRef=w.createRef(),r.state={date:r.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},r}return Object.defineProperty(n,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:Ql,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Vn}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},n.prototype.componentDidUpdate=function(t){var r=this;if(this.props.preSelection&&(!Se(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var o=!pt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&r.handleCustomMonthChange(r.state.date)})}else this.props.openToDate&&!Se(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},n.prototype.render=function(){var t=this.props.container||$g;return w.createElement(ta,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},w.createElement("div",{style:{display:"contents"},ref:this.containerRef},w.createElement(t,{className:Be("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},n})(w.Component),Sv=function(e){var n=e.icon,t=e.className,r=t===void 0?"":t,o=e.onClick,a="react-datepicker__calendar-icon";if(typeof n=="string")return w.createElement("i",{className:"".concat(a," ").concat(n," ").concat(r),"aria-hidden":"true",onClick:o});if(w.isValidElement(n)){var i=n;return w.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(a," ").concat(r),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof o=="function"&&o(s)}})}return w.createElement("svg",{className:"".concat(a," ").concat(r),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},w.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Jl=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.portalRoot=null,r.el=document.createElement("div"),r}return n.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},n.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},n.prototype.render=function(){return zs.createPortal(this.props.children,this.el)},n})(w.Component),Cv="[tabindex], a, button, input, select, textarea",kv=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},Xl=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.getTabChildren=function(){var o;return Array.prototype.slice.call((o=r.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(Cv),1,-1).filter(kv)},r.handleFocusStart=function(){var o=r.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},r.handleFocusEnd=function(){var o=r.getTabChildren();o&&o.length>1&&o[0].focus()},r.tabLoopRef=w.createRef(),r}return n.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:n.defaultProps.enableTabLoop)?w.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},w.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,w.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},n.defaultProps={enableTabLoop:!0},n})(w.Component);function Dv(e){function n(t){var r,o=typeof t.hidePopper=="boolean"?t.hidePopper:!0,a=w.useRef(null),i=Rg(xe({open:!o,whileElementsMounted:fg,placement:t.popperPlacement,middleware:er([_g({padding:15}),wg(10),xg({element:a})],(r=t.popperModifiers)!==null&&r!==void 0?r:[],!0)},t.popperProps)),s=xe(xe({},t),{hidePopper:o,popperProps:xe(xe({},i),{arrowRef:a})});return w.createElement(e,xe({},s))}return n.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),n}var Ev=function(e){var n=e.className,t=e.wrapperClassName,r=e.hidePopper,o=r===void 0?!0:r,a=e.popperComponent,i=e.targetComponent,s=e.enableTabLoop,c=e.popperOnKeyDown,l=e.portalId,u=e.portalHost,d=e.popperProps,f=e.showArrow,m=void 0;if(!o){var g=Be("react-datepicker-popper",n);m=w.createElement(Xl,{enableTabLoop:s},w.createElement("div",{ref:d.refs.setFloating,style:d.floatingStyles,className:g,"data-placement":d.placement,onKeyDown:c},a,f&&w.createElement(Tg,{ref:d.arrowRef,context:d.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(m=w.createElement(e.popperContainer,{},m)),l&&!o&&(m=w.createElement(Jl,{portalId:l,portalHost:u},m));var p=Be("react-datepicker-wrapper",t);return w.createElement(w.Fragment,null,w.createElement("div",{ref:d.refs.setReference,className:p},i),m)},Tv=Dv(Ev);function Ov(e,n){return e&&n?y.getMonth(e)!==y.getMonth(n)||y.getYear(e)!==y.getYear(n):e!==n}var Li="Date input not valid.",Mv=(function(e){ct(n,e);function n(t){var r=e.call(this,t)||this;return r.calendar=null,r.input=null,r.getPreSelection=function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:Ae()},r.modifyHolidays=function(){var o;return(o=r.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return ra(s)?er(er([],a,!0),[xe(xe({},i),{date:s})],!1):a},[])},r.calcInitialState=function(){var o,a=r.getPreSelection(),i=Fl(r.props),s=Yl(r.props),c=i&&y.isBefore(a,na(i))?i:s&&y.isAfter(a,Pl(s))?s:a;return{open:r.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=r.props.selectsRange?r.props.startDate:r.props.selected)!==null&&o!==void 0?o:c,highlightDates:Hl(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},r.getInputValue=function(){var o,a=r.props,i=a.locale,s=a.startDate,c=a.endDate,l=a.rangeSeparator,u=a.selected,d=a.selectedDates,f=a.selectsMultiple,m=a.selectsRange,g=a.value,p=(o=r.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,b=r.state.inputValue;return typeof g=="string"?g:typeof b=="string"?b:m?Lg(s,c,{dateFormat:p,locale:i,rangeSeparator:l}):f?zg(d??[],{dateFormat:p,locale:i}):Nt(u,{dateFormat:p,locale:i})},r.resetHiddenStatus=function(){r.setState(xe(xe({},r.state),{wasHidden:!1}))},r.setHiddenStatus=function(){r.setState(xe(xe({},r.state),{wasHidden:!0}))},r.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&r.setHiddenStatus()},r.clearPreventFocusTimeout=function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)},r.setFocus=function(){var o,a;(a=(o=r.input)===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o,{preventScroll:!0})},r.setBlur=function(){var o,a;(a=(o=r.input)===null||o===void 0?void 0:o.blur)===null||a===void 0||a.call(o),r.cancelFocusInput()},r.deferBlur=function(){requestAnimationFrame(function(){r.setBlur()})},r.setOpen=function(o,a){a===void 0&&(a=!1),r.setState({open:o,preSelection:o&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:zi},function(){o||r.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&r.deferBlur(),r.setState({inputValue:null})})})},r.inputOk=function(){return y.isDate(r.state.preSelection)},r.isCalendarOpen=function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open},r.handleFocus=function(o){var a,i,s=r.state.wasHidden,c=s?r.state.open:!0;s&&r.resetHiddenStatus(),r.state.preventFocus||((i=(a=r.props).onFocus)===null||i===void 0||i.call(a,o),c&&!r.props.preventOpenOnFocus&&!r.props.readOnly&&r.setOpen(!0)),r.setState({focused:!0})},r.sendFocusBackToInput=function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})},r.cancelFocusInput=function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=void 0},r.deferFocusInput=function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)},r.handleDropdownFocus=function(){r.cancelFocusInput()},r.resetInputValue=function(){r.setState(xe(xe({},r.state),{inputValue:null}))},r.handleBlur=function(o){var a,i;(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&((i=(a=r.props).onBlur)===null||i===void 0||i.call(a,o)),r.resetInputValue(),r.state.open&&r.props.open===!1&&r.setOpen(!1),r.setState({focused:!1})},r.handleCalendarClickOutside=function(o){var a,i;r.props.inline||r.setOpen(!1),(i=(a=r.props).onClickOutside)===null||i===void 0||i.call(a,o),r.props.withPortal&&o.preventDefault()},r.handleChange=function(){for(var o,a,i,s,c,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];var d=l[0];if(!(r.props.onChangeRaw&&(r.props.onChangeRaw.apply(r,l),!d||typeof d.isDefaultPrevented!="function"||d.isDefaultPrevented()))){r.setState({inputValue:d?.target instanceof HTMLInputElement?d.target.value:null,lastPreSelectChange:Av});var f=r.props,m=f.selectsRange,g=f.startDate,p=f.endDate,b=(o=r.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,x=(a=r.props.strictParsing)!==null&&a!==void 0?a:n.defaultProps.strictParsing,S=d?.target instanceof HTMLInputElement?d.target.value:"";if(m){var T=r.props.rangeSeparator,D=T.trim(),k=S.split(b.includes(D)?T:D,2).map(function(M){return M.trim()}),O=k[0],I=k[1],W=Ai(O??"",b,r.props.locale,x),U=W?Ai(I??"",b,r.props.locale,x):null,$=g?.getTime()!==W?.getTime(),Q=p?.getTime()!==U?.getTime();if(!$&&!Q||W&&Rt(W,r.props)||U&&Rt(U,r.props))return;(s=(i=r.props).onChange)===null||s===void 0||s.call(i,[W,U],d)}else{var v=Ai(S,b,r.props.locale,x,(c=r.props.selected)!==null&&c!==void 0?c:void 0);(v||!S)&&r.setSelected(v,d,!0)}}},r.handleSelect=function(o,a,i){if(!r.props.readOnly){var s=r.props,c=s.selectsRange,l=s.startDate,u=s.endDate,d=s.swapRange,f=!c||l&&!u&&(d||!$i(o,l));r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&f&&r.sendFocusBackToInput(),r.props.onChangeRaw&&r.props.onChangeRaw(a),r.setSelected(o,a,!1,i),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect?r.setPreSelection(o):f&&r.setOpen(!1)}},r.setSelected=function(o,a,i,s){var c,l,u=o;if(r.props.showYearPicker){if(u!==null&&ca(y.getYear(u),r.props))return}else if(r.props.showMonthYearPicker){if(u!==null&&Nl(u,r.props))return}else if(u!==null&&Rt(u,r.props))return;var d=r.props,f=d.onChange,m=d.selectsRange,g=d.startDate,p=d.endDate,b=d.selectsMultiple,x=d.selectedDates,S=d.minTime,T=d.swapRange;if(!Nr(r.props.selected,u)||r.props.allowSameDay||m||b)if(u!==null&&(r.props.selected&&(!i||!r.props.showTimeSelect&&!r.props.showTimeSelectOnly&&!r.props.showTimeInput)&&(u=Pi(u,{hour:y.getHours(r.props.selected),minute:y.getMinutes(r.props.selected),second:y.getSeconds(r.props.selected)})),!i&&(r.props.showTimeSelect||r.props.showTimeSelectOnly)&&S&&(u=Pi(u,{hour:S.getHours(),minute:S.getMinutes(),second:S.getSeconds()})),r.props.inline||r.setState({preSelection:u}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:s})),m){var D=!g&&!p,k=g&&!p,O=!g&&!!p,I=g&&p;D?f?.([u,null],a):k?u===null?f?.([null,null],a):$i(u,g)?f?.(T?[u,g]:[u,null],a):f?.([g,u],a):O&&(u&&$i(u,p)?f?.([u,p],a):f?.([u,null],a)),I&&f?.([u,null],a)}else if(b){if(u!==null)if(!x?.length)f?.([u],a);else{var W=x.some(function($){return Se($,u)});if(W){var U=x.filter(function($){return!Se($,u)});f?.(U,a)}else f?.(er(er([],x,!0),[u],!1),a)}}else f?.(u,a);i||((l=(c=r.props).onSelect)===null||l===void 0||l.call(c,u,a),r.setState({inputValue:null}))},r.setPreSelection=function(o){if(!r.props.readOnly){var a=y.isDate(r.props.minDate),i=y.isDate(r.props.maxDate),s=!0;if(o){var c=na(o);if(a&&i)s=Rr(o,r.props.minDate,r.props.maxDate);else if(a){var l=na(r.props.minDate);s=y.isAfter(o,l)||Nr(c,l)}else if(i){var u=Pl(r.props.maxDate);s=y.isBefore(o,u)||Nr(c,u)}}s&&r.setState({preSelection:o})}},r.toggleCalendar=function(){r.setOpen(!r.state.open)},r.handleTimeChange=function(o){var a,i;if(!(r.props.selectsRange||r.props.selectsMultiple)){var s=r.props.selected?r.props.selected:r.getPreSelection(),c=r.props.selected?o:Pi(s,{hour:y.getHours(o),minute:y.getMinutes(o)});r.setState({preSelection:c}),(i=(a=r.props).onChange)===null||i===void 0||i.call(a,c),r.props.shouldCloseOnSelect&&!r.props.showTimeInput&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}},r.onInputClick=function(){var o,a;!r.props.disabled&&!r.props.readOnly&&r.setOpen(!0),(a=(o=r.props).onInputClick)===null||a===void 0||a.call(o)},r.onInputKeyDown=function(o){var a,i,s,c,l,u;(i=(a=r.props).onKeyDown)===null||i===void 0||i.call(a,o);var d=o.key;if(!r.state.open&&!r.props.inline&&!r.props.preventOpenOnFocus){(d===ne.ArrowDown||d===ne.ArrowUp||d===ne.Enter)&&((s=r.onInputClick)===null||s===void 0||s.call(r));return}if(r.state.open){if(d===ne.ArrowDown||d===ne.ArrowUp){o.preventDefault();var f=r.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':r.props.showFullMonthYearPicker||r.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',m=((c=r.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(f);m instanceof HTMLElement&&m.focus({preventScroll:!0});return}var g=Ae(r.state.preSelection);d===ne.Enter?(o.preventDefault(),o.target.blur(),r.inputOk()&&r.state.lastPreSelectChange===zi?(r.handleSelect(g,o),!r.props.shouldCloseOnSelect&&r.setPreSelection(g)):r.setOpen(!1)):d===ne.Escape?(o.preventDefault(),o.target.blur(),r.sendFocusBackToInput(),r.setOpen(!1)):d===ne.Tab&&r.setOpen(!1),r.inputOk()||(u=(l=r.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:Li})}},r.onPortalKeyDown=function(o){var a=o.key;a===ne.Escape&&(o.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))},r.onDayKeyDown=function(o){var a,i,s,c,l,u,d=r.props,f=d.minDate,m=d.maxDate,g=d.disabledKeyboardNavigation,p=d.showWeekPicker,b=d.shouldCloseOnSelect,x=d.locale,S=d.calendarStartDay,T=d.adjustDateOnChange,D=d.inline;if((i=(a=r.props).onKeyDown)===null||i===void 0||i.call(a,o),!g){var k=o.key,O=o.shiftKey,I=Ae(r.state.preSelection),W=function(H,Y){var ee=Y;switch(H){case ne.ArrowRight:ee=p?y.addWeeks(Y,1):y.addDays(Y,1);break;case ne.ArrowLeft:ee=p?y.subWeeks(Y,1):y.subDays(Y,1);break;case ne.ArrowUp:ee=y.subWeeks(Y,1);break;case ne.ArrowDown:ee=y.addWeeks(Y,1);break;case ne.PageUp:ee=O?y.subYears(Y,1):y.subMonths(Y,1);break;case ne.PageDown:ee=O?y.addYears(Y,1):y.addMonths(Y,1);break;case ne.Home:ee=Sr(Y,x,S);break;case ne.End:ee=Fg(Y);break}return ee},U=function(H,Y){for(var ee=40,ae=H,be=!1,z=0,K=W(H,Y);!be;){if(z>=ee){K=Y;break}f&&K<f&&(ae=ne.ArrowRight,K=Rt(f,r.props)?W(ae,K):f),m&&K>m&&(ae=ne.ArrowLeft,K=Rt(m,r.props)?W(ae,K):m),Rt(K,r.props)?((ae===ne.PageUp||ae===ne.Home)&&(ae=ne.ArrowRight),(ae===ne.PageDown||ae===ne.End)&&(ae=ne.ArrowLeft),K=W(ae,K)):be=!0,z++}return K};if(k===ne.Enter){o.preventDefault(),r.handleSelect(I,o),!b&&r.setPreSelection(I);return}else if(k===ne.Escape){o.preventDefault(),r.setOpen(!1),r.inputOk()||(c=(s=r.props).onInputError)===null||c===void 0||c.call(s,{code:1,msg:Li});return}var $=null;switch(k){case ne.ArrowLeft:case ne.ArrowRight:case ne.ArrowUp:case ne.ArrowDown:case ne.PageUp:case ne.PageDown:case ne.Home:case ne.End:$=U(k,I);break}if(!$){(u=(l=r.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:Li});return}if(o.preventDefault(),r.setState({lastPreSelectChange:zi}),T&&r.setSelected($),r.setPreSelection($),D){var Q=y.getMonth(I),v=y.getMonth($),M=y.getYear(I),P=y.getYear($);Q!==v||M!==P?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}},r.onPopperKeyDown=function(o){var a=o.key;a===ne.Escape&&(o.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1))},r.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),r.sendFocusBackToInput();var a=r.props,i=a.selectsRange,s=a.onChange;s?.(i?[null,null]:null,o),r.setState({inputValue:null})},r.clear=function(){r.onClearClick()},r.onScroll=function(o){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(o)&&r.setOpen(!1)},r.renderCalendar=function(){var o,a;return!r.props.inline&&!r.isCalendarOpen()?null:w.createElement(xv,xe({showMonthYearDropdown:void 0,ref:function(i){r.calendar=i}},r.props,r.state,{setOpen:r.setOpen,dateFormat:(o=r.props.dateFormatCalendar)!==null&&o!==void 0?o:n.defaultProps.dateFormatCalendar,onSelect:r.handleSelect,onClickOutside:r.handleCalendarClickOutside,holidays:ev(r.modifyHolidays()),outsideClickIgnoreClass:r.props.outsideClickIgnoreClass,onDropdownFocus:r.handleDropdownFocus,onTimeChange:r.handleTimeChange,className:r.props.calendarClassName,container:r.props.calendarContainer,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,setPreSelection:r.setPreSelection,dropdownMode:(a=r.props.dropdownMode)!==null&&a!==void 0?a:n.defaultProps.dropdownMode}),r.props.children)},r.renderAriaLiveRegion=function(){var o,a=r.props.locale,i=(o=r.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,s=r.props.showTimeInput||r.props.showTimeSelect,c=s?"PPPPp":"PPPP",l;return r.props.selectsRange?l="Selected start date: ".concat(Nt(r.props.startDate,{dateFormat:c,locale:a}),". ").concat(r.props.endDate?"End date: "+Nt(r.props.endDate,{dateFormat:c,locale:a}):""):r.props.showTimeSelectOnly?l="Selected time: ".concat(Nt(r.props.selected,{dateFormat:i,locale:a})):r.props.showYearPicker?l="Selected year: ".concat(Nt(r.props.selected,{dateFormat:"yyyy",locale:a})):r.props.showMonthYearPicker?l="Selected month: ".concat(Nt(r.props.selected,{dateFormat:"MMMM yyyy",locale:a})):r.props.showQuarterYearPicker?l="Selected quarter: ".concat(Nt(r.props.selected,{dateFormat:"yyyy, QQQ",locale:a})):l="Selected date: ".concat(Nt(r.props.selected,{dateFormat:c,locale:a})),w.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},l)},r.renderDateInput=function(){var o,a,i=Be(r.props.className,(o={},o[r.props.outsideClickIgnoreClass||n.defaultProps.outsideClickIgnoreClass]=r.state.open,o)),s=r.props.customInput||w.createElement("input",{type:"text"}),c=r.props.customInputRef||"ref";return w.cloneElement(s,(a={},a[c]=function(l){r.input=l},a.value=r.getInputValue(),a.onBlur=r.handleBlur,a.onChange=r.handleChange,a.onClick=r.onInputClick,a.onFocus=r.handleFocus,a.onKeyDown=r.onInputKeyDown,a.id=r.props.id,a.name=r.props.name,a.form=r.props.form,a.autoFocus=r.props.autoFocus,a.placeholder=r.props.placeholderText,a.disabled=r.props.disabled,a.autoComplete=r.props.autoComplete,a.className=Be(s.props.className,i),a.title=r.props.title,a.readOnly=r.props.readOnly,a.required=r.props.required,a.tabIndex=r.props.tabIndex,a["aria-describedby"]=r.props.ariaDescribedBy,a["aria-invalid"]=r.props.ariaInvalid,a["aria-labelledby"]=r.props.ariaLabelledBy,a["aria-required"]=r.props.ariaRequired,a))},r.renderClearButton=function(){var o=r.props,a=o.isClearable,i=o.disabled,s=o.selected,c=o.startDate,l=o.endDate,u=o.clearButtonTitle,d=o.clearButtonClassName,f=d===void 0?"":d,m=o.ariaLabelClose,g=m===void 0?"Close":m,p=o.selectedDates,b=o.readOnly;return a&&!b&&(s!=null||c!=null||l!=null||p?.length)?w.createElement("button",{type:"button",className:Be("react-datepicker__close-icon",f,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,onClick:r.onClearClick,title:u,tabIndex:-1}):null},r.state=r.calcInitialState(),r.preventFocusTimeout=void 0,r}return Object.defineProperty(n,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:Ql,readOnly:!1,rangeSeparator:Ol,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Vn,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.componentDidUpdate=function(t,r){var o,a,i,s;t.inline&&Ov(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Hl(this.props.highlightDates)}),!r.focused&&!Nr(t.selected,this.props.selected)&&this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),r.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},n.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.renderInputContainer=function(){var t=this.props,r=t.showIcon,o=t.icon,a=t.calendarIconClassname,i=t.calendarIconClassName,s=t.toggleCalendarOnIconClick,c=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),w.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&w.createElement(Sv,xe({icon:o,className:Be(i,!i&&a,c&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},n.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var r=this.state.open?w.createElement(Xl,{enableTabLoop:this.props.enableTabLoop},w.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(r=w.createElement(Jl,xe({portalId:this.props.portalId},this.props),r)),w.createElement("div",null,this.renderInputContainer(),r)}return w.createElement(Tv,xe({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},n})(w.Component),Av="input",zi="navigate";const Pv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M2.999%208.611a1.1%201.1%200%200%201%20.33-.786%201.135%201.135%200%200%201%201.591%200l7.079%206.993%207.079-6.993a1.135%201.135%200%200%201%201.837.36%201.1%201.1%200%200%201-.246%201.215l-7.87%207.775a1.135%201.135%200%200%201-1.591%200L3.328%209.4a1.1%201.1%200%200%201-.329-.789'/%3e%3c/svg%3e",Iv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M15.39%2021a1.1%201.1%200%200%200%20.785-.33%201.135%201.135%200%200%200%200-1.591L9.182%2012l6.993-7.08a1.135%201.135%200%200%200-.36-1.835%201.1%201.1%200%200%200-1.21.244L6.824%2011.2a1.135%201.135%200%200%200%200%201.591L14.6%2020.67a1.1%201.1%200%200%200%20.79.33'/%3e%3c/svg%3e",Nv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M8.61%203a1.1%201.1%200%200%200-.785.33%201.135%201.135%200%200%200%200%201.591L14.818%2012l-6.993%207.08a1.135%201.135%200%200%200%20.36%201.835%201.1%201.1%200%200%200%201.21-.244l7.78-7.871a1.135%201.135%200%200%200%200-1.591L9.4%203.33A1.1%201.1%200%200%200%208.61%203'/%3e%3c/svg%3e",Rv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23fff'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.085%207.331a1.096%201.096%200%201%200-2.192%200v9.316a1.096%201.096%200%200%200%202.192%200z'/%3e%3cpath%20d='M16.647%2010.893H7.33a1.096%201.096%200%201%200%200%202.192h9.316a1.096%201.096%200%200%200%200-2.192'/%3e%3cpath%20d='M12%2024C5.38%2024%200%2018.608%200%2012S5.38%200%2012%200s12%205.38%2012%2012-5.38%2012-12%2012m0-21.808c-5.414%200-9.808%204.394-9.808%209.808S6.586%2021.808%2012%2021.808s9.808-4.394%209.808-9.808S17.403%202.192%2012%202.192'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",$v=w.forwardRef(({value:e,onClick:n},t)=>h.jsxs("button",{className:Mr.datePickerButton,onClick:n,ref:t,children:[e,h.jsx("img",{src:Pv,style:{marginLeft:10}})]})),jv=({currentDate:e,onPrevMonth:n,onNextMonth:t,onAddEvent:r,onDateChange:o})=>h.jsxs("div",{className:Mr.headerContainer,children:[h.jsxs("div",{className:Mr.navAndDate,children:[h.jsx("button",{className:Mr.navButton,onClick:n,children:h.jsx("img",{src:Iv,width:15})}),h.jsx("button",{className:Mr.navButton,onClick:t,children:h.jsx("img",{src:Nv,width:15})}),h.jsx(Mv,{selected:e,onChange:a=>o(a),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:Mr.datePickerInput,locale:"es",customInput:h.jsx($v,{})})]}),h.jsxs("button",{className:Mr.addEventButton,onClick:r,children:[h.jsx("img",{src:Rv}),"Agregar evento"]})]}),_e={sidebarContainer:"_sidebarContainer_1pgug_1",leadsSection:"_leadsSection_1pgug_17",leadCard:"_leadCard_1pgug_33",leadIcon:"_leadIcon_1pgug_71",leadDays:"_leadDays_1pgug_81",leadCount:"_leadCount_1pgug_91",eventsSection:"_eventsSection_1pgug_105",sidebarTitle:"_sidebarTitle_1pgug_129",eventGroup:"_eventGroup_1pgug_147",eventGroupDate:"_eventGroupDate_1pgug_155",eventItem:"_eventItem_1pgug_167",eventDetails:"_eventDetails_1pgug_201",eventTitle:"_eventTitle_1pgug_215",eventTime:"_eventTime_1pgug_241",calendarsSection:"_calendarsSection_1pgug_263",collapsibleHeader:"_collapsibleHeader_1pgug_271",headerTitle:"_headerTitle_1pgug_299",calendarCount:"_calendarCount_1pgug_313",chevronIcon:"_chevronIcon_1pgug_331",collapsed:"_collapsed_1pgug_339",collapsibleContent:"_collapsibleContent_1pgug_347",hidden:"_hidden_1pgug_363",calendarItem:"_calendarItem_1pgug_373",circularCheckbox:"_circularCheckbox_1pgug_407",checkedIcon:"_checkedIcon_1pgug_425",uncheckedIcon:"_uncheckedIcon_1pgug_433",calendarIcon:"_calendarIcon_1pgug_441",googleIcon:"_googleIcon_1pgug_449",syncButton:"_syncButton_1pgug_457",eventsContainer:"_eventsContainer_1pgug_509"};/**
|
|
107
|
+
*/var Ma=function(n,t){return Ma=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},Ma(n,t)};function ut(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Ma(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}var xe=function(){return xe=Object.assign||function(t){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},xe.apply(this,arguments)};function nr(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,i;r<o;r++)(i||!(r in n))&&(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var B0=function(e){var n=e.showTimeSelectOnly,t=n===void 0?!1:n,r=e.showTime,o=r===void 0?!1:r,i=e.className,a=e.children,s=t?"Choose Time":"Choose Date".concat(o?" and Time":"");return w.createElement("div",{className:i,role:"dialog","aria-label":s,"aria-modal":"true"},a)},V0=function(e,n){var t=w.useRef(null),r=w.useRef(e);r.current=e;var o=w.useCallback(function(i){var a,s=i.composed&&i.composedPath&&i.composedPath().find(function(c){return c instanceof Node})||i.target;t.current&&!t.current.contains(s)&&(n&&s instanceof HTMLElement&&s.classList.contains(n)||(a=r.current)===null||a===void 0||a.call(r,i))},[n]);return w.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),t},ti=function(e){var n=e.children,t=e.onClickOutside,r=e.className,o=e.containerRef,i=e.style,a=e.ignoreClass,s=V0(t,a);return w.createElement("div",{className:r,style:i,ref:function(c){s.current=c,o&&(o.current=c)}},n)},re;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(re||(re={}));function Al(){var e=typeof window<"u"?window:globalThis;return e}var Vn=12;function Pe(e){if(e==null)return new Date;var n=typeof e=="string"?y.parseISO(e):y.toDate(e);return ri(n)?n:new Date}function Aa(e,n,t,r,o){o===void 0&&(o=Pe());for(var i=ln(t)||ln(Ia()),a=Array.isArray(n)?n:[n],s=0,c=a;s<c.length;s++){var l=c[s],u=y.parse(e,l,o,{locale:i,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(ri(u)&&(!r||e===He(u,l,t)))return u}return null}function ri(e,n){return y.isValid(e)&&!y.isBefore(e,new Date("1/1/1800"))}function He(e,n,t){if(t==="en")return y.format(e,n,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var r=t?ln(t):void 0;return t&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),r=r||ln(Ia()),y.format(e,n,{locale:r,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function $t(e,n){var t=n.dateFormat,r=n.locale,o=Array.isArray(t)&&t.length>0?t[0]:t;return e&&He(e,o,r)||""}var Pl=" - ";function F0(e,n,t){if(!e&&!n)return"";var r=e?$t(e,t):"",o=n?$t(n,t):"",i=t.rangeSeparator||Pl;return"".concat(r).concat(i).concat(o)}function Y0(e,n){if(!e?.length)return"";var t=e[0]?$t(e[0],n):"";if(e.length===1)return t;if(e.length===2&&e[1]){var r=$t(e[1],n);return"".concat(t,", ").concat(r)}var o=e.length-1;return"".concat(t," (+").concat(o,")")}function Pa(e,n){var t=n.hour,r=t===void 0?0:t,o=n.minute,i=o===void 0?0:o,a=n.second,s=a===void 0?0:a;return y.setHours(y.setMinutes(y.setSeconds(e,s),i),r)}function H0(e){return y.getISOWeek(e)}function U0(e,n){return He(e,"ddd",n)}function ni(e){return y.startOfDay(e)}function Cr(e,n,t){var r=ln(n||Ia());return y.startOfWeek(e,{locale:r,weekStartsOn:t})}function dr(e){return y.startOfMonth(e)}function Fn(e){return y.startOfYear(e)}function Il(e){return y.startOfQuarter(e)}function Nl(){return y.startOfDay(Pe())}function Rl(e){return y.endOfDay(e)}function W0(e){return y.endOfWeek(e)}function Z0(e){return y.endOfMonth(e)}function or(e,n){return e&&n?y.isSameYear(e,n):!e&&!n}function mt(e,n){return e&&n?y.isSameMonth(e,n):!e&&!n}function oi(e,n){return e&&n?y.isSameQuarter(e,n):!e&&!n}function Se(e,n){return e&&n?y.isSameDay(e,n):!e&&!n}function Rr(e,n){return e&&n?y.isEqual(e,n):!e&&!n}function $r(e,n,t){var r,o=y.startOfDay(n),i=y.endOfDay(t);try{r=y.isWithinInterval(e,{start:o,end:i})}catch{r=!1}return r}function Ia(){var e=Al();return e.__localeId__}function ln(e){if(typeof e=="string"){var n=Al();return n.__localeData__?n.__localeData__[e]:void 0}else return e}function q0(e,n,t){return n(He(e,"EEEE",t))}function K0(e,n){return He(e,"EEEEEE",n)}function G0(e,n){return He(e,"EEE",n)}function Na(e,n){return He(y.setMonth(Pe(),e),"LLLL",n)}function $l(e,n){return He(y.setMonth(Pe(),e),"LLL",n)}function Q0(e,n){return He(y.setQuarter(Pe(),e),"QQQ",n)}function jt(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,i=t.excludeDates,a=t.excludeDateIntervals,s=t.includeDates,c=t.includeDateIntervals,l=t.filterDate;return Yn(e,{minDate:r,maxDate:o})||i&&i.some(function(u){return u instanceof Date?Se(e,u):Se(e,u.date)})||a&&a.some(function(u){var d=u.start,f=u.end;return y.isWithinInterval(e,{start:d,end:f})})||s&&!s.some(function(u){return Se(e,u)})||c&&!c.some(function(u){var d=u.start,f=u.end;return y.isWithinInterval(e,{start:d,end:f})})||l&&!l(Pe(e))||!1}function Ra(e,n){var t=n===void 0?{}:n,r=t.excludeDates,o=t.excludeDateIntervals;return o&&o.length>0?o.some(function(i){var a=i.start,s=i.end;return y.isWithinInterval(e,{start:a,end:s})}):r&&r.some(function(i){var a;return i instanceof Date?Se(e,i):Se(e,(a=i.date)!==null&&a!==void 0?a:new Date)})||!1}function jl(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,i=t.excludeDates,a=t.includeDates,s=t.filterDate;return Yn(e,{minDate:r?y.startOfMonth(r):void 0,maxDate:o?y.endOfMonth(o):void 0})||i?.some(function(c){return mt(e,c instanceof Date?c:c.date)})||a&&!a.some(function(c){return mt(e,c)})||s&&!s(Pe(e))||!1}function ii(e,n,t,r){var o=y.getYear(e),i=y.getMonth(e),a=y.getYear(n),s=y.getMonth(n),c=y.getYear(r);return o===a&&o===c?i<=t&&t<=s:o<a?c===o&&i<=t||c===a&&s>=t||c<a&&c>o:!1}function J0(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,i=t.excludeDates,a=t.includeDates;return Yn(e,{minDate:r,maxDate:o})||i&&i.some(function(s){return mt(s instanceof Date?s:s.date,e)})||a&&!a.some(function(s){return mt(s,e)})||!1}function ai(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,i=t.excludeDates,a=t.includeDates,s=t.filterDate;return Yn(e,{minDate:r,maxDate:o})||i?.some(function(c){return oi(e,c instanceof Date?c:c.date)})||a&&!a.some(function(c){return oi(e,c)})||s&&!s(Pe(e))||!1}function si(e,n,t){if(!n||!t||!y.isValid(n)||!y.isValid(t))return!1;var r=y.getYear(n),o=y.getYear(t);return r<=e&&o>=e}function ci(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.maxDate,i=t.excludeDates,a=t.includeDates,s=t.filterDate,c=new Date(e,0,1);return Yn(c,{minDate:r?y.startOfYear(r):void 0,maxDate:o?y.endOfYear(o):void 0})||i?.some(function(l){return or(c,l instanceof Date?l:l.date)})||a&&!a.some(function(l){return or(c,l)})||s&&!s(Pe(c))||!1}function li(e,n,t,r){var o=y.getYear(e),i=y.getQuarter(e),a=y.getYear(n),s=y.getQuarter(n),c=y.getYear(r);return o===a&&o===c?i<=t&&t<=s:o<a?c===o&&i<=t||c===a&&s>=t||c<a&&c>o:!1}function Yn(e,n){var t,r=n===void 0?{}:n,o=r.minDate,i=r.maxDate;return(t=o&&y.differenceInCalendarDays(e,o)<0||i&&y.differenceInCalendarDays(e,i)>0)!==null&&t!==void 0?t:!1}function Ll(e,n){return n.some(function(t){return y.getHours(t)===y.getHours(e)&&y.getMinutes(t)===y.getMinutes(e)&&y.getSeconds(t)===y.getSeconds(e)})}function zl(e,n){var t=n===void 0?{}:n,r=t.excludeTimes,o=t.includeTimes,i=t.filterTime;return r&&Ll(e,r)||o&&!Ll(e,o)||i&&!i(e)||!1}function Bl(e,n){var t=n.minTime,r=n.maxTime;if(!t||!r)throw new Error("Both minTime and maxTime props required");var o=Pe();o=y.setHours(o,y.getHours(e)),o=y.setMinutes(o,y.getMinutes(e)),o=y.setSeconds(o,y.getSeconds(e));var i=Pe();i=y.setHours(i,y.getHours(t)),i=y.setMinutes(i,y.getMinutes(t)),i=y.setSeconds(i,y.getSeconds(t));var a=Pe();a=y.setHours(a,y.getHours(r)),a=y.setMinutes(a,y.getMinutes(r)),a=y.setSeconds(a,y.getSeconds(r));var s;try{s=!y.isWithinInterval(o,{start:i,end:a})}catch{s=!1}return s}function Vl(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.includeDates,i=y.subMonths(e,1);return r&&y.differenceInCalendarMonths(r,i)>0||o&&o.every(function(a){return y.differenceInCalendarMonths(a,i)>0})||!1}function Fl(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.includeDates,i=y.addMonths(e,1);return r&&y.differenceInCalendarMonths(i,r)>0||o&&o.every(function(a){return y.differenceInCalendarMonths(i,a)>0})||!1}function X0(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.includeDates,i=y.startOfYear(e),a=y.subQuarters(i,1);return r&&y.differenceInCalendarQuarters(r,a)>0||o&&o.every(function(s){return y.differenceInCalendarQuarters(s,a)>0})||!1}function ev(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.includeDates,i=y.endOfYear(e),a=y.addQuarters(i,1);return r&&y.differenceInCalendarQuarters(a,r)>0||o&&o.every(function(s){return y.differenceInCalendarQuarters(a,s)>0})||!1}function Yl(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.includeDates,i=y.subYears(e,1);return r&&y.differenceInCalendarYears(r,i)>0||o&&o.every(function(a){return y.differenceInCalendarYears(a,i)>0})||!1}function tv(e,n){var t=n===void 0?{}:n,r=t.minDate,o=t.yearItemNumber,i=o===void 0?Vn:o,a=Fn(y.subYears(e,i)),s=fr(a,i).endPeriod,c=r&&y.getYear(r);return c&&c>s||!1}function Hl(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.includeDates,i=y.addYears(e,1);return r&&y.differenceInCalendarYears(i,r)>0||o&&o.every(function(a){return y.differenceInCalendarYears(i,a)>0})||!1}function rv(e,n){var t=n===void 0?{}:n,r=t.maxDate,o=t.yearItemNumber,i=o===void 0?Vn:o,a=y.addYears(e,i),s=fr(a,i).startPeriod,c=r&&y.getYear(r);return c&&c<s||!1}function Ul(e){var n=e.minDate,t=e.includeDates;if(t&&n){var r=t.filter(function(o){return y.differenceInCalendarDays(o,n)>=0});return y.min(r)}else return t?y.min(t):n}function Wl(e){var n=e.maxDate,t=e.includeDates;if(t&&n){var r=t.filter(function(o){return y.differenceInCalendarDays(o,n)<=0});return y.max(r)}else return t?y.max(t):n}function Zl(e,n){var t;e===void 0&&(e=[]),n===void 0&&(n="react-datepicker__day--highlighted");for(var r=new Map,o=0,i=e.length;o<i;o++){var a=e[o];if(y.isDate(a)){var s=He(a,"MM.dd.yyyy"),c=r.get(s)||[];c.includes(n)||(c.push(n),r.set(s,c))}else if(typeof a=="object"){var l=Object.keys(a),u=(t=l[0])!==null&&t!==void 0?t:"",d=a[u];if(typeof u=="string"&&Array.isArray(d))for(var f=0,m=d.length;f<m;f++){var g=d[f];if(g){var s=He(g,"MM.dd.yyyy"),c=r.get(s)||[];c.includes(u)||(c.push(u),r.set(s,c))}}}}return r}function nv(e,n){return e.length!==n.length?!1:e.every(function(t,r){return t===n[r]})}function ov(e,n){e===void 0&&(e=[]),n===void 0&&(n="react-datepicker__day--holidays");var t=new Map;return e.forEach(function(r){var o=r.date,i=r.holidayName;if(y.isDate(o)){var a=He(o,"MM.dd.yyyy"),s=t.get(a)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===n&&nv(s.holidayNames,[i]))){s.className=n;var c=s.holidayNames;s.holidayNames=c?nr(nr([],c,!0),[i],!1):[i],t.set(a,s)}}}),t}function iv(e,n,t,r,o){for(var i=o.length,a=[],s=0;s<i;s++){var c=e,l=o[s];l&&(c=y.addHours(c,y.getHours(l)),c=y.addMinutes(c,y.getMinutes(l)),c=y.addSeconds(c,y.getSeconds(l)));var u=y.addMinutes(e,(t+1)*r);y.isAfter(c,n)&&y.isBefore(c,u)&&l!=null&&a.push(l)}return a}function ql(e){return e<10?"0".concat(e):"".concat(e)}function fr(e,n){n===void 0&&(n=Vn);var t=Math.ceil(y.getYear(e)/n)*n,r=t-(n-1);return{startPeriod:r,endPeriod:t}}function av(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+t-+n)/36e5)}function Kl(e){var n=e.getSeconds(),t=e.getMilliseconds();return y.toDate(e.getTime()-n*1e3-t)}function sv(e,n){return Kl(e).getTime()===Kl(n).getTime()}function Gl(e){if(!y.isDate(e))throw new Error("Invalid date");var n=new Date(e);return n.setHours(0,0,0,0),n}function $a(e,n){if(!y.isDate(e)||!y.isDate(n))throw new Error("Invalid date received");var t=Gl(e),r=Gl(n);return y.isBefore(t,r)}function Ql(e){return e.key===re.Space}var cv=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.inputRef=w.createRef(),r.onTimeChange=function(o){var i,a;r.setState({time:o});var s=r.props.date,c=s instanceof Date&&!isNaN(+s),l=c?s:new Date;if(o?.includes(":")){var u=o.split(":"),d=u[0],f=u[1];l.setHours(Number(d)),l.setMinutes(Number(f))}(a=(i=r.props).onChange)===null||a===void 0||a.call(i,l)},r.renderTimeInput=function(){var o=r.state.time,i=r.props,a=i.date,s=i.timeString,c=i.customTimeInput;return c?w.cloneElement(c,{date:a,value:o,onChange:r.onTimeChange}):w.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:r.inputRef,onClick:function(){var l;(l=r.inputRef.current)===null||l===void 0||l.focus()},required:!0,value:o,onChange:function(l){r.onTimeChange(l.target.value||s)}})},r.state={time:r.props.timeString},r}return n.getDerivedStateFromProps=function(t,r){return t.timeString!==r.time?{time:t.timeString}:null},n.prototype.render=function(){return w.createElement("div",{className:"react-datepicker__input-time-container"},w.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),w.createElement("div",{className:"react-datepicker-time__input-container"},w.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},n})(w.Component),lv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.dayEl=w.createRef(),t.handleClick=function(r){!t.isDisabled()&&t.props.onClick&&t.props.onClick(r)},t.handleMouseEnter=function(r){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(r)},t.handleOnKeyDown=function(r){var o,i,a=r.key;a===re.Space&&(r.preventDefault(),r.key=re.Enter),(i=(o=t.props).handleOnKeyDown)===null||i===void 0||i.call(o,r)},t.isSameDay=function(r){return Se(t.props.day,r)},t.isKeyboardSelected=function(){var r;if(t.props.disabledKeyboardNavigation)return!1;var o=t.props.selectsMultiple?(r=t.props.selectedDates)===null||r===void 0?void 0:r.some(function(a){return t.isSameDayOrWeek(a)}):t.isSameDayOrWeek(t.props.selected),i=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!o&&t.isSameDayOrWeek(t.props.preSelection)&&!i},t.isDisabled=function(r){return r===void 0&&(r=t.props.day),jt(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return Ra(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return Se(t.props.day,Cr(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(r){return t.props.showWeekPicker&&Se(r,Cr(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(r){return t.isSameDay(r)||t.isSameWeek(r)},t.getHighLightedClass=function(){var r=t.props,o=r.day,i=r.highlightDates;if(!i)return!1;var a=He(o,"MM.dd.yyyy");return i.get(a)},t.getHolidaysClass=function(){var r,o=t.props,i=o.day,a=o.holidays;if(!a)return[void 0];var s=He(i,"MM.dd.yyyy");return a.has(s)?[(r=a.get(s))===null||r===void 0?void 0:r.className]:[void 0]},t.isInRange=function(){var r=t.props,o=r.day,i=r.startDate,a=r.endDate;return!i||!a?!1:$r(o,i,a)},t.isInSelectingRange=function(){var r,o=t.props,i=o.day,a=o.selectsStart,s=o.selectsEnd,c=o.selectsRange,l=o.selectsDisabledDaysInRange,u=o.startDate,d=o.swapRange,f=o.endDate,m=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;if(!(a||s||c)||!m||!l&&t.isDisabled())return!1;if(a&&f&&(y.isBefore(m,f)||Rr(m,f)))return $r(i,m,f);if(s&&u&&(y.isAfter(m,u)||Rr(m,u)))return $r(i,u,m);if(c&&u&&!f){if(Rr(m,u)||y.isAfter(m,u))return $r(i,u,m);if(d&&y.isBefore(m,u))return $r(i,m,u)}return!1},t.isSelectingRangeStart=function(){var r;if(!t.isInSelectingRange())return!1;var o=t.props,i=o.day,a=o.startDate,s=o.selectsStart,c=o.swapRange,l=o.selectsRange,u=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return s?Se(i,u):l&&c&&a&&u?Se(i,y.isBefore(u,a)?u:a):Se(i,a)},t.isSelectingRangeEnd=function(){var r;if(!t.isInSelectingRange())return!1;var o=t.props,i=o.day,a=o.endDate,s=o.selectsEnd,c=o.selectsRange,l=o.swapRange,u=o.startDate,d=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return s?Se(i,d):c&&l&&u&&d?Se(i,y.isBefore(d,u)?u:d):c?Se(i,d):Se(i,a)},t.isRangeStart=function(){var r=t.props,o=r.day,i=r.startDate,a=r.endDate;return!i||!a?!1:Se(i,o)},t.isRangeEnd=function(){var r=t.props,o=r.day,i=r.startDate,a=r.endDate;return!i||!a?!1:Se(a,o)},t.isWeekend=function(){var r=y.getDay(t.props.day);return r===0||r===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===y.getMonth(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(y.getMonth(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(Pe())},t.isSelected=function(){var r;return t.props.selectsMultiple?(r=t.props.selectedDates)===null||r===void 0?void 0:r.some(function(o){return t.isSameDayOrWeek(o)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(r){var o=t.props.dayClassName?t.props.dayClassName(r):void 0;return Ve("react-datepicker__day",o,"react-datepicker__day--"+U0(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var r=t.props,o=r.day,i=r.ariaLabelPrefixWhenEnabled,a=i===void 0?"Choose":i,s=r.ariaLabelPrefixWhenDisabled,c=s===void 0?"Not available":s,l=t.isDisabled()||t.isExcluded()?c:a;return"".concat(l," ").concat(He(o,"PPPP",t.props.locale))},t.getTitle=function(){var r=t.props,o=r.day,i=r.holidays,a=i===void 0?new Map:i,s=r.excludeDates,c=He(o,"MM.dd.yyyy"),l=[];return a.has(c)&&l.push.apply(l,a.get(c).holidayNames),t.isExcluded()&&l.push(s?.filter(function(u){return u instanceof Date?Se(u,o):Se(u?.date,o)}).map(function(u){if(!(u instanceof Date))return u?.message})),l.join(", ")},t.getTabIndex=function(){var r=t.props.selected,o=t.props.preSelection,i=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(r)&&Se(o,r))?0:-1;return i},t.handleFocusDay=function(){var r;t.shouldFocusDay()&&((r=t.dayEl.current)===null||r===void 0||r.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(y.getDate(t.props.day),t.props.day):y.getDate(t.props.day)},t.render=function(){return w.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"gridcell",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&w.createElement("span",{className:"overlay"},t.getTitle()))},t}return n.prototype.componentDidMount=function(){this.handleFocusDay()},n.prototype.componentDidUpdate=function(){this.handleFocusDay()},n.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},n.prototype.isDayActiveElement=function(){var t,r,o;return((r=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||r===void 0?void 0:r.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},n.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},n})(w.Component),uv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.weekNumberEl=w.createRef(),t.handleClick=function(r){t.props.onClick&&t.props.onClick(r)},t.handleOnKeyDown=function(r){var o,i,a=r.key;a===re.Space&&(r.preventDefault(),r.key=re.Enter),(i=(o=t.props).handleOnKeyDown)===null||i===void 0||i.call(o,r)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!Se(t.props.date,t.props.selected)&&Se(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||Se(t.props.date,t.props.selected)&&Se(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(r){var o=!1;t.getTabIndex()===0&&!r?.isInputFocused&&Se(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(o=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},n.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},n.prototype.render=function(){var t=this.props,r=t.weekNumber,o=t.isWeekDisabled,i=t.ariaLabelPrefix,a=i===void 0?n.defaultProps.ariaLabelPrefix:i,s=t.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&Se(this.props.date,this.props.selected)};return w.createElement("div",{ref:this.weekNumberEl,className:Ve(c),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},r)},n})(w.Component),dv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDisabled=function(r){return jt(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(r,o){t.props.onDayClick&&t.props.onDayClick(r,o)},t.handleDayMouseEnter=function(r){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(r)},t.handleWeekClick=function(r,o,i){for(var a,s,c,l=new Date(r),u=0;u<7;u++){var d=new Date(r);d.setDate(d.getDate()+u);var f=!t.isDisabled(d);if(f){l=d;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(l,o,i),t.props.showWeekPicker&&t.handleDayClick(l,i),((a=t.props.shouldCloseOnSelect)!==null&&a!==void 0?a:n.defaultProps.shouldCloseOnSelect)&&((c=(s=t.props).setOpen)===null||c===void 0||c.call(s,!1))},t.formatWeekNumber=function(r){return t.props.formatWeekNumber?t.props.formatWeekNumber(r):H0(r)},t.isWeekDisabled=function(){for(var r=t.startOfWeek(),o=y.addDays(r,6),i=new Date(r);i<=o;){if(!t.isDisabled(i))return!1;i=y.addDays(i,1)}return!0},t.renderDays=function(){var r=t.startOfWeek(),o=[],i=t.formatWeekNumber(r);if(t.props.showWeekNumber){var a=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,r,i):void 0;o.push(w.createElement(uv,xe({key:"W"},n.defaultProps,t.props,{weekNumber:i,isWeekDisabled:t.isWeekDisabled(),date:r,onClick:a})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var c=y.addDays(r,s);return w.createElement(lv,xe({},n.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:t.handleDayClick.bind(t,c),onMouseEnter:t.handleDayMouseEnter.bind(t,c)}))}))},t.startOfWeek=function(){return Cr(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!Se(t.startOfWeek(),t.props.selected)&&Se(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),n.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":Se(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},r=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return w.createElement("div",{className:Ve(t,r),role:"row"},this.renderDays())},n})(w.Component),Hn,fv=6,un={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ja=(Hn={},Hn[un.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Hn[un.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Hn[un.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Hn),ui=1;function Jl(e,n){return e?un.FOUR_COLUMNS:n?un.TWO_COLUMNS:un.THREE_COLUMNS}var pv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.MONTH_REFS=nr([],Array(12),!0).map(function(){return w.createRef()}),t.QUARTER_REFS=nr([],Array(4),!0).map(function(){return w.createRef()}),t.isDisabled=function(r){return jt(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(r){return Ra(r,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(r,o){var i,a;(a=(i=t.props).onDayClick)===null||a===void 0||a.call(i,r,o,t.props.orderInDisplay)},t.handleDayMouseEnter=function(r){var o,i;(i=(o=t.props).onDayMouseEnter)===null||i===void 0||i.call(o,r)},t.handleMouseLeave=function(){var r,o;(o=(r=t.props).onMouseLeave)===null||o===void 0||o.call(r)},t.isRangeStartMonth=function(r){var o=t.props,i=o.day,a=o.startDate,s=o.endDate;return!a||!s?!1:mt(y.setMonth(i,r),a)},t.isRangeStartQuarter=function(r){var o=t.props,i=o.day,a=o.startDate,s=o.endDate;return!a||!s?!1:oi(y.setQuarter(i,r),a)},t.isRangeEndMonth=function(r){var o=t.props,i=o.day,a=o.startDate,s=o.endDate;return!a||!s?!1:mt(y.setMonth(i,r),s)},t.isRangeEndQuarter=function(r){var o=t.props,i=o.day,a=o.startDate,s=o.endDate;return!a||!s?!1:oi(y.setQuarter(i,r),s)},t.isInSelectingRangeMonth=function(r){var o,i=t.props,a=i.day,s=i.selectsStart,c=i.selectsEnd,l=i.selectsRange,u=i.startDate,d=i.endDate,f=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||c||l)||!f?!1:s&&d?ii(f,d,r,a):c&&u||l&&u&&!d?ii(u,f,r,a):!1},t.isSelectingMonthRangeStart=function(r){var o;if(!t.isInSelectingRangeMonth(r))return!1;var i=t.props,a=i.day,s=i.startDate,c=i.selectsStart,l=y.setMonth(a,r),u=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return c?mt(l,u):mt(l,s)},t.isSelectingMonthRangeEnd=function(r){var o;if(!t.isInSelectingRangeMonth(r))return!1;var i=t.props,a=i.day,s=i.endDate,c=i.selectsEnd,l=i.selectsRange,u=y.setMonth(a,r),d=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return c||l?mt(u,d):mt(u,s)},t.isInSelectingRangeQuarter=function(r){var o,i=t.props,a=i.day,s=i.selectsStart,c=i.selectsEnd,l=i.selectsRange,u=i.startDate,d=i.endDate,f=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||c||l)||!f?!1:s&&d?li(f,d,r,a):c&&u||l&&u&&!d?li(u,f,r,a):!1},t.isWeekInMonth=function(r){var o=t.props.day,i=y.addDays(r,6);return mt(r,o)||mt(i,o)},t.isCurrentMonth=function(r,o){return y.getYear(r)===y.getYear(Pe())&&o===y.getMonth(Pe())},t.isCurrentQuarter=function(r,o){return y.getYear(r)===y.getYear(Pe())&&o===y.getQuarter(Pe())},t.isSelectedMonth=function(r,o,i){return y.getMonth(i)===o&&y.getYear(r)===y.getYear(i)},t.isSelectMonthInList=function(r,o,i){return i.some(function(a){return t.isSelectedMonth(r,o,a)})},t.isSelectedQuarter=function(r,o,i){return y.getQuarter(r)===o&&y.getYear(r)===y.getYear(i)},t.isMonthSelected=function(){var r=t.props,o=r.day,i=r.selected,a=r.selectedDates,s=r.selectsMultiple,c=y.getMonth(o);return s?a?.some(function(l){return t.isSelectedMonth(o,c,l)}):!!i&&t.isSelectedMonth(o,c,i)},t.renderWeeks=function(){for(var r=[],o=t.props.fixedHeight,i=0,a=!1,s=Cr(dr(t.props.day),t.props.locale,t.props.calendarStartDay),c=function(g){return t.props.showWeekPicker?Cr(g,t.props.locale,t.props.calendarStartDay):t.props.preSelection},l=function(g){return t.props.showWeekPicker?Cr(g,t.props.locale,t.props.calendarStartDay):t.props.selected},u=t.props.selected?l(t.props.selected):void 0,d=t.props.preSelection?c(t.props.preSelection):void 0;r.push(w.createElement(dv,xe({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:i,day:s,month:y.getMonth(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:u,preSelection:d,showWeekNumber:t.props.showWeekNumbers}))),!a;){i++,s=y.addWeeks(s,1);var f=o&&i>=fv,m=!o&&!t.isWeekInMonth(s);if(f||m)if(t.props.peekNextMonth)a=!0;else break}return r},t.onMonthClick=function(r,o){var i=t.isMonthDisabledForLabelDate(o),a=i.isDisabled,s=i.labelDate;a||t.handleDayClick(dr(s),r)},t.onMonthMouseEnter=function(r){var o=t.isMonthDisabledForLabelDate(r),i=o.isDisabled,a=o.labelDate;i||t.handleDayMouseEnter(dr(a))},t.handleMonthNavigation=function(r,o){var i,a,s,c;(a=(i=t.props).setPreSelection)===null||a===void 0||a.call(i,o),(c=(s=t.MONTH_REFS[r])===null||s===void 0?void 0:s.current)===null||c===void 0||c.focus()},t.handleKeyboardNavigation=function(r,o,i){var a,s=t.props,c=s.selected,l=s.preSelection,u=s.setPreSelection,d=s.minDate,f=s.maxDate,m=s.showFourColumnMonthYearPicker,g=s.showTwoColumnMonthYearPicker;if(l){var p=Jl(m,g),b=t.getVerticalOffset(p),S=(a=ja[p])===null||a===void 0?void 0:a.grid,x=function(R,U,H){var V,K,v=U,$=H;switch(R){case re.ArrowRight:v=y.addMonths(U,ui),$=H===11?0:H+ui;break;case re.ArrowLeft:v=y.subMonths(U,ui),$=H===0?11:H-ui;break;case re.ArrowUp:v=y.subMonths(U,b),$=!((V=S?.[0])===null||V===void 0)&&V.includes(H)?H+12-b:H-b;break;case re.ArrowDown:v=y.addMonths(U,b),$=!((K=S?.[S.length-1])===null||K===void 0)&&K.includes(H)?H-12+b:H+b;break}return{newCalculatedDate:v,newCalculatedMonth:$}},T=function(R,U,H){for(var V=40,K=R,v=!1,$=0,M=x(K,U,H),L=M.newCalculatedDate,Y=M.newCalculatedMonth;!v;){if($>=V){L=U,Y=H;break}if(d&&L<d){K=re.ArrowRight;var J=x(K,L,Y);L=J.newCalculatedDate,Y=J.newCalculatedMonth}if(f&&L>f){K=re.ArrowLeft;var J=x(K,L,Y);L=J.newCalculatedDate,Y=J.newCalculatedMonth}if(J0(L,t.props)){var J=x(K,L,Y);L=J.newCalculatedDate,Y=J.newCalculatedMonth}else v=!0;$++}return{newCalculatedDate:L,newCalculatedMonth:Y}};if(o===re.Enter){t.isMonthDisabled(i)||(t.onMonthClick(r,i),u?.(c));return}var D=T(o,l,i),k=D.newCalculatedDate,O=D.newCalculatedMonth;switch(o){case re.ArrowRight:case re.ArrowLeft:case re.ArrowUp:case re.ArrowDown:t.handleMonthNavigation(O,k);break}}},t.getVerticalOffset=function(r){var o,i;return(i=(o=ja[r])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&i!==void 0?i:0},t.onMonthKeyDown=function(r,o){var i=t.props,a=i.disabledKeyboardNavigation,s=i.handleOnMonthKeyDown,c=r.key;c!==re.Tab&&r.preventDefault(),a||t.handleKeyboardNavigation(r,c,o),s&&s(r)},t.onQuarterClick=function(r,o){var i=y.setQuarter(t.props.day,o);ai(i,t.props)||t.handleDayClick(Il(i),r)},t.onQuarterMouseEnter=function(r){var o=y.setQuarter(t.props.day,r);ai(o,t.props)||t.handleDayMouseEnter(Il(o))},t.handleQuarterNavigation=function(r,o){var i,a,s,c;t.isDisabled(o)||t.isExcluded(o)||((a=(i=t.props).setPreSelection)===null||a===void 0||a.call(i,o),(c=(s=t.QUARTER_REFS[r-1])===null||s===void 0?void 0:s.current)===null||c===void 0||c.focus())},t.onQuarterKeyDown=function(r,o){var i,a,s=r.key;if(!t.props.disabledKeyboardNavigation)switch(s){case re.Enter:t.onQuarterClick(r,o),(a=(i=t.props).setPreSelection)===null||a===void 0||a.call(i,t.props.selected);break;case re.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===4?1:o+1,y.addQuarters(t.props.preSelection,1));break;case re.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===1?4:o-1,y.subQuarters(t.props.preSelection,1));break}},t.isMonthDisabledForLabelDate=function(r){var o,i=t.props,a=i.day,s=i.minDate,c=i.maxDate,l=i.excludeDates,u=i.includeDates,d=y.setMonth(a,r);return{isDisabled:(o=(s||c||l||u)&&jl(d,t.props))!==null&&o!==void 0?o:!1,labelDate:d}},t.isMonthDisabled=function(r){var o=t.isMonthDisabledForLabelDate(r).isDisabled;return o},t.getMonthClassNames=function(r){var o=t.props,i=o.day,a=o.startDate,s=o.endDate,c=o.preSelection,l=o.monthClassName,u=l?l(y.setMonth(i,r)):void 0,d=t.getSelection();return Ve("react-datepicker__month-text","react-datepicker__month-".concat(r),u,{"react-datepicker__month-text--disabled":t.isMonthDisabled(r),"react-datepicker__month-text--selected":d?t.isSelectMonthInList(i,r,d):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&c&&t.isSelectedMonth(i,r,c)&&!t.isMonthSelected()&&!t.isMonthDisabled(r),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(r),"react-datepicker__month-text--in-range":a&&s?ii(a,s,r,i):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(r),"react-datepicker__month-text--range-end":t.isRangeEndMonth(r),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(r),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(r),"react-datepicker__month-text--today":t.isCurrentMonth(i,r)})},t.getTabIndex=function(r){if(t.props.preSelection==null)return"-1";var o=y.getMonth(t.props.preSelection),i=t.isMonthDisabledForLabelDate(o).isDisabled,a=r===o&&!(i||t.props.disabledKeyboardNavigation)?"0":"-1";return a},t.getQuarterTabIndex=function(r){if(t.props.preSelection==null)return"-1";var o=y.getQuarter(t.props.preSelection),i=ai(t.props.day,t.props),a=r===o&&!(i||t.props.disabledKeyboardNavigation)?"0":"-1";return a},t.getAriaLabel=function(r){var o=t.props,i=o.chooseDayAriaLabelPrefix,a=i===void 0?"Choose":i,s=o.disabledDayAriaLabelPrefix,c=s===void 0?"Not available":s,l=o.day,u=o.locale,d=y.setMonth(l,r),f=t.isDisabled(d)||t.isExcluded(d)?c:a;return"".concat(f," ").concat(He(d,"MMMM yyyy",u))},t.getQuarterClassNames=function(r){var o=t.props,i=o.day,a=o.startDate,s=o.endDate,c=o.selected,l=o.minDate,u=o.maxDate,d=o.excludeDates,f=o.includeDates,m=o.filterDate,g=o.preSelection,p=o.disabledKeyboardNavigation,b=(l||u||d||f||m)&&ai(y.setQuarter(i,r),t.props);return Ve("react-datepicker__quarter-text","react-datepicker__quarter-".concat(r),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":c?t.isSelectedQuarter(i,r,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!p&&g&&t.isSelectedQuarter(i,r,g)&&!b,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(r),"react-datepicker__quarter-text--in-range":a&&s?li(a,s,r,i):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(r),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(r),"react-datepicker__quarter-text--today":t.isCurrentQuarter(i,r)})},t.getMonthContent=function(r){var o=t.props,i=o.showFullMonthYearPicker,a=o.renderMonthContent,s=o.locale,c=o.day,l=$l(r,s),u=Na(r,s);return a?a(r,l,u,c):i?u:l},t.getQuarterContent=function(r){var o,i=t.props,a=i.renderQuarterContent,s=i.locale,c=Q0(r,s);return(o=a?.(r,c))!==null&&o!==void 0?o:c},t.renderMonths=function(){var r,o=t.props,i=o.showTwoColumnMonthYearPicker,a=o.showFourColumnMonthYearPicker,s=o.day,c=o.selected,l=(r=ja[Jl(a,i)])===null||r===void 0?void 0:r.grid;return l?.map(function(u,d){return w.createElement("div",{className:"react-datepicker__month-wrapper",key:d},u.map(function(f,m){return w.createElement("div",{ref:t.MONTH_REFS[f],key:m,onClick:function(g){t.onMonthClick(g,f)},onKeyDown:function(g){Ql(g)&&(g.preventDefault(),g.key=re.Enter),t.onMonthKeyDown(g,f)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(f)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(f)}:void 0,tabIndex:Number(t.getTabIndex(f)),className:t.getMonthClassNames(f),"aria-disabled":t.isMonthDisabled(f),role:"option","aria-label":t.getAriaLabel(f),"aria-current":t.isCurrentMonth(s,f)?"date":void 0,"aria-selected":c?t.isSelectedMonth(s,f,c):void 0},t.getMonthContent(f))}))})},t.renderQuarters=function(){var r=t.props,o=r.day,i=r.selected,a=[1,2,3,4];return w.createElement("div",{className:"react-datepicker__quarter-wrapper"},a.map(function(s,c){return w.createElement("div",{key:c,ref:t.QUARTER_REFS[c],role:"option",onClick:function(l){t.onQuarterClick(l,s)},onKeyDown:function(l){t.onQuarterKeyDown(l,s)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(s)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(s)}:void 0,className:t.getQuarterClassNames(s),"aria-selected":i?t.isSelectedQuarter(o,s,i):void 0,tabIndex:Number(t.getQuarterTabIndex(s)),"aria-current":t.isCurrentQuarter(o,s)?"date":void 0},t.getQuarterContent(s))}))},t.getClassNames=function(){var r=t.props,o=r.selectingDate,i=r.selectsStart,a=r.selectsEnd,s=r.showMonthYearPicker,c=r.showQuarterYearPicker,l=r.showWeekPicker;return Ve("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(i||a)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":l})},t}return n.prototype.getSelection=function(){var t=this.props,r=t.selected,o=t.selectedDates,i=t.selectsMultiple;if(i)return o;if(r)return[r]},n.prototype.render=function(){var t=this.props,r=t.showMonthYearPicker,o=t.showQuarterYearPicker,i=t.day,a=t.ariaLabelPrefix,s=a===void 0?"Month ":a,c=s?s.trim()+" ":"",l=r||o;return l?w.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(He(i,"MMMM, yyyy",this.props.locale)),role:"listbox"},r?this.renderMonths():this.renderQuarters()):w.createElement("div",{role:"table"},this.props.dayNamesHeader&&w.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),w.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(He(i,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},n})(w.Component),hv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.monthOptionButtonsRef={},t.isSelectedMonth=function(r){return t.props.month===r},t.handleOptionKeyDown=function(r,o){var i;switch(o.key){case"Enter":o.preventDefault(),t.onChange(r);break;case"Escape":o.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var a=(r+(o.key==="ArrowUp"?-1:1)+t.props.monthNames.length)%t.props.monthNames.length;(i=t.monthOptionButtonsRef[a])===null||i===void 0||i.focus();break}}},t.renderOptions=function(){return t.monthOptionButtonsRef={},t.props.monthNames.map(function(r,o){return w.createElement("div",{ref:function(i){t.monthOptionButtonsRef[o]=i,t.isSelectedMonth(o)&&i?.focus()},role:"button",tabIndex:0,className:t.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:r,onClick:t.onChange.bind(t,o),onKeyDown:t.handleOptionKeyDown.bind(t,o),"aria-selected":t.isSelectedMonth(o)?"true":void 0},t.isSelectedMonth(o)?w.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",r)})},t.onChange=function(r){return t.props.onChange(r)},t.handleClickOutside=function(){return t.props.onCancel()},t}return n.prototype.render=function(){return w.createElement(ti,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},n})(w.Component),mv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(r){return r.map(function(o,i){return w.createElement("option",{key:o,value:i},o)})},t.renderSelectMode=function(r){return w.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(o){return t.onChange(parseInt(o.target.value))}},t.renderSelectOptions(r))},t.renderReadView=function(r,o){return w.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},w.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),w.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[t.props.month]))},t.renderDropdown=function(r){return w.createElement(hv,xe({key:"dropdown"},t.props,{monthNames:r,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(r){var o=t.state.dropdownVisible,i=[t.renderReadView(!o,r)];return o&&i.unshift(t.renderDropdown(r)),i},t.onChange=function(r){t.toggleDropdown(),r!==t.props.month&&t.props.onChange(r)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return n.prototype.render=function(){var t=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(i){return $l(i,t.props.locale)}:function(i){return Na(i,t.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(r);break;case"select":o=this.renderSelectMode(r);break}return w.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},n})(w.Component);function gv(e,n){for(var t=[],r=dr(e),o=dr(n);!y.isAfter(r,o);)t.push(Pe(r)),r=y.addMonths(r,1);return t}var vv=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.renderOptions=function(){return r.state.monthYearsList.map(function(o){var i=y.getTime(o),a=or(r.props.date,o)&&mt(r.props.date,o);return w.createElement("div",{className:a?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:i,onClick:r.onChange.bind(r,i),"aria-selected":a?"true":void 0},a?w.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",He(o,r.props.dateFormat,r.props.locale))})},r.onChange=function(o){return r.props.onChange(o)},r.handleClickOutside=function(){r.props.onCancel()},r.state={monthYearsList:gv(r.props.minDate,r.props.maxDate)},r}return n.prototype.render=function(){var t=Ve({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return w.createElement(ti,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},n})(w.Component),yv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var r=dr(t.props.minDate),o=dr(t.props.maxDate),i=[];!y.isAfter(r,o);){var a=y.getTime(r);i.push(w.createElement("option",{key:a,value:a},He(r,t.props.dateFormat,t.props.locale))),r=y.addMonths(r,1)}return i},t.onSelectChange=function(r){t.onChange(parseInt(r.target.value))},t.renderSelectMode=function(){return w.createElement("select",{value:y.getTime(dr(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(r){var o=He(t.props.date,t.props.dateFormat,t.props.locale);return w.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},w.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),w.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},t.renderDropdown=function(){return w.createElement(vv,xe({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var r=t.state.dropdownVisible,o=[t.renderReadView(!r)];return r&&o.unshift(t.renderDropdown()),o},t.onChange=function(r){t.toggleDropdown();var o=Pe(r);or(t.props.date,o)&&mt(t.props.date,o)||t.props.onChange(o)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return n.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return w.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},n})(w.Component),bv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var r,o,i;t.list&&(t.list.scrollTop=(i=t.centerLi&&n.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((o=(r=t.header)===null||r===void 0?void 0:r.clientHeight)!==null&&o!==void 0?o:0):t.list.clientHeight,t.centerLi))!==null&&i!==void 0?i:0)})},t.handleClick=function(r){var o,i;(t.props.minTime||t.props.maxTime)&&Bl(r,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&zl(r,t.props)||(i=(o=t.props).onChange)===null||i===void 0||i.call(o,r)},t.isSelectedTime=function(r){return t.props.selected&&sv(t.props.selected,r)},t.isDisabledTime=function(r){return(t.props.minTime||t.props.maxTime)&&Bl(r,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&zl(r,t.props)},t.liClasses=function(r){var o,i=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(r):void 0];return t.isSelectedTime(r)&&i.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(r)&&i.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(y.getHours(r)*3600+y.getMinutes(r)*60+y.getSeconds(r))%(((o=t.props.intervals)!==null&&o!==void 0?o:n.defaultProps.intervals)*60)!==0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")},t.handleOnKeyDown=function(r,o){var i,a;r.key===re.Space&&(r.preventDefault(),r.key=re.Enter),(r.key===re.ArrowUp||r.key===re.ArrowLeft)&&r.target instanceof HTMLElement&&r.target.previousSibling&&(r.preventDefault(),r.target.previousSibling instanceof HTMLElement&&r.target.previousSibling.focus()),(r.key===re.ArrowDown||r.key===re.ArrowRight)&&r.target instanceof HTMLElement&&r.target.nextSibling&&(r.preventDefault(),r.target.nextSibling instanceof HTMLElement&&r.target.nextSibling.focus()),r.key===re.Enter&&t.handleClick(o),(a=(i=t.props).handleOnKeyDown)===null||a===void 0||a.call(i,r)},t.renderTimes=function(){for(var r,o=[],i=typeof t.props.format=="string"?t.props.format:"p",a=(r=t.props.intervals)!==null&&r!==void 0?r:n.defaultProps.intervals,s=t.props.selected||t.props.openToDate||Pe(),c=ni(s),l=t.props.injectTimes&&t.props.injectTimes.sort(function(b,S){return b.getTime()-S.getTime()}),u=60*av(s),d=u/a,f=0;f<d;f++){var m=y.addMinutes(c,f*a);if(o.push(m),l){var g=iv(c,m,f,a,l);o=o.concat(g)}}var p=o.reduce(function(b,S){return S.getTime()<=s.getTime()?S:b},o[0]);return o.map(function(b){return w.createElement("li",{key:b.valueOf(),onClick:t.handleClick.bind(t,b),className:t.liClasses(b),ref:function(S){b===p&&(t.centerLi=S)},onKeyDown:function(S){t.handleOnKeyDown(S,b)},tabIndex:b===p?0:-1,role:"option","aria-selected":t.isSelectedTime(b)?"true":void 0,"aria-disabled":t.isDisabledTime(b)?"true":void 0},He(b,i,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?w.createElement(w.Fragment,null):w.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(r){t.header=r}},w.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},n.prototype.componentWillUnmount=function(){var t;(t=this.resizeObserver)===null||t===void 0||t.disconnect()},n.prototype.observeDatePickerHeightChanges=function(){var t=this,r=this.props.monthRef;this.updateContainerHeight(),r&&(this.resizeObserver=new ResizeObserver(function(){t.updateContainerHeight()}),this.resizeObserver.observe(r))},n.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},n.prototype.render=function(){var t=this,r,o=this.state.height;return w.createElement("div",{className:"react-datepicker__time-container ".concat(((r=this.props.todayButton)!==null&&r!==void 0?r:n.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),w.createElement("div",{className:"react-datepicker__time"},w.createElement("div",{className:"react-datepicker__time-box"},w.createElement("ul",{className:"react-datepicker__time-list",ref:function(i){t.list=i},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},n.calcCenterPosition=function(t,r){return r.offsetTop-(t/2-r.clientHeight/2)},n})(w.Component),Xl=3,wv=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.YEAR_REFS=nr([],Array(r.props.yearItemNumber),!0).map(function(){return w.createRef()}),r.isDisabled=function(o){return jt(o,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(o){return Ra(o,{excludeDates:r.props.excludeDates})},r.selectingDate=function(){var o;return(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection},r.updateFocusOnPaginate=function(o){var i=function(){var a,s;(s=(a=r.YEAR_REFS[o])===null||a===void 0?void 0:a.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(i)},r.handleYearClick=function(o,i){r.props.onDayClick&&r.props.onDayClick(o,i)},r.handleYearNavigation=function(o,i){var a,s,c,l,u=r.props,d=u.date,f=u.yearItemNumber;if(!(d===void 0||f===void 0)){var m=fr(d,f).startPeriod;r.isDisabled(i)||r.isExcluded(i)||((s=(a=r.props).setPreSelection)===null||s===void 0||s.call(a,i),o-m<0?r.updateFocusOnPaginate(f-(m-o)):o-m>=f?r.updateFocusOnPaginate(Math.abs(f-(o-m))):(l=(c=r.YEAR_REFS[o-m])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())}},r.isSameDay=function(o,i){return Se(o,i)},r.isCurrentYear=function(o){return o===y.getYear(Pe())},r.isRangeStart=function(o){return r.props.startDate&&r.props.endDate&&or(y.setYear(Pe(),o),r.props.startDate)},r.isRangeEnd=function(o){return r.props.startDate&&r.props.endDate&&or(y.setYear(Pe(),o),r.props.endDate)},r.isInRange=function(o){return si(o,r.props.startDate,r.props.endDate)},r.isInSelectingRange=function(o){var i=r.props,a=i.selectsStart,s=i.selectsEnd,c=i.selectsRange,l=i.startDate,u=i.endDate;return!(a||s||c)||!r.selectingDate()?!1:a&&u?si(o,r.selectingDate(),u):s&&l||c&&l&&!u?si(o,l,r.selectingDate()):!1},r.isSelectingRangeStart=function(o){var i;if(!r.isInSelectingRange(o))return!1;var a=r.props,s=a.startDate,c=a.selectsStart,l=y.setYear(Pe(),o);return c?or(l,(i=r.selectingDate())!==null&&i!==void 0?i:null):or(l,s??null)},r.isSelectingRangeEnd=function(o){var i;if(!r.isInSelectingRange(o))return!1;var a=r.props,s=a.endDate,c=a.selectsEnd,l=a.selectsRange,u=y.setYear(Pe(),o);return c||l?or(u,(i=r.selectingDate())!==null&&i!==void 0?i:null):or(u,s??null)},r.isKeyboardSelected=function(o){if(!(r.props.disabledKeyboardNavigation||r.props.date===void 0||r.props.preSelection==null)){var i=r.props,a=i.minDate,s=i.maxDate,c=i.excludeDates,l=i.includeDates,u=i.filterDate,d=i.selected,f=Fn(y.setYear(r.props.date,o)),m=(a||s||c||l||u)&&ci(o,r.props),g=!!d&&Se(f,Fn(d)),p=Se(f,Fn(r.props.preSelection));return!r.props.inline&&!g&&p&&!m}},r.isSelectedYear=function(o){var i=r.props,a=i.selectsMultiple,s=i.selected,c=i.selectedDates;return a?c?.some(function(l){return o===y.getYear(l)}):!!s&&o===y.getYear(s)},r.onYearClick=function(o,i){var a=r.props.date;a!==void 0&&r.handleYearClick(Fn(y.setYear(a,i)),o)},r.onYearKeyDown=function(o,i){var a,s,c=o.key,l=r.props,u=l.date,d=l.yearItemNumber,f=l.handleOnKeyDown;if(c!==re.Tab&&o.preventDefault(),!r.props.disabledKeyboardNavigation)switch(c){case re.Enter:if(r.props.selected==null)break;r.onYearClick(o,i),(s=(a=r.props).setPreSelection)===null||s===void 0||s.call(a,r.props.selected);break;case re.ArrowRight:if(r.props.preSelection==null)break;r.handleYearNavigation(i+1,y.addYears(r.props.preSelection,1));break;case re.ArrowLeft:if(r.props.preSelection==null)break;r.handleYearNavigation(i-1,y.subYears(r.props.preSelection,1));break;case re.ArrowUp:{if(u===void 0||d===void 0||r.props.preSelection==null)break;var m=fr(u,d).startPeriod,g=Xl,p=i-g;if(p<m){var b=d%g;i>=m&&i<m+b?g=b:g+=b,p=i-g}r.handleYearNavigation(p,y.subYears(r.props.preSelection,g));break}case re.ArrowDown:{if(u===void 0||d===void 0||r.props.preSelection==null)break;var S=fr(u,d).endPeriod,g=Xl,p=i+g;if(p>S){var b=d%g;i<=S&&i>S-b?g=b:g+=b,p=i+g}r.handleYearNavigation(p,y.addYears(r.props.preSelection,g));break}}f&&f(o)},r.getYearClassNames=function(o){var i=r.props,a=i.date,s=i.minDate,c=i.maxDate,l=i.excludeDates,u=i.includeDates,d=i.filterDate,f=i.yearClassName;return Ve("react-datepicker__year-text","react-datepicker__year-".concat(o),a?f?.(y.setYear(a,o)):void 0,{"react-datepicker__year-text--selected":r.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||c||l||u||d)&&ci(o,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(o),"react-datepicker__year-text--range-start":r.isRangeStart(o),"react-datepicker__year-text--range-end":r.isRangeEnd(o),"react-datepicker__year-text--in-range":r.isInRange(o),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(o),"react-datepicker__year-text--today":r.isCurrentYear(o)})},r.getYearTabIndex=function(o){if(r.props.disabledKeyboardNavigation||r.props.preSelection==null)return"-1";var i=y.getYear(r.props.preSelection),a=ci(o,r.props);return o===i&&!a?"0":"-1"},r.getYearContent=function(o){return r.props.renderYearContent?r.props.renderYearContent(o):o},r}return n.prototype.render=function(){var t=this,r=[],o=this.props,i=o.date,a=o.yearItemNumber,s=o.onYearMouseEnter,c=o.onYearMouseLeave;if(i===void 0)return null;for(var l=fr(i,a),u=l.startPeriod,d=l.endPeriod,f=function(p){r.push(w.createElement("div",{ref:m.YEAR_REFS[p-u],onClick:function(b){t.onYearClick(b,p)},onKeyDown:function(b){Ql(b)&&(b.preventDefault(),b.key=re.Enter),t.onYearKeyDown(b,p)},tabIndex:Number(m.getYearTabIndex(p)),className:m.getYearClassNames(p),onMouseEnter:m.props.usePointerEvent?void 0:function(b){return s(b,p)},onPointerEnter:m.props.usePointerEvent?function(b){return s(b,p)}:void 0,onMouseLeave:m.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:m.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":m.isCurrentYear(p)?"date":void 0},m.getYearContent(p)))},m=this,g=u;g<=d;g++)f(g);return w.createElement("div",{className:"react-datepicker__year"},w.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},r))},n})(w.Component);function _v(e,n,t,r){for(var o=[],i=0;i<2*n+1;i++){var a=e+n-i,s=!0;t&&(s=y.getYear(t)<=a),r&&s&&(s=y.getYear(r)>=a),s&&o.push(a)}return o}var xv=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;r.yearOptionButtonsRef={},r.handleOptionKeyDown=function(s,c){var l;switch(c.key){case"Enter":c.preventDefault(),r.onChange(s);break;case"Escape":c.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var u=s+(c.key==="ArrowUp"?1:-1);r.yearOptionButtonsRef[u]&&((l=r.yearOptionButtonsRef[u])===null||l===void 0||l.focus());break}}},r.renderOptions=function(){r.yearOptionButtonsRef={};var s=r.props.year,c=r.state.yearsList.map(function(d){return w.createElement("div",{ref:function(f){r.yearOptionButtonsRef[d]=f,d===s&&f?.focus()},role:"button",tabIndex:0,className:s===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:r.onChange.bind(r,d),onKeyDown:r.handleOptionKeyDown.bind(r,d),"aria-selected":s===d?"true":void 0},s===d?w.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),l=r.props.minDate?y.getYear(r.props.minDate):null,u=r.props.maxDate?y.getYear(r.props.maxDate):null;return(!u||!r.state.yearsList.find(function(d){return d===u}))&&c.unshift(w.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},w.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!l||!r.state.yearsList.find(function(d){return d===l}))&&c.push(w.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},w.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},r.onChange=function(s){r.props.onChange(s)},r.handleClickOutside=function(){r.props.onCancel()},r.shiftYears=function(s){var c=r.state.yearsList.map(function(l){return l+s});r.setState({yearsList:c})},r.incrementYears=function(){return r.shiftYears(1)},r.decrementYears=function(){return r.shiftYears(-1)};var o=t.yearDropdownItemNumber,i=t.scrollableYearDropdown,a=o||(i?10:5);return r.state={yearsList:_v(r.props.year,a,r.props.minDate,r.props.maxDate)},r.dropdownRef=w.createRef(),r}return n.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var r=t.children?Array.from(t.children):null,o=r?r.find(function(i){return i.ariaSelected}):null;t.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},n.prototype.render=function(){var t=Ve({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return w.createElement(ti,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},n})(w.Component),Sv=(function(e){ut(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var r=t.props.minDate?y.getYear(t.props.minDate):1900,o=t.props.maxDate?y.getYear(t.props.maxDate):2100,i=[],a=r;a<=o;a++)i.push(w.createElement("option",{key:a,value:a},a));return i},t.onSelectChange=function(r){t.onChange(parseInt(r.target.value))},t.renderSelectMode=function(){return w.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(r){return w.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:t.toggleDropdown},w.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),w.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return w.createElement(xv,xe({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var r=t.state.dropdownVisible,o=[t.renderReadView(!r)];return r&&o.unshift(t.renderDropdown()),o},t.onChange=function(r){t.toggleDropdown(),r!==t.props.year&&t.props.onChange(r)},t.toggleDropdown=function(r){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,r)})},t.handleYearChange=function(r,o){var i;(i=t.onSelect)===null||i===void 0||i.call(t,r,o),t.setOpen()},t.onSelect=function(r,o){var i,a;(a=(i=t.props).onSelect)===null||a===void 0||a.call(i,r,o)},t.setOpen=function(){var r,o;(o=(r=t.props).setOpen)===null||o===void 0||o.call(r,!0)},t}return n.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return w.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},n})(w.Component),Cv=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],eu="react-datepicker-ignore-onclickoutside",kv=function(e){var n=(e.className||"").split(/\s+/);return Cv.some(function(t){return n.indexOf(t)>=0})},Dv=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.monthContainer=void 0,r.handleClickOutside=function(o){r.props.onClickOutside(o)},r.setClickOutsideRef=function(){return r.containerRef.current},r.handleDropdownFocus=function(o){var i,a;kv(o.target)&&((a=(i=r.props).onDropdownFocus)===null||a===void 0||a.call(i,o))},r.getDateInView=function(){var o=r.props,i=o.preSelection,a=o.selected,s=o.openToDate,c=Ul(r.props),l=Wl(r.props),u=Pe(),d=s||a||i;return d||(c&&y.isBefore(u,c)?c:l&&y.isAfter(u,l)?l:u)},r.increaseMonth=function(){r.setState(function(o){var i=o.date;return{date:y.addMonths(i,1)}},function(){return r.handleMonthChange(r.state.date)})},r.decreaseMonth=function(){r.setState(function(o){var i=o.date;return{date:y.subMonths(i,1)}},function(){return r.handleMonthChange(r.state.date)})},r.handleDayClick=function(o,i,a){r.props.onSelect(o,i,a),r.props.setPreSelection&&r.props.setPreSelection(o)},r.handleDayMouseEnter=function(o){r.setState({selectingDate:o}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(o)},r.handleMonthMouseLeave=function(){r.setState({selectingDate:void 0}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()},r.handleYearMouseEnter=function(o,i){r.setState({selectingDate:y.setYear(Pe(),i)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(o,i)},r.handleYearMouseLeave=function(o,i){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(o,i)},r.handleYearChange=function(o){var i,a,s,c;(a=(i=r.props).onYearChange)===null||a===void 0||a.call(i,o),r.setState({isRenderAriaLiveMessage:!0}),r.props.adjustDateOnChange&&(r.props.onSelect(o),(c=(s=r.props).setOpen)===null||c===void 0||c.call(s,!0)),r.props.setPreSelection&&r.props.setPreSelection(o)},r.getEnabledPreSelectionDateForMonth=function(o){if(!jt(o,r.props))return o;for(var i=dr(o),a=Z0(o),s=y.differenceInDays(a,i),c=null,l=0;l<=s;l++){var u=y.addDays(i,l);if(!jt(u,r.props)){c=u;break}}return c},r.handleMonthChange=function(o){var i,a,s,c=(i=r.getEnabledPreSelectionDateForMonth(o))!==null&&i!==void 0?i:o;r.handleCustomMonthChange(c),r.props.adjustDateOnChange&&(r.props.onSelect(c),(s=(a=r.props).setOpen)===null||s===void 0||s.call(a,!0)),r.props.setPreSelection&&r.props.setPreSelection(c)},r.handleCustomMonthChange=function(o){var i,a;(a=(i=r.props).onMonthChange)===null||a===void 0||a.call(i,o),r.setState({isRenderAriaLiveMessage:!0})},r.handleMonthYearChange=function(o){r.handleYearChange(o),r.handleMonthChange(o)},r.changeYear=function(o){r.setState(function(i){var a=i.date;return{date:y.setYear(a,Number(o))}},function(){return r.handleYearChange(r.state.date)})},r.changeMonth=function(o){r.setState(function(i){var a=i.date;return{date:y.setMonth(a,Number(o))}},function(){return r.handleMonthChange(r.state.date)})},r.changeMonthYear=function(o){r.setState(function(i){var a=i.date;return{date:y.setYear(y.setMonth(a,y.getMonth(o)),y.getYear(o))}},function(){return r.handleMonthYearChange(r.state.date)})},r.header=function(o){o===void 0&&(o=r.state.date);var i=Cr(o,r.props.locale,r.props.calendarStartDay),a=[];return r.props.showWeekNumbers&&a.push(w.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},w.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),w.createElement("span",{"aria-hidden":"true"},r.props.weekLabel||"#"))),a.concat([0,1,2,3,4,5,6].map(function(s){var c=y.addDays(i,s),l=r.formatWeekday(c,r.props.locale),u=r.props.weekDayClassName?r.props.weekDayClassName(c):void 0;return w.createElement("div",{key:s,role:"columnheader",className:Ve("react-datepicker__day-name",u)},w.createElement("span",{className:"react-datepicker__sr-only"},He(c,"EEEE",r.props.locale)),w.createElement("span",{"aria-hidden":"true"},l))}))},r.formatWeekday=function(o,i){return r.props.formatWeekDay?q0(o,r.props.formatWeekDay,i):r.props.useWeekdaysShort?G0(o,i):K0(o,i)},r.decreaseYear=function(){r.setState(function(o){var i,a=o.date;return{date:y.subYears(a,r.props.showYearPicker?(i=r.props.yearItemNumber)!==null&&i!==void 0?i:n.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.clearSelectingDate=function(){r.setState({selectingDate:void 0})},r.renderPreviousButton=function(){var o,i,a;if(!r.props.renderCustomHeader){var s=(o=r.props.monthsShown)!==null&&o!==void 0?o:n.defaultProps.monthsShown,c=r.props.showPreviousMonths?s-1:0,l=(i=r.props.monthSelectedIn)!==null&&i!==void 0?i:c,u=y.subMonths(r.state.date,l),d;switch(!0){case r.props.showMonthYearPicker:d=Yl(r.state.date,r.props);break;case r.props.showYearPicker:d=tv(r.state.date,r.props);break;case r.props.showQuarterYearPicker:d=X0(r.state.date,r.props);break;default:d=Vl(u,r.props);break}if(!(!((a=r.props.forceShowMonthNavigation)!==null&&a!==void 0?a:n.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&d||r.props.showTimeSelectOnly)){var f=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],m=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(g=r.decreaseYear),d&&r.props.showDisabledMonthNavigation&&(m.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,b=r.props,S=b.previousMonthButtonLabel,x=S===void 0?n.defaultProps.previousMonthButtonLabel:S,T=b.previousYearButtonLabel,D=T===void 0?n.defaultProps.previousYearButtonLabel:T,k=r.props,O=k.previousMonthAriaLabel,R=O===void 0?typeof x=="string"?x:"Previous Month":O,U=k.previousYearAriaLabel,H=U===void 0?typeof D=="string"?D:"Previous Year":U;return w.createElement("button",{type:"button",className:m.join(" "),onClick:g,onKeyDown:r.props.handleOnKeyDown,"aria-label":p?H:R},w.createElement("span",{className:f.join(" ")},p?D:x))}}},r.increaseYear=function(){r.setState(function(o){var i,a=o.date;return{date:y.addYears(a,r.props.showYearPicker?(i=r.props.yearItemNumber)!==null&&i!==void 0?i:n.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.renderNextButton=function(){var o;if(!r.props.renderCustomHeader){var i;switch(!0){case r.props.showMonthYearPicker:i=Hl(r.state.date,r.props);break;case r.props.showYearPicker:i=rv(r.state.date,r.props);break;case r.props.showQuarterYearPicker:i=ev(r.state.date,r.props);break;default:i=Fl(r.state.date,r.props);break}if(!(!((o=r.props.forceShowMonthNavigation)!==null&&o!==void 0?o:n.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&i||r.props.showTimeSelectOnly)){var a=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];r.props.showTimeSelect&&a.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&a.push("react-datepicker__navigation--next--with-today-button");var c=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(c=r.increaseYear),i&&r.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--next--disabled"),c=void 0);var l=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,u=r.props,d=u.nextMonthButtonLabel,f=d===void 0?n.defaultProps.nextMonthButtonLabel:d,m=u.nextYearButtonLabel,g=m===void 0?n.defaultProps.nextYearButtonLabel:m,p=r.props,b=p.nextMonthAriaLabel,S=b===void 0?typeof f=="string"?f:"Next Month":b,x=p.nextYearAriaLabel,T=x===void 0?typeof g=="string"?g:"Next Year":x;return w.createElement("button",{type:"button",className:a.join(" "),onClick:c,onKeyDown:r.props.handleOnKeyDown,"aria-label":l?T:S},w.createElement("span",{className:s.join(" ")},l?g:f))}}},r.renderCurrentMonth=function(o){o===void 0&&(o=r.state.date);var i=["react-datepicker__current-month"];return r.props.showYearDropdown&&i.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&i.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&i.push("react-datepicker__current-month--hasMonthYearDropdown"),w.createElement("h2",{className:i.join(" ")},He(o,r.props.dateFormat,r.props.locale))},r.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!r.props.showYearDropdown||o))return w.createElement(Sv,xe({},n.defaultProps,r.props,{date:r.state.date,onChange:r.changeYear,year:y.getYear(r.state.date)}))},r.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!r.props.showMonthDropdown||o))return w.createElement(mv,xe({},n.defaultProps,r.props,{month:y.getMonth(r.state.date),onChange:r.changeMonth}))},r.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!r.props.showMonthYearDropdown||o))return w.createElement(yv,xe({},n.defaultProps,r.props,{date:r.state.date,onChange:r.changeMonthYear}))},r.handleTodayButtonClick=function(o){r.props.onSelect(Nl(),o),r.props.setPreSelection&&r.props.setPreSelection(Nl())},r.renderTodayButton=function(){if(!(!r.props.todayButton||r.props.showTimeSelectOnly))return w.createElement("div",{className:"react-datepicker__today-button",onClick:r.handleTodayButtonClick},r.props.todayButton)},r.renderDayNamesHeader=function(o){return w.createElement("div",{className:"react-datepicker__day-names",role:"row"},r.header(o))},r.renderDefaultHeader=function(o){var i=o.monthDate,a=o.i;return w.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(i),w.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(a!==0),r.renderMonthYearDropdown(a!==0),r.renderYearDropdown(a!==0)))},r.renderCustomHeader=function(o){var i,a,s=o.monthDate,c=o.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var l=r.props,u=l.showYearPicker,d=l.yearItemNumber,f;if(u){var m=fr(s,d),g=m.startPeriod,p=m.endPeriod;f={startYear:g,endYear:p}}var b=Vl(r.state.date,r.props),S=Fl(r.state.date,r.props),x=Yl(r.state.date,r.props),T=Hl(r.state.date,r.props);return w.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},(a=(i=r.props).renderCustomHeader)===null||a===void 0?void 0:a.call(i,xe(xe(xe({},r.state),u&&{visibleYearsRange:f}),{customHeaderCount:c,monthDate:s,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:b,nextMonthButtonDisabled:S,prevYearButtonDisabled:x,nextYearButtonDisabled:T})))},r.renderYearHeader=function(o){var i=o.monthDate,a=r.props,s=a.showYearPicker,c=a.yearItemNumber,l=c===void 0?n.defaultProps.yearItemNumber:c,u=fr(i,l),d=u.startPeriod,f=u.endPeriod;return w.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(d," - ").concat(f):y.getYear(i))},r.renderHeader=function(o){var i=o.monthDate,a=o.i,s=a===void 0?0:a,c={monthDate:i,i:s};switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(c);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(c);default:return r.renderDefaultHeader(c)}},r.renderMonths=function(){var o,i;if(!(r.props.showTimeSelectOnly||r.props.showYearPicker)){for(var a=[],s=(o=r.props.monthsShown)!==null&&o!==void 0?o:n.defaultProps.monthsShown,c=r.props.showPreviousMonths?s-1:0,l=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?y.addYears(r.state.date,c):y.subMonths(r.state.date,c),u=(i=r.props.monthSelectedIn)!==null&&i!==void 0?i:c,d=0;d<s;++d){var f=d-u+c,m=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?y.addYears(l,f):y.addMonths(l,f),g="month-".concat(d),p=d<s-1,b=d>0;a.push(w.createElement("div",{key:g,ref:function(S){r.monthContainer=S??void 0},className:"react-datepicker__month-container"},r.renderHeader({monthDate:m,i:d}),w.createElement(pv,xe({},n.defaultProps,r.props,{containerRef:r.containerRef,ariaLabelPrefix:r.props.monthAriaLabelPrefix,day:m,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,handleOnMonthKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,orderInDisplay:d,selectingDate:r.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:b,dayNamesHeader:r.renderDayNamesHeader(m)}))))}return a}},r.renderYears=function(){if(!r.props.showTimeSelectOnly&&r.props.showYearPicker)return w.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader({monthDate:r.state.date}),w.createElement(wv,xe({},n.defaultProps,r.props,{selectingDate:r.state.selectingDate,date:r.state.date,onDayClick:r.handleDayClick,clearSelectingDate:r.clearSelectingDate,onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave})))},r.renderTimeSection=function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return w.createElement(bv,xe({},n.defaultProps,r.props,{onChange:r.props.onTimeChange,format:r.props.timeFormat,intervals:r.props.timeIntervals,monthRef:r.state.monthContainer}))},r.renderInputTimeSection=function(){var o=r.props.selected?new Date(r.props.selected):void 0,i=o&&ri(o)&&!!r.props.selected,a=i?"".concat(ql(o.getHours()),":").concat(ql(o.getMinutes())):"";if(r.props.showTimeInput)return w.createElement(cv,xe({},n.defaultProps,r.props,{date:o,timeString:a,onChange:r.props.onTimeChange}))},r.renderAriaLiveRegion=function(){var o,i=fr(r.state.date,(o=r.props.yearItemNumber)!==null&&o!==void 0?o:n.defaultProps.yearItemNumber),a=i.startPeriod,s=i.endPeriod,c;return r.props.showYearPicker?c="".concat(a," - ").concat(s):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?c=y.getYear(r.state.date):c="".concat(Na(y.getMonth(r.state.date),r.props.locale)," ").concat(y.getYear(r.state.date)),w.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&c)},r.renderChildren=function(){if(r.props.children)return w.createElement("div",{className:"react-datepicker__children-container"},r.props.children)},r.containerRef=w.createRef(),r.state={date:r.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},r}return Object.defineProperty(n,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:eu,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Vn}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},n.prototype.componentDidUpdate=function(t){var r=this;if(this.props.preSelection&&(!Se(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var o=!mt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&r.handleCustomMonthChange(r.state.date)})}else this.props.openToDate&&!Se(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},n.prototype.render=function(){var t=this.props.container||B0;return w.createElement(ti,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},w.createElement("div",{style:{display:"contents"},ref:this.containerRef},w.createElement(t,{className:Ve("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},n})(w.Component),Ev=function(e){var n=e.icon,t=e.className,r=t===void 0?"":t,o=e.onClick,i="react-datepicker__calendar-icon";if(typeof n=="string")return w.createElement("i",{className:"".concat(i," ").concat(n," ").concat(r),"aria-hidden":"true",onClick:o});if(w.isValidElement(n)){var a=n;return w.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(i," ").concat(r),onClick:function(s){typeof a.props.onClick=="function"&&a.props.onClick(s),typeof o=="function"&&o(s)}})}return w.createElement("svg",{className:"".concat(i," ").concat(r),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},w.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},tu=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.portalRoot=null,r.el=document.createElement("div"),r}return n.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},n.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},n.prototype.render=function(){return Fs.createPortal(this.props.children,this.el)},n})(w.Component),Tv="[tabindex], a, button, input, select, textarea",Ov=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},ru=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.getTabChildren=function(){var o;return Array.prototype.slice.call((o=r.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(Tv),1,-1).filter(Ov)},r.handleFocusStart=function(){var o=r.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},r.handleFocusEnd=function(){var o=r.getTabChildren();o&&o.length>1&&o[0].focus()},r.tabLoopRef=w.createRef(),r}return n.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:n.defaultProps.enableTabLoop)?w.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},w.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,w.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},n.defaultProps={enableTabLoop:!0},n})(w.Component);function Mv(e){function n(t){var r,o=typeof t.hidePopper=="boolean"?t.hidePopper:!0,i=w.useRef(null),a=z0(xe({open:!o,whileElementsMounted:g0,placement:t.popperPlacement,middleware:nr([k0({padding:15}),C0(10),D0({element:i})],(r=t.popperModifiers)!==null&&r!==void 0?r:[],!0)},t.popperProps)),s=xe(xe({},t),{hidePopper:o,popperProps:xe(xe({},a),{arrowRef:i})});return w.createElement(e,xe({},s))}return n.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),n}var Av=function(e){var n=e.className,t=e.wrapperClassName,r=e.hidePopper,o=r===void 0?!0:r,i=e.popperComponent,a=e.targetComponent,s=e.enableTabLoop,c=e.popperOnKeyDown,l=e.portalId,u=e.portalHost,d=e.popperProps,f=e.showArrow,m=void 0;if(!o){var g=Ve("react-datepicker-popper",n);m=w.createElement(ru,{enableTabLoop:s},w.createElement("div",{ref:d.refs.setFloating,style:d.floatingStyles,className:g,"data-placement":d.placement,onKeyDown:c},i,f&&w.createElement(P0,{ref:d.arrowRef,context:d.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(m=w.createElement(e.popperContainer,{},m)),l&&!o&&(m=w.createElement(tu,{portalId:l,portalHost:u},m));var p=Ve("react-datepicker-wrapper",t);return w.createElement(w.Fragment,null,w.createElement("div",{ref:d.refs.setReference,className:p},a),m)},Pv=Mv(Av);function Iv(e,n){return e&&n?y.getMonth(e)!==y.getMonth(n)||y.getYear(e)!==y.getYear(n):e!==n}var La="Date input not valid.",Nv=(function(e){ut(n,e);function n(t){var r=e.call(this,t)||this;return r.calendar=null,r.input=null,r.getPreSelection=function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:Pe()},r.modifyHolidays=function(){var o;return(o=r.props.holidays)===null||o===void 0?void 0:o.reduce(function(i,a){var s=new Date(a.date);return ri(s)?nr(nr([],i,!0),[xe(xe({},a),{date:s})],!1):i},[])},r.calcInitialState=function(){var o,i=r.getPreSelection(),a=Ul(r.props),s=Wl(r.props),c=a&&y.isBefore(i,ni(a))?a:s&&y.isAfter(i,Rl(s))?s:i;return{open:r.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=r.props.selectsRange?r.props.startDate:r.props.selected)!==null&&o!==void 0?o:c,highlightDates:Zl(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},r.getInputValue=function(){var o,i=r.props,a=i.locale,s=i.startDate,c=i.endDate,l=i.rangeSeparator,u=i.selected,d=i.selectedDates,f=i.selectsMultiple,m=i.selectsRange,g=i.value,p=(o=r.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,b=r.state.inputValue;return typeof g=="string"?g:typeof b=="string"?b:m?F0(s,c,{dateFormat:p,locale:a,rangeSeparator:l}):f?Y0(d??[],{dateFormat:p,locale:a}):$t(u,{dateFormat:p,locale:a})},r.resetHiddenStatus=function(){r.setState(xe(xe({},r.state),{wasHidden:!1}))},r.setHiddenStatus=function(){r.setState(xe(xe({},r.state),{wasHidden:!0}))},r.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&r.setHiddenStatus()},r.clearPreventFocusTimeout=function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)},r.setFocus=function(){var o,i;(i=(o=r.input)===null||o===void 0?void 0:o.focus)===null||i===void 0||i.call(o,{preventScroll:!0})},r.setBlur=function(){var o,i;(i=(o=r.input)===null||o===void 0?void 0:o.blur)===null||i===void 0||i.call(o),r.cancelFocusInput()},r.deferBlur=function(){requestAnimationFrame(function(){r.setBlur()})},r.setOpen=function(o,i){i===void 0&&(i=!1),r.setState({open:o,preSelection:o&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:za},function(){o||r.setState(function(a){return{focused:i?a.focused:!1}},function(){!i&&r.deferBlur(),r.setState({inputValue:null})})})},r.inputOk=function(){return y.isDate(r.state.preSelection)},r.isCalendarOpen=function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open},r.handleFocus=function(o){var i,a,s=r.state.wasHidden,c=s?r.state.open:!0;s&&r.resetHiddenStatus(),r.state.preventFocus||((a=(i=r.props).onFocus)===null||a===void 0||a.call(i,o),c&&!r.props.preventOpenOnFocus&&!r.props.readOnly&&r.setOpen(!0)),r.setState({focused:!0})},r.sendFocusBackToInput=function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})},r.cancelFocusInput=function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=void 0},r.deferFocusInput=function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)},r.handleDropdownFocus=function(){r.cancelFocusInput()},r.resetInputValue=function(){r.setState(xe(xe({},r.state),{inputValue:null}))},r.handleBlur=function(o){var i,a;(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&((a=(i=r.props).onBlur)===null||a===void 0||a.call(i,o)),r.resetInputValue(),r.state.open&&r.props.open===!1&&r.setOpen(!1),r.setState({focused:!1})},r.handleCalendarClickOutside=function(o){var i,a;r.props.inline||r.setOpen(!1),(a=(i=r.props).onClickOutside)===null||a===void 0||a.call(i,o),r.props.withPortal&&o.preventDefault()},r.handleChange=function(){for(var o,i,a,s,c,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];var d=l[0];if(!(r.props.onChangeRaw&&(r.props.onChangeRaw.apply(r,l),!d||typeof d.isDefaultPrevented!="function"||d.isDefaultPrevented()))){r.setState({inputValue:d?.target instanceof HTMLInputElement?d.target.value:null,lastPreSelectChange:Rv});var f=r.props,m=f.selectsRange,g=f.startDate,p=f.endDate,b=(o=r.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,S=(i=r.props.strictParsing)!==null&&i!==void 0?i:n.defaultProps.strictParsing,x=d?.target instanceof HTMLInputElement?d.target.value:"";if(m){var T=r.props.rangeSeparator,D=T.trim(),k=x.split(b.includes(D)?T:D,2).map(function($){return $.trim()}),O=k[0],R=k[1],U=Aa(O??"",b,r.props.locale,S),H=U?Aa(R??"",b,r.props.locale,S):null,V=g?.getTime()!==U?.getTime(),K=p?.getTime()!==H?.getTime();if(!V&&!K||U&&jt(U,r.props)||H&&jt(H,r.props))return;(s=(a=r.props).onChange)===null||s===void 0||s.call(a,[U,H],d)}else{var v=Aa(x,b,r.props.locale,S,(c=r.props.selected)!==null&&c!==void 0?c:void 0);(v||!x)&&r.setSelected(v,d,!0)}}},r.handleSelect=function(o,i,a){if(!r.props.readOnly){var s=r.props,c=s.selectsRange,l=s.startDate,u=s.endDate,d=s.swapRange,f=!c||l&&!u&&(d||!$a(o,l));r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&f&&r.sendFocusBackToInput(),r.props.onChangeRaw&&r.props.onChangeRaw(i),r.setSelected(o,i,!1,a),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect?r.setPreSelection(o):f&&r.setOpen(!1)}},r.setSelected=function(o,i,a,s){var c,l,u=o;if(r.props.showYearPicker){if(u!==null&&ci(y.getYear(u),r.props))return}else if(r.props.showMonthYearPicker){if(u!==null&&jl(u,r.props))return}else if(u!==null&&jt(u,r.props))return;var d=r.props,f=d.onChange,m=d.selectsRange,g=d.startDate,p=d.endDate,b=d.selectsMultiple,S=d.selectedDates,x=d.minTime,T=d.swapRange;if(!Rr(r.props.selected,u)||r.props.allowSameDay||m||b)if(u!==null&&(r.props.selected&&(!a||!r.props.showTimeSelect&&!r.props.showTimeSelectOnly&&!r.props.showTimeInput)&&(u=Pa(u,{hour:y.getHours(r.props.selected),minute:y.getMinutes(r.props.selected),second:y.getSeconds(r.props.selected)})),!a&&(r.props.showTimeSelect||r.props.showTimeSelectOnly)&&x&&(u=Pa(u,{hour:x.getHours(),minute:x.getMinutes(),second:x.getSeconds()})),r.props.inline||r.setState({preSelection:u}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:s})),m){var D=!g&&!p,k=g&&!p,O=!g&&!!p,R=g&&p;D?f?.([u,null],i):k?u===null?f?.([null,null],i):$a(u,g)?f?.(T?[u,g]:[u,null],i):f?.([g,u],i):O&&(u&&$a(u,p)?f?.([u,p],i):f?.([u,null],i)),R&&f?.([u,null],i)}else if(b){if(u!==null)if(!S?.length)f?.([u],i);else{var U=S.some(function(V){return Se(V,u)});if(U){var H=S.filter(function(V){return!Se(V,u)});f?.(H,i)}else f?.(nr(nr([],S,!0),[u],!1),i)}}else f?.(u,i);a||((l=(c=r.props).onSelect)===null||l===void 0||l.call(c,u,i),r.setState({inputValue:null}))},r.setPreSelection=function(o){if(!r.props.readOnly){var i=y.isDate(r.props.minDate),a=y.isDate(r.props.maxDate),s=!0;if(o){var c=ni(o);if(i&&a)s=$r(o,r.props.minDate,r.props.maxDate);else if(i){var l=ni(r.props.minDate);s=y.isAfter(o,l)||Rr(c,l)}else if(a){var u=Rl(r.props.maxDate);s=y.isBefore(o,u)||Rr(c,u)}}s&&r.setState({preSelection:o})}},r.toggleCalendar=function(){r.setOpen(!r.state.open)},r.handleTimeChange=function(o){var i,a;if(!(r.props.selectsRange||r.props.selectsMultiple)){var s=r.props.selected?r.props.selected:r.getPreSelection(),c=r.props.selected?o:Pa(s,{hour:y.getHours(o),minute:y.getMinutes(o)});r.setState({preSelection:c}),(a=(i=r.props).onChange)===null||a===void 0||a.call(i,c),r.props.shouldCloseOnSelect&&!r.props.showTimeInput&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}},r.onInputClick=function(){var o,i;!r.props.disabled&&!r.props.readOnly&&r.setOpen(!0),(i=(o=r.props).onInputClick)===null||i===void 0||i.call(o)},r.onInputKeyDown=function(o){var i,a,s,c,l,u;(a=(i=r.props).onKeyDown)===null||a===void 0||a.call(i,o);var d=o.key;if(!r.state.open&&!r.props.inline&&!r.props.preventOpenOnFocus){(d===re.ArrowDown||d===re.ArrowUp||d===re.Enter)&&((s=r.onInputClick)===null||s===void 0||s.call(r));return}if(r.state.open){if(d===re.ArrowDown||d===re.ArrowUp){o.preventDefault();var f=r.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':r.props.showFullMonthYearPicker||r.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',m=((c=r.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(f);m instanceof HTMLElement&&m.focus({preventScroll:!0});return}var g=Pe(r.state.preSelection);d===re.Enter?(o.preventDefault(),o.target.blur(),r.inputOk()&&r.state.lastPreSelectChange===za?(r.handleSelect(g,o),!r.props.shouldCloseOnSelect&&r.setPreSelection(g)):r.setOpen(!1)):d===re.Escape?(o.preventDefault(),o.target.blur(),r.sendFocusBackToInput(),r.setOpen(!1)):d===re.Tab&&r.setOpen(!1),r.inputOk()||(u=(l=r.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:La})}},r.onPortalKeyDown=function(o){var i=o.key;i===re.Escape&&(o.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))},r.onDayKeyDown=function(o){var i,a,s,c,l,u,d=r.props,f=d.minDate,m=d.maxDate,g=d.disabledKeyboardNavigation,p=d.showWeekPicker,b=d.shouldCloseOnSelect,S=d.locale,x=d.calendarStartDay,T=d.adjustDateOnChange,D=d.inline;if((a=(i=r.props).onKeyDown)===null||a===void 0||a.call(i,o),!g){var k=o.key,O=o.shiftKey,R=Pe(r.state.preSelection),U=function(L,Y){var J=Y;switch(L){case re.ArrowRight:J=p?y.addWeeks(Y,1):y.addDays(Y,1);break;case re.ArrowLeft:J=p?y.subWeeks(Y,1):y.subDays(Y,1);break;case re.ArrowUp:J=y.subWeeks(Y,1);break;case re.ArrowDown:J=y.addWeeks(Y,1);break;case re.PageUp:J=O?y.subYears(Y,1):y.subMonths(Y,1);break;case re.PageDown:J=O?y.addYears(Y,1):y.addMonths(Y,1);break;case re.Home:J=Cr(Y,S,x);break;case re.End:J=W0(Y);break}return J},H=function(L,Y){for(var J=40,oe=L,we=!1,F=0,q=U(L,Y);!we;){if(F>=J){q=Y;break}f&&q<f&&(oe=re.ArrowRight,q=jt(f,r.props)?U(oe,q):f),m&&q>m&&(oe=re.ArrowLeft,q=jt(m,r.props)?U(oe,q):m),jt(q,r.props)?((oe===re.PageUp||oe===re.Home)&&(oe=re.ArrowRight),(oe===re.PageDown||oe===re.End)&&(oe=re.ArrowLeft),q=U(oe,q)):we=!0,F++}return q};if(k===re.Enter){o.preventDefault(),r.handleSelect(R,o),!b&&r.setPreSelection(R);return}else if(k===re.Escape){o.preventDefault(),r.setOpen(!1),r.inputOk()||(c=(s=r.props).onInputError)===null||c===void 0||c.call(s,{code:1,msg:La});return}var V=null;switch(k){case re.ArrowLeft:case re.ArrowRight:case re.ArrowUp:case re.ArrowDown:case re.PageUp:case re.PageDown:case re.Home:case re.End:V=H(k,R);break}if(!V){(u=(l=r.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:La});return}if(o.preventDefault(),r.setState({lastPreSelectChange:za}),T&&r.setSelected(V),r.setPreSelection(V),D){var K=y.getMonth(R),v=y.getMonth(V),$=y.getYear(R),M=y.getYear(V);K!==v||$!==M?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}},r.onPopperKeyDown=function(o){var i=o.key;i===re.Escape&&(o.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1))},r.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),r.sendFocusBackToInput();var i=r.props,a=i.selectsRange,s=i.onChange;s?.(a?[null,null]:null,o),r.setState({inputValue:null})},r.clear=function(){r.onClearClick()},r.onScroll=function(o){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(o)&&r.setOpen(!1)},r.renderCalendar=function(){var o,i;return!r.props.inline&&!r.isCalendarOpen()?null:w.createElement(Dv,xe({showMonthYearDropdown:void 0,ref:function(a){r.calendar=a}},r.props,r.state,{setOpen:r.setOpen,dateFormat:(o=r.props.dateFormatCalendar)!==null&&o!==void 0?o:n.defaultProps.dateFormatCalendar,onSelect:r.handleSelect,onClickOutside:r.handleCalendarClickOutside,holidays:ov(r.modifyHolidays()),outsideClickIgnoreClass:r.props.outsideClickIgnoreClass,onDropdownFocus:r.handleDropdownFocus,onTimeChange:r.handleTimeChange,className:r.props.calendarClassName,container:r.props.calendarContainer,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,setPreSelection:r.setPreSelection,dropdownMode:(i=r.props.dropdownMode)!==null&&i!==void 0?i:n.defaultProps.dropdownMode}),r.props.children)},r.renderAriaLiveRegion=function(){var o,i=r.props.locale,a=(o=r.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,s=r.props.showTimeInput||r.props.showTimeSelect,c=s?"PPPPp":"PPPP",l;return r.props.selectsRange?l="Selected start date: ".concat($t(r.props.startDate,{dateFormat:c,locale:i}),". ").concat(r.props.endDate?"End date: "+$t(r.props.endDate,{dateFormat:c,locale:i}):""):r.props.showTimeSelectOnly?l="Selected time: ".concat($t(r.props.selected,{dateFormat:a,locale:i})):r.props.showYearPicker?l="Selected year: ".concat($t(r.props.selected,{dateFormat:"yyyy",locale:i})):r.props.showMonthYearPicker?l="Selected month: ".concat($t(r.props.selected,{dateFormat:"MMMM yyyy",locale:i})):r.props.showQuarterYearPicker?l="Selected quarter: ".concat($t(r.props.selected,{dateFormat:"yyyy, QQQ",locale:i})):l="Selected date: ".concat($t(r.props.selected,{dateFormat:c,locale:i})),w.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},l)},r.renderDateInput=function(){var o,i,a=Ve(r.props.className,(o={},o[r.props.outsideClickIgnoreClass||n.defaultProps.outsideClickIgnoreClass]=r.state.open,o)),s=r.props.customInput||w.createElement("input",{type:"text"}),c=r.props.customInputRef||"ref";return w.cloneElement(s,(i={},i[c]=function(l){r.input=l},i.value=r.getInputValue(),i.onBlur=r.handleBlur,i.onChange=r.handleChange,i.onClick=r.onInputClick,i.onFocus=r.handleFocus,i.onKeyDown=r.onInputKeyDown,i.id=r.props.id,i.name=r.props.name,i.form=r.props.form,i.autoFocus=r.props.autoFocus,i.placeholder=r.props.placeholderText,i.disabled=r.props.disabled,i.autoComplete=r.props.autoComplete,i.className=Ve(s.props.className,a),i.title=r.props.title,i.readOnly=r.props.readOnly,i.required=r.props.required,i.tabIndex=r.props.tabIndex,i["aria-describedby"]=r.props.ariaDescribedBy,i["aria-invalid"]=r.props.ariaInvalid,i["aria-labelledby"]=r.props.ariaLabelledBy,i["aria-required"]=r.props.ariaRequired,i))},r.renderClearButton=function(){var o=r.props,i=o.isClearable,a=o.disabled,s=o.selected,c=o.startDate,l=o.endDate,u=o.clearButtonTitle,d=o.clearButtonClassName,f=d===void 0?"":d,m=o.ariaLabelClose,g=m===void 0?"Close":m,p=o.selectedDates,b=o.readOnly;return i&&!b&&(s!=null||c!=null||l!=null||p?.length)?w.createElement("button",{type:"button",className:Ve("react-datepicker__close-icon",f,{"react-datepicker__close-icon--disabled":a}),disabled:a,"aria-label":g,onClick:r.onClearClick,title:u,tabIndex:-1}):null},r.state=r.calcInitialState(),r.preventFocusTimeout=void 0,r}return Object.defineProperty(n,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:eu,readOnly:!1,rangeSeparator:Pl,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Vn,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.componentDidUpdate=function(t,r){var o,i,a,s;t.inline&&Iv(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Zl(this.props.highlightDates)}),!r.focused&&!Rr(t.selected,this.props.selected)&&this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&((i=(o=this.props).onCalendarOpen)===null||i===void 0||i.call(o)),r.open===!0&&this.state.open===!1&&((s=(a=this.props).onCalendarClose)===null||s===void 0||s.call(a)))},n.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.renderInputContainer=function(){var t=this.props,r=t.showIcon,o=t.icon,i=t.calendarIconClassname,a=t.calendarIconClassName,s=t.toggleCalendarOnIconClick,c=this.state.open;return i&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),w.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&w.createElement(Ev,xe({icon:o,className:Ve(a,!a&&i,c&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},n.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var r=this.state.open?w.createElement(ru,{enableTabLoop:this.props.enableTabLoop},w.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(r=w.createElement(tu,xe({portalId:this.props.portalId},this.props),r)),w.createElement("div",null,this.renderInputContainer(),r)}return w.createElement(Pv,xe({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},n})(w.Component),Rv="input",za="navigate";const $v="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M2.999%208.611a1.1%201.1%200%200%201%20.33-.786%201.135%201.135%200%200%201%201.591%200l7.079%206.993%207.079-6.993a1.135%201.135%200%200%201%201.837.36%201.1%201.1%200%200%201-.246%201.215l-7.87%207.775a1.135%201.135%200%200%201-1.591%200L3.328%209.4a1.1%201.1%200%200%201-.329-.789'/%3e%3c/svg%3e",jv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M15.39%2021a1.1%201.1%200%200%200%20.785-.33%201.135%201.135%200%200%200%200-1.591L9.182%2012l6.993-7.08a1.135%201.135%200%200%200-.36-1.835%201.1%201.1%200%200%200-1.21.244L6.824%2011.2a1.135%201.135%200%200%200%200%201.591L14.6%2020.67a1.1%201.1%200%200%200%20.79.33'/%3e%3c/svg%3e",Lv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M8.61%203a1.1%201.1%200%200%200-.785.33%201.135%201.135%200%200%200%200%201.591L14.818%2012l-6.993%207.08a1.135%201.135%200%200%200%20.36%201.835%201.1%201.1%200%200%200%201.21-.244l7.78-7.871a1.135%201.135%200%200%200%200-1.591L9.4%203.33A1.1%201.1%200%200%200%208.61%203'/%3e%3c/svg%3e",zv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23fff'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.085%207.331a1.096%201.096%200%201%200-2.192%200v9.316a1.096%201.096%200%200%200%202.192%200z'/%3e%3cpath%20d='M16.647%2010.893H7.33a1.096%201.096%200%201%200%200%202.192h9.316a1.096%201.096%200%200%200%200-2.192'/%3e%3cpath%20d='M12%2024C5.38%2024%200%2018.608%200%2012S5.38%200%2012%200s12%205.38%2012%2012-5.38%2012-12%2012m0-21.808c-5.414%200-9.808%204.394-9.808%209.808S6.586%2021.808%2012%2021.808s9.808-4.394%209.808-9.808S17.403%202.192%2012%202.192'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Bv=w.forwardRef(({value:e,onClick:n},t)=>h.jsxs("button",{className:Ar.datePickerButton,onClick:n,ref:t,children:[e,h.jsx("img",{src:$v,style:{marginLeft:10}})]})),Vv=({currentDate:e,onPrevMonth:n,onNextMonth:t,onAddEvent:r,onDateChange:o})=>h.jsxs("div",{className:Ar.headerContainer,children:[h.jsxs("div",{className:Ar.navAndDate,children:[h.jsx("button",{className:Ar.navButton,onClick:n,children:h.jsx("img",{src:jv,width:15})}),h.jsx("button",{className:Ar.navButton,onClick:t,children:h.jsx("img",{src:Lv,width:15})}),h.jsx(Nv,{selected:e,onChange:i=>o(i),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:Ar.datePickerInput,locale:"es",customInput:h.jsx(Bv,{})})]}),h.jsxs("button",{className:Ar.addEventButton,onClick:r,children:[h.jsx("img",{src:zv}),"Agregar evento"]})]}),be={sidebarContainer:"_sidebarContainer_1pgug_1",leadsSection:"_leadsSection_1pgug_17",leadCard:"_leadCard_1pgug_33",leadIcon:"_leadIcon_1pgug_71",leadDays:"_leadDays_1pgug_81",leadCount:"_leadCount_1pgug_91",eventsSection:"_eventsSection_1pgug_105",sidebarTitle:"_sidebarTitle_1pgug_129",eventGroup:"_eventGroup_1pgug_147",eventGroupDate:"_eventGroupDate_1pgug_155",eventItem:"_eventItem_1pgug_167",eventDetails:"_eventDetails_1pgug_201",eventTitle:"_eventTitle_1pgug_215",eventTime:"_eventTime_1pgug_241",calendarsSection:"_calendarsSection_1pgug_263",collapsibleHeader:"_collapsibleHeader_1pgug_271",headerTitle:"_headerTitle_1pgug_299",calendarCount:"_calendarCount_1pgug_313",chevronIcon:"_chevronIcon_1pgug_331",collapsed:"_collapsed_1pgug_339",collapsibleContent:"_collapsibleContent_1pgug_347",hidden:"_hidden_1pgug_363",calendarItem:"_calendarItem_1pgug_373",circularCheckbox:"_circularCheckbox_1pgug_407",checkedIcon:"_checkedIcon_1pgug_425",uncheckedIcon:"_uncheckedIcon_1pgug_433",calendarIcon:"_calendarIcon_1pgug_441",googleIcon:"_googleIcon_1pgug_449",syncButton:"_syncButton_1pgug_457",eventsContainer:"_eventsContainer_1pgug_509"};/**
|
|
108
108
|
* @license lucide-react v0.540.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const Fv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase()),nu=e=>{const n=Yv(e);return n.charAt(0).toUpperCase()+n.slice(1)},ou=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim(),Hv=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
113
113
|
* @license lucide-react v0.540.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/var
|
|
117
|
+
*/var Uv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
118
118
|
* @license lucide-react v0.540.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Wv=w.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:t=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},c)=>w.createElement("svg",{ref:c,...Uv,width:n,height:n,stroke:e,strokeWidth:r?Number(t)*24/Number(n):t,className:ou("lucide",o),...!i&&!Hv(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,u])=>w.createElement(l,u)),...Array.isArray(i)?i:[i]]));/**
|
|
123
123
|
* @license lucide-react v0.540.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Un=(e,n)=>{const t=w.forwardRef(({className:r,...o},
|
|
127
|
+
*/const Un=(e,n)=>{const t=w.forwardRef(({className:r,...o},i)=>w.createElement(Wv,{ref:i,iconNode:n,className:ou(`lucide-${Fv(nu(e))}`,`lucide-${e}`,r),...o}));return t.displayName=nu(e),t};/**
|
|
128
128
|
* @license lucide-react v0.540.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const iu=Un("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
133
133
|
* @license lucide-react v0.540.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const Zv=Un("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
138
138
|
* @license lucide-react v0.540.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const qv=Un("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
143
143
|
* @license lucide-react v0.540.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const Kv=Un("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
148
148
|
* @license lucide-react v0.540.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const Wv=Un("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),nu=Symbol.for("constructDateFrom");function Bi(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&nu in e?e[nu](n):e instanceof Date?new e.constructor(n):new Date(n)}function Cr(e,n){return Bi(n||e,e)}function ou(e,n,t){const[r,o]=[+Cr(e.start,t?.in),+Cr(e.end,t?.in)].sort((s,c)=>s-c),[a,i]=[+Cr(n.start,t?.in),+Cr(n.end,t?.in)].sort((s,c)=>s-c);return r<i&&a<o}function da(e){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},da(e)}var Zv=/^\s+/,qv=/\s+$/;function ce(e,n){if(e=e||"",n=n||{},e instanceof ce)return e;if(!(this instanceof ce))return new ce(e,n);var t=Kv(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||t.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}ce.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),t,r,o,a,i,s;return t=n.r/255,r=n.g/255,o=n.b/255,t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*i+.0722*s},setAlpha:function(n){return this._a=uu(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=iu(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=iu(this._r,this._g,this._b),t=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+o+"%)":"hsva("+t+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=au(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=au(this._r,this._g,this._b),t=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+o+"%)":"hsla("+t+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return su(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return Xv(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Ue(this._r,255)*100)+"%",g:Math.round(Ue(this._g,255)*100)+"%",b:Math.round(Ue(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ue(this._r,255)*100)+"%, "+Math.round(Ue(this._g,255)*100)+"%, "+Math.round(Ue(this._b,255)*100)+"%)":"rgba("+Math.round(Ue(this._r,255)*100)+"%, "+Math.round(Ue(this._g,255)*100)+"%, "+Math.round(Ue(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:dy[su(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var t="#"+cu(this._r,this._g,this._b,this._a),r=t,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=ce(n);r="#"+cu(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+r+")"},toString:function(n){var t=!!n;n=n||this._format;var r=!1,o=this._a<1&&this._a>=0,a=!t&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ce(this.toString())},_applyModification:function(n,t){var r=n.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(ny,arguments)},brighten:function(){return this._applyModification(oy,arguments)},darken:function(){return this._applyModification(ay,arguments)},desaturate:function(){return this._applyModification(ey,arguments)},saturate:function(){return this._applyModification(ty,arguments)},greyscale:function(){return this._applyModification(ry,arguments)},spin:function(){return this._applyModification(iy,arguments)},_applyCombination:function(n,t){return n.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(ly,arguments)},complement:function(){return this._applyCombination(sy,arguments)},monochromatic:function(){return this._applyCombination(uy,arguments)},splitcomplement:function(){return this._applyCombination(cy,arguments)},triad:function(){return this._applyCombination(lu,[3])},tetrad:function(){return this._applyCombination(lu,[4])}},ce.fromRatio=function(e,n){if(da(e)=="object"){var t={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?t[r]=e[r]:t[r]=Wn(e[r]));e=t}return ce(e,n)};function Kv(e){var n={r:0,g:0,b:0},t=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=my(e)),da(e)=="object"&&(fr(e.r)&&fr(e.g)&&fr(e.b)?(n=Gv(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):fr(e.h)&&fr(e.s)&&fr(e.v)?(r=Wn(e.s),o=Wn(e.v),n=Jv(e.h,r,o),i=!0,s="hsv"):fr(e.h)&&fr(e.s)&&fr(e.l)&&(r=Wn(e.s),a=Wn(e.l),n=Qv(e.h,r,a),i=!0,s="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=uu(t),{ok:i,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:t}}function Gv(e,n,t){return{r:Ue(e,255)*255,g:Ue(n,255)*255,b:Ue(t,255)*255}}function au(e,n,t){e=Ue(e,255),n=Ue(n,255),t=Ue(t,255);var r=Math.max(e,n,t),o=Math.min(e,n,t),a,i,s=(r+o)/2;if(r==o)a=i=0;else{var c=r-o;switch(i=s>.5?c/(2-r-o):c/(r+o),r){case e:a=(n-t)/c+(n<t?6:0);break;case n:a=(t-e)/c+2;break;case t:a=(e-n)/c+4;break}a/=6}return{h:a,s:i,l:s}}function Qv(e,n,t){var r,o,a;e=Ue(e,360),n=Ue(n,100),t=Ue(t,100);function i(l,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(u-l)*6*d:d<1/2?u:d<2/3?l+(u-l)*(2/3-d)*6:l}if(n===0)r=o=a=t;else{var s=t<.5?t*(1+n):t+n-t*n,c=2*t-s;r=i(c,s,e+1/3),o=i(c,s,e),a=i(c,s,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function iu(e,n,t){e=Ue(e,255),n=Ue(n,255),t=Ue(t,255);var r=Math.max(e,n,t),o=Math.min(e,n,t),a,i,s=r,c=r-o;if(i=r===0?0:c/r,r==o)a=0;else{switch(r){case e:a=(n-t)/c+(n<t?6:0);break;case n:a=(t-e)/c+2;break;case t:a=(e-n)/c+4;break}a/=6}return{h:a,s:i,v:s}}function Jv(e,n,t){e=Ue(e,360)*6,n=Ue(n,100),t=Ue(t,100);var r=Math.floor(e),o=e-r,a=t*(1-n),i=t*(1-o*n),s=t*(1-(1-o)*n),c=r%6,l=[t,i,a,a,s,t][c],u=[s,t,t,i,a,a][c],d=[a,a,s,t,t,i][c];return{r:l*255,g:u*255,b:d*255}}function su(e,n,t,r){var o=[zt(Math.round(e).toString(16)),zt(Math.round(n).toString(16)),zt(Math.round(t).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Xv(e,n,t,r,o){var a=[zt(Math.round(e).toString(16)),zt(Math.round(n).toString(16)),zt(Math.round(t).toString(16)),zt(du(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function cu(e,n,t,r){var o=[zt(du(r)),zt(Math.round(e).toString(16)),zt(Math.round(n).toString(16)),zt(Math.round(t).toString(16))];return o.join("")}ce.equals=function(e,n){return!e||!n?!1:ce(e).toRgbString()==ce(n).toRgbString()},ce.random=function(){return ce.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function ey(e,n){n=n===0?0:n||10;var t=ce(e).toHsl();return t.s-=n/100,t.s=fa(t.s),ce(t)}function ty(e,n){n=n===0?0:n||10;var t=ce(e).toHsl();return t.s+=n/100,t.s=fa(t.s),ce(t)}function ry(e){return ce(e).desaturate(100)}function ny(e,n){n=n===0?0:n||10;var t=ce(e).toHsl();return t.l+=n/100,t.l=fa(t.l),ce(t)}function oy(e,n){n=n===0?0:n||10;var t=ce(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(n/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(n/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(n/100)))),ce(t)}function ay(e,n){n=n===0?0:n||10;var t=ce(e).toHsl();return t.l-=n/100,t.l=fa(t.l),ce(t)}function iy(e,n){var t=ce(e).toHsl(),r=(t.h+n)%360;return t.h=r<0?360+r:r,ce(t)}function sy(e){var n=ce(e).toHsl();return n.h=(n.h+180)%360,ce(n)}function lu(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var t=ce(e).toHsl(),r=[ce(e)],o=360/n,a=1;a<n;a++)r.push(ce({h:(t.h+a*o)%360,s:t.s,l:t.l}));return r}function cy(e){var n=ce(e).toHsl(),t=n.h;return[ce(e),ce({h:(t+72)%360,s:n.s,l:n.l}),ce({h:(t+216)%360,s:n.s,l:n.l})]}function ly(e,n,t){n=n||6,t=t||30;var r=ce(e).toHsl(),o=360/t,a=[ce(e)];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,a.push(ce(r));return a}function uy(e,n){n=n||6;for(var t=ce(e).toHsv(),r=t.h,o=t.s,a=t.v,i=[],s=1/n;n--;)i.push(ce({h:r,s:o,v:a})),a=(a+s)%1;return i}ce.mix=function(e,n,t){t=t===0?0:t||50;var r=ce(e).toRgb(),o=ce(n).toRgb(),a=t/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return ce(i)},ce.readability=function(e,n){var t=ce(e),r=ce(n);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)},ce.isReadable=function(e,n,t){var r=ce.readability(e,n),o,a;switch(a=!1,o=gy(t),o.level+o.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},ce.mostReadable=function(e,n,t){var r=null,o=0,a,i,s,c;t=t||{},i=t.includeFallbackColors,s=t.level,c=t.size;for(var l=0;l<n.length;l++)a=ce.readability(e,n[l]),a>o&&(o=a,r=ce(n[l]));return ce.isReadable(e,r,{level:s,size:c})||!i?r:(t.includeFallbackColors=!1,ce.mostReadable(e,["#fff","#000"],t))};var Vi=ce.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},dy=ce.hexNames=fy(Vi);function fy(e){var n={};for(var t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}function uu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ue(e,n){py(e)&&(e="100%");var t=hy(e);return e=Math.min(n,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function fa(e){return Math.min(1,Math.max(0,e))}function Ot(e){return parseInt(e,16)}function py(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function hy(e){return typeof e=="string"&&e.indexOf("%")!=-1}function zt(e){return e.length==1?"0"+e:""+e}function Wn(e){return e<=1&&(e=e*100+"%"),e}function du(e){return Math.round(parseFloat(e)*255).toString(16)}function fu(e){return Ot(e)/255}var Bt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",t="(?:"+n+")|(?:"+e+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",o="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function fr(e){return!!Bt.CSS_UNIT.exec(e)}function my(e){e=e.replace(Zv,"").replace(qv,"").toLowerCase();var n=!1;if(Vi[e])e=Vi[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Bt.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Bt.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Bt.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Bt.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Bt.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Bt.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Bt.hex8.exec(e))?{r:Ot(t[1]),g:Ot(t[2]),b:Ot(t[3]),a:fu(t[4]),format:n?"name":"hex8"}:(t=Bt.hex6.exec(e))?{r:Ot(t[1]),g:Ot(t[2]),b:Ot(t[3]),format:n?"name":"hex"}:(t=Bt.hex4.exec(e))?{r:Ot(t[1]+""+t[1]),g:Ot(t[2]+""+t[2]),b:Ot(t[3]+""+t[3]),a:fu(t[4]+""+t[4]),format:n?"name":"hex8"}:(t=Bt.hex3.exec(e))?{r:Ot(t[1]+""+t[1]),g:Ot(t[2]+""+t[2]),b:Ot(t[3]+""+t[3]),format:n?"name":"hex"}:!1}function gy(e){var n,t;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:n,size:t}}const pu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23C4D9F5'%20d='M36.667%2020c0%209.205-7.462%2016.667-16.667%2016.667S3.333%2029.205%203.333%2020%2010.795%203.333%2020%203.333%2036.667%2010.795%2036.667%2020'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M20%2012.083c.69%200%201.25.56%201.25%201.25v6.15l3.8%203.8a1.25%201.25%200%201%201-1.767%201.767l-4.167-4.166A1.25%201.25%200%200%201%2018.75%2020v-6.667c0-.69.56-1.25%201.25-1.25'%20clip-rule='evenodd'/%3e%3c/svg%3e",vy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='23'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M17.614%202.64h-.5v-.622c0-.566-.443-1.018-.998-1.018s-.998.452-.998%201.018v.622H7.893v-.622C7.894%201.452%207.45%201%206.895%201s-.999.452-.999%201.018v.622h-.5C2.946%202.64.959%204.665.959%207.165v11.31c0%202.5%201.987%204.525%204.439%204.525h12.206c2.452%200%204.439-2.025%204.439-4.524V7.165c0-2.5-1.987-4.525-4.439-4.525zm0%2018.098H5.408c-1.22%200-2.22-1.018-2.22-2.262V10.41h16.646v8.065c0%201.244-1%202.262-2.22%202.262'/%3e%3c/svg%3e",yy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M12.667%204.667a3%203%200%200%201%203%203v8.667a3%203%200%200%201-3%203H4a3%203%200%200%201-3-3V7.667a3%203%200%200%201%203-3zM21.36%206.237a1%201%200%200%201%201.64.77V17a1%201%200%200%201-1.64.768L17%2014.135V9.867z'/%3e%3c/svg%3e",by=({onEventClick:e,upcomingEvents:n,onSyncGoogle:t,onSyncOutlook:r,leads30Days:o,leads90Days:a})=>{const i=d=>{const f=new Date,m={start:y.startOfDay(f),end:y.endOfDay(f)},g={start:d.fechaInicio,end:d.fechaFin};return ou(m,g)?"Hoy":y.isTomorrow(d.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(d.fechaInicio)},s={};n.forEach(d=>{const f=i(d);s[f]||(s[f]=[]),s[f].push(d)});const[c,l]=w.useState(!1),u=()=>{l(!c)};return h.jsxs("div",{className:_e.sidebarContainer,children:[h.jsxs("div",{className:_e.leadsSection,children:[h.jsxs("div",{className:_e.leadCard,children:[h.jsx("div",{className:_e.leadIcon,children:h.jsx("img",{src:pu})}),h.jsxs("div",{className:_e.leadText,children:[h.jsx("div",{className:_e.leadDays,children:"+30 días sin atender"}),h.jsxs("div",{className:_e.leadCount,children:[o," ",h.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),h.jsxs("div",{className:_e.leadCard,children:[h.jsx("div",{className:_e.leadIcon,children:h.jsx("img",{src:pu})}),h.jsxs("div",{className:_e.leadText,children:[h.jsx("div",{className:_e.leadDays,children:"+90 días sin atender"}),h.jsxs("div",{className:_e.leadCount,children:[a," ",h.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),h.jsxs("div",{className:_e.eventsSection,children:[h.jsx("h3",{className:_e.sidebarTitle,children:"Próximos eventos"}),h.jsx("div",{className:_e.eventsContainer,children:Object.entries(s).map(([d,f])=>h.jsxs("div",{className:`${_e.eventGroup}`,children:[h.jsxs("div",{className:_e.eventGroupDate,children:[h.jsx("img",{src:vy,width:15})," ",d]}),f.map(m=>{const g=ce(m.color||"#ffcc00"),p=g.toString(),b=g.clone().darken(15).toString();return h.jsxs("div",{className:_e.eventItem,style:{backgroundColor:p,borderLeftColor:b},onClick:()=>e(m),children:[h.jsxs("div",{className:_e.eventDetails,children:[h.jsx("div",{className:_e.eventTitle,children:m.titulo.length>32?`${m.titulo.substring(0,32)}...`:m.titulo}),h.jsx("div",{className:_e.eventGroupDate,children:m?.client?m?.client?.length>50?`${m.client.substring(0,32)}...`:m.client:""}),h.jsx("div",{className:_e.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(m.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(m.fechaFin)}`})]}),m.link&&h.jsx("a",{onClick:x=>{x.stopPropagation()},href:m?.link,target:"_blank",style:{textDecoration:"none"},children:h.jsx("img",{src:yy,width:15,style:{marginLeft:"3px"}})})]},m.eventoID)})]},d))})]}),h.jsxs("div",{className:_e.calendarsSection,hidden:!0,children:[h.jsxs("button",{onClick:u,className:_e.collapsibleHeader,children:[h.jsxs("div",{className:_e.headerTitle,children:[h.jsx("h3",{children:"Calendarios"}),h.jsx("span",{className:_e.calendarCount,children:"1"})]}),h.jsx(Yv,{className:`${_e.chevronIcon} ${c?_e.collapsed:""}`})]}),h.jsxs("div",{className:`${_e.collapsibleContent} ${c?_e.hidden:""}`,children:[h.jsxs("div",{className:_e.calendarItem,children:[h.jsx("div",{className:_e.circularCheckbox,children:h.jsx(Hv,{size:24,className:_e.checkedIcon})}),h.jsx(ru,{size:24,className:_e.calendarIcon}),h.jsx("span",{children:"Mi calendario"})]}),h.jsxs("div",{className:_e.calendarItem,onClick:r,children:[h.jsx("div",{className:_e.circularCheckbox,children:h.jsx(Uv,{size:24,className:_e.uncheckedIcon})}),h.jsx(Wv,{size:24,className:_e.calendarIcon}),h.jsx("span",{children:"Outlook"})]}),h.jsxs("div",{className:_e.syncButton,onClick:t,children:[h.jsx(ru,{size:24,className:_e.googleIcon}),h.jsx("span",{children:"Sincronizar Google Calendar"})]})]})]})]})},Vt={dayCell:"_dayCell_ph891_1",dayCellContainer:"_dayCellContainer_ph891_23",dayNumber:"_dayNumber_ph891_55",dayNumberToday:"_dayNumberToday_ph891_69",notCurrentMonth:"_notCurrentMonth_ph891_91",CurrentDay:"_CurrentDay_ph891_129",eventsList:"_eventsList_ph891_137",eventItem:"_eventItem_ph891_155",eventTitle:"_eventTitle_ph891_187",eventTime:"_eventTime_ph891_217",seeMoreLink:"_seeMoreLink_ph891_245"},hu=25,wy=22,_y=({dayNumber:e,date:n,events:t,isToday:r,isCurrentMonth:o,onDayClick:a,onEventClick:i,onSeeMoreClick:s})=>{const c=[Vt.dayCell,o?"":Vt.notCurrentMonth,Vt.CurrentDay].join(" ").trim(),l=w.useRef(null),[u,d]=w.useState(t.length),f=()=>{a?.(n)};w.useLayoutEffect(()=>{const p=()=>{if(l.current){const b=l.current.clientHeight;let x=Math.floor(b/hu);if(x<t.length){const S=Math.floor((b-wy)/hu);x=Math.max(0,S)}d(x)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[t.length]);const m=t.slice(0,u==0?1:u),g=t.length-(u==0?1:u);return h.jsxs("div",{className:`${c} ${Vt.dayCellContainer}`,onClick:f,children:[h.jsx("div",{className:r?Vt.dayNumber:Vt.dayNumberToday,children:e}),h.jsxs("div",{className:Vt.eventsList,ref:l,children:[m.map(p=>h.jsxs("div",{className:Vt.eventItem,style:{backgroundColor:p.color||"#007bff"},onClick:b=>{b.stopPropagation(),i?.(p)},children:[h.jsx("span",{className:Vt.eventTitle,children:p.titulo}),h.jsx("span",{className:Vt.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(p.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(p.fechaFin)}`})]},p.eventoID)),g>0&&h.jsxs("div",{className:Vt.seeMoreLink,onClick:p=>{p.stopPropagation(),s(t,n)},children:[g," más..."]})]})]})},mu={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},xy=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return h.jsx("div",{className:mu.weekDaysContainer,children:e.map(n=>h.jsx("div",{className:mu.weekDay,children:n},n))})},pa={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Sy(e,...n){const t=Bi.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function Cy(e,n){const[t,r]=Sy(e,n.start,n.end);return{start:t,end:r}}function ky(e,n){const{start:t,end:r}=Cy(n?.in,e);let o=+t>+r;const a=o?+t:+r,i=o?r:t;i.setHours(0,0,0,0);let s=1;const c=[];for(;+i<=a;)c.push(Bi(t,i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return o?c.reverse():c}function Dy(e,n){const t=n?.weekStartsOn,r=Cr(e,n?.in),o=r.getDay(),a=(o<t?-7:0)+6-(o-t);return r.setDate(r.getDate()+a),r.setHours(23,59,59,999),r}function Ey(e,n,t){const r=+Cr(e,t?.in),[o,a]=[+Cr(n.start,t?.in),+Cr(n.end,t?.in)].sort((i,s)=>i-s);return r>=o&&r<=a}const Ty=({currentDate:e,events:n,onDayClick:t,onEventClick:r,onSeeMoreClick:o})=>{const a=y.startOfMonth(e),i=y.endOfMonth(e),s=y.startOfWeek(a,{weekStartsOn:1}),c=Dy(i,{weekStartsOn:1}),l=ky({start:s,end:c}),u={},d=l.length/7,f=`${pa.daysContainer} ${d===5?pa.rows5:pa.rows6}`;return n.forEach(m=>{const g=y.format(m.fechaInicio,"yyyy-MM-dd");u[g]||(u[g]=[]),u[g].push(m)}),h.jsxs("div",{className:pa.calendarGridContainer,children:[h.jsx(xy,{}),h.jsx("div",{className:f,children:l.map(m=>{const g=n.filter(p=>Ey(m,{start:y.startOfDay(p.fechaInicio),end:y.endOfDay(p.fechaFin)}));return h.jsx(_y,{dayNumber:m.getDate(),date:m,events:g,isToday:y.isToday(m),isCurrentMonth:y.isSameMonth(m,e),onDayClick:t,onEventClick:r,onSeeMoreClick:o},m.toISOString())})})]})};function gu(e,n){return function(){return e.apply(n,arguments)}}const{toString:Oy}=Object.prototype,{getPrototypeOf:Fi}=Object,{iterator:ha,toStringTag:vu}=Symbol,ma=(e=>n=>{const t=Oy.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ft=e=>(e=e.toLowerCase(),n=>ma(n)===e),ga=e=>n=>typeof n===e,{isArray:dn}=Array,Zn=ga("undefined");function qn(e){return e!==null&&!Zn(e)&&e.constructor!==null&&!Zn(e.constructor)&&bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yu=Ft("ArrayBuffer");function My(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&yu(e.buffer),n}const Ay=ga("string"),bt=ga("function"),bu=ga("number"),Kn=e=>e!==null&&typeof e=="object",Py=e=>e===!0||e===!1,va=e=>{if(ma(e)!=="object")return!1;const n=Fi(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(vu in e)&&!(ha in e)},Iy=e=>{if(!Kn(e)||qn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ny=Ft("Date"),Ry=Ft("File"),$y=Ft("Blob"),jy=Ft("FileList"),Ly=e=>Kn(e)&&bt(e.pipe),zy=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||bt(e.append)&&((n=ma(e))==="formdata"||n==="object"&&bt(e.toString)&&e.toString()==="[object FormData]"))},By=Ft("URLSearchParams"),[Vy,Fy,Yy,Hy]=["ReadableStream","Request","Response","Headers"].map(Ft),Uy=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gn(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),dn(e))for(r=0,o=e.length;r<o;r++)n.call(null,e[r],r,e);else{if(qn(e))return;const a=t?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],n.call(null,e[s],s,e)}}function wu(e,n){if(qn(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,o;for(;r-- >0;)if(o=t[r],n===o.toLowerCase())return o;return null}const $r=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_u=e=>!Zn(e)&&e!==$r;function Yi(){const{caseless:e}=_u(this)&&this||{},n={},t=(r,o)=>{const a=e&&wu(n,o)||o;va(n[a])&&va(r)?n[a]=Yi(n[a],r):va(r)?n[a]=Yi({},r):dn(r)?n[a]=r.slice():n[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Gn(arguments[r],t);return n}const Wy=(e,n,t,{allOwnKeys:r}={})=>(Gn(n,(o,a)=>{t&&bt(o)?e[a]=gu(o,t):e[a]=o},{allOwnKeys:r}),e),Zy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qy=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},Ky=(e,n,t,r)=>{let o,a,i;const s={};if(n=n||{},e==null)return n;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,n))&&!s[i]&&(n[i]=e[i],s[i]=!0);e=t!==!1&&Fi(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},Gy=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},Qy=e=>{if(!e)return null;if(dn(e))return e;let n=e.length;if(!bu(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},Jy=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Fi(Uint8Array)),Xy=(e,n)=>{const r=(e&&e[ha]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;n.call(e,a[0],a[1])}},eb=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},tb=Ft("HTMLFormElement"),rb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,o){return r.toUpperCase()+o}),xu=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),nb=Ft("RegExp"),Su=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};Gn(t,(o,a)=>{let i;(i=n(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},ob=e=>{Su(e,(n,t)=>{if(bt(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=e[t];if(bt(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},ab=(e,n)=>{const t={},r=o=>{o.forEach(a=>{t[a]=!0})};return dn(e)?r(e):r(String(e).split(n)),t},ib=()=>{},sb=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function cb(e){return!!(e&&bt(e.append)&&e[vu]==="FormData"&&e[ha])}const lb=e=>{const n=new Array(10),t=(r,o)=>{if(Kn(r)){if(n.indexOf(r)>=0)return;if(qn(r))return r;if(!("toJSON"in r)){n[o]=r;const a=dn(r)?[]:{};return Gn(r,(i,s)=>{const c=t(i,o+1);!Zn(c)&&(a[s]=c)}),n[o]=void 0,a}}return r};return t(e,0)},ub=Ft("AsyncFunction"),db=e=>e&&(Kn(e)||bt(e))&&bt(e.then)&&bt(e.catch),Cu=((e,n)=>e?setImmediate:n?((t,r)=>($r.addEventListener("message",({source:o,data:a})=>{o===$r&&a===t&&r.length&&r.shift()()},!1),o=>{r.push(o),$r.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",bt($r.postMessage)),fb=typeof queueMicrotask<"u"?queueMicrotask.bind($r):typeof process<"u"&&process.nextTick||Cu,R={isArray:dn,isArrayBuffer:yu,isBuffer:qn,isFormData:zy,isArrayBufferView:My,isString:Ay,isNumber:bu,isBoolean:Py,isObject:Kn,isPlainObject:va,isEmptyObject:Iy,isReadableStream:Vy,isRequest:Fy,isResponse:Yy,isHeaders:Hy,isUndefined:Zn,isDate:Ny,isFile:Ry,isBlob:$y,isRegExp:nb,isFunction:bt,isStream:Ly,isURLSearchParams:By,isTypedArray:Jy,isFileList:jy,forEach:Gn,merge:Yi,extend:Wy,trim:Uy,stripBOM:Zy,inherits:qy,toFlatObject:Ky,kindOf:ma,kindOfTest:Ft,endsWith:Gy,toArray:Qy,forEachEntry:Xy,matchAll:eb,isHTMLForm:tb,hasOwnProperty:xu,hasOwnProp:xu,reduceDescriptors:Su,freezeMethods:ob,toObjectSet:ab,toCamelCase:rb,noop:ib,toFiniteNumber:sb,findKey:wu,global:$r,isContextDefined:_u,isSpecCompliantForm:cb,toJSONObject:lb,isAsyncFn:ub,isThenable:db,setImmediate:Cu,asap:fb,isIterable:e=>e!=null&&bt(e[ha])};function we(e,n,t,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const ku=we.prototype,Du={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Du[e]={value:e}}),Object.defineProperties(we,Du),Object.defineProperty(ku,"isAxiosError",{value:!0}),we.from=(e,n,t,r,o,a)=>{const i=Object.create(ku);return R.toFlatObject(e,i,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),we.call(i,e.message,n,t,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const pb=null;function Hi(e){return R.isPlainObject(e)||R.isArray(e)}function Eu(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Tu(e,n,t){return e?e.concat(n).map(function(o,a){return o=Eu(o),!t&&a?"["+o+"]":o}).join(t?".":""):n}function hb(e){return R.isArray(e)&&!e.some(Hi)}const mb=R.toFlatObject(R,{},null,function(n){return/^is[A-Z]/.test(n)});function ya(e,n,t){if(!R.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=R.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!R.isUndefined(b[p])});const r=t.metaTokens,o=t.visitor||u,a=t.dots,i=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(n);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(R.isDate(g))return g.toISOString();if(R.isBoolean(g))return g.toString();if(!c&&R.isBlob(g))throw new we("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(g)||R.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,b){let x=g;if(g&&!b&&typeof g=="object"){if(R.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(R.isArray(g)&&hb(g)||(R.isFileList(g)||R.endsWith(p,"[]"))&&(x=R.toArray(g)))return p=Eu(p),x.forEach(function(T,D){!(R.isUndefined(T)||T===null)&&n.append(i===!0?Tu([p],D,a):i===null?p:p+"[]",l(T))}),!1}return Hi(g)?!0:(n.append(Tu(b,p,a),l(g)),!1)}const d=[],f=Object.assign(mb,{defaultVisitor:u,convertValue:l,isVisitable:Hi});function m(g,p){if(!R.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(g),R.forEach(g,function(x,S){(!(R.isUndefined(x)||x===null)&&o.call(n,x,R.isString(S)?S.trim():S,p,f))===!0&&m(x,p?p.concat(S):[S])}),d.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return m(e),n}function Ou(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function Ui(e,n){this._pairs=[],e&&ya(e,this,n)}const Mu=Ui.prototype;Mu.append=function(n,t){this._pairs.push([n,t])},Mu.toString=function(n){const t=n?function(r){return n.call(this,r,Ou)}:Ou;return this._pairs.map(function(o){return t(o[0])+"="+t(o[1])},"").join("&")};function gb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Au(e,n,t){if(!n)return e;const r=t&&t.encode||gb;R.isFunction(t)&&(t={serialize:t});const o=t&&t.serialize;let a;if(o?a=o(n,t):a=R.isURLSearchParams(n)?n.toString():new Ui(n,t).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Pu{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){R.forEach(this.handlers,function(r){r!==null&&n(r)})}}const Iu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vb={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ui,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Wi=typeof window<"u"&&typeof document<"u",Zi=typeof navigator=="object"&&navigator||void 0,yb=Wi&&(!Zi||["ReactNative","NativeScript","NS"].indexOf(Zi.product)<0),bb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wb=Wi&&window.location.href||"http://localhost",ft={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wi,hasStandardBrowserEnv:yb,hasStandardBrowserWebWorkerEnv:bb,navigator:Zi,origin:wb},Symbol.toStringTag,{value:"Module"})),...vb};function _b(e,n){return ya(e,new ft.classes.URLSearchParams,{visitor:function(t,r,o,a){return ft.isNode&&R.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...n})}function xb(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Sb(e){const n={},t=Object.keys(e);let r;const o=t.length;let a;for(r=0;r<o;r++)a=t[r],n[a]=e[a];return n}function Nu(e){function n(t,r,o,a){let i=t[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),c=a>=t.length;return i=!i&&R.isArray(o)?o.length:i,c?(R.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!R.isObject(o[i]))&&(o[i]=[]),n(t,r,o[i],a)&&R.isArray(o[i])&&(o[i]=Sb(o[i])),!s)}if(R.isFormData(e)&&R.isFunction(e.entries)){const t={};return R.forEachEntry(e,(r,o)=>{n(xb(r),o,t,0)}),t}return null}function Cb(e,n,t){if(R.isString(e))try{return(n||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const Qn={transitional:Iu,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const r=t.getContentType()||"",o=r.indexOf("application/json")>-1,a=R.isObject(n);if(a&&R.isHTMLForm(n)&&(n=new FormData(n)),R.isFormData(n))return o?JSON.stringify(Nu(n)):n;if(R.isArrayBuffer(n)||R.isBuffer(n)||R.isStream(n)||R.isFile(n)||R.isBlob(n)||R.isReadableStream(n))return n;if(R.isArrayBufferView(n))return n.buffer;if(R.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _b(n,this.formSerializer).toString();if((s=R.isFileList(n))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ya(s?{"files[]":n}:n,c&&new c,this.formSerializer)}}return a||o?(t.setContentType("application/json",!1),Cb(n)):n}],transformResponse:[function(n){const t=this.transitional||Qn.transitional,r=t&&t.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(n)||R.isReadableStream(n))return n;if(n&&R.isString(n)&&(r&&!this.responseType||o)){const i=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(n)}catch(s){if(i)throw s.name==="SyntaxError"?we.from(s,we.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{Qn.headers[e]={}});const kb=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Db=e=>{const n={};let t,r,o;return e&&e.split(`
|
|
153
|
-
`).forEach(function(
|
|
154
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(o=>r.set(o)),r}static accessor(n){const r=(this[Ru]=this[Ru]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=Jn(i);r[s]||(Mb(o,i),r[s]=!0)}return R.isArray(n)?n.forEach(a):a(n),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(wt.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),R.freezeMethods(wt);function Ki(e,n){const t=this||Qn,r=n||t,o=wt.from(r.headers);let a=r.data;return R.forEach(e,function(s){a=s.call(t,a,o.normalize(),n?n.status:void 0)}),o.normalize(),a}function $u(e){return!!(e&&e.__CANCEL__)}function fn(e,n,t){we.call(this,e??"canceled",we.ERR_CANCELED,n,t),this.name="CanceledError"}R.inherits(fn,we,{__CANCEL__:!0});function ju(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new we("Request failed with status code "+t.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Ab(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function Pb(e,n){e=e||10;const t=new Array(e),r=new Array(e);let o=0,a=0,i;return n=n!==void 0?n:1e3,function(c){const l=Date.now(),u=r[a];i||(i=l),t[o]=c,r[o]=l;let d=a,f=0;for(;d!==o;)f+=t[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i<n)return;const m=u&&l-u;return m?Math.round(f*1e3/m):void 0}}function Ib(e,n){let t=0,r=1e3/n,o,a;const i=(l,u=Date.now())=>{t=u,o=null,a&&(clearTimeout(a),a=null),e(...l)};return[(...l)=>{const u=Date.now(),d=u-t;d>=r?i(l,u):(o=l,a||(a=setTimeout(()=>{a=null,i(o)},r-d)))},()=>o&&i(o)]}const wa=(e,n,t=3)=>{let r=0;const o=Pb(50,250);return Ib(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,c=i-r,l=o(c),u=i<=s;r=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-i)/l:void 0,event:a,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(d)},t)},Lu=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},zu=e=>(...n)=>R.asap(()=>e(...n)),Nb=ft.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,ft.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,Rb=ft.hasStandardBrowserEnv?{write(e,n,t,r,o,a){const i=[e+"="+encodeURIComponent(n)];R.isNumber(t)&&i.push("expires="+new Date(t).toGMTString()),R.isString(r)&&i.push("path="+r),R.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $b(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jb(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function Bu(e,n,t){let r=!$b(n);return e&&(r||t==!1)?jb(e,n):n}const Vu=e=>e instanceof wt?{...e}:e;function jr(e,n){n=n||{};const t={};function r(l,u,d,f){return R.isPlainObject(l)&&R.isPlainObject(u)?R.merge.call({caseless:f},l,u):R.isPlainObject(u)?R.merge({},u):R.isArray(u)?u.slice():u}function o(l,u,d,f){if(R.isUndefined(u)){if(!R.isUndefined(l))return r(void 0,l,d,f)}else return r(l,u,d,f)}function a(l,u){if(!R.isUndefined(u))return r(void 0,u)}function i(l,u){if(R.isUndefined(u)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,d){if(d in n)return r(l,u);if(d in e)return r(void 0,l)}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(l,u,d)=>o(Vu(l),Vu(u),d,!0)};return R.forEach(Object.keys({...e,...n}),function(u){const d=c[u]||o,f=d(e[u],n[u],u);R.isUndefined(f)&&d!==s||(t[u]=f)}),t}const Fu=e=>{const n=jr({},e);let{data:t,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=n;n.headers=i=wt.from(i),n.url=Au(Bu(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(R.isFormData(t)){if(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(ft.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(n)),r||r!==!1&&Nb(n.url))){const l=o&&a&&Rb.read(a);l&&i.set(o,l)}return n},Lb=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){const o=Fu(e);let a=o.data;const i=wt.from(o.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=o,u,d,f,m,g;function p(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function x(){if(!b)return;const T=wt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};ju(function(I){t(I),p()},function(I){r(I),p()},k),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new we("Request aborted",we.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new we("Network Error",we.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||Iu;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new we(D,k.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,e,b)),b=null},a===void 0&&i.setContentType(null),"setRequestHeader"in b&&R.forEach(i.toJSON(),function(D,k){b.setRequestHeader(k,D)}),R.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),s&&s!=="json"&&(b.responseType=o.responseType),l&&([f,g]=wa(l,!0),b.addEventListener("progress",f)),c&&b.upload&&([d,m]=wa(c),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(u=T=>{b&&(r(!T||T.type?new fn(null,e,b):T),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const S=Ab(o.url);if(S&&ft.protocols.indexOf(S)===-1){r(new we("Unsupported protocol "+S+":",we.ERR_BAD_REQUEST,e));return}b.send(a||null)})},zb=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let r=new AbortController,o;const a=function(l){if(!o){o=!0,s();const u=l instanceof Error?l:this.reason;r.abort(u instanceof we?u:new fn(u instanceof Error?u.message:u))}};let i=n&&setTimeout(()=>{i=null,a(new we(`timeout ${n} of ms exceeded`,we.ETIMEDOUT))},n);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>R.asap(s),c}},Bb=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,o;for(;r<t;)o=r+n,yield e.slice(r,o),r=o},Vb=async function*(e,n){for await(const t of Fb(e))yield*Bb(t,n)},Fb=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Yu=(e,n,t,r)=>{const o=Vb(e,n);let a=0,i,s=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await o.next();if(l){s(),c.close();return}let d=u.byteLength;if(t){let f=a+=d;t(f)}c.enqueue(new Uint8Array(u))}catch(l){throw s(l),l}},cancel(c){return s(c),o.return()}},{highWaterMark:2})},_a=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Hu=_a&&typeof ReadableStream=="function",Yb=_a&&(typeof TextEncoder=="function"?(e=>n=>e.encode(n))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Uu=(e,...n)=>{try{return!!e(...n)}catch{return!1}},Hb=Hu&&Uu(()=>{let e=!1;const n=new Request(ft.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n}),Wu=64*1024,Gi=Hu&&Uu(()=>R.isReadableStream(new Response("").body)),xa={stream:Gi&&(e=>e.body)};_a&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!xa[n]&&(xa[n]=R.isFunction(e[n])?t=>t[n]():(t,r)=>{throw new we(`Response type '${n}' is not supported`,we.ERR_NOT_SUPPORT,r)})})})(new Response);const Ub=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ft.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Yb(e)).byteLength},Wb=async(e,n)=>{const t=R.toFiniteNumber(e.getContentLength());return t??Ub(n)},Qi={http:pb,xhr:Lb,fetch:_a&&(async e=>{let{url:n,method:t,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Fu(e);l=l?(l+"").toLowerCase():"text";let m=zb([o,a&&a.toAbortSignal()],i),g;const p=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(c&&Hb&&t!=="get"&&t!=="head"&&(b=await Wb(u,r))!==0){let k=new Request(n,{method:"POST",body:r,duplex:"half"}),O;if(R.isFormData(r)&&(O=k.headers.get("content-type"))&&u.setContentType(O),k.body){const[I,W]=Lu(b,wa(zu(c)));r=Yu(k.body,Wu,I,W)}}R.isString(d)||(d=d?"include":"omit");const x="credentials"in Request.prototype;g=new Request(n,{...f,signal:m,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:x?d:void 0});let S=await fetch(g,f);const T=Gi&&(l==="stream"||l==="response");if(Gi&&(s||T&&p)){const k={};["status","statusText","headers"].forEach(U=>{k[U]=S[U]});const O=R.toFiniteNumber(S.headers.get("content-length")),[I,W]=s&&Lu(O,wa(zu(s),!0))||[];S=new Response(Yu(S.body,Wu,I,()=>{W&&W(),p&&p()}),k)}l=l||"text";let D=await xa[R.findKey(xa,l)||"text"](S,e);return!T&&p&&p(),await new Promise((k,O)=>{ju(k,O,{data:D,headers:wt.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:g})})}catch(x){throw p&&p(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,e,g),{cause:x.cause||x}):we.from(x,x&&x.code,e,g)}})};R.forEach(Qi,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const Zu=e=>`- ${e}`,Zb=e=>R.isFunction(e)||e===null||e===!1,qu={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:n}=e;let t,r;const o={};for(let a=0;a<n;a++){t=e[a];let i;if(r=t,!Zb(t)&&(r=Qi[(i=String(t)).toLowerCase()],r===void 0))throw new we(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=n?a.length>1?`since :
|
|
155
|
-
`+
|
|
156
|
-
`):" "+
|
|
157
|
-
`+a):r.stack=a}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=jr(this.defaults,t);const{transitional:r,paramsSerializer:o,headers:a}=t;r!==void 0&&Ca.assertOptions(r,{silentJSONParsing:rr.transitional(rr.boolean),forcedJSONParsing:rr.transitional(rr.boolean),clarifyTimeoutError:rr.transitional(rr.boolean)},!1),o!=null&&(R.isFunction(o)?t.paramsSerializer={serialize:o}:Ca.assertOptions(o,{encode:rr.function,serialize:rr.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ca.assertOptions(t,{baseUrl:rr.spelling("baseURL"),withXsrfToken:rr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=a&&R.merge(a.common,a[t.method]);a&&R.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),t.headers=wt.concat(i,a);const s=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(t)===!1||(c=c&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,f;if(!c){const g=[Ku.bind(this),void 0];for(g.unshift(...s),g.push(...l),f=g.length,u=Promise.resolve(t);d<f;)u=u.then(g[d++],g[d++]);return u}f=s.length;let m=t;for(d=0;d<f;){const g=s[d++],p=s[d++];try{m=g(m)}catch(b){p.call(this,b);break}}try{u=Ku.call(this,m)}catch(g){return Promise.reject(g)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}getUri(n){n=jr(this.defaults,n);const t=Bu(n.baseURL,n.url,n.allowAbsoluteUrls);return Au(t,n.params,n.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(n){Lr.prototype[n]=function(t,r){return this.request(jr(r||{},{method:n,url:t,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(n){function t(r){return function(a,i,s){return this.request(jr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Lr.prototype[n]=t(),Lr.prototype[n+"Form"]=t(!0)});let Kb=class Zf{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},n(function(a,i,s){r.reason||(r.reason=new fn(a,i,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new Zf(function(o){n=o}),cancel:n}}};function Gb(e){return function(t){return e.apply(null,t)}}function Qb(e){return R.isObject(e)&&e.isAxiosError===!0}const Xi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xi).forEach(([e,n])=>{Xi[n]=e});function Ju(e){const n=new Lr(e),t=gu(Lr.prototype.request,n);return R.extend(t,Lr.prototype,n,{allOwnKeys:!0}),R.extend(t,n,null,{allOwnKeys:!0}),t.create=function(o){return Ju(jr(e,o))},t}const Je=Ju(Qn);Je.Axios=Lr,Je.CanceledError=fn,Je.CancelToken=Kb,Je.isCancel=$u,Je.VERSION=Gu,Je.toFormData=ya,Je.AxiosError=we,Je.Cancel=Je.CanceledError,Je.all=function(n){return Promise.all(n)},Je.spread=Gb,Je.isAxiosError=Qb,Je.mergeConfig=jr,Je.AxiosHeaders=wt,Je.formToJSON=e=>Nu(R.isHTMLForm(e)?new FormData(e):e),Je.getAdapter=qu.getAdapter,Je.HttpStatusCode=Xi,Je.default=Je;const{Axios:Ck,AxiosError:kk,CanceledError:Dk,isCancel:Ek,CancelToken:Tk,VERSION:Ok,all:Mk,Cancel:Ak,isAxiosError:Pk,spread:Ik,toFormData:Nk,AxiosHeaders:Rk,HttpStatusCode:$k,formToJSON:jk,getAdapter:Lk,mergeConfig:zk}=Je,Xu={token:null},Jb=e=>{Xu.token=e},zr=Je.create({headers:{"Content-Type":"application/json"}});zr.interceptors.request.use(e=>{const n=Xu.token;return n&&(e.headers.Authorization=`Bearer ${n}`),e},e=>Promise.reject(e));const ed=w.createContext(void 0),Xb=({config:e,children:n})=>(w.useEffect(()=>{e.getToken&&Jb(e.getToken)},[e.getToken]),h.jsx(ed.Provider,{value:e,children:n})),e2=()=>{const e=w.useContext(ed);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},es=()=>{const{calendarApiUrl:e}=e2(),n=async s=>{try{return(await zr.get(`${e}/ListarEventosXUsuario/${s}`)).data.map(l=>{const u=new Date(l.fechaInicio),d=new Date(l.fechaFin),f=l.solicitudRelacionada?.[0]?.nombreCliente??null;return{...l,fechaInicio:u,fechaFin:d,client:f}})}catch(c){return console.error("Error events:",c),[]}},t=async(s,c)=>{try{const l=await zr.post(`${e}/InsertarEvento/${c}`,s);return{...l.data,fechaInicio:new Date(l.data.fechaInicio),fechaFin:new Date(l.data.fechaFin)}}catch(l){throw console.log("Error creating event:",l),l}},r=async s=>{try{const c=await zr.post(`${e}/ActualizarEvento/${s.eventoID}`,s);return{eventoID:c.data.eventoID,titulo:c.data.titulo,descripcion:c.data.descripcion,fechaInicio:new Date(c.data.fechaInicio),fechaFin:new Date(c.data.fechaFin),todoElDia:c.data.todoElDia,color:c.data.color,repetir:c.data.repetir,link:c.data.link,solID:c.data.solID,disID:c.data.disID,client:c.data.client}}catch(c){throw console.log("Error updating event:",c),c}},o=async s=>{try{const c=await zr.get(`${e}/ObtenerEvento/${s}`),l=c.data.solicitudRelacionada?.[0]?.nombreCliente||null;return{...c.data,fechaInicio:new Date(c.data.fechaInicio),fechaFin:new Date(c.data.fechaFin),client:l}}catch(c){throw console.error(`Error fetching event with ID ${s}:`,c),c}},a=async s=>{try{await zr.post(`${e}/EliminarEvento/${s}`)}catch(c){throw console.log(`Error ID ${s}:`,c),c}},i=w.useCallback(async(s,c,l,u)=>{try{const d={masNombreBD:l,usrID:u,disID:c,nombreCliente:s},m=(await zr.post(`${e}/ConsultaClientesXUsuariologgeado/`,d)).data?.data;return Array.isArray(m)?m.map(g=>({clienteID:g.clienteID,solID:g.solID,marca:g?.marca,modelo:g?.modelo,nombreCliente:g?.nombreCliente})):[]}catch(d){return console.error("Error clientes:",d),[]}},[e]);return{getEventsByUser:n,createEvent:t,updateEvent:r,getEventById:o,deleteEvent:a,getClients:i}},td=lr([h.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),h.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var Xn=e=>e.type==="checkbox",Br=e=>e instanceof Date,ht=e=>e==null;const rd=e=>typeof e=="object";var Xe=e=>!ht(e)&&!Array.isArray(e)&&rd(e)&&!Br(e),nd=e=>Xe(e)&&e.target?Xn(e.target)?e.target.checked:e.target.value:e,t2=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,od=(e,n)=>e.has(t2(n)),r2=e=>{const n=e.constructor&&e.constructor.prototype;return Xe(n)&&n.hasOwnProperty("isPrototypeOf")},ts=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function it(e){let n;const t=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)n=new Date(e);else if(!(ts&&(e instanceof Blob||r))&&(t||Xe(e)))if(n=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!r2(e))n=e;else for(const o in e)e.hasOwnProperty(o)&&(n[o]=it(e[o]));else return e;return n}var ka=e=>/^\w*$/.test(e),et=e=>e===void 0,rs=e=>Array.isArray(e)?e.filter(Boolean):[],ns=e=>rs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),re=(e,n,t)=>{if(!n||!Xe(e))return t;const r=(ka(n)?[n]:ns(n)).reduce((o,a)=>ht(o)?o:o[a],e);return et(r)||r===e?et(e[n])?t:e[n]:r},Mt=e=>typeof e=="boolean",Re=(e,n,t)=>{let r=-1;const o=ka(n)?[n]:ns(n),a=o.length,i=a-1;for(;++r<a;){const s=o[r];let c=t;if(r!==i){const l=e[s];c=Xe(l)||Array.isArray(l)?l:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=c,e=e[s]}};const Da={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Yt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ad=w.createContext(null);ad.displayName="HookFormContext";const os=()=>w.useContext(ad);var id=(e,n,t,r=!0)=>{const o={defaultValues:n._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return n._proxyFormState[i]!==Yt.all&&(n._proxyFormState[i]=!r||Yt.all),t&&(t[i]=!0),e[i]}});return o};const as=typeof window<"u"?w.useLayoutEffect:w.useEffect;function n2(e){const n=os(),{control:t=n.control,disabled:r,name:o,exact:a}=e||{},[i,s]=w.useState(t._formState),c=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return as(()=>t._subscribe({name:o,formState:c.current,exact:a,callback:l=>{!r&&s({...t._formState,...l})}}),[o,r,a]),w.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>id(i,t,c.current,!1),[i,t])}var nr=e=>typeof e=="string",sd=(e,n,t,r,o)=>nr(e)?(r&&n.watch.add(e),re(t,e,o)):Array.isArray(e)?e.map(a=>(r&&n.watch.add(a),re(t,a))):(r&&(n.watchAll=!0),t),is=e=>ht(e)||!rd(e);function hr(e,n,t=new WeakSet){if(is(e)||is(n))return e===n;if(Br(e)&&Br(n))return e.getTime()===n.getTime();const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(t.has(e)||t.has(n))return!0;t.add(e),t.add(n);for(const a of r){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const s=n[a];if(Br(i)&&Br(s)||Xe(i)&&Xe(s)||Array.isArray(i)&&Array.isArray(s)?!hr(i,s,t):i!==s)return!1}}return!0}function o2(e){const n=os(),{control:t=n.control,name:r,defaultValue:o,disabled:a,exact:i,compute:s}=e||{},c=w.useRef(o),l=w.useRef(s),u=w.useRef(void 0);l.current=s;const d=w.useMemo(()=>t._getWatch(r,c.current),[t,r]),[f,m]=w.useState(l.current?l.current(d):d);return as(()=>t._subscribe({name:r,formState:{values:!0},exact:i,callback:g=>{if(!a){const p=sd(r,t._names,g.values||t._formValues,!1,c.current);if(l.current){const b=l.current(p);hr(b,u.current)||(m(b),u.current=b)}else m(p)}}}),[t,a,r,i]),w.useEffect(()=>t._removeUnmounted()),f}function a2(e){const n=os(),{name:t,disabled:r,control:o=n.control,shouldUnregister:a,defaultValue:i}=e,s=od(o._names.array,t),c=w.useMemo(()=>re(o._formValues,t,re(o._defaultValues,t,i)),[o,t,i]),l=o2({control:o,name:t,defaultValue:c,exact:!0}),u=n2({control:o,name:t,exact:!0}),d=w.useRef(e),f=w.useRef(o.register(t,{...e.rules,value:l,...Mt(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const m=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!re(u.errors,t)},isDirty:{enumerable:!0,get:()=>!!re(u.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!re(u.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!re(u.validatingFields,t)},error:{enumerable:!0,get:()=>re(u.errors,t)}}),[u,t]),g=w.useCallback(S=>f.current.onChange({target:{value:nd(S),name:t},type:Da.CHANGE}),[t]),p=w.useCallback(()=>f.current.onBlur({target:{value:re(o._formValues,t),name:t},type:Da.BLUR}),[t,o._formValues]),b=w.useCallback(S=>{const T=re(o._fields,t);T&&S&&(T._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:D=>S.setCustomValidity(D),reportValidity:()=>S.reportValidity()})},[o._fields,t]),x=w.useMemo(()=>({name:t,value:l,...Mt(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:g,onBlur:p,ref:b}),[t,r,u.disabled,g,p,b,l]);return w.useEffect(()=>{const S=o._options.shouldUnregister||a;o.register(t,{...d.current.rules,...Mt(d.current.disabled)?{disabled:d.current.disabled}:{}});const T=(D,k)=>{const O=re(o._fields,D);O&&O._f&&(O._f.mount=k)};if(T(t,!0),S){const D=it(re(o._options.defaultValues,t));Re(o._defaultValues,t,D),et(re(o._formValues,t))&&Re(o._formValues,t,D)}return!s&&o.register(t),()=>{(s?S&&!o._state.action:S)?o.unregister(t):T(t,!1)}},[t,o,s,a]),w.useEffect(()=>{o._setDisabledField({disabled:r,name:t})},[r,t,o]),w.useMemo(()=>({field:x,formState:u,fieldState:m}),[x,u,m])}const mt=e=>e.render(a2(e));var ss=(e,n,t,r,o)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[r]:o||!0}}:{},eo=e=>Array.isArray(e)?e:[e],cd=()=>{let e=[];return{get observers(){return e},next:o=>{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}},_t=e=>Xe(e)&&!Object.keys(e).length,cs=e=>e.type==="file",Ht=e=>typeof e=="function",Ea=e=>{if(!ts)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},ld=e=>e.type==="select-multiple",ls=e=>e.type==="radio",i2=e=>ls(e)||Xn(e),us=e=>Ea(e)&&e.isConnected;function s2(e,n){const t=n.slice(0,-1).length;let r=0;for(;r<t;)e=et(e)?r++:e[n[r++]];return e}function c2(e){for(const n in e)if(e.hasOwnProperty(n)&&!et(e[n]))return!1;return!0}function ot(e,n){const t=Array.isArray(n)?n:ka(n)?[n]:ns(n),r=t.length===1?e:s2(e,t),o=t.length-1,a=t[o];return r&&delete r[a],o!==0&&(Xe(r)&&_t(r)||Array.isArray(r)&&c2(r))&&ot(e,t.slice(0,-1)),e}var ud=e=>{for(const n in e)if(Ht(e[n]))return!0;return!1};function Ta(e,n={}){const t=Array.isArray(e);if(Xe(e)||t)for(const r in e)Array.isArray(e[r])||Xe(e[r])&&!ud(e[r])?(n[r]=Array.isArray(e[r])?[]:{},Ta(e[r],n[r])):ht(e[r])||(n[r]=!0);return n}function dd(e,n,t){const r=Array.isArray(e);if(Xe(e)||r)for(const o in e)Array.isArray(e[o])||Xe(e[o])&&!ud(e[o])?et(n)||is(t[o])?t[o]=Array.isArray(e[o])?Ta(e[o],[]):{...Ta(e[o])}:dd(e[o],ht(n)?{}:n[o],t[o]):t[o]=!hr(e[o],n[o]);return t}var to=(e,n)=>dd(e,n,Ta(n));const fd={value:!1,isValid:!1},pd={value:!0,isValid:!0};var hd=e=>{if(Array.isArray(e)){if(e.length>1){const n=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:n,isValid:!!n.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!et(e[0].attributes.value)?et(e[0].value)||e[0].value===""?pd:{value:e[0].value,isValid:!0}:pd:fd}return fd},md=(e,{valueAsNumber:n,valueAsDate:t,setValueAs:r})=>et(e)?e:n?e===""?NaN:e&&+e:t&&nr(e)?new Date(e):r?r(e):e;const gd={isValid:!1,value:null};var vd=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,gd):gd;function yd(e){const n=e.ref;return cs(n)?n.files:ls(n)?vd(e.refs).value:ld(n)?[...n.selectedOptions].map(({value:t})=>t):Xn(n)?hd(e.refs).value:md(et(n.value)?e.ref.value:n.value,e)}var l2=(e,n,t,r)=>{const o={};for(const a of e){const i=re(n,a);i&&Re(o,a,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:r}},Oa=e=>e instanceof RegExp,ro=e=>et(e)?e:Oa(e)?e.source:Xe(e)?Oa(e.value)?e.value.source:e.value:e,bd=e=>({isOnSubmit:!e||e===Yt.onSubmit,isOnBlur:e===Yt.onBlur,isOnChange:e===Yt.onChange,isOnAll:e===Yt.all,isOnTouch:e===Yt.onTouched});const wd="AsyncFunction";var u2=e=>!!e&&!!e.validate&&!!(Ht(e.validate)&&e.validate.constructor.name===wd||Xe(e.validate)&&Object.values(e.validate).find(n=>n.constructor.name===wd)),d2=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),_d=(e,n,t)=>!t&&(n.watchAll||n.watch.has(e)||[...n.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const no=(e,n,t,r)=>{for(const o of t||Object.keys(e)){const a=re(e,o);if(a){const{_f:i,...s}=a;if(i){if(i.refs&&i.refs[0]&&n(i.refs[0],o)&&!r)return!0;if(i.ref&&n(i.ref,i.name)&&!r)return!0;if(no(s,n))break}else if(Xe(s)&&no(s,n))break}}};function xd(e,n,t){const r=re(e,t);if(r||ka(t))return{error:r,name:t};const o=t.split(".");for(;o.length;){const a=o.join("."),i=re(n,a),s=re(e,a);if(i&&!Array.isArray(i)&&t!==a)return{name:t};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};o.pop()}return{name:t}}var f2=(e,n,t,r)=>{t(e);const{name:o,...a}=e;return _t(a)||Object.keys(a).length>=Object.keys(n).length||Object.keys(a).find(i=>n[i]===(!r||Yt.all))},p2=(e,n,t)=>!e||!n||e===n||eo(e).some(r=>r&&(t?r===n:r.startsWith(n)||n.startsWith(r))),h2=(e,n,t,r,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(n||e):(t?r.isOnBlur:o.isOnBlur)?!e:(t?r.isOnChange:o.isOnChange)?e:!0,m2=(e,n)=>!rs(re(e,n)).length&&ot(e,n),g2=(e,n,t)=>{const r=eo(re(e,t));return Re(r,"root",n[t]),Re(e,t,r),e},Ma=e=>nr(e);function Sd(e,n,t="validate"){if(Ma(e)||Array.isArray(e)&&e.every(Ma)||Mt(e)&&!e)return{type:t,message:Ma(e)?e:"",ref:n}}var pn=e=>Xe(e)&&!Oa(e)?e:{value:e,message:""},Cd=async(e,n,t,r,o,a)=>{const{ref:i,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:m,validate:g,name:p,valueAsNumber:b,mount:x}=e._f,S=re(t,p);if(!x||n.has(p))return{};const T=s?s[0]:i,D=v=>{o&&T.reportValidity&&(T.setCustomValidity(Mt(v)?"":v||""),T.reportValidity())},k={},O=ls(i),I=Xn(i),W=O||I,U=(b||cs(i))&&et(i.value)&&et(S)||Ea(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,$=ss.bind(null,p,r,k),Q=(v,M,P,H=pr.maxLength,Y=pr.minLength)=>{const ee=v?M:P;k[p]={type:v?H:Y,message:ee,ref:i,...$(v?H:Y,ee)}};if(a?!Array.isArray(S)||!S.length:c&&(!W&&(U||ht(S))||Mt(S)&&!S||I&&!hd(s).isValid||O&&!vd(s).isValid)){const{value:v,message:M}=Ma(c)?{value:!!c,message:c}:pn(c);if(v&&(k[p]={type:pr.required,message:M,ref:T,...$(pr.required,M)},!r))return D(M),k}if(!U&&(!ht(d)||!ht(f))){let v,M;const P=pn(f),H=pn(d);if(!ht(S)&&!isNaN(S)){const Y=i.valueAsNumber||S&&+S;ht(P.value)||(v=Y>P.value),ht(H.value)||(M=Y<H.value)}else{const Y=i.valueAsDate||new Date(S),ee=z=>new Date(new Date().toDateString()+" "+z),ae=i.type=="time",be=i.type=="week";nr(P.value)&&S&&(v=ae?ee(S)>ee(P.value):be?S>P.value:Y>new Date(P.value)),nr(H.value)&&S&&(M=ae?ee(S)<ee(H.value):be?S<H.value:Y<new Date(H.value))}if((v||M)&&(Q(!!v,P.message,H.message,pr.max,pr.min),!r))return D(k[p].message),k}if((l||u)&&!U&&(nr(S)||a&&Array.isArray(S))){const v=pn(l),M=pn(u),P=!ht(v.value)&&S.length>+v.value,H=!ht(M.value)&&S.length<+M.value;if((P||H)&&(Q(P,v.message,M.message),!r))return D(k[p].message),k}if(m&&!U&&nr(S)){const{value:v,message:M}=pn(m);if(Oa(v)&&!S.match(v)&&(k[p]={type:pr.pattern,message:M,ref:i,...$(pr.pattern,M)},!r))return D(M),k}if(g){if(Ht(g)){const v=await g(S,t),M=Sd(v,T);if(M&&(k[p]={...M,...$(pr.validate,M.message)},!r))return D(M.message),k}else if(Xe(g)){let v={};for(const M in g){if(!_t(v)&&!r)break;const P=Sd(await g[M](S,t),T,M);P&&(v={...P,...$(M,P.message)},D(P.message),r&&(k[p]=v))}if(!_t(v)&&(k[p]={ref:T,...v},!r))return k}}return D(!0),k};const v2={mode:Yt.onSubmit,reValidateMode:Yt.onChange,shouldFocusError:!0};function y2(e={}){let n={...v2,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ht(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},o=Xe(n.defaultValues)||Xe(n.values)?it(n.defaultValues||n.values)||{}:{},a=n.shouldUnregister?{}:it(o),i={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:cd(),state:cd()},m=n.criteriaMode===Yt.all,g=C=>A=>{clearTimeout(l),l=setTimeout(C,A)},p=async C=>{if(!n.disabled&&(u.isValid||d.isValid||C)){const A=n.resolver?_t((await I()).errors):await U(r,!0);A!==t.isValid&&f.state.next({isValid:A})}},b=(C,A)=>{!n.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((C||Array.from(s.mount)).forEach(L=>{L&&(A?Re(t.validatingFields,L,A):ot(t.validatingFields,L))}),f.state.next({validatingFields:t.validatingFields,isValidating:!_t(t.validatingFields)}))},x=(C,A=[],L,oe,X=!0,J=!0)=>{if(oe&&L&&!n.disabled){if(i.action=!0,J&&Array.isArray(re(r,C))){const le=L(re(r,C),oe.argA,oe.argB);X&&Re(r,C,le)}if(J&&Array.isArray(re(t.errors,C))){const le=L(re(t.errors,C),oe.argA,oe.argB);X&&Re(t.errors,C,le),m2(t.errors,C)}if((u.touchedFields||d.touchedFields)&&J&&Array.isArray(re(t.touchedFields,C))){const le=L(re(t.touchedFields,C),oe.argA,oe.argB);X&&Re(t.touchedFields,C,le)}(u.dirtyFields||d.dirtyFields)&&(t.dirtyFields=to(o,a)),f.state.next({name:C,isDirty:Q(C,A),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else Re(a,C,A)},S=(C,A)=>{Re(t.errors,C,A),f.state.next({errors:t.errors})},T=C=>{t.errors=C,f.state.next({errors:t.errors,isValid:!1})},D=(C,A,L,oe)=>{const X=re(r,C);if(X){const J=re(a,C,et(L)?re(o,C):L);et(J)||oe&&oe.defaultChecked||A?Re(a,C,A?J:yd(X._f)):P(C,J),i.mount&&p()}},k=(C,A,L,oe,X)=>{let J=!1,le=!1;const De={name:C};if(!n.disabled){if(!L||oe){(u.isDirty||d.isDirty)&&(le=t.isDirty,t.isDirty=De.isDirty=Q(),J=le!==De.isDirty);const Le=hr(re(o,C),A);le=!!re(t.dirtyFields,C),Le?ot(t.dirtyFields,C):Re(t.dirtyFields,C,!0),De.dirtyFields=t.dirtyFields,J=J||(u.dirtyFields||d.dirtyFields)&&le!==!Le}if(L){const Le=re(t.touchedFields,C);Le||(Re(t.touchedFields,C,L),De.touchedFields=t.touchedFields,J=J||(u.touchedFields||d.touchedFields)&&Le!==L)}J&&X&&f.state.next(De)}return J?De:{}},O=(C,A,L,oe)=>{const X=re(t.errors,C),J=(u.isValid||d.isValid)&&Mt(A)&&t.isValid!==A;if(n.delayError&&L?(c=g(()=>S(C,L)),c(n.delayError)):(clearTimeout(l),c=null,L?Re(t.errors,C,L):ot(t.errors,C)),(L?!hr(X,L):X)||!_t(oe)||J){const le={...oe,...J&&Mt(A)?{isValid:A}:{},errors:t.errors,name:C};t={...t,...le},f.state.next(le)}},I=async C=>{b(C,!0);const A=await n.resolver(a,n.context,l2(C||s.mount,r,n.criteriaMode,n.shouldUseNativeValidation));return b(C),A},W=async C=>{const{errors:A}=await I(C);if(C)for(const L of C){const oe=re(A,L);oe?Re(t.errors,L,oe):ot(t.errors,L)}else t.errors=A;return A},U=async(C,A,L={valid:!0})=>{for(const oe in C){const X=C[oe];if(X){const{_f:J,...le}=X;if(J){const De=s.array.has(J.name),Le=X._f&&u2(X._f);Le&&u.validatingFields&&b([oe],!0);const gt=await Cd(X,s.disabled,a,m,n.shouldUseNativeValidation&&!A,De);if(Le&&u.validatingFields&&b([oe]),gt[J.name]&&(L.valid=!1,A))break;!A&&(re(gt,J.name)?De?g2(t.errors,gt,J.name):Re(t.errors,J.name,gt[J.name]):ot(t.errors,J.name))}!_t(le)&&await U(le,A,L)}}return L.valid},$=()=>{for(const C of s.unMount){const A=re(r,C);A&&(A._f.refs?A._f.refs.every(L=>!us(L)):!us(A._f.ref))&&de(C)}s.unMount=new Set},Q=(C,A)=>!n.disabled&&(C&&A&&Re(a,C,A),!hr(z(),o)),v=(C,A,L)=>sd(C,s,{...i.mount?a:et(A)?o:nr(C)?{[C]:A}:A},L,A),M=C=>rs(re(i.mount?a:o,C,n.shouldUnregister?re(o,C,[]):[])),P=(C,A,L={})=>{const oe=re(r,C);let X=A;if(oe){const J=oe._f;J&&(!J.disabled&&Re(a,C,md(A,J)),X=Ea(J.ref)&&ht(A)?"":A,ld(J.ref)?[...J.ref.options].forEach(le=>le.selected=X.includes(le.value)):J.refs?Xn(J.ref)?J.refs.forEach(le=>{(!le.defaultChecked||!le.disabled)&&(Array.isArray(X)?le.checked=!!X.find(De=>De===le.value):le.checked=X===le.value||!!X)}):J.refs.forEach(le=>le.checked=le.value===X):cs(J.ref)?J.ref.value="":(J.ref.value=X,J.ref.type||f.state.next({name:C,values:it(a)})))}(L.shouldDirty||L.shouldTouch)&&k(C,X,L.shouldTouch,L.shouldDirty,!0),L.shouldValidate&&be(C)},H=(C,A,L)=>{for(const oe in A){if(!A.hasOwnProperty(oe))return;const X=A[oe],J=C+"."+oe,le=re(r,J);(s.array.has(C)||Xe(X)||le&&!le._f)&&!Br(X)?H(J,X,L):P(J,X,L)}},Y=(C,A,L={})=>{const oe=re(r,C),X=s.array.has(C),J=it(A);Re(a,C,J),X?(f.array.next({name:C,values:it(a)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&L.shouldDirty&&f.state.next({name:C,dirtyFields:to(o,a),isDirty:Q(C,J)})):oe&&!oe._f&&!ht(J)?H(C,J,L):P(C,J,L),_d(C,s)&&f.state.next({...t,name:C}),f.state.next({name:i.mount?C:void 0,values:it(a)})},ee=async C=>{i.mount=!0;const A=C.target;let L=A.name,oe=!0;const X=re(r,L),J=Le=>{oe=Number.isNaN(Le)||Br(Le)&&isNaN(Le.getTime())||hr(Le,re(a,L,Le))},le=bd(n.mode),De=bd(n.reValidateMode);if(X){let Le,gt;const Ur=A.type?yd(X._f):nd(C),ar=C.type===Da.BLUR||C.type===Da.FOCUS_OUT,Is=!d2(X._f)&&!n.resolver&&!re(t.errors,L)&&!X._f.deps||h2(ar,re(t.touchedFields,L),t.isSubmitted,De,le),lo=_d(L,s,ar);Re(a,L,Ur),ar?(!A||!A.readOnly)&&(X._f.onBlur&&X._f.onBlur(C),c&&c(0)):X._f.onChange&&X._f.onChange(C);const uo=k(L,Ur,ar),Ns=!_t(uo)||lo;if(!ar&&f.state.next({name:L,type:C.type,values:it(a)}),Is)return(u.isValid||d.isValid)&&(n.mode==="onBlur"?ar&&p():ar||p()),Ns&&f.state.next({name:L,...lo?{}:uo});if(!ar&&lo&&f.state.next({...t}),n.resolver){const{errors:Ua}=await I([L]);if(J(Ur),oe){const Rs=xd(t.errors,r,L),bn=xd(Ua,r,Rs.name||L);Le=bn.error,L=bn.name,gt=_t(Ua)}}else b([L],!0),Le=(await Cd(X,s.disabled,a,m,n.shouldUseNativeValidation))[L],b([L]),J(Ur),oe&&(Le?gt=!1:(u.isValid||d.isValid)&&(gt=await U(r,!0)));oe&&(X._f.deps&&be(X._f.deps),O(L,gt,Le,uo))}},ae=(C,A)=>{if(re(t.errors,A)&&C.focus)return C.focus(),1},be=async(C,A={})=>{let L,oe;const X=eo(C);if(n.resolver){const J=await W(et(C)?C:X);L=_t(J),oe=C?!X.some(le=>re(J,le)):L}else C?(oe=(await Promise.all(X.map(async J=>{const le=re(r,J);return await U(le&&le._f?{[J]:le}:le)}))).every(Boolean),!(!oe&&!t.isValid)&&p()):oe=L=await U(r);return f.state.next({...!nr(C)||(u.isValid||d.isValid)&&L!==t.isValid?{}:{name:C},...n.resolver||!C?{isValid:L}:{},errors:t.errors}),A.shouldFocus&&!oe&&no(r,ae,C?X:s.mount),oe},z=C=>{const A={...i.mount?a:o};return et(C)?A:nr(C)?re(A,C):C.map(L=>re(A,L))},K=(C,A)=>({invalid:!!re((A||t).errors,C),isDirty:!!re((A||t).dirtyFields,C),error:re((A||t).errors,C),isValidating:!!re(t.validatingFields,C),isTouched:!!re((A||t).touchedFields,C)}),fe=C=>{C&&eo(C).forEach(A=>ot(t.errors,A)),f.state.next({errors:C?t.errors:{}})},pe=(C,A,L)=>{const oe=(re(r,C,{_f:{}})._f||{}).ref,X=re(t.errors,C)||{},{ref:J,message:le,type:De,...Le}=X;Re(t.errors,C,{...Le,...A,ref:oe}),f.state.next({name:C,errors:t.errors,isValid:!1}),L&&L.shouldFocus&&oe&&oe.focus&&oe.focus()},he=(C,A)=>Ht(C)?f.state.subscribe({next:L=>"values"in L&&C(v(void 0,A),L)}):v(C,A,!0),G=C=>f.state.subscribe({next:A=>{p2(C.name,A.name,C.exact)&&f2(A,C.formState||u,Ha,C.reRenderRoot)&&C.callback({values:{...a},...t,...A,defaultValues:o})}}).unsubscribe,se=C=>(i.mount=!0,d={...d,...C.formState},G({...C,formState:d})),de=(C,A={})=>{for(const L of C?eo(C):s.mount)s.mount.delete(L),s.array.delete(L),A.keepValue||(ot(r,L),ot(a,L)),!A.keepError&&ot(t.errors,L),!A.keepDirty&&ot(t.dirtyFields,L),!A.keepTouched&&ot(t.touchedFields,L),!A.keepIsValidating&&ot(t.validatingFields,L),!n.shouldUnregister&&!A.keepDefaultValue&&ot(o,L);f.state.next({values:it(a)}),f.state.next({...t,...A.keepDirty?{isDirty:Q()}:{}}),!A.keepIsValid&&p()},me=({disabled:C,name:A})=>{(Mt(C)&&i.mount||C||s.disabled.has(A))&&(C?s.disabled.add(A):s.disabled.delete(A))},ye=(C,A={})=>{let L=re(r,C);const oe=Mt(A.disabled)||Mt(n.disabled);return Re(r,C,{...L||{},_f:{...L&&L._f?L._f:{ref:{name:C}},name:C,mount:!0,...A}}),s.mount.add(C),L?me({disabled:Mt(A.disabled)?A.disabled:n.disabled,name:C}):D(C,!0,A.value),{...oe?{disabled:A.disabled||n.disabled}:{},...n.progressive?{required:!!A.required,min:ro(A.min),max:ro(A.max),minLength:ro(A.minLength),maxLength:ro(A.maxLength),pattern:ro(A.pattern)}:{},name:C,onChange:ee,onBlur:ee,ref:X=>{if(X){ye(C,A),L=re(r,C);const J=et(X.value)&&X.querySelectorAll&&X.querySelectorAll("input,select,textarea")[0]||X,le=i2(J),De=L._f.refs||[];if(le?De.find(Le=>Le===J):J===L._f.ref)return;Re(r,C,{_f:{...L._f,...le?{refs:[...De.filter(us),J,...Array.isArray(re(o,C))?[{}]:[]],ref:{type:J.type,name:C}}:{ref:J}}}),D(C,!1,void 0,J)}else L=re(r,C,{}),L._f&&(L._f.mount=!1),(n.shouldUnregister||A.shouldUnregister)&&!(od(s.array,C)&&i.action)&&s.unMount.add(C)}}},B=()=>n.shouldFocusError&&no(r,ae,s.mount),te=C=>{Mt(C)&&(f.state.next({disabled:C}),no(r,(A,L)=>{const oe=re(r,L);oe&&(A.disabled=oe._f.disabled||C,Array.isArray(oe._f.refs)&&oe._f.refs.forEach(X=>{X.disabled=oe._f.disabled||C}))},0,!1))},F=(C,A)=>async L=>{let oe;L&&(L.preventDefault&&L.preventDefault(),L.persist&&L.persist());let X=it(a);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:J,values:le}=await I();t.errors=J,X=it(le)}else await U(r);if(s.disabled.size)for(const J of s.disabled)ot(X,J);if(ot(t.errors,"root"),_t(t.errors)){f.state.next({errors:{}});try{await C(X,L)}catch(J){oe=J}}else A&&await A({...t.errors},L),B(),setTimeout(B);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_t(t.errors)&&!oe,submitCount:t.submitCount+1,errors:t.errors}),oe)throw oe},ge=(C,A={})=>{re(r,C)&&(et(A.defaultValue)?Y(C,it(re(o,C))):(Y(C,A.defaultValue),Re(o,C,it(A.defaultValue))),A.keepTouched||ot(t.touchedFields,C),A.keepDirty||(ot(t.dirtyFields,C),t.isDirty=A.defaultValue?Q(C,it(re(o,C))):Q()),A.keepError||(ot(t.errors,C),u.isValid&&p()),f.state.next({...t}))},Fe=(C,A={})=>{const L=C?it(C):o,oe=it(L),X=_t(C),J=X?o:oe;if(A.keepDefaultValues||(o=L),!A.keepValues){if(A.keepDirtyValues){const le=new Set([...s.mount,...Object.keys(to(o,a))]);for(const De of Array.from(le))re(t.dirtyFields,De)?Re(J,De,re(a,De)):Y(De,re(J,De))}else{if(ts&&et(C))for(const le of s.mount){const De=re(r,le);if(De&&De._f){const Le=Array.isArray(De._f.refs)?De._f.refs[0]:De._f.ref;if(Ea(Le)){const gt=Le.closest("form");if(gt){gt.reset();break}}}}if(A.keepFieldsRef)for(const le of s.mount)Y(le,re(J,le));else r={}}a=n.shouldUnregister?A.keepDefaultValues?it(o):{}:it(J),f.array.next({values:{...J}}),f.state.next({values:{...J}})}s={mount:A.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!u.isValid||!!A.keepIsValid||!!A.keepDirtyValues,i.watch=!!n.shouldUnregister,f.state.next({submitCount:A.keepSubmitCount?t.submitCount:0,isDirty:X?!1:A.keepDirty?t.isDirty:!!(A.keepDefaultValues&&!hr(C,o)),isSubmitted:A.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:X?{}:A.keepDirtyValues?A.keepDefaultValues&&a?to(o,a):t.dirtyFields:A.keepDefaultValues&&C?to(o,C):A.keepDirty?t.dirtyFields:{},touchedFields:A.keepTouched?t.touchedFields:{},errors:A.keepErrors?t.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},or=(C,A)=>Fe(Ht(C)?C(a):C,A),Yr=(C,A={})=>{const L=re(r,C),oe=L&&L._f;if(oe){const X=oe.refs?oe.refs[0]:oe.ref;X.focus&&(X.focus(),A.shouldSelect&&Ht(X.select)&&X.select())}},Ha=C=>{t={...t,...C}},Hr={control:{register:ye,unregister:de,getFieldState:K,handleSubmit:F,setError:pe,_subscribe:G,_runSchema:I,_focusError:B,_getWatch:v,_getDirty:Q,_setValid:p,_setFieldArray:x,_setDisabledField:me,_setErrors:T,_getFieldArray:M,_reset:Fe,_resetDefaultValues:()=>Ht(n.defaultValues)&&n.defaultValues().then(C=>{or(C,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:$,_disableForm:te,_subjects:f,_proxyFormState:u,get _fields(){return r},get _formValues(){return a},get _state(){return i},set _state(C){i=C},get _defaultValues(){return o},get _names(){return s},set _names(C){s=C},get _formState(){return t},get _options(){return n},set _options(C){n={...n,...C}}},subscribe:se,trigger:be,register:ye,handleSubmit:F,watch:he,setValue:Y,getValues:z,reset:or,resetField:ge,clearErrors:fe,unregister:de,setError:pe,setFocus:Yr,getFieldState:K};return{...Hr,formControl:Hr}}function kd(e={}){const n=w.useRef(void 0),t=w.useRef(void 0),[r,o]=w.useState({isDirty:!1,isValidating:!1,isLoading:Ht(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ht(e.defaultValues)?void 0:e.defaultValues});if(!n.current)if(e.formControl)n.current={...e.formControl,formState:r},e.defaultValues&&!Ht(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...s}=y2(e);n.current={...s,formState:r}}const a=n.current.control;return a._options=e,as(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>o({...a._formState}),reRenderRoot:!0});return o(s=>({...s,isReady:!0})),a._formState.isReady=!0,i},[a]),w.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),w.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),w.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),w.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==r.isDirty&&a._subjects.state.next({isDirty:i})}},[a,r.isDirty]),w.useEffect(()=>{e.values&&!hr(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),t.current=e.values,o(i=>({...i}))):a._resetDefaultValues()},[a,e.values]),w.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),n.current.formState=id(r,a),n.current}const Dd=(e,n,t)=>{if(e&&"reportValidity"in e){const r=re(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ds=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?Dd(r.ref,t,e):r&&r.refs&&r.refs.forEach(o=>Dd(o,t,e))}},Ed=(e,n)=>{n.shouldUseNativeValidation&&ds(e,n);const t={};for(const r in e){const o=re(n.fields,r),a=Object.assign(e[r]||{},{ref:o&&o.ref});if(b2(n.names||Object.keys(e),r)){const i=Object.assign({},re(t,r));Re(i,"root",a),Re(t,r,i)}else Re(t,r,a)}return t},b2=(e,n)=>{const t=Td(n);return e.some(r=>Td(r).match(`^${t}\\.\\d+`))};function Td(e){return e.replace(/\]|\[/g,"")}function V(e,n,t){function r(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(e),n(s,c);for(const u in i.prototype)u in s||Object.defineProperty(s,u,{value:i.prototype[u].bind(s)});s._zod.constr=i,s._zod.def=c}const o=t?.Parent??Object;class a extends o{}Object.defineProperty(a,"name",{value:e});function i(s){var c;const l=t?.Parent?new a:this;r(l,s),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:s=>t?.Parent&&s instanceof t.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class hn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Od extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Md={};function Vr(e){return Md}function w2(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function fs(e,n){return typeof n=="bigint"?n.toString():n}function ps(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function hs(e){return e==null}function ms(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function _2(e,n){const t=(e.toString().split(".")[1]||"").length,r=n.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const a=t>o?t:o,i=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(n.toFixed(a).replace(".",""));return i%s/10**a}const Ad=Symbol("evaluating");function Ve(e,n,t){let r;Object.defineProperty(e,n,{get(){if(r!==Ad)return r===void 0&&(r=Ad,r=t()),r},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function x2(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function kr(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function mn(...e){const n={};for(const t of e){const r=Object.getOwnPropertyDescriptors(t);Object.assign(n,r)}return Object.defineProperties({},n)}function Pd(e){return JSON.stringify(e)}const Id="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Aa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const S2=ps(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function oo(e){if(Aa(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(Aa(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function Nd(e){return oo(e)?{...e}:e}const C2=new Set(["string","number","symbol"]);function gn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Dr(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t?.parent)&&(r._zod.parent=e),r}function ue(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function k2(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const D2={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function E2(e,n){const t=e._zod.def,r=mn(e._zod.def,{get shape(){const o={};for(const a in n){if(!(a in t.shape))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=t.shape[a])}return kr(this,"shape",o),o},checks:[]});return Dr(e,r)}function T2(e,n){const t=e._zod.def,r=mn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const a in n){if(!(a in t.shape))throw new Error(`Unrecognized key: "${a}"`);n[a]&&delete o[a]}return kr(this,"shape",o),o},checks:[]});return Dr(e,r)}function O2(e,n){if(!oo(n))throw new Error("Invalid input to extend: expected a plain object");const t=e._zod.def.checks;if(t&&t.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=mn(e._zod.def,{get shape(){const a={...e._zod.def.shape,...n};return kr(this,"shape",a),a},checks:[]});return Dr(e,o)}function M2(e,n){if(!oo(n))throw new Error("Invalid input to safeExtend: expected a plain object");const t={...e._zod.def,get shape(){const r={...e._zod.def.shape,...n};return kr(this,"shape",r),r},checks:e._zod.def.checks};return Dr(e,t)}function A2(e,n){const t=mn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return kr(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return Dr(e,t)}function P2(e,n,t){const r=mn(n._zod.def,{get shape(){const o=n._zod.def.shape,a={...o};if(t)for(const i in t){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)a[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return kr(this,"shape",a),a},checks:[]});return Dr(n,r)}function I2(e,n,t){const r=mn(n._zod.def,{get shape(){const o=n._zod.def.shape,a={...o};if(t)for(const i in t){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)a[i]=new e({type:"nonoptional",innerType:o[i]});return kr(this,"shape",a),a},checks:[]});return Dr(n,r)}function vn(e,n=0){if(e.aborted===!0)return!0;for(let t=n;t<e.issues.length;t++)if(e.issues[t]?.continue!==!0)return!0;return!1}function Rd(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function Pa(e){return typeof e=="string"?e:e?.message}function Fr(e,n,t){const r={...e,path:e.path??[]};if(!e.message){const o=Pa(e.inst?._zod.def?.error?.(e))??Pa(n?.error?.(e))??Pa(t.customError?.(e))??Pa(t.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function gs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ao(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const $d=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,fs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},vs=V("$ZodError",$d),Ia=V("$ZodError",$d,{Parent:Error});function N2(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function R2(e,n){const t=n||function(a){return a.message},r={_errors:[]},o=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let s=r,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(i))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(e),r}const Na=e=>(n,t,r,o)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},i=n._zod.run({value:t,issues:[]},a);if(i instanceof Promise)throw new hn;if(i.issues.length){const s=new(o?.Err??e)(i.issues.map(c=>Fr(c,a,Vr())));throw Id(s,o?.callee),s}return i.value},$2=Na(Ia),Ra=e=>async(n,t,r,o)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const s=new(o?.Err??e)(i.issues.map(c=>Fr(c,a,Vr())));throw Id(s,o?.callee),s}return i.value},j2=Ra(Ia),$a=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},a=n._zod.run({value:t,issues:[]},o);if(a instanceof Promise)throw new hn;return a.issues.length?{success:!1,error:new(e??vs)(a.issues.map(i=>Fr(i,o,Vr())))}:{success:!0,data:a.value}},L2=$a(Ia),ja=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let a=n._zod.run({value:t,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>Fr(i,o,Vr())))}:{success:!0,data:a.value}},z2=ja(Ia),B2=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Na(e)(n,t,o)},V2=e=>(n,t,r)=>Na(e)(n,t,r),F2=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ra(e)(n,t,o)},Y2=e=>async(n,t,r)=>Ra(e)(n,t,r),H2=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $a(e)(n,t,o)},U2=e=>(n,t,r)=>$a(e)(n,t,r),W2=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ja(e)(n,t,o)},Z2=e=>async(n,t,r)=>ja(e)(n,t,r),q2=/^[cC][^\s-]{8,}$/,K2=/^[0-9a-z]+$/,G2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Q2=/^[0-9a-vA-V]{20}$/,J2=/^[A-Za-z0-9]{27}$/,X2=/^[a-zA-Z0-9_-]{21}$/,e1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jd=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,r1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,n1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function o1(){return new RegExp(n1,"u")}const a1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,i1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,s1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,c1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,l1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ld=/^[A-Za-z0-9_-]*$/,u1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,d1=/^\+(?:[0-9]){6,14}[0-9]$/,zd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",f1=new RegExp(`^${zd}$`);function Bd(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function p1(e){return new RegExp(`^${Bd(e)}$`)}function h1(e){const n=Bd({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${zd}T(?:${r})$`)}const m1=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},g1=/^\d+$/,v1=/^-?\d+(?:\.\d+)?/i,y1=/true|false/i,b1=/^[^A-Z]*$/,w1=/^[^a-z]*$/,xt=V("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),Vd={number:"number",bigint:"bigint",object:"date"},Fd=V("$ZodCheckLessThan",(e,n)=>{xt.init(e,n);const t=Vd[typeof n.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<a&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:t,code:"too_big",maximum:n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Yd=V("$ZodCheckGreaterThan",(e,n)=>{xt.init(e,n);const t=Vd[typeof n.value];e._zod.onattach.push(r=>{const o=r._zod.bag,a=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>a&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:t,code:"too_small",minimum:n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),_1=V("$ZodCheckMultipleOf",(e,n)=>{xt.init(e,n),e._zod.onattach.push(t=>{var r;(r=t._zod.bag).multipleOf??(r.multipleOf=n.value)}),e._zod.check=t=>{if(typeof t.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?t.value%n.value===BigInt(0):_2(t.value,n.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:n.value,input:t.value,inst:e,continue:!n.abort})}}),x1=V("$ZodCheckNumberFormat",(e,n)=>{xt.init(e,n),n.format=n.format||"float64";const t=n.format?.includes("int"),r=t?"int":"number",[o,a]=D2[n.format];e._zod.onattach.push(i=>{const s=i._zod.bag;s.format=n.format,s.minimum=o,s.maximum=a,t&&(s.pattern=g1)}),e._zod.check=i=>{const s=i.value;if(t){if(!Number.isInteger(s)){i.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?i.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!n.abort}):i.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!n.abort});return}}s<o&&i.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!n.abort}),s>a&&i.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inst:e})}}),S1=V("$ZodCheckMaxLength",(e,n)=>{var t;xt.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!hs(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const i=gs(o);r.issues.push({origin:i,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),C1=V("$ZodCheckMinLength",(e,n)=>{var t;xt.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!hs(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const i=gs(o);r.issues.push({origin:i,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),k1=V("$ZodCheckLengthEquals",(e,n)=>{var t;xt.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!hs(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,a=o.length;if(a===n.length)return;const i=gs(o),s=a>n.length;r.issues.push({origin:i,...s?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),La=V("$ZodCheckStringFormat",(e,n)=>{var t,r;xt.init(e,n),e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=n.format,n.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),D1=V("$ZodCheckRegex",(e,n)=>{La.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),E1=V("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=b1),La.init(e,n)}),T1=V("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=w1),La.init(e,n)}),O1=V("$ZodCheckIncludes",(e,n)=>{xt.init(e,n);const t=gn(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const a=o._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),M1=V("$ZodCheckStartsWith",(e,n)=>{xt.init(e,n);const t=new RegExp(`^${gn(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),A1=V("$ZodCheckEndsWith",(e,n)=>{xt.init(e,n);const t=new RegExp(`.*${gn(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),P1=V("$ZodCheckOverwrite",(e,n)=>{xt.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class I1{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
158
|
-
`).filter(
|
|
159
|
-
`))}}const
|
|
152
|
+
*/const Gv=Un("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),au=Symbol.for("constructDateFrom");function Ba(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&au in e?e[au](n):e instanceof Date?new e.constructor(n):new Date(n)}function kr(e,n){return Ba(n||e,e)}function su(e,n,t){const[r,o]=[+kr(e.start,t?.in),+kr(e.end,t?.in)].sort((s,c)=>s-c),[i,a]=[+kr(n.start,t?.in),+kr(n.end,t?.in)].sort((s,c)=>s-c);return r<a&&i<o}function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},di(e)}var Qv=/^\s+/,Jv=/\s+$/;function se(e,n){if(e=e||"",n=n||{},e instanceof se)return e;if(!(this instanceof se))return new se(e,n);var t=Xv(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||t.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}se.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),t,r,o,i,a,s;return t=n.r/255,r=n.g/255,o=n.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*a+.0722*s},setAlpha:function(n){return this._a=pu(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=lu(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=lu(this._r,this._g,this._b),t=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+o+"%)":"hsva("+t+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=cu(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=cu(this._r,this._g,this._b),t=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+o+"%)":"hsla("+t+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return uu(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return ny(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(We(this._r,255)*100)+"%",g:Math.round(We(this._g,255)*100)+"%",b:Math.round(We(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(We(this._r,255)*100)+"%, "+Math.round(We(this._g,255)*100)+"%, "+Math.round(We(this._b,255)*100)+"%)":"rgba("+Math.round(We(this._r,255)*100)+"%, "+Math.round(We(this._g,255)*100)+"%, "+Math.round(We(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:my[uu(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var t="#"+du(this._r,this._g,this._b,this._a),r=t,o=this._gradientType?"GradientType = 1, ":"";if(n){var i=se(n);r="#"+du(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+r+")"},toString:function(n){var t=!!n;n=n||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!t&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return se(this.toString())},_applyModification:function(n,t){var r=n.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(sy,arguments)},brighten:function(){return this._applyModification(cy,arguments)},darken:function(){return this._applyModification(ly,arguments)},desaturate:function(){return this._applyModification(oy,arguments)},saturate:function(){return this._applyModification(iy,arguments)},greyscale:function(){return this._applyModification(ay,arguments)},spin:function(){return this._applyModification(uy,arguments)},_applyCombination:function(n,t){return n.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(py,arguments)},complement:function(){return this._applyCombination(dy,arguments)},monochromatic:function(){return this._applyCombination(hy,arguments)},splitcomplement:function(){return this._applyCombination(fy,arguments)},triad:function(){return this._applyCombination(fu,[3])},tetrad:function(){return this._applyCombination(fu,[4])}},se.fromRatio=function(e,n){if(di(e)=="object"){var t={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?t[r]=e[r]:t[r]=Wn(e[r]));e=t}return se(e,n)};function Xv(e){var n={r:0,g:0,b:0},t=1,r=null,o=null,i=null,a=!1,s=!1;return typeof e=="string"&&(e=by(e)),di(e)=="object"&&(pr(e.r)&&pr(e.g)&&pr(e.b)?(n=ey(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):pr(e.h)&&pr(e.s)&&pr(e.v)?(r=Wn(e.s),o=Wn(e.v),n=ry(e.h,r,o),a=!0,s="hsv"):pr(e.h)&&pr(e.s)&&pr(e.l)&&(r=Wn(e.s),i=Wn(e.l),n=ty(e.h,r,i),a=!0,s="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=pu(t),{ok:a,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:t}}function ey(e,n,t){return{r:We(e,255)*255,g:We(n,255)*255,b:We(t,255)*255}}function cu(e,n,t){e=We(e,255),n=We(n,255),t=We(t,255);var r=Math.max(e,n,t),o=Math.min(e,n,t),i,a,s=(r+o)/2;if(r==o)i=a=0;else{var c=r-o;switch(a=s>.5?c/(2-r-o):c/(r+o),r){case e:i=(n-t)/c+(n<t?6:0);break;case n:i=(t-e)/c+2;break;case t:i=(e-n)/c+4;break}i/=6}return{h:i,s:a,l:s}}function ty(e,n,t){var r,o,i;e=We(e,360),n=We(n,100),t=We(t,100);function a(l,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(u-l)*6*d:d<1/2?u:d<2/3?l+(u-l)*(2/3-d)*6:l}if(n===0)r=o=i=t;else{var s=t<.5?t*(1+n):t+n-t*n,c=2*t-s;r=a(c,s,e+1/3),o=a(c,s,e),i=a(c,s,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function lu(e,n,t){e=We(e,255),n=We(n,255),t=We(t,255);var r=Math.max(e,n,t),o=Math.min(e,n,t),i,a,s=r,c=r-o;if(a=r===0?0:c/r,r==o)i=0;else{switch(r){case e:i=(n-t)/c+(n<t?6:0);break;case n:i=(t-e)/c+2;break;case t:i=(e-n)/c+4;break}i/=6}return{h:i,s:a,v:s}}function ry(e,n,t){e=We(e,360)*6,n=We(n,100),t=We(t,100);var r=Math.floor(e),o=e-r,i=t*(1-n),a=t*(1-o*n),s=t*(1-(1-o)*n),c=r%6,l=[t,a,i,i,s,t][c],u=[s,t,t,a,i,i][c],d=[i,i,s,t,t,a][c];return{r:l*255,g:u*255,b:d*255}}function uu(e,n,t,r){var o=[Vt(Math.round(e).toString(16)),Vt(Math.round(n).toString(16)),Vt(Math.round(t).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function ny(e,n,t,r,o){var i=[Vt(Math.round(e).toString(16)),Vt(Math.round(n).toString(16)),Vt(Math.round(t).toString(16)),Vt(hu(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function du(e,n,t,r){var o=[Vt(hu(r)),Vt(Math.round(e).toString(16)),Vt(Math.round(n).toString(16)),Vt(Math.round(t).toString(16))];return o.join("")}se.equals=function(e,n){return!e||!n?!1:se(e).toRgbString()==se(n).toRgbString()},se.random=function(){return se.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function oy(e,n){n=n===0?0:n||10;var t=se(e).toHsl();return t.s-=n/100,t.s=fi(t.s),se(t)}function iy(e,n){n=n===0?0:n||10;var t=se(e).toHsl();return t.s+=n/100,t.s=fi(t.s),se(t)}function ay(e){return se(e).desaturate(100)}function sy(e,n){n=n===0?0:n||10;var t=se(e).toHsl();return t.l+=n/100,t.l=fi(t.l),se(t)}function cy(e,n){n=n===0?0:n||10;var t=se(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(n/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(n/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(n/100)))),se(t)}function ly(e,n){n=n===0?0:n||10;var t=se(e).toHsl();return t.l-=n/100,t.l=fi(t.l),se(t)}function uy(e,n){var t=se(e).toHsl(),r=(t.h+n)%360;return t.h=r<0?360+r:r,se(t)}function dy(e){var n=se(e).toHsl();return n.h=(n.h+180)%360,se(n)}function fu(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var t=se(e).toHsl(),r=[se(e)],o=360/n,i=1;i<n;i++)r.push(se({h:(t.h+i*o)%360,s:t.s,l:t.l}));return r}function fy(e){var n=se(e).toHsl(),t=n.h;return[se(e),se({h:(t+72)%360,s:n.s,l:n.l}),se({h:(t+216)%360,s:n.s,l:n.l})]}function py(e,n,t){n=n||6,t=t||30;var r=se(e).toHsl(),o=360/t,i=[se(e)];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,i.push(se(r));return i}function hy(e,n){n=n||6;for(var t=se(e).toHsv(),r=t.h,o=t.s,i=t.v,a=[],s=1/n;n--;)a.push(se({h:r,s:o,v:i})),i=(i+s)%1;return a}se.mix=function(e,n,t){t=t===0?0:t||50;var r=se(e).toRgb(),o=se(n).toRgb(),i=t/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return se(a)},se.readability=function(e,n){var t=se(e),r=se(n);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)},se.isReadable=function(e,n,t){var r=se.readability(e,n),o,i;switch(i=!1,o=wy(t),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i},se.mostReadable=function(e,n,t){var r=null,o=0,i,a,s,c;t=t||{},a=t.includeFallbackColors,s=t.level,c=t.size;for(var l=0;l<n.length;l++)i=se.readability(e,n[l]),i>o&&(o=i,r=se(n[l]));return se.isReadable(e,r,{level:s,size:c})||!a?r:(t.includeFallbackColors=!1,se.mostReadable(e,["#fff","#000"],t))};var Va=se.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},my=se.hexNames=gy(Va);function gy(e){var n={};for(var t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}function pu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function We(e,n){vy(e)&&(e="100%");var t=yy(e);return e=Math.min(n,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function fi(e){return Math.min(1,Math.max(0,e))}function Mt(e){return parseInt(e,16)}function vy(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function yy(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Vt(e){return e.length==1?"0"+e:""+e}function Wn(e){return e<=1&&(e=e*100+"%"),e}function hu(e){return Math.round(parseFloat(e)*255).toString(16)}function mu(e){return Mt(e)/255}var Ft=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",t="(?:"+n+")|(?:"+e+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",o="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function pr(e){return!!Ft.CSS_UNIT.exec(e)}function by(e){e=e.replace(Qv,"").replace(Jv,"").toLowerCase();var n=!1;if(Va[e])e=Va[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Ft.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Ft.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ft.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Ft.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ft.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Ft.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ft.hex8.exec(e))?{r:Mt(t[1]),g:Mt(t[2]),b:Mt(t[3]),a:mu(t[4]),format:n?"name":"hex8"}:(t=Ft.hex6.exec(e))?{r:Mt(t[1]),g:Mt(t[2]),b:Mt(t[3]),format:n?"name":"hex"}:(t=Ft.hex4.exec(e))?{r:Mt(t[1]+""+t[1]),g:Mt(t[2]+""+t[2]),b:Mt(t[3]+""+t[3]),a:mu(t[4]+""+t[4]),format:n?"name":"hex8"}:(t=Ft.hex3.exec(e))?{r:Mt(t[1]+""+t[1]),g:Mt(t[2]+""+t[2]),b:Mt(t[3]+""+t[3]),format:n?"name":"hex"}:!1}function wy(e){var n,t;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:n,size:t}}const gu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23C4D9F5'%20d='M36.667%2020c0%209.205-7.462%2016.667-16.667%2016.667S3.333%2029.205%203.333%2020%2010.795%203.333%2020%203.333%2036.667%2010.795%2036.667%2020'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M20%2012.083c.69%200%201.25.56%201.25%201.25v6.15l3.8%203.8a1.25%201.25%200%201%201-1.767%201.767l-4.167-4.166A1.25%201.25%200%200%201%2018.75%2020v-6.667c0-.69.56-1.25%201.25-1.25'%20clip-rule='evenodd'/%3e%3c/svg%3e",_y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='23'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M17.614%202.64h-.5v-.622c0-.566-.443-1.018-.998-1.018s-.998.452-.998%201.018v.622H7.893v-.622C7.894%201.452%207.45%201%206.895%201s-.999.452-.999%201.018v.622h-.5C2.946%202.64.959%204.665.959%207.165v11.31c0%202.5%201.987%204.525%204.439%204.525h12.206c2.452%200%204.439-2.025%204.439-4.524V7.165c0-2.5-1.987-4.525-4.439-4.525zm0%2018.098H5.408c-1.22%200-2.22-1.018-2.22-2.262V10.41h16.646v8.065c0%201.244-1%202.262-2.22%202.262'/%3e%3c/svg%3e",xy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M12.667%204.667a3%203%200%200%201%203%203v8.667a3%203%200%200%201-3%203H4a3%203%200%200%201-3-3V7.667a3%203%200%200%201%203-3zM21.36%206.237a1%201%200%200%201%201.64.77V17a1%201%200%200%201-1.64.768L17%2014.135V9.867z'/%3e%3c/svg%3e",Sy=({onEventClick:e,upcomingEvents:n,onSyncGoogle:t,onSyncOutlook:r,leads30Days:o,leads90Days:i})=>{const a=d=>{const f=new Date,m={start:y.startOfDay(f),end:y.endOfDay(f)},g={start:d.fechaInicio,end:d.fechaFin};return su(m,g)?"Hoy":y.isTomorrow(d.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(d.fechaInicio)},s={};n.forEach(d=>{const f=a(d);s[f]||(s[f]=[]),s[f].push(d)});const[c,l]=w.useState(!1),u=()=>{l(!c)};return h.jsxs("div",{className:be.sidebarContainer,children:[h.jsxs("div",{className:be.leadsSection,children:[h.jsxs("div",{className:be.leadCard,children:[h.jsx("div",{className:be.leadIcon,children:h.jsx("img",{src:gu})}),h.jsxs("div",{className:be.leadText,children:[h.jsx("div",{className:be.leadDays,children:"+30 días sin atender"}),h.jsxs("div",{className:be.leadCount,children:[o," ",h.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),h.jsxs("div",{className:be.leadCard,children:[h.jsx("div",{className:be.leadIcon,children:h.jsx("img",{src:gu})}),h.jsxs("div",{className:be.leadText,children:[h.jsx("div",{className:be.leadDays,children:"+90 días sin atender"}),h.jsxs("div",{className:be.leadCount,children:[i," ",h.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),h.jsxs("div",{className:be.eventsSection,children:[h.jsx("h3",{className:be.sidebarTitle,children:"Próximos eventos"}),h.jsx("div",{className:be.eventsContainer,children:Object.entries(s).map(([d,f])=>h.jsxs("div",{className:`${be.eventGroup}`,children:[h.jsxs("div",{className:be.eventGroupDate,children:[h.jsx("img",{src:_y,width:15})," ",d]}),f.map(m=>{const g=se(m.color||"#ffcc00"),p=g.toString(),b=g.clone().darken(15).toString();return h.jsxs("div",{className:be.eventItem,style:{backgroundColor:p,borderLeftColor:b},onClick:()=>e(m),children:[h.jsxs("div",{className:be.eventDetails,children:[h.jsx("div",{className:be.eventTitle,children:m.titulo.length>32?`${m.titulo.substring(0,32)}...`:m.titulo}),h.jsx("div",{className:be.eventGroupDate,children:m?.client?m?.client?.length>50?`${m.client.substring(0,50)}...`:m.client:""}),h.jsx("div",{className:be.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(m.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(m.fechaFin)}`})]}),m.link&&h.jsx("a",{onClick:S=>{S.stopPropagation()},href:m?.link,target:"_blank",style:{textDecoration:"none"},children:h.jsx("img",{src:xy,width:15,style:{marginLeft:"3px"}})})]},m.eventoID)})]},d))})]}),h.jsxs("div",{className:be.calendarsSection,hidden:!0,children:[h.jsxs("button",{onClick:u,className:be.collapsibleHeader,children:[h.jsxs("div",{className:be.headerTitle,children:[h.jsx("h3",{children:"Calendarios"}),h.jsx("span",{className:be.calendarCount,children:"1"})]}),h.jsx(Zv,{className:`${be.chevronIcon} ${c?be.collapsed:""}`})]}),h.jsxs("div",{className:`${be.collapsibleContent} ${c?be.hidden:""}`,children:[h.jsxs("div",{className:be.calendarItem,children:[h.jsx("div",{className:be.circularCheckbox,children:h.jsx(qv,{size:24,className:be.checkedIcon})}),h.jsx(iu,{size:24,className:be.calendarIcon}),h.jsx("span",{children:"Mi calendario"})]}),h.jsxs("div",{className:be.calendarItem,onClick:r,children:[h.jsx("div",{className:be.circularCheckbox,children:h.jsx(Kv,{size:24,className:be.uncheckedIcon})}),h.jsx(Gv,{size:24,className:be.calendarIcon}),h.jsx("span",{children:"Outlook"})]}),h.jsxs("div",{className:be.syncButton,onClick:t,children:[h.jsx(iu,{size:24,className:be.googleIcon}),h.jsx("span",{children:"Sincronizar Google Calendar"})]})]})]})]})},Yt={dayCell:"_dayCell_ph891_1",dayCellContainer:"_dayCellContainer_ph891_23",dayNumber:"_dayNumber_ph891_55",dayNumberToday:"_dayNumberToday_ph891_69",notCurrentMonth:"_notCurrentMonth_ph891_91",CurrentDay:"_CurrentDay_ph891_129",eventsList:"_eventsList_ph891_137",eventItem:"_eventItem_ph891_155",eventTitle:"_eventTitle_ph891_187",eventTime:"_eventTime_ph891_217",seeMoreLink:"_seeMoreLink_ph891_245"},vu=25,Cy=22,ky=({dayNumber:e,date:n,events:t,isToday:r,isCurrentMonth:o,onDayClick:i,onEventClick:a,onSeeMoreClick:s})=>{const c=[Yt.dayCell,o?"":Yt.notCurrentMonth,Yt.CurrentDay].join(" ").trim(),l=w.useRef(null),[u,d]=w.useState(t.length),f=()=>{i?.(n)};w.useLayoutEffect(()=>{const p=()=>{if(l.current){const b=l.current.clientHeight;let S=Math.floor(b/vu);if(S<t.length){const x=Math.floor((b-Cy)/vu);S=Math.max(0,x)}d(S)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[t.length]);const m=t.slice(0,u==0?1:u),g=t.length-(u==0?1:u);return h.jsxs("div",{className:`${c} ${Yt.dayCellContainer}`,onClick:f,children:[h.jsx("div",{className:r?Yt.dayNumber:Yt.dayNumberToday,children:e}),h.jsxs("div",{className:Yt.eventsList,ref:l,children:[m.map(p=>h.jsxs("div",{className:Yt.eventItem,style:{backgroundColor:p.color||"#007bff"},onClick:b=>{b.stopPropagation(),a?.(p)},children:[h.jsx("span",{className:Yt.eventTitle,children:p.titulo}),h.jsx("span",{className:Yt.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(p.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(p.fechaFin)}`})]},p.eventoID)),g>0&&h.jsxs("div",{className:Yt.seeMoreLink,onClick:p=>{p.stopPropagation(),s(t,n)},children:[g," más..."]})]})]})},yu={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Dy=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return h.jsx("div",{className:yu.weekDaysContainer,children:e.map(n=>h.jsx("div",{className:yu.weekDay,children:n},n))})},pi={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Ey(e,...n){const t=Ba.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function Ty(e,n){const[t,r]=Ey(e,n.start,n.end);return{start:t,end:r}}function Oy(e,n){const{start:t,end:r}=Ty(n?.in,e);let o=+t>+r;const i=o?+t:+r,a=o?r:t;a.setHours(0,0,0,0);let s=1;const c=[];for(;+a<=i;)c.push(Ba(t,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?c.reverse():c}function My(e,n){const t=n?.weekStartsOn,r=kr(e,n?.in),o=r.getDay(),i=(o<t?-7:0)+6-(o-t);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}function Ay(e,n,t){const r=+kr(e,t?.in),[o,i]=[+kr(n.start,t?.in),+kr(n.end,t?.in)].sort((a,s)=>a-s);return r>=o&&r<=i}const Py=({currentDate:e,events:n,onDayClick:t,onEventClick:r,onSeeMoreClick:o})=>{const i=y.startOfMonth(e),a=y.endOfMonth(e),s=y.startOfWeek(i,{weekStartsOn:1}),c=My(a,{weekStartsOn:1}),l=Oy({start:s,end:c}),u={},d=l.length/7,f=`${pi.daysContainer} ${d===5?pi.rows5:pi.rows6}`;return n.forEach(m=>{const g=y.format(m.fechaInicio,"yyyy-MM-dd");u[g]||(u[g]=[]),u[g].push(m)}),h.jsxs("div",{className:pi.calendarGridContainer,children:[h.jsx(Dy,{}),h.jsx("div",{className:f,children:l.map(m=>{const g=n.filter(p=>Ay(m,{start:y.startOfDay(p.fechaInicio),end:y.endOfDay(p.fechaFin)}));return h.jsx(ky,{dayNumber:m.getDate(),date:m,events:g,isToday:y.isToday(m),isCurrentMonth:y.isSameMonth(m,e),onDayClick:t,onEventClick:r,onSeeMoreClick:o},m.toISOString())})})]})};function bu(e,n){return function(){return e.apply(n,arguments)}}const{toString:Iy}=Object.prototype,{getPrototypeOf:Fa}=Object,{iterator:hi,toStringTag:wu}=Symbol,mi=(e=>n=>{const t=Iy.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=e=>(e=e.toLowerCase(),n=>mi(n)===e),gi=e=>n=>typeof n===e,{isArray:dn}=Array,Zn=gi("undefined");function qn(e){return e!==null&&!Zn(e)&&e.constructor!==null&&!Zn(e.constructor)&&wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _u=Ht("ArrayBuffer");function Ny(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&_u(e.buffer),n}const Ry=gi("string"),wt=gi("function"),xu=gi("number"),Kn=e=>e!==null&&typeof e=="object",$y=e=>e===!0||e===!1,vi=e=>{if(mi(e)!=="object")return!1;const n=Fa(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(wu in e)&&!(hi in e)},jy=e=>{if(!Kn(e)||qn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ly=Ht("Date"),zy=Ht("File"),By=Ht("Blob"),Vy=Ht("FileList"),Fy=e=>Kn(e)&&wt(e.pipe),Yy=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||wt(e.append)&&((n=mi(e))==="formdata"||n==="object"&&wt(e.toString)&&e.toString()==="[object FormData]"))},Hy=Ht("URLSearchParams"),[Uy,Wy,Zy,qy]=["ReadableStream","Request","Response","Headers"].map(Ht),Ky=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gn(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),dn(e))for(r=0,o=e.length;r<o;r++)n.call(null,e[r],r,e);else{if(qn(e))return;const i=t?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],n.call(null,e[s],s,e)}}function Su(e,n){if(qn(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,o;for(;r-- >0;)if(o=t[r],n===o.toLowerCase())return o;return null}const jr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cu=e=>!Zn(e)&&e!==jr;function Ya(){const{caseless:e}=Cu(this)&&this||{},n={},t=(r,o)=>{const i=e&&Su(n,o)||o;vi(n[i])&&vi(r)?n[i]=Ya(n[i],r):vi(r)?n[i]=Ya({},r):dn(r)?n[i]=r.slice():n[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Gn(arguments[r],t);return n}const Gy=(e,n,t,{allOwnKeys:r}={})=>(Gn(n,(o,i)=>{t&&wt(o)?e[i]=bu(o,t):e[i]=o},{allOwnKeys:r}),e),Qy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jy=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},Xy=(e,n,t,r)=>{let o,i,a;const s={};if(n=n||{},e==null)return n;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,n))&&!s[a]&&(n[a]=e[a],s[a]=!0);e=t!==!1&&Fa(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},eb=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},tb=e=>{if(!e)return null;if(dn(e))return e;let n=e.length;if(!xu(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},rb=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Fa(Uint8Array)),nb=(e,n)=>{const r=(e&&e[hi]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;n.call(e,i[0],i[1])}},ob=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},ib=Ht("HTMLFormElement"),ab=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,o){return r.toUpperCase()+o}),ku=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),sb=Ht("RegExp"),Du=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};Gn(t,(o,i)=>{let a;(a=n(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},cb=e=>{Du(e,(n,t)=>{if(wt(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=e[t];if(wt(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},lb=(e,n)=>{const t={},r=o=>{o.forEach(i=>{t[i]=!0})};return dn(e)?r(e):r(String(e).split(n)),t},ub=()=>{},db=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function fb(e){return!!(e&&wt(e.append)&&e[wu]==="FormData"&&e[hi])}const pb=e=>{const n=new Array(10),t=(r,o)=>{if(Kn(r)){if(n.indexOf(r)>=0)return;if(qn(r))return r;if(!("toJSON"in r)){n[o]=r;const i=dn(r)?[]:{};return Gn(r,(a,s)=>{const c=t(a,o+1);!Zn(c)&&(i[s]=c)}),n[o]=void 0,i}}return r};return t(e,0)},hb=Ht("AsyncFunction"),mb=e=>e&&(Kn(e)||wt(e))&&wt(e.then)&&wt(e.catch),Eu=((e,n)=>e?setImmediate:n?((t,r)=>(jr.addEventListener("message",({source:o,data:i})=>{o===jr&&i===t&&r.length&&r.shift()()},!1),o=>{r.push(o),jr.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",wt(jr.postMessage)),gb=typeof queueMicrotask<"u"?queueMicrotask.bind(jr):typeof process<"u"&&process.nextTick||Eu,N={isArray:dn,isArrayBuffer:_u,isBuffer:qn,isFormData:Yy,isArrayBufferView:Ny,isString:Ry,isNumber:xu,isBoolean:$y,isObject:Kn,isPlainObject:vi,isEmptyObject:jy,isReadableStream:Uy,isRequest:Wy,isResponse:Zy,isHeaders:qy,isUndefined:Zn,isDate:Ly,isFile:zy,isBlob:By,isRegExp:sb,isFunction:wt,isStream:Fy,isURLSearchParams:Hy,isTypedArray:rb,isFileList:Vy,forEach:Gn,merge:Ya,extend:Gy,trim:Ky,stripBOM:Qy,inherits:Jy,toFlatObject:Xy,kindOf:mi,kindOfTest:Ht,endsWith:eb,toArray:tb,forEachEntry:nb,matchAll:ob,isHTMLForm:ib,hasOwnProperty:ku,hasOwnProp:ku,reduceDescriptors:Du,freezeMethods:cb,toObjectSet:lb,toCamelCase:ab,noop:ub,toFiniteNumber:db,findKey:Su,global:jr,isContextDefined:Cu,isSpecCompliantForm:fb,toJSONObject:pb,isAsyncFn:hb,isThenable:mb,setImmediate:Eu,asap:gb,isIterable:e=>e!=null&&wt(e[hi])};function ye(e,n,t,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}N.inherits(ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}});const Tu=ye.prototype,Ou={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ou[e]={value:e}}),Object.defineProperties(ye,Ou),Object.defineProperty(Tu,"isAxiosError",{value:!0}),ye.from=(e,n,t,r,o,i)=>{const a=Object.create(Tu);return N.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ye.call(a,e.message,n,t,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const vb=null;function Ha(e){return N.isPlainObject(e)||N.isArray(e)}function Mu(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function Au(e,n,t){return e?e.concat(n).map(function(o,i){return o=Mu(o),!t&&i?"["+o+"]":o}).join(t?".":""):n}function yb(e){return N.isArray(e)&&!e.some(Ha)}const bb=N.toFlatObject(N,{},null,function(n){return/^is[A-Z]/.test(n)});function yi(e,n,t){if(!N.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=N.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!N.isUndefined(b[p])});const r=t.metaTokens,o=t.visitor||u,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(n);if(!N.isFunction(o))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(N.isDate(g))return g.toISOString();if(N.isBoolean(g))return g.toString();if(!c&&N.isBlob(g))throw new ye("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(g)||N.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,b){let S=g;if(g&&!b&&typeof g=="object"){if(N.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(N.isArray(g)&&yb(g)||(N.isFileList(g)||N.endsWith(p,"[]"))&&(S=N.toArray(g)))return p=Mu(p),S.forEach(function(T,D){!(N.isUndefined(T)||T===null)&&n.append(a===!0?Au([p],D,i):a===null?p:p+"[]",l(T))}),!1}return Ha(g)?!0:(n.append(Au(b,p,i),l(g)),!1)}const d=[],f=Object.assign(bb,{defaultVisitor:u,convertValue:l,isVisitable:Ha});function m(g,p){if(!N.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(g),N.forEach(g,function(S,x){(!(N.isUndefined(S)||S===null)&&o.call(n,S,N.isString(x)?x.trim():x,p,f))===!0&&m(S,p?p.concat(x):[x])}),d.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return m(e),n}function Pu(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function Ua(e,n){this._pairs=[],e&&yi(e,this,n)}const Iu=Ua.prototype;Iu.append=function(n,t){this._pairs.push([n,t])},Iu.toString=function(n){const t=n?function(r){return n.call(this,r,Pu)}:Pu;return this._pairs.map(function(o){return t(o[0])+"="+t(o[1])},"").join("&")};function wb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nu(e,n,t){if(!n)return e;const r=t&&t.encode||wb;N.isFunction(t)&&(t={serialize:t});const o=t&&t.serialize;let i;if(o?i=o(n,t):i=N.isURLSearchParams(n)?n.toString():new Ua(n,t).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ru{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){N.forEach(this.handlers,function(r){r!==null&&n(r)})}}const $u={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_b={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ua,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Wa=typeof window<"u"&&typeof document<"u",Za=typeof navigator=="object"&&navigator||void 0,xb=Wa&&(!Za||["ReactNative","NativeScript","NS"].indexOf(Za.product)<0),Sb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Cb=Wa&&window.location.href||"http://localhost",ht={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wa,hasStandardBrowserEnv:xb,hasStandardBrowserWebWorkerEnv:Sb,navigator:Za,origin:Cb},Symbol.toStringTag,{value:"Module"})),..._b};function kb(e,n){return yi(e,new ht.classes.URLSearchParams,{visitor:function(t,r,o,i){return ht.isNode&&N.isBuffer(t)?(this.append(r,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...n})}function Db(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Eb(e){const n={},t=Object.keys(e);let r;const o=t.length;let i;for(r=0;r<o;r++)i=t[r],n[i]=e[i];return n}function ju(e){function n(t,r,o,i){let a=t[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),c=i>=t.length;return a=!a&&N.isArray(o)?o.length:a,c?(N.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!N.isObject(o[a]))&&(o[a]=[]),n(t,r,o[a],i)&&N.isArray(o[a])&&(o[a]=Eb(o[a])),!s)}if(N.isFormData(e)&&N.isFunction(e.entries)){const t={};return N.forEachEntry(e,(r,o)=>{n(Db(r),o,t,0)}),t}return null}function Tb(e,n,t){if(N.isString(e))try{return(n||JSON.parse)(e),N.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const Qn={transitional:$u,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=N.isObject(n);if(i&&N.isHTMLForm(n)&&(n=new FormData(n)),N.isFormData(n))return o?JSON.stringify(ju(n)):n;if(N.isArrayBuffer(n)||N.isBuffer(n)||N.isStream(n)||N.isFile(n)||N.isBlob(n)||N.isReadableStream(n))return n;if(N.isArrayBufferView(n))return n.buffer;if(N.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kb(n,this.formSerializer).toString();if((s=N.isFileList(n))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return yi(s?{"files[]":n}:n,c&&new c,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),Tb(n)):n}],transformResponse:[function(n){const t=this.transitional||Qn.transitional,r=t&&t.forcedJSONParsing,o=this.responseType==="json";if(N.isResponse(n)||N.isReadableStream(n))return n;if(n&&N.isString(n)&&(r&&!this.responseType||o)){const a=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(n)}catch(s){if(a)throw s.name==="SyntaxError"?ye.from(s,ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{Qn.headers[e]={}});const Ob=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mb=e=>{const n={};let t,r,o;return e&&e.split(`
|
|
153
|
+
`).forEach(function(a){o=a.indexOf(":"),t=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!t||n[t]&&Ob[t])&&(t==="set-cookie"?n[t]?n[t].push(r):n[t]=[r]:n[t]=n[t]?n[t]+", "+r:r)}),n},Lu=Symbol("internals");function Jn(e){return e&&String(e).trim().toLowerCase()}function bi(e){return e===!1||e==null?e:N.isArray(e)?e.map(bi):String(e)}function Ab(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const Pb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qa(e,n,t,r,o){if(N.isFunction(r))return r.call(this,n,t);if(o&&(n=t),!!N.isString(n)){if(N.isString(r))return n.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(n)}}function Ib(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function Nb(e,n){const t=N.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{value:function(o,i,a){return this[r].call(this,n,o,i,a)},configurable:!0})})}let _t=class{constructor(n){n&&this.set(n)}set(n,t,r){const o=this;function i(s,c,l){const u=Jn(c);if(!u)throw new Error("header name must be a non-empty string");const d=N.findKey(o,u);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=bi(s))}const a=(s,c)=>N.forEach(s,(l,u)=>i(l,u,c));if(N.isPlainObject(n)||n instanceof this.constructor)a(n,t);else if(N.isString(n)&&(n=n.trim())&&!Pb(n))a(Mb(n),t);else if(N.isObject(n)&&N.isIterable(n)){let s={},c,l;for(const u of n){if(!N.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[l=u[0]]=(c=s[l])?N.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}a(s,t)}else n!=null&&i(t,n,r);return this}get(n,t){if(n=Jn(n),n){const r=N.findKey(this,n);if(r){const o=this[r];if(!t)return o;if(t===!0)return Ab(o);if(N.isFunction(t))return t.call(this,o,r);if(N.isRegExp(t))return t.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Jn(n),n){const r=N.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||qa(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let o=!1;function i(a){if(a=Jn(a),a){const s=N.findKey(r,a);s&&(!t||qa(r,r[s],s,t))&&(delete r[s],o=!0)}}return N.isArray(n)?n.forEach(i):i(n),o}clear(n){const t=Object.keys(this);let r=t.length,o=!1;for(;r--;){const i=t[r];(!n||qa(this,this[i],i,n,!0))&&(delete this[i],o=!0)}return o}normalize(n){const t=this,r={};return N.forEach(this,(o,i)=>{const a=N.findKey(r,i);if(a){t[a]=bi(o),delete t[i];return}const s=n?Ib(i):String(i).trim();s!==i&&delete t[i],t[s]=bi(o),r[s]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return N.forEach(this,(r,o)=>{r!=null&&r!==!1&&(t[o]=n&&N.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
|
|
154
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(o=>r.set(o)),r}static accessor(n){const r=(this[Lu]=this[Lu]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Jn(a);r[s]||(Nb(o,a),r[s]=!0)}return N.isArray(n)?n.forEach(i):i(n),this}};_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(_t.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),N.freezeMethods(_t);function Ka(e,n){const t=this||Qn,r=n||t,o=_t.from(r.headers);let i=r.data;return N.forEach(e,function(s){i=s.call(t,i,o.normalize(),n?n.status:void 0)}),o.normalize(),i}function zu(e){return!!(e&&e.__CANCEL__)}function fn(e,n,t){ye.call(this,e??"canceled",ye.ERR_CANCELED,n,t),this.name="CanceledError"}N.inherits(fn,ye,{__CANCEL__:!0});function Bu(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new ye("Request failed with status code "+t.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Rb(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function $b(e,n){e=e||10;const t=new Array(e),r=new Array(e);let o=0,i=0,a;return n=n!==void 0?n:1e3,function(c){const l=Date.now(),u=r[i];a||(a=l),t[o]=c,r[o]=l;let d=i,f=0;for(;d!==o;)f+=t[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<n)return;const m=u&&l-u;return m?Math.round(f*1e3/m):void 0}}function jb(e,n){let t=0,r=1e3/n,o,i;const a=(l,u=Date.now())=>{t=u,o=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const u=Date.now(),d=u-t;d>=r?a(l,u):(o=l,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const wi=(e,n,t=3)=>{let r=0;const o=$b(50,250);return jb(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,c=a-r,l=o(c),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:i,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(d)},t)},Vu=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},Fu=e=>(...n)=>N.asap(()=>e(...n)),Lb=ht.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,ht.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(ht.origin),ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent)):()=>!0,zb=ht.hasStandardBrowserEnv?{write(e,n,t,r,o,i){const a=[e+"="+encodeURIComponent(n)];N.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),N.isString(r)&&a.push("path="+r),N.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bb(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vb(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function Yu(e,n,t){let r=!Bb(n);return e&&(r||t==!1)?Vb(e,n):n}const Hu=e=>e instanceof _t?{...e}:e;function Lr(e,n){n=n||{};const t={};function r(l,u,d,f){return N.isPlainObject(l)&&N.isPlainObject(u)?N.merge.call({caseless:f},l,u):N.isPlainObject(u)?N.merge({},u):N.isArray(u)?u.slice():u}function o(l,u,d,f){if(N.isUndefined(u)){if(!N.isUndefined(l))return r(void 0,l,d,f)}else return r(l,u,d,f)}function i(l,u){if(!N.isUndefined(u))return r(void 0,u)}function a(l,u){if(N.isUndefined(u)){if(!N.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,d){if(d in n)return r(l,u);if(d in e)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u,d)=>o(Hu(l),Hu(u),d,!0)};return N.forEach(Object.keys({...e,...n}),function(u){const d=c[u]||o,f=d(e[u],n[u],u);N.isUndefined(f)&&d!==s||(t[u]=f)}),t}const Uu=e=>{const n=Lr({},e);let{data:t,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=n;n.headers=a=_t.from(a),n.url=Nu(Yu(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(N.isFormData(t)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...u].join("; "))}}if(ht.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(n)),r||r!==!1&&Lb(n.url))){const l=o&&i&&zb.read(i);l&&a.set(o,l)}return n},Fb=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){const o=Uu(e);let i=o.data;const a=_t.from(o.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=o,u,d,f,m,g;function p(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const T=_t.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};Bu(function(R){t(R),p()},function(R){r(R),p()},k),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(r(new ye("Request aborted",ye.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new ye("Network Error",ye.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||$u;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new ye(D,k.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,b)),b=null},i===void 0&&a.setContentType(null),"setRequestHeader"in b&&N.forEach(a.toJSON(),function(D,k){b.setRequestHeader(k,D)}),N.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),s&&s!=="json"&&(b.responseType=o.responseType),l&&([f,g]=wi(l,!0),b.addEventListener("progress",f)),c&&b.upload&&([d,m]=wi(c),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(u=T=>{b&&(r(!T||T.type?new fn(null,e,b):T),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=Rb(o.url);if(x&&ht.protocols.indexOf(x)===-1){r(new ye("Unsupported protocol "+x+":",ye.ERR_BAD_REQUEST,e));return}b.send(i||null)})},Yb=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let r=new AbortController,o;const i=function(l){if(!o){o=!0,s();const u=l instanceof Error?l:this.reason;r.abort(u instanceof ye?u:new fn(u instanceof Error?u.message:u))}};let a=n&&setTimeout(()=>{a=null,i(new ye(`timeout ${n} of ms exceeded`,ye.ETIMEDOUT))},n);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>N.asap(s),c}},Hb=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,o;for(;r<t;)o=r+n,yield e.slice(r,o),r=o},Ub=async function*(e,n){for await(const t of Wb(e))yield*Hb(t,n)},Wb=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Wu=(e,n,t,r)=>{const o=Ub(e,n);let i=0,a,s=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await o.next();if(l){s(),c.close();return}let d=u.byteLength;if(t){let f=i+=d;t(f)}c.enqueue(new Uint8Array(u))}catch(l){throw s(l),l}},cancel(c){return s(c),o.return()}},{highWaterMark:2})},_i=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Zu=_i&&typeof ReadableStream=="function",Zb=_i&&(typeof TextEncoder=="function"?(e=>n=>e.encode(n))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),qu=(e,...n)=>{try{return!!e(...n)}catch{return!1}},qb=Zu&&qu(()=>{let e=!1;const n=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n}),Ku=64*1024,Ga=Zu&&qu(()=>N.isReadableStream(new Response("").body)),xi={stream:Ga&&(e=>e.body)};_i&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!xi[n]&&(xi[n]=N.isFunction(e[n])?t=>t[n]():(t,r)=>{throw new ye(`Response type '${n}' is not supported`,ye.ERR_NOT_SUPPORT,r)})})})(new Response);const Kb=async e=>{if(e==null)return 0;if(N.isBlob(e))return e.size;if(N.isSpecCompliantForm(e))return(await new Request(ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(N.isArrayBufferView(e)||N.isArrayBuffer(e))return e.byteLength;if(N.isURLSearchParams(e)&&(e=e+""),N.isString(e))return(await Zb(e)).byteLength},Gb=async(e,n)=>{const t=N.toFiniteNumber(e.getContentLength());return t??Kb(n)},Qa={http:vb,xhr:Fb,fetch:_i&&(async e=>{let{url:n,method:t,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Uu(e);l=l?(l+"").toLowerCase():"text";let m=Yb([o,i&&i.toAbortSignal()],a),g;const p=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(c&&qb&&t!=="get"&&t!=="head"&&(b=await Gb(u,r))!==0){let k=new Request(n,{method:"POST",body:r,duplex:"half"}),O;if(N.isFormData(r)&&(O=k.headers.get("content-type"))&&u.setContentType(O),k.body){const[R,U]=Vu(b,wi(Fu(c)));r=Wu(k.body,Ku,R,U)}}N.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;g=new Request(n,{...f,signal:m,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:S?d:void 0});let x=await fetch(g,f);const T=Ga&&(l==="stream"||l==="response");if(Ga&&(s||T&&p)){const k={};["status","statusText","headers"].forEach(H=>{k[H]=x[H]});const O=N.toFiniteNumber(x.headers.get("content-length")),[R,U]=s&&Vu(O,wi(Fu(s),!0))||[];x=new Response(Wu(x.body,Ku,R,()=>{U&&U(),p&&p()}),k)}l=l||"text";let D=await xi[N.findKey(xi,l)||"text"](x,e);return!T&&p&&p(),await new Promise((k,O)=>{Bu(k,O,{data:D,headers:_t.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:g})})}catch(S){throw p&&p(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,g),{cause:S.cause||S}):ye.from(S,S&&S.code,e,g)}})};N.forEach(Qa,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const Gu=e=>`- ${e}`,Qb=e=>N.isFunction(e)||e===null||e===!1,Qu={getAdapter:e=>{e=N.isArray(e)?e:[e];const{length:n}=e;let t,r;const o={};for(let i=0;i<n;i++){t=e[i];let a;if(r=t,!Qb(t)&&(r=Qa[(a=String(t)).toLowerCase()],r===void 0))throw new ye(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
155
|
+
`+i.map(Gu).join(`
|
|
156
|
+
`):" "+Gu(i[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Qa};function Ja(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fn(null,e)}function Ju(e){return Ja(e),e.headers=_t.from(e.headers),e.data=Ka.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qu.getAdapter(e.adapter||Qn.adapter)(e).then(function(r){return Ja(e),r.data=Ka.call(e,e.transformResponse,r),r.headers=_t.from(r.headers),r},function(r){return zu(r)||(Ja(e),r&&r.response&&(r.response.data=Ka.call(e,e.transformResponse,r.response),r.response.headers=_t.from(r.response.headers))),Promise.reject(r)})}const Xu="1.11.0",Si={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Si[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const ed={};Si.transitional=function(n,t,r){function o(i,a){return"[Axios v"+Xu+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(n===!1)throw new ye(o(a," has been removed"+(t?" in "+t:"")),ye.ERR_DEPRECATED);return t&&!ed[a]&&(ed[a]=!0,console.warn(o(a," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(i,a,s):!0}},Si.spelling=function(n){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${n}`),!0)};function Jb(e,n,t){if(typeof e!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=n[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new ye("option "+i+" must be "+c,ye.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ye("Unknown option "+i,ye.ERR_BAD_OPTION)}}const Ci={assertOptions:Jb,validators:Si},ir=Ci.validators;let zr=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Ru,response:new Ru}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
157
|
+
`+i):r.stack=i}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Lr(this.defaults,t);const{transitional:r,paramsSerializer:o,headers:i}=t;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ir.transitional(ir.boolean),forcedJSONParsing:ir.transitional(ir.boolean),clarifyTimeoutError:ir.transitional(ir.boolean)},!1),o!=null&&(N.isFunction(o)?t.paramsSerializer={serialize:o}:Ci.assertOptions(o,{encode:ir.function,serialize:ir.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ci.assertOptions(t,{baseUrl:ir.spelling("baseURL"),withXsrfToken:ir.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&N.merge(i.common,i[t.method]);i&&N.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=_t.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(t)===!1||(c=c&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,f;if(!c){const g=[Ju.bind(this),void 0];for(g.unshift(...s),g.push(...l),f=g.length,u=Promise.resolve(t);d<f;)u=u.then(g[d++],g[d++]);return u}f=s.length;let m=t;for(d=0;d<f;){const g=s[d++],p=s[d++];try{m=g(m)}catch(b){p.call(this,b);break}}try{u=Ju.call(this,m)}catch(g){return Promise.reject(g)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}getUri(n){n=Lr(this.defaults,n);const t=Yu(n.baseURL,n.url,n.allowAbsoluteUrls);return Nu(t,n.params,n.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(n){zr.prototype[n]=function(t,r){return this.request(Lr(r||{},{method:n,url:t,data:(r||{}).data}))}}),N.forEach(["post","put","patch"],function(n){function t(r){return function(i,a,s){return this.request(Lr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}zr.prototype[n]=t(),zr.prototype[n+"Form"]=t(!0)});let Xb=class Qf{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},n(function(i,a,s){r.reason||(r.reason=new fn(i,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new Qf(function(o){n=o}),cancel:n}}};function e2(e){return function(t){return e.apply(null,t)}}function t2(e){return N.isObject(e)&&e.isAxiosError===!0}const Xa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xa).forEach(([e,n])=>{Xa[n]=e});function td(e){const n=new zr(e),t=bu(zr.prototype.request,n);return N.extend(t,zr.prototype,n,{allOwnKeys:!0}),N.extend(t,n,null,{allOwnKeys:!0}),t.create=function(o){return td(Lr(e,o))},t}const Xe=td(Qn);Xe.Axios=zr,Xe.CanceledError=fn,Xe.CancelToken=Xb,Xe.isCancel=zu,Xe.VERSION=Xu,Xe.toFormData=yi,Xe.AxiosError=ye,Xe.Cancel=Xe.CanceledError,Xe.all=function(n){return Promise.all(n)},Xe.spread=e2,Xe.isAxiosError=t2,Xe.mergeConfig=Lr,Xe.AxiosHeaders=_t,Xe.formToJSON=e=>ju(N.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Qu.getAdapter,Xe.HttpStatusCode=Xa,Xe.default=Xe;const{Axios:jk,AxiosError:Lk,CanceledError:zk,isCancel:Bk,CancelToken:Vk,VERSION:Fk,all:Yk,Cancel:Hk,isAxiosError:Uk,spread:Wk,toFormData:Zk,AxiosHeaders:qk,HttpStatusCode:Kk,formToJSON:Gk,getAdapter:Qk,mergeConfig:Jk}=Xe,rd={token:null},r2=e=>{rd.token=e},Br=Xe.create({headers:{"Content-Type":"application/json"}});Br.interceptors.request.use(e=>{const n=rd.token;return n&&(e.headers.Authorization=`Bearer ${n}`),e},e=>Promise.reject(e));const nd=w.createContext(void 0),n2=({config:e,children:n})=>(w.useEffect(()=>{e.getToken&&r2(e.getToken)},[e.getToken]),h.jsx(nd.Provider,{value:e,children:n})),o2=()=>{const e=w.useContext(nd);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},es=()=>{const{calendarApiUrl:e}=o2(),n=async s=>{try{return(await Br.get(`${e}/ListarEventosXUsuario/${s}`)).data.map(l=>{const u=new Date(l.fechaInicio),d=new Date(l.fechaFin),f=l.solicitudRelacionada?.[0]?.nombreCliente??null;return{...l,fechaInicio:u,fechaFin:d,client:f}})}catch(c){return console.error("Error events:",c),[]}},t=async(s,c)=>{try{const l=await Br.post(`${e}/InsertarEvento/${c}`,s);return{...l.data,fechaInicio:new Date(l.data.fechaInicio),fechaFin:new Date(l.data.fechaFin)}}catch(l){throw console.log("Error creating event:",l),l}},r=async s=>{try{const c=await Br.post(`${e}/ActualizarEvento/${s.eventoID}`,s);return{eventoID:c.data.eventoID,titulo:c.data.titulo,descripcion:c.data.descripcion,fechaInicio:new Date(c.data.fechaInicio),fechaFin:new Date(c.data.fechaFin),todoElDia:c.data.todoElDia,color:c.data.color,repetir:c.data.repetir,link:c.data.link,solID:c.data.solID,disID:c.data.disID,client:c.data.client}}catch(c){throw console.log("Error updating event:",c),c}},o=async s=>{try{const c=await Br.get(`${e}/ObtenerEvento/${s}`),l=c.data.solicitudRelacionada?.[0]?.nombreCliente||null;return{...c.data,fechaInicio:new Date(c.data.fechaInicio),fechaFin:new Date(c.data.fechaFin),client:l}}catch(c){throw console.error(`Error fetching event with ID ${s}:`,c),c}},i=async s=>{try{await Br.post(`${e}/EliminarEvento/${s}`)}catch(c){throw console.log(`Error ID ${s}:`,c),c}},a=w.useCallback(async(s,c,l,u)=>{try{const d={masNombreBD:l,usrID:u,disID:c,nombreCliente:s},m=(await Br.post(`${e}/ConsultaClientesXUsuariologgeado/`,d)).data?.data;return Array.isArray(m)?m.map(g=>({clienteID:g.clienteID,solID:g.solID,marca:g?.marca,modelo:g?.modelo,nombreCliente:g?.nombreCliente})):[]}catch(d){return console.error("Error clientes:",d),[]}},[e]);return{getEventsByUser:n,createEvent:t,updateEvent:r,getEventById:o,deleteEvent:i,getClients:a}},od=Xt([h.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),h.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var Xn=e=>e.type==="checkbox",Vr=e=>e instanceof Date,gt=e=>e==null;const id=e=>typeof e=="object";var et=e=>!gt(e)&&!Array.isArray(e)&&id(e)&&!Vr(e),ad=e=>et(e)&&e.target?Xn(e.target)?e.target.checked:e.target.value:e,i2=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,sd=(e,n)=>e.has(i2(n)),a2=e=>{const n=e.constructor&&e.constructor.prototype;return et(n)&&n.hasOwnProperty("isPrototypeOf")},ts=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function st(e){let n;const t=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)n=new Date(e);else if(!(ts&&(e instanceof Blob||r))&&(t||et(e)))if(n=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!a2(e))n=e;else for(const o in e)e.hasOwnProperty(o)&&(n[o]=st(e[o]));else return e;return n}var ki=e=>/^\w*$/.test(e),tt=e=>e===void 0,rs=e=>Array.isArray(e)?e.filter(Boolean):[],ns=e=>rs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(e,n,t)=>{if(!n||!et(e))return t;const r=(ki(n)?[n]:ns(n)).reduce((o,i)=>gt(o)?o:o[i],e);return tt(r)||r===e?tt(e[n])?t:e[n]:r},At=e=>typeof e=="boolean",$e=(e,n,t)=>{let r=-1;const o=ki(n)?[n]:ns(n),i=o.length,a=i-1;for(;++r<i;){const s=o[r];let c=t;if(r!==a){const l=e[s];c=et(l)||Array.isArray(l)?l:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=c,e=e[s]}};const Di={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ut={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},hr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},os=w.createContext(null);os.displayName="HookFormContext";const is=()=>w.useContext(os),s2=e=>{const{children:n,...t}=e;return w.createElement(os.Provider,{value:t},n)};var cd=(e,n,t,r=!0)=>{const o={defaultValues:n._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return n._proxyFormState[a]!==Ut.all&&(n._proxyFormState[a]=!r||Ut.all),t&&(t[a]=!0),e[a]}});return o};const as=typeof window<"u"?w.useLayoutEffect:w.useEffect;function c2(e){const n=is(),{control:t=n.control,disabled:r,name:o,exact:i}=e||{},[a,s]=w.useState(t._formState),c=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return as(()=>t._subscribe({name:o,formState:c.current,exact:i,callback:l=>{!r&&s({...t._formState,...l})}}),[o,r,i]),w.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>cd(a,t,c.current,!1),[a,t])}var ar=e=>typeof e=="string",ld=(e,n,t,r,o)=>ar(e)?(r&&n.watch.add(e),ee(t,e,o)):Array.isArray(e)?e.map(i=>(r&&n.watch.add(i),ee(t,i))):(r&&(n.watchAll=!0),t),ss=e=>gt(e)||!id(e);function mr(e,n,t=new WeakSet){if(ss(e)||ss(n))return e===n;if(Vr(e)&&Vr(n))return e.getTime()===n.getTime();const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(t.has(e)||t.has(n))return!0;t.add(e),t.add(n);for(const i of r){const a=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const s=n[i];if(Vr(a)&&Vr(s)||et(a)&&et(s)||Array.isArray(a)&&Array.isArray(s)?!mr(a,s,t):a!==s)return!1}}return!0}function l2(e){const n=is(),{control:t=n.control,name:r,defaultValue:o,disabled:i,exact:a,compute:s}=e||{},c=w.useRef(o),l=w.useRef(s),u=w.useRef(void 0);l.current=s;const d=w.useMemo(()=>t._getWatch(r,c.current),[t,r]),[f,m]=w.useState(l.current?l.current(d):d);return as(()=>t._subscribe({name:r,formState:{values:!0},exact:a,callback:g=>{if(!i){const p=ld(r,t._names,g.values||t._formValues,!1,c.current);if(l.current){const b=l.current(p);mr(b,u.current)||(m(b),u.current=b)}else m(p)}}}),[t,i,r,a]),w.useEffect(()=>t._removeUnmounted()),f}function u2(e){const n=is(),{name:t,disabled:r,control:o=n.control,shouldUnregister:i,defaultValue:a}=e,s=sd(o._names.array,t),c=w.useMemo(()=>ee(o._formValues,t,ee(o._defaultValues,t,a)),[o,t,a]),l=l2({control:o,name:t,defaultValue:c,exact:!0}),u=c2({control:o,name:t,exact:!0}),d=w.useRef(e),f=w.useRef(o.register(t,{...e.rules,value:l,...At(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;const m=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ee(u.errors,t)},isDirty:{enumerable:!0,get:()=>!!ee(u.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!ee(u.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!ee(u.validatingFields,t)},error:{enumerable:!0,get:()=>ee(u.errors,t)}}),[u,t]),g=w.useCallback(x=>f.current.onChange({target:{value:ad(x),name:t},type:Di.CHANGE}),[t]),p=w.useCallback(()=>f.current.onBlur({target:{value:ee(o._formValues,t),name:t},type:Di.BLUR}),[t,o._formValues]),b=w.useCallback(x=>{const T=ee(o._fields,t);T&&x&&(T._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:D=>x.setCustomValidity(D),reportValidity:()=>x.reportValidity()})},[o._fields,t]),S=w.useMemo(()=>({name:t,value:l,...At(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:g,onBlur:p,ref:b}),[t,r,u.disabled,g,p,b,l]);return w.useEffect(()=>{const x=o._options.shouldUnregister||i;o.register(t,{...d.current.rules,...At(d.current.disabled)?{disabled:d.current.disabled}:{}});const T=(D,k)=>{const O=ee(o._fields,D);O&&O._f&&(O._f.mount=k)};if(T(t,!0),x){const D=st(ee(o._options.defaultValues,t));$e(o._defaultValues,t,D),tt(ee(o._formValues,t))&&$e(o._formValues,t,D)}return!s&&o.register(t),()=>{(s?x&&!o._state.action:x)?o.unregister(t):T(t,!1)}},[t,o,s,i]),w.useEffect(()=>{o._setDisabledField({disabled:r,name:t})},[r,t,o]),w.useMemo(()=>({field:S,formState:u,fieldState:m}),[S,u,m])}const Pt=e=>e.render(u2(e));var cs=(e,n,t,r,o)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[r]:o||!0}}:{},eo=e=>Array.isArray(e)?e:[e],ud=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},xt=e=>et(e)&&!Object.keys(e).length,ls=e=>e.type==="file",Wt=e=>typeof e=="function",Ei=e=>{if(!ts)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},dd=e=>e.type==="select-multiple",us=e=>e.type==="radio",d2=e=>us(e)||Xn(e),ds=e=>Ei(e)&&e.isConnected;function f2(e,n){const t=n.slice(0,-1).length;let r=0;for(;r<t;)e=tt(e)?r++:e[n[r++]];return e}function p2(e){for(const n in e)if(e.hasOwnProperty(n)&&!tt(e[n]))return!1;return!0}function it(e,n){const t=Array.isArray(n)?n:ki(n)?[n]:ns(n),r=t.length===1?e:f2(e,t),o=t.length-1,i=t[o];return r&&delete r[i],o!==0&&(et(r)&&xt(r)||Array.isArray(r)&&p2(r))&&it(e,t.slice(0,-1)),e}var fd=e=>{for(const n in e)if(Wt(e[n]))return!0;return!1};function Ti(e,n={}){const t=Array.isArray(e);if(et(e)||t)for(const r in e)Array.isArray(e[r])||et(e[r])&&!fd(e[r])?(n[r]=Array.isArray(e[r])?[]:{},Ti(e[r],n[r])):gt(e[r])||(n[r]=!0);return n}function pd(e,n,t){const r=Array.isArray(e);if(et(e)||r)for(const o in e)Array.isArray(e[o])||et(e[o])&&!fd(e[o])?tt(n)||ss(t[o])?t[o]=Array.isArray(e[o])?Ti(e[o],[]):{...Ti(e[o])}:pd(e[o],gt(n)?{}:n[o],t[o]):t[o]=!mr(e[o],n[o]);return t}var to=(e,n)=>pd(e,n,Ti(n));const hd={value:!1,isValid:!1},md={value:!0,isValid:!0};var gd=e=>{if(Array.isArray(e)){if(e.length>1){const n=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:n,isValid:!!n.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!tt(e[0].attributes.value)?tt(e[0].value)||e[0].value===""?md:{value:e[0].value,isValid:!0}:md:hd}return hd},vd=(e,{valueAsNumber:n,valueAsDate:t,setValueAs:r})=>tt(e)?e:n?e===""?NaN:e&&+e:t&&ar(e)?new Date(e):r?r(e):e;const yd={isValid:!1,value:null};var bd=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,yd):yd;function wd(e){const n=e.ref;return ls(n)?n.files:us(n)?bd(e.refs).value:dd(n)?[...n.selectedOptions].map(({value:t})=>t):Xn(n)?gd(e.refs).value:vd(tt(n.value)?e.ref.value:n.value,e)}var h2=(e,n,t,r)=>{const o={};for(const i of e){const a=ee(n,i);a&&$e(o,i,a._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:r}},Oi=e=>e instanceof RegExp,ro=e=>tt(e)?e:Oi(e)?e.source:et(e)?Oi(e.value)?e.value.source:e.value:e,_d=e=>({isOnSubmit:!e||e===Ut.onSubmit,isOnBlur:e===Ut.onBlur,isOnChange:e===Ut.onChange,isOnAll:e===Ut.all,isOnTouch:e===Ut.onTouched});const xd="AsyncFunction";var m2=e=>!!e&&!!e.validate&&!!(Wt(e.validate)&&e.validate.constructor.name===xd||et(e.validate)&&Object.values(e.validate).find(n=>n.constructor.name===xd)),g2=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Sd=(e,n,t)=>!t&&(n.watchAll||n.watch.has(e)||[...n.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const no=(e,n,t,r)=>{for(const o of t||Object.keys(e)){const i=ee(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&n(a.refs[0],o)&&!r)return!0;if(a.ref&&n(a.ref,a.name)&&!r)return!0;if(no(s,n))break}else if(et(s)&&no(s,n))break}}};function Cd(e,n,t){const r=ee(e,t);if(r||ki(t))return{error:r,name:t};const o=t.split(".");for(;o.length;){const i=o.join("."),a=ee(n,i),s=ee(e,i);if(a&&!Array.isArray(a)&&t!==i)return{name:t};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};o.pop()}return{name:t}}var v2=(e,n,t,r)=>{t(e);const{name:o,...i}=e;return xt(i)||Object.keys(i).length>=Object.keys(n).length||Object.keys(i).find(a=>n[a]===(!r||Ut.all))},y2=(e,n,t)=>!e||!n||e===n||eo(e).some(r=>r&&(t?r===n:r.startsWith(n)||n.startsWith(r))),b2=(e,n,t,r,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(n||e):(t?r.isOnBlur:o.isOnBlur)?!e:(t?r.isOnChange:o.isOnChange)?e:!0,w2=(e,n)=>!rs(ee(e,n)).length&&it(e,n),_2=(e,n,t)=>{const r=eo(ee(e,t));return $e(r,"root",n[t]),$e(e,t,r),e},Mi=e=>ar(e);function kd(e,n,t="validate"){if(Mi(e)||Array.isArray(e)&&e.every(Mi)||At(e)&&!e)return{type:t,message:Mi(e)?e:"",ref:n}}var pn=e=>et(e)&&!Oi(e)?e:{value:e,message:""},Dd=async(e,n,t,r,o,i)=>{const{ref:a,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:m,validate:g,name:p,valueAsNumber:b,mount:S}=e._f,x=ee(t,p);if(!S||n.has(p))return{};const T=s?s[0]:a,D=v=>{o&&T.reportValidity&&(T.setCustomValidity(At(v)?"":v||""),T.reportValidity())},k={},O=us(a),R=Xn(a),U=O||R,H=(b||ls(a))&&tt(a.value)&&tt(x)||Ei(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,V=cs.bind(null,p,r,k),K=(v,$,M,L=hr.maxLength,Y=hr.minLength)=>{const J=v?$:M;k[p]={type:v?L:Y,message:J,ref:a,...V(v?L:Y,J)}};if(i?!Array.isArray(x)||!x.length:c&&(!U&&(H||gt(x))||At(x)&&!x||R&&!gd(s).isValid||O&&!bd(s).isValid)){const{value:v,message:$}=Mi(c)?{value:!!c,message:c}:pn(c);if(v&&(k[p]={type:hr.required,message:$,ref:T,...V(hr.required,$)},!r))return D($),k}if(!H&&(!gt(d)||!gt(f))){let v,$;const M=pn(f),L=pn(d);if(!gt(x)&&!isNaN(x)){const Y=a.valueAsNumber||x&&+x;gt(M.value)||(v=Y>M.value),gt(L.value)||($=Y<L.value)}else{const Y=a.valueAsDate||new Date(x),J=F=>new Date(new Date().toDateString()+" "+F),oe=a.type=="time",we=a.type=="week";ar(M.value)&&x&&(v=oe?J(x)>J(M.value):we?x>M.value:Y>new Date(M.value)),ar(L.value)&&x&&($=oe?J(x)<J(L.value):we?x<L.value:Y<new Date(L.value))}if((v||$)&&(K(!!v,M.message,L.message,hr.max,hr.min),!r))return D(k[p].message),k}if((l||u)&&!H&&(ar(x)||i&&Array.isArray(x))){const v=pn(l),$=pn(u),M=!gt(v.value)&&x.length>+v.value,L=!gt($.value)&&x.length<+$.value;if((M||L)&&(K(M,v.message,$.message),!r))return D(k[p].message),k}if(m&&!H&&ar(x)){const{value:v,message:$}=pn(m);if(Oi(v)&&!x.match(v)&&(k[p]={type:hr.pattern,message:$,ref:a,...V(hr.pattern,$)},!r))return D($),k}if(g){if(Wt(g)){const v=await g(x,t),$=kd(v,T);if($&&(k[p]={...$,...V(hr.validate,$.message)},!r))return D($.message),k}else if(et(g)){let v={};for(const $ in g){if(!xt(v)&&!r)break;const M=kd(await g[$](x,t),T,$);M&&(v={...M,...V($,M.message)},D(M.message),r&&(k[p]=v))}if(!xt(v)&&(k[p]={ref:T,...v},!r))return k}}return D(!0),k};const x2={mode:Ut.onSubmit,reValidateMode:Ut.onChange,shouldFocusError:!0};function S2(e={}){let n={...x2,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Wt(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},r={},o=et(n.defaultValues)||et(n.values)?st(n.defaultValues||n.values)||{}:{},i=n.shouldUnregister?{}:st(o),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:ud(),state:ud()},m=n.criteriaMode===Ut.all,g=C=>A=>{clearTimeout(l),l=setTimeout(C,A)},p=async C=>{if(!n.disabled&&(u.isValid||d.isValid||C)){const A=n.resolver?xt((await R()).errors):await H(r,!0);A!==t.isValid&&f.state.next({isValid:A})}},b=(C,A)=>{!n.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((C||Array.from(s.mount)).forEach(z=>{z&&(A?$e(t.validatingFields,z,A):it(t.validatingFields,z))}),f.state.next({validatingFields:t.validatingFields,isValidating:!xt(t.validatingFields)}))},S=(C,A=[],z,ne,X=!0,Q=!0)=>{if(ne&&z&&!n.disabled){if(a.action=!0,Q&&Array.isArray(ee(r,C))){const ce=z(ee(r,C),ne.argA,ne.argB);X&&$e(r,C,ce)}if(Q&&Array.isArray(ee(t.errors,C))){const ce=z(ee(t.errors,C),ne.argA,ne.argB);X&&$e(t.errors,C,ce),w2(t.errors,C)}if((u.touchedFields||d.touchedFields)&&Q&&Array.isArray(ee(t.touchedFields,C))){const ce=z(ee(t.touchedFields,C),ne.argA,ne.argB);X&&$e(t.touchedFields,C,ce)}(u.dirtyFields||d.dirtyFields)&&(t.dirtyFields=to(o,i)),f.state.next({name:C,isDirty:K(C,A),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else $e(i,C,A)},x=(C,A)=>{$e(t.errors,C,A),f.state.next({errors:t.errors})},T=C=>{t.errors=C,f.state.next({errors:t.errors,isValid:!1})},D=(C,A,z,ne)=>{const X=ee(r,C);if(X){const Q=ee(i,C,tt(z)?ee(o,C):z);tt(Q)||ne&&ne.defaultChecked||A?$e(i,C,A?Q:wd(X._f)):M(C,Q),a.mount&&p()}},k=(C,A,z,ne,X)=>{let Q=!1,ce=!1;const Ee={name:C};if(!n.disabled){if(!z||ne){(u.isDirty||d.isDirty)&&(ce=t.isDirty,t.isDirty=Ee.isDirty=K(),Q=ce!==Ee.isDirty);const ze=mr(ee(o,C),A);ce=!!ee(t.dirtyFields,C),ze?it(t.dirtyFields,C):$e(t.dirtyFields,C,!0),Ee.dirtyFields=t.dirtyFields,Q=Q||(u.dirtyFields||d.dirtyFields)&&ce!==!ze}if(z){const ze=ee(t.touchedFields,C);ze||($e(t.touchedFields,C,z),Ee.touchedFields=t.touchedFields,Q=Q||(u.touchedFields||d.touchedFields)&&ze!==z)}Q&&X&&f.state.next(Ee)}return Q?Ee:{}},O=(C,A,z,ne)=>{const X=ee(t.errors,C),Q=(u.isValid||d.isValid)&&At(A)&&t.isValid!==A;if(n.delayError&&z?(c=g(()=>x(C,z)),c(n.delayError)):(clearTimeout(l),c=null,z?$e(t.errors,C,z):it(t.errors,C)),(z?!mr(X,z):X)||!xt(ne)||Q){const ce={...ne,...Q&&At(A)?{isValid:A}:{},errors:t.errors,name:C};t={...t,...ce},f.state.next(ce)}},R=async C=>{b(C,!0);const A=await n.resolver(i,n.context,h2(C||s.mount,r,n.criteriaMode,n.shouldUseNativeValidation));return b(C),A},U=async C=>{const{errors:A}=await R(C);if(C)for(const z of C){const ne=ee(A,z);ne?$e(t.errors,z,ne):it(t.errors,z)}else t.errors=A;return A},H=async(C,A,z={valid:!0})=>{for(const ne in C){const X=C[ne];if(X){const{_f:Q,...ce}=X;if(Q){const Ee=s.array.has(Q.name),ze=X._f&&m2(X._f);ze&&u.validatingFields&&b([ne],!0);const vt=await Dd(X,s.disabled,i,m,n.shouldUseNativeValidation&&!A,Ee);if(ze&&u.validatingFields&&b([ne]),vt[Q.name]&&(z.valid=!1,A))break;!A&&(ee(vt,Q.name)?Ee?_2(t.errors,vt,Q.name):$e(t.errors,Q.name,vt[Q.name]):it(t.errors,Q.name))}!xt(ce)&&await H(ce,A,z)}}return z.valid},V=()=>{for(const C of s.unMount){const A=ee(r,C);A&&(A._f.refs?A._f.refs.every(z=>!ds(z)):!ds(A._f.ref))&&ue(C)}s.unMount=new Set},K=(C,A)=>!n.disabled&&(C&&A&&$e(i,C,A),!mr(F(),o)),v=(C,A,z)=>ld(C,s,{...a.mount?i:tt(A)?o:ar(C)?{[C]:A}:A},z,A),$=C=>rs(ee(a.mount?i:o,C,n.shouldUnregister?ee(o,C,[]):[])),M=(C,A,z={})=>{const ne=ee(r,C);let X=A;if(ne){const Q=ne._f;Q&&(!Q.disabled&&$e(i,C,vd(A,Q)),X=Ei(Q.ref)&>(A)?"":A,dd(Q.ref)?[...Q.ref.options].forEach(ce=>ce.selected=X.includes(ce.value)):Q.refs?Xn(Q.ref)?Q.refs.forEach(ce=>{(!ce.defaultChecked||!ce.disabled)&&(Array.isArray(X)?ce.checked=!!X.find(Ee=>Ee===ce.value):ce.checked=X===ce.value||!!X)}):Q.refs.forEach(ce=>ce.checked=ce.value===X):ls(Q.ref)?Q.ref.value="":(Q.ref.value=X,Q.ref.type||f.state.next({name:C,values:st(i)})))}(z.shouldDirty||z.shouldTouch)&&k(C,X,z.shouldTouch,z.shouldDirty,!0),z.shouldValidate&&we(C)},L=(C,A,z)=>{for(const ne in A){if(!A.hasOwnProperty(ne))return;const X=A[ne],Q=C+"."+ne,ce=ee(r,Q);(s.array.has(C)||et(X)||ce&&!ce._f)&&!Vr(X)?L(Q,X,z):M(Q,X,z)}},Y=(C,A,z={})=>{const ne=ee(r,C),X=s.array.has(C),Q=st(A);$e(i,C,Q),X?(f.array.next({name:C,values:st(i)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&z.shouldDirty&&f.state.next({name:C,dirtyFields:to(o,i),isDirty:K(C,Q)})):ne&&!ne._f&&!gt(Q)?L(C,Q,z):M(C,Q,z),Sd(C,s)&&f.state.next({...t,name:C}),f.state.next({name:a.mount?C:void 0,values:st(i)})},J=async C=>{a.mount=!0;const A=C.target;let z=A.name,ne=!0;const X=ee(r,z),Q=ze=>{ne=Number.isNaN(ze)||Vr(ze)&&isNaN(ze.getTime())||mr(ze,ee(i,z,ze))},ce=_d(n.mode),Ee=_d(n.reValidateMode);if(X){let ze,vt;const Ur=A.type?wd(X._f):ad(C),sr=C.type===Di.BLUR||C.type===Di.FOCUS_OUT,$s=!g2(X._f)&&!n.resolver&&!ee(t.errors,z)&&!X._f.deps||b2(sr,ee(t.touchedFields,z),t.isSubmitted,Ee,ce),lo=Sd(z,s,sr);$e(i,z,Ur),sr?(!A||!A.readOnly)&&(X._f.onBlur&&X._f.onBlur(C),c&&c(0)):X._f.onChange&&X._f.onChange(C);const uo=k(z,Ur,sr),js=!xt(uo)||lo;if(!sr&&f.state.next({name:z,type:C.type,values:st(i)}),$s)return(u.isValid||d.isValid)&&(n.mode==="onBlur"?sr&&p():sr||p()),js&&f.state.next({name:z,...lo?{}:uo});if(!sr&&lo&&f.state.next({...t}),n.resolver){const{errors:Ui}=await R([z]);if(Q(Ur),ne){const Ls=Cd(t.errors,r,z),bn=Cd(Ui,r,Ls.name||z);ze=bn.error,z=bn.name,vt=xt(Ui)}}else b([z],!0),ze=(await Dd(X,s.disabled,i,m,n.shouldUseNativeValidation))[z],b([z]),Q(Ur),ne&&(ze?vt=!1:(u.isValid||d.isValid)&&(vt=await H(r,!0)));ne&&(X._f.deps&&we(X._f.deps),O(z,vt,ze,uo))}},oe=(C,A)=>{if(ee(t.errors,A)&&C.focus)return C.focus(),1},we=async(C,A={})=>{let z,ne;const X=eo(C);if(n.resolver){const Q=await U(tt(C)?C:X);z=xt(Q),ne=C?!X.some(ce=>ee(Q,ce)):z}else C?(ne=(await Promise.all(X.map(async Q=>{const ce=ee(r,Q);return await H(ce&&ce._f?{[Q]:ce}:ce)}))).every(Boolean),!(!ne&&!t.isValid)&&p()):ne=z=await H(r);return f.state.next({...!ar(C)||(u.isValid||d.isValid)&&z!==t.isValid?{}:{name:C},...n.resolver||!C?{isValid:z}:{},errors:t.errors}),A.shouldFocus&&!ne&&no(r,oe,C?X:s.mount),ne},F=C=>{const A={...a.mount?i:o};return tt(C)?A:ar(C)?ee(A,C):C.map(z=>ee(A,z))},q=(C,A)=>({invalid:!!ee((A||t).errors,C),isDirty:!!ee((A||t).dirtyFields,C),error:ee((A||t).errors,C),isValidating:!!ee(t.validatingFields,C),isTouched:!!ee((A||t).touchedFields,C)}),de=C=>{C&&eo(C).forEach(A=>it(t.errors,A)),f.state.next({errors:C?t.errors:{}})},he=(C,A,z)=>{const ne=(ee(r,C,{_f:{}})._f||{}).ref,X=ee(t.errors,C)||{},{ref:Q,message:ce,type:Ee,...ze}=X;$e(t.errors,C,{...ze,...A,ref:ne}),f.state.next({name:C,errors:t.errors,isValid:!1}),z&&z.shouldFocus&&ne&&ne.focus&&ne.focus()},fe=(C,A)=>Wt(C)?f.state.subscribe({next:z=>"values"in z&&C(v(void 0,A),z)}):v(C,A,!0),G=C=>f.state.subscribe({next:A=>{y2(C.name,A.name,C.exact)&&v2(A,C.formState||u,Hi,C.reRenderRoot)&&C.callback({values:{...i},...t,...A,defaultValues:o})}}).unsubscribe,ae=C=>(a.mount=!0,d={...d,...C.formState},G({...C,formState:d})),ue=(C,A={})=>{for(const z of C?eo(C):s.mount)s.mount.delete(z),s.array.delete(z),A.keepValue||(it(r,z),it(i,z)),!A.keepError&&it(t.errors,z),!A.keepDirty&&it(t.dirtyFields,z),!A.keepTouched&&it(t.touchedFields,z),!A.keepIsValidating&&it(t.validatingFields,z),!n.shouldUnregister&&!A.keepDefaultValue&&it(o,z);f.state.next({values:st(i)}),f.state.next({...t,...A.keepDirty?{isDirty:K()}:{}}),!A.keepIsValid&&p()},me=({disabled:C,name:A})=>{(At(C)&&a.mount||C||s.disabled.has(A))&&(C?s.disabled.add(A):s.disabled.delete(A))},ve=(C,A={})=>{let z=ee(r,C);const ne=At(A.disabled)||At(n.disabled);return $e(r,C,{...z||{},_f:{...z&&z._f?z._f:{ref:{name:C}},name:C,mount:!0,...A}}),s.mount.add(C),z?me({disabled:At(A.disabled)?A.disabled:n.disabled,name:C}):D(C,!0,A.value),{...ne?{disabled:A.disabled||n.disabled}:{},...n.progressive?{required:!!A.required,min:ro(A.min),max:ro(A.max),minLength:ro(A.minLength),maxLength:ro(A.maxLength),pattern:ro(A.pattern)}:{},name:C,onChange:J,onBlur:J,ref:X=>{if(X){ve(C,A),z=ee(r,C);const Q=tt(X.value)&&X.querySelectorAll&&X.querySelectorAll("input,select,textarea")[0]||X,ce=d2(Q),Ee=z._f.refs||[];if(ce?Ee.find(ze=>ze===Q):Q===z._f.ref)return;$e(r,C,{_f:{...z._f,...ce?{refs:[...Ee.filter(ds),Q,...Array.isArray(ee(o,C))?[{}]:[]],ref:{type:Q.type,name:C}}:{ref:Q}}}),D(C,!1,void 0,Q)}else z=ee(r,C,{}),z._f&&(z._f.mount=!1),(n.shouldUnregister||A.shouldUnregister)&&!(sd(s.array,C)&&a.action)&&s.unMount.add(C)}}},pe=()=>n.shouldFocusError&&no(r,oe,s.mount),Ye=C=>{At(C)&&(f.state.next({disabled:C}),no(r,(A,z)=>{const ne=ee(r,z);ne&&(A.disabled=ne._f.disabled||C,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(X=>{X.disabled=ne._f.disabled||C}))},0,!1))},P=(C,A)=>async z=>{let ne;z&&(z.preventDefault&&z.preventDefault(),z.persist&&z.persist());let X=st(i);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:Q,values:ce}=await R();t.errors=Q,X=st(ce)}else await H(r);if(s.disabled.size)for(const Q of s.disabled)it(X,Q);if(it(t.errors,"root"),xt(t.errors)){f.state.next({errors:{}});try{await C(X,z)}catch(Q){ne=Q}}else A&&await A({...t.errors},z),pe(),setTimeout(pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xt(t.errors)&&!ne,submitCount:t.submitCount+1,errors:t.errors}),ne)throw ne},te=(C,A={})=>{ee(r,C)&&(tt(A.defaultValue)?Y(C,st(ee(o,C))):(Y(C,A.defaultValue),$e(o,C,st(A.defaultValue))),A.keepTouched||it(t.touchedFields,C),A.keepDirty||(it(t.dirtyFields,C),t.isDirty=A.defaultValue?K(C,st(ee(o,C))):K()),A.keepError||(it(t.errors,C),u.isValid&&p()),f.state.next({...t}))},_e=(C,A={})=>{const z=C?st(C):o,ne=st(z),X=xt(C),Q=X?o:ne;if(A.keepDefaultValues||(o=z),!A.keepValues){if(A.keepDirtyValues){const ce=new Set([...s.mount,...Object.keys(to(o,i))]);for(const Ee of Array.from(ce))ee(t.dirtyFields,Ee)?$e(Q,Ee,ee(i,Ee)):Y(Ee,ee(Q,Ee))}else{if(ts&&tt(C))for(const ce of s.mount){const Ee=ee(r,ce);if(Ee&&Ee._f){const ze=Array.isArray(Ee._f.refs)?Ee._f.refs[0]:Ee._f.ref;if(Ei(ze)){const vt=ze.closest("form");if(vt){vt.reset();break}}}}if(A.keepFieldsRef)for(const ce of s.mount)Y(ce,ee(Q,ce));else r={}}i=n.shouldUnregister?A.keepDefaultValues?st(o):{}:st(Q),f.array.next({values:{...Q}}),f.state.next({values:{...Q}})}s={mount:A.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!A.keepIsValid||!!A.keepDirtyValues,a.watch=!!n.shouldUnregister,f.state.next({submitCount:A.keepSubmitCount?t.submitCount:0,isDirty:X?!1:A.keepDirty?t.isDirty:!!(A.keepDefaultValues&&!mr(C,o)),isSubmitted:A.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:X?{}:A.keepDirtyValues?A.keepDefaultValues&&i?to(o,i):t.dirtyFields:A.keepDefaultValues&&C?to(o,C):A.keepDirty?t.dirtyFields:{},touchedFields:A.keepTouched?t.touchedFields:{},errors:A.keepErrors?t.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ce=(C,A)=>_e(Wt(C)?C(i):C,A),ct=(C,A={})=>{const z=ee(r,C),ne=z&&z._f;if(ne){const X=ne.refs?ne.refs[0]:ne.ref;X.focus&&(X.focus(),A.shouldSelect&&Wt(X.select)&&X.select())}},Hi=C=>{t={...t,...C}},Hr={control:{register:ve,unregister:ue,getFieldState:q,handleSubmit:P,setError:he,_subscribe:G,_runSchema:R,_focusError:pe,_getWatch:v,_getDirty:K,_setValid:p,_setFieldArray:S,_setDisabledField:me,_setErrors:T,_getFieldArray:$,_reset:_e,_resetDefaultValues:()=>Wt(n.defaultValues)&&n.defaultValues().then(C=>{Ce(C,n.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:Ye,_subjects:f,_proxyFormState:u,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(C){a=C},get _defaultValues(){return o},get _names(){return s},set _names(C){s=C},get _formState(){return t},get _options(){return n},set _options(C){n={...n,...C}}},subscribe:ae,trigger:we,register:ve,handleSubmit:P,watch:fe,setValue:Y,getValues:F,reset:Ce,resetField:te,clearErrors:de,unregister:ue,setError:he,setFocus:ct,getFieldState:q};return{...Hr,formControl:Hr}}function Ed(e={}){const n=w.useRef(void 0),t=w.useRef(void 0),[r,o]=w.useState({isDirty:!1,isValidating:!1,isLoading:Wt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Wt(e.defaultValues)?void 0:e.defaultValues});if(!n.current)if(e.formControl)n.current={...e.formControl,formState:r},e.defaultValues&&!Wt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...s}=S2(e);n.current={...s,formState:r}}const i=n.current.control;return i._options=e,as(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(s=>({...s,isReady:!0})),i._formState.isReady=!0,a},[i]),w.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),w.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),w.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),w.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),w.useEffect(()=>{e.values&&!mr(e.values,t.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),t.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[i,e.values]),w.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),n.current.formState=cd(r,i),n.current}const Td=(e,n,t)=>{if(e&&"reportValidity"in e){const r=ee(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},fs=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?Td(r.ref,t,e):r&&r.refs&&r.refs.forEach(o=>Td(o,t,e))}},Od=(e,n)=>{n.shouldUseNativeValidation&&fs(e,n);const t={};for(const r in e){const o=ee(n.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(C2(n.names||Object.keys(e),r)){const a=Object.assign({},ee(t,r));$e(a,"root",i),$e(t,r,a)}else $e(t,r,i)}return t},C2=(e,n)=>{const t=Md(n);return e.some(r=>Md(r).match(`^${t}\\.\\d+`))};function Md(e){return e.replace(/\]|\[/g,"")}function B(e,n,t){function r(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(e),n(s,c);for(const u in a.prototype)u in s||Object.defineProperty(s,u,{value:a.prototype[u].bind(s)});s._zod.constr=a,s._zod.def=c}const o=t?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(s){var c;const l=t?.Parent?new i:this;r(l,s),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>t?.Parent&&s instanceof t.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class hn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ad extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Pd={};function Fr(e){return Pd}function k2(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function ps(e,n){return typeof n=="bigint"?n.toString():n}function hs(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function ms(e){return e==null}function gs(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function D2(e,n){const t=(e.toString().split(".")[1]||"").length,r=n.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const i=t>o?t:o,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(n.toFixed(i).replace(".",""));return a%s/10**i}const Id=Symbol("evaluating");function Fe(e,n,t){let r;Object.defineProperty(e,n,{get(){if(r!==Id)return r===void 0&&(r=Id,r=t()),r},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function E2(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Dr(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function mn(...e){const n={};for(const t of e){const r=Object.getOwnPropertyDescriptors(t);Object.assign(n,r)}return Object.defineProperties({},n)}function Nd(e){return JSON.stringify(e)}const Rd="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ai(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const T2=hs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function oo(e){if(Ai(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(Ai(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function $d(e){return oo(e)?{...e}:e}const O2=new Set(["string","number","symbol"]);function gn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Er(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t?.parent)&&(r._zod.parent=e),r}function le(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function M2(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const A2={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function P2(e,n){const t=e._zod.def,r=mn(e._zod.def,{get shape(){const o={};for(const i in n){if(!(i in t.shape))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=t.shape[i])}return Dr(this,"shape",o),o},checks:[]});return Er(e,r)}function I2(e,n){const t=e._zod.def,r=mn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const i in n){if(!(i in t.shape))throw new Error(`Unrecognized key: "${i}"`);n[i]&&delete o[i]}return Dr(this,"shape",o),o},checks:[]});return Er(e,r)}function N2(e,n){if(!oo(n))throw new Error("Invalid input to extend: expected a plain object");const t=e._zod.def.checks;if(t&&t.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=mn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...n};return Dr(this,"shape",i),i},checks:[]});return Er(e,o)}function R2(e,n){if(!oo(n))throw new Error("Invalid input to safeExtend: expected a plain object");const t={...e._zod.def,get shape(){const r={...e._zod.def.shape,...n};return Dr(this,"shape",r),r},checks:e._zod.def.checks};return Er(e,t)}function $2(e,n){const t=mn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return Dr(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return Er(e,t)}function j2(e,n,t){const r=mn(n._zod.def,{get shape(){const o=n._zod.def.shape,i={...o};if(t)for(const a in t){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=e?new e({type:"optional",innerType:o[a]}):o[a])}else for(const a in o)i[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return Dr(this,"shape",i),i},checks:[]});return Er(n,r)}function L2(e,n,t){const r=mn(n._zod.def,{get shape(){const o=n._zod.def.shape,i={...o};if(t)for(const a in t){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return Dr(this,"shape",i),i},checks:[]});return Er(n,r)}function vn(e,n=0){if(e.aborted===!0)return!0;for(let t=n;t<e.issues.length;t++)if(e.issues[t]?.continue!==!0)return!0;return!1}function jd(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function Pi(e){return typeof e=="string"?e:e?.message}function Yr(e,n,t){const r={...e,path:e.path??[]};if(!e.message){const o=Pi(e.inst?._zod.def?.error?.(e))??Pi(n?.error?.(e))??Pi(t.customError?.(e))??Pi(t.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function vs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function io(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const Ld=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,ps,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ys=B("$ZodError",Ld),Ii=B("$ZodError",Ld,{Parent:Error});function z2(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function B2(e,n){const t=n||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s}));else if(a.code==="invalid_key")o({issues:a.issues});else if(a.code==="invalid_element")o({issues:a.issues});else if(a.path.length===0)r._errors.push(t(a));else{let s=r,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(e),r}const Ni=e=>(n,t,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=n._zod.run({value:t,issues:[]},i);if(a instanceof Promise)throw new hn;if(a.issues.length){const s=new(o?.Err??e)(a.issues.map(c=>Yr(c,i,Fr())));throw Rd(s,o?.callee),s}return a.value},V2=Ni(Ii),Ri=e=>async(n,t,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let a=n._zod.run({value:t,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(o?.Err??e)(a.issues.map(c=>Yr(c,i,Fr())));throw Rd(s,o?.callee),s}return a.value},F2=Ri(Ii),$i=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new hn;return i.issues.length?{success:!1,error:new(e??ys)(i.issues.map(a=>Yr(a,o,Fr())))}:{success:!0,data:i.value}},Y2=$i(Ii),ji=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Yr(a,o,Fr())))}:{success:!0,data:i.value}},H2=ji(Ii),U2=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ni(e)(n,t,o)},W2=e=>(n,t,r)=>Ni(e)(n,t,r),Z2=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ri(e)(n,t,o)},q2=e=>async(n,t,r)=>Ri(e)(n,t,r),K2=e=>(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $i(e)(n,t,o)},G2=e=>(n,t,r)=>$i(e)(n,t,r),Q2=e=>async(n,t,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ji(e)(n,t,o)},J2=e=>async(n,t,r)=>ji(e)(n,t,r),X2=/^[cC][^\s-]{8,}$/,e1=/^[0-9a-z]+$/,t1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,r1=/^[0-9a-vA-V]{20}$/,n1=/^[A-Za-z0-9]{27}$/,o1=/^[a-zA-Z0-9_-]{21}$/,i1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,a1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,zd=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,s1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,c1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function l1(){return new RegExp(c1,"u")}const u1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,d1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,f1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,p1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,h1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bd=/^[A-Za-z0-9_-]*$/,m1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,g1=/^\+(?:[0-9]){6,14}[0-9]$/,Vd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",v1=new RegExp(`^${Vd}$`);function Fd(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function y1(e){return new RegExp(`^${Fd(e)}$`)}function b1(e){const n=Fd({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${Vd}T(?:${r})$`)}const w1=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},_1=/^\d+$/,x1=/^-?\d+(?:\.\d+)?/i,S1=/true|false/i,C1=/^[^A-Z]*$/,k1=/^[^a-z]*$/,St=B("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),Yd={number:"number",bigint:"bigint",object:"date"},Hd=B("$ZodCheckLessThan",(e,n)=>{St.init(e,n);const t=Yd[typeof n.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<i&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:t,code:"too_big",maximum:n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Ud=B("$ZodCheckGreaterThan",(e,n)=>{St.init(e,n);const t=Yd[typeof n.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>i&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:t,code:"too_small",minimum:n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),D1=B("$ZodCheckMultipleOf",(e,n)=>{St.init(e,n),e._zod.onattach.push(t=>{var r;(r=t._zod.bag).multipleOf??(r.multipleOf=n.value)}),e._zod.check=t=>{if(typeof t.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?t.value%n.value===BigInt(0):D2(t.value,n.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:n.value,input:t.value,inst:e,continue:!n.abort})}}),E1=B("$ZodCheckNumberFormat",(e,n)=>{St.init(e,n),n.format=n.format||"float64";const t=n.format?.includes("int"),r=t?"int":"number",[o,i]=A2[n.format];e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=n.format,s.minimum=o,s.maximum=i,t&&(s.pattern=_1)}),e._zod.check=a=>{const s=a.value;if(t){if(!Number.isInteger(s)){a.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!n.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!n.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!n.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:e})}}),T1=B("$ZodCheckMaxLength",(e,n)=>{var t;St.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const a=vs(o);r.issues.push({origin:a,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),O1=B("$ZodCheckMinLength",(e,n)=>{var t;St.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const a=vs(o);r.issues.push({origin:a,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),M1=B("$ZodCheckLengthEquals",(e,n)=>{var t;St.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!ms(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===n.length)return;const a=vs(o),s=i>n.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),Li=B("$ZodCheckStringFormat",(e,n)=>{var t,r;St.init(e,n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),A1=B("$ZodCheckRegex",(e,n)=>{Li.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),P1=B("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=C1),Li.init(e,n)}),I1=B("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=k1),Li.init(e,n)}),N1=B("$ZodCheckIncludes",(e,n)=>{St.init(e,n);const t=gn(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),R1=B("$ZodCheckStartsWith",(e,n)=>{St.init(e,n);const t=new RegExp(`^${gn(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),$1=B("$ZodCheckEndsWith",(e,n)=>{St.init(e,n);const t=new RegExp(`.*${gn(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),j1=B("$ZodCheckOverwrite",(e,n)=>{St.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class L1{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
|
|
158
|
+
`).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const n=Function,t=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new n(...t,o.join(`
|
|
159
|
+
`))}}const z1={major:4,minor:1,patch:5},Qe=B("$ZodType",(e,n)=>{var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=z1;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,s,c)=>{let l=vn(a),u;for(const d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(l)continue;const f=a.issues.length,m=d._zod.check(a);if(m instanceof Promise&&c?.async===!1)throw new hn;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,a.issues.length!==f&&(l||(l=vn(a,f)))});else{if(a.issues.length===f)continue;l||(l=vn(a,f))}}return u?u.then(()=>a):a},i=(a,s,c)=>{if(vn(a))return a.aborted=!0,a;const l=o(s,r,c);if(l instanceof Promise){if(c.async===!1)throw new hn;return l.then(u=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){const l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(u=>i(u,a,s)):i(l,a,s)}const c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new hn;return c.then(l=>o(l,r,s))}return o(c,r,s)}}e["~standard"]={validate:o=>{try{const i=Y2(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return H2(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),bs=B("$ZodString",(e,n)=>{Qe.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??w1(e._zod.bag),e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:e}),t}}),Ze=B("$ZodStringFormat",(e,n)=>{Li.init(e,n),bs.init(e,n)}),B1=B("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=a1),Ze.init(e,n)}),V1=B("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=zd(r))}else n.pattern??(n.pattern=zd());Ze.init(e,n)}),F1=B("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=s1),Ze.init(e,n)}),Y1=B("$ZodURL",(e,n)=>{Ze.init(e,n),e._zod.check=t=>{try{const r=t.value.trim(),o=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:m1.source,input:t.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort})),n.normalize?t.value=o.href:t.value=r;return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),H1=B("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=l1()),Ze.init(e,n)}),U1=B("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=o1),Ze.init(e,n)}),W1=B("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=X2),Ze.init(e,n)}),Z1=B("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=e1),Ze.init(e,n)}),q1=B("$ZodULID",(e,n)=>{n.pattern??(n.pattern=t1),Ze.init(e,n)}),K1=B("$ZodXID",(e,n)=>{n.pattern??(n.pattern=r1),Ze.init(e,n)}),G1=B("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=n1),Ze.init(e,n)}),Q1=B("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=b1(n)),Ze.init(e,n)}),J1=B("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=v1),Ze.init(e,n)}),X1=B("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=y1(n)),Ze.init(e,n)}),ew=B("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=i1),Ze.init(e,n)}),tw=B("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=u1),Ze.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv4"})}),rw=B("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=d1),Ze.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv6"}),e._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}}),nw=B("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=f1),Ze.init(e,n)}),ow=B("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=p1),Ze.init(e,n),e._zod.check=t=>{const[r,o]=t.value.split("/");try{if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}}});function Wd(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const iw=B("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=h1),Ze.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64"}),e._zod.check=t=>{Wd(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}});function aw(e){if(!Bd.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return Wd(t)}const sw=B("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Bd),Ze.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64url"}),e._zod.check=t=>{aw(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),cw=B("$ZodE164",(e,n)=>{n.pattern??(n.pattern=g1),Ze.init(e,n)});function lw(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const uw=B("$ZodJWT",(e,n)=>{Ze.init(e,n),e._zod.check=t=>{lw(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),Zd=B("$ZodNumber",(e,n)=>{Qe.init(e,n),e._zod.pattern=e._zod.bag.pattern??x1,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=Number(t.value)}catch{}const o=t.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return t;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return t.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),t}}),dw=B("$ZodNumber",(e,n)=>{E1.init(e,n),Zd.init(e,n)}),fw=B("$ZodBoolean",(e,n)=>{Qe.init(e,n),e._zod.pattern=S1,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=!!t.value}catch{}const o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),t}}),pw=B("$ZodUnknown",(e,n)=>{Qe.init(e,n),e._zod.parse=t=>t}),hw=B("$ZodNever",(e,n)=>{Qe.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function qd(e,n,t){e.issues.length&&n.issues.push(...jd(t,e.issues)),n.value[t]=e.value}const mw=B("$ZodArray",(e,n)=>{Qe.init(e,n),e._zod.parse=(t,r)=>{const o=t.value;if(!Array.isArray(o))return t.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),t;t.value=Array(o.length);const i=[];for(let a=0;a<o.length;a++){const s=o[a],c=n.element._zod.run({value:s,issues:[]},r);c instanceof Promise?i.push(c.then(l=>qd(l,t,a))):qd(c,t,a)}return i.length?Promise.all(i).then(()=>t):t}});function zi(e,n,t,r){e.issues.length&&n.issues.push(...jd(t,e.issues)),e.value===void 0?t in r&&(n.value[t]=void 0):n.value[t]=e.value}function Kd(e){const n=Object.keys(e.shape);for(const r of n)if(!e.shape[r]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const t=M2(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(t)}}function Gd(e,n,t,r,o,i){const a=[],s=o.keySet,c=o.catchall._zod,l=c.def.type;for(const u of Object.keys(n)){if(s.has(u))continue;if(l==="never"){a.push(u);continue}const d=c.run({value:n[u],issues:[]},r);d instanceof Promise?e.push(d.then(f=>zi(f,t,u,n))):zi(d,t,u,n)}return a.length&&t.issues.push({code:"unrecognized_keys",keys:a,input:n,inst:i}),e.length?Promise.all(e).then(()=>t):t}const gw=B("$ZodObject",(e,n)=>{Qe.init(e,n);const t=hs(()=>Kd(n));Fe(e._zod,"propValues",()=>{const a=n.shape,s={};for(const c in a){const l=a[c]._zod;if(l.values){s[c]??(s[c]=new Set);for(const u of l.values)s[c].add(u)}}return s});const r=Ai,o=n.catchall;let i;e._zod.parse=(a,s)=>{i??(i=t.value);const c=a.value;if(!r(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};const l=[],u=i.shape;for(const d of i.keys){const m=u[d]._zod.run({value:c[d],issues:[]},s);m instanceof Promise?l.push(m.then(g=>zi(g,a,d,c))):zi(m,a,d,c)}return o?Gd(l,c,a,s,t.value,e):l.length?Promise.all(l).then(()=>a):a}}),vw=B("$ZodObjectJIT",(e,n)=>{gw.init(e,n);const t=e._zod.parse,r=hs(()=>Kd(n)),o=f=>{const m=new L1(["shape","payload","ctx"]),g=r.value,p=T=>{const D=Nd(T);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};m.write("const input = payload.value;");const b=Object.create(null);let S=0;for(const T of g.keys)b[T]=`key_${S++}`;m.write("const newResult = {}");for(const T of g.keys){const D=b[T],k=Nd(T);m.write(`const ${D} = ${p(T)};`),m.write(`
|
|
160
160
|
if (${D}.issues.length) {
|
|
161
161
|
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
162
162
|
...iss,
|
|
@@ -171,6 +171,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${n}Chann
|
|
|
171
171
|
} else {
|
|
172
172
|
newResult[${k}] = ${D}.value;
|
|
173
173
|
}
|
|
174
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const S=m.compile();return(T,D)=>S(f,T,D)};let a;const i=Aa,s=!Md.jitless,l=s&&S2.value,u=n.catchall;let d;e._zod.parse=(f,m)=>{d??(d=r.value);const g=f.value;return i(g)?s&&l&&m?.async===!1&&m.jitless!==!0?(a||(a=o(n.shape)),f=a(f,m),u?qd([],g,f,m,d,e):f):t(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Kd(e,n,t,r){for(const a of e)if(a.issues.length===0)return n.value=a.value,n;const o=e.filter(a=>!vn(a));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(a=>a.issues.map(i=>Fr(i,r,Vr())))}),n)}const pw=V("$ZodUnion",(e,n)=>{Ge.init(e,n),Ve(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ve(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ve(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Ve(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>ms(a.source)).join("|")})$`)}});const t=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(o,a)=>{if(t)return r(o,a);let i=!1;const s=[];for(const c of n.options){const l=c._zod.run({value:o.value,issues:[]},a);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(c=>Kd(c,o,e,a)):Kd(s,o,e,a)}}),hw=V("$ZodIntersection",(e,n)=>{Ge.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,a=n.left._zod.run({value:o,issues:[]},r),i=n.right._zod.run({value:o,issues:[]},r);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([c,l])=>Gd(t,c,l)):Gd(t,a,i)}});function bs(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(oo(e)&&oo(n)){const t=Object.keys(n),r=Object.keys(e).filter(a=>t.indexOf(a)!==-1),o={...e,...n};for(const a of r){const i=bs(e[a],n[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};o[a]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],a=n[r],i=bs(o,a);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};t.push(i.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Gd(e,n,t){if(n.issues.length&&e.issues.push(...n.issues),t.issues.length&&e.issues.push(...t.issues),vn(e))return e;const r=bs(n.value,t.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const mw=V("$ZodEnum",(e,n)=>{Ge.init(e,n);const t=w2(n.entries),r=new Set(t);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.filter(o=>C2.has(typeof o)).map(o=>typeof o=="string"?gn(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t,input:i,inst:e}),o}}),gw=V("$ZodLiteral",(e,n)=>{if(Ge.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(n.values),e._zod.pattern=new RegExp(`^(${n.values.map(t=>typeof t=="string"?gn(t):t?gn(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:n.values,input:o,inst:e}),t}}),vw=V("$ZodTransform",(e,n)=>{Ge.init(e,n),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Od(e.constructor.name);const o=n.transform(t.value,t);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(t.value=i,t));if(o instanceof Promise)throw new hn;return t.value=o,t}});function Qd(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const yw=V("$ZodOptional",(e,n)=>{Ge.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Ve(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Ve(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ms(t.source)})?$`):void 0}),e._zod.parse=(t,r)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(a=>Qd(a,t.value)):Qd(o,t.value)}return t.value===void 0?t:n.innerType._zod.run(t,r)}}),bw=V("$ZodNullable",(e,n)=>{Ge.init(e,n),Ve(e._zod,"optin",()=>n.innerType._zod.optin),Ve(e._zod,"optout",()=>n.innerType._zod.optout),Ve(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ms(t.source)}|null)$`):void 0}),Ve(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),ww=V("$ZodDefault",(e,n)=>{Ge.init(e,n),e._zod.optin="optional",Ve(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(a=>Jd(a,n)):Jd(o,n)}});function Jd(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const _w=V("$ZodPrefault",(e,n)=>{Ge.init(e,n),e._zod.optin="optional",Ve(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>(r.direction==="backward"||t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),xw=V("$ZodNonOptional",(e,n)=>{Ge.init(e,n),Ve(e._zod,"values",()=>{const t=n.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(a=>Xd(a,e)):Xd(o,e)}});function Xd(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const Sw=V("$ZodCatch",(e,n)=>{Ge.init(e,n),Ve(e._zod,"optin",()=>n.innerType._zod.optin),Ve(e._zod,"optout",()=>n.innerType._zod.optout),Ve(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(a=>(t.value=a.value,a.issues.length&&(t.value=n.catchValue({...t,error:{issues:a.issues.map(i=>Fr(i,r,Vr()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=n.catchValue({...t,error:{issues:o.issues.map(a=>Fr(a,r,Vr()))},input:t.value}),t.issues=[]),t)}}),Cw=V("$ZodPipe",(e,n)=>{Ge.init(e,n),Ve(e._zod,"values",()=>n.in._zod.values),Ve(e._zod,"optin",()=>n.in._zod.optin),Ve(e._zod,"optout",()=>n.out._zod.optout),Ve(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(t,r)=>{if(r.direction==="backward"){const a=n.out._zod.run(t,r);return a instanceof Promise?a.then(i=>Ba(i,n.in,r)):Ba(a,n.in,r)}const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(a=>Ba(a,n.out,r)):Ba(o,n.out,r)}});function Ba(e,n,t){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},t)}const kw=V("$ZodReadonly",(e,n)=>{Ge.init(e,n),Ve(e._zod,"propValues",()=>n.innerType._zod.propValues),Ve(e._zod,"values",()=>n.innerType._zod.values),Ve(e._zod,"optin",()=>n.innerType._zod.optin),Ve(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(ef):ef(o)}});function ef(e){return e.value=Object.freeze(e.value),e}const Dw=V("$ZodCustom",(e,n)=>{xt.init(e,n),Ge.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(a=>tf(a,t,r,e));tf(o,t,r,e)}});function tf(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(ao(o))}}class Ew{constructor(){this._map=new Map,this._idmap=new Map}add(n,...t){const r=t[0];if(this._map.set(n,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const o={...r,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Tw(){return new Ew}const Va=Tw();function Ow(e,n){return new e({type:"string",...ue(n)})}function Mw(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ue(n)})}function rf(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ue(n)})}function Aw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(n)})}function Pw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(n)})}function Iw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(n)})}function Nw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(n)})}function Rw(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(n)})}function $w(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(n)})}function jw(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(n)})}function Lw(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(n)})}function zw(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(n)})}function Bw(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(n)})}function Vw(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ue(n)})}function Fw(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(n)})}function Yw(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(n)})}function Hw(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(n)})}function Uw(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(n)})}function Ww(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(n)})}function Zw(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ue(n)})}function qw(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(n)})}function Kw(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ue(n)})}function Gw(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(n)})}function Qw(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(n)})}function Jw(e,n){return new e({type:"string",format:"date",check:"string_format",...ue(n)})}function Xw(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...ue(n)})}function e_(e,n){return new e({type:"string",format:"duration",check:"string_format",...ue(n)})}function t_(e,n){return new e({type:"number",checks:[],...ue(n)})}function r_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(n)})}function n_(e,n){return new e({type:"boolean",...ue(n)})}function o_(e){return new e({type:"unknown"})}function a_(e,n){return new e({type:"never",...ue(n)})}function nf(e,n){return new Fd({check:"less_than",...ue(n),value:e,inclusive:!1})}function ws(e,n){return new Fd({check:"less_than",...ue(n),value:e,inclusive:!0})}function of(e,n){return new Yd({check:"greater_than",...ue(n),value:e,inclusive:!1})}function _s(e,n){return new Yd({check:"greater_than",...ue(n),value:e,inclusive:!0})}function af(e,n){return new _1({check:"multiple_of",...ue(n),value:e})}function sf(e,n){return new S1({check:"max_length",...ue(n),maximum:e})}function Fa(e,n){return new C1({check:"min_length",...ue(n),minimum:e})}function cf(e,n){return new k1({check:"length_equals",...ue(n),length:e})}function i_(e,n){return new D1({check:"string_format",format:"regex",...ue(n),pattern:e})}function s_(e){return new E1({check:"string_format",format:"lowercase",...ue(e)})}function c_(e){return new T1({check:"string_format",format:"uppercase",...ue(e)})}function l_(e,n){return new O1({check:"string_format",format:"includes",...ue(n),includes:e})}function u_(e,n){return new M1({check:"string_format",format:"starts_with",...ue(n),prefix:e})}function d_(e,n){return new A1({check:"string_format",format:"ends_with",...ue(n),suffix:e})}function io(e){return new P1({check:"overwrite",tx:e})}function f_(e){return io(n=>n.normalize(e))}function p_(){return io(e=>e.trim())}function h_(){return io(e=>e.toLowerCase())}function m_(){return io(e=>e.toUpperCase())}function g_(e,n,t){return new e({type:"array",element:n,...ue(t)})}function v_(e,n,t){return new e({type:"custom",check:"custom",fn:n,...ue(t)})}function y_(e){const n=b_(t=>(t.addIssue=r=>{if(typeof r=="string")t.issues.push(ao(r,t.value,n._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),t.issues.push(ao(o))}},e(t.value,t)));return n}function b_(e,n){const t=new xt({check:"custom",...ue(n)});return t._zod.check=e,t}function lf(e,n){try{var t=e()}catch(r){return n(r)}return t&&t.then?t.then(void 0,n):t}function w_(e,n){for(var t={};e.length;){var r=e[0],o=r.code,a=r.message,i=r.path.join(".");if(!t[i])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];t[i]={message:s.message,type:s.code}}else t[i]={message:a,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),n){var c=t[i].types,l=c&&c[r.code];t[i]=ss(i,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function __(e,n){for(var t={};e.length;){var r=e[0],o=r.code,a=r.message,i=r.path.join(".");if(!t[i])if(r.code==="invalid_union"&&r.errors.length>0){var s=r.errors[0][0];t[i]={message:s.message,type:s.code}}else t[i]={message:a,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),n){var c=t[i].types,l=c&&c[r.code];t[i]=ss(i,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function x_(e,n,t){if(t===void 0&&(t={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,a){try{return Promise.resolve(lf(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(i){return a.shouldUseNativeValidation&&ds({},a),{errors:{},values:t.raw?Object.assign({},r):i}})},function(i){if((function(s){return Array.isArray(s?.issues)})(i))return{values:{},errors:Ed(w_(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,a){try{return Promise.resolve(lf(function(){return Promise.resolve((t.mode==="sync"?$2:j2)(e,r,n)).then(function(i){return a.shouldUseNativeValidation&&ds({},a),{errors:{},values:t.raw?Object.assign({},r):i}})},function(i){if((function(s){return s instanceof vs})(i))return{values:{},errors:Ed(__(i.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const S_=V("ZodISODateTime",(e,n)=>{W1.init(e,n),Ze.init(e,n)});function C_(e){return Qw(S_,e)}const k_=V("ZodISODate",(e,n)=>{Z1.init(e,n),Ze.init(e,n)});function D_(e){return Jw(k_,e)}const E_=V("ZodISOTime",(e,n)=>{q1.init(e,n),Ze.init(e,n)});function T_(e){return Xw(E_,e)}const O_=V("ZodISODuration",(e,n)=>{K1.init(e,n),Ze.init(e,n)});function M_(e){return e_(O_,e)}const $t=V("ZodError",(e,n)=>{vs.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>R2(e,t)},flatten:{value:t=>N2(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,fs,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,fs,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),A_=Na($t),P_=Ra($t),I_=$a($t),N_=ja($t),R_=B2($t),$_=V2($t),j_=F2($t),L_=Y2($t),z_=H2($t),B_=U2($t),V_=W2($t),F_=Z2($t),tt=V("ZodType",(e,n)=>(Ge.init(e,n),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone({...n,checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(t,r)=>Dr(e,t,r),e.brand=()=>e,e.register=((t,r)=>(t.add(e,r),e)),e.parse=(t,r)=>A_(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>I_(e,t,r),e.parseAsync=async(t,r)=>P_(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>N_(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>R_(e,t,r),e.decode=(t,r)=>$_(e,t,r),e.encodeAsync=async(t,r)=>j_(e,t,r),e.decodeAsync=async(t,r)=>L_(e,t,r),e.safeEncode=(t,r)=>z_(e,t,r),e.safeDecode=(t,r)=>B_(e,t,r),e.safeEncodeAsync=async(t,r)=>V_(e,t,r),e.safeDecodeAsync=async(t,r)=>F_(e,t,r),e.refine=(t,r)=>e.check(jx(t,r)),e.superRefine=t=>e.check(Lx(t)),e.overwrite=t=>e.check(io(t)),e.optional=()=>vf(e),e.nullable=()=>yf(e),e.nullish=()=>vf(yf(e)),e.nonoptional=t=>Mx(e,t),e.array=()=>px(e),e.or=t=>vx([e,t]),e.and=t=>bx(e,t),e.transform=t=>wf(e,Cx(t)),e.default=t=>Ex(e,t),e.prefault=t=>Ox(e,t),e.catch=t=>Px(e,t),e.pipe=t=>wf(e,t),e.readonly=()=>Rx(e),e.describe=t=>{const r=e.clone();return Va.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){return Va.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Va.get(e);const r=e.clone();return Va.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),uf=V("_ZodString",(e,n)=>{ys.init(e,n),tt.init(e,n);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(i_(...r)),e.includes=(...r)=>e.check(l_(...r)),e.startsWith=(...r)=>e.check(u_(...r)),e.endsWith=(...r)=>e.check(d_(...r)),e.min=(...r)=>e.check(Fa(...r)),e.max=(...r)=>e.check(sf(...r)),e.length=(...r)=>e.check(cf(...r)),e.nonempty=(...r)=>e.check(Fa(1,...r)),e.lowercase=r=>e.check(s_(r)),e.uppercase=r=>e.check(c_(r)),e.trim=()=>e.check(p_()),e.normalize=(...r)=>e.check(f_(...r)),e.toLowerCase=()=>e.check(h_()),e.toUpperCase=()=>e.check(m_())}),Y_=V("ZodString",(e,n)=>{ys.init(e,n),uf.init(e,n),e.email=t=>e.check(Mw(H_,t)),e.url=t=>e.check(Rw(U_,t)),e.jwt=t=>e.check(Gw(ix,t)),e.emoji=t=>e.check($w(W_,t)),e.guid=t=>e.check(rf(df,t)),e.uuid=t=>e.check(Aw(Ya,t)),e.uuidv4=t=>e.check(Pw(Ya,t)),e.uuidv6=t=>e.check(Iw(Ya,t)),e.uuidv7=t=>e.check(Nw(Ya,t)),e.nanoid=t=>e.check(jw(Z_,t)),e.guid=t=>e.check(rf(df,t)),e.cuid=t=>e.check(Lw(q_,t)),e.cuid2=t=>e.check(zw(K_,t)),e.ulid=t=>e.check(Bw(G_,t)),e.base64=t=>e.check(Zw(nx,t)),e.base64url=t=>e.check(qw(ox,t)),e.xid=t=>e.check(Vw(Q_,t)),e.ksuid=t=>e.check(Fw(J_,t)),e.ipv4=t=>e.check(Yw(X_,t)),e.ipv6=t=>e.check(Hw(ex,t)),e.cidrv4=t=>e.check(Uw(tx,t)),e.cidrv6=t=>e.check(Ww(rx,t)),e.e164=t=>e.check(Kw(ax,t)),e.datetime=t=>e.check(C_(t)),e.date=t=>e.check(D_(t)),e.time=t=>e.check(T_(t)),e.duration=t=>e.check(M_(t))});function Ut(e){return Ow(Y_,e)}const Ze=V("ZodStringFormat",(e,n)=>{We.init(e,n),uf.init(e,n)}),H_=V("ZodEmail",(e,n)=>{j1.init(e,n),Ze.init(e,n)}),df=V("ZodGUID",(e,n)=>{R1.init(e,n),Ze.init(e,n)}),Ya=V("ZodUUID",(e,n)=>{$1.init(e,n),Ze.init(e,n)}),U_=V("ZodURL",(e,n)=>{L1.init(e,n),Ze.init(e,n)}),W_=V("ZodEmoji",(e,n)=>{z1.init(e,n),Ze.init(e,n)}),Z_=V("ZodNanoID",(e,n)=>{B1.init(e,n),Ze.init(e,n)}),q_=V("ZodCUID",(e,n)=>{V1.init(e,n),Ze.init(e,n)}),K_=V("ZodCUID2",(e,n)=>{F1.init(e,n),Ze.init(e,n)}),G_=V("ZodULID",(e,n)=>{Y1.init(e,n),Ze.init(e,n)}),Q_=V("ZodXID",(e,n)=>{H1.init(e,n),Ze.init(e,n)}),J_=V("ZodKSUID",(e,n)=>{U1.init(e,n),Ze.init(e,n)}),X_=V("ZodIPv4",(e,n)=>{G1.init(e,n),Ze.init(e,n)}),ex=V("ZodIPv6",(e,n)=>{Q1.init(e,n),Ze.init(e,n)}),tx=V("ZodCIDRv4",(e,n)=>{J1.init(e,n),Ze.init(e,n)}),rx=V("ZodCIDRv6",(e,n)=>{X1.init(e,n),Ze.init(e,n)}),nx=V("ZodBase64",(e,n)=>{ew.init(e,n),Ze.init(e,n)}),ox=V("ZodBase64URL",(e,n)=>{rw.init(e,n),Ze.init(e,n)}),ax=V("ZodE164",(e,n)=>{nw.init(e,n),Ze.init(e,n)}),ix=V("ZodJWT",(e,n)=>{aw.init(e,n),Ze.init(e,n)}),ff=V("ZodNumber",(e,n)=>{Ud.init(e,n),tt.init(e,n),e.gt=(r,o)=>e.check(of(r,o)),e.gte=(r,o)=>e.check(_s(r,o)),e.min=(r,o)=>e.check(_s(r,o)),e.lt=(r,o)=>e.check(nf(r,o)),e.lte=(r,o)=>e.check(ws(r,o)),e.max=(r,o)=>e.check(ws(r,o)),e.int=r=>e.check(hf(r)),e.safe=r=>e.check(hf(r)),e.positive=r=>e.check(of(0,r)),e.nonnegative=r=>e.check(_s(0,r)),e.negative=r=>e.check(nf(0,r)),e.nonpositive=r=>e.check(ws(0,r)),e.multipleOf=(r,o)=>e.check(af(r,o)),e.step=(r,o)=>e.check(af(r,o)),e.finite=()=>e;const t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),e.isFinite=!0,e.format=t.format??null});function pf(e){return t_(ff,e)}const sx=V("ZodNumberFormat",(e,n)=>{iw.init(e,n),ff.init(e,n)});function hf(e){return r_(sx,e)}const cx=V("ZodBoolean",(e,n)=>{sw.init(e,n),tt.init(e,n)});function xs(e){return n_(cx,e)}const lx=V("ZodUnknown",(e,n)=>{cw.init(e,n),tt.init(e,n)});function mf(){return o_(lx)}const ux=V("ZodNever",(e,n)=>{lw.init(e,n),tt.init(e,n)});function dx(e){return a_(ux,e)}const fx=V("ZodArray",(e,n)=>{uw.init(e,n),tt.init(e,n),e.element=n.element,e.min=(t,r)=>e.check(Fa(t,r)),e.nonempty=t=>e.check(Fa(1,t)),e.max=(t,r)=>e.check(sf(t,r)),e.length=(t,r)=>e.check(cf(t,r)),e.unwrap=()=>e.element});function px(e,n){return g_(fx,e,n)}const hx=V("ZodObject",(e,n)=>{fw.init(e,n),tt.init(e,n),Ve(e,"shape",()=>n.shape),e.keyof=()=>wx(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mf()}),e.loose=()=>e.clone({...e._zod.def,catchall:mf()}),e.strict=()=>e.clone({...e._zod.def,catchall:dx()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>O2(e,t),e.safeExtend=t=>M2(e,t),e.merge=t=>A2(e,t),e.pick=t=>E2(e,t),e.omit=t=>T2(e,t),e.partial=(...t)=>P2(gf,e,t[0]),e.required=(...t)=>I2(bf,e,t[0])});function mx(e,n){const t={type:"object",get shape(){return kr(this,"shape",e?x2(e):{}),this.shape},...ue(n)};return new hx(t)}const gx=V("ZodUnion",(e,n)=>{pw.init(e,n),tt.init(e,n),e.options=n.options});function vx(e,n){return new gx({type:"union",options:e,...ue(n)})}const yx=V("ZodIntersection",(e,n)=>{hw.init(e,n),tt.init(e,n)});function bx(e,n){return new yx({type:"intersection",left:e,right:n})}const Ss=V("ZodEnum",(e,n)=>{mw.init(e,n),tt.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const a={};for(const i of r)if(t.has(i))a[i]=n.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Ss({...n,checks:[],...ue(o),entries:a})},e.exclude=(r,o)=>{const a={...n.entries};for(const i of r)if(t.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Ss({...n,checks:[],...ue(o),entries:a})}});function wx(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ss({type:"enum",entries:t,...ue(n)})}const _x=V("ZodLiteral",(e,n)=>{gw.init(e,n),tt.init(e,n),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function xx(e,n){return new _x({type:"literal",values:Array.isArray(e)?e:[e],...ue(n)})}const Sx=V("ZodTransform",(e,n)=>{vw.init(e,n),tt.init(e,n),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Od(e.constructor.name);t.addIssue=a=>{if(typeof a=="string")t.issues.push(ao(a,t.value,n));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=t.value),i.inst??(i.inst=e),t.issues.push(ao(i))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(a=>(t.value=a,t)):(t.value=o,t)}});function Cx(e){return new Sx({type:"transform",transform:e})}const gf=V("ZodOptional",(e,n)=>{yw.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function vf(e){return new gf({type:"optional",innerType:e})}const kx=V("ZodNullable",(e,n)=>{bw.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function yf(e){return new kx({type:"nullable",innerType:e})}const Dx=V("ZodDefault",(e,n)=>{ww.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ex(e,n){return new Dx({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Nd(n)}})}const Tx=V("ZodPrefault",(e,n)=>{_w.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Ox(e,n){return new Tx({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Nd(n)}})}const bf=V("ZodNonOptional",(e,n)=>{xw.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Mx(e,n){return new bf({type:"nonoptional",innerType:e,...ue(n)})}const Ax=V("ZodCatch",(e,n)=>{Sw.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Px(e,n){return new Ax({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Ix=V("ZodPipe",(e,n)=>{Cw.init(e,n),tt.init(e,n),e.in=n.in,e.out=n.out});function wf(e,n){return new Ix({type:"pipe",in:e,out:n})}const Nx=V("ZodReadonly",(e,n)=>{kw.init(e,n),tt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Rx(e){return new Nx({type:"readonly",innerType:e})}const $x=V("ZodCustom",(e,n)=>{Dw.init(e,n),tt.init(e,n)});function jx(e,n={}){return v_($x,e,n)}function Lx(e){return y_(e)}const _f=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,xf=(e,n)=>{if(!e||!n)return null;const t=e.split("-");if(t.length!==3)return null;const r=parseInt(t[0],10),o=parseInt(t[1],10)-1,a=parseInt(t[2],10),i=n.split(":");if(i.length!==2)return null;const s=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(r,o,a,s,c);return isNaN(l.getTime())||!y.isValid(l)?null:l},zx=mx({titulo:Ut().min(1,"El campo Título es requerido."),fechaInicio:Ut().min(1,"El campo fecha inicio es requerido."),horaInicio:Ut().min(1,"La hora de inicio es requerida.").regex(_f,{message:"Formato inválido"}),horaFin:Ut().min(1,"La hora fin es requerida.").regex(_f,{message:"Formato inválido"}),todoElDia:xs(),fechaFin:Ut().optional(),showEndDate:xs().optional(),horaInicio2:Ut().optional(),TodoElDia2:xs().optional(),client:Ut().optional().nullable(),repetir:Ut().optional(),link:Ut().url("Debe ser una URL válida ejemplo https://meet.google.com/").or(xx("")).optional(),descripcion:Ut().optional(),color:Ut().optional(),solID:pf().optional().nullable(),disID:pf().optional().nullable()}).refine(e=>e.showEndDate?e.fechaFin&&e.fechaFin.length>0:!0,{message:"La fecha de fin es requerida.",path:["fechaFin"]}).refine(e=>e.fechaFin!==void 0?!!e.fechaFin&&!!e.horaInicio2:!0,{message:"La hora de fin son requeridas.",path:["horaInicio2"]}).refine(e=>{if(e.todoElDia||!e.fechaInicio||!e.horaInicio||!e.fechaFin||!e.horaInicio2)return!0;const n=xf(e.fechaInicio,e.horaInicio),t=xf(e.fechaFin,e.horaFin);return!n||!t||!y.isValid(n)||!y.isValid(t)?!0:!(y.isBefore(t,n)&&!y.isSameDay(t,n)||y.isSameDay(n,t)&&y.isBefore(t,n))},{message:"",path:["horaFin"]}),Sf=e=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},Z.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),Z.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),Bx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M7.288%2022.986h-.147a6.2%206.2%200%200%201-4.28-1.85c-2.404-2.404-2.478-6.24-.16-8.557L4.28%2011a1.228%201.228%200%201%201%201.739%201.739L4.44%2014.317c-1.356%201.357-1.282%203.626.16%205.068a3.82%203.82%200%200%200%202.602%201.135c.95%200%201.825-.32%202.479-.974l1.578-1.579a1.23%201.23%200%200%201%201.739%200c.48.481.48%201.258%200%201.739l-1.579%201.578c-1.097%201.098-2.552%201.69-4.13%201.69zM17.98%2012.998a1.23%201.23%200%200%201%200-1.739l1.578-1.578c.654-.654.986-1.53.974-2.466a3.78%203.78%200%200%200-1.134-2.602c-1.443-1.443-3.712-1.517-5.068-.16L12.75%206.03c-.48.48-1.258.48-1.739%200a1.23%201.23%200%200%201%200-1.739l1.579-1.578c2.318-2.319%206.153-2.245%208.558.16a6.23%206.23%200%200%201%201.85%204.279%205.84%205.84%200%200%201-1.69%204.279l-1.578%201.578c-.481.481-1.258.481-1.74%200z'/%3e%3cpath%20d='M14.172%208.11%208.07%2014.214a1.233%201.233%200%200%200%201.743%201.744l6.104-6.104a1.233%201.233%200%201%200-1.744-1.744'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Vx=e=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},Z.createElement("g",{clipPath:"url(#a)"},Z.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),Z.createElement("defs",null,Z.createElement("clipPath",{id:"a"},Z.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Fx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M13.17%2013.68c2.06%200%204%20.8%205.46%202.27a7.7%207.7%200%200%201%202.26%205.47c0%20.79-.64%201.43-1.43%201.43l.01-.01H4.53c-.79%200-1.43-.64-1.43-1.43%200-4.27%203.46-7.73%207.72-7.73zM12%201.9c2.82%200%205.11%202.29%205.11%205.11s-2.29%205.11-5.11%205.11v-.01c-2.82%200-5.11-2.29-5.11-5.11S9.18%201.9%2012%201.9'/%3e%3c/svg%3e",Yx=e=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},Z.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},Z.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),Z.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),Z.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),Z.createElement("defs",null,Z.createElement("clipPath",{id:"a"},Z.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Hx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.789%2017H3.21C2.542%2017%202%2017.56%202%2018.25s.542%201.25%201.211%201.25H13.79c.669%200%201.211-.56%201.211-1.25S14.458%2017%2013.789%2017M20.718%204H3.282C2.574%204%202%204.56%202%205.25S2.574%206.5%203.282%206.5h17.436C21.426%206.5%2022%205.94%2022%205.25S21.426%204%2020.718%204M20.718%2010.5H3.282C2.574%2010.5%202%2011.06%202%2011.75S2.574%2013%203.282%2013h17.436c.708%200%201.282-.56%201.282-1.25s-.574-1.25-1.282-1.25'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Ux=e=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},Z.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),Z.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"})),Cf=lr(h.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),Cs=lr(h.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"),Wx={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",sm:450,md:500},bgcolor:"background.paper",boxShadow:24,p:{xs:2,sm:3},borderRadius:2,maxHeight:"90vh",overflowY:"auto"},ks=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],yn=(()=>{const e=[];for(let n=0;n<24;n++)for(let t=0;t<60;t+=15){const r=n.toString().padStart(2,"0"),o=t.toString().padStart(2,"0");e.push(`${r}:${o}`)}return e})(),so=(e,n)=>{if(!e||!n)return null;const t=e.split("-");if(t.length!==3)return null;const r=parseInt(t[0],10),o=parseInt(t[1],10)-1,a=parseInt(t[2],10),i=n.split(":");if(i.length!==2)return null;const s=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(a,o,r,s,c);return isNaN(l.getTime())||!y.isValid(l)?null:l},Zx=({isVisible:e,onClose:n,onSave:t,onDelete:r,selectedDate:o,initialEvent:a,userId:i,masNombreBD:s,disId:c})=>{const[l,u]=w.useState(!1),[d,f]=w.useState(!1),m=y.format(new Date,"yyyy-MM-dd"),[g,p]=w.useState(""),[b,x]=w.useState([]),[S,T]=w.useState(!1),D=es(),[k,O]=w.useState([]),{control:I,handleSubmit:W,reset:U,formState:{errors:$,isValid:Q},watch:v,setValue:M}=kd({resolver:x_(zx),defaultValues:{titulo:"",fechaInicio:y.format(new Date,"yyyy-MM-dd"),horaInicio:y.format(new Date,"HH:mm"),horaFin:y.format(y.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:ks[0],solID:null},mode:"onChange"}),P=v("fechaInicio"),H=v("fechaFin"),Y=v("todoElDia");w.useEffect(()=>{if(g.trim()===""||!i||!c||!s){x([]),O([]),M("solID",null),T(!1);return}T(!0);const B=setTimeout(()=>{D.getClients(g,c,s,i).then(te=>{if(T(!1),te){const ge=te.map(Fe=>Fe.solID);O([...new Set(ge)])}else O([]);const F=Array.from(new Map(te.map(ge=>[ge.nombreCliente,ge])).values());if(F)x(F);else if(a?.client&&a.solID!==null){const ge=[{solID:a.solID,nombreCliente:a.client}];x(ge)}else x([{}])}).catch(te=>{console.error("Error al buscar clientes:",te),T(!1)})},500);return()=>clearTimeout(B)},[g,i,c,s]),w.useEffect(()=>{if(P&&H){const B=new Date(P),te=new Date(H);(B===te||B>te)&&M("fechaFin",P)}},[P,H,M]),w.useEffect(()=>{P&&M("fechaFin",P)},[P]),w.useEffect(()=>{M("showEndDate",l)},[l,M]),w.useEffect(()=>{if(a){const B=y.format(a.fechaInicio,"yyyy-MM-dd")===y.format(a.fechaFin,"yyyy-MM-dd");u(!B),M("titulo",a?.titulo),M("fechaInicio",y.format(a.fechaInicio,"yyyy-MM-dd")),M("fechaFin",y.format(a.fechaFin,"yyyy-MM-dd")),M("horaInicio",y.format(a.fechaInicio,"HH:mm")),M("horaFin",y.format(a.fechaFin,"HH:mm")),M("horaInicio2",y.format(a.fechaFin,"HH:mm")),M("descripcion",a.descripcion),M("link",a.link),M("repetir","false"),M("color",a.color),M("todoElDia",a.todoElDia),M("solID",a.solID),M("client",a.client),a.solID?f(!0):f(!1)}else{const B=o||new Date,te=new Date,F=new Date(B.getFullYear(),B.getMonth(),B.getDate(),te.getHours(),te.getMinutes()),ge=y.addHours(F,1);U({titulo:"",fechaInicio:y.format(F,"yyyy-MM-dd"),horaInicio:y.format(F,"HH:mm"),fechaFin:y.format(ge,"yyyy-MM-dd"),horaFin:y.format(ge,"HH:mm"),horaInicio2:y.format(ge,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:ks[0],solID:null}),u(!1),f(!1)}},[a,e,o]);const ee=W(B=>{t(B,a?.eventoID),n(),U(),u(!1)},B=>{console.log("Errores de validación:",B)});w.useEffect(()=>{Y&&(M("horaInicio","00:00"),M("horaFin","23:59"))},[Y,M,v]);const ae=()=>{const B=v("fechaInicio");if(B){const te=new Date(`${B}T00:00:00`),F=y.addDays(te,1);M("fechaFin",y.format(F,"yyyy-MM-dd"))}u(!0)},be=v("fechaInicio"),z=v("horaInicio"),K=v("fechaFin"),fe=v("horaFin"),[pe,he]=w.useState(null),[G,se]=w.useState(null);w.useEffect(()=>{(pe===null||pe!==z)&&he(z)},[z,pe]),w.useEffect(()=>{(G===null||G!==fe)&&se(fe??"")},[fe,G]);const de=v("todoElDia");w.useEffect(()=>{if(de||!z||!fe||!be||!K)return;const B=so(be,z),te=so(K,fe);if(!B||!te||!y.isValid(B)||!y.isValid(te))return;const F=y.isSameDay(B,te),ge=F&&(y.isAfter(B,te)||B.getTime()===te.getTime()),Fe=y.isBefore(te,B)&&!F;(ge||Fe)&&(M("horaFin",""),se(""))},[z]);const me=w.useMemo(()=>{if(!z||!be)return yn;const B=so(be,z),te=so(K,"00:00");return!B||!te||!y.isValid(B)||!y.isValid(te)||y.isBefore(te,B)&&!y.isSameDay(te,B)?yn:y.isSameDay(B,te)?yn.filter(F=>{const ge=so(K,F);return ge&&y.isAfter(ge,B)}):(y.isAfter(te,B),yn)},[z,be,K]),ye=w.useMemo(()=>yn,[]);return h.jsx(E.Modal,{open:e,onClose:n,children:h.jsx("form",{onSubmit:ee,children:h.jsxs(E.Box,{sx:Wx,children:[h.jsx(E.IconButton,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:12},children:h.jsx(Cs,{})}),h.jsx(E.Typography,{variant:"h6",mb:2,children:a?"Editar evento":"Agregar evento"}),h.jsxs(E.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(mt,{name:"titulo",control:I,render:({field:B})=>h.jsx(E.TextField,{...B,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!$.titulo,helperText:$.titulo?.message,inputProps:{maxLength:100},sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(E.Divider,{})}),h.jsx(E.Grid,{size:{xs:12,md:4},children:h.jsx(mt,{name:"fechaInicio",control:I,render:({field:B})=>h.jsx(E.TextField,{fullWidth:!0,...B,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!$.fechaInicio,helperText:$.fechaInicio?.message})})}),l?h.jsxs(h.Fragment,{children:[h.jsx(E.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),h.jsx(E.Grid,{size:{xs:11,md:4},children:h.jsx(mt,{name:"fechaFin",control:I,render:({field:B})=>h.jsx(E.TextField,{...B,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:P||m},error:!!$.fechaFin,helperText:$.fechaFin?.message})})}),!a&&h.jsx(E.Grid,{size:{xs:1,md:1},children:h.jsx(E.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:h.jsx(Sf,{})})})]}):h.jsx(E.Grid,{size:{xs:12,md:7}})]}),l&&h.jsx(h.Fragment,{children:h.jsxs(E.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[h.jsx(E.Grid,{size:{xs:6,md:5}}),h.jsx(E.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:h.jsx(Cf,{sx:{color:"#757575",margin:0,padding:0}})})]})}),h.jsxs(E.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[h.jsx(E.Grid,{size:{xs:12,md:4},children:h.jsx(mt,{name:"horaInicio",control:I,render:({field:{onChange:B,value:te,...F}})=>h.jsx(E.Autocomplete,{freeSolo:!0,options:ye,value:te||"",onChange:(ge,Fe)=>B(Fe||""),onInputChange:(ge,Fe)=>B(Fe),renderInput:ge=>h.jsx(E.TextField,{...ge,...F,size:"small",error:!!$.horaInicio,helperText:$.horaInicio?.message,InputProps:{...ge.InputProps,endAdornment:h.jsx(E.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(td,{})})}}),disabled:v("todoElDia")})})}),h.jsx(E.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:$.horaInicio?"start":"center",marginTop:$.horaInicio?"5px":"0px"},children:!l&&h.jsx(Cf,{sx:{color:"#757575"}})}),l&&h.jsx(E.Grid,{size:{xs:2,md:2}}),h.jsx(E.Grid,{size:{xs:12,md:4},children:h.jsx(mt,{name:"horaFin",control:I,render:({field:{onChange:B,value:te,...F}})=>h.jsx(E.Autocomplete,{freeSolo:!0,options:me,value:te||"",onChange:(ge,Fe)=>B(Fe||""),onInputChange:(ge,Fe)=>B(Fe),renderInput:ge=>h.jsx(E.TextField,{...ge,...F,size:"small",error:!!$.horaFin,helperText:$.horaFin?.message,InputProps:{...ge.InputProps,endAdornment:h.jsx(E.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(td,{})})}}),disabled:v("todoElDia")})})}),h.jsx(E.Grid,{size:{xs:12,md:3},hidden:l,children:h.jsx(mt,{name:"todoElDia",control:I,render:({field:B})=>h.jsx(E.FormControlLabel,{control:h.jsx(E.Checkbox,{checked:B.value,onChange:te=>B.onChange(te.target.checked)}),label:h.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:!l&&h.jsx(h.Fragment,{children:h.jsxs(E.Button,{onClick:ae,size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(Yx,{})," Agregar fecha final"]})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(E.Divider,{})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:!d&&h.jsxs(E.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(Ux,{})," Vincular cliente"]})}),d&&h.jsxs(h.Fragment,{children:[h.jsx(E.Grid,{size:{xs:12,md:7},children:h.jsx(mt,{name:"client",control:I,render:({field:B})=>h.jsx(E.Autocomplete,{options:b,loading:S,loadingText:"Buscando coincidencias",getOptionLabel:te=>te.nombreCliente?.trim()||"",value:b.find(te=>te.nombreCliente===B.value)||(B.value&&typeof B.value=="string"?{solID:-1,nombreCliente:B.value}:null),noOptionsText:"Sin resultados",onInputChange:(te,F)=>{p(F)},onChange:(te,F)=>{B.onChange(F?F.nombreCliente:"")},renderInput:te=>h.jsx(E.TextField,{...te,placeholder:"Buscar cliente...",size:"small",InputProps:{...te.InputProps,startAdornment:h.jsx("img",{src:Fx,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:h.jsxs(h.Fragment,{children:[S?h.jsx(E.CircularProgress,{color:"inherit",size:20}):null,te.InputProps.endAdornment]})}})})})}),h.jsx(E.Grid,{size:{xs:11,md:4},children:h.jsx(mt,{name:"solID",control:I,render:({field:B})=>h.jsx(E.Autocomplete,{options:k,noOptionsText:"Sin resultados",getOptionLabel:te=>te.toString(),value:B.value??null,onChange:(te,F)=>B.onChange(F),renderInput:te=>h.jsx(E.TextField,{...te,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b})})}),h.jsx(E.Grid,{size:{xs:1,md:1},children:h.jsx(E.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:h.jsx(Sf,{})})})]}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(E.Divider,{})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(mt,{name:"link",control:I,render:({field:B})=>h.jsx(E.TextField,{...B,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!$.link,helperText:$.link?.message,InputProps:{startAdornment:h.jsx("img",{src:Bx,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(mt,{name:"descripcion",control:I,render:({field:B})=>h.jsx(E.TextField,{...B,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:h.jsx("img",{src:Hx,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[h.jsx(Vx,{}),ks.map(B=>h.jsx(mt,{name:"color",control:I,render:({field:te})=>h.jsx(E.IconButton,{onClick:()=>te.onChange(B),sx:{width:24,height:24,borderRadius:"50%",bgcolor:B,border:te.value===B?"2px solid":"none",borderColor:te.value===B?"primary.main":"transparent"}})},B))]})})]}),h.jsxs(E.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[a&&h.jsx(E.Button,{onClick:r,variant:"outlined",color:"error",sx:{textTransform:"none"},children:"Eliminar"}),h.jsx(E.Button,{onClick:n,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),h.jsx(E.Button,{onClick:ee,variant:"contained",sx:{textTransform:"none"},disabled:!Q,children:"Guardar"})]})]})})})},qx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='49'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M34.559%2048.077c-7.413%200-13.44-6.039-13.44-13.44s6.027-13.44%2013.44-13.44%2013.44%206.027%2013.44%2013.44c0%207.414-6.027%2013.44-13.44%2013.44'/%3e%3cpath%20fill='%23fff'%20d='M39.827%2029.346c.583.583.605%201.505.05%202.06l-3.218%203.219%203.219%203.218c.555.556.532%201.48-.051%202.062-.584.583-1.506.605-2.062.05l-3.218-3.218-3.218%203.218c-.556.555-1.478.533-2.061-.05s-.606-1.506-.05-2.062l3.217-3.218-3.218-3.218c-.555-.555-.533-1.478.05-2.061.583-.584%201.507-.606%202.063-.05l3.217%203.217%203.218-3.218c.556-.555%201.478-.533%202.062.05'/%3e%3cpath%20fill='%23404756'%20d='M30.367.078c1.112%200%202.001.868%202.001%201.954v1.195h.979c4.913%200%208.892%203.887%208.892%208.686v9.237a15.4%2015.4%200%200%200-4.424-1.691v-1.312H4.468V33.63c0%202.389%202%204.343%204.446%204.343H19.4a15.4%2015.4%200%200%200%201.676%204.343H8.892C3.979%2042.317%200%2038.43%200%2033.631V11.913c0-4.8%203.979-8.686%208.892-8.686h1V2.032c0-1.086.89-1.954%202.002-1.954s2%20.868%202%201.954v1.195h14.473V2.032c0-1.085.889-1.954%202-1.954'/%3e%3c/svg%3e",Kx={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},Gx=({isOpen:e,onClose:n,onConfirm:t,title:r,message:o})=>h.jsx(E.Modal,{open:e,onClose:n,children:h.jsxs(E.Box,{sx:Kx,children:[h.jsx("img",{src:qx}),h.jsx(E.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:r}),h.jsx(E.Typography,{sx:{mt:2},children:o}),h.jsxs(E.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[h.jsx(E.Button,{variant:"outlined",onClick:n,sx:{textTransform:"none"},children:"Regresar"}),h.jsxs(E.Button,{variant:"contained",color:"error",onClick:t,sx:{textTransform:"none"},children:[h.jsx("span",{className:"icon-eliminar",children:" "})," Eliminar"]})]})]})}),Qx={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},Jx=({isOpen:e,onClose:n,events:t,date:r,onEventClick:o})=>{if(!r)return null;const a=i=>{o(i),n()};return h.jsx(E.Modal,{open:e,onClose:n,children:h.jsxs(E.Box,{sx:Qx,children:[h.jsxs(E.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[h.jsxs(E.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",r.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),h.jsx(E.IconButton,{onClick:n,children:h.jsx(Cs,{})})]}),h.jsx(E.Divider,{}),h.jsx(E.List,{children:t.map(i=>h.jsx(E.ListItem,{disablePadding:!0,children:h.jsxs(E.ListItemButton,{onClick:()=>a(i),sx:{py:.5},children:[h.jsx(E.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:i.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),h.jsx(E.ListItemText,{primary:i.titulo,secondary:`${y.format(i.fechaInicio,"HH:mm")} - ${y.format(i.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},i.eventoID))})]})})},Xx=lr(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),eS=lr(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),tS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M20.36%204.14H16c0-1.65-1.35-3-3-3h-2c-1.65%200-3%201.35-3%203H3.64c-.55%200-1%20.45-1%201s.45%201%201%201h1.04l.84%2013.91a3%203%200%200%200%202.99%202.82h6.98c1.58%200%202.9-1.24%203-2.82l.84-13.91h1.04c.55%200%201-.45%201-1s-.45-1-1-1zm-9.36-1h2c.55%200%201%20.45%201%201h-4c0-.55.45-1%201-1m-.39%2014.9c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201zm4.78%200c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201z'/%3e%3c/svg%3e",rS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M19.378%204.405a1.813%201.813%200%201%201%202.565%202.565L9.571%2019.342a1.813%201.813%200%200%201-2.565%200l-4.949-4.949a1.814%201.814%200%200%201%202.428-2.69l.137.126%203.666%203.666z'/%3e%3c/svg%3e",kf=w.forwardRef(({id:e,message:n,variant:t},r)=>{const{closeSnackbar:o}=Wa.useSnackbar(),a={success:{color:"#fff",icon:h.jsx("img",{width:25,src:rS,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:h.jsx(Xx,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:h.jsx(eS,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:h.jsx("img",{src:tS,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},i=a[t]||a.info;return h.jsx(Wa.SnackbarContent,{ref:r,children:h.jsxs(E.Box,{sx:{backgroundColor:"white",color:"#333",padding:"8px 16px",borderRadius:"8px",boxShadow:"0 3px 10px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",width:{xs:"90%",sm:"auto"},minWidth:"300px",borderLeft:`5px solid ${i.color}`},children:[h.jsx(E.Box,{sx:{mr:1.5},children:i.icon}),h.jsx(E.Typography,{variant:"body2",sx:{flexGrow:1},children:n}),h.jsx(E.IconButton,{size:"small",onClick:()=>o(e),children:h.jsx(Cs,{fontSize:"small"})})]})})}),nS=({userId:e,leads30Days:n,leads90Days:t,disId:r,masNombreBD:o})=>{const[a,i]=w.useState(new Date),[s,c]=w.useState([]),[l,u]=w.useState(!1),[d,f]=w.useState(null),[m,g]=w.useState(!1),[p,b]=w.useState(null),[x,S]=w.useState([]),{enqueueSnackbar:T}=Wa.useSnackbar(),D=es(),[k,O]=w.useState(!1),[I,W]=w.useState([]),[U,$]=w.useState(null),Q=(G,se)=>{W(G),$(se),O(!0)},v=w.useRef(null);w.useEffect(()=>{const G=async()=>{try{if(e){const se=await D.getEventsByUser(e);c(se)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}};return G(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{G()},4e3),()=>{v.current&&clearTimeout(v.current)}},[a,e]),w.useEffect(()=>{const G=new Date,se=y.startOfDay(G),de=y.endOfDay(y.addDays(se,6)),me={start:se,end:de},ye=s.filter(B=>{const te={start:B.fechaInicio,end:B.fechaFin};return ou(te,me)}).sort((B,te)=>B.fechaInicio.getTime()-te.fechaInicio.getTime());S(ye)},[s]);const M=async G=>{try{const se=await D.getEventById(G.eventoID);f(se),u(!0)}catch(se){console.error(se)}},P=()=>{u(!1),f(null)},H=async(G,se)=>{let de,me;G.todoElDia?(de=new Date(`${G.fechaInicio}T${G.horaInicio}`),me=new Date(`${G.fechaInicio}T${G.horaFin}`)):(de=new Date(`${G.fechaInicio}T${G.horaInicio}`),me=G.fechaFin&&G.horaFin?new Date(`${G.fechaFin}T${G.horaFin}`):new Date(`${G.fechaInicio}T${G.horaFin}`));const ye=y.format(de,"yyyy-MM-dd HH:mm:ss.SSS"),B=y.format(me,"yyyy-MM-dd HH:mm:ss.SSS");if(se){const F={...G,eventoID:se,fechaInicio:ye,fechaFin:B,solID:G.solID??null,disID:r??null,client:G.client};try{const ge=await D.updateEvent(F);var te=s.map(Fe=>Fe.eventoID===ge.eventoID?ge:Fe);c(te),T("El evento se ha actualizado correctamente.",{variant:"success"}),P()}catch{T("Error al eliactualizar Evento",{variant:"error"})}}else{const F={...G,fechaInicio:ye,fechaFin:B,todoElDia:G.todoElDia,solID:G.solID??null,disID:r??null,client:G.client};try{const ge=await D.createEvent(F,e);c(Fe=>[...Fe,ge]),T("El evento se ha creado con éxito",{variant:"success"}),P()}catch{T("Error al guardar Evento",{variant:"error"})}}if(e){const F=await D.getEventsByUser(e);c(F)}},Y=()=>{i(G=>new Date(G.getFullYear(),G.getMonth()-1,1))},ee=()=>{i(G=>new Date(G.getFullYear(),G.getMonth()+1,1))},ae=()=>{g(!0)},be=()=>{b(new Date),u(!0)},z=()=>alert("Sincronizar con Google Calendar"),K=()=>alert("Sincronizar con Outlook Calendar"),fe=G=>{G&&i(G)},pe=G=>{b(G),u(!0),f(null)},he=async()=>{if(d)try{await D.deleteEvent(d.eventoID),c(s.filter(G=>G.eventoID!==d.eventoID)),T("El evento se ha eliminado de tu calendario",{content:(G,se)=>h.jsx(kf,{id:G,message:String(se),variant:"delete"})})}catch{T("Error al eliminar Evento",{variant:"error"})}finally{P(),g(!1)}};return h.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[h.jsx(v0,{header:h.jsx(jv,{currentDate:a,onPrevMonth:Y,onNextMonth:ee,onAddEvent:be,onDateChange:fe}),sidebar:h.jsx(by,{onEventClick:M,upcomingEvents:x,onSyncGoogle:z,onSyncOutlook:K,leads30Days:n,leads90Days:t}),mainContent:h.jsx(Ty,{onSeeMoreClick:Q,currentDate:a,events:s,onDayClick:pe,onEventClick:M})}),l&&h.jsx(Zx,{isVisible:l,onClose:P,onSave:H,onDelete:ae,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:r}),h.jsx(Gx,{isOpen:m,onClose:()=>g(!1),onConfirm:he,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),h.jsx(Jx,{isOpen:k,onClose:()=>O(!1),events:I,date:U,onEventClick:M})]})},oS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20fill='%23070c10'%20d='M18.575%203.172A10.829%2010.829%200%200%200%201.564%2016.284l-.028-.051L0%2021.843l5.739-1.506a10.7%2010.7%200%200%200%205.173%201.318%2010.83%2010.83%200%200%200%207.663-18.483m-7.658%2016.655a8.94%208.94%200%200%201-4.62-1.277l.041.023-.329-.194-3.405.894.908-3.321-.214-.34a8.9%208.9%200%200%201-1.376-4.782%209%209%200%201%201%209%209Zm4.935-6.736c-.27-.135-1.6-.789-1.848-.88s-.429-.135-.61.136-.7.879-.856%201.06-.316.2-.586.068a7.5%207.5%200%200%201-2.183-1.349l.007.007a8.2%208.2%200%200%201-1.483-1.842l-.02-.038c-.157-.27-.017-.417.118-.551s.271-.316.406-.473a1.9%201.9%200%200%200%20.267-.44v-.012a.5.5%200%200%200%20.05-.216.5.5%200%200%200-.074-.26c-.068-.135-.609-1.467-.834-2.009s-.444-.455-.609-.464-.338-.009-.519-.009a.99.99%200%200%200-.72.337%203.03%203.03%200%200%200-.947%202.2v.058a5.27%205.27%200%200%200%201.114%202.815v-.011a12.16%2012.16%200%200%200%204.553%204.053l.068.031a14%2014%200%200%200%201.434.539l.109.03a3.6%203.6%200%200%200%201.077.161%203.7%203.7%200%200%200%20.648-.057h-.023a2.8%202.8%200%200%200%201.819-1.274l.007-.012a2.2%202.2%200%200%200%20.19-.9%202.3%202.3%200%200%200-.034-.395v.014c-.067-.113-.248-.18-.519-.316Z'/%3e%3c/svg%3e",aS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25.085'%20height='18.5'%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='none'%20d='M0%200h25.085v18.5H0z'%20data-name='Rectángulo%204598'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23a)'%20data-name='Grupo%207946'%3e%3cpath%20d='M23.12%205.809V3.226a3.2%203.2%200%200%200-.068-.656l-3.141%202.21a7.8%207.8%200%200%201%203.209%201.032'%20data-name='Trazado%2013329'/%3e%3cpath%20d='M11.847%209.791c-.1.009-.2.023-.308.023a3.78%203.78%200%200%201-2.18-.688L.067%202.58A3.2%203.2%200%200%200%200%203.227V13.98a3.23%203.23%200%200%200%203.226%203.226h9.611a7.86%207.86%200%200%201-.99-7.414'%20data-name='Trazado%2013330'/%3e%3cpath%20d='M12.478%207.369%2021.92.737A3.2%203.2%200%200%200%2019.894%200H3.226a3.2%203.2%200%200%200-2.031.74l9.4%206.628a1.64%201.64%200%200%200%201.881%200'%20data-name='Trazado%2013331'/%3e%3cpath%20d='M23.356%208.407a5.914%205.914%200%201%200%200%208.364%205.92%205.92%200%200%200%200-8.364m-1.833%204.842a.54.54%200%200%201-1.081%200v-1.164l-2.513%202.516a.54.54%200%200%201-.765-.763l2.515-2.515h-1.167a.54.54%200%201%201%200-1.081h2.471a.54.54%200%200%201%20.54.54Z'%20data-name='Trazado%2013332'/%3e%3c/g%3e%3c/svg%3e";function Ds(e,n,t){return e.accessor?e.accessor(n,t):e.field?n?.[e.field]:n?.[e?.key||""]}function iS(e,n){const t=e??"",r=n??"";return t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():typeof t=="number"&&typeof r=="number"?t-r:typeof t=="boolean"&&typeof r=="boolean"?Number(t)-Number(r):String(t).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"})}function Es(e,n,t=!0){return typeof e=="function"?e(n):e??t}function sS(e){return e.replace(/[^\d]/g,"")}function cS(e,n){return n}const Df=lr(h.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFileOutlined"),Ts=Z.createContext();process.env.NODE_ENV!=="production"&&(Ts.displayName="TableContext");function lS(e){return Kt("MuiTable",e)}yr("MuiTable",["root","stickyHeader"]);const uS=e=>{const{classes:n,stickyHeader:t}=e;return gr({root:["root",t&&"stickyHeader"]},lS,n)},dS=wr("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,t.stickyHeader&&n.stickyHeader]}})($n(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),Ef="table",Tf=Z.forwardRef(function(n,t){const r=_r({props:n,name:"MuiTable"}),{className:o,component:a=Ef,padding:i="normal",size:s="medium",stickyHeader:c=!1,...l}=r,u={...r,component:a,padding:i,size:s,stickyHeader:c},d=uS(u),f=Z.useMemo(()=>({padding:i,size:s,stickyHeader:c}),[i,s,c]);return h.jsx(Ts.Provider,{value:f,children:h.jsx(dS,{as:a,role:a===Ef?null:"table",ref:t,className:Be(d.root,o),ownerState:u,...l})})});process.env.NODE_ENV!=="production"&&(Tf.propTypes={children:N.node,classes:N.object,className:N.string,component:N.elementType,padding:N.oneOf(["checkbox","none","normal"]),size:N.oneOfType([N.oneOf(["medium","small"]),N.string]),stickyHeader:N.bool,sx:N.oneOfType([N.arrayOf(N.oneOfType([N.func,N.object,N.bool])),N.func,N.object])});const co=Z.createContext();process.env.NODE_ENV!=="production"&&(co.displayName="Tablelvl2Context");function fS(e){return Kt("MuiTableBody",e)}yr("MuiTableBody",["root"]);const pS=e=>{const{classes:n}=e;return gr({root:["root"]},fS,n)},hS=wr("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),mS={variant:"body"},Of="tbody",Mf=Z.forwardRef(function(n,t){const r=_r({props:n,name:"MuiTableBody"}),{className:o,component:a=Of,...i}=r,s={...r,component:a},c=pS(s);return h.jsx(co.Provider,{value:mS,children:h.jsx(hS,{className:Be(c.root,o),as:a,ref:t,role:a===Of?null:"rowgroup",ownerState:s,...i})})});process.env.NODE_ENV!=="production"&&(Mf.propTypes={children:N.node,classes:N.object,className:N.string,component:N.elementType,sx:N.oneOfType([N.arrayOf(N.oneOfType([N.func,N.object,N.bool])),N.func,N.object])});function gS(e){return Kt("MuiTableCell",e)}const vS=yr("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),yS=e=>{const{classes:n,variant:t,align:r,padding:o,size:a,stickyHeader:i}=e,s={root:["root",t,i&&"stickyHeader",r!=="inherit"&&`align${Ct(r)}`,o!=="normal"&&`padding${Ct(o)}`,`size${Ct(a)}`]};return gr(s,gS,n)},bS=wr("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[t.variant],n[`size${Ct(t.size)}`],t.padding!=="normal"&&n[`padding${Ct(t.padding)}`],t.align!=="inherit"&&n[`align${Ct(t.align)}`],t.stickyHeader&&n.stickyHeader]}})($n(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
175
|
-
${e.palette.mode==="light"?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${
|
|
176
|
-
`)),h.jsx(RS,{as:i,ownerState:d,className:Be(f.root,a),ref:t,...u,style:{...l==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Lo("#fff",bi(s))}, ${Lo("#fff",bi(s))})`}},...u.style}})});process.env.NODE_ENV!=="production"&&(Lf.propTypes={children:N.node,classes:N.object,className:N.string,component:N.elementType,elevation:PS(AS,e=>{const{elevation:n,variant:t}=e;return n>0&&t==="outlined"?new Error(`MUI: Combining \`elevation={${n}}\` with \`variant="${t}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:N.bool,style:N.object,sx:N.oneOfType([N.arrayOf(N.oneOfType([N.func,N.object,N.bool])),N.func,N.object]),variant:N.oneOfType([N.oneOf(["elevation","outlined"]),N.string])});function $S({row:e,rowIndex:n,columns:t}){return h.jsx(Ms,{sx:{"& > *":{borderBottom:"unset"}},children:t.map((r,o)=>{const a=r.key??String(o);let i=null;return r.cell?i=r.cell(e,n):r.accessor?i=r.accessor(e,n):r.field&&(i=e?.[r.field]??""),h.jsx(Os,{style:r.width?{width:r.width}:void 0,align:r?.align?r?.align:"left",children:i},a)})})}function jS(e){const{name:n,collapses:t,columns:r,data:o,getRowKey:a}=e;return h.jsx(Af,{component:Lf,sx:{boxShadow:t?"auto":"none",border:t?"auto":"none"},children:h.jsxs(Tf,{"aria-label":"collapsible table",children:[t&&h.jsx(If,{children:h.jsx(Ms,{children:r?.map(i=>h.jsx(Os,{children:i.header}))})}),h.jsx(Mf,{children:o?.map((i,s)=>h.jsx($S,{row:i,rowIndex:s,columns:r??[]},a?a(i,s):s))})]})})}function LS({open:e,onClose:n,customer:t,fields:r=[],header:o,extraSections:a,normalTable:i,normalTableColumns:s=[]}){if(!t)return null;const c=o?.title??(u=>u?.Nombre||u?.name||"Sin título"),l=o?.infoItems??[];return h.jsx(E.Dialog,{open:e,onClose:n,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:"90vh",maxWidth:"80vw",overflow:"hidden",display:"flex",flexDirection:"column"}},children:h.jsxs(E.Box,{sx:{display:"flex",flexDirection:"row",height:"100vh"},children:[h.jsxs(E.Box,{sx:{maxWidth:392,width:"100%",backgroundColor:"#40404024",display:"flex",flexDirection:"column",height:"100%"},children:[h.jsxs(E.Box,{children:[h.jsx(E.Stack,{direction:"row",spacing:2,alignItems:"center",mb:2,sx:{px:2.5,pt:2.5},children:h.jsxs(E.Box,{display:"flex",flexDirection:"column",gap:1,children:[h.jsx(E.Typography,{fontWeight:700,children:c(t)}),l.map((u,d)=>h.jsxs(E.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:u.onClick?"pointer":"default"},onClick:u.onClick?()=>u.onClick(t):void 0,children:[u.icon,h.jsx(E.Typography,{variant:"body2",sx:{color:u.inLink?"#336BE1":"#070C10"},style:{},children:u.value(t)})]},d))]})}),o?.actions?.length?h.jsx(E.Stack,{direction:"row",spacing:1,mb:2,sx:{px:2.5},children:o.actions.map((u,d)=>h.jsxs(E.Button,{variant:"outlined",sx:{color:"#336BE1",borderColor:"#336BE1",gap:1,textTransform:"none"},onClick:()=>u.onClick(t),children:[u.icon,u.label]},d))}):null,h.jsx(E.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:r.map((u,d)=>h.jsxs(E.Box,{display:"flex",justifyContent:"space-between",children:[h.jsx(E.Box,{sx:{width:"50%"},children:h.jsx(E.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:u.label})}),h.jsxs(E.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[h.jsx("div",{children:u?.avatar?u.avatar(t):null}),h.jsx(E.Typography,{variant:"body2",color:"textPrimary",children:u?.value(t)})]})]},d))}),h.jsx(E.Divider,{sx:{my:2}})]}),h.jsxs(E.Box,{sx:{px:2.5,pt:0,gap:2,flex:1,overflowY:"auto",display:"flex",flexDirection:"column"},children:[h.jsx(E.Stack,{children:h.jsx(E.Typography,{variant:"body1",sx:{color:"#5C6372"},children:"Actividad"})}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Crear cliente"}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]})]})]}),h.jsx(E.Divider,{}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Mensaje enviado"}),h.jsxs(E.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.5},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pulvinar pharetra augue. Suspendisse nulla...",h.jsxs(E.Typography,{component:"span",variant:"body2",sx:{color:"#336BE1",cursor:"default"},children:[" ","Ver más"]})]}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]}),h.jsx(E.Box,{sx:{flex:1}}),h.jsx(E.IconButton,{size:"small",sx:{opacity:.7},children:h.jsx(Df,{fontSize:"small"})})]})]}),h.jsx(E.Divider,{}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Mensaje enviado"}),h.jsxs(E.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.5},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pulvinar pharetra augue. Suspendisse nulla...",h.jsxs(E.Typography,{component:"span",variant:"body2",sx:{color:"#336BE1",cursor:"default"},children:[" ","Ver más"]})]}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]})]})]}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Mensaje enviado"}),h.jsxs(E.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.5},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pulvinar pharetra augue. Suspendisse nulla...",h.jsxs(E.Typography,{component:"span",variant:"body2",sx:{color:"#336BE1",cursor:"default"},children:[" ","Ver más"]})]}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]}),h.jsx(E.Box,{sx:{flex:1}}),h.jsx(E.IconButton,{size:"small",sx:{opacity:.7},children:h.jsx(Df,{fontSize:"small"})})]})]})]})]}),h.jsx(E.Box,{sx:{width:"100%",overflowY:"auto"},children:h.jsx(E.Box,{sx:{mt:3},children:h.jsxs(E.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:3},children:[h.jsx(E.Typography,{variant:"h6",sx:{paddingLeft:"20px"},children:"Vehículos:"}),h.jsxs(E.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",paddingX:"20px",children:[h.jsx(E.Box,{children:h.jsx(E.Typography,{fontSize:18,children:"Mostrar:"})}),h.jsx(E.Box,{children:h.jsxs(E.Typography,{fontSize:16,color:"#5C6372",children:[i?.length??0," vehículos"]})})]}),h.jsx(jS,{collapses:!1,columns:s??[],data:i,getRowKey:u=>u.id??u.vin})]})})})]})})}function zf(e,n,t){const{fields:r,order:o=["nombreCliente","email","acciones"],header:a={},cells:i={},hide:s={},actions:c}=n,l=c??{},u=l.show??{},d=l.handlers??{},f=l.accessors??{},m=l.icons??{},g=l.className??"d-flex flex-row gap-2 align-items-center ",p=l.tooltip??{},b=m.view??h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[h.jsx("path",{d:"M18.6,6.3c-3.9-3-9.3-3-13.2,0-1.9,1.5-3.2,3.5-3.9,5.7.7,2.3,2,4.3,3.9,5.7,1.9,1.5,4.2,2.3,6.6,2.3,2.4,0,4.7-.8,6.6-2.3,1.9-1.5,3.2-3.5,3.9-5.7-.7-2.3-2-4.3-3.9-5.7ZM17.2,12.1c0,2.9-2.5,5.3-5.4,5.2-2.9,0-5.3-2.5-5.2-5.4,0-2.9,2.5-5.3,5.4-5.2,2.9,0,5.3,2.4,5.2,5.3,0,0,0,0,0,0Z"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),x={nombreCliente:{key:"nombreCliente",header:a.nombreCliente??"Cliente",accessor:$=>$[r.nombreCliente],cell:i.nombreCliente,width:310},email:{key:"email",header:a.email??"Correo",accessor:$=>$[r.email],cell:i.email??($=>{const Q=String($[r.email]??"");return Q?h.jsx("a",{href:`mailto:${Q}`,children:Q}):h.jsx("span",{className:"text-muted",children:"—"})}),width:250},acciones:s.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??($=>{const Q=Es(u.whatsapp,$,!0),v=Es(u.email,$,!0),M=Es(u.view,$,!0),P=f.phone?.($),H=f.email?.($),Y=()=>{if(d.onWhatsApp)return d.onWhatsApp($);if(!P)return;const be=f.countryCode??"52",z=sS(String(P));typeof window<"u"&&window.open(`https://wa.me/${be}${z}`,"_blank")},ee=()=>{if(d.onEmail)return d.onEmail($);H&&typeof window<"u"&&(window.location.href=`mailto:${H}`)},ae=()=>{d.onView&&d.onView($),t?.($)};return h.jsxs("div",{className:g,children:[Q&&h.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:Y,style:{width:24,height:24},children:h.jsx("img",{src:oS,alt:"WhatsApp"})}),v&&h.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.email??"Email",onClick:ee,style:{width:24,height:24},children:h.jsx("img",{src:aS,alt:"Email"})}),M&&h.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:ae,style:{width:24,height:24},children:b})]})}),width:120}},S=Object.values(x).filter($=>!!$),T=(e??[]).filter($=>!!$?.key),D=new Map;for(const $ of S)D.set(String($.key),$);for(const $ of T)D.set(String($.key),$);const k=[...S.map($=>String($.key)),...T.map($=>String($.key))],O=Array.from(new Set(o.map($=>String($)).filter($=>D.has($)))),I=k.filter($=>!O.includes($)),W=[...O,...I],U="acciones";if(D.has(U)){const $=W.filter(Q=>Q!==U);W.splice(0,W.length,...$,U)}return W.map($=>D.get($))}function zS(e){const{rows:n,columns:t,clientSort:r=!0,defaultSort:o,minWidth:a=1100,rowKey:i=cS,defaults:s,detailConfig:c,extraSections:l,normalTableColumns:u,normalTable:d}=e,[f,m]=w.useState(o??null),[g,p]=w.useState({open:!1,customer:null}),[b,x]=w.useState([]),S=O=>{p({open:!0,customer:O});const I=c?.vehiclesProvider?.(O)??[];x(Array.isArray(I)?I:[])},T=()=>p({open:!1,customer:null}),D=w.useMemo(()=>s?zf(t??[],s,S):zf(t??[],{fields:{},order:[]},S),[t,s]),k=w.useMemo(()=>{if(!r||!f)return n;const O=D.find(W=>W.key===f.key);if(!O)return n;const I=[...n];return I.sort((W,U)=>{const $=Ds(O,W,0),Q=Ds(O,U,0),v=iS($,Q);return f.direction==="asc"?v:-v}),I},[n,D,f,r]);return h.jsxs("div",{className:"",children:[h.jsx("h3",{children:"Ejemplo Componente reutilizable"}),h.jsx("div",{className:"table-clientes back-white rounded-3 shadow-main mt-4 mb-4 ",children:h.jsx("div",{className:"table-responsive",children:h.jsxs("table",{className:"table table-hover align-middle mb-0",style:{minWidth:a},children:[h.jsx("thead",{children:h.jsx("tr",{children:D.map(O=>h.jsx("th",{style:{fontWeight:600,width:O.width},children:O.header},O.key))})}),h.jsx("tbody",{children:k.map((O,I)=>h.jsx("tr",{children:D.map((W,U)=>{const $=W.Component?h.jsx(W.Component,{row:O,index:I}):W.cell?W.cell(O,I):(()=>{const Q=Ds(W,O,I);return Q==null||Q===""?"":String(Q)})();return h.jsx("td",{children:$},`${String(W.key)}-${U}`)})},i(O,I)))})]})})}),h.jsx(LS,{open:g.open,onClose:T,customer:g.customer,fields:c?.dynamicFields,header:c?.header,extraSections:l,normalTableColumns:u,normalTable:d})]})}function BS(e){const{open:n,dataAdd:t,fields:r,defaultValues:o,onSubmit:a,onCancel:i}=e;console.log("fields",r);const{control:s,handleSubmit:c,formState:{errors:l,isSubmitting:u}}=kd({defaultValues:o,mode:"onBlur"}),d=f=>{const m={width:"100%"};if(f.render)return h.jsx(mt,{name:f.name,control:s,rules:{required:f.required||!1},render:({field:p,fieldState:b})=>h.jsxs(E.Box,{sx:m,children:[f.render({value:p.value,onChange:p.onChange,error:b.error?.message}),!!b.error&&h.jsx(E.FormHelperText,{error:!0,children:b.error.message})]})});if(f.kind==="select")return h.jsx(mt,{name:f.name,control:s,rules:{required:f.required||!1},render:({field:p,fieldState:b})=>h.jsx(E.TextField,{...p,select:!0,label:f.label,placeholder:f.placeholder,fullWidth:!0,disabled:f.disabled,helperText:b.error?.message||f.helperText,error:!!b.error,children:f.options.map(x=>h.jsx(E.MenuItem,{value:x.value,children:x.label},String(x.value)))})});if(f.kind==="date")return h.jsx(mt,{name:f.name,control:s,rules:{required:f.required||!1},render:({field:p,fieldState:b})=>h.jsx(E.TextField,{...p,type:"date",label:f.label,placeholder:f.placeholder,fullWidth:!0,disabled:f.disabled,helperText:b.error?.message||f.helperText,error:!!b.error,InputLabelProps:{shrink:!0}})});const g=f.kind==="multiline";return h.jsx(mt,{name:f.name,control:s,rules:{required:f.required||!1},render:({field:p,fieldState:b})=>h.jsx(E.TextField,{...p,type:g?"text":f.kind,label:f.label,placeholder:f.placeholder,fullWidth:!0,disabled:f.disabled,multiline:g,rows:g?f.rows??3:void 0,inputProps:"inputProps"in f?f.inputProps:void 0,error:!!b.error,helperText:b.error?.message||f.helperText,InputProps:{startAdornment:"startAdornment"in f&&f.startAdornment?h.jsx(E.InputAdornment,{position:"start",children:f.startAdornment}):void 0,endAdornment:"endAdornment"in f&&f.endAdornment?h.jsx(E.InputAdornment,{position:"end",children:f.endAdornment}):void 0}})})};return h.jsx(E.Dialog,{open:!0,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:"90vh",maxWidth:"80vw",overflow:"hidden",display:"flex",flexDirection:"column"}},children:h.jsxs(E.Box,{display:"flex",flexDirection:"row",width:"100%",height:"100%",children:[h.jsxs(E.Box,{sx:{maxWidth:394,width:"100%",boxShadow:"2px 0px 8px #40404024",padding:"24px"},children:[h.jsx(E.Typography,{fontWeight:700,fontSize:20,children:t.title}),h.jsxs(E.Typography,{fontSize:18,mt:2.5,children:[t.subTitle," "]}),h.jsx(E.Box,{children:h.jsxs(E.Stack,{spacing:2.5,mt:3,children:[r.map((f,m)=>h.jsx(E.Box,{children:d(f)},`${f.name}-${m}`)),h.jsxs(E.Stack,{direction:"row",spacing:1.5,pt:1,children:[i&&h.jsx(E.Button,{variant:"outlined",onClick:i,children:"Cancelar"}),h.jsx(E.Button,{type:"submit",variant:"contained",disabled:u,children:"Guardar"})]})]})})]}),h.jsx(E.Box,{})]})})}lt.AddCliente=BS,lt.ApiProvider=Xb,lt.Clientes=zS,lt.CustomSnackbar=kf,lt.MyCalendar=nS,lt.useEventRepository=es,Object.defineProperty(lt,Symbol.toStringTag,{value:"Module"})}));
|
|
174
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const x=m.compile();return(T,D)=>x(f,T,D)};let i;const a=Ai,s=!Pd.jitless,l=s&&T2.value,u=n.catchall;let d;e._zod.parse=(f,m)=>{d??(d=r.value);const g=f.value;return a(g)?s&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(n.shape)),f=i(f,m),u?Gd([],g,f,m,d,e):f):t(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Qd(e,n,t,r){for(const i of e)if(i.issues.length===0)return n.value=i.value,n;const o=e.filter(i=>!vn(i));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(i=>i.issues.map(a=>Yr(a,r,Fr())))}),n)}const yw=B("$ZodUnion",(e,n)=>{Qe.init(e,n),Fe(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Fe(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Fe(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Fe(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>gs(i.source)).join("|")})$`)}});const t=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(o,i)=>{if(t)return r(o,i);let a=!1;const s=[];for(const c of n.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>Qd(c,o,e,i)):Qd(s,o,e,i)}}),bw=B("$ZodIntersection",(e,n)=>{Qe.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,i=n.left._zod.run({value:o,issues:[]},r),a=n.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Jd(t,c,l)):Jd(t,i,a)}});function ws(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(oo(e)&&oo(n)){const t=Object.keys(n),r=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...n};for(const i of r){const a=ws(e[i],n[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],i=n[r],a=ws(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};t.push(a.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Jd(e,n,t){if(n.issues.length&&e.issues.push(...n.issues),t.issues.length&&e.issues.push(...t.issues),vn(e))return e;const r=ws(n.value,t.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const ww=B("$ZodEnum",(e,n)=>{Qe.init(e,n);const t=k2(n.entries),r=new Set(t);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.filter(o=>O2.has(typeof o)).map(o=>typeof o=="string"?gn(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:t,input:a,inst:e}),o}}),_w=B("$ZodLiteral",(e,n)=>{if(Qe.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(n.values),e._zod.pattern=new RegExp(`^(${n.values.map(t=>typeof t=="string"?gn(t):t?gn(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:n.values,input:o,inst:e}),t}}),xw=B("$ZodTransform",(e,n)=>{Qe.init(e,n),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Ad(e.constructor.name);const o=n.transform(t.value,t);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(t.value=a,t));if(o instanceof Promise)throw new hn;return t.value=o,t}});function Xd(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Sw=B("$ZodOptional",(e,n)=>{Qe.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Fe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Fe(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${gs(t.source)})?$`):void 0}),e._zod.parse=(t,r)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>Xd(i,t.value)):Xd(o,t.value)}return t.value===void 0?t:n.innerType._zod.run(t,r)}}),Cw=B("$ZodNullable",(e,n)=>{Qe.init(e,n),Fe(e._zod,"optin",()=>n.innerType._zod.optin),Fe(e._zod,"optout",()=>n.innerType._zod.optout),Fe(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${gs(t.source)}|null)$`):void 0}),Fe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),kw=B("$ZodDefault",(e,n)=>{Qe.init(e,n),e._zod.optin="optional",Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>ef(i,n)):ef(o,n)}});function ef(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const Dw=B("$ZodPrefault",(e,n)=>{Qe.init(e,n),e._zod.optin="optional",Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>(r.direction==="backward"||t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),Ew=B("$ZodNonOptional",(e,n)=>{Qe.init(e,n),Fe(e._zod,"values",()=>{const t=n.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>tf(i,e)):tf(o,e)}});function tf(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const Tw=B("$ZodCatch",(e,n)=>{Qe.init(e,n),Fe(e._zod,"optin",()=>n.innerType._zod.optin),Fe(e._zod,"optout",()=>n.innerType._zod.optout),Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=n.catchValue({...t,error:{issues:i.issues.map(a=>Yr(a,r,Fr()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=n.catchValue({...t,error:{issues:o.issues.map(i=>Yr(i,r,Fr()))},input:t.value}),t.issues=[]),t)}}),Ow=B("$ZodPipe",(e,n)=>{Qe.init(e,n),Fe(e._zod,"values",()=>n.in._zod.values),Fe(e._zod,"optin",()=>n.in._zod.optin),Fe(e._zod,"optout",()=>n.out._zod.optout),Fe(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(t,r)=>{if(r.direction==="backward"){const i=n.out._zod.run(t,r);return i instanceof Promise?i.then(a=>Bi(a,n.in,r)):Bi(i,n.in,r)}const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(i=>Bi(i,n.out,r)):Bi(o,n.out,r)}});function Bi(e,n,t){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},t)}const Mw=B("$ZodReadonly",(e,n)=>{Qe.init(e,n),Fe(e._zod,"propValues",()=>n.innerType._zod.propValues),Fe(e._zod,"values",()=>n.innerType._zod.values),Fe(e._zod,"optin",()=>n.innerType._zod.optin),Fe(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(rf):rf(o)}});function rf(e){return e.value=Object.freeze(e.value),e}const Aw=B("$ZodCustom",(e,n)=>{St.init(e,n),Qe.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(i=>nf(i,t,r,e));nf(o,t,r,e)}});function nf(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(io(o))}}class Pw{constructor(){this._map=new Map,this._idmap=new Map}add(n,...t){const r=t[0];if(this._map.set(n,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const o={...r,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Iw(){return new Pw}const Vi=Iw();function Nw(e,n){return new e({type:"string",...le(n)})}function Rw(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...le(n)})}function of(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...le(n)})}function $w(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...le(n)})}function jw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(n)})}function Lw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(n)})}function zw(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(n)})}function Bw(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...le(n)})}function Vw(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...le(n)})}function Fw(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(n)})}function Yw(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...le(n)})}function Hw(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(n)})}function Uw(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...le(n)})}function Ww(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...le(n)})}function Zw(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(n)})}function qw(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(n)})}function Kw(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(n)})}function Gw(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(n)})}function Qw(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(n)})}function Jw(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...le(n)})}function Xw(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...le(n)})}function e_(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...le(n)})}function t_(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...le(n)})}function r_(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(n)})}function n_(e,n){return new e({type:"string",format:"date",check:"string_format",...le(n)})}function o_(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...le(n)})}function i_(e,n){return new e({type:"string",format:"duration",check:"string_format",...le(n)})}function a_(e,n){return new e({type:"number",checks:[],...le(n)})}function s_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...le(n)})}function c_(e,n){return new e({type:"boolean",...le(n)})}function l_(e){return new e({type:"unknown"})}function u_(e,n){return new e({type:"never",...le(n)})}function af(e,n){return new Hd({check:"less_than",...le(n),value:e,inclusive:!1})}function _s(e,n){return new Hd({check:"less_than",...le(n),value:e,inclusive:!0})}function sf(e,n){return new Ud({check:"greater_than",...le(n),value:e,inclusive:!1})}function xs(e,n){return new Ud({check:"greater_than",...le(n),value:e,inclusive:!0})}function cf(e,n){return new D1({check:"multiple_of",...le(n),value:e})}function lf(e,n){return new T1({check:"max_length",...le(n),maximum:e})}function Fi(e,n){return new O1({check:"min_length",...le(n),minimum:e})}function uf(e,n){return new M1({check:"length_equals",...le(n),length:e})}function d_(e,n){return new A1({check:"string_format",format:"regex",...le(n),pattern:e})}function f_(e){return new P1({check:"string_format",format:"lowercase",...le(e)})}function p_(e){return new I1({check:"string_format",format:"uppercase",...le(e)})}function h_(e,n){return new N1({check:"string_format",format:"includes",...le(n),includes:e})}function m_(e,n){return new R1({check:"string_format",format:"starts_with",...le(n),prefix:e})}function g_(e,n){return new $1({check:"string_format",format:"ends_with",...le(n),suffix:e})}function ao(e){return new j1({check:"overwrite",tx:e})}function v_(e){return ao(n=>n.normalize(e))}function y_(){return ao(e=>e.trim())}function b_(){return ao(e=>e.toLowerCase())}function w_(){return ao(e=>e.toUpperCase())}function __(e,n,t){return new e({type:"array",element:n,...le(t)})}function x_(e,n,t){return new e({type:"custom",check:"custom",fn:n,...le(t)})}function S_(e){const n=C_(t=>(t.addIssue=r=>{if(typeof r=="string")t.issues.push(io(r,t.value,n._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),t.issues.push(io(o))}},e(t.value,t)));return n}function C_(e,n){const t=new St({check:"custom",...le(n)});return t._zod.check=e,t}function df(e,n){try{var t=e()}catch(r){return n(r)}return t&&t.then?t.then(void 0,n):t}function k_(e,n){for(var t={};e.length;){var r=e[0],o=r.code,i=r.message,a=r.path.join(".");if(!t[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),n){var c=t[a].types,l=c&&c[r.code];t[a]=cs(a,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function D_(e,n){for(var t={};e.length;){var r=e[0],o=r.code,i=r.message,a=r.path.join(".");if(!t[a])if(r.code==="invalid_union"&&r.errors.length>0){var s=r.errors[0][0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),n){var c=t[a].types,l=c&&c[r.code];t[a]=cs(a,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function E_(e,n,t){if(t===void 0&&(t={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,i){try{return Promise.resolve(df(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(a){return i.shouldUseNativeValidation&&fs({},i),{errors:{},values:t.raw?Object.assign({},r):a}})},function(a){if((function(s){return Array.isArray(s?.issues)})(a))return{values:{},errors:Od(k_(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,i){try{return Promise.resolve(df(function(){return Promise.resolve((t.mode==="sync"?V2:F2)(e,r,n)).then(function(a){return i.shouldUseNativeValidation&&fs({},i),{errors:{},values:t.raw?Object.assign({},r):a}})},function(a){if((function(s){return s instanceof ys})(a))return{values:{},errors:Od(D_(a.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const T_=B("ZodISODateTime",(e,n)=>{Q1.init(e,n),qe.init(e,n)});function O_(e){return r_(T_,e)}const M_=B("ZodISODate",(e,n)=>{J1.init(e,n),qe.init(e,n)});function A_(e){return n_(M_,e)}const P_=B("ZodISOTime",(e,n)=>{X1.init(e,n),qe.init(e,n)});function I_(e){return o_(P_,e)}const N_=B("ZodISODuration",(e,n)=>{ew.init(e,n),qe.init(e,n)});function R_(e){return i_(N_,e)}const Lt=B("ZodError",(e,n)=>{ys.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>B2(e,t)},flatten:{value:t=>z2(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ps,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ps,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),$_=Ni(Lt),j_=Ri(Lt),L_=$i(Lt),z_=ji(Lt),B_=U2(Lt),V_=W2(Lt),F_=Z2(Lt),Y_=q2(Lt),H_=K2(Lt),U_=G2(Lt),W_=Q2(Lt),Z_=J2(Lt),rt=B("ZodType",(e,n)=>(Qe.init(e,n),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone({...n,checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(t,r)=>Er(e,t,r),e.brand=()=>e,e.register=((t,r)=>(t.add(e,r),e)),e.parse=(t,r)=>$_(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>L_(e,t,r),e.parseAsync=async(t,r)=>j_(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>z_(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>B_(e,t,r),e.decode=(t,r)=>V_(e,t,r),e.encodeAsync=async(t,r)=>F_(e,t,r),e.decodeAsync=async(t,r)=>Y_(e,t,r),e.safeEncode=(t,r)=>H_(e,t,r),e.safeDecode=(t,r)=>U_(e,t,r),e.safeEncodeAsync=async(t,r)=>W_(e,t,r),e.safeDecodeAsync=async(t,r)=>Z_(e,t,r),e.refine=(t,r)=>e.check(Fx(t,r)),e.superRefine=t=>e.check(Yx(t)),e.overwrite=t=>e.check(ao(t)),e.optional=()=>bf(e),e.nullable=()=>wf(e),e.nullish=()=>bf(wf(e)),e.nonoptional=t=>Rx(e,t),e.array=()=>yx(e),e.or=t=>xx([e,t]),e.and=t=>Cx(e,t),e.transform=t=>xf(e,Ox(t)),e.default=t=>Px(e,t),e.prefault=t=>Nx(e,t),e.catch=t=>jx(e,t),e.pipe=t=>xf(e,t),e.readonly=()=>Bx(e),e.describe=t=>{const r=e.clone();return Vi.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){return Vi.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Vi.get(e);const r=e.clone();return Vi.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),ff=B("_ZodString",(e,n)=>{bs.init(e,n),rt.init(e,n);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(d_(...r)),e.includes=(...r)=>e.check(h_(...r)),e.startsWith=(...r)=>e.check(m_(...r)),e.endsWith=(...r)=>e.check(g_(...r)),e.min=(...r)=>e.check(Fi(...r)),e.max=(...r)=>e.check(lf(...r)),e.length=(...r)=>e.check(uf(...r)),e.nonempty=(...r)=>e.check(Fi(1,...r)),e.lowercase=r=>e.check(f_(r)),e.uppercase=r=>e.check(p_(r)),e.trim=()=>e.check(y_()),e.normalize=(...r)=>e.check(v_(...r)),e.toLowerCase=()=>e.check(b_()),e.toUpperCase=()=>e.check(w_())}),q_=B("ZodString",(e,n)=>{bs.init(e,n),ff.init(e,n),e.email=t=>e.check(Rw(K_,t)),e.url=t=>e.check(Bw(G_,t)),e.jwt=t=>e.check(t_(dx,t)),e.emoji=t=>e.check(Vw(Q_,t)),e.guid=t=>e.check(of(pf,t)),e.uuid=t=>e.check($w(Yi,t)),e.uuidv4=t=>e.check(jw(Yi,t)),e.uuidv6=t=>e.check(Lw(Yi,t)),e.uuidv7=t=>e.check(zw(Yi,t)),e.nanoid=t=>e.check(Fw(J_,t)),e.guid=t=>e.check(of(pf,t)),e.cuid=t=>e.check(Yw(X_,t)),e.cuid2=t=>e.check(Hw(ex,t)),e.ulid=t=>e.check(Uw(tx,t)),e.base64=t=>e.check(Jw(cx,t)),e.base64url=t=>e.check(Xw(lx,t)),e.xid=t=>e.check(Ww(rx,t)),e.ksuid=t=>e.check(Zw(nx,t)),e.ipv4=t=>e.check(qw(ox,t)),e.ipv6=t=>e.check(Kw(ix,t)),e.cidrv4=t=>e.check(Gw(ax,t)),e.cidrv6=t=>e.check(Qw(sx,t)),e.e164=t=>e.check(e_(ux,t)),e.datetime=t=>e.check(O_(t)),e.date=t=>e.check(A_(t)),e.time=t=>e.check(I_(t)),e.duration=t=>e.check(R_(t))});function Zt(e){return Nw(q_,e)}const qe=B("ZodStringFormat",(e,n)=>{Ze.init(e,n),ff.init(e,n)}),K_=B("ZodEmail",(e,n)=>{F1.init(e,n),qe.init(e,n)}),pf=B("ZodGUID",(e,n)=>{B1.init(e,n),qe.init(e,n)}),Yi=B("ZodUUID",(e,n)=>{V1.init(e,n),qe.init(e,n)}),G_=B("ZodURL",(e,n)=>{Y1.init(e,n),qe.init(e,n)}),Q_=B("ZodEmoji",(e,n)=>{H1.init(e,n),qe.init(e,n)}),J_=B("ZodNanoID",(e,n)=>{U1.init(e,n),qe.init(e,n)}),X_=B("ZodCUID",(e,n)=>{W1.init(e,n),qe.init(e,n)}),ex=B("ZodCUID2",(e,n)=>{Z1.init(e,n),qe.init(e,n)}),tx=B("ZodULID",(e,n)=>{q1.init(e,n),qe.init(e,n)}),rx=B("ZodXID",(e,n)=>{K1.init(e,n),qe.init(e,n)}),nx=B("ZodKSUID",(e,n)=>{G1.init(e,n),qe.init(e,n)}),ox=B("ZodIPv4",(e,n)=>{tw.init(e,n),qe.init(e,n)}),ix=B("ZodIPv6",(e,n)=>{rw.init(e,n),qe.init(e,n)}),ax=B("ZodCIDRv4",(e,n)=>{nw.init(e,n),qe.init(e,n)}),sx=B("ZodCIDRv6",(e,n)=>{ow.init(e,n),qe.init(e,n)}),cx=B("ZodBase64",(e,n)=>{iw.init(e,n),qe.init(e,n)}),lx=B("ZodBase64URL",(e,n)=>{sw.init(e,n),qe.init(e,n)}),ux=B("ZodE164",(e,n)=>{cw.init(e,n),qe.init(e,n)}),dx=B("ZodJWT",(e,n)=>{uw.init(e,n),qe.init(e,n)}),hf=B("ZodNumber",(e,n)=>{Zd.init(e,n),rt.init(e,n),e.gt=(r,o)=>e.check(sf(r,o)),e.gte=(r,o)=>e.check(xs(r,o)),e.min=(r,o)=>e.check(xs(r,o)),e.lt=(r,o)=>e.check(af(r,o)),e.lte=(r,o)=>e.check(_s(r,o)),e.max=(r,o)=>e.check(_s(r,o)),e.int=r=>e.check(gf(r)),e.safe=r=>e.check(gf(r)),e.positive=r=>e.check(sf(0,r)),e.nonnegative=r=>e.check(xs(0,r)),e.negative=r=>e.check(af(0,r)),e.nonpositive=r=>e.check(_s(0,r)),e.multipleOf=(r,o)=>e.check(cf(r,o)),e.step=(r,o)=>e.check(cf(r,o)),e.finite=()=>e;const t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),e.isFinite=!0,e.format=t.format??null});function mf(e){return a_(hf,e)}const fx=B("ZodNumberFormat",(e,n)=>{dw.init(e,n),hf.init(e,n)});function gf(e){return s_(fx,e)}const px=B("ZodBoolean",(e,n)=>{fw.init(e,n),rt.init(e,n)});function Ss(e){return c_(px,e)}const hx=B("ZodUnknown",(e,n)=>{pw.init(e,n),rt.init(e,n)});function vf(){return l_(hx)}const mx=B("ZodNever",(e,n)=>{hw.init(e,n),rt.init(e,n)});function gx(e){return u_(mx,e)}const vx=B("ZodArray",(e,n)=>{mw.init(e,n),rt.init(e,n),e.element=n.element,e.min=(t,r)=>e.check(Fi(t,r)),e.nonempty=t=>e.check(Fi(1,t)),e.max=(t,r)=>e.check(lf(t,r)),e.length=(t,r)=>e.check(uf(t,r)),e.unwrap=()=>e.element});function yx(e,n){return __(vx,e,n)}const bx=B("ZodObject",(e,n)=>{vw.init(e,n),rt.init(e,n),Fe(e,"shape",()=>n.shape),e.keyof=()=>kx(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vf()}),e.loose=()=>e.clone({...e._zod.def,catchall:vf()}),e.strict=()=>e.clone({...e._zod.def,catchall:gx()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>N2(e,t),e.safeExtend=t=>R2(e,t),e.merge=t=>$2(e,t),e.pick=t=>P2(e,t),e.omit=t=>I2(e,t),e.partial=(...t)=>j2(yf,e,t[0]),e.required=(...t)=>L2(_f,e,t[0])});function wx(e,n){const t={type:"object",get shape(){return Dr(this,"shape",e?E2(e):{}),this.shape},...le(n)};return new bx(t)}const _x=B("ZodUnion",(e,n)=>{yw.init(e,n),rt.init(e,n),e.options=n.options});function xx(e,n){return new _x({type:"union",options:e,...le(n)})}const Sx=B("ZodIntersection",(e,n)=>{bw.init(e,n),rt.init(e,n)});function Cx(e,n){return new Sx({type:"intersection",left:e,right:n})}const Cs=B("ZodEnum",(e,n)=>{ww.init(e,n),rt.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(t.has(a))i[a]=n.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Cs({...n,checks:[],...le(o),entries:i})},e.exclude=(r,o)=>{const i={...n.entries};for(const a of r)if(t.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Cs({...n,checks:[],...le(o),entries:i})}});function kx(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Cs({type:"enum",entries:t,...le(n)})}const Dx=B("ZodLiteral",(e,n)=>{_w.init(e,n),rt.init(e,n),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Ex(e,n){return new Dx({type:"literal",values:Array.isArray(e)?e:[e],...le(n)})}const Tx=B("ZodTransform",(e,n)=>{xw.init(e,n),rt.init(e,n),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new Ad(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(io(i,t.value,n));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=t.value),a.inst??(a.inst=e),t.issues.push(io(a))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function Ox(e){return new Tx({type:"transform",transform:e})}const yf=B("ZodOptional",(e,n)=>{Sw.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function bf(e){return new yf({type:"optional",innerType:e})}const Mx=B("ZodNullable",(e,n)=>{Cw.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function wf(e){return new Mx({type:"nullable",innerType:e})}const Ax=B("ZodDefault",(e,n)=>{kw.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Px(e,n){return new Ax({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():$d(n)}})}const Ix=B("ZodPrefault",(e,n)=>{Dw.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Nx(e,n){return new Ix({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():$d(n)}})}const _f=B("ZodNonOptional",(e,n)=>{Ew.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Rx(e,n){return new _f({type:"nonoptional",innerType:e,...le(n)})}const $x=B("ZodCatch",(e,n)=>{Tw.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jx(e,n){return new $x({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Lx=B("ZodPipe",(e,n)=>{Ow.init(e,n),rt.init(e,n),e.in=n.in,e.out=n.out});function xf(e,n){return new Lx({type:"pipe",in:e,out:n})}const zx=B("ZodReadonly",(e,n)=>{Mw.init(e,n),rt.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Bx(e){return new zx({type:"readonly",innerType:e})}const Vx=B("ZodCustom",(e,n)=>{Aw.init(e,n),rt.init(e,n)});function Fx(e,n={}){return x_(Vx,e,n)}function Yx(e){return S_(e)}const Sf=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,Cf=(e,n)=>{if(!e||!n)return null;const t=e.split("-");if(t.length!==3)return null;const r=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=n.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(r,o,i,s,c);return isNaN(l.getTime())||!y.isValid(l)?null:l},Hx=wx({titulo:Zt().min(1,"El campo Título es requerido."),fechaInicio:Zt().min(1,"El campo fecha inicio es requerido."),horaInicio:Zt().min(1,"La hora de inicio es requerida.").regex(Sf,{message:"Formato inválido"}),horaFin:Zt().min(1,"La hora fin es requerida.").regex(Sf,{message:"Formato inválido"}),todoElDia:Ss(),fechaFin:Zt().optional(),showEndDate:Ss().optional(),horaInicio2:Zt().optional(),TodoElDia2:Ss().optional(),client:Zt().optional().nullable(),repetir:Zt().optional(),link:Zt().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(Ex("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:Zt().optional(),color:Zt().optional(),solID:mf().optional().nullable(),disID:mf().optional().nullable()}).refine(e=>e.showEndDate?e.fechaFin&&e.fechaFin.length>0:!0,{message:"La fecha de fin es requerida.",path:["fechaFin"]}).refine(e=>e.fechaFin!==void 0?!!e.fechaFin&&!!e.horaInicio2:!0,{message:"La hora de fin son requeridas.",path:["horaInicio2"]}).refine(e=>{if(e.todoElDia||!e.fechaInicio||!e.horaInicio||!e.fechaFin||!e.horaInicio2)return!0;const n=Cf(e.fechaInicio,e.horaInicio),t=Cf(e.fechaFin,e.horaFin);return!n||!t||!y.isValid(n)||!y.isValid(t)?!0:!(y.isBefore(t,n)&&!y.isSameDay(t,n)||y.isSameDay(n,t)&&y.isBefore(t,n))},{message:"",path:["horaFin"]}),kf=e=>W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},W.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),W.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),Ux="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M7.288%2022.986h-.147a6.2%206.2%200%200%201-4.28-1.85c-2.404-2.404-2.478-6.24-.16-8.557L4.28%2011a1.228%201.228%200%201%201%201.739%201.739L4.44%2014.317c-1.356%201.357-1.282%203.626.16%205.068a3.82%203.82%200%200%200%202.602%201.135c.95%200%201.825-.32%202.479-.974l1.578-1.579a1.23%201.23%200%200%201%201.739%200c.48.481.48%201.258%200%201.739l-1.579%201.578c-1.097%201.098-2.552%201.69-4.13%201.69zM17.98%2012.998a1.23%201.23%200%200%201%200-1.739l1.578-1.578c.654-.654.986-1.53.974-2.466a3.78%203.78%200%200%200-1.134-2.602c-1.443-1.443-3.712-1.517-5.068-.16L12.75%206.03c-.48.48-1.258.48-1.739%200a1.23%201.23%200%200%201%200-1.739l1.579-1.578c2.318-2.319%206.153-2.245%208.558.16a6.23%206.23%200%200%201%201.85%204.279%205.84%205.84%200%200%201-1.69%204.279l-1.578%201.578c-.481.481-1.258.481-1.74%200z'/%3e%3cpath%20d='M14.172%208.11%208.07%2014.214a1.233%201.233%200%200%200%201.743%201.744l6.104-6.104a1.233%201.233%200%201%200-1.744-1.744'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Wx=e=>W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},W.createElement("g",{clipPath:"url(#a)"},W.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),W.createElement("defs",null,W.createElement("clipPath",{id:"a"},W.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Zx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M13.17%2013.68c2.06%200%204%20.8%205.46%202.27a7.7%207.7%200%200%201%202.26%205.47c0%20.79-.64%201.43-1.43%201.43l.01-.01H4.53c-.79%200-1.43-.64-1.43-1.43%200-4.27%203.46-7.73%207.72-7.73zM12%201.9c2.82%200%205.11%202.29%205.11%205.11s-2.29%205.11-5.11%205.11v-.01c-2.82%200-5.11-2.29-5.11-5.11S9.18%201.9%2012%201.9'/%3e%3c/svg%3e",qx=e=>W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},W.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},W.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),W.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),W.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),W.createElement("defs",null,W.createElement("clipPath",{id:"a"},W.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Kx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.789%2017H3.21C2.542%2017%202%2017.56%202%2018.25s.542%201.25%201.211%201.25H13.79c.669%200%201.211-.56%201.211-1.25S14.458%2017%2013.789%2017M20.718%204H3.282C2.574%204%202%204.56%202%205.25S2.574%206.5%203.282%206.5h17.436C21.426%206.5%2022%205.94%2022%205.25S21.426%204%2020.718%204M20.718%2010.5H3.282C2.574%2010.5%202%2011.06%202%2011.75S2.574%2013%203.282%2013h17.436c.708%200%201.282-.56%201.282-1.25s-.574-1.25-1.282-1.25'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Gx=e=>W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},W.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),W.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"})),Df=Xt(h.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),ks=Xt(h.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"),Qx={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",sm:450,md:500},bgcolor:"background.paper",boxShadow:24,p:{xs:2,sm:3},borderRadius:2,maxHeight:"90vh",overflowY:"auto"},Ds=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],yn=(()=>{const e=[];for(let n=0;n<24;n++)for(let t=0;t<60;t+=15){const r=n.toString().padStart(2,"0"),o=t.toString().padStart(2,"0");e.push(`${r}:${o}`)}return e})(),so=(e,n)=>{if(!e||!n)return null;const t=e.split("-");if(t.length!==3)return null;const r=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=n.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(i,o,r,s,c);return isNaN(l.getTime())||!y.isValid(l)?null:l},Jx=({isVisible:e,onClose:n,onSave:t,onDelete:r,selectedDate:o,initialEvent:i,userId:a,masNombreBD:s,disId:c})=>{const[l,u]=w.useState(!1),[d,f]=w.useState(!1),m=y.format(new Date,"yyyy-MM-dd"),[g,p]=w.useState(""),[b,S]=w.useState([]),[x,T]=w.useState(!1),D=es(),[k,O]=w.useState([]),[R,U]=w.useState(""),{control:H,handleSubmit:V,reset:K,formState:{errors:v,isValid:$},watch:M,setValue:L}=Ed({resolver:E_(Hx),defaultValues:{titulo:"",fechaInicio:y.format(new Date,"yyyy-MM-dd"),horaInicio:y.format(new Date,"HH:mm"),horaFin:y.format(y.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Ds[0],solID:null},mode:"onChange"}),Y=M("fechaInicio"),J=M("fechaFin"),oe=M("todoElDia");w.useEffect(()=>{if(g.trim()===""||!a||!c||!s){S([]),O([]),L("solID",null),T(!1),U("");return}console.log("medo"),T(!0);const P=setTimeout(()=>{D.getClients(g,c,s,a).then(te=>{if(T(!1),te){const Ce=te.map(ct=>ct.solID);O([...new Set(Ce)])}else O([]);const _e=Array.from(new Map(te.map(Ce=>[Ce.nombreCliente,Ce])).values());if(_e.length>0)S(_e),U("");else if(i?.client&&i.solID!==null){const Ce=[{solID:i.solID,nombreCliente:i.client}];S(Ce),U("Sin resultados")}else S([]),U("Sin resultados")}).catch(te=>{console.error("Error al buscar clientes:",te),T(!1)})},500);return()=>clearTimeout(P)},[g,a,c,s]),w.useEffect(()=>{if(Y&&J){const P=new Date(Y),te=new Date(J);(P===te||P>te)&&L("fechaFin",Y)}},[Y,J,L]),w.useEffect(()=>{Y&&L("fechaFin",Y)},[Y]),w.useEffect(()=>{L("showEndDate",l)},[l,L]),w.useEffect(()=>{if(i){const P=y.format(i.fechaInicio,"yyyy-MM-dd")===y.format(i.fechaFin,"yyyy-MM-dd");u(!P),L("titulo",i?.titulo),L("fechaInicio",y.format(i.fechaInicio,"yyyy-MM-dd")),L("fechaFin",y.format(i.fechaFin,"yyyy-MM-dd")),L("horaInicio",y.format(i.fechaInicio,"HH:mm")),L("horaFin",y.format(i.fechaFin,"HH:mm")),L("horaInicio2",y.format(i.fechaFin,"HH:mm")),L("descripcion",i.descripcion),L("link",i.link),L("repetir","false"),L("color",i.color),L("todoElDia",i.todoElDia),L("solID",i.solID),L("client",i.client),i.solID?f(!0):f(!1)}else{const P=o||new Date,te=new Date,_e=new Date(P.getFullYear(),P.getMonth(),P.getDate(),te.getHours(),te.getMinutes()),Ce=y.addHours(_e,1);K({titulo:"",fechaInicio:y.format(_e,"yyyy-MM-dd"),horaInicio:y.format(_e,"HH:mm"),fechaFin:y.format(Ce,"yyyy-MM-dd"),horaFin:y.format(Ce,"HH:mm"),horaInicio2:y.format(Ce,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Ds[0],solID:null}),u(!1),f(!1)}},[i,e,o]);const we=V(P=>{t(P,i?.eventoID),n(),K(),u(!1)},P=>{console.log("Errores de validación:",P)});w.useEffect(()=>{oe&&(L("horaInicio","00:00"),L("horaFin","23:59"))},[oe,L,M]);const F=()=>{const P=M("fechaInicio");if(P){const te=new Date(`${P}T00:00:00`),_e=y.addDays(te,1);L("fechaFin",y.format(_e,"yyyy-MM-dd"))}u(!0)},q=M("fechaInicio"),de=M("horaInicio"),he=M("fechaFin"),fe=M("horaFin"),[G,ae]=w.useState(null),[ue,me]=w.useState(null);w.useEffect(()=>{(G===null||G!==de)&&ae(de)},[de,G]),w.useEffect(()=>{(ue===null||ue!==fe)&&me(fe??"")},[fe,ue]);const ve=M("todoElDia");w.useEffect(()=>{if(ve||!de||!fe||!q||!he)return;const P=so(q,de),te=so(he,fe);if(!P||!te||!y.isValid(P)||!y.isValid(te))return;const _e=y.isSameDay(P,te),Ce=_e&&(y.isAfter(P,te)||P.getTime()===te.getTime()),ct=y.isBefore(te,P)&&!_e;(Ce||ct)&&(L("horaFin",""),me(""))},[de,q]);const pe=w.useMemo(()=>{if(!de||!q)return yn;const P=so(q,de),te=so(he,"00:00");return!P||!te||!y.isValid(P)||!y.isValid(te)||y.isBefore(te,P)&&!y.isSameDay(te,P)?yn:y.isSameDay(P,te)?yn.filter(_e=>{const Ce=so(he,_e);return Ce&&y.isAfter(Ce,P)}):(y.isAfter(te,P),yn)},[de,q,he]),Ye=w.useMemo(()=>yn,[]);return h.jsx(E.Modal,{open:e,onClose:n,children:h.jsx("form",{onSubmit:we,children:h.jsxs(E.Box,{sx:Qx,children:[h.jsx(E.IconButton,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:12},children:h.jsx(ks,{})}),h.jsx(E.Typography,{variant:"h6",mb:2,children:i?"Editar evento":"Agregar evento"}),h.jsxs(E.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(Pt,{name:"titulo",control:H,render:({field:P})=>h.jsx(E.TextField,{...P,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!v.titulo,helperText:v.titulo?.message,inputProps:{maxLength:100},sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(E.Divider,{})}),h.jsx(E.Grid,{size:{xs:12,md:4},children:h.jsx(Pt,{name:"fechaInicio",control:H,render:({field:P})=>h.jsx(E.TextField,{fullWidth:!0,...P,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!v.fechaInicio,helperText:v.fechaInicio?.message})})}),l?h.jsxs(h.Fragment,{children:[h.jsx(E.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),h.jsx(E.Grid,{size:{xs:11,md:4},children:h.jsx(Pt,{name:"fechaFin",control:H,render:({field:P})=>h.jsx(E.TextField,{...P,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:Y||m},error:!!v.fechaFin,helperText:v.fechaFin?.message})})}),!i&&h.jsx(E.Grid,{size:{xs:1,md:1},children:h.jsx(E.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:h.jsx(kf,{})})})]}):h.jsx(E.Grid,{size:{xs:12,md:7}})]}),l&&h.jsx(h.Fragment,{children:h.jsxs(E.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[h.jsx(E.Grid,{size:{xs:6,md:5}}),h.jsx(E.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:h.jsx(Df,{sx:{color:"#757575",margin:0,padding:0}})})]})}),h.jsxs(E.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[h.jsx(E.Grid,{size:{xs:12,md:4},children:h.jsx(Pt,{name:"horaInicio",control:H,render:({field:{onChange:P,value:te,..._e}})=>h.jsx(E.Autocomplete,{freeSolo:!0,options:Ye,value:te||"",onChange:(Ce,ct)=>P(ct||""),onInputChange:(Ce,ct)=>P(ct),renderInput:Ce=>h.jsx(E.TextField,{...Ce,..._e,size:"small",error:!!v.horaInicio,helperText:v.horaInicio?.message,InputProps:{...Ce.InputProps,endAdornment:h.jsx(E.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(od,{})})}}),disabled:M("todoElDia")})})}),h.jsx(E.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:v.horaInicio?"start":"center",marginTop:v.horaInicio?"5px":"0px"},children:!l&&h.jsx(Df,{sx:{color:"#757575"}})}),l&&h.jsx(E.Grid,{size:{xs:2,md:2}}),h.jsx(E.Grid,{size:{xs:12,md:4},children:h.jsx(Pt,{name:"horaFin",control:H,render:({field:{onChange:P,value:te,..._e}})=>h.jsx(E.Autocomplete,{freeSolo:!0,options:pe,value:te||"",onChange:(Ce,ct)=>P(ct||""),onInputChange:(Ce,ct)=>P(ct),renderInput:Ce=>h.jsx(E.TextField,{...Ce,..._e,size:"small",error:!!v.horaFin,helperText:v.horaFin?.message,InputProps:{...Ce.InputProps,endAdornment:h.jsx(E.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(od,{})})}}),disabled:M("todoElDia")})})}),h.jsx(E.Grid,{size:{xs:12,md:3},hidden:l,children:h.jsx(Pt,{name:"todoElDia",control:H,render:({field:P})=>h.jsx(E.FormControlLabel,{control:h.jsx(E.Checkbox,{checked:P.value,onChange:te=>P.onChange(te.target.checked)}),label:h.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:!l&&h.jsx(h.Fragment,{children:h.jsxs(E.Button,{onClick:F,size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(qx,{})," Agregar fecha final"]})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(E.Divider,{})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:!d&&h.jsxs(E.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(Gx,{})," Vincular cliente"]})}),d&&h.jsxs(h.Fragment,{children:[h.jsx(E.Grid,{size:{xs:12,md:7},children:h.jsx(Pt,{name:"client",control:H,render:({field:P})=>h.jsx(E.Autocomplete,{options:b,loading:x,loadingText:"Buscando coincidencias...",getOptionLabel:te=>te.nombreCliente?.trim()||"",value:b.find(te=>te.nombreCliente===P.value)||(P.value&&typeof P.value=="string"?{solID:-1,nombreCliente:P.value}:null),noOptionsText:R,onInputChange:(te,_e)=>{p(_e)},onChange:(te,_e)=>{P.onChange(_e?_e.nombreCliente:"")},renderInput:te=>h.jsx(E.TextField,{...te,placeholder:"Buscar cliente...",size:"small",InputProps:{...te.InputProps,startAdornment:h.jsx("img",{src:Zx,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:h.jsxs(h.Fragment,{children:[x?h.jsx(E.CircularProgress,{color:"inherit",size:20}):null,te.InputProps.endAdornment]})}})})})}),h.jsx(E.Grid,{size:{xs:11,md:4},children:h.jsx(Pt,{name:"solID",control:H,render:({field:P})=>h.jsx(E.Autocomplete,{options:k,noOptionsText:"Sin resultados",getOptionLabel:te=>te.toString(),value:P.value??null,onChange:(te,_e)=>P.onChange(_e),renderInput:te=>h.jsx(E.TextField,{...te,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b})})}),h.jsx(E.Grid,{size:{xs:1,md:1},children:h.jsx(E.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:h.jsx(kf,{})})})]}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(E.Divider,{})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(Pt,{name:"link",control:H,render:({field:P})=>h.jsx(E.TextField,{...P,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!v.link,helperText:v.link?.message,InputProps:{startAdornment:h.jsx("img",{src:Ux,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsx(Pt,{name:"descripcion",control:H,render:({field:P})=>h.jsx(E.TextField,{...P,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:h.jsx("img",{src:Kx,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),h.jsx(E.Grid,{size:{xs:12,md:12},children:h.jsxs(E.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[h.jsx(Wx,{}),Ds.map(P=>h.jsx(Pt,{name:"color",control:H,render:({field:te})=>h.jsx(E.IconButton,{onClick:()=>te.onChange(P),sx:{width:24,height:24,borderRadius:"50%",bgcolor:P,border:te.value===P?"2px solid":"none",borderColor:te.value===P?"primary.main":"transparent"}})},P))]})})]}),h.jsxs(E.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[i&&h.jsx(E.Button,{onClick:r,variant:"outlined",color:"error",sx:{textTransform:"none"},children:"Eliminar"}),h.jsx(E.Button,{onClick:n,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),h.jsx(E.Button,{onClick:we,variant:"contained",sx:{textTransform:"none"},disabled:!$,children:"Guardar"})]})]})})})},Xx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='49'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M34.559%2048.077c-7.413%200-13.44-6.039-13.44-13.44s6.027-13.44%2013.44-13.44%2013.44%206.027%2013.44%2013.44c0%207.414-6.027%2013.44-13.44%2013.44'/%3e%3cpath%20fill='%23fff'%20d='M39.827%2029.346c.583.583.605%201.505.05%202.06l-3.218%203.219%203.219%203.218c.555.556.532%201.48-.051%202.062-.584.583-1.506.605-2.062.05l-3.218-3.218-3.218%203.218c-.556.555-1.478.533-2.061-.05s-.606-1.506-.05-2.062l3.217-3.218-3.218-3.218c-.555-.555-.533-1.478.05-2.061.583-.584%201.507-.606%202.063-.05l3.217%203.217%203.218-3.218c.556-.555%201.478-.533%202.062.05'/%3e%3cpath%20fill='%23404756'%20d='M30.367.078c1.112%200%202.001.868%202.001%201.954v1.195h.979c4.913%200%208.892%203.887%208.892%208.686v9.237a15.4%2015.4%200%200%200-4.424-1.691v-1.312H4.468V33.63c0%202.389%202%204.343%204.446%204.343H19.4a15.4%2015.4%200%200%200%201.676%204.343H8.892C3.979%2042.317%200%2038.43%200%2033.631V11.913c0-4.8%203.979-8.686%208.892-8.686h1V2.032c0-1.086.89-1.954%202.002-1.954s2%20.868%202%201.954v1.195h14.473V2.032c0-1.085.889-1.954%202-1.954'/%3e%3c/svg%3e",eS={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},tS=({isOpen:e,onClose:n,onConfirm:t,title:r,message:o})=>h.jsx(E.Modal,{open:e,onClose:n,children:h.jsxs(E.Box,{sx:eS,children:[h.jsx("img",{src:Xx}),h.jsx(E.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:r}),h.jsx(E.Typography,{sx:{mt:2},children:o}),h.jsxs(E.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[h.jsx(E.Button,{variant:"outlined",onClick:n,sx:{textTransform:"none"},children:"Regresar"}),h.jsxs(E.Button,{variant:"contained",color:"error",onClick:t,sx:{textTransform:"none"},children:[h.jsx("span",{className:"icon-eliminar",children:" "})," Eliminar"]})]})]})}),rS={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},nS=({isOpen:e,onClose:n,events:t,date:r,onEventClick:o})=>{if(!r)return null;const i=a=>{o(a),n()};return h.jsx(E.Modal,{open:e,onClose:n,children:h.jsxs(E.Box,{sx:rS,children:[h.jsxs(E.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[h.jsxs(E.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",r.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),h.jsx(E.IconButton,{onClick:n,children:h.jsx(ks,{})})]}),h.jsx(E.Divider,{}),h.jsx(E.List,{children:t.map(a=>h.jsx(E.ListItem,{disablePadding:!0,children:h.jsxs(E.ListItemButton,{onClick:()=>i(a),sx:{py:.5},children:[h.jsx(E.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:a.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),h.jsx(E.ListItemText,{primary:a.titulo,secondary:`${y.format(a.fechaInicio,"HH:mm")} - ${y.format(a.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},a.eventoID))})]})})},oS=Xt(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),iS=Xt(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),aS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M20.36%204.14H16c0-1.65-1.35-3-3-3h-2c-1.65%200-3%201.35-3%203H3.64c-.55%200-1%20.45-1%201s.45%201%201%201h1.04l.84%2013.91a3%203%200%200%200%202.99%202.82h6.98c1.58%200%202.9-1.24%203-2.82l.84-13.91h1.04c.55%200%201-.45%201-1s-.45-1-1-1zm-9.36-1h2c.55%200%201%20.45%201%201h-4c0-.55.45-1%201-1m-.39%2014.9c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201zm4.78%200c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201z'/%3e%3c/svg%3e",sS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M19.378%204.405a1.813%201.813%200%201%201%202.565%202.565L9.571%2019.342a1.813%201.813%200%200%201-2.565%200l-4.949-4.949a1.814%201.814%200%200%201%202.428-2.69l.137.126%203.666%203.666z'/%3e%3c/svg%3e",Ef=w.forwardRef(({id:e,message:n,variant:t},r)=>{const{closeSnackbar:o}=Wi.useSnackbar(),i={success:{color:"#fff",icon:h.jsx("img",{width:25,src:sS,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:h.jsx(oS,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:h.jsx(iS,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:h.jsx("img",{src:aS,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},a=i[t]||i.info;return h.jsx(Wi.SnackbarContent,{ref:r,children:h.jsxs(E.Box,{sx:{backgroundColor:"white",color:"#333",padding:"8px 16px",borderRadius:"8px",boxShadow:"0 3px 10px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",width:{xs:"90%",sm:"auto"},minWidth:"300px",borderLeft:`5px solid ${a.color}`},children:[h.jsx(E.Box,{sx:{mr:1.5},children:a.icon}),h.jsx(E.Typography,{variant:"body2",sx:{flexGrow:1},children:n}),h.jsx(E.IconButton,{size:"small",onClick:()=>o(e),children:h.jsx(ks,{fontSize:"small"})})]})})}),cS=({userId:e,leads30Days:n,leads90Days:t,disId:r,masNombreBD:o})=>{const[i,a]=w.useState(new Date),[s,c]=w.useState([]),[l,u]=w.useState(!1),[d,f]=w.useState(null),[m,g]=w.useState(!1),[p,b]=w.useState(null),[S,x]=w.useState([]),{enqueueSnackbar:T}=Wi.useSnackbar(),D=es(),[k,O]=w.useState(!1),[R,U]=w.useState([]),[H,V]=w.useState(null),K=(G,ae)=>{U(G),V(ae),O(!0)},v=w.useRef(null);w.useEffect(()=>{const G=async()=>{try{if(e){const ae=await D.getEventsByUser(e);c(ae)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}};return G(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{G()},4e3),()=>{v.current&&clearTimeout(v.current)}},[i,e]),w.useEffect(()=>{const G=new Date,ae=y.startOfDay(G),ue=y.endOfDay(y.addDays(ae,6)),me={start:ae,end:ue},ve=s.filter(pe=>{const Ye={start:pe.fechaInicio,end:pe.fechaFin};return su(Ye,me)}).sort((pe,Ye)=>pe.fechaInicio.getTime()-Ye.fechaInicio.getTime());x(ve)},[s]);const $=async G=>{try{const ae=await D.getEventById(G.eventoID);f(ae),u(!0)}catch(ae){console.error(ae)}},M=()=>{u(!1),f(null)},L=async(G,ae)=>{let ue,me;G.todoElDia?(ue=new Date(`${G.fechaInicio}T${G.horaInicio}`),me=new Date(`${G.fechaInicio}T${G.horaFin}`)):(ue=new Date(`${G.fechaInicio}T${G.horaInicio}`),me=G.fechaFin&&G.horaFin?new Date(`${G.fechaFin}T${G.horaFin}`):new Date(`${G.fechaInicio}T${G.horaFin}`));const ve=y.format(ue,"yyyy-MM-dd HH:mm:ss.SSS"),pe=y.format(me,"yyyy-MM-dd HH:mm:ss.SSS");if(ae){const P={...G,eventoID:ae,fechaInicio:ve,fechaFin:pe,solID:G.solID??null,disID:r??null,client:G.client};try{const te=await D.updateEvent(P);var Ye=s.map(_e=>_e.eventoID===te.eventoID?te:_e);c(Ye),T("El evento se ha actualizado correctamente.",{variant:"success"}),M()}catch{T("Error al eliactualizar Evento",{variant:"error"})}}else{const P={...G,fechaInicio:ve,fechaFin:pe,todoElDia:G.todoElDia,solID:G.solID??null,disID:r??null,client:G.client};try{const te=await D.createEvent(P,e);c(_e=>[..._e,te]),T("El evento se ha creado con éxito",{variant:"success"}),M()}catch{T("Error al guardar Evento",{variant:"error"})}}if(e){const P=await D.getEventsByUser(e);c(P)}},Y=()=>{a(G=>new Date(G.getFullYear(),G.getMonth()-1,1))},J=()=>{a(G=>new Date(G.getFullYear(),G.getMonth()+1,1))},oe=()=>{g(!0)},we=()=>{b(new Date),u(!0)},F=()=>alert("Sincronizar con Google Calendar"),q=()=>alert("Sincronizar con Outlook Calendar"),de=G=>{G&&a(G)},he=G=>{b(G),u(!0),f(null)},fe=async()=>{if(d)try{await D.deleteEvent(d.eventoID),c(s.filter(G=>G.eventoID!==d.eventoID)),T("El evento se ha eliminado de tu calendario",{content:(G,ae)=>h.jsx(Ef,{id:G,message:String(ae),variant:"delete"})})}catch{T("Error al eliminar Evento",{variant:"error"})}finally{M(),g(!1)}};return h.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[h.jsx(_g,{header:h.jsx(Vv,{currentDate:i,onPrevMonth:Y,onNextMonth:J,onAddEvent:we,onDateChange:de}),sidebar:h.jsx(Sy,{onEventClick:$,upcomingEvents:S,onSyncGoogle:F,onSyncOutlook:q,leads30Days:n,leads90Days:t}),mainContent:h.jsx(Py,{onSeeMoreClick:K,currentDate:i,events:s,onDayClick:he,onEventClick:$})}),l&&h.jsx(Jx,{isVisible:l,onClose:M,onSave:L,onDelete:oe,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:r}),h.jsx(tS,{isOpen:m,onClose:()=>g(!1),onConfirm:fe,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),h.jsx(nS,{isOpen:k,onClose:()=>O(!1),events:R,date:H,onEventClick:$})]})},lS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20fill='%23070c10'%20d='M18.575%203.172A10.829%2010.829%200%200%200%201.564%2016.284l-.028-.051L0%2021.843l5.739-1.506a10.7%2010.7%200%200%200%205.173%201.318%2010.83%2010.83%200%200%200%207.663-18.483m-7.658%2016.655a8.94%208.94%200%200%201-4.62-1.277l.041.023-.329-.194-3.405.894.908-3.321-.214-.34a8.9%208.9%200%200%201-1.376-4.782%209%209%200%201%201%209%209Zm4.935-6.736c-.27-.135-1.6-.789-1.848-.88s-.429-.135-.61.136-.7.879-.856%201.06-.316.2-.586.068a7.5%207.5%200%200%201-2.183-1.349l.007.007a8.2%208.2%200%200%201-1.483-1.842l-.02-.038c-.157-.27-.017-.417.118-.551s.271-.316.406-.473a1.9%201.9%200%200%200%20.267-.44v-.012a.5.5%200%200%200%20.05-.216.5.5%200%200%200-.074-.26c-.068-.135-.609-1.467-.834-2.009s-.444-.455-.609-.464-.338-.009-.519-.009a.99.99%200%200%200-.72.337%203.03%203.03%200%200%200-.947%202.2v.058a5.27%205.27%200%200%200%201.114%202.815v-.011a12.16%2012.16%200%200%200%204.553%204.053l.068.031a14%2014%200%200%200%201.434.539l.109.03a3.6%203.6%200%200%200%201.077.161%203.7%203.7%200%200%200%20.648-.057h-.023a2.8%202.8%200%200%200%201.819-1.274l.007-.012a2.2%202.2%200%200%200%20.19-.9%202.3%202.3%200%200%200-.034-.395v.014c-.067-.113-.248-.18-.519-.316Z'/%3e%3c/svg%3e",uS="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25.085'%20height='18.5'%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='none'%20d='M0%200h25.085v18.5H0z'%20data-name='Rectángulo%204598'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23a)'%20data-name='Grupo%207946'%3e%3cpath%20d='M23.12%205.809V3.226a3.2%203.2%200%200%200-.068-.656l-3.141%202.21a7.8%207.8%200%200%201%203.209%201.032'%20data-name='Trazado%2013329'/%3e%3cpath%20d='M11.847%209.791c-.1.009-.2.023-.308.023a3.78%203.78%200%200%201-2.18-.688L.067%202.58A3.2%203.2%200%200%200%200%203.227V13.98a3.23%203.23%200%200%200%203.226%203.226h9.611a7.86%207.86%200%200%201-.99-7.414'%20data-name='Trazado%2013330'/%3e%3cpath%20d='M12.478%207.369%2021.92.737A3.2%203.2%200%200%200%2019.894%200H3.226a3.2%203.2%200%200%200-2.031.74l9.4%206.628a1.64%201.64%200%200%200%201.881%200'%20data-name='Trazado%2013331'/%3e%3cpath%20d='M23.356%208.407a5.914%205.914%200%201%200%200%208.364%205.92%205.92%200%200%200%200-8.364m-1.833%204.842a.54.54%200%200%201-1.081%200v-1.164l-2.513%202.516a.54.54%200%200%201-.765-.763l2.515-2.515h-1.167a.54.54%200%201%201%200-1.081h2.471a.54.54%200%200%201%20.54.54Z'%20data-name='Trazado%2013332'/%3e%3c/g%3e%3c/svg%3e";function Es(e,n,t){return e.accessor?e.accessor(n,t):e.field?n?.[e.field]:n?.[e?.key||""]}function dS(e,n){const t=e??"",r=n??"";return t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():typeof t=="number"&&typeof r=="number"?t-r:typeof t=="boolean"&&typeof r=="boolean"?Number(t)-Number(r):String(t).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"})}function Ts(e,n,t=!0){return typeof e=="function"?e(n):e??t}function fS(e){return e.replace(/[^\d]/g,"")}function pS(e,n){return n}const Tf=Xt(h.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFileOutlined"),Os=W.createContext();process.env.NODE_ENV!=="production"&&(Os.displayName="TableContext");function hS(e){return Qt("MuiTable",e)}br("MuiTable",["root","stickyHeader"]);const mS=e=>{const{classes:n,stickyHeader:t}=e;return vr({root:["root",t&&"stickyHeader"]},hS,n)},gS=_r("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,t.stickyHeader&&n.stickyHeader]}})($n(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),Of="table",Mf=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiTable"}),{className:o,component:i=Of,padding:a="normal",size:s="medium",stickyHeader:c=!1,...l}=r,u={...r,component:i,padding:a,size:s,stickyHeader:c},d=mS(u),f=W.useMemo(()=>({padding:a,size:s,stickyHeader:c}),[a,s,c]);return h.jsx(Os.Provider,{value:f,children:h.jsx(gS,{as:i,role:i===Of?null:"table",ref:t,className:Ve(d.root,o),ownerState:u,...l})})});process.env.NODE_ENV!=="production"&&(Mf.propTypes={children:I.node,classes:I.object,className:I.string,component:I.elementType,padding:I.oneOf(["checkbox","none","normal"]),size:I.oneOfType([I.oneOf(["medium","small"]),I.string]),stickyHeader:I.bool,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object])});const co=W.createContext();process.env.NODE_ENV!=="production"&&(co.displayName="Tablelvl2Context");function vS(e){return Qt("MuiTableBody",e)}br("MuiTableBody",["root"]);const yS=e=>{const{classes:n}=e;return vr({root:["root"]},vS,n)},bS=_r("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),wS={variant:"body"},Af="tbody",Pf=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiTableBody"}),{className:o,component:i=Af,...a}=r,s={...r,component:i},c=yS(s);return h.jsx(co.Provider,{value:wS,children:h.jsx(bS,{className:Ve(c.root,o),as:i,ref:t,role:i===Af?null:"rowgroup",ownerState:s,...a})})});process.env.NODE_ENV!=="production"&&(Pf.propTypes={children:I.node,classes:I.object,className:I.string,component:I.elementType,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object])});function _S(e){return Qt("MuiTableCell",e)}const xS=br("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),SS=e=>{const{classes:n,variant:t,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",t,a&&"stickyHeader",r!=="inherit"&&`align${kt(r)}`,o!=="normal"&&`padding${kt(o)}`,`size${kt(i)}`]};return vr(s,_S,n)},CS=_r("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[t.variant],n[`size${kt(t.size)}`],t.padding!=="normal"&&n[`padding${kt(t.padding)}`],t.align!=="inherit"&&n[`align${kt(t.align)}`],t.stickyHeader&&n.stickyHeader]}})($n(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
175
|
+
${e.palette.mode==="light"?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${xS.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:n})=>n.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Ms=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:c,size:l,sortDirection:u,variant:d,...f}=r,m=W.useContext(Os),g=W.useContext(co),p=g&&g.variant==="head";let b;a?b=a:b=p?"th":"td";let S=c;b==="td"?S=void 0:!S&&p&&(S="col");const x=d||g&&g.variant,T={...r,align:o,component:b,padding:s||(m&&m.padding?m.padding:"normal"),size:l||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&m&&m.stickyHeader,variant:x},D=SS(T);let k=null;return u&&(k=u==="asc"?"ascending":"descending"),h.jsx(CS,{as:b,ref:t,className:Ve(D.root,i),"aria-sort":k,scope:S,ownerState:T,...f})});process.env.NODE_ENV!=="production"&&(Ms.propTypes={align:I.oneOf(["center","inherit","justify","left","right"]),children:I.node,classes:I.object,className:I.string,component:I.elementType,padding:I.oneOf(["checkbox","none","normal"]),scope:I.string,size:I.oneOfType([I.oneOf(["medium","small"]),I.string]),sortDirection:I.oneOf(["asc","desc",!1]),sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object]),variant:I.oneOfType([I.oneOf(["body","footer","head"]),I.string])});function kS(e){return Qt("MuiTableContainer",e)}br("MuiTableContainer",["root"]);const DS=e=>{const{classes:n}=e;return vr({root:["root"]},kS,n)},ES=_r("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),If=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},c=DS(s);return h.jsx(ES,{ref:t,as:i,className:Ve(c.root,o),ownerState:s,...a})});process.env.NODE_ENV!=="production"&&(If.propTypes={children:I.node,classes:I.object,className:I.string,component:I.elementType,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object])});function TS(e){return Qt("MuiTableHead",e)}br("MuiTableHead",["root"]);const OS=e=>{const{classes:n}=e;return vr({root:["root"]},TS,n)},MS=_r("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),AS={variant:"head"},Nf="thead",Rf=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiTableHead"}),{className:o,component:i=Nf,...a}=r,s={...r,component:i},c=OS(s);return h.jsx(co.Provider,{value:AS,children:h.jsx(MS,{as:i,className:Ve(c.root,o),ref:t,role:i===Nf?null:"rowgroup",ownerState:s,...a})})});process.env.NODE_ENV!=="production"&&(Rf.propTypes={children:I.node,classes:I.object,className:I.string,component:I.elementType,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object])});function PS(e){return Qt("MuiTableRow",e)}const $f=br("MuiTableRow",["root","selected","hover","head","footer"]),IS=e=>{const{classes:n,selected:t,hover:r,head:o,footer:i}=e;return vr({root:["root",t&&"selected",r&&"hover",o&&"head",i&&"footer"]},PS,n)},NS=_r("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,t.head&&n.head,t.footer&&n.footer]}})($n(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${$f.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${$f.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),jf="tr",As=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiTableRow"}),{className:o,component:i=jf,hover:a=!1,selected:s=!1,...c}=r,l=W.useContext(co),u={...r,component:i,hover:a,selected:s,head:l&&l.variant==="head",footer:l&&l.variant==="footer"},d=IS(u);return h.jsx(NS,{as:i,ref:t,className:Ve(d.root,o),role:i===jf?null:"row",ownerState:u,...c})});process.env.NODE_ENV!=="production"&&(As.propTypes={children:I.node,classes:I.object,className:I.string,component:I.elementType,hover:I.bool,selected:I.bool,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object])});function RS(e){const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return n}}function Lf(e,n,t,r){const o=e[n];if(o==null||!Number.isInteger(o)){const i=RS(o);return new RangeError(`Invalid ${r} \`${n}\` of type \`${i}\` supplied to \`${t}\`, expected \`integer\`.`)}return null}function zf(e,n,t,r){return e[n]===void 0?null:Lf(e,n,t,r)}function Ps(){return null}zf.isRequired=Lf,Ps.isRequired=Ps;const $S=process.env.NODE_ENV==="production"?Ps:zf;function jS(e,n){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||n(...r)}}function LS(e){return Qt("MuiPaper",e)}br("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const zS=e=>{const{square:n,elevation:t,variant:r,classes:o}=e,i={root:["root",r,!n&&"rounded",r==="elevation"&&`elevation${t}`]};return vr(i,LS,o)},BS=_r("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[t.variant],!t.square&&n.rounded,t.variant==="elevation"&&n[`elevation${t.elevation}`]]}})($n(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:n})=>!n.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Bf=W.forwardRef(function(n,t){const r=xr({props:n,name:"MuiPaper"}),o=pg(),{className:i,component:a="div",elevation:s=1,square:c=!1,variant:l="elevation",...u}=r,d={...r,component:a,elevation:s,square:c,variant:l},f=zS(d);return process.env.NODE_ENV!=="production"&&o.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
|
|
176
|
+
`)),h.jsx(BS,{as:a,ownerState:d,className:Ve(f.root,i),ref:t,...u,style:{...l==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Lo("#fff",ba(s))}, ${Lo("#fff",ba(s))})`}},...u.style}})});process.env.NODE_ENV!=="production"&&(Bf.propTypes={children:I.node,classes:I.object,className:I.string,component:I.elementType,elevation:jS($S,e=>{const{elevation:n,variant:t}=e;return n>0&&t==="outlined"?new Error(`MUI: Combining \`elevation={${n}}\` with \`variant="${t}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:I.bool,style:I.object,sx:I.oneOfType([I.arrayOf(I.oneOfType([I.func,I.object,I.bool])),I.func,I.object]),variant:I.oneOfType([I.oneOf(["elevation","outlined"]),I.string])});function VS({row:e,rowIndex:n,columns:t}){return h.jsx(As,{sx:{"& > *":{borderBottom:"unset"}},children:t.map((r,o)=>{const i=r.key??String(o);let a=null;return r.cell?a=r.cell(e,n):r.accessor?a=r.accessor(e,n):r.field&&(a=e?.[r.field]??""),h.jsx(Ms,{style:r.width?{width:r.width}:void 0,align:r?.align?r?.align:"left",children:a},i)})})}function FS(e){const{name:n,collapses:t,columns:r,data:o,getRowKey:i}=e;return h.jsx(If,{component:Bf,sx:{boxShadow:t?"auto":"none",border:t?"auto":"none"},children:h.jsxs(Mf,{"aria-label":"collapsible table",children:[t&&h.jsx(Rf,{children:h.jsx(As,{children:r?.map(a=>h.jsx(Ms,{children:a.header}))})}),h.jsx(Pf,{children:o?.map((a,s)=>h.jsx(VS,{row:a,rowIndex:s,columns:r??[]},i?i(a,s):s))})]})})}function YS({open:e,onClose:n,customer:t,fields:r=[],header:o,extraSections:i,normalTable:a,normalTableColumns:s=[]}){if(!t)return null;const c=o?.title??(u=>u?.Nombre||u?.name||"Sin título"),l=o?.infoItems??[];return h.jsx(E.Dialog,{open:e,onClose:n,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:"90vh",maxWidth:"80vw",overflow:"hidden",display:"flex",flexDirection:"column"}},children:h.jsxs(E.Box,{sx:{display:"flex",flexDirection:"row",height:"100vh"},children:[h.jsxs(E.Box,{sx:{maxWidth:392,width:"100%",backgroundColor:"#40404024",display:"flex",flexDirection:"column",height:"100%"},children:[h.jsxs(E.Box,{children:[h.jsx(E.Stack,{direction:"row",spacing:2,alignItems:"center",mb:2,sx:{px:2.5,pt:2.5},children:h.jsxs(E.Box,{display:"flex",flexDirection:"column",gap:1,children:[h.jsx(E.Typography,{fontWeight:700,children:c(t)}),l.map((u,d)=>h.jsxs(E.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:u.onClick?"pointer":"default"},onClick:u.onClick?()=>u.onClick(t):void 0,children:[u.icon,h.jsx(E.Typography,{variant:"body2",sx:{color:u.inLink?"#336BE1":"#070C10"},style:{},children:u.value(t)})]},d))]})}),o?.actions?.length?h.jsx(E.Stack,{direction:"row",spacing:1,mb:2,sx:{px:2.5},children:o.actions.map((u,d)=>h.jsxs(E.Button,{variant:"outlined",sx:{color:"#336BE1",borderColor:"#336BE1",gap:1,textTransform:"none"},onClick:()=>u.onClick(t),children:[u.icon,u.label]},d))}):null,h.jsx(E.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:r.map((u,d)=>h.jsxs(E.Box,{display:"flex",justifyContent:"space-between",children:[h.jsx(E.Box,{sx:{width:"50%"},children:h.jsx(E.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:u.label})}),h.jsxs(E.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[h.jsx("div",{children:u?.avatar?u.avatar(t):null}),h.jsx(E.Typography,{variant:"body2",color:"textPrimary",children:u?.value(t)})]})]},d))}),h.jsx(E.Divider,{sx:{my:2}})]}),h.jsxs(E.Box,{sx:{px:2.5,pt:0,gap:2,flex:1,overflowY:"auto",display:"flex",flexDirection:"column"},children:[h.jsx(E.Stack,{children:h.jsx(E.Typography,{variant:"body1",sx:{color:"#5C6372"},children:"Actividad"})}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Crear cliente"}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]})]})]}),h.jsx(E.Divider,{}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Mensaje enviado"}),h.jsxs(E.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.5},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pulvinar pharetra augue. Suspendisse nulla...",h.jsxs(E.Typography,{component:"span",variant:"body2",sx:{color:"#336BE1",cursor:"default"},children:[" ","Ver más"]})]}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]}),h.jsx(E.Box,{sx:{flex:1}}),h.jsx(E.IconButton,{size:"small",sx:{opacity:.7},children:h.jsx(Tf,{fontSize:"small"})})]})]}),h.jsx(E.Divider,{}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Mensaje enviado"}),h.jsxs(E.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.5},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pulvinar pharetra augue. Suspendisse nulla...",h.jsxs(E.Typography,{component:"span",variant:"body2",sx:{color:"#336BE1",cursor:"default"},children:[" ","Ver más"]})]}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]})]})]}),h.jsxs(E.Stack,{spacing:1.25,children:[h.jsx(E.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:"Mensaje enviado"}),h.jsxs(E.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.5},children:["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse pulvinar pharetra augue. Suspendisse nulla...",h.jsxs(E.Typography,{component:"span",variant:"body2",sx:{color:"#336BE1",cursor:"default"},children:[" ","Ver más"]})]}),h.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[h.jsx(E.Avatar,{src:"/avatars/laura.png",sx:{width:28,height:28}}),h.jsxs(E.Stack,{spacing:0,children:[h.jsx(E.Typography,{variant:"body2",fontWeight:600,children:"Laura Diaz"}),h.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"13 ago, 2025 • 16:30"})]}),h.jsx(E.Box,{sx:{flex:1}}),h.jsx(E.IconButton,{size:"small",sx:{opacity:.7},children:h.jsx(Tf,{fontSize:"small"})})]})]})]})]}),h.jsx(E.Box,{sx:{width:"100%",overflowY:"auto"},children:h.jsx(E.Box,{sx:{mt:3},children:h.jsxs(E.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:3},children:[h.jsx(E.Typography,{variant:"h6",sx:{paddingLeft:"20px"},children:"Vehículos:"}),h.jsxs(E.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",paddingX:"20px",children:[h.jsx(E.Box,{children:h.jsx(E.Typography,{fontSize:18,children:"Mostrar:"})}),h.jsx(E.Box,{children:h.jsxs(E.Typography,{fontSize:16,color:"#5C6372",children:[a?.length??0," vehículos"]})})]}),h.jsx(FS,{collapses:!1,columns:s??[],data:a,getRowKey:u=>u.id??u.vin})]})})})]})})}function Vf(e,n,t){const{fields:r,order:o=["nombreCliente","email","acciones"],header:i={},cells:a={},hide:s={},actions:c}=n,l=c??{},u=l.show??{},d=l.handlers??{},f=l.accessors??{},m=l.icons??{},g=l.className??"d-flex flex-row gap-2 align-items-center ",p=l.tooltip??{},b=m.view??h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[h.jsx("path",{d:"M18.6,6.3c-3.9-3-9.3-3-13.2,0-1.9,1.5-3.2,3.5-3.9,5.7.7,2.3,2,4.3,3.9,5.7,1.9,1.5,4.2,2.3,6.6,2.3,2.4,0,4.7-.8,6.6-2.3,1.9-1.5,3.2-3.5,3.9-5.7-.7-2.3-2-4.3-3.9-5.7ZM17.2,12.1c0,2.9-2.5,5.3-5.4,5.2-2.9,0-5.3-2.5-5.2-5.4,0-2.9,2.5-5.3,5.4-5.2,2.9,0,5.3,2.4,5.2,5.3,0,0,0,0,0,0Z"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),S={nombreCliente:{key:"nombreCliente",header:i.nombreCliente??"Cliente",accessor:V=>V[r.nombreCliente],cell:a.nombreCliente,width:310},email:{key:"email",header:i.email??"Correo",accessor:V=>V[r.email],cell:a.email??(V=>{const K=String(V[r.email]??"");return K?h.jsx("a",{href:`mailto:${K}`,children:K}):h.jsx("span",{className:"text-muted",children:"—"})}),width:250},acciones:s.acciones?void 0:{key:"acciones",header:"",cell:a.acciones??(V=>{const K=Ts(u.whatsapp,V,!0),v=Ts(u.email,V,!0),$=Ts(u.view,V,!0),M=f.phone?.(V),L=f.email?.(V),Y=()=>{if(d.onWhatsApp)return d.onWhatsApp(V);if(!M)return;const we=f.countryCode??"52",F=fS(String(M));typeof window<"u"&&window.open(`https://wa.me/${we}${F}`,"_blank")},J=()=>{if(d.onEmail)return d.onEmail(V);L&&typeof window<"u"&&(window.location.href=`mailto:${L}`)},oe=()=>{d.onView&&d.onView(V),t?.(V)};return h.jsxs("div",{className:g,children:[K&&h.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:Y,style:{width:24,height:24},children:h.jsx("img",{src:lS,alt:"WhatsApp"})}),v&&h.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.email??"Email",onClick:J,style:{width:24,height:24},children:h.jsx("img",{src:uS,alt:"Email"})}),$&&h.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:oe,style:{width:24,height:24},children:b})]})}),width:120}},x=Object.values(S).filter(V=>!!V),T=(e??[]).filter(V=>!!V?.key),D=new Map;for(const V of x)D.set(String(V.key),V);for(const V of T)D.set(String(V.key),V);const k=[...x.map(V=>String(V.key)),...T.map(V=>String(V.key))],O=Array.from(new Set(o.map(V=>String(V)).filter(V=>D.has(V)))),R=k.filter(V=>!O.includes(V)),U=[...O,...R],H="acciones";if(D.has(H)){const V=U.filter(K=>K!==H);U.splice(0,U.length,...V,H)}return U.map(V=>D.get(V))}function HS(e){const{rows:n,columns:t,clientSort:r=!0,defaultSort:o,minWidth:i=1100,rowKey:a=pS,defaults:s,detailConfig:c,extraSections:l,normalTableColumns:u,normalTable:d}=e,[f,m]=w.useState(o??null),[g,p]=w.useState({open:!1,customer:null}),[b,S]=w.useState([]),x=O=>{p({open:!0,customer:O});const R=c?.vehiclesProvider?.(O)??[];S(Array.isArray(R)?R:[])},T=()=>p({open:!1,customer:null}),D=w.useMemo(()=>s?Vf(t??[],s,x):Vf(t??[],{fields:{},order:[]},x),[t,s]),k=w.useMemo(()=>{if(!r||!f)return n;const O=D.find(U=>U.key===f.key);if(!O)return n;const R=[...n];return R.sort((U,H)=>{const V=Es(O,U,0),K=Es(O,H,0),v=dS(V,K);return f.direction==="asc"?v:-v}),R},[n,D,f,r]);return h.jsxs("div",{className:"",children:[h.jsx("h3",{children:"Ejemplo Componente reutilizable"}),h.jsx("div",{className:"table-clientes back-white rounded-3 shadow-main mt-4 mb-4 ",children:h.jsx("div",{className:"table-responsive",children:h.jsxs("table",{className:"table table-hover align-middle mb-0",style:{minWidth:i},children:[h.jsx("thead",{children:h.jsx("tr",{children:D.map(O=>h.jsx("th",{style:{fontWeight:600,width:O.width},children:O.header},O.key))})}),h.jsx("tbody",{children:k.map((O,R)=>h.jsx("tr",{children:D.map((U,H)=>{const V=U.Component?h.jsx(U.Component,{row:O,index:R}):U.cell?U.cell(O,R):(()=>{const K=Es(U,O,R);return K==null||K===""?"":String(K)})();return h.jsx("td",{children:V},`${String(U.key)}-${H}`)})},a(O,R)))})]})})}),h.jsx(YS,{open:g.open,onClose:T,customer:g.customer,fields:c?.dynamicFields,header:c?.header,extraSections:l,normalTableColumns:u,normalTable:d})]})}const Ff=W.forwardRef(({sx:e,...n},t)=>h.jsx(E.InputBase,{inputRef:t,...n,sx:{height:48,px:1.5,bgcolor:"#EBEEF0",borderRadius:2,border:"1px solid transparent","&:hover":{borderColor:"transparent"},"& .MuiInputBase-input::placeholder":{opacity:.7},...e}}));Ff.displayName="SoftInput";const US=Xt(h.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function WS({message:e}){return e?h.jsxs(E.Box,{role:"alert",sx:{mt:1,display:"flex",alignItems:"center",gap:1,bgcolor:"#fdeaea",border:"1px solid rgb(253, 237, 237)",color:"#842029",borderRadius:1,px:2,py:1.25},children:[h.jsx(US,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),h.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function ZS(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function Is(e,n){const t=ZS(e);return t?n?.isArray?{required:t,validate:r=>Array.isArray(r)&&r.length>0||t}:{required:t,validate:r=>r!==""&&r!==null&&r!==void 0||t}:{}}const Yf={"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}},qS={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function Ns({label:e,errorMsg:n,helperText:t,children:r,sx:o}){return h.jsxs(E.FormControl,{fullWidth:!0,error:!!n,sx:o,children:[h.jsx(E.FormLabel,{sx:qS,children:e}),r,h.jsx(WS,{message:n||t})]})}function KS(e,n){const{register:t,formState:{errors:r}}=n,o={...Is(e)};e.minLength&&(o.minLength={value:e.minLength,message:`Min ${e.minLength}`}),e.maxLength&&(o.maxLength={value:e.maxLength,message:`Max ${e.maxLength}`}),e.pattern&&(o.pattern={value:e.pattern,message:"Formato inválido"});const i=r[e.name]?.message;return h.jsx(Ns,{label:e.label,errorMsg:i,helperText:e.helperText,sx:Yf,children:h.jsx(Ff,{placeholder:e.placeholder,type:e.type??"text",...t(e.name,o)})})}function GS(e,n){const{control:t}=n,r=!!e.multiple;return h.jsx(Pt,{name:e.name,control:t,rules:Is(e,{isArray:r}),render:({field:o,fieldState:i})=>h.jsx(Ns,{label:e.label,errorMsg:i.error?.message,helperText:e.helperText,sx:Yf,children:h.jsxs(E.Select,{...o,multiple:r,displayEmpty:!0,sx:{height:48,backgroundColor:"#EBEEF0","& .MuiSelect-select":{display:"flex",alignItems:"center",py:0}},children:[!r&&h.jsx(E.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(a=>h.jsx(E.MenuItem,{value:a.value,children:a.label},String(a.value)))]})})})}function QS(e,n){return h.jsx(Pt,{name:e.name,control:n.control,rules:Is(e),render:({field:t,fieldState:r})=>h.jsx(Ns,{label:e.label,errorMsg:r.error?.message,helperText:e.helperText,children:h.jsx(E.RadioGroup,{row:!0,...t,children:e.options.map(o=>h.jsx(E.FormControlLabel,{value:o.value,control:h.jsx(E.Radio,{}),label:o.label},String(o.value)))})})})}function JS(e,n){if(e.render)return e.render(n);switch(e.kind){case"text":return KS(e,n);case"select":return GS(e,n);case"radio":return QS(e,n);default:return null}}function XS(e){const{open:n,dataAdd:t,fields:r,onSubmit:o,onCancel:i,defaultValues:a,txtBtnGuardar:s}=e,c=Ed({mode:"onBlur",defaultValues:a}),{handleSubmit:l,formState:{isSubmitting:u,isDirty:d}}=c,f=async m=>{try{await o?.(m)}catch(g){console.error("Error al enviar AddCliente:",g)}};return h.jsx(E.Dialog,{open:n,onClose:i,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:"90vh",maxWidth:"80vw",overflow:"hidden",display:"flex",flexDirection:"column"}},children:h.jsx(s2,{...c,children:h.jsxs(E.Box,{component:"form",onSubmit:l(f),display:"flex",flexDirection:"row",width:"100%",height:"100%",children:[h.jsxs(E.Box,{sx:{maxWidth:394,width:"100%",boxShadow:"2px 0px 8px #40404024",p:"24px"},children:[h.jsx(E.Typography,{fontWeight:700,fontSize:20,children:t.title}),h.jsxs(E.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[h.jsx(E.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:t.subTitle}),h.jsx(E.Box,{mt:2,display:"flex",flexDirection:"column",gap:3,children:r?.map((m,g)=>h.jsx(E.Grid,{children:m.render?m.render(c):JS(m,c)},`${String(m.name)}-${g}`))})]})]}),h.jsx(E.Box,{flex:1,p:3,display:"flex",flexDirection:"column",children:h.jsxs(E.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[h.jsx(E.Box,{children:h.jsx(E.Typography,{fontSize:18,fontWeight:600,color:"#5C6372",children:"Vehículos cotizados 2"})}),h.jsx(E.Box,{display:"flex",alignItems:"center",children:h.jsxs(E.Box,{display:"flex",gap:1.5,children:[i&&h.jsx(E.Button,{variant:"outlined",onClick:i,type:"button",sx:{backgroundColor:"#797A7C",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:3,"&:hover":{backgroundColor:"#797A7C",borderColor:"transparent"}},children:"Cancelar"}),h.jsx(E.Button,{type:"submit",variant:"contained",disabled:u||!d,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5},children:s})]})})]})})]})})})}dt.AddCliente=XS,dt.ApiProvider=n2,dt.Clientes=HS,dt.CustomSnackbar=Ef,dt.MyCalendar=cS,dt.useEventRepository=es,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})}));
|