componentes-exagono 0.2.28 → 0.2.29

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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Ot,y){typeof exports=="object"&&typeof module<"u"?y(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"],y):(Ot=typeof globalThis<"u"?globalThis:Ot||self,y(Ot.exagono={},Ot.React,Ot.MaterialUI,Ot.dateFns,Ot.ReactDOM,Ot.notistack))})(this,(function(Ot,y,g,x,pl,ws){"use strict";function hl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const K=hl(y),g0=hl(pl);function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Yr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var o=!1;try{o=this instanceof n}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Ss={exports:{}},to={};/**
1
+ (function(Ot,y){typeof exports=="object"&&typeof module<"u"?y(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"],y):(Ot=typeof globalThis<"u"?globalThis:Ot||self,y(Ot.exagono={},Ot.React,Ot.MaterialUI,Ot.dateFns,Ot.ReactDOM,Ot.notistack))})(this,(function(Ot,y,g,x,pl,ws){"use strict";function hl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const K=hl(y),v0=hl(pl);function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Yr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var o=!1;try{o=this instanceof n}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Ss={exports:{}},to={};/**
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 ml;function v0(){if(ml)return to;ml=1;var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,u){var d,f={},h=null,v=null;u!==void 0&&(h=""+u),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(v=c.ref);for(d in c)n.call(c,d)&&!s.hasOwnProperty(d)&&(f[d]=c[d]);if(a&&a.defaultProps)for(d in c=a.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:a,key:h,ref:v,props:f,_owner:o.current}}return to.Fragment=r,to.jsx=i,to.jsxs=i,to}var ro={};/**
9
+ */var ml;function y0(){if(ml)return to;ml=1;var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,l){var d,f={},h=null,v=null;l!==void 0&&(h=""+l),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(v=c.ref);for(d in c)n.call(c,d)&&!s.hasOwnProperty(d)&&(f[d]=c[d]);if(a&&a.defaultProps)for(d in c=a.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:a,key:h,ref:v,props:f,_owner:o.current}}return to.Fragment=r,to.jsx=i,to.jsxs=i,to}var ro={};/**
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 gl;function y0(){return gl||(gl=1,process.env.NODE_ENV!=="production"&&(function(){var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function b(T){if(T===null||typeof T!="object")return null;var re=m&&T[m]||T[p];return typeof re=="function"?re:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(T){{for(var re=arguments.length,ye=new Array(re>1?re-1:0),Pe=1;Pe<re;Pe++)ye[Pe-1]=arguments[Pe];E("error",T,ye)}}function E(T,re,ye){{var Pe=w.ReactDebugCurrentFrame,Qe=Pe.getStackAddendum();Qe!==""&&(re+="%s",ye=ye.concat([Qe]));var dt=ye.map(function(Ye){return String(Ye)});dt.unshift("Warning: "+re),Function.prototype.apply.call(console[T],console,dt)}}var S=!1,_=!1,W=!1,D=!1,A=!1,M;M=Symbol.for("react.module.reference");function I(T){return!!(typeof T=="string"||typeof T=="function"||T===n||T===s||A||T===o||T===u||T===d||D||T===v||S||_||W||typeof T=="object"&&T!==null&&(T.$$typeof===h||T.$$typeof===f||T.$$typeof===i||T.$$typeof===a||T.$$typeof===c||T.$$typeof===M||T.getModuleId!==void 0))}function H(T,re,ye){var Pe=T.displayName;if(Pe)return Pe;var Qe=re.displayName||re.name||"";return Qe!==""?ye+"("+Qe+")":ye}function G(T){return T.displayName||"Context"}function F(T){if(T==null)return null;if(typeof T.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case a:var re=T;return G(re)+".Consumer";case i:var ye=T;return G(ye._context)+".Provider";case c:return H(T,T.render,"ForwardRef");case f:var Pe=T.displayName||null;return Pe!==null?Pe:F(T.type)||"Memo";case h:{var Qe=T,dt=Qe._payload,Ye=Qe._init;try{return F(Ye(dt))}catch{return null}}}return null}var Y=Object.assign,oe=0,V,N,ae,fe,$,Q,Ce;function me(){}me.__reactDisabledLog=!0;function we(){{if(oe===0){V=console.log,N=console.info,ae=console.warn,fe=console.error,$=console.group,Q=console.groupCollapsed,Ce=console.groupEnd;var T={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}oe++}}function ie(){{if(oe--,oe===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},T,{value:V}),info:Y({},T,{value:N}),warn:Y({},T,{value:ae}),error:Y({},T,{value:fe}),group:Y({},T,{value:$}),groupCollapsed:Y({},T,{value:Q}),groupEnd:Y({},T,{value:Ce})})}oe<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=w.ReactCurrentDispatcher,ce;function ge(T,re,ye){{if(ce===void 0)try{throw Error()}catch(Qe){var Pe=Qe.stack.trim().match(/\n( *(at )?)/);ce=Pe&&Pe[1]||""}return`
18
- `+ce+T}}var de=!1,pe;{var Re=typeof WeakMap=="function"?WeakMap:Map;pe=new Re}function j(T,re){if(!T||de)return"";{var ye=pe.get(T);if(ye!==void 0)return ye}var Pe;de=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var dt;dt=ee.current,ee.current=null,we();try{if(re){var Ye=function(){throw Error()};if(Object.defineProperty(Ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ye,[])}catch(Ie){Pe=Ie}Reflect.construct(T,[],Ye)}else{try{Ye.call()}catch(Ie){Pe=Ie}T.call(Ye.prototype)}}else{try{throw Error()}catch(Ie){Pe=Ie}T()}}catch(Ie){if(Ie&&Pe&&typeof Ie.stack=="string"){for(var We=Ie.stack.split(`
19
- `),Ut=Pe.stack.split(`
20
- `),mt=We.length-1,Pt=Ut.length-1;mt>=1&&Pt>=0&&We[mt]!==Ut[Pt];)Pt--;for(;mt>=1&&Pt>=0;mt--,Pt--)if(We[mt]!==Ut[Pt]){if(mt!==1||Pt!==1)do if(mt--,Pt--,Pt<0||We[mt]!==Ut[Pt]){var L=`
21
- `+We[mt].replace(" at new "," at ");return T.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",T.displayName)),typeof T=="function"&&pe.set(T,L),L}while(mt>=1&&Pt>=0);break}}}finally{de=!1,ee.current=dt,ie(),Error.prepareStackTrace=Qe}var X=T?T.displayName||T.name:"",be=X?ge(X):"";return typeof T=="function"&&pe.set(T,be),be}function Fe(T,re,ye){return j(T,!1)}function qe(T){var re=T.prototype;return!!(re&&re.isReactComponent)}function Ze(T,re,ye){if(T==null)return"";if(typeof T=="function")return j(T,qe(T));if(typeof T=="string")return ge(T);switch(T){case u:return ge("Suspense");case d:return ge("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case c:return Fe(T.render);case f:return Ze(T.type,re,ye);case h:{var Pe=T,Qe=Pe._payload,dt=Pe._init;try{return Ze(dt(Qe),re,ye)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Be={},vt=w.ReactDebugCurrentFrame;function ht(T){if(T){var re=T._owner,ye=Ze(T.type,T._source,re?re.type:null);vt.setExtraStackFrame(ye)}else vt.setExtraStackFrame(null)}function k(T,re,ye,Pe,Qe){{var dt=Function.call.bind(Ne);for(var Ye in T)if(dt(T,Ye)){var We=void 0;try{if(typeof T[Ye]!="function"){var Ut=Error((Pe||"React class")+": "+ye+" type `"+Ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[Ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ut.name="Invariant Violation",Ut}We=T[Ye](re,Ye,Pe,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(mt){We=mt}We&&!(We instanceof Error)&&(ht(Qe),C("%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).",Pe||"React class",ye,Ye,typeof We),ht(null)),We instanceof Error&&!(We.message in Be)&&(Be[We.message]=!0,ht(Qe),C("Failed %s type: %s",ye,We.message),ht(null))}}}var P=Array.isArray;function B(T){return P(T)}function le(T){{var re=typeof Symbol=="function"&&Symbol.toStringTag,ye=re&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ye}}function se(T){try{return O(T),!1}catch{return!0}}function O(T){return""+T}function ne(T){if(se(T))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",le(T)),O(T)}var Se=w.ReactCurrentOwner,Oe={key:!0,ref:!0,__self:!0,__source:!0},R,te;function _e(T){if(Ne.call(T,"ref")){var re=Object.getOwnPropertyDescriptor(T,"ref").get;if(re&&re.isReactWarning)return!1}return T.ref!==void 0}function Ge(T){if(Ne.call(T,"key")){var re=Object.getOwnPropertyDescriptor(T,"key").get;if(re&&re.isReactWarning)return!1}return T.key!==void 0}function q(T,re){typeof T.ref=="string"&&Se.current}function ue(T,re){{var ye=function(){R||(R=!0,C("%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)",re))};ye.isReactWarning=!0,Object.defineProperty(T,"key",{get:ye,configurable:!0})}}function Ee(T,re){{var ye=function(){te||(te=!0,C("%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)",re))};ye.isReactWarning=!0,Object.defineProperty(T,"ref",{get:ye,configurable:!0})}}var Te=function(T,re,ye,Pe,Qe,dt,Ye){var We={$$typeof:t,type:T,key:re,ref:ye,props:Ye,_owner:dt};return We._store={},Object.defineProperty(We._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(We,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.defineProperty(We,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(We.props),Object.freeze(We)),We};function Ve(T,re,ye,Pe,Qe){{var dt,Ye={},We=null,Ut=null;ye!==void 0&&(ne(ye),We=""+ye),Ge(re)&&(ne(re.key),We=""+re.key),_e(re)&&(Ut=re.ref,q(re,Qe));for(dt in re)Ne.call(re,dt)&&!Oe.hasOwnProperty(dt)&&(Ye[dt]=re[dt]);if(T&&T.defaultProps){var mt=T.defaultProps;for(dt in mt)Ye[dt]===void 0&&(Ye[dt]=mt[dt])}if(We||Ut){var Pt=typeof T=="function"?T.displayName||T.name||"Unknown":T;We&&ue(Ye,Pt),Ut&&Ee(Ye,Pt)}return Te(T,We,Ut,Qe,Pe,Se.current,Ye)}}var J=w.ReactCurrentOwner,Me=w.ReactDebugCurrentFrame;function ke(T){if(T){var re=T._owner,ye=Ze(T.type,T._source,re?re.type:null);Me.setExtraStackFrame(ye)}else Me.setExtraStackFrame(null)}var je;je=!1;function Gt(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function er(){{if(J.current){var T=F(J.current.type);if(T)return`
17
+ */var gl;function b0(){return gl||(gl=1,process.env.NODE_ENV!=="production"&&(function(){var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function b(T){if(T===null||typeof T!="object")return null;var re=m&&T[m]||T[p];return typeof re=="function"?re:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(T){{for(var re=arguments.length,ye=new Array(re>1?re-1:0),Pe=1;Pe<re;Pe++)ye[Pe-1]=arguments[Pe];E("error",T,ye)}}function E(T,re,ye){{var Pe=w.ReactDebugCurrentFrame,Qe=Pe.getStackAddendum();Qe!==""&&(re+="%s",ye=ye.concat([Qe]));var dt=ye.map(function(Ye){return String(Ye)});dt.unshift("Warning: "+re),Function.prototype.apply.call(console[T],console,dt)}}var S=!1,_=!1,W=!1,D=!1,A=!1,M;M=Symbol.for("react.module.reference");function I(T){return!!(typeof T=="string"||typeof T=="function"||T===n||T===s||A||T===o||T===l||T===d||D||T===v||S||_||W||typeof T=="object"&&T!==null&&(T.$$typeof===h||T.$$typeof===f||T.$$typeof===i||T.$$typeof===a||T.$$typeof===c||T.$$typeof===M||T.getModuleId!==void 0))}function U(T,re,ye){var Pe=T.displayName;if(Pe)return Pe;var Qe=re.displayName||re.name||"";return Qe!==""?ye+"("+Qe+")":ye}function G(T){return T.displayName||"Context"}function F(T){if(T==null)return null;if(typeof T.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case a:var re=T;return G(re)+".Consumer";case i:var ye=T;return G(ye._context)+".Provider";case c:return U(T,T.render,"ForwardRef");case f:var Pe=T.displayName||null;return Pe!==null?Pe:F(T.type)||"Memo";case h:{var Qe=T,dt=Qe._payload,Ye=Qe._init;try{return F(Ye(dt))}catch{return null}}}return null}var Y=Object.assign,oe=0,V,N,ce,fe,$,Q,Ce;function me(){}me.__reactDisabledLog=!0;function we(){{if(oe===0){V=console.log,N=console.info,ce=console.warn,fe=console.error,$=console.group,Q=console.groupCollapsed,Ce=console.groupEnd;var T={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}oe++}}function ae(){{if(oe--,oe===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},T,{value:V}),info:Y({},T,{value:N}),warn:Y({},T,{value:ce}),error:Y({},T,{value:fe}),group:Y({},T,{value:$}),groupCollapsed:Y({},T,{value:Q}),groupEnd:Y({},T,{value:Ce})})}oe<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=w.ReactCurrentDispatcher,le;function ge(T,re,ye){{if(le===void 0)try{throw Error()}catch(Qe){var Pe=Qe.stack.trim().match(/\n( *(at )?)/);le=Pe&&Pe[1]||""}return`
18
+ `+le+T}}var ie=!1,pe;{var Re=typeof WeakMap=="function"?WeakMap:Map;pe=new Re}function j(T,re){if(!T||ie)return"";{var ye=pe.get(T);if(ye!==void 0)return ye}var Pe;ie=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var dt;dt=ee.current,ee.current=null,we();try{if(re){var Ye=function(){throw Error()};if(Object.defineProperty(Ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ye,[])}catch(Ie){Pe=Ie}Reflect.construct(T,[],Ye)}else{try{Ye.call()}catch(Ie){Pe=Ie}T.call(Ye.prototype)}}else{try{throw Error()}catch(Ie){Pe=Ie}T()}}catch(Ie){if(Ie&&Pe&&typeof Ie.stack=="string"){for(var Ve=Ie.stack.split(`
19
+ `),Ht=Pe.stack.split(`
20
+ `),mt=Ve.length-1,Pt=Ht.length-1;mt>=1&&Pt>=0&&Ve[mt]!==Ht[Pt];)Pt--;for(;mt>=1&&Pt>=0;mt--,Pt--)if(Ve[mt]!==Ht[Pt]){if(mt!==1||Pt!==1)do if(mt--,Pt--,Pt<0||Ve[mt]!==Ht[Pt]){var L=`
21
+ `+Ve[mt].replace(" at new "," at ");return T.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",T.displayName)),typeof T=="function"&&pe.set(T,L),L}while(mt>=1&&Pt>=0);break}}}finally{ie=!1,ee.current=dt,ae(),Error.prepareStackTrace=Qe}var J=T?T.displayName||T.name:"",be=J?ge(J):"";return typeof T=="function"&&pe.set(T,be),be}function We(T,re,ye){return j(T,!1)}function qe(T){var re=T.prototype;return!!(re&&re.isReactComponent)}function Ze(T,re,ye){if(T==null)return"";if(typeof T=="function")return j(T,qe(T));if(typeof T=="string")return ge(T);switch(T){case l:return ge("Suspense");case d:return ge("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case c:return We(T.render);case f:return Ze(T.type,re,ye);case h:{var Pe=T,Qe=Pe._payload,dt=Pe._init;try{return Ze(dt(Qe),re,ye)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Be={},vt=w.ReactDebugCurrentFrame;function ht(T){if(T){var re=T._owner,ye=Ze(T.type,T._source,re?re.type:null);vt.setExtraStackFrame(ye)}else vt.setExtraStackFrame(null)}function k(T,re,ye,Pe,Qe){{var dt=Function.call.bind(Ne);for(var Ye in T)if(dt(T,Ye)){var Ve=void 0;try{if(typeof T[Ye]!="function"){var Ht=Error((Pe||"React class")+": "+ye+" type `"+Ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[Ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ht.name="Invariant Violation",Ht}Ve=T[Ye](re,Ye,Pe,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(mt){Ve=mt}Ve&&!(Ve instanceof Error)&&(ht(Qe),C("%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).",Pe||"React class",ye,Ye,typeof Ve),ht(null)),Ve instanceof Error&&!(Ve.message in Be)&&(Be[Ve.message]=!0,ht(Qe),C("Failed %s type: %s",ye,Ve.message),ht(null))}}}var P=Array.isArray;function B(T){return P(T)}function ue(T){{var re=typeof Symbol=="function"&&Symbol.toStringTag,ye=re&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ye}}function se(T){try{return O(T),!1}catch{return!0}}function O(T){return""+T}function ne(T){if(se(T))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ue(T)),O(T)}var Se=w.ReactCurrentOwner,Oe={key:!0,ref:!0,__self:!0,__source:!0},R,te;function _e(T){if(Ne.call(T,"ref")){var re=Object.getOwnPropertyDescriptor(T,"ref").get;if(re&&re.isReactWarning)return!1}return T.ref!==void 0}function Ge(T){if(Ne.call(T,"key")){var re=Object.getOwnPropertyDescriptor(T,"key").get;if(re&&re.isReactWarning)return!1}return T.key!==void 0}function q(T,re){typeof T.ref=="string"&&Se.current}function de(T,re){{var ye=function(){R||(R=!0,C("%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)",re))};ye.isReactWarning=!0,Object.defineProperty(T,"key",{get:ye,configurable:!0})}}function Ee(T,re){{var ye=function(){te||(te=!0,C("%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)",re))};ye.isReactWarning=!0,Object.defineProperty(T,"ref",{get:ye,configurable:!0})}}var Ae=function(T,re,ye,Pe,Qe,dt,Ye){var Ve={$$typeof:t,type:T,key:re,ref:ye,props:Ye,_owner:dt};return Ve._store={},Object.defineProperty(Ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.defineProperty(Ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(Ve.props),Object.freeze(Ve)),Ve};function Fe(T,re,ye,Pe,Qe){{var dt,Ye={},Ve=null,Ht=null;ye!==void 0&&(ne(ye),Ve=""+ye),Ge(re)&&(ne(re.key),Ve=""+re.key),_e(re)&&(Ht=re.ref,q(re,Qe));for(dt in re)Ne.call(re,dt)&&!Oe.hasOwnProperty(dt)&&(Ye[dt]=re[dt]);if(T&&T.defaultProps){var mt=T.defaultProps;for(dt in mt)Ye[dt]===void 0&&(Ye[dt]=mt[dt])}if(Ve||Ht){var Pt=typeof T=="function"?T.displayName||T.name||"Unknown":T;Ve&&de(Ye,Pt),Ht&&Ee(Ye,Pt)}return Ae(T,Ve,Ht,Qe,Pe,Se.current,Ye)}}var X=w.ReactCurrentOwner,Me=w.ReactDebugCurrentFrame;function ke(T){if(T){var re=T._owner,ye=Ze(T.type,T._source,re?re.type:null);Me.setExtraStackFrame(ye)}else Me.setExtraStackFrame(null)}var je;je=!1;function Gt(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function er(){{if(X.current){var T=F(X.current.type);if(T)return`
22
22
 
23
- Check the render method of \``+T+"`."}return""}}function Yt(T){return""}var Hr={};function Ke(T){{var re=er();if(!re){var ye=typeof T=="string"?T:T.displayName||T.name;ye&&(re=`
23
+ Check the render method of \``+T+"`."}return""}}function Yt(T){return""}var Ur={};function Ke(T){{var re=er();if(!re){var ye=typeof T=="string"?T:T.displayName||T.name;ye&&(re=`
24
24
 
25
- Check the top-level render call using <`+ye+">.")}return re}}function wr(T,re){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=Ke(re);if(Hr[ye])return;Hr[ye]=!0;var Pe="";T&&T._owner&&T._owner!==J.current&&(Pe=" It was passed a child from "+F(T._owner.type)+"."),ke(T),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,Pe),ke(null)}}function An(T,re){{if(typeof T!="object")return;if(B(T))for(var ye=0;ye<T.length;ye++){var Pe=T[ye];Gt(Pe)&&wr(Pe,re)}else if(Gt(T))T._store&&(T._store.validated=!0);else if(T){var Qe=b(T);if(typeof Qe=="function"&&Qe!==T.entries)for(var dt=Qe.call(T),Ye;!(Ye=dt.next()).done;)Gt(Ye.value)&&wr(Ye.value,re)}}}function sa(T){{var re=T.type;if(re==null||typeof re=="string")return;var ye;if(typeof re=="function")ye=re.propTypes;else if(typeof re=="object"&&(re.$$typeof===c||re.$$typeof===f))ye=re.propTypes;else return;if(ye){var Pe=F(re);k(ye,T.props,"prop",Pe,T)}else if(re.PropTypes!==void 0&&!je){je=!0;var Qe=F(re);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof re.getDefaultProps=="function"&&!re.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ul(T){{for(var re=Object.keys(T.props),ye=0;ye<re.length;ye++){var Pe=re[ye];if(Pe!=="children"&&Pe!=="key"){ke(T),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Pe),ke(null);break}}T.ref!==null&&(ke(T),C("Invalid attribute `ref` supplied to `React.Fragment`."),ke(null))}}var xs={};function _s(T,re,ye,Pe,Qe,dt){{var Ye=I(T);if(!Ye){var We="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(We+=" 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 Ut=Yt();Ut?We+=Ut:We+=er();var mt;T===null?mt="null":B(T)?mt="array":T!==void 0&&T.$$typeof===t?(mt="<"+(F(T.type)||"Unknown")+" />",We=" Did you accidentally export a JSX literal instead of a component?"):mt=typeof T,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",mt,We)}var Pt=Ve(T,re,ye,Qe,dt);if(Pt==null)return Pt;if(Ye){var L=re.children;if(L!==void 0)if(Pe)if(B(L)){for(var X=0;X<L.length;X++)An(L[X],T);Object.freeze&&Object.freeze(L)}else C("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 An(L,T)}if(Ne.call(re,"key")){var be=F(T),Ie=Object.keys(re).filter(function(Pr){return Pr!=="key"}),At=Ie.length>0?"{key: someKey, "+Ie.join(": ..., ")+": ...}":"{key: someKey}";if(!xs[be+At]){var St=Ie.length>0?"{"+Ie.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ye+">.")}return re}}function wr(T,re){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=Ke(re);if(Ur[ye])return;Ur[ye]=!0;var Pe="";T&&T._owner&&T._owner!==X.current&&(Pe=" It was passed a child from "+F(T._owner.type)+"."),ke(T),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,Pe),ke(null)}}function An(T,re){{if(typeof T!="object")return;if(B(T))for(var ye=0;ye<T.length;ye++){var Pe=T[ye];Gt(Pe)&&wr(Pe,re)}else if(Gt(T))T._store&&(T._store.validated=!0);else if(T){var Qe=b(T);if(typeof Qe=="function"&&Qe!==T.entries)for(var dt=Qe.call(T),Ye;!(Ye=dt.next()).done;)Gt(Ye.value)&&wr(Ye.value,re)}}}function sa(T){{var re=T.type;if(re==null||typeof re=="string")return;var ye;if(typeof re=="function")ye=re.propTypes;else if(typeof re=="object"&&(re.$$typeof===c||re.$$typeof===f))ye=re.propTypes;else return;if(ye){var Pe=F(re);k(ye,T.props,"prop",Pe,T)}else if(re.PropTypes!==void 0&&!je){je=!0;var Qe=F(re);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof re.getDefaultProps=="function"&&!re.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ul(T){{for(var re=Object.keys(T.props),ye=0;ye<re.length;ye++){var Pe=re[ye];if(Pe!=="children"&&Pe!=="key"){ke(T),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Pe),ke(null);break}}T.ref!==null&&(ke(T),C("Invalid attribute `ref` supplied to `React.Fragment`."),ke(null))}}var xs={};function _s(T,re,ye,Pe,Qe,dt){{var Ye=I(T);if(!Ye){var Ve="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Ve+=" 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 Ht=Yt();Ht?Ve+=Ht:Ve+=er();var mt;T===null?mt="null":B(T)?mt="array":T!==void 0&&T.$$typeof===t?(mt="<"+(F(T.type)||"Unknown")+" />",Ve=" Did you accidentally export a JSX literal instead of a component?"):mt=typeof T,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",mt,Ve)}var Pt=Fe(T,re,ye,Qe,dt);if(Pt==null)return Pt;if(Ye){var L=re.children;if(L!==void 0)if(Pe)if(B(L)){for(var J=0;J<L.length;J++)An(L[J],T);Object.freeze&&Object.freeze(L)}else C("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 An(L,T)}if(Ne.call(re,"key")){var be=F(T),Ie=Object.keys(re).filter(function(Pr){return Pr!=="key"}),At=Ie.length>0?"{key: someKey, "+Ie.join(": ..., ")+": ...}":"{key: someKey}";if(!xs[be+At]){var St=Ie.length>0?"{"+Ie.join(": ..., ")+": ...}":"{}";C(`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} />`,At,be,St,be),xs[be+At]=!0}}return T===n?ul(Pt):sa(Pt),Pt}}function ia(T,re,ye){return _s(T,re,ye,!0)}function aa(T,re,ye){return _s(T,re,ye,!1)}var dl=aa,ca=ia;ro.Fragment=n,ro.jsx=dl,ro.jsxs=ca})()),ro}var vl;function rt(){return vl||(vl=1,process.env.NODE_ENV==="production"?Ss.exports=v0():Ss.exports=y0()),Ss.exports}var l=rt();const Cr={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"};var no={},la={exports:{}},yl;function Je(){return yl||(yl=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(la)),la.exports}var ua={};function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nt.apply(null,arguments)}function Jr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bl(e){if(K.isValidElement(e)||!Jr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=bl(e[r])}),t}function Or(e,t,r={clone:!0}){const n=r.clone?nt({},e):e;return Jr(e)&&Jr(t)&&Object.keys(t).forEach(o=>{K.isValidElement(t[o])?n[o]=t[o]:Jr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Jr(e[o])?n[o]=Or(e[o],t[o],r):r.clone?n[o]=Jr(t[o])?bl(t[o]):t[o]:n[o]=t[o]}),n}const b0=Object.freeze(Object.defineProperty({__proto__:null,default:Or,isPlainObject:Jr},Symbol.toStringTag,{value:"Module"}));var Cs={exports:{}},Es={exports:{}},ot={};/** @license React v16.13.1
30
+ <%s key={someKey} {...props} />`,At,be,St,be),xs[be+At]=!0}}return T===n?ul(Pt):sa(Pt),Pt}}function ia(T,re,ye){return _s(T,re,ye,!0)}function aa(T,re,ye){return _s(T,re,ye,!1)}var dl=aa,ca=ia;ro.Fragment=n,ro.jsx=dl,ro.jsxs=ca})()),ro}var vl;function rt(){return vl||(vl=1,process.env.NODE_ENV==="production"?Ss.exports=y0():Ss.exports=b0()),Ss.exports}var u=rt();const Cr={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"};var no={},la={exports:{}},yl;function Je(){return yl||(yl=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(la)),la.exports}var ua={};function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nt.apply(null,arguments)}function Jr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bl(e){if(K.isValidElement(e)||!Jr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=bl(e[r])}),t}function Or(e,t,r={clone:!0}){const n=r.clone?nt({},e):e;return Jr(e)&&Jr(t)&&Object.keys(t).forEach(o=>{K.isValidElement(t[o])?n[o]=t[o]:Jr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Jr(e[o])?n[o]=Or(e[o],t[o],r):r.clone?n[o]=Jr(t[o])?bl(t[o]):t[o]:n[o]=t[o]}),n}const x0=Object.freeze(Object.defineProperty({__proto__:null,default:Or,isPlainObject:Jr},Symbol.toStringTag,{value:"Module"}));var Cs={exports:{}},Es={exports:{}},ot={};/** @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 xl;function x0(){if(xl)return ot;xl=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(_){if(typeof _=="object"&&_!==null){var W=_.$$typeof;switch(W){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case m:case v:case i:return _;default:return W}}case r:return W}}}function S(_){return E(_)===u}return ot.AsyncMode=c,ot.ConcurrentMode=u,ot.ContextConsumer=a,ot.ContextProvider=i,ot.Element=t,ot.ForwardRef=d,ot.Fragment=n,ot.Lazy=m,ot.Memo=v,ot.Portal=r,ot.Profiler=s,ot.StrictMode=o,ot.Suspense=f,ot.isAsyncMode=function(_){return S(_)||E(_)===c},ot.isConcurrentMode=S,ot.isContextConsumer=function(_){return E(_)===a},ot.isContextProvider=function(_){return E(_)===i},ot.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},ot.isForwardRef=function(_){return E(_)===d},ot.isFragment=function(_){return E(_)===n},ot.isLazy=function(_){return E(_)===m},ot.isMemo=function(_){return E(_)===v},ot.isPortal=function(_){return E(_)===r},ot.isProfiler=function(_){return E(_)===s},ot.isStrictMode=function(_){return E(_)===o},ot.isSuspense=function(_){return E(_)===f},ot.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===C||_.$$typeof===p)},ot.typeOf=E,ot}var st={};/** @license React v16.13.1
37
+ */var xl;function _0(){if(xl)return ot;xl=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(_){if(typeof _=="object"&&_!==null){var W=_.$$typeof;switch(W){case t:switch(_=_.type,_){case c:case l:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case m:case v:case i:return _;default:return W}}case r:return W}}}function S(_){return E(_)===l}return ot.AsyncMode=c,ot.ConcurrentMode=l,ot.ContextConsumer=a,ot.ContextProvider=i,ot.Element=t,ot.ForwardRef=d,ot.Fragment=n,ot.Lazy=m,ot.Memo=v,ot.Portal=r,ot.Profiler=s,ot.StrictMode=o,ot.Suspense=f,ot.isAsyncMode=function(_){return S(_)||E(_)===c},ot.isConcurrentMode=S,ot.isContextConsumer=function(_){return E(_)===a},ot.isContextProvider=function(_){return E(_)===i},ot.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},ot.isForwardRef=function(_){return E(_)===d},ot.isFragment=function(_){return E(_)===n},ot.isLazy=function(_){return E(_)===m},ot.isMemo=function(_){return E(_)===v},ot.isPortal=function(_){return E(_)===r},ot.isProfiler=function(_){return E(_)===s},ot.isStrictMode=function(_){return E(_)===o},ot.isSuspense=function(_){return E(_)===f},ot.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===l||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===C||_.$$typeof===p)},ot.typeOf=E,ot}var st={};/** @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 _l;function _0(){return _l||(_l=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(j){return typeof j=="string"||typeof j=="function"||j===n||j===u||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===C||j.$$typeof===p)}function S(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var qe=j.type;switch(qe){case c:case u:case n:case s:case o:case f:return qe;default:var Ze=qe&&qe.$$typeof;switch(Ze){case a:case d:case m:case v:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=u,D=a,A=i,M=t,I=d,H=n,G=m,F=v,Y=r,oe=s,V=o,N=f,ae=!1;function fe(j){return ae||(ae=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(j)||S(j)===c}function $(j){return S(j)===u}function Q(j){return S(j)===a}function Ce(j){return S(j)===i}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function we(j){return S(j)===d}function ie(j){return S(j)===n}function ee(j){return S(j)===m}function ce(j){return S(j)===v}function ge(j){return S(j)===r}function de(j){return S(j)===s}function pe(j){return S(j)===o}function Re(j){return S(j)===f}st.AsyncMode=_,st.ConcurrentMode=W,st.ContextConsumer=D,st.ContextProvider=A,st.Element=M,st.ForwardRef=I,st.Fragment=H,st.Lazy=G,st.Memo=F,st.Portal=Y,st.Profiler=oe,st.StrictMode=V,st.Suspense=N,st.isAsyncMode=fe,st.isConcurrentMode=$,st.isContextConsumer=Q,st.isContextProvider=Ce,st.isElement=me,st.isForwardRef=we,st.isFragment=ie,st.isLazy=ee,st.isMemo=ce,st.isPortal=ge,st.isProfiler=de,st.isStrictMode=pe,st.isSuspense=Re,st.isValidElementType=E,st.typeOf=S})()),st}var wl;function Sl(){return wl||(wl=1,process.env.NODE_ENV==="production"?Es.exports=x0():Es.exports=_0()),Es.exports}/*
44
+ */var _l;function w0(){return _l||(_l=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(j){return typeof j=="string"||typeof j=="function"||j===n||j===l||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===C||j.$$typeof===p)}function S(j){if(typeof j=="object"&&j!==null){var We=j.$$typeof;switch(We){case t:var qe=j.type;switch(qe){case c:case l:case n:case s:case o:case f:return qe;default:var Ze=qe&&qe.$$typeof;switch(Ze){case a:case d:case m:case v:case i:return Ze;default:return We}}case r:return We}}}var _=c,W=l,D=a,A=i,M=t,I=d,U=n,G=m,F=v,Y=r,oe=s,V=o,N=f,ce=!1;function fe(j){return ce||(ce=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(j)||S(j)===c}function $(j){return S(j)===l}function Q(j){return S(j)===a}function Ce(j){return S(j)===i}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function we(j){return S(j)===d}function ae(j){return S(j)===n}function ee(j){return S(j)===m}function le(j){return S(j)===v}function ge(j){return S(j)===r}function ie(j){return S(j)===s}function pe(j){return S(j)===o}function Re(j){return S(j)===f}st.AsyncMode=_,st.ConcurrentMode=W,st.ContextConsumer=D,st.ContextProvider=A,st.Element=M,st.ForwardRef=I,st.Fragment=U,st.Lazy=G,st.Memo=F,st.Portal=Y,st.Profiler=oe,st.StrictMode=V,st.Suspense=N,st.isAsyncMode=fe,st.isConcurrentMode=$,st.isContextConsumer=Q,st.isContextProvider=Ce,st.isElement=me,st.isForwardRef=we,st.isFragment=ae,st.isLazy=ee,st.isMemo=le,st.isPortal=ge,st.isProfiler=ie,st.isStrictMode=pe,st.isSuspense=Re,st.isValidElementType=E,st.typeOf=S})()),st}var wl;function Sl(){return wl||(wl=1,process.env.NODE_ENV==="production"?Es.exports=_0():Es.exports=w0()),Es.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var da,Cl;function w0(){if(Cl)return da;Cl=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return da=o()?Object.assign:function(s,i){for(var a,c=n(s),u,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){u=e(a);for(var h=0;h<u.length;h++)r.call(a,u[h])&&(c[u[h]]=a[u[h]])}}return c},da}var fa,El;function pa(){if(El)return fa;El=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fa=e,fa}var ha,Dl;function kl(){return Dl||(Dl=1,ha=Function.call.bind(Object.prototype.hasOwnProperty)),ha}var ma,Al;function S0(){if(Al)return ma;Al=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=pa(),r={},n=kl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var h=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[d](i,d,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var v=u?u():"";e("Failed "+a+" type: "+f.message+(v??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ma=o,ma}var ga,Tl;function C0(){if(Tl)return ga;Tl=1;var e=Sl(),t=w0(),r=pa(),n=kl(),o=S0(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return ga=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var Q=$&&(u&&$[u]||$[d]);if(typeof Q=="function")return Q}var h="<<anonymous>>",v={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:C(),arrayOf:E,element:S(),elementType:_(),instanceOf:W,node:I(),objectOf:A,oneOf:D,oneOfType:M,shape:G,exact:F};function m($,Q){return $===Q?$!==0||1/$===1/Q:$!==$&&Q!==Q}function p($,Q){this.message=$,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}p.prototype=Error.prototype;function b($){if(process.env.NODE_ENV!=="production")var Q={},Ce=0;function me(ie,ee,ce,ge,de,pe,Re){if(ge=ge||h,pe=pe||ce,Re!==r){if(c){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Fe=ge+":"+ce;!Q[Fe]&&Ce<3&&(s("You are manually calling a React.PropTypes validation function for the `"+pe+"` prop on `"+ge+"`. 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[Fe]=!0,Ce++)}}return ee[ce]==null?ie?ee[ce]===null?new p("The "+de+" `"+pe+"` is marked as required "+("in `"+ge+"`, but its value is `null`.")):new p("The "+de+" `"+pe+"` is marked as required in "+("`"+ge+"`, but its value is `undefined`.")):null:$(ee,ce,ge,de,pe)}var we=me.bind(null,!1);return we.isRequired=me.bind(null,!0),we}function w($){function Q(Ce,me,we,ie,ee,ce){var ge=Ce[me],de=V(ge);if(de!==$){var pe=N(ge);return new p("Invalid "+ie+" `"+ee+"` of type "+("`"+pe+"` supplied to `"+we+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return b(Q)}function C(){return b(i)}function E($){function Q(Ce,me,we,ie,ee){if(typeof $!="function")return new p("Property `"+ee+"` of component `"+we+"` has invalid PropType notation inside arrayOf.");var ce=Ce[me];if(!Array.isArray(ce)){var ge=V(ce);return new p("Invalid "+ie+" `"+ee+"` of type "+("`"+ge+"` supplied to `"+we+"`, expected an array."))}for(var de=0;de<ce.length;de++){var pe=$(ce,de,we,ie,ee+"["+de+"]",r);if(pe instanceof Error)return pe}return null}return b(Q)}function S(){function $(Q,Ce,me,we,ie){var ee=Q[Ce];if(!a(ee)){var ce=V(ee);return new p("Invalid "+we+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+me+"`, expected a single ReactElement."))}return null}return b($)}function _(){function $(Q,Ce,me,we,ie){var ee=Q[Ce];if(!e.isValidElementType(ee)){var ce=V(ee);return new p("Invalid "+we+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+me+"`, expected a single ReactElement type."))}return null}return b($)}function W($){function Q(Ce,me,we,ie,ee){if(!(Ce[me]instanceof $)){var ce=$.name||h,ge=fe(Ce[me]);return new p("Invalid "+ie+" `"+ee+"` of type "+("`"+ge+"` supplied to `"+we+"`, expected ")+("instance of `"+ce+"`."))}return null}return b(Q)}function D($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function Q(Ce,me,we,ie,ee){for(var ce=Ce[me],ge=0;ge<$.length;ge++)if(m(ce,$[ge]))return null;var de=JSON.stringify($,function(Re,j){var Fe=N(j);return Fe==="symbol"?String(j):j});return new p("Invalid "+ie+" `"+ee+"` of value `"+String(ce)+"` "+("supplied to `"+we+"`, expected one of "+de+"."))}return b(Q)}function A($){function Q(Ce,me,we,ie,ee){if(typeof $!="function")return new p("Property `"+ee+"` of component `"+we+"` has invalid PropType notation inside objectOf.");var ce=Ce[me],ge=V(ce);if(ge!=="object")return new p("Invalid "+ie+" `"+ee+"` of type "+("`"+ge+"` supplied to `"+we+"`, expected an object."));for(var de in ce)if(n(ce,de)){var pe=$(ce,de,we,ie,ee+"."+de,r);if(pe instanceof Error)return pe}return null}return b(Q)}function M($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var Q=0;Q<$.length;Q++){var Ce=$[Q];if(typeof Ce!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ae(Ce)+" at index "+Q+"."),i}function me(we,ie,ee,ce,ge){for(var de=[],pe=0;pe<$.length;pe++){var Re=$[pe],j=Re(we,ie,ee,ce,ge,r);if(j==null)return null;j.data&&n(j.data,"expectedType")&&de.push(j.data.expectedType)}var Fe=de.length>0?", expected one of type ["+de.join(", ")+"]":"";return new p("Invalid "+ce+" `"+ge+"` supplied to "+("`"+ee+"`"+Fe+"."))}return b(me)}function I(){function $(Q,Ce,me,we,ie){return Y(Q[Ce])?null:new p("Invalid "+we+" `"+ie+"` supplied to "+("`"+me+"`, expected a ReactNode."))}return b($)}function H($,Q,Ce,me,we){return new p(($||"React class")+": "+Q+" type `"+Ce+"."+me+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+we+"`.")}function G($){function Q(Ce,me,we,ie,ee){var ce=Ce[me],ge=V(ce);if(ge!=="object")return new p("Invalid "+ie+" `"+ee+"` of type `"+ge+"` "+("supplied to `"+we+"`, expected `object`."));for(var de in $){var pe=$[de];if(typeof pe!="function")return H(we,ie,ee,de,N(pe));var Re=pe(ce,de,we,ie,ee+"."+de,r);if(Re)return Re}return null}return b(Q)}function F($){function Q(Ce,me,we,ie,ee){var ce=Ce[me],ge=V(ce);if(ge!=="object")return new p("Invalid "+ie+" `"+ee+"` of type `"+ge+"` "+("supplied to `"+we+"`, expected `object`."));var de=t({},Ce[me],$);for(var pe in de){var Re=$[pe];if(n($,pe)&&typeof Re!="function")return H(we,ie,ee,pe,N(Re));if(!Re)return new p("Invalid "+ie+" `"+ee+"` key `"+pe+"` supplied to `"+we+"`.\nBad object: "+JSON.stringify(Ce[me],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Re(ce,pe,we,ie,ee+"."+pe,r);if(j)return j}return null}return b(Q)}function Y($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(Y);if($===null||a($))return!0;var Q=f($);if(Q){var Ce=Q.call($),me;if(Q!==$.entries){for(;!(me=Ce.next()).done;)if(!Y(me.value))return!1}else for(;!(me=Ce.next()).done;){var we=me.value;if(we&&!Y(we[1]))return!1}}else return!1;return!0;default:return!1}}function oe($,Q){return $==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function V($){var Q=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":oe(Q,$)?"symbol":Q}function N($){if(typeof $>"u"||$===null)return""+$;var Q=V($);if(Q==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return Q}function ae($){var Q=N($);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function fe($){return!$.constructor||!$.constructor.name?h:$.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},ga}var va,Il;function E0(){if(Il)return va;Il=1;var e=pa();function t(){}function r(){}return r.resetWarningCache=t,va=function(){function n(i,a,c,u,d,f){if(f!==e){var h=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 h.name="Invariant Violation",h}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},va}var Ml;function D0(){if(Ml)return Cs.exports;if(Ml=1,process.env.NODE_ENV!=="production"){var e=Sl(),t=!0;Cs.exports=C0()(e.isElement,t)}else Cs.exports=E0()();return Cs.exports}var k0=D0();const ze=Xe(k0);function oo(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const A0=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"}));var Ds={exports:{}},ft={};/**
48
+ */var da,Cl;function S0(){if(Cl)return da;Cl=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return da=o()?Object.assign:function(s,i){for(var a,c=n(s),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){l=e(a);for(var h=0;h<l.length;h++)r.call(a,l[h])&&(c[l[h]]=a[l[h]])}}return c},da}var fa,El;function pa(){if(El)return fa;El=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fa=e,fa}var ha,Dl;function kl(){return Dl||(Dl=1,ha=Function.call.bind(Object.prototype.hasOwnProperty)),ha}var ma,Al;function C0(){if(Al)return ma;Al=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=pa(),r={},n=kl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var h=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=s[d](i,d,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var v=l?l():"";e("Failed "+a+" type: "+f.message+(v??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ma=o,ma}var ga,Tl;function E0(){if(Tl)return ga;Tl=1;var e=Sl(),t=S0(),r=pa(),n=kl(),o=C0(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return ga=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var Q=$&&(l&&$[l]||$[d]);if(typeof Q=="function")return Q}var h="<<anonymous>>",v={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:C(),arrayOf:E,element:S(),elementType:_(),instanceOf:W,node:I(),objectOf:A,oneOf:D,oneOfType:M,shape:G,exact:F};function m($,Q){return $===Q?$!==0||1/$===1/Q:$!==$&&Q!==Q}function p($,Q){this.message=$,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}p.prototype=Error.prototype;function b($){if(process.env.NODE_ENV!=="production")var Q={},Ce=0;function me(ae,ee,le,ge,ie,pe,Re){if(ge=ge||h,pe=pe||le,Re!==r){if(c){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var We=ge+":"+le;!Q[We]&&Ce<3&&(s("You are manually calling a React.PropTypes validation function for the `"+pe+"` prop on `"+ge+"`. 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[We]=!0,Ce++)}}return ee[le]==null?ae?ee[le]===null?new p("The "+ie+" `"+pe+"` is marked as required "+("in `"+ge+"`, but its value is `null`.")):new p("The "+ie+" `"+pe+"` is marked as required in "+("`"+ge+"`, but its value is `undefined`.")):null:$(ee,le,ge,ie,pe)}var we=me.bind(null,!1);return we.isRequired=me.bind(null,!0),we}function w($){function Q(Ce,me,we,ae,ee,le){var ge=Ce[me],ie=V(ge);if(ie!==$){var pe=N(ge);return new p("Invalid "+ae+" `"+ee+"` of type "+("`"+pe+"` supplied to `"+we+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return b(Q)}function C(){return b(i)}function E($){function Q(Ce,me,we,ae,ee){if(typeof $!="function")return new p("Property `"+ee+"` of component `"+we+"` has invalid PropType notation inside arrayOf.");var le=Ce[me];if(!Array.isArray(le)){var ge=V(le);return new p("Invalid "+ae+" `"+ee+"` of type "+("`"+ge+"` supplied to `"+we+"`, expected an array."))}for(var ie=0;ie<le.length;ie++){var pe=$(le,ie,we,ae,ee+"["+ie+"]",r);if(pe instanceof Error)return pe}return null}return b(Q)}function S(){function $(Q,Ce,me,we,ae){var ee=Q[Ce];if(!a(ee)){var le=V(ee);return new p("Invalid "+we+" `"+ae+"` of type "+("`"+le+"` supplied to `"+me+"`, expected a single ReactElement."))}return null}return b($)}function _(){function $(Q,Ce,me,we,ae){var ee=Q[Ce];if(!e.isValidElementType(ee)){var le=V(ee);return new p("Invalid "+we+" `"+ae+"` of type "+("`"+le+"` supplied to `"+me+"`, expected a single ReactElement type."))}return null}return b($)}function W($){function Q(Ce,me,we,ae,ee){if(!(Ce[me]instanceof $)){var le=$.name||h,ge=fe(Ce[me]);return new p("Invalid "+ae+" `"+ee+"` of type "+("`"+ge+"` supplied to `"+we+"`, expected ")+("instance of `"+le+"`."))}return null}return b(Q)}function D($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function Q(Ce,me,we,ae,ee){for(var le=Ce[me],ge=0;ge<$.length;ge++)if(m(le,$[ge]))return null;var ie=JSON.stringify($,function(Re,j){var We=N(j);return We==="symbol"?String(j):j});return new p("Invalid "+ae+" `"+ee+"` of value `"+String(le)+"` "+("supplied to `"+we+"`, expected one of "+ie+"."))}return b(Q)}function A($){function Q(Ce,me,we,ae,ee){if(typeof $!="function")return new p("Property `"+ee+"` of component `"+we+"` has invalid PropType notation inside objectOf.");var le=Ce[me],ge=V(le);if(ge!=="object")return new p("Invalid "+ae+" `"+ee+"` of type "+("`"+ge+"` supplied to `"+we+"`, expected an object."));for(var ie in le)if(n(le,ie)){var pe=$(le,ie,we,ae,ee+"."+ie,r);if(pe instanceof Error)return pe}return null}return b(Q)}function M($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var Q=0;Q<$.length;Q++){var Ce=$[Q];if(typeof Ce!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ce(Ce)+" at index "+Q+"."),i}function me(we,ae,ee,le,ge){for(var ie=[],pe=0;pe<$.length;pe++){var Re=$[pe],j=Re(we,ae,ee,le,ge,r);if(j==null)return null;j.data&&n(j.data,"expectedType")&&ie.push(j.data.expectedType)}var We=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new p("Invalid "+le+" `"+ge+"` supplied to "+("`"+ee+"`"+We+"."))}return b(me)}function I(){function $(Q,Ce,me,we,ae){return Y(Q[Ce])?null:new p("Invalid "+we+" `"+ae+"` supplied to "+("`"+me+"`, expected a ReactNode."))}return b($)}function U($,Q,Ce,me,we){return new p(($||"React class")+": "+Q+" type `"+Ce+"."+me+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+we+"`.")}function G($){function Q(Ce,me,we,ae,ee){var le=Ce[me],ge=V(le);if(ge!=="object")return new p("Invalid "+ae+" `"+ee+"` of type `"+ge+"` "+("supplied to `"+we+"`, expected `object`."));for(var ie in $){var pe=$[ie];if(typeof pe!="function")return U(we,ae,ee,ie,N(pe));var Re=pe(le,ie,we,ae,ee+"."+ie,r);if(Re)return Re}return null}return b(Q)}function F($){function Q(Ce,me,we,ae,ee){var le=Ce[me],ge=V(le);if(ge!=="object")return new p("Invalid "+ae+" `"+ee+"` of type `"+ge+"` "+("supplied to `"+we+"`, expected `object`."));var ie=t({},Ce[me],$);for(var pe in ie){var Re=$[pe];if(n($,pe)&&typeof Re!="function")return U(we,ae,ee,pe,N(Re));if(!Re)return new p("Invalid "+ae+" `"+ee+"` key `"+pe+"` supplied to `"+we+"`.\nBad object: "+JSON.stringify(Ce[me],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Re(le,pe,we,ae,ee+"."+pe,r);if(j)return j}return null}return b(Q)}function Y($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(Y);if($===null||a($))return!0;var Q=f($);if(Q){var Ce=Q.call($),me;if(Q!==$.entries){for(;!(me=Ce.next()).done;)if(!Y(me.value))return!1}else for(;!(me=Ce.next()).done;){var we=me.value;if(we&&!Y(we[1]))return!1}}else return!1;return!0;default:return!1}}function oe($,Q){return $==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function V($){var Q=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":oe(Q,$)?"symbol":Q}function N($){if(typeof $>"u"||$===null)return""+$;var Q=V($);if(Q==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return Q}function ce($){var Q=N($);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function fe($){return!$.constructor||!$.constructor.name?h:$.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},ga}var va,Il;function D0(){if(Il)return va;Il=1;var e=pa();function t(){}function r(){}return r.resetWarningCache=t,va=function(){function n(i,a,c,l,d,f){if(f!==e){var h=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 h.name="Invariant Violation",h}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},va}var Ml;function k0(){if(Ml)return Cs.exports;if(Ml=1,process.env.NODE_ENV!=="production"){var e=Sl(),t=!0;Cs.exports=E0()(e.isElement,t)}else Cs.exports=D0()();return Cs.exports}var A0=k0();const ze=Xe(A0);function oo(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const T0=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"}));var Ds={exports:{}},ft={};/**
50
50
  * @license React
51
51
  * react-is.production.js
52
52
  *
@@ -54,7 +54,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Re(ce,pe,we,ie,ee+
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 Pl;function T0(){if(Pl)return ft;Pl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case r:case o:case n:case c:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case i:case a:case f:case d:return p;case s:return p;default:return b}}case t:return b}}}return ft.ContextConsumer=s,ft.ContextProvider=i,ft.Element=e,ft.ForwardRef=a,ft.Fragment=r,ft.Lazy=f,ft.Memo=d,ft.Portal=t,ft.Profiler=o,ft.StrictMode=n,ft.Suspense=c,ft.SuspenseList=u,ft.isContextConsumer=function(p){return m(p)===s},ft.isContextProvider=function(p){return m(p)===i},ft.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ft.isForwardRef=function(p){return m(p)===a},ft.isFragment=function(p){return m(p)===r},ft.isLazy=function(p){return m(p)===f},ft.isMemo=function(p){return m(p)===d},ft.isPortal=function(p){return m(p)===t},ft.isProfiler=function(p){return m(p)===o},ft.isStrictMode=function(p){return m(p)===n},ft.isSuspense=function(p){return m(p)===c},ft.isSuspenseList=function(p){return m(p)===u},ft.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===o||p===n||p===c||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===s||p.$$typeof===a||p.$$typeof===v||p.getModuleId!==void 0)},ft.typeOf=m,ft}var pt={};/**
57
+ */var Pl;function I0(){if(Pl)return ft;Pl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case r:case o:case n:case c:case l:case h:return p;default:switch(p=p&&p.$$typeof,p){case i:case a:case f:case d:return p;case s:return p;default:return b}}case t:return b}}}return ft.ContextConsumer=s,ft.ContextProvider=i,ft.Element=e,ft.ForwardRef=a,ft.Fragment=r,ft.Lazy=f,ft.Memo=d,ft.Portal=t,ft.Profiler=o,ft.StrictMode=n,ft.Suspense=c,ft.SuspenseList=l,ft.isContextConsumer=function(p){return m(p)===s},ft.isContextProvider=function(p){return m(p)===i},ft.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ft.isForwardRef=function(p){return m(p)===a},ft.isFragment=function(p){return m(p)===r},ft.isLazy=function(p){return m(p)===f},ft.isMemo=function(p){return m(p)===d},ft.isPortal=function(p){return m(p)===t},ft.isProfiler=function(p){return m(p)===o},ft.isStrictMode=function(p){return m(p)===n},ft.isSuspense=function(p){return m(p)===c},ft.isSuspenseList=function(p){return m(p)===l},ft.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===o||p===n||p===c||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===s||p.$$typeof===a||p.$$typeof===v||p.getModuleId!==void 0)},ft.typeOf=m,ft}var pt={};/**
58
58
  * @license React
59
59
  * react-is.development.js
60
60
  *
@@ -62,35 +62,35 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Re(ce,pe,we,ie,ee+
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 Ol;function I0(){return Ol||(Ol=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case n:case s:case o:case u:case d:case v:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case h:case f:return p;case i:return p;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");pt.ContextConsumer=i,pt.ContextProvider=a,pt.Element=t,pt.ForwardRef=c,pt.Fragment=n,pt.Lazy=h,pt.Memo=f,pt.Portal=r,pt.Profiler=s,pt.StrictMode=o,pt.Suspense=u,pt.SuspenseList=d,pt.isContextConsumer=function(p){return e(p)===i},pt.isContextProvider=function(p){return e(p)===a},pt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},pt.isForwardRef=function(p){return e(p)===c},pt.isFragment=function(p){return e(p)===n},pt.isLazy=function(p){return e(p)===h},pt.isMemo=function(p){return e(p)===f},pt.isPortal=function(p){return e(p)===r},pt.isProfiler=function(p){return e(p)===s},pt.isStrictMode=function(p){return e(p)===o},pt.isSuspense=function(p){return e(p)===u},pt.isSuspenseList=function(p){return e(p)===d},pt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===s||p===o||p===u||p===d||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===f||p.$$typeof===a||p.$$typeof===i||p.$$typeof===c||p.$$typeof===m||p.getModuleId!==void 0)},pt.typeOf=e})()),pt}var jl;function M0(){return jl||(jl=1,process.env.NODE_ENV==="production"?Ds.exports=T0():Ds.exports=I0()),Ds.exports}var Rl=M0();const P0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Nl(e){const t=`${e}`.match(P0);return t&&t[1]||""}function $l(e,t=""){return e.displayName||e.name||Nl(e)||t}function Ll(e,t,r){const n=$l(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function O0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return $l(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Rl.ForwardRef:return Ll(e,e.render,"ForwardRef");case Rl.Memo:return Ll(e,e.type,"memo");default:return}}}const j0=Object.freeze(Object.defineProperty({__proto__:null,default:O0,getFunctionName:Nl},Symbol.toStringTag,{value:"Module"}));function en(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":oo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const R0=Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"}));function N0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function $0(e,t=166){let r;function n(...o){const s=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(s,t)}return n.clear=()=>{clearTimeout(r)},n}function L0(e,t){return process.env.NODE_ENV==="production"?()=>null:(r,n,o,s,i)=>{const a=o||"<<anonymous>>",c=i||n;return typeof r[n]<"u"?new Error(`The ${s} \`${c}\` of \`${a}\` is deprecated. ${t}`):null}}function z0(e,t){var r,n;return K.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function zl(e){return e&&e.ownerDocument||document}function B0(e){return zl(e).defaultView||window}function F0(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?nt({},t.propTypes):null;return o=>(s,i,a,c,u,...d)=>{const f=u||i,h=r?.[f];if(h){const v=h(s,i,a,c,u,...d);if(v)return v}return typeof s[i]<"u"&&!s[o]?new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function Bl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Fl=typeof window<"u"?K.useLayoutEffect:K.useEffect;let Wl=0;function W0(e){const[t,r]=K.useState(e),n=e||t;return K.useEffect(()=>{t==null&&(Wl+=1,r(`mui-${Wl}`))},[t]),n}const Vl=K.useId;function V0(e){if(Vl!==void 0){const t=Vl();return e??t}return W0(e)}function U0(e,t,r,n,o){if(process.env.NODE_ENV==="production")return null;const s=o||t;return typeof e[t]<"u"?new Error(`The prop \`${s}\` is not supported. Please remove it.`):null}function H0({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=K.useRef(e!==void 0),[s,i]=K.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){K.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${n} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
66
- `))},[n,r,e]);const{current:u}=K.useRef(t);K.useEffect(()=>{!o&&!Object.is(u,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
67
- `))},[JSON.stringify(t)])}const c=K.useCallback(u=>{o||i(u)},[]);return[a,c]}function Y0(e){const t=K.useRef(e);return Fl(()=>{t.current=e}),K.useRef((...r)=>(0,t.current)(...r)).current}function q0(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Bl(r,t)})},e)}class ya{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new ya}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let ks=!0,ba=!1;const Z0=new ya,G0={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function K0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&G0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Q0(e){e.metaKey||e.altKey||e.ctrlKey||(ks=!0)}function xa(){ks=!1}function X0(){this.visibilityState==="hidden"&&ba&&(ks=!0)}function J0(e){e.addEventListener("keydown",Q0,!0),e.addEventListener("mousedown",xa,!0),e.addEventListener("pointerdown",xa,!0),e.addEventListener("touchstart",xa,!0),e.addEventListener("visibilitychange",X0,!0)}function em(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return ks||K0(t)}function tm(){const e=K.useCallback(o=>{o!=null&&J0(o.ownerDocument)},[]),t=K.useRef(!1);function r(){return t.current?(ba=!0,Z0.start(100,()=>{ba=!1}),t.current=!1,!0):!1}function n(o){return em(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function _a(e,t){const r=nt({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=nt({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},s=t[n];r[n]={},!s||!Object.keys(s)?r[n]=o:!o||!Object.keys(o)?r[n]=s:(r[n]=nt({},s),Object.keys(o).forEach(i=>{r[n][i]=_a(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function rm(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((s,i)=>{if(i){const a=t(i);a!==""&&s.push(a),r&&r[i]&&s.push(r[i])}return s},[]).join(" ")}),n}const Ul=e=>e,Hl=(()=>{let e=Ul;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ul}}})(),nm={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 wa(e,t,r="Mui"){const n=nm[t];return n?`${r}-${n}`:`${Hl.generate(e)}-${t}`}function om(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=wa(e,o,r)}),n}function sm(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const im=Object.freeze(Object.defineProperty({__proto__:null,default:sm},Symbol.toStringTag,{value:"Module"}));function tn(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Yl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ht(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Yl(e))&&(n&&(n+=" "),n+=t);return n}const am=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(ze.node,ze.object);function cm(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?_a(o.defaultProps,n):!o.styleOverrides&&!o.variants?_a(o,n):n}function lm({props:e,name:t}){const r=K.useContext(am);return cm({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(ze.node,ze.object.isRequired);function um(e){return lm(e)}var dn={},Sa={exports:{}},ql;function dm(){return ql||(ql=1,(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Sa)),Sa.exports}var Ca={exports:{}},Zl;function fm(){return Zl||(Zl=1,(function(e){function t(r,n){if(r==null)return{};var o={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(n.indexOf(s)!==-1)continue;o[s]=r[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ca)),Ca.exports}function pm(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function hm(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var mm=(function(){function e(r){var n=this;this._insertTag=function(o){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,s),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(hm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=pm(o);try{s.insertRule(n,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Kt="-ms-",As="-moz-",et="-webkit-",Gl="comm",Ea="rule",Da="decl",gm="@import",Kl="@keyframes",vm="@layer",ym=Math.abs,Ts=String.fromCharCode,bm=Object.assign;function xm(e,t){return qt(e,0)^45?(((t<<2^qt(e,0))<<2^qt(e,1))<<2^qt(e,2))<<2^qt(e,3):0}function Ql(e){return e.trim()}function _m(e,t){return(e=t.exec(e))?e[0]:e}function tt(e,t,r){return e.replace(t,r)}function ka(e,t){return e.indexOf(t)}function qt(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function jr(e){return e.length}function Aa(e){return e.length}function Is(e,t){return t.push(e),e}function wm(e,t){return e.map(t).join("")}var Ms=1,In=1,Xl=0,nr=0,zt=0,Mn="";function Ps(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Ms,column:In,length:i,return:""}}function io(e,t){return bm(Ps("",null,null,"",null,null,0),e,{length:-e.length},t)}function Sm(){return zt}function Cm(){return zt=nr>0?qt(Mn,--nr):0,In--,zt===10&&(In=1,Ms--),zt}function cr(){return zt=nr<Xl?qt(Mn,nr++):0,In++,zt===10&&(In=1,Ms++),zt}function Rr(){return qt(Mn,nr)}function Os(){return nr}function ao(e,t){return so(Mn,e,t)}function co(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 Jl(e){return Ms=In=1,Xl=jr(Mn=e),nr=0,[]}function eu(e){return Mn="",e}function js(e){return Ql(ao(nr-1,Ta(e===91?e+2:e===40?e+1:e)))}function Em(e){for(;(zt=Rr())&&zt<33;)cr();return co(e)>2||co(zt)>3?"":" "}function Dm(e,t){for(;--t&&cr()&&!(zt<48||zt>102||zt>57&&zt<65||zt>70&&zt<97););return ao(e,Os()+(t<6&&Rr()==32&&cr()==32))}function Ta(e){for(;cr();)switch(zt){case e:return nr;case 34:case 39:e!==34&&e!==39&&Ta(zt);break;case 40:e===41&&Ta(e);break;case 92:cr();break}return nr}function km(e,t){for(;cr()&&e+zt!==57;)if(e+zt===84&&Rr()===47)break;return"/*"+ao(t,nr-1)+"*"+Ts(e===47?e:cr())}function Am(e){for(;!co(Rr());)cr();return ao(e,nr)}function Tm(e){return eu(Rs("",null,null,null,[""],e=Jl(e),0,[0],e))}function Rs(e,t,r,n,o,s,i,a,c){for(var u=0,d=0,f=i,h=0,v=0,m=0,p=1,b=1,w=1,C=0,E="",S=o,_=s,W=n,D=E;b;)switch(m=C,C=cr()){case 40:if(m!=108&&qt(D,f-1)==58){ka(D+=tt(js(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=js(C);break;case 9:case 10:case 13:case 32:D+=Em(m);break;case 92:D+=Dm(Os()-1,7);continue;case 47:switch(Rr()){case 42:case 47:Is(Im(km(cr(),Os()),t,r),c);break;default:D+="/"}break;case 123*p:a[u++]=jr(D)*w;case 125*p:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+d:w==-1&&(D=tt(D,/\f/g,"")),v>0&&jr(D)-f&&Is(v>32?ru(D+";",n,r,f-1):ru(tt(D," ","")+";",n,r,f-2),c);break;case 59:D+=";";default:if(Is(W=tu(D,t,r,u,d,o,a,E,S=[],_=[],f),s),C===123)if(d===0)Rs(D,t,W,W,S,s,f,a,_);else switch(h===99&&qt(D,3)===110?100:h){case 100:case 108:case 109:case 115:Rs(e,W,W,n&&Is(tu(e,W,W,0,0,o,a,E,o,S=[],f),_),o,_,f,a,n?S:_);break;default:Rs(D,W,W,W,[""],_,0,a,_)}}u=d=v=0,p=w=1,E=D="",f=i;break;case 58:f=1+jr(D),v=m;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&Cm()==125)continue}switch(D+=Ts(C),C*p){case 38:w=d>0?1:(D+="\f",-1);break;case 44:a[u++]=(jr(D)-1)*w,w=1;break;case 64:Rr()===45&&(D+=js(cr())),h=Rr(),d=f=jr(E=D+=Am(Os())),C++;break;case 45:m===45&&jr(D)==2&&(p=0)}}return s}function tu(e,t,r,n,o,s,i,a,c,u,d){for(var f=o-1,h=o===0?s:[""],v=Aa(h),m=0,p=0,b=0;m<n;++m)for(var w=0,C=so(e,f+1,f=ym(p=i[m])),E=e;w<v;++w)(E=Ql(p>0?h[w]+" "+C:tt(C,/&\f/g,h[w])))&&(c[b++]=E);return Ps(e,t,r,o===0?Ea:a,c,u,d)}function Im(e,t,r){return Ps(e,t,r,Gl,Ts(Sm()),so(e,2,-2),0)}function ru(e,t,r,n){return Ps(e,t,r,Da,so(e,0,n),so(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=Aa(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Mm(e,t,r,n){switch(e.type){case vm:if(e.children.length)break;case gm:case Da:return e.return=e.return||e.value;case Gl:return"";case Kl:return e.return=e.value+"{"+Pn(e.children,n)+"}";case Ea:e.value=e.props.join(",")}return jr(r=Pn(e.children,n))?e.return=e.value+"{"+r+"}":""}function Pm(e){var t=Aa(e);return function(r,n,o,s){for(var i="",a=0;a<t;a++)i+=e[a](r,n,o,s)||"";return i}}function Om(e){return function(t){t.root||(t=t.return)&&e(t)}}function nu(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var jm=function(t,r,n){for(var o=0,s=0;o=s,s=Rr(),o===38&&s===12&&(r[n]=1),!co(s);)cr();return ao(t,nr)},Rm=function(t,r){var n=-1,o=44;do switch(co(o)){case 0:o===38&&Rr()===12&&(r[n]=1),t[n]+=jm(nr-1,r,n);break;case 2:t[n]+=js(o);break;case 4:if(o===44){t[++n]=Rr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Ts(o)}while(o=cr());return t},Nm=function(t,r){return eu(Rm(Jl(t),r))},ou=new WeakMap,$m=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!ou.get(n))&&!o){ou.set(t,!0);for(var s=[],i=Nm(r,s),a=n.props,c=0,u=0;c<i.length;c++)for(var d=0;d<a.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,a[d]):a[d]+" "+i[c]}}},Lm=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function su(e,t){switch(xm(e,t)){case 5103:return et+"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 et+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return et+e+As+e+Kt+e+e;case 6828:case 4268:return et+e+Kt+e+e;case 6165:return et+e+Kt+"flex-"+e+e;case 5187:return et+e+tt(e,/(\w+).+(:[^]+)/,et+"box-$1$2"+Kt+"flex-$1$2")+e;case 5443:return et+e+Kt+"flex-item-"+tt(e,/flex-|-self/,"")+e;case 4675:return et+e+Kt+"flex-line-pack"+tt(e,/align-content|flex-|-self/,"")+e;case 5548:return et+e+Kt+tt(e,"shrink","negative")+e;case 5292:return et+e+Kt+tt(e,"basis","preferred-size")+e;case 6060:return et+"box-"+tt(e,"-grow","")+et+e+Kt+tt(e,"grow","positive")+e;case 4554:return et+tt(e,/([^-])(transform)/g,"$1"+et+"$2")+e;case 6187:return tt(tt(tt(e,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),e,"")+e;case 5495:case 3959:return tt(e,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return tt(tt(e,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+Kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+e+e;case 4095:case 3583:case 4068:case 2532:return tt(e,/(.+)-inline(.+)/,et+"$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(jr(e)-1-t>6)switch(qt(e,t+1)){case 109:if(qt(e,t+4)!==45)break;case 102:return tt(e,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+As+(qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ka(e,"stretch")?su(tt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qt(e,t+1)!==115)break;case 6444:switch(qt(e,jr(e)-3-(~ka(e,"!important")&&10))){case 107:return tt(e,":",":"+et)+e;case 101:return tt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(qt(e,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(qt(e,t+11)){case 114:return et+e+Kt+tt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return et+e+Kt+tt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return et+e+Kt+tt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return et+e+Kt+e+e}return e}var zm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Da:t.return=su(t.value,t.length);break;case Kl:return Pn([io(t,{value:tt(t.value,"@","@"+et)})],o);case Ea:if(t.length)return wm(t.props,function(s){switch(_m(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([io(t,{props:[tt(s,/:(read-\w+)/,":"+As+"$1")]})],o);case"::placeholder":return Pn([io(t,{props:[tt(s,/:(plac\w+)/,":"+et+"input-$1")]}),io(t,{props:[tt(s,/:(plac\w+)/,":"+As+"$1")]}),io(t,{props:[tt(s,/:(plac\w+)/,Kt+"input-$1")]})],o)}return""})}},Bm=[zm],iu=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(p){var b=p.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||Bm,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var b=p.getAttribute("data-emotion").split(" "),w=1;w<b.length;w++)s[b[w]]=!0;a.push(p)});var c,u=[$m,Lm];{var d,f=[Mm,Om(function(p){d.insert(p)})],h=Pm(u.concat(o,f)),v=function(b){return Pn(Tm(b),h)};c=function(b,w,C,E){d=C,v(b?b+"{"+w.styles+"}":w.styles),E&&(m.inserted[w.name]=!0)}}var m={key:r,sheet:new mm({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(a),m},Ns={exports:{}},it={};/** @license React v16.13.1
65
+ */var Ol;function M0(){return Ol||(Ol=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case n:case s:case o:case l:case d:case v:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case h:case f:return p;case i:return p;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");pt.ContextConsumer=i,pt.ContextProvider=a,pt.Element=t,pt.ForwardRef=c,pt.Fragment=n,pt.Lazy=h,pt.Memo=f,pt.Portal=r,pt.Profiler=s,pt.StrictMode=o,pt.Suspense=l,pt.SuspenseList=d,pt.isContextConsumer=function(p){return e(p)===i},pt.isContextProvider=function(p){return e(p)===a},pt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},pt.isForwardRef=function(p){return e(p)===c},pt.isFragment=function(p){return e(p)===n},pt.isLazy=function(p){return e(p)===h},pt.isMemo=function(p){return e(p)===f},pt.isPortal=function(p){return e(p)===r},pt.isProfiler=function(p){return e(p)===s},pt.isStrictMode=function(p){return e(p)===o},pt.isSuspense=function(p){return e(p)===l},pt.isSuspenseList=function(p){return e(p)===d},pt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===s||p===o||p===l||p===d||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===f||p.$$typeof===a||p.$$typeof===i||p.$$typeof===c||p.$$typeof===m||p.getModuleId!==void 0)},pt.typeOf=e})()),pt}var jl;function P0(){return jl||(jl=1,process.env.NODE_ENV==="production"?Ds.exports=I0():Ds.exports=M0()),Ds.exports}var Rl=P0();const O0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Nl(e){const t=`${e}`.match(O0);return t&&t[1]||""}function $l(e,t=""){return e.displayName||e.name||Nl(e)||t}function Ll(e,t,r){const n=$l(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function j0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return $l(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Rl.ForwardRef:return Ll(e,e.render,"ForwardRef");case Rl.Memo:return Ll(e,e.type,"memo");default:return}}}const R0=Object.freeze(Object.defineProperty({__proto__:null,default:j0,getFunctionName:Nl},Symbol.toStringTag,{value:"Module"}));function en(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":oo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const N0=Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"}));function $0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function L0(e,t=166){let r;function n(...o){const s=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(s,t)}return n.clear=()=>{clearTimeout(r)},n}function z0(e,t){return process.env.NODE_ENV==="production"?()=>null:(r,n,o,s,i)=>{const a=o||"<<anonymous>>",c=i||n;return typeof r[n]<"u"?new Error(`The ${s} \`${c}\` of \`${a}\` is deprecated. ${t}`):null}}function B0(e,t){var r,n;return K.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function zl(e){return e&&e.ownerDocument||document}function F0(e){return zl(e).defaultView||window}function W0(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?nt({},t.propTypes):null;return o=>(s,i,a,c,l,...d)=>{const f=l||i,h=r?.[f];if(h){const v=h(s,i,a,c,l,...d);if(v)return v}return typeof s[i]<"u"&&!s[o]?new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function Bl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Fl=typeof window<"u"?K.useLayoutEffect:K.useEffect;let Wl=0;function V0(e){const[t,r]=K.useState(e),n=e||t;return K.useEffect(()=>{t==null&&(Wl+=1,r(`mui-${Wl}`))},[t]),n}const Vl=K.useId;function H0(e){if(Vl!==void 0){const t=Vl();return e??t}return V0(e)}function U0(e,t,r,n,o){if(process.env.NODE_ENV==="production")return null;const s=o||t;return typeof e[t]<"u"?new Error(`The prop \`${s}\` is not supported. Please remove it.`):null}function Y0({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=K.useRef(e!==void 0),[s,i]=K.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){K.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${n} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
66
+ `))},[n,r,e]);const{current:l}=K.useRef(t);K.useEffect(()=>{!o&&!Object.is(l,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
67
+ `))},[JSON.stringify(t)])}const c=K.useCallback(l=>{o||i(l)},[]);return[a,c]}function q0(e){const t=K.useRef(e);return Fl(()=>{t.current=e}),K.useRef((...r)=>(0,t.current)(...r)).current}function Z0(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Bl(r,t)})},e)}class ya{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new ya}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let ks=!0,ba=!1;const G0=new ya,K0={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Q0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&K0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function X0(e){e.metaKey||e.altKey||e.ctrlKey||(ks=!0)}function xa(){ks=!1}function J0(){this.visibilityState==="hidden"&&ba&&(ks=!0)}function em(e){e.addEventListener("keydown",X0,!0),e.addEventListener("mousedown",xa,!0),e.addEventListener("pointerdown",xa,!0),e.addEventListener("touchstart",xa,!0),e.addEventListener("visibilitychange",J0,!0)}function tm(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return ks||Q0(t)}function rm(){const e=K.useCallback(o=>{o!=null&&em(o.ownerDocument)},[]),t=K.useRef(!1);function r(){return t.current?(ba=!0,G0.start(100,()=>{ba=!1}),t.current=!1,!0):!1}function n(o){return tm(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function _a(e,t){const r=nt({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=nt({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},s=t[n];r[n]={},!s||!Object.keys(s)?r[n]=o:!o||!Object.keys(o)?r[n]=s:(r[n]=nt({},s),Object.keys(o).forEach(i=>{r[n][i]=_a(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function nm(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((s,i)=>{if(i){const a=t(i);a!==""&&s.push(a),r&&r[i]&&s.push(r[i])}return s},[]).join(" ")}),n}const Hl=e=>e,Ul=(()=>{let e=Hl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Hl}}})(),om={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 wa(e,t,r="Mui"){const n=om[t];return n?`${r}-${n}`:`${Ul.generate(e)}-${t}`}function sm(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=wa(e,o,r)}),n}function im(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const am=Object.freeze(Object.defineProperty({__proto__:null,default:im},Symbol.toStringTag,{value:"Module"}));function tn(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Yl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ut(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Yl(e))&&(n&&(n+=" "),n+=t);return n}const cm=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(ze.node,ze.object);function lm(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?_a(o.defaultProps,n):!o.styleOverrides&&!o.variants?_a(o,n):n}function um({props:e,name:t}){const r=K.useContext(cm);return lm({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(ze.node,ze.object.isRequired);function dm(e){return um(e)}var dn={},Sa={exports:{}},ql;function fm(){return ql||(ql=1,(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Sa)),Sa.exports}var Ca={exports:{}},Zl;function pm(){return Zl||(Zl=1,(function(e){function t(r,n){if(r==null)return{};var o={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(n.indexOf(s)!==-1)continue;o[s]=r[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ca)),Ca.exports}function hm(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function mm(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var gm=(function(){function e(r){var n=this;this._insertTag=function(o){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,s),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(mm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=hm(o);try{s.insertRule(n,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Kt="-ms-",As="-moz-",et="-webkit-",Gl="comm",Ea="rule",Da="decl",vm="@import",Kl="@keyframes",ym="@layer",bm=Math.abs,Ts=String.fromCharCode,xm=Object.assign;function _m(e,t){return qt(e,0)^45?(((t<<2^qt(e,0))<<2^qt(e,1))<<2^qt(e,2))<<2^qt(e,3):0}function Ql(e){return e.trim()}function wm(e,t){return(e=t.exec(e))?e[0]:e}function tt(e,t,r){return e.replace(t,r)}function ka(e,t){return e.indexOf(t)}function qt(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function jr(e){return e.length}function Aa(e){return e.length}function Is(e,t){return t.push(e),e}function Sm(e,t){return e.map(t).join("")}var Ms=1,In=1,Xl=0,nr=0,zt=0,Mn="";function Ps(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Ms,column:In,length:i,return:""}}function io(e,t){return xm(Ps("",null,null,"",null,null,0),e,{length:-e.length},t)}function Cm(){return zt}function Em(){return zt=nr>0?qt(Mn,--nr):0,In--,zt===10&&(In=1,Ms--),zt}function cr(){return zt=nr<Xl?qt(Mn,nr++):0,In++,zt===10&&(In=1,Ms++),zt}function Rr(){return qt(Mn,nr)}function Os(){return nr}function ao(e,t){return so(Mn,e,t)}function co(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 Jl(e){return Ms=In=1,Xl=jr(Mn=e),nr=0,[]}function eu(e){return Mn="",e}function js(e){return Ql(ao(nr-1,Ta(e===91?e+2:e===40?e+1:e)))}function Dm(e){for(;(zt=Rr())&&zt<33;)cr();return co(e)>2||co(zt)>3?"":" "}function km(e,t){for(;--t&&cr()&&!(zt<48||zt>102||zt>57&&zt<65||zt>70&&zt<97););return ao(e,Os()+(t<6&&Rr()==32&&cr()==32))}function Ta(e){for(;cr();)switch(zt){case e:return nr;case 34:case 39:e!==34&&e!==39&&Ta(zt);break;case 40:e===41&&Ta(e);break;case 92:cr();break}return nr}function Am(e,t){for(;cr()&&e+zt!==57;)if(e+zt===84&&Rr()===47)break;return"/*"+ao(t,nr-1)+"*"+Ts(e===47?e:cr())}function Tm(e){for(;!co(Rr());)cr();return ao(e,nr)}function Im(e){return eu(Rs("",null,null,null,[""],e=Jl(e),0,[0],e))}function Rs(e,t,r,n,o,s,i,a,c){for(var l=0,d=0,f=i,h=0,v=0,m=0,p=1,b=1,w=1,C=0,E="",S=o,_=s,W=n,D=E;b;)switch(m=C,C=cr()){case 40:if(m!=108&&qt(D,f-1)==58){ka(D+=tt(js(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=js(C);break;case 9:case 10:case 13:case 32:D+=Dm(m);break;case 92:D+=km(Os()-1,7);continue;case 47:switch(Rr()){case 42:case 47:Is(Mm(Am(cr(),Os()),t,r),c);break;default:D+="/"}break;case 123*p:a[l++]=jr(D)*w;case 125*p:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+d:w==-1&&(D=tt(D,/\f/g,"")),v>0&&jr(D)-f&&Is(v>32?ru(D+";",n,r,f-1):ru(tt(D," ","")+";",n,r,f-2),c);break;case 59:D+=";";default:if(Is(W=tu(D,t,r,l,d,o,a,E,S=[],_=[],f),s),C===123)if(d===0)Rs(D,t,W,W,S,s,f,a,_);else switch(h===99&&qt(D,3)===110?100:h){case 100:case 108:case 109:case 115:Rs(e,W,W,n&&Is(tu(e,W,W,0,0,o,a,E,o,S=[],f),_),o,_,f,a,n?S:_);break;default:Rs(D,W,W,W,[""],_,0,a,_)}}l=d=v=0,p=w=1,E=D="",f=i;break;case 58:f=1+jr(D),v=m;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&Em()==125)continue}switch(D+=Ts(C),C*p){case 38:w=d>0?1:(D+="\f",-1);break;case 44:a[l++]=(jr(D)-1)*w,w=1;break;case 64:Rr()===45&&(D+=js(cr())),h=Rr(),d=f=jr(E=D+=Tm(Os())),C++;break;case 45:m===45&&jr(D)==2&&(p=0)}}return s}function tu(e,t,r,n,o,s,i,a,c,l,d){for(var f=o-1,h=o===0?s:[""],v=Aa(h),m=0,p=0,b=0;m<n;++m)for(var w=0,C=so(e,f+1,f=bm(p=i[m])),E=e;w<v;++w)(E=Ql(p>0?h[w]+" "+C:tt(C,/&\f/g,h[w])))&&(c[b++]=E);return Ps(e,t,r,o===0?Ea:a,c,l,d)}function Mm(e,t,r){return Ps(e,t,r,Gl,Ts(Cm()),so(e,2,-2),0)}function ru(e,t,r,n){return Ps(e,t,r,Da,so(e,0,n),so(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=Aa(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Pm(e,t,r,n){switch(e.type){case ym:if(e.children.length)break;case vm:case Da:return e.return=e.return||e.value;case Gl:return"";case Kl:return e.return=e.value+"{"+Pn(e.children,n)+"}";case Ea:e.value=e.props.join(",")}return jr(r=Pn(e.children,n))?e.return=e.value+"{"+r+"}":""}function Om(e){var t=Aa(e);return function(r,n,o,s){for(var i="",a=0;a<t;a++)i+=e[a](r,n,o,s)||"";return i}}function jm(e){return function(t){t.root||(t=t.return)&&e(t)}}function nu(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Rm=function(t,r,n){for(var o=0,s=0;o=s,s=Rr(),o===38&&s===12&&(r[n]=1),!co(s);)cr();return ao(t,nr)},Nm=function(t,r){var n=-1,o=44;do switch(co(o)){case 0:o===38&&Rr()===12&&(r[n]=1),t[n]+=Rm(nr-1,r,n);break;case 2:t[n]+=js(o);break;case 4:if(o===44){t[++n]=Rr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Ts(o)}while(o=cr());return t},$m=function(t,r){return eu(Nm(Jl(t),r))},ou=new WeakMap,Lm=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!ou.get(n))&&!o){ou.set(t,!0);for(var s=[],i=$m(r,s),a=n.props,c=0,l=0;c<i.length;c++)for(var d=0;d<a.length;d++,l++)t.props[l]=s[c]?i[c].replace(/&\f/g,a[d]):a[d]+" "+i[c]}}},zm=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function su(e,t){switch(_m(e,t)){case 5103:return et+"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 et+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return et+e+As+e+Kt+e+e;case 6828:case 4268:return et+e+Kt+e+e;case 6165:return et+e+Kt+"flex-"+e+e;case 5187:return et+e+tt(e,/(\w+).+(:[^]+)/,et+"box-$1$2"+Kt+"flex-$1$2")+e;case 5443:return et+e+Kt+"flex-item-"+tt(e,/flex-|-self/,"")+e;case 4675:return et+e+Kt+"flex-line-pack"+tt(e,/align-content|flex-|-self/,"")+e;case 5548:return et+e+Kt+tt(e,"shrink","negative")+e;case 5292:return et+e+Kt+tt(e,"basis","preferred-size")+e;case 6060:return et+"box-"+tt(e,"-grow","")+et+e+Kt+tt(e,"grow","positive")+e;case 4554:return et+tt(e,/([^-])(transform)/g,"$1"+et+"$2")+e;case 6187:return tt(tt(tt(e,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),e,"")+e;case 5495:case 3959:return tt(e,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return tt(tt(e,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+Kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+e+e;case 4095:case 3583:case 4068:case 2532:return tt(e,/(.+)-inline(.+)/,et+"$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(jr(e)-1-t>6)switch(qt(e,t+1)){case 109:if(qt(e,t+4)!==45)break;case 102:return tt(e,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+As+(qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ka(e,"stretch")?su(tt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qt(e,t+1)!==115)break;case 6444:switch(qt(e,jr(e)-3-(~ka(e,"!important")&&10))){case 107:return tt(e,":",":"+et)+e;case 101:return tt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(qt(e,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(qt(e,t+11)){case 114:return et+e+Kt+tt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return et+e+Kt+tt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return et+e+Kt+tt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return et+e+Kt+e+e}return e}var Bm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Da:t.return=su(t.value,t.length);break;case Kl:return Pn([io(t,{value:tt(t.value,"@","@"+et)})],o);case Ea:if(t.length)return Sm(t.props,function(s){switch(wm(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([io(t,{props:[tt(s,/:(read-\w+)/,":"+As+"$1")]})],o);case"::placeholder":return Pn([io(t,{props:[tt(s,/:(plac\w+)/,":"+et+"input-$1")]}),io(t,{props:[tt(s,/:(plac\w+)/,":"+As+"$1")]}),io(t,{props:[tt(s,/:(plac\w+)/,Kt+"input-$1")]})],o)}return""})}},Fm=[Bm],iu=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(p){var b=p.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||Fm,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var b=p.getAttribute("data-emotion").split(" "),w=1;w<b.length;w++)s[b[w]]=!0;a.push(p)});var c,l=[Lm,zm];{var d,f=[Pm,jm(function(p){d.insert(p)})],h=Om(l.concat(o,f)),v=function(b){return Pn(Im(b),h)};c=function(b,w,C,E){d=C,v(b?b+"{"+w.styles+"}":w.styles),E&&(m.inserted[w.name]=!0)}}var m={key:r,sheet:new gm({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(a),m},Ns={exports:{}},it={};/** @license React v16.13.1
68
68
  * react-is.production.min.js
69
69
  *
70
70
  * Copyright (c) Facebook, Inc. and its affiliates.
71
71
  *
72
72
  * This source code is licensed under the MIT license found in the
73
73
  * LICENSE file in the root directory of this source tree.
74
- */var au;function Fm(){if(au)return it;au=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(_){if(typeof _=="object"&&_!==null){var W=_.$$typeof;switch(W){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case m:case v:case i:return _;default:return W}}case r:return W}}}function S(_){return E(_)===u}return it.AsyncMode=c,it.ConcurrentMode=u,it.ContextConsumer=a,it.ContextProvider=i,it.Element=t,it.ForwardRef=d,it.Fragment=n,it.Lazy=m,it.Memo=v,it.Portal=r,it.Profiler=s,it.StrictMode=o,it.Suspense=f,it.isAsyncMode=function(_){return S(_)||E(_)===c},it.isConcurrentMode=S,it.isContextConsumer=function(_){return E(_)===a},it.isContextProvider=function(_){return E(_)===i},it.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},it.isForwardRef=function(_){return E(_)===d},it.isFragment=function(_){return E(_)===n},it.isLazy=function(_){return E(_)===m},it.isMemo=function(_){return E(_)===v},it.isPortal=function(_){return E(_)===r},it.isProfiler=function(_){return E(_)===s},it.isStrictMode=function(_){return E(_)===o},it.isSuspense=function(_){return E(_)===f},it.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===C||_.$$typeof===p)},it.typeOf=E,it}var at={};/** @license React v16.13.1
74
+ */var au;function Wm(){if(au)return it;au=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(_){if(typeof _=="object"&&_!==null){var W=_.$$typeof;switch(W){case t:switch(_=_.type,_){case c:case l:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case m:case v:case i:return _;default:return W}}case r:return W}}}function S(_){return E(_)===l}return it.AsyncMode=c,it.ConcurrentMode=l,it.ContextConsumer=a,it.ContextProvider=i,it.Element=t,it.ForwardRef=d,it.Fragment=n,it.Lazy=m,it.Memo=v,it.Portal=r,it.Profiler=s,it.StrictMode=o,it.Suspense=f,it.isAsyncMode=function(_){return S(_)||E(_)===c},it.isConcurrentMode=S,it.isContextConsumer=function(_){return E(_)===a},it.isContextProvider=function(_){return E(_)===i},it.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},it.isForwardRef=function(_){return E(_)===d},it.isFragment=function(_){return E(_)===n},it.isLazy=function(_){return E(_)===m},it.isMemo=function(_){return E(_)===v},it.isPortal=function(_){return E(_)===r},it.isProfiler=function(_){return E(_)===s},it.isStrictMode=function(_){return E(_)===o},it.isSuspense=function(_){return E(_)===f},it.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===l||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===v||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===C||_.$$typeof===p)},it.typeOf=E,it}var at={};/** @license React v16.13.1
75
75
  * react-is.development.js
76
76
  *
77
77
  * Copyright (c) Facebook, Inc. and its affiliates.
78
78
  *
79
79
  * This source code is licensed under the MIT license found in the
80
80
  * LICENSE file in the root directory of this source tree.
81
- */var cu;function Wm(){return cu||(cu=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(j){return typeof j=="string"||typeof j=="function"||j===n||j===u||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===C||j.$$typeof===p)}function S(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var qe=j.type;switch(qe){case c:case u:case n:case s:case o:case f:return qe;default:var Ze=qe&&qe.$$typeof;switch(Ze){case a:case d:case m:case v:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=u,D=a,A=i,M=t,I=d,H=n,G=m,F=v,Y=r,oe=s,V=o,N=f,ae=!1;function fe(j){return ae||(ae=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(j)||S(j)===c}function $(j){return S(j)===u}function Q(j){return S(j)===a}function Ce(j){return S(j)===i}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function we(j){return S(j)===d}function ie(j){return S(j)===n}function ee(j){return S(j)===m}function ce(j){return S(j)===v}function ge(j){return S(j)===r}function de(j){return S(j)===s}function pe(j){return S(j)===o}function Re(j){return S(j)===f}at.AsyncMode=_,at.ConcurrentMode=W,at.ContextConsumer=D,at.ContextProvider=A,at.Element=M,at.ForwardRef=I,at.Fragment=H,at.Lazy=G,at.Memo=F,at.Portal=Y,at.Profiler=oe,at.StrictMode=V,at.Suspense=N,at.isAsyncMode=fe,at.isConcurrentMode=$,at.isContextConsumer=Q,at.isContextProvider=Ce,at.isElement=me,at.isForwardRef=we,at.isFragment=ie,at.isLazy=ee,at.isMemo=ce,at.isPortal=ge,at.isProfiler=de,at.isStrictMode=pe,at.isSuspense=Re,at.isValidElementType=E,at.typeOf=S})()),at}var lu;function Vm(){return lu||(lu=1,process.env.NODE_ENV==="production"?Ns.exports=Fm():Ns.exports=Wm()),Ns.exports}var Ia,uu;function Um(){if(uu)return Ia;uu=1;var e=Vm(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=n,s[e.Memo]=o;function i(m){return e.isMemo(m)?o:s[m.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function v(m,p,b){if(typeof p!="string"){if(h){var w=f(p);w&&w!==h&&v(m,w,b)}var C=c(p);u&&(C=C.concat(u(p)));for(var E=i(m),S=i(p),_=0;_<C.length;++_){var W=C[_];if(!r[W]&&!(b&&b[W])&&!(S&&S[W])&&!(E&&E[W])){var D=d(p,W);try{a(m,W,D)}catch{}}}}return m}return Ia=v,Ia}Um();var Hm=!0;function du(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Ma=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Hm===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Pa=function(t,r,n){Ma(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function Ym(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var qm={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},Zm=/[A-Z]|^ms/g,Gm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fu=function(t){return t.charCodeAt(1)===45},pu=function(t){return t!=null&&typeof t!="boolean"},Oa=nu(function(e){return fu(e)?e:e.replace(Zm,"-$&").toLowerCase()}),hu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Gm,function(n,o,s){return Nr={name:o,styles:s,next:Nr},o})}return qm[t]!==1&&!fu(t)&&typeof r=="number"&&r!==0?r+"px":r};function lo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Nr={name:o.name,styles:o.styles,next:Nr},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Nr={name:i.name,styles:i.styles,next:Nr},i=i.next;var a=s.styles+";";return a}return Km(e,t,r)}case"function":{if(e!==void 0){var c=Nr,u=r(e);return Nr=c,lo(e,t,u)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Km(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=lo(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":pu(a)&&(n+=Oa(s)+":"+hu(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)pu(i[c])&&(n+=Oa(s)+":"+hu(s,i[c])+";");else{var u=lo(e,t,i);switch(s){case"animation":case"animationName":{n+=Oa(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var mu=/label:\s*([^\s;{]+)\s*(;|$)/g,Nr;function uo(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Nr=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=lo(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=lo(r,t,e[a]),n){var c=s;o+=c[a]}mu.lastIndex=0;for(var u="",d;(d=mu.exec(o))!==null;)u+="-"+d[1];var f=Ym(o)+u;return{name:f,styles:o,next:Nr}}var Qm=function(t){return t()},gu=K.useInsertionEffect?K.useInsertionEffect:!1,vu=gu||Qm,yu=gu||K.useLayoutEffect,bu=K.createContext(typeof HTMLElement<"u"?iu({key:"css"}):null),Xm=bu.Provider,ja=function(t){return y.forwardRef(function(r,n){var o=y.useContext(bu);return t(r,o,n)})},$s=K.createContext({}),Ra={}.hasOwnProperty,Na="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Jm=function(t,r){var n={};for(var o in r)Ra.call(r,o)&&(n[o]=r[o]);return n[Na]=t,n},eg=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ma(r,n,o),vu(function(){return Pa(r,n,o)}),null},tg=ja(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Na],s=[n],i="";typeof e.className=="string"?i=du(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=uo(s,void 0,K.useContext($s));i+=t.key+"-"+a.name;var c={};for(var u in e)Ra.call(e,u)&&u!=="css"&&u!==Na&&(c[u]=e[u]);return c.className=i,r&&(c.ref=r),K.createElement(K.Fragment,null,K.createElement(eg,{cache:t,serialized:a,isStringTag:typeof o=="string"}),K.createElement(o,c))}),rg=tg,xu=function(t,r){var n=arguments;if(r==null||!Ra.call(r,"css"))return K.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=rg,s[1]=Jm(t,r);for(var i=2;i<o;i++)s[i]=n[i];return K.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(xu||(xu={}));var ng=ja(function(e,t){var r=e.styles,n=uo([r],void 0,K.useContext($s)),o=K.useRef();return yu(function(){var s=t.key+"-global",i=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,c=document.querySelector('style[data-emotion="'+s+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),c!==null&&(a=!0,c.setAttribute("data-emotion",s),i.hydrate([c])),o.current=[i,a],function(){i.flush()}},[t]),yu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Pa(t,n.next,!0),i.tags.length){var c=i.tags[i.tags.length-1].nextElementSibling;i.before=c,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function _u(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return uo(t)}function og(){var e=_u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var sg=/^((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)-.*))$/,ig=nu(function(e){return sg.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ag=ig,cg=function(t){return t!=="theme"},wu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ag:cg},Su=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},lg=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ma(r,n,o),vu(function(){return Pa(r,n,o)}),null},ug=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var a=Su(t,r,n),c=a||wu(o),u=!c("as");return function(){var d=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var h=d[0];f.push(h[0]);for(var v=d.length,m=1;m<v;m++)f.push(d[m],h[m])}var p=ja(function(b,w,C){var E=u&&b.as||o,S="",_=[],W=b;if(b.theme==null){W={};for(var D in b)W[D]=b[D];W.theme=K.useContext($s)}typeof b.className=="string"?S=du(w.registered,_,b.className):b.className!=null&&(S=b.className+" ");var A=uo(f.concat(_),w.registered,W);S+=w.key+"-"+A.name,i!==void 0&&(S+=" "+i);var M=u&&a===void 0?wu(E):c,I={};for(var H in b)u&&H==="as"||M(H)&&(I[H]=b[H]);return I.className=S,C&&(I.ref=C),K.createElement(K.Fragment,null,K.createElement(lg,{cache:w,serialized:A,isStringTag:typeof E=="string"}),K.createElement(E,I))});return p.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=f,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+i}}),p.withComponent=function(b,w){var C=e(b,nt({},r,w,{shouldForwardProp:Su(p,w,!0)}));return C.apply(void 0,f)},p}},dg=["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"],$a=ug.bind(null);dg.forEach(function(e){$a[e]=$a(e)});function fg(e,t){const r=iu({key:"css",prepend:e});if(t){const n=r.insert;r.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),n(...o))}return r}const La=new Map;function Cu(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=K.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&La.has(s))return La.get(s);const i=fg(t,r);return La.set(s,i),i},[t,r]);return t||r?l.jsx(Xm,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(Cu.propTypes={children:ze.node,enableCssLayer:ze.bool,injectFirst:ze.bool});function pg(e){return e==null||Object.keys(e).length===0}function Eu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(pg(o)?r:o):t;return l.jsx(ng,{styles:n})}process.env.NODE_ENV!=="production"&&(Eu.propTypes={defaultTheme:ze.object,styles:ze.oneOfType([ze.array,ze.string,ze.object,ze.func])});/**
81
+ */var cu;function Vm(){return cu||(cu=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(j){return typeof j=="string"||typeof j=="function"||j===n||j===l||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===C||j.$$typeof===p)}function S(j){if(typeof j=="object"&&j!==null){var We=j.$$typeof;switch(We){case t:var qe=j.type;switch(qe){case c:case l:case n:case s:case o:case f:return qe;default:var Ze=qe&&qe.$$typeof;switch(Ze){case a:case d:case m:case v:case i:return Ze;default:return We}}case r:return We}}}var _=c,W=l,D=a,A=i,M=t,I=d,U=n,G=m,F=v,Y=r,oe=s,V=o,N=f,ce=!1;function fe(j){return ce||(ce=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(j)||S(j)===c}function $(j){return S(j)===l}function Q(j){return S(j)===a}function Ce(j){return S(j)===i}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function we(j){return S(j)===d}function ae(j){return S(j)===n}function ee(j){return S(j)===m}function le(j){return S(j)===v}function ge(j){return S(j)===r}function ie(j){return S(j)===s}function pe(j){return S(j)===o}function Re(j){return S(j)===f}at.AsyncMode=_,at.ConcurrentMode=W,at.ContextConsumer=D,at.ContextProvider=A,at.Element=M,at.ForwardRef=I,at.Fragment=U,at.Lazy=G,at.Memo=F,at.Portal=Y,at.Profiler=oe,at.StrictMode=V,at.Suspense=N,at.isAsyncMode=fe,at.isConcurrentMode=$,at.isContextConsumer=Q,at.isContextProvider=Ce,at.isElement=me,at.isForwardRef=we,at.isFragment=ae,at.isLazy=ee,at.isMemo=le,at.isPortal=ge,at.isProfiler=ie,at.isStrictMode=pe,at.isSuspense=Re,at.isValidElementType=E,at.typeOf=S})()),at}var lu;function Hm(){return lu||(lu=1,process.env.NODE_ENV==="production"?Ns.exports=Wm():Ns.exports=Vm()),Ns.exports}var Ia,uu;function Um(){if(uu)return Ia;uu=1;var e=Hm(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=n,s[e.Memo]=o;function i(m){return e.isMemo(m)?o:s[m.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function v(m,p,b){if(typeof p!="string"){if(h){var w=f(p);w&&w!==h&&v(m,w,b)}var C=c(p);l&&(C=C.concat(l(p)));for(var E=i(m),S=i(p),_=0;_<C.length;++_){var W=C[_];if(!r[W]&&!(b&&b[W])&&!(S&&S[W])&&!(E&&E[W])){var D=d(p,W);try{a(m,W,D)}catch{}}}}return m}return Ia=v,Ia}Um();var Ym=!0;function du(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Ma=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Ym===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Pa=function(t,r,n){Ma(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function qm(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Zm={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},Gm=/[A-Z]|^ms/g,Km=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fu=function(t){return t.charCodeAt(1)===45},pu=function(t){return t!=null&&typeof t!="boolean"},Oa=nu(function(e){return fu(e)?e:e.replace(Gm,"-$&").toLowerCase()}),hu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Km,function(n,o,s){return Nr={name:o,styles:s,next:Nr},o})}return Zm[t]!==1&&!fu(t)&&typeof r=="number"&&r!==0?r+"px":r};function lo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Nr={name:o.name,styles:o.styles,next:Nr},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Nr={name:i.name,styles:i.styles,next:Nr},i=i.next;var a=s.styles+";";return a}return Qm(e,t,r)}case"function":{if(e!==void 0){var c=Nr,l=r(e);return Nr=c,lo(e,t,l)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Qm(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=lo(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":pu(a)&&(n+=Oa(s)+":"+hu(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)pu(i[c])&&(n+=Oa(s)+":"+hu(s,i[c])+";");else{var l=lo(e,t,i);switch(s){case"animation":case"animationName":{n+=Oa(s)+":"+l+";";break}default:n+=s+"{"+l+"}"}}}return n}var mu=/label:\s*([^\s;{]+)\s*(;|$)/g,Nr;function uo(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Nr=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=lo(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=lo(r,t,e[a]),n){var c=s;o+=c[a]}mu.lastIndex=0;for(var l="",d;(d=mu.exec(o))!==null;)l+="-"+d[1];var f=qm(o)+l;return{name:f,styles:o,next:Nr}}var Xm=function(t){return t()},gu=K.useInsertionEffect?K.useInsertionEffect:!1,vu=gu||Xm,yu=gu||K.useLayoutEffect,bu=K.createContext(typeof HTMLElement<"u"?iu({key:"css"}):null),Jm=bu.Provider,ja=function(t){return y.forwardRef(function(r,n){var o=y.useContext(bu);return t(r,o,n)})},$s=K.createContext({}),Ra={}.hasOwnProperty,Na="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eg=function(t,r){var n={};for(var o in r)Ra.call(r,o)&&(n[o]=r[o]);return n[Na]=t,n},tg=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ma(r,n,o),vu(function(){return Pa(r,n,o)}),null},rg=ja(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Na],s=[n],i="";typeof e.className=="string"?i=du(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=uo(s,void 0,K.useContext($s));i+=t.key+"-"+a.name;var c={};for(var l in e)Ra.call(e,l)&&l!=="css"&&l!==Na&&(c[l]=e[l]);return c.className=i,r&&(c.ref=r),K.createElement(K.Fragment,null,K.createElement(tg,{cache:t,serialized:a,isStringTag:typeof o=="string"}),K.createElement(o,c))}),ng=rg,xu=function(t,r){var n=arguments;if(r==null||!Ra.call(r,"css"))return K.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=ng,s[1]=eg(t,r);for(var i=2;i<o;i++)s[i]=n[i];return K.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(xu||(xu={}));var og=ja(function(e,t){var r=e.styles,n=uo([r],void 0,K.useContext($s)),o=K.useRef();return yu(function(){var s=t.key+"-global",i=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,c=document.querySelector('style[data-emotion="'+s+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),c!==null&&(a=!0,c.setAttribute("data-emotion",s),i.hydrate([c])),o.current=[i,a],function(){i.flush()}},[t]),yu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Pa(t,n.next,!0),i.tags.length){var c=i.tags[i.tags.length-1].nextElementSibling;i.before=c,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function _u(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return uo(t)}function sg(){var e=_u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var ig=/^((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)-.*))$/,ag=nu(function(e){return ig.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),cg=ag,lg=function(t){return t!=="theme"},wu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?cg:lg},Su=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},ug=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ma(r,n,o),vu(function(){return Pa(r,n,o)}),null},dg=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var a=Su(t,r,n),c=a||wu(o),l=!c("as");return function(){var d=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var h=d[0];f.push(h[0]);for(var v=d.length,m=1;m<v;m++)f.push(d[m],h[m])}var p=ja(function(b,w,C){var E=l&&b.as||o,S="",_=[],W=b;if(b.theme==null){W={};for(var D in b)W[D]=b[D];W.theme=K.useContext($s)}typeof b.className=="string"?S=du(w.registered,_,b.className):b.className!=null&&(S=b.className+" ");var A=uo(f.concat(_),w.registered,W);S+=w.key+"-"+A.name,i!==void 0&&(S+=" "+i);var M=l&&a===void 0?wu(E):c,I={};for(var U in b)l&&U==="as"||M(U)&&(I[U]=b[U]);return I.className=S,C&&(I.ref=C),K.createElement(K.Fragment,null,K.createElement(ug,{cache:w,serialized:A,isStringTag:typeof E=="string"}),K.createElement(E,I))});return p.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=f,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+i}}),p.withComponent=function(b,w){var C=e(b,nt({},r,w,{shouldForwardProp:Su(p,w,!0)}));return C.apply(void 0,f)},p}},fg=["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"],$a=dg.bind(null);fg.forEach(function(e){$a[e]=$a(e)});function pg(e,t){const r=iu({key:"css",prepend:e});if(t){const n=r.insert;r.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),n(...o))}return r}const La=new Map;function Cu(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=K.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&La.has(s))return La.get(s);const i=pg(t,r);return La.set(s,i),i},[t,r]);return t||r?u.jsx(Jm,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(Cu.propTypes={children:ze.node,enableCssLayer:ze.bool,injectFirst:ze.bool});function hg(e){return e==null||Object.keys(e).length===0}function Eu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(hg(o)?r:o):t;return u.jsx(og,{styles:n})}process.env.NODE_ENV!=="production"&&(Eu.propTypes={defaultTheme:ze.object,styles:ze.oneOfType([ze.array,ze.string,ze.object,ze.func])});/**
82
82
  * @mui/styled-engine v5.18.0
83
83
  *
84
84
  * @license MIT
85
85
  * This source code is licensed under the MIT license found in the
86
86
  * LICENSE file in the root directory of this source tree.
87
- */function hg(e,t){const r=$a(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.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(`
88
- `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}const mg=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Du=[];function gg(e){return Du[0]=e,uo(Du)}const vg=Yr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Eu,StyledEngineProvider:Cu,ThemeContext:$s,css:_u,default:hg,internal_processStyles:mg,internal_serializeStyles:gg,keyframes:og},Symbol.toStringTag,{value:"Module"}))),yg=Yr(b0),bg=Yr(R0),xg=Yr(j0),_g=["values","unit","step"],wg=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>nt({},r,{[n.key]:n.val}),{})};function ku(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=tn(e,_g),s=wg(t),i=Object.keys(s);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function u(h,v){const m=i.indexOf(v);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(m!==-1&&typeof t[i[m]]=="number"?t[i[m]]:v)-n/100}${r})`}function d(h){return i.indexOf(h)+1<i.length?u(h,i[i.indexOf(h)+1]):a(h)}function f(h){const v=i.indexOf(h);return v===0?a(i[1]):v===i.length-1?c(i[v]):u(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return nt({keys:i,values:s,up:a,down:c,between:u,only:d,not:f,unit:r},o)}const Sg={borderRadius:4},rn=process.env.NODE_ENV!=="production"?ze.oneOfType([ze.number,ze.string,ze.object,ze.array]):{};function fo(e,t){return t?Or(e,t,{clone:!1}):e}const za={xs:0,sm:600,md:900,lg:1200,xl:1536},Au={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${za[e]}px)`};function qr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Au;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Au;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||za).indexOf(a)!==-1){const c=s.up(a);i[c]=r(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return r(t)}function Cg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Tu(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Ls(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function zs(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ls(e,r)||n,t&&(o=t(o,n,e)),o}function jt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,u=Ls(c,n)||{};return qr(i,a,f=>{let h=zs(u,o,f);return f===h&&typeof f=="string"&&(h=zs(u,o,`${t}${f==="default"?"":en(f)}`,f)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:rn}:{},s.filterProps=[t],s}function Eg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Dg={m:"margin",p:"padding"},kg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Iu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ag=Eg(e=>{if(e.length>2)if(Iu[e])e=Iu[e];else return[e];const[t,r]=e.split(""),n=Dg[t],o=kg[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Bs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Fs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Tg=[...Bs,...Fs];function po(e,t,r,n){var o;const s=(o=Ls(e,t,!1))!=null?o:r;return typeof s=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),s*i):Array.isArray(s)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
87
+ */function mg(e,t){const r=$a(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.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(`
88
+ `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}const gg=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Du=[];function vg(e){return Du[0]=e,uo(Du)}const yg=Yr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Eu,StyledEngineProvider:Cu,ThemeContext:$s,css:_u,default:mg,internal_processStyles:gg,internal_serializeStyles:vg,keyframes:sg},Symbol.toStringTag,{value:"Module"}))),bg=Yr(x0),xg=Yr(N0),_g=Yr(R0),wg=["values","unit","step"],Sg=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>nt({},r,{[n.key]:n.val}),{})};function ku(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=tn(e,wg),s=Sg(t),i=Object.keys(s);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function l(h,v){const m=i.indexOf(v);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(m!==-1&&typeof t[i[m]]=="number"?t[i[m]]:v)-n/100}${r})`}function d(h){return i.indexOf(h)+1<i.length?l(h,i[i.indexOf(h)+1]):a(h)}function f(h){const v=i.indexOf(h);return v===0?a(i[1]):v===i.length-1?c(i[v]):l(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return nt({keys:i,values:s,up:a,down:c,between:l,only:d,not:f,unit:r},o)}const Cg={borderRadius:4},rn=process.env.NODE_ENV!=="production"?ze.oneOfType([ze.number,ze.string,ze.object,ze.array]):{};function fo(e,t){return t?Or(e,t,{clone:!1}):e}const za={xs:0,sm:600,md:900,lg:1200,xl:1536},Au={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${za[e]}px)`};function qr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Au;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Au;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||za).indexOf(a)!==-1){const c=s.up(a);i[c]=r(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return r(t)}function Eg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Tu(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Ls(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function zs(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ls(e,r)||n,t&&(o=t(o,n,e)),o}function jt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,l=Ls(c,n)||{};return qr(i,a,f=>{let h=zs(l,o,f);return f===h&&typeof f=="string"&&(h=zs(l,o,`${t}${f==="default"?"":en(f)}`,f)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:rn}:{},s.filterProps=[t],s}function Dg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const kg={m:"margin",p:"padding"},Ag={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Iu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Tg=Dg(e=>{if(e.length>2)if(Iu[e])e=Iu[e];else return[e];const[t,r]=e.split(""),n=kg[t],o=Ag[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Bs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Fs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ig=[...Bs,...Fs];function po(e,t,r,n){var o;const s=(o=Ls(e,t,!1))!=null?o:r;return typeof s=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),s*i):Array.isArray(s)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
89
89
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
90
90
  `))),s[i]):typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
91
- `)),()=>{})}function Mu(e){return po(e,"spacing",8,"spacing")}function ho(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function Ig(e,t){return r=>e.reduce((n,o)=>(n[o]=ho(t,r),n),{})}function Mg(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=Ag(r),s=Ig(o,n),i=e[r];return qr(e,i,s)}function Pu(e,t){const r=Mu(e.theme);return Object.keys(e).map(n=>Mg(e,t,n,r)).reduce(fo,{})}function Tt(e){return Pu(e,Bs)}Tt.propTypes=process.env.NODE_ENV!=="production"?Bs.reduce((e,t)=>(e[t]=rn,e),{}):{},Tt.filterProps=Bs;function It(e){return Pu(e,Fs)}It.propTypes=process.env.NODE_ENV!=="production"?Fs.reduce((e,t)=>(e[t]=rn,e),{}):{},It.filterProps=Fs,process.env.NODE_ENV!=="production"&&Tg.reduce((e,t)=>(e[t]=rn,e),{});function Pg(e=8){if(e.mui)return e;const t=Mu({spacing:e}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function Ws(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?fo(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function mr(e){return typeof e!="number"?e:`${e}px solid`}function gr(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const Og=gr("border",mr),jg=gr("borderTop",mr),Rg=gr("borderRight",mr),Ng=gr("borderBottom",mr),$g=gr("borderLeft",mr),Lg=gr("borderColor"),zg=gr("borderTopColor"),Bg=gr("borderRightColor"),Fg=gr("borderBottomColor"),Wg=gr("borderLeftColor"),Vg=gr("outline",mr),Ug=gr("outlineColor"),Vs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=po(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ho(t,n)});return qr(e,e.borderRadius,r)}return null};Vs.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:rn}:{},Vs.filterProps=["borderRadius"],Ws(Og,jg,Rg,Ng,$g,Lg,zg,Bg,Fg,Wg,Vs,Vg,Ug);const Us=e=>{if(e.gap!==void 0&&e.gap!==null){const t=po(e.theme,"spacing",8,"gap"),r=n=>({gap:ho(t,n)});return qr(e,e.gap,r)}return null};Us.propTypes=process.env.NODE_ENV!=="production"?{gap:rn}:{},Us.filterProps=["gap"];const Hs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=po(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ho(t,n)});return qr(e,e.columnGap,r)}return null};Hs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:rn}:{},Hs.filterProps=["columnGap"];const Ys=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=po(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ho(t,n)});return qr(e,e.rowGap,r)}return null};Ys.propTypes=process.env.NODE_ENV!=="production"?{rowGap:rn}:{},Ys.filterProps=["rowGap"];const Hg=jt({prop:"gridColumn"}),Yg=jt({prop:"gridRow"}),qg=jt({prop:"gridAutoFlow"}),Zg=jt({prop:"gridAutoColumns"}),Gg=jt({prop:"gridAutoRows"}),Kg=jt({prop:"gridTemplateColumns"}),Qg=jt({prop:"gridTemplateRows"}),Xg=jt({prop:"gridTemplateAreas"}),Jg=jt({prop:"gridArea"});Ws(Us,Hs,Ys,Hg,Yg,qg,Zg,Gg,Kg,Qg,Xg,Jg);function On(e,t){return t==="grey"?t:e}const ev=jt({prop:"color",themeKey:"palette",transform:On}),tv=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),rv=jt({prop:"backgroundColor",themeKey:"palette",transform:On});Ws(ev,tv,rv);function lr(e){return e<=1&&e!==0?`${e*100}%`:e}const nv=jt({prop:"width",transform:lr}),Ba=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const s=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||za[r];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:lr(r)}};return qr(e,e.maxWidth,t)}return null};Ba.filterProps=["maxWidth"];const ov=jt({prop:"minWidth",transform:lr}),sv=jt({prop:"height",transform:lr}),iv=jt({prop:"maxHeight",transform:lr}),av=jt({prop:"minHeight",transform:lr});jt({prop:"size",cssProperty:"width",transform:lr}),jt({prop:"size",cssProperty:"height",transform:lr});const cv=jt({prop:"boxSizing"});Ws(nv,Ba,ov,sv,iv,av,cv);const mo={border:{themeKey:"borders",transform:mr},borderTop:{themeKey:"borders",transform:mr},borderRight:{themeKey:"borders",transform:mr},borderBottom:{themeKey:"borders",transform:mr},borderLeft:{themeKey:"borders",transform:mr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Vs},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:It},pt:{style:It},pr:{style:It},pb:{style:It},pl:{style:It},px:{style:It},py:{style:It},padding:{style:It},paddingTop:{style:It},paddingRight:{style:It},paddingBottom:{style:It},paddingLeft:{style:It},paddingX:{style:It},paddingY:{style:It},paddingInline:{style:It},paddingInlineStart:{style:It},paddingInlineEnd:{style:It},paddingBlock:{style:It},paddingBlockStart:{style:It},paddingBlockEnd:{style:It},m:{style:Tt},mt:{style:Tt},mr:{style:Tt},mb:{style:Tt},ml:{style:Tt},mx:{style:Tt},my:{style:Tt},margin:{style:Tt},marginTop:{style:Tt},marginRight:{style:Tt},marginBottom:{style:Tt},marginLeft:{style:Tt},marginX:{style:Tt},marginY:{style:Tt},marginInline:{style:Tt},marginInlineStart:{style:Tt},marginInlineEnd:{style:Tt},marginBlock:{style:Tt},marginBlockStart:{style:Tt},marginBlockEnd:{style:Tt},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:Us},rowGap:{style:Ys},columnGap:{style:Hs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:lr},maxWidth:{style:Ba},minWidth:{transform:lr},height:{transform:lr},maxHeight:{transform:lr},minHeight:{transform:lr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function lv(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function uv(e,t){return typeof e=="function"?e(t):e}function Ou(){function e(r,n,o,s){const i={[r]:n,theme:o},a=s[r];if(!a)return{[r]:n};const{cssProperty:c=r,themeKey:u,transform:d,style:f}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const h=Ls(o,u)||{};return f?f(i):qr(i,n,m=>{let p=zs(h,d,m);return m===p&&typeof m=="string"&&(p=zs(h,d,`${r}${m==="default"?"":en(m)}`,m)),c===!1?p:{[c]:p}})}function t(r){var n;const{sx:o,theme:s={},nested:i}=r||{};if(!o)return null;const a=(n=s.unstable_sxConfig)!=null?n:mo;function c(u){let d=u;if(typeof u=="function")d=u(s);else if(typeof u!="object")return u;if(!d)return null;const f=Cg(s.breakpoints),h=Object.keys(f);let v=f;return Object.keys(d).forEach(m=>{const p=uv(d[m],s);if(p!=null)if(typeof p=="object")if(a[m])v=fo(v,e(m,p,s,a));else{const b=qr({theme:s},p,w=>({[m]:w}));lv(b,p)?v[m]=t({sx:p,theme:s,nested:!0}):v=fo(v,b)}else v=fo(v,e(m,p,s,a))}),!i&&s.modularCssLayers?{"@layer sx":Tu(h,v)}:Tu(h,v)}return Array.isArray(o)?o.map(c):c(o)}return t}const qs=Ou();qs.filterProps=["sx"];function ju(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const dv=["breakpoints","palette","spacing","shape"];function Ru(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=tn(e,dv),a=ku(r),c=Pg(o);let u=Or({breakpoints:a,direction:"ltr",components:{},palette:nt({mode:"light"},n),spacing:c,shape:nt({},Sg,s)},i);return u.applyStyles=ju,u=t.reduce((d,f)=>Or(d,f),u),u.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return qs({sx:f,theme:this})},u}const fv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Ru,private_createBreakpoints:ku,unstable_applyStyles:ju},Symbol.toStringTag,{value:"Module"}))),pv=["sx"],hv=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:mo;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function mv(e){const{sx:t}=e,r=tn(e,pv),{systemProps:n,otherProps:o}=hv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return Jr(a)?nt({},n,a):n}:s=nt({},n,t),nt({},o,{sx:s})}const gv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:qs,extendSxProp:mv,unstable_createStyleFunctionSx:Ou,unstable_defaultSxConfig:mo},Symbol.toStringTag,{value:"Module"})));var Nu;function vv(){if(Nu)return dn;Nu=1;var e=Je();Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=D,dn.shouldForwardProp=b,dn.systemDefaultTheme=void 0;var t=e(dm()),r=e(fm()),n=v(vg),o=yg,s=e(bg),i=e(xg),a=e(fv),c=e(gv);const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(A){if(typeof WeakMap!="function")return null;var M=new WeakMap,I=new WeakMap;return(h=function(H){return H?I:M})(A)}function v(A,M){if(A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var I=h(M);if(I&&I.has(A))return I.get(A);var H={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in A)if(F!=="default"&&Object.prototype.hasOwnProperty.call(A,F)){var Y=G?Object.getOwnPropertyDescriptor(A,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(H,F,Y):H[F]=A[F]}return H.default=A,I&&I.set(A,H),H}function m(A){return Object.keys(A).length===0}function p(A){return typeof A=="string"&&A.charCodeAt(0)>96}function b(A){return A!=="ownerState"&&A!=="theme"&&A!=="sx"&&A!=="as"}function w(A,M){return M&&A&&typeof A=="object"&&A.styles&&!A.styles.startsWith("@layer")&&(A.styles=`@layer ${M}{${String(A.styles)}}`),A}const C=dn.systemDefaultTheme=(0,a.default)(),E=A=>A&&A.charAt(0).toLowerCase()+A.slice(1);function S({defaultTheme:A,theme:M,themeId:I}){return m(M)?A:M[I]||M}function _(A){return A?(M,I)=>I[A]:null}function W(A,M,I){let{ownerState:H}=M,G=(0,r.default)(M,u);const F=typeof A=="function"?A((0,t.default)({ownerState:H},G)):A;if(Array.isArray(F))return F.flatMap(Y=>W(Y,(0,t.default)({ownerState:H},G),I));if(F&&typeof F=="object"&&Array.isArray(F.variants)){const{variants:Y=[]}=F;let V=(0,r.default)(F,d);return Y.forEach(N=>{let ae=!0;if(typeof N.props=="function"?ae=N.props((0,t.default)({ownerState:H},G,H)):Object.keys(N.props).forEach(fe=>{H?.[fe]!==N.props[fe]&&G[fe]!==N.props[fe]&&(ae=!1)}),ae){Array.isArray(V)||(V=[V]);const fe=typeof N.style=="function"?N.style((0,t.default)({ownerState:H},G,H)):N.style;V.push(I?w((0,n.internal_serializeStyles)(fe),I):fe)}}),V}return I?w((0,n.internal_serializeStyles)(F),I):F}function D(A={}){const{themeId:M,defaultTheme:I=C,rootShouldForwardProp:H=b,slotShouldForwardProp:G=b}=A,F=Y=>(0,c.default)((0,t.default)({},Y,{theme:S((0,t.default)({},Y,{defaultTheme:I,themeId:M}))}));return F.__mui_systemSx=!0,(Y,oe={})=>{(0,n.internal_processStyles)(Y,pe=>pe.filter(Re=>!(Re!=null&&Re.__mui_systemSx)));const{name:V,slot:N,skipVariantsResolver:ae,skipSx:fe,overridesResolver:$=_(E(N))}=oe,Q=(0,r.default)(oe,f),Ce=V&&V.startsWith("Mui")||N?"components":"custom",me=ae!==void 0?ae:N&&N!=="Root"&&N!=="root"||!1,we=fe||!1;let ie;process.env.NODE_ENV!=="production"&&V&&(ie=`${V}-${E(N||"Root")}`);let ee=b;N==="Root"||N==="root"?ee=H:N?ee=G:p(Y)&&(ee=void 0);const ce=(0,n.default)(Y,(0,t.default)({shouldForwardProp:ee,label:ie},Q)),ge=pe=>typeof pe=="function"&&pe.__emotion_real!==pe||(0,o.isPlainObject)(pe)?Re=>{const j=S({theme:Re.theme,defaultTheme:I,themeId:M});return W(pe,(0,t.default)({},Re,{theme:j}),j.modularCssLayers?Ce:void 0)}:pe,de=(pe,...Re)=>{let j=ge(pe);const Fe=Re?Re.map(ge):[];V&&$&&Fe.push(Ne=>{const Be=S((0,t.default)({},Ne,{defaultTheme:I,themeId:M}));if(!Be.components||!Be.components[V]||!Be.components[V].styleOverrides)return null;const vt=Be.components[V].styleOverrides,ht={};return Object.entries(vt).forEach(([k,P])=>{ht[k]=W(P,(0,t.default)({},Ne,{theme:Be}),Be.modularCssLayers?"theme":void 0)}),$(Ne,ht)}),V&&!me&&Fe.push(Ne=>{var Be;const vt=S((0,t.default)({},Ne,{defaultTheme:I,themeId:M})),ht=vt==null||(Be=vt.components)==null||(Be=Be[V])==null?void 0:Be.variants;return W({variants:ht},(0,t.default)({},Ne,{theme:vt}),vt.modularCssLayers?"theme":void 0)}),we||Fe.push(F);const qe=Fe.length-Re.length;if(Array.isArray(pe)&&qe>0){const Ne=new Array(qe).fill("");j=[...pe,...Ne],j.raw=[...pe.raw,...Ne]}const Ze=ce(j,...Fe);if(process.env.NODE_ENV!=="production"){let Ne;V&&(Ne=`${V}${(0,s.default)(N||"")}`),Ne===void 0&&(Ne=`Styled(${(0,i.default)(Y)})`),Ze.displayName=Ne}return Y.muiName&&(Ze.muiName=Y.muiName),Ze};return ce.withConfig&&(de.withConfig=ce.withConfig),de}}return dn}var yv=vv();const bv=Xe(yv);function xv(e,t){return nt({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Ct={};const _v=Yr(A0),wv=Yr(im);var $u;function Sv(){if($u)return Ct;$u=1;var e=Je();Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.alpha=m,Ct.blend=W,Ct.colorChannel=void 0,Ct.darken=b,Ct.decomposeColor=i,Ct.emphasize=S,Ct.getContrastRatio=v,Ct.getLuminance=h,Ct.hexToRgb=o,Ct.hslToRgb=f,Ct.lighten=C,Ct.private_safeAlpha=p,Ct.private_safeColorChannel=void 0,Ct.private_safeDarken=w,Ct.private_safeEmphasize=_,Ct.private_safeLighten=E,Ct.recomposeColor=u,Ct.rgbToHex=d;var t=e(_v),r=e(wv);function n(D,A=0,M=1){return process.env.NODE_ENV!=="production"&&(D<A||D>M)&&console.error(`MUI: The value provided ${D} is out of range [${A}, ${M}].`),(0,r.default)(D,A,M)}function o(D){D=D.slice(1);const A=new RegExp(`.{1,${D.length>=6?2:1}}`,"g");let M=D.match(A);return M&&M[0].length===1&&(M=M.map(I=>I+I)),M?`rgb${M.length===4?"a":""}(${M.map((I,H)=>H<3?parseInt(I,16):Math.round(parseInt(I,16)/255*1e3)/1e3).join(", ")})`:""}function s(D){const A=D.toString(16);return A.length===1?`0${A}`:A}function i(D){if(D.type)return D;if(D.charAt(0)==="#")return i(o(D));const A=D.indexOf("("),M=D.substring(0,A);if(["rgb","rgba","hsl","hsla","color"].indexOf(M)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${D}\` color.
92
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,t.default)(9,D));let I=D.substring(A+1,D.length-1),H;if(M==="color"){if(I=I.split(" "),H=I.shift(),I.length===4&&I[3].charAt(0)==="/"&&(I[3]=I[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(H)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${H}\` color space.
93
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,t.default)(10,H))}else I=I.split(",");return I=I.map(G=>parseFloat(G)),{type:M,values:I,colorSpace:H}}const a=D=>{const A=i(D);return A.values.slice(0,3).map((M,I)=>A.type.indexOf("hsl")!==-1&&I!==0?`${M}%`:M).join(" ")};Ct.colorChannel=a;const c=(D,A)=>{try{return a(D)}catch{return A&&process.env.NODE_ENV!=="production"&&console.warn(A),D}};Ct.private_safeColorChannel=c;function u(D){const{type:A,colorSpace:M}=D;let{values:I}=D;return A.indexOf("rgb")!==-1?I=I.map((H,G)=>G<3?parseInt(H,10):H):A.indexOf("hsl")!==-1&&(I[1]=`${I[1]}%`,I[2]=`${I[2]}%`),A.indexOf("color")!==-1?I=`${M} ${I.join(" ")}`:I=`${I.join(", ")}`,`${A}(${I})`}function d(D){if(D.indexOf("#")===0)return D;const{values:A}=i(D);return`#${A.map((M,I)=>s(I===3?Math.round(255*M):M)).join("")}`}function f(D){D=i(D);const{values:A}=D,M=A[0],I=A[1]/100,H=A[2]/100,G=I*Math.min(H,1-H),F=(V,N=(V+M/30)%12)=>H-G*Math.max(Math.min(N-3,9-N,1),-1);let Y="rgb";const oe=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return D.type==="hsla"&&(Y+="a",oe.push(A[3])),u({type:Y,values:oe})}function h(D){D=i(D);let A=D.type==="hsl"||D.type==="hsla"?i(f(D)).values:D.values;return A=A.map(M=>(D.type!=="color"&&(M/=255),M<=.03928?M/12.92:((M+.055)/1.055)**2.4)),Number((.2126*A[0]+.7152*A[1]+.0722*A[2]).toFixed(3))}function v(D,A){const M=h(D),I=h(A);return(Math.max(M,I)+.05)/(Math.min(M,I)+.05)}function m(D,A){return D=i(D),A=n(A),(D.type==="rgb"||D.type==="hsl")&&(D.type+="a"),D.type==="color"?D.values[3]=`/${A}`:D.values[3]=A,u(D)}function p(D,A,M){try{return m(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function b(D,A){if(D=i(D),A=n(A),D.type.indexOf("hsl")!==-1)D.values[2]*=1-A;else if(D.type.indexOf("rgb")!==-1||D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]*=1-A;return u(D)}function w(D,A,M){try{return b(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function C(D,A){if(D=i(D),A=n(A),D.type.indexOf("hsl")!==-1)D.values[2]+=(100-D.values[2])*A;else if(D.type.indexOf("rgb")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(255-D.values[M])*A;else if(D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(1-D.values[M])*A;return u(D)}function E(D,A,M){try{return C(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function S(D,A=.15){return h(D)>.5?b(D,A):C(D,A)}function _(D,A,M){try{return S(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function W(D,A,M,I=1){const H=(oe,V)=>Math.round((oe**(1/I)*(1-M)+V**(1/I)*M)**I),G=i(D),F=i(A),Y=[H(G.values[0],F.values[0]),H(G.values[1],F.values[1]),H(G.values[2],F.values[2])];return u({type:"rgb",values:Y})}return Ct}var Zs=Sv();const go={black:"#000",white:"#fff"},Cv={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"},jn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Rn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},vo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Nn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},$n={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ln={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Ev=["mode","contrastThreshold","tonalOffset"],Lu={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:go.white,default:go.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}},Fa={text:{primary:go.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:go.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function zu(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Zs.lighten(e.main,o):t==="dark"&&(e.dark=Zs.darken(e.main,s)))}function Dv(e="light"){return e==="dark"?{main:Nn[200],light:Nn[50],dark:Nn[400]}:{main:Nn[700],light:Nn[400],dark:Nn[800]}}function kv(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function Av(e="light"){return e==="dark"?{main:Rn[500],light:Rn[300],dark:Rn[700]}:{main:Rn[700],light:Rn[400],dark:Rn[800]}}function Tv(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:$n[700],light:$n[500],dark:$n[900]}}function Iv(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[800],light:Ln[500],dark:Ln[900]}}function Mv(e="light"){return e==="dark"?{main:vo[400],light:vo[300],dark:vo[700]}:{main:"#ed6c02",light:vo[500],dark:vo[900]}}function Pv(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=tn(e,Ev),s=e.primary||Dv(t),i=e.secondary||kv(t),a=e.error||Av(t),c=e.info||Tv(t),u=e.success||Iv(t),d=e.warning||Mv(t);function f(p){const b=Zs.getContrastRatio(p,Fa.text.primary)>=r?Fa.text.primary:Lu.text.primary;if(process.env.NODE_ENV!=="production"){const w=Zs.getContrastRatio(p,b);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${b} on ${p}`,"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(`
91
+ `)),()=>{})}function Mu(e){return po(e,"spacing",8,"spacing")}function ho(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function Mg(e,t){return r=>e.reduce((n,o)=>(n[o]=ho(t,r),n),{})}function Pg(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=Tg(r),s=Mg(o,n),i=e[r];return qr(e,i,s)}function Pu(e,t){const r=Mu(e.theme);return Object.keys(e).map(n=>Pg(e,t,n,r)).reduce(fo,{})}function Tt(e){return Pu(e,Bs)}Tt.propTypes=process.env.NODE_ENV!=="production"?Bs.reduce((e,t)=>(e[t]=rn,e),{}):{},Tt.filterProps=Bs;function It(e){return Pu(e,Fs)}It.propTypes=process.env.NODE_ENV!=="production"?Fs.reduce((e,t)=>(e[t]=rn,e),{}):{},It.filterProps=Fs,process.env.NODE_ENV!=="production"&&Ig.reduce((e,t)=>(e[t]=rn,e),{});function Og(e=8){if(e.mui)return e;const t=Mu({spacing:e}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function Ws(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?fo(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function mr(e){return typeof e!="number"?e:`${e}px solid`}function gr(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const jg=gr("border",mr),Rg=gr("borderTop",mr),Ng=gr("borderRight",mr),$g=gr("borderBottom",mr),Lg=gr("borderLeft",mr),zg=gr("borderColor"),Bg=gr("borderTopColor"),Fg=gr("borderRightColor"),Wg=gr("borderBottomColor"),Vg=gr("borderLeftColor"),Hg=gr("outline",mr),Ug=gr("outlineColor"),Vs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=po(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ho(t,n)});return qr(e,e.borderRadius,r)}return null};Vs.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:rn}:{},Vs.filterProps=["borderRadius"],Ws(jg,Rg,Ng,$g,Lg,zg,Bg,Fg,Wg,Vg,Vs,Hg,Ug);const Hs=e=>{if(e.gap!==void 0&&e.gap!==null){const t=po(e.theme,"spacing",8,"gap"),r=n=>({gap:ho(t,n)});return qr(e,e.gap,r)}return null};Hs.propTypes=process.env.NODE_ENV!=="production"?{gap:rn}:{},Hs.filterProps=["gap"];const Us=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=po(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ho(t,n)});return qr(e,e.columnGap,r)}return null};Us.propTypes=process.env.NODE_ENV!=="production"?{columnGap:rn}:{},Us.filterProps=["columnGap"];const Ys=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=po(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ho(t,n)});return qr(e,e.rowGap,r)}return null};Ys.propTypes=process.env.NODE_ENV!=="production"?{rowGap:rn}:{},Ys.filterProps=["rowGap"];const Yg=jt({prop:"gridColumn"}),qg=jt({prop:"gridRow"}),Zg=jt({prop:"gridAutoFlow"}),Gg=jt({prop:"gridAutoColumns"}),Kg=jt({prop:"gridAutoRows"}),Qg=jt({prop:"gridTemplateColumns"}),Xg=jt({prop:"gridTemplateRows"}),Jg=jt({prop:"gridTemplateAreas"}),ev=jt({prop:"gridArea"});Ws(Hs,Us,Ys,Yg,qg,Zg,Gg,Kg,Qg,Xg,Jg,ev);function On(e,t){return t==="grey"?t:e}const tv=jt({prop:"color",themeKey:"palette",transform:On}),rv=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),nv=jt({prop:"backgroundColor",themeKey:"palette",transform:On});Ws(tv,rv,nv);function lr(e){return e<=1&&e!==0?`${e*100}%`:e}const ov=jt({prop:"width",transform:lr}),Ba=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const s=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||za[r];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:lr(r)}};return qr(e,e.maxWidth,t)}return null};Ba.filterProps=["maxWidth"];const sv=jt({prop:"minWidth",transform:lr}),iv=jt({prop:"height",transform:lr}),av=jt({prop:"maxHeight",transform:lr}),cv=jt({prop:"minHeight",transform:lr});jt({prop:"size",cssProperty:"width",transform:lr}),jt({prop:"size",cssProperty:"height",transform:lr});const lv=jt({prop:"boxSizing"});Ws(ov,Ba,sv,iv,av,cv,lv);const mo={border:{themeKey:"borders",transform:mr},borderTop:{themeKey:"borders",transform:mr},borderRight:{themeKey:"borders",transform:mr},borderBottom:{themeKey:"borders",transform:mr},borderLeft:{themeKey:"borders",transform:mr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Vs},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:It},pt:{style:It},pr:{style:It},pb:{style:It},pl:{style:It},px:{style:It},py:{style:It},padding:{style:It},paddingTop:{style:It},paddingRight:{style:It},paddingBottom:{style:It},paddingLeft:{style:It},paddingX:{style:It},paddingY:{style:It},paddingInline:{style:It},paddingInlineStart:{style:It},paddingInlineEnd:{style:It},paddingBlock:{style:It},paddingBlockStart:{style:It},paddingBlockEnd:{style:It},m:{style:Tt},mt:{style:Tt},mr:{style:Tt},mb:{style:Tt},ml:{style:Tt},mx:{style:Tt},my:{style:Tt},margin:{style:Tt},marginTop:{style:Tt},marginRight:{style:Tt},marginBottom:{style:Tt},marginLeft:{style:Tt},marginX:{style:Tt},marginY:{style:Tt},marginInline:{style:Tt},marginInlineStart:{style:Tt},marginInlineEnd:{style:Tt},marginBlock:{style:Tt},marginBlockStart:{style:Tt},marginBlockEnd:{style:Tt},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:Hs},rowGap:{style:Ys},columnGap:{style:Us},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:lr},maxWidth:{style:Ba},minWidth:{transform:lr},height:{transform:lr},maxHeight:{transform:lr},minHeight:{transform:lr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function uv(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function dv(e,t){return typeof e=="function"?e(t):e}function Ou(){function e(r,n,o,s){const i={[r]:n,theme:o},a=s[r];if(!a)return{[r]:n};const{cssProperty:c=r,themeKey:l,transform:d,style:f}=a;if(n==null)return null;if(l==="typography"&&n==="inherit")return{[r]:n};const h=Ls(o,l)||{};return f?f(i):qr(i,n,m=>{let p=zs(h,d,m);return m===p&&typeof m=="string"&&(p=zs(h,d,`${r}${m==="default"?"":en(m)}`,m)),c===!1?p:{[c]:p}})}function t(r){var n;const{sx:o,theme:s={},nested:i}=r||{};if(!o)return null;const a=(n=s.unstable_sxConfig)!=null?n:mo;function c(l){let d=l;if(typeof l=="function")d=l(s);else if(typeof l!="object")return l;if(!d)return null;const f=Eg(s.breakpoints),h=Object.keys(f);let v=f;return Object.keys(d).forEach(m=>{const p=dv(d[m],s);if(p!=null)if(typeof p=="object")if(a[m])v=fo(v,e(m,p,s,a));else{const b=qr({theme:s},p,w=>({[m]:w}));uv(b,p)?v[m]=t({sx:p,theme:s,nested:!0}):v=fo(v,b)}else v=fo(v,e(m,p,s,a))}),!i&&s.modularCssLayers?{"@layer sx":Tu(h,v)}:Tu(h,v)}return Array.isArray(o)?o.map(c):c(o)}return t}const qs=Ou();qs.filterProps=["sx"];function ju(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const fv=["breakpoints","palette","spacing","shape"];function Ru(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=tn(e,fv),a=ku(r),c=Og(o);let l=Or({breakpoints:a,direction:"ltr",components:{},palette:nt({mode:"light"},n),spacing:c,shape:nt({},Cg,s)},i);return l.applyStyles=ju,l=t.reduce((d,f)=>Or(d,f),l),l.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),l.unstable_sx=function(f){return qs({sx:f,theme:this})},l}const pv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Ru,private_createBreakpoints:ku,unstable_applyStyles:ju},Symbol.toStringTag,{value:"Module"}))),hv=["sx"],mv=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:mo;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function gv(e){const{sx:t}=e,r=tn(e,hv),{systemProps:n,otherProps:o}=mv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return Jr(a)?nt({},n,a):n}:s=nt({},n,t),nt({},o,{sx:s})}const vv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:qs,extendSxProp:gv,unstable_createStyleFunctionSx:Ou,unstable_defaultSxConfig:mo},Symbol.toStringTag,{value:"Module"})));var Nu;function yv(){if(Nu)return dn;Nu=1;var e=Je();Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=D,dn.shouldForwardProp=b,dn.systemDefaultTheme=void 0;var t=e(fm()),r=e(pm()),n=v(yg),o=bg,s=e(xg),i=e(_g),a=e(pv),c=e(vv);const l=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(A){if(typeof WeakMap!="function")return null;var M=new WeakMap,I=new WeakMap;return(h=function(U){return U?I:M})(A)}function v(A,M){if(A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var I=h(M);if(I&&I.has(A))return I.get(A);var U={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in A)if(F!=="default"&&Object.prototype.hasOwnProperty.call(A,F)){var Y=G?Object.getOwnPropertyDescriptor(A,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(U,F,Y):U[F]=A[F]}return U.default=A,I&&I.set(A,U),U}function m(A){return Object.keys(A).length===0}function p(A){return typeof A=="string"&&A.charCodeAt(0)>96}function b(A){return A!=="ownerState"&&A!=="theme"&&A!=="sx"&&A!=="as"}function w(A,M){return M&&A&&typeof A=="object"&&A.styles&&!A.styles.startsWith("@layer")&&(A.styles=`@layer ${M}{${String(A.styles)}}`),A}const C=dn.systemDefaultTheme=(0,a.default)(),E=A=>A&&A.charAt(0).toLowerCase()+A.slice(1);function S({defaultTheme:A,theme:M,themeId:I}){return m(M)?A:M[I]||M}function _(A){return A?(M,I)=>I[A]:null}function W(A,M,I){let{ownerState:U}=M,G=(0,r.default)(M,l);const F=typeof A=="function"?A((0,t.default)({ownerState:U},G)):A;if(Array.isArray(F))return F.flatMap(Y=>W(Y,(0,t.default)({ownerState:U},G),I));if(F&&typeof F=="object"&&Array.isArray(F.variants)){const{variants:Y=[]}=F;let V=(0,r.default)(F,d);return Y.forEach(N=>{let ce=!0;if(typeof N.props=="function"?ce=N.props((0,t.default)({ownerState:U},G,U)):Object.keys(N.props).forEach(fe=>{U?.[fe]!==N.props[fe]&&G[fe]!==N.props[fe]&&(ce=!1)}),ce){Array.isArray(V)||(V=[V]);const fe=typeof N.style=="function"?N.style((0,t.default)({ownerState:U},G,U)):N.style;V.push(I?w((0,n.internal_serializeStyles)(fe),I):fe)}}),V}return I?w((0,n.internal_serializeStyles)(F),I):F}function D(A={}){const{themeId:M,defaultTheme:I=C,rootShouldForwardProp:U=b,slotShouldForwardProp:G=b}=A,F=Y=>(0,c.default)((0,t.default)({},Y,{theme:S((0,t.default)({},Y,{defaultTheme:I,themeId:M}))}));return F.__mui_systemSx=!0,(Y,oe={})=>{(0,n.internal_processStyles)(Y,pe=>pe.filter(Re=>!(Re!=null&&Re.__mui_systemSx)));const{name:V,slot:N,skipVariantsResolver:ce,skipSx:fe,overridesResolver:$=_(E(N))}=oe,Q=(0,r.default)(oe,f),Ce=V&&V.startsWith("Mui")||N?"components":"custom",me=ce!==void 0?ce:N&&N!=="Root"&&N!=="root"||!1,we=fe||!1;let ae;process.env.NODE_ENV!=="production"&&V&&(ae=`${V}-${E(N||"Root")}`);let ee=b;N==="Root"||N==="root"?ee=U:N?ee=G:p(Y)&&(ee=void 0);const le=(0,n.default)(Y,(0,t.default)({shouldForwardProp:ee,label:ae},Q)),ge=pe=>typeof pe=="function"&&pe.__emotion_real!==pe||(0,o.isPlainObject)(pe)?Re=>{const j=S({theme:Re.theme,defaultTheme:I,themeId:M});return W(pe,(0,t.default)({},Re,{theme:j}),j.modularCssLayers?Ce:void 0)}:pe,ie=(pe,...Re)=>{let j=ge(pe);const We=Re?Re.map(ge):[];V&&$&&We.push(Ne=>{const Be=S((0,t.default)({},Ne,{defaultTheme:I,themeId:M}));if(!Be.components||!Be.components[V]||!Be.components[V].styleOverrides)return null;const vt=Be.components[V].styleOverrides,ht={};return Object.entries(vt).forEach(([k,P])=>{ht[k]=W(P,(0,t.default)({},Ne,{theme:Be}),Be.modularCssLayers?"theme":void 0)}),$(Ne,ht)}),V&&!me&&We.push(Ne=>{var Be;const vt=S((0,t.default)({},Ne,{defaultTheme:I,themeId:M})),ht=vt==null||(Be=vt.components)==null||(Be=Be[V])==null?void 0:Be.variants;return W({variants:ht},(0,t.default)({},Ne,{theme:vt}),vt.modularCssLayers?"theme":void 0)}),we||We.push(F);const qe=We.length-Re.length;if(Array.isArray(pe)&&qe>0){const Ne=new Array(qe).fill("");j=[...pe,...Ne],j.raw=[...pe.raw,...Ne]}const Ze=le(j,...We);if(process.env.NODE_ENV!=="production"){let Ne;V&&(Ne=`${V}${(0,s.default)(N||"")}`),Ne===void 0&&(Ne=`Styled(${(0,i.default)(Y)})`),Ze.displayName=Ne}return Y.muiName&&(Ze.muiName=Y.muiName),Ze};return le.withConfig&&(ie.withConfig=le.withConfig),ie}}return dn}var bv=yv();const xv=Xe(bv);function _v(e,t){return nt({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Ct={};const wv=Yr(T0),Sv=Yr(am);var $u;function Cv(){if($u)return Ct;$u=1;var e=Je();Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.alpha=m,Ct.blend=W,Ct.colorChannel=void 0,Ct.darken=b,Ct.decomposeColor=i,Ct.emphasize=S,Ct.getContrastRatio=v,Ct.getLuminance=h,Ct.hexToRgb=o,Ct.hslToRgb=f,Ct.lighten=C,Ct.private_safeAlpha=p,Ct.private_safeColorChannel=void 0,Ct.private_safeDarken=w,Ct.private_safeEmphasize=_,Ct.private_safeLighten=E,Ct.recomposeColor=l,Ct.rgbToHex=d;var t=e(wv),r=e(Sv);function n(D,A=0,M=1){return process.env.NODE_ENV!=="production"&&(D<A||D>M)&&console.error(`MUI: The value provided ${D} is out of range [${A}, ${M}].`),(0,r.default)(D,A,M)}function o(D){D=D.slice(1);const A=new RegExp(`.{1,${D.length>=6?2:1}}`,"g");let M=D.match(A);return M&&M[0].length===1&&(M=M.map(I=>I+I)),M?`rgb${M.length===4?"a":""}(${M.map((I,U)=>U<3?parseInt(I,16):Math.round(parseInt(I,16)/255*1e3)/1e3).join(", ")})`:""}function s(D){const A=D.toString(16);return A.length===1?`0${A}`:A}function i(D){if(D.type)return D;if(D.charAt(0)==="#")return i(o(D));const A=D.indexOf("("),M=D.substring(0,A);if(["rgb","rgba","hsl","hsla","color"].indexOf(M)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${D}\` color.
92
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,t.default)(9,D));let I=D.substring(A+1,D.length-1),U;if(M==="color"){if(I=I.split(" "),U=I.shift(),I.length===4&&I[3].charAt(0)==="/"&&(I[3]=I[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(U)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${U}\` color space.
93
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,t.default)(10,U))}else I=I.split(",");return I=I.map(G=>parseFloat(G)),{type:M,values:I,colorSpace:U}}const a=D=>{const A=i(D);return A.values.slice(0,3).map((M,I)=>A.type.indexOf("hsl")!==-1&&I!==0?`${M}%`:M).join(" ")};Ct.colorChannel=a;const c=(D,A)=>{try{return a(D)}catch{return A&&process.env.NODE_ENV!=="production"&&console.warn(A),D}};Ct.private_safeColorChannel=c;function l(D){const{type:A,colorSpace:M}=D;let{values:I}=D;return A.indexOf("rgb")!==-1?I=I.map((U,G)=>G<3?parseInt(U,10):U):A.indexOf("hsl")!==-1&&(I[1]=`${I[1]}%`,I[2]=`${I[2]}%`),A.indexOf("color")!==-1?I=`${M} ${I.join(" ")}`:I=`${I.join(", ")}`,`${A}(${I})`}function d(D){if(D.indexOf("#")===0)return D;const{values:A}=i(D);return`#${A.map((M,I)=>s(I===3?Math.round(255*M):M)).join("")}`}function f(D){D=i(D);const{values:A}=D,M=A[0],I=A[1]/100,U=A[2]/100,G=I*Math.min(U,1-U),F=(V,N=(V+M/30)%12)=>U-G*Math.max(Math.min(N-3,9-N,1),-1);let Y="rgb";const oe=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return D.type==="hsla"&&(Y+="a",oe.push(A[3])),l({type:Y,values:oe})}function h(D){D=i(D);let A=D.type==="hsl"||D.type==="hsla"?i(f(D)).values:D.values;return A=A.map(M=>(D.type!=="color"&&(M/=255),M<=.03928?M/12.92:((M+.055)/1.055)**2.4)),Number((.2126*A[0]+.7152*A[1]+.0722*A[2]).toFixed(3))}function v(D,A){const M=h(D),I=h(A);return(Math.max(M,I)+.05)/(Math.min(M,I)+.05)}function m(D,A){return D=i(D),A=n(A),(D.type==="rgb"||D.type==="hsl")&&(D.type+="a"),D.type==="color"?D.values[3]=`/${A}`:D.values[3]=A,l(D)}function p(D,A,M){try{return m(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function b(D,A){if(D=i(D),A=n(A),D.type.indexOf("hsl")!==-1)D.values[2]*=1-A;else if(D.type.indexOf("rgb")!==-1||D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]*=1-A;return l(D)}function w(D,A,M){try{return b(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function C(D,A){if(D=i(D),A=n(A),D.type.indexOf("hsl")!==-1)D.values[2]+=(100-D.values[2])*A;else if(D.type.indexOf("rgb")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(255-D.values[M])*A;else if(D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(1-D.values[M])*A;return l(D)}function E(D,A,M){try{return C(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function S(D,A=.15){return h(D)>.5?b(D,A):C(D,A)}function _(D,A,M){try{return S(D,A)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function W(D,A,M,I=1){const U=(oe,V)=>Math.round((oe**(1/I)*(1-M)+V**(1/I)*M)**I),G=i(D),F=i(A),Y=[U(G.values[0],F.values[0]),U(G.values[1],F.values[1]),U(G.values[2],F.values[2])];return l({type:"rgb",values:Y})}return Ct}var Zs=Cv();const go={black:"#000",white:"#fff"},Ev={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"},jn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Rn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},vo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Nn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},$n={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ln={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Dv=["mode","contrastThreshold","tonalOffset"],Lu={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:go.white,default:go.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}},Fa={text:{primary:go.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:go.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function zu(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Zs.lighten(e.main,o):t==="dark"&&(e.dark=Zs.darken(e.main,s)))}function kv(e="light"){return e==="dark"?{main:Nn[200],light:Nn[50],dark:Nn[400]}:{main:Nn[700],light:Nn[400],dark:Nn[800]}}function Av(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function Tv(e="light"){return e==="dark"?{main:Rn[500],light:Rn[300],dark:Rn[700]}:{main:Rn[700],light:Rn[400],dark:Rn[800]}}function Iv(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:$n[700],light:$n[500],dark:$n[900]}}function Mv(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[800],light:Ln[500],dark:Ln[900]}}function Pv(e="light"){return e==="dark"?{main:vo[400],light:vo[300],dark:vo[700]}:{main:"#ed6c02",light:vo[500],dark:vo[900]}}function Ov(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=tn(e,Dv),s=e.primary||kv(t),i=e.secondary||Av(t),a=e.error||Tv(t),c=e.info||Iv(t),l=e.success||Mv(t),d=e.warning||Pv(t);function f(p){const b=Zs.getContrastRatio(p,Fa.text.primary)>=r?Fa.text.primary:Lu.text.primary;if(process.env.NODE_ENV!=="production"){const w=Zs.getContrastRatio(p,b);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${b} on ${p}`,"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(`
94
94
  `))}return b}const h=({color:p,name:b,mainShade:w=500,lightShade:C=300,darkShade:E=700})=>{if(p=nt({},p),!p.main&&p[w]&&(p.main=p[w]),!p.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
95
95
  The color object needs to have a \`main\` property or a \`${w}\` property.`:oo(11,b?` (${b})`:"",w));if(typeof p.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
96
96
  \`color.main\` should be a string, but \`${JSON.stringify(p.main)}\` was provided instead.
@@ -105,44 +105,44 @@ const theme1 = createTheme({ palette: {
105
105
 
106
106
  const theme2 = createTheme({ palette: {
107
107
  primary: { main: green[500] },
108
- } });`:oo(12,b?` (${b})`:"",JSON.stringify(p.main)));return zu(p,"light",C,n),zu(p,"dark",E,n),p.contrastText||(p.contrastText=f(p.main)),p},v={dark:Fa,light:Lu};return process.env.NODE_ENV!=="production"&&(v[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Or(nt({common:nt({},go),mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:Cv,contrastThreshold:r,getContrastText:f,augmentColor:h,tonalOffset:n},v[t]),o)}const Ov=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function jv(e){return Math.round(e*1e5)/1e5}const Bu={textTransform:"uppercase"},Fu='"Roboto", "Helvetica", "Arial", sans-serif';function Rv(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Fu,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:d,pxToRem:f}=r,h=tn(r,Ov);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const v=o/14,m=f||(w=>`${w/u*v}rem`),p=(w,C,E,S,_)=>nt({fontFamily:n,fontWeight:w,fontSize:m(C),lineHeight:E},n===Fu?{letterSpacing:`${jv(S/C)}em`}:{},_,d),b={h1:p(s,96,1.167,-1.5),h2:p(s,60,1.2,-.5),h3:p(i,48,1.167,0),h4:p(i,34,1.235,.25),h5:p(i,24,1.334,0),h6:p(a,20,1.6,.15),subtitle1:p(i,16,1.75,.15),subtitle2:p(a,14,1.57,.1),body1:p(i,16,1.5,.15),body2:p(i,14,1.43,.15),button:p(a,14,1.75,.4,Bu),caption:p(i,12,1.66,.4),overline:p(i,12,2.66,1,Bu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Or(nt({htmlFontSize:u,pxToRem:m,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),h,{clone:!1})}const Nv=.2,$v=.14,Lv=.12;function xt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Nv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${$v})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Lv})`].join(",")}const zv=["none",xt(0,2,1,-1,0,1,1,0,0,1,3,0),xt(0,3,1,-2,0,2,2,0,0,1,5,0),xt(0,3,3,-2,0,3,4,0,0,1,8,0),xt(0,2,4,-1,0,4,5,0,0,1,10,0),xt(0,3,5,-1,0,5,8,0,0,1,14,0),xt(0,3,5,-1,0,6,10,0,0,1,18,0),xt(0,4,5,-2,0,7,10,1,0,2,16,1),xt(0,5,5,-3,0,8,10,1,0,3,14,2),xt(0,5,6,-3,0,9,12,1,0,3,16,2),xt(0,6,6,-3,0,10,14,1,0,4,18,3),xt(0,6,7,-4,0,11,15,1,0,4,20,3),xt(0,7,8,-4,0,12,17,2,0,5,22,4),xt(0,7,8,-4,0,13,19,2,0,5,24,4),xt(0,7,9,-4,0,14,21,2,0,5,26,4),xt(0,8,9,-5,0,15,22,2,0,6,28,5),xt(0,8,10,-5,0,16,24,2,0,6,30,5),xt(0,8,11,-5,0,17,26,2,0,6,32,5),xt(0,9,11,-5,0,18,28,2,0,7,34,6),xt(0,9,12,-6,0,19,29,2,0,7,36,6),xt(0,10,13,-6,0,20,31,3,0,8,38,7),xt(0,10,13,-6,0,21,33,3,0,8,40,7),xt(0,10,14,-6,0,22,35,3,0,8,42,7),xt(0,11,14,-7,0,23,36,3,0,9,44,8),xt(0,11,15,-7,0,24,38,3,0,9,46,8)],Bv=["duration","easing","delay"],Fv={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)"},Wv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Wu(e){return`${Math.round(e)}ms`}function Vv(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Uv(e){const t=nt({},Fv,e.easing),r=nt({},Wv,e.duration);return nt({getAutoHeightDuration:Vv,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,u=tn(s,Bv);if(process.env.NODE_ENV!=="production"){const d=h=>typeof h=="string",f=h=>!isNaN(parseFloat(h));!d(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(a)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
109
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Wu(i)} ${a} ${typeof c=="string"?c:Wu(c)}`).join(",")}},e,{easing:t,duration:r})}const Hv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Yv=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function qv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=tn(e,Yv);if(e.vars&&e.generateCssVars===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.":oo(18));const a=Pv(n),c=Ru(e);let u=Or(c,{mixins:xv(c.breakpoints,r),palette:a,shadows:zv.slice(),typography:Rv(a,s),transitions:Uv(o),zIndex:nt({},Hv)});if(u=Or(u,i),u=t.reduce((d,f)=>Or(d,f),u),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(h,v)=>{let m;for(m in h){const p=h[m];if(d.indexOf(m)!==-1&&Object.keys(p).length>0){if(process.env.NODE_ENV!=="production"){const b=wa("",m);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${m}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:p}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
110
- `))}h[m]={}}}};Object.keys(u.components).forEach(h=>{const v=u.components[h].styleOverrides;v&&h.indexOf("Mui")===0&&f(v,h)})}return u.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return qs({sx:f,theme:this})},u}const Zv=qv(),Gv="$$material";function Kv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Qv=bv({themeId:Gv,defaultTheme:Zv,rootShouldForwardProp:e=>Kv(e)&&e!=="classes"});function Xv(e){return wa("MuiSvgIcon",e)}om("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Jv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ey=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${en(t)}`,`fontSize${en(r)}`]};return rm(o,Xv,n)},ty=Qv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${en(r.color)}`],t[`fontSize${en(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,u,d,f,h,v,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((a=e.typography)==null||(c=a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem",large:((u=e.typography)==null||(d=u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}[t.fontSize],color:(f=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?f:{action:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),Gs=K.forwardRef(function(t,r){const n=um({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=n,v=tn(n,Jv),m=K.isValidElement(o)&&o.type==="svg",p=nt({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),b={};d||(b.viewBox=h);const w=ey(p);return l.jsxs(ty,nt({as:a,className:Ht(w.root,s),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,v,m&&o.props,{ownerState:p,children:[m?o.props.children:o,f?l.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Gs.propTypes={children:ze.node,classes:ze.object,className:ze.string,color:ze.oneOfType([ze.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ze.string]),component:ze.elementType,fontSize:ze.oneOfType([ze.oneOf(["inherit","large","medium","small"]),ze.string]),htmlColor:ze.string,inheritViewBox:ze.bool,shapeRendering:ze.string,sx:ze.oneOfType([ze.arrayOf(ze.oneOfType([ze.func,ze.object,ze.bool])),ze.func,ze.object]),titleAccess:ze.string,viewBox:ze.string}),Gs.muiName="SvgIcon";function ry(e,t){function r(n,o){return l.jsx(Gs,nt({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Gs.muiName,K.memo(K.forwardRef(r))}const ny=Yr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:en,createChainedFunction:N0,createSvgIcon:ry,debounce:$0,deprecatedPropType:L0,isMuiElement:z0,ownerDocument:zl,ownerWindow:B0,requirePropFactory:F0,setRef:Bl,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
111
- `)),Hl.configure(e)}},unstable_useEnhancedEffect:Fl,unstable_useId:V0,unsupportedProp:U0,useControlled:H0,useEventCallback:Y0,useForkRef:q0,useIsFocusVisible:tm},Symbol.toStringTag,{value:"Module"})));var Vu;function lt(){return Vu||(Vu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ny})(ua)),ua}var Uu;function oy(){if(Uu)return no;Uu=1;var e=Je();Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t=e(lt()),r=rt();return no.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),no}var sy=oy();const iy=Xe(sy);var yo={},Hu;function ay(){if(Hu)return yo;Hu=1;var e=Je();Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=void 0;var t=e(lt()),r=rt();return yo.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),yo}var cy=ay();const ly=Xe(cy);var bo={},Yu;function uy(){if(Yu)return bo;Yu=1;var e=Je();Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=void 0;var t=e(lt()),r=rt();return bo.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),bo}var dy=uy();const fy=Xe(dy),py=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=y.useState(!1),[s,i]=y.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return l.jsxs("div",{className:`${Cr.dashboardContainer} ${s?Cr.sidebarCollapsed:""}`,children:[l.jsxs("header",{className:Cr.header,children:[l.jsx(g.IconButton,{onClick:a,className:Cr.menuButton,children:l.jsx(iy,{})}),l.jsx("div",{className:Cr.headerContent,children:e})]}),l.jsxs("aside",{className:`${Cr.sidebar} ${n?Cr.sidebarOpen:""}`,children:[l.jsx("div",{className:Cr.sidebarContent,children:t}),l.jsx(g.IconButton,{onClick:c,className:Cr.collapseButton,style:{display:"none"},children:s?l.jsx(fy,{}):l.jsx(ly,{})})]}),l.jsx("main",{className:Cr.mainContent,children:r}),n&&l.jsx("div",{className:Cr.overlay,onClick:a})]})},fn={headerContainer:"_headerContainer_if4sf_1",navAndDate:"_navAndDate_if4sf_17",navButton:"_navButton_if4sf_29",datePickerInput:"_datePickerInput_if4sf_61",datePickerButton:"_datePickerButton_if4sf_91",addEventButton:"_addEventButton_if4sf_135"};function Ks(){return typeof window<"u"}function zn(e){return qu(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $r(e){var t;return(t=(qu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qu(e){return Ks()?e instanceof Node||e instanceof ur(e).Node:!1}function Qt(e){return Ks()?e instanceof Element||e instanceof ur(e).Element:!1}function Lr(e){return Ks()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function Zu(e){return!Ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const hy=new Set(["inline","contents"]);function xo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!hy.has(o)}const my=new Set(["table","td","th"]);function gy(e){return my.has(zn(e))}const vy=[":popover-open",":modal"];function Qs(e){return vy.some(t=>{try{return e.matches(t)}catch{return!1}})}const yy=["transform","translate","scale","rotate","perspective"],by=["transform","translate","scale","rotate","perspective","filter"],xy=["paint","layout","strict","content"];function Wa(e){const t=Va(),r=Qt(e)?vr(e):e;return yy.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||by.some(n=>(r.willChange||"").includes(n))||xy.some(n=>(r.contain||"").includes(n))}function _y(e){let t=nn(e);for(;Lr(t)&&!Bn(t);){if(Wa(t))return t;if(Qs(t))return null;t=nn(t)}return null}function Va(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wy=new Set(["html","body","#document"]);function Bn(e){return wy.has(zn(e))}function vr(e){return ur(e).getComputedStyle(e)}function Xs(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nn(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zu(e)&&e.host||$r(e);return Zu(t)?t.host:t}function Gu(e){const t=nn(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lr(t)&&xo(t)?t:Gu(t)}function _o(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=ur(o);if(s){const a=Ua(i);return t.concat(i,i.visualViewport||[],xo(o)?o:[],a&&r?_o(a):[])}return t.concat(o,_o(o,[],r))}function Ua(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Fn=Math.min,pn=Math.max,Js=Math.round,ei=Math.floor,zr=e=>({x:e,y:e}),Sy={left:"right",right:"left",bottom:"top",top:"bottom"},Cy={start:"end",end:"start"};function Ey(e,t,r){return pn(e,Fn(t,r))}function ti(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Dy(e){return e==="x"?"y":"x"}function Ha(e){return e==="y"?"height":"width"}const ky=new Set(["top","bottom"]);function hn(e){return ky.has(Wn(e))?"y":"x"}function Ya(e){return Dy(hn(e))}function Ay(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=Ya(e),s=Ha(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ri(i)),[i,ri(i)]}function Ty(e){const t=ri(e);return[qa(e),t,qa(t)]}function qa(e){return e.replace(/start|end/g,t=>Cy[t])}const Ku=["left","right"],Qu=["right","left"],Iy=["top","bottom"],My=["bottom","top"];function Py(e,t,r){switch(e){case"top":case"bottom":return r?t?Qu:Ku:t?Ku:Qu;case"left":case"right":return t?Iy:My;default:return[]}}function Oy(e,t,r,n){const o=wo(e);let s=Py(Wn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(qa)))),s}function ri(e){return e.replace(/left|right|bottom|top/g,t=>Sy[t])}function jy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xu(e){return typeof e!="number"?jy(e):{top:e,right:e,bottom:e,left:e}}function ni(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var Ry=typeof document<"u",Ny=function(){},oi=Ry?y.useLayoutEffect:Ny;const $y={...K}.useInsertionEffect||(e=>e());function Ly(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return $y(()=>{t.current=e}),K.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Ju(e,t,r){let{reference:n,floating:o}=e;const s=hn(t),i=Ya(t),a=Ha(i),c=Wn(t),u=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let v;switch(c){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-o.width,y:f};break;default:v={x:n.x,y:n.y}}switch(wo(t)){case"start":v[i]-=h*(r&&u?-1:1);break;case"end":v[i]+=h*(r&&u?-1:1);break}return v}const zy=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Ju(u,n,c),h=n,v={},m=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:C,y:E,data:S,reset:_}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:u,platform:i,elements:{reference:e,floating:t}});d=C??d,f=E??f,v={...v,[b]:{...v[b],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Ju(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:v}};async function By(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=ti(t,e),m=Xu(v),b=a[h?f==="floating"?"reference":"floating":f],w=ni(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(b)))==null||r?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),C=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=ni(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:E,strategy:c}):C);return{top:(w.top-_.top+m.top)/S.y,bottom:(_.bottom-w.bottom+m.bottom)/S.y,left:(w.left-_.left+m.left)/S.x,right:(_.right-w.right+m.right)/S.x}}const Fy=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=ti(e,t)||{};if(u==null)return{};const f=Xu(d),h={x:r,y:n},v=Ya(o),m=Ha(v),p=await i.getDimensions(u),b=v==="y",w=b?"top":"left",C=b?"bottom":"right",E=b?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[v]-h[v]-s.floating[m],_=h[v]-s.reference[v],W=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let D=W?W[E]:0;(!D||!await(i.isElement==null?void 0:i.isElement(W)))&&(D=a.floating[E]||s.floating[m]);const A=S/2-_/2,M=D/2-p[m]/2-1,I=Fn(f[w],M),H=Fn(f[C],M),G=I,F=D-p[m]-H,Y=D/2-p[m]/2+A,oe=Ey(G,Y,F),V=!c.arrow&&wo(o)!=null&&Y!==oe&&s.reference[m]/2-(Y<G?I:H)-p[m]/2<0,N=V?Y<G?Y-G:Y-F:0;return{[v]:h[v]+N,data:{[v]:oe,centerOffset:Y-oe-N,...V&&{alignmentOffset:N}},reset:V}}}),Wy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...b}=ti(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Wn(o),C=hn(a),E=Wn(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(E||!p?[ri(a)]:Ty(a)),W=m!=="none";!h&&W&&_.push(...Oy(a,p,m,S));const D=[a,..._],A=await By(t,b),M=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(A[w]),f){const Y=Ay(o,i,S);M.push(A[Y[0]],A[Y[1]])}if(I=[...I,{placement:o,overflows:M}],!M.every(Y=>Y<=0)){var H,G;const Y=(((H=s.flip)==null?void 0:H.index)||0)+1,oe=D[Y];if(oe&&(!(f==="alignment"?C!==hn(oe):!1)||I.every(ae=>hn(ae.placement)===C?ae.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:oe}};let V=(G=I.filter(N=>N.overflows[0]<=0).sort((N,ae)=>N.overflows[1]-ae.overflows[1])[0])==null?void 0:G.placement;if(!V)switch(v){case"bestFit":{var F;const N=(F=I.filter(ae=>{if(W){const fe=hn(ae.placement);return fe===C||fe==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(fe=>fe>0).reduce((fe,$)=>fe+$,0)]).sort((ae,fe)=>ae[1]-fe[1])[0])==null?void 0:F[0];N&&(V=N);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}},Vy=new Set(["left","top"]);async function Uy(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Wn(r),a=wo(r),c=hn(r)==="y",u=Vy.has(i)?-1:1,d=s&&c?-1:1,f=ti(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(v=a==="end"?m*-1:m),c?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Hy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Uy(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}};function ed(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Lr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Js(r)!==s||Js(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Za(e){return Qt(e)?e:e.contextElement}function Vn(e){const t=Za(e);if(!Lr(t))return zr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=ed(t);let i=(s?Js(r.width):r.width)/n,a=(s?Js(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Yy=zr(0);function td(e){const t=ur(e);return!Va()||!t.visualViewport?Yy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function mn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Za(e);let i=zr(1);t&&(n?Qt(n)&&(i=Vn(n)):i=Vn(e));const a=qy(s,r,n)?td(s):zr(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=ur(s),v=n&&Qt(n)?ur(n):n;let m=h,p=Ua(m);for(;p&&n&&v!==m;){const b=Vn(p),w=p.getBoundingClientRect(),C=vr(p),E=w.left+(p.clientLeft+parseFloat(C.paddingLeft))*b.x,S=w.top+(p.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=E,u+=S,m=ur(p),p=Ua(m)}}return ni({width:d,height:f,x:c,y:u})}function si(e,t){const r=Xs(e).scrollLeft;return t?t.left+r:mn($r(e)).left+r}function rd(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-si(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Zy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=$r(n),a=t?Qs(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},u=zr(1);const d=zr(0),f=Lr(n);if((f||!f&&!s)&&((zn(n)!=="body"||xo(i))&&(c=Xs(n)),Lr(n))){const v=mn(n);u=Vn(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const h=i&&!f&&!s?rd(i,c):zr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function Gy(e){return Array.from(e.getClientRects())}function Ky(e){const t=$r(e),r=Xs(e),n=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=pn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+si(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(i+=pn(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const nd=25;function Qy(e,t){const r=ur(e),n=$r(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=Va();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=si(n);if(u<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(n.clientWidth-f.clientWidth-v);m<=nd&&(s-=m)}else u<=nd&&(s+=u);return{width:s,height:i,x:a,y:c}}const Xy=new Set(["absolute","fixed"]);function Jy(e,t){const r=mn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Lr(e)?Vn(e):zr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:i,height:a,x:c,y:u}}function od(e,t,r){let n;if(t==="viewport")n=Qy(e,r);else if(t==="document")n=Ky($r(e));else if(Qt(t))n=Jy(t,r);else{const o=td(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ni(n)}function sd(e,t){const r=nn(e);return r===t||!Qt(r)||Bn(r)?!1:vr(r).position==="fixed"||sd(r,t)}function e2(e,t){const r=t.get(e);if(r)return r;let n=_o(e,[],!1).filter(a=>Qt(a)&&zn(a)!=="body"),o=null;const s=vr(e).position==="fixed";let i=s?nn(e):e;for(;Qt(i)&&!Bn(i);){const a=vr(i),c=Wa(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Xy.has(o.position)||xo(i)&&!c&&sd(e,i))?n=n.filter(d=>d!==i):o=a,i=nn(i)}return t.set(e,n),n}function t2(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Qs(t)?[]:e2(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,d)=>{const f=od(t,d,o);return u.top=pn(f.top,u.top),u.right=Fn(f.right,u.right),u.bottom=Fn(f.bottom,u.bottom),u.left=pn(f.left,u.left),u},od(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function r2(e){const{width:t,height:r}=ed(e);return{width:t,height:r}}function n2(e,t,r){const n=Lr(t),o=$r(t),s=r==="fixed",i=mn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=zr(0);function u(){c.x=si(o)}if(n||!n&&!s)if((zn(t)!=="body"||xo(o))&&(a=Xs(t)),n){const v=mn(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&u();s&&!n&&o&&u();const d=o&&!n&&!s?rd(o,a):zr(0),f=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function Ga(e){return vr(e).position==="static"}function id(e,t){if(!Lr(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return $r(e)===r&&(r=r.ownerDocument.body),r}function ad(e,t){const r=ur(e);if(Qs(e))return r;if(!Lr(e)){let o=nn(e);for(;o&&!Bn(o);){if(Qt(o)&&!Ga(o))return o;o=nn(o)}return r}let n=id(e,t);for(;n&&gy(n)&&Ga(n);)n=id(n,t);return n&&Bn(n)&&Ga(n)&&!Wa(n)?r:n||_y(e)||r}const o2=async function(e){const t=this.getOffsetParent||ad,r=this.getDimensions,n=await r(e.floating);return{reference:n2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function s2(e){return vr(e).direction==="rtl"}const i2={convertOffsetParentRelativeRectToViewportRelativeRect:Zy,getDocumentElement:$r,getClippingRect:t2,getOffsetParent:ad,getElementRects:o2,getClientRects:Gy,getDimensions:r2,getScale:Vn,isElement:Qt,isRTL:s2};function cd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function a2(e,t){let r=null,n;const o=$r(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=u;if(a||t(),!h||!v)return;const m=ei(f),p=ei(o.clientWidth-(d+h)),b=ei(o.clientHeight-(f+v)),w=ei(d),E={rootMargin:-m+"px "+-p+"px "+-b+"px "+-w+"px",threshold:pn(0,Fn(1,c))||1};let S=!0;function _(W){const D=W[0].intersectionRatio;if(D!==c){if(!S)return i();D?i(!1,D):n=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!cd(u,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return i(!0),s}function c2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Za(e),d=o||s?[...u?_o(u):[],..._o(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const f=u&&a?a2(u,r):null;let h=-1,v=null;i&&(v=new ResizeObserver(w=>{let[C]=w;C&&C.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let m,p=c?mn(e):null;c&&b();function b(){const w=mn(e);p&&!cd(p,w)&&r(),p=w,m=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(C=>{o&&C.removeEventListener("scroll",r),s&&C.removeEventListener("resize",r)}),f?.(),(w=v)==null||w.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const l2=Hy,u2=Wy,ld=Fy,d2=(e,t,r)=>{const n=new Map,o={platform:i2,...r},s={...o.platform,_c:n};return zy(e,t,{...o,platform:s})};var f2=typeof document<"u",p2=function(){},ii=f2?y.useLayoutEffect:p2;function ai(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ai(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!ai(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ud(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dd(e,t){const r=ud(e);return Math.round(t*r)/r}function Ka(e){const t=K.useRef(e);return ii(()=>{t.current=e}),t}function h2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=K.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=K.useState(n);ai(h,n)||v(n);const[m,p]=K.useState(null),[b,w]=K.useState(null),C=K.useCallback(ae=>{ae!==W.current&&(W.current=ae,p(ae))},[]),E=K.useCallback(ae=>{ae!==D.current&&(D.current=ae,w(ae))},[]),S=s||m,_=i||b,W=K.useRef(null),D=K.useRef(null),A=K.useRef(d),M=c!=null,I=Ka(c),H=Ka(o),G=Ka(u),F=K.useCallback(()=>{if(!W.current||!D.current)return;const ae={placement:t,strategy:r,middleware:h};H.current&&(ae.platform=H.current),d2(W.current,D.current,ae).then(fe=>{const $={...fe,isPositioned:G.current!==!1};Y.current&&!ai(A.current,$)&&(A.current=$,g0.flushSync(()=>{f($)}))})},[h,t,r,H,G]);ii(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(ae=>({...ae,isPositioned:!1})))},[u]);const Y=K.useRef(!1);ii(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ii(()=>{if(S&&(W.current=S),_&&(D.current=_),S&&_){if(I.current)return I.current(S,_,F);F()}},[S,_,F,I,M]);const oe=K.useMemo(()=>({reference:W,floating:D,setReference:C,setFloating:E}),[C,E]),V=K.useMemo(()=>({reference:S,floating:_}),[S,_]),N=K.useMemo(()=>{const ae={position:r,left:0,top:0};if(!V.floating)return ae;const fe=dd(V.floating,d.x),$=dd(V.floating,d.y);return a?{...ae,transform:"translate("+fe+"px, "+$+"px)",...ud(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:$}},[r,a,V.floating,d.x,d.y]);return K.useMemo(()=>({...d,update:F,refs:oe,elements:V,floatingStyles:N}),[d,F,oe,V,N])}const m2=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ld({element:n.current,padding:o}).fn(r):{}:n?ld({element:n,padding:o}).fn(r):{}}}},g2=(e,t)=>({...l2(e),options:[e,t]}),v2=(e,t)=>({...u2(e),options:[e,t]}),y2=(e,t)=>({...m2(e),options:[e,t]}),b2={...K};let fd=!1,x2=0;const pd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+x2++;function _2(){const[e,t]=K.useState(()=>fd?pd():void 0);return oi(()=>{e==null&&t(pd())},[]),K.useEffect(()=>{fd=!0},[]),e}const hd=b2.useId||_2;let So;process.env.NODE_ENV!=="production"&&(So=new Set);function w2(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.warn(o)}}function S2(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.error(o)}}const C2=K.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:s,shift:i}},width:a=14,height:c=7,tipRadius:u=0,strokeWidth:d=0,staticOffset:f,stroke:h,d:v,style:{transform:m,...p}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||w2("The `ref` prop is required for `FloatingArrow`."));const w=hd(),[C,E]=K.useState(!1);if(oi(()=>{if(!o)return;vr(o).direction==="rtl"&&E(!0)},[o]),!o)return null;const[S,_]=n.split("-"),W=S==="top"||S==="bottom";let D=f;(W&&i!=null&&i.x||!W&&i!=null&&i.y)&&(D=null);const A=d*2,M=A/2,I=a/2*(u/-8+1),H=c/2*u/4,G=!!v,F=D&&_==="end"?"bottom":"top";let Y=D&&_==="end"?"right":"left";D&&C&&(Y=_==="end"?"left":"right");const oe=s?.x!=null?D||s.x:"",V=s?.y!=null?D||s.y:"",N=v||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(c-H))+(" Q"+a/2+","+c+" "+I+","+(c-H))+" Z",ae={top:G?"rotate(180deg)":"",left:G?"rotate(90deg)":"rotate(-90deg)",bottom:G?"":"rotate(180deg)",right:G?"rotate(-90deg)":"rotate(90deg)"}[S];return l.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:G?a:a+A,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Y]:oe,[F]:V,[S]:W||G?"100%":"calc(100% - "+A/2+"px)",transform:[ae,m].filter(fe=>!!fe).join(" "),...p},children:[A>0&&l.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:h,strokeWidth:A+(v?0:1),d:N}),l.jsx("path",{stroke:A&&!v?b.fill:"none",d:N}),l.jsx("clipPath",{id:w,children:l.jsx("rect",{x:-M,y:M*(G?-1:1),width:a+A,height:a})})]})});function E2(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;(n=e.get(t))==null||n.delete(r)}}}const D2=K.createContext(null),k2=K.createContext(null),A2=()=>{var e;return((e=K.useContext(D2))==null?void 0:e.id)||null},T2=()=>K.useContext(k2);function I2(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=hd(),s=K.useRef({}),[i]=K.useState(()=>E2()),a=A2()!=null;if(process.env.NODE_ENV!=="production"){const v=n.reference;v&&!Qt(v)&&S2("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=K.useState(n.reference),d=Ly((v,m,p)=>{s.current.openEvent=v?m:void 0,i.emit("openchange",{open:v,event:m,reason:p,nested:a}),r?.(v,m,p)}),f=K.useMemo(()=>({setPositionReference:u}),[]),h=K.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return K.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:h,events:i,floatingId:o,refs:f}),[t,d,h,i,o,f])}function M2(e){e===void 0&&(e={});const{nodeId:t}=e,r=I2({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=K.useState(null),[a,c]=K.useState(null),d=o?.domReference||s,f=K.useRef(null),h=T2();oi(()=>{d&&(f.current=d)},[d]);const v=h2({...e,elements:{...o,...a&&{reference:a}}}),m=K.useCallback(E=>{const S=Qt(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;c(S),v.refs.setReference(S)},[v.refs]),p=K.useCallback(E=>{(Qt(E)||E===null)&&(f.current=E,i(E)),(Qt(v.refs.reference.current)||v.refs.reference.current===null||E!==null&&!Qt(E))&&v.refs.setReference(E)},[v.refs]),b=K.useMemo(()=>({...v.refs,setReference:p,setPositionReference:m,domReference:f}),[v.refs,p,m]),w=K.useMemo(()=>({...v.elements,domReference:d}),[v.elements,d]),C=K.useMemo(()=>({...v,...n,refs:b,elements:w,nodeId:t}),[v,b,w,t,n]);return oi(()=>{n.dataRef.current.floatingContext=C;const E=h?.nodesRef.current.find(S=>S.id===t);E&&(E.context=C)}),K.useMemo(()=>({...v,context:C,refs:b,elements:w}),[v,b,w,C])}/*!
108
+ } });`:oo(12,b?` (${b})`:"",JSON.stringify(p.main)));return zu(p,"light",C,n),zu(p,"dark",E,n),p.contrastText||(p.contrastText=f(p.main)),p},v={dark:Fa,light:Lu};return process.env.NODE_ENV!=="production"&&(v[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Or(nt({common:nt({},go),mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:l,name:"success"}),grey:Ev,contrastThreshold:r,getContrastText:f,augmentColor:h,tonalOffset:n},v[t]),o)}const jv=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Rv(e){return Math.round(e*1e5)/1e5}const Bu={textTransform:"uppercase"},Fu='"Roboto", "Helvetica", "Arial", sans-serif';function Nv(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Fu,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:l=16,allVariants:d,pxToRem:f}=r,h=tn(r,jv);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const v=o/14,m=f||(w=>`${w/l*v}rem`),p=(w,C,E,S,_)=>nt({fontFamily:n,fontWeight:w,fontSize:m(C),lineHeight:E},n===Fu?{letterSpacing:`${Rv(S/C)}em`}:{},_,d),b={h1:p(s,96,1.167,-1.5),h2:p(s,60,1.2,-.5),h3:p(i,48,1.167,0),h4:p(i,34,1.235,.25),h5:p(i,24,1.334,0),h6:p(a,20,1.6,.15),subtitle1:p(i,16,1.75,.15),subtitle2:p(a,14,1.57,.1),body1:p(i,16,1.5,.15),body2:p(i,14,1.43,.15),button:p(a,14,1.75,.4,Bu),caption:p(i,12,1.66,.4),overline:p(i,12,2.66,1,Bu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Or(nt({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),h,{clone:!1})}const $v=.2,Lv=.14,zv=.12;function xt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${$v})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Lv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${zv})`].join(",")}const Bv=["none",xt(0,2,1,-1,0,1,1,0,0,1,3,0),xt(0,3,1,-2,0,2,2,0,0,1,5,0),xt(0,3,3,-2,0,3,4,0,0,1,8,0),xt(0,2,4,-1,0,4,5,0,0,1,10,0),xt(0,3,5,-1,0,5,8,0,0,1,14,0),xt(0,3,5,-1,0,6,10,0,0,1,18,0),xt(0,4,5,-2,0,7,10,1,0,2,16,1),xt(0,5,5,-3,0,8,10,1,0,3,14,2),xt(0,5,6,-3,0,9,12,1,0,3,16,2),xt(0,6,6,-3,0,10,14,1,0,4,18,3),xt(0,6,7,-4,0,11,15,1,0,4,20,3),xt(0,7,8,-4,0,12,17,2,0,5,22,4),xt(0,7,8,-4,0,13,19,2,0,5,24,4),xt(0,7,9,-4,0,14,21,2,0,5,26,4),xt(0,8,9,-5,0,15,22,2,0,6,28,5),xt(0,8,10,-5,0,16,24,2,0,6,30,5),xt(0,8,11,-5,0,17,26,2,0,6,32,5),xt(0,9,11,-5,0,18,28,2,0,7,34,6),xt(0,9,12,-6,0,19,29,2,0,7,36,6),xt(0,10,13,-6,0,20,31,3,0,8,38,7),xt(0,10,13,-6,0,21,33,3,0,8,40,7),xt(0,10,14,-6,0,22,35,3,0,8,42,7),xt(0,11,14,-7,0,23,36,3,0,9,44,8),xt(0,11,15,-7,0,24,38,3,0,9,46,8)],Fv=["duration","easing","delay"],Wv={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)"},Vv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Wu(e){return`${Math.round(e)}ms`}function Hv(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Uv(e){const t=nt({},Wv,e.easing),r=nt({},Vv,e.duration);return nt({getAutoHeightDuration:Hv,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,l=tn(s,Fv);if(process.env.NODE_ENV!=="production"){const d=h=>typeof h=="string",f=h=>!isNaN(parseFloat(h));!d(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(a)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
109
+ `)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Wu(i)} ${a} ${typeof c=="string"?c:Wu(c)}`).join(",")}},e,{easing:t,duration:r})}const Yv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},qv=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Zv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=tn(e,qv);if(e.vars&&e.generateCssVars===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.":oo(18));const a=Ov(n),c=Ru(e);let l=Or(c,{mixins:_v(c.breakpoints,r),palette:a,shadows:Bv.slice(),typography:Nv(a,s),transitions:Uv(o),zIndex:nt({},Yv)});if(l=Or(l,i),l=t.reduce((d,f)=>Or(d,f),l),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(h,v)=>{let m;for(m in h){const p=h[m];if(d.indexOf(m)!==-1&&Object.keys(p).length>0){if(process.env.NODE_ENV!=="production"){const b=wa("",m);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${m}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:p}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
110
+ `))}h[m]={}}}};Object.keys(l.components).forEach(h=>{const v=l.components[h].styleOverrides;v&&h.indexOf("Mui")===0&&f(v,h)})}return l.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),l.unstable_sx=function(f){return qs({sx:f,theme:this})},l}const Gv=Zv(),Kv="$$material";function Qv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Xv=xv({themeId:Kv,defaultTheme:Gv,rootShouldForwardProp:e=>Qv(e)&&e!=="classes"});function Jv(e){return wa("MuiSvgIcon",e)}sm("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ey=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],ty=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${en(t)}`,`fontSize${en(r)}`]};return nm(o,Jv,n)},ry=Xv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${en(r.color)}`],t[`fontSize${en(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,l,d,f,h,v,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((a=e.typography)==null||(c=a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem",large:((l=e.typography)==null||(d=l.pxToRem)==null?void 0:d.call(l,35))||"2.1875rem"}[t.fontSize],color:(f=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?f:{action:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),Gs=K.forwardRef(function(t,r){const n=dm({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=n,v=tn(n,ey),m=K.isValidElement(o)&&o.type==="svg",p=nt({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),b={};d||(b.viewBox=h);const w=ty(p);return u.jsxs(ry,nt({as:a,className:Ut(w.root,s),focusable:"false",color:l,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,v,m&&o.props,{ownerState:p,children:[m?o.props.children:o,f?u.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Gs.propTypes={children:ze.node,classes:ze.object,className:ze.string,color:ze.oneOfType([ze.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ze.string]),component:ze.elementType,fontSize:ze.oneOfType([ze.oneOf(["inherit","large","medium","small"]),ze.string]),htmlColor:ze.string,inheritViewBox:ze.bool,shapeRendering:ze.string,sx:ze.oneOfType([ze.arrayOf(ze.oneOfType([ze.func,ze.object,ze.bool])),ze.func,ze.object]),titleAccess:ze.string,viewBox:ze.string}),Gs.muiName="SvgIcon";function ny(e,t){function r(n,o){return u.jsx(Gs,nt({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Gs.muiName,K.memo(K.forwardRef(r))}const oy=Yr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:en,createChainedFunction:$0,createSvgIcon:ny,debounce:L0,deprecatedPropType:z0,isMuiElement:B0,ownerDocument:zl,ownerWindow:F0,requirePropFactory:W0,setRef:Bl,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
111
+ `)),Ul.configure(e)}},unstable_useEnhancedEffect:Fl,unstable_useId:H0,unsupportedProp:U0,useControlled:Y0,useEventCallback:q0,useForkRef:Z0,useIsFocusVisible:rm},Symbol.toStringTag,{value:"Module"})));var Vu;function lt(){return Vu||(Vu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=oy})(ua)),ua}var Hu;function sy(){if(Hu)return no;Hu=1;var e=Je();Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t=e(lt()),r=rt();return no.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),no}var iy=sy();const ay=Xe(iy);var yo={},Uu;function cy(){if(Uu)return yo;Uu=1;var e=Je();Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=void 0;var t=e(lt()),r=rt();return yo.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),yo}var ly=cy();const uy=Xe(ly);var bo={},Yu;function dy(){if(Yu)return bo;Yu=1;var e=Je();Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=void 0;var t=e(lt()),r=rt();return bo.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),bo}var fy=dy();const py=Xe(fy),hy=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=y.useState(!1),[s,i]=y.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return u.jsxs("div",{className:`${Cr.dashboardContainer} ${s?Cr.sidebarCollapsed:""}`,children:[u.jsxs("header",{className:Cr.header,children:[u.jsx(g.IconButton,{onClick:a,className:Cr.menuButton,children:u.jsx(ay,{})}),u.jsx("div",{className:Cr.headerContent,children:e})]}),u.jsxs("aside",{className:`${Cr.sidebar} ${n?Cr.sidebarOpen:""}`,children:[u.jsx("div",{className:Cr.sidebarContent,children:t}),u.jsx(g.IconButton,{onClick:c,className:Cr.collapseButton,style:{display:"none"},children:s?u.jsx(py,{}):u.jsx(uy,{})})]}),u.jsx("main",{className:Cr.mainContent,children:r}),n&&u.jsx("div",{className:Cr.overlay,onClick:a})]})},fn={headerContainer:"_headerContainer_if4sf_1",navAndDate:"_navAndDate_if4sf_17",navButton:"_navButton_if4sf_29",datePickerInput:"_datePickerInput_if4sf_61",datePickerButton:"_datePickerButton_if4sf_91",addEventButton:"_addEventButton_if4sf_135"};function Ks(){return typeof window<"u"}function zn(e){return qu(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $r(e){var t;return(t=(qu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qu(e){return Ks()?e instanceof Node||e instanceof ur(e).Node:!1}function Qt(e){return Ks()?e instanceof Element||e instanceof ur(e).Element:!1}function Lr(e){return Ks()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function Zu(e){return!Ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const my=new Set(["inline","contents"]);function xo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!my.has(o)}const gy=new Set(["table","td","th"]);function vy(e){return gy.has(zn(e))}const yy=[":popover-open",":modal"];function Qs(e){return yy.some(t=>{try{return e.matches(t)}catch{return!1}})}const by=["transform","translate","scale","rotate","perspective"],xy=["transform","translate","scale","rotate","perspective","filter"],_y=["paint","layout","strict","content"];function Wa(e){const t=Va(),r=Qt(e)?vr(e):e;return by.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||xy.some(n=>(r.willChange||"").includes(n))||_y.some(n=>(r.contain||"").includes(n))}function wy(e){let t=nn(e);for(;Lr(t)&&!Bn(t);){if(Wa(t))return t;if(Qs(t))return null;t=nn(t)}return null}function Va(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Sy=new Set(["html","body","#document"]);function Bn(e){return Sy.has(zn(e))}function vr(e){return ur(e).getComputedStyle(e)}function Xs(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nn(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zu(e)&&e.host||$r(e);return Zu(t)?t.host:t}function Gu(e){const t=nn(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lr(t)&&xo(t)?t:Gu(t)}function _o(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=ur(o);if(s){const a=Ha(i);return t.concat(i,i.visualViewport||[],xo(o)?o:[],a&&r?_o(a):[])}return t.concat(o,_o(o,[],r))}function Ha(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Fn=Math.min,pn=Math.max,Js=Math.round,ei=Math.floor,zr=e=>({x:e,y:e}),Cy={left:"right",right:"left",bottom:"top",top:"bottom"},Ey={start:"end",end:"start"};function Dy(e,t,r){return pn(e,Fn(t,r))}function ti(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function ky(e){return e==="x"?"y":"x"}function Ua(e){return e==="y"?"height":"width"}const Ay=new Set(["top","bottom"]);function hn(e){return Ay.has(Wn(e))?"y":"x"}function Ya(e){return ky(hn(e))}function Ty(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=Ya(e),s=Ua(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ri(i)),[i,ri(i)]}function Iy(e){const t=ri(e);return[qa(e),t,qa(t)]}function qa(e){return e.replace(/start|end/g,t=>Ey[t])}const Ku=["left","right"],Qu=["right","left"],My=["top","bottom"],Py=["bottom","top"];function Oy(e,t,r){switch(e){case"top":case"bottom":return r?t?Qu:Ku:t?Ku:Qu;case"left":case"right":return t?My:Py;default:return[]}}function jy(e,t,r,n){const o=wo(e);let s=Oy(Wn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(qa)))),s}function ri(e){return e.replace(/left|right|bottom|top/g,t=>Cy[t])}function Ry(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xu(e){return typeof e!="number"?Ry(e):{top:e,right:e,bottom:e,left:e}}function ni(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var Ny=typeof document<"u",$y=function(){},oi=Ny?y.useLayoutEffect:$y;const Ly={...K}.useInsertionEffect||(e=>e());function zy(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ly(()=>{t.current=e}),K.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Ju(e,t,r){let{reference:n,floating:o}=e;const s=hn(t),i=Ya(t),a=Ua(i),c=Wn(t),l=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let v;switch(c){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-o.width,y:f};break;default:v={x:n.x,y:n.y}}switch(wo(t)){case"start":v[i]-=h*(r&&l?-1:1);break;case"end":v[i]+=h*(r&&l?-1:1);break}return v}const By=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Ju(l,n,c),h=n,v={},m=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:C,y:E,data:S,reset:_}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:l,platform:i,elements:{reference:e,floating:t}});d=C??d,f=E??f,v={...v,[b]:{...v[b],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(l=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Ju(l,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:v}};async function Fy(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=ti(t,e),m=Xu(v),b=a[h?f==="floating"?"reference":"floating":f],w=ni(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(b)))==null||r?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),C=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=ni(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:E,strategy:c}):C);return{top:(w.top-_.top+m.top)/S.y,bottom:(_.bottom-w.bottom+m.bottom)/S.y,left:(w.left-_.left+m.left)/S.x,right:(_.right-w.right+m.right)/S.x}}const Wy=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=ti(e,t)||{};if(l==null)return{};const f=Xu(d),h={x:r,y:n},v=Ya(o),m=Ua(v),p=await i.getDimensions(l),b=v==="y",w=b?"top":"left",C=b?"bottom":"right",E=b?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[v]-h[v]-s.floating[m],_=h[v]-s.reference[v],W=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let D=W?W[E]:0;(!D||!await(i.isElement==null?void 0:i.isElement(W)))&&(D=a.floating[E]||s.floating[m]);const A=S/2-_/2,M=D/2-p[m]/2-1,I=Fn(f[w],M),U=Fn(f[C],M),G=I,F=D-p[m]-U,Y=D/2-p[m]/2+A,oe=Dy(G,Y,F),V=!c.arrow&&wo(o)!=null&&Y!==oe&&s.reference[m]/2-(Y<G?I:U)-p[m]/2<0,N=V?Y<G?Y-G:Y-F:0;return{[v]:h[v]+N,data:{[v]:oe,centerOffset:Y-oe-N,...V&&{alignmentOffset:N}},reset:V}}}),Vy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...b}=ti(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Wn(o),C=hn(a),E=Wn(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),_=h||(E||!p?[ri(a)]:Iy(a)),W=m!=="none";!h&&W&&_.push(...jy(a,p,m,S));const D=[a,..._],A=await Fy(t,b),M=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(A[w]),f){const Y=Ty(o,i,S);M.push(A[Y[0]],A[Y[1]])}if(I=[...I,{placement:o,overflows:M}],!M.every(Y=>Y<=0)){var U,G;const Y=(((U=s.flip)==null?void 0:U.index)||0)+1,oe=D[Y];if(oe&&(!(f==="alignment"?C!==hn(oe):!1)||I.every(ce=>hn(ce.placement)===C?ce.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:oe}};let V=(G=I.filter(N=>N.overflows[0]<=0).sort((N,ce)=>N.overflows[1]-ce.overflows[1])[0])==null?void 0:G.placement;if(!V)switch(v){case"bestFit":{var F;const N=(F=I.filter(ce=>{if(W){const fe=hn(ce.placement);return fe===C||fe==="y"}return!0}).map(ce=>[ce.placement,ce.overflows.filter(fe=>fe>0).reduce((fe,$)=>fe+$,0)]).sort((ce,fe)=>ce[1]-fe[1])[0])==null?void 0:F[0];N&&(V=N);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}},Hy=new Set(["left","top"]);async function Uy(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Wn(r),a=wo(r),c=hn(r)==="y",l=Hy.has(i)?-1:1,d=s&&c?-1:1,f=ti(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(v=a==="end"?m*-1:m),c?{x:v*d,y:h*l}:{x:h*l,y:v*d}}const Yy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Uy(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}};function ed(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Lr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Js(r)!==s||Js(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Za(e){return Qt(e)?e:e.contextElement}function Vn(e){const t=Za(e);if(!Lr(t))return zr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=ed(t);let i=(s?Js(r.width):r.width)/n,a=(s?Js(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const qy=zr(0);function td(e){const t=ur(e);return!Va()||!t.visualViewport?qy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function mn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Za(e);let i=zr(1);t&&(n?Qt(n)&&(i=Vn(n)):i=Vn(e));const a=Zy(s,r,n)?td(s):zr(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=ur(s),v=n&&Qt(n)?ur(n):n;let m=h,p=Ha(m);for(;p&&n&&v!==m;){const b=Vn(p),w=p.getBoundingClientRect(),C=vr(p),E=w.left+(p.clientLeft+parseFloat(C.paddingLeft))*b.x,S=w.top+(p.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,l*=b.y,d*=b.x,f*=b.y,c+=E,l+=S,m=ur(p),p=Ha(m)}}return ni({width:d,height:f,x:c,y:l})}function si(e,t){const r=Xs(e).scrollLeft;return t?t.left+r:mn($r(e)).left+r}function rd(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-si(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Gy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=$r(n),a=t?Qs(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=zr(1);const d=zr(0),f=Lr(n);if((f||!f&&!s)&&((zn(n)!=="body"||xo(i))&&(c=Xs(n)),Lr(n))){const v=mn(n);l=Vn(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const h=i&&!f&&!s?rd(i,c):zr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:r.y*l.y-c.scrollTop*l.y+d.y+h.y}}function Ky(e){return Array.from(e.getClientRects())}function Qy(e){const t=$r(e),r=Xs(e),n=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=pn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+si(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(i+=pn(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const nd=25;function Xy(e,t){const r=ur(e),n=$r(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=Va();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=si(n);if(l<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(n.clientWidth-f.clientWidth-v);m<=nd&&(s-=m)}else l<=nd&&(s+=l);return{width:s,height:i,x:a,y:c}}const Jy=new Set(["absolute","fixed"]);function eb(e,t){const r=mn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Lr(e)?Vn(e):zr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:i,height:a,x:c,y:l}}function od(e,t,r){let n;if(t==="viewport")n=Xy(e,r);else if(t==="document")n=Qy($r(e));else if(Qt(t))n=eb(t,r);else{const o=td(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ni(n)}function sd(e,t){const r=nn(e);return r===t||!Qt(r)||Bn(r)?!1:vr(r).position==="fixed"||sd(r,t)}function tb(e,t){const r=t.get(e);if(r)return r;let n=_o(e,[],!1).filter(a=>Qt(a)&&zn(a)!=="body"),o=null;const s=vr(e).position==="fixed";let i=s?nn(e):e;for(;Qt(i)&&!Bn(i);){const a=vr(i),c=Wa(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Jy.has(o.position)||xo(i)&&!c&&sd(e,i))?n=n.filter(d=>d!==i):o=a,i=nn(i)}return t.set(e,n),n}function rb(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Qs(t)?[]:tb(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((l,d)=>{const f=od(t,d,o);return l.top=pn(f.top,l.top),l.right=Fn(f.right,l.right),l.bottom=Fn(f.bottom,l.bottom),l.left=pn(f.left,l.left),l},od(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function nb(e){const{width:t,height:r}=ed(e);return{width:t,height:r}}function ob(e,t,r){const n=Lr(t),o=$r(t),s=r==="fixed",i=mn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=zr(0);function l(){c.x=si(o)}if(n||!n&&!s)if((zn(t)!=="body"||xo(o))&&(a=Xs(t)),n){const v=mn(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&l();s&&!n&&o&&l();const d=o&&!n&&!s?rd(o,a):zr(0),f=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function Ga(e){return vr(e).position==="static"}function id(e,t){if(!Lr(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return $r(e)===r&&(r=r.ownerDocument.body),r}function ad(e,t){const r=ur(e);if(Qs(e))return r;if(!Lr(e)){let o=nn(e);for(;o&&!Bn(o);){if(Qt(o)&&!Ga(o))return o;o=nn(o)}return r}let n=id(e,t);for(;n&&vy(n)&&Ga(n);)n=id(n,t);return n&&Bn(n)&&Ga(n)&&!Wa(n)?r:n||wy(e)||r}const sb=async function(e){const t=this.getOffsetParent||ad,r=this.getDimensions,n=await r(e.floating);return{reference:ob(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ib(e){return vr(e).direction==="rtl"}const ab={convertOffsetParentRelativeRectToViewportRelativeRect:Gy,getDocumentElement:$r,getClippingRect:rb,getOffsetParent:ad,getElementRects:sb,getClientRects:Ky,getDimensions:nb,getScale:Vn,isElement:Qt,isRTL:ib};function cd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cb(e,t){let r=null,n;const o=$r(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=l;if(a||t(),!h||!v)return;const m=ei(f),p=ei(o.clientWidth-(d+h)),b=ei(o.clientHeight-(f+v)),w=ei(d),E={rootMargin:-m+"px "+-p+"px "+-b+"px "+-w+"px",threshold:pn(0,Fn(1,c))||1};let S=!0;function _(W){const D=W[0].intersectionRatio;if(D!==c){if(!S)return i();D?i(!1,D):n=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!cd(l,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return i(!0),s}function lb(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Za(e),d=o||s?[...l?_o(l):[],..._o(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const f=l&&a?cb(l,r):null;let h=-1,v=null;i&&(v=new ResizeObserver(w=>{let[C]=w;C&&C.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),l&&!c&&v.observe(l),v.observe(t));let m,p=c?mn(e):null;c&&b();function b(){const w=mn(e);p&&!cd(p,w)&&r(),p=w,m=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(C=>{o&&C.removeEventListener("scroll",r),s&&C.removeEventListener("resize",r)}),f?.(),(w=v)==null||w.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const ub=Yy,db=Vy,ld=Wy,fb=(e,t,r)=>{const n=new Map,o={platform:ab,...r},s={...o.platform,_c:n};return By(e,t,{...o,platform:s})};var pb=typeof document<"u",hb=function(){},ii=pb?y.useLayoutEffect:hb;function ai(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ai(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!ai(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ud(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dd(e,t){const r=ud(e);return Math.round(t*r)/r}function Ka(e){const t=K.useRef(e);return ii(()=>{t.current=e}),t}function mb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,f]=K.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=K.useState(n);ai(h,n)||v(n);const[m,p]=K.useState(null),[b,w]=K.useState(null),C=K.useCallback(ce=>{ce!==W.current&&(W.current=ce,p(ce))},[]),E=K.useCallback(ce=>{ce!==D.current&&(D.current=ce,w(ce))},[]),S=s||m,_=i||b,W=K.useRef(null),D=K.useRef(null),A=K.useRef(d),M=c!=null,I=Ka(c),U=Ka(o),G=Ka(l),F=K.useCallback(()=>{if(!W.current||!D.current)return;const ce={placement:t,strategy:r,middleware:h};U.current&&(ce.platform=U.current),fb(W.current,D.current,ce).then(fe=>{const $={...fe,isPositioned:G.current!==!1};Y.current&&!ai(A.current,$)&&(A.current=$,v0.flushSync(()=>{f($)}))})},[h,t,r,U,G]);ii(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(ce=>({...ce,isPositioned:!1})))},[l]);const Y=K.useRef(!1);ii(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ii(()=>{if(S&&(W.current=S),_&&(D.current=_),S&&_){if(I.current)return I.current(S,_,F);F()}},[S,_,F,I,M]);const oe=K.useMemo(()=>({reference:W,floating:D,setReference:C,setFloating:E}),[C,E]),V=K.useMemo(()=>({reference:S,floating:_}),[S,_]),N=K.useMemo(()=>{const ce={position:r,left:0,top:0};if(!V.floating)return ce;const fe=dd(V.floating,d.x),$=dd(V.floating,d.y);return a?{...ce,transform:"translate("+fe+"px, "+$+"px)",...ud(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:$}},[r,a,V.floating,d.x,d.y]);return K.useMemo(()=>({...d,update:F,refs:oe,elements:V,floatingStyles:N}),[d,F,oe,V,N])}const gb=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ld({element:n.current,padding:o}).fn(r):{}:n?ld({element:n,padding:o}).fn(r):{}}}},vb=(e,t)=>({...ub(e),options:[e,t]}),yb=(e,t)=>({...db(e),options:[e,t]}),bb=(e,t)=>({...gb(e),options:[e,t]}),xb={...K};let fd=!1,_b=0;const pd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_b++;function wb(){const[e,t]=K.useState(()=>fd?pd():void 0);return oi(()=>{e==null&&t(pd())},[]),K.useEffect(()=>{fd=!0},[]),e}const hd=xb.useId||wb;let So;process.env.NODE_ENV!=="production"&&(So=new Set);function Sb(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.warn(o)}}function Cb(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.error(o)}}const Eb=K.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:s,shift:i}},width:a=14,height:c=7,tipRadius:l=0,strokeWidth:d=0,staticOffset:f,stroke:h,d:v,style:{transform:m,...p}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||Sb("The `ref` prop is required for `FloatingArrow`."));const w=hd(),[C,E]=K.useState(!1);if(oi(()=>{if(!o)return;vr(o).direction==="rtl"&&E(!0)},[o]),!o)return null;const[S,_]=n.split("-"),W=S==="top"||S==="bottom";let D=f;(W&&i!=null&&i.x||!W&&i!=null&&i.y)&&(D=null);const A=d*2,M=A/2,I=a/2*(l/-8+1),U=c/2*l/4,G=!!v,F=D&&_==="end"?"bottom":"top";let Y=D&&_==="end"?"right":"left";D&&C&&(Y=_==="end"?"left":"right");const oe=s?.x!=null?D||s.x:"",V=s?.y!=null?D||s.y:"",N=v||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(c-U))+(" Q"+a/2+","+c+" "+I+","+(c-U))+" Z",ce={top:G?"rotate(180deg)":"",left:G?"rotate(90deg)":"rotate(-90deg)",bottom:G?"":"rotate(180deg)",right:G?"rotate(-90deg)":"rotate(90deg)"}[S];return u.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:G?a:a+A,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Y]:oe,[F]:V,[S]:W||G?"100%":"calc(100% - "+A/2+"px)",transform:[ce,m].filter(fe=>!!fe).join(" "),...p},children:[A>0&&u.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:h,strokeWidth:A+(v?0:1),d:N}),u.jsx("path",{stroke:A&&!v?b.fill:"none",d:N}),u.jsx("clipPath",{id:w,children:u.jsx("rect",{x:-M,y:M*(G?-1:1),width:a+A,height:a})})]})});function Db(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;(n=e.get(t))==null||n.delete(r)}}}const kb=K.createContext(null),Ab=K.createContext(null),Tb=()=>{var e;return((e=K.useContext(kb))==null?void 0:e.id)||null},Ib=()=>K.useContext(Ab);function Mb(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=hd(),s=K.useRef({}),[i]=K.useState(()=>Db()),a=Tb()!=null;if(process.env.NODE_ENV!=="production"){const v=n.reference;v&&!Qt(v)&&Cb("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]=K.useState(n.reference),d=zy((v,m,p)=>{s.current.openEvent=v?m:void 0,i.emit("openchange",{open:v,event:m,reason:p,nested:a}),r?.(v,m,p)}),f=K.useMemo(()=>({setPositionReference:l}),[]),h=K.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return K.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:h,events:i,floatingId:o,refs:f}),[t,d,h,i,o,f])}function Pb(e){e===void 0&&(e={});const{nodeId:t}=e,r=Mb({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=K.useState(null),[a,c]=K.useState(null),d=o?.domReference||s,f=K.useRef(null),h=Ib();oi(()=>{d&&(f.current=d)},[d]);const v=mb({...e,elements:{...o,...a&&{reference:a}}}),m=K.useCallback(E=>{const S=Qt(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;c(S),v.refs.setReference(S)},[v.refs]),p=K.useCallback(E=>{(Qt(E)||E===null)&&(f.current=E,i(E)),(Qt(v.refs.reference.current)||v.refs.reference.current===null||E!==null&&!Qt(E))&&v.refs.setReference(E)},[v.refs]),b=K.useMemo(()=>({...v.refs,setReference:p,setPositionReference:m,domReference:f}),[v.refs,p,m]),w=K.useMemo(()=>({...v.elements,domReference:d}),[v.elements,d]),C=K.useMemo(()=>({...v,...n,refs:b,elements:w,nodeId:t}),[v,b,w,t,n]);return oi(()=>{n.dataRef.current.floatingContext=C;const E=h?.nodesRef.current.find(S=>S.id===t);E&&(E.context=C)}),K.useMemo(()=>({...v,context:C,refs:b,elements:w}),[v,b,w,C])}/*!
112
112
  react-datepicker v8.7.0
113
113
  https://github.com/Hacker0x01/react-datepicker
114
114
  Released under the MIT License.
115
- */var Qa=function(t,r){return Qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},Qa(t,r)};function Zt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qa(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ue=function(){return Ue=Object.assign||function(r){for(var n,o=1,s=arguments.length;o<s;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},Ue.apply(this,arguments)};function Br(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var P2=function(e){var t=e.showTimeSelectOnly,r=t===void 0?!1:t,n=e.showTime,o=n===void 0?!1:n,s=e.className,i=e.children,a=r?"Choose Time":"Choose Date".concat(o?" and Time":"");return y.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},i)},O2=function(e,t){var r=y.useRef(null),n=y.useRef(e);n.current=e;var o=y.useCallback(function(s){var i,a=s.composed&&s.composedPath&&s.composedPath().find(function(c){return c instanceof Node})||s.target;r.current&&!r.current.contains(a)&&(t&&a instanceof HTMLElement&&a.classList.contains(t)||(i=n.current)===null||i===void 0||i.call(n,s))},[t]);return y.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),r},ci=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=O2(r,i);return y.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ve;(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"})(ve||(ve={}));function md(){var e=typeof window<"u"?window:globalThis;return e}var Co=12;function ct(e){if(e==null)return new Date;var t=typeof e=="string"?x.parseISO(e):x.toDate(e);return li(t)?t:new Date}function Xa(e,t,r,n,o){o===void 0&&(o=ct());for(var s=Un(r)||Un(ec()),i=Array.isArray(t)?t:[t],a=0,c=i;a<c.length;a++){var u=c[a],d=x.parse(e,u,o,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(li(d)&&(!n||e===yt(d,u,r)))return d}return null}function li(e,t){return x.isValid(e)&&!x.isBefore(e,new Date("1/1/1800"))}function yt(e,t,r){if(r==="en")return x.format(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?Un(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||Un(ec()),x.format(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function yr(e,t){var r=t.dateFormat,n=t.locale,o=Array.isArray(r)&&r.length>0?r[0]:r;return e&&yt(e,o,n)||""}var gd=" - ";function j2(e,t,r){if(!e&&!t)return"";var n=e?yr(e,r):"",o=t?yr(t,r):"",s=r.rangeSeparator||gd;return"".concat(n).concat(s).concat(o)}function R2(e,t){if(!e?.length)return"";var r=e[0]?yr(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=yr(e[1],t);return"".concat(r,", ").concat(n)}var o=e.length-1;return"".concat(r," (+").concat(o,")")}function Ja(e,t){var r=t.hour,n=r===void 0?0:r,o=t.minute,s=o===void 0?0:o,i=t.second,a=i===void 0?0:i;return x.setHours(x.setMinutes(x.setSeconds(e,a),s),n)}function N2(e){return x.getISOWeek(e)}function $2(e,t){return yt(e,"ddd",t)}function ui(e){return x.startOfDay(e)}function on(e,t,r){var n=Un(t||ec());return x.startOfWeek(e,{locale:n,weekStartsOn:r})}function Zr(e){return x.startOfMonth(e)}function Eo(e){return x.startOfYear(e)}function vd(e){return x.startOfQuarter(e)}function yd(){return x.startOfDay(ct())}function bd(e){return x.endOfDay(e)}function L2(e){return x.endOfWeek(e)}function z2(e){return x.endOfMonth(e)}function Fr(e,t){return e&&t?x.isSameYear(e,t):!e&&!t}function tr(e,t){return e&&t?x.isSameMonth(e,t):!e&&!t}function di(e,t){return e&&t?x.isSameQuarter(e,t):!e&&!t}function He(e,t){return e&&t?x.isSameDay(e,t):!e&&!t}function gn(e,t){return e&&t?x.isEqual(e,t):!e&&!t}function vn(e,t,r){var n,o=x.startOfDay(t),s=x.endOfDay(r);try{n=x.isWithinInterval(e,{start:o,end:s})}catch{n=!1}return n}function ec(){var e=md();return e.__localeId__}function Un(e){if(typeof e=="string"){var t=md();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function B2(e,t,r){return t(yt(e,"EEEE",r))}function F2(e,t){return yt(e,"EEEEEE",t)}function W2(e,t){return yt(e,"EEE",t)}function tc(e,t){return yt(x.setMonth(ct(),e),"LLLL",t)}function xd(e,t){return yt(x.setMonth(ct(),e),"LLL",t)}function V2(e,t){return yt(x.setQuarter(ct(),e),"QQQ",t)}function br(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.excludeDateIntervals,a=r.includeDates,c=r.includeDateIntervals,u=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(d){return d instanceof Date?He(e,d):He(e,d.date)})||i&&i.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||a&&!a.some(function(d){return He(e,d)})||c&&!c.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||u&&!u(ct(e))||!1}function rc(e,t){var r=t===void 0?{}:t,n=r.excludeDates,o=r.excludeDateIntervals;return o&&o.length>0?o.some(function(s){var i=s.start,a=s.end;return x.isWithinInterval(e,{start:i,end:a})}):n&&n.some(function(s){var i;return s instanceof Date?He(e,s):He(e,(i=s.date)!==null&&i!==void 0?i:new Date)})||!1}function _d(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n?x.startOfMonth(n):void 0,maxDate:o?x.endOfMonth(o):void 0})||s?.some(function(c){return tr(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return tr(e,c)})||a&&!a(ct(e))||!1}function fi(e,t,r,n){var o=x.getYear(e),s=x.getMonth(e),i=x.getYear(t),a=x.getMonth(t),c=x.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function U2(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(a){return tr(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return tr(a,e)})||!1}function pi(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s?.some(function(c){return di(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return di(e,c)})||a&&!a(ct(e))||!1}function hi(e,t,r){if(!t||!r||!x.isValid(t)||!x.isValid(r))return!1;var n=x.getYear(t),o=x.getYear(r);return n<=e&&o>=e}function mi(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate,c=new Date(e,0,1);return Do(c,{minDate:n?x.startOfYear(n):void 0,maxDate:o?x.endOfYear(o):void 0})||s?.some(function(u){return Fr(c,u instanceof Date?u:u.date)})||i&&!i.some(function(u){return Fr(c,u)})||a&&!a(ct(c))||!1}function gi(e,t,r,n){var o=x.getYear(e),s=x.getQuarter(e),i=x.getYear(t),a=x.getQuarter(t),c=x.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function Do(e,t){var r,n=t===void 0?{}:t,o=n.minDate,s=n.maxDate;return(r=o&&x.differenceInCalendarDays(e,o)<0||s&&x.differenceInCalendarDays(e,s)>0)!==null&&r!==void 0?r:!1}function wd(e,t){return t.some(function(r){return x.getHours(r)===x.getHours(e)&&x.getMinutes(r)===x.getMinutes(e)&&x.getSeconds(r)===x.getSeconds(e)})}function Sd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&wd(e,n)||o&&!wd(e,o)||s&&!s(e)||!1}function Cd(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=ct();o=x.setHours(o,x.getHours(e)),o=x.setMinutes(o,x.getMinutes(e)),o=x.setSeconds(o,x.getSeconds(e));var s=ct();s=x.setHours(s,x.getHours(r)),s=x.setMinutes(s,x.getMinutes(r)),s=x.setSeconds(s,x.getSeconds(r));var i=ct();i=x.setHours(i,x.getHours(n)),i=x.setMinutes(i,x.getMinutes(n)),i=x.setSeconds(i,x.getSeconds(n));var a;try{a=!x.isWithinInterval(o,{start:s,end:i})}catch{a=!1}return a}function Ed(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subMonths(e,1);return n&&x.differenceInCalendarMonths(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(i,s)>0})||!1}function Dd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addMonths(e,1);return n&&x.differenceInCalendarMonths(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(s,i)>0})||!1}function H2(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.startOfYear(e),i=x.subQuarters(s,1);return n&&x.differenceInCalendarQuarters(n,i)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(a,i)>0})||!1}function Y2(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.endOfYear(e),i=x.addQuarters(s,1);return n&&x.differenceInCalendarQuarters(i,n)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(i,a)>0})||!1}function kd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subYears(e,1);return n&&x.differenceInCalendarYears(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarYears(i,s)>0})||!1}function q2(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=Eo(x.subYears(e,s)),a=Gr(i,s).endPeriod,c=n&&x.getYear(n);return c&&c>a||!1}function Ad(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addYears(e,1);return n&&x.differenceInCalendarYears(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarYears(s,i)>0})||!1}function Z2(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=x.addYears(e,s),a=Gr(i,s).startPeriod,c=n&&x.getYear(n);return c&&c<a||!1}function Td(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)>=0});return x.min(n)}else return r?x.min(r):t}function Id(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)<=0});return x.max(n)}else return r?x.max(r):t}function Md(e,t){var r;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var n=new Map,o=0,s=e.length;o<s;o++){var i=e[o];if(x.isDate(i)){var a=yt(i,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(t)||(c.push(t),n.set(a,c))}else if(typeof i=="object"){var u=Object.keys(i),d=(r=u[0])!==null&&r!==void 0?r:"",f=i[d];if(typeof d=="string"&&Array.isArray(f))for(var h=0,v=f.length;h<v;h++){var m=f[h];if(m){var a=yt(m,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function G2(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function K2(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var r=new Map;return e.forEach(function(n){var o=n.date,s=n.holidayName;if(x.isDate(o)){var i=yt(o,"MM.dd.yyyy"),a=r.get(i)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&G2(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Br(Br([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Q2(e,t,r,n,o){for(var s=o.length,i=[],a=0;a<s;a++){var c=e,u=o[a];u&&(c=x.addHours(c,x.getHours(u)),c=x.addMinutes(c,x.getMinutes(u)),c=x.addSeconds(c,x.getSeconds(u)));var d=x.addMinutes(e,(r+1)*n);x.isAfter(c,t)&&x.isBefore(c,d)&&u!=null&&i.push(u)}return i}function Pd(e){return e<10?"0".concat(e):"".concat(e)}function Gr(e,t){t===void 0&&(t=Co);var r=Math.ceil(x.getYear(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function X2(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+r-+t)/36e5)}function Od(e){var t=e.getSeconds(),r=e.getMilliseconds();return x.toDate(e.getTime()-t*1e3-r)}function J2(e,t){return Od(e).getTime()===Od(t).getTime()}function jd(e){if(!x.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function nc(e,t){if(!x.isDate(e)||!x.isDate(t))throw new Error("Invalid date received");var r=jd(e),n=jd(t);return x.isBefore(r,n)}function Rd(e){return e.key===ve.Space}var eb=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=y.createRef(),n.onTimeChange=function(o){var s,i;n.setState({time:o});var a=n.props.date,c=a instanceof Date&&!isNaN(+a),u=c?a:new Date;if(o?.includes(":")){var d=o.split(":"),f=d[0],h=d[1];u.setHours(Number(f)),u.setMinutes(Number(h))}(i=(s=n.props).onChange)===null||i===void 0||i.call(s,u)},n.renderTimeInput=function(){var o=n.state.time,s=n.props,i=s.date,a=s.timeString,c=s.customTimeInput;return c?y.cloneElement(c,{date:i,value:o,onChange:n.onTimeChange}):y.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var u;(u=n.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:o,onChange:function(u){n.onTimeChange(u.target.value||a)}})},n.state={time:n.props.timeString},n}return t.getDerivedStateFromProps=function(r,n){return r.timeString!==n.time?{time:r.timeString}:null},t.prototype.render=function(){return y.createElement("div",{className:"react-datepicker__input-time-container"},y.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),y.createElement("div",{className:"react-datepicker-time__input-container"},y.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(y.Component),tb=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=y.createRef(),r.handleClick=function(n){!r.isDisabled()&&r.props.onClick&&r.props.onClick(n)},r.handleMouseEnter=function(n){!r.isDisabled()&&r.props.onMouseEnter&&r.props.onMouseEnter(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isSameDay=function(n){return He(r.props.day,n)},r.isKeyboardSelected=function(){var n;if(r.props.disabledKeyboardNavigation)return!1;var o=r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(i){return r.isSameDayOrWeek(i)}):r.isSameDayOrWeek(r.props.selected),s=r.props.preSelection&&r.isDisabled(r.props.preSelection);return!o&&r.isSameDayOrWeek(r.props.preSelection)&&!s},r.isDisabled=function(n){return n===void 0&&(n=r.props.day),br(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(){return rc(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return He(r.props.day,on(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&He(n,on(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameDayOrWeek=function(n){return r.isSameDay(n)||r.isSameWeek(n)},r.getHighLightedClass=function(){var n=r.props,o=n.day,s=n.highlightDates;if(!s)return!1;var i=yt(o,"MM.dd.yyyy");return s.get(i)},r.getHolidaysClass=function(){var n,o=r.props,s=o.day,i=o.holidays;if(!i)return[void 0];var a=yt(s,"MM.dd.yyyy");return i.has(a)?[(n=i.get(a))===null||n===void 0?void 0:n.className]:[void 0]},r.isInRange=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:vn(o,s,i)},r.isInSelectingRange=function(){var n,o=r.props,s=o.day,i=o.selectsStart,a=o.selectsEnd,c=o.selectsRange,u=o.selectsDisabledDaysInRange,d=o.startDate,f=o.swapRange,h=o.endDate,v=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!v||!u&&r.isDisabled())return!1;if(i&&h&&(x.isBefore(v,h)||gn(v,h)))return vn(s,v,h);if(a&&d&&(x.isAfter(v,d)||gn(v,d)))return vn(s,d,v);if(c&&d&&!h){if(gn(v,d)||x.isAfter(v,d))return vn(s,d,v);if(f&&x.isBefore(v,d))return vn(s,v,d)}return!1},r.isSelectingRangeStart=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.startDate,a=o.selectsStart,c=o.swapRange,u=o.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?He(s,d):u&&c&&i&&d?He(s,x.isBefore(d,i)?d:i):He(s,i)},r.isSelectingRangeEnd=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.endDate,a=o.selectsEnd,c=o.selectsRange,u=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?He(s,f):c&&u&&d&&f?He(s,x.isBefore(f,d)?d:f):c?He(s,f):He(s,i)},r.isRangeStart=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:He(s,o)},r.isRangeEnd=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:He(i,o)},r.isWeekend=function(){var n=x.getDay(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===x.getMonth(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(x.getMonth(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(ct())},r.isSelected=function(){var n;return r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return r.isSameDayOrWeek(o)}):r.isSameDayOrWeek(r.props.selected)},r.getClassNames=function(n){var o=r.props.dayClassName?r.props.dayClassName(n):void 0;return Ht("react-datepicker__day",o,"react-datepicker__day--"+$2(r.props.day),{"react-datepicker__day--disabled":r.isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSelected(),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isCurrentDay(),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isAfterMonth()||r.isBeforeMonth()},r.getHighLightedClass(),r.getHolidaysClass())},r.getAriaLabel=function(){var n=r.props,o=n.day,s=n.ariaLabelPrefixWhenEnabled,i=s===void 0?"Choose":s,a=n.ariaLabelPrefixWhenDisabled,c=a===void 0?"Not available":a,u=r.isDisabled()||r.isExcluded()?c:i;return"".concat(u," ").concat(yt(o,"PPPP",r.props.locale))},r.getTitle=function(){var n=r.props,o=n.day,s=n.holidays,i=s===void 0?new Map:s,a=n.excludeDates,c=yt(o,"MM.dd.yyyy"),u=[];return i.has(c)&&u.push.apply(u,i.get(c).holidayNames),r.isExcluded()&&u.push(a?.filter(function(d){return d instanceof Date?He(d,o):He(d?.date,o)}).map(function(d){if(!(d instanceof Date))return d?.message})),u.join(", ")},r.getTabIndex=function(){var n=r.props.selected,o=r.props.preSelection,s=!(r.props.showWeekPicker&&(r.props.showWeekNumber||!r.isStartOfWeek()))&&(r.isKeyboardSelected()||r.isSameDay(n)&&He(o,n))?0:-1;return s},r.handleFocusDay=function(){var n;r.shouldFocusDay()&&((n=r.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},r.renderDayContents=function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(x.getDate(r.props.day),r.props.day):x.getDate(r.props.day)},r.render=function(){return y.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.props.usePointerEvent?void 0:r.handleMouseEnter,onPointerEnter:r.props.usePointerEvent?r.handleMouseEnter:void 0,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"gridcell",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&y.createElement("span",{className:"overlay"},r.getTitle()))},r}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var r=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(r=!1),this.isDayActiveElement()&&(r=!0),this.isDuplicateDay()&&(r=!1)),r},t.prototype.isDayActiveElement=function(){var r,n,o;return((n=(r=this.props.containerRef)===null||r===void 0?void 0:r.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t})(y.Component),rb=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=y.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!He(r.props.date,r.props.selected)&&He(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||He(r.props.date,r.props.selected)&&He(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var o=!1;r.getTabIndex()===0&&!n?.isInputFocused&&He(r.props.date,r.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(o=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&r.weekNumberEl.current&&r.weekNumberEl.current.focus({preventScroll:!0})},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(r){this.handleFocusWeekNumber(r)},t.prototype.render=function(){var r=this.props,n=r.weekNumber,o=r.isWeekDisabled,s=r.ariaLabelPrefix,i=s===void 0?t.defaultProps.ariaLabelPrefix:s,a=r.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a&&!o,"react-datepicker__week-number--selected":!!a&&He(this.props.date,this.props.selected)};return y.createElement("div",{ref:this.weekNumberEl,className:Ht(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(y.Component),nb=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return br(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.handleDayClick=function(n,o){r.props.onDayClick&&r.props.onDayClick(n,o)},r.handleDayMouseEnter=function(n){r.props.onDayMouseEnter&&r.props.onDayMouseEnter(n)},r.handleWeekClick=function(n,o,s){for(var i,a,c,u=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var h=!r.isDisabled(f);if(h){u=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(u,o,s),r.props.showWeekPicker&&r.handleDayClick(u,s),((i=r.props.shouldCloseOnSelect)!==null&&i!==void 0?i:t.defaultProps.shouldCloseOnSelect)&&((c=(a=r.props).setOpen)===null||c===void 0||c.call(a,!1))},r.formatWeekNumber=function(n){return r.props.formatWeekNumber?r.props.formatWeekNumber(n):N2(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),o=x.addDays(n,6),s=new Date(n);s<=o;){if(!r.isDisabled(s))return!1;s=x.addDays(s,1)}return!0},r.renderDays=function(){var n=r.startOfWeek(),o=[],s=r.formatWeekNumber(n);if(r.props.showWeekNumber){var i=r.props.onWeekSelect||r.props.showWeekPicker?r.handleWeekClick.bind(r,n,s):void 0;o.push(y.createElement(rb,Ue({key:"W"},t.defaultProps,r.props,{weekNumber:s,isWeekDisabled:r.isWeekDisabled(),date:n,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(a){var c=x.addDays(n,a);return y.createElement(tb,Ue({},t.defaultProps,r.props,{ariaLabelPrefixWhenEnabled:r.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:r.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:r.handleDayClick.bind(r,c),onMouseEnter:r.handleDayMouseEnter.bind(r,c)}))}))},r.startOfWeek=function(){return on(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!He(r.startOfWeek(),r.props.selected)&&He(r.startOfWeek(),r.props.preSelection)},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var r={"react-datepicker__week":!0,"react-datepicker__week--selected":He(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return y.createElement("div",{className:Ht(r,n),role:"row"},this.renderDays())},t})(y.Component),ko,ob=6,Hn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},oc=(ko={},ko[Hn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ko[Hn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ko[Hn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ko),vi=1;function Nd(e,t){return e?Hn.FOUR_COLUMNS:t?Hn.TWO_COLUMNS:Hn.THREE_COLUMNS}var sb=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Br([],Array(12),!0).map(function(){return y.createRef()}),r.QUARTER_REFS=Br([],Array(4),!0).map(function(){return y.createRef()}),r.isDisabled=function(n){return br(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(n){return rc(n,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.handleDayClick=function(n,o){var s,i;(i=(s=r.props).onDayClick)===null||i===void 0||i.call(s,n,o,r.props.orderInDisplay)},r.handleDayMouseEnter=function(n){var o,s;(s=(o=r.props).onDayMouseEnter)===null||s===void 0||s.call(o,n)},r.handleMouseLeave=function(){var n,o;(o=(n=r.props).onMouseLeave)===null||o===void 0||o.call(n)},r.isRangeStartMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:tr(x.setMonth(s,n),i)},r.isRangeStartQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:di(x.setQuarter(s,n),i)},r.isRangeEndMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:tr(x.setMonth(s,n),a)},r.isRangeEndQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:di(x.setQuarter(s,n),a)},r.isInSelectingRangeMonth=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||u)||!h?!1:a&&f?fi(h,f,n,i):c&&d||u&&d&&!f?fi(d,h,n,i):!1},r.isSelectingMonthRangeStart=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.startDate,c=s.selectsStart,u=x.setMonth(i,n),d=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c?tr(u,d):tr(u,a)},r.isSelectingMonthRangeEnd=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.endDate,c=s.selectsEnd,u=s.selectsRange,d=x.setMonth(i,n),f=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c||u?tr(d,f):tr(d,a)},r.isInSelectingRangeQuarter=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||u)||!h?!1:a&&f?gi(h,f,n,i):c&&d||u&&d&&!f?gi(d,h,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=x.addDays(n,6);return tr(n,o)||tr(s,o)},r.isCurrentMonth=function(n,o){return x.getYear(n)===x.getYear(ct())&&o===x.getMonth(ct())},r.isCurrentQuarter=function(n,o){return x.getYear(n)===x.getYear(ct())&&o===x.getQuarter(ct())},r.isSelectedMonth=function(n,o,s){return x.getMonth(s)===o&&x.getYear(n)===x.getYear(s)},r.isSelectMonthInList=function(n,o,s){return s.some(function(i){return r.isSelectedMonth(n,o,i)})},r.isSelectedQuarter=function(n,o,s){return x.getQuarter(n)===o&&x.getYear(n)===x.getYear(s)},r.isMonthSelected=function(){var n=r.props,o=n.day,s=n.selected,i=n.selectedDates,a=n.selectsMultiple,c=x.getMonth(o);return a?i?.some(function(u){return r.isSelectedMonth(o,c,u)}):!!s&&r.isSelectedMonth(o,c,s)},r.renderWeeks=function(){for(var n=[],o=r.props.fixedHeight,s=0,i=!1,a=on(Zr(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(m){return r.props.showWeekPicker?on(m,r.props.locale,r.props.calendarStartDay):r.props.preSelection},u=function(m){return r.props.showWeekPicker?on(m,r.props.locale,r.props.calendarStartDay):r.props.selected},d=r.props.selected?u(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(y.createElement(nb,Ue({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:s,day:a,month:x.getMonth(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!i;){s++,a=x.addWeeks(a,1);var h=o&&s>=ob,v=!o&&!r.isWeekInMonth(a);if(h||v)if(r.props.peekNextMonth)i=!0;else break}return n},r.onMonthClick=function(n,o){var s=r.isMonthDisabledForLabelDate(o),i=s.isDisabled,a=s.labelDate;i||r.handleDayClick(Zr(a),n)},r.onMonthMouseEnter=function(n){var o=r.isMonthDisabledForLabelDate(n),s=o.isDisabled,i=o.labelDate;s||r.handleDayMouseEnter(Zr(i))},r.handleMonthNavigation=function(n,o){var s,i,a,c;(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.MONTH_REFS[n])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus()},r.handleKeyboardNavigation=function(n,o,s){var i,a=r.props,c=a.selected,u=a.preSelection,d=a.setPreSelection,f=a.minDate,h=a.maxDate,v=a.showFourColumnMonthYearPicker,m=a.showTwoColumnMonthYearPicker;if(u){var p=Nd(v,m),b=r.getVerticalOffset(p),w=(i=oc[p])===null||i===void 0?void 0:i.grid,C=function(D,A,M){var I,H,G=A,F=M;switch(D){case ve.ArrowRight:G=x.addMonths(A,vi),F=M===11?0:M+vi;break;case ve.ArrowLeft:G=x.subMonths(A,vi),F=M===0?11:M-vi;break;case ve.ArrowUp:G=x.subMonths(A,b),F=!((I=w?.[0])===null||I===void 0)&&I.includes(M)?M+12-b:M-b;break;case ve.ArrowDown:G=x.addMonths(A,b),F=!((H=w?.[w.length-1])===null||H===void 0)&&H.includes(M)?M-12+b:M+b;break}return{newCalculatedDate:G,newCalculatedMonth:F}},E=function(D,A,M){for(var I=40,H=D,G=!1,F=0,Y=C(H,A,M),oe=Y.newCalculatedDate,V=Y.newCalculatedMonth;!G;){if(F>=I){oe=A,V=M;break}if(f&&oe<f){H=ve.ArrowRight;var N=C(H,oe,V);oe=N.newCalculatedDate,V=N.newCalculatedMonth}if(h&&oe>h){H=ve.ArrowLeft;var N=C(H,oe,V);oe=N.newCalculatedDate,V=N.newCalculatedMonth}if(U2(oe,r.props)){var N=C(H,oe,V);oe=N.newCalculatedDate,V=N.newCalculatedMonth}else G=!0;F++}return{newCalculatedDate:oe,newCalculatedMonth:V}};if(o===ve.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var S=E(o,u,s),_=S.newCalculatedDate,W=S.newCalculatedMonth;switch(o){case ve.ArrowRight:case ve.ArrowLeft:case ve.ArrowUp:case ve.ArrowDown:r.handleMonthNavigation(W,_);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=oc[n])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&s!==void 0?s:0},r.onMonthKeyDown=function(n,o){var s=r.props,i=s.disabledKeyboardNavigation,a=s.handleOnMonthKeyDown,c=n.key;c!==ve.Tab&&n.preventDefault(),i||r.handleKeyboardNavigation(n,c,o),a&&a(n)},r.onQuarterClick=function(n,o){var s=x.setQuarter(r.props.day,o);pi(s,r.props)||r.handleDayClick(vd(s),n)},r.onQuarterMouseEnter=function(n){var o=x.setQuarter(r.props.day,n);pi(o,r.props)||r.handleDayMouseEnter(vd(o))},r.handleQuarterNavigation=function(n,o){var s,i,a,c;r.isDisabled(o)||r.isExcluded(o)||((i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.QUARTER_REFS[n-1])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus())},r.onQuarterKeyDown=function(n,o){var s,i,a=n.key;if(!r.props.disabledKeyboardNavigation)switch(a){case ve.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ve.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,x.addQuarters(r.props.preSelection,1));break;case ve.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===1?4:o-1,x.subQuarters(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var o,s=r.props,i=s.day,a=s.minDate,c=s.maxDate,u=s.excludeDates,d=s.includeDates,f=x.setMonth(i,n);return{isDisabled:(o=(a||c||u||d)&&_d(f,r.props))!==null&&o!==void 0?o:!1,labelDate:f}},r.isMonthDisabled=function(n){var o=r.isMonthDisabledForLabelDate(n).isDisabled;return o},r.getMonthClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.preSelection,u=o.monthClassName,d=u?u(x.setMonth(s,n)):void 0,f=r.getSelection();return Ht("react-datepicker__month-text","react-datepicker__month-".concat(n),d,{"react-datepicker__month-text--disabled":r.isMonthDisabled(n),"react-datepicker__month-text--selected":f?r.isSelectMonthInList(s,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&c&&r.isSelectedMonth(s,n,c)&&!r.isMonthSelected()&&!r.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":i&&a?fi(i,a,n,s):void 0,"react-datepicker__month-text--range-start":r.isRangeStartMonth(n),"react-datepicker__month-text--range-end":r.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":r.isCurrentMonth(s,n)})},r.getTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=x.getMonth(r.props.preSelection),s=r.isMonthDisabledForLabelDate(o).isDisabled,i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getQuarterTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=x.getQuarter(r.props.preSelection),s=pi(r.props.day,r.props),i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getAriaLabel=function(n){var o=r.props,s=o.chooseDayAriaLabelPrefix,i=s===void 0?"Choose":s,a=o.disabledDayAriaLabelPrefix,c=a===void 0?"Not available":a,u=o.day,d=o.locale,f=x.setMonth(u,n),h=r.isDisabled(f)||r.isExcluded(f)?c:i;return"".concat(h," ").concat(yt(f,"MMMM yyyy",d))},r.getQuarterClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.selected,u=o.minDate,d=o.maxDate,f=o.excludeDates,h=o.includeDates,v=o.filterDate,m=o.preSelection,p=o.disabledKeyboardNavigation,b=(u||d||f||h||v)&&pi(x.setQuarter(s,n),r.props);return Ht("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":c?r.isSelectedQuarter(s,n,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!p&&m&&r.isSelectedQuarter(s,n,m)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?gi(i,a,n,s):void 0,"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":r.isCurrentQuarter(s,n)})},r.getMonthContent=function(n){var o=r.props,s=o.showFullMonthYearPicker,i=o.renderMonthContent,a=o.locale,c=o.day,u=xd(n,a),d=tc(n,a);return i?i(n,u,d,c):s?d:u},r.getQuarterContent=function(n){var o,s=r.props,i=s.renderQuarterContent,a=s.locale,c=V2(n,a);return(o=i?.(n,c))!==null&&o!==void 0?o:c},r.renderMonths=function(){var n,o=r.props,s=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,a=o.day,c=o.selected,u=(n=oc[Nd(i,s)])===null||n===void 0?void 0:n.grid;return u?.map(function(d,f){return y.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(h,v){return y.createElement("div",{ref:r.MONTH_REFS[h],key:v,onClick:function(m){r.onMonthClick(m,h)},onKeyDown:function(m){Rd(m)&&(m.preventDefault(),m.key=ve.Enter),r.onMonthKeyDown(m,h)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(h)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(h)}:void 0,tabIndex:Number(r.getTabIndex(h)),className:r.getMonthClassNames(h),"aria-disabled":r.isMonthDisabled(h),role:"option","aria-label":r.getAriaLabel(h),"aria-current":r.isCurrentMonth(a,h)?"date":void 0,"aria-selected":c?r.isSelectedMonth(a,h,c):void 0},r.getMonthContent(h))}))})},r.renderQuarters=function(){var n=r.props,o=n.day,s=n.selected,i=[1,2,3,4];return y.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(a,c){return y.createElement("div",{key:c,ref:r.QUARTER_REFS[c],role:"option",onClick:function(u){r.onQuarterClick(u,a)},onKeyDown:function(u){r.onQuarterKeyDown(u,a)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onQuarterMouseEnter(a)},onPointerEnter:r.props.usePointerEvent?function(){return r.onQuarterMouseEnter(a)}:void 0,className:r.getQuarterClassNames(a),"aria-selected":s?r.isSelectedQuarter(o,a,s):void 0,tabIndex:Number(r.getQuarterTabIndex(a)),"aria-current":r.isCurrentQuarter(o,a)?"date":void 0},r.getQuarterContent(a))}))},r.getClassNames=function(){var n=r.props,o=n.selectingDate,s=n.selectsStart,i=n.selectsEnd,a=n.showMonthYearPicker,c=n.showQuarterYearPicker,u=n.showWeekPicker;return Ht("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":u})},r}return t.prototype.getSelection=function(){var r=this.props,n=r.selected,o=r.selectedDates,s=r.selectsMultiple;if(s)return o;if(n)return[n]},t.prototype.render=function(){var r=this.props,n=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,i=r.ariaLabelPrefix,a=i===void 0?"Month ":i,c=a?a.trim()+" ":"",u=n||o;return u?y.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(yt(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},n?this.renderMonths():this.renderQuarters()):y.createElement("div",{role:"table"},this.props.dayNamesHeader&&y.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),y.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(yt(s,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},t})(y.Component),ib=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.monthOptionButtonsRef={},r.isSelectedMonth=function(n){return r.props.month===n},r.handleOptionKeyDown=function(n,o){var s;switch(o.key){case"Enter":o.preventDefault(),r.onChange(n);break;case"Escape":o.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(n+(o.key==="ArrowUp"?-1:1)+r.props.monthNames.length)%r.props.monthNames.length;(s=r.monthOptionButtonsRef[i])===null||s===void 0||s.focus();break}}},r.renderOptions=function(){return r.monthOptionButtonsRef={},r.props.monthNames.map(function(n,o){return y.createElement("div",{ref:function(s){r.monthOptionButtonsRef[o]=s,r.isSelectedMonth(o)&&s?.focus()},role:"button",tabIndex:0,className:r.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:r.onChange.bind(r,o),onKeyDown:r.handleOptionKeyDown.bind(r,o),"aria-selected":r.isSelectedMonth(o)?"true":void 0},r.isSelectedMonth(o)?y.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},r.onChange=function(n){return r.props.onChange(n)},r.handleClickOutside=function(){return r.props.onCancel()},r}return t.prototype.render=function(){return y.createElement(ci,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),ab=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(n){return n.map(function(o,s){return y.createElement("option",{key:o,value:s},o)})},r.renderSelectMode=function(n){return y.createElement("select",{value:r.props.month,className:"react-datepicker__month-select",onChange:function(o){return r.onChange(parseInt(o.target.value))}},r.renderSelectOptions(n))},r.renderReadView=function(n,o){return y.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[r.props.month]))},r.renderDropdown=function(n){return y.createElement(ib,Ue({key:"dropdown"},r.props,{monthNames:n,onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(n){var o=r.state.dropdownVisible,s=[r.renderReadView(!o,n)];return o&&s.unshift(r.renderDropdown(n)),s},r.onChange=function(n){r.toggleDropdown(),n!==r.props.month&&r.props.onChange(n)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return xd(s,r.props.locale)}:function(s){return tc(s,r.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return y.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},t})(y.Component);function cb(e,t){for(var r=[],n=Zr(e),o=Zr(t);!x.isAfter(n,o);)r.push(ct(n)),n=x.addMonths(n,1);return r}var lb=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(o){var s=x.getTime(o),i=Fr(n.props.date,o)&&tr(n.props.date,o);return y.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:n.onChange.bind(n,s),"aria-selected":i?"true":void 0},i?y.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",yt(o,n.props.dateFormat,n.props.locale))})},n.onChange=function(o){return n.props.onChange(o)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:cb(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=Ht({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return y.createElement(ci,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),ub=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Zr(r.props.minDate),o=Zr(r.props.maxDate),s=[];!x.isAfter(n,o);){var i=x.getTime(n);s.push(y.createElement("option",{key:i,value:i},yt(n,r.props.dateFormat,r.props.locale))),n=x.addMonths(n,1)}return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:x.getTime(Zr(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var o=yt(r.props.date,r.props.dateFormat,r.props.locale);return y.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},r.renderDropdown=function(){return y.createElement(lb,Ue({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown();var o=ct(n);Fr(r.props.date,o)&&tr(r.props.date,o)||r.props.onChange(o)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return y.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(y.Component),db=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={height:null},r.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,o,s;r.list&&(r.list.scrollTop=(s=r.centerLi&&t.calcCenterPosition(r.props.monthRef?r.props.monthRef.clientHeight-((o=(n=r.header)===null||n===void 0?void 0:n.clientHeight)!==null&&o!==void 0?o:0):r.list.clientHeight,r.centerLi))!==null&&s!==void 0?s:0)})},r.handleClick=function(n){var o,s;(r.props.minTime||r.props.maxTime)&&Cd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&Sd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&J2(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&Cd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&Sd(n,r.props)},r.liClasses=function(n){var o,s=["react-datepicker__time-list-item",r.props.timeClassName?r.props.timeClassName(n):void 0];return r.isSelectedTime(n)&&s.push("react-datepicker__time-list-item--selected"),r.isDisabledTime(n)&&s.push("react-datepicker__time-list-item--disabled"),r.props.injectTimes&&(x.getHours(n)*3600+x.getMinutes(n)*60+x.getSeconds(n))%(((o=r.props.intervals)!==null&&o!==void 0?o:t.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},r.handleOnKeyDown=function(n,o){var s,i;n.key===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(n.key===ve.ArrowUp||n.key===ve.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ve.ArrowDown||n.key===ve.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ve.Enter&&r.handleClick(o),(i=(s=r.props).handleOnKeyDown)===null||i===void 0||i.call(s,n)},r.renderTimes=function(){for(var n,o=[],s=typeof r.props.format=="string"?r.props.format:"p",i=(n=r.props.intervals)!==null&&n!==void 0?n:t.defaultProps.intervals,a=r.props.selected||r.props.openToDate||ct(),c=ui(a),u=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*X2(a),f=d/i,h=0;h<f;h++){var v=x.addMinutes(c,h*i);if(o.push(v),u){var m=Q2(c,v,h,i,u);o=o.concat(m)}}var p=o.reduce(function(b,w){return w.getTime()<=a.getTime()?w:b},o[0]);return o.map(function(b){return y.createElement("li",{key:b.valueOf(),onClick:r.handleClick.bind(r,b),className:r.liClasses(b),ref:function(w){b===p&&(r.centerLi=w)},onKeyDown:function(w){r.handleOnKeyDown(w,b)},tabIndex:b===p?0:-1,role:"option","aria-selected":r.isSelectedTime(b)?"true":void 0,"aria-disabled":r.isDisabledTime(b)?"true":void 0},yt(b,s,r.props.locale))})},r.renderTimeCaption=function(){return r.props.showTimeCaption===!1?y.createElement(y.Fragment,null):y.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(r.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){r.header=n}},y.createElement("div",{className:"react-datepicker-time__header"},r.props.timeCaption))},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var r;(r=this.resizeObserver)===null||r===void 0||r.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var r=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){r.updateContainerHeight()}),this.resizeObserver.observe(n))},t.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var r=this,n,o=this.state.height;return y.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),y.createElement("div",{className:"react-datepicker__time"},y.createElement("div",{className:"react-datepicker__time-box"},y.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){r.list=s},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(r,n){return n.offsetTop-(r/2-n.clientHeight/2)},t})(y.Component),$d=3,fb=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Br([],Array(n.props.yearItemNumber),!0).map(function(){return y.createRef()}),n.isDisabled=function(o){return br(o,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(o){return rc(o,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var o;return(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection},n.updateFocusOnPaginate=function(o){var s=function(){var i,a;(a=(i=n.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||a===void 0||a.focus()};window.requestAnimationFrame(s)},n.handleYearClick=function(o,s){n.props.onDayClick&&n.props.onDayClick(o,s)},n.handleYearNavigation=function(o,s){var i,a,c,u,d=n.props,f=d.date,h=d.yearItemNumber;if(!(f===void 0||h===void 0)){var v=Gr(f,h).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-v<0?n.updateFocusOnPaginate(h-(v-o)):o-v>=h?n.updateFocusOnPaginate(Math.abs(h-(o-v))):(u=(c=n.YEAR_REFS[o-v])===null||c===void 0?void 0:c.current)===null||u===void 0||u.focus())}},n.isSameDay=function(o,s){return He(o,s)},n.isCurrentYear=function(o){return o===x.getYear(ct())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&Fr(x.setYear(ct(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Fr(x.setYear(ct(),o),n.props.endDate)},n.isInRange=function(o){return hi(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var s=n.props,i=s.selectsStart,a=s.selectsEnd,c=s.selectsRange,u=s.startDate,d=s.endDate;return!(i||a||c)||!n.selectingDate()?!1:i&&d?hi(o,n.selectingDate(),d):a&&u||c&&u&&!d?hi(o,u,n.selectingDate()):!1},n.isSelectingRangeStart=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.startDate,c=i.selectsStart,u=x.setYear(ct(),o);return c?Fr(u,(s=n.selectingDate())!==null&&s!==void 0?s:null):Fr(u,a??null)},n.isSelectingRangeEnd=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.endDate,c=i.selectsEnd,u=i.selectsRange,d=x.setYear(ct(),o);return c||u?Fr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Fr(d,a??null)},n.isKeyboardSelected=function(o){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var s=n.props,i=s.minDate,a=s.maxDate,c=s.excludeDates,u=s.includeDates,d=s.filterDate,f=s.selected,h=Eo(x.setYear(n.props.date,o)),v=(i||a||c||u||d)&&mi(o,n.props),m=!!f&&He(h,Eo(f)),p=He(h,Eo(n.props.preSelection));return!n.props.inline&&!m&&p&&!v}},n.isSelectedYear=function(o){var s=n.props,i=s.selectsMultiple,a=s.selected,c=s.selectedDates;return i?c?.some(function(u){return o===x.getYear(u)}):!!a&&o===x.getYear(a)},n.onYearClick=function(o,s){var i=n.props.date;i!==void 0&&n.handleYearClick(Eo(x.setYear(i,s)),o)},n.onYearKeyDown=function(o,s){var i,a,c=o.key,u=n.props,d=u.date,f=u.yearItemNumber,h=u.handleOnKeyDown;if(c!==ve.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ve.Enter:if(n.props.selected==null)break;n.onYearClick(o,s),(a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,n.props.selected);break;case ve.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,x.addYears(n.props.preSelection,1));break;case ve.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,x.subYears(n.props.preSelection,1));break;case ve.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var v=Gr(d,f).startPeriod,m=$d,p=s-m;if(p<v){var b=f%m;s>=v&&s<v+b?m=b:m+=b,p=s-m}n.handleYearNavigation(p,x.subYears(n.props.preSelection,m));break}case ve.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Gr(d,f).endPeriod,m=$d,p=s+m;if(p>w){var b=f%m;s<=w&&s>w-b?m=b:m+=b,p=s+m}n.handleYearNavigation(p,x.addYears(n.props.preSelection,m));break}}h&&h(o)},n.getYearClassNames=function(o){var s=n.props,i=s.date,a=s.minDate,c=s.maxDate,u=s.excludeDates,d=s.includeDates,f=s.filterDate,h=s.yearClassName;return Ht("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h?.(x.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(a||c||u||d||f)&&mi(o,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(o),"react-datepicker__year-text--range-start":n.isRangeStart(o),"react-datepicker__year-text--range-end":n.isRangeEnd(o),"react-datepicker__year-text--in-range":n.isInRange(o),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(o),"react-datepicker__year-text--today":n.isCurrentYear(o)})},n.getYearTabIndex=function(o){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var s=x.getYear(n.props.preSelection),i=mi(o,n.props);return o===s&&!i?"0":"-1"},n.getYearContent=function(o){return n.props.renderYearContent?n.props.renderYearContent(o):o},n}return t.prototype.render=function(){var r=this,n=[],o=this.props,s=o.date,i=o.yearItemNumber,a=o.onYearMouseEnter,c=o.onYearMouseLeave;if(s===void 0)return null;for(var u=Gr(s,i),d=u.startPeriod,f=u.endPeriod,h=function(p){n.push(y.createElement("div",{ref:v.YEAR_REFS[p-d],onClick:function(b){r.onYearClick(b,p)},onKeyDown:function(b){Rd(b)&&(b.preventDefault(),b.key=ve.Enter),r.onYearKeyDown(b,p)},tabIndex:Number(v.getYearTabIndex(p)),className:v.getYearClassNames(p),onMouseEnter:v.props.usePointerEvent?void 0:function(b){return a(b,p)},onPointerEnter:v.props.usePointerEvent?function(b){return a(b,p)}:void 0,onMouseLeave:v.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:v.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":v.isCurrentYear(p)?"date":void 0},v.getYearContent(p)))},v=this,m=d;m<=f;m++)h(m);return y.createElement("div",{className:"react-datepicker__year"},y.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},n))},t})(y.Component);function pb(e,t,r,n){for(var o=[],s=0;s<2*t+1;s++){var i=e+t-s,a=!0;r&&(a=x.getYear(r)<=i),n&&a&&(a=x.getYear(n)>=i),a&&o.push(i)}return o}var hb=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,c){var u;switch(c.key){case"Enter":c.preventDefault(),n.onChange(a);break;case"Escape":c.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var d=a+(c.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[d]&&((u=n.yearOptionButtonsRef[d])===null||u===void 0||u.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var a=n.props.year,c=n.state.yearsList.map(function(f){return y.createElement("div",{ref:function(h){n.yearOptionButtonsRef[f]=h,f===a&&h?.focus()},role:"button",tabIndex:0,className:a===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),onKeyDown:n.handleOptionKeyDown.bind(n,f),"aria-selected":a===f?"true":void 0},a===f?y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),u=n.props.minDate?x.getYear(n.props.minDate):null,d=n.props.maxDate?x.getYear(n.props.maxDate):null;return(!d||!n.state.yearsList.find(function(f){return f===d}))&&c.unshift(y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!u||!n.state.yearsList.find(function(f){return f===u}))&&c.push(y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},n.onChange=function(a){n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(a){var c=n.state.yearsList.map(function(u){return u+a});n.setState({yearsList:c})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,i=o||(s?10:5);return n.state={yearsList:pb(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=y.createRef(),n}return t.prototype.componentDidMount=function(){var r=this.dropdownRef.current;if(r){var n=r.children?Array.from(r.children):null,o=n?n.find(function(s){return s.ariaSelected}):null;r.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}},t.prototype.render=function(){var r=Ht({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return y.createElement(ci,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),mb=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=r.props.minDate?x.getYear(r.props.minDate):1900,o=r.props.maxDate?x.getYear(r.props.maxDate):2100,s=[],i=n;i<=o;i++)s.push(y.createElement("option",{key:i,value:i},i));return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return y.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return y.createElement(hb,Ue({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown(),n!==r.props.year&&r.props.onChange(n)},r.toggleDropdown=function(n){r.setState({dropdownVisible:!r.state.dropdownVisible},function(){r.props.adjustDateOnChange&&r.handleYearChange(r.props.date,n)})},r.handleYearChange=function(n,o){var s;(s=r.onSelect)===null||s===void 0||s.call(r,n,o),r.setOpen()},r.onSelect=function(n,o){var s,i;(i=(s=r.props).onSelect)===null||i===void 0||i.call(s,n,o)},r.setOpen=function(){var n,o;(o=(n=r.props).setOpen)===null||o===void 0||o.call(n,!0)},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return y.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(y.Component),gb=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Ld="react-datepicker-ignore-onclickoutside",vb=function(e){var t=(e.className||"").split(/\s+/);return gb.some(function(r){return t.indexOf(r)>=0})},yb=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.monthContainer=void 0,n.handleClickOutside=function(o){n.props.onClickOutside(o)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(o){var s,i;vb(o.target)&&((i=(s=n.props).onDropdownFocus)===null||i===void 0||i.call(s,o))},n.getDateInView=function(){var o=n.props,s=o.preSelection,i=o.selected,a=o.openToDate,c=Td(n.props),u=Id(n.props),d=ct(),f=a||i||s;return f||(c&&x.isBefore(d,c)?c:u&&x.isAfter(d,u)?u:d)},n.increaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.addMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.subMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(o,s,i){n.props.onSelect(o,s,i),n.props.setPreSelection&&n.props.setPreSelection(o)},n.handleDayMouseEnter=function(o){n.setState({selectingDate:o}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(o)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(o,s){n.setState({selectingDate:x.setYear(ct(),s)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(o,s)},n.handleYearMouseLeave=function(o,s){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(o,s)},n.handleYearChange=function(o){var s,i,a,c;(i=(s=n.props).onYearChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(o),(c=(a=n.props).setOpen)===null||c===void 0||c.call(a,!0)),n.props.setPreSelection&&n.props.setPreSelection(o)},n.getEnabledPreSelectionDateForMonth=function(o){if(!br(o,n.props))return o;for(var s=Zr(o),i=z2(o),a=x.differenceInDays(i,s),c=null,u=0;u<=a;u++){var d=x.addDays(s,u);if(!br(d,n.props)){c=d;break}}return c},n.handleMonthChange=function(o){var s,i,a,c=(s=n.getEnabledPreSelectionDateForMonth(o))!==null&&s!==void 0?s:o;n.handleCustomMonthChange(c),n.props.adjustDateOnChange&&(n.props.onSelect(c),(a=(i=n.props).setOpen)===null||a===void 0||a.call(i,!0)),n.props.setPreSelection&&n.props.setPreSelection(c)},n.handleCustomMonthChange=function(o){var s,i;(i=(s=n.props).onMonthChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(o){n.handleYearChange(o),n.handleMonthChange(o)},n.changeYear=function(o){n.setState(function(s){var i=s.date;return{date:x.setYear(i,Number(o))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(o){n.setState(function(s){var i=s.date;return{date:x.setMonth(i,Number(o))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(o){n.setState(function(s){var i=s.date;return{date:x.setYear(x.setMonth(i,x.getMonth(o)),x.getYear(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var s=on(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(y.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},y.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),y.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(a){var c=x.addDays(s,a),u=n.formatWeekday(c,n.props.locale),d=n.props.weekDayClassName?n.props.weekDayClassName(c):void 0;return y.createElement("div",{key:a,role:"columnheader",className:Ht("react-datepicker__day-name",d)},y.createElement("span",{className:"react-datepicker__sr-only"},yt(c,"EEEE",n.props.locale)),y.createElement("span",{"aria-hidden":"true"},u))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?B2(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?W2(o,s):F2(o,s)},n.decreaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.subYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var o,s,i;if(!n.props.renderCustomHeader){var a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,u=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,d=x.subMonths(n.state.date,u),f;switch(!0){case n.props.showMonthYearPicker:f=kd(n.state.date,n.props);break;case n.props.showYearPicker:f=q2(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=H2(n.state.date,n.props);break;default:f=Ed(d,n.props);break}if(!(!((i=n.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],v=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(m=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(v.push("react-datepicker__navigation--previous--disabled"),m=void 0);var p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,C=w===void 0?t.defaultProps.previousMonthButtonLabel:w,E=b.previousYearButtonLabel,S=E===void 0?t.defaultProps.previousYearButtonLabel:E,_=n.props,W=_.previousMonthAriaLabel,D=W===void 0?typeof C=="string"?C:"Previous Month":W,A=_.previousYearAriaLabel,M=A===void 0?typeof S=="string"?S:"Previous Year":A;return y.createElement("button",{type:"button",className:v.join(" "),onClick:m,onKeyDown:n.props.handleOnKeyDown,"aria-label":p?M:D},y.createElement("span",{className:h.join(" ")},p?S:C))}}},n.increaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.addYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var o;if(!n.props.renderCustomHeader){var s;switch(!0){case n.props.showMonthYearPicker:s=Ad(n.state.date,n.props);break;case n.props.showYearPicker:s=Z2(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Y2(n.state.date,n.props);break;default:s=Dd(n.state.date,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&s||n.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var c=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(c=n.increaseYear),s&&n.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),c=void 0);var u=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,h=f===void 0?t.defaultProps.nextMonthButtonLabel:f,v=d.nextYearButtonLabel,m=v===void 0?t.defaultProps.nextYearButtonLabel:v,p=n.props,b=p.nextMonthAriaLabel,w=b===void 0?typeof h=="string"?h:"Next Month":b,C=p.nextYearAriaLabel,E=C===void 0?typeof m=="string"?m:"Next Year":C;return y.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":u?E:w},y.createElement("span",{className:a.join(" ")},u?m:h))}}},n.renderCurrentMonth=function(o){o===void 0&&(o=n.state.date);var s=["react-datepicker__current-month"];return n.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),y.createElement("h2",{className:s.join(" ")},yt(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return y.createElement(mb,Ue({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:x.getYear(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return y.createElement(ab,Ue({},t.defaultProps,n.props,{month:x.getMonth(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return y.createElement(ub,Ue({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(yd(),o),n.props.setPreSelection&&n.props.setPreSelection(yd())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return y.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return y.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var s=o.monthDate,i=o.i;return y.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(s),y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(i!==0),n.renderMonthYearDropdown(i!==0),n.renderYearDropdown(i!==0)))},n.renderCustomHeader=function(o){var s,i,a=o.monthDate,c=o.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var u=n.props,d=u.showYearPicker,f=u.yearItemNumber,h;if(d){var v=Gr(a,f),m=v.startPeriod,p=v.endPeriod;h={startYear:m,endYear:p}}var b=Ed(n.state.date,n.props),w=Dd(n.state.date,n.props),C=kd(n.state.date,n.props),E=Ad(n.state.date,n.props);return y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(i=(s=n.props).renderCustomHeader)===null||i===void 0?void 0:i.call(s,Ue(Ue(Ue({},n.state),d&&{visibleYearsRange:h}),{customHeaderCount:c,monthDate:a,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:b,nextMonthButtonDisabled:w,prevYearButtonDisabled:C,nextYearButtonDisabled:E})))},n.renderYearHeader=function(o){var s=o.monthDate,i=n.props,a=i.showYearPicker,c=i.yearItemNumber,u=c===void 0?t.defaultProps.yearItemNumber:c,d=Gr(s,u),f=d.startPeriod,h=d.endPeriod;return y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(h):x.getYear(s))},n.renderHeader=function(o){var s=o.monthDate,i=o.i,a=i===void 0?0:i,c={monthDate:s,i:a};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(c);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(c);default:return n.renderDefaultHeader(c)}},n.renderMonths=function(){var o,s;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var i=[],a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,u=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(n.state.date,c):x.subMonths(n.state.date,c),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,f=0;f<a;++f){var h=f-d+c,v=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(u,h):x.addMonths(u,h),m="month-".concat(f),p=f<a-1,b=f>0;i.push(y.createElement("div",{key:m,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:v,i:f}),y.createElement(sb,Ue({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:v,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:b,dayNamesHeader:n.renderDayNamesHeader(v)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return y.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),y.createElement(fb,Ue({},t.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return y.createElement(db,Ue({},t.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var o=n.props.selected?new Date(n.props.selected):void 0,s=o&&li(o)&&!!n.props.selected,i=s?"".concat(Pd(o.getHours()),":").concat(Pd(o.getMinutes())):"";if(n.props.showTimeInput)return y.createElement(eb,Ue({},t.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,s=Gr(n.state.date,(o=n.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber),i=s.startPeriod,a=s.endPeriod,c;return n.props.showYearPicker?c="".concat(i," - ").concat(a):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?c=x.getYear(n.state.date):c="".concat(tc(x.getMonth(n.state.date),n.props.locale)," ").concat(x.getYear(n.state.date)),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return y.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=y.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:Ld,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Co}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){r.setState({monthContainer:r.monthContainer})})())},t.prototype.componentDidUpdate=function(r){var n=this;if(this.props.preSelection&&(!He(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var o=!tr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!He(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||P2;return y.createElement(ci,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},y.createElement("div",{style:{display:"contents"},ref:this.containerRef},y.createElement(r,{className:Ht("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())))},t})(y.Component),bb=function(e){var t=e.icon,r=e.className,n=r===void 0?"":r,o=e.onClick,s="react-datepicker__calendar-icon";if(typeof t=="string")return y.createElement("i",{className:"".concat(s," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:o});if(y.isValidElement(t)){var i=t;return y.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(s," ").concat(n),onClick:function(a){typeof i.props.onClick=="function"&&i.props.onClick(a),typeof o=="function"&&o(a)}})}return y.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},y.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"}))},zd=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return t.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)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return pl.createPortal(this.props.children,this.el)},t})(y.Component),xb="[tabindex], a, button, input, select, textarea",_b=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},Bd=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.getTabChildren=function(){var o;return Array.prototype.slice.call((o=n.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(xb),1,-1).filter(_b)},n.handleFocusStart=function(){var o=n.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},n.handleFocusEnd=function(){var o=n.getTabChildren();o&&o.length>1&&o[0].focus()},n.tabLoopRef=y.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(y.Component);function wb(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=y.useRef(null),i=M2(Ue({open:!o,whileElementsMounted:c2,placement:r.popperPlacement,middleware:Br([v2({padding:15}),g2(10),y2({element:s})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),a=Ue(Ue({},r),{hidePopper:o,popperProps:Ue(Ue({},i),{arrowRef:s})});return y.createElement(e,Ue({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var Sb=function(e){var t=e.className,r=e.wrapperClassName,n=e.hidePopper,o=n===void 0?!0:n,s=e.popperComponent,i=e.targetComponent,a=e.enableTabLoop,c=e.popperOnKeyDown,u=e.portalId,d=e.portalHost,f=e.popperProps,h=e.showArrow,v=void 0;if(!o){var m=Ht("react-datepicker-popper",t);v=y.createElement(Bd,{enableTabLoop:a},y.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:c},s,h&&y.createElement(C2,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(v=y.createElement(e.popperContainer,{},v)),u&&!o&&(v=y.createElement(zd,{portalId:u,portalHost:d},v));var p=Ht("react-datepicker-wrapper",r);return y.createElement(y.Fragment,null,y.createElement("div",{ref:f.refs.setReference,className:p},i),v)},Cb=wb(Sb);function Eb(e,t){return e&&t?x.getMonth(e)!==x.getMonth(t)||x.getYear(e)!==x.getYear(t):e!==t}var sc="Date input not valid.",Db=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:ct()},n.modifyHolidays=function(){var o;return(o=n.props.holidays)===null||o===void 0?void 0:o.reduce(function(s,i){var a=new Date(i.date);return li(a)?Br(Br([],s,!0),[Ue(Ue({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=Td(n.props),a=Id(n.props),c=i&&x.isBefore(s,ui(i))?i:a&&x.isAfter(s,bd(a))?a:s;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&o!==void 0?o:c,highlightDates:Md(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var o,s=n.props,i=s.locale,a=s.startDate,c=s.endDate,u=s.rangeSeparator,d=s.selected,f=s.selectedDates,h=s.selectsMultiple,v=s.selectsRange,m=s.value,p=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof m=="string"?m:typeof b=="string"?b:v?j2(a,c,{dateFormat:p,locale:i,rangeSeparator:u}):h?R2(f??[],{dateFormat:p,locale:i}):yr(d,{dateFormat:p,locale:i})},n.resetHiddenStatus=function(){n.setState(Ue(Ue({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(Ue(Ue({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.focus)===null||s===void 0||s.call(o,{preventScroll:!0})},n.setBlur=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.blur)===null||s===void 0||s.call(o),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(o,s){s===void 0&&(s=!1),n.setState({open:o,preSelection:o&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:ic},function(){o||n.setState(function(i){return{focused:s?i.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return x.isDate(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(o){var s,i,a=n.state.wasHidden,c=a?n.state.open:!0;a&&n.resetHiddenStatus(),n.state.preventFocus||((i=(s=n.props).onFocus)===null||i===void 0||i.call(s,o),c&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})},n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(Ue(Ue({},n.state),{inputValue:null}))},n.handleBlur=function(o){var s,i;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((i=(s=n.props).onBlur)===null||i===void 0||i.call(s,o)),n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(o){var s,i;n.props.inline||n.setOpen(!1),(i=(s=n.props).onClickOutside)===null||i===void 0||i.call(s,o),n.props.withPortal&&o.preventDefault()},n.handleChange=function(){for(var o,s,i,a,c,u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var f=u[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:f?.target instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:kb});var h=n.props,v=h.selectsRange,m=h.startDate,p=h.endDate,b=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,w=(s=n.props.strictParsing)!==null&&s!==void 0?s:t.defaultProps.strictParsing,C=f?.target instanceof HTMLInputElement?f.target.value:"";if(v){var E=n.props.rangeSeparator,S=E.trim(),_=C.split(b.includes(S)?E:S,2).map(function(F){return F.trim()}),W=_[0],D=_[1],A=Xa(W??"",b,n.props.locale,w),M=A?Xa(D??"",b,n.props.locale,w):null,I=m?.getTime()!==A?.getTime(),H=p?.getTime()!==M?.getTime();if(!I&&!H||A&&br(A,n.props)||M&&br(M,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[A,M],f)}else{var G=Xa(C,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(G||!C)&&n.setSelected(G,f,!0)}}},n.handleSelect=function(o,s,i){if(!n.props.readOnly){var a=n.props,c=a.selectsRange,u=a.startDate,d=a.endDate,f=a.swapRange,h=!c||u&&!d&&(f||!nc(o,u));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&h&&n.sendFocusBackToInput(),n.props.onChangeRaw&&n.props.onChangeRaw(s),n.setSelected(o,s,!1,i),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(o):h&&n.setOpen(!1)}},n.setSelected=function(o,s,i,a){var c,u,d=o;if(n.props.showYearPicker){if(d!==null&&mi(x.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&_d(d,n.props))return}else if(d!==null&&br(d,n.props))return;var f=n.props,h=f.onChange,v=f.selectsRange,m=f.startDate,p=f.endDate,b=f.selectsMultiple,w=f.selectedDates,C=f.minTime,E=f.swapRange;if(!gn(n.props.selected,d)||n.props.allowSameDay||v||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Ja(d,{hour:x.getHours(n.props.selected),minute:x.getMinutes(n.props.selected),second:x.getSeconds(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&C&&(d=Ja(d,{hour:C.getHours(),minute:C.getMinutes(),second:C.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),v){var S=!m&&!p,_=m&&!p,W=!m&&!!p,D=m&&p;S?h?.([d,null],s):_?d===null?h?.([null,null],s):nc(d,m)?h?.(E?[d,m]:[d,null],s):h?.([m,d],s):W&&(d&&nc(d,p)?h?.([d,p],s):h?.([d,null],s)),D&&h?.([d,null],s)}else if(b){if(d!==null)if(!w?.length)h?.([d],s);else{var A=w.some(function(I){return He(I,d)});if(A){var M=w.filter(function(I){return!He(I,d)});h?.(M,s)}else h?.(Br(Br([],w,!0),[d],!1),s)}}else h?.(d,s);i||((u=(c=n.props).onSelect)===null||u===void 0||u.call(c,d,s),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var s=x.isDate(n.props.minDate),i=x.isDate(n.props.maxDate),a=!0;if(o){var c=ui(o);if(s&&i)a=vn(o,n.props.minDate,n.props.maxDate);else if(s){var u=ui(n.props.minDate);a=x.isAfter(o,u)||gn(c,u)}else if(i){var d=bd(n.props.maxDate);a=x.isBefore(o,d)||gn(c,d)}}a&&n.setState({preSelection:o})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(o){var s,i;if(!(n.props.selectsRange||n.props.selectsMultiple)){var a=n.props.selected?n.props.selected:n.getPreSelection(),c=n.props.selected?o:Ja(a,{hour:x.getHours(o),minute:x.getMinutes(o)});n.setState({preSelection:c}),(i=(s=n.props).onChange)===null||i===void 0||i.call(s,c),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var o,s;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(s=(o=n.props).onInputClick)===null||s===void 0||s.call(o)},n.onInputKeyDown=function(o){var s,i,a,c,u,d;(i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o);var f=o.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===ve.ArrowDown||f===ve.ArrowUp||f===ve.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ve.ArrowDown||f===ve.ArrowUp){o.preventDefault();var h=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',v=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(h);v instanceof HTMLElement&&v.focus({preventScroll:!0});return}var m=ct(n.state.preSelection);f===ve.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===ic?(n.handleSelect(m,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(m)):n.setOpen(!1)):f===ve.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ve.Tab&&n.setOpen(!1),n.inputOk()||(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:sc})}},n.onPortalKeyDown=function(o){var s=o.key;s===ve.Escape&&(o.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(o){var s,i,a,c,u,d,f=n.props,h=f.minDate,v=f.maxDate,m=f.disabledKeyboardNavigation,p=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,C=f.calendarStartDay,E=f.adjustDateOnChange,S=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!m){var _=o.key,W=o.shiftKey,D=ct(n.state.preSelection),A=function(oe,V){var N=V;switch(oe){case ve.ArrowRight:N=p?x.addWeeks(V,1):x.addDays(V,1);break;case ve.ArrowLeft:N=p?x.subWeeks(V,1):x.subDays(V,1);break;case ve.ArrowUp:N=x.subWeeks(V,1);break;case ve.ArrowDown:N=x.addWeeks(V,1);break;case ve.PageUp:N=W?x.subYears(V,1):x.subMonths(V,1);break;case ve.PageDown:N=W?x.addYears(V,1):x.addMonths(V,1);break;case ve.Home:N=on(V,w,C);break;case ve.End:N=L2(V);break}return N},M=function(oe,V){for(var N=40,ae=oe,fe=!1,$=0,Q=A(oe,V);!fe;){if($>=N){Q=V;break}h&&Q<h&&(ae=ve.ArrowRight,Q=br(h,n.props)?A(ae,Q):h),v&&Q>v&&(ae=ve.ArrowLeft,Q=br(v,n.props)?A(ae,Q):v),br(Q,n.props)?((ae===ve.PageUp||ae===ve.Home)&&(ae=ve.ArrowRight),(ae===ve.PageDown||ae===ve.End)&&(ae=ve.ArrowLeft),Q=A(ae,Q)):fe=!0,$++}return Q};if(_===ve.Enter){o.preventDefault(),n.handleSelect(D,o),!b&&n.setPreSelection(D);return}else if(_===ve.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:sc});return}var I=null;switch(_){case ve.ArrowLeft:case ve.ArrowRight:case ve.ArrowUp:case ve.ArrowDown:case ve.PageUp:case ve.PageDown:case ve.Home:case ve.End:I=M(_,D);break}if(!I){(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:sc});return}if(o.preventDefault(),n.setState({lastPreSelectChange:ic}),E&&n.setSelected(I),n.setPreSelection(I),S){var H=x.getMonth(D),G=x.getMonth(I),F=x.getYear(D),Y=x.getYear(I);H!==G||F!==Y?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(o){var s=o.key;s===ve.Escape&&(o.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),n.sendFocusBackToInput();var s=n.props,i=s.selectsRange,a=s.onChange;a?.(i?[null,null]:null,o),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(o){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(o)&&n.setOpen(!1)},n.renderCalendar=function(){var o,s;return!n.props.inline&&!n.isCalendarOpen()?null:y.createElement(yb,Ue({showMonthYearDropdown:void 0,ref:function(i){n.calendar=i}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(o=n.props.dateFormatCalendar)!==null&&o!==void 0?o:t.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:K2(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(s=n.props.dropdownMode)!==null&&s!==void 0?s:t.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var o,s=n.props.locale,i=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,a=n.props.showTimeInput||n.props.showTimeSelect,c=a?"PPPPp":"PPPP",u;return n.props.selectsRange?u="Selected start date: ".concat(yr(n.props.startDate,{dateFormat:c,locale:s}),". ").concat(n.props.endDate?"End date: "+yr(n.props.endDate,{dateFormat:c,locale:s}):""):n.props.showTimeSelectOnly?u="Selected time: ".concat(yr(n.props.selected,{dateFormat:i,locale:s})):n.props.showYearPicker?u="Selected year: ".concat(yr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?u="Selected month: ".concat(yr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?u="Selected quarter: ".concat(yr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(yr(n.props.selected,{dateFormat:c,locale:s})),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},n.renderDateInput=function(){var o,s,i=Ht(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),a=n.props.customInput||y.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref";return y.cloneElement(a,(s={},s[c]=function(u){n.input=u},s.value=n.getInputValue(),s.onBlur=n.handleBlur,s.onChange=n.handleChange,s.onClick=n.onInputClick,s.onFocus=n.handleFocus,s.onKeyDown=n.onInputKeyDown,s.id=n.props.id,s.name=n.props.name,s.form=n.props.form,s.autoFocus=n.props.autoFocus,s.placeholder=n.props.placeholderText,s.disabled=n.props.disabled,s.autoComplete=n.props.autoComplete,s.className=Ht(a.props.className,i),s.title=n.props.title,s.readOnly=n.props.readOnly,s.required=n.props.required,s.tabIndex=n.props.tabIndex,s["aria-describedby"]=n.props.ariaDescribedBy,s["aria-invalid"]=n.props.ariaInvalid,s["aria-labelledby"]=n.props.ariaLabelledBy,s["aria-required"]=n.props.ariaRequired,s))},n.renderClearButton=function(){var o=n.props,s=o.isClearable,i=o.disabled,a=o.selected,c=o.startDate,u=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,h=f===void 0?"":f,v=o.ariaLabelClose,m=v===void 0?"Close":v,p=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||u!=null||p?.length)?y.createElement("button",{type:"button",className:Ht("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,onClick:n.onClearClick,title:d,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:Ld,readOnly:!1,rangeSeparator:gd,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:Co,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(r,n){var o,s,i,a;r.inline&&Eb(r.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Md(this.props.highlightDates)}),!n.focused&&!gn(r.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((s=(o=this.props).onCalendarOpen)===null||s===void 0||s.call(o)),n.open===!0&&this.state.open===!1&&((a=(i=this.props).onCalendarClose)===null||a===void 0||a.call(i)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var r=this.props,n=r.showIcon,o=r.icon,s=r.calendarIconClassname,i=r.calendarIconClassName,a=r.toggleCalendarOnIconClick,c=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),y.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&y.createElement(bb,Ue({icon:o,className:Ht(i,!i&&s,c&&"react-datepicker-ignore-onclickoutside")},a?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var n=this.state.open?y.createElement(Bd,{enableTabLoop:this.props.enableTabLoop},y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=y.createElement(zd,Ue({portalId:this.props.portalId},this.props),n)),y.createElement("div",null,this.renderInputContainer(),n)}return y.createElement(Cb,Ue({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(y.Component),kb="input",ic="navigate";const Ab="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",Tb="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",Ib="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",Fd="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",Mb=y.forwardRef(({value:e,onClick:t},r)=>l.jsxs("button",{className:fn.datePickerButton,onClick:t,ref:r,children:[e,l.jsx("img",{src:Ab,style:{marginLeft:10}})]})),Pb=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>l.jsxs("div",{className:fn.headerContainer,children:[l.jsxs("div",{className:fn.navAndDate,children:[l.jsx("button",{className:fn.navButton,onClick:t,children:l.jsx("img",{src:Tb,width:15})}),l.jsx("button",{className:fn.navButton,onClick:r,children:l.jsx("img",{src:Ib,width:15})}),l.jsx(Db,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:fn.datePickerInput,locale:"es",customInput:l.jsx(Mb,{})})]}),l.jsxs("button",{className:fn.addEventButton,onClick:n,children:[l.jsx("img",{src:Fd}),"Agregar evento"]})]}),xe={sidebarContainer:"_sidebarContainer_1jdt4_1",leadsSection:"_leadsSection_1jdt4_17",leadCard:"_leadCard_1jdt4_33",leadIcon:"_leadIcon_1jdt4_71",leadDays:"_leadDays_1jdt4_81",leadCount:"_leadCount_1jdt4_91",eventsSection:"_eventsSection_1jdt4_103",eventGroup:"_eventGroup_1jdt4_143",eventGroupDate:"_eventGroupDate_1jdt4_151",eventItem:"_eventItem_1jdt4_163",eventDetails:"_eventDetails_1jdt4_195",eventTitle:"_eventTitle_1jdt4_209",eventTime:"_eventTime_1jdt4_231",calendarsSection:"_calendarsSection_1jdt4_253",collapsibleHeader:"_collapsibleHeader_1jdt4_269",headerTitle:"_headerTitle_1jdt4_297",calendarCount:"_calendarCount_1jdt4_311",chevronIcon:"_chevronIcon_1jdt4_329",collapsed:"_collapsed_1jdt4_337",collapsibleContent:"_collapsibleContent_1jdt4_345",hidden:"_hidden_1jdt4_361",circularCheckbox:"_circularCheckbox_1jdt4_379",checkedIcon:"_checkedIcon_1jdt4_397",calendarIcon:"_calendarIcon_1jdt4_413",syncButton:"_syncButton_1jdt4_429",eventsContainer:"_eventsContainer_1jdt4_481",calendarsList:"_calendarsList_1jdt4_555",calendarItemText:"_calendarItemText_1jdt4_613",addEventButton:"_addEventButton_1jdt4_639",customCheckIcon:"_customCheckIcon_1jdt4_693",uncheckedCircle:"_uncheckedCircle_1jdt4_709",calendarSelectButton:"_calendarSelectButton_1jdt4_723",calendarSelected:"_calendarSelected_1jdt4_775",currentUserCalendarTitle:"_currentUserCalendarTitle_1jdt4_795",tabsContainer:"_tabsContainer_1jdt4_831",tabButton:"_tabButton_1jdt4_851",activeTab:"_activeTab_1jdt4_887",alertBadge:"_alertBadge_1jdt4_901"};/**
115
+ */var Qa=function(t,r){return Qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},Qa(t,r)};function Zt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qa(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var He=function(){return He=Object.assign||function(r){for(var n,o=1,s=arguments.length;o<s;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},He.apply(this,arguments)};function Br(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ob=function(e){var t=e.showTimeSelectOnly,r=t===void 0?!1:t,n=e.showTime,o=n===void 0?!1:n,s=e.className,i=e.children,a=r?"Choose Time":"Choose Date".concat(o?" and Time":"");return y.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},i)},jb=function(e,t){var r=y.useRef(null),n=y.useRef(e);n.current=e;var o=y.useCallback(function(s){var i,a=s.composed&&s.composedPath&&s.composedPath().find(function(c){return c instanceof Node})||s.target;r.current&&!r.current.contains(a)&&(t&&a instanceof HTMLElement&&a.classList.contains(t)||(i=n.current)===null||i===void 0||i.call(n,s))},[t]);return y.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),r},ci=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=jb(r,i);return y.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ve;(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"})(ve||(ve={}));function md(){var e=typeof window<"u"?window:globalThis;return e}var Co=12;function ct(e){if(e==null)return new Date;var t=typeof e=="string"?x.parseISO(e):x.toDate(e);return li(t)?t:new Date}function Xa(e,t,r,n,o){o===void 0&&(o=ct());for(var s=Hn(r)||Hn(ec()),i=Array.isArray(t)?t:[t],a=0,c=i;a<c.length;a++){var l=c[a],d=x.parse(e,l,o,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(li(d)&&(!n||e===yt(d,l,r)))return d}return null}function li(e,t){return x.isValid(e)&&!x.isBefore(e,new Date("1/1/1800"))}function yt(e,t,r){if(r==="en")return x.format(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?Hn(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||Hn(ec()),x.format(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function yr(e,t){var r=t.dateFormat,n=t.locale,o=Array.isArray(r)&&r.length>0?r[0]:r;return e&&yt(e,o,n)||""}var gd=" - ";function Rb(e,t,r){if(!e&&!t)return"";var n=e?yr(e,r):"",o=t?yr(t,r):"",s=r.rangeSeparator||gd;return"".concat(n).concat(s).concat(o)}function Nb(e,t){if(!e?.length)return"";var r=e[0]?yr(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=yr(e[1],t);return"".concat(r,", ").concat(n)}var o=e.length-1;return"".concat(r," (+").concat(o,")")}function Ja(e,t){var r=t.hour,n=r===void 0?0:r,o=t.minute,s=o===void 0?0:o,i=t.second,a=i===void 0?0:i;return x.setHours(x.setMinutes(x.setSeconds(e,a),s),n)}function $b(e){return x.getISOWeek(e)}function Lb(e,t){return yt(e,"ddd",t)}function ui(e){return x.startOfDay(e)}function on(e,t,r){var n=Hn(t||ec());return x.startOfWeek(e,{locale:n,weekStartsOn:r})}function Zr(e){return x.startOfMonth(e)}function Eo(e){return x.startOfYear(e)}function vd(e){return x.startOfQuarter(e)}function yd(){return x.startOfDay(ct())}function bd(e){return x.endOfDay(e)}function zb(e){return x.endOfWeek(e)}function Bb(e){return x.endOfMonth(e)}function Fr(e,t){return e&&t?x.isSameYear(e,t):!e&&!t}function tr(e,t){return e&&t?x.isSameMonth(e,t):!e&&!t}function di(e,t){return e&&t?x.isSameQuarter(e,t):!e&&!t}function Ue(e,t){return e&&t?x.isSameDay(e,t):!e&&!t}function gn(e,t){return e&&t?x.isEqual(e,t):!e&&!t}function vn(e,t,r){var n,o=x.startOfDay(t),s=x.endOfDay(r);try{n=x.isWithinInterval(e,{start:o,end:s})}catch{n=!1}return n}function ec(){var e=md();return e.__localeId__}function Hn(e){if(typeof e=="string"){var t=md();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function Fb(e,t,r){return t(yt(e,"EEEE",r))}function Wb(e,t){return yt(e,"EEEEEE",t)}function Vb(e,t){return yt(e,"EEE",t)}function tc(e,t){return yt(x.setMonth(ct(),e),"LLLL",t)}function xd(e,t){return yt(x.setMonth(ct(),e),"LLL",t)}function Hb(e,t){return yt(x.setQuarter(ct(),e),"QQQ",t)}function br(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.excludeDateIntervals,a=r.includeDates,c=r.includeDateIntervals,l=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(d){return d instanceof Date?Ue(e,d):Ue(e,d.date)})||i&&i.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||a&&!a.some(function(d){return Ue(e,d)})||c&&!c.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||l&&!l(ct(e))||!1}function rc(e,t){var r=t===void 0?{}:t,n=r.excludeDates,o=r.excludeDateIntervals;return o&&o.length>0?o.some(function(s){var i=s.start,a=s.end;return x.isWithinInterval(e,{start:i,end:a})}):n&&n.some(function(s){var i;return s instanceof Date?Ue(e,s):Ue(e,(i=s.date)!==null&&i!==void 0?i:new Date)})||!1}function _d(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n?x.startOfMonth(n):void 0,maxDate:o?x.endOfMonth(o):void 0})||s?.some(function(c){return tr(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return tr(e,c)})||a&&!a(ct(e))||!1}function fi(e,t,r,n){var o=x.getYear(e),s=x.getMonth(e),i=x.getYear(t),a=x.getMonth(t),c=x.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function Ub(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(a){return tr(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return tr(a,e)})||!1}function pi(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s?.some(function(c){return di(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return di(e,c)})||a&&!a(ct(e))||!1}function hi(e,t,r){if(!t||!r||!x.isValid(t)||!x.isValid(r))return!1;var n=x.getYear(t),o=x.getYear(r);return n<=e&&o>=e}function mi(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate,c=new Date(e,0,1);return Do(c,{minDate:n?x.startOfYear(n):void 0,maxDate:o?x.endOfYear(o):void 0})||s?.some(function(l){return Fr(c,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return Fr(c,l)})||a&&!a(ct(c))||!1}function gi(e,t,r,n){var o=x.getYear(e),s=x.getQuarter(e),i=x.getYear(t),a=x.getQuarter(t),c=x.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function Do(e,t){var r,n=t===void 0?{}:t,o=n.minDate,s=n.maxDate;return(r=o&&x.differenceInCalendarDays(e,o)<0||s&&x.differenceInCalendarDays(e,s)>0)!==null&&r!==void 0?r:!1}function wd(e,t){return t.some(function(r){return x.getHours(r)===x.getHours(e)&&x.getMinutes(r)===x.getMinutes(e)&&x.getSeconds(r)===x.getSeconds(e)})}function Sd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&wd(e,n)||o&&!wd(e,o)||s&&!s(e)||!1}function Cd(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=ct();o=x.setHours(o,x.getHours(e)),o=x.setMinutes(o,x.getMinutes(e)),o=x.setSeconds(o,x.getSeconds(e));var s=ct();s=x.setHours(s,x.getHours(r)),s=x.setMinutes(s,x.getMinutes(r)),s=x.setSeconds(s,x.getSeconds(r));var i=ct();i=x.setHours(i,x.getHours(n)),i=x.setMinutes(i,x.getMinutes(n)),i=x.setSeconds(i,x.getSeconds(n));var a;try{a=!x.isWithinInterval(o,{start:s,end:i})}catch{a=!1}return a}function Ed(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subMonths(e,1);return n&&x.differenceInCalendarMonths(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(i,s)>0})||!1}function Dd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addMonths(e,1);return n&&x.differenceInCalendarMonths(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(s,i)>0})||!1}function Yb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.startOfYear(e),i=x.subQuarters(s,1);return n&&x.differenceInCalendarQuarters(n,i)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(a,i)>0})||!1}function qb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.endOfYear(e),i=x.addQuarters(s,1);return n&&x.differenceInCalendarQuarters(i,n)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(i,a)>0})||!1}function kd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subYears(e,1);return n&&x.differenceInCalendarYears(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarYears(i,s)>0})||!1}function Zb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=Eo(x.subYears(e,s)),a=Gr(i,s).endPeriod,c=n&&x.getYear(n);return c&&c>a||!1}function Ad(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addYears(e,1);return n&&x.differenceInCalendarYears(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarYears(s,i)>0})||!1}function Gb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=x.addYears(e,s),a=Gr(i,s).startPeriod,c=n&&x.getYear(n);return c&&c<a||!1}function Td(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)>=0});return x.min(n)}else return r?x.min(r):t}function Id(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)<=0});return x.max(n)}else return r?x.max(r):t}function Md(e,t){var r;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var n=new Map,o=0,s=e.length;o<s;o++){var i=e[o];if(x.isDate(i)){var a=yt(i,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(t)||(c.push(t),n.set(a,c))}else if(typeof i=="object"){var l=Object.keys(i),d=(r=l[0])!==null&&r!==void 0?r:"",f=i[d];if(typeof d=="string"&&Array.isArray(f))for(var h=0,v=f.length;h<v;h++){var m=f[h];if(m){var a=yt(m,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function Kb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function Qb(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var r=new Map;return e.forEach(function(n){var o=n.date,s=n.holidayName;if(x.isDate(o)){var i=yt(o,"MM.dd.yyyy"),a=r.get(i)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&Kb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Br(Br([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Xb(e,t,r,n,o){for(var s=o.length,i=[],a=0;a<s;a++){var c=e,l=o[a];l&&(c=x.addHours(c,x.getHours(l)),c=x.addMinutes(c,x.getMinutes(l)),c=x.addSeconds(c,x.getSeconds(l)));var d=x.addMinutes(e,(r+1)*n);x.isAfter(c,t)&&x.isBefore(c,d)&&l!=null&&i.push(l)}return i}function Pd(e){return e<10?"0".concat(e):"".concat(e)}function Gr(e,t){t===void 0&&(t=Co);var r=Math.ceil(x.getYear(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function Jb(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+r-+t)/36e5)}function Od(e){var t=e.getSeconds(),r=e.getMilliseconds();return x.toDate(e.getTime()-t*1e3-r)}function e2(e,t){return Od(e).getTime()===Od(t).getTime()}function jd(e){if(!x.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function nc(e,t){if(!x.isDate(e)||!x.isDate(t))throw new Error("Invalid date received");var r=jd(e),n=jd(t);return x.isBefore(r,n)}function Rd(e){return e.key===ve.Space}var t2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=y.createRef(),n.onTimeChange=function(o){var s,i;n.setState({time:o});var a=n.props.date,c=a instanceof Date&&!isNaN(+a),l=c?a:new Date;if(o?.includes(":")){var d=o.split(":"),f=d[0],h=d[1];l.setHours(Number(f)),l.setMinutes(Number(h))}(i=(s=n.props).onChange)===null||i===void 0||i.call(s,l)},n.renderTimeInput=function(){var o=n.state.time,s=n.props,i=s.date,a=s.timeString,c=s.customTimeInput;return c?y.cloneElement(c,{date:i,value:o,onChange:n.onTimeChange}):y.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var l;(l=n.inputRef.current)===null||l===void 0||l.focus()},required:!0,value:o,onChange:function(l){n.onTimeChange(l.target.value||a)}})},n.state={time:n.props.timeString},n}return t.getDerivedStateFromProps=function(r,n){return r.timeString!==n.time?{time:r.timeString}:null},t.prototype.render=function(){return y.createElement("div",{className:"react-datepicker__input-time-container"},y.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),y.createElement("div",{className:"react-datepicker-time__input-container"},y.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(y.Component),r2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=y.createRef(),r.handleClick=function(n){!r.isDisabled()&&r.props.onClick&&r.props.onClick(n)},r.handleMouseEnter=function(n){!r.isDisabled()&&r.props.onMouseEnter&&r.props.onMouseEnter(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isSameDay=function(n){return Ue(r.props.day,n)},r.isKeyboardSelected=function(){var n;if(r.props.disabledKeyboardNavigation)return!1;var o=r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(i){return r.isSameDayOrWeek(i)}):r.isSameDayOrWeek(r.props.selected),s=r.props.preSelection&&r.isDisabled(r.props.preSelection);return!o&&r.isSameDayOrWeek(r.props.preSelection)&&!s},r.isDisabled=function(n){return n===void 0&&(n=r.props.day),br(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(){return rc(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return Ue(r.props.day,on(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&Ue(n,on(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameDayOrWeek=function(n){return r.isSameDay(n)||r.isSameWeek(n)},r.getHighLightedClass=function(){var n=r.props,o=n.day,s=n.highlightDates;if(!s)return!1;var i=yt(o,"MM.dd.yyyy");return s.get(i)},r.getHolidaysClass=function(){var n,o=r.props,s=o.day,i=o.holidays;if(!i)return[void 0];var a=yt(s,"MM.dd.yyyy");return i.has(a)?[(n=i.get(a))===null||n===void 0?void 0:n.className]:[void 0]},r.isInRange=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:vn(o,s,i)},r.isInSelectingRange=function(){var n,o=r.props,s=o.day,i=o.selectsStart,a=o.selectsEnd,c=o.selectsRange,l=o.selectsDisabledDaysInRange,d=o.startDate,f=o.swapRange,h=o.endDate,v=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!v||!l&&r.isDisabled())return!1;if(i&&h&&(x.isBefore(v,h)||gn(v,h)))return vn(s,v,h);if(a&&d&&(x.isAfter(v,d)||gn(v,d)))return vn(s,d,v);if(c&&d&&!h){if(gn(v,d)||x.isAfter(v,d))return vn(s,d,v);if(f&&x.isBefore(v,d))return vn(s,v,d)}return!1},r.isSelectingRangeStart=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.startDate,a=o.selectsStart,c=o.swapRange,l=o.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ue(s,d):l&&c&&i&&d?Ue(s,x.isBefore(d,i)?d:i):Ue(s,i)},r.isSelectingRangeEnd=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.endDate,a=o.selectsEnd,c=o.selectsRange,l=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ue(s,f):c&&l&&d&&f?Ue(s,x.isBefore(f,d)?d:f):c?Ue(s,f):Ue(s,i)},r.isRangeStart=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Ue(s,o)},r.isRangeEnd=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Ue(i,o)},r.isWeekend=function(){var n=x.getDay(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===x.getMonth(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(x.getMonth(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(ct())},r.isSelected=function(){var n;return r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return r.isSameDayOrWeek(o)}):r.isSameDayOrWeek(r.props.selected)},r.getClassNames=function(n){var o=r.props.dayClassName?r.props.dayClassName(n):void 0;return Ut("react-datepicker__day",o,"react-datepicker__day--"+Lb(r.props.day),{"react-datepicker__day--disabled":r.isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSelected(),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isCurrentDay(),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isAfterMonth()||r.isBeforeMonth()},r.getHighLightedClass(),r.getHolidaysClass())},r.getAriaLabel=function(){var n=r.props,o=n.day,s=n.ariaLabelPrefixWhenEnabled,i=s===void 0?"Choose":s,a=n.ariaLabelPrefixWhenDisabled,c=a===void 0?"Not available":a,l=r.isDisabled()||r.isExcluded()?c:i;return"".concat(l," ").concat(yt(o,"PPPP",r.props.locale))},r.getTitle=function(){var n=r.props,o=n.day,s=n.holidays,i=s===void 0?new Map:s,a=n.excludeDates,c=yt(o,"MM.dd.yyyy"),l=[];return i.has(c)&&l.push.apply(l,i.get(c).holidayNames),r.isExcluded()&&l.push(a?.filter(function(d){return d instanceof Date?Ue(d,o):Ue(d?.date,o)}).map(function(d){if(!(d instanceof Date))return d?.message})),l.join(", ")},r.getTabIndex=function(){var n=r.props.selected,o=r.props.preSelection,s=!(r.props.showWeekPicker&&(r.props.showWeekNumber||!r.isStartOfWeek()))&&(r.isKeyboardSelected()||r.isSameDay(n)&&Ue(o,n))?0:-1;return s},r.handleFocusDay=function(){var n;r.shouldFocusDay()&&((n=r.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},r.renderDayContents=function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(x.getDate(r.props.day),r.props.day):x.getDate(r.props.day)},r.render=function(){return y.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.props.usePointerEvent?void 0:r.handleMouseEnter,onPointerEnter:r.props.usePointerEvent?r.handleMouseEnter:void 0,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"gridcell",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&y.createElement("span",{className:"overlay"},r.getTitle()))},r}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var r=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(r=!1),this.isDayActiveElement()&&(r=!0),this.isDuplicateDay()&&(r=!1)),r},t.prototype.isDayActiveElement=function(){var r,n,o;return((n=(r=this.props.containerRef)===null||r===void 0?void 0:r.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t})(y.Component),n2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=y.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ue(r.props.date,r.props.selected)&&Ue(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||Ue(r.props.date,r.props.selected)&&Ue(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var o=!1;r.getTabIndex()===0&&!n?.isInputFocused&&Ue(r.props.date,r.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(o=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&r.weekNumberEl.current&&r.weekNumberEl.current.focus({preventScroll:!0})},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(r){this.handleFocusWeekNumber(r)},t.prototype.render=function(){var r=this.props,n=r.weekNumber,o=r.isWeekDisabled,s=r.ariaLabelPrefix,i=s===void 0?t.defaultProps.ariaLabelPrefix:s,a=r.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a&&!o,"react-datepicker__week-number--selected":!!a&&Ue(this.props.date,this.props.selected)};return y.createElement("div",{ref:this.weekNumberEl,className:Ut(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(y.Component),o2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return br(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.handleDayClick=function(n,o){r.props.onDayClick&&r.props.onDayClick(n,o)},r.handleDayMouseEnter=function(n){r.props.onDayMouseEnter&&r.props.onDayMouseEnter(n)},r.handleWeekClick=function(n,o,s){for(var i,a,c,l=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var h=!r.isDisabled(f);if(h){l=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(l,o,s),r.props.showWeekPicker&&r.handleDayClick(l,s),((i=r.props.shouldCloseOnSelect)!==null&&i!==void 0?i:t.defaultProps.shouldCloseOnSelect)&&((c=(a=r.props).setOpen)===null||c===void 0||c.call(a,!1))},r.formatWeekNumber=function(n){return r.props.formatWeekNumber?r.props.formatWeekNumber(n):$b(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),o=x.addDays(n,6),s=new Date(n);s<=o;){if(!r.isDisabled(s))return!1;s=x.addDays(s,1)}return!0},r.renderDays=function(){var n=r.startOfWeek(),o=[],s=r.formatWeekNumber(n);if(r.props.showWeekNumber){var i=r.props.onWeekSelect||r.props.showWeekPicker?r.handleWeekClick.bind(r,n,s):void 0;o.push(y.createElement(n2,He({key:"W"},t.defaultProps,r.props,{weekNumber:s,isWeekDisabled:r.isWeekDisabled(),date:n,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(a){var c=x.addDays(n,a);return y.createElement(r2,He({},t.defaultProps,r.props,{ariaLabelPrefixWhenEnabled:r.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:r.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:r.handleDayClick.bind(r,c),onMouseEnter:r.handleDayMouseEnter.bind(r,c)}))}))},r.startOfWeek=function(){return on(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ue(r.startOfWeek(),r.props.selected)&&Ue(r.startOfWeek(),r.props.preSelection)},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var r={"react-datepicker__week":!0,"react-datepicker__week--selected":Ue(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return y.createElement("div",{className:Ut(r,n),role:"row"},this.renderDays())},t})(y.Component),ko,s2=6,Un={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},oc=(ko={},ko[Un.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ko[Un.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ko[Un.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ko),vi=1;function Nd(e,t){return e?Un.FOUR_COLUMNS:t?Un.TWO_COLUMNS:Un.THREE_COLUMNS}var i2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Br([],Array(12),!0).map(function(){return y.createRef()}),r.QUARTER_REFS=Br([],Array(4),!0).map(function(){return y.createRef()}),r.isDisabled=function(n){return br(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(n){return rc(n,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.handleDayClick=function(n,o){var s,i;(i=(s=r.props).onDayClick)===null||i===void 0||i.call(s,n,o,r.props.orderInDisplay)},r.handleDayMouseEnter=function(n){var o,s;(s=(o=r.props).onDayMouseEnter)===null||s===void 0||s.call(o,n)},r.handleMouseLeave=function(){var n,o;(o=(n=r.props).onMouseLeave)===null||o===void 0||o.call(n)},r.isRangeStartMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:tr(x.setMonth(s,n),i)},r.isRangeStartQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:di(x.setQuarter(s,n),i)},r.isRangeEndMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:tr(x.setMonth(s,n),a)},r.isRangeEndQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:di(x.setQuarter(s,n),a)},r.isInSelectingRangeMonth=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,l=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||l)||!h?!1:a&&f?fi(h,f,n,i):c&&d||l&&d&&!f?fi(d,h,n,i):!1},r.isSelectingMonthRangeStart=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.startDate,c=s.selectsStart,l=x.setMonth(i,n),d=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c?tr(l,d):tr(l,a)},r.isSelectingMonthRangeEnd=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.endDate,c=s.selectsEnd,l=s.selectsRange,d=x.setMonth(i,n),f=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c||l?tr(d,f):tr(d,a)},r.isInSelectingRangeQuarter=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,l=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||l)||!h?!1:a&&f?gi(h,f,n,i):c&&d||l&&d&&!f?gi(d,h,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=x.addDays(n,6);return tr(n,o)||tr(s,o)},r.isCurrentMonth=function(n,o){return x.getYear(n)===x.getYear(ct())&&o===x.getMonth(ct())},r.isCurrentQuarter=function(n,o){return x.getYear(n)===x.getYear(ct())&&o===x.getQuarter(ct())},r.isSelectedMonth=function(n,o,s){return x.getMonth(s)===o&&x.getYear(n)===x.getYear(s)},r.isSelectMonthInList=function(n,o,s){return s.some(function(i){return r.isSelectedMonth(n,o,i)})},r.isSelectedQuarter=function(n,o,s){return x.getQuarter(n)===o&&x.getYear(n)===x.getYear(s)},r.isMonthSelected=function(){var n=r.props,o=n.day,s=n.selected,i=n.selectedDates,a=n.selectsMultiple,c=x.getMonth(o);return a?i?.some(function(l){return r.isSelectedMonth(o,c,l)}):!!s&&r.isSelectedMonth(o,c,s)},r.renderWeeks=function(){for(var n=[],o=r.props.fixedHeight,s=0,i=!1,a=on(Zr(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(m){return r.props.showWeekPicker?on(m,r.props.locale,r.props.calendarStartDay):r.props.preSelection},l=function(m){return r.props.showWeekPicker?on(m,r.props.locale,r.props.calendarStartDay):r.props.selected},d=r.props.selected?l(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(y.createElement(o2,He({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:s,day:a,month:x.getMonth(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!i;){s++,a=x.addWeeks(a,1);var h=o&&s>=s2,v=!o&&!r.isWeekInMonth(a);if(h||v)if(r.props.peekNextMonth)i=!0;else break}return n},r.onMonthClick=function(n,o){var s=r.isMonthDisabledForLabelDate(o),i=s.isDisabled,a=s.labelDate;i||r.handleDayClick(Zr(a),n)},r.onMonthMouseEnter=function(n){var o=r.isMonthDisabledForLabelDate(n),s=o.isDisabled,i=o.labelDate;s||r.handleDayMouseEnter(Zr(i))},r.handleMonthNavigation=function(n,o){var s,i,a,c;(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.MONTH_REFS[n])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus()},r.handleKeyboardNavigation=function(n,o,s){var i,a=r.props,c=a.selected,l=a.preSelection,d=a.setPreSelection,f=a.minDate,h=a.maxDate,v=a.showFourColumnMonthYearPicker,m=a.showTwoColumnMonthYearPicker;if(l){var p=Nd(v,m),b=r.getVerticalOffset(p),w=(i=oc[p])===null||i===void 0?void 0:i.grid,C=function(D,A,M){var I,U,G=A,F=M;switch(D){case ve.ArrowRight:G=x.addMonths(A,vi),F=M===11?0:M+vi;break;case ve.ArrowLeft:G=x.subMonths(A,vi),F=M===0?11:M-vi;break;case ve.ArrowUp:G=x.subMonths(A,b),F=!((I=w?.[0])===null||I===void 0)&&I.includes(M)?M+12-b:M-b;break;case ve.ArrowDown:G=x.addMonths(A,b),F=!((U=w?.[w.length-1])===null||U===void 0)&&U.includes(M)?M-12+b:M+b;break}return{newCalculatedDate:G,newCalculatedMonth:F}},E=function(D,A,M){for(var I=40,U=D,G=!1,F=0,Y=C(U,A,M),oe=Y.newCalculatedDate,V=Y.newCalculatedMonth;!G;){if(F>=I){oe=A,V=M;break}if(f&&oe<f){U=ve.ArrowRight;var N=C(U,oe,V);oe=N.newCalculatedDate,V=N.newCalculatedMonth}if(h&&oe>h){U=ve.ArrowLeft;var N=C(U,oe,V);oe=N.newCalculatedDate,V=N.newCalculatedMonth}if(Ub(oe,r.props)){var N=C(U,oe,V);oe=N.newCalculatedDate,V=N.newCalculatedMonth}else G=!0;F++}return{newCalculatedDate:oe,newCalculatedMonth:V}};if(o===ve.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var S=E(o,l,s),_=S.newCalculatedDate,W=S.newCalculatedMonth;switch(o){case ve.ArrowRight:case ve.ArrowLeft:case ve.ArrowUp:case ve.ArrowDown:r.handleMonthNavigation(W,_);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=oc[n])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&s!==void 0?s:0},r.onMonthKeyDown=function(n,o){var s=r.props,i=s.disabledKeyboardNavigation,a=s.handleOnMonthKeyDown,c=n.key;c!==ve.Tab&&n.preventDefault(),i||r.handleKeyboardNavigation(n,c,o),a&&a(n)},r.onQuarterClick=function(n,o){var s=x.setQuarter(r.props.day,o);pi(s,r.props)||r.handleDayClick(vd(s),n)},r.onQuarterMouseEnter=function(n){var o=x.setQuarter(r.props.day,n);pi(o,r.props)||r.handleDayMouseEnter(vd(o))},r.handleQuarterNavigation=function(n,o){var s,i,a,c;r.isDisabled(o)||r.isExcluded(o)||((i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.QUARTER_REFS[n-1])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus())},r.onQuarterKeyDown=function(n,o){var s,i,a=n.key;if(!r.props.disabledKeyboardNavigation)switch(a){case ve.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ve.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,x.addQuarters(r.props.preSelection,1));break;case ve.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===1?4:o-1,x.subQuarters(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var o,s=r.props,i=s.day,a=s.minDate,c=s.maxDate,l=s.excludeDates,d=s.includeDates,f=x.setMonth(i,n);return{isDisabled:(o=(a||c||l||d)&&_d(f,r.props))!==null&&o!==void 0?o:!1,labelDate:f}},r.isMonthDisabled=function(n){var o=r.isMonthDisabledForLabelDate(n).isDisabled;return o},r.getMonthClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.preSelection,l=o.monthClassName,d=l?l(x.setMonth(s,n)):void 0,f=r.getSelection();return Ut("react-datepicker__month-text","react-datepicker__month-".concat(n),d,{"react-datepicker__month-text--disabled":r.isMonthDisabled(n),"react-datepicker__month-text--selected":f?r.isSelectMonthInList(s,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&c&&r.isSelectedMonth(s,n,c)&&!r.isMonthSelected()&&!r.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":i&&a?fi(i,a,n,s):void 0,"react-datepicker__month-text--range-start":r.isRangeStartMonth(n),"react-datepicker__month-text--range-end":r.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":r.isCurrentMonth(s,n)})},r.getTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=x.getMonth(r.props.preSelection),s=r.isMonthDisabledForLabelDate(o).isDisabled,i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getQuarterTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=x.getQuarter(r.props.preSelection),s=pi(r.props.day,r.props),i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getAriaLabel=function(n){var o=r.props,s=o.chooseDayAriaLabelPrefix,i=s===void 0?"Choose":s,a=o.disabledDayAriaLabelPrefix,c=a===void 0?"Not available":a,l=o.day,d=o.locale,f=x.setMonth(l,n),h=r.isDisabled(f)||r.isExcluded(f)?c:i;return"".concat(h," ").concat(yt(f,"MMMM yyyy",d))},r.getQuarterClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.selected,l=o.minDate,d=o.maxDate,f=o.excludeDates,h=o.includeDates,v=o.filterDate,m=o.preSelection,p=o.disabledKeyboardNavigation,b=(l||d||f||h||v)&&pi(x.setQuarter(s,n),r.props);return Ut("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":c?r.isSelectedQuarter(s,n,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!p&&m&&r.isSelectedQuarter(s,n,m)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?gi(i,a,n,s):void 0,"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":r.isCurrentQuarter(s,n)})},r.getMonthContent=function(n){var o=r.props,s=o.showFullMonthYearPicker,i=o.renderMonthContent,a=o.locale,c=o.day,l=xd(n,a),d=tc(n,a);return i?i(n,l,d,c):s?d:l},r.getQuarterContent=function(n){var o,s=r.props,i=s.renderQuarterContent,a=s.locale,c=Hb(n,a);return(o=i?.(n,c))!==null&&o!==void 0?o:c},r.renderMonths=function(){var n,o=r.props,s=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,a=o.day,c=o.selected,l=(n=oc[Nd(i,s)])===null||n===void 0?void 0:n.grid;return l?.map(function(d,f){return y.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(h,v){return y.createElement("div",{ref:r.MONTH_REFS[h],key:v,onClick:function(m){r.onMonthClick(m,h)},onKeyDown:function(m){Rd(m)&&(m.preventDefault(),m.key=ve.Enter),r.onMonthKeyDown(m,h)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(h)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(h)}:void 0,tabIndex:Number(r.getTabIndex(h)),className:r.getMonthClassNames(h),"aria-disabled":r.isMonthDisabled(h),role:"option","aria-label":r.getAriaLabel(h),"aria-current":r.isCurrentMonth(a,h)?"date":void 0,"aria-selected":c?r.isSelectedMonth(a,h,c):void 0},r.getMonthContent(h))}))})},r.renderQuarters=function(){var n=r.props,o=n.day,s=n.selected,i=[1,2,3,4];return y.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(a,c){return y.createElement("div",{key:c,ref:r.QUARTER_REFS[c],role:"option",onClick:function(l){r.onQuarterClick(l,a)},onKeyDown:function(l){r.onQuarterKeyDown(l,a)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onQuarterMouseEnter(a)},onPointerEnter:r.props.usePointerEvent?function(){return r.onQuarterMouseEnter(a)}:void 0,className:r.getQuarterClassNames(a),"aria-selected":s?r.isSelectedQuarter(o,a,s):void 0,tabIndex:Number(r.getQuarterTabIndex(a)),"aria-current":r.isCurrentQuarter(o,a)?"date":void 0},r.getQuarterContent(a))}))},r.getClassNames=function(){var n=r.props,o=n.selectingDate,s=n.selectsStart,i=n.selectsEnd,a=n.showMonthYearPicker,c=n.showQuarterYearPicker,l=n.showWeekPicker;return Ut("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":l})},r}return t.prototype.getSelection=function(){var r=this.props,n=r.selected,o=r.selectedDates,s=r.selectsMultiple;if(s)return o;if(n)return[n]},t.prototype.render=function(){var r=this.props,n=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,i=r.ariaLabelPrefix,a=i===void 0?"Month ":i,c=a?a.trim()+" ":"",l=n||o;return l?y.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(yt(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},n?this.renderMonths():this.renderQuarters()):y.createElement("div",{role:"table"},this.props.dayNamesHeader&&y.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),y.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(yt(s,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},t})(y.Component),a2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.monthOptionButtonsRef={},r.isSelectedMonth=function(n){return r.props.month===n},r.handleOptionKeyDown=function(n,o){var s;switch(o.key){case"Enter":o.preventDefault(),r.onChange(n);break;case"Escape":o.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(n+(o.key==="ArrowUp"?-1:1)+r.props.monthNames.length)%r.props.monthNames.length;(s=r.monthOptionButtonsRef[i])===null||s===void 0||s.focus();break}}},r.renderOptions=function(){return r.monthOptionButtonsRef={},r.props.monthNames.map(function(n,o){return y.createElement("div",{ref:function(s){r.monthOptionButtonsRef[o]=s,r.isSelectedMonth(o)&&s?.focus()},role:"button",tabIndex:0,className:r.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:r.onChange.bind(r,o),onKeyDown:r.handleOptionKeyDown.bind(r,o),"aria-selected":r.isSelectedMonth(o)?"true":void 0},r.isSelectedMonth(o)?y.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},r.onChange=function(n){return r.props.onChange(n)},r.handleClickOutside=function(){return r.props.onCancel()},r}return t.prototype.render=function(){return y.createElement(ci,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),c2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(n){return n.map(function(o,s){return y.createElement("option",{key:o,value:s},o)})},r.renderSelectMode=function(n){return y.createElement("select",{value:r.props.month,className:"react-datepicker__month-select",onChange:function(o){return r.onChange(parseInt(o.target.value))}},r.renderSelectOptions(n))},r.renderReadView=function(n,o){return y.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[r.props.month]))},r.renderDropdown=function(n){return y.createElement(a2,He({key:"dropdown"},r.props,{monthNames:n,onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(n){var o=r.state.dropdownVisible,s=[r.renderReadView(!o,n)];return o&&s.unshift(r.renderDropdown(n)),s},r.onChange=function(n){r.toggleDropdown(),n!==r.props.month&&r.props.onChange(n)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return xd(s,r.props.locale)}:function(s){return tc(s,r.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return y.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},t})(y.Component);function l2(e,t){for(var r=[],n=Zr(e),o=Zr(t);!x.isAfter(n,o);)r.push(ct(n)),n=x.addMonths(n,1);return r}var u2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(o){var s=x.getTime(o),i=Fr(n.props.date,o)&&tr(n.props.date,o);return y.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:n.onChange.bind(n,s),"aria-selected":i?"true":void 0},i?y.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",yt(o,n.props.dateFormat,n.props.locale))})},n.onChange=function(o){return n.props.onChange(o)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:l2(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=Ut({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return y.createElement(ci,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),d2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Zr(r.props.minDate),o=Zr(r.props.maxDate),s=[];!x.isAfter(n,o);){var i=x.getTime(n);s.push(y.createElement("option",{key:i,value:i},yt(n,r.props.dateFormat,r.props.locale))),n=x.addMonths(n,1)}return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:x.getTime(Zr(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var o=yt(r.props.date,r.props.dateFormat,r.props.locale);return y.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},r.renderDropdown=function(){return y.createElement(u2,He({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown();var o=ct(n);Fr(r.props.date,o)&&tr(r.props.date,o)||r.props.onChange(o)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return y.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(y.Component),f2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={height:null},r.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,o,s;r.list&&(r.list.scrollTop=(s=r.centerLi&&t.calcCenterPosition(r.props.monthRef?r.props.monthRef.clientHeight-((o=(n=r.header)===null||n===void 0?void 0:n.clientHeight)!==null&&o!==void 0?o:0):r.list.clientHeight,r.centerLi))!==null&&s!==void 0?s:0)})},r.handleClick=function(n){var o,s;(r.props.minTime||r.props.maxTime)&&Cd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&Sd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&e2(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&Cd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&Sd(n,r.props)},r.liClasses=function(n){var o,s=["react-datepicker__time-list-item",r.props.timeClassName?r.props.timeClassName(n):void 0];return r.isSelectedTime(n)&&s.push("react-datepicker__time-list-item--selected"),r.isDisabledTime(n)&&s.push("react-datepicker__time-list-item--disabled"),r.props.injectTimes&&(x.getHours(n)*3600+x.getMinutes(n)*60+x.getSeconds(n))%(((o=r.props.intervals)!==null&&o!==void 0?o:t.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},r.handleOnKeyDown=function(n,o){var s,i;n.key===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(n.key===ve.ArrowUp||n.key===ve.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ve.ArrowDown||n.key===ve.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ve.Enter&&r.handleClick(o),(i=(s=r.props).handleOnKeyDown)===null||i===void 0||i.call(s,n)},r.renderTimes=function(){for(var n,o=[],s=typeof r.props.format=="string"?r.props.format:"p",i=(n=r.props.intervals)!==null&&n!==void 0?n:t.defaultProps.intervals,a=r.props.selected||r.props.openToDate||ct(),c=ui(a),l=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*Jb(a),f=d/i,h=0;h<f;h++){var v=x.addMinutes(c,h*i);if(o.push(v),l){var m=Xb(c,v,h,i,l);o=o.concat(m)}}var p=o.reduce(function(b,w){return w.getTime()<=a.getTime()?w:b},o[0]);return o.map(function(b){return y.createElement("li",{key:b.valueOf(),onClick:r.handleClick.bind(r,b),className:r.liClasses(b),ref:function(w){b===p&&(r.centerLi=w)},onKeyDown:function(w){r.handleOnKeyDown(w,b)},tabIndex:b===p?0:-1,role:"option","aria-selected":r.isSelectedTime(b)?"true":void 0,"aria-disabled":r.isDisabledTime(b)?"true":void 0},yt(b,s,r.props.locale))})},r.renderTimeCaption=function(){return r.props.showTimeCaption===!1?y.createElement(y.Fragment,null):y.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(r.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){r.header=n}},y.createElement("div",{className:"react-datepicker-time__header"},r.props.timeCaption))},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var r;(r=this.resizeObserver)===null||r===void 0||r.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var r=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){r.updateContainerHeight()}),this.resizeObserver.observe(n))},t.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var r=this,n,o=this.state.height;return y.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),y.createElement("div",{className:"react-datepicker__time"},y.createElement("div",{className:"react-datepicker__time-box"},y.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){r.list=s},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(r,n){return n.offsetTop-(r/2-n.clientHeight/2)},t})(y.Component),$d=3,p2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Br([],Array(n.props.yearItemNumber),!0).map(function(){return y.createRef()}),n.isDisabled=function(o){return br(o,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(o){return rc(o,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var o;return(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection},n.updateFocusOnPaginate=function(o){var s=function(){var i,a;(a=(i=n.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||a===void 0||a.focus()};window.requestAnimationFrame(s)},n.handleYearClick=function(o,s){n.props.onDayClick&&n.props.onDayClick(o,s)},n.handleYearNavigation=function(o,s){var i,a,c,l,d=n.props,f=d.date,h=d.yearItemNumber;if(!(f===void 0||h===void 0)){var v=Gr(f,h).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-v<0?n.updateFocusOnPaginate(h-(v-o)):o-v>=h?n.updateFocusOnPaginate(Math.abs(h-(o-v))):(l=(c=n.YEAR_REFS[o-v])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())}},n.isSameDay=function(o,s){return Ue(o,s)},n.isCurrentYear=function(o){return o===x.getYear(ct())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&Fr(x.setYear(ct(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Fr(x.setYear(ct(),o),n.props.endDate)},n.isInRange=function(o){return hi(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var s=n.props,i=s.selectsStart,a=s.selectsEnd,c=s.selectsRange,l=s.startDate,d=s.endDate;return!(i||a||c)||!n.selectingDate()?!1:i&&d?hi(o,n.selectingDate(),d):a&&l||c&&l&&!d?hi(o,l,n.selectingDate()):!1},n.isSelectingRangeStart=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.startDate,c=i.selectsStart,l=x.setYear(ct(),o);return c?Fr(l,(s=n.selectingDate())!==null&&s!==void 0?s:null):Fr(l,a??null)},n.isSelectingRangeEnd=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.endDate,c=i.selectsEnd,l=i.selectsRange,d=x.setYear(ct(),o);return c||l?Fr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Fr(d,a??null)},n.isKeyboardSelected=function(o){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var s=n.props,i=s.minDate,a=s.maxDate,c=s.excludeDates,l=s.includeDates,d=s.filterDate,f=s.selected,h=Eo(x.setYear(n.props.date,o)),v=(i||a||c||l||d)&&mi(o,n.props),m=!!f&&Ue(h,Eo(f)),p=Ue(h,Eo(n.props.preSelection));return!n.props.inline&&!m&&p&&!v}},n.isSelectedYear=function(o){var s=n.props,i=s.selectsMultiple,a=s.selected,c=s.selectedDates;return i?c?.some(function(l){return o===x.getYear(l)}):!!a&&o===x.getYear(a)},n.onYearClick=function(o,s){var i=n.props.date;i!==void 0&&n.handleYearClick(Eo(x.setYear(i,s)),o)},n.onYearKeyDown=function(o,s){var i,a,c=o.key,l=n.props,d=l.date,f=l.yearItemNumber,h=l.handleOnKeyDown;if(c!==ve.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ve.Enter:if(n.props.selected==null)break;n.onYearClick(o,s),(a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,n.props.selected);break;case ve.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,x.addYears(n.props.preSelection,1));break;case ve.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,x.subYears(n.props.preSelection,1));break;case ve.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var v=Gr(d,f).startPeriod,m=$d,p=s-m;if(p<v){var b=f%m;s>=v&&s<v+b?m=b:m+=b,p=s-m}n.handleYearNavigation(p,x.subYears(n.props.preSelection,m));break}case ve.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Gr(d,f).endPeriod,m=$d,p=s+m;if(p>w){var b=f%m;s<=w&&s>w-b?m=b:m+=b,p=s+m}n.handleYearNavigation(p,x.addYears(n.props.preSelection,m));break}}h&&h(o)},n.getYearClassNames=function(o){var s=n.props,i=s.date,a=s.minDate,c=s.maxDate,l=s.excludeDates,d=s.includeDates,f=s.filterDate,h=s.yearClassName;return Ut("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h?.(x.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(a||c||l||d||f)&&mi(o,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(o),"react-datepicker__year-text--range-start":n.isRangeStart(o),"react-datepicker__year-text--range-end":n.isRangeEnd(o),"react-datepicker__year-text--in-range":n.isInRange(o),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(o),"react-datepicker__year-text--today":n.isCurrentYear(o)})},n.getYearTabIndex=function(o){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var s=x.getYear(n.props.preSelection),i=mi(o,n.props);return o===s&&!i?"0":"-1"},n.getYearContent=function(o){return n.props.renderYearContent?n.props.renderYearContent(o):o},n}return t.prototype.render=function(){var r=this,n=[],o=this.props,s=o.date,i=o.yearItemNumber,a=o.onYearMouseEnter,c=o.onYearMouseLeave;if(s===void 0)return null;for(var l=Gr(s,i),d=l.startPeriod,f=l.endPeriod,h=function(p){n.push(y.createElement("div",{ref:v.YEAR_REFS[p-d],onClick:function(b){r.onYearClick(b,p)},onKeyDown:function(b){Rd(b)&&(b.preventDefault(),b.key=ve.Enter),r.onYearKeyDown(b,p)},tabIndex:Number(v.getYearTabIndex(p)),className:v.getYearClassNames(p),onMouseEnter:v.props.usePointerEvent?void 0:function(b){return a(b,p)},onPointerEnter:v.props.usePointerEvent?function(b){return a(b,p)}:void 0,onMouseLeave:v.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:v.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":v.isCurrentYear(p)?"date":void 0},v.getYearContent(p)))},v=this,m=d;m<=f;m++)h(m);return y.createElement("div",{className:"react-datepicker__year"},y.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},n))},t})(y.Component);function h2(e,t,r,n){for(var o=[],s=0;s<2*t+1;s++){var i=e+t-s,a=!0;r&&(a=x.getYear(r)<=i),n&&a&&(a=x.getYear(n)>=i),a&&o.push(i)}return o}var m2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,c){var l;switch(c.key){case"Enter":c.preventDefault(),n.onChange(a);break;case"Escape":c.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var d=a+(c.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[d]&&((l=n.yearOptionButtonsRef[d])===null||l===void 0||l.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var a=n.props.year,c=n.state.yearsList.map(function(f){return y.createElement("div",{ref:function(h){n.yearOptionButtonsRef[f]=h,f===a&&h?.focus()},role:"button",tabIndex:0,className:a===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),onKeyDown:n.handleOptionKeyDown.bind(n,f),"aria-selected":a===f?"true":void 0},a===f?y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),l=n.props.minDate?x.getYear(n.props.minDate):null,d=n.props.maxDate?x.getYear(n.props.maxDate):null;return(!d||!n.state.yearsList.find(function(f){return f===d}))&&c.unshift(y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!l||!n.state.yearsList.find(function(f){return f===l}))&&c.push(y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},n.onChange=function(a){n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(a){var c=n.state.yearsList.map(function(l){return l+a});n.setState({yearsList:c})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,i=o||(s?10:5);return n.state={yearsList:h2(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=y.createRef(),n}return t.prototype.componentDidMount=function(){var r=this.dropdownRef.current;if(r){var n=r.children?Array.from(r.children):null,o=n?n.find(function(s){return s.ariaSelected}):null;r.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}},t.prototype.render=function(){var r=Ut({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return y.createElement(ci,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),g2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=r.props.minDate?x.getYear(r.props.minDate):1900,o=r.props.maxDate?x.getYear(r.props.maxDate):2100,s=[],i=n;i<=o;i++)s.push(y.createElement("option",{key:i,value:i},i));return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return y.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return y.createElement(m2,He({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown(),n!==r.props.year&&r.props.onChange(n)},r.toggleDropdown=function(n){r.setState({dropdownVisible:!r.state.dropdownVisible},function(){r.props.adjustDateOnChange&&r.handleYearChange(r.props.date,n)})},r.handleYearChange=function(n,o){var s;(s=r.onSelect)===null||s===void 0||s.call(r,n,o),r.setOpen()},r.onSelect=function(n,o){var s,i;(i=(s=r.props).onSelect)===null||i===void 0||i.call(s,n,o)},r.setOpen=function(){var n,o;(o=(n=r.props).setOpen)===null||o===void 0||o.call(n,!0)},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return y.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(y.Component),v2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Ld="react-datepicker-ignore-onclickoutside",y2=function(e){var t=(e.className||"").split(/\s+/);return v2.some(function(r){return t.indexOf(r)>=0})},b2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.monthContainer=void 0,n.handleClickOutside=function(o){n.props.onClickOutside(o)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(o){var s,i;y2(o.target)&&((i=(s=n.props).onDropdownFocus)===null||i===void 0||i.call(s,o))},n.getDateInView=function(){var o=n.props,s=o.preSelection,i=o.selected,a=o.openToDate,c=Td(n.props),l=Id(n.props),d=ct(),f=a||i||s;return f||(c&&x.isBefore(d,c)?c:l&&x.isAfter(d,l)?l:d)},n.increaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.addMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.subMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(o,s,i){n.props.onSelect(o,s,i),n.props.setPreSelection&&n.props.setPreSelection(o)},n.handleDayMouseEnter=function(o){n.setState({selectingDate:o}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(o)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(o,s){n.setState({selectingDate:x.setYear(ct(),s)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(o,s)},n.handleYearMouseLeave=function(o,s){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(o,s)},n.handleYearChange=function(o){var s,i,a,c;(i=(s=n.props).onYearChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(o),(c=(a=n.props).setOpen)===null||c===void 0||c.call(a,!0)),n.props.setPreSelection&&n.props.setPreSelection(o)},n.getEnabledPreSelectionDateForMonth=function(o){if(!br(o,n.props))return o;for(var s=Zr(o),i=Bb(o),a=x.differenceInDays(i,s),c=null,l=0;l<=a;l++){var d=x.addDays(s,l);if(!br(d,n.props)){c=d;break}}return c},n.handleMonthChange=function(o){var s,i,a,c=(s=n.getEnabledPreSelectionDateForMonth(o))!==null&&s!==void 0?s:o;n.handleCustomMonthChange(c),n.props.adjustDateOnChange&&(n.props.onSelect(c),(a=(i=n.props).setOpen)===null||a===void 0||a.call(i,!0)),n.props.setPreSelection&&n.props.setPreSelection(c)},n.handleCustomMonthChange=function(o){var s,i;(i=(s=n.props).onMonthChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(o){n.handleYearChange(o),n.handleMonthChange(o)},n.changeYear=function(o){n.setState(function(s){var i=s.date;return{date:x.setYear(i,Number(o))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(o){n.setState(function(s){var i=s.date;return{date:x.setMonth(i,Number(o))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(o){n.setState(function(s){var i=s.date;return{date:x.setYear(x.setMonth(i,x.getMonth(o)),x.getYear(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var s=on(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(y.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},y.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),y.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(a){var c=x.addDays(s,a),l=n.formatWeekday(c,n.props.locale),d=n.props.weekDayClassName?n.props.weekDayClassName(c):void 0;return y.createElement("div",{key:a,role:"columnheader",className:Ut("react-datepicker__day-name",d)},y.createElement("span",{className:"react-datepicker__sr-only"},yt(c,"EEEE",n.props.locale)),y.createElement("span",{"aria-hidden":"true"},l))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?Fb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?Vb(o,s):Wb(o,s)},n.decreaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.subYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var o,s,i;if(!n.props.renderCustomHeader){var a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,l=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,d=x.subMonths(n.state.date,l),f;switch(!0){case n.props.showMonthYearPicker:f=kd(n.state.date,n.props);break;case n.props.showYearPicker:f=Zb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Yb(n.state.date,n.props);break;default:f=Ed(d,n.props);break}if(!(!((i=n.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],v=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(m=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(v.push("react-datepicker__navigation--previous--disabled"),m=void 0);var p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,C=w===void 0?t.defaultProps.previousMonthButtonLabel:w,E=b.previousYearButtonLabel,S=E===void 0?t.defaultProps.previousYearButtonLabel:E,_=n.props,W=_.previousMonthAriaLabel,D=W===void 0?typeof C=="string"?C:"Previous Month":W,A=_.previousYearAriaLabel,M=A===void 0?typeof S=="string"?S:"Previous Year":A;return y.createElement("button",{type:"button",className:v.join(" "),onClick:m,onKeyDown:n.props.handleOnKeyDown,"aria-label":p?M:D},y.createElement("span",{className:h.join(" ")},p?S:C))}}},n.increaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.addYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var o;if(!n.props.renderCustomHeader){var s;switch(!0){case n.props.showMonthYearPicker:s=Ad(n.state.date,n.props);break;case n.props.showYearPicker:s=Gb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=qb(n.state.date,n.props);break;default:s=Dd(n.state.date,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&s||n.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var c=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(c=n.increaseYear),s&&n.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),c=void 0);var l=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,h=f===void 0?t.defaultProps.nextMonthButtonLabel:f,v=d.nextYearButtonLabel,m=v===void 0?t.defaultProps.nextYearButtonLabel:v,p=n.props,b=p.nextMonthAriaLabel,w=b===void 0?typeof h=="string"?h:"Next Month":b,C=p.nextYearAriaLabel,E=C===void 0?typeof m=="string"?m:"Next Year":C;return y.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":l?E:w},y.createElement("span",{className:a.join(" ")},l?m:h))}}},n.renderCurrentMonth=function(o){o===void 0&&(o=n.state.date);var s=["react-datepicker__current-month"];return n.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),y.createElement("h2",{className:s.join(" ")},yt(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return y.createElement(g2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:x.getYear(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return y.createElement(c2,He({},t.defaultProps,n.props,{month:x.getMonth(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return y.createElement(d2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(yd(),o),n.props.setPreSelection&&n.props.setPreSelection(yd())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return y.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return y.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var s=o.monthDate,i=o.i;return y.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(s),y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(i!==0),n.renderMonthYearDropdown(i!==0),n.renderYearDropdown(i!==0)))},n.renderCustomHeader=function(o){var s,i,a=o.monthDate,c=o.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var l=n.props,d=l.showYearPicker,f=l.yearItemNumber,h;if(d){var v=Gr(a,f),m=v.startPeriod,p=v.endPeriod;h={startYear:m,endYear:p}}var b=Ed(n.state.date,n.props),w=Dd(n.state.date,n.props),C=kd(n.state.date,n.props),E=Ad(n.state.date,n.props);return y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(i=(s=n.props).renderCustomHeader)===null||i===void 0?void 0:i.call(s,He(He(He({},n.state),d&&{visibleYearsRange:h}),{customHeaderCount:c,monthDate:a,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:b,nextMonthButtonDisabled:w,prevYearButtonDisabled:C,nextYearButtonDisabled:E})))},n.renderYearHeader=function(o){var s=o.monthDate,i=n.props,a=i.showYearPicker,c=i.yearItemNumber,l=c===void 0?t.defaultProps.yearItemNumber:c,d=Gr(s,l),f=d.startPeriod,h=d.endPeriod;return y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(h):x.getYear(s))},n.renderHeader=function(o){var s=o.monthDate,i=o.i,a=i===void 0?0:i,c={monthDate:s,i:a};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(c);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(c);default:return n.renderDefaultHeader(c)}},n.renderMonths=function(){var o,s;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var i=[],a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,l=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(n.state.date,c):x.subMonths(n.state.date,c),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,f=0;f<a;++f){var h=f-d+c,v=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(l,h):x.addMonths(l,h),m="month-".concat(f),p=f<a-1,b=f>0;i.push(y.createElement("div",{key:m,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:v,i:f}),y.createElement(i2,He({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:v,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:b,dayNamesHeader:n.renderDayNamesHeader(v)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return y.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),y.createElement(p2,He({},t.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return y.createElement(f2,He({},t.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var o=n.props.selected?new Date(n.props.selected):void 0,s=o&&li(o)&&!!n.props.selected,i=s?"".concat(Pd(o.getHours()),":").concat(Pd(o.getMinutes())):"";if(n.props.showTimeInput)return y.createElement(t2,He({},t.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,s=Gr(n.state.date,(o=n.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber),i=s.startPeriod,a=s.endPeriod,c;return n.props.showYearPicker?c="".concat(i," - ").concat(a):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?c=x.getYear(n.state.date):c="".concat(tc(x.getMonth(n.state.date),n.props.locale)," ").concat(x.getYear(n.state.date)),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return y.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=y.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:Ld,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Co}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){r.setState({monthContainer:r.monthContainer})})())},t.prototype.componentDidUpdate=function(r){var n=this;if(this.props.preSelection&&(!Ue(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var o=!tr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!Ue(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||Ob;return y.createElement(ci,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},y.createElement("div",{style:{display:"contents"},ref:this.containerRef},y.createElement(r,{className:Ut("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())))},t})(y.Component),x2=function(e){var t=e.icon,r=e.className,n=r===void 0?"":r,o=e.onClick,s="react-datepicker__calendar-icon";if(typeof t=="string")return y.createElement("i",{className:"".concat(s," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:o});if(y.isValidElement(t)){var i=t;return y.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(s," ").concat(n),onClick:function(a){typeof i.props.onClick=="function"&&i.props.onClick(a),typeof o=="function"&&o(a)}})}return y.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},y.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"}))},zd=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return t.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)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return pl.createPortal(this.props.children,this.el)},t})(y.Component),_2="[tabindex], a, button, input, select, textarea",w2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},Bd=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.getTabChildren=function(){var o;return Array.prototype.slice.call((o=n.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(_2),1,-1).filter(w2)},n.handleFocusStart=function(){var o=n.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},n.handleFocusEnd=function(){var o=n.getTabChildren();o&&o.length>1&&o[0].focus()},n.tabLoopRef=y.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(y.Component);function S2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=y.useRef(null),i=Pb(He({open:!o,whileElementsMounted:lb,placement:r.popperPlacement,middleware:Br([yb({padding:15}),vb(10),bb({element:s})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),a=He(He({},r),{hidePopper:o,popperProps:He(He({},i),{arrowRef:s})});return y.createElement(e,He({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var C2=function(e){var t=e.className,r=e.wrapperClassName,n=e.hidePopper,o=n===void 0?!0:n,s=e.popperComponent,i=e.targetComponent,a=e.enableTabLoop,c=e.popperOnKeyDown,l=e.portalId,d=e.portalHost,f=e.popperProps,h=e.showArrow,v=void 0;if(!o){var m=Ut("react-datepicker-popper",t);v=y.createElement(Bd,{enableTabLoop:a},y.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:c},s,h&&y.createElement(Eb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(v=y.createElement(e.popperContainer,{},v)),l&&!o&&(v=y.createElement(zd,{portalId:l,portalHost:d},v));var p=Ut("react-datepicker-wrapper",r);return y.createElement(y.Fragment,null,y.createElement("div",{ref:f.refs.setReference,className:p},i),v)},E2=S2(C2);function D2(e,t){return e&&t?x.getMonth(e)!==x.getMonth(t)||x.getYear(e)!==x.getYear(t):e!==t}var sc="Date input not valid.",k2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:ct()},n.modifyHolidays=function(){var o;return(o=n.props.holidays)===null||o===void 0?void 0:o.reduce(function(s,i){var a=new Date(i.date);return li(a)?Br(Br([],s,!0),[He(He({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=Td(n.props),a=Id(n.props),c=i&&x.isBefore(s,ui(i))?i:a&&x.isAfter(s,bd(a))?a:s;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&o!==void 0?o:c,highlightDates:Md(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var o,s=n.props,i=s.locale,a=s.startDate,c=s.endDate,l=s.rangeSeparator,d=s.selected,f=s.selectedDates,h=s.selectsMultiple,v=s.selectsRange,m=s.value,p=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof m=="string"?m:typeof b=="string"?b:v?Rb(a,c,{dateFormat:p,locale:i,rangeSeparator:l}):h?Nb(f??[],{dateFormat:p,locale:i}):yr(d,{dateFormat:p,locale:i})},n.resetHiddenStatus=function(){n.setState(He(He({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(He(He({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.focus)===null||s===void 0||s.call(o,{preventScroll:!0})},n.setBlur=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.blur)===null||s===void 0||s.call(o),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(o,s){s===void 0&&(s=!1),n.setState({open:o,preSelection:o&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:ic},function(){o||n.setState(function(i){return{focused:s?i.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return x.isDate(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(o){var s,i,a=n.state.wasHidden,c=a?n.state.open:!0;a&&n.resetHiddenStatus(),n.state.preventFocus||((i=(s=n.props).onFocus)===null||i===void 0||i.call(s,o),c&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})},n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(He(He({},n.state),{inputValue:null}))},n.handleBlur=function(o){var s,i;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((i=(s=n.props).onBlur)===null||i===void 0||i.call(s,o)),n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(o){var s,i;n.props.inline||n.setOpen(!1),(i=(s=n.props).onClickOutside)===null||i===void 0||i.call(s,o),n.props.withPortal&&o.preventDefault()},n.handleChange=function(){for(var o,s,i,a,c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];var f=l[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,l),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:f?.target instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:A2});var h=n.props,v=h.selectsRange,m=h.startDate,p=h.endDate,b=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,w=(s=n.props.strictParsing)!==null&&s!==void 0?s:t.defaultProps.strictParsing,C=f?.target instanceof HTMLInputElement?f.target.value:"";if(v){var E=n.props.rangeSeparator,S=E.trim(),_=C.split(b.includes(S)?E:S,2).map(function(F){return F.trim()}),W=_[0],D=_[1],A=Xa(W??"",b,n.props.locale,w),M=A?Xa(D??"",b,n.props.locale,w):null,I=m?.getTime()!==A?.getTime(),U=p?.getTime()!==M?.getTime();if(!I&&!U||A&&br(A,n.props)||M&&br(M,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[A,M],f)}else{var G=Xa(C,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(G||!C)&&n.setSelected(G,f,!0)}}},n.handleSelect=function(o,s,i){if(!n.props.readOnly){var a=n.props,c=a.selectsRange,l=a.startDate,d=a.endDate,f=a.swapRange,h=!c||l&&!d&&(f||!nc(o,l));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&h&&n.sendFocusBackToInput(),n.props.onChangeRaw&&n.props.onChangeRaw(s),n.setSelected(o,s,!1,i),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(o):h&&n.setOpen(!1)}},n.setSelected=function(o,s,i,a){var c,l,d=o;if(n.props.showYearPicker){if(d!==null&&mi(x.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&_d(d,n.props))return}else if(d!==null&&br(d,n.props))return;var f=n.props,h=f.onChange,v=f.selectsRange,m=f.startDate,p=f.endDate,b=f.selectsMultiple,w=f.selectedDates,C=f.minTime,E=f.swapRange;if(!gn(n.props.selected,d)||n.props.allowSameDay||v||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Ja(d,{hour:x.getHours(n.props.selected),minute:x.getMinutes(n.props.selected),second:x.getSeconds(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&C&&(d=Ja(d,{hour:C.getHours(),minute:C.getMinutes(),second:C.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),v){var S=!m&&!p,_=m&&!p,W=!m&&!!p,D=m&&p;S?h?.([d,null],s):_?d===null?h?.([null,null],s):nc(d,m)?h?.(E?[d,m]:[d,null],s):h?.([m,d],s):W&&(d&&nc(d,p)?h?.([d,p],s):h?.([d,null],s)),D&&h?.([d,null],s)}else if(b){if(d!==null)if(!w?.length)h?.([d],s);else{var A=w.some(function(I){return Ue(I,d)});if(A){var M=w.filter(function(I){return!Ue(I,d)});h?.(M,s)}else h?.(Br(Br([],w,!0),[d],!1),s)}}else h?.(d,s);i||((l=(c=n.props).onSelect)===null||l===void 0||l.call(c,d,s),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var s=x.isDate(n.props.minDate),i=x.isDate(n.props.maxDate),a=!0;if(o){var c=ui(o);if(s&&i)a=vn(o,n.props.minDate,n.props.maxDate);else if(s){var l=ui(n.props.minDate);a=x.isAfter(o,l)||gn(c,l)}else if(i){var d=bd(n.props.maxDate);a=x.isBefore(o,d)||gn(c,d)}}a&&n.setState({preSelection:o})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(o){var s,i;if(!(n.props.selectsRange||n.props.selectsMultiple)){var a=n.props.selected?n.props.selected:n.getPreSelection(),c=n.props.selected?o:Ja(a,{hour:x.getHours(o),minute:x.getMinutes(o)});n.setState({preSelection:c}),(i=(s=n.props).onChange)===null||i===void 0||i.call(s,c),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var o,s;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(s=(o=n.props).onInputClick)===null||s===void 0||s.call(o)},n.onInputKeyDown=function(o){var s,i,a,c,l,d;(i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o);var f=o.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===ve.ArrowDown||f===ve.ArrowUp||f===ve.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ve.ArrowDown||f===ve.ArrowUp){o.preventDefault();var h=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',v=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(h);v instanceof HTMLElement&&v.focus({preventScroll:!0});return}var m=ct(n.state.preSelection);f===ve.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===ic?(n.handleSelect(m,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(m)):n.setOpen(!1)):f===ve.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ve.Tab&&n.setOpen(!1),n.inputOk()||(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:sc})}},n.onPortalKeyDown=function(o){var s=o.key;s===ve.Escape&&(o.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(o){var s,i,a,c,l,d,f=n.props,h=f.minDate,v=f.maxDate,m=f.disabledKeyboardNavigation,p=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,C=f.calendarStartDay,E=f.adjustDateOnChange,S=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!m){var _=o.key,W=o.shiftKey,D=ct(n.state.preSelection),A=function(oe,V){var N=V;switch(oe){case ve.ArrowRight:N=p?x.addWeeks(V,1):x.addDays(V,1);break;case ve.ArrowLeft:N=p?x.subWeeks(V,1):x.subDays(V,1);break;case ve.ArrowUp:N=x.subWeeks(V,1);break;case ve.ArrowDown:N=x.addWeeks(V,1);break;case ve.PageUp:N=W?x.subYears(V,1):x.subMonths(V,1);break;case ve.PageDown:N=W?x.addYears(V,1):x.addMonths(V,1);break;case ve.Home:N=on(V,w,C);break;case ve.End:N=zb(V);break}return N},M=function(oe,V){for(var N=40,ce=oe,fe=!1,$=0,Q=A(oe,V);!fe;){if($>=N){Q=V;break}h&&Q<h&&(ce=ve.ArrowRight,Q=br(h,n.props)?A(ce,Q):h),v&&Q>v&&(ce=ve.ArrowLeft,Q=br(v,n.props)?A(ce,Q):v),br(Q,n.props)?((ce===ve.PageUp||ce===ve.Home)&&(ce=ve.ArrowRight),(ce===ve.PageDown||ce===ve.End)&&(ce=ve.ArrowLeft),Q=A(ce,Q)):fe=!0,$++}return Q};if(_===ve.Enter){o.preventDefault(),n.handleSelect(D,o),!b&&n.setPreSelection(D);return}else if(_===ve.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:sc});return}var I=null;switch(_){case ve.ArrowLeft:case ve.ArrowRight:case ve.ArrowUp:case ve.ArrowDown:case ve.PageUp:case ve.PageDown:case ve.Home:case ve.End:I=M(_,D);break}if(!I){(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:sc});return}if(o.preventDefault(),n.setState({lastPreSelectChange:ic}),E&&n.setSelected(I),n.setPreSelection(I),S){var U=x.getMonth(D),G=x.getMonth(I),F=x.getYear(D),Y=x.getYear(I);U!==G||F!==Y?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(o){var s=o.key;s===ve.Escape&&(o.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),n.sendFocusBackToInput();var s=n.props,i=s.selectsRange,a=s.onChange;a?.(i?[null,null]:null,o),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(o){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(o)&&n.setOpen(!1)},n.renderCalendar=function(){var o,s;return!n.props.inline&&!n.isCalendarOpen()?null:y.createElement(b2,He({showMonthYearDropdown:void 0,ref:function(i){n.calendar=i}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(o=n.props.dateFormatCalendar)!==null&&o!==void 0?o:t.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:Qb(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(s=n.props.dropdownMode)!==null&&s!==void 0?s:t.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var o,s=n.props.locale,i=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,a=n.props.showTimeInput||n.props.showTimeSelect,c=a?"PPPPp":"PPPP",l;return n.props.selectsRange?l="Selected start date: ".concat(yr(n.props.startDate,{dateFormat:c,locale:s}),". ").concat(n.props.endDate?"End date: "+yr(n.props.endDate,{dateFormat:c,locale:s}):""):n.props.showTimeSelectOnly?l="Selected time: ".concat(yr(n.props.selected,{dateFormat:i,locale:s})):n.props.showYearPicker?l="Selected year: ".concat(yr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?l="Selected month: ".concat(yr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?l="Selected quarter: ".concat(yr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):l="Selected date: ".concat(yr(n.props.selected,{dateFormat:c,locale:s})),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},l)},n.renderDateInput=function(){var o,s,i=Ut(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),a=n.props.customInput||y.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref";return y.cloneElement(a,(s={},s[c]=function(l){n.input=l},s.value=n.getInputValue(),s.onBlur=n.handleBlur,s.onChange=n.handleChange,s.onClick=n.onInputClick,s.onFocus=n.handleFocus,s.onKeyDown=n.onInputKeyDown,s.id=n.props.id,s.name=n.props.name,s.form=n.props.form,s.autoFocus=n.props.autoFocus,s.placeholder=n.props.placeholderText,s.disabled=n.props.disabled,s.autoComplete=n.props.autoComplete,s.className=Ut(a.props.className,i),s.title=n.props.title,s.readOnly=n.props.readOnly,s.required=n.props.required,s.tabIndex=n.props.tabIndex,s["aria-describedby"]=n.props.ariaDescribedBy,s["aria-invalid"]=n.props.ariaInvalid,s["aria-labelledby"]=n.props.ariaLabelledBy,s["aria-required"]=n.props.ariaRequired,s))},n.renderClearButton=function(){var o=n.props,s=o.isClearable,i=o.disabled,a=o.selected,c=o.startDate,l=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,h=f===void 0?"":f,v=o.ariaLabelClose,m=v===void 0?"Close":v,p=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||l!=null||p?.length)?y.createElement("button",{type:"button",className:Ut("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,onClick:n.onClearClick,title:d,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:Ld,readOnly:!1,rangeSeparator:gd,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:Co,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(r,n){var o,s,i,a;r.inline&&D2(r.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Md(this.props.highlightDates)}),!n.focused&&!gn(r.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((s=(o=this.props).onCalendarOpen)===null||s===void 0||s.call(o)),n.open===!0&&this.state.open===!1&&((a=(i=this.props).onCalendarClose)===null||a===void 0||a.call(i)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var r=this.props,n=r.showIcon,o=r.icon,s=r.calendarIconClassname,i=r.calendarIconClassName,a=r.toggleCalendarOnIconClick,c=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),y.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&y.createElement(x2,He({icon:o,className:Ut(i,!i&&s,c&&"react-datepicker-ignore-onclickoutside")},a?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var n=this.state.open?y.createElement(Bd,{enableTabLoop:this.props.enableTabLoop},y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=y.createElement(zd,He({portalId:this.props.portalId},this.props),n)),y.createElement("div",null,this.renderInputContainer(),n)}return y.createElement(E2,He({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(y.Component),A2="input",ic="navigate";const T2="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",I2="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",M2="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",Fd="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",P2=y.forwardRef(({value:e,onClick:t},r)=>u.jsxs("button",{className:fn.datePickerButton,onClick:t,ref:r,children:[e,u.jsx("img",{src:T2,style:{marginLeft:10}})]})),O2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>u.jsxs("div",{className:fn.headerContainer,children:[u.jsxs("div",{className:fn.navAndDate,children:[u.jsx("button",{className:fn.navButton,onClick:t,children:u.jsx("img",{src:I2,width:15})}),u.jsx("button",{className:fn.navButton,onClick:r,children:u.jsx("img",{src:M2,width:15})}),u.jsx(k2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:fn.datePickerInput,locale:"es",customInput:u.jsx(P2,{})})]}),u.jsxs("button",{className:fn.addEventButton,onClick:n,children:[u.jsx("img",{src:Fd}),"Agregar evento"]})]}),xe={sidebarContainer:"_sidebarContainer_1jdt4_1",leadsSection:"_leadsSection_1jdt4_17",leadCard:"_leadCard_1jdt4_33",leadIcon:"_leadIcon_1jdt4_71",leadDays:"_leadDays_1jdt4_81",leadCount:"_leadCount_1jdt4_91",eventsSection:"_eventsSection_1jdt4_103",eventGroup:"_eventGroup_1jdt4_143",eventGroupDate:"_eventGroupDate_1jdt4_151",eventItem:"_eventItem_1jdt4_163",eventDetails:"_eventDetails_1jdt4_195",eventTitle:"_eventTitle_1jdt4_209",eventTime:"_eventTime_1jdt4_231",calendarsSection:"_calendarsSection_1jdt4_253",collapsibleHeader:"_collapsibleHeader_1jdt4_269",headerTitle:"_headerTitle_1jdt4_297",calendarCount:"_calendarCount_1jdt4_311",chevronIcon:"_chevronIcon_1jdt4_329",collapsed:"_collapsed_1jdt4_337",collapsibleContent:"_collapsibleContent_1jdt4_345",hidden:"_hidden_1jdt4_361",circularCheckbox:"_circularCheckbox_1jdt4_379",checkedIcon:"_checkedIcon_1jdt4_397",calendarIcon:"_calendarIcon_1jdt4_413",syncButton:"_syncButton_1jdt4_429",eventsContainer:"_eventsContainer_1jdt4_481",calendarsList:"_calendarsList_1jdt4_555",calendarItemText:"_calendarItemText_1jdt4_613",addEventButton:"_addEventButton_1jdt4_639",customCheckIcon:"_customCheckIcon_1jdt4_693",uncheckedCircle:"_uncheckedCircle_1jdt4_709",calendarSelectButton:"_calendarSelectButton_1jdt4_723",calendarSelected:"_calendarSelected_1jdt4_775",currentUserCalendarTitle:"_currentUserCalendarTitle_1jdt4_795",tabsContainer:"_tabsContainer_1jdt4_831",tabButton:"_tabButton_1jdt4_851",activeTab:"_activeTab_1jdt4_887",alertBadge:"_alertBadge_1jdt4_901"};/**
116
116
  * @license lucide-react v0.540.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */const Ob=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Wd=e=>{const t=jb(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Rb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
120
+ */const j2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Wd=e=>{const t=R2(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),N2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
121
121
  * @license lucide-react v0.540.0 - ISC
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */var Nb={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"};/**
125
+ */var $2={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"};/**
126
126
  * @license lucide-react v0.540.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const $b=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>y.createElement("svg",{ref:c,...Nb,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Vd("lucide",o),...!s&&!Rb(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>y.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
130
+ */const L2=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>y.createElement("svg",{ref:c,...$2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Vd("lucide",o),...!s&&!N2(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,d])=>y.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
131
131
  * @license lucide-react v0.540.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const yi=(e,t)=>{const r=y.forwardRef(({className:n,...o},s)=>y.createElement($b,{ref:s,iconNode:t,className:Vd(`lucide-${Ob(Wd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Wd(e),r};/**
135
+ */const yi=(e,t)=>{const r=y.forwardRef(({className:n,...o},s)=>y.createElement(L2,{ref:s,iconNode:t,className:Vd(`lucide-${j2(Wd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Wd(e),r};/**
136
136
  * @license lucide-react v0.540.0 - ISC
137
137
  *
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
- */const Lb=yi("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"}]]);/**
140
+ */const z2=yi("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"}]]);/**
141
141
  * @license lucide-react v0.540.0 - ISC
142
142
  *
143
143
  * This source code is licensed under the ISC license.
144
144
  * See the LICENSE file in the root directory of this source tree.
145
- */const zb=yi("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
145
+ */const B2=yi("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
146
146
  * @license lucide-react v0.540.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
@@ -152,14 +152,14 @@ const theme2 = createTheme({ palette: {
152
152
  *
153
153
  * This source code is licensed under the ISC license.
154
154
  * See the LICENSE file in the root directory of this source tree.
155
- */const Bb=yi("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Ud=Symbol.for("constructDateFrom");function cc(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ud in e?e[Ud](t):e instanceof Date?new e.constructor(t):new Date(t)}function sn(e,t){return cc(t||e,e)}function Hd(e,t,r){const[n,o]=[+sn(e.start,r?.in),+sn(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+sn(t.start,r?.in),+sn(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}var Fb=/^\s+/,Wb=/\s+$/;function De(e,t){if(e=e||"",t=t||{},e instanceof De)return e;if(!(this instanceof De))return new De(e,t);var r=Vb(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.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=r.ok}De.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 t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,o,s,i,a;return r=t.r/255,n=t.g/255,o=t.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=Qd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=qd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=qd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+o+"%)":"hsva("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=Yd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Yd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+o+"%)":"hsla("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return Zd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return qb(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},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(_t(this._r,255)*100)+"%",g:Math.round(_t(this._g,255)*100)+"%",b:Math.round(_t(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%)":"rgba("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:s1[Zd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Gd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=De(t);n="#"+Gd(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,s=!r&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return De(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Qb,arguments)},brighten:function(){return this._applyModification(Xb,arguments)},darken:function(){return this._applyModification(Jb,arguments)},desaturate:function(){return this._applyModification(Zb,arguments)},saturate:function(){return this._applyModification(Gb,arguments)},greyscale:function(){return this._applyModification(Kb,arguments)},spin:function(){return this._applyModification(e1,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(n1,arguments)},complement:function(){return this._applyCombination(t1,arguments)},monochromatic:function(){return this._applyCombination(o1,arguments)},splitcomplement:function(){return this._applyCombination(r1,arguments)},triad:function(){return this._applyCombination(Kd,[3])},tetrad:function(){return this._applyCombination(Kd,[4])}},De.fromRatio=function(e,t){if(bi(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Ao(e[n]));e=r}return De(e,t)};function Vb(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=l1(e)),bi(e)=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=Ub(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=Ao(e.s),o=Ao(e.v),t=Yb(e.h,n,o),i=!0,a="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=Ao(e.s),s=Ao(e.l),t=Hb(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Qd(r),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function Ub(e,t,r){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(r,255)*255}}function Yd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=(n+o)/2;if(n==o)s=i=0;else{var c=n-o;switch(i=a>.5?c/(2-n-o):c/(n+o),n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,l:a}}function Hb(e,t,r){var n,o,s;e=_t(e,360),t=_t(t,100),r=_t(r,100);function i(u,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(d-u)*6*f:f<1/2?d:f<2/3?u+(d-u)*(2/3-f)*6:u}if(t===0)n=o=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;n=i(c,a,e+1/3),o=i(c,a,e),s=i(c,a,e-1/3)}return{r:n*255,g:o*255,b:s*255}}function qd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=n,c=n-o;if(i=n===0?0:c/n,n==o)s=0;else{switch(n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,v:a}}function Yb(e,t,r){e=_t(e,360)*6,t=_t(t,100),r=_t(r,100);var n=Math.floor(e),o=e-n,s=r*(1-t),i=r*(1-o*t),a=r*(1-(1-o)*t),c=n%6,u=[r,i,s,s,a,r][c],d=[a,r,r,i,s,s][c],f=[s,s,a,r,r,i][c];return{r:u*255,g:d*255,b:f*255}}function Zd(e,t,r,n){var o=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16))];return n&&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 qb(e,t,r,n,o){var s=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16)),Er(Xd(n))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Gd(e,t,r,n){var o=[Er(Xd(n)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16))];return o.join("")}De.equals=function(e,t){return!e||!t?!1:De(e).toRgbString()==De(t).toRgbString()},De.random=function(){return De.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Zb(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s-=t/100,r.s=xi(r.s),De(r)}function Gb(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s+=t/100,r.s=xi(r.s),De(r)}function Kb(e){return De(e).desaturate(100)}function Qb(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l+=t/100,r.l=xi(r.l),De(r)}function Xb(e,t){t=t===0?0:t||10;var r=De(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),De(r)}function Jb(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l-=t/100,r.l=xi(r.l),De(r)}function e1(e,t){var r=De(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,De(r)}function t1(e){var t=De(e).toHsl();return t.h=(t.h+180)%360,De(t)}function Kd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=De(e).toHsl(),n=[De(e)],o=360/t,s=1;s<t;s++)n.push(De({h:(r.h+s*o)%360,s:r.s,l:r.l}));return n}function r1(e){var t=De(e).toHsl(),r=t.h;return[De(e),De({h:(r+72)%360,s:t.s,l:t.l}),De({h:(r+216)%360,s:t.s,l:t.l})]}function n1(e,t,r){t=t||6,r=r||30;var n=De(e).toHsl(),o=360/r,s=[De(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,s.push(De(n));return s}function o1(e,t){t=t||6;for(var r=De(e).toHsv(),n=r.h,o=r.s,s=r.v,i=[],a=1/t;t--;)i.push(De({h:n,s:o,v:s})),s=(s+a)%1;return i}De.mix=function(e,t,r){r=r===0?0:r||50;var n=De(e).toRgb(),o=De(t).toRgb(),s=r/100,i={r:(o.r-n.r)*s+n.r,g:(o.g-n.g)*s+n.g,b:(o.b-n.b)*s+n.b,a:(o.a-n.a)*s+n.a};return De(i)},De.readability=function(e,t){var r=De(e),n=De(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},De.isReadable=function(e,t,r){var n=De.readability(e,t),o,s;switch(s=!1,o=u1(r),o.level+o.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},De.mostReadable=function(e,t,r){var n=null,o=0,s,i,a,c;r=r||{},i=r.includeFallbackColors,a=r.level,c=r.size;for(var u=0;u<t.length;u++)s=De.readability(e,t[u]),s>o&&(o=s,n=De(t[u]));return De.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,De.mostReadable(e,["#fff","#000"],r))};var lc=De.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"},s1=De.hexNames=i1(lc);function i1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Qd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _t(e,t){a1(e)&&(e="100%");var r=c1(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function xi(e){return Math.min(1,Math.max(0,e))}function dr(e){return parseInt(e,16)}function a1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function c1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Ao(e){return e<=1&&(e=e*100+"%"),e}function Xd(e){return Math.round(parseFloat(e)*255).toString(16)}function Jd(e){return dr(e)/255}var Dr=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),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 Kr(e){return!!Dr.CSS_UNIT.exec(e)}function l1(e){e=e.replace(Fb,"").replace(Wb,"").toLowerCase();var t=!1;if(lc[e])e=lc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Dr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Dr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Dr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Dr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Dr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Dr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Dr.hex8.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),a:Jd(r[4]),format:t?"name":"hex8"}:(r=Dr.hex6.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),format:t?"name":"hex"}:(r=Dr.hex4.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),a:Jd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Dr.hex3.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function u1(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}const ef="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",d1="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",f1="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",tf="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",rf=y.createContext(void 0),p1=({children:e})=>{const[t,r]=y.useState(()=>({userEmail:localStorage.getItem("user_email")||null})),[n,o]=y.useState(()=>({userEmail:localStorage.getItem("user_outlook")||null})),s=y.useCallback(u=>{localStorage.setItem("user_email",u),r({userEmail:u})},[]),i=y.useCallback(u=>{localStorage.setItem("user_outlook",u),o({userEmail:u})},[]),a=y.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return l.jsx(rf.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},uc=()=>{const e=y.useContext(rf);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function nf(e,t){return function(){return e.apply(t,arguments)}}const{toString:h1}=Object.prototype,{getPrototypeOf:dc}=Object,{iterator:_i,toStringTag:of}=Symbol,wi=(e=>t=>{const r=h1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kr=e=>(e=e.toLowerCase(),t=>wi(t)===e),Si=e=>t=>typeof t===e,{isArray:Yn}=Array,To=Si("undefined");function Io(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sf=kr("ArrayBuffer");function m1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sf(e.buffer),t}const g1=Si("string"),or=Si("function"),af=Si("number"),Mo=e=>e!==null&&typeof e=="object",v1=e=>e===!0||e===!1,Ci=e=>{if(wi(e)!=="object")return!1;const t=dc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(of in e)&&!(_i in e)},y1=e=>{if(!Mo(e)||Io(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},b1=kr("Date"),x1=kr("File"),_1=kr("Blob"),w1=kr("FileList"),S1=e=>Mo(e)&&or(e.pipe),C1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||or(e.append)&&((t=wi(e))==="formdata"||t==="object"&&or(e.toString)&&e.toString()==="[object FormData]"))},E1=kr("URLSearchParams"),[D1,k1,A1,T1]=["ReadableStream","Request","Response","Headers"].map(kr),I1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Io(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(n=0;n<i;n++)a=s[n],t.call(null,e[a],a,e)}}function cf(e,t){if(Io(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lf=e=>!To(e)&&e!==yn;function fc(){const{caseless:e}=lf(this)&&this||{},t={},r=(n,o)=>{const s=e&&cf(t,o)||o;Ci(t[s])&&Ci(n)?t[s]=fc(t[s],n):Ci(n)?t[s]=fc({},n):Yn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Po(arguments[n],r);return t}const M1=(e,t,r,{allOwnKeys:n}={})=>(Po(t,(o,s)=>{r&&or(o)?e[s]=nf(o,r):e[s]=o},{allOwnKeys:n}),e),P1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),O1=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},j1=(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&dc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},R1=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},N1=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!af(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},$1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dc(Uint8Array)),L1=(e,t)=>{const n=(e&&e[_i]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},z1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},B1=kr("HTMLFormElement"),F1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),uf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),W1=kr("RegExp"),df=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Po(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},V1=e=>{df(e,(t,r)=>{if(or(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(or(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},U1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Yn(e)?n(e):n(String(e).split(t)),r},H1=()=>{},Y1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function q1(e){return!!(e&&or(e.append)&&e[of]==="FormData"&&e[_i])}const Z1=e=>{const t=new Array(10),r=(n,o)=>{if(Mo(n)){if(t.indexOf(n)>=0)return;if(Io(n))return n;if(!("toJSON"in n)){t[o]=n;const s=Yn(n)?[]:{};return Po(n,(i,a)=>{const c=r(i,o+1);!To(c)&&(s[a]=c)}),t[o]=void 0,s}}return n};return r(e,0)},G1=kr("AsyncFunction"),K1=e=>e&&(Mo(e)||or(e))&&or(e.then)&&or(e.catch),ff=((e,t)=>e?setImmediate:t?((r,n)=>(yn.addEventListener("message",({source:o,data:s})=>{o===yn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),yn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",or(yn.postMessage)),Q1=typeof queueMicrotask<"u"?queueMicrotask.bind(yn):typeof process<"u"&&process.nextTick||ff,z={isArray:Yn,isArrayBuffer:sf,isBuffer:Io,isFormData:C1,isArrayBufferView:m1,isString:g1,isNumber:af,isBoolean:v1,isObject:Mo,isPlainObject:Ci,isEmptyObject:y1,isReadableStream:D1,isRequest:k1,isResponse:A1,isHeaders:T1,isUndefined:To,isDate:b1,isFile:x1,isBlob:_1,isRegExp:W1,isFunction:or,isStream:S1,isURLSearchParams:E1,isTypedArray:$1,isFileList:w1,forEach:Po,merge:fc,extend:M1,trim:I1,stripBOM:P1,inherits:O1,toFlatObject:j1,kindOf:wi,kindOfTest:kr,endsWith:R1,toArray:N1,forEachEntry:L1,matchAll:z1,isHTMLForm:B1,hasOwnProperty:uf,hasOwnProp:uf,reduceDescriptors:df,freezeMethods:V1,toObjectSet:U1,toCamelCase:F1,noop:H1,toFiniteNumber:Y1,findKey:cf,global:yn,isContextDefined:lf,isSpecCompliantForm:q1,toJSONObject:Z1,isAsyncFn:G1,isThenable:K1,setImmediate:ff,asap:Q1,isIterable:e=>e!=null&&or(e[_i])};function Le(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}z.inherits(Le,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:z.toJSONObject(this.config),code:this.code,status:this.status}}});const pf=Le.prototype,hf={};["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=>{hf[e]={value:e}}),Object.defineProperties(Le,hf),Object.defineProperty(pf,"isAxiosError",{value:!0}),Le.from=(e,t,r,n,o,s)=>{const i=Object.create(pf);return z.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Le.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const X1=null;function pc(e){return z.isPlainObject(e)||z.isArray(e)}function mf(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,r){return e?e.concat(t).map(function(o,s){return o=mf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function J1(e){return z.isArray(e)&&!e.some(pc)}const ex=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Ei(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!z.isUndefined(b[p])});const n=r.metaTokens,o=r.visitor||d,s=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(z.isDate(m))return m.toISOString();if(z.isBoolean(m))return m.toString();if(!c&&z.isBlob(m))throw new Le("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(m)||z.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,p,b){let w=m;if(m&&!b&&typeof m=="object"){if(z.endsWith(p,"{}"))p=n?p:p.slice(0,-2),m=JSON.stringify(m);else if(z.isArray(m)&&J1(m)||(z.isFileList(m)||z.endsWith(p,"[]"))&&(w=z.toArray(m)))return p=mf(p),w.forEach(function(E,S){!(z.isUndefined(E)||E===null)&&t.append(i===!0?gf([p],S,s):i===null?p:p+"[]",u(E))}),!1}return pc(m)?!0:(t.append(gf(b,p,s),u(m)),!1)}const f=[],h=Object.assign(ex,{defaultVisitor:d,convertValue:u,isVisitable:pc});function v(m,p){if(!z.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(m),z.forEach(m,function(w,C){(!(z.isUndefined(w)||w===null)&&o.call(t,w,z.isString(C)?C.trim():C,p,h))===!0&&v(w,p?p.concat(C):[C])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return v(e),t}function vf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function hc(e,t){this._pairs=[],e&&Ei(e,this,t)}const yf=hc.prototype;yf.append=function(t,r){this._pairs.push([t,r])},yf.toString=function(t){const r=t?function(n){return t.call(this,n,vf)}:vf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function tx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function bf(e,t,r){if(!t)return e;const n=r&&r.encode||tx;z.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=z.isURLSearchParams(t)?t.toString():new hc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class xf{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(n){n!==null&&t(n)})}}const _f={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",gc=typeof navigator=="object"&&navigator||void 0,nx=mc&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),ox=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sx=mc&&window.location.href||"http://localhost",Xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:nx,hasStandardBrowserWebWorkerEnv:ox,navigator:gc,origin:sx},Symbol.toStringTag,{value:"Module"})),...rx};function ix(e,t){return Ei(e,new Xt.classes.URLSearchParams,{visitor:function(r,n,o,s){return Xt.isNode&&z.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function ax(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function cx(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function wf(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=r.length;return i=!i&&z.isArray(o)?o.length:i,c?(z.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!a):((!o[i]||!z.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&z.isArray(o[i])&&(o[i]=cx(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(ax(n),o,r,0)}),r}return null}function lx(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Oo={transitional:_f,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=z.isObject(t);if(s&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return o?JSON.stringify(wf(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ix(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ei(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),lx(t)):t}],transformResponse:[function(t){const r=this.transitional||Oo.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?Le.from(a,Le.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xt.classes.FormData,Blob:Xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Oo.headers[e]={}});const ux=z.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"]),dx=e=>{const t={};let r,n,o;return e&&e.split(`
156
- `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&ux[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Sf=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function Di(e){return e===!1||e==null?e:z.isArray(e)?e.map(Di):String(e)}function fx(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const px=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function vc(e,t,r,n,o){if(z.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!z.isString(t)){if(z.isString(n))return t.indexOf(n)!==-1;if(z.isRegExp(n))return n.test(t)}}function hx(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function mx(e,t){const r=z.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let sr=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(a,c,u){const d=jo(c);if(!d)throw new Error("header name must be a non-empty string");const f=z.findKey(o,d);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=Di(a))}const i=(a,c)=>z.forEach(a,(u,d)=>s(u,d,c));if(z.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(z.isString(t)&&(t=t.trim())&&!px(t))i(dx(t),r);else if(z.isObject(t)&&z.isIterable(t)){let a={},c,u;for(const d of t){if(!z.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[u=d[0]]=(c=a[u])?z.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}i(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=jo(t),t){const n=z.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return fx(o);if(z.isFunction(r))return r.call(this,o,n);if(z.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=jo(t),t){const n=z.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||vc(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=jo(i),i){const a=z.findKey(n,i);a&&(!r||vc(n,n[a],a,r))&&(delete n[a],o=!0)}}return z.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||vc(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return z.forEach(this,(o,s)=>{const i=z.findKey(n,s);if(i){r[i]=Di(o),delete r[s];return}const a=t?hx(s):String(s).trim();a!==s&&delete r[s],r[a]=Di(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return z.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&z.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
157
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Sf]=this[Sf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=jo(i);n[a]||(mx(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(sr);function yc(e,t){const r=this||Oo,n=t||r,o=sr.from(n.headers);let s=n.data;return z.forEach(e,function(a){s=a.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Cf(e){return!!(e&&e.__CANCEL__)}function qn(e,t,r){Le.call(this,e??"canceled",Le.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(qn,Le,{__CANCEL__:!0});function Ef(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Le("Request failed with status code "+r.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function gx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vx(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=n[s];i||(i=u),r[o]=c,n[o]=u;let f=s,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i<t)return;const v=d&&u-d;return v?Math.round(h*1e3/v):void 0}}function yx(e,t){let r=0,n=1e3/t,o,s;const i=(u,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=n?i(u,d):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const ki=(e,t,r=3)=>{let n=0;const o=vx(50,250);return yx(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,u=o(c),d=i<=a;n=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Df=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},kf=e=>(...t)=>z.asap(()=>e(...t)),bx=Xt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xt.origin),Xt.navigator&&/(msie|trident)/i.test(Xt.navigator.userAgent)):()=>!0,xx=Xt.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),z.isString(n)&&i.push("path="+n),z.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _x(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wx(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Af(e,t,r){let n=!_x(t);return e&&(n||r==!1)?wx(e,t):t}const Tf=e=>e instanceof sr?{...e}:e;function bn(e,t){t=t||{};const r={};function n(u,d,f,h){return z.isPlainObject(u)&&z.isPlainObject(d)?z.merge.call({caseless:h},u,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function o(u,d,f,h){if(z.isUndefined(d)){if(!z.isUndefined(u))return n(void 0,u,f,h)}else return n(u,d,f,h)}function s(u,d){if(!z.isUndefined(d))return n(void 0,d)}function i(u,d){if(z.isUndefined(d)){if(!z.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,f){if(f in t)return n(u,d);if(f in e)return n(void 0,u)}const c={url:s,method:s,data:s,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:a,headers:(u,d,f)=>o(Tf(u),Tf(d),f,!0)};return z.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||o,h=f(e[d],t[d],d);z.isUndefined(h)&&f!==a||(r[d]=h)}),r}const If=e=>{const t=bn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=sr.from(i),t.url=bf(Af(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(z.isFormData(r)){if(Xt.hasStandardBrowserEnv||Xt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Xt.hasStandardBrowserEnv&&(n&&z.isFunction(n)&&(n=n(t)),n||n!==!1&&bx(t.url))){const u=o&&s&&xx.read(s);u&&i.set(o,u)}return t},Sx=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=If(e);let s=o.data;const i=sr.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,d,f,h,v,m;function p(){v&&v(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function w(){if(!b)return;const E=sr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};Ef(function(D){r(D),p()},function(D){n(D),p()},_),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(n(new Le("Request aborted",Le.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new Le("Network Error",Le.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||_f;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),n(new Le(S,_.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(S,_){b.setRequestHeader(_,S)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),u&&([h,m]=ki(u,!0),b.addEventListener("progress",h)),c&&b.upload&&([f,v]=ki(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(d=E=>{b&&(n(!E||E.type?new qn(null,e,b):E),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const C=gx(o.url);if(C&&Xt.protocols.indexOf(C)===-1){n(new Le("Unsupported protocol "+C+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)})},Cx=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(u){if(!o){o=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Le?d:new qn(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new Le(`timeout ${t} of ms exceeded`,Le.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>z.asap(a),c}},Ex=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},Dx=async function*(e,t){for await(const r of kx(e))yield*Ex(r,t)},kx=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Mf=(e,t,r,n)=>{const o=Dx(e,t);let s=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){a(),c.close();return}let f=d.byteLength;if(r){let h=s+=f;r(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Ai=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pf=Ai&&typeof ReadableStream=="function",Ax=Ai&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Of=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Tx=Pf&&Of(()=>{let e=!1;const t=new Request(Xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),jf=64*1024,bc=Pf&&Of(()=>z.isReadableStream(new Response("").body)),Ti={stream:bc&&(e=>e.body)};Ai&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ti[t]&&(Ti[t]=z.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Le(`Response type '${t}' is not supported`,Le.ERR_NOT_SUPPORT,n)})})})(new Response);const Ix=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(Xt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await Ax(e)).byteLength},Mx=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??Ix(t)},xc={http:X1,xhr:Sx,fetch:Ai&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=If(e);u=u?(u+"").toLowerCase():"text";let v=Cx([o,s&&s.toAbortSignal()],i),m;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(c&&Tx&&r!=="get"&&r!=="head"&&(b=await Mx(d,n))!==0){let _=new Request(t,{method:"POST",body:n,duplex:"half"}),W;if(z.isFormData(n)&&(W=_.headers.get("content-type"))&&d.setContentType(W),_.body){const[D,A]=Df(b,ki(kf(c)));n=Mf(_.body,jf,D,A)}}z.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:v,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let C=await fetch(m,h);const E=bc&&(u==="stream"||u==="response");if(bc&&(a||E&&p)){const _={};["status","statusText","headers"].forEach(M=>{_[M]=C[M]});const W=z.toFiniteNumber(C.headers.get("content-length")),[D,A]=a&&Df(W,ki(kf(a),!0))||[];C=new Response(Mf(C.body,jf,D,()=>{A&&A(),p&&p()}),_)}u=u||"text";let S=await Ti[z.findKey(Ti,u)||"text"](C,e);return!E&&p&&p(),await new Promise((_,W)=>{Ef(_,W,{data:S,headers:sr.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:m})})}catch(w){throw p&&p(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,e,m),{cause:w.cause||w}):Le.from(w,w&&w.code,e,m)}})};z.forEach(xc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Rf=e=>`- ${e}`,Px=e=>z.isFunction(e)||e===null||e===!1,Nf={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){r=e[s];let i;if(n=r,!Px(r)&&(n=xc[(i=String(r)).toLowerCase()],n===void 0))throw new Le(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+s]=n}if(!n){const s=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
155
+ */const F2=yi("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Hd=Symbol.for("constructDateFrom");function cc(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Hd in e?e[Hd](t):e instanceof Date?new e.constructor(t):new Date(t)}function sn(e,t){return cc(t||e,e)}function Ud(e,t,r){const[n,o]=[+sn(e.start,r?.in),+sn(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+sn(t.start,r?.in),+sn(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}var W2=/^\s+/,V2=/\s+$/;function De(e,t){if(e=e||"",t=t||{},e instanceof De)return e;if(!(this instanceof De))return new De(e,t);var r=H2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.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=r.ok}De.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 t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,o,s,i,a;return r=t.r/255,n=t.g/255,o=t.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=Qd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=qd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=qd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+o+"%)":"hsva("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=Yd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Yd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+o+"%)":"hsla("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return Zd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return Z2(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},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(_t(this._r,255)*100)+"%",g:Math.round(_t(this._g,255)*100)+"%",b:Math.round(_t(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%)":"rgba("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:i1[Zd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Gd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=De(t);n="#"+Gd(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,s=!r&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return De(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(X2,arguments)},brighten:function(){return this._applyModification(J2,arguments)},darken:function(){return this._applyModification(e1,arguments)},desaturate:function(){return this._applyModification(G2,arguments)},saturate:function(){return this._applyModification(K2,arguments)},greyscale:function(){return this._applyModification(Q2,arguments)},spin:function(){return this._applyModification(t1,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(o1,arguments)},complement:function(){return this._applyCombination(r1,arguments)},monochromatic:function(){return this._applyCombination(s1,arguments)},splitcomplement:function(){return this._applyCombination(n1,arguments)},triad:function(){return this._applyCombination(Kd,[3])},tetrad:function(){return this._applyCombination(Kd,[4])}},De.fromRatio=function(e,t){if(bi(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Ao(e[n]));e=r}return De(e,t)};function H2(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=u1(e)),bi(e)=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=U2(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=Ao(e.s),o=Ao(e.v),t=q2(e.h,n,o),i=!0,a="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=Ao(e.s),s=Ao(e.l),t=Y2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Qd(r),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function U2(e,t,r){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(r,255)*255}}function Yd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=(n+o)/2;if(n==o)s=i=0;else{var c=n-o;switch(i=a>.5?c/(2-n-o):c/(n+o),n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,l:a}}function Y2(e,t,r){var n,o,s;e=_t(e,360),t=_t(t,100),r=_t(r,100);function i(l,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?l+(d-l)*6*f:f<1/2?d:f<2/3?l+(d-l)*(2/3-f)*6:l}if(t===0)n=o=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;n=i(c,a,e+1/3),o=i(c,a,e),s=i(c,a,e-1/3)}return{r:n*255,g:o*255,b:s*255}}function qd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=n,c=n-o;if(i=n===0?0:c/n,n==o)s=0;else{switch(n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,v:a}}function q2(e,t,r){e=_t(e,360)*6,t=_t(t,100),r=_t(r,100);var n=Math.floor(e),o=e-n,s=r*(1-t),i=r*(1-o*t),a=r*(1-(1-o)*t),c=n%6,l=[r,i,s,s,a,r][c],d=[a,r,r,i,s,s][c],f=[s,s,a,r,r,i][c];return{r:l*255,g:d*255,b:f*255}}function Zd(e,t,r,n){var o=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16))];return n&&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 Z2(e,t,r,n,o){var s=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16)),Er(Xd(n))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Gd(e,t,r,n){var o=[Er(Xd(n)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16))];return o.join("")}De.equals=function(e,t){return!e||!t?!1:De(e).toRgbString()==De(t).toRgbString()},De.random=function(){return De.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function G2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s-=t/100,r.s=xi(r.s),De(r)}function K2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s+=t/100,r.s=xi(r.s),De(r)}function Q2(e){return De(e).desaturate(100)}function X2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l+=t/100,r.l=xi(r.l),De(r)}function J2(e,t){t=t===0?0:t||10;var r=De(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),De(r)}function e1(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l-=t/100,r.l=xi(r.l),De(r)}function t1(e,t){var r=De(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,De(r)}function r1(e){var t=De(e).toHsl();return t.h=(t.h+180)%360,De(t)}function Kd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=De(e).toHsl(),n=[De(e)],o=360/t,s=1;s<t;s++)n.push(De({h:(r.h+s*o)%360,s:r.s,l:r.l}));return n}function n1(e){var t=De(e).toHsl(),r=t.h;return[De(e),De({h:(r+72)%360,s:t.s,l:t.l}),De({h:(r+216)%360,s:t.s,l:t.l})]}function o1(e,t,r){t=t||6,r=r||30;var n=De(e).toHsl(),o=360/r,s=[De(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,s.push(De(n));return s}function s1(e,t){t=t||6;for(var r=De(e).toHsv(),n=r.h,o=r.s,s=r.v,i=[],a=1/t;t--;)i.push(De({h:n,s:o,v:s})),s=(s+a)%1;return i}De.mix=function(e,t,r){r=r===0?0:r||50;var n=De(e).toRgb(),o=De(t).toRgb(),s=r/100,i={r:(o.r-n.r)*s+n.r,g:(o.g-n.g)*s+n.g,b:(o.b-n.b)*s+n.b,a:(o.a-n.a)*s+n.a};return De(i)},De.readability=function(e,t){var r=De(e),n=De(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},De.isReadable=function(e,t,r){var n=De.readability(e,t),o,s;switch(s=!1,o=d1(r),o.level+o.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},De.mostReadable=function(e,t,r){var n=null,o=0,s,i,a,c;r=r||{},i=r.includeFallbackColors,a=r.level,c=r.size;for(var l=0;l<t.length;l++)s=De.readability(e,t[l]),s>o&&(o=s,n=De(t[l]));return De.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,De.mostReadable(e,["#fff","#000"],r))};var lc=De.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"},i1=De.hexNames=a1(lc);function a1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Qd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _t(e,t){c1(e)&&(e="100%");var r=l1(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function xi(e){return Math.min(1,Math.max(0,e))}function dr(e){return parseInt(e,16)}function c1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function l1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Ao(e){return e<=1&&(e=e*100+"%"),e}function Xd(e){return Math.round(parseFloat(e)*255).toString(16)}function Jd(e){return dr(e)/255}var Dr=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),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 Kr(e){return!!Dr.CSS_UNIT.exec(e)}function u1(e){e=e.replace(W2,"").replace(V2,"").toLowerCase();var t=!1;if(lc[e])e=lc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Dr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Dr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Dr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Dr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Dr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Dr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Dr.hex8.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),a:Jd(r[4]),format:t?"name":"hex8"}:(r=Dr.hex6.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),format:t?"name":"hex"}:(r=Dr.hex4.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),a:Jd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Dr.hex3.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function d1(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}const ef="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",f1="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",p1="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",tf="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",rf=y.createContext(void 0),h1=({children:e})=>{const[t,r]=y.useState(()=>({userEmail:localStorage.getItem("user_email")||null})),[n,o]=y.useState(()=>({userEmail:localStorage.getItem("user_outlook")||null})),s=y.useCallback(l=>{localStorage.setItem("user_email",l),r({userEmail:l})},[]),i=y.useCallback(l=>{localStorage.setItem("user_outlook",l),o({userEmail:l})},[]),a=y.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return u.jsx(rf.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},uc=()=>{const e=y.useContext(rf);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function nf(e,t){return function(){return e.apply(t,arguments)}}const{toString:m1}=Object.prototype,{getPrototypeOf:dc}=Object,{iterator:_i,toStringTag:of}=Symbol,wi=(e=>t=>{const r=m1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kr=e=>(e=e.toLowerCase(),t=>wi(t)===e),Si=e=>t=>typeof t===e,{isArray:Yn}=Array,To=Si("undefined");function Io(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sf=kr("ArrayBuffer");function g1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sf(e.buffer),t}const v1=Si("string"),or=Si("function"),af=Si("number"),Mo=e=>e!==null&&typeof e=="object",y1=e=>e===!0||e===!1,Ci=e=>{if(wi(e)!=="object")return!1;const t=dc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(of in e)&&!(_i in e)},b1=e=>{if(!Mo(e)||Io(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},x1=kr("Date"),_1=kr("File"),w1=kr("Blob"),S1=kr("FileList"),C1=e=>Mo(e)&&or(e.pipe),E1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||or(e.append)&&((t=wi(e))==="formdata"||t==="object"&&or(e.toString)&&e.toString()==="[object FormData]"))},D1=kr("URLSearchParams"),[k1,A1,T1,I1]=["ReadableStream","Request","Response","Headers"].map(kr),M1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Io(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(n=0;n<i;n++)a=s[n],t.call(null,e[a],a,e)}}function cf(e,t){if(Io(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lf=e=>!To(e)&&e!==yn;function fc(){const{caseless:e}=lf(this)&&this||{},t={},r=(n,o)=>{const s=e&&cf(t,o)||o;Ci(t[s])&&Ci(n)?t[s]=fc(t[s],n):Ci(n)?t[s]=fc({},n):Yn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Po(arguments[n],r);return t}const P1=(e,t,r,{allOwnKeys:n}={})=>(Po(t,(o,s)=>{r&&or(o)?e[s]=nf(o,r):e[s]=o},{allOwnKeys:n}),e),O1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),j1=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},R1=(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&dc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},N1=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},$1=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!af(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},L1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dc(Uint8Array)),z1=(e,t)=>{const n=(e&&e[_i]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},B1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},F1=kr("HTMLFormElement"),W1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),uf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),V1=kr("RegExp"),df=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Po(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},H1=e=>{df(e,(t,r)=>{if(or(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(or(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},U1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Yn(e)?n(e):n(String(e).split(t)),r},Y1=()=>{},q1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Z1(e){return!!(e&&or(e.append)&&e[of]==="FormData"&&e[_i])}const G1=e=>{const t=new Array(10),r=(n,o)=>{if(Mo(n)){if(t.indexOf(n)>=0)return;if(Io(n))return n;if(!("toJSON"in n)){t[o]=n;const s=Yn(n)?[]:{};return Po(n,(i,a)=>{const c=r(i,o+1);!To(c)&&(s[a]=c)}),t[o]=void 0,s}}return n};return r(e,0)},K1=kr("AsyncFunction"),Q1=e=>e&&(Mo(e)||or(e))&&or(e.then)&&or(e.catch),ff=((e,t)=>e?setImmediate:t?((r,n)=>(yn.addEventListener("message",({source:o,data:s})=>{o===yn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),yn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",or(yn.postMessage)),X1=typeof queueMicrotask<"u"?queueMicrotask.bind(yn):typeof process<"u"&&process.nextTick||ff,z={isArray:Yn,isArrayBuffer:sf,isBuffer:Io,isFormData:E1,isArrayBufferView:g1,isString:v1,isNumber:af,isBoolean:y1,isObject:Mo,isPlainObject:Ci,isEmptyObject:b1,isReadableStream:k1,isRequest:A1,isResponse:T1,isHeaders:I1,isUndefined:To,isDate:x1,isFile:_1,isBlob:w1,isRegExp:V1,isFunction:or,isStream:C1,isURLSearchParams:D1,isTypedArray:L1,isFileList:S1,forEach:Po,merge:fc,extend:P1,trim:M1,stripBOM:O1,inherits:j1,toFlatObject:R1,kindOf:wi,kindOfTest:kr,endsWith:N1,toArray:$1,forEachEntry:z1,matchAll:B1,isHTMLForm:F1,hasOwnProperty:uf,hasOwnProp:uf,reduceDescriptors:df,freezeMethods:H1,toObjectSet:U1,toCamelCase:W1,noop:Y1,toFiniteNumber:q1,findKey:cf,global:yn,isContextDefined:lf,isSpecCompliantForm:Z1,toJSONObject:G1,isAsyncFn:K1,isThenable:Q1,setImmediate:ff,asap:X1,isIterable:e=>e!=null&&or(e[_i])};function Le(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}z.inherits(Le,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:z.toJSONObject(this.config),code:this.code,status:this.status}}});const pf=Le.prototype,hf={};["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=>{hf[e]={value:e}}),Object.defineProperties(Le,hf),Object.defineProperty(pf,"isAxiosError",{value:!0}),Le.from=(e,t,r,n,o,s)=>{const i=Object.create(pf);return z.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Le.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const J1=null;function pc(e){return z.isPlainObject(e)||z.isArray(e)}function mf(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,r){return e?e.concat(t).map(function(o,s){return o=mf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function ex(e){return z.isArray(e)&&!e.some(pc)}const tx=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Ei(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!z.isUndefined(b[p])});const n=r.metaTokens,o=r.visitor||d,s=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(z.isDate(m))return m.toISOString();if(z.isBoolean(m))return m.toString();if(!c&&z.isBlob(m))throw new Le("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(m)||z.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,p,b){let w=m;if(m&&!b&&typeof m=="object"){if(z.endsWith(p,"{}"))p=n?p:p.slice(0,-2),m=JSON.stringify(m);else if(z.isArray(m)&&ex(m)||(z.isFileList(m)||z.endsWith(p,"[]"))&&(w=z.toArray(m)))return p=mf(p),w.forEach(function(E,S){!(z.isUndefined(E)||E===null)&&t.append(i===!0?gf([p],S,s):i===null?p:p+"[]",l(E))}),!1}return pc(m)?!0:(t.append(gf(b,p,s),l(m)),!1)}const f=[],h=Object.assign(tx,{defaultVisitor:d,convertValue:l,isVisitable:pc});function v(m,p){if(!z.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(m),z.forEach(m,function(w,C){(!(z.isUndefined(w)||w===null)&&o.call(t,w,z.isString(C)?C.trim():C,p,h))===!0&&v(w,p?p.concat(C):[C])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return v(e),t}function vf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function hc(e,t){this._pairs=[],e&&Ei(e,this,t)}const yf=hc.prototype;yf.append=function(t,r){this._pairs.push([t,r])},yf.toString=function(t){const r=t?function(n){return t.call(this,n,vf)}:vf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function rx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function bf(e,t,r){if(!t)return e;const n=r&&r.encode||rx;z.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=z.isURLSearchParams(t)?t.toString():new hc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class xf{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(n){n!==null&&t(n)})}}const _f={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",gc=typeof navigator=="object"&&navigator||void 0,ox=mc&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),sx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ix=mc&&window.location.href||"http://localhost",Xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:ox,hasStandardBrowserWebWorkerEnv:sx,navigator:gc,origin:ix},Symbol.toStringTag,{value:"Module"})),...nx};function ax(e,t){return Ei(e,new Xt.classes.URLSearchParams,{visitor:function(r,n,o,s){return Xt.isNode&&z.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function cx(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lx(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function wf(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=r.length;return i=!i&&z.isArray(o)?o.length:i,c?(z.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!a):((!o[i]||!z.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&z.isArray(o[i])&&(o[i]=lx(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(cx(n),o,r,0)}),r}return null}function ux(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Oo={transitional:_f,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=z.isObject(t);if(s&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return o?JSON.stringify(wf(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ax(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ei(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),ux(t)):t}],transformResponse:[function(t){const r=this.transitional||Oo.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?Le.from(a,Le.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xt.classes.FormData,Blob:Xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Oo.headers[e]={}});const dx=z.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"]),fx=e=>{const t={};let r,n,o;return e&&e.split(`
156
+ `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&dx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Sf=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function Di(e){return e===!1||e==null?e:z.isArray(e)?e.map(Di):String(e)}function px(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const hx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function vc(e,t,r,n,o){if(z.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!z.isString(t)){if(z.isString(n))return t.indexOf(n)!==-1;if(z.isRegExp(n))return n.test(t)}}function mx(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function gx(e,t){const r=z.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let sr=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(a,c,l){const d=jo(c);if(!d)throw new Error("header name must be a non-empty string");const f=z.findKey(o,d);(!f||o[f]===void 0||l===!0||l===void 0&&o[f]!==!1)&&(o[f||c]=Di(a))}const i=(a,c)=>z.forEach(a,(l,d)=>s(l,d,c));if(z.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(z.isString(t)&&(t=t.trim())&&!hx(t))i(fx(t),r);else if(z.isObject(t)&&z.isIterable(t)){let a={},c,l;for(const d of t){if(!z.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[l=d[0]]=(c=a[l])?z.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}i(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=jo(t),t){const n=z.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return px(o);if(z.isFunction(r))return r.call(this,o,n);if(z.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=jo(t),t){const n=z.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||vc(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=jo(i),i){const a=z.findKey(n,i);a&&(!r||vc(n,n[a],a,r))&&(delete n[a],o=!0)}}return z.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||vc(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return z.forEach(this,(o,s)=>{const i=z.findKey(n,s);if(i){r[i]=Di(o),delete r[s];return}const a=t?mx(s):String(s).trim();a!==s&&delete r[s],r[a]=Di(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return z.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&z.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
157
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Sf]=this[Sf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=jo(i);n[a]||(gx(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(sr);function yc(e,t){const r=this||Oo,n=t||r,o=sr.from(n.headers);let s=n.data;return z.forEach(e,function(a){s=a.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Cf(e){return!!(e&&e.__CANCEL__)}function qn(e,t,r){Le.call(this,e??"canceled",Le.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(qn,Le,{__CANCEL__:!0});function Ef(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Le("Request failed with status code "+r.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function vx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yx(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),d=n[s];i||(i=l),r[o]=c,n[o]=l;let f=s,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const v=d&&l-d;return v?Math.round(h*1e3/v):void 0}}function bx(e,t){let r=0,n=1e3/t,o,s;const i=(l,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const d=Date.now(),f=d-r;f>=n?i(l,d):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const ki=(e,t,r=3)=>{let n=0;const o=yx(50,250);return bx(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,l=o(c),d=i<=a;n=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Df=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},kf=e=>(...t)=>z.asap(()=>e(...t)),xx=Xt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xt.origin),Xt.navigator&&/(msie|trident)/i.test(Xt.navigator.userAgent)):()=>!0,_x=Xt.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),z.isString(n)&&i.push("path="+n),z.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Sx(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Af(e,t,r){let n=!wx(t);return e&&(n||r==!1)?Sx(e,t):t}const Tf=e=>e instanceof sr?{...e}:e;function bn(e,t){t=t||{};const r={};function n(l,d,f,h){return z.isPlainObject(l)&&z.isPlainObject(d)?z.merge.call({caseless:h},l,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function o(l,d,f,h){if(z.isUndefined(d)){if(!z.isUndefined(l))return n(void 0,l,f,h)}else return n(l,d,f,h)}function s(l,d){if(!z.isUndefined(d))return n(void 0,d)}function i(l,d){if(z.isUndefined(d)){if(!z.isUndefined(l))return n(void 0,l)}else return n(void 0,d)}function a(l,d,f){if(f in t)return n(l,d);if(f in e)return n(void 0,l)}const c={url:s,method:s,data:s,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:a,headers:(l,d,f)=>o(Tf(l),Tf(d),f,!0)};return z.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||o,h=f(e[d],t[d],d);z.isUndefined(h)&&f!==a||(r[d]=h)}),r}const If=e=>{const t=bn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=sr.from(i),t.url=bf(Af(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(z.isFormData(r)){if(Xt.hasStandardBrowserEnv||Xt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[l,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...d].join("; "))}}if(Xt.hasStandardBrowserEnv&&(n&&z.isFunction(n)&&(n=n(t)),n||n!==!1&&xx(t.url))){const l=o&&s&&_x.read(s);l&&i.set(o,l)}return t},Cx=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=If(e);let s=o.data;const i=sr.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,d,f,h,v,m;function p(){v&&v(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function w(){if(!b)return;const E=sr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};Ef(function(D){r(D),p()},function(D){n(D),p()},_),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(n(new Le("Request aborted",Le.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new Le("Network Error",Le.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||_f;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),n(new Le(S,_.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(S,_){b.setRequestHeader(_,S)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([h,m]=ki(l,!0),b.addEventListener("progress",h)),c&&b.upload&&([f,v]=ki(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(d=E=>{b&&(n(!E||E.type?new qn(null,e,b):E),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const C=vx(o.url);if(C&&Xt.protocols.indexOf(C)===-1){n(new Le("Unsupported protocol "+C+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)})},Ex=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(l){if(!o){o=!0,a();const d=l instanceof Error?l:this.reason;n.abort(d instanceof Le?d:new qn(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new Le(`timeout ${t} of ms exceeded`,Le.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>z.asap(a),c}},Dx=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},kx=async function*(e,t){for await(const r of Ax(e))yield*Dx(r,t)},Ax=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Mf=(e,t,r,n)=>{const o=kx(e,t);let s=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await o.next();if(l){a(),c.close();return}let f=d.byteLength;if(r){let h=s+=f;r(h)}c.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Ai=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pf=Ai&&typeof ReadableStream=="function",Tx=Ai&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Of=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ix=Pf&&Of(()=>{let e=!1;const t=new Request(Xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),jf=64*1024,bc=Pf&&Of(()=>z.isReadableStream(new Response("").body)),Ti={stream:bc&&(e=>e.body)};Ai&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ti[t]&&(Ti[t]=z.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Le(`Response type '${t}' is not supported`,Le.ERR_NOT_SUPPORT,n)})})})(new Response);const Mx=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(Xt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await Tx(e)).byteLength},Px=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??Mx(t)},xc={http:J1,xhr:Cx,fetch:Ai&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:f="same-origin",fetchOptions:h}=If(e);l=l?(l+"").toLowerCase():"text";let v=Ex([o,s&&s.toAbortSignal()],i),m;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(c&&Ix&&r!=="get"&&r!=="head"&&(b=await Px(d,n))!==0){let _=new Request(t,{method:"POST",body:n,duplex:"half"}),W;if(z.isFormData(n)&&(W=_.headers.get("content-type"))&&d.setContentType(W),_.body){const[D,A]=Df(b,ki(kf(c)));n=Mf(_.body,jf,D,A)}}z.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:v,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let C=await fetch(m,h);const E=bc&&(l==="stream"||l==="response");if(bc&&(a||E&&p)){const _={};["status","statusText","headers"].forEach(M=>{_[M]=C[M]});const W=z.toFiniteNumber(C.headers.get("content-length")),[D,A]=a&&Df(W,ki(kf(a),!0))||[];C=new Response(Mf(C.body,jf,D,()=>{A&&A(),p&&p()}),_)}l=l||"text";let S=await Ti[z.findKey(Ti,l)||"text"](C,e);return!E&&p&&p(),await new Promise((_,W)=>{Ef(_,W,{data:S,headers:sr.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:m})})}catch(w){throw p&&p(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,e,m),{cause:w.cause||w}):Le.from(w,w&&w.code,e,m)}})};z.forEach(xc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Rf=e=>`- ${e}`,Ox=e=>z.isFunction(e)||e===null||e===!1,Nf={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){r=e[s];let i;if(n=r,!Ox(r)&&(n=xc[(i=String(r)).toLowerCase()],n===void 0))throw new Le(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+s]=n}if(!n){const s=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
158
158
  `+s.map(Rf).join(`
159
- `):" "+Rf(s[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:xc};function _c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qn(null,e)}function $f(e){return _c(e),e.headers=sr.from(e.headers),e.data=yc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nf.getAdapter(e.adapter||Oo.adapter)(e).then(function(n){return _c(e),n.data=yc.call(e,e.transformResponse,n),n.headers=sr.from(n.headers),n},function(n){return Cf(n)||(_c(e),n&&n.response&&(n.response.data=yc.call(e,e.transformResponse,n.response),n.response.headers=sr.from(n.response.headers))),Promise.reject(n)})}const Lf="1.11.0",Ii={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ii[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const zf={};Ii.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Lf+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(t===!1)throw new Le(o(i," has been removed"+(r?" in "+r:"")),Le.ERR_DEPRECATED);return r&&!zf[i]&&(zf[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,a):!0}},Ii.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Ox(e,t,r){if(typeof e!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new Le("option "+s+" must be "+c,Le.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Le("Unknown option "+s,Le.ERR_BAD_OPTION)}}const Mi={assertOptions:Ox,validators:Ii},Wr=Mi.validators;let xn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new xf,response:new xf}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
160
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Mi.assertOptions(n,{silentJSONParsing:Wr.transitional(Wr.boolean),forcedJSONParsing:Wr.transitional(Wr.boolean),clarifyTimeoutError:Wr.transitional(Wr.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Mi.assertOptions(o,{encode:Wr.function,serialize:Wr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Mi.assertOptions(r,{baseUrl:Wr.spelling("baseURL"),withXsrfToken:Wr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&z.merge(s.common,s[r.method]);s&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),r.headers=sr.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let d,f=0,h;if(!c){const m=[$f.bind(this),void 0];for(m.unshift(...a),m.push(...u),h=m.length,d=Promise.resolve(r);f<h;)d=d.then(m[f++],m[f++]);return d}h=a.length;let v=r;for(f=0;f<h;){const m=a[f++],p=a[f++];try{v=m(v)}catch(b){p.call(this,b);break}}try{d=$f.call(this,v)}catch(m){return Promise.reject(m)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=bn(this.defaults,t);const r=Af(t.baseURL,t.url,t.allowAbsoluteUrls);return bf(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(r,n){return this.request(bn(n||{},{method:t,url:r,data:(n||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function r(n){return function(s,i,a){return this.request(bn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}xn.prototype[t]=r(),xn.prototype[t+"Form"]=r(!0)});let jx=class m0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{n.subscribe(a),s=a}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,a){n.reason||(n.reason=new qn(s,i,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new m0(function(o){t=o}),cancel:t}}};function Rx(e){return function(r){return e.apply(null,r)}}function Nx(e){return z.isObject(e)&&e.isAxiosError===!0}const wc={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(wc).forEach(([e,t])=>{wc[t]=e});function Bf(e){const t=new xn(e),r=nf(xn.prototype.request,t);return z.extend(r,xn.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Bf(bn(e,o))},r}const Rt=Bf(Oo);Rt.Axios=xn,Rt.CanceledError=qn,Rt.CancelToken=jx,Rt.isCancel=Cf,Rt.VERSION=Lf,Rt.toFormData=Ei,Rt.AxiosError=Le,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=Rx,Rt.isAxiosError=Nx,Rt.mergeConfig=bn,Rt.AxiosHeaders=sr,Rt.formToJSON=e=>wf(z.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Nf.getAdapter,Rt.HttpStatusCode=wc,Rt.default=Rt;const{Axios:n5,AxiosError:o5,CanceledError:s5,isCancel:i5,CancelToken:a5,VERSION:c5,all:l5,Cancel:u5,isAxiosError:d5,spread:f5,toFormData:p5,AxiosHeaders:h5,HttpStatusCode:m5,formToJSON:g5,getAdapter:v5,mergeConfig:y5}=Rt,Ff={token:null},$x=e=>{Ff.token=e},Et=Rt.create({headers:{"Content-Type":"application/json"}});Et.interceptors.request.use(e=>{const t=Ff.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Wf=y.createContext(void 0),Lx=({config:e,children:t})=>(y.useEffect(()=>{e.getToken&&$x(e.getToken)},[e.getToken]),l.jsx(Wf.Provider,{value:e,children:t})),Sc=()=>{const e=y.useContext(Wf);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Pi=()=>{const{calendarApiUrl:e}=Sc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await Et.get(i)).data}catch(i){throw console.error("Error al obtener la URL de Google Auth:",i),i}},saveGoogleCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/google-auth/SaveCredential?${a}`;return(await Et.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await Et.get(`${e}/api/Calendario/v1/google/ObtenerTiposCalendariosGoogleAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},syncGoogleEvents:async(i,a,c)=>{try{return(await Et.post(`${e}/api/Calendario/v1/google/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(u){throw console.error("Error al sincronizar eventos con Google Calendar:",u),u}},getGoogleEventsByMonth:async i=>{try{return(await Et.post(`${e}/api/Calendario/v1/google/ObtenerEventosGoogleAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Google Calendar por mes:",a),a}}}},Vf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",zx=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=Pi(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const{url:i}=await o.getGoogleAuthUrl();window.location.href=i}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return l.jsxs("div",{className:"flex",children:[l.jsxs("div",{className:xe.syncButton,onClick:s,children:[l.jsx("div",{className:xe.customCheckIcon,children:l.jsx("div",{className:xe.uncheckedCircle})}),l.jsx("img",{src:Vf,width:18}),l.jsx("span",{children:"Google Calendar"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Cc=()=>{const{calendarApiUrl:e}=Sc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await Et.get(i);return console.log("api",a),a.data}catch(i){throw console.error("Error al obtener la URL de Outlook Auth:",i),i}},saveOutlookCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/outlook-auth/SaveCredential?${a}`;return(await Et.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await Et.post(`${e}/api/Calendario/v1/outlook/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(u){throw console.error("Error al sincronizar eventos con outlook Calendar:",u),u}},getOutlookCalendars:async(i,a)=>{try{return(await Et.get(`${e}/api/Calendario/v1/outlook/ObtenerTiposCalendariosOutlookAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},getOutlookEventsByMonth:async i=>{try{return(await Et.post(`${e}/api/Calendario/v1/outlook/ObtenerEventosoutlookAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Outlook Calendar por mes:",a),a}}}},Uf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",Bx=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=Cc(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const i=await o.getOutlookAuthUrl();window.location.href=i?.authUrl}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return l.jsxs("div",{className:"flex",children:[l.jsxs("div",{className:xe.syncButton,onClick:s,children:[l.jsx("div",{className:xe.customCheckIcon,children:l.jsx("div",{className:xe.uncheckedCircle})}),l.jsx("img",{src:Uf,width:20}),l.jsx("span",{children:"Outlook"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Hf="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='88'%20height='67'%20fill='none'%3e%3cg%20filter='url(%23a)'%20opacity='.7'%3e%3cellipse%20cx='69.302'%20cy='60.952'%20fill='%23D9D9D9'%20rx='12.698'%20ry='2.032'/%3e%3c/g%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M60.034%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a270%20270%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.403.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.499%2014.552a2.033%202.033%200%200%201-3.242.236l1.533-1.333-1.535%201.332v-.003l-.005-.004-.01-.012-.028-.033-.082-.1a10%2010%200%200%201-.26-.34%2014%2014%200%200%201-.798-1.221%2017.3%2017.3%200%200%201-1.828-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m1.867%2017.26q-.02.064-.042.126.091-.276.172-.552zm-1.626-14.786.004.008z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20d='M59.728%2035.515s-1.736-7.32%206.371-12.183c0%200%20.497%208.29-6.371%2012.183'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M79.915%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a281%20281%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.402.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.5%2014.552a2.033%202.033%200%200%201-3.241.236l1.532-1.333-1.534%201.332-.001-.003-.004-.004-.011-.012-.027-.033-.082-.1a10%2010%200%200%201-.26-.34c-.211-.287-.492-.698-.799-1.221a17.3%2017.3%200%200%201-1.827-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m2.476%209.544q.013.113.027.228-.058-.477-.135-.934z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M72.733%2022.085c.313-.165.691-.154.996.028l-.522.871c.522-.87.521-.871.522-.87l.004.001.007.004.021.013q.027.016.072.046.091.057.25.165c.212.145.507.357.856.635.697.556%201.62%201.383%202.52%202.474%201.803%202.183%203.562%205.475%203.201%209.764a1.016%201.016%200%200%201-1.376.863h-.002l-.004-.002-.008-.002-.023-.01-.079-.033a9.79%209.79%200%200%201-1.139-.603%2012%2012%200%200%201-2.566-2.14c-1.853-2.044-3.57-5.345-3.271-10.365l.017-.131c.057-.3.249-.563.524-.708M78.04%2034.22l.11.075a11%2011%200%200%201-.394-.282zm-4.516-11.027.334.237q0%200%20.003.002a13%2013%200%200%200-.337-.24'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M85.456%2022.461a1.017%201.017%200%200%201%201.536.81l-1.014.061%201.014-.06v.002l.001.003v.008l.001.024.004.085q.004.108.004.301c0%20.257-.007.62-.04%201.067-.064.89-.227%202.12-.618%203.482-.781%202.723-2.5%206.038-6.237%208.156a1.018%201.018%200%200%201-1.489-.65l-.002-.006-.002-.009-.005-.025a5%205%200%200%201-.065-.367%2010%2010%200%200%201-.096-.999c-.04-.837%200-2.002.316-3.331.639-2.686%202.388-5.97%206.692-8.552'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M70.232%205.343c.71.002%201.37.374%201.737.982l-1.74%201.05c1.739-1.05%201.74-1.048%201.74-1.048l.002.002q0%20.003.003.004l.008.014.023.04.082.142q.102.18.274.505c.227.432.535%201.053.875%201.834a33%2033%200%200%201%202.036%206.417c1.09%205.284%201.122%2012.4-3.305%2019.3a2.034%202.034%200%200%201-3.242.236l1.532-1.334a223%20223%200%200%201-1.534%201.332l-.002-.002-.004-.005-.012-.013-.033-.04-.102-.124a13%2013%200%200%201-.335-.438%2019%2019%200%200%201-1.048-1.603%2023%2023%200%200%201-2.413-5.902c-1.3-5.104-1.25-12.198%203.719-20.373l.072-.11c.38-.541%201-.867%201.667-.866m1.563%2026.818v-.002l-.003-.002v-.002z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M60.61%2018.704c.315-.166.693-.155.998.027l-.523.871c.489-.815.52-.868.523-.87l.004.001.009.005.027.017a8%208%200%200%201%20.425.279c.282.192.676.476%201.145.85a23%2023%200%200%201%203.383%203.32c2.419%202.929%204.765%207.325%204.284%2013.05a1.017%201.017%200%200%201-1.376.864l.363-.948-.364.947h-.002l-.003-.002q-.005%200-.01-.003l-.03-.012-.1-.041a9%209%200%200%201-.341-.157c-.288-.139-.69-.35-1.164-.642a16%2016%200%200%201-3.42-2.852c-2.465-2.719-4.768-7.125-4.367-13.866l.017-.131c.058-.3.248-.562.523-.708m.436%201.974q.003-.237.011-.477v-.003a24%2024%200%200%200-.01.48'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M78.103%2019.143a1.016%201.016%200%200%201%201.419.871l-1.014.06%201.014-.06.001.002v.013l.002.032.004.11q.005.142.006.399c0%20.341-.01.83-.054%201.428a23.2%2023.2%200%200%201-.829%204.675c-1.05%203.655-3.348%208.076-8.335%2010.904a1.016%201.016%200%200%201-1.49-.65l.989-.233-.988.232-.001-.001-.001-.004-.002-.01-.007-.032q-.01-.038-.022-.104a9%209%200%200%201-.064-.372c-.047-.317-.1-.768-.127-1.326a16%2016%200%200%201%20.423-4.441c.85-3.574%203.18-7.967%208.96-11.433zm-8.499%2015.032c-.007.617.024%201.143.066%201.552q.032.308.065.524c.043.286.08.443.08.443-.003-.017-.23-.99-.21-2.52m.05-1.027q-.023.282-.036.546l.032-.511q.001-.018.004-.035'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20d='M55.804%2031.519h28.238c.815%200%201.476.663%201.476%201.481v15.847c0%206.204-5.019%2011.241-11.2%2011.241h-8.79c-6.182%200-11.2-5.037-11.2-11.24V33c0-.818.66-1.481%201.476-1.481'/%3e%3cpath%20fill='%23E6E8ED'%20d='M68.15%2032.344v17.159c0%205.103%203.6%209.364%208.39%2010.361%205.122-1.034%208.978-5.574%208.978-11.018V33c0-.818-.66-1.481-1.476-1.481h-15.07a.823.823%200%200%200-.822.824z'/%3e%3cg%20filter='url(%23b)'%20opacity='.7'%3e%3cellipse%20cx='33.238'%20cy='60.952'%20fill='%23D9D9D9'%20rx='28.444'%20ry='3.048'/%3e%3c/g%3e%3cpath%20fill='%233856EC'%20d='M6.095%2017.27h54.857V53.84a6.095%206.095%200%200%201-6.095%206.095H12.19a6.095%206.095%200%200%201-6.095-6.095z'/%3e%3cpath%20fill='%23E2EDFB'%20d='M6.195%2050.145a8.127%208.127%200%200%200%208.127%208.127H37.9a6.1%206.1%200%200%200%204.309-1.785l16.98-16.973a6.1%206.1%200%200%200%201.785-4.31V9.586a6.095%206.095%200%200%200-6.095-6.095H12.29a6.095%206.095%200%200%200-6.095%206.095z'/%3e%3cpath%20fill='%233856EC'%20fill-rule='evenodd'%20d='M60.952%209.009a6.014%206.014%200%200%200-6.014-6.014H12.11a6.014%206.014%200%200%200-6.014%206.014v8.284h54.857zM17.77%2012.772a2.794%202.794%200%201%201%20.002-5.589%202.794%202.794%200%200%201-.002%205.59m15.965%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201%200%205.588m16.763%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201-.001%205.588'%20clip-rule='evenodd'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3cpath%20fill='%23597EF7'%20d='M40.52%2057.687a6%206%200%200%200%201.665-1.174l17.027-17.021a6%206%200%200%200%201.313-1.973H48.646a8.127%208.127%200%200%200-8.127%208.127z'/%3e%3crect%20width='3.991'%20height='11.974'%20x='15.773'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='31.738'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='48.501'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3cdefs%3e%3cfilter%20id='a'%20width='29.46'%20height='8.127'%20x='54.572'%20y='56.889'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3cfilter%20id='b'%20width='60.952'%20height='10.159'%20x='2.762'%20y='55.873'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e";class _n extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class Ec extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Ar extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Fx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Wx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Vx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Yf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Ux extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class qf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Oi{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var U;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(U||(U={}));class Ro{constructor(){}log(t,r){}}Ro.instance=new Ro;const Hx="10.0.0";class Bt{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class Dt{static get isBrowser(){return!Dt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Dt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Dt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function No(e,t){let r="";return wn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${Yx(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function Yx(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const o=n<16?"0":"";r+=`0x${o}${n.toString(16)} `}),r.substring(0,r.length-1)}function wn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Zf(e,t,r,n,o,s){const i={},[a,c]=Zn();i[a]=c,e.log(U.Trace,`(${t} transport) sending data. ${No(o,s.logMessageContent)}.`);const u=wn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});e.log(U.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function qx(e){return e===void 0?new ji(U.Information):e===null?Ro.instance:e.log!==void 0?e:new ji(e)}class Zx{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class ji{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${U[t]}: ${r}`;switch(t){case U.Critical:case U.Error:this.out.error(n);break;case U.Warning:this.out.warn(n);break;case U.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function Zn(){let e="X-SignalR-User-Agent";return Dt.isNode&&(e="User-Agent"),[e,Gx(Hx,Kx(),Xx(),Qx())]}function Gx(e,t,r,n){let o="Microsoft SignalR/";const s=e.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${e}; `,t&&t!==""?o+=`${t}; `:o+="Unknown OS; ",o+=`${r}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Kx(){if(Dt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Qx(){if(Dt.isNode)return process.versions.node}function Xx(){return Dt.isNode?"NodeJS":"Browser"}function Dc(e){return e.stack?e.stack:e.message?e.message:`${e}`}function Jx(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class e_ extends Oi{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||Dt.isNode){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=r("node-fetch"):this._fetchType=fetch,this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Jx());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new Ar;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new Ar});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(U.Warning,"Timeout from HTTP request."),n=new Ec},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},wn(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(c){throw n||(this._logger.log(U.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Gf(s,"text");throw new _n(c||s.statusText,s.status)}const a=await Gf(s,t.responseType);return new qf(s.status,s.statusText,a)}getCookieString(t){let r="";return Dt.isNode&&this._jar&&this._jar.getCookies(t,(n,o)=>r=o.join("; ")),r}}function Gf(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class t_ extends Oi{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ar):t.method?t.url?new Promise((r,n)=>{const o=new XMLHttpRequest;o.open(t.method,t.url,!0),o.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(wn(t.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(i=>{o.setRequestHeader(i,s[i])}),t.responseType&&(o.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{o.abort(),n(new Ar)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new qf(o.status,o.statusText,o.response||o.responseText)):n(new _n(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(U.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new _n(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(U.Warning,"Timeout from HTTP request."),n(new Ec)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class r_ extends Oi{constructor(t){if(super(),typeof fetch<"u"||Dt.isNode)this._httpClient=new e_(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new t_(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ar):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class fr{static write(t){return`${t}${fr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==fr.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(fr.RecordSeparator);return r.pop(),r}}fr.RecordSeparatorCode=30,fr.RecordSeparator=String.fromCharCode(fr.RecordSeparatorCode);class n_{writeHandshakeRequest(t){return fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(wn(t)){const a=new Uint8Array(t),c=a.indexOf(fr.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),n=a.byteLength>u?a.slice(u).buffer:null}else{const a=t,c=a.indexOf(fr.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;r=a.substring(0,u),n=a.length>u?a.substring(u):null}const o=fr.parse(r),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var $e;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})($e||($e={}));class o_{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new Zx(this,t)}}class s_{constructor(t,r,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=r,this._bufferSize=n}async _send(t){const r=this._protocol.writeMessage(t);let n=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let o=()=>{},s=()=>{};wn(r)?this._bufferedByteCount+=r.byteLength:this._bufferedByteCount+=r.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((i,a)=>{o=i,s=a})),this._messages.push(new i_(r,this._totalMessageCount,o,s))}try{this._reconnectInProgress||await this._connection.send(r)}catch{this._disconnected()}await n}_ack(t){let r=-1;for(let n=0;n<this._messages.length;n++){const o=this._messages[n];if(o._id<=t.sequenceId)r=n,wn(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}r!==-1&&(this._messages=this._messages.slice(r+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==$e.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const r=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,r<=this._latestReceivedSequenceId?(r===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=r,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:$e.Sequence,sequenceId:t}));const r=this._messages;for(const n of r)await this._connection.send(n._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const r of this._messages)r._rejector(t)}_isInvocationMessage(t){switch(t.type){case $e.Invocation:case $e.StreamItem:case $e.Completion:case $e.StreamInvocation:case $e.CancelInvocation:return!0;case $e.Close:case $e.Sequence:case $e.Ping:case $e.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:$e.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class i_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const a_=30*1e3,c_=15*1e3,l_=1e5;var bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(bt||(bt={}));class kc{static create(t,r,n,o,s,i,a){return new kc(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(U.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Bt.isRequired(t,"connection"),Bt.isRequired(r,"logger"),Bt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??a_,this.keepAliveIntervalInMilliseconds=i??c_,this._statefulReconnectBufferSize=a??l_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new n_,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:$e.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==bt.Disconnected&&this._connectionState!==bt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=bt.Connecting,this._logger.log(U.Debug,"Starting HubConnection.");try{await this._startInternal(),Dt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=bt.Connected,this._connectionStarted=!0,this._logger.log(U.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=bt.Disconnected,this._logger.log(U.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{let r=this._protocol.version;this.connection.features.reconnect||(r=1);const n={protocol:this._protocol.name,version:r};if(this._logger.log(U.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(U.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new s_(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(U.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===bt.Disconnected)return this._logger.log(U.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===bt.Disconnecting)return this._logger.log(U.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const r=this._connectionState;return this._connectionState=bt.Disconnecting,this._logger.log(U.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(U.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(r===bt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Ar("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createStreamInvocation(t,r,o);let i;const a=new o_;return a.cancelCallback=()=>{const c=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],i.then(()=>this._sendWithProtocol(c))},this._callbacks[s.invocationId]=(c,u)=>{if(u){a.error(u);return}else c&&(c.type===$e.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},i=this._sendWithProtocol(s).catch(c=>{a.error(c),delete this._callbacks[s.invocationId]}),this._launchStreams(n,i),a}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._sendWithProtocol(this._createInvocation(t,r,!0,o));return this._launchStreams(n,s),s}invoke(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createInvocation(t,r,!1,o);return new Promise((a,c)=>{this._callbacks[s.invocationId]=(d,f)=>{if(f){c(f);return}else d&&(d.type===$e.Completion?d.error?c(new Error(d.error)):a(d.result):c(new Error(`Unexpected message type: ${d.type}`)))};const u=this._sendWithProtocol(s).catch(d=>{c(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,u)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const o=n.indexOf(r);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case $e.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(U.Error,`Invoke client method threw error: ${Dc(o)}`)});break;case $e.StreamItem:case $e.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===$e.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(U.Error,`Stream callback threw error: ${Dc(s)}`)}}break}case $e.Ping:break;case $e.Close:{this._logger.log(U.Information,"Close message received from server.");const o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case $e.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case $e.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(U.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(o){const s="Error parsing handshake response: "+o;this._logger.log(U.Error,s);const i=new Error(s);throw this._handshakeRejecter(i),i}if(r.error){const o="Server returned handshake error: "+r.error;this._logger.log(U.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(U.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===bt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===bt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(U.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(U.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const o=n.slice(),s=!!t.invocationId;let i,a,c;for(const u of o)try{const d=i;i=await u.apply(this,t.arguments),s&&i&&d&&(this._logger.log(U.Error,`Multiple results provided for '${r}'. Sending error to server.`),c=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),a=void 0}catch(d){a=d,this._logger.log(U.Error,`A callback for the method '${r}' threw error '${d}'.`)}c?await this._sendWithProtocol(c):s?(a?c=this._createCompletionMessage(t.invocationId,`${a}`,null):i!==void 0?c=this._createCompletionMessage(t.invocationId,null,i):(this._logger.log(U.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),c=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):i&&this._logger.log(U.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(U.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Ar("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===bt.Disconnecting?this._completeClose(t):this._connectionState===bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=bt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),Dt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(U.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,o=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n,0,o);if(s===null){this._logger.log(U.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=bt.Reconnecting,t?this._logger.log(U.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(U.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(U.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==bt.Reconnecting){this._logger.log(U.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(U.Information,`Reconnect attempt number ${n+1} will start in ${s} ms.`),await new Promise(i=>{this._reconnectDelayHandle=setTimeout(i,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==bt.Reconnecting){this._logger.log(U.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=bt.Connected,this._logger.log(U.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(U.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(U.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==bt.Reconnecting){this._logger.log(U.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===bt.Disconnecting&&this._completeClose();return}n++,o=i instanceof Error?i:new Error(i.toString()),s=this._getNextRetryDelay(n,Date.now()-r,o)}}this._logger.log(U.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(o){return this._logger.log(U.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${o}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const o=r[n];try{o(null,t)}catch(s){this._logger.log(U.Error,`Stream 'error' callback called with '${t}' threw error: ${Dc(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,o){if(n)return o.length!==0?{target:t,arguments:r,streamIds:o,type:$e.Invocation}:{target:t,arguments:r,type:$e.Invocation};{const s=this._invocationId;return this._invocationId++,o.length!==0?{target:t,arguments:r,invocationId:s.toString(),streamIds:o,type:$e.Invocation}:{target:t,arguments:r,invocationId:s.toString(),type:$e.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let o=0;o<t.length;o++){const s=t[o];if(this._isObservable(s)){const i=this._invocationId;this._invocationId++,r[i]=s,n.push(i.toString()),t.splice(o,1)}}return[r,n]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,r,n){const o=this._invocationId;return this._invocationId++,n.length!==0?{target:t,arguments:r,invocationId:o.toString(),streamIds:n,type:$e.StreamInvocation}:{target:t,arguments:r,invocationId:o.toString(),type:$e.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:$e.CancelInvocation}}_createStreamItemMessage(t,r){return{invocationId:t,item:r,type:$e.StreamItem}}_createCompletionMessage(t,r,n){return r?{error:r,invocationId:t,type:$e.Completion}:{invocationId:t,result:n,type:$e.Completion}}_createCloseMessage(){return{type:$e.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const u_=[0,2e3,1e4,3e4,null];class Kf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:u_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Sn{}Sn.Authorization="Authorization",Sn.Cookie="Cookie";class d_ extends Oi{constructor(t,r){super(),this._innerClient=t,this._accessTokenFactory=r}async send(t){let r=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Sn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Sn.Authorization]&&delete t.headers[Sn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Wt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Wt||(Wt={}));var Jt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Jt||(Jt={}));let f_=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Qf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new f_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._url=t,this._logger.log(U.Trace,"(LongPolling transport) Connecting."),r===Jt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=Zn(),s={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};r===Jt.Binary&&(i.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(U.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(U.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new _n(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(U.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(U.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(U.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new _n(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(U.Trace,`(LongPolling transport) data received. ${No(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(U.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof Ec?this._logger.log(U.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(U.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(U.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Zf(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(U.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(U.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=Zn();t[r]=n;const o={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,o)}catch(i){s=i}s?s instanceof _n&&(s.statusCode===404?this._logger.log(U.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(U.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(U.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(U.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(U.Trace,t),this.onclose(this._closeError)}}}class p_{constructor(t,r,n,o){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(t,r){return Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._logger.log(U.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(r!==Jt.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(Dt.isBrowser||Dt.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),c={};c.Cookie=a;const[u,d]=Zn();c[u]=d,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{i.onmessage=a=>{if(this.onreceive)try{this._logger.log(U.Trace,`(SSE transport) data received. ${No(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},i.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(U.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?Zf(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class h_{constructor(t,r,n,o,s,i){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=i}async connect(t,r){Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._logger.log(U.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((o,s)=>{t=t.replace(/^http/,"ws");let i;const a=this._httpClient.getCookieString(t);let c=!1;if(Dt.isNode||Dt.isReactNative){const u={},[d,f]=Zn();u[d]=f,n&&(u[Sn.Authorization]=`Bearer ${n}`),a&&(u[Sn.Cookie]=a),i=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(t)),r===Jt.Binary&&(i.binaryType="arraybuffer"),i.onopen=u=>{this._logger.log(U.Information,`WebSocket connected to ${t}.`),this._webSocket=i,c=!0,o()},i.onerror=u=>{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.error:d="There was an error with the transport",this._logger.log(U.Information,`(WebSockets transport) ${d}.`)},i.onmessage=u=>{if(this._logger.log(U.Trace,`(WebSockets transport) data received. ${No(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(d){this._close(d);return}},i.onclose=u=>{if(c)this._close(u);else{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.error:d="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(d))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(U.Trace,`(WebSockets transport) sending data. ${No(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(U.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const Xf=100;class m_{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Bt.isRequired(t,"url"),this._logger=qx(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,o=null;if(Dt.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=s("ws"),o=s("eventsource")}!Dt.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Dt.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Dt.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Dt.isNode&&!r.EventSource&&typeof o<"u"&&(r.EventSource=o),this._httpClient=new d_(r.httpClient||new r_(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Jt.Binary,Bt.isIn(t,Jt,"transferFormat"),this._logger.log(U.Debug,`Starting connection with transfer format '${Jt[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(U.Error,r),await this._stopPromise,Promise.reject(new Ar(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(U.Error,r),Promise.reject(new Ar(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Ac(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(U.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(U.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(U.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(U.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Wt.WebSockets)this.transport=this._constructTransport(Wt.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Ar("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Xf);if(o===Xf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Qf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(U.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(U.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,o]=Zn();r[n]=o;const s=this._resolveNegotiateUrl(t);this._logger.log(U.Debug,`Sending negotiation request: ${s}.`);try{const i=await this._httpClient.post(s,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(i.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${i.statusCode}'`));const a=JSON.parse(i.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new Yf("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(i){let a="Failed to complete negotiation with the server: "+i;return i instanceof _n&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(U.Error,a),Promise.reject(new Yf(a))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,o){let s=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(U.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(s,o),this.connectionId=n.connectionId;return}const i=[],a=n.availableTransports||[];let c=n;for(const u of a){const d=this._resolveTransportOrError(u,r,o,c?.useStatefulReconnect===!0);if(d instanceof Error)i.push(`${u.transport} failed:`),i.push(d);else if(this._isITransport(d)){if(this.transport=d,!c){try{c=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}s=this._createConnectUrl(t,c.connectionToken)}try{await this._startTransport(s,o),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(U.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,i.push(new Vx(`${u.transport} failed: ${f}`,Wt[u.transport])),this._connectionState!=="Connecting"){const h="Failed to select transport before stop() was called.";return this._logger.log(U.Debug,h),Promise.reject(new Ar(h))}}}}return i.length>0?Promise.reject(new Ux(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Wt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new h_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Wt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new p_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Wt.LongPolling:return new Qf(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,r),await this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}:this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n,o){const s=Wt[t.transport];if(s==null)return this._logger.log(U.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(g_(r,s))if(t.transferFormats.map(a=>Jt[a]).indexOf(n)>=0){if(s===Wt.WebSockets&&!this._options.WebSocket||s===Wt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(U.Debug,`Skipping transport '${Wt[s]}' because it is not supported in your environment.'`),new Fx(`'${Wt[s]}' is not supported in your environment.`,s);this._logger.log(U.Debug,`Selecting transport '${Wt[s]}'.`);try{return this.features.reconnect=s===Wt.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(U.Debug,`Skipping transport '${Wt[s]}' because it does not support the requested transfer format '${Jt[n]}'.`),new Error(`'${Wt[s]}' does not support ${Jt[n]}.`);else return this._logger.log(U.Debug,`Skipping transport '${Wt[s]}' because it was disabled by the client.`),new Wx(`'${Wt[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(U.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(U.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(U.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(U.Error,`Connection disconnected with error '${t}'.`):this._logger.log(U.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(U.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(U.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Dt.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(U.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=new URL(t);r.pathname.endsWith("/")?r.pathname+="negotiate":r.pathname+="/negotiate";const n=new URLSearchParams(r.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),r.search=n.toString(),r.toString()}}function g_(e,t){return!e||(t&e)!==0}class Ac{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Ri,this._transportResult=new Ri,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Ri),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Ri;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):Ac._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(s=>s.byteLength).reduce((s,i)=>s+i),n=new Uint8Array(r);let o=0;for(const s of t)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}}class Ri{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const v_="json";class y_{constructor(){this.name=v_,this.version=2,this.transferFormat=Jt.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ro.instance);const n=fr.parse(t),o=[];for(const s of n){const i=JSON.parse(s);if(typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case $e.Invocation:this._isInvocationMessage(i);break;case $e.StreamItem:this._isStreamItemMessage(i);break;case $e.Completion:this._isCompletionMessage(i);break;case $e.Ping:break;case $e.Close:break;case $e.Ack:this._isAckMessage(i);break;case $e.Sequence:this._isSequenceMessage(i);break;default:r.log(U.Information,"Unknown message type '"+i.type+"' ignored.");continue}o.push(i)}return o}writeMessage(t){return fr.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const b_={trace:U.Trace,debug:U.Debug,info:U.Information,information:U.Information,warn:U.Warning,warning:U.Warning,error:U.Error,critical:U.Critical,none:U.None};function x_(e){const t=b_[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class __{configureLogging(t){if(Bt.isRequired(t,"logging"),w_(t))this.logger=t;else if(typeof t=="string"){const r=x_(t);this.logger=new ji(r)}else this.logger=new ji(t);return this}withUrl(t,r){return Bt.isRequired(t,"url"),Bt.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Bt.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Kf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Kf,this}withServerTimeout(t){return Bt.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Bt.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new m_(this.url,t);return kc.create(r,this.logger||Ro.instance,this.protocol||new y_,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function w_(e){return e.log!==void 0}var $o={},Jf;function S_(){if(Jf)return $o;Jf=1;var e=Je();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(lt()),r=rt();return $o.default=(0,t.default)((0,r.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined"),$o}var C_=S_();const E_=Xe(C_);var Lo={},ep;function D_(){if(ep)return Lo;ep=1;var e=Je();Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;var t=e(lt()),r=rt();return Lo.default=(0,t.default)((0,r.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 8m.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined"),Lo}var k_=D_();const A_=Xe(k_);var zo={},tp;function T_(){if(tp)return zo;tp=1;var e=Je();Object.defineProperty(zo,"__esModule",{value:!0}),zo.default=void 0;var t=e(lt()),r=rt();return zo.default=(0,t.default)((0,r.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),zo}var I_=T_();const rp=Xe(I_);var Bo={},np;function M_(){if(np)return Bo;np=1;var e=Je();Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.default=void 0;var t=e(lt()),r=rt();return Bo.default=(0,t.default)((0,r.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"),Bo}var P_=M_();const Vr=Xe(P_);function Tc(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function Fo(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}function Wo(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?j_(a,f=>f.test(i)):O_(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function O_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function j_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function R_(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}function N_(e,...t){const r=cc.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const $_={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},L_=(e,t,r)=>{let n;const o=$_[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"en "+n:"hace "+n:n},z_={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},B_={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},F_={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},W_={date:Tc({formats:z_,defaultWidth:"full"}),time:Tc({formats:B_,defaultWidth:"full"}),dateTime:Tc({formats:F_,defaultWidth:"full"})},V_={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},U_={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},H_=(e,t,r,n)=>t.getHours()!==1?U_[e]:V_[e],Y_={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},q_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Z_={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},G_={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},K_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},Q_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},X_={ordinalNumber:(e,t)=>Number(e)+"º",era:Fo({values:Y_,defaultWidth:"wide"}),quarter:Fo({values:q_,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Fo({values:Z_,defaultWidth:"wide"}),day:Fo({values:G_,defaultWidth:"wide"}),dayPeriod:Fo({values:K_,defaultWidth:"wide",formattingValues:Q_,defaultFormattingWidth:"wide"})},J_=/^(\d+)(º)?/i,ew=/\d+/i,tw={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},rw={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},nw={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},ow={any:[/1/i,/2/i,/3/i,/4/i]},sw={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},iw={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},aw={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},cw={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},lw={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},uw={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},dw={ordinalNumber:R_({matchPattern:J_,parsePattern:ew,valueCallback:function(e){return parseInt(e,10)}}),era:Wo({matchPatterns:tw,defaultMatchWidth:"wide",parsePatterns:rw,defaultParseWidth:"any"}),quarter:Wo({matchPatterns:nw,defaultMatchWidth:"wide",parsePatterns:ow,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Wo({matchPatterns:sw,defaultMatchWidth:"wide",parsePatterns:iw,defaultParseWidth:"any"}),day:Wo({matchPatterns:aw,defaultMatchWidth:"wide",parsePatterns:cw,defaultParseWidth:"any"}),dayPeriod:Wo({matchPatterns:lw,defaultMatchWidth:"any",parsePatterns:uw,defaultParseWidth:"any"})},fw={code:"es",formatDistance:L_,formatLong:W_,formatRelative:H_,localize:X_,match:dw,options:{weekStartsOn:1,firstWeekContainsDate:1}},pw=({notificacion:e,onAccept:t})=>{const{evento:r,tipo:n,leida:o}=e,s=n==="EventoCreado"||n==="EventoModificado",i=r?.fechaInicio?new Date(r.fechaInicio):new Date,a=r?.fechaFin?new Date(r.fechaFin):null,c=r?.nombreAnfitrion||"Usuario",u=e?.mensaje||"Sin título",d=f=>f.split(" ").map(h=>h[0]).join("").toUpperCase().substring(0,2);return l.jsxs(g.Box,{sx:{p:2,mb:1,bgcolor:"white",borderRadius:"4px",border:"1px solid #e0e0e0"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"flex-start",mb:1.5},children:[l.jsx(g.Avatar,{sx:{bgcolor:"#F5A623",width:32,height:32,fontSize:"13px",mr:1.5,fontWeight:"bold"},children:d(c)}),l.jsx(g.Box,{children:l.jsxs(g.Typography,{sx:{fontSize:"13px",color:"#5f6368",lineHeight:1.2},children:[l.jsx("span",{style:{fontWeight:500},children:c}),l.jsxs("span",{children:[" ",u]})]})})]}),l.jsx(g.Divider,{sx:{mb:2,opacity:.5}}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:1},children:[l.jsx(E_,{sx:{fontSize:18,color:"#5f6368",mr:2}}),l.jsx(g.Typography,{sx:{fontSize:"13px",color:"#3c4043"},children:x.format(i,"EEEE, dd 'de' MMMM",{locale:fw})})]}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:2.5},children:[l.jsx(A_,{sx:{fontSize:18,color:"#5f6368",mr:2}}),l.jsxs(g.Typography,{sx:{fontSize:"13px",color:"#3c4043"},children:[x.format(i,"h:mm a")," - ",a?x.format(a,"h:mm a"):""]})]}),s&&!o&&l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",gap:1,mt:2,width:"100%"},children:[l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(rp,{sx:{fontSize:"14px !important",mr:-.5}}),onClick:()=>t?.(e,"CONFIRMADA"),sx:{flex:1,borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"11px",color:"#1976D2",borderColor:"#1976D2",py:.5,minWidth:0,whiteSpace:"nowrap","& .MuiButton-startIcon":{mx:.5}},children:"Asistiré"}),l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(Vr,{sx:{fontSize:"14px !important",mr:-.5}}),onClick:()=>t?.(e,"RECHAZADA"),sx:{flex:1,borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"11px",color:"#D32F2F",borderColor:"#D32F2F",py:.5,minWidth:0,whiteSpace:"nowrap","& .MuiButton-startIcon":{mx:.5}},children:"Rechazar"})]})]})},hw="https://qa2.crm.netcar.com.mx/hubs/invitaciones",mw=({userId:e,notifications:t,onAceppInvitacion:r})=>{const[n,o]=y.useState(t),[s,i]=y.useState(null);y.useEffect(()=>{o(t)},[t]);const a=y.useCallback(c=>{const u={notificacionID:Math.random(),titulo:"Nueva invitación a evento",mensaje:c.Descripcion,tipo:"EventoCreado",leida:!1,fechaCreacion:new Date().toISOString(),tiempoTranscurrido:"Ahora",url:`/eventos/${c.EventoID}`,iconoColor:"#E1D6FB",evento:{eventoID:c.EventoID,titulo:c.Titulo,fechaInicio:c.FechaInicio,ubicacion:"",nombreAnfitrion:""}};o(d=>[u,...d])},[]);return y.useEffect(()=>{if(!e)return;const c=new __().withUrl(hw+`?userId=${e}`).withAutomaticReconnect().build();return c.start().then(()=>{c.on("NotificarInvitacionAEvento",a)}).catch(u=>console.error("Error SignalR:",u)),()=>{c.off("NotificarInvitacionAEvento"),c.stop()}},[e,a]),l.jsx(g.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:l.jsx(g.List,{disablePadding:!0,children:n.length===0?l.jsxs("div",{className:xe.emptyStateContainer,children:[l.jsx("img",{src:Hf,alt:"Todo en orden",className:xe.emptyStateImage}),l.jsx("h4",{className:xe.emptyStateTitle,children:"Todo en orden aquí"}),l.jsx("p",{className:xe.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):n.map(c=>l.jsx(pw,{notificacion:c,onAccept:r}))})})},gw=({onEventClick:e,upcomingEvents:t,leads30Days:r,leads90Days:n,disID:o,usrID:s,onAddEvent:i,googleCalendars:a,outlookCalendars:c,isLoadingCalendars:u,onToggleGoogle:d,onToggleOutlook:f,notifications:h,unreadCount:v,onAceppInvitacion:m})=>{const{session:p,sessionoutlook:b}=uc(),{enqueueSnackbar:w}=ws.useSnackbar(),C=N=>{const ae=new Date,fe={start:x.startOfDay(ae),end:x.endOfDay(ae)},$={start:N.fechaInicio,end:N.fechaFin};return Hd(fe,$)?"Hoy":x.isTomorrow(N.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(N.fechaInicio)},E={};t.forEach(N=>{const ae=C(N);E[ae]||(E[ae]=[]),E[ae].push(N)});const[S,_]=y.useState(!1),W=()=>{_(!S)},D=Pi(),A=Cc(),M=async()=>{if(!p?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await D.syncGoogleEvents(p?.userEmail,o,s),w("Eventos sincronizados con Google Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Google Calendar.",{variant:"error"})}finally{}},I=async()=>{if(!b?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await A.syncOutlookEvents(b?.userEmail,o,s),w("Eventos sincronizados con Outlook Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Outlook Calendar.",{variant:"error"})}finally{}},[H,G]=y.useState("events"),F=N=>{G(N)},[Y,oe]=y.useState(!0),V=()=>{oe(N=>!N)};return l.jsxs("div",{className:xe.sidebarContainer,children:[l.jsxs("div",{className:xe.leadsSection,children:[l.jsxs("div",{className:xe.leadCard,children:[l.jsx("div",{className:xe.leadIcon,children:l.jsx("img",{src:ef})}),l.jsxs("div",{className:xe.leadText,children:[l.jsx("div",{className:xe.leadDays,children:"+30 días sin atender"}),l.jsxs("div",{className:xe.leadCount,children:[r," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),l.jsxs("div",{className:xe.leadCard,children:[l.jsx("div",{className:xe.leadIcon,children:l.jsx("img",{src:ef})}),l.jsxs("div",{className:xe.leadText,children:[l.jsx("div",{className:xe.leadDays,children:"+90 días sin atender"}),l.jsxs("div",{className:xe.leadCount,children:[n," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),l.jsxs("div",{className:xe.eventsSection,children:[l.jsxs("div",{className:xe.tabsContainer,children:[l.jsx("button",{className:`${xe.tabButton} ${H==="events"?xe.activeTab:""}`,onClick:()=>F("events"),children:"Eventos"}),l.jsxs("button",{className:`${xe.tabButton} ${H==="alerts"?xe.activeTab:""}`,onClick:()=>F("alerts"),children:["Alertas",v>0&&l.jsx("span",{className:xe.alertBadge,children:v>99?"99+":v})]})]}),l.jsxs("div",{className:xe.eventsContainer,children:[H==="events"&&l.jsx(l.Fragment,{children:Object.keys(E).length>0?Object.entries(E).map(([N,ae])=>l.jsxs("div",{className:`${xe.eventGroup}`,children:[l.jsxs("div",{className:xe.eventGroupDate,children:[l.jsx("img",{src:d1,width:15})," ",N]}),ae.map(fe=>{const $=De(fe.color||"#ffcc00"),Q=$.toString(),Ce=$.clone().darken(15).toString(),me=new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"2-digit",hour12:!0});return l.jsxs("div",{className:xe.eventItem,style:{backgroundColor:Q,borderLeft:`4px solid ${Ce}`,display:"flex",alignItems:"center",padding:"10px",marginBottom:"8px",borderRadius:"4px",cursor:"pointer"},onClick:()=>e(fe),children:[l.jsxs("div",{className:xe.eventDetails,style:{flex:1},children:[l.jsx("div",{className:xe.eventTitle,style:{fontWeight:"500",fontSize:"12px",color:"#333"},children:fe.titulo.length>32?`${fe.titulo.substring(0,32)}...`:fe.titulo}),fe.nombreAnfitrion&&l.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"4px",color:"#555"},children:[l.jsx("img",{src:tf,width:16,style:{marginRight:"6px",opacity:.7}}),l.jsx("span",{style:{fontSize:"13px"},children:fe.nombreAnfitrion})]}),l.jsx("div",{className:xe.eventTime,style:{fontSize:"12px",marginTop:"4px",opacity:.7},children:`${me.format(fe.fechaInicio).toLowerCase()} - ${me.format(fe.fechaFin).toLowerCase()}`})]}),fe.link&&l.jsx("a",{onClick:we=>we.stopPropagation(),href:fe.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",padding:"4px"},children:l.jsx("img",{src:f1,alt:"Video",width:20,style:{opacity:.8}})})]},fe.eventoID)})]},N)):l.jsxs("div",{className:xe.emptyStateContainer,children:[l.jsx("img",{src:Hf,alt:"Todo en orden",className:xe.emptyStateImage}),l.jsx("h4",{className:xe.emptyStateTitle,children:"Tu agenda está despejada"}),l.jsx("p",{className:xe.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),l.jsxs("button",{className:xe.addEventButton,onClick:i,children:[l.jsx("img",{src:Fd}),"Agregar evento"]})]})}),H==="alerts"&&l.jsx(g.Box,{children:l.jsx(mw,{userId:s,notifications:h,onAceppInvitacion:m})})]})]}),l.jsxs("div",{className:xe.calendarsSection,children:[l.jsxs("button",{onClick:W,className:xe.collapsibleHeader,children:[l.jsxs("div",{className:xe.headerTitle,children:[l.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),l.jsx("span",{className:xe.calendarCount,children:"1"})]}),l.jsx(zb,{className:`${xe.chevronIcon} ${S?xe.collapsed:""}`})]}),l.jsxs("div",{className:`${xe.collapsibleContent} ${S?xe.hidden:""}`,children:[l.jsxs("button",{className:`${xe.calendarSelectButton} ${Y?xe.calendarSelected:""}`,onClick:V,style:{"--calendar-color":"#1976D2"},children:[l.jsx("div",{className:xe.customCheckIcon,children:l.jsx("div",{className:xe.circularCheckbox,children:l.jsx(ac,{size:16,className:xe.checkedIcon})})}),l.jsx(Lb,{size:16,className:xe.calendarIcon}),l.jsx("span",{className:xe.calendarItemText,children:"Mi calendario"})]}),b.userEmail?l.jsxs("div",{className:xe.syncButton,onClick:I,children:[l.jsx("div",{className:xe.circularCheckbox,children:l.jsx(ac,{size:16,className:xe.checkedIcon})}),l.jsx("img",{src:Uf,width:20}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):l.jsx(Bx,{disID:o,usrID:s}),p?.userEmail?l.jsxs("div",{className:xe.syncButton,onClick:M,children:[l.jsx("div",{className:xe.circularCheckbox,children:l.jsx(ac,{size:16,className:xe.checkedIcon})}),l.jsx("img",{src:Vf,width:18}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):l.jsx(zx,{disID:o,usrID:s}),b?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:xe.currentUserCalendarTitle,style:{marginTop:"10px"},children:b?.userEmail}),u?l.jsx(g.CircularProgress,{size:24}):c.length>0?l.jsx(g.List,{dense:!0,className:xe.calendarsList,children:c.map(N=>l.jsx(g.ListItem,{secondaryAction:l.jsx(g.Checkbox,{edge:"end",onChange:()=>f(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:l.jsx(g.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:xe.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]}),p?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:xe.currentUserCalendarTitle,style:{marginTop:"10px"},children:p?.userEmail}),u?l.jsx(g.CircularProgress,{size:24}):a.length>0?l.jsx(g.List,{dense:!0,className:xe.calendarsList,children:a.map(N=>l.jsx(g.ListItem,{secondaryAction:l.jsx(g.Checkbox,{edge:"end",onChange:()=>d(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:l.jsx(g.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:xe.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},Cn={dayCell:"_dayCell_xweup_1",dayCellContainer:"_dayCellContainer_xweup_23",dayNumber:"_dayNumber_xweup_55",dayNumberToday:"_dayNumberToday_xweup_69",notCurrentMonth:"_notCurrentMonth_xweup_91",CurrentDay:"_CurrentDay_xweup_129",eventsList:"_eventsList_xweup_137"};var Vo={},op;function vw(){if(op)return Vo;op=1;var e=Je();Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.default=void 0,o(y);var t=e(lt()),r=rt();function n(s){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(n=function(c){return c?a:i})(s)}function o(s,i){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var a=n(i);if(a&&a.has(s))return a.get(s);var c={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var f=u?Object.getOwnPropertyDescriptor(s,d):null;f&&(f.get||f.set)?Object.defineProperty(c,d,f):c[d]=s[d]}return c.default=s,a&&a.set(s,c),c}return Vo.default=(0,t.default)((0,r.jsx)("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google"),Vo}var yw=vw();const bw=Xe(yw);var Uo={},sp;function xw(){if(sp)return Uo;sp=1;var e=Je();Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=void 0;var t=e(lt()),r=rt();return Uo.default=(0,t.default)((0,r.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline"),Uo}var _w=xw();const ww=Xe(_w),ip=46,Sw=22,Cw=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[Cn.dayCell,o?"":Cn.notCurrentMonth,Cn.CurrentDay].join(" ").trim(),u=y.useRef(null),[d,f]=y.useState(r.length),h=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});y.useLayoutEffect(()=>{const p=()=>{if(u.current){const b=u.current.clientHeight;let w=Math.floor(b/(ip+4));if(w<r.length){const C=Math.floor((b-Sw)/(ip+4));w=Math.max(0,C)}f(w)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const v=r.slice(0,d===0?1:d),m=r.length-(d===0?1:d);return l.jsxs("div",{className:`${c} ${Cn.dayCellContainer}`,onClick:()=>s?.(t),style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsx("div",{className:n?Cn.dayNumber:Cn.dayNumberToday,children:e}),l.jsxs("div",{className:Cn.eventsList,ref:u,style:{flex:1,display:"flex",flexDirection:"column",gap:"4px",padding:"0 4px 4px 4px",marginTop:"4px",overflow:"hidden"},children:[v.map(p=>{const b=p.color||"#D7EBFB",w=p.isGoogleEvent||p.isOutlookEvent;return l.jsxs(g.Box,{onClick:C=>{C.stopPropagation(),i?.(p)},sx:{backgroundColor:w?"#ffffff":p?.color,padding:"4px 8px",borderRadius:"6px",cursor:"pointer",display:"flex",flexDirection:"column",minHeight:"40px",maxHeight:"48px",position:"relative",overflow:"hidden",border:w?`1px solid ${De(b).setAlpha(.4).toRgbString()}`:"none","&:hover":{filter:"brightness(0.95)",boxShadow:"0px 2px 4px rgba(0,0,0,0.08)"}},children:[p.isGoogleEvent&&l.jsx(bw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#4285F4"}}),p.isOutlookEvent&&l.jsx(ww,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#0078D4"}}),l.jsx(g.Typography,{sx:{fontSize:"10px",lineHeight:"1",color:"#3C4043",pr:w?2:0,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word"},children:p.titulo}),l.jsx(g.Typography,{sx:{fontSize:"9px",color:"#70757a",mt:"auto",fontWeight:400},children:`${h.format(p.fechaInicio).toLowerCase()} - ${h.format(p.fechaFin).toLowerCase()}`})]},p.eventoID)}),m>0&&l.jsxs(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",color:"#1976D2",textAlign:"left",ml:1,mt:.5,cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:p=>{p.stopPropagation(),a(r,t)},children:["+",m," más"]})]})]})},ap={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Ew=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return l.jsx("div",{className:ap.weekDaysContainer,children:e.map(t=>l.jsx("div",{className:ap.weekDay,children:t},t))})},Ni={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Dw(e,t){const[r,n]=N_(e,t.start,t.end);return{start:r,end:n}}function kw(e,t){const{start:r,end:n}=Dw(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0);let a=1;const c=[];for(;+i<=s;)c.push(cc(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function Aw(e,t){const r=t?.weekStartsOn,n=sn(e,t?.in),o=n.getDay(),s=(o<r?-7:0)+6-(o-r);return n.setDate(n.getDate()+s),n.setHours(23,59,59,999),n}function Tw(e,t,r){const n=+sn(e,r?.in),[o,s]=[+sn(t.start,r?.in),+sn(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Iw=({currentDate:e,events:t,onDayClick:r,onEventClick:n,onSeeMoreClick:o})=>{const s=x.startOfMonth(e),i=x.endOfMonth(e),a=x.startOfWeek(s,{weekStartsOn:1}),c=Aw(i,{weekStartsOn:1}),u=kw({start:a,end:c}),d={},f=u.length/7,h=`${Ni.daysContainer} ${f===5?Ni.rows5:Ni.rows6}`;return t.forEach(v=>{const m=x.format(v.fechaInicio,"yyyy-MM-dd");d[m]||(d[m]=[]),d[m].push(v)}),l.jsxs("div",{className:Ni.calendarGridContainer,children:[l.jsx(Ew,{}),l.jsx("div",{className:h,children:u.map(v=>{const m=t.filter(p=>Tw(v,{start:x.startOfDay(p.fechaInicio),end:x.endOfDay(p.fechaFin)}));return l.jsx(Cw,{dayNumber:v.getDate(),date:v,events:m,isToday:x.isToday(v),isCurrentMonth:x.isSameMonth(v,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},v.toISOString())})})]})},Ic=()=>{const{calendarApiUrl:e}=Sc(),t=async v=>{try{return(await Et.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${v}`)).data.map(p=>{const b=new Date(p.fechaInicio),w=new Date(p.fechaFin),C=p.solicitudRelacionada?.[0]?.nombreCliente??null;return{...p,fechaInicio:b,fechaFin:w,client:C}})}catch(m){return console.error("Error events:",m),[]}},r=async(v,m)=>{try{const p=await Et.post(`${e}/api/Calendario/v1/local/InsertarEvento/${m}`,v);return{...p.data,fechaInicio:new Date(p.data.fechaInicio),fechaFin:new Date(p.data.fechaFin)}}catch(p){throw console.log("Error creating event:",p),p}},n=async v=>{try{const m=await Et.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${v.eventoID}`,v);return{eventoID:m.data.eventoID,titulo:m.data.titulo,descripcion:m.data.descripcion,fechaInicio:new Date(m.data.fechaInicio),fechaFin:new Date(m.data.fechaFin),todoElDia:m.data.todoElDia,color:m.data.color,repetir:m.data.repetir,link:m.data.link,solID:m.data.solID,disID:m.data.disID,client:m.data.client}}catch(m){throw console.log("Error updating event:",m),m}},o=async v=>{try{const m=await Et.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${v}`),p=m.data[0].solicitudRelacionada?.[0]?.nombreCliente||null;return{...m.data[0],fechaInicio:m.data[0].fechaInicio,fechaFin:m.data[0].fechaFin,client:p}}catch(m){throw console.error(`Error fetching event with ID ${v}:`,m),m}},s=async v=>{try{await Et.post(`${e}/api/Calendario/v1/local/EliminarEvento/${v}`)}catch(m){throw console.log(`Error ID ${v}:`,m),m}},i=y.useCallback(async(v,m,p,b)=>{try{const w={masNombreBD:p,usrID:b,disID:m,nombreCliente:v},E=(await Et.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,w)).data?.data;return Array.isArray(E)?E.map(S=>({clienteID:S.clienteID,solID:S.solID,marca:S?.marca,modelo:S?.modelo,nombreCliente:S?.nombreCliente})):[]}catch(w){return console.error("Error clientes:",w),[]}},[e]),a=y.useCallback(async(v,m)=>{try{const p={disID:v,usrMail:m},w=(await Et.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,p)).data?.data;return Array.isArray(w)?w.map(C=>({usrID:C.usrID,usrNombre:C.usrNombre,usrMail:C?.usrMail,disID:C?.disID})):[]}catch(p){return console.error("Error usuarios:",p),[]}},[e]),c=async(v,m,p,b,w)=>{const C={tieneConflicto:!1,usrMail:""};try{const E={disID:v,usrMail:m,startDate:p,horaInicio:b,horaFin:w};return(await Et.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,E)).data?.data}catch(E){return console.error("Error al verificar conflicto:",E),C}},u=y.useCallback(async(v,m,p,b)=>{try{const w={disID:v,usrMail:m,startDate:p,DuracionEvento:b},E=(await Et.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,w)).data?.data;return Array.isArray(E)?E.map(S=>({Fecha:S.fecha,HoraInicio:S.horaInicio,HoraFin:S.horaFin})):[]}catch(w){return console.error("Error usuarios:",w),[]}},[e]),d=y.useCallback(async(v,m=!1)=>{try{const p=await Et.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${v}?soloNoLeidas=${m}`);return console.log("response.data",p.data),p.data}catch(p){return console.error("Error usuarios:",p),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:u,getNotificacionesXUsuario:d,UpdateStatusEvento:async(v,m,p)=>{try{const b={EventoID:v,UsuarioID:m,status:p};return(await Et.post(`${e}/api/Calendario/v1/local/ActualizarEstadoInvitacionAsync/`,b)).data}catch(b){return console.error("Error Actualizar estatus:",b),{}}},MarcarLeido:async(v,m)=>{try{return(await Et.post(`${e}/api/Notificaciones/v1/local/MarcarComoLeidaAsync/${v}?usuarioId=${m}&marcarComoLeida=true`)).data?.data}catch(p){return console.error("Error Actualizar estatus:",p),{}}}}};var Ho={},cp;function Mw(){if(cp)return Ho;cp=1;var e=Je();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var t=e(lt()),r=rt();return Ho.default=(0,t.default)([(0,r.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"),(0,r.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),Ho}var Pw=Mw();const Mc=Xe(Pw);var Yo=e=>e.type==="checkbox",En=e=>e instanceof Date,rr=e=>e==null;const lp=e=>typeof e=="object";var Nt=e=>!rr(e)&&!Array.isArray(e)&&lp(e)&&!En(e),up=e=>Nt(e)&&e.target?Yo(e.target)?e.target.checked:e.target.value:e,Ow=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dp=(e,t)=>e.has(Ow(t)),jw=e=>{const t=e.constructor&&e.constructor.prototype;return Nt(t)&&t.hasOwnProperty("isPrototypeOf")},Pc=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Vt(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Pc&&(e instanceof Blob||n))&&(r||Nt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!jw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Vt(e[o]));else return e;return t}var $i=e=>/^\w*$/.test(e),$t=e=>e===void 0,Oc=e=>Array.isArray(e)?e.filter(Boolean):[],jc=e=>Oc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),he=(e,t,r)=>{if(!t||!Nt(e))return r;const n=($i(t)?[t]:jc(t)).reduce((o,s)=>rr(o)?o:o[s],e);return $t(n)||n===e?$t(e[t])?r:e[t]:n},pr=e=>typeof e=="boolean",ut=(e,t,r)=>{let n=-1;const o=$i(t)?[t]:jc(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const u=e[a];c=Nt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const Li={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Tr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Rc=y.createContext(null);Rc.displayName="HookFormContext";const Nc=()=>y.useContext(Rc),Rw=e=>{const{children:t,...r}=e;return y.createElement(Rc.Provider,{value:r},t)};var fp=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Tr.all&&(t._proxyFormState[i]=!n||Tr.all),r&&(r[i]=!0),e[i]}});return o};const $c=typeof window<"u"?y.useLayoutEffect:y.useEffect;function Nw(e){const t=Nc(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[i,a]=y.useState(r._formState),c=y.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return $c(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&a({...r._formState,...u})}}),[o,n,s]),y.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),y.useMemo(()=>fp(i,r,c.current,!1),[i,r])}var Ur=e=>typeof e=="string",pp=(e,t,r,n,o)=>Ur(e)?(n&&t.watch.add(e),he(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),he(r,s))):(n&&(t.watchAll=!0),r),Lc=e=>rr(e)||!lp(e);function Xr(e,t,r=new WeakSet){if(Lc(e)||Lc(t))return e===t;if(En(e)&&En(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(En(i)&&En(a)||Nt(i)&&Nt(a)||Array.isArray(i)&&Array.isArray(a)?!Xr(i,a,r):i!==a)return!1}}return!0}function hp(e){const t=Nc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=y.useRef(o),u=y.useRef(a),d=y.useRef(void 0);u.current=a;const f=y.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,v]=y.useState(u.current?u.current(f):f);return $c(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:m=>{if(!s){const p=pp(n,r._names,m.values||r._formValues,!1,c.current);if(u.current){const b=u.current(p);Xr(b,d.current)||(v(b),d.current=b)}else v(p)}}}),[r,s,n,i]),y.useEffect(()=>r._removeUnmounted()),h}function $w(e){const t=Nc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=dp(o._names.array,r),c=y.useMemo(()=>he(o._formValues,r,he(o._defaultValues,r,i)),[o,r,i]),u=hp({control:o,name:r,defaultValue:c,exact:!0}),d=Nw({control:o,name:r,exact:!0}),f=y.useRef(e),h=y.useRef(o.register(r,{...e.rules,value:u,...pr(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const v=y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!he(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!he(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!he(d.validatingFields,r)},error:{enumerable:!0,get:()=>he(d.errors,r)}}),[d,r]),m=y.useCallback(C=>h.current.onChange({target:{value:up(C),name:r},type:Li.CHANGE}),[r]),p=y.useCallback(()=>h.current.onBlur({target:{value:he(o._formValues,r),name:r},type:Li.BLUR}),[r,o._formValues]),b=y.useCallback(C=>{const E=he(o._fields,r);E&&C&&(E._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:S=>C.setCustomValidity(S),reportValidity:()=>C.reportValidity()})},[o._fields,r]),w=y.useMemo(()=>({name:r,value:u,...pr(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:m,onBlur:p,ref:b}),[r,n,d.disabled,m,p,b,u]);return y.useEffect(()=>{const C=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...pr(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(S,_)=>{const W=he(o._fields,S);W&&W._f&&(W._f.mount=_)};if(E(r,!0),C){const S=Vt(he(o._options.defaultValues,r));ut(o._defaultValues,r,S),$t(he(o._formValues,r))&&ut(o._formValues,r,S)}return!a&&o.register(r),()=>{(a?C&&!o._state.action:C)?o.unregister(r):E(r,!1)}},[r,o,a,s]),y.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),y.useMemo(()=>({field:w,formState:d,fieldState:v}),[w,d,v])}const hr=e=>e.render($w(e));var zc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},qo=e=>Array.isArray(e)?e:[e],mp=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},ir=e=>Nt(e)&&!Object.keys(e).length,Bc=e=>e.type==="file",Ir=e=>typeof e=="function",zi=e=>{if(!Pc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},gp=e=>e.type==="select-multiple",Fc=e=>e.type==="radio",Lw=e=>Fc(e)||Yo(e),Wc=e=>zi(e)&&e.isConnected;function zw(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=$t(e)?n++:e[t[n++]];return e}function Bw(e){for(const t in e)if(e.hasOwnProperty(t)&&!$t(e[t]))return!1;return!0}function Ft(e,t){const r=Array.isArray(t)?t:$i(t)?[t]:jc(t),n=r.length===1?e:zw(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(Nt(n)&&ir(n)||Array.isArray(n)&&Bw(n))&&Ft(e,r.slice(0,-1)),e}var vp=e=>{for(const t in e)if(Ir(e[t]))return!0;return!1};function Bi(e,t={}){const r=Array.isArray(e);if(Nt(e)||r)for(const n in e)Array.isArray(e[n])||Nt(e[n])&&!vp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Bi(e[n],t[n])):rr(e[n])||(t[n]=!0);return t}function yp(e,t,r){const n=Array.isArray(e);if(Nt(e)||n)for(const o in e)Array.isArray(e[o])||Nt(e[o])&&!vp(e[o])?$t(t)||Lc(r[o])?r[o]=Array.isArray(e[o])?Bi(e[o],[]):{...Bi(e[o])}:yp(e[o],rr(t)?{}:t[o],r[o]):r[o]=!Xr(e[o],t[o]);return r}var Zo=(e,t)=>yp(e,t,Bi(t));const bp={value:!1,isValid:!1},xp={value:!0,isValid:!0};var _p=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?xp:{value:e[0].value,isValid:!0}:xp:bp}return bp},wp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>$t(e)?e:t?e===""?NaN:e&&+e:r&&Ur(e)?new Date(e):n?n(e):e;const Sp={isValid:!1,value:null};var Cp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Sp):Sp;function Ep(e){const t=e.ref;return Bc(t)?t.files:Fc(t)?Cp(e.refs).value:gp(t)?[...t.selectedOptions].map(({value:r})=>r):Yo(t)?_p(e.refs).value:wp($t(t.value)?e.ref.value:t.value,e)}var Fw=(e,t,r,n)=>{const o={};for(const s of e){const i=he(t,s);i&&ut(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Fi=e=>e instanceof RegExp,Go=e=>$t(e)?e:Fi(e)?e.source:Nt(e)?Fi(e.value)?e.value.source:e.value:e,Dp=e=>({isOnSubmit:!e||e===Tr.onSubmit,isOnBlur:e===Tr.onBlur,isOnChange:e===Tr.onChange,isOnAll:e===Tr.all,isOnTouch:e===Tr.onTouched});const kp="AsyncFunction";var Ww=e=>!!e&&!!e.validate&&!!(Ir(e.validate)&&e.validate.constructor.name===kp||Nt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===kp)),Vw=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ap=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ko=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=he(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Ko(a,t))break}else if(Nt(a)&&Ko(a,t))break}}};function Tp(e,t,r){const n=he(e,r);if(n||$i(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=he(t,s),a=he(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var Uw=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return ir(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Tr.all))},Hw=(e,t,r)=>!e||!t||e===t||qo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Yw=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,qw=(e,t)=>!Oc(he(e,t)).length&&Ft(e,t),Zw=(e,t,r)=>{const n=qo(he(e,r));return ut(n,"root",t[r]),ut(e,r,n),e},Wi=e=>Ur(e);function Ip(e,t,r="validate"){if(Wi(e)||Array.isArray(e)&&e.every(Wi)||pr(e)&&!e)return{type:r,message:Wi(e)?e:"",ref:t}}var Gn=e=>Nt(e)&&!Fi(e)?e:{value:e,message:""},Mp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:v,validate:m,name:p,valueAsNumber:b,mount:w}=e._f,C=he(r,p);if(!w||t.has(p))return{};const E=a?a[0]:i,S=G=>{o&&E.reportValidity&&(E.setCustomValidity(pr(G)?"":G||""),E.reportValidity())},_={},W=Fc(i),D=Yo(i),A=W||D,M=(b||Bc(i))&&$t(i.value)&&$t(C)||zi(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,I=zc.bind(null,p,n,_),H=(G,F,Y,oe=Qr.maxLength,V=Qr.minLength)=>{const N=G?F:Y;_[p]={type:G?oe:V,message:N,ref:i,...I(G?oe:V,N)}};if(s?!Array.isArray(C)||!C.length:c&&(!A&&(M||rr(C))||pr(C)&&!C||D&&!_p(a).isValid||W&&!Cp(a).isValid)){const{value:G,message:F}=Wi(c)?{value:!!c,message:c}:Gn(c);if(G&&(_[p]={type:Qr.required,message:F,ref:E,...I(Qr.required,F)},!n))return S(F),_}if(!M&&(!rr(f)||!rr(h))){let G,F;const Y=Gn(h),oe=Gn(f);if(!rr(C)&&!isNaN(C)){const V=i.valueAsNumber||C&&+C;rr(Y.value)||(G=V>Y.value),rr(oe.value)||(F=V<oe.value)}else{const V=i.valueAsDate||new Date(C),N=$=>new Date(new Date().toDateString()+" "+$),ae=i.type=="time",fe=i.type=="week";Ur(Y.value)&&C&&(G=ae?N(C)>N(Y.value):fe?C>Y.value:V>new Date(Y.value)),Ur(oe.value)&&C&&(F=ae?N(C)<N(oe.value):fe?C<oe.value:V<new Date(oe.value))}if((G||F)&&(H(!!G,Y.message,oe.message,Qr.max,Qr.min),!n))return S(_[p].message),_}if((u||d)&&!M&&(Ur(C)||s&&Array.isArray(C))){const G=Gn(u),F=Gn(d),Y=!rr(G.value)&&C.length>+G.value,oe=!rr(F.value)&&C.length<+F.value;if((Y||oe)&&(H(Y,G.message,F.message),!n))return S(_[p].message),_}if(v&&!M&&Ur(C)){const{value:G,message:F}=Gn(v);if(Fi(G)&&!C.match(G)&&(_[p]={type:Qr.pattern,message:F,ref:i,...I(Qr.pattern,F)},!n))return S(F),_}if(m){if(Ir(m)){const G=await m(C,r),F=Ip(G,E);if(F&&(_[p]={...F,...I(Qr.validate,F.message)},!n))return S(F.message),_}else if(Nt(m)){let G={};for(const F in m){if(!ir(G)&&!n)break;const Y=Ip(await m[F](C,r),E,F);Y&&(G={...Y,...I(F,Y.message)},S(Y.message),n&&(_[p]=G))}if(!ir(G)&&(_[p]={ref:E,...G},!n))return _}}return S(!0),_};const Gw={mode:Tr.onSubmit,reValidateMode:Tr.onChange,shouldFocusError:!0};function Kw(e={}){let t={...Gw,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ir(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Nt(t.defaultValues)||Nt(t.values)?Vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Vt(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:mp(),state:mp()},v=t.criteriaMode===Tr.all,m=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},p=async k=>{if(!t.disabled&&(d.isValid||f.isValid||k)){const P=t.resolver?ir((await D()).errors):await M(n,!0);P!==r.isValid&&h.state.next({isValid:P})}},b=(k,P)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((k||Array.from(a.mount)).forEach(B=>{B&&(P?ut(r.validatingFields,B,P):Ft(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!ir(r.validatingFields)}))},w=(k,P=[],B,le,se=!0,O=!0)=>{if(le&&B&&!t.disabled){if(i.action=!0,O&&Array.isArray(he(n,k))){const ne=B(he(n,k),le.argA,le.argB);se&&ut(n,k,ne)}if(O&&Array.isArray(he(r.errors,k))){const ne=B(he(r.errors,k),le.argA,le.argB);se&&ut(r.errors,k,ne),qw(r.errors,k)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(he(r.touchedFields,k))){const ne=B(he(r.touchedFields,k),le.argA,le.argB);se&&ut(r.touchedFields,k,ne)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Zo(o,s)),h.state.next({name:k,isDirty:H(k,P),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ut(s,k,P)},C=(k,P)=>{ut(r.errors,k,P),h.state.next({errors:r.errors})},E=k=>{r.errors=k,h.state.next({errors:r.errors,isValid:!1})},S=(k,P,B,le)=>{const se=he(n,k);if(se){const O=he(s,k,$t(B)?he(o,k):B);$t(O)||le&&le.defaultChecked||P?ut(s,k,P?O:Ep(se._f)):Y(k,O),i.mount&&p()}},_=(k,P,B,le,se)=>{let O=!1,ne=!1;const Se={name:k};if(!t.disabled){if(!B||le){(d.isDirty||f.isDirty)&&(ne=r.isDirty,r.isDirty=Se.isDirty=H(),O=ne!==Se.isDirty);const Oe=Xr(he(o,k),P);ne=!!he(r.dirtyFields,k),Oe?Ft(r.dirtyFields,k):ut(r.dirtyFields,k,!0),Se.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&ne!==!Oe}if(B){const Oe=he(r.touchedFields,k);Oe||(ut(r.touchedFields,k,B),Se.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&Oe!==B)}O&&se&&h.state.next(Se)}return O?Se:{}},W=(k,P,B,le)=>{const se=he(r.errors,k),O=(d.isValid||f.isValid)&&pr(P)&&r.isValid!==P;if(t.delayError&&B?(c=m(()=>C(k,B)),c(t.delayError)):(clearTimeout(u),c=null,B?ut(r.errors,k,B):Ft(r.errors,k)),(B?!Xr(se,B):se)||!ir(le)||O){const ne={...le,...O&&pr(P)?{isValid:P}:{},errors:r.errors,name:k};r={...r,...ne},h.state.next(ne)}},D=async k=>{b(k,!0);const P=await t.resolver(s,t.context,Fw(k||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(k),P},A=async k=>{const{errors:P}=await D(k);if(k)for(const B of k){const le=he(P,B);le?ut(r.errors,B,le):Ft(r.errors,B)}else r.errors=P;return P},M=async(k,P,B={valid:!0})=>{for(const le in k){const se=k[le];if(se){const{_f:O,...ne}=se;if(O){const Se=a.array.has(O.name),Oe=se._f&&Ww(se._f);Oe&&d.validatingFields&&b([le],!0);const R=await Mp(se,a.disabled,s,v,t.shouldUseNativeValidation&&!P,Se);if(Oe&&d.validatingFields&&b([le]),R[O.name]&&(B.valid=!1,P))break;!P&&(he(R,O.name)?Se?Zw(r.errors,R,O.name):ut(r.errors,O.name,R[O.name]):Ft(r.errors,O.name))}!ir(ne)&&await M(ne,P,B)}}return B.valid},I=()=>{for(const k of a.unMount){const P=he(n,k);P&&(P._f.refs?P._f.refs.every(B=>!Wc(B)):!Wc(P._f.ref))&&ce(k)}a.unMount=new Set},H=(k,P)=>!t.disabled&&(k&&P&&ut(s,k,P),!Xr($(),o)),G=(k,P,B)=>pp(k,a,{...i.mount?s:$t(P)?o:Ur(k)?{[k]:P}:P},B,P),F=k=>Oc(he(i.mount?s:o,k,t.shouldUnregister?he(o,k,[]):[])),Y=(k,P,B={})=>{const le=he(n,k);let se=P;if(le){const O=le._f;O&&(!O.disabled&&ut(s,k,wp(P,O)),se=zi(O.ref)&&rr(P)?"":P,gp(O.ref)?[...O.ref.options].forEach(ne=>ne.selected=se.includes(ne.value)):O.refs?Yo(O.ref)?O.refs.forEach(ne=>{(!ne.defaultChecked||!ne.disabled)&&(Array.isArray(se)?ne.checked=!!se.find(Se=>Se===ne.value):ne.checked=se===ne.value||!!se)}):O.refs.forEach(ne=>ne.checked=ne.value===se):Bc(O.ref)?O.ref.value="":(O.ref.value=se,O.ref.type||h.state.next({name:k,values:Vt(s)})))}(B.shouldDirty||B.shouldTouch)&&_(k,se,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&fe(k)},oe=(k,P,B)=>{for(const le in P){if(!P.hasOwnProperty(le))return;const se=P[le],O=k+"."+le,ne=he(n,O);(a.array.has(k)||Nt(se)||ne&&!ne._f)&&!En(se)?oe(O,se,B):Y(O,se,B)}},V=(k,P,B={})=>{const le=he(n,k),se=a.array.has(k),O=Vt(P);ut(s,k,O),se?(h.array.next({name:k,values:Vt(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&B.shouldDirty&&h.state.next({name:k,dirtyFields:Zo(o,s),isDirty:H(k,O)})):le&&!le._f&&!rr(O)?oe(k,O,B):Y(k,O,B),Ap(k,a)&&h.state.next({...r,name:k}),h.state.next({name:i.mount?k:void 0,values:Vt(s)})},N=async k=>{i.mount=!0;const P=k.target;let B=P.name,le=!0;const se=he(n,B),O=Oe=>{le=Number.isNaN(Oe)||En(Oe)&&isNaN(Oe.getTime())||Xr(Oe,he(s,B,Oe))},ne=Dp(t.mode),Se=Dp(t.reValidateMode);if(se){let Oe,R;const te=P.type?Ep(se._f):up(k),_e=k.type===Li.BLUR||k.type===Li.FOCUS_OUT,Ge=!Vw(se._f)&&!t.resolver&&!he(r.errors,B)&&!se._f.deps||Yw(_e,he(r.touchedFields,B),r.isSubmitted,Se,ne),q=Ap(B,a,_e);ut(s,B,te),_e?(!P||!P.readOnly)&&(se._f.onBlur&&se._f.onBlur(k),c&&c(0)):se._f.onChange&&se._f.onChange(k);const ue=_(B,te,_e),Ee=!ir(ue)||q;if(!_e&&h.state.next({name:B,type:k.type,values:Vt(s)}),Ge)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?_e&&p():_e||p()),Ee&&h.state.next({name:B,...q?{}:ue});if(!_e&&q&&h.state.next({...r}),t.resolver){const{errors:Te}=await D([B]);if(O(te),le){const Ve=Tp(r.errors,n,B),J=Tp(Te,n,Ve.name||B);Oe=J.error,B=J.name,R=ir(Te)}}else b([B],!0),Oe=(await Mp(se,a.disabled,s,v,t.shouldUseNativeValidation))[B],b([B]),O(te),le&&(Oe?R=!1:(d.isValid||f.isValid)&&(R=await M(n,!0)));le&&(se._f.deps&&fe(se._f.deps),W(B,R,Oe,ue))}},ae=(k,P)=>{if(he(r.errors,P)&&k.focus)return k.focus(),1},fe=async(k,P={})=>{let B,le;const se=qo(k);if(t.resolver){const O=await A($t(k)?k:se);B=ir(O),le=k?!se.some(ne=>he(O,ne)):B}else k?(le=(await Promise.all(se.map(async O=>{const ne=he(n,O);return await M(ne&&ne._f?{[O]:ne}:ne)}))).every(Boolean),!(!le&&!r.isValid)&&p()):le=B=await M(n);return h.state.next({...!Ur(k)||(d.isValid||f.isValid)&&B!==r.isValid?{}:{name:k},...t.resolver||!k?{isValid:B}:{},errors:r.errors}),P.shouldFocus&&!le&&Ko(n,ae,k?se:a.mount),le},$=k=>{const P={...i.mount?s:o};return $t(k)?P:Ur(k)?he(P,k):k.map(B=>he(P,B))},Q=(k,P)=>({invalid:!!he((P||r).errors,k),isDirty:!!he((P||r).dirtyFields,k),error:he((P||r).errors,k),isValidating:!!he(r.validatingFields,k),isTouched:!!he((P||r).touchedFields,k)}),Ce=k=>{k&&qo(k).forEach(P=>Ft(r.errors,P)),h.state.next({errors:k?r.errors:{}})},me=(k,P,B)=>{const le=(he(n,k,{_f:{}})._f||{}).ref,se=he(r.errors,k)||{},{ref:O,message:ne,type:Se,...Oe}=se;ut(r.errors,k,{...Oe,...P,ref:le}),h.state.next({name:k,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&le&&le.focus&&le.focus()},we=(k,P)=>Ir(k)?h.state.subscribe({next:B=>"values"in B&&k(G(void 0,P),B)}):G(k,P,!0),ie=k=>h.state.subscribe({next:P=>{Hw(k.name,P.name,k.exact)&&Uw(P,k.formState||d,Be,k.reRenderRoot)&&k.callback({values:{...s},...r,...P,defaultValues:o})}}).unsubscribe,ee=k=>(i.mount=!0,f={...f,...k.formState},ie({...k,formState:f})),ce=(k,P={})=>{for(const B of k?qo(k):a.mount)a.mount.delete(B),a.array.delete(B),P.keepValue||(Ft(n,B),Ft(s,B)),!P.keepError&&Ft(r.errors,B),!P.keepDirty&&Ft(r.dirtyFields,B),!P.keepTouched&&Ft(r.touchedFields,B),!P.keepIsValidating&&Ft(r.validatingFields,B),!t.shouldUnregister&&!P.keepDefaultValue&&Ft(o,B);h.state.next({values:Vt(s)}),h.state.next({...r,...P.keepDirty?{isDirty:H()}:{}}),!P.keepIsValid&&p()},ge=({disabled:k,name:P})=>{(pr(k)&&i.mount||k||a.disabled.has(P))&&(k?a.disabled.add(P):a.disabled.delete(P))},de=(k,P={})=>{let B=he(n,k);const le=pr(P.disabled)||pr(t.disabled);return ut(n,k,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),B?ge({disabled:pr(P.disabled)?P.disabled:t.disabled,name:k}):S(k,!0,P.value),{...le?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:Go(P.min),max:Go(P.max),minLength:Go(P.minLength),maxLength:Go(P.maxLength),pattern:Go(P.pattern)}:{},name:k,onChange:N,onBlur:N,ref:se=>{if(se){de(k,P),B=he(n,k);const O=$t(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,ne=Lw(O),Se=B._f.refs||[];if(ne?Se.find(Oe=>Oe===O):O===B._f.ref)return;ut(n,k,{_f:{...B._f,...ne?{refs:[...Se.filter(Wc),O,...Array.isArray(he(o,k))?[{}]:[]],ref:{type:O.type,name:k}}:{ref:O}}}),S(k,!1,void 0,O)}else B=he(n,k,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(dp(a.array,k)&&i.action)&&a.unMount.add(k)}}},pe=()=>t.shouldFocusError&&Ko(n,ae,a.mount),Re=k=>{pr(k)&&(h.state.next({disabled:k}),Ko(n,(P,B)=>{const le=he(n,B);le&&(P.disabled=le._f.disabled||k,Array.isArray(le._f.refs)&&le._f.refs.forEach(se=>{se.disabled=le._f.disabled||k}))},0,!1))},j=(k,P)=>async B=>{let le;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let se=Vt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:ne}=await D();r.errors=O,se=Vt(ne)}else await M(n);if(a.disabled.size)for(const O of a.disabled)Ft(se,O);if(Ft(r.errors,"root"),ir(r.errors)){h.state.next({errors:{}});try{await k(se,B)}catch(O){le=O}}else P&&await P({...r.errors},B),pe(),setTimeout(pe);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ir(r.errors)&&!le,submitCount:r.submitCount+1,errors:r.errors}),le)throw le},Fe=(k,P={})=>{he(n,k)&&($t(P.defaultValue)?V(k,Vt(he(o,k))):(V(k,P.defaultValue),ut(o,k,Vt(P.defaultValue))),P.keepTouched||Ft(r.touchedFields,k),P.keepDirty||(Ft(r.dirtyFields,k),r.isDirty=P.defaultValue?H(k,Vt(he(o,k))):H()),P.keepError||(Ft(r.errors,k),d.isValid&&p()),h.state.next({...r}))},qe=(k,P={})=>{const B=k?Vt(k):o,le=Vt(B),se=ir(k),O=se?o:le;if(P.keepDefaultValues||(o=B),!P.keepValues){if(P.keepDirtyValues){const ne=new Set([...a.mount,...Object.keys(Zo(o,s))]);for(const Se of Array.from(ne))he(r.dirtyFields,Se)?ut(O,Se,he(s,Se)):V(Se,he(O,Se))}else{if(Pc&&$t(k))for(const ne of a.mount){const Se=he(n,ne);if(Se&&Se._f){const Oe=Array.isArray(Se._f.refs)?Se._f.refs[0]:Se._f.ref;if(zi(Oe)){const R=Oe.closest("form");if(R){R.reset();break}}}}if(P.keepFieldsRef)for(const ne of a.mount)V(ne,he(O,ne));else n={}}s=t.shouldUnregister?P.keepDefaultValues?Vt(o):{}:Vt(O),h.array.next({values:{...O}}),h.state.next({values:{...O}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!t.shouldUnregister,h.state.next({submitCount:P.keepSubmitCount?r.submitCount:0,isDirty:se?!1:P.keepDirty?r.isDirty:!!(P.keepDefaultValues&&!Xr(k,o)),isSubmitted:P.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Zo(o,s):r.dirtyFields:P.keepDefaultValues&&k?Zo(o,k):P.keepDirty?r.dirtyFields:{},touchedFields:P.keepTouched?r.touchedFields:{},errors:P.keepErrors?r.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ze=(k,P)=>qe(Ir(k)?k(s):k,P),Ne=(k,P={})=>{const B=he(n,k),le=B&&B._f;if(le){const se=le.refs?le.refs[0]:le.ref;se.focus&&(se.focus(),P.shouldSelect&&Ir(se.select)&&se.select())}},Be=k=>{r={...r,...k}},ht={control:{register:de,unregister:ce,getFieldState:Q,handleSubmit:j,setError:me,_subscribe:ie,_runSchema:D,_focusError:pe,_getWatch:G,_getDirty:H,_setValid:p,_setFieldArray:w,_setDisabledField:ge,_setErrors:E,_getFieldArray:F,_reset:qe,_resetDefaultValues:()=>Ir(t.defaultValues)&&t.defaultValues().then(k=>{Ze(k,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Re,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(k){i=k},get _defaultValues(){return o},get _names(){return a},set _names(k){a=k},get _formState(){return r},get _options(){return t},set _options(k){t={...t,...k}}},subscribe:ee,trigger:fe,register:de,handleSubmit:j,watch:we,setValue:V,getValues:$,reset:Ze,resetField:Fe,clearErrors:Ce,unregister:ce,setError:me,setFocus:Ne,getFieldState:Q};return{...ht,formControl:ht}}function Pp(e={}){const t=y.useRef(void 0),r=y.useRef(void 0),[n,o]=y.useState({isDirty:!1,isValidating:!1,isLoading:Ir(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:Ir(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ir(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Kw(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,$c(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),y.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),y.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),y.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),y.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),y.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),y.useEffect(()=>{e.values&&!Xr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),r.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[s,e.values]),y.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=fp(n,s),t.current}const Op=(e,t,r)=>{if(e&&"reportValidity"in e){const n=he(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Vc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Op(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Op(o,r,e))}},jp=(e,t)=>{t.shouldUseNativeValidation&&Vc(e,t);const r={};for(const n in e){const o=he(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(Qw(t.names||Object.keys(e),n)){const i=Object.assign({},he(r,n));ut(i,"root",s),ut(r,n,i)}else ut(r,n,s)}return r},Qw=(e,t)=>{const r=Rp(t);return e.some(n=>Rp(n).match(`^${r}\\.\\d+`))};function Rp(e){return e.replace(/\]|\[/g,"")}function Z(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(const d in i.prototype)d in a||Object.defineProperty(a,d,{value:i.prototype[d].bind(a)});a._zod.constr=i,a._zod.def=c}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=r?.Parent?new s:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Kn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Np extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $p={};function Dn(e){return $p}function Xw(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Uc(e,t){return typeof t=="bigint"?t.toString():t}function Hc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Yc(e){return e==null}function qc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Jw(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=r>o?r:o,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}const Lp=Symbol("evaluating");function gt(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Lp)return n===void 0&&(n=Lp,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function eS(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function an(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Qn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function zp(e){return JSON.stringify(e)}const Bp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const tS=Hc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Qo(e){if(Vi(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Vi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Fp(e){return Qo(e)?{...e}:e}const rS=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Ae(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function nS(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const oS={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 sS(e,t){const r=e._zod.def,n=Qn(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return an(this,"shape",o),o},checks:[]});return cn(e,n)}function iS(e,t){const r=e._zod.def,n=Qn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return an(this,"shape",o),o},checks:[]});return cn(e,n)}function aS(e,t){if(!Qo(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=Qn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return an(this,"shape",s),s},checks:[]});return cn(e,o)}function cS(e,t){if(!Qo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return an(this,"shape",n),n},checks:e._zod.def.checks};return cn(e,r)}function lS(e,t){const r=Qn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return an(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return cn(e,r)}function uS(e,t,r){const n=Qn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)s[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return an(this,"shape",s),s},checks:[]});return cn(t,n)}function dS(e,t,r){const n=Qn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return an(this,"shape",s),s},checks:[]});return cn(t,n)}function Jn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Wp(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ui(e){return typeof e=="string"?e:e?.message}function kn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Ui(e.inst?._zod.def?.error?.(e))??Ui(t?.error?.(e))??Ui(r.customError?.(e))??Ui(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Zc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Xo(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Vp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Uc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Gc=Z("$ZodError",Vp),Hi=Z("$ZodError",Vp,{Parent:Error});function fS(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function pS(e,t){const r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));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)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}const Yi=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Kn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>kn(c,s,Dn())));throw Bp(a,o?.callee),a}return i.value},hS=Yi(Hi),qi=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>kn(c,s,Dn())));throw Bp(a,o?.callee),a}return i.value},mS=qi(Hi),Zi=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Kn;return s.issues.length?{success:!1,error:new(e??Gc)(s.issues.map(i=>kn(i,o,Dn())))}:{success:!0,data:s.value}},gS=Zi(Hi),Gi=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>kn(i,o,Dn())))}:{success:!0,data:s.value}},vS=Gi(Hi),yS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,r,o)},bS=e=>(t,r,n)=>Yi(e)(t,r,n),xS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return qi(e)(t,r,o)},_S=e=>async(t,r,n)=>qi(e)(t,r,n),wS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Zi(e)(t,r,o)},SS=e=>(t,r,n)=>Zi(e)(t,r,n),CS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Gi(e)(t,r,o)},ES=e=>async(t,r,n)=>Gi(e)(t,r,n),DS=/^[cC][^\s-]{8,}$/,kS=/^[0-9a-z]+$/,AS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,TS=/^[0-9a-vA-V]{20}$/,IS=/^[A-Za-z0-9]{27}$/,MS=/^[a-zA-Z0-9_-]{21}$/,PS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OS=/^([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})$/,Up=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)$/,jS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,RS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function NS(){return new RegExp(RS,"u")}const $S=/^(?:(?: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])$/,LS=/^(([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})$/,zS=/^((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])$/,BS=/^(([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])$/,FS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hp=/^[A-Za-z0-9_-]*$/,WS=/^(?=.{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])?)*\.?$/,VS=/^\+(?:[0-9]){6,14}[0-9]$/,Yp="(?:(?:\\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])))",US=new RegExp(`^${Yp}$`);function qp(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function HS(e){return new RegExp(`^${qp(e)}$`)}function YS(e){const t=qp({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Yp}T(?:${n})$`)}const qS=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ZS=/^\d+$/,GS=/^-?\d+(?:\.\d+)?/i,KS=/true|false/i,QS=/^[^A-Z]*$/,XS=/^[^a-z]*$/,ar=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Zp={number:"number",bigint:"bigint",object:"date"},Gp=Z("$ZodCheckLessThan",(e,t)=>{ar.init(e,t);const r=Zp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kp=Z("$ZodCheckGreaterThan",(e,t)=>{ar.init(e,t);const r=Zp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),JS=Z("$ZodCheckMultipleOf",(e,t)=>{ar.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Jw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),eC=Z("$ZodCheckNumberFormat",(e,t)=>{ar.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=oS[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,r&&(a.pattern=ZS)}),e._zod.check=i=>{const a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inst:e})}}),tC=Z("$ZodCheckMaxLength",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Yc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=Zc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),rC=Z("$ZodCheckMinLength",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Yc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=Zc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),nC=Z("$ZodCheckLengthEquals",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Yc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=Zc(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ki=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;ar.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),oC=Z("$ZodCheckRegex",(e,t)=>{Ki.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sC=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=QS),Ki.init(e,t)}),iC=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=XS),Ki.init(e,t)}),aC=Z("$ZodCheckIncludes",(e,t)=>{ar.init(e,t);const r=Xn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),cC=Z("$ZodCheckStartsWith",(e,t)=>{ar.init(e,t);const r=new RegExp(`^${Xn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),lC=Z("$ZodCheckEndsWith",(e,t)=>{ar.init(e,t);const r=new RegExp(`.*${Xn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),uC=Z("$ZodCheckOverwrite",(e,t)=>{ar.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class dC{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
159
+ `):" "+Rf(s[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:xc};function _c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qn(null,e)}function $f(e){return _c(e),e.headers=sr.from(e.headers),e.data=yc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nf.getAdapter(e.adapter||Oo.adapter)(e).then(function(n){return _c(e),n.data=yc.call(e,e.transformResponse,n),n.headers=sr.from(n.headers),n},function(n){return Cf(n)||(_c(e),n&&n.response&&(n.response.data=yc.call(e,e.transformResponse,n.response),n.response.headers=sr.from(n.response.headers))),Promise.reject(n)})}const Lf="1.11.0",Ii={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ii[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const zf={};Ii.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Lf+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(t===!1)throw new Le(o(i," has been removed"+(r?" in "+r:"")),Le.ERR_DEPRECATED);return r&&!zf[i]&&(zf[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,a):!0}},Ii.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function jx(e,t,r){if(typeof e!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new Le("option "+s+" must be "+c,Le.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Le("Unknown option "+s,Le.ERR_BAD_OPTION)}}const Mi={assertOptions:jx,validators:Ii},Wr=Mi.validators;let xn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new xf,response:new xf}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
160
+ `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Mi.assertOptions(n,{silentJSONParsing:Wr.transitional(Wr.boolean),forcedJSONParsing:Wr.transitional(Wr.boolean),clarifyTimeoutError:Wr.transitional(Wr.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Mi.assertOptions(o,{encode:Wr.function,serialize:Wr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Mi.assertOptions(r,{baseUrl:Wr.spelling("baseURL"),withXsrfToken:Wr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&z.merge(s.common,s[r.method]);s&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),r.headers=sr.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let d,f=0,h;if(!c){const m=[$f.bind(this),void 0];for(m.unshift(...a),m.push(...l),h=m.length,d=Promise.resolve(r);f<h;)d=d.then(m[f++],m[f++]);return d}h=a.length;let v=r;for(f=0;f<h;){const m=a[f++],p=a[f++];try{v=m(v)}catch(b){p.call(this,b);break}}try{d=$f.call(this,v)}catch(m){return Promise.reject(m)}for(f=0,h=l.length;f<h;)d=d.then(l[f++],l[f++]);return d}getUri(t){t=bn(this.defaults,t);const r=Af(t.baseURL,t.url,t.allowAbsoluteUrls);return bf(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(r,n){return this.request(bn(n||{},{method:t,url:r,data:(n||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function r(n){return function(s,i,a){return this.request(bn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}xn.prototype[t]=r(),xn.prototype[t+"Form"]=r(!0)});let Rx=class g0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{n.subscribe(a),s=a}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,a){n.reason||(n.reason=new qn(s,i,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new g0(function(o){t=o}),cancel:t}}};function Nx(e){return function(r){return e.apply(null,r)}}function $x(e){return z.isObject(e)&&e.isAxiosError===!0}const wc={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(wc).forEach(([e,t])=>{wc[t]=e});function Bf(e){const t=new xn(e),r=nf(xn.prototype.request,t);return z.extend(r,xn.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Bf(bn(e,o))},r}const Rt=Bf(Oo);Rt.Axios=xn,Rt.CanceledError=qn,Rt.CancelToken=Rx,Rt.isCancel=Cf,Rt.VERSION=Lf,Rt.toFormData=Ei,Rt.AxiosError=Le,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=Nx,Rt.isAxiosError=$x,Rt.mergeConfig=bn,Rt.AxiosHeaders=sr,Rt.formToJSON=e=>wf(z.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Nf.getAdapter,Rt.HttpStatusCode=wc,Rt.default=Rt;const{Axios:o5,AxiosError:s5,CanceledError:i5,isCancel:a5,CancelToken:c5,VERSION:l5,all:u5,Cancel:d5,isAxiosError:f5,spread:p5,toFormData:h5,AxiosHeaders:m5,HttpStatusCode:g5,formToJSON:v5,getAdapter:y5,mergeConfig:b5}=Rt,Ff={token:null},Lx=e=>{Ff.token=e},Et=Rt.create({headers:{"Content-Type":"application/json"}});Et.interceptors.request.use(e=>{const t=Ff.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Wf=y.createContext(void 0),zx=({config:e,children:t})=>(y.useEffect(()=>{e.getToken&&Lx(e.getToken)},[e.getToken]),u.jsx(Wf.Provider,{value:e,children:t})),Sc=()=>{const e=y.useContext(Wf);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Pi=()=>{const{calendarApiUrl:e}=Sc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await Et.get(i)).data}catch(i){throw console.error("Error al obtener la URL de Google Auth:",i),i}},saveGoogleCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/google-auth/SaveCredential?${a}`;return(await Et.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await Et.get(`${e}/api/Calendario/v1/google/ObtenerTiposCalendariosGoogleAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},syncGoogleEvents:async(i,a,c)=>{try{return(await Et.post(`${e}/api/Calendario/v1/google/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(l){throw console.error("Error al sincronizar eventos con Google Calendar:",l),l}},getGoogleEventsByMonth:async i=>{try{return(await Et.post(`${e}/api/Calendario/v1/google/ObtenerEventosGoogleAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Google Calendar por mes:",a),a}}}},Vf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",Bx=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=Pi(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const{url:i}=await o.getGoogleAuthUrl();window.location.href=i}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return u.jsxs("div",{className:"flex",children:[u.jsxs("div",{className:xe.syncButton,onClick:s,children:[u.jsx("div",{className:xe.customCheckIcon,children:u.jsx("div",{className:xe.uncheckedCircle})}),u.jsx("img",{src:Vf,width:18}),u.jsx("span",{children:"Google Calendar"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Cc=()=>{const{calendarApiUrl:e}=Sc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await Et.get(i);return console.log("api",a),a.data}catch(i){throw console.error("Error al obtener la URL de Outlook Auth:",i),i}},saveOutlookCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/outlook-auth/SaveCredential?${a}`;return(await Et.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await Et.post(`${e}/api/Calendario/v1/outlook/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(l){throw console.error("Error al sincronizar eventos con outlook Calendar:",l),l}},getOutlookCalendars:async(i,a)=>{try{return(await Et.get(`${e}/api/Calendario/v1/outlook/ObtenerTiposCalendariosOutlookAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},getOutlookEventsByMonth:async i=>{try{return(await Et.post(`${e}/api/Calendario/v1/outlook/ObtenerEventosoutlookAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Outlook Calendar por mes:",a),a}}}},Hf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",Fx=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=Cc(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const i=await o.getOutlookAuthUrl();window.location.href=i?.authUrl}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return u.jsxs("div",{className:"flex",children:[u.jsxs("div",{className:xe.syncButton,onClick:s,children:[u.jsx("div",{className:xe.customCheckIcon,children:u.jsx("div",{className:xe.uncheckedCircle})}),u.jsx("img",{src:Hf,width:20}),u.jsx("span",{children:"Outlook"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Uf="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='88'%20height='67'%20fill='none'%3e%3cg%20filter='url(%23a)'%20opacity='.7'%3e%3cellipse%20cx='69.302'%20cy='60.952'%20fill='%23D9D9D9'%20rx='12.698'%20ry='2.032'/%3e%3c/g%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M60.034%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a270%20270%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.403.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.499%2014.552a2.033%202.033%200%200%201-3.242.236l1.533-1.333-1.535%201.332v-.003l-.005-.004-.01-.012-.028-.033-.082-.1a10%2010%200%200%201-.26-.34%2014%2014%200%200%201-.798-1.221%2017.3%2017.3%200%200%201-1.828-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m1.867%2017.26q-.02.064-.042.126.091-.276.172-.552zm-1.626-14.786.004.008z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20d='M59.728%2035.515s-1.736-7.32%206.371-12.183c0%200%20.497%208.29-6.371%2012.183'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M79.915%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a281%20281%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.402.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.5%2014.552a2.033%202.033%200%200%201-3.241.236l1.532-1.333-1.534%201.332-.001-.003-.004-.004-.011-.012-.027-.033-.082-.1a10%2010%200%200%201-.26-.34c-.211-.287-.492-.698-.799-1.221a17.3%2017.3%200%200%201-1.827-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m2.476%209.544q.013.113.027.228-.058-.477-.135-.934z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M72.733%2022.085c.313-.165.691-.154.996.028l-.522.871c.522-.87.521-.871.522-.87l.004.001.007.004.021.013q.027.016.072.046.091.057.25.165c.212.145.507.357.856.635.697.556%201.62%201.383%202.52%202.474%201.803%202.183%203.562%205.475%203.201%209.764a1.016%201.016%200%200%201-1.376.863h-.002l-.004-.002-.008-.002-.023-.01-.079-.033a9.79%209.79%200%200%201-1.139-.603%2012%2012%200%200%201-2.566-2.14c-1.853-2.044-3.57-5.345-3.271-10.365l.017-.131c.057-.3.249-.563.524-.708M78.04%2034.22l.11.075a11%2011%200%200%201-.394-.282zm-4.516-11.027.334.237q0%200%20.003.002a13%2013%200%200%200-.337-.24'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M85.456%2022.461a1.017%201.017%200%200%201%201.536.81l-1.014.061%201.014-.06v.002l.001.003v.008l.001.024.004.085q.004.108.004.301c0%20.257-.007.62-.04%201.067-.064.89-.227%202.12-.618%203.482-.781%202.723-2.5%206.038-6.237%208.156a1.018%201.018%200%200%201-1.489-.65l-.002-.006-.002-.009-.005-.025a5%205%200%200%201-.065-.367%2010%2010%200%200%201-.096-.999c-.04-.837%200-2.002.316-3.331.639-2.686%202.388-5.97%206.692-8.552'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M70.232%205.343c.71.002%201.37.374%201.737.982l-1.74%201.05c1.739-1.05%201.74-1.048%201.74-1.048l.002.002q0%20.003.003.004l.008.014.023.04.082.142q.102.18.274.505c.227.432.535%201.053.875%201.834a33%2033%200%200%201%202.036%206.417c1.09%205.284%201.122%2012.4-3.305%2019.3a2.034%202.034%200%200%201-3.242.236l1.532-1.334a223%20223%200%200%201-1.534%201.332l-.002-.002-.004-.005-.012-.013-.033-.04-.102-.124a13%2013%200%200%201-.335-.438%2019%2019%200%200%201-1.048-1.603%2023%2023%200%200%201-2.413-5.902c-1.3-5.104-1.25-12.198%203.719-20.373l.072-.11c.38-.541%201-.867%201.667-.866m1.563%2026.818v-.002l-.003-.002v-.002z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M60.61%2018.704c.315-.166.693-.155.998.027l-.523.871c.489-.815.52-.868.523-.87l.004.001.009.005.027.017a8%208%200%200%201%20.425.279c.282.192.676.476%201.145.85a23%2023%200%200%201%203.383%203.32c2.419%202.929%204.765%207.325%204.284%2013.05a1.017%201.017%200%200%201-1.376.864l.363-.948-.364.947h-.002l-.003-.002q-.005%200-.01-.003l-.03-.012-.1-.041a9%209%200%200%201-.341-.157c-.288-.139-.69-.35-1.164-.642a16%2016%200%200%201-3.42-2.852c-2.465-2.719-4.768-7.125-4.367-13.866l.017-.131c.058-.3.248-.562.523-.708m.436%201.974q.003-.237.011-.477v-.003a24%2024%200%200%200-.01.48'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M78.103%2019.143a1.016%201.016%200%200%201%201.419.871l-1.014.06%201.014-.06.001.002v.013l.002.032.004.11q.005.142.006.399c0%20.341-.01.83-.054%201.428a23.2%2023.2%200%200%201-.829%204.675c-1.05%203.655-3.348%208.076-8.335%2010.904a1.016%201.016%200%200%201-1.49-.65l.989-.233-.988.232-.001-.001-.001-.004-.002-.01-.007-.032q-.01-.038-.022-.104a9%209%200%200%201-.064-.372c-.047-.317-.1-.768-.127-1.326a16%2016%200%200%201%20.423-4.441c.85-3.574%203.18-7.967%208.96-11.433zm-8.499%2015.032c-.007.617.024%201.143.066%201.552q.032.308.065.524c.043.286.08.443.08.443-.003-.017-.23-.99-.21-2.52m.05-1.027q-.023.282-.036.546l.032-.511q.001-.018.004-.035'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20d='M55.804%2031.519h28.238c.815%200%201.476.663%201.476%201.481v15.847c0%206.204-5.019%2011.241-11.2%2011.241h-8.79c-6.182%200-11.2-5.037-11.2-11.24V33c0-.818.66-1.481%201.476-1.481'/%3e%3cpath%20fill='%23E6E8ED'%20d='M68.15%2032.344v17.159c0%205.103%203.6%209.364%208.39%2010.361%205.122-1.034%208.978-5.574%208.978-11.018V33c0-.818-.66-1.481-1.476-1.481h-15.07a.823.823%200%200%200-.822.824z'/%3e%3cg%20filter='url(%23b)'%20opacity='.7'%3e%3cellipse%20cx='33.238'%20cy='60.952'%20fill='%23D9D9D9'%20rx='28.444'%20ry='3.048'/%3e%3c/g%3e%3cpath%20fill='%233856EC'%20d='M6.095%2017.27h54.857V53.84a6.095%206.095%200%200%201-6.095%206.095H12.19a6.095%206.095%200%200%201-6.095-6.095z'/%3e%3cpath%20fill='%23E2EDFB'%20d='M6.195%2050.145a8.127%208.127%200%200%200%208.127%208.127H37.9a6.1%206.1%200%200%200%204.309-1.785l16.98-16.973a6.1%206.1%200%200%200%201.785-4.31V9.586a6.095%206.095%200%200%200-6.095-6.095H12.29a6.095%206.095%200%200%200-6.095%206.095z'/%3e%3cpath%20fill='%233856EC'%20fill-rule='evenodd'%20d='M60.952%209.009a6.014%206.014%200%200%200-6.014-6.014H12.11a6.014%206.014%200%200%200-6.014%206.014v8.284h54.857zM17.77%2012.772a2.794%202.794%200%201%201%20.002-5.589%202.794%202.794%200%200%201-.002%205.59m15.965%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201%200%205.588m16.763%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201-.001%205.588'%20clip-rule='evenodd'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3cpath%20fill='%23597EF7'%20d='M40.52%2057.687a6%206%200%200%200%201.665-1.174l17.027-17.021a6%206%200%200%200%201.313-1.973H48.646a8.127%208.127%200%200%200-8.127%208.127z'/%3e%3crect%20width='3.991'%20height='11.974'%20x='15.773'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='31.738'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='48.501'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3cdefs%3e%3cfilter%20id='a'%20width='29.46'%20height='8.127'%20x='54.572'%20y='56.889'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3cfilter%20id='b'%20width='60.952'%20height='10.159'%20x='2.762'%20y='55.873'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e";class _n extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class Ec extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Ar extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Wx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Vx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Hx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Yf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Ux extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class qf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Oi{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var H;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(H||(H={}));class Ro{constructor(){}log(t,r){}}Ro.instance=new Ro;const Yx="10.0.0";class Bt{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class Dt{static get isBrowser(){return!Dt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Dt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Dt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function No(e,t){let r="";return wn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${qx(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function qx(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const o=n<16?"0":"";r+=`0x${o}${n.toString(16)} `}),r.substring(0,r.length-1)}function wn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Zf(e,t,r,n,o,s){const i={},[a,c]=Zn();i[a]=c,e.log(H.Trace,`(${t} transport) sending data. ${No(o,s.logMessageContent)}.`);const l=wn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:l,timeout:s.timeout,withCredentials:s.withCredentials});e.log(H.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function Zx(e){return e===void 0?new ji(H.Information):e===null?Ro.instance:e.log!==void 0?e:new ji(e)}class Gx{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class ji{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${H[t]}: ${r}`;switch(t){case H.Critical:case H.Error:this.out.error(n);break;case H.Warning:this.out.warn(n);break;case H.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function Zn(){let e="X-SignalR-User-Agent";return Dt.isNode&&(e="User-Agent"),[e,Kx(Yx,Qx(),Jx(),Xx())]}function Kx(e,t,r,n){let o="Microsoft SignalR/";const s=e.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${e}; `,t&&t!==""?o+=`${t}; `:o+="Unknown OS; ",o+=`${r}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Qx(){if(Dt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Xx(){if(Dt.isNode)return process.versions.node}function Jx(){return Dt.isNode?"NodeJS":"Browser"}function Dc(e){return e.stack?e.stack:e.message?e.message:`${e}`}function e_(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class t_ extends Oi{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||Dt.isNode){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=r("node-fetch"):this._fetchType=fetch,this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(e_());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new Ar;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new Ar});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(H.Warning,"Timeout from HTTP request."),n=new Ec},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},wn(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(c){throw n||(this._logger.log(H.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Gf(s,"text");throw new _n(c||s.statusText,s.status)}const a=await Gf(s,t.responseType);return new qf(s.status,s.statusText,a)}getCookieString(t){let r="";return Dt.isNode&&this._jar&&this._jar.getCookies(t,(n,o)=>r=o.join("; ")),r}}function Gf(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class r_ extends Oi{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ar):t.method?t.url?new Promise((r,n)=>{const o=new XMLHttpRequest;o.open(t.method,t.url,!0),o.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(wn(t.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(i=>{o.setRequestHeader(i,s[i])}),t.responseType&&(o.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{o.abort(),n(new Ar)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new qf(o.status,o.statusText,o.response||o.responseText)):n(new _n(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(H.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new _n(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(H.Warning,"Timeout from HTTP request."),n(new Ec)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class n_ extends Oi{constructor(t){if(super(),typeof fetch<"u"||Dt.isNode)this._httpClient=new t_(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new r_(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ar):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class fr{static write(t){return`${t}${fr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==fr.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(fr.RecordSeparator);return r.pop(),r}}fr.RecordSeparatorCode=30,fr.RecordSeparator=String.fromCharCode(fr.RecordSeparatorCode);class o_{writeHandshakeRequest(t){return fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(wn(t)){const a=new Uint8Array(t),c=a.indexOf(fr.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,l))),n=a.byteLength>l?a.slice(l).buffer:null}else{const a=t,c=a.indexOf(fr.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;r=a.substring(0,l),n=a.length>l?a.substring(l):null}const o=fr.parse(r),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var $e;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})($e||($e={}));class s_{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new Gx(this,t)}}class i_{constructor(t,r,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=r,this._bufferSize=n}async _send(t){const r=this._protocol.writeMessage(t);let n=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let o=()=>{},s=()=>{};wn(r)?this._bufferedByteCount+=r.byteLength:this._bufferedByteCount+=r.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((i,a)=>{o=i,s=a})),this._messages.push(new a_(r,this._totalMessageCount,o,s))}try{this._reconnectInProgress||await this._connection.send(r)}catch{this._disconnected()}await n}_ack(t){let r=-1;for(let n=0;n<this._messages.length;n++){const o=this._messages[n];if(o._id<=t.sequenceId)r=n,wn(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}r!==-1&&(this._messages=this._messages.slice(r+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==$e.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const r=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,r<=this._latestReceivedSequenceId?(r===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=r,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:$e.Sequence,sequenceId:t}));const r=this._messages;for(const n of r)await this._connection.send(n._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const r of this._messages)r._rejector(t)}_isInvocationMessage(t){switch(t.type){case $e.Invocation:case $e.StreamItem:case $e.Completion:case $e.StreamInvocation:case $e.CancelInvocation:return!0;case $e.Close:case $e.Sequence:case $e.Ping:case $e.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:$e.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class a_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const c_=30*1e3,l_=15*1e3,u_=1e5;var bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(bt||(bt={}));class kc{static create(t,r,n,o,s,i,a){return new kc(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(H.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Bt.isRequired(t,"connection"),Bt.isRequired(r,"logger"),Bt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??c_,this.keepAliveIntervalInMilliseconds=i??l_,this._statefulReconnectBufferSize=a??u_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new o_,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:$e.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==bt.Disconnected&&this._connectionState!==bt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=bt.Connecting,this._logger.log(H.Debug,"Starting HubConnection.");try{await this._startInternal(),Dt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=bt.Connected,this._connectionStarted=!0,this._logger.log(H.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=bt.Disconnected,this._logger.log(H.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{let r=this._protocol.version;this.connection.features.reconnect||(r=1);const n={protocol:this._protocol.name,version:r};if(this._logger.log(H.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(H.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new i_(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(H.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===bt.Disconnected)return this._logger.log(H.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===bt.Disconnecting)return this._logger.log(H.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const r=this._connectionState;return this._connectionState=bt.Disconnecting,this._logger.log(H.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(H.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(r===bt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Ar("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createStreamInvocation(t,r,o);let i;const a=new s_;return a.cancelCallback=()=>{const c=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],i.then(()=>this._sendWithProtocol(c))},this._callbacks[s.invocationId]=(c,l)=>{if(l){a.error(l);return}else c&&(c.type===$e.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},i=this._sendWithProtocol(s).catch(c=>{a.error(c),delete this._callbacks[s.invocationId]}),this._launchStreams(n,i),a}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._sendWithProtocol(this._createInvocation(t,r,!0,o));return this._launchStreams(n,s),s}invoke(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createInvocation(t,r,!1,o);return new Promise((a,c)=>{this._callbacks[s.invocationId]=(d,f)=>{if(f){c(f);return}else d&&(d.type===$e.Completion?d.error?c(new Error(d.error)):a(d.result):c(new Error(`Unexpected message type: ${d.type}`)))};const l=this._sendWithProtocol(s).catch(d=>{c(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,l)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const o=n.indexOf(r);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case $e.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(H.Error,`Invoke client method threw error: ${Dc(o)}`)});break;case $e.StreamItem:case $e.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===$e.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(H.Error,`Stream callback threw error: ${Dc(s)}`)}}break}case $e.Ping:break;case $e.Close:{this._logger.log(H.Information,"Close message received from server.");const o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case $e.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case $e.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(H.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(o){const s="Error parsing handshake response: "+o;this._logger.log(H.Error,s);const i=new Error(s);throw this._handshakeRejecter(i),i}if(r.error){const o="Server returned handshake error: "+r.error;this._logger.log(H.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(H.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===bt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===bt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(H.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(H.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const o=n.slice(),s=!!t.invocationId;let i,a,c;for(const l of o)try{const d=i;i=await l.apply(this,t.arguments),s&&i&&d&&(this._logger.log(H.Error,`Multiple results provided for '${r}'. Sending error to server.`),c=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),a=void 0}catch(d){a=d,this._logger.log(H.Error,`A callback for the method '${r}' threw error '${d}'.`)}c?await this._sendWithProtocol(c):s?(a?c=this._createCompletionMessage(t.invocationId,`${a}`,null):i!==void 0?c=this._createCompletionMessage(t.invocationId,null,i):(this._logger.log(H.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),c=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):i&&this._logger.log(H.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(H.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Ar("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===bt.Disconnecting?this._completeClose(t):this._connectionState===bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=bt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),Dt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(H.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,o=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n,0,o);if(s===null){this._logger.log(H.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=bt.Reconnecting,t?this._logger.log(H.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(H.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(H.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==bt.Reconnecting){this._logger.log(H.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(H.Information,`Reconnect attempt number ${n+1} will start in ${s} ms.`),await new Promise(i=>{this._reconnectDelayHandle=setTimeout(i,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==bt.Reconnecting){this._logger.log(H.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=bt.Connected,this._logger.log(H.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(H.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(H.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==bt.Reconnecting){this._logger.log(H.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===bt.Disconnecting&&this._completeClose();return}n++,o=i instanceof Error?i:new Error(i.toString()),s=this._getNextRetryDelay(n,Date.now()-r,o)}}this._logger.log(H.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(o){return this._logger.log(H.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${o}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const o=r[n];try{o(null,t)}catch(s){this._logger.log(H.Error,`Stream 'error' callback called with '${t}' threw error: ${Dc(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,o){if(n)return o.length!==0?{target:t,arguments:r,streamIds:o,type:$e.Invocation}:{target:t,arguments:r,type:$e.Invocation};{const s=this._invocationId;return this._invocationId++,o.length!==0?{target:t,arguments:r,invocationId:s.toString(),streamIds:o,type:$e.Invocation}:{target:t,arguments:r,invocationId:s.toString(),type:$e.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let o=0;o<t.length;o++){const s=t[o];if(this._isObservable(s)){const i=this._invocationId;this._invocationId++,r[i]=s,n.push(i.toString()),t.splice(o,1)}}return[r,n]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,r,n){const o=this._invocationId;return this._invocationId++,n.length!==0?{target:t,arguments:r,invocationId:o.toString(),streamIds:n,type:$e.StreamInvocation}:{target:t,arguments:r,invocationId:o.toString(),type:$e.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:$e.CancelInvocation}}_createStreamItemMessage(t,r){return{invocationId:t,item:r,type:$e.StreamItem}}_createCompletionMessage(t,r,n){return r?{error:r,invocationId:t,type:$e.Completion}:{invocationId:t,result:n,type:$e.Completion}}_createCloseMessage(){return{type:$e.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const d_=[0,2e3,1e4,3e4,null];class Kf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:d_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Sn{}Sn.Authorization="Authorization",Sn.Cookie="Cookie";class f_ extends Oi{constructor(t,r){super(),this._innerClient=t,this._accessTokenFactory=r}async send(t){let r=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Sn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Sn.Authorization]&&delete t.headers[Sn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Wt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Wt||(Wt={}));var Jt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Jt||(Jt={}));let p_=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Qf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new p_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._url=t,this._logger.log(H.Trace,"(LongPolling transport) Connecting."),r===Jt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=Zn(),s={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};r===Jt.Binary&&(i.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(H.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(H.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new _n(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(H.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(H.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(H.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new _n(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(H.Trace,`(LongPolling transport) data received. ${No(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(H.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof Ec?this._logger.log(H.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(H.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(H.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Zf(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(H.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(H.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=Zn();t[r]=n;const o={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,o)}catch(i){s=i}s?s instanceof _n&&(s.statusCode===404?this._logger.log(H.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(H.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(H.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(H.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(H.Trace,t),this.onclose(this._closeError)}}}class h_{constructor(t,r,n,o){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(t,r){return Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._logger.log(H.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(r!==Jt.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(Dt.isBrowser||Dt.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),c={};c.Cookie=a;const[l,d]=Zn();c[l]=d,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{i.onmessage=a=>{if(this.onreceive)try{this._logger.log(H.Trace,`(SSE transport) data received. ${No(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},i.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(H.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?Zf(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class m_{constructor(t,r,n,o,s,i){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=i}async connect(t,r){Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._logger.log(H.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((o,s)=>{t=t.replace(/^http/,"ws");let i;const a=this._httpClient.getCookieString(t);let c=!1;if(Dt.isNode||Dt.isReactNative){const l={},[d,f]=Zn();l[d]=f,n&&(l[Sn.Authorization]=`Bearer ${n}`),a&&(l[Sn.Cookie]=a),i=new this._webSocketConstructor(t,void 0,{headers:{...l,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(t)),r===Jt.Binary&&(i.binaryType="arraybuffer"),i.onopen=l=>{this._logger.log(H.Information,`WebSocket connected to ${t}.`),this._webSocket=i,c=!0,o()},i.onerror=l=>{let d=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?d=l.error:d="There was an error with the transport",this._logger.log(H.Information,`(WebSockets transport) ${d}.`)},i.onmessage=l=>{if(this._logger.log(H.Trace,`(WebSockets transport) data received. ${No(l.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(l.data)}catch(d){this._close(d);return}},i.onclose=l=>{if(c)this._close(l);else{let d=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?d=l.error:d="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(d))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(H.Trace,`(WebSockets transport) sending data. ${No(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(H.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const Xf=100;class g_{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Bt.isRequired(t,"url"),this._logger=Zx(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,o=null;if(Dt.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=s("ws"),o=s("eventsource")}!Dt.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Dt.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Dt.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Dt.isNode&&!r.EventSource&&typeof o<"u"&&(r.EventSource=o),this._httpClient=new f_(r.httpClient||new n_(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Jt.Binary,Bt.isIn(t,Jt,"transferFormat"),this._logger.log(H.Debug,`Starting connection with transfer format '${Jt[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(H.Error,r),await this._stopPromise,Promise.reject(new Ar(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(H.Error,r),Promise.reject(new Ar(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Ac(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(H.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(H.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(H.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(H.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Wt.WebSockets)this.transport=this._constructTransport(Wt.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Ar("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Xf);if(o===Xf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Qf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(H.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(H.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,o]=Zn();r[n]=o;const s=this._resolveNegotiateUrl(t);this._logger.log(H.Debug,`Sending negotiation request: ${s}.`);try{const i=await this._httpClient.post(s,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(i.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${i.statusCode}'`));const a=JSON.parse(i.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new Yf("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(i){let a="Failed to complete negotiation with the server: "+i;return i instanceof _n&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(H.Error,a),Promise.reject(new Yf(a))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,o){let s=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(H.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(s,o),this.connectionId=n.connectionId;return}const i=[],a=n.availableTransports||[];let c=n;for(const l of a){const d=this._resolveTransportOrError(l,r,o,c?.useStatefulReconnect===!0);if(d instanceof Error)i.push(`${l.transport} failed:`),i.push(d);else if(this._isITransport(d)){if(this.transport=d,!c){try{c=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}s=this._createConnectUrl(t,c.connectionToken)}try{await this._startTransport(s,o),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(H.Error,`Failed to start the transport '${l.transport}': ${f}`),c=void 0,i.push(new Hx(`${l.transport} failed: ${f}`,Wt[l.transport])),this._connectionState!=="Connecting"){const h="Failed to select transport before stop() was called.";return this._logger.log(H.Debug,h),Promise.reject(new Ar(h))}}}}return i.length>0?Promise.reject(new Ux(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Wt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new m_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Wt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new h_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Wt.LongPolling:return new Qf(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,r),await this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}:this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n,o){const s=Wt[t.transport];if(s==null)return this._logger.log(H.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(v_(r,s))if(t.transferFormats.map(a=>Jt[a]).indexOf(n)>=0){if(s===Wt.WebSockets&&!this._options.WebSocket||s===Wt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(H.Debug,`Skipping transport '${Wt[s]}' because it is not supported in your environment.'`),new Wx(`'${Wt[s]}' is not supported in your environment.`,s);this._logger.log(H.Debug,`Selecting transport '${Wt[s]}'.`);try{return this.features.reconnect=s===Wt.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(H.Debug,`Skipping transport '${Wt[s]}' because it does not support the requested transfer format '${Jt[n]}'.`),new Error(`'${Wt[s]}' does not support ${Jt[n]}.`);else return this._logger.log(H.Debug,`Skipping transport '${Wt[s]}' because it was disabled by the client.`),new Vx(`'${Wt[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(H.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(H.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(H.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(H.Error,`Connection disconnected with error '${t}'.`):this._logger.log(H.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(H.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(H.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Dt.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(H.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=new URL(t);r.pathname.endsWith("/")?r.pathname+="negotiate":r.pathname+="/negotiate";const n=new URLSearchParams(r.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),r.search=n.toString(),r.toString()}}function v_(e,t){return!e||(t&e)!==0}class Ac{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Ri,this._transportResult=new Ri,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Ri),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Ri;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):Ac._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(s=>s.byteLength).reduce((s,i)=>s+i),n=new Uint8Array(r);let o=0;for(const s of t)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}}class Ri{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const y_="json";class b_{constructor(){this.name=y_,this.version=2,this.transferFormat=Jt.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ro.instance);const n=fr.parse(t),o=[];for(const s of n){const i=JSON.parse(s);if(typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case $e.Invocation:this._isInvocationMessage(i);break;case $e.StreamItem:this._isStreamItemMessage(i);break;case $e.Completion:this._isCompletionMessage(i);break;case $e.Ping:break;case $e.Close:break;case $e.Ack:this._isAckMessage(i);break;case $e.Sequence:this._isSequenceMessage(i);break;default:r.log(H.Information,"Unknown message type '"+i.type+"' ignored.");continue}o.push(i)}return o}writeMessage(t){return fr.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const x_={trace:H.Trace,debug:H.Debug,info:H.Information,information:H.Information,warn:H.Warning,warning:H.Warning,error:H.Error,critical:H.Critical,none:H.None};function __(e){const t=x_[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class w_{configureLogging(t){if(Bt.isRequired(t,"logging"),S_(t))this.logger=t;else if(typeof t=="string"){const r=__(t);this.logger=new ji(r)}else this.logger=new ji(t);return this}withUrl(t,r){return Bt.isRequired(t,"url"),Bt.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Bt.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Kf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Kf,this}withServerTimeout(t){return Bt.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Bt.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new g_(this.url,t);return kc.create(r,this.logger||Ro.instance,this.protocol||new b_,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function S_(e){return e.log!==void 0}var $o={},Jf;function C_(){if(Jf)return $o;Jf=1;var e=Je();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(lt()),r=rt();return $o.default=(0,t.default)((0,r.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined"),$o}var E_=C_();const D_=Xe(E_);var Lo={},ep;function k_(){if(ep)return Lo;ep=1;var e=Je();Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;var t=e(lt()),r=rt();return Lo.default=(0,t.default)((0,r.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 8m.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined"),Lo}var A_=k_();const T_=Xe(A_);var zo={},tp;function I_(){if(tp)return zo;tp=1;var e=Je();Object.defineProperty(zo,"__esModule",{value:!0}),zo.default=void 0;var t=e(lt()),r=rt();return zo.default=(0,t.default)((0,r.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),zo}var M_=I_();const rp=Xe(M_);var Bo={},np;function P_(){if(np)return Bo;np=1;var e=Je();Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.default=void 0;var t=e(lt()),r=rt();return Bo.default=(0,t.default)((0,r.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"),Bo}var O_=P_();const Vr=Xe(O_);function Tc(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function Fo(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}function Wo(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?R_(a,f=>f.test(i)):j_(a,f=>f.test(i));let l;l=e.valueCallback?e.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;const d=t.slice(i.length);return{value:l,rest:d}}}function j_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function R_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function N_(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}function $_(e,...t){const r=cc.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const L_={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},z_=(e,t,r)=>{let n;const o=L_[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"en "+n:"hace "+n:n},B_={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},F_={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},W_={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},V_={date:Tc({formats:B_,defaultWidth:"full"}),time:Tc({formats:F_,defaultWidth:"full"}),dateTime:Tc({formats:W_,defaultWidth:"full"})},H_={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},U_={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},Y_=(e,t,r,n)=>t.getHours()!==1?U_[e]:H_[e],q_={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},Z_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},G_={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},K_={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},Q_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},X_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},J_={ordinalNumber:(e,t)=>Number(e)+"º",era:Fo({values:q_,defaultWidth:"wide"}),quarter:Fo({values:Z_,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Fo({values:G_,defaultWidth:"wide"}),day:Fo({values:K_,defaultWidth:"wide"}),dayPeriod:Fo({values:Q_,defaultWidth:"wide",formattingValues:X_,defaultFormattingWidth:"wide"})},ew=/^(\d+)(º)?/i,tw=/\d+/i,rw={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},nw={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},ow={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},sw={any:[/1/i,/2/i,/3/i,/4/i]},iw={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},aw={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},cw={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},lw={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},uw={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},dw={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},fw={ordinalNumber:N_({matchPattern:ew,parsePattern:tw,valueCallback:function(e){return parseInt(e,10)}}),era:Wo({matchPatterns:rw,defaultMatchWidth:"wide",parsePatterns:nw,defaultParseWidth:"any"}),quarter:Wo({matchPatterns:ow,defaultMatchWidth:"wide",parsePatterns:sw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Wo({matchPatterns:iw,defaultMatchWidth:"wide",parsePatterns:aw,defaultParseWidth:"any"}),day:Wo({matchPatterns:cw,defaultMatchWidth:"wide",parsePatterns:lw,defaultParseWidth:"any"}),dayPeriod:Wo({matchPatterns:uw,defaultMatchWidth:"any",parsePatterns:dw,defaultParseWidth:"any"})},pw={code:"es",formatDistance:z_,formatLong:V_,formatRelative:Y_,localize:J_,match:fw,options:{weekStartsOn:1,firstWeekContainsDate:1}},hw=({notificacion:e,onAccept:t})=>{const{evento:r,tipo:n,leida:o}=e,s=n==="EventoCreado"||n==="EventoModificado",i=r?.fechaInicio?new Date(r.fechaInicio):new Date,a=r?.fechaFin?new Date(r.fechaFin):null,c=r?.nombreAnfitrion||"Usuario",l=e?.mensaje||"Sin título",d=f=>f.split(" ").map(h=>h[0]).join("").toUpperCase().substring(0,2);return u.jsxs(g.Box,{sx:{p:2,mb:1,bgcolor:"white",borderRadius:"4px",border:"1px solid #e0e0e0"},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"flex-start",mb:1.5},children:[u.jsx(g.Avatar,{sx:{bgcolor:"#F5A623",width:32,height:32,fontSize:"13px",mr:1.5,fontWeight:"bold"},children:d(c)}),u.jsx(g.Box,{children:u.jsxs(g.Typography,{sx:{fontSize:"13px",color:"#5f6368",lineHeight:1.2},children:[u.jsx("span",{style:{fontWeight:600},children:c}),u.jsxs("span",{children:[" ",l]})]})})]}),u.jsx(g.Divider,{sx:{mb:2,opacity:.5}}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:1},children:[u.jsx(D_,{sx:{fontSize:18,color:"#5f6368",mr:2}}),u.jsx(g.Typography,{sx:{fontSize:"13px",color:"#3c4043"},children:x.format(i,"EEEE, dd 'de' MMMM",{locale:pw})})]}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:2.5},children:[u.jsx(T_,{sx:{fontSize:18,color:"#5f6368",mr:2}}),u.jsxs(g.Typography,{sx:{fontSize:"13px",color:"#3c4043"},children:[x.format(i,"h:mm a")," - ",a?x.format(a,"h:mm a"):""]})]}),s&&!o&&u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"row",flexWrap:"nowrap",gap:1,mt:2,width:"100%"},children:[u.jsx(g.Button,{variant:"outlined",size:"small",startIcon:u.jsx(rp,{sx:{fontSize:"14px !important",mr:-.5}}),onClick:()=>t?.(e,"CONFIRMADA"),sx:{flex:1,borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"11px",color:"#1976D2",borderColor:"#1976D2",py:.5,minWidth:0,whiteSpace:"nowrap","& .MuiButton-startIcon":{mx:.5}},children:"Asistiré"}),u.jsx(g.Button,{variant:"outlined",size:"small",startIcon:u.jsx(Vr,{sx:{fontSize:"14px !important",mr:-.5}}),onClick:()=>t?.(e,"RECHAZADA"),sx:{flex:1,borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"11px",color:"#D32F2F",borderColor:"#D32F2F",py:.5,minWidth:0,whiteSpace:"nowrap","& .MuiButton-startIcon":{mx:.5}},children:"Rechazar"})]})]})},mw="https://qa2.crm.netcar.com.mx/hubs/invitaciones",gw=({userId:e,notifications:t,onAceppInvitacion:r})=>{const[n,o]=y.useState(t),[s,i]=y.useState(null);y.useEffect(()=>{o(t)},[t]);const a=y.useCallback(c=>{const l={notificacionID:Math.random(),titulo:"Nueva invitación a evento",mensaje:c.Descripcion,tipo:"EventoCreado",leida:!1,fechaCreacion:new Date().toISOString(),tiempoTranscurrido:"Ahora",url:`/eventos/${c.EventoID}`,iconoColor:"#E1D6FB",evento:{eventoID:c.EventoID,titulo:c.Titulo,fechaInicio:c.FechaInicio,ubicacion:"",nombreAnfitrion:""}};o(d=>[l,...d])},[]);return y.useEffect(()=>{if(!e)return;const c=new w_().withUrl(mw+`?userId=${e}`).withAutomaticReconnect().build();return c.start().then(()=>{c.on("NotificarInvitacionAEvento",a)}).catch(l=>console.error("Error SignalR:",l)),()=>{c.off("NotificarInvitacionAEvento"),c.stop()}},[e,a]),u.jsx(g.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:u.jsx(g.List,{disablePadding:!0,children:n.length===0?u.jsxs("div",{className:xe.emptyStateContainer,children:[u.jsx("img",{src:Uf,alt:"Todo en orden",className:xe.emptyStateImage}),u.jsx("h4",{className:xe.emptyStateTitle,children:"Todo en orden aquí"}),u.jsx("p",{className:xe.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):n.map(c=>u.jsx(hw,{notificacion:c,onAccept:r}))})})},vw=({onEventClick:e,upcomingEvents:t,leads30Days:r,leads90Days:n,disID:o,usrID:s,onAddEvent:i,googleCalendars:a,outlookCalendars:c,isLoadingCalendars:l,onToggleGoogle:d,onToggleOutlook:f,notifications:h,unreadCount:v,onAceppInvitacion:m})=>{const{session:p,sessionoutlook:b}=uc(),{enqueueSnackbar:w}=ws.useSnackbar(),C=N=>{const ce=new Date,fe={start:x.startOfDay(ce),end:x.endOfDay(ce)},$={start:N.fechaInicio,end:N.fechaFin};return Ud(fe,$)?"Hoy":x.isTomorrow(N.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(N.fechaInicio)},E={};t.forEach(N=>{const ce=C(N);E[ce]||(E[ce]=[]),E[ce].push(N)});const[S,_]=y.useState(!1),W=()=>{_(!S)},D=Pi(),A=Cc(),M=async()=>{if(!p?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await D.syncGoogleEvents(p?.userEmail,o,s),w("Eventos sincronizados con Google Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Google Calendar.",{variant:"error"})}finally{}},I=async()=>{if(!b?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await A.syncOutlookEvents(b?.userEmail,o,s),w("Eventos sincronizados con Outlook Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Outlook Calendar.",{variant:"error"})}finally{}},[U,G]=y.useState("events"),F=N=>{G(N)},[Y,oe]=y.useState(!0),V=()=>{oe(N=>!N)};return u.jsxs("div",{className:xe.sidebarContainer,children:[u.jsxs("div",{className:xe.leadsSection,children:[u.jsxs("div",{className:xe.leadCard,children:[u.jsx("div",{className:xe.leadIcon,children:u.jsx("img",{src:ef})}),u.jsxs("div",{className:xe.leadText,children:[u.jsx("div",{className:xe.leadDays,children:"+30 días sin atender"}),u.jsxs("div",{className:xe.leadCount,children:[r," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),u.jsxs("div",{className:xe.leadCard,children:[u.jsx("div",{className:xe.leadIcon,children:u.jsx("img",{src:ef})}),u.jsxs("div",{className:xe.leadText,children:[u.jsx("div",{className:xe.leadDays,children:"+90 días sin atender"}),u.jsxs("div",{className:xe.leadCount,children:[n," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),u.jsxs("div",{className:xe.eventsSection,children:[u.jsxs("div",{className:xe.tabsContainer,children:[u.jsx("button",{className:`${xe.tabButton} ${U==="events"?xe.activeTab:""}`,onClick:()=>F("events"),children:"Eventos"}),u.jsxs("button",{className:`${xe.tabButton} ${U==="alerts"?xe.activeTab:""}`,onClick:()=>F("alerts"),children:["Alertas",v>0&&u.jsx("span",{className:xe.alertBadge,children:v>99?"99+":v})]})]}),u.jsxs("div",{className:xe.eventsContainer,children:[U==="events"&&u.jsx(u.Fragment,{children:Object.keys(E).length>0?Object.entries(E).map(([N,ce])=>u.jsxs("div",{className:`${xe.eventGroup}`,children:[u.jsxs("div",{className:xe.eventGroupDate,children:[u.jsx("img",{src:f1,width:15})," ",N]}),ce.map(fe=>{const $=De(fe.color||"#ffcc00"),Q=$.toString(),Ce=$.clone().darken(15).toString(),me=new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"2-digit",hour12:!0});return u.jsxs("div",{className:xe.eventItem,style:{backgroundColor:Q,borderLeft:`4px solid ${Ce}`,display:"flex",alignItems:"center",padding:"10px",marginBottom:"8px",borderRadius:"4px",cursor:"pointer"},onClick:()=>e(fe),children:[u.jsxs("div",{className:xe.eventDetails,style:{flex:1},children:[u.jsx("div",{className:xe.eventTitle,style:{fontWeight:"500",fontSize:"12px",color:"#333"},children:fe.titulo.length>32?`${fe.titulo.substring(0,32)}...`:fe.titulo}),fe.nombreAnfitrion&&u.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"4px",color:"#555"},children:[u.jsx("img",{src:tf,width:16,style:{marginRight:"6px",opacity:.7}}),u.jsx("span",{style:{fontSize:"13px"},children:fe.nombreAnfitrion})]}),u.jsx("div",{className:xe.eventTime,style:{fontSize:"12px",marginTop:"4px",opacity:.7},children:`${me.format(fe.fechaInicio).toLowerCase()} - ${me.format(fe.fechaFin).toLowerCase()}`})]}),fe.link&&u.jsx("a",{onClick:we=>we.stopPropagation(),href:fe.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",padding:"4px"},children:u.jsx("img",{src:p1,alt:"Video",width:20,style:{opacity:.8}})})]},fe.eventoID)})]},N)):u.jsxs("div",{className:xe.emptyStateContainer,children:[u.jsx("img",{src:Uf,alt:"Todo en orden",className:xe.emptyStateImage}),u.jsx("h4",{className:xe.emptyStateTitle,children:"Tu agenda está despejada"}),u.jsx("p",{className:xe.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),u.jsxs("button",{className:xe.addEventButton,onClick:i,children:[u.jsx("img",{src:Fd}),"Agregar evento"]})]})}),U==="alerts"&&u.jsx(g.Box,{children:u.jsx(gw,{userId:s,notifications:h,onAceppInvitacion:m})})]})]}),u.jsxs("div",{className:xe.calendarsSection,children:[u.jsxs("button",{onClick:W,className:xe.collapsibleHeader,children:[u.jsxs("div",{className:xe.headerTitle,children:[u.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),u.jsx("span",{className:xe.calendarCount,children:"1"})]}),u.jsx(B2,{className:`${xe.chevronIcon} ${S?xe.collapsed:""}`})]}),u.jsxs("div",{className:`${xe.collapsibleContent} ${S?xe.hidden:""}`,children:[u.jsxs("button",{className:`${xe.calendarSelectButton} ${Y?xe.calendarSelected:""}`,onClick:V,style:{"--calendar-color":"#1976D2"},children:[u.jsx("div",{className:xe.customCheckIcon,children:u.jsx("div",{className:xe.circularCheckbox,children:u.jsx(ac,{size:16,className:xe.checkedIcon})})}),u.jsx(z2,{size:16,className:xe.calendarIcon}),u.jsx("span",{className:xe.calendarItemText,children:"Mi calendario"})]}),b.userEmail?u.jsxs("div",{className:xe.syncButton,onClick:I,children:[u.jsx("div",{className:xe.circularCheckbox,children:u.jsx(ac,{size:16,className:xe.checkedIcon})}),u.jsx("img",{src:Hf,width:20}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):u.jsx(Fx,{disID:o,usrID:s}),p?.userEmail?u.jsxs("div",{className:xe.syncButton,onClick:M,children:[u.jsx("div",{className:xe.circularCheckbox,children:u.jsx(ac,{size:16,className:xe.checkedIcon})}),u.jsx("img",{src:Vf,width:18}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):u.jsx(Bx,{disID:o,usrID:s}),b?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:xe.currentUserCalendarTitle,style:{marginTop:"10px"},children:b?.userEmail}),l?u.jsx(g.CircularProgress,{size:24}):c.length>0?u.jsx(g.List,{dense:!0,className:xe.calendarsList,children:c.map(N=>u.jsx(g.ListItem,{secondaryAction:u.jsx(g.Checkbox,{edge:"end",onChange:()=>f(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:u.jsx(g.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:xe.calendarItemText})},N.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]}),p?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:xe.currentUserCalendarTitle,style:{marginTop:"10px"},children:p?.userEmail}),l?u.jsx(g.CircularProgress,{size:24}):a.length>0?u.jsx(g.List,{dense:!0,className:xe.calendarsList,children:a.map(N=>u.jsx(g.ListItem,{secondaryAction:u.jsx(g.Checkbox,{edge:"end",onChange:()=>d(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:u.jsx(g.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:xe.calendarItemText})},N.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},Cn={dayCell:"_dayCell_xweup_1",dayCellContainer:"_dayCellContainer_xweup_23",dayNumber:"_dayNumber_xweup_55",dayNumberToday:"_dayNumberToday_xweup_69",notCurrentMonth:"_notCurrentMonth_xweup_91",CurrentDay:"_CurrentDay_xweup_129",eventsList:"_eventsList_xweup_137"};var Vo={},op;function yw(){if(op)return Vo;op=1;var e=Je();Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.default=void 0,o(y);var t=e(lt()),r=rt();function n(s){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(n=function(c){return c?a:i})(s)}function o(s,i){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var a=n(i);if(a&&a.has(s))return a.get(s);var c={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var f=l?Object.getOwnPropertyDescriptor(s,d):null;f&&(f.get||f.set)?Object.defineProperty(c,d,f):c[d]=s[d]}return c.default=s,a&&a.set(s,c),c}return Vo.default=(0,t.default)((0,r.jsx)("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google"),Vo}var bw=yw();const xw=Xe(bw);var Ho={},sp;function _w(){if(sp)return Ho;sp=1;var e=Je();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var t=e(lt()),r=rt();return Ho.default=(0,t.default)((0,r.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline"),Ho}var ww=_w();const Sw=Xe(ww),ip=46,Cw=22,Ew=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[Cn.dayCell,o?"":Cn.notCurrentMonth,Cn.CurrentDay].join(" ").trim(),l=y.useRef(null),[d,f]=y.useState(r.length),h=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});y.useLayoutEffect(()=>{const p=()=>{if(l.current){const b=l.current.clientHeight;let w=Math.floor(b/(ip+4));if(w<r.length){const C=Math.floor((b-Cw)/(ip+4));w=Math.max(0,C)}f(w)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const v=r.slice(0,d===0?1:d),m=r.length-(d===0?1:d);return u.jsxs("div",{className:`${c} ${Cn.dayCellContainer}`,onClick:()=>s?.(t),style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[u.jsx("div",{className:n?Cn.dayNumber:Cn.dayNumberToday,children:e}),u.jsxs("div",{className:Cn.eventsList,ref:l,style:{flex:1,display:"flex",flexDirection:"column",gap:"4px",padding:"0 4px 4px 4px",marginTop:"4px",overflow:"hidden"},children:[v.map(p=>{const b=p.color||"#D7EBFB",w=p.isGoogleEvent||p.isOutlookEvent;return u.jsxs(g.Box,{onClick:C=>{C.stopPropagation(),i?.(p)},sx:{backgroundColor:w?"#ffffff":p?.color,padding:"4px 8px",borderRadius:"6px",cursor:"pointer",display:"flex",flexDirection:"column",minHeight:"40px",maxHeight:"48px",position:"relative",overflow:"hidden",border:w?`1px solid ${De(b).setAlpha(.4).toRgbString()}`:"none","&:hover":{filter:"brightness(0.95)",boxShadow:"0px 2px 4px rgba(0,0,0,0.08)"}},children:[p.isGoogleEvent&&u.jsx(xw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#4285F4"}}),p.isOutlookEvent&&u.jsx(Sw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#0078D4"}}),u.jsx(g.Typography,{sx:{fontSize:"10px",lineHeight:"1",color:"#3C4043",pr:w?2:0,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word"},children:p.titulo}),u.jsx(g.Typography,{sx:{fontSize:"9px",color:"#70757a",mt:"auto",fontWeight:400},children:`${h.format(p.fechaInicio).toLowerCase()} - ${h.format(p.fechaFin).toLowerCase()}`})]},p.eventoID)}),m>0&&u.jsxs(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",color:"#1976D2",textAlign:"left",ml:1,mt:.5,cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:p=>{p.stopPropagation(),a(r,t)},children:["+",m," más"]})]})]})},ap={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Dw=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return u.jsx("div",{className:ap.weekDaysContainer,children:e.map(t=>u.jsx("div",{className:ap.weekDay,children:t},t))})},Ni={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function kw(e,t){const[r,n]=$_(e,t.start,t.end);return{start:r,end:n}}function Aw(e,t){const{start:r,end:n}=kw(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0);let a=1;const c=[];for(;+i<=s;)c.push(cc(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function Tw(e,t){const r=t?.weekStartsOn,n=sn(e,t?.in),o=n.getDay(),s=(o<r?-7:0)+6-(o-r);return n.setDate(n.getDate()+s),n.setHours(23,59,59,999),n}function Iw(e,t,r){const n=+sn(e,r?.in),[o,s]=[+sn(t.start,r?.in),+sn(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Mw=({currentDate:e,events:t,onDayClick:r,onEventClick:n,onSeeMoreClick:o})=>{const s=x.startOfMonth(e),i=x.endOfMonth(e),a=x.startOfWeek(s,{weekStartsOn:1}),c=Tw(i,{weekStartsOn:1}),l=Aw({start:a,end:c}),d={},f=l.length/7,h=`${Ni.daysContainer} ${f===5?Ni.rows5:Ni.rows6}`;return t.forEach(v=>{const m=x.format(v.fechaInicio,"yyyy-MM-dd");d[m]||(d[m]=[]),d[m].push(v)}),u.jsxs("div",{className:Ni.calendarGridContainer,children:[u.jsx(Dw,{}),u.jsx("div",{className:h,children:l.map(v=>{const m=t.filter(p=>Iw(v,{start:x.startOfDay(p.fechaInicio),end:x.endOfDay(p.fechaFin)}));return u.jsx(Ew,{dayNumber:v.getDate(),date:v,events:m,isToday:x.isToday(v),isCurrentMonth:x.isSameMonth(v,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},v.toISOString())})})]})},Ic=()=>{const{calendarApiUrl:e}=Sc(),t=async v=>{try{return(await Et.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${v}`)).data.map(p=>{const b=new Date(p.fechaInicio),w=new Date(p.fechaFin),C=p.solicitudRelacionada?.[0]?.nombreCliente??null;return{...p,fechaInicio:b,fechaFin:w,client:C}})}catch(m){return console.error("Error events:",m),[]}},r=async(v,m)=>{try{const p=await Et.post(`${e}/api/Calendario/v1/local/InsertarEvento/${m}`,v);return{...p.data,fechaInicio:new Date(p.data.fechaInicio),fechaFin:new Date(p.data.fechaFin)}}catch(p){throw console.log("Error creating event:",p),p}},n=async v=>{try{const m=await Et.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${v.eventoID}`,v);return{eventoID:m.data.eventoID,titulo:m.data.titulo,descripcion:m.data.descripcion,fechaInicio:new Date(m.data.fechaInicio),fechaFin:new Date(m.data.fechaFin),todoElDia:m.data.todoElDia,color:m.data.color,repetir:m.data.repetir,link:m.data.link,solID:m.data.solID,disID:m.data.disID,client:m.data.client}}catch(m){throw console.log("Error updating event:",m),m}},o=async v=>{try{const m=await Et.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${v}`),p=m.data[0].solicitudRelacionada?.[0]?.nombreCliente||null;return{...m.data[0],fechaInicio:m.data[0].fechaInicio,fechaFin:m.data[0].fechaFin,client:p}}catch(m){throw console.error(`Error fetching event with ID ${v}:`,m),m}},s=async v=>{try{await Et.post(`${e}/api/Calendario/v1/local/EliminarEvento/${v}`)}catch(m){throw console.log(`Error ID ${v}:`,m),m}},i=y.useCallback(async(v,m,p,b)=>{try{const w={masNombreBD:p,usrID:b,disID:m,nombreCliente:v},E=(await Et.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,w)).data?.data;return Array.isArray(E)?E.map(S=>({clienteID:S.clienteID,solID:S.solID,marca:S?.marca,modelo:S?.modelo,nombreCliente:S?.nombreCliente})):[]}catch(w){return console.error("Error clientes:",w),[]}},[e]),a=y.useCallback(async(v,m)=>{try{const p={disID:v,usrMail:m},w=(await Et.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,p)).data?.data;return Array.isArray(w)?w.map(C=>({usrID:C.usrID,usrNombre:C.usrNombre,usrMail:C?.usrMail,disID:C?.disID})):[]}catch(p){return console.error("Error usuarios:",p),[]}},[e]),c=async(v,m,p,b,w)=>{const C={tieneConflicto:!1,usrMail:""};try{const E={disID:v,usrMail:m,startDate:p,horaInicio:b,horaFin:w};return(await Et.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,E)).data?.data}catch(E){return console.error("Error al verificar conflicto:",E),C}},l=y.useCallback(async(v,m,p,b)=>{try{const w={disID:v,usrMail:m,startDate:p,DuracionEvento:b},E=(await Et.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,w)).data?.data;return Array.isArray(E)?E.map(S=>({Fecha:S.fecha,HoraInicio:S.horaInicio,HoraFin:S.horaFin})):[]}catch(w){return console.error("Error usuarios:",w),[]}},[e]),d=y.useCallback(async(v,m=!1)=>{try{const p=await Et.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${v}?soloNoLeidas=${m}`);return console.log("response.data",p.data),p.data}catch(p){return console.error("Error usuarios:",p),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:l,getNotificacionesXUsuario:d,UpdateStatusEvento:async(v,m,p)=>{try{const b={EventoID:v,UsuarioID:m,status:p};return(await Et.post(`${e}/api/Calendario/v1/local/ActualizarEstadoInvitacionAsync/`,b)).data}catch(b){return console.error("Error Actualizar estatus:",b),{}}},MarcarLeido:async(v,m)=>{try{return(await Et.post(`${e}/api/Notificaciones/v1/local/MarcarComoLeidaAsync/${v}?usuarioId=${m}&marcarComoLeida=true`)).data?.data}catch(p){return console.error("Error Actualizar estatus:",p),{}}}}};var Uo={},cp;function Pw(){if(cp)return Uo;cp=1;var e=Je();Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=void 0;var t=e(lt()),r=rt();return Uo.default=(0,t.default)([(0,r.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"),(0,r.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),Uo}var Ow=Pw();const Mc=Xe(Ow);var Yo=e=>e.type==="checkbox",En=e=>e instanceof Date,rr=e=>e==null;const lp=e=>typeof e=="object";var Nt=e=>!rr(e)&&!Array.isArray(e)&&lp(e)&&!En(e),up=e=>Nt(e)&&e.target?Yo(e.target)?e.target.checked:e.target.value:e,jw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dp=(e,t)=>e.has(jw(t)),Rw=e=>{const t=e.constructor&&e.constructor.prototype;return Nt(t)&&t.hasOwnProperty("isPrototypeOf")},Pc=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Vt(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Pc&&(e instanceof Blob||n))&&(r||Nt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Rw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Vt(e[o]));else return e;return t}var $i=e=>/^\w*$/.test(e),$t=e=>e===void 0,Oc=e=>Array.isArray(e)?e.filter(Boolean):[],jc=e=>Oc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),he=(e,t,r)=>{if(!t||!Nt(e))return r;const n=($i(t)?[t]:jc(t)).reduce((o,s)=>rr(o)?o:o[s],e);return $t(n)||n===e?$t(e[t])?r:e[t]:n},pr=e=>typeof e=="boolean",ut=(e,t,r)=>{let n=-1;const o=$i(t)?[t]:jc(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const l=e[a];c=Nt(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const Li={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Tr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Rc=y.createContext(null);Rc.displayName="HookFormContext";const Nc=()=>y.useContext(Rc),Nw=e=>{const{children:t,...r}=e;return y.createElement(Rc.Provider,{value:r},t)};var fp=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Tr.all&&(t._proxyFormState[i]=!n||Tr.all),r&&(r[i]=!0),e[i]}});return o};const $c=typeof window<"u"?y.useLayoutEffect:y.useEffect;function $w(e){const t=Nc(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[i,a]=y.useState(r._formState),c=y.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return $c(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:l=>{!n&&a({...r._formState,...l})}}),[o,n,s]),y.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),y.useMemo(()=>fp(i,r,c.current,!1),[i,r])}var Hr=e=>typeof e=="string",pp=(e,t,r,n,o)=>Hr(e)?(n&&t.watch.add(e),he(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),he(r,s))):(n&&(t.watchAll=!0),r),Lc=e=>rr(e)||!lp(e);function Xr(e,t,r=new WeakSet){if(Lc(e)||Lc(t))return e===t;if(En(e)&&En(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(En(i)&&En(a)||Nt(i)&&Nt(a)||Array.isArray(i)&&Array.isArray(a)?!Xr(i,a,r):i!==a)return!1}}return!0}function hp(e){const t=Nc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=y.useRef(o),l=y.useRef(a),d=y.useRef(void 0);l.current=a;const f=y.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,v]=y.useState(l.current?l.current(f):f);return $c(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:m=>{if(!s){const p=pp(n,r._names,m.values||r._formValues,!1,c.current);if(l.current){const b=l.current(p);Xr(b,d.current)||(v(b),d.current=b)}else v(p)}}}),[r,s,n,i]),y.useEffect(()=>r._removeUnmounted()),h}function Lw(e){const t=Nc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=dp(o._names.array,r),c=y.useMemo(()=>he(o._formValues,r,he(o._defaultValues,r,i)),[o,r,i]),l=hp({control:o,name:r,defaultValue:c,exact:!0}),d=$w({control:o,name:r,exact:!0}),f=y.useRef(e),h=y.useRef(o.register(r,{...e.rules,value:l,...pr(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const v=y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!he(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!he(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!he(d.validatingFields,r)},error:{enumerable:!0,get:()=>he(d.errors,r)}}),[d,r]),m=y.useCallback(C=>h.current.onChange({target:{value:up(C),name:r},type:Li.CHANGE}),[r]),p=y.useCallback(()=>h.current.onBlur({target:{value:he(o._formValues,r),name:r},type:Li.BLUR}),[r,o._formValues]),b=y.useCallback(C=>{const E=he(o._fields,r);E&&C&&(E._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:S=>C.setCustomValidity(S),reportValidity:()=>C.reportValidity()})},[o._fields,r]),w=y.useMemo(()=>({name:r,value:l,...pr(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:m,onBlur:p,ref:b}),[r,n,d.disabled,m,p,b,l]);return y.useEffect(()=>{const C=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...pr(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(S,_)=>{const W=he(o._fields,S);W&&W._f&&(W._f.mount=_)};if(E(r,!0),C){const S=Vt(he(o._options.defaultValues,r));ut(o._defaultValues,r,S),$t(he(o._formValues,r))&&ut(o._formValues,r,S)}return!a&&o.register(r),()=>{(a?C&&!o._state.action:C)?o.unregister(r):E(r,!1)}},[r,o,a,s]),y.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),y.useMemo(()=>({field:w,formState:d,fieldState:v}),[w,d,v])}const hr=e=>e.render(Lw(e));var zc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},qo=e=>Array.isArray(e)?e:[e],mp=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},ir=e=>Nt(e)&&!Object.keys(e).length,Bc=e=>e.type==="file",Ir=e=>typeof e=="function",zi=e=>{if(!Pc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},gp=e=>e.type==="select-multiple",Fc=e=>e.type==="radio",zw=e=>Fc(e)||Yo(e),Wc=e=>zi(e)&&e.isConnected;function Bw(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=$t(e)?n++:e[t[n++]];return e}function Fw(e){for(const t in e)if(e.hasOwnProperty(t)&&!$t(e[t]))return!1;return!0}function Ft(e,t){const r=Array.isArray(t)?t:$i(t)?[t]:jc(t),n=r.length===1?e:Bw(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(Nt(n)&&ir(n)||Array.isArray(n)&&Fw(n))&&Ft(e,r.slice(0,-1)),e}var vp=e=>{for(const t in e)if(Ir(e[t]))return!0;return!1};function Bi(e,t={}){const r=Array.isArray(e);if(Nt(e)||r)for(const n in e)Array.isArray(e[n])||Nt(e[n])&&!vp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Bi(e[n],t[n])):rr(e[n])||(t[n]=!0);return t}function yp(e,t,r){const n=Array.isArray(e);if(Nt(e)||n)for(const o in e)Array.isArray(e[o])||Nt(e[o])&&!vp(e[o])?$t(t)||Lc(r[o])?r[o]=Array.isArray(e[o])?Bi(e[o],[]):{...Bi(e[o])}:yp(e[o],rr(t)?{}:t[o],r[o]):r[o]=!Xr(e[o],t[o]);return r}var Zo=(e,t)=>yp(e,t,Bi(t));const bp={value:!1,isValid:!1},xp={value:!0,isValid:!0};var _p=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?xp:{value:e[0].value,isValid:!0}:xp:bp}return bp},wp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>$t(e)?e:t?e===""?NaN:e&&+e:r&&Hr(e)?new Date(e):n?n(e):e;const Sp={isValid:!1,value:null};var Cp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Sp):Sp;function Ep(e){const t=e.ref;return Bc(t)?t.files:Fc(t)?Cp(e.refs).value:gp(t)?[...t.selectedOptions].map(({value:r})=>r):Yo(t)?_p(e.refs).value:wp($t(t.value)?e.ref.value:t.value,e)}var Ww=(e,t,r,n)=>{const o={};for(const s of e){const i=he(t,s);i&&ut(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Fi=e=>e instanceof RegExp,Go=e=>$t(e)?e:Fi(e)?e.source:Nt(e)?Fi(e.value)?e.value.source:e.value:e,Dp=e=>({isOnSubmit:!e||e===Tr.onSubmit,isOnBlur:e===Tr.onBlur,isOnChange:e===Tr.onChange,isOnAll:e===Tr.all,isOnTouch:e===Tr.onTouched});const kp="AsyncFunction";var Vw=e=>!!e&&!!e.validate&&!!(Ir(e.validate)&&e.validate.constructor.name===kp||Nt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===kp)),Hw=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ap=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Ko=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=he(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Ko(a,t))break}else if(Nt(a)&&Ko(a,t))break}}};function Tp(e,t,r){const n=he(e,r);if(n||$i(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=he(t,s),a=he(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var Uw=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return ir(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Tr.all))},Yw=(e,t,r)=>!e||!t||e===t||qo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),qw=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Zw=(e,t)=>!Oc(he(e,t)).length&&Ft(e,t),Gw=(e,t,r)=>{const n=qo(he(e,r));return ut(n,"root",t[r]),ut(e,r,n),e},Wi=e=>Hr(e);function Ip(e,t,r="validate"){if(Wi(e)||Array.isArray(e)&&e.every(Wi)||pr(e)&&!e)return{type:r,message:Wi(e)?e:"",ref:t}}var Gn=e=>Nt(e)&&!Fi(e)?e:{value:e,message:""},Mp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:l,minLength:d,min:f,max:h,pattern:v,validate:m,name:p,valueAsNumber:b,mount:w}=e._f,C=he(r,p);if(!w||t.has(p))return{};const E=a?a[0]:i,S=G=>{o&&E.reportValidity&&(E.setCustomValidity(pr(G)?"":G||""),E.reportValidity())},_={},W=Fc(i),D=Yo(i),A=W||D,M=(b||Bc(i))&&$t(i.value)&&$t(C)||zi(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,I=zc.bind(null,p,n,_),U=(G,F,Y,oe=Qr.maxLength,V=Qr.minLength)=>{const N=G?F:Y;_[p]={type:G?oe:V,message:N,ref:i,...I(G?oe:V,N)}};if(s?!Array.isArray(C)||!C.length:c&&(!A&&(M||rr(C))||pr(C)&&!C||D&&!_p(a).isValid||W&&!Cp(a).isValid)){const{value:G,message:F}=Wi(c)?{value:!!c,message:c}:Gn(c);if(G&&(_[p]={type:Qr.required,message:F,ref:E,...I(Qr.required,F)},!n))return S(F),_}if(!M&&(!rr(f)||!rr(h))){let G,F;const Y=Gn(h),oe=Gn(f);if(!rr(C)&&!isNaN(C)){const V=i.valueAsNumber||C&&+C;rr(Y.value)||(G=V>Y.value),rr(oe.value)||(F=V<oe.value)}else{const V=i.valueAsDate||new Date(C),N=$=>new Date(new Date().toDateString()+" "+$),ce=i.type=="time",fe=i.type=="week";Hr(Y.value)&&C&&(G=ce?N(C)>N(Y.value):fe?C>Y.value:V>new Date(Y.value)),Hr(oe.value)&&C&&(F=ce?N(C)<N(oe.value):fe?C<oe.value:V<new Date(oe.value))}if((G||F)&&(U(!!G,Y.message,oe.message,Qr.max,Qr.min),!n))return S(_[p].message),_}if((l||d)&&!M&&(Hr(C)||s&&Array.isArray(C))){const G=Gn(l),F=Gn(d),Y=!rr(G.value)&&C.length>+G.value,oe=!rr(F.value)&&C.length<+F.value;if((Y||oe)&&(U(Y,G.message,F.message),!n))return S(_[p].message),_}if(v&&!M&&Hr(C)){const{value:G,message:F}=Gn(v);if(Fi(G)&&!C.match(G)&&(_[p]={type:Qr.pattern,message:F,ref:i,...I(Qr.pattern,F)},!n))return S(F),_}if(m){if(Ir(m)){const G=await m(C,r),F=Ip(G,E);if(F&&(_[p]={...F,...I(Qr.validate,F.message)},!n))return S(F.message),_}else if(Nt(m)){let G={};for(const F in m){if(!ir(G)&&!n)break;const Y=Ip(await m[F](C,r),E,F);Y&&(G={...Y,...I(F,Y.message)},S(Y.message),n&&(_[p]=G))}if(!ir(G)&&(_[p]={ref:E,...G},!n))return _}}return S(!0),_};const Kw={mode:Tr.onSubmit,reValidateMode:Tr.onChange,shouldFocusError:!0};function Qw(e={}){let t={...Kw,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ir(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Nt(t.defaultValues)||Nt(t.values)?Vt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Vt(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:mp(),state:mp()},v=t.criteriaMode===Tr.all,m=k=>P=>{clearTimeout(l),l=setTimeout(k,P)},p=async k=>{if(!t.disabled&&(d.isValid||f.isValid||k)){const P=t.resolver?ir((await D()).errors):await M(n,!0);P!==r.isValid&&h.state.next({isValid:P})}},b=(k,P)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((k||Array.from(a.mount)).forEach(B=>{B&&(P?ut(r.validatingFields,B,P):Ft(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!ir(r.validatingFields)}))},w=(k,P=[],B,ue,se=!0,O=!0)=>{if(ue&&B&&!t.disabled){if(i.action=!0,O&&Array.isArray(he(n,k))){const ne=B(he(n,k),ue.argA,ue.argB);se&&ut(n,k,ne)}if(O&&Array.isArray(he(r.errors,k))){const ne=B(he(r.errors,k),ue.argA,ue.argB);se&&ut(r.errors,k,ne),Zw(r.errors,k)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(he(r.touchedFields,k))){const ne=B(he(r.touchedFields,k),ue.argA,ue.argB);se&&ut(r.touchedFields,k,ne)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Zo(o,s)),h.state.next({name:k,isDirty:U(k,P),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ut(s,k,P)},C=(k,P)=>{ut(r.errors,k,P),h.state.next({errors:r.errors})},E=k=>{r.errors=k,h.state.next({errors:r.errors,isValid:!1})},S=(k,P,B,ue)=>{const se=he(n,k);if(se){const O=he(s,k,$t(B)?he(o,k):B);$t(O)||ue&&ue.defaultChecked||P?ut(s,k,P?O:Ep(se._f)):Y(k,O),i.mount&&p()}},_=(k,P,B,ue,se)=>{let O=!1,ne=!1;const Se={name:k};if(!t.disabled){if(!B||ue){(d.isDirty||f.isDirty)&&(ne=r.isDirty,r.isDirty=Se.isDirty=U(),O=ne!==Se.isDirty);const Oe=Xr(he(o,k),P);ne=!!he(r.dirtyFields,k),Oe?Ft(r.dirtyFields,k):ut(r.dirtyFields,k,!0),Se.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&ne!==!Oe}if(B){const Oe=he(r.touchedFields,k);Oe||(ut(r.touchedFields,k,B),Se.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&Oe!==B)}O&&se&&h.state.next(Se)}return O?Se:{}},W=(k,P,B,ue)=>{const se=he(r.errors,k),O=(d.isValid||f.isValid)&&pr(P)&&r.isValid!==P;if(t.delayError&&B?(c=m(()=>C(k,B)),c(t.delayError)):(clearTimeout(l),c=null,B?ut(r.errors,k,B):Ft(r.errors,k)),(B?!Xr(se,B):se)||!ir(ue)||O){const ne={...ue,...O&&pr(P)?{isValid:P}:{},errors:r.errors,name:k};r={...r,...ne},h.state.next(ne)}},D=async k=>{b(k,!0);const P=await t.resolver(s,t.context,Ww(k||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(k),P},A=async k=>{const{errors:P}=await D(k);if(k)for(const B of k){const ue=he(P,B);ue?ut(r.errors,B,ue):Ft(r.errors,B)}else r.errors=P;return P},M=async(k,P,B={valid:!0})=>{for(const ue in k){const se=k[ue];if(se){const{_f:O,...ne}=se;if(O){const Se=a.array.has(O.name),Oe=se._f&&Vw(se._f);Oe&&d.validatingFields&&b([ue],!0);const R=await Mp(se,a.disabled,s,v,t.shouldUseNativeValidation&&!P,Se);if(Oe&&d.validatingFields&&b([ue]),R[O.name]&&(B.valid=!1,P))break;!P&&(he(R,O.name)?Se?Gw(r.errors,R,O.name):ut(r.errors,O.name,R[O.name]):Ft(r.errors,O.name))}!ir(ne)&&await M(ne,P,B)}}return B.valid},I=()=>{for(const k of a.unMount){const P=he(n,k);P&&(P._f.refs?P._f.refs.every(B=>!Wc(B)):!Wc(P._f.ref))&&le(k)}a.unMount=new Set},U=(k,P)=>!t.disabled&&(k&&P&&ut(s,k,P),!Xr($(),o)),G=(k,P,B)=>pp(k,a,{...i.mount?s:$t(P)?o:Hr(k)?{[k]:P}:P},B,P),F=k=>Oc(he(i.mount?s:o,k,t.shouldUnregister?he(o,k,[]):[])),Y=(k,P,B={})=>{const ue=he(n,k);let se=P;if(ue){const O=ue._f;O&&(!O.disabled&&ut(s,k,wp(P,O)),se=zi(O.ref)&&rr(P)?"":P,gp(O.ref)?[...O.ref.options].forEach(ne=>ne.selected=se.includes(ne.value)):O.refs?Yo(O.ref)?O.refs.forEach(ne=>{(!ne.defaultChecked||!ne.disabled)&&(Array.isArray(se)?ne.checked=!!se.find(Se=>Se===ne.value):ne.checked=se===ne.value||!!se)}):O.refs.forEach(ne=>ne.checked=ne.value===se):Bc(O.ref)?O.ref.value="":(O.ref.value=se,O.ref.type||h.state.next({name:k,values:Vt(s)})))}(B.shouldDirty||B.shouldTouch)&&_(k,se,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&fe(k)},oe=(k,P,B)=>{for(const ue in P){if(!P.hasOwnProperty(ue))return;const se=P[ue],O=k+"."+ue,ne=he(n,O);(a.array.has(k)||Nt(se)||ne&&!ne._f)&&!En(se)?oe(O,se,B):Y(O,se,B)}},V=(k,P,B={})=>{const ue=he(n,k),se=a.array.has(k),O=Vt(P);ut(s,k,O),se?(h.array.next({name:k,values:Vt(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&B.shouldDirty&&h.state.next({name:k,dirtyFields:Zo(o,s),isDirty:U(k,O)})):ue&&!ue._f&&!rr(O)?oe(k,O,B):Y(k,O,B),Ap(k,a)&&h.state.next({...r,name:k}),h.state.next({name:i.mount?k:void 0,values:Vt(s)})},N=async k=>{i.mount=!0;const P=k.target;let B=P.name,ue=!0;const se=he(n,B),O=Oe=>{ue=Number.isNaN(Oe)||En(Oe)&&isNaN(Oe.getTime())||Xr(Oe,he(s,B,Oe))},ne=Dp(t.mode),Se=Dp(t.reValidateMode);if(se){let Oe,R;const te=P.type?Ep(se._f):up(k),_e=k.type===Li.BLUR||k.type===Li.FOCUS_OUT,Ge=!Hw(se._f)&&!t.resolver&&!he(r.errors,B)&&!se._f.deps||qw(_e,he(r.touchedFields,B),r.isSubmitted,Se,ne),q=Ap(B,a,_e);ut(s,B,te),_e?(!P||!P.readOnly)&&(se._f.onBlur&&se._f.onBlur(k),c&&c(0)):se._f.onChange&&se._f.onChange(k);const de=_(B,te,_e),Ee=!ir(de)||q;if(!_e&&h.state.next({name:B,type:k.type,values:Vt(s)}),Ge)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?_e&&p():_e||p()),Ee&&h.state.next({name:B,...q?{}:de});if(!_e&&q&&h.state.next({...r}),t.resolver){const{errors:Ae}=await D([B]);if(O(te),ue){const Fe=Tp(r.errors,n,B),X=Tp(Ae,n,Fe.name||B);Oe=X.error,B=X.name,R=ir(Ae)}}else b([B],!0),Oe=(await Mp(se,a.disabled,s,v,t.shouldUseNativeValidation))[B],b([B]),O(te),ue&&(Oe?R=!1:(d.isValid||f.isValid)&&(R=await M(n,!0)));ue&&(se._f.deps&&fe(se._f.deps),W(B,R,Oe,de))}},ce=(k,P)=>{if(he(r.errors,P)&&k.focus)return k.focus(),1},fe=async(k,P={})=>{let B,ue;const se=qo(k);if(t.resolver){const O=await A($t(k)?k:se);B=ir(O),ue=k?!se.some(ne=>he(O,ne)):B}else k?(ue=(await Promise.all(se.map(async O=>{const ne=he(n,O);return await M(ne&&ne._f?{[O]:ne}:ne)}))).every(Boolean),!(!ue&&!r.isValid)&&p()):ue=B=await M(n);return h.state.next({...!Hr(k)||(d.isValid||f.isValid)&&B!==r.isValid?{}:{name:k},...t.resolver||!k?{isValid:B}:{},errors:r.errors}),P.shouldFocus&&!ue&&Ko(n,ce,k?se:a.mount),ue},$=k=>{const P={...i.mount?s:o};return $t(k)?P:Hr(k)?he(P,k):k.map(B=>he(P,B))},Q=(k,P)=>({invalid:!!he((P||r).errors,k),isDirty:!!he((P||r).dirtyFields,k),error:he((P||r).errors,k),isValidating:!!he(r.validatingFields,k),isTouched:!!he((P||r).touchedFields,k)}),Ce=k=>{k&&qo(k).forEach(P=>Ft(r.errors,P)),h.state.next({errors:k?r.errors:{}})},me=(k,P,B)=>{const ue=(he(n,k,{_f:{}})._f||{}).ref,se=he(r.errors,k)||{},{ref:O,message:ne,type:Se,...Oe}=se;ut(r.errors,k,{...Oe,...P,ref:ue}),h.state.next({name:k,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&ue&&ue.focus&&ue.focus()},we=(k,P)=>Ir(k)?h.state.subscribe({next:B=>"values"in B&&k(G(void 0,P),B)}):G(k,P,!0),ae=k=>h.state.subscribe({next:P=>{Yw(k.name,P.name,k.exact)&&Uw(P,k.formState||d,Be,k.reRenderRoot)&&k.callback({values:{...s},...r,...P,defaultValues:o})}}).unsubscribe,ee=k=>(i.mount=!0,f={...f,...k.formState},ae({...k,formState:f})),le=(k,P={})=>{for(const B of k?qo(k):a.mount)a.mount.delete(B),a.array.delete(B),P.keepValue||(Ft(n,B),Ft(s,B)),!P.keepError&&Ft(r.errors,B),!P.keepDirty&&Ft(r.dirtyFields,B),!P.keepTouched&&Ft(r.touchedFields,B),!P.keepIsValidating&&Ft(r.validatingFields,B),!t.shouldUnregister&&!P.keepDefaultValue&&Ft(o,B);h.state.next({values:Vt(s)}),h.state.next({...r,...P.keepDirty?{isDirty:U()}:{}}),!P.keepIsValid&&p()},ge=({disabled:k,name:P})=>{(pr(k)&&i.mount||k||a.disabled.has(P))&&(k?a.disabled.add(P):a.disabled.delete(P))},ie=(k,P={})=>{let B=he(n,k);const ue=pr(P.disabled)||pr(t.disabled);return ut(n,k,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),B?ge({disabled:pr(P.disabled)?P.disabled:t.disabled,name:k}):S(k,!0,P.value),{...ue?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:Go(P.min),max:Go(P.max),minLength:Go(P.minLength),maxLength:Go(P.maxLength),pattern:Go(P.pattern)}:{},name:k,onChange:N,onBlur:N,ref:se=>{if(se){ie(k,P),B=he(n,k);const O=$t(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,ne=zw(O),Se=B._f.refs||[];if(ne?Se.find(Oe=>Oe===O):O===B._f.ref)return;ut(n,k,{_f:{...B._f,...ne?{refs:[...Se.filter(Wc),O,...Array.isArray(he(o,k))?[{}]:[]],ref:{type:O.type,name:k}}:{ref:O}}}),S(k,!1,void 0,O)}else B=he(n,k,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(dp(a.array,k)&&i.action)&&a.unMount.add(k)}}},pe=()=>t.shouldFocusError&&Ko(n,ce,a.mount),Re=k=>{pr(k)&&(h.state.next({disabled:k}),Ko(n,(P,B)=>{const ue=he(n,B);ue&&(P.disabled=ue._f.disabled||k,Array.isArray(ue._f.refs)&&ue._f.refs.forEach(se=>{se.disabled=ue._f.disabled||k}))},0,!1))},j=(k,P)=>async B=>{let ue;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let se=Vt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:ne}=await D();r.errors=O,se=Vt(ne)}else await M(n);if(a.disabled.size)for(const O of a.disabled)Ft(se,O);if(Ft(r.errors,"root"),ir(r.errors)){h.state.next({errors:{}});try{await k(se,B)}catch(O){ue=O}}else P&&await P({...r.errors},B),pe(),setTimeout(pe);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ir(r.errors)&&!ue,submitCount:r.submitCount+1,errors:r.errors}),ue)throw ue},We=(k,P={})=>{he(n,k)&&($t(P.defaultValue)?V(k,Vt(he(o,k))):(V(k,P.defaultValue),ut(o,k,Vt(P.defaultValue))),P.keepTouched||Ft(r.touchedFields,k),P.keepDirty||(Ft(r.dirtyFields,k),r.isDirty=P.defaultValue?U(k,Vt(he(o,k))):U()),P.keepError||(Ft(r.errors,k),d.isValid&&p()),h.state.next({...r}))},qe=(k,P={})=>{const B=k?Vt(k):o,ue=Vt(B),se=ir(k),O=se?o:ue;if(P.keepDefaultValues||(o=B),!P.keepValues){if(P.keepDirtyValues){const ne=new Set([...a.mount,...Object.keys(Zo(o,s))]);for(const Se of Array.from(ne))he(r.dirtyFields,Se)?ut(O,Se,he(s,Se)):V(Se,he(O,Se))}else{if(Pc&&$t(k))for(const ne of a.mount){const Se=he(n,ne);if(Se&&Se._f){const Oe=Array.isArray(Se._f.refs)?Se._f.refs[0]:Se._f.ref;if(zi(Oe)){const R=Oe.closest("form");if(R){R.reset();break}}}}if(P.keepFieldsRef)for(const ne of a.mount)V(ne,he(O,ne));else n={}}s=t.shouldUnregister?P.keepDefaultValues?Vt(o):{}:Vt(O),h.array.next({values:{...O}}),h.state.next({values:{...O}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!t.shouldUnregister,h.state.next({submitCount:P.keepSubmitCount?r.submitCount:0,isDirty:se?!1:P.keepDirty?r.isDirty:!!(P.keepDefaultValues&&!Xr(k,o)),isSubmitted:P.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Zo(o,s):r.dirtyFields:P.keepDefaultValues&&k?Zo(o,k):P.keepDirty?r.dirtyFields:{},touchedFields:P.keepTouched?r.touchedFields:{},errors:P.keepErrors?r.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ze=(k,P)=>qe(Ir(k)?k(s):k,P),Ne=(k,P={})=>{const B=he(n,k),ue=B&&B._f;if(ue){const se=ue.refs?ue.refs[0]:ue.ref;se.focus&&(se.focus(),P.shouldSelect&&Ir(se.select)&&se.select())}},Be=k=>{r={...r,...k}},ht={control:{register:ie,unregister:le,getFieldState:Q,handleSubmit:j,setError:me,_subscribe:ae,_runSchema:D,_focusError:pe,_getWatch:G,_getDirty:U,_setValid:p,_setFieldArray:w,_setDisabledField:ge,_setErrors:E,_getFieldArray:F,_reset:qe,_resetDefaultValues:()=>Ir(t.defaultValues)&&t.defaultValues().then(k=>{Ze(k,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Re,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(k){i=k},get _defaultValues(){return o},get _names(){return a},set _names(k){a=k},get _formState(){return r},get _options(){return t},set _options(k){t={...t,...k}}},subscribe:ee,trigger:fe,register:ie,handleSubmit:j,watch:we,setValue:V,getValues:$,reset:Ze,resetField:We,clearErrors:Ce,unregister:le,setError:me,setFocus:Ne,getFieldState:Q};return{...ht,formControl:ht}}function Pp(e={}){const t=y.useRef(void 0),r=y.useRef(void 0),[n,o]=y.useState({isDirty:!1,isValidating:!1,isLoading:Ir(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:Ir(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ir(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Qw(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,$c(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),y.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),y.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),y.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),y.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),y.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),y.useEffect(()=>{e.values&&!Xr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),r.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[s,e.values]),y.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=fp(n,s),t.current}const Op=(e,t,r)=>{if(e&&"reportValidity"in e){const n=he(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Vc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Op(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Op(o,r,e))}},jp=(e,t)=>{t.shouldUseNativeValidation&&Vc(e,t);const r={};for(const n in e){const o=he(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(Xw(t.names||Object.keys(e),n)){const i=Object.assign({},he(r,n));ut(i,"root",s),ut(r,n,i)}else ut(r,n,s)}return r},Xw=(e,t)=>{const r=Rp(t);return e.some(n=>Rp(n).match(`^${r}\\.\\d+`))};function Rp(e){return e.replace(/\]|\[/g,"")}function Z(e,t,r){function n(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(e),t(a,c);for(const d in i.prototype)d in a||Object.defineProperty(a,d,{value:i.prototype[d].bind(a)});a._zod.constr=i,a._zod.def=c}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const l=r?.Parent?new s:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Kn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Np extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $p={};function Dn(e){return $p}function Jw(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Hc(e,t){return typeof t=="bigint"?t.toString():t}function Uc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Yc(e){return e==null}function qc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function eS(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=r>o?r:o,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}const Lp=Symbol("evaluating");function gt(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Lp)return n===void 0&&(n=Lp,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function tS(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function an(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Qn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function zp(e){return JSON.stringify(e)}const Bp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const rS=Uc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Qo(e){if(Vi(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Vi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Fp(e){return Qo(e)?{...e}:e}const nS=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Te(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function oS(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const sS={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 iS(e,t){const r=e._zod.def,n=Qn(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return an(this,"shape",o),o},checks:[]});return cn(e,n)}function aS(e,t){const r=e._zod.def,n=Qn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return an(this,"shape",o),o},checks:[]});return cn(e,n)}function cS(e,t){if(!Qo(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=Qn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return an(this,"shape",s),s},checks:[]});return cn(e,o)}function lS(e,t){if(!Qo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return an(this,"shape",n),n},checks:e._zod.def.checks};return cn(e,r)}function uS(e,t){const r=Qn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return an(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return cn(e,r)}function dS(e,t,r){const n=Qn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)s[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return an(this,"shape",s),s},checks:[]});return cn(t,n)}function fS(e,t,r){const n=Qn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return an(this,"shape",s),s},checks:[]});return cn(t,n)}function Jn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Wp(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Hi(e){return typeof e=="string"?e:e?.message}function kn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Hi(e.inst?._zod.def?.error?.(e))??Hi(t?.error?.(e))??Hi(r.customError?.(e))??Hi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Zc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Xo(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Vp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Hc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Gc=Z("$ZodError",Vp),Ui=Z("$ZodError",Vp,{Parent:Error});function pS(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function hS(e,t){const r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));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)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(e),n}const Yi=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Kn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>kn(c,s,Dn())));throw Bp(a,o?.callee),a}return i.value},mS=Yi(Ui),qi=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>kn(c,s,Dn())));throw Bp(a,o?.callee),a}return i.value},gS=qi(Ui),Zi=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Kn;return s.issues.length?{success:!1,error:new(e??Gc)(s.issues.map(i=>kn(i,o,Dn())))}:{success:!0,data:s.value}},vS=Zi(Ui),Gi=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>kn(i,o,Dn())))}:{success:!0,data:s.value}},yS=Gi(Ui),bS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,r,o)},xS=e=>(t,r,n)=>Yi(e)(t,r,n),_S=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return qi(e)(t,r,o)},wS=e=>async(t,r,n)=>qi(e)(t,r,n),SS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Zi(e)(t,r,o)},CS=e=>(t,r,n)=>Zi(e)(t,r,n),ES=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Gi(e)(t,r,o)},DS=e=>async(t,r,n)=>Gi(e)(t,r,n),kS=/^[cC][^\s-]{8,}$/,AS=/^[0-9a-z]+$/,TS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,IS=/^[0-9a-vA-V]{20}$/,MS=/^[A-Za-z0-9]{27}$/,PS=/^[a-zA-Z0-9_-]{21}$/,OS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jS=/^([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})$/,Hp=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)$/,RS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,NS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $S(){return new RegExp(NS,"u")}const LS=/^(?:(?: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])$/,zS=/^(([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})$/,BS=/^((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])$/,FS=/^(([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])$/,WS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Up=/^[A-Za-z0-9_-]*$/,VS=/^(?=.{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])?)*\.?$/,HS=/^\+(?:[0-9]){6,14}[0-9]$/,Yp="(?:(?:\\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])))",US=new RegExp(`^${Yp}$`);function qp(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function YS(e){return new RegExp(`^${qp(e)}$`)}function qS(e){const t=qp({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Yp}T(?:${n})$`)}const ZS=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},GS=/^\d+$/,KS=/^-?\d+(?:\.\d+)?/i,QS=/true|false/i,XS=/^[^A-Z]*$/,JS=/^[^a-z]*$/,ar=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Zp={number:"number",bigint:"bigint",object:"date"},Gp=Z("$ZodCheckLessThan",(e,t)=>{ar.init(e,t);const r=Zp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kp=Z("$ZodCheckGreaterThan",(e,t)=>{ar.init(e,t);const r=Zp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eC=Z("$ZodCheckMultipleOf",(e,t)=>{ar.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):eS(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),tC=Z("$ZodCheckNumberFormat",(e,t)=>{ar.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=sS[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,r&&(a.pattern=GS)}),e._zod.check=i=>{const a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inst:e})}}),rC=Z("$ZodCheckMaxLength",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Yc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=Zc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),nC=Z("$ZodCheckMinLength",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Yc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=Zc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oC=Z("$ZodCheckLengthEquals",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Yc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=Zc(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ki=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;ar.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),sC=Z("$ZodCheckRegex",(e,t)=>{Ki.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),iC=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=XS),Ki.init(e,t)}),aC=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=JS),Ki.init(e,t)}),cC=Z("$ZodCheckIncludes",(e,t)=>{ar.init(e,t);const r=Xn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),lC=Z("$ZodCheckStartsWith",(e,t)=>{ar.init(e,t);const r=new RegExp(`^${Xn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),uC=Z("$ZodCheckEndsWith",(e,t)=>{ar.init(e,t);const r=new RegExp(`.*${Xn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),dC=Z("$ZodCheckOverwrite",(e,t)=>{ar.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class fC{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
161
161
  `).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
162
- `))}}const fC={major:4,minor:1,patch:5},Mt=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fC;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let u=Jn(i),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const h=i.issues.length,v=f._zod.check(i);if(v instanceof Promise&&c?.async===!1)throw new Kn;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,i.issues.length!==h&&(u||(u=Jn(i,h)))});else{if(i.issues.length===h)continue;u||(u=Jn(i,h))}}return d?d.then(()=>i):i},s=(i,a,c)=>{if(Jn(i))return i.aborted=!0,i;const u=o(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Kn;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(d=>s(d,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Kn;return c.then(u=>o(u,n,a))}return o(c,n,a)}}e["~standard"]={validate:o=>{try{const s=gS(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return vS(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),Kc=Z("$ZodString",(e,t)=>{Mt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??qS(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),wt=Z("$ZodStringFormat",(e,t)=>{Ki.init(e,t),Kc.init(e,t)}),pC=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=OS),wt.init(e,t)}),hC=Z("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Up(n))}else t.pattern??(t.pattern=Up());wt.init(e,t)}),mC=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=jS),wt.init(e,t)}),gC=Z("$ZodURL",(e,t)=>{wt.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:WS.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),vC=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=NS()),wt.init(e,t)}),yC=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=MS),wt.init(e,t)}),bC=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=DS),wt.init(e,t)}),xC=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=kS),wt.init(e,t)}),_C=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=AS),wt.init(e,t)}),wC=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=TS),wt.init(e,t)}),SC=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=IS),wt.init(e,t)}),CC=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=YS(t)),wt.init(e,t)}),EC=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=US),wt.init(e,t)}),DC=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=HS(t)),wt.init(e,t)}),kC=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=PS),wt.init(e,t)}),AC=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$S),wt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),TC=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=LS),wt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),IC=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=zS),wt.init(e,t)}),MC=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=BS),wt.init(e,t),e._zod.check=r=>{const[n,o]=r.value.split("/");try{if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Qp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const PC=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=FS),wt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Qp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function OC(e){if(!Hp.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Qp(r)}const jC=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Hp),wt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{OC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),RC=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=VS),wt.init(e,t)});function NC(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const $C=Z("$ZodJWT",(e,t)=>{wt.init(e,t),e._zod.check=r=>{NC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Xp=Z("$ZodNumber",(e,t)=>{Mt.init(e,t),e._zod.pattern=e._zod.bag.pattern??GS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),LC=Z("$ZodNumber",(e,t)=>{eC.init(e,t),Xp.init(e,t)}),zC=Z("$ZodBoolean",(e,t)=>{Mt.init(e,t),e._zod.pattern=KS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),BC=Z("$ZodUnknown",(e,t)=>{Mt.init(e,t),e._zod.parse=r=>r}),FC=Z("$ZodNever",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Jp(e,t,r){e.issues.length&&t.issues.push(...Wp(r,e.issues)),t.value[r]=e.value}const WC=Z("$ZodArray",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(u=>Jp(u,r,i))):Jp(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Qi(e,t,r,n){e.issues.length&&t.issues.push(...Wp(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function eh(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape[n]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=nS(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function th(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type;for(const d of Object.keys(t)){if(a.has(d))continue;if(u==="never"){i.push(d);continue}const f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(h=>Qi(h,r,d,t))):Qi(f,r,d,t)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const VC=Z("$ZodObject",(e,t)=>{Mt.init(e,t);const r=Hc(()=>eh(t));gt(e._zod,"propValues",()=>{const i=t.shape,a={};for(const c in i){const u=i[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const n=Vi,o=t.catchall;let s;e._zod.parse=(i,a)=>{s??(s=r.value);const c=i.value;if(!n(c))return i.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),i;i.value={};const u=[],d=s.shape;for(const f of s.keys){const v=d[f]._zod.run({value:c[f],issues:[]},a);v instanceof Promise?u.push(v.then(m=>Qi(m,i,f,c))):Qi(v,i,f,c)}return o?th(u,c,i,a,r.value,e):u.length?Promise.all(u).then(()=>i):i}}),UC=Z("$ZodObjectJIT",(e,t)=>{VC.init(e,t);const r=e._zod.parse,n=Hc(()=>eh(t)),o=h=>{const v=new dC(["shape","payload","ctx"]),m=n.value,p=E=>{const S=zp(E);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};v.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const E of m.keys)b[E]=`key_${w++}`;v.write("const newResult = {}");for(const E of m.keys){const S=b[E],_=zp(E);v.write(`const ${S} = ${p(E)};`),v.write(`
162
+ `))}}const pC={major:4,minor:1,patch:5},Mt=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pC;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let l=Jn(i),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const h=i.issues.length,v=f._zod.check(i);if(v instanceof Promise&&c?.async===!1)throw new Kn;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,i.issues.length!==h&&(l||(l=Jn(i,h)))});else{if(i.issues.length===h)continue;l||(l=Jn(i,h))}}return d?d.then(()=>i):i},s=(i,a,c)=>{if(Jn(i))return i.aborted=!0,i;const l=o(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new Kn;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>s(d,i,a)):s(l,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Kn;return c.then(l=>o(l,n,a))}return o(c,n,a)}}e["~standard"]={validate:o=>{try{const s=vS(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return yS(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),Kc=Z("$ZodString",(e,t)=>{Mt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ZS(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),wt=Z("$ZodStringFormat",(e,t)=>{Ki.init(e,t),Kc.init(e,t)}),hC=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=jS),wt.init(e,t)}),mC=Z("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Hp(n))}else t.pattern??(t.pattern=Hp());wt.init(e,t)}),gC=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=RS),wt.init(e,t)}),vC=Z("$ZodURL",(e,t)=>{wt.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:VS.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),yC=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$S()),wt.init(e,t)}),bC=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=PS),wt.init(e,t)}),xC=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=kS),wt.init(e,t)}),_C=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=AS),wt.init(e,t)}),wC=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=TS),wt.init(e,t)}),SC=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=IS),wt.init(e,t)}),CC=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=MS),wt.init(e,t)}),EC=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qS(t)),wt.init(e,t)}),DC=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=US),wt.init(e,t)}),kC=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=YS(t)),wt.init(e,t)}),AC=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=OS),wt.init(e,t)}),TC=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=LS),wt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),IC=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zS),wt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),MC=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=BS),wt.init(e,t)}),PC=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=FS),wt.init(e,t),e._zod.check=r=>{const[n,o]=r.value.split("/");try{if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Qp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const OC=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=WS),wt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Qp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function jC(e){if(!Up.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Qp(r)}const RC=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Up),wt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{jC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),NC=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=HS),wt.init(e,t)});function $C(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const LC=Z("$ZodJWT",(e,t)=>{wt.init(e,t),e._zod.check=r=>{$C(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Xp=Z("$ZodNumber",(e,t)=>{Mt.init(e,t),e._zod.pattern=e._zod.bag.pattern??KS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),zC=Z("$ZodNumber",(e,t)=>{tC.init(e,t),Xp.init(e,t)}),BC=Z("$ZodBoolean",(e,t)=>{Mt.init(e,t),e._zod.pattern=QS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),FC=Z("$ZodUnknown",(e,t)=>{Mt.init(e,t),e._zod.parse=r=>r}),WC=Z("$ZodNever",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Jp(e,t,r){e.issues.length&&t.issues.push(...Wp(r,e.issues)),t.value[r]=e.value}const VC=Z("$ZodArray",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(l=>Jp(l,r,i))):Jp(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Qi(e,t,r,n){e.issues.length&&t.issues.push(...Wp(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function eh(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape[n]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=oS(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function th(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,l=c.def.type;for(const d of Object.keys(t)){if(a.has(d))continue;if(l==="never"){i.push(d);continue}const f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(h=>Qi(h,r,d,t))):Qi(f,r,d,t)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const HC=Z("$ZodObject",(e,t)=>{Mt.init(e,t);const r=Uc(()=>eh(t));gt(e._zod,"propValues",()=>{const i=t.shape,a={};for(const c in i){const l=i[c]._zod;if(l.values){a[c]??(a[c]=new Set);for(const d of l.values)a[c].add(d)}}return a});const n=Vi,o=t.catchall;let s;e._zod.parse=(i,a)=>{s??(s=r.value);const c=i.value;if(!n(c))return i.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),i;i.value={};const l=[],d=s.shape;for(const f of s.keys){const v=d[f]._zod.run({value:c[f],issues:[]},a);v instanceof Promise?l.push(v.then(m=>Qi(m,i,f,c))):Qi(v,i,f,c)}return o?th(l,c,i,a,r.value,e):l.length?Promise.all(l).then(()=>i):i}}),UC=Z("$ZodObjectJIT",(e,t)=>{HC.init(e,t);const r=e._zod.parse,n=Uc(()=>eh(t)),o=h=>{const v=new fC(["shape","payload","ctx"]),m=n.value,p=E=>{const S=zp(E);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};v.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const E of m.keys)b[E]=`key_${w++}`;v.write("const newResult = {}");for(const E of m.keys){const S=b[E],_=zp(E);v.write(`const ${S} = ${p(E)};`),v.write(`
163
163
  if (${S}.issues.length) {
164
164
  payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
165
165
  ...iss,
@@ -174,7 +174,7 @@ const theme2 = createTheme({ palette: {
174
174
  } else {
175
175
  newResult[${_}] = ${S}.value;
176
176
  }
177
- `)}v.write("payload.value = newResult;"),v.write("return payload;");const C=v.compile();return(E,S)=>C(h,E,S)};let s;const i=Vi,a=!$p.jitless,u=a&&tS.value,d=t.catchall;let f;e._zod.parse=(h,v)=>{f??(f=n.value);const m=h.value;return i(m)?a&&u&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),h=s(h,v),d?th([],m,h,v,f,e):h):r(h,v):(h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h)}});function rh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Jn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>kn(i,n,Dn())))}),t)}const HC=Z("$ZodUnion",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),gt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),gt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),gt(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>qc(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>rh(c,o,e,s)):rh(a,o,e,s)}}),YC=Z("$ZodIntersection",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>nh(r,c,u)):nh(r,s,i)}});function Qc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Qo(e)&&Qo(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Qc(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Qc(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function nh(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Jn(e))return e;const n=Qc(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const qC=Z("$ZodEnum",(e,t)=>{Mt.init(e,t);const r=Xw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>rS.has(typeof o)).map(o=>typeof o=="string"?Xn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),ZC=Z("$ZodLiteral",(e,t)=>{if(Mt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Xn(r):r?Xn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,n)=>{const o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),GC=Z("$ZodTransform",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Np(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Kn;return r.value=o,r}});function oh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const KC=Z("$ZodOptional",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",gt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),gt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${qc(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>oh(s,r.value)):oh(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),QC=Z("$ZodNullable",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),gt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${qc(r.source)}|null)$`):void 0}),gt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),XC=Z("$ZodDefault",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",gt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>sh(s,t)):sh(o,t)}});function sh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const JC=Z("$ZodPrefault",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",gt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),eE=Z("$ZodNonOptional",(e,t)=>{Mt.init(e,t),gt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>ih(s,e)):ih(o,e)}});function ih(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const tE=Z("$ZodCatch",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),gt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>kn(i,n,Dn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>kn(s,n,Dn()))},input:r.value}),r.issues=[]),r)}}),rE=Z("$ZodPipe",(e,t)=>{Mt.init(e,t),gt(e._zod,"values",()=>t.in._zod.values),gt(e._zod,"optin",()=>t.in._zod.optin),gt(e._zod,"optout",()=>t.out._zod.optout),gt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Xi(i,t.in,n)):Xi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Xi(s,t.out,n)):Xi(o,t.out,n)}});function Xi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const nE=Z("$ZodReadonly",(e,t)=>{Mt.init(e,t),gt(e._zod,"propValues",()=>t.innerType._zod.propValues),gt(e._zod,"values",()=>t.innerType._zod.values),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(ah):ah(o)}});function ah(e){return e.value=Object.freeze(e.value),e}const oE=Z("$ZodCustom",(e,t)=>{ar.init(e,t),Mt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>ch(s,r,n,e));ch(o,r,n,e)}});function ch(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Xo(o))}}class sE{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function iE(){return new sE}const Ji=iE();function aE(e,t){return new e({type:"string",...Ae(t)})}function cE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ae(t)})}function lh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ae(t)})}function lE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ae(t)})}function uE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ae(t)})}function dE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ae(t)})}function fE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ae(t)})}function pE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ae(t)})}function hE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ae(t)})}function mE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ae(t)})}function gE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ae(t)})}function vE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ae(t)})}function yE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ae(t)})}function bE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ae(t)})}function xE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ae(t)})}function _E(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ae(t)})}function wE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ae(t)})}function SE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ae(t)})}function CE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ae(t)})}function EE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ae(t)})}function DE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ae(t)})}function kE(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ae(t)})}function AE(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ae(t)})}function TE(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ae(t)})}function IE(e,t){return new e({type:"string",format:"date",check:"string_format",...Ae(t)})}function ME(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ae(t)})}function PE(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ae(t)})}function OE(e,t){return new e({type:"number",checks:[],...Ae(t)})}function jE(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ae(t)})}function RE(e,t){return new e({type:"boolean",...Ae(t)})}function NE(e){return new e({type:"unknown"})}function $E(e,t){return new e({type:"never",...Ae(t)})}function uh(e,t){return new Gp({check:"less_than",...Ae(t),value:e,inclusive:!1})}function Xc(e,t){return new Gp({check:"less_than",...Ae(t),value:e,inclusive:!0})}function dh(e,t){return new Kp({check:"greater_than",...Ae(t),value:e,inclusive:!1})}function Jc(e,t){return new Kp({check:"greater_than",...Ae(t),value:e,inclusive:!0})}function fh(e,t){return new JS({check:"multiple_of",...Ae(t),value:e})}function ph(e,t){return new tC({check:"max_length",...Ae(t),maximum:e})}function ea(e,t){return new rC({check:"min_length",...Ae(t),minimum:e})}function hh(e,t){return new nC({check:"length_equals",...Ae(t),length:e})}function LE(e,t){return new oC({check:"string_format",format:"regex",...Ae(t),pattern:e})}function zE(e){return new sC({check:"string_format",format:"lowercase",...Ae(e)})}function BE(e){return new iC({check:"string_format",format:"uppercase",...Ae(e)})}function FE(e,t){return new aC({check:"string_format",format:"includes",...Ae(t),includes:e})}function WE(e,t){return new cC({check:"string_format",format:"starts_with",...Ae(t),prefix:e})}function VE(e,t){return new lC({check:"string_format",format:"ends_with",...Ae(t),suffix:e})}function Jo(e){return new uC({check:"overwrite",tx:e})}function UE(e){return Jo(t=>t.normalize(e))}function HE(){return Jo(e=>e.trim())}function YE(){return Jo(e=>e.toLowerCase())}function qE(){return Jo(e=>e.toUpperCase())}function ZE(e,t,r){return new e({type:"array",element:t,...Ae(r)})}function GE(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ae(r)})}function KE(e){const t=QE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Xo(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Xo(o))}},e(r.value,r)));return t}function QE(e,t){const r=new ar({check:"custom",...Ae(t)});return r._zod.check=e,r}function mh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function XE(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=zc(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function JE(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if(n.code==="invalid_union"&&n.errors.length>0){var a=n.errors[0][0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(d){return d.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,u=c&&c[n.code];r[i]=zc(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function eD(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,s){try{return Promise.resolve(mh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Vc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:jp(XE(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(mh(function(){return Promise.resolve((r.mode==="sync"?hS:mS)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Vc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Gc})(i))return{values:{},errors:jp(JE(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const tD=Z("ZodISODateTime",(e,t)=>{CC.init(e,t),kt.init(e,t)});function rD(e){return TE(tD,e)}const nD=Z("ZodISODate",(e,t)=>{EC.init(e,t),kt.init(e,t)});function oD(e){return IE(nD,e)}const sD=Z("ZodISOTime",(e,t)=>{DC.init(e,t),kt.init(e,t)});function iD(e){return ME(sD,e)}const aD=Z("ZodISODuration",(e,t)=>{kC.init(e,t),kt.init(e,t)});function cD(e){return PE(aD,e)}const xr=Z("ZodError",(e,t)=>{Gc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>pS(e,r)},flatten:{value:r=>fS(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Uc,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Uc,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),lD=Yi(xr),uD=qi(xr),dD=Zi(xr),fD=Gi(xr),pD=yS(xr),hD=bS(xr),mD=xS(xr),gD=_S(xr),vD=wS(xr),yD=SS(xr),bD=CS(xr),xD=ES(xr),Lt=Z("ZodType",(e,t)=>(Mt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>cn(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>lD(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>dD(e,r,n),e.parseAsync=async(r,n)=>uD(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>fD(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>pD(e,r,n),e.decode=(r,n)=>hD(e,r,n),e.encodeAsync=async(r,n)=>mD(e,r,n),e.decodeAsync=async(r,n)=>gD(e,r,n),e.safeEncode=(r,n)=>vD(e,r,n),e.safeDecode=(r,n)=>yD(e,r,n),e.safeEncodeAsync=async(r,n)=>bD(e,r,n),e.safeDecodeAsync=async(r,n)=>xD(e,r,n),e.refine=(r,n)=>e.check(fk(r,n)),e.superRefine=r=>e.check(pk(r)),e.overwrite=r=>e.check(Jo(r)),e.optional=()=>Eh(e),e.nullable=()=>Dh(e),e.nullish=()=>Eh(Dh(e)),e.nonoptional=r=>sk(e,r),e.array=()=>_h(e),e.or=r=>qD([e,r]),e.and=r=>GD(e,r),e.transform=r=>Ah(e,JD(r)),e.default=r=>rk(e,r),e.prefault=r=>ok(e,r),e.catch=r=>ak(e,r),e.pipe=r=>Ah(e,r),e.readonly=()=>uk(e),e.describe=r=>{const n=e.clone();return Ji.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Ji.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ji.get(e);const n=e.clone();return Ji.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),gh=Z("_ZodString",(e,t)=>{Kc.init(e,t),Lt.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(LE(...n)),e.includes=(...n)=>e.check(FE(...n)),e.startsWith=(...n)=>e.check(WE(...n)),e.endsWith=(...n)=>e.check(VE(...n)),e.min=(...n)=>e.check(ea(...n)),e.max=(...n)=>e.check(ph(...n)),e.length=(...n)=>e.check(hh(...n)),e.nonempty=(...n)=>e.check(ea(1,...n)),e.lowercase=n=>e.check(zE(n)),e.uppercase=n=>e.check(BE(n)),e.trim=()=>e.check(HE()),e.normalize=(...n)=>e.check(UE(...n)),e.toLowerCase=()=>e.check(YE()),e.toUpperCase=()=>e.check(qE())}),_D=Z("ZodString",(e,t)=>{Kc.init(e,t),gh.init(e,t),e.email=r=>e.check(cE(wD,r)),e.url=r=>e.check(pE(SD,r)),e.jwt=r=>e.check(AE(LD,r)),e.emoji=r=>e.check(hE(CD,r)),e.guid=r=>e.check(lh(vh,r)),e.uuid=r=>e.check(lE(ta,r)),e.uuidv4=r=>e.check(uE(ta,r)),e.uuidv6=r=>e.check(dE(ta,r)),e.uuidv7=r=>e.check(fE(ta,r)),e.nanoid=r=>e.check(mE(ED,r)),e.guid=r=>e.check(lh(vh,r)),e.cuid=r=>e.check(gE(DD,r)),e.cuid2=r=>e.check(vE(kD,r)),e.ulid=r=>e.check(yE(AD,r)),e.base64=r=>e.check(EE(RD,r)),e.base64url=r=>e.check(DE(ND,r)),e.xid=r=>e.check(bE(TD,r)),e.ksuid=r=>e.check(xE(ID,r)),e.ipv4=r=>e.check(_E(MD,r)),e.ipv6=r=>e.check(wE(PD,r)),e.cidrv4=r=>e.check(SE(OD,r)),e.cidrv6=r=>e.check(CE(jD,r)),e.e164=r=>e.check(kE($D,r)),e.datetime=r=>e.check(rD(r)),e.date=r=>e.check(oD(r)),e.time=r=>e.check(iD(r)),e.duration=r=>e.check(cD(r))});function _r(e){return aE(_D,e)}const kt=Z("ZodStringFormat",(e,t)=>{wt.init(e,t),gh.init(e,t)}),wD=Z("ZodEmail",(e,t)=>{mC.init(e,t),kt.init(e,t)}),vh=Z("ZodGUID",(e,t)=>{pC.init(e,t),kt.init(e,t)}),ta=Z("ZodUUID",(e,t)=>{hC.init(e,t),kt.init(e,t)}),SD=Z("ZodURL",(e,t)=>{gC.init(e,t),kt.init(e,t)}),CD=Z("ZodEmoji",(e,t)=>{vC.init(e,t),kt.init(e,t)}),ED=Z("ZodNanoID",(e,t)=>{yC.init(e,t),kt.init(e,t)}),DD=Z("ZodCUID",(e,t)=>{bC.init(e,t),kt.init(e,t)}),kD=Z("ZodCUID2",(e,t)=>{xC.init(e,t),kt.init(e,t)}),AD=Z("ZodULID",(e,t)=>{_C.init(e,t),kt.init(e,t)}),TD=Z("ZodXID",(e,t)=>{wC.init(e,t),kt.init(e,t)}),ID=Z("ZodKSUID",(e,t)=>{SC.init(e,t),kt.init(e,t)}),MD=Z("ZodIPv4",(e,t)=>{AC.init(e,t),kt.init(e,t)}),PD=Z("ZodIPv6",(e,t)=>{TC.init(e,t),kt.init(e,t)}),OD=Z("ZodCIDRv4",(e,t)=>{IC.init(e,t),kt.init(e,t)}),jD=Z("ZodCIDRv6",(e,t)=>{MC.init(e,t),kt.init(e,t)}),RD=Z("ZodBase64",(e,t)=>{PC.init(e,t),kt.init(e,t)}),ND=Z("ZodBase64URL",(e,t)=>{jC.init(e,t),kt.init(e,t)}),$D=Z("ZodE164",(e,t)=>{RC.init(e,t),kt.init(e,t)}),LD=Z("ZodJWT",(e,t)=>{$C.init(e,t),kt.init(e,t)}),yh=Z("ZodNumber",(e,t)=>{Xp.init(e,t),Lt.init(e,t),e.gt=(n,o)=>e.check(dh(n,o)),e.gte=(n,o)=>e.check(Jc(n,o)),e.min=(n,o)=>e.check(Jc(n,o)),e.lt=(n,o)=>e.check(uh(n,o)),e.lte=(n,o)=>e.check(Xc(n,o)),e.max=(n,o)=>e.check(Xc(n,o)),e.int=n=>e.check(bh(n)),e.safe=n=>e.check(bh(n)),e.positive=n=>e.check(dh(0,n)),e.nonnegative=n=>e.check(Jc(0,n)),e.negative=n=>e.check(uh(0,n)),e.nonpositive=n=>e.check(Xc(0,n)),e.multipleOf=(n,o)=>e.check(fh(n,o)),e.step=(n,o)=>e.check(fh(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ra(e){return OE(yh,e)}const zD=Z("ZodNumberFormat",(e,t)=>{LC.init(e,t),yh.init(e,t)});function bh(e){return jE(zD,e)}const BD=Z("ZodBoolean",(e,t)=>{zC.init(e,t),Lt.init(e,t)});function na(e){return RE(BD,e)}const FD=Z("ZodUnknown",(e,t)=>{BC.init(e,t),Lt.init(e,t)});function xh(){return NE(FD)}const WD=Z("ZodNever",(e,t)=>{FC.init(e,t),Lt.init(e,t)});function VD(e){return $E(WD,e)}const UD=Z("ZodArray",(e,t)=>{WC.init(e,t),Lt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(ea(r,n)),e.nonempty=r=>e.check(ea(1,r)),e.max=(r,n)=>e.check(ph(r,n)),e.length=(r,n)=>e.check(hh(r,n)),e.unwrap=()=>e.element});function _h(e,t){return ZE(UD,e,t)}const HD=Z("ZodObject",(e,t)=>{UC.init(e,t),Lt.init(e,t),gt(e,"shape",()=>t.shape),e.keyof=()=>Sh(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:xh()}),e.loose=()=>e.clone({...e._zod.def,catchall:xh()}),e.strict=()=>e.clone({...e._zod.def,catchall:VD()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>aS(e,r),e.safeExtend=r=>cS(e,r),e.merge=r=>lS(e,r),e.pick=r=>sS(e,r),e.omit=r=>iS(e,r),e.partial=(...r)=>uS(Ch,e,r[0]),e.required=(...r)=>dS(kh,e,r[0])});function wh(e,t){const r={type:"object",get shape(){return an(this,"shape",e?eS(e):{}),this.shape},...Ae(t)};return new HD(r)}const YD=Z("ZodUnion",(e,t)=>{HC.init(e,t),Lt.init(e,t),e.options=t.options});function qD(e,t){return new YD({type:"union",options:e,...Ae(t)})}const ZD=Z("ZodIntersection",(e,t)=>{YC.init(e,t),Lt.init(e,t)});function GD(e,t){return new ZD({type:"intersection",left:e,right:t})}const el=Z("ZodEnum",(e,t)=>{qC.init(e,t),Lt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new el({...t,checks:[],...Ae(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new el({...t,checks:[],...Ae(o),entries:s})}});function Sh(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new el({type:"enum",entries:r,...Ae(t)})}const KD=Z("ZodLiteral",(e,t)=>{ZC.init(e,t),Lt.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function QD(e,t){return new KD({type:"literal",values:Array.isArray(e)?e:[e],...Ae(t)})}const XD=Z("ZodTransform",(e,t)=>{GC.init(e,t),Lt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Np(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Xo(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Xo(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function JD(e){return new XD({type:"transform",transform:e})}const Ch=Z("ZodOptional",(e,t)=>{KC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Eh(e){return new Ch({type:"optional",innerType:e})}const ek=Z("ZodNullable",(e,t)=>{QC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dh(e){return new ek({type:"nullable",innerType:e})}const tk=Z("ZodDefault",(e,t)=>{XC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function rk(e,t){return new tk({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Fp(t)}})}const nk=Z("ZodPrefault",(e,t)=>{JC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ok(e,t){return new nk({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Fp(t)}})}const kh=Z("ZodNonOptional",(e,t)=>{eE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function sk(e,t){return new kh({type:"nonoptional",innerType:e,...Ae(t)})}const ik=Z("ZodCatch",(e,t)=>{tE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ak(e,t){return new ik({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ck=Z("ZodPipe",(e,t)=>{rE.init(e,t),Lt.init(e,t),e.in=t.in,e.out=t.out});function Ah(e,t){return new ck({type:"pipe",in:e,out:t})}const lk=Z("ZodReadonly",(e,t)=>{nE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function uk(e){return new lk({type:"readonly",innerType:e})}const dk=Z("ZodCustom",(e,t)=>{oE.init(e,t),Lt.init(e,t)});function fk(e,t={}){return GE(dk,e,t)}function pk(e){return KE(e)}const Th=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,Ih=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),u=new Date(n,o,s,a,c);return isNaN(u.getTime())||!x.isValid(u)?null:u},hk=wh({UsuarioID:ra().nullable().optional(),disID:ra().nullable().optional(),EsOrganizador:na().default(!1),Correo:_r().email("Formato de correo inválido"),StatusInvitacion:Sh(["PENDIENTE","CONFIRMADO","DECLINADO"]).default("PENDIENTE")}),mk=wh({titulo:_r().min(1,"El campo Título es requerido.").refine(e=>!e.startsWith(" "),{message:"El título no puede empezar con un espacio en blanco"}),fechaInicio:_r().min(1,"El campo fecha inicio es requerido."),horaInicio:_r().min(1,"La hora de inicio es requerida.").regex(Th,{message:"Formato inválido"}),horaFin:_r().min(1,"La hora fin es requerida.").regex(Th,{message:"Formato inválido"}),todoElDia:na(),fechaFin:_r().optional(),showEndDate:na().optional(),horaInicio2:_r().optional(),TodoElDia2:na().optional(),client:_r().nullable().optional(),repetir:_r().optional(),link:_r().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(QD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:_r().optional(),invitados:_h(hk).optional().default([]),color:_r().optional(),solID:ra().nullable().optional(),disID:ra().nullable().optional()}).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 t=Ih(e.fechaInicio,e.horaInicio),r=Ih(e.fechaFin,e.horaFin);return!t||!r||!x.isValid(t)||!x.isValid(r)?!0:!(x.isBefore(r,t)&&!x.isSameDay(r,t)||x.isSameDay(t,r)&&x.isBefore(r,t))},{message:"",path:["horaFin"]}),Mh=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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"})),gk="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",vk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{clipPath:"url(#a)"},K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Ph="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",yk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},K.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"}),K.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"}),K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),bk="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",xk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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"}));var es={},Oh;function _k(){if(Oh)return es;Oh=1;var e=Je();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(lt()),r=rt();return es.default=(0,t.default)((0,r.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),es}var wk=_k();const jh=Xe(wk);var ts={},Rh;function Sk(){if(Rh)return ts;Rh=1;var e=Je();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(lt()),r=rt();return ts.default=(0,t.default)((0,r.jsx)("path",{d:"M16.53 11.06 15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14z"}),"EventAvailable"),ts}var Ck=Sk();const Ek=Xe(Ck);var rs={},Nh;function Dk(){if(Nh)return rs;Nh=1;var e=Je();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(lt()),r=rt();return rs.default=(0,t.default)((0,r.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),rs}var kk=Dk();const Ak=Xe(kk),Tk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAElBMVEUAAABpbXlpbXlobXhpbnppbnkdzkEGAAAABXRSTlMAgJ5Y75poDcUAAAA3SURBVBjTYyANiBog2IyhSBzRQGQJASSJIGQJBSIkTBESCA5CGcIAoqUEGDAdiukFBhE4hzAAAK+MB7AghHQFAAAAAElFTkSuQmCC";var ns={},$h;function Ik(){if($h)return ns;$h=1;var e=Je();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(lt()),r=rt();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),ns}var Mk=Ik();const Lh=Xe(Mk),Pk=e=>{const t=["#A17B4B","#7B5BE4","#F9A825","#4A90E2","#5CC85C","#FDD835","#E53935","#B0BEC5"],r=e.charCodeAt(0)%t.length;return t[r]},Ok=(e,t)=>{if(t)return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#1976D2"},children:[l.jsx(Lh,{sx:{fontSize:16,mr:.5}}),l.jsx(g.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return l.jsx(g.Typography,{variant:"caption",sx:{color:"#999",fontStyle:"italic",fontWeight:600},children:"Pendiente"});case"RECHAZADA":return l.jsx(g.Button,{variant:"outlined",size:"small",sx:{fontWeight:600,borderRadius:"8px",textTransform:"none",fontSize:"11px",px:1,py:0},children:"Reenviar"});case"CONFIRMADA":return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#00A86B"},children:[l.jsx(rp,{sx:{fontSize:16,mr:.5}}),l.jsx(g.Typography,{variant:"caption",sx:{fontWeight:600},children:"Asistiré"})]});default:return null}};function jk({open:e,handleClose:t,guests:r}){const n=r.filter(c=>c.estatus==="CONFIRMADA"||c.isHost),o=r.filter(c=>c.estatus==="PENDIENTE"&&!c.isHost),s=r.filter(c=>c.estatus==="RECHAZADA"&&!c.isHost),i=c=>l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1},children:[l.jsxs(g.Box,{sx:{position:"relative",mr:2},children:[l.jsx(g.Avatar,{sx:{bgcolor:Pk(c.iniciales),width:32,height:32,fontSize:"12px",color:"#fff"},children:c.iniciales}),c.estatus==="PENDIENTE"&&l.jsx(g.Box,{sx:{position:"absolute",bottom:-2,right:-4,bgcolor:"#fff",borderRadius:"50%",display:"flex"},children:l.jsx(Mc,{sx:{fontSize:14,color:"#546E7A"}})})]}),l.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1,fontWeight:500,color:"#333"},children:c.nombre}),Ok(c.estatus,c.isHost)]},c.nombre),a=({title:c,count:u,badgeColor:d})=>l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mt:2,mb:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:800,color:"#333",fontSize:"13px"},children:c}),d&&l.jsx(g.Box,{sx:{ml:1,bgcolor:d,color:"#fff",borderRadius:"50%",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:u})]});return l.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{border:"solid 0.1 px",height:"100%"}},children:[l.jsxs(g.Box,{sx:{p:"16px 8px"},children:[l.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:800,ml:1},children:"Lista de invitados"}),l.jsx(g.Button,{onClick:t,startIcon:l.jsx("img",{src:Tk,width:20}),sx:{textTransform:"none",color:"#666",fontSize:"16px",p:0,minWidth:0,ml:.5,"&:hover":{bgcolor:"transparent"}},children:"Volver al evento"}),l.jsx(g.IconButton,{onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Vr,{})})]}),l.jsx(g.Divider,{}),l.jsxs(g.DialogContent,{sx:{p:2},children:[o.length>0&&l.jsxs(g.Box,{sx:{mb:3},children:[l.jsx(a,{title:"Invitados",count:o.length}),o.map(i)]}),n.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(g.Divider,{sx:{my:1}}),l.jsxs(g.Box,{sx:{mb:3},children:[l.jsx(a,{title:"Confirmados",count:n.length,badgeColor:"#1976D2"}),n.map(i)]})]}),s.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(g.Divider,{sx:{my:1}}),l.jsxs(g.Box,{children:[l.jsx(a,{title:"No asistirán",count:s.length,badgeColor:"#1976D2"}),s.map(i)]})]})]})]})}const Rk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFR3BMcHCAcHBwaGx4ZWp6aG14aG54Zm14aW15aG55aG15aW55aW56aW5591zvEAAAAA10Uk5TABAQIDBBYHCAnr7g7wYb6DAAAACqSURBVHjahZJLDgMhDEM9UL7Ju/91q8KgQhcdb5D8rFiJ0JNC6Qbeczzt6izV8PWjAbiNB4uH35IkpbaRYGBpT9mcVlemtnCTOiLA8BPk+/VPIkPTR/kGalAkdUgnSNAlOegEckwS2C8wOAEWN2D4BC8HH3Xge/naYJUXaJq6Wo+S2iy7HJKW1sbHSc6B0mU7SeOIf8++CJg5nHOvypLXoF0xdwfrJTx9mzdxpgqGKfcyxQAAAABJRU5ErkJggg==",Nk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FFEB3B","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function $k({guests:e}){const[t,r]=y.useState(!1),n=()=>r(!0),o=()=>r(!1);return l.jsxs(l.Fragment,{children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee",width:"100%"},children:[l.jsx(g.AvatarGroup,{max:6,sx:{"& .MuiAvatar-root":{width:32,height:32,fontSize:13,fontWeight:"bold",border:"2px solid #fff",marginLeft:"-8px !important"},"& .MuiBadge-root":{borderRadius:"50%"}},children:e.map((s,i)=>l.jsx(g.Tooltip,{title:s.nombre,arrow:!0,placement:"top",children:l.jsx(g.Box,{children:l.jsx(g.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},invisible:s.estatus!=="PENDIENTE",sx:{backgroundColor:"white"},badgeContent:l.jsx(g.Box,{sx:{bgcolor:"white",borderRadius:"50%",width:16,height:16,display:"flex",justifyContent:"center",border:"1px solid white",boxShadow:"none"},children:l.jsx("img",{src:Rk})}),children:l.jsx(g.Avatar,{sx:{bgcolor:Nk(s.iniciales)},children:s.iniciales})})})},i))}),l.jsx(g.Box,{sx:{flexGrow:1}}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"#1976D2",transition:"opacity 0.2s","&:hover":{opacity:.7}},onClick:n,children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold",fontSize:"14px"},children:"Ver invitados"}),l.jsx(Ak,{sx:{fontSize:18,ml:.5}})]})]}),l.jsx(jk,{open:t,handleClose:o,guests:e})]})}var os={},zh;function Lk(){if(zh)return os;zh=1;var e=Je();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(lt()),r=rt();return os.default=(0,t.default)((0,r.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),os}var zk=Lk();const Bh=Xe(zk),Bk=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),Fh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},Fk=({slot:e,onClick:t})=>l.jsxs(g.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #e0e0e0",textAlign:"center",transition:"0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:2}},children:[l.jsx(g.Box,{sx:{bgcolor:"#333",color:"white",py:.2},children:l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold",textTransform:"capitalize"},children:Bk(e.Fecha)})}),l.jsxs(g.Box,{sx:{bgcolor:"white",color:"black",py:1},children:[l.jsx(g.Typography,{variant:"body2",children:Fh(e.HoraInicio)}),l.jsxs(g.Typography,{variant:"body2",color:"text.secondary",children:["a ",Fh(e.HoraFin)]})]})]});function Wk({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const o=r.reduce((i,a)=>{const c=a.Fecha;return i[c]||(i[c]=[]),i[c].push(a),i},{}),s=Object.keys(o);return l.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",children:[l.jsxs(g.Box,{sx:{p:2},children:[l.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:"bold"},children:"Selecciona un nuevo horario"}),l.jsx(g.Button,{startIcon:l.jsx(Bh,{}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0},children:"Volver al evento"})]}),l.jsx(g.Divider,{}),l.jsx(g.DialogContent,{sx:{px:3,py:2},children:s.map((i,a)=>l.jsxs(g.Box,{sx:{mb:4},children:[l.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:a===0?"#1976d2":"text.primary"},children:[a===0?"Mismo día":"Próximas fechas",a===0&&l.jsx(Lh,{sx:{ml:1,fontSize:18}})]}),l.jsx(g.Grid,{container:!0,spacing:2,children:o[i].map((c,u)=>l.jsx(g.Grid,{item:!0,xs:6,sm:4,children:l.jsx(Fk,{slot:c,onClick:()=>n(c)})},`${i}-${u}`))})]},i))})]})}const Vk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAIVBMVEVHcExAR1ZAR1NARlVAR1VARlVAR1VARlVARlRARlRAR1ZiwDFVAAAACnRSTlMA5BvHaqI5kH9QLGWfKwAAAQlJREFUeNrd1luqwzAMBNDRw7I7+1/whd4mFa6tBPrX82uJGYMJwc+JLqQ1xU2dLx23NB5EgWjPtAe2Rp4Py8tLmuddeBK/KuRQMgusvDsAwkPRKgU4J14uBIwTw4K8G/GDFncQ6L0FrxYCn1TKhIU4D4UTwZIf8Z2ThjW1/9OoG2XqvTvmiI5LxsRwTRtPTbER3eTJHOcDN8fGkNxagfAxPLChxkyaohTCxEJRU2EeBxDe21NftsrzDuiQup+nwzivn41tQECNC5ZDHrmPCpdEVx+YluaLDONB0bnVcZAUwELgJQUYCzZXMihLOr0Lh7PkmBlLbbFQEsx44fsFY8kwU2PB9Ef+Lv4AL2kmcGZOH2MAAAAASUVORK5CYII=",Uk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Hk({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=y.useState(null),[s,i]=y.useState(""),a=(u,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(u,d)=>{i(d),r(d)};return l.jsx(g.Autocomplete,{options:t,value:n,inputValue:s,getOptionLabel:u=>u.correo,onChange:a,onInputChange:c,isOptionEqualToValue:(u,d)=>u.correo===d.correo,disablePortal:!0,noOptionsText:"Sin resultados",renderInput:u=>l.jsx(g.TextField,{...u,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...u.InputProps,startAdornment:l.jsx(g.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:l.jsx("img",{src:Vk,color:"action",width:20})}),disableUnderline:!0}}),renderOption:(u,d)=>y.createElement(g.Box,{component:"li",...u,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},l.jsx(g.Avatar,{sx:{bgcolor:Uk(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),l.jsx(g.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var ss={},Wh;function Yk(){if(Wh)return ss;Wh=1;var e=Je();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(lt()),r=rt();return ss.default=(0,t.default)((0,r.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline"),ss}var qk=Yk();const Zk=Xe(qk);var is={},Vh;function Gk(){if(Vh)return is;Vh=1;var e=Je();Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var t=e(lt()),r=rt();return is.default=(0,t.default)((0,r.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"),is}var Kk=Gk();const tl=Xe(Kk),Qk=e=>e.tieneConflicto?{icon:l.jsx(tl,{sx:{fontSize:18,color:"#d32f2f"}}),fillColor:"#FFF5F5",iconColor:"#d32f2f",textColor:"#333333",variant:"filled"}:{icon:l.jsx(Zk,{sx:{fontSize:20,color:"#1a73e8"}}),fillColor:"#eaedf2",iconColor:"#1a73e8",textColor:"#000000",variant:"filled"},Xk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FDD835","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Jk({guests:e,conflictCount:t,onViewSuggestions:r,onDeleteGuest:n}){const o=i=>a=>{a.stopPropagation(),n(i)},s=i=>i?i.trim().split(/\s+/).slice(0,2).join(" "):"";return l.jsxs(g.Box,{sx:{p:1},children:[l.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=Qk(i),u=Xk(i.iniciales);return l.jsx(g.Chip,{label:l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[l.jsx(g.Typography,{variant:"body2",sx:{color:c.textColor,ml:.5,mr:1,fontSize:"13px",fontWeight:400},children:s(i?.nombre)}),l.jsx(g.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"center",ml:"auto",margin:"5px"},children:c.icon})]}),avatar:l.jsx(g.Avatar,{sx:{bgcolor:u,width:24,height:24,fontSize:"10px",fontWeight:"bold",color:"#ffffff !important",ml:"4px !important"},children:i.iniciales}),sx:{backgroundColor:c.fillColor,height:"32px",borderRadius:"100px",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{backgroundColor:c.fillColor,filter:"brightness(0.97)","& .status-icon-wrapper":{display:"none"},"& .MuiChip-deleteIcon":{display:"inline-block"}},"& .MuiChip-label":{paddingLeft:"4px",paddingRight:"8px",width:"100%",display:"flex"},"& .MuiChip-deleteIcon":{display:"none",fontSize:"18px",color:"#000000",ml:"auto",mr:"4px","&:hover":{color:"#000000"}}},onClick:()=>console.log(`Ver perfil de ${i.nombre}`),onDelete:o(i.nombre)},a)})}),t>0&&l.jsxs(g.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:.5},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#E53935"},children:[l.jsx(tl,{sx:{mr:1,fontSize:22}}),l.jsxs(g.Typography,{sx:{fontSize:"15px",fontWeight:500,color:"#E53935"},children:["Se detectó un conflicto de agenda con ",l.jsxs("strong",{children:[t," invitado"]}),t!==1?"s":""]})]}),l.jsx(g.Link,{component:"button",type:"button",variant:"body2",onClick:i=>{i.preventDefault(),i.stopPropagation(),r()},sx:{ml:4,textAlign:"left",textDecoration:"underline",fontWeight:700,fontSize:"15px",color:"#1976D2",border:"none",background:"none",padding:0,cursor:"pointer","&:hover":{color:"#1565C0"}},children:"Ver sugerencias de horario"})]})]})}function e3(e,t){const[r,n]=y.useState(e);return y.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const t3={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"},Uh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],r3=()=>{const e=[];for(let t=0;t<24;t++)for(let r=0;r<60;r+=15){const n=t.toString().padStart(2,"0"),o=r.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e},Hh=[],eo=r3(),as=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),u=new Date(s,o,n,a,c);return isNaN(u.getTime())||!x.isValid(u)?null:u},n3=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c})=>{const[u,d]=y.useState(!1),[f,h]=y.useState(!1),v=x.format(new Date,"yyyy-MM-dd"),[m,p]=y.useState(""),[b,w]=y.useState([]),[C,E]=y.useState(!1),S=Ic(),[_,W]=y.useState([]),[D,A]=y.useState(""),[M,I]=y.useState(Hh),[H,G]=y.useState(!1),[F,Y]=y.useState(""),[oe,V]=y.useState(!1),[N,ae]=y.useState([]),[fe,$]=y.useState([]),Q=e3(F,300),Ce=M.filter(q=>q.tieneConflicto).length,{control:me,handleSubmit:we,reset:ie,formState:{errors:ee,isValid:ce},watch:ge,setValue:de}=Pp({resolver:eD(mk),defaultValues:{titulo:s?.titulo||"",fechaInicio:x.format(new Date,"yyyy-MM-dd"),horaInicio:x.format(new Date,"HH:mm"),horaFin:x.format(x.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:s?.client||null,repetir:"No repetir",link:s?.link||"",descripcion:s?.descripcion||"",solID:s?.solID??null,invitados:[]},mode:"onChange"}),pe=ge("fechaInicio"),Re=ge("fechaFin"),j=ge("todoElDia");y.useEffect(()=>{if(m.trim()===""||!i||!c||!a){w([]),W([]),de("solID",null),E(!1),A("");return}E(!0);const q=setTimeout(()=>{S.getClients(m,c,a,i).then(ue=>{if(E(!1),ue){const Te=ue.map(Ve=>Ve.solID);W([...new Set(Te)])}else W([]);const Ee=Array.from(new Map(ue.map(Te=>[Te.nombreCliente,Te])).values());if(Ee.length>0)w(Ee),A("");else if(s?.client&&s.solID!==null){const Te=[{solID:s.solID,nombreCliente:s.client}];w(Te),A("Sin resultados")}else w([]),A("Sin resultados")}).catch(ue=>{console.error("Error al buscar clientes:",ue),E(!1)})},500);return()=>clearTimeout(q)},[m,i,c,a]),y.useEffect(()=>{if(pe&&Re){const q=new Date(pe),ue=new Date(Re);(q===ue||q>ue)&&de("fechaFin",pe)}},[pe,Re,de]),y.useEffect(()=>{pe&&de("fechaFin",pe)},[pe]),y.useEffect(()=>{de("showEndDate",u)},[u,de]),y.useEffect(()=>{if(s){const q=x.format(s.fechaInicio,"yyyy-MM-dd")===x.format(s.fechaFin,"yyyy-MM-dd");if(d(!q),de("titulo",s?.titulo),de("fechaInicio",x.format(s.fechaInicio,"yyyy-MM-dd")),de("fechaFin",x.format(s.fechaFin,"yyyy-MM-dd")),de("horaInicio",x.format(s.fechaInicio,"HH:mm")),de("horaFin",x.format(s.fechaFin,"HH:mm")),de("horaInicio2",x.format(s.fechaFin,"HH:mm")),de("descripcion",s.descripcion),de("link",s.link),de("repetir","false"),de("color",s.color),de("todoElDia",s.todoElDia),de("solID",s.solID),de("client",s.client),s.invitados&&s.invitados.length>0){const ue=(s?.invitados||[]).map(Ee=>{const Te=Ee.usrNombre?.trim()||"",Ve=Te.split(/\s+/),J=Ve.length>1?(Ve[0][0]+Ve[1][0]).toUpperCase():Te.substring(0,2).toUpperCase();return{nombre:Ee.usrNombre||"Sin nombre",correo:Ee.correo||"",iniciales:J||"--",usrID:Ee.usuarioID??null,isHost:Ee.esOrganizador||!1,estatus:Ee.statusInvitacion,tieneConflicto:!1,disID:Ee.disID}});I(ue)}else I(Hh);s.solID?h(!0):h(!1)}else{const q=o||new Date,ue=new Date,Ee=new Date(q.getFullYear(),q.getMonth(),q.getDate(),ue.getHours(),ue.getMinutes()),Te=x.addHours(Ee,1);ie({titulo:"",fechaInicio:x.format(Ee,"yyyy-MM-dd"),horaInicio:x.format(Ee,"HH:mm"),fechaFin:x.format(Te,"yyyy-MM-dd"),horaFin:x.format(Te,"HH:mm"),horaInicio2:x.format(Te,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Uh[0],solID:null}),d(!1),h(!1)}},[s,e,o]);const Fe=q=>({UsuarioID:q.usrID??null,Correo:q.correo,EsOrganizador:q.usrID==i,StatusInvitacion:"PENDIENTE",disID:c??null}),qe=we(q=>{const ue=M.map(Te=>Fe(Te)),Ee={...q,invitados:ue};r(Ee,s?.eventoID),t(),ie(),d(!1)},q=>{console.log("Errores de validación:",q)});y.useEffect(()=>{j&&(de("horaInicio","00:00"),de("horaFin","23:59"))},[j,de,ge]);const Ze=()=>{const q=ge("fechaInicio");if(q){const ue=new Date(`${q}T00:00:00`),Ee=x.addDays(ue,1);de("fechaFin",x.format(Ee,"yyyy-MM-dd"))}d(!0)},Ne=ge("fechaInicio"),Be=ge("horaInicio"),vt=ge("fechaFin"),ht=ge("horaFin"),[k,P]=y.useState(null),[B,le]=y.useState(null);y.useEffect(()=>{(k===null||k!==Be)&&P(Be)},[Be,k]),y.useEffect(()=>{(B===null||B!==ht)&&le(ht??"")},[ht,B]);const se=ge("todoElDia");y.useEffect(()=>{if(se||!Be||!ht||!Ne||!vt)return;const q=as(Ne,Be),ue=as(vt,ht);if(!q||!ue||!x.isValid(q)||!x.isValid(ue))return;const Ee=x.isSameDay(q,ue),Te=Ee&&(x.isAfter(q,ue)||q.getTime()===ue.getTime()),Ve=x.isBefore(ue,q)&&!Ee;(Te||Ve)&&(de("horaFin",""),le(""))},[Be,Ne]);const O=y.useMemo(()=>{if(!Be||!Ne)return eo;const q=as(Ne,Be),ue=as(vt,"00:00");return!q||!ue||!x.isValid(q)||!x.isValid(ue)||x.isBefore(ue,q)&&!x.isSameDay(ue,q)?eo:x.isSameDay(q,ue)?eo.filter(Ee=>{const Te=as(vt,Ee);return Te&&x.isAfter(Te,q)}):(x.isAfter(ue,q),eo)},[Be,Ne,vt]),ne=y.useMemo(()=>eo,[]),Se=async q=>{const ue=M.some(Yt=>Yt.correo===q.correo);if(V(!0),ue)return;const Ee=c,Te=q.correo,Ve=q.usrID,J=Ne,Me=Be,ke=ht;if(!Ee||!Te||!J||!Me||!ke){I(Yt=>[...Yt,{...q,status:"pending",isHost:!1,hasConflict:!1,usrID:Ve,name:q.nombre}]);return}let je;try{je=await S.VerificarConflicto(Ee,Te,J,Me+":00",ke+":00")}catch{je={tieneConflicto:!1,usrMail:q.correo}}const Gt=Array.isArray(je)?je[0]:je,er={...q,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(Gt.tieneConflicto).toLowerCase()==="true"};if(er.tieneConflicto){const Yt=await S.getDisponibilidadUsuario(c,Te,J,"60");ae(Yt)}I(Yt=>[...Yt,er])},Oe=q=>{I(ue=>ue.filter(Ee=>Ee.nombre!==q))},R=()=>{G(!1)},te=q=>{const Te=(q.usrNombre??"").split(" ").map(Ve=>Ve.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:q.usrNombre??"",correo:q.usrMail??"",iniciales:Te,usrID:q.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};y.useEffect(()=>{Q.length>2&&c?(async()=>{const Ee=(await S.getUsuariosInvitados(c,Q)).map(te).filter(Te=>Te.usrID!==i&&!M.some(Ve=>Ve.correo===Te.correo));$(Ee)})():$([])},[Q,M]);const _e=q=>{Y(q)},Ge=async q=>{try{const{Fecha:ue,HoraInicio:Ee,HoraFin:Te}=q,Ve={nuevaFecha:ue,nuevaHoraInicio:Ee,nuevaHoraFin:Te};R()}catch(ue){console.error("Error al reprogramar el evento:",ue)}};return l.jsx(l.Fragment,{children:l.jsx(g.Modal,{open:e,onClose:t,children:l.jsx("form",{onSubmit:qe,children:l.jsxs(g.Box,{sx:t3,children:[l.jsx(g.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Vr,{})}),l.jsx(g.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?l.jsxs(l.Fragment,{children:[l.jsx(Ek,{sx:{mr:1}}),s.titulo||"Evento de Google"]}):s?"Editar evento":"Agregar evento"}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"titulo",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!ee.titulo,helperText:ee.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"}}})})})}),l.jsxs("div",{className:`row g-2 ${u?"mb-1":"mb-2"}`,children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"fechaInicio",control:me,render:({field:q})=>l.jsx(g.TextField,{fullWidth:!0,...q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!ee.fechaInicio,helperText:ee.fechaInicio?.message})})}),u?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"col-md-3 d-none d-md-block"}),l.jsx("div",{className:"col-10 col-md-4",children:l.jsx(hr,{name:"fechaFin",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:pe||v},error:!!ee.fechaFin,helperText:ee.fechaFin?.message})})}),!s&&l.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:l.jsx(g.IconButton,{onClick:()=>d(!1),sx:{fontSize:18},children:l.jsx(Mh,{})})})]}):l.jsx("div",{className:"col-md-8"})]}),u&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12 d-flex justify-content-center",children:l.jsx(jh,{sx:{color:"#757575",my:1}})})}),l.jsxs("div",{className:"row g-2 mb-2",children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"horaInicio",control:me,render:({field:{onChange:q,value:ue,...Ee}})=>l.jsx(g.Autocomplete,{freeSolo:!0,options:ne,value:ue||"",onChange:(Te,Ve)=>q(Ve||""),onInputChange:(Te,Ve)=>q(Ve),renderInput:Te=>l.jsx(g.TextField,{...Te,...Ee,size:"small",error:!!ee.horaInicio,helperText:ee.horaInicio?.message,InputProps:{...Te.InputProps,endAdornment:l.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Mc,{})})}}),disabled:se})})}),!u&&l.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:ee.horaInicio?"5px":"0px"},children:l.jsx(jh,{sx:{color:"#757575"}})}),u&&l.jsx("div",{className:"col-md-3 d-none d-md-block"}),l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"horaFin",control:me,render:({field:{onChange:q,value:ue,...Ee}})=>l.jsx(g.Autocomplete,{freeSolo:!0,options:O,value:ue||"",onChange:(Te,Ve)=>q(Ve||""),onInputChange:(Te,Ve)=>q(Ve),renderInput:Te=>l.jsx(g.TextField,{...Te,...Ee,size:"small",error:!!ee.horaFin,helperText:ee.horaFin?.message,InputProps:{...Te.InputProps,endAdornment:l.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Mc,{})})}}),disabled:se})})}),!u&&l.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:l.jsx(hr,{name:"todoElDia",control:me,render:({field:q})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{checked:q.value,onChange:ue=>q.onChange(ue.target.checked)}),label:l.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!u&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(g.Button,{onClick:Ze,size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(yk,{}),"  Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&l.jsx("div",{className:"row mb-2",children:l.jsxs("div",{className:"col-12",children:[!f&&l.jsxs(g.Button,{onClick:()=>h(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(xk,{}),"  Vincular cliente"]}),f&&l.jsxs("div",{className:"row g-2",children:[l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"client",control:me,render:({field:q})=>l.jsx(g.Autocomplete,{options:b,loading:C,loadingText:"Buscando coincidencias...",getOptionLabel:ue=>ue.nombreCliente?.trim()||"",value:b.find(ue=>ue.nombreCliente===q.value)||(q.value&&typeof q.value=="string"?{solID:-1,nombreCliente:q.value}:null),noOptionsText:D,onInputChange:(ue,Ee)=>{p(Ee)},onChange:(ue,Ee)=>{q.onChange(Ee?Ee.nombreCliente:"")},renderInput:ue=>l.jsx(g.TextField,{...ue,placeholder:"Buscar cliente...",size:"small",InputProps:{...ue.InputProps,startAdornment:l.jsx("img",{src:tf,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:l.jsxs(l.Fragment,{children:[C?l.jsx(g.CircularProgress,{color:"inherit",size:20}):null,ue.InputProps.endAdornment]})}})})})}),l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"solID",control:me,render:({field:q})=>l.jsx(g.Autocomplete,{options:_,noOptionsText:"Sin resultados",getOptionLabel:ue=>ue.toString(),value:q.value??null,onChange:(ue,Ee)=>q.onChange(Ee),renderInput:ue=>l.jsx(g.TextField,{...ue,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b.length})})}),l.jsx("div",{className:"col-2 d-flex align-items-center",children:l.jsx(g.IconButton,{onClick:()=>h(!1),sx:{fontSize:18},children:l.jsx(Mh,{})})})]})]})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"link",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!ee.link,helperText:ee.link?.message,InputProps:{startAdornment:l.jsx("img",{src:gk,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"descripcion",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:l.jsx("img",{src:bk,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(Hk,{onSelectGuest:Se,availableSuggestions:fe,onInputTextChange:_e})})}),oe&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(Jk,{guests:M,conflictCount:Ce,onViewSuggestions:()=>G(!0),onDeleteGuest:Oe})})}),s?.invitados&&s?.invitados?.length>0&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(g.Box,{children:l.jsx($k,{guests:M})})})}),l.jsx(Wk,{open:H,handleClose:R,suggestions:N,onSelectSlot:Ge}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[l.jsx(vk,{}),Uh.map(q=>l.jsx(hr,{name:"color",control:me,render:({field:ue})=>l.jsx(g.IconButton,{onClick:()=>ue.onChange(q),sx:{width:24,height:24,borderRadius:"50%",bgcolor:q,border:ue.value===q?"2px solid":"none",borderColor:ue.value===q?"primary.main":"transparent"}})},q))]})})}),l.jsx("div",{className:"row",children:l.jsxs("div",{className:"col-12 d-flex gap-2",style:{width:"100%",marginTop:"20px"},children:[s&&!s?.isGoogleEvent&&!s?.isOutlookEvent&&l.jsx(g.Button,{onClick:n,variant:"outlined",startIcon:l.jsx("img",{src:Ph,width:15}),sx:{flex:1,textTransform:"none",backgroundColor:"#FFF5F5",color:"#d32f2f",borderColor:"red",borderRadius:"8px",fontWeight:700,fontSize:"14px",padding:"8px 0","&:hover":{backgroundColor:"#FEE2E2",borderColor:"red"}},children:"Eliminar"}),l.jsx(g.Button,{onClick:t,variant:"outlined",sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",color:"#1976D2",borderColor:"#1976D2","&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)",borderColor:"#115293"}},children:"Cancelar"}),l.jsx(g.Button,{onClick:qe,variant:"contained",disabled:!ce,sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",backgroundColor:"#1976D2",boxShadow:"none","&:hover":{backgroundColor:"#115293",boxShadow:"0px 2px 4px rgba(0,0,0,0.2)"}},children:"Guardar"})]})})]})})})})},o3={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2,maxHeight:"80vh",overflowY:"auto"},s3=({isOpen:e,onClose:t,events:r,date:n,onEventClick:o})=>{if(!n)return null;const s=a=>{o(a),t()},i=a=>a.isGoogleEvent?{label:"G",borderColor:"#4285F4"}:a.isOutlookEvent?{label:"O",borderColor:"#0078d9"}:{label:"-",borderColor:"#CCC"};return l.jsx(g.Modal,{open:e,onClose:t,children:l.jsxs(g.Box,{sx:o3,children:[l.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[l.jsxs(g.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),l.jsx(g.IconButton,{onClick:t,size:"small",children:l.jsx(Vr,{})})]}),l.jsx(g.Divider,{}),l.jsx(g.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return l.jsx(g.ListItem,{disablePadding:!0,sx:{mb:1},children:l.jsx(g.ListItemButton,{onClick:()=>s(a),sx:{py:1,borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.02)",borderLeft:`5px solid ${c?.borderColor}`,"&:hover":{backgroundColor:"rgba(0,0,0,0.04)"}},children:l.jsxs(g.Box,{sx:{flexGrow:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[l.jsx(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),l.jsx(g.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),l.jsx(g.Typography,{sx:{fontSize:"12px",color:"#666"},children:a.todoElDia?"Todo el día":`${x.format(a.fechaInicio,"HH:mm")} - ${x.format(a.fechaFin,"HH:mm")}`})]})})},a.eventoID)})})]})})};var cs={},Yh;function i3(){if(Yh)return cs;Yh=1;var e=Je();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(lt()),r=rt();return cs.default=(0,t.default)((0,r.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"),cs}var a3=i3();const c3=Xe(a3);var ls={},qh;function l3(){if(qh)return ls;qh=1;var e=Je();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(lt()),r=rt();return ls.default=(0,t.default)((0,r.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"),ls}var u3=l3();const d3=Xe(u3),f3="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",p3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAALVBMVEVHcEzfEBfjCxzkChvkChvkChzkCxvlChv////96uv60dT1o6ryho/mGyvkCxypwAsrAAAACHRSTlMAECtdiKDJ5DEbuTIAAAHoSURBVHjatdlbjsMgDAVQ87JJKHf/y51pf9CIp+vJ/SzSkUloAZc2cSEkFgEAYU7RO/o+zkdBF07hO9QnwSzJq4uLgmUkGDgzGTrORHrGcZLXlmcvMkKZaJxuH/YLTwB9ZCo6AUyivb4m7uuziwxDeLtezKsnwJiwfCH2x5hgDi8mbJ+0APaI6wo0Ju4KrIBqQNyqwFqufL3qYOD1O1DqqkQZeVd+567dwJ3fuUai0Cceg5Scm9h5v3lhED9fgzk3ceTlC4Ok+YxzLzbvk+lrCRjl6sTmzSuEn80Yr9yJzZs+Q6Tp72C9/4jdRwXDCJEDTsQzD3DkcSaeeQgUcSZuvAYmnIlnHhIxVqLWAxNjKSo9CAl0YsEGBFRiwSYEhdh5dvCuBrB5GlH3UvaikOw8ncjbha0UeffV04qJwplX7jMxUjjzUM9ET+7Mw6HoiOTIOxR5ehYunXe8SfndNlpwvo2G2XWidl4nYhQ3PYpczVMfRfxqoy9QHZbWx7nm9eK9OM5RnB84h8VPTqJA6G55toj5WtYX+K8lypMXH2KYkx64PD55vbVfwJ9pEZgfo70tYm/c2FtLds/eTHu23WdvSG7jk2a6zzV17aRER4oEUXDm1r0kT18lJB5o5n8sErN8JOEUtv9U/ACrTv/qOzhclQAAAABJRU5ErkJggg==",rl=y.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=ws.useSnackbar(),s={success:{color:"#fff",icon:l.jsx("img",{width:25,src:f3,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:l.jsx(c3,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:l.jsx(d3,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:l.jsx("img",{src:Ph,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})},rechazar:{color:"#fff",icon:l.jsx("img",{src:p3,width:30,style:{borderRadius:"50%",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return l.jsx(ws.SnackbarContent,{ref:n,children:l.jsxs(g.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:[l.jsx(g.Box,{sx:{mr:1.5},children:i.icon}),l.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),l.jsx(g.IconButton,{size:"small",onClick:()=>o(e),children:l.jsx(Vr,{fontSize:"small"})})]})})}),Zh=y.createContext(void 0),h3=({children:e})=>{const[t,r]=y.useState([]),[n,o]=y.useState([]),[s,i]=y.useState(!1);return l.jsx(Zh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},m3=()=>{const e=y.useContext(Zh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},g3=(e,t,r)=>{const n=(i,a)=>a?new Date(a):i?new Date(i.replace(/-/g,"/")):new Date,o=n(e.start.date,e.start.dateTime);let s=n(e.end.date,e.end.dateTime);return e.end.date&&!e.end.dateTime&&s.setDate(s.getDate()-1),{eventoID:Math.abs(v3(e.id)),titulo:e.summary||"(Sin título)",descripcion:e.description,fechaInicio:o,fechaFin:s,todoElDia:!!(e.start.date&&!e.start.dateTime),color:"#4285F4C",hasVideoCall:!!e.conferenceData,link:e.htmlLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!0}};function v3(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function y3(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}const b3=(e,t,r)=>{const n=new Date(e.start.dateTime);let o=new Date(e.end.dateTime);return e.isAllDay&&o.setDate(o.getDate()-1),{eventoID:Math.abs(y3(e.id)),titulo:e?.summary||"(Sin título)",descripcion:e.body?.content||"",fechaInicio:n,fechaFin:o,todoElDia:e.isAllDay,color:"#0078D4",hasVideoCall:!!e.onlineMeetingUrl,link:e.webLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!1,isOutlookEvent:!0}},Gh="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",x3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%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",_3=({open:e,onClose:t,onConfirm:r,title:n,description:o,icon:s,confirmText:i,confirmColor:a="#d32f2f",loading:c=!1})=>l.jsxs(g.Dialog,{open:e,onClose:t,PaperProps:{sx:{borderRadius:"15px",p:1,maxWidth:"400px"}},children:[l.jsx(g.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:l.jsx(g.IconButton,{onClick:t,size:"small",children:l.jsx(Vr,{fontSize:"small"})})}),l.jsxs(g.DialogContent,{sx:{textAlign:"center",pt:0},children:[l.jsx(g.Box,{sx:{mb:2,display:"flex",justifyContent:"center"},children:s}),l.jsx(g.Typography,{variant:"h6",sx:{fontWeight:"bold",mb:2},children:n}),l.jsx(g.Typography,{variant:"body2",sx:{color:"#555",mb:4,px:2},children:o}),l.jsxs(g.Box,{sx:{display:"flex",gap:2,justifyContent:"center",mb:2},children:[l.jsx(g.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none",borderRadius:"8px",px:4,borderColor:"#1976D2",color:"#1976D2"},children:"Regresar"}),l.jsxs(g.Button,{variant:"contained",onClick:r,disabled:c,sx:{textTransform:"none",borderRadius:"8px",px:4,bgcolor:a,"&:hover":{bgcolor:"#b71c1c"}},children:[i=="Eliminar"&&l.jsx("img",{src:x3,width:15,style:{marginRight:6,marginBottom:2}}),c?"Procesando...":i]})]})]})]}),w3=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=y.useState(new Date),[a,c]=y.useState([]),[u,d]=y.useState(!1),[f,h]=y.useState(null),[v,m]=y.useState(!1),[p,b]=y.useState(null),[w,C]=y.useState([]),{enqueueSnackbar:E}=ws.useSnackbar(),S=Ic(),_=Pi(),W=Cc(),[D,A]=y.useState(!1),[M,I]=y.useState([]),[H,G]=y.useState(null),{session:F,sessionoutlook:Y}=uc(),{googleEvents:oe,setGoogleEvents:V,outlookEvents:N,setOutlookEvents:ae}=m3(),[fe,$]=y.useState([]),[Q,Ce]=y.useState([]),[me,we]=y.useState([]),[ie,ee]=y.useState(!1),[ce,ge]=y.useState([]),[de,pe]=y.useState(),Re=(J,Me)=>{I(J),G(Me),A(!0)},j=async()=>{if(e===void 0)return;const J=await S.getNotificacionesXUsuario(e,!1);ge(J)};y.useEffect(()=>{const J=new Date,Me=x.startOfDay(J),ke=x.endOfDay(x.addDays(Me,6)),je={start:Me,end:ke},Gt=a.filter(er=>{const Yt={start:er.fechaInicio,end:er.fechaFin};return Hd(Yt,je)}).sort((er,Yt)=>er.fechaInicio.getTime()-Yt.fechaInicio.getTime());C(Gt)},[a]),y.useEffect(()=>{const J=async()=>{try{if(e){const ke=await S.getEventsByUser(e);j(),c(ke)}}catch(ke){console.log("Error al cargar eventos locales:",ke)}};J();const Me=setInterval(J,4e3);return()=>clearInterval(Me)},[e]),y.useEffect(()=>{if(!n||!e)return;const J=[...a];if(oe.length>0&&F?.userEmail){const Me=oe.map(ke=>g3(ke,n,e));J.push(...Me)}if(N.length>0&&Y?.userEmail){const Me=N.map(ke=>b3(ke,n,e));J.push(...Me)}$(J)},[a,oe,N,n,e,F?.userEmail,Y?.userEmail]);const Fe=async J=>{try{if(J?.isGoogleEvent||J.isOutlookEvent)h(J),d(!0);else{const Me=await S.getEventById(J.eventoID);h(Me),d(!0)}}catch(Me){console.error(Me)}},qe=()=>{d(!1),h(null)},Ze=async(J,Me)=>{let ke,je;J.todoElDia?(ke=new Date(`${J.fechaInicio}T${J.horaInicio}`),je=new Date(`${J.fechaInicio}T${J.horaFin}`)):(ke=new Date(`${J.fechaInicio}T${J.horaInicio}`),je=J.fechaFin&&J.horaFin?new Date(`${J.fechaFin}T${J.horaFin}`):new Date(`${J.fechaInicio}T${J.horaFin}`));const Gt=x.format(ke,"yyyy-MM-dd HH:mm:ss.SSS"),er=x.format(je,"yyyy-MM-dd HH:mm:ss.SSS");if(Me){const Hr={...J,eventoID:Me,fechaInicio:Gt,fechaFin:er,solID:J.solID??null,disID:n??null,client:J.client,invitados:J.invitados.map(Ke=>({usrNombre:Ke.nombre||Ke.usrNombre,Correo:Ke.correo||Ke.Correo,EsOrganizador:Ke.isHost||Ke.EsOrganizador,StatusInvitacion:Ke.StatusInvitacion,UsuarioID:Ke.usrID||Ke.UsuarioID,disID:Ke.disID||n}))};try{const Ke=await S.updateEvent(Hr);var Yt=a.map(wr=>wr.eventoID===Ke.eventoID?Ke:wr);c(Yt),E("El evento se ha actualizado correctamente.",{variant:"success"}),qe()}catch{E("Error al actualizar Evento",{variant:"error"})}}else{const Hr={...J,fechaInicio:Gt,fechaFin:er,todoElDia:J.todoElDia,solID:J.solID??null,disID:n??null,client:J.client,invitados:J.invitados.map(Ke=>({usrNombre:Ke.nombre||Ke.usrNombre,Correo:Ke.correo||Ke.Correo,EsOrganizador:Ke.isHost||Ke.EsOrganizador,StatusInvitacion:Ke.StatusInvitacion,UsuarioID:Ke.usrID||Ke.UsuarioID,disID:Ke.disID||n}))};try{const Ke=await S.createEvent(Hr,e);c(wr=>[...wr,Ke]),E("El evento se ha creado con éxito",{variant:"success"}),qe()}catch{E("Error al guardar Evento",{variant:"error"})}}if(e){const Hr=await S.getEventsByUser(e);c(Hr)}},Ne=()=>{i(J=>new Date(J.getFullYear(),J.getMonth()-1,1))},Be=()=>{i(J=>new Date(J.getFullYear(),J.getMonth()+1,1))},vt=()=>{ue("ELIMINAR")},ht=()=>{ue("RECHAZAR")},k=()=>{b(new Date),d(!0)},P=J=>{J&&i(J)},B=J=>{b(J),d(!0),h(null)},le=async()=>{if(f)try{await S.deleteEvent(f.eventoID),c(a.filter(J=>J.eventoID!==f.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(J,Me)=>l.jsx(rl,{id:J,message:String(Me),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{qe(),Ee()}},se=async()=>{if(!(!F?.userEmail||!n)){ee(!0);try{const Me=(await _.getGoogleCalendars(F.userEmail,n)).map(je=>({...je,selected:!0}));Ce(Me);const ke=Me.map(je=>je.id);Oe(ke)}catch(J){console.error("Error Google Cals:",J)}finally{ee(!1)}}},O=async J=>{const Me=Q.map(je=>je.id===J?{...je,selected:!je.selected}:je);Ce(Me);const ke=Me.filter(je=>je.selected).map(je=>je.id);Oe(ke)},ne=async()=>{if(!(!Y?.userEmail||!n)){ee(!0);try{const Me=(await W.getOutlookCalendars(Y.userEmail,n)).map(je=>({...je,selected:!0}));we(Me);const ke=Me.map(je=>je.id);R(ke)}catch(J){console.error("Error Outlook Cals:",J)}finally{ee(!1)}}},Se=async J=>{const Me=me.map(je=>je.id===J?{...je,selected:!je.selected}:je);we(Me);const ke=Me.filter(je=>je.selected).map(je=>je.id);R(ke)};y.useEffect(()=>{se()},[F?.userEmail,n]),y.useEffect(()=>{ne()},[Y?.userEmail,n]);const Oe=async J=>{if(!F?.userEmail||!n)return;const Me=J||Q.filter(ke=>ke.selected).map(ke=>ke.id);try{const ke={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F.userEmail,calendarIds:Me},je=await _.getGoogleEventsByMonth(ke);V(je)}catch(ke){console.error("Error al obtener eventos de Google:",ke)}},R=async J=>{if(!Y?.userEmail||!n)return;const Me=J||me.filter(ke=>ke.selected).map(ke=>ke.id);try{const ke={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Y.userEmail,calendarIds:Me},je=await W.getOutlookEventsByMonth(ke);ae(je)}catch(ke){console.error("Error al obtener eventos de Outlook:",ke)}};if(n===void 0||e===void 0)return l.jsx("div",{children:"Cargando configuración de usuario..."});const te=async(J,Me)=>{await S.UpdateStatusEvento(J.evento.eventoID,e,Me)&&(await S.MarcarLeido(J.notificacionID,e),E(J?.evento?.titulo+" fue agregado a tu calendario",{variant:"success"}))},_e=async()=>{de&&S.UpdateStatusEvento(de.evento.eventoID,e,"RECHAZADA")&&(await S.MarcarLeido(de.notificacionID,e),await S.MarcarLeido(de.notificacionID,e),E("Haz rechazado la Invitación a "+de?.evento?.titulo,{content:(Me,ke)=>l.jsx(rl,{id:Me,message:String(ke),variant:"rechazar"})}),Ee())},Ge=async(J,Me)=>{try{if(!e)return;pe(J),Me=="RECHAZADA"?(ht(),console.log("noti",J)):te(J,Me)}catch{E("Error al procesar la invitación",{variant:"error"})}},[q,ue]=y.useState(null),Ee=()=>ue(null),Te={RECHAZAR:{title:"Rechazar invitación",confirmText:"Rechazar evento",description:l.jsxs(l.Fragment,{children:["Estás a punto de declinar la invitación de ",l.jsx("strong",{children:de?.evento?.nombreAnfitrion})," a ",l.jsx("strong",{children:de?.evento?.titulo})]}),icon:l.jsx("img",{src:Gh}),action:()=>de&&_e()},ELIMINAR:{title:"Eliminar evento",confirmText:"Eliminar",description:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer.",icon:l.jsx("img",{src:Gh}),action:()=>le()},DESVINCULAR:{title:"Desvincular Outlook",confirmText:"Desvincular",description:"Si desvinculas tu cuenta, perderás acceso a todos los eventos sincronizados.",icon:"",action:()=>le}},Ve=q?Te[q]:null;return l.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[l.jsx(py,{header:l.jsx(Pb,{currentDate:s,onPrevMonth:Ne,onNextMonth:Be,onAddEvent:k,onDateChange:P}),sidebar:l.jsx(gw,{onEventClick:Fe,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:k,googleCalendars:Q,outlookCalendars:me,isLoadingCalendars:ie,onToggleGoogle:O,onToggleOutlook:Se,notifications:ce,unreadCount:ce?.filter(J=>!J.leida).length,onAceppInvitacion:Ge}),mainContent:l.jsx(Iw,{onSeeMoreClick:Re,currentDate:s,events:fe,onDayClick:B,onEventClick:Fe})}),u&&l.jsx(n3,{isVisible:u,onClose:qe,onSave:Ze,onDelete:vt,selectedDate:p,initialEvent:f,userId:e,masNombreBD:o,disId:n}),l.jsx(s3,{isOpen:D,onClose:()=>A(!1),events:M,date:H,onEventClick:Fe}),Ve&&l.jsx(_3,{open:!!q,onClose:Ee,onConfirm:()=>{Ve.action()},title:Ve.title,description:Ve.description,icon:Ve.icon,confirmText:Ve.confirmText})]})},S3="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",C3="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 nl(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function E3(e,t){const r=e??"",n=t??"";return r instanceof Date&&n instanceof Date?r.getTime()-n.getTime():typeof r=="number"&&typeof n=="number"?r-n:typeof r=="boolean"&&typeof n=="boolean"?Number(r)-Number(n):String(r).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function ol(e,t,r=!0){return typeof e=="function"?e(t):e??r}function D3(e){return e.replace(/[^\d]/g,"")}function k3(e,t){return t}var us={},Kh;function A3(){if(Kh)return us;Kh=1;var e=Je();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(lt()),r=rt();return us.default=(0,t.default)((0,r.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),us}var T3=A3();const I3=Xe(T3);var ds={},Qh;function M3(){if(Qh)return ds;Qh=1;var e=Je();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(lt()),r=rt();return ds.default=(0,t.default)((0,r.jsx)("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded"),ds}var P3=M3();const O3=Xe(P3);var fs={},Xh;function j3(){if(Xh)return fs;Xh=1;var e=Je();Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t=e(lt()),r=rt();return fs.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),fs}var R3=j3();const N3=Xe(R3);var ps={},Jh;function $3(){if(Jh)return ps;Jh=1;var e=Je();Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var t=e(lt()),r=rt();return ps.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),ps}var L3=$3();const z3=Xe(L3);function e0(e){return e==="right"?"end":e==="center"?"center":"start"}function t0(e){const t=e.filter(r=>!r.width).length||1;return e.map(r=>typeof r.width=="number"?`${r.width}px`:typeof r.width=="string"?r.width:`minmax(0, ${1/t}fr)`).join(" ")}const B3=1060,sl=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function F3({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=B3,getDetailColumns:o,onRowClick:s}){function c(d){if(typeof d=="number")return d;if(!d)return 0;const f=/^(\d+)\s*px$/.exec(d.trim());return f?Number(f[1]):/fr$/i.test(d)?160:0}function u(d){const f=d.reduce((m,p)=>m+c(p.width),0),h=Math.max(d.length-1,0)*16;return f+h+32}return l.jsx(g.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:l.jsxs(g.Box,{children:[l.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(d=>typeof d=="number"?`${d}px`:d).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"#1E5BCE",color:"#fff",boxSizing:"border-box"},children:["Tipo","En Proceso","Finalizadas","Último seg."].map(d=>l.jsx(g.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[h,v]=K.useState(!!d.initiallyOpen),m=f%2===1,p=o?o(d):t,b=Math.max(n,u(p));return l.jsxs(g.Box,{children:[l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(w=>typeof w=="number"?`${w}px`:w).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:m?"rgba(30,91,206,0.06)":"background.paper",borderTop:"1px solid rgba(0,0,0,0.08)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>v(w=>!w),children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[l.jsx(g.IconButton,{size:"small",disableRipple:!0,children:h?l.jsx(z3,{}):l.jsx(N3,{})}),l.jsx(g.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),l.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:sl(d,"En Proceso")}),l.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:sl(d,"Finalizadas")}),l.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:sl(d,"Último seg.")})]}),l.jsx(g.Collapse,{in:h,unmountOnExit:!0,children:l.jsxs(g.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[l.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:t0(p),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"rgba(30,91,206,0.18)",color:"#1a1a1a",borderTop:"1px solid rgba(0,0,0,0.12)",boxSizing:"border-box"},children:p.map(w=>l.jsx(g.Typography,{sx:{justifySelf:e0(w.align),textAlign:w.align??"left",fontSize:12.5,fontWeight:800,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:w.header},w.key))}),(d.rows??[]).map((w,C)=>l.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:t0(p),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:C%2===0?"background.paper":"rgba(30,91,206,0.06)",borderTop:"1px solid rgba(0,0,0,0.06)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>s?.(w,d),children:p.map((E,S)=>{const _=E.accessor?E.accessor(w,C):E.field?w[E.field]:null;return l.jsx(g.Box,{sx:{justifySelf:e0(E.align),textAlign:E.align??"left",minWidth:0,overflow:"hidden",maxWidth:"100%"},children:typeof _=="string"||typeof _=="number"?l.jsx(g.Typography,{sx:{fontSize:13,fontWeight:/^(estatus|seg|avance|nivel|asesor|fecha)$/i.test(E.key)?700:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(_),children:_}):_},E.key??S)})},w.id??C))]})})]},d.id)})]})})}var hs={},r0;function W3(){if(r0)return hs;r0=1;var e=Je();Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=void 0;var t=e(lt()),r=rt();return hs.default=(0,t.default)((0,r.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 2m3.3 14.71L11 12.41V7h2v4.59l3.71 3.71z"}),"AccessTimeFilled"),hs}var V3=W3();const U3=Xe(V3),H3=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",Y3=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},q3=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var ms={},n0;function Z3(){if(n0)return ms;n0=1;var e=Je();Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var t=e(lt()),r=rt();return ms.default=(0,t.default)((0,r.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),ms}var G3=Z3();const K3=Xe(G3),il=({current:e=0,total:t=0,color:r="#4caf50"})=>l.jsx("div",{style:{display:"flex",gap:"1px",width:"100%",height:"100%",justifyContent:"center",overflow:"hidden",minWidth:0},children:Array.from({length:t}).map((n,o)=>l.jsx("div",{style:{width:"7px",height:"7px",borderRadius:"2px",backgroundColor:o<e?r:"#e0e0e0",display:"flex"}},o))});var gs={},o0;function Q3(){if(o0)return gs;o0=1;var e=Je();Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=void 0;var t=e(lt()),r=rt();return gs.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),gs}var X3=Q3();const s0=Xe(X3),J3=e=>{const t=String(e??"").toLowerCase().trim();return t==="muy interesado"?{bg:"#E53935",color:"#FFFFFF"}:t==="interesado"?{bg:"#FB8C00",color:"#FFFFFF"}:t==="venta definitiva"?{bg:"#2E7D32",color:"#FFFFFF"}:t==="no sé"||t==="no se"?{bg:"#9E9E9E",color:"#FFFFFF"}:t==="algo interesado"?{bg:"#FFEB3B",color:"#000000"}:{bg:"transparent",color:"#2c2c2c"}},eA=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por Asignar";case 2:return"Solicitud Asignada";case 3:return"Solicitud asignada en proceso";case 4:return"Finalizadas sin Venta";case 5:return"Finalizadas con Venta";case 6:return"Rechazadas";case 7:return"Finalizada por sistema";case 8:return"";case 9:return"";case 10:return"Prospección";case 11:return"Interés Real";case 12:return"Proceso de Compra";case 13:return"";case 14:return"En espera de Unidad";case 15:return"Auto Facturado";case 16:return"";case 17:return"";case 18:return"Compró otra Marca";case 19:return"No comprará";default:return null}},tA=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por asignar";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 6:return"Rechazada";case 7:return"Finalizada sin enviar a Ventas";case 8:return"Finalizada enviado a Ventas";default:return null}},rA=e=>{switch(parseInt(String(e??""),10)){case 0:return"Sin asignar";case 1:return"Confirmado";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 4:return"Confirmado";case 5:return"Finalizada";case 6:return"Rechazada";case 10:return"Reagendado";case 20:return"Seguimiento [Cita Finalizada]";case 30:return"Reenvio";case 40:return"Seguimiento [Mecanico]";case 50:return"Seguimiento";default:return null}};function nA(e){const t=new Date(e),r=t.toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}),n=t.toLocaleTimeString("es-MX",{hour:"2-digit",minute:"2-digit"});return`${r.replace(".","")} • ${n}`}function oA(e){return e.replace(/<br\s*\/?>/gi,`
177
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");const C=v.compile();return(E,S)=>C(h,E,S)};let s;const i=Vi,a=!$p.jitless,l=a&&rS.value,d=t.catchall;let f;e._zod.parse=(h,v)=>{f??(f=n.value);const m=h.value;return i(m)?a&&l&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),h=s(h,v),d?th([],m,h,v,f,e):h):r(h,v):(h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h)}});function rh(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Jn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>kn(i,n,Dn())))}),t)}const YC=Z("$ZodUnion",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),gt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),gt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),gt(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>qc(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},s);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(c=>rh(c,o,e,s)):rh(a,o,e,s)}}),qC=Z("$ZodIntersection",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,l])=>nh(r,c,l)):nh(r,s,i)}});function Qc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Qo(e)&&Qo(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Qc(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Qc(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function nh(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Jn(e))return e;const n=Qc(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const ZC=Z("$ZodEnum",(e,t)=>{Mt.init(e,t);const r=Jw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>nS.has(typeof o)).map(o=>typeof o=="string"?Xn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),GC=Z("$ZodLiteral",(e,t)=>{if(Mt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Xn(r):r?Xn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,n)=>{const o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),KC=Z("$ZodTransform",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Np(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Kn;return r.value=o,r}});function oh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const QC=Z("$ZodOptional",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",gt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),gt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${qc(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>oh(s,r.value)):oh(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),XC=Z("$ZodNullable",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),gt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${qc(r.source)}|null)$`):void 0}),gt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),JC=Z("$ZodDefault",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",gt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>sh(s,t)):sh(o,t)}});function sh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const eE=Z("$ZodPrefault",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",gt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),tE=Z("$ZodNonOptional",(e,t)=>{Mt.init(e,t),gt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>ih(s,e)):ih(o,e)}});function ih(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const rE=Z("$ZodCatch",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),gt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>kn(i,n,Dn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>kn(s,n,Dn()))},input:r.value}),r.issues=[]),r)}}),nE=Z("$ZodPipe",(e,t)=>{Mt.init(e,t),gt(e._zod,"values",()=>t.in._zod.values),gt(e._zod,"optin",()=>t.in._zod.optin),gt(e._zod,"optout",()=>t.out._zod.optout),gt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Xi(i,t.in,n)):Xi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Xi(s,t.out,n)):Xi(o,t.out,n)}});function Xi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const oE=Z("$ZodReadonly",(e,t)=>{Mt.init(e,t),gt(e._zod,"propValues",()=>t.innerType._zod.propValues),gt(e._zod,"values",()=>t.innerType._zod.values),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(ah):ah(o)}});function ah(e){return e.value=Object.freeze(e.value),e}const sE=Z("$ZodCustom",(e,t)=>{ar.init(e,t),Mt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>ch(s,r,n,e));ch(o,r,n,e)}});function ch(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Xo(o))}}class iE{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function aE(){return new iE}const Ji=aE();function cE(e,t){return new e({type:"string",...Te(t)})}function lE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Te(t)})}function lh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Te(t)})}function uE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Te(t)})}function dE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Te(t)})}function fE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Te(t)})}function pE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Te(t)})}function hE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Te(t)})}function mE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Te(t)})}function gE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Te(t)})}function vE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Te(t)})}function yE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Te(t)})}function bE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Te(t)})}function xE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Te(t)})}function _E(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Te(t)})}function wE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Te(t)})}function SE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Te(t)})}function CE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Te(t)})}function EE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Te(t)})}function DE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Te(t)})}function kE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Te(t)})}function AE(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Te(t)})}function TE(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Te(t)})}function IE(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Te(t)})}function ME(e,t){return new e({type:"string",format:"date",check:"string_format",...Te(t)})}function PE(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Te(t)})}function OE(e,t){return new e({type:"string",format:"duration",check:"string_format",...Te(t)})}function jE(e,t){return new e({type:"number",checks:[],...Te(t)})}function RE(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Te(t)})}function NE(e,t){return new e({type:"boolean",...Te(t)})}function $E(e){return new e({type:"unknown"})}function LE(e,t){return new e({type:"never",...Te(t)})}function uh(e,t){return new Gp({check:"less_than",...Te(t),value:e,inclusive:!1})}function Xc(e,t){return new Gp({check:"less_than",...Te(t),value:e,inclusive:!0})}function dh(e,t){return new Kp({check:"greater_than",...Te(t),value:e,inclusive:!1})}function Jc(e,t){return new Kp({check:"greater_than",...Te(t),value:e,inclusive:!0})}function fh(e,t){return new eC({check:"multiple_of",...Te(t),value:e})}function ph(e,t){return new rC({check:"max_length",...Te(t),maximum:e})}function ea(e,t){return new nC({check:"min_length",...Te(t),minimum:e})}function hh(e,t){return new oC({check:"length_equals",...Te(t),length:e})}function zE(e,t){return new sC({check:"string_format",format:"regex",...Te(t),pattern:e})}function BE(e){return new iC({check:"string_format",format:"lowercase",...Te(e)})}function FE(e){return new aC({check:"string_format",format:"uppercase",...Te(e)})}function WE(e,t){return new cC({check:"string_format",format:"includes",...Te(t),includes:e})}function VE(e,t){return new lC({check:"string_format",format:"starts_with",...Te(t),prefix:e})}function HE(e,t){return new uC({check:"string_format",format:"ends_with",...Te(t),suffix:e})}function Jo(e){return new dC({check:"overwrite",tx:e})}function UE(e){return Jo(t=>t.normalize(e))}function YE(){return Jo(e=>e.trim())}function qE(){return Jo(e=>e.toLowerCase())}function ZE(){return Jo(e=>e.toUpperCase())}function GE(e,t,r){return new e({type:"array",element:t,...Te(r)})}function KE(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Te(r)})}function QE(e){const t=XE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Xo(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Xo(o))}},e(r.value,r)));return t}function XE(e,t){const r=new ar({check:"custom",...Te(t)});return r._zod.check=e,r}function mh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function JE(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,l=c&&c[n.code];r[i]=zc(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function eD(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if(n.code==="invalid_union"&&n.errors.length>0){var a=n.errors[0][0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(d){return d.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,l=c&&c[n.code];r[i]=zc(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function tD(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,s){try{return Promise.resolve(mh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Vc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:jp(JE(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(mh(function(){return Promise.resolve((r.mode==="sync"?mS:gS)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Vc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Gc})(i))return{values:{},errors:jp(eD(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const rD=Z("ZodISODateTime",(e,t)=>{EC.init(e,t),kt.init(e,t)});function nD(e){return IE(rD,e)}const oD=Z("ZodISODate",(e,t)=>{DC.init(e,t),kt.init(e,t)});function sD(e){return ME(oD,e)}const iD=Z("ZodISOTime",(e,t)=>{kC.init(e,t),kt.init(e,t)});function aD(e){return PE(iD,e)}const cD=Z("ZodISODuration",(e,t)=>{AC.init(e,t),kt.init(e,t)});function lD(e){return OE(cD,e)}const xr=Z("ZodError",(e,t)=>{Gc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>hS(e,r)},flatten:{value:r=>pS(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Hc,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Hc,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),uD=Yi(xr),dD=qi(xr),fD=Zi(xr),pD=Gi(xr),hD=bS(xr),mD=xS(xr),gD=_S(xr),vD=wS(xr),yD=SS(xr),bD=CS(xr),xD=ES(xr),_D=DS(xr),Lt=Z("ZodType",(e,t)=>(Mt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>cn(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>uD(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>fD(e,r,n),e.parseAsync=async(r,n)=>dD(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>pD(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>hD(e,r,n),e.decode=(r,n)=>mD(e,r,n),e.encodeAsync=async(r,n)=>gD(e,r,n),e.decodeAsync=async(r,n)=>vD(e,r,n),e.safeEncode=(r,n)=>yD(e,r,n),e.safeDecode=(r,n)=>bD(e,r,n),e.safeEncodeAsync=async(r,n)=>xD(e,r,n),e.safeDecodeAsync=async(r,n)=>_D(e,r,n),e.refine=(r,n)=>e.check(pk(r,n)),e.superRefine=r=>e.check(hk(r)),e.overwrite=r=>e.check(Jo(r)),e.optional=()=>Eh(e),e.nullable=()=>Dh(e),e.nullish=()=>Eh(Dh(e)),e.nonoptional=r=>ik(e,r),e.array=()=>_h(e),e.or=r=>ZD([e,r]),e.and=r=>KD(e,r),e.transform=r=>Ah(e,ek(r)),e.default=r=>nk(e,r),e.prefault=r=>sk(e,r),e.catch=r=>ck(e,r),e.pipe=r=>Ah(e,r),e.readonly=()=>dk(e),e.describe=r=>{const n=e.clone();return Ji.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Ji.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ji.get(e);const n=e.clone();return Ji.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),gh=Z("_ZodString",(e,t)=>{Kc.init(e,t),Lt.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(zE(...n)),e.includes=(...n)=>e.check(WE(...n)),e.startsWith=(...n)=>e.check(VE(...n)),e.endsWith=(...n)=>e.check(HE(...n)),e.min=(...n)=>e.check(ea(...n)),e.max=(...n)=>e.check(ph(...n)),e.length=(...n)=>e.check(hh(...n)),e.nonempty=(...n)=>e.check(ea(1,...n)),e.lowercase=n=>e.check(BE(n)),e.uppercase=n=>e.check(FE(n)),e.trim=()=>e.check(YE()),e.normalize=(...n)=>e.check(UE(...n)),e.toLowerCase=()=>e.check(qE()),e.toUpperCase=()=>e.check(ZE())}),wD=Z("ZodString",(e,t)=>{Kc.init(e,t),gh.init(e,t),e.email=r=>e.check(lE(SD,r)),e.url=r=>e.check(hE(CD,r)),e.jwt=r=>e.check(TE(zD,r)),e.emoji=r=>e.check(mE(ED,r)),e.guid=r=>e.check(lh(vh,r)),e.uuid=r=>e.check(uE(ta,r)),e.uuidv4=r=>e.check(dE(ta,r)),e.uuidv6=r=>e.check(fE(ta,r)),e.uuidv7=r=>e.check(pE(ta,r)),e.nanoid=r=>e.check(gE(DD,r)),e.guid=r=>e.check(lh(vh,r)),e.cuid=r=>e.check(vE(kD,r)),e.cuid2=r=>e.check(yE(AD,r)),e.ulid=r=>e.check(bE(TD,r)),e.base64=r=>e.check(DE(ND,r)),e.base64url=r=>e.check(kE($D,r)),e.xid=r=>e.check(xE(ID,r)),e.ksuid=r=>e.check(_E(MD,r)),e.ipv4=r=>e.check(wE(PD,r)),e.ipv6=r=>e.check(SE(OD,r)),e.cidrv4=r=>e.check(CE(jD,r)),e.cidrv6=r=>e.check(EE(RD,r)),e.e164=r=>e.check(AE(LD,r)),e.datetime=r=>e.check(nD(r)),e.date=r=>e.check(sD(r)),e.time=r=>e.check(aD(r)),e.duration=r=>e.check(lD(r))});function _r(e){return cE(wD,e)}const kt=Z("ZodStringFormat",(e,t)=>{wt.init(e,t),gh.init(e,t)}),SD=Z("ZodEmail",(e,t)=>{gC.init(e,t),kt.init(e,t)}),vh=Z("ZodGUID",(e,t)=>{hC.init(e,t),kt.init(e,t)}),ta=Z("ZodUUID",(e,t)=>{mC.init(e,t),kt.init(e,t)}),CD=Z("ZodURL",(e,t)=>{vC.init(e,t),kt.init(e,t)}),ED=Z("ZodEmoji",(e,t)=>{yC.init(e,t),kt.init(e,t)}),DD=Z("ZodNanoID",(e,t)=>{bC.init(e,t),kt.init(e,t)}),kD=Z("ZodCUID",(e,t)=>{xC.init(e,t),kt.init(e,t)}),AD=Z("ZodCUID2",(e,t)=>{_C.init(e,t),kt.init(e,t)}),TD=Z("ZodULID",(e,t)=>{wC.init(e,t),kt.init(e,t)}),ID=Z("ZodXID",(e,t)=>{SC.init(e,t),kt.init(e,t)}),MD=Z("ZodKSUID",(e,t)=>{CC.init(e,t),kt.init(e,t)}),PD=Z("ZodIPv4",(e,t)=>{TC.init(e,t),kt.init(e,t)}),OD=Z("ZodIPv6",(e,t)=>{IC.init(e,t),kt.init(e,t)}),jD=Z("ZodCIDRv4",(e,t)=>{MC.init(e,t),kt.init(e,t)}),RD=Z("ZodCIDRv6",(e,t)=>{PC.init(e,t),kt.init(e,t)}),ND=Z("ZodBase64",(e,t)=>{OC.init(e,t),kt.init(e,t)}),$D=Z("ZodBase64URL",(e,t)=>{RC.init(e,t),kt.init(e,t)}),LD=Z("ZodE164",(e,t)=>{NC.init(e,t),kt.init(e,t)}),zD=Z("ZodJWT",(e,t)=>{LC.init(e,t),kt.init(e,t)}),yh=Z("ZodNumber",(e,t)=>{Xp.init(e,t),Lt.init(e,t),e.gt=(n,o)=>e.check(dh(n,o)),e.gte=(n,o)=>e.check(Jc(n,o)),e.min=(n,o)=>e.check(Jc(n,o)),e.lt=(n,o)=>e.check(uh(n,o)),e.lte=(n,o)=>e.check(Xc(n,o)),e.max=(n,o)=>e.check(Xc(n,o)),e.int=n=>e.check(bh(n)),e.safe=n=>e.check(bh(n)),e.positive=n=>e.check(dh(0,n)),e.nonnegative=n=>e.check(Jc(0,n)),e.negative=n=>e.check(uh(0,n)),e.nonpositive=n=>e.check(Xc(0,n)),e.multipleOf=(n,o)=>e.check(fh(n,o)),e.step=(n,o)=>e.check(fh(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ra(e){return jE(yh,e)}const BD=Z("ZodNumberFormat",(e,t)=>{zC.init(e,t),yh.init(e,t)});function bh(e){return RE(BD,e)}const FD=Z("ZodBoolean",(e,t)=>{BC.init(e,t),Lt.init(e,t)});function na(e){return NE(FD,e)}const WD=Z("ZodUnknown",(e,t)=>{FC.init(e,t),Lt.init(e,t)});function xh(){return $E(WD)}const VD=Z("ZodNever",(e,t)=>{WC.init(e,t),Lt.init(e,t)});function HD(e){return LE(VD,e)}const UD=Z("ZodArray",(e,t)=>{VC.init(e,t),Lt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(ea(r,n)),e.nonempty=r=>e.check(ea(1,r)),e.max=(r,n)=>e.check(ph(r,n)),e.length=(r,n)=>e.check(hh(r,n)),e.unwrap=()=>e.element});function _h(e,t){return GE(UD,e,t)}const YD=Z("ZodObject",(e,t)=>{UC.init(e,t),Lt.init(e,t),gt(e,"shape",()=>t.shape),e.keyof=()=>Sh(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:xh()}),e.loose=()=>e.clone({...e._zod.def,catchall:xh()}),e.strict=()=>e.clone({...e._zod.def,catchall:HD()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>cS(e,r),e.safeExtend=r=>lS(e,r),e.merge=r=>uS(e,r),e.pick=r=>iS(e,r),e.omit=r=>aS(e,r),e.partial=(...r)=>dS(Ch,e,r[0]),e.required=(...r)=>fS(kh,e,r[0])});function wh(e,t){const r={type:"object",get shape(){return an(this,"shape",e?tS(e):{}),this.shape},...Te(t)};return new YD(r)}const qD=Z("ZodUnion",(e,t)=>{YC.init(e,t),Lt.init(e,t),e.options=t.options});function ZD(e,t){return new qD({type:"union",options:e,...Te(t)})}const GD=Z("ZodIntersection",(e,t)=>{qC.init(e,t),Lt.init(e,t)});function KD(e,t){return new GD({type:"intersection",left:e,right:t})}const el=Z("ZodEnum",(e,t)=>{ZC.init(e,t),Lt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new el({...t,checks:[],...Te(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new el({...t,checks:[],...Te(o),entries:s})}});function Sh(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new el({type:"enum",entries:r,...Te(t)})}const QD=Z("ZodLiteral",(e,t)=>{GC.init(e,t),Lt.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function XD(e,t){return new QD({type:"literal",values:Array.isArray(e)?e:[e],...Te(t)})}const JD=Z("ZodTransform",(e,t)=>{KC.init(e,t),Lt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Np(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Xo(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Xo(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function ek(e){return new JD({type:"transform",transform:e})}const Ch=Z("ZodOptional",(e,t)=>{QC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Eh(e){return new Ch({type:"optional",innerType:e})}const tk=Z("ZodNullable",(e,t)=>{XC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dh(e){return new tk({type:"nullable",innerType:e})}const rk=Z("ZodDefault",(e,t)=>{JC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function nk(e,t){return new rk({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Fp(t)}})}const ok=Z("ZodPrefault",(e,t)=>{eE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function sk(e,t){return new ok({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Fp(t)}})}const kh=Z("ZodNonOptional",(e,t)=>{tE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ik(e,t){return new kh({type:"nonoptional",innerType:e,...Te(t)})}const ak=Z("ZodCatch",(e,t)=>{rE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ck(e,t){return new ak({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const lk=Z("ZodPipe",(e,t)=>{nE.init(e,t),Lt.init(e,t),e.in=t.in,e.out=t.out});function Ah(e,t){return new lk({type:"pipe",in:e,out:t})}const uk=Z("ZodReadonly",(e,t)=>{oE.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function dk(e){return new uk({type:"readonly",innerType:e})}const fk=Z("ZodCustom",(e,t)=>{sE.init(e,t),Lt.init(e,t)});function pk(e,t={}){return KE(fk,e,t)}function hk(e){return QE(e)}const Th=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,Ih=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(n,o,s,a,c);return isNaN(l.getTime())||!x.isValid(l)?null:l},mk=wh({UsuarioID:ra().nullable().optional(),disID:ra().nullable().optional(),EsOrganizador:na().default(!1),Correo:_r().email("Formato de correo inválido"),StatusInvitacion:Sh(["PENDIENTE","CONFIRMADO","DECLINADO"]).default("PENDIENTE")}),gk=wh({titulo:_r().min(1,"El campo Título es requerido.").refine(e=>!e.startsWith(" "),{message:"El título no puede empezar con un espacio en blanco"}),fechaInicio:_r().min(1,"El campo fecha inicio es requerido."),horaInicio:_r().min(1,"La hora de inicio es requerida.").regex(Th,{message:"Formato inválido"}),horaFin:_r().min(1,"La hora fin es requerida.").regex(Th,{message:"Formato inválido"}),todoElDia:na(),fechaFin:_r().optional(),showEndDate:na().optional(),horaInicio2:_r().optional(),TodoElDia2:na().optional(),client:_r().nullable().optional(),repetir:_r().optional(),link:_r().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(XD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:_r().optional(),invitados:_h(mk).optional().default([]),color:_r().optional(),solID:ra().nullable().optional(),disID:ra().nullable().optional()}).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 t=Ih(e.fechaInicio,e.horaInicio),r=Ih(e.fechaFin,e.horaFin);return!t||!r||!x.isValid(t)||!x.isValid(r)?!0:!(x.isBefore(r,t)&&!x.isSameDay(r,t)||x.isSameDay(t,r)&&x.isBefore(r,t))},{message:"",path:["horaFin"]}),Mh=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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"})),vk="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",yk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{clipPath:"url(#a)"},K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Ph="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",bk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},K.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"}),K.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"}),K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),xk="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",_k=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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"}));var es={},Oh;function wk(){if(Oh)return es;Oh=1;var e=Je();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(lt()),r=rt();return es.default=(0,t.default)((0,r.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),es}var Sk=wk();const jh=Xe(Sk);var ts={},Rh;function Ck(){if(Rh)return ts;Rh=1;var e=Je();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(lt()),r=rt();return ts.default=(0,t.default)((0,r.jsx)("path",{d:"M16.53 11.06 15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14z"}),"EventAvailable"),ts}var Ek=Ck();const Dk=Xe(Ek);var rs={},Nh;function kk(){if(Nh)return rs;Nh=1;var e=Je();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(lt()),r=rt();return rs.default=(0,t.default)((0,r.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),rs}var Ak=kk();const Tk=Xe(Ak),Ik="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAElBMVEUAAABpbXlpbXlobXhpbnppbnkdzkEGAAAABXRSTlMAgJ5Y75poDcUAAAA3SURBVBjTYyANiBog2IyhSBzRQGQJASSJIGQJBSIkTBESCA5CGcIAoqUEGDAdiukFBhE4hzAAAK+MB7AghHQFAAAAAElFTkSuQmCC";var ns={},$h;function Mk(){if($h)return ns;$h=1;var e=Je();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(lt()),r=rt();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),ns}var Pk=Mk();const Lh=Xe(Pk),Ok=e=>{const t=["#A17B4B","#7B5BE4","#F9A825","#4A90E2","#5CC85C","#FDD835","#E53935","#B0BEC5"],r=e.charCodeAt(0)%t.length;return t[r]},jk=(e,t)=>{if(t)return u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#1976D2"},children:[u.jsx(Lh,{sx:{fontSize:16,mr:.5}}),u.jsx(g.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return u.jsx(g.Typography,{variant:"caption",sx:{color:"#999",fontStyle:"italic",fontWeight:600},children:"Pendiente"});case"RECHAZADA":return u.jsx(g.Button,{variant:"outlined",size:"small",sx:{fontWeight:600,borderRadius:"8px",textTransform:"none",fontSize:"11px",px:1,py:0},children:"Reenviar"});case"CONFIRMADA":return u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#00A86B"},children:[u.jsx(rp,{sx:{fontSize:16,mr:.5}}),u.jsx(g.Typography,{variant:"caption",sx:{fontWeight:600},children:"Asistiré"})]});default:return null}};function Rk({open:e,handleClose:t,guests:r}){const n=r.filter(c=>c.estatus==="CONFIRMADA"||c.isHost),o=r.filter(c=>c.estatus==="PENDIENTE"&&!c.isHost),s=r.filter(c=>c.estatus==="RECHAZADA"&&!c.isHost),i=c=>u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1},children:[u.jsxs(g.Box,{sx:{position:"relative",mr:2},children:[u.jsx(g.Avatar,{sx:{bgcolor:Ok(c.iniciales),width:32,height:32,fontSize:"12px",color:"#fff"},children:c.iniciales}),c.estatus==="PENDIENTE"&&u.jsx(g.Box,{sx:{position:"absolute",bottom:-2,right:-4,bgcolor:"#fff",borderRadius:"50%",display:"flex"},children:u.jsx(Mc,{sx:{fontSize:14,color:"#546E7A"}})})]}),u.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1,fontWeight:500,color:"#333"},children:c.nombre}),jk(c.estatus,c.isHost)]},c.nombre),a=({title:c,count:l,badgeColor:d})=>u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mt:2,mb:1},children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:800,color:"#333",fontSize:"13px"},children:c}),d&&u.jsx(g.Box,{sx:{ml:1,bgcolor:d,color:"#fff",borderRadius:"50%",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:l})]});return u.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{border:"solid 0.1 px",height:"100%"}},children:[u.jsxs(g.Box,{sx:{p:"16px 8px"},children:[u.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:800,ml:1},children:"Lista de invitados"}),u.jsx(g.Button,{onClick:t,startIcon:u.jsx("img",{src:Ik,width:20}),sx:{textTransform:"none",color:"#666",fontSize:"16px",p:0,minWidth:0,ml:.5,"&:hover":{bgcolor:"transparent"}},children:"Volver al evento"}),u.jsx(g.IconButton,{onClick:t,sx:{position:"absolute",right:8,top:12},children:u.jsx(Vr,{})})]}),u.jsx(g.Divider,{}),u.jsxs(g.DialogContent,{sx:{p:2},children:[o.length>0&&u.jsxs(g.Box,{sx:{mb:3},children:[u.jsx(a,{title:"Invitados",count:o.length}),o.map(i)]}),n.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(g.Divider,{sx:{my:1}}),u.jsxs(g.Box,{sx:{mb:3},children:[u.jsx(a,{title:"Confirmados",count:n.length,badgeColor:"#1976D2"}),n.map(i)]})]}),s.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(g.Divider,{sx:{my:1}}),u.jsxs(g.Box,{children:[u.jsx(a,{title:"No asistirán",count:s.length,badgeColor:"#1976D2"}),s.map(i)]})]})]})]})}const Nk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFR3BMcHCAcHBwaGx4ZWp6aG14aG54Zm14aW15aG55aG15aW55aW56aW5591zvEAAAAA10Uk5TABAQIDBBYHCAnr7g7wYb6DAAAACqSURBVHjahZJLDgMhDEM9UL7Ju/91q8KgQhcdb5D8rFiJ0JNC6Qbeczzt6izV8PWjAbiNB4uH35IkpbaRYGBpT9mcVlemtnCTOiLA8BPk+/VPIkPTR/kGalAkdUgnSNAlOegEckwS2C8wOAEWN2D4BC8HH3Xge/naYJUXaJq6Wo+S2iy7HJKW1sbHSc6B0mU7SeOIf8++CJg5nHOvypLXoF0xdwfrJTx9mzdxpgqGKfcyxQAAAABJRU5ErkJggg==",$k=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FFEB3B","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Lk({guests:e}){const[t,r]=y.useState(!1),n=()=>r(!0),o=()=>r(!1);return u.jsxs(u.Fragment,{children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee",width:"100%"},children:[u.jsx(g.AvatarGroup,{max:6,sx:{"& .MuiAvatar-root":{width:32,height:32,fontSize:13,fontWeight:"bold",border:"2px solid #fff",marginLeft:"-8px !important"},"& .MuiBadge-root":{borderRadius:"50%"}},children:e.map((s,i)=>u.jsx(g.Tooltip,{title:s.nombre,arrow:!0,placement:"top",children:u.jsx(g.Box,{children:u.jsx(g.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},invisible:s.estatus!=="PENDIENTE",sx:{backgroundColor:"white"},badgeContent:u.jsx(g.Box,{sx:{bgcolor:"white",borderRadius:"50%",width:16,height:16,display:"flex",justifyContent:"center",border:"1px solid white",boxShadow:"none"},children:u.jsx("img",{src:Nk})}),children:u.jsx(g.Avatar,{sx:{bgcolor:$k(s.iniciales)},children:s.iniciales})})})},i))}),u.jsx(g.Box,{sx:{flexGrow:1}}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"#1976D2",transition:"opacity 0.2s","&:hover":{opacity:.7}},onClick:n,children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold",fontSize:"14px"},children:"Ver invitados"}),u.jsx(Tk,{sx:{fontSize:18,ml:.5}})]})]}),u.jsx(Rk,{open:t,handleClose:o,guests:e})]})}var os={},zh;function zk(){if(zh)return os;zh=1;var e=Je();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(lt()),r=rt();return os.default=(0,t.default)((0,r.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),os}var Bk=zk();const Bh=Xe(Bk),Fk=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),Fh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},Wh=e=>e.split(":").slice(0,2).join(":"),Wk=({slot:e,onClick:t})=>u.jsxs(g.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #e0e0e0",textAlign:"center",transition:"0.2s",backgroundColor:"#fff","&:hover":{transform:"translateY(-3px)",boxShadow:"0px 4px 12px rgba(0,0,0,0.1)",borderColor:"#1976d2"}},children:[u.jsx(g.Box,{sx:{bgcolor:"#333",color:"white",py:.5},children:u.jsx(g.Typography,{variant:"caption",sx:{fontWeight:"bold",textTransform:"capitalize"},children:Fk(e.Fecha)})}),u.jsxs(g.Box,{sx:{py:1.5},children:[u.jsx(g.Typography,{sx:{fontSize:"14px",fontWeight:500},children:Fh(e.HoraInicio)}),u.jsxs(g.Typography,{sx:{fontSize:"12px",color:"text.secondary"},children:["a ",Fh(e.HoraFin)]})]})]});function Vk({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const o=r.reduce((a,c)=>{const l=c.Fecha;return a[l]||(a[l]=[]),a[l].push(c),a},{}),s=Object.keys(o),i=a=>{const c={...a,HoraInicio:Wh(a.HoraInicio),HoraFin:Wh(a.HoraFin)};n(c),t()};return u.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{borderRadius:"16px"}},children:[u.jsxs(g.Box,{sx:{p:2.5,display:"flex",flexDirection:"column",gap:.5},children:[u.jsx(g.Typography,{variant:"h6",sx:{fontWeight:800,fontSize:"1.1rem"},children:"Selecciona un nuevo horario"}),u.jsx(g.Box,{children:u.jsx(g.Button,{startIcon:u.jsx(Bh,{fontSize:"small"}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0,fontSize:"0.85rem","&:hover":{backgroundColor:"transparent",color:"#000"}},children:"Volver al evento"})})]}),u.jsx(g.Divider,{}),u.jsx(g.DialogContent,{sx:{px:3,py:3,backgroundColor:"#f9f9f9"},children:s.length===0?u.jsx(g.Typography,{variant:"body2",color:"text.secondary",align:"center",children:"No hay horarios alternativos disponibles en este momento."}):s.map((a,c)=>u.jsxs(g.Box,{sx:{mb:4},children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:c===0?"#1976d2":"text.primary",fontSize:"0.9rem"},children:[c===0?"Mismo día":"Próximas fechas",c===0&&u.jsx(Lh,{sx:{ml:1,fontSize:18}})]}),u.jsx(g.Grid,{container:!0,spacing:2,children:o[a].map((l,d)=>u.jsx(g.Grid,{item:!0,xs:6,sm:4,children:u.jsx(Wk,{slot:l,onClick:()=>i(l)})},`${a}-${d}`))})]},a))})]})}const Hk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAIVBMVEVHcExAR1ZAR1NARlVAR1VARlVAR1VARlVARlRARlRAR1ZiwDFVAAAACnRSTlMA5BvHaqI5kH9QLGWfKwAAAQlJREFUeNrd1luqwzAMBNDRw7I7+1/whd4mFa6tBPrX82uJGYMJwc+JLqQ1xU2dLx23NB5EgWjPtAe2Rp4Py8tLmuddeBK/KuRQMgusvDsAwkPRKgU4J14uBIwTw4K8G/GDFncQ6L0FrxYCn1TKhIU4D4UTwZIf8Z2ThjW1/9OoG2XqvTvmiI5LxsRwTRtPTbER3eTJHOcDN8fGkNxagfAxPLChxkyaohTCxEJRU2EeBxDe21NftsrzDuiQup+nwzivn41tQECNC5ZDHrmPCpdEVx+YluaLDONB0bnVcZAUwELgJQUYCzZXMihLOr0Lh7PkmBlLbbFQEsx44fsFY8kwU2PB9Ef+Lv4AL2kmcGZOH2MAAAAASUVORK5CYII=",Uk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Yk({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=y.useState(null),[s,i]=y.useState(""),a=(l,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(l,d)=>{i(d),r(d)};return u.jsx(g.Autocomplete,{options:t,value:n,inputValue:s,getOptionLabel:l=>l.correo,onChange:a,onInputChange:c,isOptionEqualToValue:(l,d)=>l.correo===d.correo,disablePortal:!0,noOptionsText:"Sin resultados",renderInput:l=>u.jsx(g.TextField,{...l,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...l.InputProps,startAdornment:u.jsx(g.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:u.jsx("img",{src:Hk,color:"action",width:20})}),disableUnderline:!0}}),renderOption:(l,d)=>y.createElement(g.Box,{component:"li",...l,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},u.jsx(g.Avatar,{sx:{bgcolor:Uk(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),u.jsx(g.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var ss={},Vh;function qk(){if(Vh)return ss;Vh=1;var e=Je();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(lt()),r=rt();return ss.default=(0,t.default)((0,r.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline"),ss}var Zk=qk();const Gk=Xe(Zk);var is={},Hh;function Kk(){if(Hh)return is;Hh=1;var e=Je();Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var t=e(lt()),r=rt();return is.default=(0,t.default)((0,r.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"),is}var Qk=Kk();const tl=Xe(Qk),Xk=e=>e.tieneConflicto?{icon:u.jsx(tl,{sx:{fontSize:18,color:"#d32f2f"}}),fillColor:"#FFF5F5",iconColor:"#d32f2f",textColor:"#333333",variant:"filled"}:{icon:u.jsx(Gk,{sx:{fontSize:20,color:"#1a73e8"}}),fillColor:"#eaedf2",iconColor:"#1a73e8",textColor:"#000000",variant:"filled"},Jk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FDD835","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function e3({guests:e,conflictCount:t,onViewSuggestions:r,onDeleteGuest:n}){const o=i=>a=>{a.stopPropagation(),n(i)},s=i=>i?i.trim().split(/\s+/).slice(0,2).join(" "):"";return u.jsxs(g.Box,{sx:{p:1},children:[u.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=Xk(i),l=Jk(i.iniciales);return u.jsx(g.Chip,{label:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[u.jsx(g.Typography,{variant:"body2",sx:{color:c.textColor,ml:.5,mr:1,fontSize:"13px",fontWeight:400},children:s(i?.nombre)}),u.jsx(g.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"center",ml:"auto",margin:"5px"},children:c.icon})]}),avatar:u.jsx(g.Avatar,{sx:{bgcolor:l,width:24,height:24,fontSize:"10px",fontWeight:"bold",color:"#ffffff !important",ml:"4px !important"},children:i.iniciales}),sx:{backgroundColor:c.fillColor,height:"32px",borderRadius:"100px",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{backgroundColor:c.fillColor,filter:"brightness(0.97)","& .status-icon-wrapper":{display:"none"},"& .MuiChip-deleteIcon":{display:"inline-block"}},"& .MuiChip-label":{paddingLeft:"4px",paddingRight:"8px",width:"100%",display:"flex"},"& .MuiChip-deleteIcon":{display:"none",fontSize:"18px",color:"#000000",ml:"auto",mr:"4px","&:hover":{color:"#000000"}}},onClick:()=>console.log(`Ver perfil de ${i.nombre}`),onDelete:o(i.nombre)},a)})}),t>0&&u.jsxs(g.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:.5},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#E53935"},children:[u.jsx(tl,{sx:{mr:1,fontSize:22}}),u.jsxs(g.Typography,{sx:{fontSize:"15px",fontWeight:500,color:"#E53935"},children:["Se detectó un conflicto de agenda con ",u.jsxs("strong",{children:[t," invitado"]}),t!==1?"s":""]})]}),u.jsx(g.Link,{component:"button",type:"button",variant:"body2",onClick:i=>{i.preventDefault(),i.stopPropagation(),r()},sx:{ml:4,textAlign:"left",textDecoration:"underline",fontWeight:700,fontSize:"15px",color:"#1976D2",border:"none",background:"none",padding:0,cursor:"pointer","&:hover":{color:"#1565C0"}},children:"Ver sugerencias de horario"})]})]})}function t3(e,t){const[r,n]=y.useState(e);return y.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const r3={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"},Uh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],n3=()=>{const e=[];for(let t=0;t<24;t++)for(let r=0;r<60;r+=15){const n=t.toString().padStart(2,"0"),o=r.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e},Yh=[],eo=n3(),as=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(s,o,n,a,c);return isNaN(l.getTime())||!x.isValid(l)?null:l},o3=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c})=>{const[l,d]=y.useState(!1),[f,h]=y.useState(!1),v=x.format(new Date,"yyyy-MM-dd"),[m,p]=y.useState(""),[b,w]=y.useState([]),[C,E]=y.useState(!1),S=Ic(),[_,W]=y.useState([]),[D,A]=y.useState(""),[M,I]=y.useState(Yh),[U,G]=y.useState(!1),[F,Y]=y.useState(""),[oe,V]=y.useState(!1),[N,ce]=y.useState([]),[fe,$]=y.useState([]),Q=t3(F,300),Ce=M.filter(q=>q.tieneConflicto).length,{control:me,handleSubmit:we,reset:ae,formState:{errors:ee,isValid:le},watch:ge,setValue:ie}=Pp({resolver:tD(gk),defaultValues:{titulo:s?.titulo||"",fechaInicio:x.format(new Date,"yyyy-MM-dd"),horaInicio:x.format(new Date,"HH:mm"),horaFin:x.format(x.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:s?.client||null,repetir:"No repetir",link:s?.link||"",descripcion:s?.descripcion||"",solID:s?.solID??null,invitados:[]},mode:"onChange"}),pe=ge("fechaInicio"),Re=ge("fechaFin"),j=ge("todoElDia");y.useEffect(()=>{if(m.trim()===""||!i||!c||!a){w([]),W([]),ie("solID",null),E(!1),A("");return}E(!0);const q=setTimeout(()=>{S.getClients(m,c,a,i).then(de=>{if(E(!1),de){const Ae=de.map(Fe=>Fe.solID);W([...new Set(Ae)])}else W([]);const Ee=Array.from(new Map(de.map(Ae=>[Ae.nombreCliente,Ae])).values());if(Ee.length>0)w(Ee),A("");else if(s?.client&&s.solID!==null){const Ae=[{solID:s.solID,nombreCliente:s.client}];w(Ae),A("Sin resultados")}else w([]),A("Sin resultados")}).catch(de=>{console.error("Error al buscar clientes:",de),E(!1)})},500);return()=>clearTimeout(q)},[m,i,c,a]),y.useEffect(()=>{if(pe&&Re){const q=new Date(pe),de=new Date(Re);(q===de||q>de)&&ie("fechaFin",pe)}},[pe,Re,ie]),y.useEffect(()=>{pe&&ie("fechaFin",pe)},[pe]),y.useEffect(()=>{ie("showEndDate",l)},[l,ie]),y.useEffect(()=>{if(s){const q=x.format(s.fechaInicio,"yyyy-MM-dd")===x.format(s.fechaFin,"yyyy-MM-dd");if(d(!q),ie("titulo",s?.titulo),ie("fechaInicio",x.format(s.fechaInicio,"yyyy-MM-dd")),ie("fechaFin",x.format(s.fechaFin,"yyyy-MM-dd")),ie("horaInicio",x.format(s.fechaInicio,"HH:mm")),ie("horaFin",x.format(s.fechaFin,"HH:mm")),ie("horaInicio2",x.format(s.fechaFin,"HH:mm")),ie("descripcion",s.descripcion),ie("link",s.link),ie("repetir","false"),ie("color",s.color),ie("todoElDia",s.todoElDia),ie("solID",s.solID),ie("client",s.client),s.invitados&&s.invitados.length>0){const de=(s?.invitados||[]).map(Ee=>{const Ae=Ee.usrNombre?.trim()||"",Fe=Ae.split(/\s+/),X=Fe.length>1?(Fe[0][0]+Fe[1][0]).toUpperCase():Ae.substring(0,2).toUpperCase();return{nombre:Ee.usrNombre||"Sin nombre",correo:Ee.correo||"",iniciales:X||"--",usrID:Ee.usuarioID??null,isHost:Ee.esOrganizador||!1,estatus:Ee.statusInvitacion,tieneConflicto:!1,disID:Ee.disID}});I(de)}else I(Yh);s.solID?h(!0):h(!1)}else{const q=o||new Date,de=new Date,Ee=new Date(q.getFullYear(),q.getMonth(),q.getDate(),de.getHours(),de.getMinutes()),Ae=x.addHours(Ee,1);ae({titulo:"",fechaInicio:x.format(Ee,"yyyy-MM-dd"),horaInicio:x.format(Ee,"HH:mm"),fechaFin:x.format(Ae,"yyyy-MM-dd"),horaFin:x.format(Ae,"HH:mm"),horaInicio2:x.format(Ae,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Uh[0],solID:null}),d(!1),h(!1)}},[s,e,o]);const We=q=>({UsuarioID:q.usrID??null,Correo:q.correo,EsOrganizador:q.usrID==i,StatusInvitacion:"PENDIENTE",disID:c??null}),qe=we(q=>{const de=M.map(Ae=>We(Ae)),Ee={...q,invitados:de};r(Ee,s?.eventoID),t(),ae(),d(!1)},q=>{console.log("Errores de validación:",q)});y.useEffect(()=>{j&&(ie("horaInicio","00:00"),ie("horaFin","23:59"))},[j,ie,ge]);const Ze=()=>{const q=ge("fechaInicio");if(q){const de=new Date(`${q}T00:00:00`),Ee=x.addDays(de,1);ie("fechaFin",x.format(Ee,"yyyy-MM-dd"))}d(!0)},Ne=ge("fechaInicio"),Be=ge("horaInicio"),vt=ge("fechaFin"),ht=ge("horaFin"),[k,P]=y.useState(null),[B,ue]=y.useState(null);y.useEffect(()=>{(k===null||k!==Be)&&P(Be)},[Be,k]),y.useEffect(()=>{(B===null||B!==ht)&&ue(ht??"")},[ht,B]);const se=ge("todoElDia");y.useEffect(()=>{if(se||!Be||!ht||!Ne||!vt)return;const q=as(Ne,Be),de=as(vt,ht);if(!q||!de||!x.isValid(q)||!x.isValid(de))return;const Ee=x.isSameDay(q,de),Ae=Ee&&(x.isAfter(q,de)||q.getTime()===de.getTime()),Fe=x.isBefore(de,q)&&!Ee;(Ae||Fe)&&(ie("horaFin",""),ue(""))},[Be,Ne]);const O=y.useMemo(()=>{if(!Be||!Ne)return eo;const q=as(Ne,Be),de=as(vt,"00:00");return!q||!de||!x.isValid(q)||!x.isValid(de)||x.isBefore(de,q)&&!x.isSameDay(de,q)?eo:x.isSameDay(q,de)?eo.filter(Ee=>{const Ae=as(vt,Ee);return Ae&&x.isAfter(Ae,q)}):(x.isAfter(de,q),eo)},[Be,Ne,vt]),ne=y.useMemo(()=>eo,[]),Se=async q=>{const de=M.some(Yt=>Yt.correo===q.correo);if(V(!0),de)return;const Ee=c,Ae=q.correo,Fe=q.usrID,X=Ne,Me=Be,ke=ht;if(!Ee||!Ae||!X||!Me||!ke){I(Yt=>[...Yt,{...q,status:"pending",isHost:!1,hasConflict:!1,usrID:Fe,name:q.nombre}]);return}let je;try{je=await S.VerificarConflicto(Ee,Ae,X,Me+":00",ke+":00")}catch{je={tieneConflicto:!1,usrMail:q.correo}}const Gt=Array.isArray(je)?je[0]:je,er={...q,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(Gt.tieneConflicto).toLowerCase()==="true"};if(er.tieneConflicto){const Yt=await S.getDisponibilidadUsuario(c,Ae,X,"60");ce(Yt)}I(Yt=>[...Yt,er])},Oe=q=>{I(de=>de.filter(Ee=>Ee.nombre!==q))},R=()=>{G(!1)},te=q=>{const Ae=(q.usrNombre??"").split(" ").map(Fe=>Fe.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:q.usrNombre??"",correo:q.usrMail??"",iniciales:Ae,usrID:q.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};y.useEffect(()=>{Q.length>2&&c?(async()=>{const Ee=(await S.getUsuariosInvitados(c,Q)).map(te).filter(Ae=>Ae.usrID!==i&&!M.some(Fe=>Fe.correo===Ae.correo));$(Ee)})():$([])},[Q,M]);const _e=q=>{Y(q)},Ge=q=>{const{Fecha:de,HoraInicio:Ee,HoraFin:Ae}=q,Fe=X=>X.split(":").slice(0,2).join(":");ie("fechaInicio",de),ie("fechaFin",de),ie("horaInicio",Fe(Ee)),ie("horaFin",Fe(Ae)),d(!1),R(),console.log("Formulario actualizado con sugerencia:",{Fecha:de,HoraInicio:Ee,HoraFin:Ae})};return u.jsx(u.Fragment,{children:u.jsx(g.Modal,{open:e,onClose:t,children:u.jsx("form",{onSubmit:qe,children:u.jsxs(g.Box,{sx:r3,children:[u.jsx(g.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:u.jsx(Vr,{})}),u.jsx(g.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?u.jsxs(u.Fragment,{children:[u.jsx(Dk,{sx:{mr:1}}),s.titulo||"Evento de Google"]}):s?"Editar evento":"Agregar evento"}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(hr,{name:"titulo",control:me,render:({field:q})=>u.jsx(g.TextField,{...q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!ee.titulo,helperText:ee.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"}}})})})}),u.jsxs("div",{className:`row g-2 ${l?"mb-1":"mb-2"}`,children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(hr,{name:"fechaInicio",control:me,render:({field:q})=>u.jsx(g.TextField,{fullWidth:!0,...q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!ee.fechaInicio,helperText:ee.fechaInicio?.message})})}),l?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"col-md-3 d-none d-md-block"}),u.jsx("div",{className:"col-10 col-md-4",children:u.jsx(hr,{name:"fechaFin",control:me,render:({field:q})=>u.jsx(g.TextField,{...q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:pe||v},error:!!ee.fechaFin,helperText:ee.fechaFin?.message})})}),!s&&u.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:u.jsx(g.IconButton,{onClick:()=>d(!1),sx:{fontSize:18},children:u.jsx(Mh,{})})})]}):u.jsx("div",{className:"col-md-8"})]}),l&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12 d-flex justify-content-center",children:u.jsx(jh,{sx:{color:"#757575",my:1}})})}),u.jsxs("div",{className:"row g-2 mb-2",children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(hr,{name:"horaInicio",control:me,render:({field:{onChange:q,value:de,...Ee}})=>u.jsx(g.Autocomplete,{freeSolo:!0,options:ne,value:de||"",onChange:(Ae,Fe)=>q(Fe||""),onInputChange:(Ae,Fe)=>q(Fe),renderInput:Ae=>u.jsx(g.TextField,{...Ae,...Ee,size:"small",error:!!ee.horaInicio,helperText:ee.horaInicio?.message,InputProps:{...Ae.InputProps,endAdornment:u.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(Mc,{})})}}),disabled:se})})}),!l&&u.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:ee.horaInicio?"5px":"0px"},children:u.jsx(jh,{sx:{color:"#757575"}})}),l&&u.jsx("div",{className:"col-md-3 d-none d-md-block"}),u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(hr,{name:"horaFin",control:me,render:({field:{onChange:q,value:de,...Ee}})=>u.jsx(g.Autocomplete,{freeSolo:!0,options:O,value:de||"",onChange:(Ae,Fe)=>q(Fe||""),onInputChange:(Ae,Fe)=>q(Fe),renderInput:Ae=>u.jsx(g.TextField,{...Ae,...Ee,size:"small",error:!!ee.horaFin,helperText:ee.horaFin?.message,InputProps:{...Ae.InputProps,endAdornment:u.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(Mc,{})})}}),disabled:se})})}),!l&&u.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:u.jsx(hr,{name:"todoElDia",control:me,render:({field:q})=>u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:q.value,onChange:de=>q.onChange(de.target.checked)}),label:u.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!l&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(g.Button,{onClick:Ze,size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(bk,{}),"  Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&u.jsx("div",{className:"row mb-2",children:u.jsxs("div",{className:"col-12",children:[!f&&u.jsxs(g.Button,{onClick:()=>h(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(_k,{}),"  Vincular cliente"]}),f&&u.jsxs("div",{className:"row g-2",children:[u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(hr,{name:"client",control:me,render:({field:q})=>u.jsx(g.Autocomplete,{options:b,loading:C,loadingText:"Buscando coincidencias...",getOptionLabel:de=>de.nombreCliente?.trim()||"",value:b.find(de=>de.nombreCliente===q.value)||(q.value&&typeof q.value=="string"?{solID:-1,nombreCliente:q.value}:null),noOptionsText:D,onInputChange:(de,Ee)=>{p(Ee)},onChange:(de,Ee)=>{q.onChange(Ee?Ee.nombreCliente:"")},renderInput:de=>u.jsx(g.TextField,{...de,placeholder:"Buscar cliente...",size:"small",InputProps:{...de.InputProps,startAdornment:u.jsx("img",{src:tf,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:u.jsxs(u.Fragment,{children:[C?u.jsx(g.CircularProgress,{color:"inherit",size:20}):null,de.InputProps.endAdornment]})}})})})}),u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(hr,{name:"solID",control:me,render:({field:q})=>u.jsx(g.Autocomplete,{options:_,noOptionsText:"Sin resultados",getOptionLabel:de=>de.toString(),value:q.value??null,onChange:(de,Ee)=>q.onChange(Ee),renderInput:de=>u.jsx(g.TextField,{...de,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b.length})})}),u.jsx("div",{className:"col-2 d-flex align-items-center",children:u.jsx(g.IconButton,{onClick:()=>h(!1),sx:{fontSize:18},children:u.jsx(Mh,{})})})]})]})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(hr,{name:"link",control:me,render:({field:q})=>u.jsx(g.TextField,{...q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!ee.link,helperText:ee.link?.message,InputProps:{startAdornment:u.jsx("img",{src:vk,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(hr,{name:"descripcion",control:me,render:({field:q})=>u.jsx(g.TextField,{...q,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:u.jsx("img",{src:xk,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(Yk,{onSelectGuest:Se,availableSuggestions:fe,onInputTextChange:_e})})}),oe&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(e3,{guests:M,conflictCount:Ce,onViewSuggestions:()=>G(!0),onDeleteGuest:Oe})})}),s?.invitados&&s?.invitados?.length>0&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(g.Box,{children:u.jsx(Lk,{guests:M})})})}),u.jsx(Vk,{open:U,handleClose:R,suggestions:N,onSelectSlot:Ge}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[u.jsx(yk,{}),Uh.map(q=>u.jsx(hr,{name:"color",control:me,render:({field:de})=>u.jsx(g.IconButton,{onClick:()=>de.onChange(q),sx:{width:24,height:24,borderRadius:"50%",bgcolor:q,border:de.value===q?"2px solid":"none",borderColor:de.value===q?"primary.main":"transparent"}})},q))]})})}),u.jsx("div",{className:"row",children:u.jsxs("div",{className:"col-12 d-flex gap-2",style:{width:"100%",marginTop:"20px"},children:[s&&!s?.isGoogleEvent&&!s?.isOutlookEvent&&u.jsx(g.Button,{onClick:n,variant:"outlined",startIcon:u.jsx("img",{src:Ph,width:15}),sx:{flex:1,textTransform:"none",backgroundColor:"#FFF5F5",color:"#d32f2f",borderColor:"red",borderRadius:"8px",fontWeight:700,fontSize:"14px",padding:"8px 0","&:hover":{backgroundColor:"#FEE2E2",borderColor:"red"}},children:"Eliminar"}),u.jsx(g.Button,{onClick:t,variant:"outlined",sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",color:"#1976D2",borderColor:"#1976D2","&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)",borderColor:"#115293"}},children:"Cancelar"}),u.jsx(g.Button,{onClick:qe,variant:"contained",disabled:!le,sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",backgroundColor:"#1976D2",boxShadow:"none","&:hover":{backgroundColor:"#115293",boxShadow:"0px 2px 4px rgba(0,0,0,0.2)"}},children:"Guardar"})]})})]})})})})},s3={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2,maxHeight:"80vh",overflowY:"auto"},i3=({isOpen:e,onClose:t,events:r,date:n,onEventClick:o})=>{if(!n)return null;const s=a=>{o(a),t()},i=a=>a.isGoogleEvent?{label:"G",borderColor:"#4285F4"}:a.isOutlookEvent?{label:"O",borderColor:"#0078d9"}:{label:"-",borderColor:"#CCC"};return u.jsx(g.Modal,{open:e,onClose:t,children:u.jsxs(g.Box,{sx:s3,children:[u.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[u.jsxs(g.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),u.jsx(g.IconButton,{onClick:t,size:"small",children:u.jsx(Vr,{})})]}),u.jsx(g.Divider,{}),u.jsx(g.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return u.jsx(g.ListItem,{disablePadding:!0,sx:{mb:1},children:u.jsx(g.ListItemButton,{onClick:()=>s(a),sx:{py:1,borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.02)",borderLeft:`5px solid ${c?.borderColor}`,"&:hover":{backgroundColor:"rgba(0,0,0,0.04)"}},children:u.jsxs(g.Box,{sx:{flexGrow:1},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[u.jsx(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),u.jsx(g.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),u.jsx(g.Typography,{sx:{fontSize:"12px",color:"#666"},children:a.todoElDia?"Todo el día":`${x.format(a.fechaInicio,"HH:mm")} - ${x.format(a.fechaFin,"HH:mm")}`})]})})},a.eventoID)})})]})})};var cs={},qh;function a3(){if(qh)return cs;qh=1;var e=Je();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(lt()),r=rt();return cs.default=(0,t.default)((0,r.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"),cs}var c3=a3();const l3=Xe(c3);var ls={},Zh;function u3(){if(Zh)return ls;Zh=1;var e=Je();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(lt()),r=rt();return ls.default=(0,t.default)((0,r.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"),ls}var d3=u3();const f3=Xe(d3),p3="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",h3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAALVBMVEVHcEzfEBfjCxzkChvkChvkChzkCxvlChv////96uv60dT1o6ryho/mGyvkCxypwAsrAAAACHRSTlMAECtdiKDJ5DEbuTIAAAHoSURBVHjatdlbjsMgDAVQ87JJKHf/y51pf9CIp+vJ/SzSkUloAZc2cSEkFgEAYU7RO/o+zkdBF07hO9QnwSzJq4uLgmUkGDgzGTrORHrGcZLXlmcvMkKZaJxuH/YLTwB9ZCo6AUyivb4m7uuziwxDeLtezKsnwJiwfCH2x5hgDi8mbJ+0APaI6wo0Ju4KrIBqQNyqwFqufL3qYOD1O1DqqkQZeVd+567dwJ3fuUai0Cceg5Scm9h5v3lhED9fgzk3ceTlC4Ok+YxzLzbvk+lrCRjl6sTmzSuEn80Yr9yJzZs+Q6Tp72C9/4jdRwXDCJEDTsQzD3DkcSaeeQgUcSZuvAYmnIlnHhIxVqLWAxNjKSo9CAl0YsEGBFRiwSYEhdh5dvCuBrB5GlH3UvaikOw8ncjbha0UeffV04qJwplX7jMxUjjzUM9ET+7Mw6HoiOTIOxR5ehYunXe8SfndNlpwvo2G2XWidl4nYhQ3PYpczVMfRfxqoy9QHZbWx7nm9eK9OM5RnB84h8VPTqJA6G55toj5WtYX+K8lypMXH2KYkx64PD55vbVfwJ9pEZgfo70tYm/c2FtLds/eTHu23WdvSG7jk2a6zzV17aRER4oEUXDm1r0kT18lJB5o5n8sErN8JOEUtv9U/ACrTv/qOzhclQAAAABJRU5ErkJggg==",rl=y.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=ws.useSnackbar(),s={success:{color:"#fff",icon:u.jsx("img",{width:25,src:p3,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:u.jsx(l3,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:u.jsx(f3,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:u.jsx("img",{src:Ph,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})},rechazar:{color:"#fff",icon:u.jsx("img",{src:h3,width:30,style:{borderRadius:"50%",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return u.jsx(ws.SnackbarContent,{ref:n,children:u.jsxs(g.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:[u.jsx(g.Box,{sx:{mr:1.5},children:i.icon}),u.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),u.jsx(g.IconButton,{size:"small",onClick:()=>o(e),children:u.jsx(Vr,{fontSize:"small"})})]})})}),Gh=y.createContext(void 0),m3=({children:e})=>{const[t,r]=y.useState([]),[n,o]=y.useState([]),[s,i]=y.useState(!1);return u.jsx(Gh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},g3=()=>{const e=y.useContext(Gh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},v3=(e,t,r)=>{const n=(i,a)=>a?new Date(a):i?new Date(i.replace(/-/g,"/")):new Date,o=n(e.start.date,e.start.dateTime);let s=n(e.end.date,e.end.dateTime);return e.end.date&&!e.end.dateTime&&s.setDate(s.getDate()-1),{eventoID:Math.abs(y3(e.id)),titulo:e.summary||"(Sin título)",descripcion:e.description,fechaInicio:o,fechaFin:s,todoElDia:!!(e.start.date&&!e.start.dateTime),color:"#4285F4C",hasVideoCall:!!e.conferenceData,link:e.htmlLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!0}};function y3(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function b3(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}const x3=(e,t,r)=>{const n=new Date(e.start.dateTime);let o=new Date(e.end.dateTime);return e.isAllDay&&o.setDate(o.getDate()-1),{eventoID:Math.abs(b3(e.id)),titulo:e?.summary||"(Sin título)",descripcion:e.body?.content||"",fechaInicio:n,fechaFin:o,todoElDia:e.isAllDay,color:"#0078D4",hasVideoCall:!!e.onlineMeetingUrl,link:e.webLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!1,isOutlookEvent:!0}},Kh="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",_3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%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",w3=({open:e,onClose:t,onConfirm:r,title:n,description:o,icon:s,confirmText:i,confirmColor:a="#d32f2f",loading:c=!1})=>u.jsxs(g.Dialog,{open:e,onClose:t,PaperProps:{sx:{borderRadius:"15px",p:1,maxWidth:"400px"}},children:[u.jsx(g.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:u.jsx(g.IconButton,{onClick:t,size:"small",children:u.jsx(Vr,{fontSize:"small"})})}),u.jsxs(g.DialogContent,{sx:{textAlign:"center",pt:0},children:[u.jsx(g.Box,{sx:{mb:2,display:"flex",justifyContent:"center"},children:s}),u.jsx(g.Typography,{variant:"h6",sx:{fontWeight:"bold",mb:2},children:n}),u.jsx(g.Typography,{variant:"body2",sx:{color:"#555",mb:4,px:2},children:o}),u.jsxs(g.Box,{sx:{display:"flex",gap:2,justifyContent:"center",mb:2},children:[u.jsx(g.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none",borderRadius:"8px",px:4,borderColor:"#1976D2",color:"#1976D2"},children:"Regresar"}),u.jsxs(g.Button,{variant:"contained",onClick:r,disabled:c,sx:{textTransform:"none",borderRadius:"8px",px:4,bgcolor:a,"&:hover":{bgcolor:"#b71c1c"}},children:[i=="Eliminar"&&u.jsx("img",{src:_3,width:15,style:{marginRight:6,marginBottom:2}}),c?"Procesando...":i]})]})]})]}),S3=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=y.useState(new Date),[a,c]=y.useState([]),[l,d]=y.useState(!1),[f,h]=y.useState(null),[v,m]=y.useState(!1),[p,b]=y.useState(null),[w,C]=y.useState([]),{enqueueSnackbar:E}=ws.useSnackbar(),S=Ic(),_=Pi(),W=Cc(),[D,A]=y.useState(!1),[M,I]=y.useState([]),[U,G]=y.useState(null),{session:F,sessionoutlook:Y}=uc(),{googleEvents:oe,setGoogleEvents:V,outlookEvents:N,setOutlookEvents:ce}=g3(),[fe,$]=y.useState([]),[Q,Ce]=y.useState([]),[me,we]=y.useState([]),[ae,ee]=y.useState(!1),[le,ge]=y.useState([]),[ie,pe]=y.useState(),Re=(X,Me)=>{I(X),G(Me),A(!0)},j=async()=>{if(e===void 0)return;const X=await S.getNotificacionesXUsuario(e,!1);ge(X)};y.useEffect(()=>{const X=new Date,Me=x.startOfDay(X),ke=x.endOfDay(x.addDays(Me,6)),je={start:Me,end:ke},Gt=a.filter(er=>{const Yt={start:er.fechaInicio,end:er.fechaFin};return Ud(Yt,je)}).sort((er,Yt)=>er.fechaInicio.getTime()-Yt.fechaInicio.getTime());C(Gt)},[a]),y.useEffect(()=>{const X=async()=>{try{if(e){const ke=await S.getEventsByUser(e);j(),c(ke)}}catch(ke){console.log("Error al cargar eventos locales:",ke)}};X();const Me=setInterval(X,4e3);return()=>clearInterval(Me)},[e]),y.useEffect(()=>{if(!n||!e)return;const X=[...a];if(oe.length>0&&F?.userEmail){const Me=oe.map(ke=>v3(ke,n,e));X.push(...Me)}if(N.length>0&&Y?.userEmail){const Me=N.map(ke=>x3(ke,n,e));X.push(...Me)}$(X)},[a,oe,N,n,e,F?.userEmail,Y?.userEmail]);const We=async X=>{try{if(X?.isGoogleEvent||X.isOutlookEvent)h(X),d(!0);else{const Me=await S.getEventById(X.eventoID);h(Me),d(!0)}}catch(Me){console.error(Me)}},qe=()=>{d(!1),h(null)},Ze=async(X,Me)=>{let ke,je;X.todoElDia?(ke=new Date(`${X.fechaInicio}T${X.horaInicio}`),je=new Date(`${X.fechaInicio}T${X.horaFin}`)):(ke=new Date(`${X.fechaInicio}T${X.horaInicio}`),je=X.fechaFin&&X.horaFin?new Date(`${X.fechaFin}T${X.horaFin}`):new Date(`${X.fechaInicio}T${X.horaFin}`));const Gt=x.format(ke,"yyyy-MM-dd HH:mm:ss.SSS"),er=x.format(je,"yyyy-MM-dd HH:mm:ss.SSS");if(Me){const Ur={...X,eventoID:Me,fechaInicio:Gt,fechaFin:er,solID:X.solID??null,disID:n??null,client:X.client,invitados:X.invitados.map(Ke=>({usrNombre:Ke.nombre||Ke.usrNombre,Correo:Ke.correo||Ke.Correo,EsOrganizador:Ke.isHost||Ke.EsOrganizador,StatusInvitacion:Ke.StatusInvitacion,UsuarioID:Ke.usrID||Ke.UsuarioID,disID:Ke.disID||n}))};try{const Ke=await S.updateEvent(Ur);var Yt=a.map(wr=>wr.eventoID===Ke.eventoID?Ke:wr);c(Yt),E("El evento se ha actualizado correctamente.",{variant:"success"}),qe()}catch{E("Error al actualizar Evento",{variant:"error"})}}else{const Ur={...X,fechaInicio:Gt,fechaFin:er,todoElDia:X.todoElDia,solID:X.solID??null,disID:n??null,client:X.client,invitados:X.invitados.map(Ke=>({usrNombre:Ke.nombre||Ke.usrNombre,Correo:Ke.correo||Ke.Correo,EsOrganizador:Ke.isHost||Ke.EsOrganizador,StatusInvitacion:Ke.StatusInvitacion,UsuarioID:Ke.usrID||Ke.UsuarioID,disID:Ke.disID||n}))};try{const Ke=await S.createEvent(Ur,e);c(wr=>[...wr,Ke]),E("El evento se ha creado con éxito",{variant:"success"}),qe()}catch{E("Error al guardar Evento",{variant:"error"})}}if(e){const Ur=await S.getEventsByUser(e);c(Ur)}},Ne=()=>{i(X=>new Date(X.getFullYear(),X.getMonth()-1,1))},Be=()=>{i(X=>new Date(X.getFullYear(),X.getMonth()+1,1))},vt=()=>{de("ELIMINAR")},ht=()=>{de("RECHAZAR")},k=()=>{b(new Date),d(!0)},P=X=>{X&&i(X)},B=X=>{b(X),d(!0),h(null)},ue=async()=>{if(f)try{await S.deleteEvent(f.eventoID),c(a.filter(X=>X.eventoID!==f.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(X,Me)=>u.jsx(rl,{id:X,message:String(Me),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{qe(),Ee()}},se=async()=>{if(!(!F?.userEmail||!n)){ee(!0);try{const Me=(await _.getGoogleCalendars(F.userEmail,n)).map(je=>({...je,selected:!0}));Ce(Me);const ke=Me.map(je=>je.id);Oe(ke)}catch(X){console.error("Error Google Cals:",X)}finally{ee(!1)}}},O=async X=>{const Me=Q.map(je=>je.id===X?{...je,selected:!je.selected}:je);Ce(Me);const ke=Me.filter(je=>je.selected).map(je=>je.id);Oe(ke)},ne=async()=>{if(!(!Y?.userEmail||!n)){ee(!0);try{const Me=(await W.getOutlookCalendars(Y.userEmail,n)).map(je=>({...je,selected:!0}));we(Me);const ke=Me.map(je=>je.id);R(ke)}catch(X){console.error("Error Outlook Cals:",X)}finally{ee(!1)}}},Se=async X=>{const Me=me.map(je=>je.id===X?{...je,selected:!je.selected}:je);we(Me);const ke=Me.filter(je=>je.selected).map(je=>je.id);R(ke)};y.useEffect(()=>{se()},[F?.userEmail,n]),y.useEffect(()=>{ne()},[Y?.userEmail,n]);const Oe=async X=>{if(!F?.userEmail||!n)return;const Me=X||Q.filter(ke=>ke.selected).map(ke=>ke.id);try{const ke={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F.userEmail,calendarIds:Me},je=await _.getGoogleEventsByMonth(ke);V(je)}catch(ke){console.error("Error al obtener eventos de Google:",ke)}},R=async X=>{if(!Y?.userEmail||!n)return;const Me=X||me.filter(ke=>ke.selected).map(ke=>ke.id);try{const ke={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Y.userEmail,calendarIds:Me},je=await W.getOutlookEventsByMonth(ke);ce(je)}catch(ke){console.error("Error al obtener eventos de Outlook:",ke)}};if(n===void 0||e===void 0)return u.jsx("div",{children:"Cargando configuración de usuario..."});const te=async(X,Me)=>{await S.UpdateStatusEvento(X.evento.eventoID,e,Me)&&(await S.MarcarLeido(X.notificacionID,e),E(X?.evento?.titulo+" fue agregado a tu calendario",{variant:"success"}))},_e=async()=>{ie&&S.UpdateStatusEvento(ie.evento.eventoID,e,"RECHAZADA")&&(await S.MarcarLeido(ie.notificacionID,e),await S.MarcarLeido(ie.notificacionID,e),E("Haz rechazado la Invitación a "+ie?.evento?.titulo,{content:(Me,ke)=>u.jsx(rl,{id:Me,message:String(ke),variant:"rechazar"})}),Ee())},Ge=async(X,Me)=>{try{if(!e)return;pe(X),Me=="RECHAZADA"?(ht(),console.log("noti",X)):te(X,Me)}catch{E("Error al procesar la invitación",{variant:"error"})}},[q,de]=y.useState(null),Ee=()=>de(null),Ae={RECHAZAR:{title:"Rechazar invitación",confirmText:"Rechazar evento",description:u.jsxs(u.Fragment,{children:["Estás a punto de declinar la invitación de ",u.jsx("strong",{children:ie?.evento?.nombreAnfitrion})," a ",u.jsx("strong",{children:ie?.evento?.titulo})]}),icon:u.jsx("img",{src:Kh}),action:()=>ie&&_e()},ELIMINAR:{title:"Eliminar evento",confirmText:"Eliminar",description:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer.",icon:u.jsx("img",{src:Kh}),action:()=>ue()},DESVINCULAR:{title:"Desvincular Outlook",confirmText:"Desvincular",description:"Si desvinculas tu cuenta, perderás acceso a todos los eventos sincronizados.",icon:"",action:()=>ue}},Fe=q?Ae[q]:null;return u.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[u.jsx(hy,{header:u.jsx(O2,{currentDate:s,onPrevMonth:Ne,onNextMonth:Be,onAddEvent:k,onDateChange:P}),sidebar:u.jsx(vw,{onEventClick:We,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:k,googleCalendars:Q,outlookCalendars:me,isLoadingCalendars:ae,onToggleGoogle:O,onToggleOutlook:Se,notifications:le,unreadCount:le?.filter(X=>!X.leida).length,onAceppInvitacion:Ge}),mainContent:u.jsx(Mw,{onSeeMoreClick:Re,currentDate:s,events:fe,onDayClick:B,onEventClick:We})}),l&&u.jsx(o3,{isVisible:l,onClose:qe,onSave:Ze,onDelete:vt,selectedDate:p,initialEvent:f,userId:e,masNombreBD:o,disId:n}),u.jsx(i3,{isOpen:D,onClose:()=>A(!1),events:M,date:U,onEventClick:We}),Fe&&u.jsx(w3,{open:!!q,onClose:Ee,onConfirm:()=>{Fe.action()},title:Fe.title,description:Fe.description,icon:Fe.icon,confirmText:Fe.confirmText})]})},C3="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",E3="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 nl(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function D3(e,t){const r=e??"",n=t??"";return r instanceof Date&&n instanceof Date?r.getTime()-n.getTime():typeof r=="number"&&typeof n=="number"?r-n:typeof r=="boolean"&&typeof n=="boolean"?Number(r)-Number(n):String(r).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function ol(e,t,r=!0){return typeof e=="function"?e(t):e??r}function k3(e){return e.replace(/[^\d]/g,"")}function A3(e,t){return t}var us={},Qh;function T3(){if(Qh)return us;Qh=1;var e=Je();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(lt()),r=rt();return us.default=(0,t.default)((0,r.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),us}var I3=T3();const M3=Xe(I3);var ds={},Xh;function P3(){if(Xh)return ds;Xh=1;var e=Je();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(lt()),r=rt();return ds.default=(0,t.default)((0,r.jsx)("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded"),ds}var O3=P3();const j3=Xe(O3);var fs={},Jh;function R3(){if(Jh)return fs;Jh=1;var e=Je();Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t=e(lt()),r=rt();return fs.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),fs}var N3=R3();const $3=Xe(N3);var ps={},e0;function L3(){if(e0)return ps;e0=1;var e=Je();Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var t=e(lt()),r=rt();return ps.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),ps}var z3=L3();const B3=Xe(z3);function t0(e){return e==="right"?"end":e==="center"?"center":"start"}function r0(e){const t=e.filter(r=>!r.width).length||1;return e.map(r=>typeof r.width=="number"?`${r.width}px`:typeof r.width=="string"?r.width:`minmax(0, ${1/t}fr)`).join(" ")}const F3=1060,sl=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function W3({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=F3,getDetailColumns:o,onRowClick:s}){function c(d){if(typeof d=="number")return d;if(!d)return 0;const f=/^(\d+)\s*px$/.exec(d.trim());return f?Number(f[1]):/fr$/i.test(d)?160:0}function l(d){const f=d.reduce((m,p)=>m+c(p.width),0),h=Math.max(d.length-1,0)*16;return f+h+32}return u.jsx(g.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:u.jsxs(g.Box,{children:[u.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(d=>typeof d=="number"?`${d}px`:d).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"#1E5BCE",color:"#fff",boxSizing:"border-box"},children:["Tipo","En Proceso","Finalizadas","Último seg."].map(d=>u.jsx(g.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[h,v]=K.useState(!!d.initiallyOpen),m=f%2===1,p=o?o(d):t,b=Math.max(n,l(p));return u.jsxs(g.Box,{children:[u.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(w=>typeof w=="number"?`${w}px`:w).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:m?"rgba(30,91,206,0.06)":"background.paper",borderTop:"1px solid rgba(0,0,0,0.08)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>v(w=>!w),children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[u.jsx(g.IconButton,{size:"small",disableRipple:!0,children:h?u.jsx(B3,{}):u.jsx($3,{})}),u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:sl(d,"En Proceso")}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:sl(d,"Finalizadas")}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:sl(d,"Último seg.")})]}),u.jsx(g.Collapse,{in:h,unmountOnExit:!0,children:u.jsxs(g.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[u.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:r0(p),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"rgba(30,91,206,0.18)",color:"#1a1a1a",borderTop:"1px solid rgba(0,0,0,0.12)",boxSizing:"border-box"},children:p.map(w=>u.jsx(g.Typography,{sx:{justifySelf:t0(w.align),textAlign:w.align??"left",fontSize:12.5,fontWeight:800,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:w.header},w.key))}),(d.rows??[]).map((w,C)=>u.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:r0(p),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:C%2===0?"background.paper":"rgba(30,91,206,0.06)",borderTop:"1px solid rgba(0,0,0,0.06)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>s?.(w,d),children:p.map((E,S)=>{const _=E.accessor?E.accessor(w,C):E.field?w[E.field]:null;return u.jsx(g.Box,{sx:{justifySelf:t0(E.align),textAlign:E.align??"left",minWidth:0,overflow:"hidden",maxWidth:"100%"},children:typeof _=="string"||typeof _=="number"?u.jsx(g.Typography,{sx:{fontSize:13,fontWeight:/^(estatus|seg|avance|nivel|asesor|fecha)$/i.test(E.key)?700:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(_),children:_}):_},E.key??S)})},w.id??C))]})})]},d.id)})]})})}var hs={},n0;function V3(){if(n0)return hs;n0=1;var e=Je();Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=void 0;var t=e(lt()),r=rt();return hs.default=(0,t.default)((0,r.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 2m3.3 14.71L11 12.41V7h2v4.59l3.71 3.71z"}),"AccessTimeFilled"),hs}var H3=V3();const U3=Xe(H3),Y3=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",q3=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},Z3=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var ms={},o0;function G3(){if(o0)return ms;o0=1;var e=Je();Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var t=e(lt()),r=rt();return ms.default=(0,t.default)((0,r.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),ms}var K3=G3();const Q3=Xe(K3),il=({current:e=0,total:t=0,color:r="#4caf50"})=>u.jsx("div",{style:{display:"flex",gap:"1px",width:"100%",height:"100%",justifyContent:"center",overflow:"hidden",minWidth:0},children:Array.from({length:t}).map((n,o)=>u.jsx("div",{style:{width:"7px",height:"7px",borderRadius:"2px",backgroundColor:o<e?r:"#e0e0e0",display:"flex"}},o))});var gs={},s0;function X3(){if(s0)return gs;s0=1;var e=Je();Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=void 0;var t=e(lt()),r=rt();return gs.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),gs}var J3=X3();const i0=Xe(J3),eA=e=>{const t=String(e??"").toLowerCase().trim();return t==="muy interesado"?{bg:"#E53935",color:"#FFFFFF"}:t==="interesado"?{bg:"#FB8C00",color:"#FFFFFF"}:t==="venta definitiva"?{bg:"#2E7D32",color:"#FFFFFF"}:t==="no sé"||t==="no se"?{bg:"#9E9E9E",color:"#FFFFFF"}:t==="algo interesado"?{bg:"#FFEB3B",color:"#000000"}:{bg:"transparent",color:"#2c2c2c"}},tA=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por Asignar";case 2:return"Solicitud Asignada";case 3:return"Solicitud asignada en proceso";case 4:return"Finalizadas sin Venta";case 5:return"Finalizadas con Venta";case 6:return"Rechazadas";case 7:return"Finalizada por sistema";case 8:return"";case 9:return"";case 10:return"Prospección";case 11:return"Interés Real";case 12:return"Proceso de Compra";case 13:return"";case 14:return"En espera de Unidad";case 15:return"Auto Facturado";case 16:return"";case 17:return"";case 18:return"Compró otra Marca";case 19:return"No comprará";default:return null}},rA=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por asignar";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 6:return"Rechazada";case 7:return"Finalizada sin enviar a Ventas";case 8:return"Finalizada enviado a Ventas";default:return null}},nA=e=>{switch(parseInt(String(e??""),10)){case 0:return"Sin asignar";case 1:return"Confirmado";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 4:return"Confirmado";case 5:return"Finalizada";case 6:return"Rechazada";case 10:return"Reagendado";case 20:return"Seguimiento [Cita Finalizada]";case 30:return"Reenvio";case 40:return"Seguimiento [Mecanico]";case 50:return"Seguimiento";default:return null}};function oA(e){const t=new Date(e),r=t.toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}),n=t.toLocaleTimeString("es-MX",{hour:"2-digit",minute:"2-digit"});return`${r.replace(".","")} • ${n}`}function sA(e){return e.replace(/<br\s*\/?>/gi,`
178
178
  `).replace(/\r\n/g,`
179
179
  `).replace(/\r/g,`
180
- `)}const sA={Todos:[],"Sin Asignar":["Sin Asignar"],"En prospección":["Prospección"],"Proceso de Compra":["Proceso de Compra"],"En espera de Unidad":["En Espera de Unidad"],"Auto Facturado":["Auto Facturado"],Rechazadas:["Rechazada","Rechazadas"],"Finalizadas sin Venta":["Sin Venta"],"Finalizadas con Venta":["Con Venta"],"En Proceso":["Asignada","Prospección","Sin Asignar","Proceso de Compra","En Espera de Unidad","Auto Facturado","Sin Atender"]},iA={Todos:[],"Selección y presentación de vehículos":["Selección y presentación de vehículos"],"Prueba de Manejo":["Prueba de Manejo"],"Valoración del Auto a cuenta y/o enganche":["Valoración del Auto a cuenta y/o enganche"],"Entrega de vehículo":["Entrega de vehículo"],"Negociación y Cierre":["Negociación y Cierre"]},aA={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function cA(e,t){switch(e){case"pruebas":return tA(t)??"—";case"servicio":return rA(t)??"—";case"nuevos":case"seminuevos":default:return eA(t)??"—"}}function lA({open:e,onClose:t,customer:r,fields:n=[],header:o,extraSections:s,normalTable:i,normalTableColumns:a=[],history:c=[],advisorHistory:u=[],onRequestEdit:d,searchFilter:f,urlsQA:h,solicitudesNuevos:v=[],solicitudesPrueba:m=[],solicitudesServicio:p=[],solicitudesSeminuevos:b=[],onCreateSolicitud:w,isCrmMode:C=!1,onSolicitudBaseUrl:E,onIframeClose:S,reloadInfo:_,idAdminSistemas:W}){if(!r)return null;const D=3,[A,M]=y.useState(null),I=!!A,[H,G]=y.useState(!1),[F,Y]=y.useState(null),[oe,V]=y.useState(c??[]),[N,ae]=y.useState(null),fe=y.useMemo(()=>[...u].sort((L,X)=>new Date(X.FechaAsignacion).getTime()-new Date(L.FechaAsignacion).getTime()),[u]);y.useEffect(()=>{c&&c.length&&V(c)},[c]);const $=c?.length?c:oe,Q=o?.title??(L=>L?.Nombre||L?.name||"Sin título"),Ce=o?.infoItems??[],me=L=>L.nombreAsesor?.trim()||(L.Email?L.Email:"Sistema"),we=L=>{const X=L||"",be=X.split(" ").filter(Boolean);return be.length>=2?(be[0][0]+be[1][0]).toUpperCase():(X[0]||"?").toUpperCase()},ie=L=>L?.SolID??L?.solID??L?.SolId??L?.SOLID??null,ee=y.useMemo(()=>{const L=$??[];return Array.isArray(L?.[0])?L.flat():L},[$]),ce=y.useMemo(()=>{const L=ee;return!N||F==null?L:L.filter(X=>{const be=ie(X);return be!=null&&String(be)===String(F)})},[ee,N,F]),ge=y.useMemo(()=>[...ce].sort((L,X)=>new Date(X.fecAlta).getTime()-new Date(L.fecAlta).getTime()),[ce]),[de,pe]=y.useState(!1),Re=y.useMemo(()=>de?ge:ge.slice(0,D),[de,ge]),j=Math.max(ge.length-D,0),Fe=L=>String(L??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),qe=(L,X)=>Fe(JSON.stringify(L)).includes(Fe(X)),Ze=(L,X)=>f?f(L,X):qe(L,X),Ne=(L,X)=>{const be=Fe(X).split(/\s+/).filter(Boolean);return be.length?be.every(Ie=>Ze(L,Ie)):!0},[Be,vt]=y.useState(""),[ht,k]=y.useState([]);y.useMemo(()=>i??[],[i]),y.useMemo(()=>{const L=Be.trim();return L?(i??[]).filter(X=>Ne(X,L)):i??[]},[i,Be]);const P=g.useTheme(),B=g.useMediaQuery(P.breakpoints.down("md")),[le,se]=y.useState(""),[O,ne]=y.useState(!0),[Se,Oe]=y.useState(!1),R=new Date().toISOString().slice(0,10),te=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[_e,Ge]=y.useState(te),[q,ue]=y.useState(R),[Ee,Te]=y.useState(null),Ve=!!Ee,[J,Me]=y.useState("En Proceso"),[ke,je]=y.useState("Todos"),[Gt,er]=y.useState("Todos"),Yt=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],Hr=["Selección y presentación de vehículos","Prueba de Manejo","Valoración del Auto a cuenta y/o enganche","Entrega de vehículo","Negociación y Cierre"],Ke=()=>{se(""),ne(!1),Oe(!1),Ge(te),ue(R),Me("Todos"),je("Todos"),er("Todos")},wr=y.useMemo(()=>(le??"").trim()!==""||J!=="Todos"||ke!=="Todos"||O||Se||Gt!=="Todos",[le,J,ke,O,Se,Gt]);function An(L){if(!L)return"";const X=new Date(L);if(isNaN(X.getTime()))return"";const be=String(X.getDate()).padStart(2,"0"),Ie=String(X.getMonth()+1).padStart(2,"0"),At=String(X.getFullYear()).slice(-2);return`${be}/${Ie}/${At}`}function sa(L){const X=L?new Date(L):null;return X&&!isNaN(X.getTime())?X:null}function ul(L,X){let be=null;for(const Ie of L){const At=sa(X(Ie));if(At){const St=At.getTime();(be===null||St>be)&&(be=St)}}return be?new Date(be):null}function xs(L){const X=ul(L,be=>be.UltimoSeguimiento||be.FechaCita);return X?An(X.toISOString()):"—"}function _s(L){const X=(L??"").toLowerCase().trim();return X==="sin venta"||X==="con venta"||X==="rechazada"||X==="rechazadas"}function ia(L){return L.filter(X=>_s(X.EstatusDescripcion)).length}function aa(L){return L.filter(X=>!_s(X.EstatusDescripcion)).length}const dl=({progress:L,color:X})=>{if(!L)return l.jsx(il,{current:0,total:0,color:X});const be=L.split("/").map(Number);if(be.length!==2||be.some(St=>Number.isNaN(St)))return l.jsx(il,{current:0,total:0,color:X});const[Ie,At]=be;return l.jsx(il,{current:Ie,total:At,color:X})};function ca(L){return[{key:"fecha",header:"Fecha",accessor:X=>An(X.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:X=>l.jsx(g.Tooltip,{title:X.Vehiculo??"",placement:"top",arrow:!0,children:l.jsx(g.Typography,{component:"span",sx:{fontSize:13,fontWeight:500,display:"block",maxWidth:260,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:"default"},children:X.Vehiculo??"—"})}),width:260},{key:"estatus",header:"Estatus",accessor:X=>l.jsx(g.Typography,{sx:{fontWeight:800,fontSize:13},children:cA(L,X.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:X=>{const{bg:be,color:Ie}=J3(X.NivelInteres);return l.jsx(g.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:be,color:Ie,fontSize:12,fontWeight:X.NivelInteres?800:500},children:X.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:X=>{const be=(X.Asesor??"").trim(),Ie=fl=>{if(!fl)return"";const OA=fl[0]?.toUpperCase()??"",jA=fl[1]?.toLowerCase()??"";return`${OA}${jA}`};if(!be)return l.jsx(g.Tooltip,{title:"",placement:"top",children:l.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const At=be.split(/\s+/),St=At[0]??"",Pr=At[1]??"",Sr=Ie(St),Tn=Ie(Pr),PA=`${Sr}${Tn}`||"—";return l.jsx(g.Tooltip,{title:be,placement:"top",children:l.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:PA})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:X=>X.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:X=>l.jsx(g.Tooltip,{title:X.Actividad??"",placement:"top",arrow:!0,children:l.jsxs(g.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[X.Icon&&l.jsx("span",{style:{color:"#fff",backgroundColor:X.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:l.jsx("i",{className:X.Icon})}),l.jsx(g.Typography,{component:"span",noWrap:!0,sx:{fontSize:13,fontWeight:500,display:"block",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:(X.Actividad??"").length?"default":"inherit"},children:X.Actividad??"—"})]})}),width:180},{key:"avance",header:"Avance",accessor:X=>l.jsx(dl,{progress:X.Avance,color:X.Color}),width:200,align:"left"}]}function T(L){const be=ca(L).slice(1);return[{key:"fecha",header:"Fecha",accessor:Ie=>An(Ie.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Ie=>An(Ie.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Ie=>Ie.HoraCita??"—",width:110},...be]}function re(L){const X=L.kind;switch(X){case"pruebas":case"servicio":return T(X);case"nuevos":case"seminuevos":default:return ca(X)}}function ye(L,X,be,Ie){return{id:L,kind:be,title:X,metrics:[{label:"En Proceso",value:aa(Ie)},{label:"Finalizadas",value:ia(Ie)},{label:"Último seg.",value:xs(Ie)}],rows:Ie,initiallyOpen:!1}}const Pe=[ye("n-1","Cotización de nuevos","nuevos",v),ye("p-1","Prueba de Manejo","pruebas",m),ye("s-1","Cita de Servicio","servicio",p),ye("sn-1","Cotización para Seminuevos","seminuevos",b)],Qe=y.useMemo(()=>{const L=(le??"").trim().toLowerCase(),X=(be,Ie)=>{if(L&&!(be.Vehiculo??"").toLowerCase().includes(L))return!1;const At=Se?be.FechaCita:be.Fecha;if(O&&At){const St=sa(At??"");if(!St)return!1;const Pr=_e?new Date(`${_e}T00:00:00`):null,Sr=q?new Date(`${q}T00:00:00`):null;if(Sr&&Sr.setDate(Sr.getDate()+1),Pr&&St<Pr||Sr&&St>=Sr)return!1}if(J!=="Todos"){const St=(be.EstatusDescripcion??"").toLowerCase();if(!(sA[J]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}if(ke!=="Todos"){const St=(be.Actividad??"").toLowerCase();if(!(iA[ke]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}if(Gt!=="Todos"){const St=(be.NivelInteres??"").toLowerCase();if(!(aA[Gt]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}return!0};return Pe.map(be=>{const Ie=(be.rows??[]).filter(St=>X(St,be.kind)),At=[{label:"En Proceso",value:aa(Ie)},{label:"Finalizadas",value:ia(Ie)},{label:"Último seg.",value:xs(Ie)}];return{...be,rows:Ie,metrics:At}})},[Pe,le,O,_e,q,Se,J,ke,Gt]),dt={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},Ye=(L,X)=>{const be=L.SolID;if(!be)return;const Ie=X.kind,At=dt[Ie]??"cotizaciones",St=h?`https://qa2.crm.netcar.com.mx/netcar/${At}/${be}`:`https://crmxs.netcar.com.mx/netcar/${At}/${be}`,Pr=E?.({row:L,section:X,slug:At,solId:be,baseUrl:St});if(!C){const Sr=Pr??St;Y(be),ae(Sr),G(!0)}},We=()=>{S?.(r),Y(null),ae(null),G(!1)},Ut=y.useRef(!1),mt=y.useRef(null),Pt=y.useCallback(()=>{if(!Ut.current){Ut.current=!0;return}mt.current&&window.clearTimeout(mt.current),mt.current=window.setTimeout(()=>{_?.(r)},500)},[_,r]);return y.useEffect(()=>{Ut.current=!1,mt.current&&window.clearTimeout(mt.current)},[N,F]),l.jsx(g.Dialog,{open:e,onClose:t,fullWidth:!0,fullScreen:B,PaperProps:{sx:{height:{xs:"100dvh",md:"90vh"},maxWidth:{xs:"100vw",md:"92vw"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[l.jsxs(g.Box,{sx:{width:{xs:"100%",md:405},maxWidth:{xs:"100%",md:405},bgcolor:{xs:"transparent",md:"#40404024"},display:"flex",flexDirection:"column",height:{xs:"auto",md:"100%"},borderRight:{xs:"none",md:"1px solid #EBEEF0"}},children:[l.jsxs(g.Box,{children:[l.jsx(g.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:l.jsxs(g.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[l.jsx(g.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:l.jsx(g.Box,{sx:{flex:1,minWidth:0,pr:1},children:l.jsxs(g.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[Q(r)," ",l.jsx(g.IconButton,{component:"span",size:"small",disableRipple:!0,onClick:()=>{t?.(),r&&d?.(r)},sx:{p:0,ml:.5,verticalAlign:"text-bottom",color:"#336BE1","&:hover":{bgcolor:"transparent"},"&:focus-visible":{outline:"none"}},"aria-label":"Editar nombre",children:l.jsx(K3,{sx:{fontSize:"1em"}})})]})})}),Ce.map((L,X)=>l.jsxs(g.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:L.onClick?"pointer":"default"},onClick:()=>{L.onClick&&L.onClick(r)},children:[L.icon,l.jsx(g.Typography,{variant:"body2",sx:{color:L.inLink?"#336BE1":"#070C10"},style:{},children:L.value(r)})]},X))]})}),l.jsx(g.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map((L,X)=>{const be=L.label?.toLowerCase().startsWith("asesor");return l.jsxs(g.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsx(g.Box,{sx:{width:"50%"},children:l.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:L.label})}),l.jsxs(g.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[l.jsx("div",{children:L?.avatar?L.avatar(r):null}),l.jsx(g.Typography,{variant:"body2",color:"textPrimary",children:L?.value(r)}),be&&!W&&l.jsx(g.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:l.jsx(g.IconButton,{size:"small",onClick:Ie=>M(Ie.currentTarget),sx:{ml:.5},disableRipple:!0,children:l.jsx(U3,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},X)})}),l.jsx(g.Divider,{sx:{my:2}})]}),l.jsx(g.Box,{px:2.5,pb:.5,children:l.jsxs(g.Typography,{children:[l.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!N&&" por solicitud",":"]})}),l.jsxs(g.Box,{sx:{px:2.5,pt:0,gap:2,flex:1,overflowY:"auto",display:"flex",flexDirection:"column",pb:6,maxHeight:{xs:"140px",md:"100%"}},children:[Re.length===0&&l.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),l.jsxs(g.Box,{children:[Re?.map((L,X)=>{const be=me(L),Ie=oA(L.comentario||"");return l.jsxs(g.Box,{sx:{pb:1.5},children:[l.jsxs(g.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:L.tipo||"Evento"}),l.jsx(g.Chip,{size:"small",label:L.auto!=null?`${L.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Ie?l.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Ie}):null,l.jsxs(g.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[L?.ImgAsesor!=null?l.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:we(be),src:L?.ImgAsesor}):l.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:we(be)}),l.jsxs(g.Stack,{spacing:0,children:[l.jsx(g.Typography,{variant:"body2",fontWeight:600,children:be}),l.jsx(g.Typography,{variant:"caption",color:"text.secondary",children:nA(L.fecAlta)})]})]}),X<Re.length-1&&l.jsx(g.Divider,{sx:{mt:1.25}})]},L.segID??X)}),ge.length>D&&l.jsx(g.Box,{sx:{mt:1},children:l.jsx(g.Button,{onClick:()=>pe(L=>!L),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:de?"Ver menos":`Ver más (${j})`})})]})]}),l.jsx(g.Menu,{anchorEl:A,open:I,onClose:()=>M(null),TransitionComponent:g.Fade,MenuListProps:{disablePadding:!0},PaperProps:{sx:{width:320,p:0,overflow:"hidden"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[l.jsx(g.Box,{sx:{position:"sticky",top:0,zIndex:1,px:1.5,py:1,fontWeight:700,bgcolor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:"Historial asesores"}),l.jsxs(g.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[fe.length===0&&l.jsx(g.Box,{sx:{px:1.5,py:1},children:l.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),fe.map((L,X)=>{const be=Y3(L),Ie=H3(L.FechaBaja??L.FechaAsignacion);return l.jsx(g.Box,{sx:{px:1,py:.75},children:l.jsxs(g.Stack,{direction:"row",alignItems:"center",spacing:1,children:[l.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:L?.ImgAsesor??void 0,children:q3(be)}),l.jsx(g.Box,{sx:{flex:1,minWidth:0},children:l.jsx(g.Typography,{variant:"body2",noWrap:!0,children:be})}),l.jsx(g.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Ie})]})},X)})]})]})})]}),H?l.jsxs(g.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[l.jsx(g.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:l.jsx(g.Button,{onClick:We,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:l.jsx(Bh,{fontSize:"medium"})})})}),N&&l.jsx("iframe",{src:N,width:"100%",height:"100%",onLoad:Pt,style:{border:0}})]}):l.jsxs(g.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[l.jsx(g.Box,{sx:{mt:{xs:1.5,md:3}},children:l.jsxs(g.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[l.jsx(g.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),l.jsxs(g.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[l.jsxs(g.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[l.jsx(g.TextField,{size:"small",placeholder:"Buscar por vehículo",value:le,onChange:L=>se(L.target.value),InputProps:{endAdornment:l.jsx(O3,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[l.jsxs(g.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[l.jsx(g.FormControlLabel,{label:l.jsx(g.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:l.jsx(g.Checkbox,{checked:O,onChange:L=>ne(L.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),l.jsx(g.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),l.jsxs(g.Stack,{direction:"row",spacing:1,children:[l.jsx(g.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:_e,onChange:L=>Ge(L.target.value),disabled:!O,sx:{width:170}}),l.jsx(g.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:q,onChange:L=>ue(L.target.value),disabled:!O,sx:{width:170}})]})]}),l.jsx(g.IconButton,{onClick:L=>Te(L.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:l.jsx(I3,{})}),wr&&l.jsx(g.Button,{variant:"outlined",onClick:Ke,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),l.jsx(g.Tooltip,{title:wr&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!wr,children:l.jsx("span",{children:l.jsxs(g.Button,{variant:"outlined",sx:{height:40,textTransform:"none",borderColor:"none",color:"#fff",backgroundColor:"#1e5bce","&:hover":{backgroundColor:"#1e5bce",boxShadow:"none"}},onClick:()=>{w?.(r)},disableRipple:!0,children:[l.jsx(s0,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!wr&&"Crear Solicitud"]})})})]}),l.jsx(F3,{sections:Qe,detailColumns:[],getDetailColumns:re,onRowClick:Ye})]})]})}),l.jsx(g.Menu,{anchorEl:Ee,open:Ve,onClose:()=>Te(null),TransitionComponent:g.Fade,PaperProps:{sx:{p:1.5,width:260,borderRadius:2,boxShadow:3}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:l.jsxs(g.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),l.jsxs(g.Box,{children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),l.jsx(g.RadioGroup,{value:J,onChange:L=>Me(L.target.value),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos","Sin Asignar","En prospección","Proceso de Compra","En espera de Unidad","Auto Facturado","Rechazadas","Finalizadas sin Venta","Finalizadas con Venta","En Proceso"].map(L=>l.jsx(g.FormControlLabel,{value:L,control:l.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(g.Box,{children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),l.jsx(g.RadioGroup,{value:ke,onChange:(L,X)=>je(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Hr].map(L=>l.jsx(g.FormControlLabel,{value:L,sx:{alignItems:"start"},control:l.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(g.Box,{children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),l.jsx(g.RadioGroup,{value:Gt,onChange:(L,X)=>er(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Yt].map(L=>l.jsx(g.FormControlLabel,{value:L,control:l.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]})]})})]})]})})}const i0={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function a0(e,t,r){const{fields:n,order:o=["nombreCliente","email","acciones"],header:s={},cells:i={},hide:a={},actions:c}=t,u=c??{},d=u.show??{},f=u.handlers??{},h=u.accessors??{},v=u.icons??{},m=u.className??"d-flex flex-row gap-2 align-items-center ",p=u.tooltip??{},b=v.view??l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[l.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"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),w={nombreCliente:{key:"nombreCliente",header:s.nombreCliente??"Cliente",accessor:I=>I[n.nombreCliente],cell:i.nombreCliente,width:190},email:{key:"email",header:s.email??"Correo",accessor:I=>I[n.email],cell:i.email??(I=>{const H=String(I[n.email]??"");return H?l.jsx("a",{href:`mailto:${H}`,children:H}):l.jsx("span",{className:"text-muted",children:"—"})}),width:230},acciones:a.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??(I=>{const H=ol(d.whatsapp,I,!0),G=ol(d.email,I,!0),F=ol(d.view,I,!0),Y=h.phone?.(I),oe=h.email?.(I),V=fe=>{if(fe.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(I);if(!Y)return;const $=h.countryCode??"52",Q=D3(String(Y));typeof window<"u"&&window.open(`https://wa.me/${$}${Q}`,"_blank")},N=fe=>{if(fe.stopPropagation(),f.onEmail)return f.onEmail(I);oe&&typeof window<"u"&&(window.location.href=`mailto:${oe}`)},ae=fe=>{fe.stopPropagation(),f.onView&&f.onView(I)};return l.jsxs("div",{className:m,children:[H&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:V,style:{width:24,height:24},children:l.jsx("img",{src:S3,alt:"WhatsApp"})}),G&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.email??"Email",onClick:N,style:{width:24,height:24},children:l.jsx("img",{src:C3,alt:"Email"})}),F&&l.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}},C=Object.values(w).filter(I=>!!I),E=(e??[]).filter(I=>!!I?.key),S=new Map;for(const I of C)S.set(String(I.key),I);for(const I of E)S.set(String(I.key),I);const _=[...C.map(I=>String(I.key)),...E.map(I=>String(I.key))],W=Array.from(new Set(o.map(I=>String(I)).filter(I=>S.has(I)))),D=_.filter(I=>!W.includes(I)),A=[...W,...D],M="acciones";if(S.has(M)){const I=A.filter(H=>H!==M);A.splice(0,A.length,...I,M)}return A.map(I=>S.get(I))}function uA(e){const{rows:t,columns:r,clientSort:n=!0,urlsQA:o=!0,defaultSort:s,minWidth:i=1100,rowKey:a=k3,haveOpenDetailFor:c=!0,defaults:u,detailConfig:d,normalTable:f,onRowClick:h,activityHistory:v,advisorHistory:m,forceOpenDetailFor:p,closeDetailFor:b,onRequestEdit:w,searchFilter:C,solicitudesNuevos:E,solicitudesPrueba:S,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:A,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:H,idAdminSistemas:G=!1}=e,[F,Y]=y.useState(s??null),[oe,V]=y.useState({open:!1,customer:null}),[N,ae]=y.useState([]),fe=ie=>{V({open:!0,customer:ie})},$=ie=>{c&&(h?.(ie),V({open:!0,customer:ie}))},Q=()=>{V({open:!1,customer:null}),b?.()},Ce=y.useMemo(()=>u?a0(r??[],u):a0(r??[],{fields:{},order:[]}),[r,u]),me=y.useMemo(()=>{if(!n||!F)return t;const ie=Ce.find(ce=>ce.key===F.key);if(!ie)return t;const ee=[...t];return ee.sort((ce,ge)=>{const de=nl(ie,ce,0),pe=nl(ie,ge,0),Re=E3(de,pe);return F.direction==="asc"?Re:-Re}),ee},[t,Ce,F,n]),we=y.useMemo(()=>{const ie=d?.getCustomerId;return ee=>{const ce=ie?.(ee)??ee?.Id_cliente??ee?.CliID??ee?.id??ee?.ID??ee?.Id??"";return String(ce)}},[d]);return y.useEffect(()=>{if(!oe.open||!oe.customer)return;const ie=we(oe.customer);if(!ie)return;const ee=(t??[]).find(ce=>we(ce)===ie);ee&&ee!==oe.customer&&V(ce=>({...ce,customer:ee}))},[t,oe.open,oe.customer,we]),y.useEffect(()=>{p&&fe(p)},[p]),l.jsxs("div",{children:[l.jsx("div",{className:`${i0.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:l.jsx("div",{className:`${i0.tableResponsive} table-responsive`,children:l.jsxs("table",{className:"table table-hover align-middle mb-0",children:[l.jsx("thead",{children:l.jsx("tr",{children:Ce.map(ie=>l.jsx("th",{style:{fontWeight:600,width:ie.width,paddingTop:"20px",paddingBottom:"20px",textAlign:ie.align??"left"},children:ie.header},ie.key))})}),l.jsx("tbody",{children:me.map((ie,ee)=>l.jsx("tr",{onClick:()=>$?.(ie),role:"button",tabIndex:0,onKeyDown:ce=>{(ce.key==="Enter"||ce.key===" ")&&$?.(ie)},style:{cursor:"pointer"},children:Ce.map((ce,ge)=>{const de=ce.Component?l.jsx(ce.Component,{row:ie,index:ee}):ce.cell?ce.cell(ie,ee):(()=>{const pe=nl(ce,ie,ee);return pe==null||pe===""?"":String(pe)})();return l.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:ce.align??"left"},children:de},`${String(ce.key)}-${ge}`)})},a(ie,ee)))})]})})}),oe.open&&l.jsx(lA,{open:oe.open,onClose:Q,customer:oe.customer,fields:d?.dynamicFields,header:d?.header,normalTable:f,history:v,advisorHistory:m,urlsQA:o,onRequestEdit:ie=>{Q(),w?.(ie)},searchFilter:C,solicitudesNuevos:E,solicitudesPrueba:S,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:A,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:H,idAdminSistemas:G})]})}const c0=K.forwardRef(({sx:e,...t},r)=>l.jsx(g.InputBase,{inputRef:r,...t,sx:{height:48,px:1.5,width:"100%",maxWidth:"none",bgcolor:"#EBEEF0",borderRadius:2,border:"1px solid transparent","&:hover":{borderColor:"transparent"},"& .MuiInputBase-input::placeholder":{opacity:.7},...e}}));c0.displayName="SoftInput";function dA({message:e}){return e?l.jsxs(g.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:[l.jsx(tl,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),l.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function fA(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function al(e,t){const r=fA(e);return r?t?.isArray?{required:r,validate:n=>Array.isArray(n)&&n.length>0||r}:{required:r,validate:n=>n!==""&&n!==null&&n!==void 0||r}:{}}const l0={"& .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"},width:"100%"},pA={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function cl({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return l.jsxs(g.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[l.jsx(g.FormLabel,{sx:pA,children:e}),n,l.jsx(dA,{message:t||r})]})}function hA(e,t){const{register:r,formState:{errors:n}}=t,o={...al(e)};e.minLength&&(o.minLength={value:e.minLength,message:`El campo espera minimo ${e.minLength} caracteres`}),e.maxLength&&(o.maxLength={value:e.maxLength,message:`El campo espera maximo ${e.maxLength} caracteres`}),e.pattern&&(o.pattern={value:e.pattern,message:"Formato inválido"});const s=e.type==="email";s&&!o.pattern&&(o.pattern={value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Correo electrónico inválido"});const i=/[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]/g,a=/[0-9]/g,c=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Home","End","Escape","Enter"]),u=S=>e.onlyNumbers?(S.match(a)??[]).join(""):e.onlyLetters?(S.match(i)??[]).join(""):S,d=(S,_)=>c.has(S)||_?!0:e.onlyNumbers?/^[0-9]$/.test(S):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(S):!0,f=n[e.name]?.message,h=r(e.name,o),v=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,m=S=>{d(S.key,S.ctrlKey||S.metaKey)||S.preventDefault()},p=S=>{const _=S.data??null;_!=null&&(e.onlyNumbers&&/[^0-9]/.test(_)&&S.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(_)&&S.preventDefault())},b=S=>{const _=S.clipboardData.getData("text"),W=u(_);if(W!==_){S.preventDefault();const D=S.target,A=D.selectionStart??D.value.length,M=D.selectionEnd??D.value.length;D.setRangeText(W,A,M,"end"),D.dispatchEvent(new Event("input",{bubbles:!0}))}},w=S=>{const _=u(S.target.value);_!==S.target.value&&(S.target.value=_),v&&S.target.value.length>v&&(S.target.value=S.target.value.slice(0,v)),h.onChange(S)},C={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:v,onKeyDown:m,onBeforeInput:p,onPaste:b,onInvalid:S=>S.preventDefault()},E=e.onlyNumbers||s?"text":e.type??"text";return l.jsx(cl,{label:e.label,errorMsg:f,helperText:e.helperText,sx:l0,children:l.jsx(c0,{placeholder:e.placeholder,type:E,inputProps:C,...h,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function mA(e,t){const{control:r}=t,n=!!e.multiple;return l.jsx(hr,{name:e.name,control:r,rules:al(e,{isArray:n}),render:({field:o,fieldState:s})=>l.jsx(cl,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:l0,children:l.jsxs(g.Select,{...o,multiple:n,displayEmpty:!0,sx:{height:48,backgroundColor:"#EBEEF0","& .MuiSelect-select":{display:"flex",alignItems:"center",py:0}},className:"2-SoftInputData",children:[!n&&l.jsx(g.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>l.jsx(g.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function gA(e,t){return l.jsx(hr,{name:e.name,control:t.control,rules:al(e),render:({field:r,fieldState:n})=>l.jsx(cl,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:l.jsx(g.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>l.jsx(g.FormControlLabel,{value:o.value,control:l.jsx(g.Radio,{}),label:o.label},String(o.value)))})})})}function u0(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return hA(e,t);case"select":return mA(e,t);case"radio":return gA(e,t);default:return null}}function vA(e,{initialPerPage:t=25,perPageOptions:r=[10,25,50,100,"Todos"],onPageChange:n,onPerPageChange:o,scrollTop:s,deps:i=[]}={}){const a=Array.isArray(e)?e:[],[c,u]=y.useState(1),[d,f]=y.useState(t),{currentItems:h,totalPages:v,showingFrom:m,showingTo:p,totalItems:b}=y.useMemo(()=>{const E=a.length,S=d==="Todos"?1/0:Number(d),_=S===1/0?1:Math.max(1,Math.ceil(E/S)),W=Math.min(c,_),D=S===1/0?E:W*S,A=S===1/0?0:D-S;return{currentItems:S===1/0?a:a.slice(A,D),totalPages:_,showingFrom:E===0?0:A+1,showingTo:S===1/0?E:Math.min(D,E),totalItems:E}},[a,c,d]),w=E=>{const S=Math.max(1,Math.min(E,v||1));u(S),n?.(S),s?.()};return{currentItems:h,totalPages:v,showingFrom:m,showingTo:p,totalItems:b,currentPage:c,itemsPerPage:d,perPageOptions:r,goTo:w,next:()=>w(c+1),prev:()=>w(c-1),setItemsPerPage:E=>{f(E),o?.(E),u(1),s?.()},setCurrentPage:w}}var vs={},d0;function yA(){if(d0)return vs;d0=1;var e=Je();Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=void 0;var t=e(lt()),r=rt();return vs.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),vs}var bA=yA();const xA=Xe(bA);var ys={},f0;function _A(){if(f0)return ys;f0=1;var e=Je();Object.defineProperty(ys,"__esModule",{value:!0}),ys.default=void 0;var t=e(lt()),r=rt();return ys.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),ys}var wA=_A();const SA=Xe(wA),CA=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const u=g.useTheme(),d=g.useMediaQuery(u.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const m=d?0:2,p=[],b=1,w=t,C=Math.max(b+1,e-m),E=Math.min(w-1,e+m);p.push(b),C>b+1&&p.push("...");for(let S=C;S<=E;S++)S>=b+1&&S<=w-1&&p.push(S);return E<w-1&&p.push("..."),p.push(w),p},h=m=>{const p=m.target.value;o(p)},v=Math.max(1,t);return l.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:"center",justifyContent:{xs:"center",sm:"space-between"},gap:2,my:0,py:2,borderTop:"#D3D4D5 1px solid",px:3},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[l.jsx(g.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:l.jsx(xA,{fontSize:"large"})}),f().map((m,p)=>m==="..."?l.jsx(g.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${p}`):l.jsx(g.Button,{onClick:()=>r(m),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===m?"primary.main":"transparent",fontWeight:e===m?700:400,color:e===m?"#fff":"#5C6372","&:hover":{backgroundColor:e===m?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:m},`p-${m}`)),l.jsx(g.IconButton,{onClick:()=>r(e+1),disabled:e>=v,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:l.jsx(SA,{fontSize:"large"})})]}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[l.jsx(g.Typography,{variant:"body2",children:"Mostrar"}),l.jsx(g.FormControl,{size:"small",sx:{minWidth:72},children:l.jsx(g.Select,{value:n,onChange:h,renderValue:m=>m==="Todos"?"Todos":String(m),children:s.map(m=>l.jsx(g.MenuItem,{value:m,children:m==="Todos"?"Todos":m},String(m)))})}),l.jsx(g.Typography,{variant:"body2",children:"por página"})]})]})};function EA(e){const{open:t,dataAdd:r,fields:n,onSubmit:o,onCancel:s,defaultValues:i,txtBtnGuardar:a,haveId:c=!1,itemsTable:u,filter:d,getId:f,renderRow:h,selectedIds:v,onSelectedChange:m,onSubmitAddData:p,initialSelectedIds:b=[],showAutosPanel:w}=e,C=Pp({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});y.useEffect(()=>{i&&C.reset(i)},[i,C]);const[E,S]=y.useState(""),[_,W]=y.useState(b),D=Array.isArray(v)&&!!m,A=D?v:_,M=O=>{const ne=typeof O=="function"?O(A):O;D?m(ne):W(ne)},I=y.useCallback(O=>f?f(O):O?.IdAuto,[f]),H=y.useMemo(()=>{const O=new Map;return(u??[]).forEach((ne,Se)=>O.set(I(ne),Se)),O},[u,I]),G=y.useRef(new Set),F=y.useMemo(()=>{const O=new Map;return(u??[]).forEach(ne=>O.set(f?f(ne):ne?.IdAuto,ne)),O},[u,f]),Y=y.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),oe=hp({control:C.control,name:Y}),V=O=>O==null?!1:typeof O=="string"?O.trim().length>0:Array.isArray(O)?O.length>0:typeof O=="number"?!Number.isNaN(O):typeof O=="object"?Object.keys(O).length>0:!0,N=y.useMemo(()=>Y.length?oe?.every(V)??!1:!0,[oe,Y]),{handleSubmit:ae,formState:{isSubmitting:fe,isDirty:$,isValid:Q}}=C,Ce=d??((O,ne)=>JSON.stringify(O).toLowerCase().includes(ne.toLowerCase())),me=y.useMemo(()=>E.trim()?u?.filter(O=>Ce(O,E)):u,[u,E,Ce]),we=y.useMemo(()=>{if(!me)return me;const O=G.current,ne=[...me];return ne.sort((Se,Oe)=>{const R=O.has(I(Se))?0:1,te=O.has(I(Oe))?0:1;if(R!==te)return R-te;const _e=H.get(I(Se))??0,Ge=H.get(I(Oe))??0;return _e-Ge}),ne},[me,H,I]),{currentItems:ie,totalPages:ee,showingFrom:ce,showingTo:ge,totalItems:de,currentPage:pe,itemsPerPage:Re,perPageOptions:j,goTo:Fe,setItemsPerPage:qe}=vA(we,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[E],scrollTop:()=>{}}),Ze=O=>{const ne=F.get(O)??null;M([O]),p?.({items:ne})},Ne=O=>A.includes(O),Be=async O=>{try{await o?.(O),C.reset(C.getValues())}catch(ne){console.error("Error al enviar AddCliente:",ne)}},vt=y.useMemo(()=>{const O=new Map;return(n??[]).forEach(ne=>O.set(String(ne.name),ne)),O},[n]),ht=(O,ne)=>{const Se=vt.get(String(O));if(!Se)return null;const Oe={xs:12,...Se.grid,...ne||{}};return l.jsx(g.Grid,{item:!0,...Oe,children:Se.render?Se.render(C):u0(Se,C)},`fld-${String(O)}`)},k=w??(e.haveId?"edit":"new"),P=k!=="onlyCars",B=k==="new"||k==="onlyCars",le=A?.length>0,se=k==="onlyCars"?le:e.haveId?N&&$||le:N&&le;return l.jsx(g.Dialog,{open:t,onClose:s,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:{xs:"100dvh",md:B?"90vw":"auto"},maxWidth:{xs:"100vw",md:B?"98vw":"50%"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:l.jsx(Rw,{...C,children:l.jsxs(g.Box,{component:"form",noValidate:!0,onSubmit:ae(Be),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[P&&l.jsxs(g.Box,{sx:{width:{xs:"100%",md:c?"100%":394},maxWidth:{xs:"100%",md:c?"100%":394},boxShadow:{xs:"none",md:c?"none":"2px 0px 8px #40404024"},borderRight:{xs:"none",md:c?"none":"1px solid #EBEEF0"},bgcolor:"background.paper",paddingBottom:3,mx:{xs:0,md:c?"auto":0},position:"relative"},children:[l.jsxs(g.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[l.jsx(g.Typography,{fontWeight:700,fontSize:20,children:r.title}),l.jsxs(g.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[l.jsx(g.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),l.jsx(g.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,ne)=>l.jsx(g.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((Se,Oe)=>{const R=typeof Se=="string"?{name:Se}:Se;return R.hidden?.(C)?null:ht(R.name,R.grid)})},`row-${ne}`)):l.jsx(g.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,ne)=>{const Se=O.grid??{xs:12,md:12};return l.jsx(g.Grid,{item:!0,...Se,children:O.render?O.render(C):u0(O,C)},`${String(O.name)}-${ne}`)})})})]})]}),l.jsx(g.Box,{sx:{position:"absolute",zIndex:O=>O.zIndex.modal+1,bottom:0,width:"100%",borderRadius:2,boxShadow:{xs:"0",md:"0 -8px 8px -6px #0003"},p:1,backgroundColor:"#fff"},children:l.jsx(g.Box,{display:"flex",alignItems:"center",children:l.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:l.jsx(g.Button,{type:"submit",variant:"contained",disabled:fe||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:c?"160px":"100%"},children:a})})})})]}),B&&l.jsx(g.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:l.jsx(g.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[l.jsxs(g.Box,{p:3,sx:{borderBottom:1,borderBottomColor:"#D3D4D5",position:"sticky",top:0,zIndex:1,bgcolor:"#fff",flexDirection:{sm:"row",xs:"column"}},display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:4,children:[l.jsx(g.TextField,{value:E,onChange:O=>S(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:l.jsx(g.InputAdornment,{position:"start",children:l.jsx(Bb,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),l.jsx(g.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:l.jsx(g.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:l.jsx(Vr,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&l.jsx(g.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:l.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",children:l.jsxs(g.Button,{type:"submit",variant:"contained",disabled:fe||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[l.jsx(s0,{sx:{color:fe||!se?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),l.jsx(g.Box,{sx:{flex:1,minHeight:0,overflowY:"auto",overflowX:"auto",padding:0,height:"100%","&::-webkit-scrollbar:horizontal":{display:"none"},"&::-webkit-scrollbar:vertical":{width:8}},children:l.jsx(g.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:l.jsxs(g.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ie?.map((O,ne)=>{const Se=f?f(O):ne,Oe=Ne(Se);return l.jsx(g.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:l.jsx(g.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:l.jsx(g.ListItemButton,{onClick:()=>Ze(Se),disableRipple:!0,sx:{padding:0},children:l.jsx(g.ListItemText,{disableTypography:!0,primary:h?h({item:O,selected:Oe,toggle:()=>Ze(Se),index:ne}):null})})})},`${String(Se)}`)}),!ie?.length&&l.jsx(g.Box,{p:3,children:l.jsxs(g.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",E,"”."]})})]})})}),l.jsx(g.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:l.jsx(CA,{currentPage:pe,totalPages:ee,onPageChange:Fe,itemsPerPage:Re,onItemsPerPageChange:qe,itemsPerPageOptions:j,showingFrom:ce,showingTo:ge,totalItems:de})})]})})})]})})})}var bs={},p0;function DA(){if(p0)return bs;p0=1;var e=Je();Object.defineProperty(bs,"__esModule",{value:!0}),bs.default=void 0;var t=e(lt()),r=rt();return bs.default=(0,t.default)((0,r.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"}),"AttachFile"),bs}var kA=DA();const AA=Xe(kA),ll=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,oa=/[,\s;]+/g,ln=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),un=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),h0=(e,t)=>t?e.filter(r=>ln(r)!==ln(t)):e,TA=(e,t)=>e.filter(r=>!t.some(n=>ln(n)===ln(r)));function Mr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function IA(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function MA({open:e,onClose:t,value:r,onChange:n,onRequestSend:o,customer:s,itemsSelects:i,renderItem:a,filterFields:c=[],multiSelectAutos:u=!0,imgCorreoSrc:d,baseURLImages:f,itemProps:h,defaultItemImageSrc:v}){const m=y.useRef(null),[p,b]=y.useState("idle"),w=y.useRef(e);y.useEffect(()=>{const R=w.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),w.current=e},[e]),y.useEffect(()=>{if(p==="entering"){const _e=setTimeout(()=>b("idle"),320);return()=>clearTimeout(_e)}if(p==="exiting"){const _e=setTimeout(()=>b("idle"),220);return()=>clearTimeout(_e)}},[p]);const[C,E]=y.useState(""),[S,_]=y.useState(!1),[W,D]=y.useState(!1),[A,M]=y.useState(!1),[I,H]=y.useState(""),[G,F]=y.useState([]),Y=A?G:r.selectedIds,oe=()=>{F([...r.selectedIds]),H(""),M(!0)},V=()=>{M(!1),F([])},N=()=>{const R=new Set(vt.map((_e,Ge)=>String(Mr(_e,Ge,h.id)))),te=G.filter(_e=>R.has(String(_e)));n({...r,selectedIds:te}),M(!1)},ae=(R,te)=>ln(R??"")===ln(te??"");function fe(R,te,_e,Ge,q){const ue=te?R.some(Te=>ae(Te,te)):!1,Ee=_e.length>0?_e.some(Te=>R.some(Ve=>ae(Ve,Te))):!1;Ge(ue),q(Ee)}const $=R=>{const te=typeof R=="function"?R(r.recipients):R;n({...r,recipients:te}),fe(te,ie,ce,_,D)},Q=R=>n({...r,message:R}),Ce=R=>n({...r,attachments:[...r.attachments,...R]}),me=R=>n({...r,attachments:r.attachments.filter(te=>te.name!==R)}),we=R=>{if(A)if(u){const te=new Set(G);te.has(R)?te.delete(R):te.add(R),F(Array.from(te))}else{const te=G.includes(R);F(te?[]:[R])}else if(u){const te=new Set(r.selectedIds);te.has(R)?te.delete(R):te.add(R),n({...r,selectedIds:Array.from(te)})}else{const te=r.selectedIds.includes(R);n({...r,selectedIds:te?[]:[R]})}},ie=y.useMemo(()=>(s?.Correo??"").trim(),[s]),ee=y.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),ce=y.useMemo(()=>ee.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ee]),ge=y.useRef(!1);y.useEffect(()=>{if(e&&!ge.current){let R=[];S&&ie&&(R=un(R,[ie])),W&&ce.length&&(R=un(R,ce)),$(te=>un(te,R)),fe(r.recipients,ie,ce,_,D),E(""),ge.current=!0}e||(ge.current=!1)},[e,S,W,ie,ce]);const de=R=>{const te=ee.find(_e=>ln(_e.EmailAsesor??"")===ln(R));if(te){if(te.ImgAsesor)return l.jsx(g.Avatar,{src:te.ImgAsesor,alt:te.NombreAsesor});const _e=(te.NombreAsesor||"").trim(),Ge=(te.ApellidosAsesor||"").trim();return l.jsx(g.Avatar,{children:`${_e[0]??""}${Ge[0]??""}`.toUpperCase()})}return l.jsx(g.Avatar,{children:R[0]?.toUpperCase()})},pe=()=>{const R=C.trim();if(!R)return;const _e=R.split(oa).filter(Boolean).filter(Ge=>ll.test(Ge));_e.length>0&&$(Ge=>un(Ge,_e)),E("")},Re=R=>{_(R),$(te=>R&&ie?un(te,[ie]):h0(te,ie))},j=R=>{D(R),$(te=>R?un(te,ce):TA(te,ce))},Fe=R=>{const te=Array.from(R.target.files||[]);Ce(te.map(_e=>({name:_e.name,size:_e.size,file:_e}))),R.target.value=""},qe=Y[0],Ze=y.useMemo(()=>!i||qe===void 0?void 0:i.find((te,_e)=>String(Mr(te,_e,h.id))===String(qe)),[i,qe,h.id]),Ne=y.useMemo(()=>{if(!(!Ze||!h.distributorId))return Mr(Ze,0,h.distributorId)},[Ze,h.distributorId]);console.log("lockedDisId",Ne);const Be=y.useMemo(()=>Ze?(h.distributorTitle?Mr(Ze,0,h.distributorTitle):void 0)??(Ne!=null?String(Ne):void 0):void 0,[Ze,h.distributorTitle,Ne]),vt=y.useMemo(()=>{const R=i??[];return Ne==null||!h.distributorId?R:R.filter((te,_e)=>Mr(te,_e,h.distributorId)==Ne)},[i,Ne,h.distributorId]),ht=y.useMemo(()=>{if(!I.trim())return vt;const R=I.toLowerCase();return vt.filter(te=>(c??[]).some(_e=>String(te?.[_e]??"").toLowerCase().includes(R)))},[vt,I,c]),k=y.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((te,_e)=>{R.set(String(Mr(te,_e,h.id)),te)}),r.selectedIds.map(te=>R.get(String(te))).filter(Boolean)},[i,r.selectedIds,h.id]),P=R=>n({...r,selectedIds:r.selectedIds.filter(te=>String(te)!==String(R))}),B=()=>{let R=r.recipients;if(C.trim()){const ue=C.split(oa).filter(Ee=>ll.test(Ee));R=un(R,ue),$(R),E("")}const te=S?ie:"",_e=ee.find(ue=>ue?.Activo&&ue?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:S,toAdvisor:W,tipoInt:S&&W?2:1,correoCliente:te,correoAsesor:W?_e:"",disIdLocked:Ne}),t?.()},le=y.useMemo(()=>{const te=C.split(oa).filter(Boolean).some(_e=>ll.test(_e));return r.recipients.length>0||te},[r.recipients,C]),se=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,ne=le&&se&&O,Se=g.useTheme(),Oe=g.useMediaQuery(Se.breakpoints.down("sm"));return l.jsxs(g.Drawer,{anchor:Oe?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!Oe}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:Oe?"up":"left",timeout:{enter:320,exit:220},easing:{enter:"cubic-bezier(0.22, 1, 0.36, 1)",exit:"cubic-bezier(0.4, 0, 1, 1)"}},PaperProps:{sx:{width:{xs:"100vw",sm:420},height:{xs:"85vh",sm:"auto"},maxHeight:{xs:"85vh",sm:"calc(100vh - 32px)"},left:{xs:0,sm:"auto"},right:{xs:0,sm:16},bottom:{xs:0,sm:16},top:{xs:"auto",sm:"auto"},borderRadius:{xs:"12px 12px 0 0",sm:2},boxShadow:6,overflow:"hidden"}},children:[l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[l.jsxs(g.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[d?l.jsx("img",{src:d,alt:"Correo",style:{width:24,height:18}}):null,l.jsxs(g.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),l.jsx(g.IconButton,{onClick:t,size:"small",children:l.jsx(Vr,{})})]}),l.jsx("div",{children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 10px",backgroundColor:"#EBEEF0",border:"1px solid #E5E7EB",borderRadius:8,flexWrap:"wrap"},children:[l.jsx("label",{style:{fontSize:14,fontWeight:600,marginRight:4},children:"Para:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:[r.recipients.map(R=>l.jsx(g.Chip,{avatar:de(R),label:R,onDelete:()=>$(te=>h0(te,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),l.jsx("input",{type:"text",value:C,onChange:R=>E(R.target.value),onKeyDown:R=>{const te=R.key;te==="Enter"||te===","||te===";"||te===" "||te==="Tab"?(R.preventDefault(),pe()):te==="Backspace"&&!C&&r.recipients.length&&$(Ge=>Ge.slice(0,-1))},onBlur:pe,onPaste:R=>{const _e=R.clipboardData.getData("text").split(oa).filter(Boolean);_e.length>1&&(R.preventDefault(),$(Ge=>un(Ge,_e)),E(""))},placeholder:r.recipients.length?"":"correo@ejemplo.com",style:{flex:1,minWidth:140,border:"none",outline:"none",background:"transparent",fontSize:14,color:"#111827",padding:"4px 0"}})]})]})}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{checked:S,onChange:R=>Re(R.target.checked),size:"small"}),label:"Cliente"}),ee.length!==0&&l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{checked:W,onChange:R=>j(R.target.checked),size:"small"}),label:`Asesor${ee.length>1?"es":""}`})]})]}),l.jsx(g.Divider,{}),l.jsxs(g.Box,{p:2,children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:oe,children:[l.jsx(g.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Be!=null&&l.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),k.length>0?l.jsx(g.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:k.map((R,te)=>{const _e=Mr(R,te,h.id),Ge=Mr(R,te,h.title)??"",q=Mr(R,te,h.image),ue=IA(f,q);return l.jsx(g.Chip,{onDelete:()=>P(_e),label:l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:ue?l.jsx("img",{src:ue,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("img",{src:v,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}})}),l.jsx("span",{style:{fontSize:12},children:l.jsx("b",{children:Ge})})]}),sx:{pl:.5,pr:.3,py:.2,borderRadius:2,".MuiChip-deleteIcon":{fontSize:18}},variant:"outlined"},String(_e))})}):l.jsx(g.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),l.jsx(g.Divider,{}),l.jsxs(g.Box,{sx:{p:2},children:[l.jsx(g.TextField,{placeholder:"Escribe aquí tu mensaje...",value:r.message,onChange:R=>Q(R.target.value),multiline:!0,minRows:6,fullWidth:!0,sx:{mb:1.5}}),r.attachments.length>0&&l.jsx(g.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>l.jsxs(g.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[l.jsx(g.ListItemText,{style:{gap:10,fontSize:15,color:"#5285F7",display:"flex",flexWrap:"wrap",flex:"none"},primary:R.name,secondary:R.size<1024?`${R.size} b`:R.size<1024*1024?`${(R.size/1024).toFixed(0)} kb`:`${(R.size/(1024*1024)).toFixed(1)} MB`,secondaryTypographyProps:{sx:{fontSize:12,color:"#64748B",fontWeight:500,mt:.25}},primaryTypographyProps:{noWrap:!0,width:"auto"}}),l.jsx(g.Tooltip,{title:"Quitar",children:l.jsx(g.IconButton,{edge:"end",onClick:()=>me(R.name),size:"small",children:l.jsx(Vr,{fontSize:"small"})})})]},R.name))})]}),l.jsxs(g.Box,{sx:{position:{xs:"sticky",sm:"sticky"},bottom:0,bgcolor:"#fff",borderTop:"1px solid #E5E7EB",p:2,display:"flex",alignItems:"center",gap:2},children:[l.jsx("input",{ref:m,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:Fe}),l.jsx(g.Button,{startIcon:l.jsx(AA,{}),variant:"text",onClick:()=>m.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),l.jsx(g.Box,{sx:{flex:1}}),l.jsx(g.Button,{variant:"contained",onClick:B,disabled:!ne,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),l.jsxs(g.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:Oe,open:A,onClose:V,children:[l.jsxs(g.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",l.jsx(g.IconButton,{onClick:V,size:"small",children:l.jsx(Vr,{})})]}),l.jsxs(g.DialogContent,{children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:I,onChange:R=>H(R.target.value),sx:{mb:2}}),Be!=null&&l.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),l.jsxs(g.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",ht.length,")"]}),l.jsxs(g.List,{sx:{p:0},children:[ht.map((R,te)=>{const _e=Mr(R,te,h.id),Ge=Y.includes(String(_e))||Y.includes(_e),q=Ne==null||Mr(R,te,h.distributorId)==Ne;return l.jsx(g.ListItem,{disableGutters:!0,sx:{p:0,opacity:q?1:.5},children:l.jsx(g.Box,{onClick:()=>q&&we(_e),sx:{cursor:q?"pointer":"not-allowed",p:.5,backgroundColor:Ge?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(R,te):l.jsx("pre",{style:{margin:0},children:JSON.stringify(R,null,2)})})},String(_e))}),ht.length===0&&l.jsx(g.Box,{p:2,children:l.jsx(g.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),l.jsxs(g.DialogActions,{sx:{px:3,pb:2},children:[l.jsx(g.Button,{variant:"text",onClick:V,sx:{color:"#5C6372"},children:"Cancelar"}),l.jsx(g.Button,{variant:"contained",onClick:N,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}Ot.AddCliente=EA,Ot.ApiProvider=Lx,Ot.AuthProvider=p1,Ot.Clientes=uA,Ot.CustomSnackbar=rl,Ot.EventsProvider=h3,Ot.ModalCorreo=MA,Ot.MyCalendar=w3,Ot.useAuth=uc,Ot.useAuthRepository=Pi,Ot.useEventRepository=Ic,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})}));
180
+ `)}const iA={Todos:[],"Sin Asignar":["Sin Asignar"],"En prospección":["Prospección"],"Proceso de Compra":["Proceso de Compra"],"En espera de Unidad":["En Espera de Unidad"],"Auto Facturado":["Auto Facturado"],Rechazadas:["Rechazada","Rechazadas"],"Finalizadas sin Venta":["Sin Venta"],"Finalizadas con Venta":["Con Venta"],"En Proceso":["Asignada","Prospección","Sin Asignar","Proceso de Compra","En Espera de Unidad","Auto Facturado","Sin Atender"]},aA={Todos:[],"Selección y presentación de vehículos":["Selección y presentación de vehículos"],"Prueba de Manejo":["Prueba de Manejo"],"Valoración del Auto a cuenta y/o enganche":["Valoración del Auto a cuenta y/o enganche"],"Entrega de vehículo":["Entrega de vehículo"],"Negociación y Cierre":["Negociación y Cierre"]},cA={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function lA(e,t){switch(e){case"pruebas":return rA(t)??"—";case"servicio":return nA(t)??"—";case"nuevos":case"seminuevos":default:return tA(t)??"—"}}function uA({open:e,onClose:t,customer:r,fields:n=[],header:o,extraSections:s,normalTable:i,normalTableColumns:a=[],history:c=[],advisorHistory:l=[],onRequestEdit:d,searchFilter:f,urlsQA:h,solicitudesNuevos:v=[],solicitudesPrueba:m=[],solicitudesServicio:p=[],solicitudesSeminuevos:b=[],onCreateSolicitud:w,isCrmMode:C=!1,onSolicitudBaseUrl:E,onIframeClose:S,reloadInfo:_,idAdminSistemas:W}){if(!r)return null;const D=3,[A,M]=y.useState(null),I=!!A,[U,G]=y.useState(!1),[F,Y]=y.useState(null),[oe,V]=y.useState(c??[]),[N,ce]=y.useState(null),fe=y.useMemo(()=>[...l].sort((L,J)=>new Date(J.FechaAsignacion).getTime()-new Date(L.FechaAsignacion).getTime()),[l]);y.useEffect(()=>{c&&c.length&&V(c)},[c]);const $=c?.length?c:oe,Q=o?.title??(L=>L?.Nombre||L?.name||"Sin título"),Ce=o?.infoItems??[],me=L=>L.nombreAsesor?.trim()||(L.Email?L.Email:"Sistema"),we=L=>{const J=L||"",be=J.split(" ").filter(Boolean);return be.length>=2?(be[0][0]+be[1][0]).toUpperCase():(J[0]||"?").toUpperCase()},ae=L=>L?.SolID??L?.solID??L?.SolId??L?.SOLID??null,ee=y.useMemo(()=>{const L=$??[];return Array.isArray(L?.[0])?L.flat():L},[$]),le=y.useMemo(()=>{const L=ee;return!N||F==null?L:L.filter(J=>{const be=ae(J);return be!=null&&String(be)===String(F)})},[ee,N,F]),ge=y.useMemo(()=>[...le].sort((L,J)=>new Date(J.fecAlta).getTime()-new Date(L.fecAlta).getTime()),[le]),[ie,pe]=y.useState(!1),Re=y.useMemo(()=>ie?ge:ge.slice(0,D),[ie,ge]),j=Math.max(ge.length-D,0),We=L=>String(L??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),qe=(L,J)=>We(JSON.stringify(L)).includes(We(J)),Ze=(L,J)=>f?f(L,J):qe(L,J),Ne=(L,J)=>{const be=We(J).split(/\s+/).filter(Boolean);return be.length?be.every(Ie=>Ze(L,Ie)):!0},[Be,vt]=y.useState(""),[ht,k]=y.useState([]);y.useMemo(()=>i??[],[i]),y.useMemo(()=>{const L=Be.trim();return L?(i??[]).filter(J=>Ne(J,L)):i??[]},[i,Be]);const P=g.useTheme(),B=g.useMediaQuery(P.breakpoints.down("md")),[ue,se]=y.useState(""),[O,ne]=y.useState(!0),[Se,Oe]=y.useState(!1),R=new Date().toISOString().slice(0,10),te=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[_e,Ge]=y.useState(te),[q,de]=y.useState(R),[Ee,Ae]=y.useState(null),Fe=!!Ee,[X,Me]=y.useState("En Proceso"),[ke,je]=y.useState("Todos"),[Gt,er]=y.useState("Todos"),Yt=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],Ur=["Selección y presentación de vehículos","Prueba de Manejo","Valoración del Auto a cuenta y/o enganche","Entrega de vehículo","Negociación y Cierre"],Ke=()=>{se(""),ne(!1),Oe(!1),Ge(te),de(R),Me("Todos"),je("Todos"),er("Todos")},wr=y.useMemo(()=>(ue??"").trim()!==""||X!=="Todos"||ke!=="Todos"||O||Se||Gt!=="Todos",[ue,X,ke,O,Se,Gt]);function An(L){if(!L)return"";const J=new Date(L);if(isNaN(J.getTime()))return"";const be=String(J.getDate()).padStart(2,"0"),Ie=String(J.getMonth()+1).padStart(2,"0"),At=String(J.getFullYear()).slice(-2);return`${be}/${Ie}/${At}`}function sa(L){const J=L?new Date(L):null;return J&&!isNaN(J.getTime())?J:null}function ul(L,J){let be=null;for(const Ie of L){const At=sa(J(Ie));if(At){const St=At.getTime();(be===null||St>be)&&(be=St)}}return be?new Date(be):null}function xs(L){const J=ul(L,be=>be.UltimoSeguimiento||be.FechaCita);return J?An(J.toISOString()):"—"}function _s(L){const J=(L??"").toLowerCase().trim();return J==="sin venta"||J==="con venta"||J==="rechazada"||J==="rechazadas"}function ia(L){return L.filter(J=>_s(J.EstatusDescripcion)).length}function aa(L){return L.filter(J=>!_s(J.EstatusDescripcion)).length}const dl=({progress:L,color:J})=>{if(!L)return u.jsx(il,{current:0,total:0,color:J});const be=L.split("/").map(Number);if(be.length!==2||be.some(St=>Number.isNaN(St)))return u.jsx(il,{current:0,total:0,color:J});const[Ie,At]=be;return u.jsx(il,{current:Ie,total:At,color:J})};function ca(L){return[{key:"fecha",header:"Fecha",accessor:J=>An(J.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:J=>u.jsx(g.Tooltip,{title:J.Vehiculo??"",placement:"top",arrow:!0,children:u.jsx(g.Typography,{component:"span",sx:{fontSize:13,fontWeight:500,display:"block",maxWidth:260,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:"default"},children:J.Vehiculo??"—"})}),width:260},{key:"estatus",header:"Estatus",accessor:J=>u.jsx(g.Typography,{sx:{fontWeight:800,fontSize:13},children:lA(L,J.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:J=>{const{bg:be,color:Ie}=eA(J.NivelInteres);return u.jsx(g.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:be,color:Ie,fontSize:12,fontWeight:J.NivelInteres?800:500},children:J.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:J=>{const be=(J.Asesor??"").trim(),Ie=fl=>{if(!fl)return"";const jA=fl[0]?.toUpperCase()??"",RA=fl[1]?.toLowerCase()??"";return`${jA}${RA}`};if(!be)return u.jsx(g.Tooltip,{title:"",placement:"top",children:u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const At=be.split(/\s+/),St=At[0]??"",Pr=At[1]??"",Sr=Ie(St),Tn=Ie(Pr),OA=`${Sr}${Tn}`||"—";return u.jsx(g.Tooltip,{title:be,placement:"top",children:u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:OA})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:J=>J.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:J=>u.jsx(g.Tooltip,{title:J.Actividad??"",placement:"top",arrow:!0,children:u.jsxs(g.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[J.Icon&&u.jsx("span",{style:{color:"#fff",backgroundColor:J.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:u.jsx("i",{className:J.Icon})}),u.jsx(g.Typography,{component:"span",noWrap:!0,sx:{fontSize:13,fontWeight:500,display:"block",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:(J.Actividad??"").length?"default":"inherit"},children:J.Actividad??"—"})]})}),width:180},{key:"avance",header:"Avance",accessor:J=>u.jsx(dl,{progress:J.Avance,color:J.Color}),width:200,align:"left"}]}function T(L){const be=ca(L).slice(1);return[{key:"fecha",header:"Fecha",accessor:Ie=>An(Ie.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Ie=>An(Ie.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Ie=>Ie.HoraCita??"—",width:110},...be]}function re(L){const J=L.kind;switch(J){case"pruebas":case"servicio":return T(J);case"nuevos":case"seminuevos":default:return ca(J)}}function ye(L,J,be,Ie){return{id:L,kind:be,title:J,metrics:[{label:"En Proceso",value:aa(Ie)},{label:"Finalizadas",value:ia(Ie)},{label:"Último seg.",value:xs(Ie)}],rows:Ie,initiallyOpen:!1}}const Pe=[ye("n-1","Cotización de nuevos","nuevos",v),ye("p-1","Prueba de Manejo","pruebas",m),ye("s-1","Cita de Servicio","servicio",p),ye("sn-1","Cotización para Seminuevos","seminuevos",b)],Qe=y.useMemo(()=>{const L=(ue??"").trim().toLowerCase(),J=(be,Ie)=>{if(L&&!(be.Vehiculo??"").toLowerCase().includes(L))return!1;const At=Se?be.FechaCita:be.Fecha;if(O&&At){const St=sa(At??"");if(!St)return!1;const Pr=_e?new Date(`${_e}T00:00:00`):null,Sr=q?new Date(`${q}T00:00:00`):null;if(Sr&&Sr.setDate(Sr.getDate()+1),Pr&&St<Pr||Sr&&St>=Sr)return!1}if(X!=="Todos"){const St=(be.EstatusDescripcion??"").toLowerCase();if(!(iA[X]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}if(ke!=="Todos"){const St=(be.Actividad??"").toLowerCase();if(!(aA[ke]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}if(Gt!=="Todos"){const St=(be.NivelInteres??"").toLowerCase();if(!(cA[Gt]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}return!0};return Pe.map(be=>{const Ie=(be.rows??[]).filter(St=>J(St,be.kind)),At=[{label:"En Proceso",value:aa(Ie)},{label:"Finalizadas",value:ia(Ie)},{label:"Último seg.",value:xs(Ie)}];return{...be,rows:Ie,metrics:At}})},[Pe,ue,O,_e,q,Se,X,ke,Gt]),dt={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},Ye=(L,J)=>{const be=L.SolID;if(!be)return;const Ie=J.kind,At=dt[Ie]??"cotizaciones",St=h?`https://qa2.crm.netcar.com.mx/netcar/${At}/${be}`:`https://crmxs.netcar.com.mx/netcar/${At}/${be}`,Pr=E?.({row:L,section:J,slug:At,solId:be,baseUrl:St});if(!C){const Sr=Pr??St;Y(be),ce(Sr),G(!0)}},Ve=()=>{S?.(r),Y(null),ce(null),G(!1)},Ht=y.useRef(!1),mt=y.useRef(null),Pt=y.useCallback(()=>{if(!Ht.current){Ht.current=!0;return}mt.current&&window.clearTimeout(mt.current),mt.current=window.setTimeout(()=>{_?.(r)},500)},[_,r]);return y.useEffect(()=>{Ht.current=!1,mt.current&&window.clearTimeout(mt.current)},[N,F]),u.jsx(g.Dialog,{open:e,onClose:t,fullWidth:!0,fullScreen:B,PaperProps:{sx:{height:{xs:"100dvh",md:"90vh"},maxWidth:{xs:"100vw",md:"92vw"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[u.jsxs(g.Box,{sx:{width:{xs:"100%",md:405},maxWidth:{xs:"100%",md:405},bgcolor:{xs:"transparent",md:"#40404024"},display:"flex",flexDirection:"column",height:{xs:"auto",md:"100%"},borderRight:{xs:"none",md:"1px solid #EBEEF0"}},children:[u.jsxs(g.Box,{children:[u.jsx(g.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:u.jsxs(g.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[u.jsx(g.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:u.jsx(g.Box,{sx:{flex:1,minWidth:0,pr:1},children:u.jsxs(g.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[Q(r)," ",u.jsx(g.IconButton,{component:"span",size:"small",disableRipple:!0,onClick:()=>{t?.(),r&&d?.(r)},sx:{p:0,ml:.5,verticalAlign:"text-bottom",color:"#336BE1","&:hover":{bgcolor:"transparent"},"&:focus-visible":{outline:"none"}},"aria-label":"Editar nombre",children:u.jsx(Q3,{sx:{fontSize:"1em"}})})]})})}),Ce.map((L,J)=>u.jsxs(g.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:L.onClick?"pointer":"default"},onClick:()=>{L.onClick&&L.onClick(r)},children:[L.icon,u.jsx(g.Typography,{variant:"body2",sx:{color:L.inLink?"#336BE1":"#070C10"},style:{},children:L.value(r)})]},J))]})}),u.jsx(g.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map((L,J)=>{const be=L.label?.toLowerCase().startsWith("asesor");return u.jsxs(g.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsx(g.Box,{sx:{width:"50%"},children:u.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:L.label})}),u.jsxs(g.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[u.jsx("div",{children:L?.avatar?L.avatar(r):null}),u.jsx(g.Typography,{variant:"body2",color:"textPrimary",children:L?.value(r)}),be&&!W&&u.jsx(g.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:u.jsx(g.IconButton,{size:"small",onClick:Ie=>M(Ie.currentTarget),sx:{ml:.5},disableRipple:!0,children:u.jsx(U3,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},J)})}),u.jsx(g.Divider,{sx:{my:2}})]}),u.jsx(g.Box,{px:2.5,pb:.5,children:u.jsxs(g.Typography,{children:[u.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!N&&" por solicitud",":"]})}),u.jsxs(g.Box,{sx:{px:2.5,pt:0,gap:2,flex:1,overflowY:"auto",display:"flex",flexDirection:"column",pb:6,maxHeight:{xs:"140px",md:"100%"}},children:[Re.length===0&&u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),u.jsxs(g.Box,{children:[Re?.map((L,J)=>{const be=me(L),Ie=sA(L.comentario||"");return u.jsxs(g.Box,{sx:{pb:1.5},children:[u.jsxs(g.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:L.tipo||"Evento"}),u.jsx(g.Chip,{size:"small",label:L.auto!=null?`${L.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Ie?u.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Ie}):null,u.jsxs(g.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[L?.ImgAsesor!=null?u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:we(be),src:L?.ImgAsesor}):u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:we(be)}),u.jsxs(g.Stack,{spacing:0,children:[u.jsx(g.Typography,{variant:"body2",fontWeight:600,children:be}),u.jsx(g.Typography,{variant:"caption",color:"text.secondary",children:oA(L.fecAlta)})]})]}),J<Re.length-1&&u.jsx(g.Divider,{sx:{mt:1.25}})]},L.segID??J)}),ge.length>D&&u.jsx(g.Box,{sx:{mt:1},children:u.jsx(g.Button,{onClick:()=>pe(L=>!L),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:ie?"Ver menos":`Ver más (${j})`})})]})]}),u.jsx(g.Menu,{anchorEl:A,open:I,onClose:()=>M(null),TransitionComponent:g.Fade,MenuListProps:{disablePadding:!0},PaperProps:{sx:{width:320,p:0,overflow:"hidden"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[u.jsx(g.Box,{sx:{position:"sticky",top:0,zIndex:1,px:1.5,py:1,fontWeight:700,bgcolor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:"Historial asesores"}),u.jsxs(g.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[fe.length===0&&u.jsx(g.Box,{sx:{px:1.5,py:1},children:u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),fe.map((L,J)=>{const be=q3(L),Ie=Y3(L.FechaBaja??L.FechaAsignacion);return u.jsx(g.Box,{sx:{px:1,py:.75},children:u.jsxs(g.Stack,{direction:"row",alignItems:"center",spacing:1,children:[u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:L?.ImgAsesor??void 0,children:Z3(be)}),u.jsx(g.Box,{sx:{flex:1,minWidth:0},children:u.jsx(g.Typography,{variant:"body2",noWrap:!0,children:be})}),u.jsx(g.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Ie})]})},J)})]})]})})]}),U?u.jsxs(g.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[u.jsx(g.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:u.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:u.jsx(g.Button,{onClick:Ve,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:u.jsx(Bh,{fontSize:"medium"})})})}),N&&u.jsx("iframe",{src:N,width:"100%",height:"100%",onLoad:Pt,style:{border:0}})]}):u.jsxs(g.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[u.jsx(g.Box,{sx:{mt:{xs:1.5,md:3}},children:u.jsxs(g.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[u.jsx(g.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),u.jsxs(g.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[u.jsxs(g.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[u.jsx(g.TextField,{size:"small",placeholder:"Buscar por vehículo",value:ue,onChange:L=>se(L.target.value),InputProps:{endAdornment:u.jsx(j3,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[u.jsxs(g.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[u.jsx(g.FormControlLabel,{label:u.jsx(g.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:u.jsx(g.Checkbox,{checked:O,onChange:L=>ne(L.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),u.jsx(g.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),u.jsxs(g.Stack,{direction:"row",spacing:1,children:[u.jsx(g.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:_e,onChange:L=>Ge(L.target.value),disabled:!O,sx:{width:170}}),u.jsx(g.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:q,onChange:L=>de(L.target.value),disabled:!O,sx:{width:170}})]})]}),u.jsx(g.IconButton,{onClick:L=>Ae(L.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:u.jsx(M3,{})}),wr&&u.jsx(g.Button,{variant:"outlined",onClick:Ke,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),u.jsx(g.Tooltip,{title:wr&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!wr,children:u.jsx("span",{children:u.jsxs(g.Button,{variant:"outlined",sx:{height:40,textTransform:"none",borderColor:"none",color:"#fff",backgroundColor:"#1e5bce","&:hover":{backgroundColor:"#1e5bce",boxShadow:"none"}},onClick:()=>{w?.(r)},disableRipple:!0,children:[u.jsx(i0,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!wr&&"Crear Solicitud"]})})})]}),u.jsx(W3,{sections:Qe,detailColumns:[],getDetailColumns:re,onRowClick:Ye})]})]})}),u.jsx(g.Menu,{anchorEl:Ee,open:Fe,onClose:()=>Ae(null),TransitionComponent:g.Fade,PaperProps:{sx:{p:1.5,width:260,borderRadius:2,boxShadow:3}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:u.jsxs(g.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),u.jsx(g.RadioGroup,{value:X,onChange:L=>Me(L.target.value),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos","Sin Asignar","En prospección","Proceso de Compra","En espera de Unidad","Auto Facturado","Rechazadas","Finalizadas sin Venta","Finalizadas con Venta","En Proceso"].map(L=>u.jsx(g.FormControlLabel,{value:L,control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),u.jsx(g.RadioGroup,{value:ke,onChange:(L,J)=>je(J),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Ur].map(L=>u.jsx(g.FormControlLabel,{value:L,sx:{alignItems:"start"},control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),u.jsx(g.RadioGroup,{value:Gt,onChange:(L,J)=>er(J),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Yt].map(L=>u.jsx(g.FormControlLabel,{value:L,control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]})]})})]})]})})}const a0={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function c0(e,t,r){const{fields:n,order:o=["nombreCliente","email","acciones"],header:s={},cells:i={},hide:a={},actions:c}=t,l=c??{},d=l.show??{},f=l.handlers??{},h=l.accessors??{},v=l.icons??{},m=l.className??"d-flex flex-row gap-2 align-items-center ",p=l.tooltip??{},b=v.view??u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[u.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"}),u.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),w={nombreCliente:{key:"nombreCliente",header:s.nombreCliente??"Cliente",accessor:I=>I[n.nombreCliente],cell:i.nombreCliente,width:190},email:{key:"email",header:s.email??"Correo",accessor:I=>I[n.email],cell:i.email??(I=>{const U=String(I[n.email]??"");return U?u.jsx("a",{href:`mailto:${U}`,children:U}):u.jsx("span",{className:"text-muted",children:"—"})}),width:230},acciones:a.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??(I=>{const U=ol(d.whatsapp,I,!0),G=ol(d.email,I,!0),F=ol(d.view,I,!0),Y=h.phone?.(I),oe=h.email?.(I),V=fe=>{if(fe.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(I);if(!Y)return;const $=h.countryCode??"52",Q=k3(String(Y));typeof window<"u"&&window.open(`https://wa.me/${$}${Q}`,"_blank")},N=fe=>{if(fe.stopPropagation(),f.onEmail)return f.onEmail(I);oe&&typeof window<"u"&&(window.location.href=`mailto:${oe}`)},ce=fe=>{fe.stopPropagation(),f.onView&&f.onView(I)};return u.jsxs("div",{className:m,children:[U&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:V,style:{width:24,height:24},children:u.jsx("img",{src:C3,alt:"WhatsApp"})}),G&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.email??"Email",onClick:N,style:{width:24,height:24},children:u.jsx("img",{src:E3,alt:"Email"})}),F&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:ce,style:{width:24,height:24},children:b})]})}),width:120}},C=Object.values(w).filter(I=>!!I),E=(e??[]).filter(I=>!!I?.key),S=new Map;for(const I of C)S.set(String(I.key),I);for(const I of E)S.set(String(I.key),I);const _=[...C.map(I=>String(I.key)),...E.map(I=>String(I.key))],W=Array.from(new Set(o.map(I=>String(I)).filter(I=>S.has(I)))),D=_.filter(I=>!W.includes(I)),A=[...W,...D],M="acciones";if(S.has(M)){const I=A.filter(U=>U!==M);A.splice(0,A.length,...I,M)}return A.map(I=>S.get(I))}function dA(e){const{rows:t,columns:r,clientSort:n=!0,urlsQA:o=!0,defaultSort:s,minWidth:i=1100,rowKey:a=A3,haveOpenDetailFor:c=!0,defaults:l,detailConfig:d,normalTable:f,onRowClick:h,activityHistory:v,advisorHistory:m,forceOpenDetailFor:p,closeDetailFor:b,onRequestEdit:w,searchFilter:C,solicitudesNuevos:E,solicitudesPrueba:S,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:A,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:U,idAdminSistemas:G=!1}=e,[F,Y]=y.useState(s??null),[oe,V]=y.useState({open:!1,customer:null}),[N,ce]=y.useState([]),fe=ae=>{V({open:!0,customer:ae})},$=ae=>{c&&(h?.(ae),V({open:!0,customer:ae}))},Q=()=>{V({open:!1,customer:null}),b?.()},Ce=y.useMemo(()=>l?c0(r??[],l):c0(r??[],{fields:{},order:[]}),[r,l]),me=y.useMemo(()=>{if(!n||!F)return t;const ae=Ce.find(le=>le.key===F.key);if(!ae)return t;const ee=[...t];return ee.sort((le,ge)=>{const ie=nl(ae,le,0),pe=nl(ae,ge,0),Re=D3(ie,pe);return F.direction==="asc"?Re:-Re}),ee},[t,Ce,F,n]),we=y.useMemo(()=>{const ae=d?.getCustomerId;return ee=>{const le=ae?.(ee)??ee?.Id_cliente??ee?.CliID??ee?.id??ee?.ID??ee?.Id??"";return String(le)}},[d]);return y.useEffect(()=>{if(!oe.open||!oe.customer)return;const ae=we(oe.customer);if(!ae)return;const ee=(t??[]).find(le=>we(le)===ae);ee&&ee!==oe.customer&&V(le=>({...le,customer:ee}))},[t,oe.open,oe.customer,we]),y.useEffect(()=>{p&&fe(p)},[p]),u.jsxs("div",{children:[u.jsx("div",{className:`${a0.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:u.jsx("div",{className:`${a0.tableResponsive} table-responsive`,children:u.jsxs("table",{className:"table table-hover align-middle mb-0",children:[u.jsx("thead",{children:u.jsx("tr",{children:Ce.map(ae=>u.jsx("th",{style:{fontWeight:600,width:ae.width,paddingTop:"20px",paddingBottom:"20px",textAlign:ae.align??"left"},children:ae.header},ae.key))})}),u.jsx("tbody",{children:me.map((ae,ee)=>u.jsx("tr",{onClick:()=>$?.(ae),role:"button",tabIndex:0,onKeyDown:le=>{(le.key==="Enter"||le.key===" ")&&$?.(ae)},style:{cursor:"pointer"},children:Ce.map((le,ge)=>{const ie=le.Component?u.jsx(le.Component,{row:ae,index:ee}):le.cell?le.cell(ae,ee):(()=>{const pe=nl(le,ae,ee);return pe==null||pe===""?"":String(pe)})();return u.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:le.align??"left"},children:ie},`${String(le.key)}-${ge}`)})},a(ae,ee)))})]})})}),oe.open&&u.jsx(uA,{open:oe.open,onClose:Q,customer:oe.customer,fields:d?.dynamicFields,header:d?.header,normalTable:f,history:v,advisorHistory:m,urlsQA:o,onRequestEdit:ae=>{Q(),w?.(ae)},searchFilter:C,solicitudesNuevos:E,solicitudesPrueba:S,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:A,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:U,idAdminSistemas:G})]})}const l0=K.forwardRef(({sx:e,...t},r)=>u.jsx(g.InputBase,{inputRef:r,...t,sx:{height:48,px:1.5,width:"100%",maxWidth:"none",bgcolor:"#EBEEF0",borderRadius:2,border:"1px solid transparent","&:hover":{borderColor:"transparent"},"& .MuiInputBase-input::placeholder":{opacity:.7},...e}}));l0.displayName="SoftInput";function fA({message:e}){return e?u.jsxs(g.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:[u.jsx(tl,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),u.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function pA(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function al(e,t){const r=pA(e);return r?t?.isArray?{required:r,validate:n=>Array.isArray(n)&&n.length>0||r}:{required:r,validate:n=>n!==""&&n!==null&&n!==void 0||r}:{}}const u0={"& .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"},width:"100%"},hA={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function cl({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return u.jsxs(g.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[u.jsx(g.FormLabel,{sx:hA,children:e}),n,u.jsx(fA,{message:t||r})]})}function mA(e,t){const{register:r,formState:{errors:n}}=t,o={...al(e)};e.minLength&&(o.minLength={value:e.minLength,message:`El campo espera minimo ${e.minLength} caracteres`}),e.maxLength&&(o.maxLength={value:e.maxLength,message:`El campo espera maximo ${e.maxLength} caracteres`}),e.pattern&&(o.pattern={value:e.pattern,message:"Formato inválido"});const s=e.type==="email";s&&!o.pattern&&(o.pattern={value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Correo electrónico inválido"});const i=/[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]/g,a=/[0-9]/g,c=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Home","End","Escape","Enter"]),l=S=>e.onlyNumbers?(S.match(a)??[]).join(""):e.onlyLetters?(S.match(i)??[]).join(""):S,d=(S,_)=>c.has(S)||_?!0:e.onlyNumbers?/^[0-9]$/.test(S):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(S):!0,f=n[e.name]?.message,h=r(e.name,o),v=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,m=S=>{d(S.key,S.ctrlKey||S.metaKey)||S.preventDefault()},p=S=>{const _=S.data??null;_!=null&&(e.onlyNumbers&&/[^0-9]/.test(_)&&S.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(_)&&S.preventDefault())},b=S=>{const _=S.clipboardData.getData("text"),W=l(_);if(W!==_){S.preventDefault();const D=S.target,A=D.selectionStart??D.value.length,M=D.selectionEnd??D.value.length;D.setRangeText(W,A,M,"end"),D.dispatchEvent(new Event("input",{bubbles:!0}))}},w=S=>{const _=l(S.target.value);_!==S.target.value&&(S.target.value=_),v&&S.target.value.length>v&&(S.target.value=S.target.value.slice(0,v)),h.onChange(S)},C={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:v,onKeyDown:m,onBeforeInput:p,onPaste:b,onInvalid:S=>S.preventDefault()},E=e.onlyNumbers||s?"text":e.type??"text";return u.jsx(cl,{label:e.label,errorMsg:f,helperText:e.helperText,sx:u0,children:u.jsx(l0,{placeholder:e.placeholder,type:E,inputProps:C,...h,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function gA(e,t){const{control:r}=t,n=!!e.multiple;return u.jsx(hr,{name:e.name,control:r,rules:al(e,{isArray:n}),render:({field:o,fieldState:s})=>u.jsx(cl,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:u0,children:u.jsxs(g.Select,{...o,multiple:n,displayEmpty:!0,sx:{height:48,backgroundColor:"#EBEEF0","& .MuiSelect-select":{display:"flex",alignItems:"center",py:0}},className:"2-SoftInputData",children:[!n&&u.jsx(g.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>u.jsx(g.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function vA(e,t){return u.jsx(hr,{name:e.name,control:t.control,rules:al(e),render:({field:r,fieldState:n})=>u.jsx(cl,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:u.jsx(g.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>u.jsx(g.FormControlLabel,{value:o.value,control:u.jsx(g.Radio,{}),label:o.label},String(o.value)))})})})}function d0(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return mA(e,t);case"select":return gA(e,t);case"radio":return vA(e,t);default:return null}}function yA(e,{initialPerPage:t=25,perPageOptions:r=[10,25,50,100,"Todos"],onPageChange:n,onPerPageChange:o,scrollTop:s,deps:i=[]}={}){const a=Array.isArray(e)?e:[],[c,l]=y.useState(1),[d,f]=y.useState(t),{currentItems:h,totalPages:v,showingFrom:m,showingTo:p,totalItems:b}=y.useMemo(()=>{const E=a.length,S=d==="Todos"?1/0:Number(d),_=S===1/0?1:Math.max(1,Math.ceil(E/S)),W=Math.min(c,_),D=S===1/0?E:W*S,A=S===1/0?0:D-S;return{currentItems:S===1/0?a:a.slice(A,D),totalPages:_,showingFrom:E===0?0:A+1,showingTo:S===1/0?E:Math.min(D,E),totalItems:E}},[a,c,d]),w=E=>{const S=Math.max(1,Math.min(E,v||1));l(S),n?.(S),s?.()};return{currentItems:h,totalPages:v,showingFrom:m,showingTo:p,totalItems:b,currentPage:c,itemsPerPage:d,perPageOptions:r,goTo:w,next:()=>w(c+1),prev:()=>w(c-1),setItemsPerPage:E=>{f(E),o?.(E),l(1),s?.()},setCurrentPage:w}}var vs={},f0;function bA(){if(f0)return vs;f0=1;var e=Je();Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=void 0;var t=e(lt()),r=rt();return vs.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),vs}var xA=bA();const _A=Xe(xA);var ys={},p0;function wA(){if(p0)return ys;p0=1;var e=Je();Object.defineProperty(ys,"__esModule",{value:!0}),ys.default=void 0;var t=e(lt()),r=rt();return ys.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),ys}var SA=wA();const CA=Xe(SA),EA=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const l=g.useTheme(),d=g.useMediaQuery(l.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const m=d?0:2,p=[],b=1,w=t,C=Math.max(b+1,e-m),E=Math.min(w-1,e+m);p.push(b),C>b+1&&p.push("...");for(let S=C;S<=E;S++)S>=b+1&&S<=w-1&&p.push(S);return E<w-1&&p.push("..."),p.push(w),p},h=m=>{const p=m.target.value;o(p)},v=Math.max(1,t);return u.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:"center",justifyContent:{xs:"center",sm:"space-between"},gap:2,my:0,py:2,borderTop:"#D3D4D5 1px solid",px:3},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[u.jsx(g.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:u.jsx(_A,{fontSize:"large"})}),f().map((m,p)=>m==="..."?u.jsx(g.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${p}`):u.jsx(g.Button,{onClick:()=>r(m),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===m?"primary.main":"transparent",fontWeight:e===m?700:400,color:e===m?"#fff":"#5C6372","&:hover":{backgroundColor:e===m?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:m},`p-${m}`)),u.jsx(g.IconButton,{onClick:()=>r(e+1),disabled:e>=v,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:u.jsx(CA,{fontSize:"large"})})]}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[u.jsx(g.Typography,{variant:"body2",children:"Mostrar"}),u.jsx(g.FormControl,{size:"small",sx:{minWidth:72},children:u.jsx(g.Select,{value:n,onChange:h,renderValue:m=>m==="Todos"?"Todos":String(m),children:s.map(m=>u.jsx(g.MenuItem,{value:m,children:m==="Todos"?"Todos":m},String(m)))})}),u.jsx(g.Typography,{variant:"body2",children:"por página"})]})]})};function DA(e){const{open:t,dataAdd:r,fields:n,onSubmit:o,onCancel:s,defaultValues:i,txtBtnGuardar:a,haveId:c=!1,itemsTable:l,filter:d,getId:f,renderRow:h,selectedIds:v,onSelectedChange:m,onSubmitAddData:p,initialSelectedIds:b=[],showAutosPanel:w}=e,C=Pp({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});y.useEffect(()=>{i&&C.reset(i)},[i,C]);const[E,S]=y.useState(""),[_,W]=y.useState(b),D=Array.isArray(v)&&!!m,A=D?v:_,M=O=>{const ne=typeof O=="function"?O(A):O;D?m(ne):W(ne)},I=y.useCallback(O=>f?f(O):O?.IdAuto,[f]),U=y.useMemo(()=>{const O=new Map;return(l??[]).forEach((ne,Se)=>O.set(I(ne),Se)),O},[l,I]),G=y.useRef(new Set),F=y.useMemo(()=>{const O=new Map;return(l??[]).forEach(ne=>O.set(f?f(ne):ne?.IdAuto,ne)),O},[l,f]),Y=y.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),oe=hp({control:C.control,name:Y}),V=O=>O==null?!1:typeof O=="string"?O.trim().length>0:Array.isArray(O)?O.length>0:typeof O=="number"?!Number.isNaN(O):typeof O=="object"?Object.keys(O).length>0:!0,N=y.useMemo(()=>Y.length?oe?.every(V)??!1:!0,[oe,Y]),{handleSubmit:ce,formState:{isSubmitting:fe,isDirty:$,isValid:Q}}=C,Ce=d??((O,ne)=>JSON.stringify(O).toLowerCase().includes(ne.toLowerCase())),me=y.useMemo(()=>E.trim()?l?.filter(O=>Ce(O,E)):l,[l,E,Ce]),we=y.useMemo(()=>{if(!me)return me;const O=G.current,ne=[...me];return ne.sort((Se,Oe)=>{const R=O.has(I(Se))?0:1,te=O.has(I(Oe))?0:1;if(R!==te)return R-te;const _e=U.get(I(Se))??0,Ge=U.get(I(Oe))??0;return _e-Ge}),ne},[me,U,I]),{currentItems:ae,totalPages:ee,showingFrom:le,showingTo:ge,totalItems:ie,currentPage:pe,itemsPerPage:Re,perPageOptions:j,goTo:We,setItemsPerPage:qe}=yA(we,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[E],scrollTop:()=>{}}),Ze=O=>{const ne=F.get(O)??null;M([O]),p?.({items:ne})},Ne=O=>A.includes(O),Be=async O=>{try{await o?.(O),C.reset(C.getValues())}catch(ne){console.error("Error al enviar AddCliente:",ne)}},vt=y.useMemo(()=>{const O=new Map;return(n??[]).forEach(ne=>O.set(String(ne.name),ne)),O},[n]),ht=(O,ne)=>{const Se=vt.get(String(O));if(!Se)return null;const Oe={xs:12,...Se.grid,...ne||{}};return u.jsx(g.Grid,{item:!0,...Oe,children:Se.render?Se.render(C):d0(Se,C)},`fld-${String(O)}`)},k=w??(e.haveId?"edit":"new"),P=k!=="onlyCars",B=k==="new"||k==="onlyCars",ue=A?.length>0,se=k==="onlyCars"?ue:e.haveId?N&&$||ue:N&&ue;return u.jsx(g.Dialog,{open:t,onClose:s,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:{xs:"100dvh",md:B?"90vw":"auto"},maxWidth:{xs:"100vw",md:B?"98vw":"50%"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:u.jsx(Nw,{...C,children:u.jsxs(g.Box,{component:"form",noValidate:!0,onSubmit:ce(Be),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[P&&u.jsxs(g.Box,{sx:{width:{xs:"100%",md:c?"100%":394},maxWidth:{xs:"100%",md:c?"100%":394},boxShadow:{xs:"none",md:c?"none":"2px 0px 8px #40404024"},borderRight:{xs:"none",md:c?"none":"1px solid #EBEEF0"},bgcolor:"background.paper",paddingBottom:3,mx:{xs:0,md:c?"auto":0},position:"relative"},children:[u.jsxs(g.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[u.jsx(g.Typography,{fontWeight:700,fontSize:20,children:r.title}),u.jsxs(g.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[u.jsx(g.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),u.jsx(g.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,ne)=>u.jsx(g.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((Se,Oe)=>{const R=typeof Se=="string"?{name:Se}:Se;return R.hidden?.(C)?null:ht(R.name,R.grid)})},`row-${ne}`)):u.jsx(g.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,ne)=>{const Se=O.grid??{xs:12,md:12};return u.jsx(g.Grid,{item:!0,...Se,children:O.render?O.render(C):d0(O,C)},`${String(O.name)}-${ne}`)})})})]})]}),u.jsx(g.Box,{sx:{position:"absolute",zIndex:O=>O.zIndex.modal+1,bottom:0,width:"100%",borderRadius:2,boxShadow:{xs:"0",md:"0 -8px 8px -6px #0003"},p:1,backgroundColor:"#fff"},children:u.jsx(g.Box,{display:"flex",alignItems:"center",children:u.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:u.jsx(g.Button,{type:"submit",variant:"contained",disabled:fe||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:c?"160px":"100%"},children:a})})})})]}),B&&u.jsx(g.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:u.jsx(g.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[u.jsxs(g.Box,{p:3,sx:{borderBottom:1,borderBottomColor:"#D3D4D5",position:"sticky",top:0,zIndex:1,bgcolor:"#fff",flexDirection:{sm:"row",xs:"column"}},display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:4,children:[u.jsx(g.TextField,{value:E,onChange:O=>S(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:u.jsx(g.InputAdornment,{position:"start",children:u.jsx(F2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),u.jsx(g.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:u.jsx(g.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:u.jsx(Vr,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&u.jsx(g.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:u.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",children:u.jsxs(g.Button,{type:"submit",variant:"contained",disabled:fe||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[u.jsx(i0,{sx:{color:fe||!se?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),u.jsx(g.Box,{sx:{flex:1,minHeight:0,overflowY:"auto",overflowX:"auto",padding:0,height:"100%","&::-webkit-scrollbar:horizontal":{display:"none"},"&::-webkit-scrollbar:vertical":{width:8}},children:u.jsx(g.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:u.jsxs(g.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ae?.map((O,ne)=>{const Se=f?f(O):ne,Oe=Ne(Se);return u.jsx(g.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:u.jsx(g.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:u.jsx(g.ListItemButton,{onClick:()=>Ze(Se),disableRipple:!0,sx:{padding:0},children:u.jsx(g.ListItemText,{disableTypography:!0,primary:h?h({item:O,selected:Oe,toggle:()=>Ze(Se),index:ne}):null})})})},`${String(Se)}`)}),!ae?.length&&u.jsx(g.Box,{p:3,children:u.jsxs(g.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",E,"”."]})})]})})}),u.jsx(g.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:u.jsx(EA,{currentPage:pe,totalPages:ee,onPageChange:We,itemsPerPage:Re,onItemsPerPageChange:qe,itemsPerPageOptions:j,showingFrom:le,showingTo:ge,totalItems:ie})})]})})})]})})})}var bs={},h0;function kA(){if(h0)return bs;h0=1;var e=Je();Object.defineProperty(bs,"__esModule",{value:!0}),bs.default=void 0;var t=e(lt()),r=rt();return bs.default=(0,t.default)((0,r.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"}),"AttachFile"),bs}var AA=kA();const TA=Xe(AA),ll=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,oa=/[,\s;]+/g,ln=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),un=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),m0=(e,t)=>t?e.filter(r=>ln(r)!==ln(t)):e,IA=(e,t)=>e.filter(r=>!t.some(n=>ln(n)===ln(r)));function Mr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function MA(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function PA({open:e,onClose:t,value:r,onChange:n,onRequestSend:o,customer:s,itemsSelects:i,renderItem:a,filterFields:c=[],multiSelectAutos:l=!0,imgCorreoSrc:d,baseURLImages:f,itemProps:h,defaultItemImageSrc:v}){const m=y.useRef(null),[p,b]=y.useState("idle"),w=y.useRef(e);y.useEffect(()=>{const R=w.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),w.current=e},[e]),y.useEffect(()=>{if(p==="entering"){const _e=setTimeout(()=>b("idle"),320);return()=>clearTimeout(_e)}if(p==="exiting"){const _e=setTimeout(()=>b("idle"),220);return()=>clearTimeout(_e)}},[p]);const[C,E]=y.useState(""),[S,_]=y.useState(!1),[W,D]=y.useState(!1),[A,M]=y.useState(!1),[I,U]=y.useState(""),[G,F]=y.useState([]),Y=A?G:r.selectedIds,oe=()=>{F([...r.selectedIds]),U(""),M(!0)},V=()=>{M(!1),F([])},N=()=>{const R=new Set(vt.map((_e,Ge)=>String(Mr(_e,Ge,h.id)))),te=G.filter(_e=>R.has(String(_e)));n({...r,selectedIds:te}),M(!1)},ce=(R,te)=>ln(R??"")===ln(te??"");function fe(R,te,_e,Ge,q){const de=te?R.some(Ae=>ce(Ae,te)):!1,Ee=_e.length>0?_e.some(Ae=>R.some(Fe=>ce(Fe,Ae))):!1;Ge(de),q(Ee)}const $=R=>{const te=typeof R=="function"?R(r.recipients):R;n({...r,recipients:te}),fe(te,ae,le,_,D)},Q=R=>n({...r,message:R}),Ce=R=>n({...r,attachments:[...r.attachments,...R]}),me=R=>n({...r,attachments:r.attachments.filter(te=>te.name!==R)}),we=R=>{if(A)if(l){const te=new Set(G);te.has(R)?te.delete(R):te.add(R),F(Array.from(te))}else{const te=G.includes(R);F(te?[]:[R])}else if(l){const te=new Set(r.selectedIds);te.has(R)?te.delete(R):te.add(R),n({...r,selectedIds:Array.from(te)})}else{const te=r.selectedIds.includes(R);n({...r,selectedIds:te?[]:[R]})}},ae=y.useMemo(()=>(s?.Correo??"").trim(),[s]),ee=y.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),le=y.useMemo(()=>ee.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ee]),ge=y.useRef(!1);y.useEffect(()=>{if(e&&!ge.current){let R=[];S&&ae&&(R=un(R,[ae])),W&&le.length&&(R=un(R,le)),$(te=>un(te,R)),fe(r.recipients,ae,le,_,D),E(""),ge.current=!0}e||(ge.current=!1)},[e,S,W,ae,le]);const ie=R=>{const te=ee.find(_e=>ln(_e.EmailAsesor??"")===ln(R));if(te){if(te.ImgAsesor)return u.jsx(g.Avatar,{src:te.ImgAsesor,alt:te.NombreAsesor});const _e=(te.NombreAsesor||"").trim(),Ge=(te.ApellidosAsesor||"").trim();return u.jsx(g.Avatar,{children:`${_e[0]??""}${Ge[0]??""}`.toUpperCase()})}return u.jsx(g.Avatar,{children:R[0]?.toUpperCase()})},pe=()=>{const R=C.trim();if(!R)return;const _e=R.split(oa).filter(Boolean).filter(Ge=>ll.test(Ge));_e.length>0&&$(Ge=>un(Ge,_e)),E("")},Re=R=>{_(R),$(te=>R&&ae?un(te,[ae]):m0(te,ae))},j=R=>{D(R),$(te=>R?un(te,le):IA(te,le))},We=R=>{const te=Array.from(R.target.files||[]);Ce(te.map(_e=>({name:_e.name,size:_e.size,file:_e}))),R.target.value=""},qe=Y[0],Ze=y.useMemo(()=>!i||qe===void 0?void 0:i.find((te,_e)=>String(Mr(te,_e,h.id))===String(qe)),[i,qe,h.id]),Ne=y.useMemo(()=>{if(!(!Ze||!h.distributorId))return Mr(Ze,0,h.distributorId)},[Ze,h.distributorId]);console.log("lockedDisId",Ne);const Be=y.useMemo(()=>Ze?(h.distributorTitle?Mr(Ze,0,h.distributorTitle):void 0)??(Ne!=null?String(Ne):void 0):void 0,[Ze,h.distributorTitle,Ne]),vt=y.useMemo(()=>{const R=i??[];return Ne==null||!h.distributorId?R:R.filter((te,_e)=>Mr(te,_e,h.distributorId)==Ne)},[i,Ne,h.distributorId]),ht=y.useMemo(()=>{if(!I.trim())return vt;const R=I.toLowerCase();return vt.filter(te=>(c??[]).some(_e=>String(te?.[_e]??"").toLowerCase().includes(R)))},[vt,I,c]),k=y.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((te,_e)=>{R.set(String(Mr(te,_e,h.id)),te)}),r.selectedIds.map(te=>R.get(String(te))).filter(Boolean)},[i,r.selectedIds,h.id]),P=R=>n({...r,selectedIds:r.selectedIds.filter(te=>String(te)!==String(R))}),B=()=>{let R=r.recipients;if(C.trim()){const de=C.split(oa).filter(Ee=>ll.test(Ee));R=un(R,de),$(R),E("")}const te=S?ae:"",_e=ee.find(de=>de?.Activo&&de?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:S,toAdvisor:W,tipoInt:S&&W?2:1,correoCliente:te,correoAsesor:W?_e:"",disIdLocked:Ne}),t?.()},ue=y.useMemo(()=>{const te=C.split(oa).filter(Boolean).some(_e=>ll.test(_e));return r.recipients.length>0||te},[r.recipients,C]),se=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,ne=ue&&se&&O,Se=g.useTheme(),Oe=g.useMediaQuery(Se.breakpoints.down("sm"));return u.jsxs(g.Drawer,{anchor:Oe?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!Oe}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:Oe?"up":"left",timeout:{enter:320,exit:220},easing:{enter:"cubic-bezier(0.22, 1, 0.36, 1)",exit:"cubic-bezier(0.4, 0, 1, 1)"}},PaperProps:{sx:{width:{xs:"100vw",sm:420},height:{xs:"85vh",sm:"auto"},maxHeight:{xs:"85vh",sm:"calc(100vh - 32px)"},left:{xs:0,sm:"auto"},right:{xs:0,sm:16},bottom:{xs:0,sm:16},top:{xs:"auto",sm:"auto"},borderRadius:{xs:"12px 12px 0 0",sm:2},boxShadow:6,overflow:"hidden"}},children:[u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[u.jsxs(g.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[d?u.jsx("img",{src:d,alt:"Correo",style:{width:24,height:18}}):null,u.jsxs(g.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),u.jsx(g.IconButton,{onClick:t,size:"small",children:u.jsx(Vr,{})})]}),u.jsx("div",{children:u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 10px",backgroundColor:"#EBEEF0",border:"1px solid #E5E7EB",borderRadius:8,flexWrap:"wrap"},children:[u.jsx("label",{style:{fontSize:14,fontWeight:600,marginRight:4},children:"Para:"}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:[r.recipients.map(R=>u.jsx(g.Chip,{avatar:ie(R),label:R,onDelete:()=>$(te=>m0(te,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),u.jsx("input",{type:"text",value:C,onChange:R=>E(R.target.value),onKeyDown:R=>{const te=R.key;te==="Enter"||te===","||te===";"||te===" "||te==="Tab"?(R.preventDefault(),pe()):te==="Backspace"&&!C&&r.recipients.length&&$(Ge=>Ge.slice(0,-1))},onBlur:pe,onPaste:R=>{const _e=R.clipboardData.getData("text").split(oa).filter(Boolean);_e.length>1&&(R.preventDefault(),$(Ge=>un(Ge,_e)),E(""))},placeholder:r.recipients.length?"":"correo@ejemplo.com",style:{flex:1,minWidth:140,border:"none",outline:"none",background:"transparent",fontSize:14,color:"#111827",padding:"4px 0"}})]})]})}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:S,onChange:R=>Re(R.target.checked),size:"small"}),label:"Cliente"}),ee.length!==0&&u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:W,onChange:R=>j(R.target.checked),size:"small"}),label:`Asesor${ee.length>1?"es":""}`})]})]}),u.jsx(g.Divider,{}),u.jsxs(g.Box,{p:2,children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:oe,children:[u.jsx(g.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Be!=null&&u.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),k.length>0?u.jsx(g.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:k.map((R,te)=>{const _e=Mr(R,te,h.id),Ge=Mr(R,te,h.title)??"",q=Mr(R,te,h.image),de=MA(f,q);return u.jsx(g.Chip,{onDelete:()=>P(_e),label:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(g.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:de?u.jsx("img",{src:de,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}}):u.jsx("img",{src:v,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}})}),u.jsx("span",{style:{fontSize:12},children:u.jsx("b",{children:Ge})})]}),sx:{pl:.5,pr:.3,py:.2,borderRadius:2,".MuiChip-deleteIcon":{fontSize:18}},variant:"outlined"},String(_e))})}):u.jsx(g.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),u.jsx(g.Divider,{}),u.jsxs(g.Box,{sx:{p:2},children:[u.jsx(g.TextField,{placeholder:"Escribe aquí tu mensaje...",value:r.message,onChange:R=>Q(R.target.value),multiline:!0,minRows:6,fullWidth:!0,sx:{mb:1.5}}),r.attachments.length>0&&u.jsx(g.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>u.jsxs(g.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[u.jsx(g.ListItemText,{style:{gap:10,fontSize:15,color:"#5285F7",display:"flex",flexWrap:"wrap",flex:"none"},primary:R.name,secondary:R.size<1024?`${R.size} b`:R.size<1024*1024?`${(R.size/1024).toFixed(0)} kb`:`${(R.size/(1024*1024)).toFixed(1)} MB`,secondaryTypographyProps:{sx:{fontSize:12,color:"#64748B",fontWeight:500,mt:.25}},primaryTypographyProps:{noWrap:!0,width:"auto"}}),u.jsx(g.Tooltip,{title:"Quitar",children:u.jsx(g.IconButton,{edge:"end",onClick:()=>me(R.name),size:"small",children:u.jsx(Vr,{fontSize:"small"})})})]},R.name))})]}),u.jsxs(g.Box,{sx:{position:{xs:"sticky",sm:"sticky"},bottom:0,bgcolor:"#fff",borderTop:"1px solid #E5E7EB",p:2,display:"flex",alignItems:"center",gap:2},children:[u.jsx("input",{ref:m,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:We}),u.jsx(g.Button,{startIcon:u.jsx(TA,{}),variant:"text",onClick:()=>m.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),u.jsx(g.Box,{sx:{flex:1}}),u.jsx(g.Button,{variant:"contained",onClick:B,disabled:!ne,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),u.jsxs(g.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:Oe,open:A,onClose:V,children:[u.jsxs(g.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",u.jsx(g.IconButton,{onClick:V,size:"small",children:u.jsx(Vr,{})})]}),u.jsxs(g.DialogContent,{children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(g.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:I,onChange:R=>U(R.target.value),sx:{mb:2}}),Be!=null&&u.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),u.jsxs(g.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",ht.length,")"]}),u.jsxs(g.List,{sx:{p:0},children:[ht.map((R,te)=>{const _e=Mr(R,te,h.id),Ge=Y.includes(String(_e))||Y.includes(_e),q=Ne==null||Mr(R,te,h.distributorId)==Ne;return u.jsx(g.ListItem,{disableGutters:!0,sx:{p:0,opacity:q?1:.5},children:u.jsx(g.Box,{onClick:()=>q&&we(_e),sx:{cursor:q?"pointer":"not-allowed",p:.5,backgroundColor:Ge?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(R,te):u.jsx("pre",{style:{margin:0},children:JSON.stringify(R,null,2)})})},String(_e))}),ht.length===0&&u.jsx(g.Box,{p:2,children:u.jsx(g.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),u.jsxs(g.DialogActions,{sx:{px:3,pb:2},children:[u.jsx(g.Button,{variant:"text",onClick:V,sx:{color:"#5C6372"},children:"Cancelar"}),u.jsx(g.Button,{variant:"contained",onClick:N,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}Ot.AddCliente=DA,Ot.ApiProvider=zx,Ot.AuthProvider=h1,Ot.Clientes=dA,Ot.CustomSnackbar=rl,Ot.EventsProvider=m3,Ot.ModalCorreo=PA,Ot.MyCalendar=S3,Ot.useAuth=uc,Ot.useAuthRepository=Pi,Ot.useEventRepository=Ic,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})}));