componentes-exagono 0.2.34 → 0.2.36

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(jt,v){typeof exports=="object"&&typeof module<"u"?v(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"],v):(jt=typeof globalThis<"u"?globalThis:jt||self,v(jt.exagono={},jt.React,jt.MaterialUI,jt.dateFns,jt.ReactDOM,jt.notistack))})(this,(function(jt,v,m,x,fl,_s){"use strict";function pl(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=pl(v),m0=pl(fl);function tt(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 ws={exports:{}},to={};/**
1
+ (function(jt,v){typeof exports=="object"&&typeof module<"u"?v(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"],v):(jt=typeof globalThis<"u"?globalThis:jt||self,v(jt.exagono={},jt.React,jt.MaterialUI,jt.dateFns,jt.ReactDOM,jt.notistack))})(this,(function(jt,v,m,x,ul,bs){"use strict";function dl(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=dl(v),d0=dl(ul);function lt(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 xs={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 hl;function g0(){if(hl)return to;hl=1;var e=v,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,y=null;u!==void 0&&(h=""+u),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(y=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:y,props:f,_owner:o.current}}return to.Fragment=r,to.jsx=i,to.jsxs=i,to}var ro={};/**
9
+ */var fl;function f0(){if(fl)return to;fl=1;var e=v,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,y=null;l!==void 0&&(h=""+l),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(y=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:y,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 ml;function v0(){return ml||(ml=1,process.env.NODE_ENV!=="production"&&(function(){var e=v,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"),y=Symbol.for("react.offscreen"),g=Symbol.iterator,p="@@iterator";function b(A){if(A===null||typeof A!="object")return null;var ne=g&&A[g]||A[p];return typeof ne=="function"?ne:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(A){{for(var ne=arguments.length,ve=new Array(ne>1?ne-1:0),je=1;je<ne;je++)ve[je-1]=arguments[je];E("error",A,ve)}}function E(A,ne,ve){{var je=w.ReactDebugCurrentFrame,Qe=je.getStackAddendum();Qe!==""&&(ne+="%s",ve=ve.concat([Qe]));var dt=ve.map(function(qe){return String(qe)});dt.unshift("Warning: "+ne),Function.prototype.apply.call(console[A],console,dt)}}var C=!1,_=!1,W=!1,D=!1,T=!1,M;M=Symbol.for("react.module.reference");function I(A){return!!(typeof A=="string"||typeof A=="function"||A===n||A===s||T||A===o||A===u||A===d||D||A===y||C||_||W||typeof A=="object"&&A!==null&&(A.$$typeof===h||A.$$typeof===f||A.$$typeof===i||A.$$typeof===a||A.$$typeof===c||A.$$typeof===M||A.getModuleId!==void 0))}function H(A,ne,ve){var je=A.displayName;if(je)return je;var Qe=ne.displayName||ne.name||"";return Qe!==""?ve+"("+Qe+")":ve}function G(A){return A.displayName||"Context"}function F(A){if(A==null)return null;if(typeof A.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){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 A=="object")switch(A.$$typeof){case a:var ne=A;return G(ne)+".Consumer";case i:var ve=A;return G(ve._context)+".Provider";case c:return H(A,A.render,"ForwardRef");case f:var je=A.displayName||null;return je!==null?je:F(A.type)||"Memo";case h:{var Qe=A,dt=Qe._payload,qe=Qe._init;try{return F(qe(dt))}catch{return null}}}return null}var Y=Object.assign,se=0,U,N,le,de,$,Q,we;function _e(){}_e.__reactDisabledLog=!0;function he(){{if(se===0){U=console.log,N=console.info,le=console.warn,de=console.error,$=console.group,Q=console.groupCollapsed,we=console.groupEnd;var A={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}se++}}function ae(){{if(se--,se===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},A,{value:U}),info:Y({},A,{value:N}),warn:Y({},A,{value:le}),error:Y({},A,{value:de}),group:Y({},A,{value:$}),groupCollapsed:Y({},A,{value:Q}),groupEnd:Y({},A,{value:we})})}se<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=w.ReactCurrentDispatcher,J;function Se(A,ne,ve){{if(J===void 0)try{throw Error()}catch(Qe){var je=Qe.stack.trim().match(/\n( *(at )?)/);J=je&&je[1]||""}return`
18
- `+J+A}}var me=!1,ee;{var Ie=typeof WeakMap=="function"?WeakMap:Map;ee=new Ie}function j(A,ne){if(!A||me)return"";{var ve=ee.get(A);if(ve!==void 0)return ve}var je;me=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var dt;dt=ue.current,ue.current=null,he();try{if(ne){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(Te){je=Te}Reflect.construct(A,[],qe)}else{try{qe.call()}catch(Te){je=Te}A.call(qe.prototype)}}else{try{throw Error()}catch(Te){je=Te}A()}}catch(Te){if(Te&&je&&typeof Te.stack=="string"){for(var We=Te.stack.split(`
19
- `),Yt=je.stack.split(`
20
- `),gt=We.length-1,Ot=Yt.length-1;gt>=1&&Ot>=0&&We[gt]!==Yt[Ot];)Ot--;for(;gt>=1&&Ot>=0;gt--,Ot--)if(We[gt]!==Yt[Ot]){if(gt!==1||Ot!==1)do if(gt--,Ot--,Ot<0||We[gt]!==Yt[Ot]){var L=`
21
- `+We[gt].replace(" at new "," at ");return A.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",A.displayName)),typeof A=="function"&&ee.set(A,L),L}while(gt>=1&&Ot>=0);break}}}finally{me=!1,ue.current=dt,ae(),Error.prepareStackTrace=Qe}var X=A?A.displayName||A.name:"",ye=X?Se(X):"";return typeof A=="function"&&ee.set(A,ye),ye}function Fe(A,ne,ve){return j(A,!1)}function Ke(A){var ne=A.prototype;return!!(ne&&ne.isReactComponent)}function Ze(A,ne,ve){if(A==null)return"";if(typeof A=="function")return j(A,Ke(A));if(typeof A=="string")return Se(A);switch(A){case u:return Se("Suspense");case d:return Se("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case c:return Fe(A.render);case f:return Ze(A.type,ne,ve);case h:{var je=A,Qe=je._payload,dt=je._init;try{return Ze(dt(Qe),ne,ve)}catch{}}}return""}var Be=Object.prototype.hasOwnProperty,Ve={},et=w.ReactDebugCurrentFrame;function mt(A){if(A){var ne=A._owner,ve=Ze(A.type,A._source,ne?ne.type:null);et.setExtraStackFrame(ve)}else et.setExtraStackFrame(null)}function k(A,ne,ve,je,Qe){{var dt=Function.call.bind(Be);for(var qe in A)if(dt(A,qe)){var We=void 0;try{if(typeof A[qe]!="function"){var Yt=Error((je||"React class")+": "+ve+" type `"+qe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[qe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Yt.name="Invariant Violation",Yt}We=A[qe](ne,qe,je,ve,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(gt){We=gt}We&&!(We instanceof Error)&&(mt(Qe),S("%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).",je||"React class",ve,qe,typeof We),mt(null)),We instanceof Error&&!(We.message in Ve)&&(Ve[We.message]=!0,mt(Qe),S("Failed %s type: %s",ve,We.message),mt(null))}}}var P=Array.isArray;function B(A){return P(A)}function ce(A){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,ve=ne&&A[Symbol.toStringTag]||A.constructor.name||"Object";return ve}}function ie(A){try{return O(A),!1}catch{return!0}}function O(A){return""+A}function oe(A){if(ie(A))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ce(A)),O(A)}var Ce=w.ReactCurrentOwner,Re={key:!0,ref:!0,__self:!0,__source:!0},R,te;function xe(A){if(Be.call(A,"ref")){var ne=Object.getOwnPropertyDescriptor(A,"ref").get;if(ne&&ne.isReactWarning)return!1}return A.ref!==void 0}function Ge(A){if(Be.call(A,"key")){var ne=Object.getOwnPropertyDescriptor(A,"key").get;if(ne&&ne.isReactWarning)return!1}return A.key!==void 0}function At(A,ne){typeof A.ref=="string"&&Ce.current}function q(A,ne){{var ve=function(){R||(R=!0,S("%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)",ne))};ve.isReactWarning=!0,Object.defineProperty(A,"key",{get:ve,configurable:!0})}}function fe(A,ne){{var ve=function(){te||(te=!0,S("%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)",ne))};ve.isReactWarning=!0,Object.defineProperty(A,"ref",{get:ve,configurable:!0})}}var De=function(A,ne,ve,je,Qe,dt,qe){var We={$$typeof:t,type:A,key:ne,ref:ve,props:qe,_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:je}),Object.defineProperty(We,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(We.props),Object.freeze(We)),We};function Me(A,ne,ve,je,Qe){{var dt,qe={},We=null,Yt=null;ve!==void 0&&(oe(ve),We=""+ve),Ge(ne)&&(oe(ne.key),We=""+ne.key),xe(ne)&&(Yt=ne.ref,At(ne,Qe));for(dt in ne)Be.call(ne,dt)&&!Re.hasOwnProperty(dt)&&(qe[dt]=ne[dt]);if(A&&A.defaultProps){var gt=A.defaultProps;for(dt in gt)qe[dt]===void 0&&(qe[dt]=gt[dt])}if(We||Yt){var Ot=typeof A=="function"?A.displayName||A.name||"Unknown":A;We&&q(qe,Ot),Yt&&fe(qe,Ot)}return De(A,We,Yt,Qe,je,Ce.current,qe)}}var Ne=w.ReactCurrentOwner,re=w.ReactDebugCurrentFrame;function Ee(A){if(A){var ne=A._owner,ve=Ze(A.type,A._source,ne?ne.type:null);re.setExtraStackFrame(ve)}else re.setExtraStackFrame(null)}var Oe;Oe=!1;function Pe(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function wr(){{if(Ne.current){var A=F(Ne.current.type);if(A)return`
17
+ */var pl;function p0(){return pl||(pl=1,process.env.NODE_ENV!=="production"&&(function(){var e=v,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"),y=Symbol.for("react.offscreen"),g=Symbol.iterator,p="@@iterator";function b(A){if(A===null||typeof A!="object")return null;var ne=g&&A[g]||A[p];return typeof ne=="function"?ne:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(A){{for(var ne=arguments.length,ve=new Array(ne>1?ne-1:0),Re=1;Re<ne;Re++)ve[Re-1]=arguments[Re];E("error",A,ve)}}function E(A,ne,ve){{var Re=w.ReactDebugCurrentFrame,Qe=Re.getStackAddendum();Qe!==""&&(ne+="%s",ve=ve.concat([Qe]));var ct=ve.map(function(qe){return String(qe)});ct.unshift("Warning: "+ne),Function.prototype.apply.call(console[A],console,ct)}}var C=!1,_=!1,W=!1,D=!1,T=!1,M;M=Symbol.for("react.module.reference");function I(A){return!!(typeof A=="string"||typeof A=="function"||A===n||A===s||T||A===o||A===l||A===d||D||A===y||C||_||W||typeof A=="object"&&A!==null&&(A.$$typeof===h||A.$$typeof===f||A.$$typeof===i||A.$$typeof===a||A.$$typeof===c||A.$$typeof===M||A.getModuleId!==void 0))}function U(A,ne,ve){var Re=A.displayName;if(Re)return Re;var Qe=ne.displayName||ne.name||"";return Qe!==""?ve+"("+Qe+")":ve}function G(A){return A.displayName||"Context"}function F(A){if(A==null)return null;if(typeof A.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){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 A=="object")switch(A.$$typeof){case a:var ne=A;return G(ne)+".Consumer";case i:var ve=A;return G(ve._context)+".Provider";case c:return U(A,A.render,"ForwardRef");case f:var Re=A.displayName||null;return Re!==null?Re:F(A.type)||"Memo";case h:{var Qe=A,ct=Qe._payload,qe=Qe._init;try{return F(qe(ct))}catch{return null}}}return null}var Y=Object.assign,se=0,H,N,le,de,$,Q,Se;function we(){}we.__reactDisabledLog=!0;function he(){{if(se===0){H=console.log,N=console.info,le=console.warn,de=console.error,$=console.group,Q=console.groupCollapsed,Se=console.groupEnd;var A={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}se++}}function ae(){{if(se--,se===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},A,{value:H}),info:Y({},A,{value:N}),warn:Y({},A,{value:le}),error:Y({},A,{value:de}),group:Y({},A,{value:$}),groupCollapsed:Y({},A,{value:Q}),groupEnd:Y({},A,{value:Se})})}se<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=w.ReactCurrentDispatcher,J;function Ce(A,ne,ve){{if(J===void 0)try{throw Error()}catch(Qe){var Re=Qe.stack.trim().match(/\n( *(at )?)/);J=Re&&Re[1]||""}return`
18
+ `+J+A}}var me=!1,ee;{var Me=typeof WeakMap=="function"?WeakMap:Map;ee=new Me}function j(A,ne){if(!A||me)return"";{var ve=ee.get(A);if(ve!==void 0)return ve}var Re;me=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ct;ct=ue.current,ue.current=null,he();try{if(ne){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(Te){Re=Te}Reflect.construct(A,[],qe)}else{try{qe.call()}catch(Te){Re=Te}A.call(qe.prototype)}}else{try{throw Error()}catch(Te){Re=Te}A()}}catch(Te){if(Te&&Re&&typeof Te.stack=="string"){for(var We=Te.stack.split(`
19
+ `),Yt=Re.stack.split(`
20
+ `),mt=We.length-1,Ot=Yt.length-1;mt>=1&&Ot>=0&&We[mt]!==Yt[Ot];)Ot--;for(;mt>=1&&Ot>=0;mt--,Ot--)if(We[mt]!==Yt[Ot]){if(mt!==1||Ot!==1)do if(mt--,Ot--,Ot<0||We[mt]!==Yt[Ot]){var L=`
21
+ `+We[mt].replace(" at new "," at ");return A.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",A.displayName)),typeof A=="function"&&ee.set(A,L),L}while(mt>=1&&Ot>=0);break}}}finally{me=!1,ue.current=ct,ae(),Error.prepareStackTrace=Qe}var X=A?A.displayName||A.name:"",ye=X?Ce(X):"";return typeof A=="function"&&ee.set(A,ye),ye}function Fe(A,ne,ve){return j(A,!1)}function Ke(A){var ne=A.prototype;return!!(ne&&ne.isReactComponent)}function Ze(A,ne,ve){if(A==null)return"";if(typeof A=="function")return j(A,Ke(A));if(typeof A=="string")return Ce(A);switch(A){case l:return Ce("Suspense");case d:return Ce("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case c:return Fe(A.render);case f:return Ze(A.type,ne,ve);case h:{var Re=A,Qe=Re._payload,ct=Re._init;try{return Ze(ct(Qe),ne,ve)}catch{}}}return""}var Be=Object.prototype.hasOwnProperty,Ve={},et=w.ReactDebugCurrentFrame;function ht(A){if(A){var ne=A._owner,ve=Ze(A.type,A._source,ne?ne.type:null);et.setExtraStackFrame(ve)}else et.setExtraStackFrame(null)}function k(A,ne,ve,Re,Qe){{var ct=Function.call.bind(Be);for(var qe in A)if(ct(A,qe)){var We=void 0;try{if(typeof A[qe]!="function"){var Yt=Error((Re||"React class")+": "+ve+" type `"+qe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[qe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Yt.name="Invariant Violation",Yt}We=A[qe](ne,qe,Re,ve,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(mt){We=mt}We&&!(We instanceof Error)&&(ht(Qe),S("%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).",Re||"React class",ve,qe,typeof We),ht(null)),We instanceof Error&&!(We.message in Ve)&&(Ve[We.message]=!0,ht(Qe),S("Failed %s type: %s",ve,We.message),ht(null))}}}var P=Array.isArray;function B(A){return P(A)}function ce(A){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,ve=ne&&A[Symbol.toStringTag]||A.constructor.name||"Object";return ve}}function ie(A){try{return O(A),!1}catch{return!0}}function O(A){return""+A}function oe(A){if(ie(A))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ce(A)),O(A)}var Ee=w.ReactCurrentOwner,Ne={key:!0,ref:!0,__self:!0,__source:!0},R,re;function xe(A){if(Be.call(A,"ref")){var ne=Object.getOwnPropertyDescriptor(A,"ref").get;if(ne&&ne.isReactWarning)return!1}return A.ref!==void 0}function Ge(A){if(Be.call(A,"key")){var ne=Object.getOwnPropertyDescriptor(A,"key").get;if(ne&&ne.isReactWarning)return!1}return A.key!==void 0}function At(A,ne){typeof A.ref=="string"&&Ee.current}function q(A,ne){{var ve=function(){R||(R=!0,S("%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)",ne))};ve.isReactWarning=!0,Object.defineProperty(A,"key",{get:ve,configurable:!0})}}function fe(A,ne){{var ve=function(){re||(re=!0,S("%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)",ne))};ve.isReactWarning=!0,Object.defineProperty(A,"ref",{get:ve,configurable:!0})}}var ke=function(A,ne,ve,Re,Qe,ct,qe){var We={$$typeof:t,type:A,key:ne,ref:ve,props:qe,_owner:ct};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:Re}),Object.defineProperty(We,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(We.props),Object.freeze(We)),We};function Oe(A,ne,ve,Re,Qe){{var ct,qe={},We=null,Yt=null;ve!==void 0&&(oe(ve),We=""+ve),Ge(ne)&&(oe(ne.key),We=""+ne.key),xe(ne)&&(Yt=ne.ref,At(ne,Qe));for(ct in ne)Be.call(ne,ct)&&!Ne.hasOwnProperty(ct)&&(qe[ct]=ne[ct]);if(A&&A.defaultProps){var mt=A.defaultProps;for(ct in mt)qe[ct]===void 0&&(qe[ct]=mt[ct])}if(We||Yt){var Ot=typeof A=="function"?A.displayName||A.name||"Unknown":A;We&&q(qe,Ot),Yt&&fe(qe,Ot)}return ke(A,We,Yt,Qe,Re,Ee.current,qe)}}var je=w.ReactCurrentOwner,te=w.ReactDebugCurrentFrame;function _e(A){if(A){var ne=A._owner,ve=Ze(A.type,A._source,ne?ne.type:null);te.setExtraStackFrame(ve)}else te.setExtraStackFrame(null)}var Ie;Ie=!1;function Pe(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function wr(){{if(je.current){var A=F(je.current.type);if(A)return`
22
22
 
23
23
  Check the render method of \``+A+"`."}return""}}function ar(A){return""}var Vt={};function Jr(A){{var ne=wr();if(!ne){var ve=typeof A=="string"?A:A.displayName||A.name;ve&&(ne=`
24
24
 
25
- Check the top-level render call using <`+ve+">.")}return ne}}function Ye(A,ne){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ve=Jr(ne);if(Vt[ve])return;Vt[ve]=!0;var je="";A&&A._owner&&A._owner!==Ne.current&&(je=" It was passed a child from "+F(A._owner.type)+"."),Ee(A),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ve,je),Ee(null)}}function Sr(A,ne){{if(typeof A!="object")return;if(B(A))for(var ve=0;ve<A.length;ve++){var je=A[ve];Pe(je)&&Ye(je,ne)}else if(Pe(A))A._store&&(A._store.validated=!0);else if(A){var Qe=b(A);if(typeof Qe=="function"&&Qe!==A.entries)for(var dt=Qe.call(A),qe;!(qe=dt.next()).done;)Pe(qe.value)&&Ye(qe.value,ne)}}}function oa(A){{var ne=A.type;if(ne==null||typeof ne=="string")return;var ve;if(typeof ne=="function")ve=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))ve=ne.propTypes;else return;if(ve){var je=F(ne);k(ve,A.props,"prop",je,A)}else if(ne.PropTypes!==void 0&&!Oe){Oe=!0;var Qe=F(ne);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ll(A){{for(var ne=Object.keys(A.props),ve=0;ve<ne.length;ve++){var je=ne[ve];if(je!=="children"&&je!=="key"){Ee(A),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),Ee(null);break}}A.ref!==null&&(Ee(A),S("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var bs={};function xs(A,ne,ve,je,Qe,dt){{var qe=I(A);if(!qe){var We="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).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 Yt=ar();Yt?We+=Yt:We+=wr();var gt;A===null?gt="null":B(A)?gt="array":A!==void 0&&A.$$typeof===t?(gt="<"+(F(A.type)||"Unknown")+" />",We=" Did you accidentally export a JSX literal instead of a component?"):gt=typeof A,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",gt,We)}var Ot=Me(A,ne,ve,Qe,dt);if(Ot==null)return Ot;if(qe){var L=ne.children;if(L!==void 0)if(je)if(B(L)){for(var X=0;X<L.length;X++)Sr(L[X],A);Object.freeze&&Object.freeze(L)}else S("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 Sr(L,A)}if(Be.call(ne,"key")){var ye=F(A),Te=Object.keys(ne).filter(function(Or){return Or!=="key"}),Tt=Te.length>0?"{key: someKey, "+Te.join(": ..., ")+": ...}":"{key: someKey}";if(!bs[ye+Tt]){var Ct=Te.length>0?"{"+Te.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ve+">.")}return ne}}function Ye(A,ne){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ve=Jr(ne);if(Vt[ve])return;Vt[ve]=!0;var Re="";A&&A._owner&&A._owner!==je.current&&(Re=" It was passed a child from "+F(A._owner.type)+"."),_e(A),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ve,Re),_e(null)}}function Sr(A,ne){{if(typeof A!="object")return;if(B(A))for(var ve=0;ve<A.length;ve++){var Re=A[ve];Pe(Re)&&Ye(Re,ne)}else if(Pe(A))A._store&&(A._store.validated=!0);else if(A){var Qe=b(A);if(typeof Qe=="function"&&Qe!==A.entries)for(var ct=Qe.call(A),qe;!(qe=ct.next()).done;)Pe(qe.value)&&Ye(qe.value,ne)}}}function ra(A){{var ne=A.type;if(ne==null||typeof ne=="string")return;var ve;if(typeof ne=="function")ve=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))ve=ne.propTypes;else return;if(ve){var Re=F(ne);k(ve,A.props,"prop",Re,A)}else if(ne.PropTypes!==void 0&&!Ie){Ie=!0;var Qe=F(ne);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function al(A){{for(var ne=Object.keys(A.props),ve=0;ve<ne.length;ve++){var Re=ne[ve];if(Re!=="children"&&Re!=="key"){_e(A),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Re),_e(null);break}}A.ref!==null&&(_e(A),S("Invalid attribute `ref` supplied to `React.Fragment`."),_e(null))}}var vs={};function ys(A,ne,ve,Re,Qe,ct){{var qe=I(A);if(!qe){var We="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).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 Yt=ar();Yt?We+=Yt:We+=wr();var mt;A===null?mt="null":B(A)?mt="array":A!==void 0&&A.$$typeof===t?(mt="<"+(F(A.type)||"Unknown")+" />",We=" Did you accidentally export a JSX literal instead of a component?"):mt=typeof A,S("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 Ot=Oe(A,ne,ve,Qe,ct);if(Ot==null)return Ot;if(qe){var L=ne.children;if(L!==void 0)if(Re)if(B(L)){for(var X=0;X<L.length;X++)Sr(L[X],A);Object.freeze&&Object.freeze(L)}else S("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 Sr(L,A)}if(Be.call(ne,"key")){var ye=F(A),Te=Object.keys(ne).filter(function(Or){return Or!=="key"}),Tt=Te.length>0?"{key: someKey, "+Te.join(": ..., ")+": ...}":"{key: someKey}";if(!vs[ye+Tt]){var Ct=Te.length>0?"{"+Te.join(": ..., ")+": ...}":"{}";S(`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} />`,Tt,ye,Ct,ye),bs[ye+Tt]=!0}}return A===n?ll(Ot):oa(Ot),Ot}}function sa(A,ne,ve){return xs(A,ne,ve,!0)}function ia(A,ne,ve){return xs(A,ne,ve,!1)}var ul=ia,aa=sa;ro.Fragment=n,ro.jsx=ul,ro.jsxs=aa})()),ro}var gl;function lt(){return gl||(gl=1,process.env.NODE_ENV==="production"?ws.exports=g0():ws.exports=v0()),ws.exports}var l=lt();const Er={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={},ca={exports:{}},vl;function rt(){return vl||(vl=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})(ca)),ca.exports}var la={};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 en(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 yl(e){if(K.isValidElement(e)||!en(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=yl(e[r])}),t}function jr(e,t,r={clone:!0}){const n=r.clone?nt({},e):e;return en(e)&&en(t)&&Object.keys(t).forEach(o=>{K.isValidElement(t[o])?n[o]=t[o]:en(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&en(e[o])?n[o]=jr(e[o],t[o],r):r.clone?n[o]=en(t[o])?yl(t[o]):t[o]:n[o]=t[o]}),n}const y0=Object.freeze(Object.defineProperty({__proto__:null,default:jr,isPlainObject:en},Symbol.toStringTag,{value:"Module"}));var Ss={exports:{}},Cs={exports:{}},ot={};/** @license React v16.13.1
30
+ <%s key={someKey} {...props} />`,Tt,ye,Ct,ye),vs[ye+Tt]=!0}}return A===n?al(Ot):ra(Ot),Ot}}function na(A,ne,ve){return ys(A,ne,ve,!0)}function oa(A,ne,ve){return ys(A,ne,ve,!1)}var cl=oa,sa=na;ro.Fragment=n,ro.jsx=cl,ro.jsxs=sa})()),ro}var hl;function pt(){return hl||(hl=1,process.env.NODE_ENV==="production"?xs.exports=f0():xs.exports=p0()),xs.exports}var u=pt();const Er={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={},ia={exports:{}},ml;function ut(){return ml||(ml=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})(ia)),ia.exports}var aa={};function tt(){return tt=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},tt.apply(null,arguments)}function en(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 gl(e){if(K.isValidElement(e)||!en(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=gl(e[r])}),t}function jr(e,t,r={clone:!0}){const n=r.clone?tt({},e):e;return en(e)&&en(t)&&Object.keys(t).forEach(o=>{K.isValidElement(t[o])?n[o]=t[o]:en(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&en(e[o])?n[o]=jr(e[o],t[o],r):r.clone?n[o]=en(t[o])?gl(t[o]):t[o]:n[o]=t[o]}),n}const h0=Object.freeze(Object.defineProperty({__proto__:null,default:jr,isPlainObject:en},Symbol.toStringTag,{value:"Module"}));var _s={exports:{}},ws={exports:{}},rt={};/** @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 bl;function b0(){if(bl)return ot;bl=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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 g:case y:case i:return _;default:return W}}case r:return W}}}function C(_){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=g,ot.Memo=y,ot.Portal=r,ot.Profiler=s,ot.StrictMode=o,ot.Suspense=f,ot.isAsyncMode=function(_){return C(_)||E(_)===c},ot.isConcurrentMode=C,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(_)===g},ot.isMemo=function(_){return E(_)===y},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===g||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===S||_.$$typeof===p)},ot.typeOf=E,ot}var st={};/** @license React v16.13.1
37
+ */var vl;function m0(){if(vl)return rt;vl=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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 g:case y:case i:return _;default:return W}}case r:return W}}}function C(_){return E(_)===l}return rt.AsyncMode=c,rt.ConcurrentMode=l,rt.ContextConsumer=a,rt.ContextProvider=i,rt.Element=t,rt.ForwardRef=d,rt.Fragment=n,rt.Lazy=g,rt.Memo=y,rt.Portal=r,rt.Profiler=s,rt.StrictMode=o,rt.Suspense=f,rt.isAsyncMode=function(_){return C(_)||E(_)===c},rt.isConcurrentMode=C,rt.isContextConsumer=function(_){return E(_)===a},rt.isContextProvider=function(_){return E(_)===i},rt.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},rt.isForwardRef=function(_){return E(_)===d},rt.isFragment=function(_){return E(_)===n},rt.isLazy=function(_){return E(_)===g},rt.isMemo=function(_){return E(_)===y},rt.isPortal=function(_){return E(_)===r},rt.isProfiler=function(_){return E(_)===s},rt.isStrictMode=function(_){return E(_)===o},rt.isSuspense=function(_){return E(_)===f},rt.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===l||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===S||_.$$typeof===p)},rt.typeOf=E,rt}var nt={};/** @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 xl;function x0(){return xl||(xl=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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===g||j.$$typeof===y||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===S||j.$$typeof===p)}function C(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var Ke=j.type;switch(Ke){case c:case u:case n:case s:case o:case f:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case a:case d:case g:case y:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=u,D=a,T=i,M=t,I=d,H=n,G=g,F=y,Y=r,se=s,U=o,N=f,le=!1;function de(j){return le||(le=!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)||C(j)===c}function $(j){return C(j)===u}function Q(j){return C(j)===a}function we(j){return C(j)===i}function _e(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function he(j){return C(j)===d}function ae(j){return C(j)===n}function ue(j){return C(j)===g}function J(j){return C(j)===y}function Se(j){return C(j)===r}function me(j){return C(j)===s}function ee(j){return C(j)===o}function Ie(j){return C(j)===f}st.AsyncMode=_,st.ConcurrentMode=W,st.ContextConsumer=D,st.ContextProvider=T,st.Element=M,st.ForwardRef=I,st.Fragment=H,st.Lazy=G,st.Memo=F,st.Portal=Y,st.Profiler=se,st.StrictMode=U,st.Suspense=N,st.isAsyncMode=de,st.isConcurrentMode=$,st.isContextConsumer=Q,st.isContextProvider=we,st.isElement=_e,st.isForwardRef=he,st.isFragment=ae,st.isLazy=ue,st.isMemo=J,st.isPortal=Se,st.isProfiler=me,st.isStrictMode=ee,st.isSuspense=Ie,st.isValidElementType=E,st.typeOf=C})()),st}var _l;function wl(){return _l||(_l=1,process.env.NODE_ENV==="production"?Cs.exports=b0():Cs.exports=x0()),Cs.exports}/*
44
+ */var yl;function g0(){return yl||(yl=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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===g||j.$$typeof===y||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===S||j.$$typeof===p)}function C(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var Ke=j.type;switch(Ke){case c:case l:case n:case s:case o:case f:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case a:case d:case g:case y:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=l,D=a,T=i,M=t,I=d,U=n,G=g,F=y,Y=r,se=s,H=o,N=f,le=!1;function de(j){return le||(le=!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)||C(j)===c}function $(j){return C(j)===l}function Q(j){return C(j)===a}function Se(j){return C(j)===i}function we(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function he(j){return C(j)===d}function ae(j){return C(j)===n}function ue(j){return C(j)===g}function J(j){return C(j)===y}function Ce(j){return C(j)===r}function me(j){return C(j)===s}function ee(j){return C(j)===o}function Me(j){return C(j)===f}nt.AsyncMode=_,nt.ConcurrentMode=W,nt.ContextConsumer=D,nt.ContextProvider=T,nt.Element=M,nt.ForwardRef=I,nt.Fragment=U,nt.Lazy=G,nt.Memo=F,nt.Portal=Y,nt.Profiler=se,nt.StrictMode=H,nt.Suspense=N,nt.isAsyncMode=de,nt.isConcurrentMode=$,nt.isContextConsumer=Q,nt.isContextProvider=Se,nt.isElement=we,nt.isForwardRef=he,nt.isFragment=ae,nt.isLazy=ue,nt.isMemo=J,nt.isPortal=Ce,nt.isProfiler=me,nt.isStrictMode=ee,nt.isSuspense=Me,nt.isValidElementType=E,nt.typeOf=C})()),nt}var bl;function xl(){return bl||(bl=1,process.env.NODE_ENV==="production"?ws.exports=m0():ws.exports=g0()),ws.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var ua,Sl;function _0(){if(Sl)return ua;Sl=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 ua=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},ua}var da,Cl;function fa(){if(Cl)return da;Cl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return da=e,da}var pa,El;function Dl(){return El||(El=1,pa=Function.call.bind(Object.prototype.hasOwnProperty)),pa}var ha,kl;function w0(){if(kl)return ha;kl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fa(),r={},n=Dl();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(g){f=g}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 y=u?u():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ha=o,ha}var ma,Al;function S0(){if(Al)return ma;Al=1;var e=wl(),t=_0(),r=fa(),n=Dl(),o=w0(),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 ma=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>>",y={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:S(),arrayOf:E,element:C(),elementType:_(),instanceOf:W,node:I(),objectOf:T,oneOf:D,oneOfType:M,shape:G,exact:F};function g($,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={},we=0;function _e(ae,ue,J,Se,me,ee,Ie){if(Se=Se||h,ee=ee||J,Ie!==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=Se+":"+J;!Q[Fe]&&we<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+Se+"`. 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,we++)}}return ue[J]==null?ae?ue[J]===null?new p("The "+me+" `"+ee+"` is marked as required "+("in `"+Se+"`, but its value is `null`.")):new p("The "+me+" `"+ee+"` is marked as required in "+("`"+Se+"`, but its value is `undefined`.")):null:$(ue,J,Se,me,ee)}var he=_e.bind(null,!1);return he.isRequired=_e.bind(null,!0),he}function w($){function Q(we,_e,he,ae,ue,J){var Se=we[_e],me=U(Se);if(me!==$){var ee=N(Se);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+ee+"` supplied to `"+he+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return b(Q)}function S(){return b(i)}function E($){function Q(we,_e,he,ae,ue){if(typeof $!="function")return new p("Property `"+ue+"` of component `"+he+"` has invalid PropType notation inside arrayOf.");var J=we[_e];if(!Array.isArray(J)){var Se=U(J);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Se+"` supplied to `"+he+"`, expected an array."))}for(var me=0;me<J.length;me++){var ee=$(J,me,he,ae,ue+"["+me+"]",r);if(ee instanceof Error)return ee}return null}return b(Q)}function C(){function $(Q,we,_e,he,ae){var ue=Q[we];if(!a(ue)){var J=U(ue);return new p("Invalid "+he+" `"+ae+"` of type "+("`"+J+"` supplied to `"+_e+"`, expected a single ReactElement."))}return null}return b($)}function _(){function $(Q,we,_e,he,ae){var ue=Q[we];if(!e.isValidElementType(ue)){var J=U(ue);return new p("Invalid "+he+" `"+ae+"` of type "+("`"+J+"` supplied to `"+_e+"`, expected a single ReactElement type."))}return null}return b($)}function W($){function Q(we,_e,he,ae,ue){if(!(we[_e]instanceof $)){var J=$.name||h,Se=de(we[_e]);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Se+"` supplied to `"+he+"`, expected ")+("instance of `"+J+"`."))}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(we,_e,he,ae,ue){for(var J=we[_e],Se=0;Se<$.length;Se++)if(g(J,$[Se]))return null;var me=JSON.stringify($,function(Ie,j){var Fe=N(j);return Fe==="symbol"?String(j):j});return new p("Invalid "+ae+" `"+ue+"` of value `"+String(J)+"` "+("supplied to `"+he+"`, expected one of "+me+"."))}return b(Q)}function T($){function Q(we,_e,he,ae,ue){if(typeof $!="function")return new p("Property `"+ue+"` of component `"+he+"` has invalid PropType notation inside objectOf.");var J=we[_e],Se=U(J);if(Se!=="object")return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Se+"` supplied to `"+he+"`, expected an object."));for(var me in J)if(n(J,me)){var ee=$(J,me,he,ae,ue+"."+me,r);if(ee instanceof Error)return ee}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 we=$[Q];if(typeof we!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+le(we)+" at index "+Q+"."),i}function _e(he,ae,ue,J,Se){for(var me=[],ee=0;ee<$.length;ee++){var Ie=$[ee],j=Ie(he,ae,ue,J,Se,r);if(j==null)return null;j.data&&n(j.data,"expectedType")&&me.push(j.data.expectedType)}var Fe=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new p("Invalid "+J+" `"+Se+"` supplied to "+("`"+ue+"`"+Fe+"."))}return b(_e)}function I(){function $(Q,we,_e,he,ae){return Y(Q[we])?null:new p("Invalid "+he+" `"+ae+"` supplied to "+("`"+_e+"`, expected a ReactNode."))}return b($)}function H($,Q,we,_e,he){return new p(($||"React class")+": "+Q+" type `"+we+"."+_e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+he+"`.")}function G($){function Q(we,_e,he,ae,ue){var J=we[_e],Se=U(J);if(Se!=="object")return new p("Invalid "+ae+" `"+ue+"` of type `"+Se+"` "+("supplied to `"+he+"`, expected `object`."));for(var me in $){var ee=$[me];if(typeof ee!="function")return H(he,ae,ue,me,N(ee));var Ie=ee(J,me,he,ae,ue+"."+me,r);if(Ie)return Ie}return null}return b(Q)}function F($){function Q(we,_e,he,ae,ue){var J=we[_e],Se=U(J);if(Se!=="object")return new p("Invalid "+ae+" `"+ue+"` of type `"+Se+"` "+("supplied to `"+he+"`, expected `object`."));var me=t({},we[_e],$);for(var ee in me){var Ie=$[ee];if(n($,ee)&&typeof Ie!="function")return H(he,ae,ue,ee,N(Ie));if(!Ie)return new p("Invalid "+ae+" `"+ue+"` key `"+ee+"` supplied to `"+he+"`.\nBad object: "+JSON.stringify(we[_e],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Ie(J,ee,he,ae,ue+"."+ee,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 we=Q.call($),_e;if(Q!==$.entries){for(;!(_e=we.next()).done;)if(!Y(_e.value))return!1}else for(;!(_e=we.next()).done;){var he=_e.value;if(he&&!Y(he[1]))return!1}}else return!1;return!0;default:return!1}}function se($,Q){return $==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function U($){var Q=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":se(Q,$)?"symbol":Q}function N($){if(typeof $>"u"||$===null)return""+$;var Q=U($);if(Q==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return Q}function le($){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 de($){return!$.constructor||!$.constructor.name?h:$.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},ma}var ga,Tl;function C0(){if(Tl)return ga;Tl=1;var e=fa();function t(){}function r(){}return r.resetWarningCache=t,ga=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},ga}var Il;function E0(){if(Il)return Ss.exports;if(Il=1,process.env.NODE_ENV!=="production"){var e=wl(),t=!0;Ss.exports=S0()(e.isElement,t)}else Ss.exports=C0()();return Ss.exports}var D0=E0();const ze=tt(D0);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 k0=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"}));var Es={exports:{}},ft={};/**
48
+ */var ca,_l;function v0(){if(_l)return ca;_l=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 ca=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},ca}var la,wl;function ua(){if(wl)return la;wl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return la=e,la}var da,Sl;function Cl(){return Sl||(Sl=1,da=Function.call.bind(Object.prototype.hasOwnProperty)),da}var fa,El;function y0(){if(El)return fa;El=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ua(),r={},n=Cl();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(g){f=g}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 y=l?l():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},fa=o,fa}var pa,Dl;function b0(){if(Dl)return pa;Dl=1;var e=xl(),t=v0(),r=ua(),n=Cl(),o=y0(),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 pa=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>>",y={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:S(),arrayOf:E,element:C(),elementType:_(),instanceOf:W,node:I(),objectOf:T,oneOf:D,oneOfType:M,shape:G,exact:F};function g($,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={},Se=0;function we(ae,ue,J,Ce,me,ee,Me){if(Ce=Ce||h,ee=ee||J,Me!==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=Ce+":"+J;!Q[Fe]&&Se<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+Ce+"`. 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,Se++)}}return ue[J]==null?ae?ue[J]===null?new p("The "+me+" `"+ee+"` is marked as required "+("in `"+Ce+"`, but its value is `null`.")):new p("The "+me+" `"+ee+"` is marked as required in "+("`"+Ce+"`, but its value is `undefined`.")):null:$(ue,J,Ce,me,ee)}var he=we.bind(null,!1);return he.isRequired=we.bind(null,!0),he}function w($){function Q(Se,we,he,ae,ue,J){var Ce=Se[we],me=H(Ce);if(me!==$){var ee=N(Ce);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+ee+"` supplied to `"+he+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return b(Q)}function S(){return b(i)}function E($){function Q(Se,we,he,ae,ue){if(typeof $!="function")return new p("Property `"+ue+"` of component `"+he+"` has invalid PropType notation inside arrayOf.");var J=Se[we];if(!Array.isArray(J)){var Ce=H(J);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Ce+"` supplied to `"+he+"`, expected an array."))}for(var me=0;me<J.length;me++){var ee=$(J,me,he,ae,ue+"["+me+"]",r);if(ee instanceof Error)return ee}return null}return b(Q)}function C(){function $(Q,Se,we,he,ae){var ue=Q[Se];if(!a(ue)){var J=H(ue);return new p("Invalid "+he+" `"+ae+"` of type "+("`"+J+"` supplied to `"+we+"`, expected a single ReactElement."))}return null}return b($)}function _(){function $(Q,Se,we,he,ae){var ue=Q[Se];if(!e.isValidElementType(ue)){var J=H(ue);return new p("Invalid "+he+" `"+ae+"` of type "+("`"+J+"` supplied to `"+we+"`, expected a single ReactElement type."))}return null}return b($)}function W($){function Q(Se,we,he,ae,ue){if(!(Se[we]instanceof $)){var J=$.name||h,Ce=de(Se[we]);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Ce+"` supplied to `"+he+"`, expected ")+("instance of `"+J+"`."))}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(Se,we,he,ae,ue){for(var J=Se[we],Ce=0;Ce<$.length;Ce++)if(g(J,$[Ce]))return null;var me=JSON.stringify($,function(Me,j){var Fe=N(j);return Fe==="symbol"?String(j):j});return new p("Invalid "+ae+" `"+ue+"` of value `"+String(J)+"` "+("supplied to `"+he+"`, expected one of "+me+"."))}return b(Q)}function T($){function Q(Se,we,he,ae,ue){if(typeof $!="function")return new p("Property `"+ue+"` of component `"+he+"` has invalid PropType notation inside objectOf.");var J=Se[we],Ce=H(J);if(Ce!=="object")return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Ce+"` supplied to `"+he+"`, expected an object."));for(var me in J)if(n(J,me)){var ee=$(J,me,he,ae,ue+"."+me,r);if(ee instanceof Error)return ee}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 Se=$[Q];if(typeof Se!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+le(Se)+" at index "+Q+"."),i}function we(he,ae,ue,J,Ce){for(var me=[],ee=0;ee<$.length;ee++){var Me=$[ee],j=Me(he,ae,ue,J,Ce,r);if(j==null)return null;j.data&&n(j.data,"expectedType")&&me.push(j.data.expectedType)}var Fe=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new p("Invalid "+J+" `"+Ce+"` supplied to "+("`"+ue+"`"+Fe+"."))}return b(we)}function I(){function $(Q,Se,we,he,ae){return Y(Q[Se])?null:new p("Invalid "+he+" `"+ae+"` supplied to "+("`"+we+"`, expected a ReactNode."))}return b($)}function U($,Q,Se,we,he){return new p(($||"React class")+": "+Q+" type `"+Se+"."+we+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+he+"`.")}function G($){function Q(Se,we,he,ae,ue){var J=Se[we],Ce=H(J);if(Ce!=="object")return new p("Invalid "+ae+" `"+ue+"` of type `"+Ce+"` "+("supplied to `"+he+"`, expected `object`."));for(var me in $){var ee=$[me];if(typeof ee!="function")return U(he,ae,ue,me,N(ee));var Me=ee(J,me,he,ae,ue+"."+me,r);if(Me)return Me}return null}return b(Q)}function F($){function Q(Se,we,he,ae,ue){var J=Se[we],Ce=H(J);if(Ce!=="object")return new p("Invalid "+ae+" `"+ue+"` of type `"+Ce+"` "+("supplied to `"+he+"`, expected `object`."));var me=t({},Se[we],$);for(var ee in me){var Me=$[ee];if(n($,ee)&&typeof Me!="function")return U(he,ae,ue,ee,N(Me));if(!Me)return new p("Invalid "+ae+" `"+ue+"` key `"+ee+"` supplied to `"+he+"`.\nBad object: "+JSON.stringify(Se[we],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Me(J,ee,he,ae,ue+"."+ee,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 Se=Q.call($),we;if(Q!==$.entries){for(;!(we=Se.next()).done;)if(!Y(we.value))return!1}else for(;!(we=Se.next()).done;){var he=we.value;if(he&&!Y(he[1]))return!1}}else return!1;return!0;default:return!1}}function se($,Q){return $==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function H($){var Q=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":se(Q,$)?"symbol":Q}function N($){if(typeof $>"u"||$===null)return""+$;var Q=H($);if(Q==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return Q}function le($){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 de($){return!$.constructor||!$.constructor.name?h:$.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},pa}var ha,kl;function x0(){if(kl)return ha;kl=1;var e=ua();function t(){}function r(){}return r.resetWarningCache=t,ha=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},ha}var Al;function _0(){if(Al)return _s.exports;if(Al=1,process.env.NODE_ENV!=="production"){var e=xl(),t=!0;_s.exports=b0()(e.isElement,t)}else _s.exports=x0()();return _s.exports}var w0=_0();const ze=lt(w0);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 S0=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"}));var Ss={exports:{}},dt={};/**
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=Ie(J,ee,he,ae,ue+"
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 Ml;function A0(){if(Ml)return ft;Ml=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"),y=Symbol.for("react.client.reference");function g(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case 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 g(p)===s},ft.isContextProvider=function(p){return g(p)===i},ft.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ft.isForwardRef=function(p){return g(p)===a},ft.isFragment=function(p){return g(p)===r},ft.isLazy=function(p){return g(p)===f},ft.isMemo=function(p){return g(p)===d},ft.isPortal=function(p){return g(p)===t},ft.isProfiler=function(p){return g(p)===o},ft.isStrictMode=function(p){return g(p)===n},ft.isSuspense=function(p){return g(p)===c},ft.isSuspenseList=function(p){return g(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===y||p.getModuleId!==void 0)},ft.typeOf=g,ft}var pt={};/**
57
+ */var Tl;function C0(){if(Tl)return dt;Tl=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"),y=Symbol.for("react.client.reference");function g(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case 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 dt.ContextConsumer=s,dt.ContextProvider=i,dt.Element=e,dt.ForwardRef=a,dt.Fragment=r,dt.Lazy=f,dt.Memo=d,dt.Portal=t,dt.Profiler=o,dt.StrictMode=n,dt.Suspense=c,dt.SuspenseList=l,dt.isContextConsumer=function(p){return g(p)===s},dt.isContextProvider=function(p){return g(p)===i},dt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},dt.isForwardRef=function(p){return g(p)===a},dt.isFragment=function(p){return g(p)===r},dt.isLazy=function(p){return g(p)===f},dt.isMemo=function(p){return g(p)===d},dt.isPortal=function(p){return g(p)===t},dt.isProfiler=function(p){return g(p)===o},dt.isStrictMode=function(p){return g(p)===n},dt.isSuspense=function(p){return g(p)===c},dt.isSuspenseList=function(p){return g(p)===l},dt.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===y||p.getModuleId!==void 0)},dt.typeOf=g,dt}var ft={};/**
58
58
  * @license React
59
59
  * react-is.development.js
60
60
  *
@@ -62,36 +62,36 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Ie(J,ee,he,ae,ue+"
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 Pl;function T0(){return Pl||(Pl=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 y: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"),y=Symbol.for("react.view_transition"),g=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===g||p.getModuleId!==void 0)},pt.typeOf=e})()),pt}var Ol;function I0(){return Ol||(Ol=1,process.env.NODE_ENV==="production"?Es.exports=A0():Es.exports=T0()),Es.exports}var jl=I0();const M0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Rl(e){const t=`${e}`.match(M0);return t&&t[1]||""}function Nl(e,t=""){return e.displayName||e.name||Rl(e)||t}function $l(e,t,r){const n=Nl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function P0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case jl.ForwardRef:return $l(e,e.render,"ForwardRef");case jl.Memo:return $l(e,e.type,"memo");default:return}}}const O0=Object.freeze(Object.defineProperty({__proto__:null,default:P0,getFunctionName:Rl},Symbol.toStringTag,{value:"Module"}));function tn(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 j0=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"}));function R0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function N0(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 $0(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 L0(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 Ll(e){return e&&e.ownerDocument||document}function z0(e){return Ll(e).defaultView||window}function B0(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 y=h(s,i,a,c,u,...d);if(y)return y}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 zl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Bl=typeof window<"u"?K.useLayoutEffect:K.useEffect;let Fl=0;function F0(e){const[t,r]=K.useState(e),n=e||t;return K.useEffect(()=>{t==null&&(Fl+=1,r(`mui-${Fl}`))},[t]),n}const Wl=K.useId;function W0(e){if(Wl!==void 0){const t=Wl();return e??t}return F0(e)}function H0(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 U0({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 V0(e){const t=K.useRef(e);return Bl(()=>{t.current=e}),K.useRef((...r)=>(0,t.current)(...r)).current}function Y0(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{zl(r,t)})},e)}class va{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new va}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let Ds=!0,ya=!1;const q0=new va,Z0={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 G0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&Z0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function K0(e){e.metaKey||e.altKey||e.ctrlKey||(Ds=!0)}function ba(){Ds=!1}function Q0(){this.visibilityState==="hidden"&&ya&&(Ds=!0)}function X0(e){e.addEventListener("keydown",K0,!0),e.addEventListener("mousedown",ba,!0),e.addEventListener("pointerdown",ba,!0),e.addEventListener("touchstart",ba,!0),e.addEventListener("visibilitychange",Q0,!0)}function J0(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Ds||G0(t)}function em(){const e=K.useCallback(o=>{o!=null&&X0(o.ownerDocument)},[]),t=K.useRef(!1);function r(){return t.current?(ya=!0,q0.start(100,()=>{ya=!1}),t.current=!1,!0):!1}function n(o){return J0(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function xa(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]=xa(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function tm(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}}})(),rm={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 _a(e,t,r="Mui"){const n=rm[t];return n?`${r}-${n}`:`${Ul.generate(e)}-${t}`}function nm(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=_a(e,o,r)}),n}function om(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const sm=Object.freeze(Object.defineProperty({__proto__:null,default:om},Symbol.toStringTag,{value:"Module"}));function rn(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 Vl(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=Vl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vl(e))&&(n&&(n+=" "),n+=t);return n}const im=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(ze.node,ze.object);function am(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?xa(o.defaultProps,n):!o.styleOverrides&&!o.variants?xa(o,n):n}function cm({props:e,name:t}){const r=K.useContext(im);return am({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(ze.node,ze.object.isRequired);function lm(e){return cm(e)}var fn={},wa={exports:{}},Yl;function um(){return Yl||(Yl=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})(wa)),wa.exports}var Sa={exports:{}},ql;function dm(){return ql||(ql=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})(Sa)),Sa.exports}function fm(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 pm(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 hm=(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(pm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=fm(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-",ks="-moz-",Xe="-webkit-",Zl="comm",Ca="rule",Ea="decl",mm="@import",Gl="@keyframes",gm="@layer",vm=Math.abs,As=String.fromCharCode,ym=Object.assign;function bm(e,t){return Zt(e,0)^45?(((t<<2^Zt(e,0))<<2^Zt(e,1))<<2^Zt(e,2))<<2^Zt(e,3):0}function Kl(e){return e.trim()}function xm(e,t){return(e=t.exec(e))?e[0]:e}function Je(e,t,r){return e.replace(t,r)}function Da(e,t){return e.indexOf(t)}function Zt(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function Rr(e){return e.length}function ka(e){return e.length}function Ts(e,t){return t.push(e),e}function _m(e,t){return e.map(t).join("")}var Is=1,In=1,Ql=0,rr=0,Bt=0,Mn="";function Ms(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Is,column:In,length:i,return:""}}function io(e,t){return ym(Ms("",null,null,"",null,null,0),e,{length:-e.length},t)}function wm(){return Bt}function Sm(){return Bt=rr>0?Zt(Mn,--rr):0,In--,Bt===10&&(In=1,Is--),Bt}function cr(){return Bt=rr<Ql?Zt(Mn,rr++):0,In++,Bt===10&&(In=1,Is++),Bt}function Nr(){return Zt(Mn,rr)}function Ps(){return rr}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 Xl(e){return Is=In=1,Ql=Rr(Mn=e),rr=0,[]}function Jl(e){return Mn="",e}function Os(e){return Kl(ao(rr-1,Aa(e===91?e+2:e===40?e+1:e)))}function Cm(e){for(;(Bt=Nr())&&Bt<33;)cr();return co(e)>2||co(Bt)>3?"":" "}function Em(e,t){for(;--t&&cr()&&!(Bt<48||Bt>102||Bt>57&&Bt<65||Bt>70&&Bt<97););return ao(e,Ps()+(t<6&&Nr()==32&&cr()==32))}function Aa(e){for(;cr();)switch(Bt){case e:return rr;case 34:case 39:e!==34&&e!==39&&Aa(Bt);break;case 40:e===41&&Aa(e);break;case 92:cr();break}return rr}function Dm(e,t){for(;cr()&&e+Bt!==57;)if(e+Bt===84&&Nr()===47)break;return"/*"+ao(t,rr-1)+"*"+As(e===47?e:cr())}function km(e){for(;!co(Nr());)cr();return ao(e,rr)}function Am(e){return Jl(js("",null,null,null,[""],e=Xl(e),0,[0],e))}function js(e,t,r,n,o,s,i,a,c){for(var u=0,d=0,f=i,h=0,y=0,g=0,p=1,b=1,w=1,S=0,E="",C=o,_=s,W=n,D=E;b;)switch(g=S,S=cr()){case 40:if(g!=108&&Zt(D,f-1)==58){Da(D+=Je(Os(S),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=Os(S);break;case 9:case 10:case 13:case 32:D+=Cm(g);break;case 92:D+=Em(Ps()-1,7);continue;case 47:switch(Nr()){case 42:case 47:Ts(Tm(Dm(cr(),Ps()),t,r),c);break;default:D+="/"}break;case 123*p:a[u++]=Rr(D)*w;case 125*p:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+d:w==-1&&(D=Je(D,/\f/g,"")),y>0&&Rr(D)-f&&Ts(y>32?tu(D+";",n,r,f-1):tu(Je(D," ","")+";",n,r,f-2),c);break;case 59:D+=";";default:if(Ts(W=eu(D,t,r,u,d,o,a,E,C=[],_=[],f),s),S===123)if(d===0)js(D,t,W,W,C,s,f,a,_);else switch(h===99&&Zt(D,3)===110?100:h){case 100:case 108:case 109:case 115:js(e,W,W,n&&Ts(eu(e,W,W,0,0,o,a,E,o,C=[],f),_),o,_,f,a,n?C:_);break;default:js(D,W,W,W,[""],_,0,a,_)}}u=d=y=0,p=w=1,E=D="",f=i;break;case 58:f=1+Rr(D),y=g;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&Sm()==125)continue}switch(D+=As(S),S*p){case 38:w=d>0?1:(D+="\f",-1);break;case 44:a[u++]=(Rr(D)-1)*w,w=1;break;case 64:Nr()===45&&(D+=Os(cr())),h=Nr(),d=f=Rr(E=D+=km(Ps())),S++;break;case 45:g===45&&Rr(D)==2&&(p=0)}}return s}function eu(e,t,r,n,o,s,i,a,c,u,d){for(var f=o-1,h=o===0?s:[""],y=ka(h),g=0,p=0,b=0;g<n;++g)for(var w=0,S=so(e,f+1,f=vm(p=i[g])),E=e;w<y;++w)(E=Kl(p>0?h[w]+" "+S:Je(S,/&\f/g,h[w])))&&(c[b++]=E);return Ms(e,t,r,o===0?Ca:a,c,u,d)}function Tm(e,t,r){return Ms(e,t,r,Zl,As(wm()),so(e,2,-2),0)}function tu(e,t,r,n){return Ms(e,t,r,Ea,so(e,0,n),so(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=ka(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Im(e,t,r,n){switch(e.type){case gm:if(e.children.length)break;case mm:case Ea:return e.return=e.return||e.value;case Zl:return"";case Gl:return e.return=e.value+"{"+Pn(e.children,n)+"}";case Ca:e.value=e.props.join(",")}return Rr(r=Pn(e.children,n))?e.return=e.value+"{"+r+"}":""}function Mm(e){var t=ka(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 Pm(e){return function(t){t.root||(t=t.return)&&e(t)}}function ru(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Om=function(t,r,n){for(var o=0,s=0;o=s,s=Nr(),o===38&&s===12&&(r[n]=1),!co(s);)cr();return ao(t,rr)},jm=function(t,r){var n=-1,o=44;do switch(co(o)){case 0:o===38&&Nr()===12&&(r[n]=1),t[n]+=Om(rr-1,r,n);break;case 2:t[n]+=Os(o);break;case 4:if(o===44){t[++n]=Nr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=As(o)}while(o=cr());return t},Rm=function(t,r){return Jl(jm(Xl(t),r))},nu=new WeakMap,Nm=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&&!nu.get(n))&&!o){nu.set(t,!0);for(var s=[],i=Rm(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]}}},$m=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ou(e,t){switch(bm(e,t)){case 5103:return Xe+"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 Xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xe+e+ks+e+Kt+e+e;case 6828:case 4268:return Xe+e+Kt+e+e;case 6165:return Xe+e+Kt+"flex-"+e+e;case 5187:return Xe+e+Je(e,/(\w+).+(:[^]+)/,Xe+"box-$1$2"+Kt+"flex-$1$2")+e;case 5443:return Xe+e+Kt+"flex-item-"+Je(e,/flex-|-self/,"")+e;case 4675:return Xe+e+Kt+"flex-line-pack"+Je(e,/align-content|flex-|-self/,"")+e;case 5548:return Xe+e+Kt+Je(e,"shrink","negative")+e;case 5292:return Xe+e+Kt+Je(e,"basis","preferred-size")+e;case 6060:return Xe+"box-"+Je(e,"-grow","")+Xe+e+Kt+Je(e,"grow","positive")+e;case 4554:return Xe+Je(e,/([^-])(transform)/g,"$1"+Xe+"$2")+e;case 6187:return Je(Je(Je(e,/(zoom-|grab)/,Xe+"$1"),/(image-set)/,Xe+"$1"),e,"")+e;case 5495:case 3959:return Je(e,/(image-set\([^]*)/,Xe+"$1$`$1");case 4968:return Je(Je(e,/(.+:)(flex-)?(.*)/,Xe+"box-pack:$3"+Kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xe+e+e;case 4095:case 3583:case 4068:case 2532:return Je(e,/(.+)-inline(.+)/,Xe+"$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(Rr(e)-1-t>6)switch(Zt(e,t+1)){case 109:if(Zt(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Xe+"$2-$3$1"+ks+(Zt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Da(e,"stretch")?ou(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Zt(e,t+1)!==115)break;case 6444:switch(Zt(e,Rr(e)-3-(~Da(e,"!important")&&10))){case 107:return Je(e,":",":"+Xe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xe+(Zt(e,14)===45?"inline-":"")+"box$3$1"+Xe+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(Zt(e,t+11)){case 114:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Xe+e+Kt+e+e}return e}var Lm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Ea:t.return=ou(t.value,t.length);break;case Gl:return Pn([io(t,{value:Je(t.value,"@","@"+Xe)})],o);case Ca:if(t.length)return _m(t.props,function(s){switch(xm(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([io(t,{props:[Je(s,/:(read-\w+)/,":"+ks+"$1")]})],o);case"::placeholder":return Pn([io(t,{props:[Je(s,/:(plac\w+)/,":"+Xe+"input-$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,":"+ks+"$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,Kt+"input-$1")]})],o)}return""})}},zm=[Lm],su=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||zm,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=[Nm,$m];{var d,f=[Im,Pm(function(p){d.insert(p)})],h=Mm(u.concat(o,f)),y=function(b){return Pn(Am(b),h)};c=function(b,w,S,E){d=S,y(b?b+"{"+w.styles+"}":w.styles),E&&(g.inserted[w.name]=!0)}}var g={key:r,sheet:new hm({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 g.sheet.hydrate(a),g},Rs={exports:{}},it={};/** @license React v16.13.1
65
+ */var Il;function E0(){return Il||(Il=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 y: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"),y=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");ft.ContextConsumer=i,ft.ContextProvider=a,ft.Element=t,ft.ForwardRef=c,ft.Fragment=n,ft.Lazy=h,ft.Memo=f,ft.Portal=r,ft.Profiler=s,ft.StrictMode=o,ft.Suspense=l,ft.SuspenseList=d,ft.isContextConsumer=function(p){return e(p)===i},ft.isContextProvider=function(p){return e(p)===a},ft.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},ft.isForwardRef=function(p){return e(p)===c},ft.isFragment=function(p){return e(p)===n},ft.isLazy=function(p){return e(p)===h},ft.isMemo=function(p){return e(p)===f},ft.isPortal=function(p){return e(p)===r},ft.isProfiler=function(p){return e(p)===s},ft.isStrictMode=function(p){return e(p)===o},ft.isSuspense=function(p){return e(p)===l},ft.isSuspenseList=function(p){return e(p)===d},ft.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===g||p.getModuleId!==void 0)},ft.typeOf=e})()),ft}var Ml;function D0(){return Ml||(Ml=1,process.env.NODE_ENV==="production"?Ss.exports=C0():Ss.exports=E0()),Ss.exports}var Pl=D0();const k0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Ol(e){const t=`${e}`.match(k0);return t&&t[1]||""}function jl(e,t=""){return e.displayName||e.name||Ol(e)||t}function Rl(e,t,r){const n=jl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function A0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return jl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Pl.ForwardRef:return Rl(e,e.render,"ForwardRef");case Pl.Memo:return Rl(e,e.type,"memo");default:return}}}const T0=Object.freeze(Object.defineProperty({__proto__:null,default:A0,getFunctionName:Ol},Symbol.toStringTag,{value:"Module"}));function tn(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 I0=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"}));function M0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function P0(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 O0(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 j0(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 Nl(e){return e&&e.ownerDocument||document}function R0(e){return Nl(e).defaultView||window}function N0(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?tt({},t.propTypes):null;return o=>(s,i,a,c,l,...d)=>{const f=l||i,h=r?.[f];if(h){const y=h(s,i,a,c,l,...d);if(y)return y}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 $l(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Ll=typeof window<"u"?K.useLayoutEffect:K.useEffect;let zl=0;function $0(e){const[t,r]=K.useState(e),n=e||t;return K.useEffect(()=>{t==null&&(zl+=1,r(`mui-${zl}`))},[t]),n}const Bl=K.useId;function L0(e){if(Bl!==void 0){const t=Bl();return e??t}return $0(e)}function z0(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 B0({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 F0(e){const t=K.useRef(e);return Ll(()=>{t.current=e}),K.useRef((...r)=>(0,t.current)(...r)).current}function W0(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{$l(r,t)})},e)}class ma{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new ma}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let Cs=!0,ga=!1;const U0=new ma,H0={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 V0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&H0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Y0(e){e.metaKey||e.altKey||e.ctrlKey||(Cs=!0)}function va(){Cs=!1}function q0(){this.visibilityState==="hidden"&&ga&&(Cs=!0)}function Z0(e){e.addEventListener("keydown",Y0,!0),e.addEventListener("mousedown",va,!0),e.addEventListener("pointerdown",va,!0),e.addEventListener("touchstart",va,!0),e.addEventListener("visibilitychange",q0,!0)}function G0(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Cs||V0(t)}function K0(){const e=K.useCallback(o=>{o!=null&&Z0(o.ownerDocument)},[]),t=K.useRef(!1);function r(){return t.current?(ga=!0,U0.start(100,()=>{ga=!1}),t.current=!1,!0):!1}function n(o){return G0(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function ya(e,t){const r=tt({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=tt({},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]=tt({},s),Object.keys(o).forEach(i=>{r[n][i]=ya(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function Q0(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 Fl=e=>e,Wl=(()=>{let e=Fl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Fl}}})(),X0={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 ba(e,t,r="Mui"){const n=X0[t];return n?`${r}-${n}`:`${Wl.generate(e)}-${t}`}function J0(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=ba(e,o,r)}),n}function em(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const tm=Object.freeze(Object.defineProperty({__proto__:null,default:em},Symbol.toStringTag,{value:"Module"}));function rn(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 Ul(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=Ul(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ul(e))&&(n&&(n+=" "),n+=t);return n}const rm=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(ze.node,ze.object);function nm(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?ya(o.defaultProps,n):!o.styleOverrides&&!o.variants?ya(o,n):n}function om({props:e,name:t}){const r=K.useContext(rm);return nm({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(ze.node,ze.object.isRequired);function sm(e){return om(e)}var fn={},xa={exports:{}},Hl;function im(){return Hl||(Hl=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})(xa)),xa.exports}var _a={exports:{}},Vl;function am(){return Vl||(Vl=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})(_a)),_a.exports}function cm(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 lm(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 um=(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(lm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=cm(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-",Es="-moz-",Xe="-webkit-",Yl="comm",wa="rule",Sa="decl",dm="@import",ql="@keyframes",fm="@layer",pm=Math.abs,Ds=String.fromCharCode,hm=Object.assign;function mm(e,t){return Zt(e,0)^45?(((t<<2^Zt(e,0))<<2^Zt(e,1))<<2^Zt(e,2))<<2^Zt(e,3):0}function Zl(e){return e.trim()}function gm(e,t){return(e=t.exec(e))?e[0]:e}function Je(e,t,r){return e.replace(t,r)}function Ca(e,t){return e.indexOf(t)}function Zt(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function Rr(e){return e.length}function Ea(e){return e.length}function ks(e,t){return t.push(e),e}function vm(e,t){return e.map(t).join("")}var As=1,In=1,Gl=0,rr=0,Bt=0,Mn="";function Ts(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:As,column:In,length:i,return:""}}function io(e,t){return hm(Ts("",null,null,"",null,null,0),e,{length:-e.length},t)}function ym(){return Bt}function bm(){return Bt=rr>0?Zt(Mn,--rr):0,In--,Bt===10&&(In=1,As--),Bt}function cr(){return Bt=rr<Gl?Zt(Mn,rr++):0,In++,Bt===10&&(In=1,As++),Bt}function Nr(){return Zt(Mn,rr)}function Is(){return rr}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 Kl(e){return As=In=1,Gl=Rr(Mn=e),rr=0,[]}function Ql(e){return Mn="",e}function Ms(e){return Zl(ao(rr-1,Da(e===91?e+2:e===40?e+1:e)))}function xm(e){for(;(Bt=Nr())&&Bt<33;)cr();return co(e)>2||co(Bt)>3?"":" "}function _m(e,t){for(;--t&&cr()&&!(Bt<48||Bt>102||Bt>57&&Bt<65||Bt>70&&Bt<97););return ao(e,Is()+(t<6&&Nr()==32&&cr()==32))}function Da(e){for(;cr();)switch(Bt){case e:return rr;case 34:case 39:e!==34&&e!==39&&Da(Bt);break;case 40:e===41&&Da(e);break;case 92:cr();break}return rr}function wm(e,t){for(;cr()&&e+Bt!==57;)if(e+Bt===84&&Nr()===47)break;return"/*"+ao(t,rr-1)+"*"+Ds(e===47?e:cr())}function Sm(e){for(;!co(Nr());)cr();return ao(e,rr)}function Cm(e){return Ql(Ps("",null,null,null,[""],e=Kl(e),0,[0],e))}function Ps(e,t,r,n,o,s,i,a,c){for(var l=0,d=0,f=i,h=0,y=0,g=0,p=1,b=1,w=1,S=0,E="",C=o,_=s,W=n,D=E;b;)switch(g=S,S=cr()){case 40:if(g!=108&&Zt(D,f-1)==58){Ca(D+=Je(Ms(S),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=Ms(S);break;case 9:case 10:case 13:case 32:D+=xm(g);break;case 92:D+=_m(Is()-1,7);continue;case 47:switch(Nr()){case 42:case 47:ks(Em(wm(cr(),Is()),t,r),c);break;default:D+="/"}break;case 123*p:a[l++]=Rr(D)*w;case 125*p:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+d:w==-1&&(D=Je(D,/\f/g,"")),y>0&&Rr(D)-f&&ks(y>32?Jl(D+";",n,r,f-1):Jl(Je(D," ","")+";",n,r,f-2),c);break;case 59:D+=";";default:if(ks(W=Xl(D,t,r,l,d,o,a,E,C=[],_=[],f),s),S===123)if(d===0)Ps(D,t,W,W,C,s,f,a,_);else switch(h===99&&Zt(D,3)===110?100:h){case 100:case 108:case 109:case 115:Ps(e,W,W,n&&ks(Xl(e,W,W,0,0,o,a,E,o,C=[],f),_),o,_,f,a,n?C:_);break;default:Ps(D,W,W,W,[""],_,0,a,_)}}l=d=y=0,p=w=1,E=D="",f=i;break;case 58:f=1+Rr(D),y=g;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&bm()==125)continue}switch(D+=Ds(S),S*p){case 38:w=d>0?1:(D+="\f",-1);break;case 44:a[l++]=(Rr(D)-1)*w,w=1;break;case 64:Nr()===45&&(D+=Ms(cr())),h=Nr(),d=f=Rr(E=D+=Sm(Is())),S++;break;case 45:g===45&&Rr(D)==2&&(p=0)}}return s}function Xl(e,t,r,n,o,s,i,a,c,l,d){for(var f=o-1,h=o===0?s:[""],y=Ea(h),g=0,p=0,b=0;g<n;++g)for(var w=0,S=so(e,f+1,f=pm(p=i[g])),E=e;w<y;++w)(E=Zl(p>0?h[w]+" "+S:Je(S,/&\f/g,h[w])))&&(c[b++]=E);return Ts(e,t,r,o===0?wa:a,c,l,d)}function Em(e,t,r){return Ts(e,t,r,Yl,Ds(ym()),so(e,2,-2),0)}function Jl(e,t,r,n){return Ts(e,t,r,Sa,so(e,0,n),so(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=Ea(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Dm(e,t,r,n){switch(e.type){case fm:if(e.children.length)break;case dm:case Sa:return e.return=e.return||e.value;case Yl:return"";case ql:return e.return=e.value+"{"+Pn(e.children,n)+"}";case wa:e.value=e.props.join(",")}return Rr(r=Pn(e.children,n))?e.return=e.value+"{"+r+"}":""}function km(e){var t=Ea(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 Am(e){return function(t){t.root||(t=t.return)&&e(t)}}function eu(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Tm=function(t,r,n){for(var o=0,s=0;o=s,s=Nr(),o===38&&s===12&&(r[n]=1),!co(s);)cr();return ao(t,rr)},Im=function(t,r){var n=-1,o=44;do switch(co(o)){case 0:o===38&&Nr()===12&&(r[n]=1),t[n]+=Tm(rr-1,r,n);break;case 2:t[n]+=Ms(o);break;case 4:if(o===44){t[++n]=Nr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Ds(o)}while(o=cr());return t},Mm=function(t,r){return Ql(Im(Kl(t),r))},tu=new WeakMap,Pm=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&&!tu.get(n))&&!o){tu.set(t,!0);for(var s=[],i=Mm(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]}}},Om=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ru(e,t){switch(mm(e,t)){case 5103:return Xe+"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 Xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xe+e+Es+e+Kt+e+e;case 6828:case 4268:return Xe+e+Kt+e+e;case 6165:return Xe+e+Kt+"flex-"+e+e;case 5187:return Xe+e+Je(e,/(\w+).+(:[^]+)/,Xe+"box-$1$2"+Kt+"flex-$1$2")+e;case 5443:return Xe+e+Kt+"flex-item-"+Je(e,/flex-|-self/,"")+e;case 4675:return Xe+e+Kt+"flex-line-pack"+Je(e,/align-content|flex-|-self/,"")+e;case 5548:return Xe+e+Kt+Je(e,"shrink","negative")+e;case 5292:return Xe+e+Kt+Je(e,"basis","preferred-size")+e;case 6060:return Xe+"box-"+Je(e,"-grow","")+Xe+e+Kt+Je(e,"grow","positive")+e;case 4554:return Xe+Je(e,/([^-])(transform)/g,"$1"+Xe+"$2")+e;case 6187:return Je(Je(Je(e,/(zoom-|grab)/,Xe+"$1"),/(image-set)/,Xe+"$1"),e,"")+e;case 5495:case 3959:return Je(e,/(image-set\([^]*)/,Xe+"$1$`$1");case 4968:return Je(Je(e,/(.+:)(flex-)?(.*)/,Xe+"box-pack:$3"+Kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xe+e+e;case 4095:case 3583:case 4068:case 2532:return Je(e,/(.+)-inline(.+)/,Xe+"$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(Rr(e)-1-t>6)switch(Zt(e,t+1)){case 109:if(Zt(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Xe+"$2-$3$1"+Es+(Zt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ca(e,"stretch")?ru(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Zt(e,t+1)!==115)break;case 6444:switch(Zt(e,Rr(e)-3-(~Ca(e,"!important")&&10))){case 107:return Je(e,":",":"+Xe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xe+(Zt(e,14)===45?"inline-":"")+"box$3$1"+Xe+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(Zt(e,t+11)){case 114:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Xe+e+Kt+e+e}return e}var jm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Sa:t.return=ru(t.value,t.length);break;case ql:return Pn([io(t,{value:Je(t.value,"@","@"+Xe)})],o);case wa:if(t.length)return vm(t.props,function(s){switch(gm(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([io(t,{props:[Je(s,/:(read-\w+)/,":"+Es+"$1")]})],o);case"::placeholder":return Pn([io(t,{props:[Je(s,/:(plac\w+)/,":"+Xe+"input-$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,":"+Es+"$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,Kt+"input-$1")]})],o)}return""})}},Rm=[jm],nu=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||Rm,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=[Pm,Om];{var d,f=[Dm,Am(function(p){d.insert(p)})],h=km(l.concat(o,f)),y=function(b){return Pn(Cm(b),h)};c=function(b,w,S,E){d=S,y(b?b+"{"+w.styles+"}":w.styles),E&&(g.inserted[w.name]=!0)}}var g={key:r,sheet:new um({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 g.sheet.hydrate(a),g},Os={exports:{}},ot={};/** @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 iu;function Bm(){if(iu)return it;iu=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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 g:case y:case i:return _;default:return W}}case r:return W}}}function C(_){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=g,it.Memo=y,it.Portal=r,it.Profiler=s,it.StrictMode=o,it.Suspense=f,it.isAsyncMode=function(_){return C(_)||E(_)===c},it.isConcurrentMode=C,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(_)===g},it.isMemo=function(_){return E(_)===y},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===g||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===S||_.$$typeof===p)},it.typeOf=E,it}var at={};/** @license React v16.13.1
74
+ */var ou;function Nm(){if(ou)return ot;ou=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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 g:case y:case i:return _;default:return W}}case r:return W}}}function C(_){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=g,ot.Memo=y,ot.Portal=r,ot.Profiler=s,ot.StrictMode=o,ot.Suspense=f,ot.isAsyncMode=function(_){return C(_)||E(_)===c},ot.isConcurrentMode=C,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(_)===g},ot.isMemo=function(_){return E(_)===y},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===g||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===S||_.$$typeof===p)},ot.typeOf=E,ot}var st={};/** @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 au;function Fm(){return au||(au=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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===g||j.$$typeof===y||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===S||j.$$typeof===p)}function C(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var Ke=j.type;switch(Ke){case c:case u:case n:case s:case o:case f:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case a:case d:case g:case y:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=u,D=a,T=i,M=t,I=d,H=n,G=g,F=y,Y=r,se=s,U=o,N=f,le=!1;function de(j){return le||(le=!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)||C(j)===c}function $(j){return C(j)===u}function Q(j){return C(j)===a}function we(j){return C(j)===i}function _e(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function he(j){return C(j)===d}function ae(j){return C(j)===n}function ue(j){return C(j)===g}function J(j){return C(j)===y}function Se(j){return C(j)===r}function me(j){return C(j)===s}function ee(j){return C(j)===o}function Ie(j){return C(j)===f}at.AsyncMode=_,at.ConcurrentMode=W,at.ContextConsumer=D,at.ContextProvider=T,at.Element=M,at.ForwardRef=I,at.Fragment=H,at.Lazy=G,at.Memo=F,at.Portal=Y,at.Profiler=se,at.StrictMode=U,at.Suspense=N,at.isAsyncMode=de,at.isConcurrentMode=$,at.isContextConsumer=Q,at.isContextProvider=we,at.isElement=_e,at.isForwardRef=he,at.isFragment=ae,at.isLazy=ue,at.isMemo=J,at.isPortal=Se,at.isProfiler=me,at.isStrictMode=ee,at.isSuspense=Ie,at.isValidElementType=E,at.typeOf=C})()),at}var cu;function Wm(){return cu||(cu=1,process.env.NODE_ENV==="production"?Rs.exports=Bm():Rs.exports=Fm()),Rs.exports}var Ta,lu;function Hm(){if(lu)return Ta;lu=1;var e=Wm(),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(g){return e.isMemo(g)?o:s[g.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function y(g,p,b){if(typeof p!="string"){if(h){var w=f(p);w&&w!==h&&y(g,w,b)}var S=c(p);u&&(S=S.concat(u(p)));for(var E=i(g),C=i(p),_=0;_<S.length;++_){var W=S[_];if(!r[W]&&!(b&&b[W])&&!(C&&C[W])&&!(E&&E[W])){var D=d(p,W);try{a(g,W,D)}catch{}}}}return g}return Ta=y,Ta}Hm();var Um=!0;function uu(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Ia=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Um===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Ma=function(t,r,n){Ia(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 Vm(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 Ym={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},qm=/[A-Z]|^ms/g,Zm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,du=function(t){return t.charCodeAt(1)===45},fu=function(t){return t!=null&&typeof t!="boolean"},Pa=ru(function(e){return du(e)?e:e.replace(qm,"-$&").toLowerCase()}),pu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Zm,function(n,o,s){return $r={name:o,styles:s,next:$r},o})}return Ym[t]!==1&&!du(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 $r={name:o.name,styles:o.styles,next:$r},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)$r={name:i.name,styles:i.styles,next:$r},i=i.next;var a=s.styles+";";return a}return Gm(e,t,r)}case"function":{if(e!==void 0){var c=$r,u=r(e);return $r=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 Gm(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]+"}":fu(a)&&(n+=Pa(s)+":"+pu(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++)fu(i[c])&&(n+=Pa(s)+":"+pu(s,i[c])+";");else{var u=lo(e,t,i);switch(s){case"animation":case"animationName":{n+=Pa(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var hu=/label:\s*([^\s;{]+)\s*(;|$)/g,$r;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="";$r=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]}hu.lastIndex=0;for(var u="",d;(d=hu.exec(o))!==null;)u+="-"+d[1];var f=Vm(o)+u;return{name:f,styles:o,next:$r}}var Km=function(t){return t()},mu=K.useInsertionEffect?K.useInsertionEffect:!1,gu=mu||Km,vu=mu||K.useLayoutEffect,yu=K.createContext(typeof HTMLElement<"u"?su({key:"css"}):null),Qm=yu.Provider,Oa=function(t){return v.forwardRef(function(r,n){var o=v.useContext(yu);return t(r,o,n)})},Ns=K.createContext({}),ja={}.hasOwnProperty,Ra="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Xm=function(t,r){var n={};for(var o in r)ja.call(r,o)&&(n[o]=r[o]);return n[Ra]=t,n},Jm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ia(r,n,o),gu(function(){return Ma(r,n,o)}),null},eg=Oa(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Ra],s=[n],i="";typeof e.className=="string"?i=uu(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=uo(s,void 0,K.useContext(Ns));i+=t.key+"-"+a.name;var c={};for(var u in e)ja.call(e,u)&&u!=="css"&&u!==Ra&&(c[u]=e[u]);return c.className=i,r&&(c.ref=r),K.createElement(K.Fragment,null,K.createElement(Jm,{cache:t,serialized:a,isStringTag:typeof o=="string"}),K.createElement(o,c))}),tg=eg,bu=function(t,r){var n=arguments;if(r==null||!ja.call(r,"css"))return K.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=tg,s[1]=Xm(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={}))})(bu||(bu={}));var rg=Oa(function(e,t){var r=e.styles,n=uo([r],void 0,K.useContext(Ns)),o=K.useRef();return vu(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]),vu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Ma(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 xu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return uo(t)}function ng(){var e=xu.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 og=/^((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)-.*))$/,sg=ru(function(e){return og.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ig=sg,ag=function(t){return t!=="theme"},_u=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ig:ag},wu=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},cg=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ia(r,n,o),gu(function(){return Ma(r,n,o)}),null},lg=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=wu(t,r,n),c=a||_u(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 y=d.length,g=1;g<y;g++)f.push(d[g],h[g])}var p=Oa(function(b,w,S){var E=u&&b.as||o,C="",_=[],W=b;if(b.theme==null){W={};for(var D in b)W[D]=b[D];W.theme=K.useContext(Ns)}typeof b.className=="string"?C=uu(w.registered,_,b.className):b.className!=null&&(C=b.className+" ");var T=uo(f.concat(_),w.registered,W);C+=w.key+"-"+T.name,i!==void 0&&(C+=" "+i);var M=u&&a===void 0?_u(E):c,I={};for(var H in b)u&&H==="as"||M(H)&&(I[H]=b[H]);return I.className=C,S&&(I.ref=S),K.createElement(K.Fragment,null,K.createElement(cg,{cache:w,serialized:T,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 S=e(b,nt({},r,w,{shouldForwardProp:wu(p,w,!0)}));return S.apply(void 0,f)},p}},ug=["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"],Na=lg.bind(null);ug.forEach(function(e){Na[e]=Na(e)});function dg(e,t){const r=su({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 $a=new Map;function Su(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=K.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&$a.has(s))return $a.get(s);const i=dg(t,r);return $a.set(s,i),i},[t,r]);return t||r?l.jsx(Qm,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(Su.propTypes={children:ze.node,enableCssLayer:ze.bool,injectFirst:ze.bool});function fg(e){return e==null||Object.keys(e).length===0}function Cu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(fg(o)?r:o):t;return l.jsx(rg,{styles:n})}process.env.NODE_ENV!=="production"&&(Cu.propTypes={defaultTheme:ze.object,styles:ze.oneOfType([ze.array,ze.string,ze.object,ze.func])});/**
81
+ */var su;function $m(){return su||(su=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,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=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===g||j.$$typeof===y||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===S||j.$$typeof===p)}function C(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var Ke=j.type;switch(Ke){case c:case l:case n:case s:case o:case f:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case a:case d:case g:case y:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=l,D=a,T=i,M=t,I=d,U=n,G=g,F=y,Y=r,se=s,H=o,N=f,le=!1;function de(j){return le||(le=!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)||C(j)===c}function $(j){return C(j)===l}function Q(j){return C(j)===a}function Se(j){return C(j)===i}function we(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function he(j){return C(j)===d}function ae(j){return C(j)===n}function ue(j){return C(j)===g}function J(j){return C(j)===y}function Ce(j){return C(j)===r}function me(j){return C(j)===s}function ee(j){return C(j)===o}function Me(j){return C(j)===f}st.AsyncMode=_,st.ConcurrentMode=W,st.ContextConsumer=D,st.ContextProvider=T,st.Element=M,st.ForwardRef=I,st.Fragment=U,st.Lazy=G,st.Memo=F,st.Portal=Y,st.Profiler=se,st.StrictMode=H,st.Suspense=N,st.isAsyncMode=de,st.isConcurrentMode=$,st.isContextConsumer=Q,st.isContextProvider=Se,st.isElement=we,st.isForwardRef=he,st.isFragment=ae,st.isLazy=ue,st.isMemo=J,st.isPortal=Ce,st.isProfiler=me,st.isStrictMode=ee,st.isSuspense=Me,st.isValidElementType=E,st.typeOf=C})()),st}var iu;function Lm(){return iu||(iu=1,process.env.NODE_ENV==="production"?Os.exports=Nm():Os.exports=$m()),Os.exports}var ka,au;function zm(){if(au)return ka;au=1;var e=Lm(),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(g){return e.isMemo(g)?o:s[g.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function y(g,p,b){if(typeof p!="string"){if(h){var w=f(p);w&&w!==h&&y(g,w,b)}var S=c(p);l&&(S=S.concat(l(p)));for(var E=i(g),C=i(p),_=0;_<S.length;++_){var W=S[_];if(!r[W]&&!(b&&b[W])&&!(C&&C[W])&&!(E&&E[W])){var D=d(p,W);try{a(g,W,D)}catch{}}}}return g}return ka=y,ka}zm();var Bm=!0;function cu(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Aa=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Bm===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Ta=function(t,r,n){Aa(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 Fm(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 Wm={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},Um=/[A-Z]|^ms/g,Hm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lu=function(t){return t.charCodeAt(1)===45},uu=function(t){return t!=null&&typeof t!="boolean"},Ia=eu(function(e){return lu(e)?e:e.replace(Um,"-$&").toLowerCase()}),du=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Hm,function(n,o,s){return $r={name:o,styles:s,next:$r},o})}return Wm[t]!==1&&!lu(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 $r={name:o.name,styles:o.styles,next:$r},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)$r={name:i.name,styles:i.styles,next:$r},i=i.next;var a=s.styles+";";return a}return Vm(e,t,r)}case"function":{if(e!==void 0){var c=$r,l=r(e);return $r=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 Vm(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]+"}":uu(a)&&(n+=Ia(s)+":"+du(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++)uu(i[c])&&(n+=Ia(s)+":"+du(s,i[c])+";");else{var l=lo(e,t,i);switch(s){case"animation":case"animationName":{n+=Ia(s)+":"+l+";";break}default:n+=s+"{"+l+"}"}}}return n}var fu=/label:\s*([^\s;{]+)\s*(;|$)/g,$r;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="";$r=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]}fu.lastIndex=0;for(var l="",d;(d=fu.exec(o))!==null;)l+="-"+d[1];var f=Fm(o)+l;return{name:f,styles:o,next:$r}}var Ym=function(t){return t()},pu=K.useInsertionEffect?K.useInsertionEffect:!1,hu=pu||Ym,mu=pu||K.useLayoutEffect,gu=K.createContext(typeof HTMLElement<"u"?nu({key:"css"}):null),qm=gu.Provider,Ma=function(t){return v.forwardRef(function(r,n){var o=v.useContext(gu);return t(r,o,n)})},js=K.createContext({}),Pa={}.hasOwnProperty,Oa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Zm=function(t,r){var n={};for(var o in r)Pa.call(r,o)&&(n[o]=r[o]);return n[Oa]=t,n},Gm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Aa(r,n,o),hu(function(){return Ta(r,n,o)}),null},Km=Ma(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Oa],s=[n],i="";typeof e.className=="string"?i=cu(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=uo(s,void 0,K.useContext(js));i+=t.key+"-"+a.name;var c={};for(var l in e)Pa.call(e,l)&&l!=="css"&&l!==Oa&&(c[l]=e[l]);return c.className=i,r&&(c.ref=r),K.createElement(K.Fragment,null,K.createElement(Gm,{cache:t,serialized:a,isStringTag:typeof o=="string"}),K.createElement(o,c))}),Qm=Km,vu=function(t,r){var n=arguments;if(r==null||!Pa.call(r,"css"))return K.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=Qm,s[1]=Zm(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={}))})(vu||(vu={}));var Xm=Ma(function(e,t){var r=e.styles,n=uo([r],void 0,K.useContext(js)),o=K.useRef();return mu(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]),mu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Ta(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 yu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return uo(t)}function Jm(){var e=yu.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 eg=/^((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)-.*))$/,tg=eu(function(e){return eg.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),rg=tg,ng=function(t){return t!=="theme"},bu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?rg:ng},xu=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},og=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Aa(r,n,o),hu(function(){return Ta(r,n,o)}),null},sg=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=xu(t,r,n),c=a||bu(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 y=d.length,g=1;g<y;g++)f.push(d[g],h[g])}var p=Ma(function(b,w,S){var E=l&&b.as||o,C="",_=[],W=b;if(b.theme==null){W={};for(var D in b)W[D]=b[D];W.theme=K.useContext(js)}typeof b.className=="string"?C=cu(w.registered,_,b.className):b.className!=null&&(C=b.className+" ");var T=uo(f.concat(_),w.registered,W);C+=w.key+"-"+T.name,i!==void 0&&(C+=" "+i);var M=l&&a===void 0?bu(E):c,I={};for(var U in b)l&&U==="as"||M(U)&&(I[U]=b[U]);return I.className=C,S&&(I.ref=S),K.createElement(K.Fragment,null,K.createElement(og,{cache:w,serialized:T,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 S=e(b,tt({},r,w,{shouldForwardProp:xu(p,w,!0)}));return S.apply(void 0,f)},p}},ig=["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"],ja=sg.bind(null);ig.forEach(function(e){ja[e]=ja(e)});function ag(e,t){const r=nu({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 Ra=new Map;function _u(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=K.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&Ra.has(s))return Ra.get(s);const i=ag(t,r);return Ra.set(s,i),i},[t,r]);return t||r?u.jsx(qm,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(_u.propTypes={children:ze.node,enableCssLayer:ze.bool,injectFirst:ze.bool});function cg(e){return e==null||Object.keys(e).length===0}function wu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(cg(o)?r:o):t;return u.jsx(Xm,{styles:n})}process.env.NODE_ENV!=="production"&&(wu.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 pg(e,t){const r=Na(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 hg=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Eu=[];function mg(e){return Eu[0]=e,uo(Eu)}const gg=Yr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Cu,StyledEngineProvider:Su,ThemeContext:Ns,css:xu,default:pg,internal_processStyles:hg,internal_serializeStyles:mg,keyframes:ng},Symbol.toStringTag,{value:"Module"}))),vg=Yr(y0),yg=Yr(j0),bg=Yr(O0),xg=["values","unit","step"],_g=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 Du(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=rn(e,xg),s=_g(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,y){const g=i.indexOf(y);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:y)-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 y=i.indexOf(h);return y===0?a(i[1]):y===i.length-1?c(i[y]):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 wg={borderRadius:4},nn=process.env.NODE_ENV!=="production"?ze.oneOfType([ze.number,ze.string,ze.object,ze.array]):{};function fo(e,t){return t?jr(e,t,{clone:!1}):e}const La={xs:0,sm:600,md:900,lg:1200,xl:1536},ku={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${La[e]}px)`};function qr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||ku;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||ku;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||La).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 Sg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Au(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function $s(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 Ls(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=$s(e,r)||n,t&&(o=t(o,n,e)),o}function Rt(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=$s(c,n)||{};return qr(i,a,f=>{let h=Ls(u,o,f);return f===h&&typeof f=="string"&&(h=Ls(u,o,`${t}${f==="default"?"":tn(f)}`,f)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:nn}:{},s.filterProps=[t],s}function Cg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Eg={m:"margin",p:"padding"},Dg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Tu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},kg=Cg(e=>{if(e.length>2)if(Tu[e])e=Tu[e];else return[e];const[t,r]=e.split(""),n=Eg[t],o=Dg[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),zs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ag=[...zs,...Bs];function po(e,t,r,n){var o;const s=(o=$s(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 lg(e,t){const r=ja(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 ug=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Su=[];function dg(e){return Su[0]=e,uo(Su)}const fg=Yr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:wu,StyledEngineProvider:_u,ThemeContext:js,css:yu,default:lg,internal_processStyles:ug,internal_serializeStyles:dg,keyframes:Jm},Symbol.toStringTag,{value:"Module"}))),pg=Yr(h0),hg=Yr(I0),mg=Yr(T0),gg=["values","unit","step"],vg=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)=>tt({},r,{[n.key]:n.val}),{})};function Cu(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=rn(e,gg),s=vg(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,y){const g=i.indexOf(y);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:y)-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 y=i.indexOf(h);return y===0?a(i[1]):y===i.length-1?c(i[y]):l(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return tt({keys:i,values:s,up:a,down:c,between:l,only:d,not:f,unit:r},o)}const yg={borderRadius:4},nn=process.env.NODE_ENV!=="production"?ze.oneOfType([ze.number,ze.string,ze.object,ze.array]):{};function fo(e,t){return t?jr(e,t,{clone:!1}):e}const Na={xs:0,sm:600,md:900,lg:1200,xl:1536},Eu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Na[e]}px)`};function qr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Eu;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Eu;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||Na).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 bg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Du(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Rs(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 Ns(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Rs(e,r)||n,t&&(o=t(o,n,e)),o}function Rt(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=Rs(c,n)||{};return qr(i,a,f=>{let h=Ns(l,o,f);return f===h&&typeof f=="string"&&(h=Ns(l,o,`${t}${f==="default"?"":tn(f)}`,f)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:nn}:{},s.filterProps=[t],s}function xg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const _g={m:"margin",p:"padding"},wg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ku={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Sg=xg(e=>{if(e.length>2)if(ku[e])e=ku[e];else return[e];const[t,r]=e.split(""),n=_g[t],o=wg[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),$s=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ls=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Cg=[...$s,...Ls];function po(e,t,r,n){var o;const s=(o=Rs(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 Iu(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 Tg(e,t){return r=>e.reduce((n,o)=>(n[o]=ho(t,r),n),{})}function Ig(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=kg(r),s=Tg(o,n),i=e[r];return qr(e,i,s)}function Mu(e,t){const r=Iu(e.theme);return Object.keys(e).map(n=>Ig(e,t,n,r)).reduce(fo,{})}function It(e){return Mu(e,zs)}It.propTypes=process.env.NODE_ENV!=="production"?zs.reduce((e,t)=>(e[t]=nn,e),{}):{},It.filterProps=zs;function Mt(e){return Mu(e,Bs)}Mt.propTypes=process.env.NODE_ENV!=="production"?Bs.reduce((e,t)=>(e[t]=nn,e),{}):{},Mt.filterProps=Bs,process.env.NODE_ENV!=="production"&&Ag.reduce((e,t)=>(e[t]=nn,e),{});function Mg(e=8){if(e.mui)return e;const t=Iu({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 Fs(...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 Rt({prop:e,themeKey:"borders",transform:t})}const Pg=gr("border",mr),Og=gr("borderTop",mr),jg=gr("borderRight",mr),Rg=gr("borderBottom",mr),Ng=gr("borderLeft",mr),$g=gr("borderColor"),Lg=gr("borderTopColor"),zg=gr("borderRightColor"),Bg=gr("borderBottomColor"),Fg=gr("borderLeftColor"),Wg=gr("outline",mr),Hg=gr("outlineColor"),Ws=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};Ws.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:nn}:{},Ws.filterProps=["borderRadius"],Fs(Pg,Og,jg,Rg,Ng,$g,Lg,zg,Bg,Fg,Ws,Wg,Hg);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:nn}:{},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:nn}:{},Us.filterProps=["columnGap"];const Vs=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};Vs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:nn}:{},Vs.filterProps=["rowGap"];const Ug=Rt({prop:"gridColumn"}),Vg=Rt({prop:"gridRow"}),Yg=Rt({prop:"gridAutoFlow"}),qg=Rt({prop:"gridAutoColumns"}),Zg=Rt({prop:"gridAutoRows"}),Gg=Rt({prop:"gridTemplateColumns"}),Kg=Rt({prop:"gridTemplateRows"}),Qg=Rt({prop:"gridTemplateAreas"}),Xg=Rt({prop:"gridArea"});Fs(Hs,Us,Vs,Ug,Vg,Yg,qg,Zg,Gg,Kg,Qg,Xg);function On(e,t){return t==="grey"?t:e}const Jg=Rt({prop:"color",themeKey:"palette",transform:On}),ev=Rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),tv=Rt({prop:"backgroundColor",themeKey:"palette",transform:On});Fs(Jg,ev,tv);function lr(e){return e<=1&&e!==0?`${e*100}%`:e}const rv=Rt({prop:"width",transform:lr}),za=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])||La[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};za.filterProps=["maxWidth"];const nv=Rt({prop:"minWidth",transform:lr}),ov=Rt({prop:"height",transform:lr}),sv=Rt({prop:"maxHeight",transform:lr}),iv=Rt({prop:"minHeight",transform:lr});Rt({prop:"size",cssProperty:"width",transform:lr}),Rt({prop:"size",cssProperty:"height",transform:lr});const av=Rt({prop:"boxSizing"});Fs(rv,za,nv,ov,sv,iv,av);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:Ws},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:Mt},pt:{style:Mt},pr:{style:Mt},pb:{style:Mt},pl:{style:Mt},px:{style:Mt},py:{style:Mt},padding:{style:Mt},paddingTop:{style:Mt},paddingRight:{style:Mt},paddingBottom:{style:Mt},paddingLeft:{style:Mt},paddingX:{style:Mt},paddingY:{style:Mt},paddingInline:{style:Mt},paddingInlineStart:{style:Mt},paddingInlineEnd:{style:Mt},paddingBlock:{style:Mt},paddingBlockStart:{style:Mt},paddingBlockEnd:{style:Mt},m:{style:It},mt:{style:It},mr:{style:It},mb:{style:It},ml:{style:It},mx:{style:It},my:{style:It},margin:{style:It},marginTop:{style:It},marginRight:{style:It},marginBottom:{style:It},marginLeft:{style:It},marginX:{style:It},marginY:{style:It},marginInline:{style:It},marginInlineStart:{style:It},marginInlineEnd:{style:It},marginBlock:{style:It},marginBlockStart:{style:It},marginBlockEnd:{style:It},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:Vs},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:za},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 cv(...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 lv(e,t){return typeof e=="function"?e(t):e}function Pu(){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=$s(o,u)||{};return f?f(i):qr(i,n,g=>{let p=Ls(h,d,g);return g===p&&typeof g=="string"&&(p=Ls(h,d,`${r}${g==="default"?"":tn(g)}`,g)),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=Sg(s.breakpoints),h=Object.keys(f);let y=f;return Object.keys(d).forEach(g=>{const p=lv(d[g],s);if(p!=null)if(typeof p=="object")if(a[g])y=fo(y,e(g,p,s,a));else{const b=qr({theme:s},p,w=>({[g]:w}));cv(b,p)?y[g]=t({sx:p,theme:s,nested:!0}):y=fo(y,b)}else y=fo(y,e(g,p,s,a))}),!i&&s.modularCssLayers?{"@layer sx":Au(h,y)}:Au(h,y)}return Array.isArray(o)?o.map(c):c(o)}return t}const Ys=Pu();Ys.filterProps=["sx"];function Ou(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 uv=["breakpoints","palette","spacing","shape"];function ju(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=rn(e,uv),a=Du(r),c=Mg(o);let u=jr({breakpoints:a,direction:"ltr",components:{},palette:nt({mode:"light"},n),spacing:c,shape:nt({},wg,s)},i);return u.applyStyles=Ou,u=t.reduce((d,f)=>jr(d,f),u),u.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return Ys({sx:f,theme:this})},u}const dv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:ju,private_createBreakpoints:Du,unstable_applyStyles:Ou},Symbol.toStringTag,{value:"Module"}))),fv=["sx"],pv=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 hv(e){const{sx:t}=e,r=rn(e,fv),{systemProps:n,otherProps:o}=pv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return en(a)?nt({},n,a):n}:s=nt({},n,t),nt({},o,{sx:s})}const mv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Ys,extendSxProp:hv,unstable_createStyleFunctionSx:Pu,unstable_defaultSxConfig:mo},Symbol.toStringTag,{value:"Module"})));var Ru;function gv(){if(Ru)return fn;Ru=1;var e=rt();Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=D,fn.shouldForwardProp=b,fn.systemDefaultTheme=void 0;var t=e(um()),r=e(dm()),n=y(gg),o=vg,s=e(yg),i=e(bg),a=e(dv),c=e(mv);const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(T){if(typeof WeakMap!="function")return null;var M=new WeakMap,I=new WeakMap;return(h=function(H){return H?I:M})(T)}function y(T,M){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var I=h(M);if(I&&I.has(T))return I.get(T);var H={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in T)if(F!=="default"&&Object.prototype.hasOwnProperty.call(T,F)){var Y=G?Object.getOwnPropertyDescriptor(T,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(H,F,Y):H[F]=T[F]}return H.default=T,I&&I.set(T,H),H}function g(T){return Object.keys(T).length===0}function p(T){return typeof T=="string"&&T.charCodeAt(0)>96}function b(T){return T!=="ownerState"&&T!=="theme"&&T!=="sx"&&T!=="as"}function w(T,M){return M&&T&&typeof T=="object"&&T.styles&&!T.styles.startsWith("@layer")&&(T.styles=`@layer ${M}{${String(T.styles)}}`),T}const S=fn.systemDefaultTheme=(0,a.default)(),E=T=>T&&T.charAt(0).toLowerCase()+T.slice(1);function C({defaultTheme:T,theme:M,themeId:I}){return g(M)?T:M[I]||M}function _(T){return T?(M,I)=>I[T]:null}function W(T,M,I){let{ownerState:H}=M,G=(0,r.default)(M,u);const F=typeof T=="function"?T((0,t.default)({ownerState:H},G)):T;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 U=(0,r.default)(F,d);return Y.forEach(N=>{let le=!0;if(typeof N.props=="function"?le=N.props((0,t.default)({ownerState:H},G,H)):Object.keys(N.props).forEach(de=>{H?.[de]!==N.props[de]&&G[de]!==N.props[de]&&(le=!1)}),le){Array.isArray(U)||(U=[U]);const de=typeof N.style=="function"?N.style((0,t.default)({ownerState:H},G,H)):N.style;U.push(I?w((0,n.internal_serializeStyles)(de),I):de)}}),U}return I?w((0,n.internal_serializeStyles)(F),I):F}function D(T={}){const{themeId:M,defaultTheme:I=S,rootShouldForwardProp:H=b,slotShouldForwardProp:G=b}=T,F=Y=>(0,c.default)((0,t.default)({},Y,{theme:C((0,t.default)({},Y,{defaultTheme:I,themeId:M}))}));return F.__mui_systemSx=!0,(Y,se={})=>{(0,n.internal_processStyles)(Y,ee=>ee.filter(Ie=>!(Ie!=null&&Ie.__mui_systemSx)));const{name:U,slot:N,skipVariantsResolver:le,skipSx:de,overridesResolver:$=_(E(N))}=se,Q=(0,r.default)(se,f),we=U&&U.startsWith("Mui")||N?"components":"custom",_e=le!==void 0?le:N&&N!=="Root"&&N!=="root"||!1,he=de||!1;let ae;process.env.NODE_ENV!=="production"&&U&&(ae=`${U}-${E(N||"Root")}`);let ue=b;N==="Root"||N==="root"?ue=H:N?ue=G:p(Y)&&(ue=void 0);const J=(0,n.default)(Y,(0,t.default)({shouldForwardProp:ue,label:ae},Q)),Se=ee=>typeof ee=="function"&&ee.__emotion_real!==ee||(0,o.isPlainObject)(ee)?Ie=>{const j=C({theme:Ie.theme,defaultTheme:I,themeId:M});return W(ee,(0,t.default)({},Ie,{theme:j}),j.modularCssLayers?we:void 0)}:ee,me=(ee,...Ie)=>{let j=Se(ee);const Fe=Ie?Ie.map(Se):[];U&&$&&Fe.push(Be=>{const Ve=C((0,t.default)({},Be,{defaultTheme:I,themeId:M}));if(!Ve.components||!Ve.components[U]||!Ve.components[U].styleOverrides)return null;const et=Ve.components[U].styleOverrides,mt={};return Object.entries(et).forEach(([k,P])=>{mt[k]=W(P,(0,t.default)({},Be,{theme:Ve}),Ve.modularCssLayers?"theme":void 0)}),$(Be,mt)}),U&&!_e&&Fe.push(Be=>{var Ve;const et=C((0,t.default)({},Be,{defaultTheme:I,themeId:M})),mt=et==null||(Ve=et.components)==null||(Ve=Ve[U])==null?void 0:Ve.variants;return W({variants:mt},(0,t.default)({},Be,{theme:et}),et.modularCssLayers?"theme":void 0)}),he||Fe.push(F);const Ke=Fe.length-Ie.length;if(Array.isArray(ee)&&Ke>0){const Be=new Array(Ke).fill("");j=[...ee,...Be],j.raw=[...ee.raw,...Be]}const Ze=J(j,...Fe);if(process.env.NODE_ENV!=="production"){let Be;U&&(Be=`${U}${(0,s.default)(N||"")}`),Be===void 0&&(Be=`Styled(${(0,i.default)(Y)})`),Ze.displayName=Be}return Y.muiName&&(Ze.muiName=Y.muiName),Ze};return J.withConfig&&(me.withConfig=J.withConfig),me}}return fn}var vv=gv();const yv=tt(vv);function bv(e,t){return nt({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Et={};const xv=Yr(k0),_v=Yr(sm);var Nu;function wv(){if(Nu)return Et;Nu=1;var e=rt();Object.defineProperty(Et,"__esModule",{value:!0}),Et.alpha=g,Et.blend=W,Et.colorChannel=void 0,Et.darken=b,Et.decomposeColor=i,Et.emphasize=C,Et.getContrastRatio=y,Et.getLuminance=h,Et.hexToRgb=o,Et.hslToRgb=f,Et.lighten=S,Et.private_safeAlpha=p,Et.private_safeColorChannel=void 0,Et.private_safeDarken=w,Et.private_safeEmphasize=_,Et.private_safeLighten=E,Et.recomposeColor=u,Et.rgbToHex=d;var t=e(xv),r=e(_v);function n(D,T=0,M=1){return process.env.NODE_ENV!=="production"&&(D<T||D>M)&&console.error(`MUI: The value provided ${D} is out of range [${T}, ${M}].`),(0,r.default)(D,T,M)}function o(D){D=D.slice(1);const T=new RegExp(`.{1,${D.length>=6?2:1}}`,"g");let M=D.match(T);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 T=D.toString(16);return T.length===1?`0${T}`:T}function i(D){if(D.type)return D;if(D.charAt(0)==="#")return i(o(D));const T=D.indexOf("("),M=D.substring(0,T);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(T+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 T=i(D);return T.values.slice(0,3).map((M,I)=>T.type.indexOf("hsl")!==-1&&I!==0?`${M}%`:M).join(" ")};Et.colorChannel=a;const c=(D,T)=>{try{return a(D)}catch{return T&&process.env.NODE_ENV!=="production"&&console.warn(T),D}};Et.private_safeColorChannel=c;function u(D){const{type:T,colorSpace:M}=D;let{values:I}=D;return T.indexOf("rgb")!==-1?I=I.map((H,G)=>G<3?parseInt(H,10):H):T.indexOf("hsl")!==-1&&(I[1]=`${I[1]}%`,I[2]=`${I[2]}%`),T.indexOf("color")!==-1?I=`${M} ${I.join(" ")}`:I=`${I.join(", ")}`,`${T}(${I})`}function d(D){if(D.indexOf("#")===0)return D;const{values:T}=i(D);return`#${T.map((M,I)=>s(I===3?Math.round(255*M):M)).join("")}`}function f(D){D=i(D);const{values:T}=D,M=T[0],I=T[1]/100,H=T[2]/100,G=I*Math.min(H,1-H),F=(U,N=(U+M/30)%12)=>H-G*Math.max(Math.min(N-3,9-N,1),-1);let Y="rgb";const se=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return D.type==="hsla"&&(Y+="a",se.push(T[3])),u({type:Y,values:se})}function h(D){D=i(D);let T=D.type==="hsl"||D.type==="hsla"?i(f(D)).values:D.values;return T=T.map(M=>(D.type!=="color"&&(M/=255),M<=.03928?M/12.92:((M+.055)/1.055)**2.4)),Number((.2126*T[0]+.7152*T[1]+.0722*T[2]).toFixed(3))}function y(D,T){const M=h(D),I=h(T);return(Math.max(M,I)+.05)/(Math.min(M,I)+.05)}function g(D,T){return D=i(D),T=n(T),(D.type==="rgb"||D.type==="hsl")&&(D.type+="a"),D.type==="color"?D.values[3]=`/${T}`:D.values[3]=T,u(D)}function p(D,T,M){try{return g(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function b(D,T){if(D=i(D),T=n(T),D.type.indexOf("hsl")!==-1)D.values[2]*=1-T;else if(D.type.indexOf("rgb")!==-1||D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]*=1-T;return u(D)}function w(D,T,M){try{return b(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function S(D,T){if(D=i(D),T=n(T),D.type.indexOf("hsl")!==-1)D.values[2]+=(100-D.values[2])*T;else if(D.type.indexOf("rgb")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(255-D.values[M])*T;else if(D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(1-D.values[M])*T;return u(D)}function E(D,T,M){try{return S(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function C(D,T=.15){return h(D)>.5?b(D,T):S(D,T)}function _(D,T,M){try{return C(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function W(D,T,M,I=1){const H=(se,U)=>Math.round((se**(1/I)*(1-M)+U**(1/I)*M)**I),G=i(D),F=i(T),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 Et}var qs=wv();const go={black:"#000",white:"#fff"},Sv={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"},Cv=["mode","contrastThreshold","tonalOffset"],$u={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}},Ba={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 Lu(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=qs.lighten(e.main,o):t==="dark"&&(e.dark=qs.darken(e.main,s)))}function Ev(e="light"){return e==="dark"?{main:Nn[200],light:Nn[50],dark:Nn[400]}:{main:Nn[700],light:Nn[400],dark:Nn[800]}}function Dv(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function kv(e="light"){return e==="dark"?{main:Rn[500],light:Rn[300],dark:Rn[700]}:{main:Rn[700],light:Rn[400],dark:Rn[800]}}function Av(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:$n[700],light:$n[500],dark:$n[900]}}function Tv(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[800],light:Ln[500],dark:Ln[900]}}function Iv(e="light"){return e==="dark"?{main:vo[400],light:vo[300],dark:vo[700]}:{main:"#ed6c02",light:vo[500],dark:vo[900]}}function Mv(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=rn(e,Cv),s=e.primary||Ev(t),i=e.secondary||Dv(t),a=e.error||kv(t),c=e.info||Av(t),u=e.success||Tv(t),d=e.warning||Iv(t);function f(p){const b=qs.getContrastRatio(p,Ba.text.primary)>=r?Ba.text.primary:$u.text.primary;if(process.env.NODE_ENV!=="production"){const w=qs.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
- `))}return b}const h=({color:p,name:b,mainShade:w=500,lightShade:S=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.
91
+ `)),()=>{})}function Au(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 Eg(e,t){return r=>e.reduce((n,o)=>(n[o]=ho(t,r),n),{})}function Dg(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=Sg(r),s=Eg(o,n),i=e[r];return qr(e,i,s)}function Tu(e,t){const r=Au(e.theme);return Object.keys(e).map(n=>Dg(e,t,n,r)).reduce(fo,{})}function It(e){return Tu(e,$s)}It.propTypes=process.env.NODE_ENV!=="production"?$s.reduce((e,t)=>(e[t]=nn,e),{}):{},It.filterProps=$s;function Mt(e){return Tu(e,Ls)}Mt.propTypes=process.env.NODE_ENV!=="production"?Ls.reduce((e,t)=>(e[t]=nn,e),{}):{},Mt.filterProps=Ls,process.env.NODE_ENV!=="production"&&Cg.reduce((e,t)=>(e[t]=nn,e),{});function kg(e=8){if(e.mui)return e;const t=Au({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 zs(...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 Rt({prop:e,themeKey:"borders",transform:t})}const Ag=gr("border",mr),Tg=gr("borderTop",mr),Ig=gr("borderRight",mr),Mg=gr("borderBottom",mr),Pg=gr("borderLeft",mr),Og=gr("borderColor"),jg=gr("borderTopColor"),Rg=gr("borderRightColor"),Ng=gr("borderBottomColor"),$g=gr("borderLeftColor"),Lg=gr("outline",mr),zg=gr("outlineColor"),Bs=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};Bs.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:nn}:{},Bs.filterProps=["borderRadius"],zs(Ag,Tg,Ig,Mg,Pg,Og,jg,Rg,Ng,$g,Bs,Lg,zg);const Fs=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};Fs.propTypes=process.env.NODE_ENV!=="production"?{gap:nn}:{},Fs.filterProps=["gap"];const Ws=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};Ws.propTypes=process.env.NODE_ENV!=="production"?{columnGap:nn}:{},Ws.filterProps=["columnGap"];const Us=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};Us.propTypes=process.env.NODE_ENV!=="production"?{rowGap:nn}:{},Us.filterProps=["rowGap"];const Bg=Rt({prop:"gridColumn"}),Fg=Rt({prop:"gridRow"}),Wg=Rt({prop:"gridAutoFlow"}),Ug=Rt({prop:"gridAutoColumns"}),Hg=Rt({prop:"gridAutoRows"}),Vg=Rt({prop:"gridTemplateColumns"}),Yg=Rt({prop:"gridTemplateRows"}),qg=Rt({prop:"gridTemplateAreas"}),Zg=Rt({prop:"gridArea"});zs(Fs,Ws,Us,Bg,Fg,Wg,Ug,Hg,Vg,Yg,qg,Zg);function On(e,t){return t==="grey"?t:e}const Gg=Rt({prop:"color",themeKey:"palette",transform:On}),Kg=Rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),Qg=Rt({prop:"backgroundColor",themeKey:"palette",transform:On});zs(Gg,Kg,Qg);function lr(e){return e<=1&&e!==0?`${e*100}%`:e}const Xg=Rt({prop:"width",transform:lr}),$a=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])||Na[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};$a.filterProps=["maxWidth"];const Jg=Rt({prop:"minWidth",transform:lr}),ev=Rt({prop:"height",transform:lr}),tv=Rt({prop:"maxHeight",transform:lr}),rv=Rt({prop:"minHeight",transform:lr});Rt({prop:"size",cssProperty:"width",transform:lr}),Rt({prop:"size",cssProperty:"height",transform:lr});const nv=Rt({prop:"boxSizing"});zs(Xg,$a,Jg,ev,tv,rv,nv);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:Bs},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:Mt},pt:{style:Mt},pr:{style:Mt},pb:{style:Mt},pl:{style:Mt},px:{style:Mt},py:{style:Mt},padding:{style:Mt},paddingTop:{style:Mt},paddingRight:{style:Mt},paddingBottom:{style:Mt},paddingLeft:{style:Mt},paddingX:{style:Mt},paddingY:{style:Mt},paddingInline:{style:Mt},paddingInlineStart:{style:Mt},paddingInlineEnd:{style:Mt},paddingBlock:{style:Mt},paddingBlockStart:{style:Mt},paddingBlockEnd:{style:Mt},m:{style:It},mt:{style:It},mr:{style:It},mb:{style:It},ml:{style:It},mx:{style:It},my:{style:It},margin:{style:It},marginTop:{style:It},marginRight:{style:It},marginBottom:{style:It},marginLeft:{style:It},marginX:{style:It},marginY:{style:It},marginInline:{style:It},marginInlineStart:{style:It},marginInlineEnd:{style:It},marginBlock:{style:It},marginBlockStart:{style:It},marginBlockEnd:{style:It},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:Fs},rowGap:{style:Us},columnGap:{style:Ws},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:$a},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 ov(...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 sv(e,t){return typeof e=="function"?e(t):e}function Iu(){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=Rs(o,l)||{};return f?f(i):qr(i,n,g=>{let p=Ns(h,d,g);return g===p&&typeof g=="string"&&(p=Ns(h,d,`${r}${g==="default"?"":tn(g)}`,g)),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=bg(s.breakpoints),h=Object.keys(f);let y=f;return Object.keys(d).forEach(g=>{const p=sv(d[g],s);if(p!=null)if(typeof p=="object")if(a[g])y=fo(y,e(g,p,s,a));else{const b=qr({theme:s},p,w=>({[g]:w}));ov(b,p)?y[g]=t({sx:p,theme:s,nested:!0}):y=fo(y,b)}else y=fo(y,e(g,p,s,a))}),!i&&s.modularCssLayers?{"@layer sx":Du(h,y)}:Du(h,y)}return Array.isArray(o)?o.map(c):c(o)}return t}const Hs=Iu();Hs.filterProps=["sx"];function Mu(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 iv=["breakpoints","palette","spacing","shape"];function Pu(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=rn(e,iv),a=Cu(r),c=kg(o);let l=jr({breakpoints:a,direction:"ltr",components:{},palette:tt({mode:"light"},n),spacing:c,shape:tt({},yg,s)},i);return l.applyStyles=Mu,l=t.reduce((d,f)=>jr(d,f),l),l.unstable_sxConfig=tt({},mo,i?.unstable_sxConfig),l.unstable_sx=function(f){return Hs({sx:f,theme:this})},l}const av=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Pu,private_createBreakpoints:Cu,unstable_applyStyles:Mu},Symbol.toStringTag,{value:"Module"}))),cv=["sx"],lv=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 uv(e){const{sx:t}=e,r=rn(e,cv),{systemProps:n,otherProps:o}=lv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return en(a)?tt({},n,a):n}:s=tt({},n,t),tt({},o,{sx:s})}const dv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Hs,extendSxProp:uv,unstable_createStyleFunctionSx:Iu,unstable_defaultSxConfig:mo},Symbol.toStringTag,{value:"Module"})));var Ou;function fv(){if(Ou)return fn;Ou=1;var e=ut();Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=D,fn.shouldForwardProp=b,fn.systemDefaultTheme=void 0;var t=e(im()),r=e(am()),n=y(fg),o=pg,s=e(hg),i=e(mg),a=e(av),c=e(dv);const l=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(T){if(typeof WeakMap!="function")return null;var M=new WeakMap,I=new WeakMap;return(h=function(U){return U?I:M})(T)}function y(T,M){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var I=h(M);if(I&&I.has(T))return I.get(T);var U={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in T)if(F!=="default"&&Object.prototype.hasOwnProperty.call(T,F)){var Y=G?Object.getOwnPropertyDescriptor(T,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(U,F,Y):U[F]=T[F]}return U.default=T,I&&I.set(T,U),U}function g(T){return Object.keys(T).length===0}function p(T){return typeof T=="string"&&T.charCodeAt(0)>96}function b(T){return T!=="ownerState"&&T!=="theme"&&T!=="sx"&&T!=="as"}function w(T,M){return M&&T&&typeof T=="object"&&T.styles&&!T.styles.startsWith("@layer")&&(T.styles=`@layer ${M}{${String(T.styles)}}`),T}const S=fn.systemDefaultTheme=(0,a.default)(),E=T=>T&&T.charAt(0).toLowerCase()+T.slice(1);function C({defaultTheme:T,theme:M,themeId:I}){return g(M)?T:M[I]||M}function _(T){return T?(M,I)=>I[T]:null}function W(T,M,I){let{ownerState:U}=M,G=(0,r.default)(M,l);const F=typeof T=="function"?T((0,t.default)({ownerState:U},G)):T;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 H=(0,r.default)(F,d);return Y.forEach(N=>{let le=!0;if(typeof N.props=="function"?le=N.props((0,t.default)({ownerState:U},G,U)):Object.keys(N.props).forEach(de=>{U?.[de]!==N.props[de]&&G[de]!==N.props[de]&&(le=!1)}),le){Array.isArray(H)||(H=[H]);const de=typeof N.style=="function"?N.style((0,t.default)({ownerState:U},G,U)):N.style;H.push(I?w((0,n.internal_serializeStyles)(de),I):de)}}),H}return I?w((0,n.internal_serializeStyles)(F),I):F}function D(T={}){const{themeId:M,defaultTheme:I=S,rootShouldForwardProp:U=b,slotShouldForwardProp:G=b}=T,F=Y=>(0,c.default)((0,t.default)({},Y,{theme:C((0,t.default)({},Y,{defaultTheme:I,themeId:M}))}));return F.__mui_systemSx=!0,(Y,se={})=>{(0,n.internal_processStyles)(Y,ee=>ee.filter(Me=>!(Me!=null&&Me.__mui_systemSx)));const{name:H,slot:N,skipVariantsResolver:le,skipSx:de,overridesResolver:$=_(E(N))}=se,Q=(0,r.default)(se,f),Se=H&&H.startsWith("Mui")||N?"components":"custom",we=le!==void 0?le:N&&N!=="Root"&&N!=="root"||!1,he=de||!1;let ae;process.env.NODE_ENV!=="production"&&H&&(ae=`${H}-${E(N||"Root")}`);let ue=b;N==="Root"||N==="root"?ue=U:N?ue=G:p(Y)&&(ue=void 0);const J=(0,n.default)(Y,(0,t.default)({shouldForwardProp:ue,label:ae},Q)),Ce=ee=>typeof ee=="function"&&ee.__emotion_real!==ee||(0,o.isPlainObject)(ee)?Me=>{const j=C({theme:Me.theme,defaultTheme:I,themeId:M});return W(ee,(0,t.default)({},Me,{theme:j}),j.modularCssLayers?Se:void 0)}:ee,me=(ee,...Me)=>{let j=Ce(ee);const Fe=Me?Me.map(Ce):[];H&&$&&Fe.push(Be=>{const Ve=C((0,t.default)({},Be,{defaultTheme:I,themeId:M}));if(!Ve.components||!Ve.components[H]||!Ve.components[H].styleOverrides)return null;const et=Ve.components[H].styleOverrides,ht={};return Object.entries(et).forEach(([k,P])=>{ht[k]=W(P,(0,t.default)({},Be,{theme:Ve}),Ve.modularCssLayers?"theme":void 0)}),$(Be,ht)}),H&&!we&&Fe.push(Be=>{var Ve;const et=C((0,t.default)({},Be,{defaultTheme:I,themeId:M})),ht=et==null||(Ve=et.components)==null||(Ve=Ve[H])==null?void 0:Ve.variants;return W({variants:ht},(0,t.default)({},Be,{theme:et}),et.modularCssLayers?"theme":void 0)}),he||Fe.push(F);const Ke=Fe.length-Me.length;if(Array.isArray(ee)&&Ke>0){const Be=new Array(Ke).fill("");j=[...ee,...Be],j.raw=[...ee.raw,...Be]}const Ze=J(j,...Fe);if(process.env.NODE_ENV!=="production"){let Be;H&&(Be=`${H}${(0,s.default)(N||"")}`),Be===void 0&&(Be=`Styled(${(0,i.default)(Y)})`),Ze.displayName=Be}return Y.muiName&&(Ze.muiName=Y.muiName),Ze};return J.withConfig&&(me.withConfig=J.withConfig),me}}return fn}var pv=fv();const hv=lt(pv);function mv(e,t){return tt({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Et={};const gv=Yr(S0),vv=Yr(tm);var ju;function yv(){if(ju)return Et;ju=1;var e=ut();Object.defineProperty(Et,"__esModule",{value:!0}),Et.alpha=g,Et.blend=W,Et.colorChannel=void 0,Et.darken=b,Et.decomposeColor=i,Et.emphasize=C,Et.getContrastRatio=y,Et.getLuminance=h,Et.hexToRgb=o,Et.hslToRgb=f,Et.lighten=S,Et.private_safeAlpha=p,Et.private_safeColorChannel=void 0,Et.private_safeDarken=w,Et.private_safeEmphasize=_,Et.private_safeLighten=E,Et.recomposeColor=l,Et.rgbToHex=d;var t=e(gv),r=e(vv);function n(D,T=0,M=1){return process.env.NODE_ENV!=="production"&&(D<T||D>M)&&console.error(`MUI: The value provided ${D} is out of range [${T}, ${M}].`),(0,r.default)(D,T,M)}function o(D){D=D.slice(1);const T=new RegExp(`.{1,${D.length>=6?2:1}}`,"g");let M=D.match(T);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 T=D.toString(16);return T.length===1?`0${T}`:T}function i(D){if(D.type)return D;if(D.charAt(0)==="#")return i(o(D));const T=D.indexOf("("),M=D.substring(0,T);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(T+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 T=i(D);return T.values.slice(0,3).map((M,I)=>T.type.indexOf("hsl")!==-1&&I!==0?`${M}%`:M).join(" ")};Et.colorChannel=a;const c=(D,T)=>{try{return a(D)}catch{return T&&process.env.NODE_ENV!=="production"&&console.warn(T),D}};Et.private_safeColorChannel=c;function l(D){const{type:T,colorSpace:M}=D;let{values:I}=D;return T.indexOf("rgb")!==-1?I=I.map((U,G)=>G<3?parseInt(U,10):U):T.indexOf("hsl")!==-1&&(I[1]=`${I[1]}%`,I[2]=`${I[2]}%`),T.indexOf("color")!==-1?I=`${M} ${I.join(" ")}`:I=`${I.join(", ")}`,`${T}(${I})`}function d(D){if(D.indexOf("#")===0)return D;const{values:T}=i(D);return`#${T.map((M,I)=>s(I===3?Math.round(255*M):M)).join("")}`}function f(D){D=i(D);const{values:T}=D,M=T[0],I=T[1]/100,U=T[2]/100,G=I*Math.min(U,1-U),F=(H,N=(H+M/30)%12)=>U-G*Math.max(Math.min(N-3,9-N,1),-1);let Y="rgb";const se=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return D.type==="hsla"&&(Y+="a",se.push(T[3])),l({type:Y,values:se})}function h(D){D=i(D);let T=D.type==="hsl"||D.type==="hsla"?i(f(D)).values:D.values;return T=T.map(M=>(D.type!=="color"&&(M/=255),M<=.03928?M/12.92:((M+.055)/1.055)**2.4)),Number((.2126*T[0]+.7152*T[1]+.0722*T[2]).toFixed(3))}function y(D,T){const M=h(D),I=h(T);return(Math.max(M,I)+.05)/(Math.min(M,I)+.05)}function g(D,T){return D=i(D),T=n(T),(D.type==="rgb"||D.type==="hsl")&&(D.type+="a"),D.type==="color"?D.values[3]=`/${T}`:D.values[3]=T,l(D)}function p(D,T,M){try{return g(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function b(D,T){if(D=i(D),T=n(T),D.type.indexOf("hsl")!==-1)D.values[2]*=1-T;else if(D.type.indexOf("rgb")!==-1||D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]*=1-T;return l(D)}function w(D,T,M){try{return b(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function S(D,T){if(D=i(D),T=n(T),D.type.indexOf("hsl")!==-1)D.values[2]+=(100-D.values[2])*T;else if(D.type.indexOf("rgb")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(255-D.values[M])*T;else if(D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(1-D.values[M])*T;return l(D)}function E(D,T,M){try{return S(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function C(D,T=.15){return h(D)>.5?b(D,T):S(D,T)}function _(D,T,M){try{return C(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function W(D,T,M,I=1){const U=(se,H)=>Math.round((se**(1/I)*(1-M)+H**(1/I)*M)**I),G=i(D),F=i(T),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 Et}var Vs=yv();const go={black:"#000",white:"#fff"},bv={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"},xv=["mode","contrastThreshold","tonalOffset"],Ru={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}},La={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 Nu(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=Vs.lighten(e.main,o):t==="dark"&&(e.dark=Vs.darken(e.main,s)))}function _v(e="light"){return e==="dark"?{main:Nn[200],light:Nn[50],dark:Nn[400]}:{main:Nn[700],light:Nn[400],dark:Nn[800]}}function wv(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function Sv(e="light"){return e==="dark"?{main:Rn[500],light:Rn[300],dark:Rn[700]}:{main:Rn[700],light:Rn[400],dark:Rn[800]}}function Cv(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:$n[700],light:$n[500],dark:$n[900]}}function Ev(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[800],light:Ln[500],dark:Ln[900]}}function Dv(e="light"){return e==="dark"?{main:vo[400],light:vo[300],dark:vo[700]}:{main:"#ed6c02",light:vo[500],dark:vo[900]}}function kv(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=rn(e,xv),s=e.primary||_v(t),i=e.secondary||wv(t),a=e.error||Sv(t),c=e.info||Cv(t),l=e.success||Ev(t),d=e.warning||Dv(t);function f(p){const b=Vs.getContrastRatio(p,La.text.primary)>=r?La.text.primary:Ru.text.primary;if(process.env.NODE_ENV!=="production"){const w=Vs.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
+ `))}return b}const h=({color:p,name:b,mainShade:w=500,lightShade:S=300,darkShade:E=700})=>{if(p=tt({},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.
97
97
 
@@ -105,61 +105,61 @@ 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 Lu(p,"light",S,n),Lu(p,"dark",E,n),p.contrastText||(p.contrastText=f(p.main)),p},y={dark:Ba,light:$u};return process.env.NODE_ENV!=="production"&&(y[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),jr(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:Sv,contrastThreshold:r,getContrastText:f,augmentColor:h,tonalOffset:n},y[t]),o)}const Pv=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ov(e){return Math.round(e*1e5)/1e5}const zu={textTransform:"uppercase"},Bu='"Roboto", "Helvetica", "Arial", sans-serif';function jv(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Bu,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:d,pxToRem:f}=r,h=rn(r,Pv);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 y=o/14,g=f||(w=>`${w/u*y}rem`),p=(w,S,E,C,_)=>nt({fontFamily:n,fontWeight:w,fontSize:g(S),lineHeight:E},n===Bu?{letterSpacing:`${Ov(C/S)}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,zu),caption:p(i,12,1.66,.4),overline:p(i,12,2.66,1,zu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jr(nt({htmlFontSize:u,pxToRem:g,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),h,{clone:!1})}const Rv=.2,Nv=.14,$v=.12;function xt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Rv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Nv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${$v})`].join(",")}const Lv=["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)],zv=["duration","easing","delay"],Bv={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)"},Fv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Fu(e){return`${Math.round(e)}ms`}function Wv(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Hv(e){const t=nt({},Bv,e.easing),r=nt({},Fv,e.duration);return nt({getAutoHeightDuration:Wv,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,u=rn(s,zv);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:Fu(i)} ${a} ${typeof c=="string"?c:Fu(c)}`).join(",")}},e,{easing:t,duration:r})}const Uv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Vv=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=rn(e,Vv);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=Mv(n),c=ju(e);let u=jr(c,{mixins:bv(c.breakpoints,r),palette:a,shadows:Lv.slice(),typography:jv(a,s),transitions:Hv(o),zIndex:nt({},Uv)});if(u=jr(u,i),u=t.reduce((d,f)=>jr(d,f),u),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(h,y)=>{let g;for(g in h){const p=h[g];if(d.indexOf(g)!==-1&&Object.keys(p).length>0){if(process.env.NODE_ENV!=="production"){const b=_a("",g);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${g}\` 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[g]={}}}};Object.keys(u.components).forEach(h=>{const y=u.components[h].styleOverrides;y&&h.indexOf("Mui")===0&&f(y,h)})}return u.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return Ys({sx:f,theme:this})},u}const qv=Yv(),Zv="$$material";function Gv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Kv=yv({themeId:Zv,defaultTheme:qv,rootShouldForwardProp:e=>Gv(e)&&e!=="classes"});function Qv(e){return _a("MuiSvgIcon",e)}nm("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Xv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Jv=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tn(t)}`,`fontSize${tn(r)}`]};return tm(o,Qv,n)},ey=Kv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tn(r.color)}`],t[`fontSize${tn(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,u,d,f,h,y,g;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:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.active,disabled:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.disabled,inherit:void 0}[t.color]}}),Zs=K.forwardRef(function(t,r){const n=lm({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,y=rn(n,Xv),g=K.isValidElement(o)&&o.type==="svg",p=nt({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g}),b={};d||(b.viewBox=h);const w=Jv(p);return l.jsxs(ey,nt({as:a,className:qt(w.root,s),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,y,g&&o.props,{ownerState:p,children:[g?o.props.children:o,f?l.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Zs.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}),Zs.muiName="SvgIcon";function ty(e,t){function r(n,o){return l.jsx(Zs,nt({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Zs.muiName,K.memo(K.forwardRef(r))}const ry=Yr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:tn,createChainedFunction:R0,createSvgIcon:ty,debounce:N0,deprecatedPropType:$0,isMuiElement:L0,ownerDocument:Ll,ownerWindow:z0,requirePropFactory:B0,setRef:zl,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:Bl,unstable_useId:W0,unsupportedProp:H0,useControlled:U0,useEventCallback:V0,useForkRef:Y0,useIsFocusVisible:em},Symbol.toStringTag,{value:"Module"})));var Wu;function ht(){return Wu||(Wu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ry})(la)),la}var Hu;function ny(){if(Hu)return no;Hu=1;var e=rt();Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t=e(ht()),r=lt();return no.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),no}var oy=ny();const sy=tt(oy);var yo={},Uu;function iy(){if(Uu)return yo;Uu=1;var e=rt();Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=void 0;var t=e(ht()),r=lt();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 ay=iy();const cy=tt(ay);var bo={},Vu;function ly(){if(Vu)return bo;Vu=1;var e=rt();Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=void 0;var t=e(ht()),r=lt();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 uy=ly();const dy=tt(uy),fy=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=v.useState(!1),[s,i]=v.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return l.jsxs("div",{className:`${Er.dashboardContainer} ${s?Er.sidebarCollapsed:""}`,children:[l.jsxs("header",{className:Er.header,children:[l.jsx(m.IconButton,{onClick:a,className:Er.menuButton,children:l.jsx(sy,{})}),l.jsx("div",{className:Er.headerContent,children:e})]}),l.jsxs("aside",{className:`${Er.sidebar} ${n?Er.sidebarOpen:""}`,children:[l.jsx("div",{className:Er.sidebarContent,children:t}),l.jsx(m.IconButton,{onClick:c,className:Er.collapseButton,style:{display:"none"},children:s?l.jsx(dy,{}):l.jsx(cy,{})})]}),l.jsx("main",{className:Er.mainContent,children:r}),n&&l.jsx("div",{className:Er.overlay,onClick:a})]})},pn={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 Gs(){return typeof window<"u"}function zn(e){return Yu(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(Yu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yu(e){return Gs()?e instanceof Node||e instanceof ur(e).Node:!1}function Qt(e){return Gs()?e instanceof Element||e instanceof ur(e).Element:!1}function zr(e){return Gs()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function qu(e){return!Gs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const py=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)&&!py.has(o)}const hy=new Set(["table","td","th"]);function my(e){return hy.has(zn(e))}const gy=[":popover-open",":modal"];function Ks(e){return gy.some(t=>{try{return e.matches(t)}catch{return!1}})}const vy=["transform","translate","scale","rotate","perspective"],yy=["transform","translate","scale","rotate","perspective","filter"],by=["paint","layout","strict","content"];function Fa(e){const t=Wa(),r=Qt(e)?vr(e):e;return vy.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)||yy.some(n=>(r.willChange||"").includes(n))||by.some(n=>(r.contain||"").includes(n))}function xy(e){let t=on(e);for(;zr(t)&&!Bn(t);){if(Fa(t))return t;if(Ks(t))return null;t=on(t)}return null}function Wa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _y=new Set(["html","body","#document"]);function Bn(e){return _y.has(zn(e))}function vr(e){return ur(e).getComputedStyle(e)}function Qs(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function on(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qu(e)&&e.host||Lr(e);return qu(t)?t.host:t}function Zu(e){const t=on(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:zr(t)&&xo(t)?t:Zu(t)}function _o(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Zu(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,hn=Math.max,Xs=Math.round,Js=Math.floor,Br=e=>({x:e,y:e}),wy={left:"right",right:"left",bottom:"top",top:"bottom"},Sy={start:"end",end:"start"};function Cy(e,t,r){return hn(e,Fn(t,r))}function ei(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Ey(e){return e==="x"?"y":"x"}function Ua(e){return e==="y"?"height":"width"}const Dy=new Set(["top","bottom"]);function mn(e){return Dy.has(Wn(e))?"y":"x"}function Va(e){return Ey(mn(e))}function ky(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=Va(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=ti(i)),[i,ti(i)]}function Ay(e){const t=ti(e);return[Ya(e),t,Ya(t)]}function Ya(e){return e.replace(/start|end/g,t=>Sy[t])}const Gu=["left","right"],Ku=["right","left"],Ty=["top","bottom"],Iy=["bottom","top"];function My(e,t,r){switch(e){case"top":case"bottom":return r?t?Ku:Gu:t?Gu:Ku;case"left":case"right":return t?Ty:Iy;default:return[]}}function Py(e,t,r,n){const o=wo(e);let s=My(Wn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ya)))),s}function ti(e){return e.replace(/left|right|bottom|top/g,t=>wy[t])}function Oy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qu(e){return typeof e!="number"?Oy(e):{top:e,right:e,bottom:e,left:e}}function ri(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 jy=typeof document<"u",Ry=function(){},ni=jy?v.useLayoutEffect:Ry;const Ny={...K}.useInsertionEffect||(e=>e());function $y(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ny(()=>{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 Xu(e,t,r){let{reference:n,floating:o}=e;const s=mn(t),i=Va(t),a=Ua(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 y;switch(c){case"top":y={x:d,y:n.y-o.height};break;case"bottom":y={x:d,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:f};break;case"left":y={x:n.x-o.width,y:f};break;default:y={x:n.x,y:n.y}}switch(wo(t)){case"start":y[i]-=h*(r&&u?-1:1);break;case"end":y[i]+=h*(r&&u?-1:1);break}return y}const Ly=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}=Xu(u,n,c),h=n,y={},g=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:S,y:E,data:C,reset:_}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:y,rects:u,platform:i,elements:{reference:e,floating:t}});d=S??d,f=E??f,y={...y,[b]:{...y[b],...C}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Xu(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:y}};async function zy(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:y=0}=ei(t,e),g=Qu(y),b=a[h?f==="floating"?"reference":"floating":f],w=ri(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})),S=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)),C=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},_=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:E,strategy:c}):S);return{top:(w.top-_.top+g.top)/C.y,bottom:(_.bottom-w.bottom+g.bottom)/C.y,left:(w.left-_.left+g.left)/C.x,right:(_.right-w.right+g.right)/C.x}}const By=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}=ei(e,t)||{};if(u==null)return{};const f=Qu(d),h={x:r,y:n},y=Va(o),g=Ua(y),p=await i.getDimensions(u),b=y==="y",w=b?"top":"left",S=b?"bottom":"right",E=b?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[y]-h[y]-s.floating[g],_=h[y]-s.reference[y],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[g]);const T=C/2-_/2,M=D/2-p[g]/2-1,I=Fn(f[w],M),H=Fn(f[S],M),G=I,F=D-p[g]-H,Y=D/2-p[g]/2+T,se=Cy(G,Y,F),U=!c.arrow&&wo(o)!=null&&Y!==se&&s.reference[g]/2-(Y<G?I:H)-p[g]/2<0,N=U?Y<G?Y-G:Y-F:0;return{[y]:h[y]+N,data:{[y]:se,centerOffset:Y-se-N,...U&&{alignmentOffset:N}},reset:U}}}),Fy=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:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=ei(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Wn(o),S=mn(a),E=Wn(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(E||!p?[ti(a)]:Ay(a)),W=g!=="none";!h&&W&&_.push(...Py(a,p,g,C));const D=[a,..._],T=await zy(t,b),M=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(T[w]),f){const Y=ky(o,i,C);M.push(T[Y[0]],T[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,se=D[Y];if(se&&(!(f==="alignment"?S!==mn(se):!1)||I.every(le=>mn(le.placement)===S?le.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:se}};let U=(G=I.filter(N=>N.overflows[0]<=0).sort((N,le)=>N.overflows[1]-le.overflows[1])[0])==null?void 0:G.placement;if(!U)switch(y){case"bestFit":{var F;const N=(F=I.filter(le=>{if(W){const de=mn(le.placement);return de===S||de==="y"}return!0}).map(le=>[le.placement,le.overflows.filter(de=>de>0).reduce((de,$)=>de+$,0)]).sort((le,de)=>le[1]-de[1])[0])==null?void 0:F[0];N&&(U=N);break}case"initialPlacement":U=a;break}if(o!==U)return{reset:{placement:U}}}return{}}}},Wy=new Set(["left","top"]);async function Hy(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=mn(r)==="y",u=Wy.has(i)?-1:1,d=s&&c?-1:1,f=ei(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),c?{x:y*d,y:h*u}:{x:h*u,y:y*d}}const Uy=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 Hy(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 Ju(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=zr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Xs(r)!==s||Xs(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function qa(e){return Qt(e)?e:e.contextElement}function Hn(e){const t=qa(e);if(!zr(t))return Br(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Ju(t);let i=(s?Xs(r.width):r.width)/n,a=(s?Xs(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Vy=Br(0);function ed(e){const t=ur(e);return!Wa()||!t.visualViewport?Vy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function gn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=qa(e);let i=Br(1);t&&(n?Qt(n)&&(i=Hn(n)):i=Hn(e));const a=Yy(s,r,n)?ed(s):Br(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),y=n&&Qt(n)?ur(n):n;let g=h,p=Ha(g);for(;p&&n&&y!==g;){const b=Hn(p),w=p.getBoundingClientRect(),S=vr(p),E=w.left+(p.clientLeft+parseFloat(S.paddingLeft))*b.x,C=w.top+(p.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=E,u+=C,g=ur(p),p=Ha(g)}}return ri({width:d,height:f,x:c,y:u})}function oi(e,t){const r=Qs(e).scrollLeft;return t?t.left+r:gn(Lr(e)).left+r}function td(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-oi(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function qy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Lr(n),a=t?Ks(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Br(1);const d=Br(0),f=zr(n);if((f||!f&&!s)&&((zn(n)!=="body"||xo(i))&&(c=Qs(n)),zr(n))){const y=gn(n);u=Hn(n),d.x=y.x+n.clientLeft,d.y=y.y+n.clientTop}const h=i&&!f&&!s?td(i,c):Br(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 Zy(e){return Array.from(e.getClientRects())}function Gy(e){const t=Lr(e),r=Qs(e),n=e.ownerDocument.body,o=hn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=hn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+oi(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(i+=hn(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const rd=25;function Ky(e,t){const r=ur(e),n=Lr(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=Wa();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=oi(n);if(u<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),y=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-y);g<=rd&&(s-=g)}else u<=rd&&(s+=u);return{width:s,height:i,x:a,y:c}}const Qy=new Set(["absolute","fixed"]);function Xy(e,t){const r=gn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=zr(e)?Hn(e):Br(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 nd(e,t,r){let n;if(t==="viewport")n=Ky(e,r);else if(t==="document")n=Gy(Lr(e));else if(Qt(t))n=Xy(t,r);else{const o=ed(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ri(n)}function od(e,t){const r=on(e);return r===t||!Qt(r)||Bn(r)?!1:vr(r).position==="fixed"||od(r,t)}function Jy(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?on(e):e;for(;Qt(i)&&!Bn(i);){const a=vr(i),c=Fa(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Qy.has(o.position)||xo(i)&&!c&&od(e,i))?n=n.filter(d=>d!==i):o=a,i=on(i)}return t.set(e,n),n}function eb(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Ks(t)?[]:Jy(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,d)=>{const f=nd(t,d,o);return u.top=hn(f.top,u.top),u.right=Fn(f.right,u.right),u.bottom=Fn(f.bottom,u.bottom),u.left=hn(f.left,u.left),u},nd(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function tb(e){const{width:t,height:r}=Ju(e);return{width:t,height:r}}function rb(e,t,r){const n=zr(t),o=Lr(t),s=r==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Br(0);function u(){c.x=oi(o)}if(n||!n&&!s)if((zn(t)!=="body"||xo(o))&&(a=Qs(t)),n){const y=gn(t,!0,s,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else o&&u();s&&!n&&o&&u();const d=o&&!n&&!s?td(o,a):Br(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 Za(e){return vr(e).position==="static"}function sd(e,t){if(!zr(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Lr(e)===r&&(r=r.ownerDocument.body),r}function id(e,t){const r=ur(e);if(Ks(e))return r;if(!zr(e)){let o=on(e);for(;o&&!Bn(o);){if(Qt(o)&&!Za(o))return o;o=on(o)}return r}let n=sd(e,t);for(;n&&my(n)&&Za(n);)n=sd(n,t);return n&&Bn(n)&&Za(n)&&!Fa(n)?r:n||xy(e)||r}const nb=async function(e){const t=this.getOffsetParent||id,r=this.getDimensions,n=await r(e.floating);return{reference:rb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ob(e){return vr(e).direction==="rtl"}const sb={convertOffsetParentRelativeRectToViewportRelativeRect:qy,getDocumentElement:Lr,getClippingRect:eb,getOffsetParent:id,getElementRects:nb,getClientRects:Zy,getDimensions:tb,getScale:Hn,isElement:Qt,isRTL:ob};function ad(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ib(e,t){let r=null,n;const o=Lr(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:y}=u;if(a||t(),!h||!y)return;const g=Js(f),p=Js(o.clientWidth-(d+h)),b=Js(o.clientHeight-(f+y)),w=Js(d),E={rootMargin:-g+"px "+-p+"px "+-b+"px "+-w+"px",threshold:hn(0,Fn(1,c))||1};let C=!0;function _(W){const D=W[0].intersectionRatio;if(D!==c){if(!C)return i();D?i(!1,D):n=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!ad(u,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return i(!0),s}function ab(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=qa(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?ib(u,r):null;let h=-1,y=null;i&&(y=new ResizeObserver(w=>{let[S]=w;S&&S.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),r()}),u&&!c&&y.observe(u),y.observe(t));let g,p=c?gn(e):null;c&&b();function b(){const w=gn(e);p&&!ad(p,w)&&r(),p=w,g=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(S=>{o&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),f?.(),(w=y)==null||w.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const cb=Uy,lb=Fy,cd=By,ub=(e,t,r)=>{const n=new Map,o={platform:sb,...r},s={...o.platform,_c:n};return Ly(e,t,{...o,platform:s})};var db=typeof document<"u",fb=function(){},si=db?v.useLayoutEffect:fb;function ii(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(!ii(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)&&!ii(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ld(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ud(e,t){const r=ld(e);return Math.round(t*r)/r}function Ga(e){const t=K.useRef(e);return si(()=>{t.current=e}),t}function pb(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,y]=K.useState(n);ii(h,n)||y(n);const[g,p]=K.useState(null),[b,w]=K.useState(null),S=K.useCallback(le=>{le!==W.current&&(W.current=le,p(le))},[]),E=K.useCallback(le=>{le!==D.current&&(D.current=le,w(le))},[]),C=s||g,_=i||b,W=K.useRef(null),D=K.useRef(null),T=K.useRef(d),M=c!=null,I=Ga(c),H=Ga(o),G=Ga(u),F=K.useCallback(()=>{if(!W.current||!D.current)return;const le={placement:t,strategy:r,middleware:h};H.current&&(le.platform=H.current),ub(W.current,D.current,le).then(de=>{const $={...de,isPositioned:G.current!==!1};Y.current&&!ii(T.current,$)&&(T.current=$,m0.flushSync(()=>{f($)}))})},[h,t,r,H,G]);si(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(le=>({...le,isPositioned:!1})))},[u]);const Y=K.useRef(!1);si(()=>(Y.current=!0,()=>{Y.current=!1}),[]),si(()=>{if(C&&(W.current=C),_&&(D.current=_),C&&_){if(I.current)return I.current(C,_,F);F()}},[C,_,F,I,M]);const se=K.useMemo(()=>({reference:W,floating:D,setReference:S,setFloating:E}),[S,E]),U=K.useMemo(()=>({reference:C,floating:_}),[C,_]),N=K.useMemo(()=>{const le={position:r,left:0,top:0};if(!U.floating)return le;const de=ud(U.floating,d.x),$=ud(U.floating,d.y);return a?{...le,transform:"translate("+de+"px, "+$+"px)",...ld(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:de,top:$}},[r,a,U.floating,d.x,d.y]);return K.useMemo(()=>({...d,update:F,refs:se,elements:U,floatingStyles:N}),[d,F,se,U,N])}const hb=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?cd({element:n.current,padding:o}).fn(r):{}:n?cd({element:n,padding:o}).fn(r):{}}}},mb=(e,t)=>({...cb(e),options:[e,t]}),gb=(e,t)=>({...lb(e),options:[e,t]}),vb=(e,t)=>({...hb(e),options:[e,t]}),yb={...K};let dd=!1,bb=0;const fd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bb++;function xb(){const[e,t]=K.useState(()=>dd?fd():void 0);return ni(()=>{e==null&&t(fd())},[]),K.useEffect(()=>{dd=!0},[]),e}const pd=yb.useId||xb;let So;process.env.NODE_ENV!=="production"&&(So=new Set);function _b(){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 wb(){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 Sb=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:y,style:{transform:g,...p}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||_b("The `ref` prop is required for `FloatingArrow`."));const w=pd(),[S,E]=K.useState(!1);if(ni(()=>{if(!o)return;vr(o).direction==="rtl"&&E(!0)},[o]),!o)return null;const[C,_]=n.split("-"),W=C==="top"||C==="bottom";let D=f;(W&&i!=null&&i.x||!W&&i!=null&&i.y)&&(D=null);const T=d*2,M=T/2,I=a/2*(u/-8+1),H=c/2*u/4,G=!!y,F=D&&_==="end"?"bottom":"top";let Y=D&&_==="end"?"right":"left";D&&S&&(Y=_==="end"?"left":"right");const se=s?.x!=null?D||s.x:"",U=s?.y!=null?D||s.y:"",N=y||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(c-H))+(" Q"+a/2+","+c+" "+I+","+(c-H))+" Z",le={top:G?"rotate(180deg)":"",left:G?"rotate(90deg)":"rotate(-90deg)",bottom:G?"":"rotate(180deg)",right:G?"rotate(-90deg)":"rotate(90deg)"}[C];return l.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:G?a:a+T,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Y]:se,[F]:U,[C]:W||G?"100%":"calc(100% - "+T/2+"px)",transform:[le,g].filter(de=>!!de).join(" "),...p},children:[T>0&&l.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:h,strokeWidth:T+(y?0:1),d:N}),l.jsx("path",{stroke:T&&!y?b.fill:"none",d:N}),l.jsx("clipPath",{id:w,children:l.jsx("rect",{x:-M,y:M*(G?-1:1),width:a+T,height:a})})]})});function Cb(){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 Eb=K.createContext(null),Db=K.createContext(null),kb=()=>{var e;return((e=K.useContext(Eb))==null?void 0:e.id)||null},Ab=()=>K.useContext(Db);function Tb(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=pd(),s=K.useRef({}),[i]=K.useState(()=>Cb()),a=kb()!=null;if(process.env.NODE_ENV!=="production"){const y=n.reference;y&&!Qt(y)&&wb("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=$y((y,g,p)=>{s.current.openEvent=y?g:void 0,i.emit("openchange",{open:y,event:g,reason:p,nested:a}),r?.(y,g,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 Ib(e){e===void 0&&(e={});const{nodeId:t}=e,r=Tb({...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=Ab();ni(()=>{d&&(f.current=d)},[d]);const y=pb({...e,elements:{...o,...a&&{reference:a}}}),g=K.useCallback(E=>{const C=Qt(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;c(C),y.refs.setReference(C)},[y.refs]),p=K.useCallback(E=>{(Qt(E)||E===null)&&(f.current=E,i(E)),(Qt(y.refs.reference.current)||y.refs.reference.current===null||E!==null&&!Qt(E))&&y.refs.setReference(E)},[y.refs]),b=K.useMemo(()=>({...y.refs,setReference:p,setPositionReference:g,domReference:f}),[y.refs,p,g]),w=K.useMemo(()=>({...y.elements,domReference:d}),[y.elements,d]),S=K.useMemo(()=>({...y,...n,refs:b,elements:w,nodeId:t}),[y,b,w,t,n]);return ni(()=>{n.dataRef.current.floatingContext=S;const E=h?.nodesRef.current.find(C=>C.id===t);E&&(E.context=S)}),K.useMemo(()=>({...y,context:S,refs:b,elements:w}),[y,b,w,S])}/*!
108
+ } });`:oo(12,b?` (${b})`:"",JSON.stringify(p.main)));return Nu(p,"light",S,n),Nu(p,"dark",E,n),p.contrastText||(p.contrastText=f(p.main)),p},y={dark:La,light:Ru};return process.env.NODE_ENV!=="production"&&(y[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),jr(tt({common:tt({},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:bv,contrastThreshold:r,getContrastText:f,augmentColor:h,tonalOffset:n},y[t]),o)}const Av=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Tv(e){return Math.round(e*1e5)/1e5}const $u={textTransform:"uppercase"},Lu='"Roboto", "Helvetica", "Arial", sans-serif';function Iv(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Lu,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:l=16,allVariants:d,pxToRem:f}=r,h=rn(r,Av);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 y=o/14,g=f||(w=>`${w/l*y}rem`),p=(w,S,E,C,_)=>tt({fontFamily:n,fontWeight:w,fontSize:g(S),lineHeight:E},n===Lu?{letterSpacing:`${Tv(C/S)}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,$u),caption:p(i,12,1.66,.4),overline:p(i,12,2.66,1,$u),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jr(tt({htmlFontSize:l,pxToRem:g,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),h,{clone:!1})}const Mv=.2,Pv=.14,Ov=.12;function xt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Mv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Pv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ov})`].join(",")}const jv=["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)],Rv=["duration","easing","delay"],Nv={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)"},$v={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function zu(e){return`${Math.round(e)}ms`}function Lv(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function zv(e){const t=tt({},Nv,e.easing),r=tt({},$v,e.duration);return tt({getAutoHeightDuration:Lv,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,l=rn(s,Rv);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:zu(i)} ${a} ${typeof c=="string"?c:zu(c)}`).join(",")}},e,{easing:t,duration:r})}const Bv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Fv=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Wv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=rn(e,Fv);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=kv(n),c=Pu(e);let l=jr(c,{mixins:mv(c.breakpoints,r),palette:a,shadows:jv.slice(),typography:Iv(a,s),transitions:zv(o),zIndex:tt({},Bv)});if(l=jr(l,i),l=t.reduce((d,f)=>jr(d,f),l),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(h,y)=>{let g;for(g in h){const p=h[g];if(d.indexOf(g)!==-1&&Object.keys(p).length>0){if(process.env.NODE_ENV!=="production"){const b=ba("",g);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${g}\` 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[g]={}}}};Object.keys(l.components).forEach(h=>{const y=l.components[h].styleOverrides;y&&h.indexOf("Mui")===0&&f(y,h)})}return l.unstable_sxConfig=tt({},mo,i?.unstable_sxConfig),l.unstable_sx=function(f){return Hs({sx:f,theme:this})},l}const Uv=Wv(),Hv="$$material";function Vv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Yv=hv({themeId:Hv,defaultTheme:Uv,rootShouldForwardProp:e=>Vv(e)&&e!=="classes"});function qv(e){return ba("MuiSvgIcon",e)}J0("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Zv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Gv=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tn(t)}`,`fontSize${tn(r)}`]};return Q0(o,qv,n)},Kv=Yv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tn(r.color)}`],t[`fontSize${tn(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,l,d,f,h,y,g;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:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.active,disabled:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.disabled,inherit:void 0}[t.color]}}),Ys=K.forwardRef(function(t,r){const n=sm({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,y=rn(n,Zv),g=K.isValidElement(o)&&o.type==="svg",p=tt({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g}),b={};d||(b.viewBox=h);const w=Gv(p);return u.jsxs(Kv,tt({as:a,className:qt(w.root,s),focusable:"false",color:l,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,y,g&&o.props,{ownerState:p,children:[g?o.props.children:o,f?u.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Ys.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}),Ys.muiName="SvgIcon";function Qv(e,t){function r(n,o){return u.jsx(Ys,tt({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Ys.muiName,K.memo(K.forwardRef(r))}const Xv=Yr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:tn,createChainedFunction:M0,createSvgIcon:Qv,debounce:P0,deprecatedPropType:O0,isMuiElement:j0,ownerDocument:Nl,ownerWindow:R0,requirePropFactory:N0,setRef:$l,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
+ `)),Wl.configure(e)}},unstable_useEnhancedEffect:Ll,unstable_useId:L0,unsupportedProp:z0,useControlled:B0,useEventCallback:F0,useForkRef:W0,useIsFocusVisible:K0},Symbol.toStringTag,{value:"Module"})));var Bu;function gt(){return Bu||(Bu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Xv})(aa)),aa}var Fu;function Jv(){if(Fu)return no;Fu=1;var e=ut();Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t=e(gt()),r=pt();return no.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),no}var ey=Jv();const ty=lt(ey);var yo={},Wu;function ry(){if(Wu)return yo;Wu=1;var e=ut();Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=void 0;var t=e(gt()),r=pt();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 ny=ry();const oy=lt(ny);var bo={},Uu;function sy(){if(Uu)return bo;Uu=1;var e=ut();Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=void 0;var t=e(gt()),r=pt();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 iy=sy();const ay=lt(iy),cy=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=v.useState(!1),[s,i]=v.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return u.jsxs("div",{className:`${Er.dashboardContainer} ${s?Er.sidebarCollapsed:""}`,children:[u.jsxs("header",{className:Er.header,children:[u.jsx(m.IconButton,{onClick:a,className:Er.menuButton,children:u.jsx(ty,{})}),u.jsx("div",{className:Er.headerContent,children:e})]}),u.jsxs("aside",{className:`${Er.sidebar} ${n?Er.sidebarOpen:""}`,children:[u.jsx("div",{className:Er.sidebarContent,children:t}),u.jsx(m.IconButton,{onClick:c,className:Er.collapseButton,style:{display:"none"},children:s?u.jsx(ay,{}):u.jsx(oy,{})})]}),u.jsx("main",{className:Er.mainContent,children:r}),n&&u.jsx("div",{className:Er.overlay,onClick:a})]})},pn={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 qs(){return typeof window<"u"}function zn(e){return Hu(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(Hu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hu(e){return qs()?e instanceof Node||e instanceof ur(e).Node:!1}function Qt(e){return qs()?e instanceof Element||e instanceof ur(e).Element:!1}function zr(e){return qs()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function Vu(e){return!qs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const ly=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)&&!ly.has(o)}const uy=new Set(["table","td","th"]);function dy(e){return uy.has(zn(e))}const fy=[":popover-open",":modal"];function Zs(e){return fy.some(t=>{try{return e.matches(t)}catch{return!1}})}const py=["transform","translate","scale","rotate","perspective"],hy=["transform","translate","scale","rotate","perspective","filter"],my=["paint","layout","strict","content"];function za(e){const t=Ba(),r=Qt(e)?vr(e):e;return py.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)||hy.some(n=>(r.willChange||"").includes(n))||my.some(n=>(r.contain||"").includes(n))}function gy(e){let t=on(e);for(;zr(t)&&!Bn(t);){if(za(t))return t;if(Zs(t))return null;t=on(t)}return null}function Ba(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vy=new Set(["html","body","#document"]);function Bn(e){return vy.has(zn(e))}function vr(e){return ur(e).getComputedStyle(e)}function Gs(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function on(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vu(e)&&e.host||Lr(e);return Vu(t)?t.host:t}function Yu(e){const t=on(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:zr(t)&&xo(t)?t:Yu(t)}function _o(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Yu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=ur(o);if(s){const a=Fa(i);return t.concat(i,i.visualViewport||[],xo(o)?o:[],a&&r?_o(a):[])}return t.concat(o,_o(o,[],r))}function Fa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Fn=Math.min,hn=Math.max,Ks=Math.round,Qs=Math.floor,Br=e=>({x:e,y:e}),yy={left:"right",right:"left",bottom:"top",top:"bottom"},by={start:"end",end:"start"};function xy(e,t,r){return hn(e,Fn(t,r))}function Xs(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function _y(e){return e==="x"?"y":"x"}function Wa(e){return e==="y"?"height":"width"}const wy=new Set(["top","bottom"]);function mn(e){return wy.has(Wn(e))?"y":"x"}function Ua(e){return _y(mn(e))}function Sy(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=Ua(e),s=Wa(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Js(i)),[i,Js(i)]}function Cy(e){const t=Js(e);return[Ha(e),t,Ha(t)]}function Ha(e){return e.replace(/start|end/g,t=>by[t])}const qu=["left","right"],Zu=["right","left"],Ey=["top","bottom"],Dy=["bottom","top"];function ky(e,t,r){switch(e){case"top":case"bottom":return r?t?Zu:qu:t?qu:Zu;case"left":case"right":return t?Ey:Dy;default:return[]}}function Ay(e,t,r,n){const o=wo(e);let s=ky(Wn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ha)))),s}function Js(e){return e.replace(/left|right|bottom|top/g,t=>yy[t])}function Ty(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gu(e){return typeof e!="number"?Ty(e):{top:e,right:e,bottom:e,left:e}}function ei(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 Iy=typeof document<"u",My=function(){},ti=Iy?v.useLayoutEffect:My;const Py={...K}.useInsertionEffect||(e=>e());function Oy(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Py(()=>{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 Ku(e,t,r){let{reference:n,floating:o}=e;const s=mn(t),i=Ua(t),a=Wa(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 y;switch(c){case"top":y={x:d,y:n.y-o.height};break;case"bottom":y={x:d,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:f};break;case"left":y={x:n.x-o.width,y:f};break;default:y={x:n.x,y:n.y}}switch(wo(t)){case"start":y[i]-=h*(r&&l?-1:1);break;case"end":y[i]+=h*(r&&l?-1:1);break}return y}const jy=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}=Ku(l,n,c),h=n,y={},g=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:S,y:E,data:C,reset:_}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:y,rects:l,platform:i,elements:{reference:e,floating:t}});d=S??d,f=E??f,y={...y,[b]:{...y[b],...C}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(l=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Ku(l,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:y}};async function Ry(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:y=0}=Xs(t,e),g=Gu(y),b=a[h?f==="floating"?"reference":"floating":f],w=ei(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})),S=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)),C=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},_=ei(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:E,strategy:c}):S);return{top:(w.top-_.top+g.top)/C.y,bottom:(_.bottom-w.bottom+g.bottom)/C.y,left:(w.left-_.left+g.left)/C.x,right:(_.right-w.right+g.right)/C.x}}const Ny=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}=Xs(e,t)||{};if(l==null)return{};const f=Gu(d),h={x:r,y:n},y=Ua(o),g=Wa(y),p=await i.getDimensions(l),b=y==="y",w=b?"top":"left",S=b?"bottom":"right",E=b?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[y]-h[y]-s.floating[g],_=h[y]-s.reference[y],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[g]);const T=C/2-_/2,M=D/2-p[g]/2-1,I=Fn(f[w],M),U=Fn(f[S],M),G=I,F=D-p[g]-U,Y=D/2-p[g]/2+T,se=xy(G,Y,F),H=!c.arrow&&wo(o)!=null&&Y!==se&&s.reference[g]/2-(Y<G?I:U)-p[g]/2<0,N=H?Y<G?Y-G:Y-F:0;return{[y]:h[y]+N,data:{[y]:se,centerOffset:Y-se-N,...H&&{alignmentOffset:N}},reset:H}}}),$y=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:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=Xs(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Wn(o),S=mn(a),E=Wn(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),_=h||(E||!p?[Js(a)]:Cy(a)),W=g!=="none";!h&&W&&_.push(...Ay(a,p,g,C));const D=[a,..._],T=await Ry(t,b),M=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(T[w]),f){const Y=Sy(o,i,C);M.push(T[Y[0]],T[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,se=D[Y];if(se&&(!(f==="alignment"?S!==mn(se):!1)||I.every(le=>mn(le.placement)===S?le.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:se}};let H=(G=I.filter(N=>N.overflows[0]<=0).sort((N,le)=>N.overflows[1]-le.overflows[1])[0])==null?void 0:G.placement;if(!H)switch(y){case"bestFit":{var F;const N=(F=I.filter(le=>{if(W){const de=mn(le.placement);return de===S||de==="y"}return!0}).map(le=>[le.placement,le.overflows.filter(de=>de>0).reduce((de,$)=>de+$,0)]).sort((le,de)=>le[1]-de[1])[0])==null?void 0:F[0];N&&(H=N);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}},Ly=new Set(["left","top"]);async function zy(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=mn(r)==="y",l=Ly.has(i)?-1:1,d=s&&c?-1:1,f=Xs(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),c?{x:y*d,y:h*l}:{x:h*l,y:y*d}}const By=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 zy(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 Qu(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=zr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Ks(r)!==s||Ks(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Va(e){return Qt(e)?e:e.contextElement}function Un(e){const t=Va(e);if(!zr(t))return Br(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Qu(t);let i=(s?Ks(r.width):r.width)/n,a=(s?Ks(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Fy=Br(0);function Xu(e){const t=ur(e);return!Ba()||!t.visualViewport?Fy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function gn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Va(e);let i=Br(1);t&&(n?Qt(n)&&(i=Un(n)):i=Un(e));const a=Wy(s,r,n)?Xu(s):Br(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),y=n&&Qt(n)?ur(n):n;let g=h,p=Fa(g);for(;p&&n&&y!==g;){const b=Un(p),w=p.getBoundingClientRect(),S=vr(p),E=w.left+(p.clientLeft+parseFloat(S.paddingLeft))*b.x,C=w.top+(p.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,l*=b.y,d*=b.x,f*=b.y,c+=E,l+=C,g=ur(p),p=Fa(g)}}return ei({width:d,height:f,x:c,y:l})}function ri(e,t){const r=Gs(e).scrollLeft;return t?t.left+r:gn(Lr(e)).left+r}function Ju(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-ri(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Uy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Lr(n),a=t?Zs(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=Br(1);const d=Br(0),f=zr(n);if((f||!f&&!s)&&((zn(n)!=="body"||xo(i))&&(c=Gs(n)),zr(n))){const y=gn(n);l=Un(n),d.x=y.x+n.clientLeft,d.y=y.y+n.clientTop}const h=i&&!f&&!s?Ju(i,c):Br(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 Hy(e){return Array.from(e.getClientRects())}function Vy(e){const t=Lr(e),r=Gs(e),n=e.ownerDocument.body,o=hn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=hn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+ri(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(i+=hn(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const ed=25;function Yy(e,t){const r=ur(e),n=Lr(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=Ba();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=ri(n);if(l<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),y=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-y);g<=ed&&(s-=g)}else l<=ed&&(s+=l);return{width:s,height:i,x:a,y:c}}const qy=new Set(["absolute","fixed"]);function Zy(e,t){const r=gn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=zr(e)?Un(e):Br(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 td(e,t,r){let n;if(t==="viewport")n=Yy(e,r);else if(t==="document")n=Vy(Lr(e));else if(Qt(t))n=Zy(t,r);else{const o=Xu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ei(n)}function rd(e,t){const r=on(e);return r===t||!Qt(r)||Bn(r)?!1:vr(r).position==="fixed"||rd(r,t)}function Gy(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?on(e):e;for(;Qt(i)&&!Bn(i);){const a=vr(i),c=za(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&qy.has(o.position)||xo(i)&&!c&&rd(e,i))?n=n.filter(d=>d!==i):o=a,i=on(i)}return t.set(e,n),n}function Ky(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Zs(t)?[]:Gy(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((l,d)=>{const f=td(t,d,o);return l.top=hn(f.top,l.top),l.right=Fn(f.right,l.right),l.bottom=Fn(f.bottom,l.bottom),l.left=hn(f.left,l.left),l},td(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Qy(e){const{width:t,height:r}=Qu(e);return{width:t,height:r}}function Xy(e,t,r){const n=zr(t),o=Lr(t),s=r==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Br(0);function l(){c.x=ri(o)}if(n||!n&&!s)if((zn(t)!=="body"||xo(o))&&(a=Gs(t)),n){const y=gn(t,!0,s,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else o&&l();s&&!n&&o&&l();const d=o&&!n&&!s?Ju(o,a):Br(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 Ya(e){return vr(e).position==="static"}function nd(e,t){if(!zr(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Lr(e)===r&&(r=r.ownerDocument.body),r}function od(e,t){const r=ur(e);if(Zs(e))return r;if(!zr(e)){let o=on(e);for(;o&&!Bn(o);){if(Qt(o)&&!Ya(o))return o;o=on(o)}return r}let n=nd(e,t);for(;n&&dy(n)&&Ya(n);)n=nd(n,t);return n&&Bn(n)&&Ya(n)&&!za(n)?r:n||gy(e)||r}const Jy=async function(e){const t=this.getOffsetParent||od,r=this.getDimensions,n=await r(e.floating);return{reference:Xy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function eb(e){return vr(e).direction==="rtl"}const tb={convertOffsetParentRelativeRectToViewportRelativeRect:Uy,getDocumentElement:Lr,getClippingRect:Ky,getOffsetParent:od,getElementRects:Jy,getClientRects:Hy,getDimensions:Qy,getScale:Un,isElement:Qt,isRTL:eb};function sd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rb(e,t){let r=null,n;const o=Lr(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:y}=l;if(a||t(),!h||!y)return;const g=Qs(f),p=Qs(o.clientWidth-(d+h)),b=Qs(o.clientHeight-(f+y)),w=Qs(d),E={rootMargin:-g+"px "+-p+"px "+-b+"px "+-w+"px",threshold:hn(0,Fn(1,c))||1};let C=!0;function _(W){const D=W[0].intersectionRatio;if(D!==c){if(!C)return i();D?i(!1,D):n=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!sd(l,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return i(!0),s}function nb(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=Va(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?rb(l,r):null;let h=-1,y=null;i&&(y=new ResizeObserver(w=>{let[S]=w;S&&S.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),r()}),l&&!c&&y.observe(l),y.observe(t));let g,p=c?gn(e):null;c&&b();function b(){const w=gn(e);p&&!sd(p,w)&&r(),p=w,g=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(S=>{o&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),f?.(),(w=y)==null||w.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const ob=By,sb=$y,id=Ny,ib=(e,t,r)=>{const n=new Map,o={platform:tb,...r},s={...o.platform,_c:n};return jy(e,t,{...o,platform:s})};var ab=typeof document<"u",cb=function(){},ni=ab?v.useLayoutEffect:cb;function oi(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(!oi(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)&&!oi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ad(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cd(e,t){const r=ad(e);return Math.round(t*r)/r}function qa(e){const t=K.useRef(e);return ni(()=>{t.current=e}),t}function lb(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,y]=K.useState(n);oi(h,n)||y(n);const[g,p]=K.useState(null),[b,w]=K.useState(null),S=K.useCallback(le=>{le!==W.current&&(W.current=le,p(le))},[]),E=K.useCallback(le=>{le!==D.current&&(D.current=le,w(le))},[]),C=s||g,_=i||b,W=K.useRef(null),D=K.useRef(null),T=K.useRef(d),M=c!=null,I=qa(c),U=qa(o),G=qa(l),F=K.useCallback(()=>{if(!W.current||!D.current)return;const le={placement:t,strategy:r,middleware:h};U.current&&(le.platform=U.current),ib(W.current,D.current,le).then(de=>{const $={...de,isPositioned:G.current!==!1};Y.current&&!oi(T.current,$)&&(T.current=$,d0.flushSync(()=>{f($)}))})},[h,t,r,U,G]);ni(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(le=>({...le,isPositioned:!1})))},[l]);const Y=K.useRef(!1);ni(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ni(()=>{if(C&&(W.current=C),_&&(D.current=_),C&&_){if(I.current)return I.current(C,_,F);F()}},[C,_,F,I,M]);const se=K.useMemo(()=>({reference:W,floating:D,setReference:S,setFloating:E}),[S,E]),H=K.useMemo(()=>({reference:C,floating:_}),[C,_]),N=K.useMemo(()=>{const le={position:r,left:0,top:0};if(!H.floating)return le;const de=cd(H.floating,d.x),$=cd(H.floating,d.y);return a?{...le,transform:"translate("+de+"px, "+$+"px)",...ad(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:de,top:$}},[r,a,H.floating,d.x,d.y]);return K.useMemo(()=>({...d,update:F,refs:se,elements:H,floatingStyles:N}),[d,F,se,H,N])}const ub=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?id({element:n.current,padding:o}).fn(r):{}:n?id({element:n,padding:o}).fn(r):{}}}},db=(e,t)=>({...ob(e),options:[e,t]}),fb=(e,t)=>({...sb(e),options:[e,t]}),pb=(e,t)=>({...ub(e),options:[e,t]}),hb={...K};let ld=!1,mb=0;const ud=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+mb++;function gb(){const[e,t]=K.useState(()=>ld?ud():void 0);return ti(()=>{e==null&&t(ud())},[]),K.useEffect(()=>{ld=!0},[]),e}const dd=hb.useId||gb;let So;process.env.NODE_ENV!=="production"&&(So=new Set);function vb(){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 yb(){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 bb=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:y,style:{transform:g,...p}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||vb("The `ref` prop is required for `FloatingArrow`."));const w=dd(),[S,E]=K.useState(!1);if(ti(()=>{if(!o)return;vr(o).direction==="rtl"&&E(!0)},[o]),!o)return null;const[C,_]=n.split("-"),W=C==="top"||C==="bottom";let D=f;(W&&i!=null&&i.x||!W&&i!=null&&i.y)&&(D=null);const T=d*2,M=T/2,I=a/2*(l/-8+1),U=c/2*l/4,G=!!y,F=D&&_==="end"?"bottom":"top";let Y=D&&_==="end"?"right":"left";D&&S&&(Y=_==="end"?"left":"right");const se=s?.x!=null?D||s.x:"",H=s?.y!=null?D||s.y:"",N=y||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(c-U))+(" Q"+a/2+","+c+" "+I+","+(c-U))+" Z",le={top:G?"rotate(180deg)":"",left:G?"rotate(90deg)":"rotate(-90deg)",bottom:G?"":"rotate(180deg)",right:G?"rotate(-90deg)":"rotate(90deg)"}[C];return u.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:G?a:a+T,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Y]:se,[F]:H,[C]:W||G?"100%":"calc(100% - "+T/2+"px)",transform:[le,g].filter(de=>!!de).join(" "),...p},children:[T>0&&u.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:h,strokeWidth:T+(y?0:1),d:N}),u.jsx("path",{stroke:T&&!y?b.fill:"none",d:N}),u.jsx("clipPath",{id:w,children:u.jsx("rect",{x:-M,y:M*(G?-1:1),width:a+T,height:a})})]})});function xb(){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 _b=K.createContext(null),wb=K.createContext(null),Sb=()=>{var e;return((e=K.useContext(_b))==null?void 0:e.id)||null},Cb=()=>K.useContext(wb);function Eb(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=dd(),s=K.useRef({}),[i]=K.useState(()=>xb()),a=Sb()!=null;if(process.env.NODE_ENV!=="production"){const y=n.reference;y&&!Qt(y)&&yb("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=Oy((y,g,p)=>{s.current.openEvent=y?g:void 0,i.emit("openchange",{open:y,event:g,reason:p,nested:a}),r?.(y,g,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 Db(e){e===void 0&&(e={});const{nodeId:t}=e,r=Eb({...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=Cb();ti(()=>{d&&(f.current=d)},[d]);const y=lb({...e,elements:{...o,...a&&{reference:a}}}),g=K.useCallback(E=>{const C=Qt(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;c(C),y.refs.setReference(C)},[y.refs]),p=K.useCallback(E=>{(Qt(E)||E===null)&&(f.current=E,i(E)),(Qt(y.refs.reference.current)||y.refs.reference.current===null||E!==null&&!Qt(E))&&y.refs.setReference(E)},[y.refs]),b=K.useMemo(()=>({...y.refs,setReference:p,setPositionReference:g,domReference:f}),[y.refs,p,g]),w=K.useMemo(()=>({...y.elements,domReference:d}),[y.elements,d]),S=K.useMemo(()=>({...y,...n,refs:b,elements:w,nodeId:t}),[y,b,w,t,n]);return ti(()=>{n.dataRef.current.floatingContext=S;const E=h?.nodesRef.current.find(C=>C.id===t);E&&(E.context=S)}),K.useMemo(()=>({...y,context:S,refs:b,elements:w}),[y,b,w,S])}/*!
112
112
  react-datepicker v8.7.0
113
113
  https://github.com/Hacker0x01/react-datepicker
114
114
  Released under the MIT License.
115
- */var Ka=function(t,r){return Ka=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])},Ka(t,r)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ka(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 Fr(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 Mb=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 v.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},i)},Pb=function(e,t){var r=v.useRef(null),n=v.useRef(e);n.current=e;var o=v.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 v.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),r},ai=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=Pb(r,i);return v.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ge;(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"})(ge||(ge={}));function hd(){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 ci(t)?t:new Date}function Qa(e,t,r,n,o){o===void 0&&(o=ct());for(var s=Un(r)||Un(Ja()),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(ci(d)&&(!n||e===yt(d,u,r)))return d}return null}function ci(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(Ja()),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 md=" - ";function Ob(e,t,r){if(!e&&!t)return"";var n=e?yr(e,r):"",o=t?yr(t,r):"",s=r.rangeSeparator||md;return"".concat(n).concat(s).concat(o)}function jb(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 Xa(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 Rb(e){return x.getISOWeek(e)}function Nb(e,t){return yt(e,"ddd",t)}function li(e){return x.startOfDay(e)}function sn(e,t,r){var n=Un(t||Ja());return x.startOfWeek(e,{locale:n,weekStartsOn:r})}function Zr(e){return x.startOfMonth(e)}function Eo(e){return x.startOfYear(e)}function gd(e){return x.startOfQuarter(e)}function vd(){return x.startOfDay(ct())}function yd(e){return x.endOfDay(e)}function $b(e){return x.endOfWeek(e)}function Lb(e){return x.endOfMonth(e)}function Wr(e,t){return e&&t?x.isSameYear(e,t):!e&&!t}function er(e,t){return e&&t?x.isSameMonth(e,t):!e&&!t}function ui(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 vn(e,t){return e&&t?x.isEqual(e,t):!e&&!t}function yn(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 Ja(){var e=hd();return e.__localeId__}function Un(e){if(typeof e=="string"){var t=hd();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function zb(e,t,r){return t(yt(e,"EEEE",r))}function Bb(e,t){return yt(e,"EEEEEE",t)}function Fb(e,t){return yt(e,"EEE",t)}function ec(e,t){return yt(x.setMonth(ct(),e),"LLLL",t)}function bd(e,t){return yt(x.setMonth(ct(),e),"LLL",t)}function Wb(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?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})})||u&&!u(ct(e))||!1}function tc(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 xd(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 er(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return er(e,c)})||a&&!a(ct(e))||!1}function di(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 Hb(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 er(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return er(a,e)})||!1}function fi(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 ui(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return ui(e,c)})||a&&!a(ct(e))||!1}function pi(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 hi(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 Wr(c,u instanceof Date?u:u.date)})||i&&!i.some(function(u){return Wr(c,u)})||a&&!a(ct(c))||!1}function mi(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 _d(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 wd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&_d(e,n)||o&&!_d(e,o)||s&&!s(e)||!1}function Sd(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 Cd(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 Ed(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 Ub(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 Vb(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 Dd(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 Yb(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 kd(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 qb(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 Ad(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 Td(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 Id(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,y=f.length;h<y;h++){var g=f[h];if(g){var a=yt(g,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function Zb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function Gb(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&&Zb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Fr(Fr([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Kb(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 Md(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 Qb(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 Pd(e){var t=e.getSeconds(),r=e.getMilliseconds();return x.toDate(e.getTime()-t*1e3-r)}function Xb(e,t){return Pd(e).getTime()===Pd(t).getTime()}function Od(e){if(!x.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function rc(e,t){if(!x.isDate(e)||!x.isDate(t))throw new Error("Invalid date received");var r=Od(e),n=Od(t);return x.isBefore(r,n)}function jd(e){return e.key===ge.Space}var Jb=(function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=v.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?v.cloneElement(c,{date:i,value:o,onChange:n.onTimeChange}):v.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 v.createElement("div",{className:"react-datepicker__input-time-container"},v.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),v.createElement("div",{className:"react-datepicker-time__input-container"},v.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(v.Component),e2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=v.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===ge.Space&&(n.preventDefault(),n.key=ge.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 tc(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return Ue(r.props.day,sn(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&Ue(n,sn(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:yn(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,y=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!y||!u&&r.isDisabled())return!1;if(i&&h&&(x.isBefore(y,h)||vn(y,h)))return yn(s,y,h);if(a&&d&&(x.isAfter(y,d)||vn(y,d)))return yn(s,d,y);if(c&&d&&!h){if(vn(y,d)||x.isAfter(y,d))return yn(s,d,y);if(f&&x.isBefore(y,d))return yn(s,y,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?Ue(s,d):u&&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,u=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ue(s,f):c&&u&&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 qt("react-datepicker__day",o,"react-datepicker__day--"+Nb(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?Ue(d,o):Ue(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)&&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 v.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()!==""&&v.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})(v.Component),t2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=v.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ge.Space&&(n.preventDefault(),n.key=ge.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 v.createElement("div",{ref:this.weekNumberEl,className:qt(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(v.Component),r2=(function(e){Gt(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):Rb(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(v.createElement(t2,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 v.createElement(e2,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 sn(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 v.createElement("div",{className:qt(r,n),role:"row"},this.renderDays())},t})(v.Component),ko,n2=6,Vn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},nc=(ko={},ko[Vn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ko[Vn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ko[Vn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ko),gi=1;function Rd(e,t){return e?Vn.FOUR_COLUMNS:t?Vn.TWO_COLUMNS:Vn.THREE_COLUMNS}var o2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Fr([],Array(12),!0).map(function(){return v.createRef()}),r.QUARTER_REFS=Fr([],Array(4),!0).map(function(){return v.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 tc(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:er(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:ui(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:er(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:ui(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?di(h,f,n,i):c&&d||u&&d&&!f?di(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?er(u,d):er(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?er(d,f):er(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?mi(h,f,n,i):c&&d||u&&d&&!f?mi(d,h,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=x.addDays(n,6);return er(n,o)||er(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=sn(Zr(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(g){return r.props.showWeekPicker?sn(g,r.props.locale,r.props.calendarStartDay):r.props.preSelection},u=function(g){return r.props.showWeekPicker?sn(g,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(v.createElement(r2,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>=n2,y=!o&&!r.isWeekInMonth(a);if(h||y)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,y=a.showFourColumnMonthYearPicker,g=a.showTwoColumnMonthYearPicker;if(u){var p=Rd(y,g),b=r.getVerticalOffset(p),w=(i=nc[p])===null||i===void 0?void 0:i.grid,S=function(D,T,M){var I,H,G=T,F=M;switch(D){case ge.ArrowRight:G=x.addMonths(T,gi),F=M===11?0:M+gi;break;case ge.ArrowLeft:G=x.subMonths(T,gi),F=M===0?11:M-gi;break;case ge.ArrowUp:G=x.subMonths(T,b),F=!((I=w?.[0])===null||I===void 0)&&I.includes(M)?M+12-b:M-b;break;case ge.ArrowDown:G=x.addMonths(T,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,T,M){for(var I=40,H=D,G=!1,F=0,Y=S(H,T,M),se=Y.newCalculatedDate,U=Y.newCalculatedMonth;!G;){if(F>=I){se=T,U=M;break}if(f&&se<f){H=ge.ArrowRight;var N=S(H,se,U);se=N.newCalculatedDate,U=N.newCalculatedMonth}if(h&&se>h){H=ge.ArrowLeft;var N=S(H,se,U);se=N.newCalculatedDate,U=N.newCalculatedMonth}if(Hb(se,r.props)){var N=S(H,se,U);se=N.newCalculatedDate,U=N.newCalculatedMonth}else G=!0;F++}return{newCalculatedDate:se,newCalculatedMonth:U}};if(o===ge.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var C=E(o,u,s),_=C.newCalculatedDate,W=C.newCalculatedMonth;switch(o){case ge.ArrowRight:case ge.ArrowLeft:case ge.ArrowUp:case ge.ArrowDown:r.handleMonthNavigation(W,_);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=nc[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!==ge.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);fi(s,r.props)||r.handleDayClick(gd(s),n)},r.onQuarterMouseEnter=function(n){var o=x.setQuarter(r.props.day,n);fi(o,r.props)||r.handleDayMouseEnter(gd(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 ge.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ge.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,x.addQuarters(r.props.preSelection,1));break;case ge.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)&&xd(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 qt("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?di(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=fi(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,y=o.filterDate,g=o.preSelection,p=o.disabledKeyboardNavigation,b=(u||d||f||h||y)&&fi(x.setQuarter(s,n),r.props);return qt("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&&g&&r.isSelectedQuarter(s,n,g)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?mi(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=bd(n,a),d=ec(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=Wb(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=nc[Rd(i,s)])===null||n===void 0?void 0:n.grid;return u?.map(function(d,f){return v.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(h,y){return v.createElement("div",{ref:r.MONTH_REFS[h],key:y,onClick:function(g){r.onMonthClick(g,h)},onKeyDown:function(g){jd(g)&&(g.preventDefault(),g.key=ge.Enter),r.onMonthKeyDown(g,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 v.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(a,c){return v.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 qt("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?v.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()):v.createElement("div",{role:"table"},this.props.dayNamesHeader&&v.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),v.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})(v.Component),s2=(function(e){Gt(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 v.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)?v.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 v.createElement(ai,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),i2=(function(e){Gt(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 v.createElement("option",{key:o,value:s},o)})},r.renderSelectMode=function(n){return v.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 v.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[r.props.month]))},r.renderDropdown=function(n){return v.createElement(s2,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 bd(s,r.props.locale)}:function(s){return ec(s,r.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return v.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},t})(v.Component);function a2(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 c2=(function(e){Gt(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=Wr(n.props.date,o)&&er(n.props.date,o);return v.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?v.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:a2(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=qt({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return v.createElement(ai,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),l2=(function(e){Gt(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(v.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 v.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 v.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},r.renderDropdown=function(){return v.createElement(c2,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);Wr(r.props.date,o)&&er(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 v.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(v.Component),u2=(function(e){Gt(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)&&Sd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&wd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&Xb(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&Sd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&wd(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===ge.Space&&(n.preventDefault(),n.key=ge.Enter),(n.key===ge.ArrowUp||n.key===ge.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ge.ArrowDown||n.key===ge.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ge.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=li(a),u=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*Qb(a),f=d/i,h=0;h<f;h++){var y=x.addMinutes(c,h*i);if(o.push(y),u){var g=Kb(c,y,h,i,u);o=o.concat(g)}}var p=o.reduce(function(b,w){return w.getTime()<=a.getTime()?w:b},o[0]);return o.map(function(b){return v.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?v.createElement(v.Fragment,null):v.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}},v.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 v.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(),v.createElement("div",{className:"react-datepicker__time"},v.createElement("div",{className:"react-datepicker__time-box"},v.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})(v.Component),Nd=3,d2=(function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Fr([],Array(n.props.yearItemNumber),!0).map(function(){return v.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 tc(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 y=Gr(f,h).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-y<0?n.updateFocusOnPaginate(h-(y-o)):o-y>=h?n.updateFocusOnPaginate(Math.abs(h-(o-y))):(u=(c=n.YEAR_REFS[o-y])===null||c===void 0?void 0:c.current)===null||u===void 0||u.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&&Wr(x.setYear(ct(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Wr(x.setYear(ct(),o),n.props.endDate)},n.isInRange=function(o){return pi(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?pi(o,n.selectingDate(),d):a&&u||c&&u&&!d?pi(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?Wr(u,(s=n.selectingDate())!==null&&s!==void 0?s:null):Wr(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?Wr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Wr(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)),y=(i||a||c||u||d)&&hi(o,n.props),g=!!f&&Ue(h,Eo(f)),p=Ue(h,Eo(n.props.preSelection));return!n.props.inline&&!g&&p&&!y}},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!==ge.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ge.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 ge.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,x.addYears(n.props.preSelection,1));break;case ge.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,x.subYears(n.props.preSelection,1));break;case ge.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var y=Gr(d,f).startPeriod,g=Nd,p=s-g;if(p<y){var b=f%g;s>=y&&s<y+b?g=b:g+=b,p=s-g}n.handleYearNavigation(p,x.subYears(n.props.preSelection,g));break}case ge.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Gr(d,f).endPeriod,g=Nd,p=s+g;if(p>w){var b=f%g;s<=w&&s>w-b?g=b:g+=b,p=s+g}n.handleYearNavigation(p,x.addYears(n.props.preSelection,g));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 qt("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)&&hi(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=hi(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(v.createElement("div",{ref:y.YEAR_REFS[p-d],onClick:function(b){r.onYearClick(b,p)},onKeyDown:function(b){jd(b)&&(b.preventDefault(),b.key=ge.Enter),r.onYearKeyDown(b,p)},tabIndex:Number(y.getYearTabIndex(p)),className:y.getYearClassNames(p),onMouseEnter:y.props.usePointerEvent?void 0:function(b){return a(b,p)},onPointerEnter:y.props.usePointerEvent?function(b){return a(b,p)}:void 0,onMouseLeave:y.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:y.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":y.isCurrentYear(p)?"date":void 0},y.getYearContent(p)))},y=this,g=d;g<=f;g++)h(g);return v.createElement("div",{className:"react-datepicker__year"},v.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})(v.Component);function f2(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 p2=(function(e){Gt(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 v.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?v.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(v.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},v.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(v.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},v.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:f2(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=v.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=qt({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return v.createElement(ai,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),h2=(function(e){Gt(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(v.createElement("option",{key:i,value:i},i));return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return v.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return v.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return v.createElement(p2,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 v.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(v.Component),m2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],$d="react-datepicker-ignore-onclickoutside",g2=function(e){var t=(e.className||"").split(/\s+/);return m2.some(function(r){return t.indexOf(r)>=0})},v2=(function(e){Gt(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;g2(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=Ad(n.props),u=Td(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=Lb(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=sn(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(v.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},v.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),v.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 v.createElement("div",{key:a,role:"columnheader",className:qt("react-datepicker__day-name",d)},v.createElement("span",{className:"react-datepicker__sr-only"},yt(c,"EEEE",n.props.locale)),v.createElement("span",{"aria-hidden":"true"},u))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?zb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?Fb(o,s):Bb(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=Dd(n.state.date,n.props);break;case n.props.showYearPicker:f=Yb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Ub(n.state.date,n.props);break;default:f=Cd(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"],y=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(y.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,S=w===void 0?t.defaultProps.previousMonthButtonLabel:w,E=b.previousYearButtonLabel,C=E===void 0?t.defaultProps.previousYearButtonLabel:E,_=n.props,W=_.previousMonthAriaLabel,D=W===void 0?typeof S=="string"?S:"Previous Month":W,T=_.previousYearAriaLabel,M=T===void 0?typeof C=="string"?C:"Previous Year":T;return v.createElement("button",{type:"button",className:y.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":p?M:D},v.createElement("span",{className:h.join(" ")},p?C:S))}}},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=kd(n.state.date,n.props);break;case n.props.showYearPicker:s=qb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Vb(n.state.date,n.props);break;default:s=Ed(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,y=d.nextYearButtonLabel,g=y===void 0?t.defaultProps.nextYearButtonLabel:y,p=n.props,b=p.nextMonthAriaLabel,w=b===void 0?typeof h=="string"?h:"Next Month":b,S=p.nextYearAriaLabel,E=S===void 0?typeof g=="string"?g:"Next Year":S;return v.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":u?E:w},v.createElement("span",{className:a.join(" ")},u?g: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"),v.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 v.createElement(h2,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 v.createElement(i2,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 v.createElement(l2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(vd(),o),n.props.setPreSelection&&n.props.setPreSelection(vd())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return v.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return v.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var s=o.monthDate,i=o.i;return v.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(s),v.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 y=Gr(a,f),g=y.startPeriod,p=y.endPeriod;h={startYear:g,endYear:p}}var b=Cd(n.state.date,n.props),w=Ed(n.state.date,n.props),S=Dd(n.state.date,n.props),E=kd(n.state.date,n.props);return v.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:S,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 v.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,y=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(u,h):x.addMonths(u,h),g="month-".concat(f),p=f<a-1,b=f>0;i.push(v.createElement("div",{key:g,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:y,i:f}),v.createElement(o2,He({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:y,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(y)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return v.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),v.createElement(d2,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 v.createElement(u2,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&&ci(o)&&!!n.props.selected,i=s?"".concat(Md(o.getHours()),":").concat(Md(o.getMinutes())):"";if(n.props.showTimeInput)return v.createElement(Jb,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(ec(x.getMonth(n.state.date),n.props.locale)," ").concat(x.getYear(n.state.date)),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return v.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=v.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:$d,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=!er(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||Mb;return v.createElement(ai,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},v.createElement("div",{style:{display:"contents"},ref:this.containerRef},v.createElement(r,{className:qt("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})(v.Component),y2=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 v.createElement("i",{className:"".concat(s," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:o});if(v.isValidElement(t)){var i=t;return v.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 v.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},v.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"}))},Ld=(function(e){Gt(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 fl.createPortal(this.props.children,this.el)},t})(v.Component),b2="[tabindex], a, button, input, select, textarea",x2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},zd=(function(e){Gt(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(b2),1,-1).filter(x2)},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=v.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?v.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},v.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,v.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(v.Component);function _2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=v.useRef(null),i=Ib(He({open:!o,whileElementsMounted:ab,placement:r.popperPlacement,middleware:Fr([gb({padding:15}),mb(10),vb({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 v.createElement(e,He({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var w2=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,y=void 0;if(!o){var g=qt("react-datepicker-popper",t);y=v.createElement(zd,{enableTabLoop:a},v.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:c},s,h&&v.createElement(Sb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(y=v.createElement(e.popperContainer,{},y)),u&&!o&&(y=v.createElement(Ld,{portalId:u,portalHost:d},y));var p=qt("react-datepicker-wrapper",r);return v.createElement(v.Fragment,null,v.createElement("div",{ref:f.refs.setReference,className:p},i),y)},S2=_2(w2);function C2(e,t){return e&&t?x.getMonth(e)!==x.getMonth(t)||x.getYear(e)!==x.getYear(t):e!==t}var oc="Date input not valid.",E2=(function(e){Gt(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 ci(a)?Fr(Fr([],s,!0),[He(He({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=Ad(n.props),a=Td(n.props),c=i&&x.isBefore(s,li(i))?i:a&&x.isAfter(s,yd(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:Id(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,y=s.selectsRange,g=s.value,p=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof g=="string"?g:typeof b=="string"?b:y?Ob(a,c,{dateFormat:p,locale:i,rangeSeparator:u}):h?jb(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:sc},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,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:D2});var h=n.props,y=h.selectsRange,g=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,S=f?.target instanceof HTMLInputElement?f.target.value:"";if(y){var E=n.props.rangeSeparator,C=E.trim(),_=S.split(b.includes(C)?E:C,2).map(function(F){return F.trim()}),W=_[0],D=_[1],T=Qa(W??"",b,n.props.locale,w),M=T?Qa(D??"",b,n.props.locale,w):null,I=g?.getTime()!==T?.getTime(),H=p?.getTime()!==M?.getTime();if(!I&&!H||T&&br(T,n.props)||M&&br(M,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[T,M],f)}else{var G=Qa(S,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(G||!S)&&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||!rc(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&&hi(x.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&xd(d,n.props))return}else if(d!==null&&br(d,n.props))return;var f=n.props,h=f.onChange,y=f.selectsRange,g=f.startDate,p=f.endDate,b=f.selectsMultiple,w=f.selectedDates,S=f.minTime,E=f.swapRange;if(!vn(n.props.selected,d)||n.props.allowSameDay||y||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Xa(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)&&S&&(d=Xa(d,{hour:S.getHours(),minute:S.getMinutes(),second:S.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),y){var C=!g&&!p,_=g&&!p,W=!g&&!!p,D=g&&p;C?h?.([d,null],s):_?d===null?h?.([null,null],s):rc(d,g)?h?.(E?[d,g]:[d,null],s):h?.([g,d],s):W&&(d&&rc(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 T=w.some(function(I){return Ue(I,d)});if(T){var M=w.filter(function(I){return!Ue(I,d)});h?.(M,s)}else h?.(Fr(Fr([],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=li(o);if(s&&i)a=yn(o,n.props.minDate,n.props.maxDate);else if(s){var u=li(n.props.minDate);a=x.isAfter(o,u)||vn(c,u)}else if(i){var d=yd(n.props.maxDate);a=x.isBefore(o,d)||vn(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:Xa(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===ge.ArrowDown||f===ge.ArrowUp||f===ge.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ge.ArrowDown||f===ge.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"]',y=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(h);y instanceof HTMLElement&&y.focus({preventScroll:!0});return}var g=ct(n.state.preSelection);f===ge.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===sc?(n.handleSelect(g,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):f===ge.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ge.Tab&&n.setOpen(!1),n.inputOk()||(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:oc})}},n.onPortalKeyDown=function(o){var s=o.key;s===ge.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,y=f.maxDate,g=f.disabledKeyboardNavigation,p=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,S=f.calendarStartDay,E=f.adjustDateOnChange,C=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!g){var _=o.key,W=o.shiftKey,D=ct(n.state.preSelection),T=function(se,U){var N=U;switch(se){case ge.ArrowRight:N=p?x.addWeeks(U,1):x.addDays(U,1);break;case ge.ArrowLeft:N=p?x.subWeeks(U,1):x.subDays(U,1);break;case ge.ArrowUp:N=x.subWeeks(U,1);break;case ge.ArrowDown:N=x.addWeeks(U,1);break;case ge.PageUp:N=W?x.subYears(U,1):x.subMonths(U,1);break;case ge.PageDown:N=W?x.addYears(U,1):x.addMonths(U,1);break;case ge.Home:N=sn(U,w,S);break;case ge.End:N=$b(U);break}return N},M=function(se,U){for(var N=40,le=se,de=!1,$=0,Q=T(se,U);!de;){if($>=N){Q=U;break}h&&Q<h&&(le=ge.ArrowRight,Q=br(h,n.props)?T(le,Q):h),y&&Q>y&&(le=ge.ArrowLeft,Q=br(y,n.props)?T(le,Q):y),br(Q,n.props)?((le===ge.PageUp||le===ge.Home)&&(le=ge.ArrowRight),(le===ge.PageDown||le===ge.End)&&(le=ge.ArrowLeft),Q=T(le,Q)):de=!0,$++}return Q};if(_===ge.Enter){o.preventDefault(),n.handleSelect(D,o),!b&&n.setPreSelection(D);return}else if(_===ge.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:oc});return}var I=null;switch(_){case ge.ArrowLeft:case ge.ArrowRight:case ge.ArrowUp:case ge.ArrowDown:case ge.PageUp:case ge.PageDown:case ge.Home:case ge.End:I=M(_,D);break}if(!I){(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:oc});return}if(o.preventDefault(),n.setState({lastPreSelectChange:sc}),E&&n.setSelected(I),n.setPreSelection(I),C){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===ge.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:v.createElement(v2,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:Gb(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})),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},n.renderDateInput=function(){var o,s,i=qt(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),a=n.props.customInput||v.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref";return v.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=qt(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,y=o.ariaLabelClose,g=y===void 0?"Close":y,p=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||u!=null||p?.length)?v.createElement("button",{type:"button",className:qt("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,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:$d,readOnly:!1,rangeSeparator:md,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&&C2(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:Id(this.props.highlightDates)}),!n.focused&&!vn(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."),v.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&v.createElement(y2,He({icon:o,className:qt(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?v.createElement(zd,{enableTabLoop:this.props.enableTabLoop},v.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=v.createElement(Ld,He({portalId:this.props.portalId},this.props),n)),v.createElement("div",null,this.renderInputContainer(),n)}return v.createElement(S2,He({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(v.Component),D2="input",sc="navigate";const k2="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",A2="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",T2="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",Bd="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",I2=v.forwardRef(({value:e,onClick:t},r)=>l.jsxs("button",{className:pn.datePickerButton,onClick:t,ref:r,children:[e,l.jsx("img",{src:k2,style:{marginLeft:10}})]})),M2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>l.jsxs("div",{className:pn.headerContainer,children:[l.jsxs("div",{className:pn.navAndDate,children:[l.jsx("button",{className:pn.navButton,onClick:t,children:l.jsx("img",{src:A2,width:15})}),l.jsx("button",{className:pn.navButton,onClick:r,children:l.jsx("img",{src:T2,width:15})}),l.jsx(E2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:pn.datePickerInput,locale:"es",customInput:l.jsx(I2,{})})]}),l.jsxs("button",{className:pn.addEventButton,onClick:n,children:[l.jsx("img",{src:Bd}),"Agregar evento"]})]}),be={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 Za=function(t,r){return Za=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])},Za(t,r)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Za(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 Fr(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 kb=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 v.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},i)},Ab=function(e,t){var r=v.useRef(null),n=v.useRef(e);n.current=e;var o=v.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 v.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),r},si=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=Ab(r,i);return v.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ge;(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"})(ge||(ge={}));function fd(){var e=typeof window<"u"?window:globalThis;return e}var Co=12;function it(e){if(e==null)return new Date;var t=typeof e=="string"?x.parseISO(e):x.toDate(e);return ii(t)?t:new Date}function Ga(e,t,r,n,o){o===void 0&&(o=it());for(var s=Hn(r)||Hn(Qa()),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(ii(d)&&(!n||e===yt(d,l,r)))return d}return null}function ii(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(Qa()),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 pd=" - ";function Tb(e,t,r){if(!e&&!t)return"";var n=e?yr(e,r):"",o=t?yr(t,r):"",s=r.rangeSeparator||pd;return"".concat(n).concat(s).concat(o)}function Ib(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 Ka(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 Mb(e){return x.getISOWeek(e)}function Pb(e,t){return yt(e,"ddd",t)}function ai(e){return x.startOfDay(e)}function sn(e,t,r){var n=Hn(t||Qa());return x.startOfWeek(e,{locale:n,weekStartsOn:r})}function Zr(e){return x.startOfMonth(e)}function Eo(e){return x.startOfYear(e)}function hd(e){return x.startOfQuarter(e)}function md(){return x.startOfDay(it())}function gd(e){return x.endOfDay(e)}function Ob(e){return x.endOfWeek(e)}function jb(e){return x.endOfMonth(e)}function Wr(e,t){return e&&t?x.isSameYear(e,t):!e&&!t}function er(e,t){return e&&t?x.isSameMonth(e,t):!e&&!t}function ci(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 vn(e,t){return e&&t?x.isEqual(e,t):!e&&!t}function yn(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 Qa(){var e=fd();return e.__localeId__}function Hn(e){if(typeof e=="string"){var t=fd();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function Rb(e,t,r){return t(yt(e,"EEEE",r))}function Nb(e,t){return yt(e,"EEEEEE",t)}function $b(e,t){return yt(e,"EEE",t)}function Xa(e,t){return yt(x.setMonth(it(),e),"LLLL",t)}function vd(e,t){return yt(x.setMonth(it(),e),"LLL",t)}function Lb(e,t){return yt(x.setQuarter(it(),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?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})})||l&&!l(it(e))||!1}function Ja(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 yd(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 er(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return er(e,c)})||a&&!a(it(e))||!1}function li(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 zb(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 er(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return er(a,e)})||!1}function ui(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 ci(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return ci(e,c)})||a&&!a(it(e))||!1}function di(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 fi(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 Wr(c,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return Wr(c,l)})||a&&!a(it(c))||!1}function pi(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 bd(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 xd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&bd(e,n)||o&&!bd(e,o)||s&&!s(e)||!1}function _d(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=it();o=x.setHours(o,x.getHours(e)),o=x.setMinutes(o,x.getMinutes(e)),o=x.setSeconds(o,x.getSeconds(e));var s=it();s=x.setHours(s,x.getHours(r)),s=x.setMinutes(s,x.getMinutes(r)),s=x.setSeconds(s,x.getSeconds(r));var i=it();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 wd(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 Sd(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 Bb(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 Fb(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 Cd(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 Wb(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 Ed(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 Ub(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 Dd(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 kd(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 Ad(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,y=f.length;h<y;h++){var g=f[h];if(g){var a=yt(g,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function Hb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function Vb(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&&Hb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Fr(Fr([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Yb(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 Td(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 qb(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 Id(e){var t=e.getSeconds(),r=e.getMilliseconds();return x.toDate(e.getTime()-t*1e3-r)}function Zb(e,t){return Id(e).getTime()===Id(t).getTime()}function Md(e){if(!x.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function ec(e,t){if(!x.isDate(e)||!x.isDate(t))throw new Error("Invalid date received");var r=Md(e),n=Md(t);return x.isBefore(r,n)}function Pd(e){return e.key===ge.Space}var Gb=(function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=v.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?v.cloneElement(c,{date:i,value:o,onChange:n.onTimeChange}):v.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 v.createElement("div",{className:"react-datepicker__input-time-container"},v.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),v.createElement("div",{className:"react-datepicker-time__input-container"},v.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(v.Component),Kb=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=v.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===ge.Space&&(n.preventDefault(),n.key=ge.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 Ja(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return He(r.props.day,sn(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&He(n,sn(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:yn(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,y=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!y||!l&&r.isDisabled())return!1;if(i&&h&&(x.isBefore(y,h)||vn(y,h)))return yn(s,y,h);if(a&&d&&(x.isAfter(y,d)||vn(y,d)))return yn(s,d,y);if(c&&d&&!h){if(vn(y,d)||x.isAfter(y,d))return yn(s,d,y);if(f&&x.isBefore(y,d))return yn(s,y,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?He(s,d):l&&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,l=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?He(s,f):c&&l&&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(it())},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 qt("react-datepicker__day",o,"react-datepicker__day--"+Pb(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?He(d,o):He(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)&&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 v.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()!==""&&v.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})(v.Component),Qb=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=v.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ge.Space&&(n.preventDefault(),n.key=ge.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 v.createElement("div",{ref:this.weekNumberEl,className:qt(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(v.Component),Xb=(function(e){Gt(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):Mb(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(v.createElement(Qb,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 v.createElement(Kb,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 sn(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 v.createElement("div",{className:qt(r,n),role:"row"},this.renderDays())},t})(v.Component),ko,Jb=6,Vn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},tc=(ko={},ko[Vn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ko[Vn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ko[Vn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ko),hi=1;function Od(e,t){return e?Vn.FOUR_COLUMNS:t?Vn.TWO_COLUMNS:Vn.THREE_COLUMNS}var e2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Fr([],Array(12),!0).map(function(){return v.createRef()}),r.QUARTER_REFS=Fr([],Array(4),!0).map(function(){return v.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 Ja(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:er(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:ci(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:er(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:ci(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?li(h,f,n,i):c&&d||l&&d&&!f?li(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?er(l,d):er(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?er(d,f):er(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?pi(h,f,n,i):c&&d||l&&d&&!f?pi(d,h,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=x.addDays(n,6);return er(n,o)||er(s,o)},r.isCurrentMonth=function(n,o){return x.getYear(n)===x.getYear(it())&&o===x.getMonth(it())},r.isCurrentQuarter=function(n,o){return x.getYear(n)===x.getYear(it())&&o===x.getQuarter(it())},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=sn(Zr(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(g){return r.props.showWeekPicker?sn(g,r.props.locale,r.props.calendarStartDay):r.props.preSelection},l=function(g){return r.props.showWeekPicker?sn(g,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(v.createElement(Xb,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>=Jb,y=!o&&!r.isWeekInMonth(a);if(h||y)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,y=a.showFourColumnMonthYearPicker,g=a.showTwoColumnMonthYearPicker;if(l){var p=Od(y,g),b=r.getVerticalOffset(p),w=(i=tc[p])===null||i===void 0?void 0:i.grid,S=function(D,T,M){var I,U,G=T,F=M;switch(D){case ge.ArrowRight:G=x.addMonths(T,hi),F=M===11?0:M+hi;break;case ge.ArrowLeft:G=x.subMonths(T,hi),F=M===0?11:M-hi;break;case ge.ArrowUp:G=x.subMonths(T,b),F=!((I=w?.[0])===null||I===void 0)&&I.includes(M)?M+12-b:M-b;break;case ge.ArrowDown:G=x.addMonths(T,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,T,M){for(var I=40,U=D,G=!1,F=0,Y=S(U,T,M),se=Y.newCalculatedDate,H=Y.newCalculatedMonth;!G;){if(F>=I){se=T,H=M;break}if(f&&se<f){U=ge.ArrowRight;var N=S(U,se,H);se=N.newCalculatedDate,H=N.newCalculatedMonth}if(h&&se>h){U=ge.ArrowLeft;var N=S(U,se,H);se=N.newCalculatedDate,H=N.newCalculatedMonth}if(zb(se,r.props)){var N=S(U,se,H);se=N.newCalculatedDate,H=N.newCalculatedMonth}else G=!0;F++}return{newCalculatedDate:se,newCalculatedMonth:H}};if(o===ge.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var C=E(o,l,s),_=C.newCalculatedDate,W=C.newCalculatedMonth;switch(o){case ge.ArrowRight:case ge.ArrowLeft:case ge.ArrowUp:case ge.ArrowDown:r.handleMonthNavigation(W,_);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=tc[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!==ge.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);ui(s,r.props)||r.handleDayClick(hd(s),n)},r.onQuarterMouseEnter=function(n){var o=x.setQuarter(r.props.day,n);ui(o,r.props)||r.handleDayMouseEnter(hd(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 ge.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ge.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,x.addQuarters(r.props.preSelection,1));break;case ge.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)&&yd(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 qt("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?li(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=ui(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,y=o.filterDate,g=o.preSelection,p=o.disabledKeyboardNavigation,b=(l||d||f||h||y)&&ui(x.setQuarter(s,n),r.props);return qt("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&&g&&r.isSelectedQuarter(s,n,g)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?pi(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=vd(n,a),d=Xa(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=Lb(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=tc[Od(i,s)])===null||n===void 0?void 0:n.grid;return l?.map(function(d,f){return v.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(h,y){return v.createElement("div",{ref:r.MONTH_REFS[h],key:y,onClick:function(g){r.onMonthClick(g,h)},onKeyDown:function(g){Pd(g)&&(g.preventDefault(),g.key=ge.Enter),r.onMonthKeyDown(g,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 v.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(a,c){return v.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 qt("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?v.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()):v.createElement("div",{role:"table"},this.props.dayNamesHeader&&v.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),v.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})(v.Component),t2=(function(e){Gt(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 v.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)?v.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 v.createElement(si,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),r2=(function(e){Gt(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 v.createElement("option",{key:o,value:s},o)})},r.renderSelectMode=function(n){return v.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 v.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[r.props.month]))},r.renderDropdown=function(n){return v.createElement(t2,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 vd(s,r.props.locale)}:function(s){return Xa(s,r.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return v.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},t})(v.Component);function n2(e,t){for(var r=[],n=Zr(e),o=Zr(t);!x.isAfter(n,o);)r.push(it(n)),n=x.addMonths(n,1);return r}var o2=(function(e){Gt(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=Wr(n.props.date,o)&&er(n.props.date,o);return v.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?v.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:n2(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=qt({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return v.createElement(si,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),s2=(function(e){Gt(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(v.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 v.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 v.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},r.renderDropdown=function(){return v.createElement(o2,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=it(n);Wr(r.props.date,o)&&er(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 v.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(v.Component),i2=(function(e){Gt(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)&&_d(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&xd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&Zb(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&_d(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&xd(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===ge.Space&&(n.preventDefault(),n.key=ge.Enter),(n.key===ge.ArrowUp||n.key===ge.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ge.ArrowDown||n.key===ge.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ge.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||it(),c=ai(a),l=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*qb(a),f=d/i,h=0;h<f;h++){var y=x.addMinutes(c,h*i);if(o.push(y),l){var g=Yb(c,y,h,i,l);o=o.concat(g)}}var p=o.reduce(function(b,w){return w.getTime()<=a.getTime()?w:b},o[0]);return o.map(function(b){return v.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?v.createElement(v.Fragment,null):v.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}},v.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 v.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(),v.createElement("div",{className:"react-datepicker__time"},v.createElement("div",{className:"react-datepicker__time-box"},v.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})(v.Component),jd=3,a2=(function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Fr([],Array(n.props.yearItemNumber),!0).map(function(){return v.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 Ja(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 y=Gr(f,h).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-y<0?n.updateFocusOnPaginate(h-(y-o)):o-y>=h?n.updateFocusOnPaginate(Math.abs(h-(o-y))):(l=(c=n.YEAR_REFS[o-y])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())}},n.isSameDay=function(o,s){return He(o,s)},n.isCurrentYear=function(o){return o===x.getYear(it())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&Wr(x.setYear(it(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Wr(x.setYear(it(),o),n.props.endDate)},n.isInRange=function(o){return di(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?di(o,n.selectingDate(),d):a&&l||c&&l&&!d?di(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(it(),o);return c?Wr(l,(s=n.selectingDate())!==null&&s!==void 0?s:null):Wr(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(it(),o);return c||l?Wr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Wr(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)),y=(i||a||c||l||d)&&fi(o,n.props),g=!!f&&He(h,Eo(f)),p=He(h,Eo(n.props.preSelection));return!n.props.inline&&!g&&p&&!y}},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!==ge.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ge.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 ge.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,x.addYears(n.props.preSelection,1));break;case ge.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,x.subYears(n.props.preSelection,1));break;case ge.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var y=Gr(d,f).startPeriod,g=jd,p=s-g;if(p<y){var b=f%g;s>=y&&s<y+b?g=b:g+=b,p=s-g}n.handleYearNavigation(p,x.subYears(n.props.preSelection,g));break}case ge.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Gr(d,f).endPeriod,g=jd,p=s+g;if(p>w){var b=f%g;s<=w&&s>w-b?g=b:g+=b,p=s+g}n.handleYearNavigation(p,x.addYears(n.props.preSelection,g));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 qt("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)&&fi(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=fi(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(v.createElement("div",{ref:y.YEAR_REFS[p-d],onClick:function(b){r.onYearClick(b,p)},onKeyDown:function(b){Pd(b)&&(b.preventDefault(),b.key=ge.Enter),r.onYearKeyDown(b,p)},tabIndex:Number(y.getYearTabIndex(p)),className:y.getYearClassNames(p),onMouseEnter:y.props.usePointerEvent?void 0:function(b){return a(b,p)},onPointerEnter:y.props.usePointerEvent?function(b){return a(b,p)}:void 0,onMouseLeave:y.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:y.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":y.isCurrentYear(p)?"date":void 0},y.getYearContent(p)))},y=this,g=d;g<=f;g++)h(g);return v.createElement("div",{className:"react-datepicker__year"},v.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})(v.Component);function c2(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 l2=(function(e){Gt(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 v.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?v.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(v.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},v.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(v.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},v.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:c2(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=v.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=qt({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return v.createElement(si,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),u2=(function(e){Gt(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(v.createElement("option",{key:i,value:i},i));return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return v.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return v.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return v.createElement(l2,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 v.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(v.Component),d2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Rd="react-datepicker-ignore-onclickoutside",f2=function(e){var t=(e.className||"").split(/\s+/);return d2.some(function(r){return t.indexOf(r)>=0})},p2=(function(e){Gt(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;f2(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=Dd(n.props),l=kd(n.props),d=it(),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(it(),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=jb(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=sn(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(v.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},v.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),v.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 v.createElement("div",{key:a,role:"columnheader",className:qt("react-datepicker__day-name",d)},v.createElement("span",{className:"react-datepicker__sr-only"},yt(c,"EEEE",n.props.locale)),v.createElement("span",{"aria-hidden":"true"},l))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?Rb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?$b(o,s):Nb(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=Cd(n.state.date,n.props);break;case n.props.showYearPicker:f=Wb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Bb(n.state.date,n.props);break;default:f=wd(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"],y=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(y.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,S=w===void 0?t.defaultProps.previousMonthButtonLabel:w,E=b.previousYearButtonLabel,C=E===void 0?t.defaultProps.previousYearButtonLabel:E,_=n.props,W=_.previousMonthAriaLabel,D=W===void 0?typeof S=="string"?S:"Previous Month":W,T=_.previousYearAriaLabel,M=T===void 0?typeof C=="string"?C:"Previous Year":T;return v.createElement("button",{type:"button",className:y.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":p?M:D},v.createElement("span",{className:h.join(" ")},p?C:S))}}},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=Ed(n.state.date,n.props);break;case n.props.showYearPicker:s=Ub(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Fb(n.state.date,n.props);break;default:s=Sd(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,y=d.nextYearButtonLabel,g=y===void 0?t.defaultProps.nextYearButtonLabel:y,p=n.props,b=p.nextMonthAriaLabel,w=b===void 0?typeof h=="string"?h:"Next Month":b,S=p.nextYearAriaLabel,E=S===void 0?typeof g=="string"?g:"Next Year":S;return v.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":l?E:w},v.createElement("span",{className:a.join(" ")},l?g: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"),v.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 v.createElement(u2,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 v.createElement(r2,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 v.createElement(s2,Ue({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(md(),o),n.props.setPreSelection&&n.props.setPreSelection(md())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return v.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return v.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var s=o.monthDate,i=o.i;return v.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(s),v.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 y=Gr(a,f),g=y.startPeriod,p=y.endPeriod;h={startYear:g,endYear:p}}var b=wd(n.state.date,n.props),w=Sd(n.state.date,n.props),S=Cd(n.state.date,n.props),E=Ed(n.state.date,n.props);return v.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:S,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 v.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,y=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(l,h):x.addMonths(l,h),g="month-".concat(f),p=f<a-1,b=f>0;i.push(v.createElement("div",{key:g,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:y,i:f}),v.createElement(e2,Ue({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:y,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(y)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return v.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),v.createElement(a2,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 v.createElement(i2,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&&ii(o)&&!!n.props.selected,i=s?"".concat(Td(o.getHours()),":").concat(Td(o.getMinutes())):"";if(n.props.showTimeInput)return v.createElement(Gb,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(Xa(x.getMonth(n.state.date),n.props.locale)," ").concat(x.getYear(n.state.date)),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return v.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=v.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:Rd,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=!er(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||kb;return v.createElement(si,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},v.createElement("div",{style:{display:"contents"},ref:this.containerRef},v.createElement(r,{className:qt("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})(v.Component),h2=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 v.createElement("i",{className:"".concat(s," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:o});if(v.isValidElement(t)){var i=t;return v.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 v.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},v.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"}))},Nd=(function(e){Gt(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 ul.createPortal(this.props.children,this.el)},t})(v.Component),m2="[tabindex], a, button, input, select, textarea",g2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},$d=(function(e){Gt(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(m2),1,-1).filter(g2)},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=v.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?v.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},v.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,v.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(v.Component);function v2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=v.useRef(null),i=Db(Ue({open:!o,whileElementsMounted:nb,placement:r.popperPlacement,middleware:Fr([fb({padding:15}),db(10),pb({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 v.createElement(e,Ue({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var y2=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,y=void 0;if(!o){var g=qt("react-datepicker-popper",t);y=v.createElement($d,{enableTabLoop:a},v.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:c},s,h&&v.createElement(bb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(y=v.createElement(e.popperContainer,{},y)),l&&!o&&(y=v.createElement(Nd,{portalId:l,portalHost:d},y));var p=qt("react-datepicker-wrapper",r);return v.createElement(v.Fragment,null,v.createElement("div",{ref:f.refs.setReference,className:p},i),y)},b2=v2(y2);function x2(e,t){return e&&t?x.getMonth(e)!==x.getMonth(t)||x.getYear(e)!==x.getYear(t):e!==t}var rc="Date input not valid.",_2=(function(e){Gt(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:it()},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 ii(a)?Fr(Fr([],s,!0),[Ue(Ue({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=Dd(n.props),a=kd(n.props),c=i&&x.isBefore(s,ai(i))?i:a&&x.isAfter(s,gd(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:Ad(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,y=s.selectsRange,g=s.value,p=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof g=="string"?g:typeof b=="string"?b:y?Tb(a,c,{dateFormat:p,locale:i,rangeSeparator:l}):h?Ib(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:nc},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,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:w2});var h=n.props,y=h.selectsRange,g=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,S=f?.target instanceof HTMLInputElement?f.target.value:"";if(y){var E=n.props.rangeSeparator,C=E.trim(),_=S.split(b.includes(C)?E:C,2).map(function(F){return F.trim()}),W=_[0],D=_[1],T=Ga(W??"",b,n.props.locale,w),M=T?Ga(D??"",b,n.props.locale,w):null,I=g?.getTime()!==T?.getTime(),U=p?.getTime()!==M?.getTime();if(!I&&!U||T&&br(T,n.props)||M&&br(M,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[T,M],f)}else{var G=Ga(S,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(G||!S)&&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||!ec(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&&fi(x.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&yd(d,n.props))return}else if(d!==null&&br(d,n.props))return;var f=n.props,h=f.onChange,y=f.selectsRange,g=f.startDate,p=f.endDate,b=f.selectsMultiple,w=f.selectedDates,S=f.minTime,E=f.swapRange;if(!vn(n.props.selected,d)||n.props.allowSameDay||y||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Ka(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)&&S&&(d=Ka(d,{hour:S.getHours(),minute:S.getMinutes(),second:S.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),y){var C=!g&&!p,_=g&&!p,W=!g&&!!p,D=g&&p;C?h?.([d,null],s):_?d===null?h?.([null,null],s):ec(d,g)?h?.(E?[d,g]:[d,null],s):h?.([g,d],s):W&&(d&&ec(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 T=w.some(function(I){return He(I,d)});if(T){var M=w.filter(function(I){return!He(I,d)});h?.(M,s)}else h?.(Fr(Fr([],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=ai(o);if(s&&i)a=yn(o,n.props.minDate,n.props.maxDate);else if(s){var l=ai(n.props.minDate);a=x.isAfter(o,l)||vn(c,l)}else if(i){var d=gd(n.props.maxDate);a=x.isBefore(o,d)||vn(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:Ka(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===ge.ArrowDown||f===ge.ArrowUp||f===ge.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ge.ArrowDown||f===ge.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"]',y=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(h);y instanceof HTMLElement&&y.focus({preventScroll:!0});return}var g=it(n.state.preSelection);f===ge.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===nc?(n.handleSelect(g,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):f===ge.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ge.Tab&&n.setOpen(!1),n.inputOk()||(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:rc})}},n.onPortalKeyDown=function(o){var s=o.key;s===ge.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,y=f.maxDate,g=f.disabledKeyboardNavigation,p=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,S=f.calendarStartDay,E=f.adjustDateOnChange,C=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!g){var _=o.key,W=o.shiftKey,D=it(n.state.preSelection),T=function(se,H){var N=H;switch(se){case ge.ArrowRight:N=p?x.addWeeks(H,1):x.addDays(H,1);break;case ge.ArrowLeft:N=p?x.subWeeks(H,1):x.subDays(H,1);break;case ge.ArrowUp:N=x.subWeeks(H,1);break;case ge.ArrowDown:N=x.addWeeks(H,1);break;case ge.PageUp:N=W?x.subYears(H,1):x.subMonths(H,1);break;case ge.PageDown:N=W?x.addYears(H,1):x.addMonths(H,1);break;case ge.Home:N=sn(H,w,S);break;case ge.End:N=Ob(H);break}return N},M=function(se,H){for(var N=40,le=se,de=!1,$=0,Q=T(se,H);!de;){if($>=N){Q=H;break}h&&Q<h&&(le=ge.ArrowRight,Q=br(h,n.props)?T(le,Q):h),y&&Q>y&&(le=ge.ArrowLeft,Q=br(y,n.props)?T(le,Q):y),br(Q,n.props)?((le===ge.PageUp||le===ge.Home)&&(le=ge.ArrowRight),(le===ge.PageDown||le===ge.End)&&(le=ge.ArrowLeft),Q=T(le,Q)):de=!0,$++}return Q};if(_===ge.Enter){o.preventDefault(),n.handleSelect(D,o),!b&&n.setPreSelection(D);return}else if(_===ge.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:rc});return}var I=null;switch(_){case ge.ArrowLeft:case ge.ArrowRight:case ge.ArrowUp:case ge.ArrowDown:case ge.PageUp:case ge.PageDown:case ge.Home:case ge.End:I=M(_,D);break}if(!I){(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:rc});return}if(o.preventDefault(),n.setState({lastPreSelectChange:nc}),E&&n.setSelected(I),n.setPreSelection(I),C){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===ge.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:v.createElement(p2,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:Vb(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})),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},l)},n.renderDateInput=function(){var o,s,i=qt(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),a=n.props.customInput||v.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref";return v.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=qt(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,y=o.ariaLabelClose,g=y===void 0?"Close":y,p=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||l!=null||p?.length)?v.createElement("button",{type:"button",className:qt("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,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:Rd,readOnly:!1,rangeSeparator:pd,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&&x2(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:Ad(this.props.highlightDates)}),!n.focused&&!vn(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."),v.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&v.createElement(h2,Ue({icon:o,className:qt(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?v.createElement($d,{enableTabLoop:this.props.enableTabLoop},v.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=v.createElement(Nd,Ue({portalId:this.props.portalId},this.props),n)),v.createElement("div",null,this.renderInputContainer(),n)}return v.createElement(b2,Ue({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(v.Component),w2="input",nc="navigate";const S2="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",C2="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",E2="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",Ld="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",D2=v.forwardRef(({value:e,onClick:t},r)=>u.jsxs("button",{className:pn.datePickerButton,onClick:t,ref:r,children:[e,u.jsx("img",{src:S2,style:{marginLeft:10}})]})),k2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>u.jsxs("div",{className:pn.headerContainer,children:[u.jsxs("div",{className:pn.navAndDate,children:[u.jsx("button",{className:pn.navButton,onClick:t,children:u.jsx("img",{src:C2,width:15})}),u.jsx("button",{className:pn.navButton,onClick:r,children:u.jsx("img",{src:E2,width:15})}),u.jsx(_2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:pn.datePickerInput,locale:"es",customInput:u.jsx(D2,{})})]}),u.jsxs("button",{className:pn.addEventButton,onClick:n,children:[u.jsx("img",{src:Ld}),"Agregar evento"]})]}),be={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 P2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Fd=e=>{const t=O2(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),j2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
120
+ */const A2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),zd=e=>{const t=T2(e);return t.charAt(0).toUpperCase()+t.slice(1)},Bd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),I2=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 R2={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 M2={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 N2=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>v.createElement("svg",{ref:c,...R2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Wd("lucide",o),...!s&&!j2(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>v.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
130
+ */const P2=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>v.createElement("svg",{ref:c,...M2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Bd("lucide",o),...!s&&!I2(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,d])=>v.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 vi=(e,t)=>{const r=v.forwardRef(({className:n,...o},s)=>v.createElement(N2,{ref:s,iconNode:t,className:Wd(`lucide-${P2(Fd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Fd(e),r};/**
135
+ */const mi=(e,t)=>{const r=v.forwardRef(({className:n,...o},s)=>v.createElement(P2,{ref:s,iconNode:t,className:Bd(`lucide-${A2(zd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=zd(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 $2=vi("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 O2=mi("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 L2=vi("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
145
+ */const j2=mi("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.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
- */const ic=vi("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
150
+ */const oc=mi("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
151
151
  * @license lucide-react v0.540.0 - ISC
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 z2=vi("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 ac(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 an(e,t){return ac(t||e,e)}function Ud(e,t,r){const[n,o]=[+an(e.start,r?.in),+an(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+an(t.start,r?.in),+an(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function yi(e){"@babel/helpers - typeof";return yi=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},yi(e)}var B2=/^\s+/,F2=/\s+$/;function ke(e,t){if(e=e||"",t=t||{},e instanceof ke)return e;if(!(this instanceof ke))return new ke(e,t);var r=W2(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}ke.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=Kd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Yd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString: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.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+o+"%)":"hsva("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=Vd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Vd(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 qd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return Y2(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:o1[qd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Zd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=ke(t);n="#"+Zd(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 ke(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(K2,arguments)},brighten:function(){return this._applyModification(Q2,arguments)},darken:function(){return this._applyModification(X2,arguments)},desaturate:function(){return this._applyModification(q2,arguments)},saturate:function(){return this._applyModification(Z2,arguments)},greyscale:function(){return this._applyModification(G2,arguments)},spin:function(){return this._applyModification(J2,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(r1,arguments)},complement:function(){return this._applyCombination(e1,arguments)},monochromatic:function(){return this._applyCombination(n1,arguments)},splitcomplement:function(){return this._applyCombination(t1,arguments)},triad:function(){return this._applyCombination(Gd,[3])},tetrad:function(){return this._applyCombination(Gd,[4])}},ke.fromRatio=function(e,t){if(yi(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 ke(e,t)};function W2(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=c1(e)),yi(e)=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=H2(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=V2(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=U2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Kd(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 H2(e,t,r){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(r,255)*255}}function Vd(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 U2(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 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,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 V2(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 qd(e,t,r,n){var o=[Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(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 Y2(e,t,r,n,o){var s=[Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(Math.round(r).toString(16)),Dr(Qd(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 Zd(e,t,r,n){var o=[Dr(Qd(n)),Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(Math.round(r).toString(16))];return o.join("")}ke.equals=function(e,t){return!e||!t?!1:ke(e).toRgbString()==ke(t).toRgbString()},ke.random=function(){return ke.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function q2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.s-=t/100,r.s=bi(r.s),ke(r)}function Z2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.s+=t/100,r.s=bi(r.s),ke(r)}function G2(e){return ke(e).desaturate(100)}function K2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.l+=t/100,r.l=bi(r.l),ke(r)}function Q2(e,t){t=t===0?0:t||10;var r=ke(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)))),ke(r)}function X2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.l-=t/100,r.l=bi(r.l),ke(r)}function J2(e,t){var r=ke(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,ke(r)}function e1(e){var t=ke(e).toHsl();return t.h=(t.h+180)%360,ke(t)}function Gd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ke(e).toHsl(),n=[ke(e)],o=360/t,s=1;s<t;s++)n.push(ke({h:(r.h+s*o)%360,s:r.s,l:r.l}));return n}function t1(e){var t=ke(e).toHsl(),r=t.h;return[ke(e),ke({h:(r+72)%360,s:t.s,l:t.l}),ke({h:(r+216)%360,s:t.s,l:t.l})]}function r1(e,t,r){t=t||6,r=r||30;var n=ke(e).toHsl(),o=360/r,s=[ke(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,s.push(ke(n));return s}function n1(e,t){t=t||6;for(var r=ke(e).toHsv(),n=r.h,o=r.s,s=r.v,i=[],a=1/t;t--;)i.push(ke({h:n,s:o,v:s})),s=(s+a)%1;return i}ke.mix=function(e,t,r){r=r===0?0:r||50;var n=ke(e).toRgb(),o=ke(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 ke(i)},ke.readability=function(e,t){var r=ke(e),n=ke(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},ke.isReadable=function(e,t,r){var n=ke.readability(e,t),o,s;switch(s=!1,o=l1(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},ke.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=ke.readability(e,t[u]),s>o&&(o=s,n=ke(t[u]));return ke.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,ke.mostReadable(e,["#fff","#000"],r))};var cc=ke.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"},o1=ke.hexNames=s1(cc);function s1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Kd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _t(e,t){i1(e)&&(e="100%");var r=a1(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 bi(e){return Math.min(1,Math.max(0,e))}function dr(e){return parseInt(e,16)}function i1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function a1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Dr(e){return e.length==1?"0"+e:""+e}function Ao(e){return e<=1&&(e=e*100+"%"),e}function Qd(e){return Math.round(parseFloat(e)*255).toString(16)}function Xd(e){return dr(e)/255}var kr=(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!!kr.CSS_UNIT.exec(e)}function c1(e){e=e.replace(B2,"").replace(F2,"").toLowerCase();var t=!1;if(cc[e])e=cc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=kr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=kr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=kr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=kr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=kr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=kr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=kr.hex8.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),a:Xd(r[4]),format:t?"name":"hex8"}:(r=kr.hex6.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),format:t?"name":"hex"}:(r=kr.hex4.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),a:Xd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=kr.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 l1(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 Jd="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",u1="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",d1="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",ef="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",tf=v.createContext(void 0),f1=({children:e})=>{const[t,r]=v.useState(()=>({userEmail:localStorage.getItem("user_email")||null})),[n,o]=v.useState(()=>({userEmail:localStorage.getItem("user_outlook")||null})),s=v.useCallback(u=>{localStorage.setItem("user_email",u),r({userEmail:u})},[]),i=v.useCallback(u=>{localStorage.setItem("user_outlook",u),o({userEmail:u})},[]),a=v.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return l.jsx(tf.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},lc=()=>{const e=v.useContext(tf);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function rf(e,t){return function(){return e.apply(t,arguments)}}const{toString:p1}=Object.prototype,{getPrototypeOf:uc}=Object,{iterator:xi,toStringTag:nf}=Symbol,_i=(e=>t=>{const r=p1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ar=e=>(e=e.toLowerCase(),t=>_i(t)===e),wi=e=>t=>typeof t===e,{isArray:Yn}=Array,To=wi("undefined");function Io(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&nr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const of=Ar("ArrayBuffer");function h1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&of(e.buffer),t}const m1=wi("string"),nr=wi("function"),sf=wi("number"),Mo=e=>e!==null&&typeof e=="object",g1=e=>e===!0||e===!1,Si=e=>{if(_i(e)!=="object")return!1;const t=uc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(nf in e)&&!(xi in e)},v1=e=>{if(!Mo(e)||Io(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},y1=Ar("Date"),b1=Ar("File"),x1=Ar("Blob"),_1=Ar("FileList"),w1=e=>Mo(e)&&nr(e.pipe),S1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nr(e.append)&&((t=_i(e))==="formdata"||t==="object"&&nr(e.toString)&&e.toString()==="[object FormData]"))},C1=Ar("URLSearchParams"),[E1,D1,k1,A1]=["ReadableStream","Request","Response","Headers"].map(Ar),T1=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 af(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 bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cf=e=>!To(e)&&e!==bn;function dc(){const{caseless:e}=cf(this)&&this||{},t={},r=(n,o)=>{const s=e&&af(t,o)||o;Si(t[s])&&Si(n)?t[s]=dc(t[s],n):Si(n)?t[s]=dc({},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 I1=(e,t,r,{allOwnKeys:n}={})=>(Po(t,(o,s)=>{r&&nr(o)?e[s]=rf(o,r):e[s]=o},{allOwnKeys:n}),e),M1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),P1=(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)},O1=(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&&uc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},j1=(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},R1=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!sf(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},N1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uc(Uint8Array)),$1=(e,t)=>{const n=(e&&e[xi]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},L1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},z1=Ar("HTMLFormElement"),B1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),lf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),F1=Ar("RegExp"),uf=(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)},W1=e=>{uf(e,(t,r)=>{if(nr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(nr(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+"'")})}})},H1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Yn(e)?n(e):n(String(e).split(t)),r},U1=()=>{},V1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Y1(e){return!!(e&&nr(e.append)&&e[nf]==="FormData"&&e[xi])}const q1=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)},Z1=Ar("AsyncFunction"),G1=e=>e&&(Mo(e)||nr(e))&&nr(e.then)&&nr(e.catch),df=((e,t)=>e?setImmediate:t?((r,n)=>(bn.addEventListener("message",({source:o,data:s})=>{o===bn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),bn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",nr(bn.postMessage)),K1=typeof queueMicrotask<"u"?queueMicrotask.bind(bn):typeof process<"u"&&process.nextTick||df,z={isArray:Yn,isArrayBuffer:of,isBuffer:Io,isFormData:S1,isArrayBufferView:h1,isString:m1,isNumber:sf,isBoolean:g1,isObject:Mo,isPlainObject:Si,isEmptyObject:v1,isReadableStream:E1,isRequest:D1,isResponse:k1,isHeaders:A1,isUndefined:To,isDate:y1,isFile:b1,isBlob:x1,isRegExp:F1,isFunction:nr,isStream:w1,isURLSearchParams:C1,isTypedArray:N1,isFileList:_1,forEach:Po,merge:dc,extend:I1,trim:T1,stripBOM:M1,inherits:P1,toFlatObject:O1,kindOf:_i,kindOfTest:Ar,endsWith:j1,toArray:R1,forEachEntry:$1,matchAll:L1,isHTMLForm:z1,hasOwnProperty:lf,hasOwnProp:lf,reduceDescriptors:uf,freezeMethods:W1,toObjectSet:H1,toCamelCase:B1,noop:U1,toFiniteNumber:V1,findKey:af,global:bn,isContextDefined:cf,isSpecCompliantForm:Y1,toJSONObject:q1,isAsyncFn:Z1,isThenable:G1,setImmediate:df,asap:K1,isIterable:e=>e!=null&&nr(e[xi])};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 ff=Le.prototype,pf={};["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=>{pf[e]={value:e}}),Object.defineProperties(Le,pf),Object.defineProperty(ff,"isAxiosError",{value:!0}),Le.from=(e,t,r,n,o,s)=>{const i=Object.create(ff);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 Q1=null;function fc(e){return z.isPlainObject(e)||z.isArray(e)}function hf(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function mf(e,t,r){return e?e.concat(t).map(function(o,s){return o=hf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function X1(e){return z.isArray(e)&&!e.some(fc)}const J1=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Ci(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(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new Le("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,p,b){let w=g;if(g&&!b&&typeof g=="object"){if(z.endsWith(p,"{}"))p=n?p:p.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&X1(g)||(z.isFileList(g)||z.endsWith(p,"[]"))&&(w=z.toArray(g)))return p=hf(p),w.forEach(function(E,C){!(z.isUndefined(E)||E===null)&&t.append(i===!0?mf([p],C,s):i===null?p:p+"[]",u(E))}),!1}return fc(g)?!0:(t.append(mf(b,p,s),u(g)),!1)}const f=[],h=Object.assign(J1,{defaultVisitor:d,convertValue:u,isVisitable:fc});function y(g,p){if(!z.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(g),z.forEach(g,function(w,S){(!(z.isUndefined(w)||w===null)&&o.call(t,w,z.isString(S)?S.trim():S,p,h))===!0&&y(w,p?p.concat(S):[S])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return y(e),t}function gf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function pc(e,t){this._pairs=[],e&&Ci(e,this,t)}const vf=pc.prototype;vf.append=function(t,r){this._pairs.push([t,r])},vf.toString=function(t){const r=t?function(n){return t.call(this,n,gf)}:gf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ex(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yf(e,t,r){if(!t)return e;const n=r&&r.encode||ex;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 pc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class bf{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 xf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},hc=typeof window<"u"&&typeof document<"u",mc=typeof navigator=="object"&&navigator||void 0,rx=hc&&(!mc||["ReactNative","NativeScript","NS"].indexOf(mc.product)<0),nx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ox=hc&&window.location.href||"http://localhost",Xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hc,hasStandardBrowserEnv:rx,hasStandardBrowserWebWorkerEnv:nx,navigator:mc,origin:ox},Symbol.toStringTag,{value:"Module"})),...tx};function sx(e,t){return Ci(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 ix(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ax(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 _f(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]=ax(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(ix(n),o,r,0)}),r}return null}function cx(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:xf,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(_f(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 sx(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ci(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),cx(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 lx=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"]),ux=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]&&lx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},wf=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function Ei(e){return e===!1||e==null?e:z.isArray(e)?e.map(Ei):String(e)}function dx(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 fx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gc(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 px(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function hx(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 or=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]=Ei(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())&&!fx(t))i(ux(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 dx(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||gc(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||gc(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||gc(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]=Ei(o),delete r[s];return}const a=t?px(s):String(s).trim();a!==s&&delete r[s],r[a]=Ei(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[wf]=this[wf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=jo(i);n[a]||(hx(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};or.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(or.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(or);function vc(e,t){const r=this||Oo,n=t||r,o=or.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 Sf(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 Cf(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 mx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gx(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 y=d&&u-d;return y?Math.round(h*1e3/y):void 0}}function vx(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 Di=(e,t,r=3)=>{let n=0;const o=gx(50,250);return vx(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)},Ef=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Df=e=>(...t)=>z.asap(()=>e(...t)),yx=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,bx=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 xx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _x(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function kf(e,t,r){let n=!xx(t);return e&&(n||r==!1)?_x(e,t):t}const Af=e=>e instanceof or?{...e}:e;function xn(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(Af(u),Af(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 Tf=e=>{const t=xn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=or.from(i),t.url=yf(kf(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&&yx(t.url))){const u=o&&s&&bx.read(s);u&&i.set(o,u)}return t},wx=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Tf(e);let s=o.data;const i=or.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,d,f,h,y,g;function p(){y&&y(),g&&g(),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=or.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};Cf(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 C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||xf;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),n(new Le(C,_.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(C,_){b.setRequestHeader(_,C)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),u&&([h,g]=Di(u,!0),b.addEventListener("progress",h)),c&&b.upload&&([f,y]=Di(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",y)),(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 S=mx(o.url);if(S&&Xt.protocols.indexOf(S)===-1){n(new Le("Unsupported protocol "+S+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)})},Sx=(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}},Cx=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},Ex=async function*(e,t){for await(const r of Dx(e))yield*Cx(r,t)},Dx=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()}},If=(e,t,r,n)=>{const o=Ex(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})},ki=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mf=ki&&typeof ReadableStream=="function",kx=ki&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ax=Mf&&Pf(()=>{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}),Of=64*1024,yc=Mf&&Pf(()=>z.isReadableStream(new Response("").body)),Ai={stream:yc&&(e=>e.body)};ki&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ai[t]&&(Ai[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 Tx=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 kx(e)).byteLength},Ix=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??Tx(t)},bc={http:Q1,xhr:wx,fetch:ki&&(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}=Tf(e);u=u?(u+"").toLowerCase():"text";let y=Sx([o,s&&s.toAbortSignal()],i),g;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(c&&Ax&&r!=="get"&&r!=="head"&&(b=await Ix(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,T]=Ef(b,Di(Df(c)));n=If(_.body,Of,D,T)}}z.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:y,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let S=await fetch(g,h);const E=yc&&(u==="stream"||u==="response");if(yc&&(a||E&&p)){const _={};["status","statusText","headers"].forEach(M=>{_[M]=S[M]});const W=z.toFiniteNumber(S.headers.get("content-length")),[D,T]=a&&Ef(W,Di(Df(a),!0))||[];S=new Response(If(S.body,Of,D,()=>{T&&T(),p&&p()}),_)}u=u||"text";let C=await Ai[z.findKey(Ai,u)||"text"](S,e);return!E&&p&&p(),await new Promise((_,W)=>{Cf(_,W,{data:C,headers:or.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:g})})}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,g),{cause:w.cause||w}):Le.from(w,w&&w.code,e,g)}})};z.forEach(bc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jf=e=>`- ${e}`,Mx=e=>z.isFunction(e)||e===null||e===!1,Rf={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,!Mx(r)&&(n=bc[(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
- `+s.map(jf).join(`
159
- `):" "+jf(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:bc};function xc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qn(null,e)}function Nf(e){return xc(e),e.headers=or.from(e.headers),e.data=vc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Rf.getAdapter(e.adapter||Oo.adapter)(e).then(function(n){return xc(e),n.data=vc.call(e,e.transformResponse,n),n.headers=or.from(n.headers),n},function(n){return Sf(n)||(xc(e),n&&n.response&&(n.response.data=vc.call(e,e.transformResponse,n.response),n.response.headers=or.from(n.response.headers))),Promise.reject(n)})}const $f="1.11.0",Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Lf={};Ti.transitional=function(t,r,n){function o(s,i){return"[Axios v"+$f+"] 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&&!Lf[i]&&(Lf[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}},Ti.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Px(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 Ii={assertOptions:Px,validators:Ti},Hr=Ii.validators;let _n=class{constructor(t){this.defaults=t||{},this.interceptors={request:new bf,response:new bf}}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=xn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Ii.assertOptions(n,{silentJSONParsing:Hr.transitional(Hr.boolean),forcedJSONParsing:Hr.transitional(Hr.boolean),clarifyTimeoutError:Hr.transitional(Hr.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Ii.assertOptions(o,{encode:Hr.function,serialize:Hr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ii.assertOptions(r,{baseUrl:Hr.spelling("baseURL"),withXsrfToken:Hr.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"],g=>{delete s[g]}),r.headers=or.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 g=[Nf.bind(this),void 0];for(g.unshift(...a),g.push(...u),h=g.length,d=Promise.resolve(r);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let y=r;for(f=0;f<h;){const g=a[f++],p=a[f++];try{y=g(y)}catch(b){p.call(this,b);break}}try{d=Nf.call(this,y)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=xn(this.defaults,t);const r=kf(t.baseURL,t.url,t.allowAbsoluteUrls);return yf(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){_n.prototype[t]=function(r,n){return this.request(xn(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(xn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}_n.prototype[t]=r(),_n.prototype[t+"Form"]=r(!0)});let Ox=class h0{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 h0(function(o){t=o}),cancel:t}}};function jx(e){return function(r){return e.apply(null,r)}}function Rx(e){return z.isObject(e)&&e.isAxiosError===!0}const _c={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(_c).forEach(([e,t])=>{_c[t]=e});function zf(e){const t=new _n(e),r=rf(_n.prototype.request,t);return z.extend(r,_n.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return zf(xn(e,o))},r}const Nt=zf(Oo);Nt.Axios=_n,Nt.CanceledError=qn,Nt.CancelToken=Ox,Nt.isCancel=Sf,Nt.VERSION=$f,Nt.toFormData=Ci,Nt.AxiosError=Le,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=jx,Nt.isAxiosError=Rx,Nt.mergeConfig=xn,Nt.AxiosHeaders=or,Nt.formToJSON=e=>_f(z.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=Rf.getAdapter,Nt.HttpStatusCode=_c,Nt.default=Nt;const{Axios:t5,AxiosError:r5,CanceledError:n5,isCancel:o5,CancelToken:s5,VERSION:i5,all:a5,Cancel:c5,isAxiosError:l5,spread:u5,toFormData:d5,AxiosHeaders:f5,HttpStatusCode:p5,formToJSON:h5,getAdapter:m5,mergeConfig:g5}=Nt,Bf={token:null},Nx=e=>{Bf.token=e},wt=Nt.create({headers:{"Content-Type":"application/json"}});wt.interceptors.request.use(e=>{const t=Bf.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Ff=v.createContext(void 0),$x=({config:e,children:t})=>(v.useEffect(()=>{e.getToken&&Nx(e.getToken)},[e.getToken]),l.jsx(Ff.Provider,{value:e,children:t})),wc=()=>{const e=v.useContext(Ff);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Mi=()=>{const{calendarApiUrl:e}=wc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await wt.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 wt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await wt.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 wt.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 wt.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}}}},Wf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",Lx=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=Mi(),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:be.syncButton,onClick:s,children:[l.jsx("div",{className:be.customCheckIcon,children:l.jsx("div",{className:be.uncheckedCircle})}),l.jsx("img",{src:Wf,width:18}),l.jsx("span",{children:"Google Calendar"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Sc=()=>{const{calendarApiUrl:e}=wc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await wt.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 wt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await wt.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 wt.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 wt.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=",zx=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=Sc(),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:be.syncButton,onClick:s,children:[l.jsx("div",{className:be.customCheckIcon,children:l.jsx("div",{className:be.uncheckedCircle})}),l.jsx("img",{src:Hf,width:20}),l.jsx("span",{children:"Outlook"})]}),r&&l.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 wn extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class Cc extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Tr extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Bx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Fx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Wx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Vf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Hx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class Yf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Pi{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 V;(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"})(V||(V={}));class Ro{constructor(){}log(t,r){}}Ro.instance=new Ro;const Ux="10.0.0";class Ft{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 Sn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${Vx(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function Vx(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 Sn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function qf(e,t,r,n,o,s){const i={},[a,c]=Zn();i[a]=c,e.log(V.Trace,`(${t} transport) sending data. ${No(o,s.logMessageContent)}.`);const u=Sn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});e.log(V.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function Yx(e){return e===void 0?new Oi(V.Information):e===null?Ro.instance:e.log!==void 0?e:new Oi(e)}class qx{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 Oi{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${V[t]}: ${r}`;switch(t){case V.Critical:case V.Error:this.out.error(n);break;case V.Warning:this.out.warn(n);break;case V.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,Zx(Ux,Gx(),Qx(),Kx())]}function Zx(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 Gx(){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 Kx(){if(Dt.isNode)return process.versions.node}function Qx(){return Dt.isNode?"NodeJS":"Browser"}function Ec(e){return e.stack?e.stack:e.message?e.message:`${e}`}function Xx(){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 Jx extends Pi{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(Xx());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 Tr;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 Tr});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(V.Warning,"Timeout from HTTP request."),n=new Cc},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Sn(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(V.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Zf(s,"text");throw new wn(c||s.statusText,s.status)}const a=await Zf(s,t.responseType);return new Yf(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 Zf(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 e_ extends Pi{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Tr):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&&(Sn(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 Tr)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new Yf(o.status,o.statusText,o.response||o.responseText)):n(new wn(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(V.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new wn(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(V.Warning,"Timeout from HTTP request."),n(new Cc)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class t_ extends Pi{constructor(t){if(super(),typeof fetch<"u"||Dt.isNode)this._httpClient=new Jx(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new e_(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Tr):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 r_{writeHandshakeRequest(t){return fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(Sn(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 n_{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 qx(this,t)}}class o_{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=()=>{};Sn(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 s_(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,Sn(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 s_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const i_=30*1e3,a_=15*1e3,c_=1e5;var bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(bt||(bt={}));class Dc{static create(t,r,n,o,s,i,a){return new Dc(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(V.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")},Ft.isRequired(t,"connection"),Ft.isRequired(r,"logger"),Ft.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??i_,this.keepAliveIntervalInMilliseconds=i??a_,this._statefulReconnectBufferSize=a??c_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new r_,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(V.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(V.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=bt.Disconnected,this._logger.log(V.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(V.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(V.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 o_(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(V.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(V.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(V.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(V.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(V.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 Tr("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 n_;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(V.Error,`Invoke client method threw error: ${Ec(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(V.Error,`Stream callback threw error: ${Ec(s)}`)}}break}case $e.Ping:break;case $e.Close:{this._logger.log(V.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(V.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(V.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(V.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(V.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(V.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(V.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(V.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(V.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(V.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(V.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(V.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Tr("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(V.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(V.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(V.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(V.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(V.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==bt.Reconnecting){this._logger.log(V.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(V.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(V.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=bt.Connected,this._logger.log(V.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(V.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(V.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==bt.Reconnecting){this._logger.log(V.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(V.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(V.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(V.Error,`Stream 'error' callback called with '${t}' threw error: ${Ec(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 l_=[0,2e3,1e4,3e4,null];class Gf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:l_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Cn{}Cn.Authorization="Authorization",Cn.Cookie="Cookie";class u_ extends Pi{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[Cn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Cn.Authorization]&&delete t.headers[Cn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Ht;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Ht||(Ht={}));var Jt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Jt||(Jt={}));let d_=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 Kf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new d_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._url=t,this._logger.log(V.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(V.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(V.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new wn(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(V.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(V.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(V.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new wn(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(V.Trace,`(LongPolling transport) data received. ${No(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(V.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof Cc?this._logger.log(V.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(V.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(V.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?qf(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(V.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(V.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 wn&&(s.statusCode===404?this._logger.log(V.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(V.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(V.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(V.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(V.Trace,t),this.onclose(this._closeError)}}}class f_{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 Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._logger.log(V.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(V.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(V.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?qf(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 p_{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){Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._logger.log(V.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[Cn.Authorization]=`Bearer ${n}`),a&&(u[Cn.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(V.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(V.Information,`(WebSockets transport) ${d}.`)},i.onmessage=u=>{if(this._logger.log(V.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(V.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(V.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 Qf=100;class h_{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Ft.isRequired(t,"url"),this._logger=Yx(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 u_(r.httpClient||new t_(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,Ft.isIn(t,Jt,"transferFormat"),this._logger.log(V.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(V.Error,r),await this._stopPromise,Promise.reject(new Tr(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(V.Error,r),Promise.reject(new Tr(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 kc(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(V.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(V.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(V.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(V.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===Ht.WebSockets)this.transport=this._constructTransport(Ht.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 Tr("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<Qf);if(o===Qf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Kf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(V.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(V.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(V.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 Vf("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 wn&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(V.Error,a),Promise.reject(new Vf(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(V.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(V.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,i.push(new Wx(`${u.transport} failed: ${f}`,Ht[u.transport])),this._connectionState!=="Connecting"){const h="Failed to select transport before stop() was called.";return this._logger.log(V.Debug,h),Promise.reject(new Tr(h))}}}}return i.length>0?Promise.reject(new Hx(`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 Ht.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new p_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Ht.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new f_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Ht.LongPolling:return new Kf(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=Ht[t.transport];if(s==null)return this._logger.log(V.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(m_(r,s))if(t.transferFormats.map(a=>Jt[a]).indexOf(n)>=0){if(s===Ht.WebSockets&&!this._options.WebSocket||s===Ht.ServerSentEvents&&!this._options.EventSource)return this._logger.log(V.Debug,`Skipping transport '${Ht[s]}' because it is not supported in your environment.'`),new Bx(`'${Ht[s]}' is not supported in your environment.`,s);this._logger.log(V.Debug,`Selecting transport '${Ht[s]}'.`);try{return this.features.reconnect=s===Ht.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(V.Debug,`Skipping transport '${Ht[s]}' because it does not support the requested transfer format '${Jt[n]}'.`),new Error(`'${Ht[s]}' does not support ${Jt[n]}.`);else return this._logger.log(V.Debug,`Skipping transport '${Ht[s]}' because it was disabled by the client.`),new Fx(`'${Ht[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(V.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(V.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(V.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(V.Error,`Connection disconnected with error '${t}'.`):this._logger.log(V.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(V.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(V.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(V.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 m_(e,t){return!e||(t&e)!==0}class kc{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new ji,this._transportResult=new ji,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new ji),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 ji;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):kc._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 ji{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const g_="json";class v_{constructor(){this.name=g_,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(V.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 y_={trace:V.Trace,debug:V.Debug,info:V.Information,information:V.Information,warn:V.Warning,warning:V.Warning,error:V.Error,critical:V.Critical,none:V.None};function b_(e){const t=y_[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class x_{configureLogging(t){if(Ft.isRequired(t,"logging"),__(t))this.logger=t;else if(typeof t=="string"){const r=b_(t);this.logger=new Oi(r)}else this.logger=new Oi(t);return this}withUrl(t,r){return Ft.isRequired(t,"url"),Ft.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Ft.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 Gf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Gf,this}withServerTimeout(t){return Ft.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Ft.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 h_(this.url,t);return Dc.create(r,this.logger||Ro.instance,this.protocol||new v_,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function __(e){return e.log!==void 0}var $o={},Xf;function w_(){if(Xf)return $o;Xf=1;var e=rt();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(ht()),r=lt();return $o.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"),$o}var S_=w_();const Jf=tt(S_);var Lo={},ep;function C_(){if(ep)return Lo;ep=1;var e=rt();Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;var t=e(ht()),r=lt();return Lo.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"),Lo}var E_=C_();const Ur=tt(E_);function Ac(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function zo(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 Bo(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)?k_(a,f=>f.test(i)):D_(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 D_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function k_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function A_(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 T_(e,...t){const r=ac.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const I_={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"}},M_=(e,t,r)=>{let n;const o=I_[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},P_={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},O_={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},j_={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R_={date:Ac({formats:P_,defaultWidth:"full"}),time:Ac({formats:O_,defaultWidth:"full"}),dateTime:Ac({formats:j_,defaultWidth:"full"})},N_={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"},$_={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"},L_=(e,t,r,n)=>t.getHours()!==1?$_[e]:N_[e],z_={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},B_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},F_={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"]},W_={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"]},H_={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"}},U_={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"}},V_={ordinalNumber:(e,t)=>Number(e)+"º",era:zo({values:z_,defaultWidth:"wide"}),quarter:zo({values:B_,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:zo({values:F_,defaultWidth:"wide"}),day:zo({values:W_,defaultWidth:"wide"}),dayPeriod:zo({values:H_,defaultWidth:"wide",formattingValues:U_,defaultFormattingWidth:"wide"})},Y_=/^(\d+)(º)?/i,q_=/\d+/i,Z_={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},G_={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]},K_={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Q_={any:[/1/i,/2/i,/3/i,/4/i]},X_={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},J_={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]},ew={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},tw={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]},rw={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},nw={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}},ow={ordinalNumber:A_({matchPattern:Y_,parsePattern:q_,valueCallback:function(e){return parseInt(e,10)}}),era:Bo({matchPatterns:Z_,defaultMatchWidth:"wide",parsePatterns:G_,defaultParseWidth:"any"}),quarter:Bo({matchPatterns:K_,defaultMatchWidth:"wide",parsePatterns:Q_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bo({matchPatterns:X_,defaultMatchWidth:"wide",parsePatterns:J_,defaultParseWidth:"any"}),day:Bo({matchPatterns:ew,defaultMatchWidth:"wide",parsePatterns:tw,defaultParseWidth:"any"}),dayPeriod:Bo({matchPatterns:rw,defaultMatchWidth:"any",parsePatterns:nw,defaultParseWidth:"any"})},sw={code:"es",formatDistance:M_,formatLong:R_,formatRelative:L_,localize:V_,match:ow,options:{weekStartsOn:1,firstWeekContainsDate:1}},tp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFR3BMcHCAcHBwaGx4ZWp6aG14aG54Zm14aW15aG55aG15aW55aW56aW5591zvEAAAAA10Uk5TABAQIDBBYHCAnr7g7wYb6DAAAACqSURBVHjahZJLDgMhDEM9UL7Ju/91q8KgQhcdb5D8rFiJ0JNC6Qbeczzt6izV8PWjAbiNB4uH35IkpbaRYGBpT9mcVlemtnCTOiLA8BPk+/VPIkPTR/kGalAkdUgnSNAlOegEckwS2C8wOAEWN2D4BC8HH3Xge/naYJUXaJq6Wo+S2iy7HJKW1sbHSc6B0mU7SeOIf8++CJg5nHOvypLXoF0xdwfrJTx9mzdxpgqGKfcyxQAAAABJRU5ErkJggg==",iw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAMAAABZu7juAAAAPFBMVEUAAABobHhobnhpbnlobnhobXhpbnlpbnpobXhwcHNobHhlanlpbnlobnhobnpobXhmbXlocHhpbHZpbnlt0ET4AAAAE3RSTlMAIGDggL/f76AQQDDPsLCQcEBQZL6CzQAAALVJREFUSMft1MsOgyAQhWEGHQa82/P+71rDojhJ6dCNi9ZvZcivQUjGXWeTQHqFJvS1mgDMemkGQJV8AMB6iQHsb9K0RZ4ACCsCYOLoSccrDPH0AgWYAqm6vY9owuVAmgzq46aY84BGknM0S/nqm9Ef5tIZROXeGfyd3/lP5Kk9T+4gAGYrj68pxjiMn2sqI9iX6V0zhtOO8zO4r1k5B8F9NeBH9dsWr/ZmCLs+10VQ1S0Pd4UnLwhFRUE6UNsAAAAASUVORK5CYII=",aw=({notificacion:e,onAccept:t})=>{const{evento:r,tipo:n,leida:o}=e,s=n==="EventoCreado"||n==="EventoModificado",a={EventoCreado:{frase:"te ha invitado a:",colorTitulo:"#3c4043"},EventoModificado:{frase:"ha modificado el evento",colorTitulo:"#3c4043"},EventoCancelado:{frase:"ha cancelado el evento",colorTitulo:"#d32f2f"}}[n]||{frase:"te ha notificado sobre",colorTitulo:"#3c4043"},c=r?.fechaInicio?new Date(r.fechaInicio):new Date,u=r?.fechaFin?new Date(r.fechaFin):null,d=r?.nombreAnfitrion||"Usuario",f=e?.titulo||"Sin título",h=y=>y.split(" ").filter(g=>g).map(g=>g[0]).join("").toUpperCase().substring(0,2);return l.jsxs(m.Box,{sx:{p:2,mb:1,bgcolor:"white",borderRadius:"8px",border:"1px solid #e0e0e0",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",position:"relative",overflow:"hidden"},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:1},children:[l.jsx(m.Avatar,{sx:{bgcolor:"#F5A623",width:34,height:34,fontSize:"14px",mr:1.5,fontWeight:"bold"},children:h(d)}),l.jsxs(m.Box,{children:[l.jsxs(m.Typography,{sx:{fontSize:"14px",color:"#5f6368",lineHeight:1.2},children:[d," ",a.frase]}),l.jsx(m.Typography,{sx:{fontSize:"14px",fontWeight:700,color:a.colorTitulo},children:f})]})]}),l.jsx(m.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:0},children:[l.jsx("img",{src:iw,width:20,alt:"cal",style:{marginRight:15,color:"black"}}),l.jsx(m.Typography,{sx:{fontSize:"14px",color:"#3c4043",textTransform:"capitalize"},children:x.format(c,"EEEE, dd 'de' MMMM",{locale:sw})})]}),l.jsx(m.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:s&&!o?2:0},children:[l.jsx("img",{src:tp,width:20,alt:"watch",style:{marginRight:15}}),l.jsxs(m.Typography,{sx:{fontSize:"14px",color:"#3c4043"},children:[x.format(c,"h:mm a").toLowerCase(),u?` - ${x.format(u,"h:mm a").toLowerCase()}`:""]})]}),s&&!o&&l.jsxs(m.Grid,{container:!0,spacing:1,sx:{mt:1},children:[l.jsx(m.Grid,{item:!0,xs:6,children:l.jsx(m.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:l.jsx(Jf,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"CONFIRMADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#1976D2",borderColor:"#1976D2",py:.8,px:1,whiteSpace:"nowrap"},children:"Asistiré"})}),l.jsx(m.Grid,{item:!0,xs:6,children:l.jsx(m.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:l.jsx(Ur,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"RECHAZADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#D32F2F",borderColor:"#D32F2F",py:.8,px:1,whiteSpace:"nowrap"},children:"Rechazar"})})]})]})},cw="http://localhost:5173/hubs/invitaciones/",lw=({userId:e,notifications:t,onAceppInvitacion:r})=>{const[n,o]=v.useState(),[s,i]=v.useState(null);v.useEffect(()=>{o(t)},[t]);const a=v.useCallback(c=>{console.log("invitation",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:"",fechaFin:c.FechaFin}};o(d=>[u])},[]);return v.useEffect(()=>{if(!e)return;const c=new x_().withUrl(cw+`?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(m.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:l.jsx(m.List,{disablePadding:!0,children:n?.length===0?l.jsxs("div",{className:be.emptyStateContainer,children:[l.jsx("img",{src:Uf,alt:"Todo en orden",className:be.emptyStateImage}),l.jsx("h4",{className:be.emptyStateTitle,children:"Todo en orden aquí"}),l.jsx("p",{className:be.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):n?.map(c=>l.jsx(aw,{notificacion:c,onAccept:r}))})})},uw=({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:y,onAceppInvitacion:g})=>{const{session:p,sessionoutlook:b}=lc(),{enqueueSnackbar:w}=_s.useSnackbar(),S=N=>{const le=new Date,de={start:x.startOfDay(le),end:x.endOfDay(le)},$={start:N.fechaInicio,end:N.fechaFin};return Ud(de,$)?"Hoy":x.isTomorrow(N.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(N.fechaInicio)},E={};t.forEach(N=>{const le=S(N);E[le]||(E[le]=[]),E[le].push(N)});const[C,_]=v.useState(!1),W=()=>{_(!C)},D=Mi(),T=Sc(),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 T.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]=v.useState("events"),F=N=>{G(N)},[Y,se]=v.useState(!0),U=()=>{se(N=>!N)};return l.jsxs("div",{className:be.sidebarContainer,children:[l.jsxs("div",{className:be.leadsSection,children:[l.jsxs("div",{className:be.leadCard,children:[l.jsx("div",{className:be.leadIcon,children:l.jsx("img",{src:Jd})}),l.jsxs("div",{className:be.leadText,children:[l.jsx("div",{className:be.leadDays,children:"+30 días sin atender"}),l.jsxs("div",{className:be.leadCount,children:[r," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),l.jsxs("div",{className:be.leadCard,children:[l.jsx("div",{className:be.leadIcon,children:l.jsx("img",{src:Jd})}),l.jsxs("div",{className:be.leadText,children:[l.jsx("div",{className:be.leadDays,children:"+90 días sin atender"}),l.jsxs("div",{className:be.leadCount,children:[n," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),l.jsxs("div",{className:be.eventsSection,children:[l.jsxs("div",{className:be.tabsContainer,children:[l.jsx("button",{className:`${be.tabButton} ${H==="events"?be.activeTab:""}`,onClick:()=>F("events"),children:"Eventos"}),l.jsxs("button",{className:`${be.tabButton} ${H==="alerts"?be.activeTab:""}`,onClick:()=>F("alerts"),children:["Alertas",y>0&&l.jsx("span",{className:be.alertBadge,children:y>99?"99+":y})]})]}),l.jsxs("div",{className:be.eventsContainer,children:[H==="events"&&l.jsx(l.Fragment,{children:Object.keys(E).length>0?Object.entries(E).map(([N,le])=>l.jsxs("div",{className:`${be.eventGroup}`,children:[l.jsxs("div",{className:be.eventGroupDate,children:[l.jsx("img",{src:u1,width:15})," ",N]}),le.map(de=>{const $=ke(de.color||"#ffcc00"),Q=$.toString(),we=$.clone().darken(15).toString(),_e=new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"2-digit",hour12:!0});return l.jsxs("div",{className:be.eventItem,style:{backgroundColor:Q,borderLeft:`4px solid ${we}`,display:"flex",alignItems:"center",padding:"10px",marginBottom:"8px",borderRadius:"4px",cursor:"pointer"},onClick:()=>e(de),children:[l.jsxs("div",{className:be.eventDetails,style:{flex:1},children:[l.jsx("div",{className:be.eventTitle,style:{fontWeight:"500",fontSize:"12px",color:"#333"},children:de.titulo.length>32?`${de.titulo.substring(0,32)}...`:de.titulo}),de.nombreAnfitrion&&l.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"4px",color:"#555"},children:[l.jsx("img",{src:ef,width:16,style:{marginRight:"6px",opacity:.7}}),l.jsx("span",{style:{fontSize:"13px"},children:de.nombreAnfitrion})]}),l.jsx("div",{className:be.eventTime,style:{fontSize:"12px",marginTop:"4px",opacity:.7},children:`${_e.format(de.fechaInicio).toLowerCase()} - ${_e.format(de.fechaFin).toLowerCase()}`})]}),de.link&&l.jsx("a",{onClick:he=>he.stopPropagation(),href:de.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",padding:"4px"},children:l.jsx("img",{src:d1,alt:"Video",width:20,style:{opacity:.8}})})]},de.eventoID)})]},N)):l.jsxs("div",{className:be.emptyStateContainer,children:[l.jsx("img",{src:Uf,alt:"Todo en orden",className:be.emptyStateImage}),l.jsx("h4",{className:be.emptyStateTitle,children:"Tu agenda está despejada"}),l.jsx("p",{className:be.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),l.jsxs("button",{className:be.addEventButton,onClick:i,children:[l.jsx("img",{src:Bd}),"Agregar evento"]})]})}),H==="alerts"&&l.jsx(m.Box,{children:l.jsx(lw,{userId:s,notifications:h,onAceppInvitacion:g})})]})]}),l.jsxs("div",{className:be.calendarsSection,children:[l.jsxs("button",{onClick:W,className:be.collapsibleHeader,children:[l.jsxs("div",{className:be.headerTitle,children:[l.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),l.jsx("span",{className:be.calendarCount,children:"1"})]}),l.jsx(L2,{className:`${be.chevronIcon} ${C?be.collapsed:""}`})]}),l.jsxs("div",{className:`${be.collapsibleContent} ${C?be.hidden:""}`,children:[l.jsxs("button",{className:`${be.calendarSelectButton} ${Y?be.calendarSelected:""}`,onClick:U,style:{"--calendar-color":"#1976D2"},children:[l.jsx("div",{className:be.customCheckIcon,children:l.jsx("div",{className:be.circularCheckbox,children:l.jsx(ic,{size:16,className:be.checkedIcon})})}),l.jsx($2,{size:16,className:be.calendarIcon}),l.jsx("span",{className:be.calendarItemText,children:"Mi calendario"})]}),b.userEmail?l.jsxs("div",{className:be.syncButton,onClick:I,children:[l.jsx("div",{className:be.circularCheckbox,children:l.jsx(ic,{size:16,className:be.checkedIcon})}),l.jsx("img",{src:Hf,width:20}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):l.jsx(zx,{disID:o,usrID:s}),p?.userEmail?l.jsxs("div",{className:be.syncButton,onClick:M,children:[l.jsx("div",{className:be.circularCheckbox,children:l.jsx(ic,{size:16,className:be.checkedIcon})}),l.jsx("img",{src:Wf,width:18}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):l.jsx(Lx,{disID:o,usrID:s}),b?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:be.currentUserCalendarTitle,style:{marginTop:"10px"},children:b?.userEmail}),u?l.jsx(m.CircularProgress,{size:24}):c.length>0?l.jsx(m.List,{dense:!0,className:be.calendarsList,children:c.map(N=>l.jsx(m.ListItem,{secondaryAction:l.jsx(m.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(m.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:be.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:be.currentUserCalendarTitle,style:{marginTop:"10px"},children:p?.userEmail}),u?l.jsx(m.CircularProgress,{size:24}):a.length>0?l.jsx(m.List,{dense:!0,className:be.calendarsList,children:a.map(N=>l.jsx(m.ListItem,{secondaryAction:l.jsx(m.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(m.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:be.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},En={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 Fo={},rp;function dw(){if(rp)return Fo;rp=1;var e=rt();Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=void 0,o(v);var t=e(ht()),r=lt();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 Fo.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"),Fo}var fw=dw();const pw=tt(fw);var Wo={},np;function hw(){if(np)return Wo;np=1;var e=rt();Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0;var t=e(ht()),r=lt();return Wo.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"),Wo}var mw=hw();const gw=tt(mw),op=46,vw=22,yw=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[En.dayCell,o?"":En.notCurrentMonth,En.CurrentDay].join(" ").trim(),u=v.useRef(null),[d,f]=v.useState(r.length),h=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});v.useLayoutEffect(()=>{const p=()=>{if(u.current){const b=u.current.clientHeight;let w=Math.floor(b/(op+4));if(w<r.length){const S=Math.floor((b-vw)/(op+4));w=Math.max(0,S)}f(w)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const y=r.slice(0,d===0?1:d),g=r.length-(d===0?1:d);return l.jsxs("div",{className:`${c} ${En.dayCellContainer}`,onClick:()=>s?.(t),style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsx("div",{className:n?En.dayNumber:En.dayNumberToday,children:e}),l.jsxs("div",{className:En.eventsList,ref:u,style:{flex:1,display:"flex",flexDirection:"column",gap:"4px",padding:"0 4px 4px 4px",marginTop:"4px",overflow:"hidden"},children:[y.map(p=>{const b=p.color||"#D7EBFB",w=p.isGoogleEvent||p.isOutlookEvent;return l.jsxs(m.Box,{onClick:S=>{S.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 ${ke(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(pw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#4285F4"}}),p.isOutlookEvent&&l.jsx(gw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#0078D4"}}),l.jsx(m.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(m.Typography,{sx:{fontSize:"9px",color:"#70757a",mt:"auto",fontWeight:400},children:`${h.format(p.fechaInicio).toLowerCase()} - ${h.format(p.fechaFin).toLowerCase()}`})]},p.eventoID)}),g>0&&l.jsxs(m.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:["+",g," más"]})]})]})},sp={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},bw=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return l.jsx("div",{className:sp.weekDaysContainer,children:e.map(t=>l.jsx("div",{className:sp.weekDay,children:t},t))})},Ri={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function xw(e,t){const[r,n]=T_(e,t.start,t.end);return{start:r,end:n}}function _w(e,t){const{start:r,end:n}=xw(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(ac(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function ww(e,t){const r=t?.weekStartsOn,n=an(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 Sw(e,t,r){const n=+an(e,r?.in),[o,s]=[+an(t.start,r?.in),+an(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Cw=({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=ww(i,{weekStartsOn:1}),u=_w({start:a,end:c}),d={},f=u.length/7,h=`${Ri.daysContainer} ${f===5?Ri.rows5:Ri.rows6}`;return t.forEach(y=>{const g=x.format(y.fechaInicio,"yyyy-MM-dd");d[g]||(d[g]=[]),d[g].push(y)}),l.jsxs("div",{className:Ri.calendarGridContainer,children:[l.jsx(bw,{}),l.jsx("div",{className:h,children:u.map(y=>{const g=t.filter(p=>Sw(y,{start:x.startOfDay(p.fechaInicio),end:x.endOfDay(p.fechaFin)}));return l.jsx(yw,{dayNumber:y.getDate(),date:y,events:g,isToday:x.isToday(y),isCurrentMonth:x.isSameMonth(y,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},y.toISOString())})})]})},Tc=()=>{const{calendarApiUrl:e}=wc(),t=async g=>{try{return(await wt.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${g}`)).data.map(b=>{const w=new Date(b.fechaInicio),S=new Date(b.fechaFin),E=b.solicitudRelacionada?.[0]?.nombreCliente??null;return{...b,fechaInicio:w,fechaFin:S,client:E}})}catch(p){return console.error("Error events:",p),[]}},r=async(g,p)=>{try{const b=await wt.post(`${e}/api/Calendario/v1/local/InsertarEvento/${p}`,g);return{...b.data,fechaInicio:new Date(b.data.fechaInicio),fechaFin:new Date(b.data.fechaFin)}}catch(b){throw console.log("Error creating event:",b),b}},n=async g=>{try{const p=await wt.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${g.eventoID}`,g);return{eventoID:p.data.eventoID,titulo:p.data.titulo,descripcion:p.data.descripcion,fechaInicio:new Date(p.data.fechaInicio),fechaFin:new Date(p.data.fechaFin),todoElDia:p.data.todoElDia,color:p.data.color,repetir:p.data.repetir,link:p.data.link,solID:p.data.solID,disID:p.data.disID,client:p.data.client}}catch(p){throw console.log("Error updating event:",p),p}},o=async g=>{try{const p=await wt.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${g}`),b=p.data[0].solicitudRelacionada?.[0]?.nombreCliente||null;return{...p.data[0],fechaInicio:p.data[0].fechaInicio,fechaFin:p.data[0].fechaFin,client:b}}catch(p){throw console.error(`Error fetching event with ID ${g}:`,p),p}},s=async g=>{try{await wt.post(`${e}/api/Calendario/v1/local/EliminarEvento/${g}`)}catch(p){throw console.log(`Error ID ${g}:`,p),p}},i=v.useCallback(async(g,p,b,w)=>{try{const S={masNombreBD:b,usrID:w,disID:p,nombreCliente:g},C=(await wt.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,S)).data?.data;return Array.isArray(C)?C.map(_=>({clienteID:_.clienteID,solID:_.solID,marca:_?.marca,modelo:_?.modelo,nombreCliente:_?.nombreCliente})):[]}catch(S){return console.error("Error clientes:",S),[]}},[e]),a=v.useCallback(async(g,p)=>{try{const b={disID:g,usrMail:p},S=(await wt.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,b)).data?.data;return Array.isArray(S)?S.map(E=>({usrID:E.usrID,usrNombre:E.usrNombre,usrMail:E?.usrMail,disID:E?.disID})):[]}catch(b){return console.error("Error usuarios:",b),[]}},[e]),c=async(g,p,b,w,S)=>{const E={tieneConflicto:!1,usrMail:""};try{const C={disID:g,usrMail:p,startDate:b,horaInicio:w,horaFin:S};return(await wt.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,C)).data?.data}catch(C){return console.error("Error al verificar conflicto:",C),E}},u=v.useCallback(async(g,p,b,w)=>{try{const S={disID:g,usrMail:p,startDate:b,DuracionEvento:w},C=(await wt.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,S)).data?.data;return Array.isArray(C)?C.map(_=>({Fecha:_.fecha,HoraInicio:_.horaInicio,HoraFin:_.horaFin})):[]}catch(S){return console.error("Error usuarios:",S),[]}},[e]),d=v.useCallback(async(g,p=!1)=>{try{const b=await wt.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${g}?soloNoLeidas=${p}`);return console.log("response.data",b.data),b.data}catch(b){return console.error("Error usuarios:",b),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:u,getNotificacionesXUsuario:d,UpdateStatusEvento:async(g,p,b)=>{try{const w={EventoID:g,UsuarioID:p,status:b};return(await wt.post(`${e}/api/Calendario/v1/local/ActualizarEstadoInvitacionAsync/`,w)).data}catch(w){return console.error("Error Actualizar estatus:",w),{}}},MarcarLeido:async(g,p)=>{try{return(await wt.post(`${e}/api/Notificaciones/v1/local/MarcarComoLeidaAsync/${g}?usuarioId=${p}&marcarComoLeida=true`)).data?.data}catch(b){return console.error("Error Actualizar estatus:",b),{}}},ReenviarNotificacion:async(g,p)=>{try{const b=await wt.post(`${e}/api/Calendario/v1/local/ReenviarNotificacion/${p}/${g}`);return console.log("reenviar",b),b.data?.data}catch(b){return console.error("Error Actualizar estatus:",b),{}}}}};var Ho={},ip;function Ew(){if(ip)return Ho;ip=1;var e=rt();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var t=e(ht()),r=lt();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 Dw=Ew();const Ic=tt(Dw);var Uo=e=>e.type==="checkbox",Dn=e=>e instanceof Date,tr=e=>e==null;const ap=e=>typeof e=="object";var $t=e=>!tr(e)&&!Array.isArray(e)&&ap(e)&&!Dn(e),cp=e=>$t(e)&&e.target?Uo(e.target)?e.target.checked:e.target.value:e,kw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lp=(e,t)=>e.has(kw(t)),Aw=e=>{const t=e.constructor&&e.constructor.prototype;return $t(t)&&t.hasOwnProperty("isPrototypeOf")},Mc=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ut(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(!(Mc&&(e instanceof Blob||n))&&(r||$t(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Aw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ut(e[o]));else return e;return t}var Ni=e=>/^\w*$/.test(e),Lt=e=>e===void 0,Pc=e=>Array.isArray(e)?e.filter(Boolean):[],Oc=e=>Pc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pe=(e,t,r)=>{if(!t||!$t(e))return r;const n=(Ni(t)?[t]:Oc(t)).reduce((o,s)=>tr(o)?o:o[s],e);return Lt(n)||n===e?Lt(e[t])?r:e[t]:n},pr=e=>typeof e=="boolean",ut=(e,t,r)=>{let n=-1;const o=Ni(t)?[t]:Oc(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=$t(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const $i={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ir={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"},jc=v.createContext(null);jc.displayName="HookFormContext";const Rc=()=>v.useContext(jc),Tw=e=>{const{children:t,...r}=e;return v.createElement(jc.Provider,{value:r},t)};var up=(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]!==Ir.all&&(t._proxyFormState[i]=!n||Ir.all),r&&(r[i]=!0),e[i]}});return o};const Nc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Iw(e){const t=Rc(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[i,a]=v.useState(r._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Nc(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&a({...r._formState,...u})}}),[o,n,s]),v.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),v.useMemo(()=>up(i,r,c.current,!1),[i,r])}var Vr=e=>typeof e=="string",dp=(e,t,r,n,o)=>Vr(e)?(n&&t.watch.add(e),pe(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),pe(r,s))):(n&&(t.watchAll=!0),r),$c=e=>tr(e)||!ap(e);function Xr(e,t,r=new WeakSet){if($c(e)||$c(t))return e===t;if(Dn(e)&&Dn(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(Dn(i)&&Dn(a)||$t(i)&&$t(a)||Array.isArray(i)&&Array.isArray(a)?!Xr(i,a,r):i!==a)return!1}}return!0}function fp(e){const t=Rc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=v.useRef(o),u=v.useRef(a),d=v.useRef(void 0);u.current=a;const f=v.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,y]=v.useState(u.current?u.current(f):f);return Nc(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:g=>{if(!s){const p=dp(n,r._names,g.values||r._formValues,!1,c.current);if(u.current){const b=u.current(p);Xr(b,d.current)||(y(b),d.current=b)}else y(p)}}}),[r,s,n,i]),v.useEffect(()=>r._removeUnmounted()),h}function Mw(e){const t=Rc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=lp(o._names.array,r),c=v.useMemo(()=>pe(o._formValues,r,pe(o._defaultValues,r,i)),[o,r,i]),u=fp({control:o,name:r,defaultValue:c,exact:!0}),d=Iw({control:o,name:r,exact:!0}),f=v.useRef(e),h=v.useRef(o.register(r,{...e.rules,value:u,...pr(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const y=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!pe(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!pe(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!pe(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!pe(d.validatingFields,r)},error:{enumerable:!0,get:()=>pe(d.errors,r)}}),[d,r]),g=v.useCallback(S=>h.current.onChange({target:{value:cp(S),name:r},type:$i.CHANGE}),[r]),p=v.useCallback(()=>h.current.onBlur({target:{value:pe(o._formValues,r),name:r},type:$i.BLUR}),[r,o._formValues]),b=v.useCallback(S=>{const E=pe(o._fields,r);E&&S&&(E._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:C=>S.setCustomValidity(C),reportValidity:()=>S.reportValidity()})},[o._fields,r]),w=v.useMemo(()=>({name:r,value:u,...pr(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:g,onBlur:p,ref:b}),[r,n,d.disabled,g,p,b,u]);return v.useEffect(()=>{const S=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...pr(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(C,_)=>{const W=pe(o._fields,C);W&&W._f&&(W._f.mount=_)};if(E(r,!0),S){const C=Ut(pe(o._options.defaultValues,r));ut(o._defaultValues,r,C),Lt(pe(o._formValues,r))&&ut(o._formValues,r,C)}return!a&&o.register(r),()=>{(a?S&&!o._state.action:S)?o.unregister(r):E(r,!1)}},[r,o,a,s]),v.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),v.useMemo(()=>({field:w,formState:d,fieldState:y}),[w,d,y])}const hr=e=>e.render(Mw(e));var Lc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Vo=e=>Array.isArray(e)?e:[e],pp=()=>{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=[]}}},sr=e=>$t(e)&&!Object.keys(e).length,zc=e=>e.type==="file",Mr=e=>typeof e=="function",Li=e=>{if(!Mc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hp=e=>e.type==="select-multiple",Bc=e=>e.type==="radio",Pw=e=>Bc(e)||Uo(e),Fc=e=>Li(e)&&e.isConnected;function Ow(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Lt(e)?n++:e[t[n++]];return e}function jw(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function Wt(e,t){const r=Array.isArray(t)?t:Ni(t)?[t]:Oc(t),n=r.length===1?e:Ow(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&($t(n)&&sr(n)||Array.isArray(n)&&jw(n))&&Wt(e,r.slice(0,-1)),e}var mp=e=>{for(const t in e)if(Mr(e[t]))return!0;return!1};function zi(e,t={}){const r=Array.isArray(e);if($t(e)||r)for(const n in e)Array.isArray(e[n])||$t(e[n])&&!mp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},zi(e[n],t[n])):tr(e[n])||(t[n]=!0);return t}function gp(e,t,r){const n=Array.isArray(e);if($t(e)||n)for(const o in e)Array.isArray(e[o])||$t(e[o])&&!mp(e[o])?Lt(t)||$c(r[o])?r[o]=Array.isArray(e[o])?zi(e[o],[]):{...zi(e[o])}:gp(e[o],tr(t)?{}:t[o],r[o]):r[o]=!Xr(e[o],t[o]);return r}var Yo=(e,t)=>gp(e,t,zi(t));const vp={value:!1,isValid:!1},yp={value:!0,isValid:!0};var bp=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&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?yp:{value:e[0].value,isValid:!0}:yp:vp}return vp},xp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Lt(e)?e:t?e===""?NaN:e&&+e:r&&Vr(e)?new Date(e):n?n(e):e;const _p={isValid:!1,value:null};var wp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,_p):_p;function Sp(e){const t=e.ref;return zc(t)?t.files:Bc(t)?wp(e.refs).value:hp(t)?[...t.selectedOptions].map(({value:r})=>r):Uo(t)?bp(e.refs).value:xp(Lt(t.value)?e.ref.value:t.value,e)}var Rw=(e,t,r,n)=>{const o={};for(const s of e){const i=pe(t,s);i&&ut(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Bi=e=>e instanceof RegExp,qo=e=>Lt(e)?e:Bi(e)?e.source:$t(e)?Bi(e.value)?e.value.source:e.value:e,Cp=e=>({isOnSubmit:!e||e===Ir.onSubmit,isOnBlur:e===Ir.onBlur,isOnChange:e===Ir.onChange,isOnAll:e===Ir.all,isOnTouch:e===Ir.onTouched});const Ep="AsyncFunction";var Nw=e=>!!e&&!!e.validate&&!!(Mr(e.validate)&&e.validate.constructor.name===Ep||$t(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ep)),$w=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Dp=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Zo=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=pe(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(Zo(a,t))break}else if($t(a)&&Zo(a,t))break}}};function kp(e,t,r){const n=pe(e,r);if(n||Ni(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=pe(t,s),a=pe(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 Lw=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return sr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Ir.all))},zw=(e,t,r)=>!e||!t||e===t||Vo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Bw=(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,Fw=(e,t)=>!Pc(pe(e,t)).length&&Wt(e,t),Ww=(e,t,r)=>{const n=Vo(pe(e,r));return ut(n,"root",t[r]),ut(e,r,n),e},Fi=e=>Vr(e);function Ap(e,t,r="validate"){if(Fi(e)||Array.isArray(e)&&e.every(Fi)||pr(e)&&!e)return{type:r,message:Fi(e)?e:"",ref:t}}var Gn=e=>$t(e)&&!Bi(e)?e:{value:e,message:""},Tp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:y,validate:g,name:p,valueAsNumber:b,mount:w}=e._f,S=pe(r,p);if(!w||t.has(p))return{};const E=a?a[0]:i,C=G=>{o&&E.reportValidity&&(E.setCustomValidity(pr(G)?"":G||""),E.reportValidity())},_={},W=Bc(i),D=Uo(i),T=W||D,M=(b||zc(i))&&Lt(i.value)&&Lt(S)||Li(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,I=Lc.bind(null,p,n,_),H=(G,F,Y,se=Qr.maxLength,U=Qr.minLength)=>{const N=G?F:Y;_[p]={type:G?se:U,message:N,ref:i,...I(G?se:U,N)}};if(s?!Array.isArray(S)||!S.length:c&&(!T&&(M||tr(S))||pr(S)&&!S||D&&!bp(a).isValid||W&&!wp(a).isValid)){const{value:G,message:F}=Fi(c)?{value:!!c,message:c}:Gn(c);if(G&&(_[p]={type:Qr.required,message:F,ref:E,...I(Qr.required,F)},!n))return C(F),_}if(!M&&(!tr(f)||!tr(h))){let G,F;const Y=Gn(h),se=Gn(f);if(!tr(S)&&!isNaN(S)){const U=i.valueAsNumber||S&&+S;tr(Y.value)||(G=U>Y.value),tr(se.value)||(F=U<se.value)}else{const U=i.valueAsDate||new Date(S),N=$=>new Date(new Date().toDateString()+" "+$),le=i.type=="time",de=i.type=="week";Vr(Y.value)&&S&&(G=le?N(S)>N(Y.value):de?S>Y.value:U>new Date(Y.value)),Vr(se.value)&&S&&(F=le?N(S)<N(se.value):de?S<se.value:U<new Date(se.value))}if((G||F)&&(H(!!G,Y.message,se.message,Qr.max,Qr.min),!n))return C(_[p].message),_}if((u||d)&&!M&&(Vr(S)||s&&Array.isArray(S))){const G=Gn(u),F=Gn(d),Y=!tr(G.value)&&S.length>+G.value,se=!tr(F.value)&&S.length<+F.value;if((Y||se)&&(H(Y,G.message,F.message),!n))return C(_[p].message),_}if(y&&!M&&Vr(S)){const{value:G,message:F}=Gn(y);if(Bi(G)&&!S.match(G)&&(_[p]={type:Qr.pattern,message:F,ref:i,...I(Qr.pattern,F)},!n))return C(F),_}if(g){if(Mr(g)){const G=await g(S,r),F=Ap(G,E);if(F&&(_[p]={...F,...I(Qr.validate,F.message)},!n))return C(F.message),_}else if($t(g)){let G={};for(const F in g){if(!sr(G)&&!n)break;const Y=Ap(await g[F](S,r),E,F);Y&&(G={...Y,...I(F,Y.message)},C(Y.message),n&&(_[p]=G))}if(!sr(G)&&(_[p]={ref:E,...G},!n))return _}}return C(!0),_};const Hw={mode:Ir.onSubmit,reValidateMode:Ir.onChange,shouldFocusError:!0};function Uw(e={}){let t={...Hw,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Mr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=$t(t.defaultValues)||$t(t.values)?Ut(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Ut(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:pp(),state:pp()},y=t.criteriaMode===Ir.all,g=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},p=async k=>{if(!t.disabled&&(d.isValid||f.isValid||k)){const P=t.resolver?sr((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):Wt(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!sr(r.validatingFields)}))},w=(k,P=[],B,ce,ie=!0,O=!0)=>{if(ce&&B&&!t.disabled){if(i.action=!0,O&&Array.isArray(pe(n,k))){const oe=B(pe(n,k),ce.argA,ce.argB);ie&&ut(n,k,oe)}if(O&&Array.isArray(pe(r.errors,k))){const oe=B(pe(r.errors,k),ce.argA,ce.argB);ie&&ut(r.errors,k,oe),Fw(r.errors,k)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(pe(r.touchedFields,k))){const oe=B(pe(r.touchedFields,k),ce.argA,ce.argB);ie&&ut(r.touchedFields,k,oe)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Yo(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)},S=(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})},C=(k,P,B,ce)=>{const ie=pe(n,k);if(ie){const O=pe(s,k,Lt(B)?pe(o,k):B);Lt(O)||ce&&ce.defaultChecked||P?ut(s,k,P?O:Sp(ie._f)):Y(k,O),i.mount&&p()}},_=(k,P,B,ce,ie)=>{let O=!1,oe=!1;const Ce={name:k};if(!t.disabled){if(!B||ce){(d.isDirty||f.isDirty)&&(oe=r.isDirty,r.isDirty=Ce.isDirty=H(),O=oe!==Ce.isDirty);const Re=Xr(pe(o,k),P);oe=!!pe(r.dirtyFields,k),Re?Wt(r.dirtyFields,k):ut(r.dirtyFields,k,!0),Ce.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&oe!==!Re}if(B){const Re=pe(r.touchedFields,k);Re||(ut(r.touchedFields,k,B),Ce.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&Re!==B)}O&&ie&&h.state.next(Ce)}return O?Ce:{}},W=(k,P,B,ce)=>{const ie=pe(r.errors,k),O=(d.isValid||f.isValid)&&pr(P)&&r.isValid!==P;if(t.delayError&&B?(c=g(()=>S(k,B)),c(t.delayError)):(clearTimeout(u),c=null,B?ut(r.errors,k,B):Wt(r.errors,k)),(B?!Xr(ie,B):ie)||!sr(ce)||O){const oe={...ce,...O&&pr(P)?{isValid:P}:{},errors:r.errors,name:k};r={...r,...oe},h.state.next(oe)}},D=async k=>{b(k,!0);const P=await t.resolver(s,t.context,Rw(k||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(k),P},T=async k=>{const{errors:P}=await D(k);if(k)for(const B of k){const ce=pe(P,B);ce?ut(r.errors,B,ce):Wt(r.errors,B)}else r.errors=P;return P},M=async(k,P,B={valid:!0})=>{for(const ce in k){const ie=k[ce];if(ie){const{_f:O,...oe}=ie;if(O){const Ce=a.array.has(O.name),Re=ie._f&&Nw(ie._f);Re&&d.validatingFields&&b([ce],!0);const R=await Tp(ie,a.disabled,s,y,t.shouldUseNativeValidation&&!P,Ce);if(Re&&d.validatingFields&&b([ce]),R[O.name]&&(B.valid=!1,P))break;!P&&(pe(R,O.name)?Ce?Ww(r.errors,R,O.name):ut(r.errors,O.name,R[O.name]):Wt(r.errors,O.name))}!sr(oe)&&await M(oe,P,B)}}return B.valid},I=()=>{for(const k of a.unMount){const P=pe(n,k);P&&(P._f.refs?P._f.refs.every(B=>!Fc(B)):!Fc(P._f.ref))&&J(k)}a.unMount=new Set},H=(k,P)=>!t.disabled&&(k&&P&&ut(s,k,P),!Xr($(),o)),G=(k,P,B)=>dp(k,a,{...i.mount?s:Lt(P)?o:Vr(k)?{[k]:P}:P},B,P),F=k=>Pc(pe(i.mount?s:o,k,t.shouldUnregister?pe(o,k,[]):[])),Y=(k,P,B={})=>{const ce=pe(n,k);let ie=P;if(ce){const O=ce._f;O&&(!O.disabled&&ut(s,k,xp(P,O)),ie=Li(O.ref)&&tr(P)?"":P,hp(O.ref)?[...O.ref.options].forEach(oe=>oe.selected=ie.includes(oe.value)):O.refs?Uo(O.ref)?O.refs.forEach(oe=>{(!oe.defaultChecked||!oe.disabled)&&(Array.isArray(ie)?oe.checked=!!ie.find(Ce=>Ce===oe.value):oe.checked=ie===oe.value||!!ie)}):O.refs.forEach(oe=>oe.checked=oe.value===ie):zc(O.ref)?O.ref.value="":(O.ref.value=ie,O.ref.type||h.state.next({name:k,values:Ut(s)})))}(B.shouldDirty||B.shouldTouch)&&_(k,ie,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&de(k)},se=(k,P,B)=>{for(const ce in P){if(!P.hasOwnProperty(ce))return;const ie=P[ce],O=k+"."+ce,oe=pe(n,O);(a.array.has(k)||$t(ie)||oe&&!oe._f)&&!Dn(ie)?se(O,ie,B):Y(O,ie,B)}},U=(k,P,B={})=>{const ce=pe(n,k),ie=a.array.has(k),O=Ut(P);ut(s,k,O),ie?(h.array.next({name:k,values:Ut(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&B.shouldDirty&&h.state.next({name:k,dirtyFields:Yo(o,s),isDirty:H(k,O)})):ce&&!ce._f&&!tr(O)?se(k,O,B):Y(k,O,B),Dp(k,a)&&h.state.next({...r,name:k}),h.state.next({name:i.mount?k:void 0,values:Ut(s)})},N=async k=>{i.mount=!0;const P=k.target;let B=P.name,ce=!0;const ie=pe(n,B),O=Re=>{ce=Number.isNaN(Re)||Dn(Re)&&isNaN(Re.getTime())||Xr(Re,pe(s,B,Re))},oe=Cp(t.mode),Ce=Cp(t.reValidateMode);if(ie){let Re,R;const te=P.type?Sp(ie._f):cp(k),xe=k.type===$i.BLUR||k.type===$i.FOCUS_OUT,Ge=!$w(ie._f)&&!t.resolver&&!pe(r.errors,B)&&!ie._f.deps||Bw(xe,pe(r.touchedFields,B),r.isSubmitted,Ce,oe),At=Dp(B,a,xe);ut(s,B,te),xe?(!P||!P.readOnly)&&(ie._f.onBlur&&ie._f.onBlur(k),c&&c(0)):ie._f.onChange&&ie._f.onChange(k);const q=_(B,te,xe),fe=!sr(q)||At;if(!xe&&h.state.next({name:B,type:k.type,values:Ut(s)}),Ge)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?xe&&p():xe||p()),fe&&h.state.next({name:B,...At?{}:q});if(!xe&&At&&h.state.next({...r}),t.resolver){const{errors:De}=await D([B]);if(O(te),ce){const Me=kp(r.errors,n,B),Ne=kp(De,n,Me.name||B);Re=Ne.error,B=Ne.name,R=sr(De)}}else b([B],!0),Re=(await Tp(ie,a.disabled,s,y,t.shouldUseNativeValidation))[B],b([B]),O(te),ce&&(Re?R=!1:(d.isValid||f.isValid)&&(R=await M(n,!0)));ce&&(ie._f.deps&&de(ie._f.deps),W(B,R,Re,q))}},le=(k,P)=>{if(pe(r.errors,P)&&k.focus)return k.focus(),1},de=async(k,P={})=>{let B,ce;const ie=Vo(k);if(t.resolver){const O=await T(Lt(k)?k:ie);B=sr(O),ce=k?!ie.some(oe=>pe(O,oe)):B}else k?(ce=(await Promise.all(ie.map(async O=>{const oe=pe(n,O);return await M(oe&&oe._f?{[O]:oe}:oe)}))).every(Boolean),!(!ce&&!r.isValid)&&p()):ce=B=await M(n);return h.state.next({...!Vr(k)||(d.isValid||f.isValid)&&B!==r.isValid?{}:{name:k},...t.resolver||!k?{isValid:B}:{},errors:r.errors}),P.shouldFocus&&!ce&&Zo(n,le,k?ie:a.mount),ce},$=k=>{const P={...i.mount?s:o};return Lt(k)?P:Vr(k)?pe(P,k):k.map(B=>pe(P,B))},Q=(k,P)=>({invalid:!!pe((P||r).errors,k),isDirty:!!pe((P||r).dirtyFields,k),error:pe((P||r).errors,k),isValidating:!!pe(r.validatingFields,k),isTouched:!!pe((P||r).touchedFields,k)}),we=k=>{k&&Vo(k).forEach(P=>Wt(r.errors,P)),h.state.next({errors:k?r.errors:{}})},_e=(k,P,B)=>{const ce=(pe(n,k,{_f:{}})._f||{}).ref,ie=pe(r.errors,k)||{},{ref:O,message:oe,type:Ce,...Re}=ie;ut(r.errors,k,{...Re,...P,ref:ce}),h.state.next({name:k,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&ce&&ce.focus&&ce.focus()},he=(k,P)=>Mr(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=>{zw(k.name,P.name,k.exact)&&Lw(P,k.formState||d,Ve,k.reRenderRoot)&&k.callback({values:{...s},...r,...P,defaultValues:o})}}).unsubscribe,ue=k=>(i.mount=!0,f={...f,...k.formState},ae({...k,formState:f})),J=(k,P={})=>{for(const B of k?Vo(k):a.mount)a.mount.delete(B),a.array.delete(B),P.keepValue||(Wt(n,B),Wt(s,B)),!P.keepError&&Wt(r.errors,B),!P.keepDirty&&Wt(r.dirtyFields,B),!P.keepTouched&&Wt(r.touchedFields,B),!P.keepIsValidating&&Wt(r.validatingFields,B),!t.shouldUnregister&&!P.keepDefaultValue&&Wt(o,B);h.state.next({values:Ut(s)}),h.state.next({...r,...P.keepDirty?{isDirty:H()}:{}}),!P.keepIsValid&&p()},Se=({disabled:k,name:P})=>{(pr(k)&&i.mount||k||a.disabled.has(P))&&(k?a.disabled.add(P):a.disabled.delete(P))},me=(k,P={})=>{let B=pe(n,k);const ce=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?Se({disabled:pr(P.disabled)?P.disabled:t.disabled,name:k}):C(k,!0,P.value),{...ce?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:qo(P.min),max:qo(P.max),minLength:qo(P.minLength),maxLength:qo(P.maxLength),pattern:qo(P.pattern)}:{},name:k,onChange:N,onBlur:N,ref:ie=>{if(ie){me(k,P),B=pe(n,k);const O=Lt(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,oe=Pw(O),Ce=B._f.refs||[];if(oe?Ce.find(Re=>Re===O):O===B._f.ref)return;ut(n,k,{_f:{...B._f,...oe?{refs:[...Ce.filter(Fc),O,...Array.isArray(pe(o,k))?[{}]:[]],ref:{type:O.type,name:k}}:{ref:O}}}),C(k,!1,void 0,O)}else B=pe(n,k,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(lp(a.array,k)&&i.action)&&a.unMount.add(k)}}},ee=()=>t.shouldFocusError&&Zo(n,le,a.mount),Ie=k=>{pr(k)&&(h.state.next({disabled:k}),Zo(n,(P,B)=>{const ce=pe(n,B);ce&&(P.disabled=ce._f.disabled||k,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(ie=>{ie.disabled=ce._f.disabled||k}))},0,!1))},j=(k,P)=>async B=>{let ce;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ie=Ut(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:oe}=await D();r.errors=O,ie=Ut(oe)}else await M(n);if(a.disabled.size)for(const O of a.disabled)Wt(ie,O);if(Wt(r.errors,"root"),sr(r.errors)){h.state.next({errors:{}});try{await k(ie,B)}catch(O){ce=O}}else P&&await P({...r.errors},B),ee(),setTimeout(ee);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:sr(r.errors)&&!ce,submitCount:r.submitCount+1,errors:r.errors}),ce)throw ce},Fe=(k,P={})=>{pe(n,k)&&(Lt(P.defaultValue)?U(k,Ut(pe(o,k))):(U(k,P.defaultValue),ut(o,k,Ut(P.defaultValue))),P.keepTouched||Wt(r.touchedFields,k),P.keepDirty||(Wt(r.dirtyFields,k),r.isDirty=P.defaultValue?H(k,Ut(pe(o,k))):H()),P.keepError||(Wt(r.errors,k),d.isValid&&p()),h.state.next({...r}))},Ke=(k,P={})=>{const B=k?Ut(k):o,ce=Ut(B),ie=sr(k),O=ie?o:ce;if(P.keepDefaultValues||(o=B),!P.keepValues){if(P.keepDirtyValues){const oe=new Set([...a.mount,...Object.keys(Yo(o,s))]);for(const Ce of Array.from(oe))pe(r.dirtyFields,Ce)?ut(O,Ce,pe(s,Ce)):U(Ce,pe(O,Ce))}else{if(Mc&&Lt(k))for(const oe of a.mount){const Ce=pe(n,oe);if(Ce&&Ce._f){const Re=Array.isArray(Ce._f.refs)?Ce._f.refs[0]:Ce._f.ref;if(Li(Re)){const R=Re.closest("form");if(R){R.reset();break}}}}if(P.keepFieldsRef)for(const oe of a.mount)U(oe,pe(O,oe));else n={}}s=t.shouldUnregister?P.keepDefaultValues?Ut(o):{}:Ut(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:ie?!1:P.keepDirty?r.isDirty:!!(P.keepDefaultValues&&!Xr(k,o)),isSubmitted:P.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ie?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Yo(o,s):r.dirtyFields:P.keepDefaultValues&&k?Yo(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)=>Ke(Mr(k)?k(s):k,P),Be=(k,P={})=>{const B=pe(n,k),ce=B&&B._f;if(ce){const ie=ce.refs?ce.refs[0]:ce.ref;ie.focus&&(ie.focus(),P.shouldSelect&&Mr(ie.select)&&ie.select())}},Ve=k=>{r={...r,...k}},mt={control:{register:me,unregister:J,getFieldState:Q,handleSubmit:j,setError:_e,_subscribe:ae,_runSchema:D,_focusError:ee,_getWatch:G,_getDirty:H,_setValid:p,_setFieldArray:w,_setDisabledField:Se,_setErrors:E,_getFieldArray:F,_reset:Ke,_resetDefaultValues:()=>Mr(t.defaultValues)&&t.defaultValues().then(k=>{Ze(k,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Ie,_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:ue,trigger:de,register:me,handleSubmit:j,watch:he,setValue:U,getValues:$,reset:Ze,resetField:Fe,clearErrors:we,unregister:J,setError:_e,setFocus:Be,getFieldState:Q};return{...mt,formControl:mt}}function Ip(e={}){const t=v.useRef(void 0),r=v.useRef(void 0),[n,o]=v.useState({isDirty:!1,isValidating:!1,isLoading:Mr(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:Mr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Mr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Uw(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,Nc(()=>{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]),v.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),v.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),v.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),v.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),v.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),v.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]),v.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=up(n,s),t.current}const Mp=(e,t,r)=>{if(e&&"reportValidity"in e){const n=pe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Wc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Mp(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Mp(o,r,e))}},Pp=(e,t)=>{t.shouldUseNativeValidation&&Wc(e,t);const r={};for(const n in e){const o=pe(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(Vw(t.names||Object.keys(e),n)){const i=Object.assign({},pe(r,n));ut(i,"root",s),ut(r,n,i)}else ut(r,n,s)}return r},Vw=(e,t)=>{const r=Op(t);return e.some(n=>Op(n).match(`^${r}\\.\\d+`))};function Op(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 jp extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Rp={};function kn(e){return Rp}function Yw(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 Vc(e){return e==null}function Yc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function qw(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 Np=Symbol("evaluating");function vt(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Np)return n===void 0&&(n=Np,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Zw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cn(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 $p(e){return JSON.stringify(e)}const Lp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Gw=Uc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Go(e){if(Wi(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Wi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function zp(e){return Go(e)?{...e}:e}const Kw=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ln(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 Qw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Xw={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 Jw(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 cn(this,"shape",o),o},checks:[]});return ln(e,n)}function eS(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 cn(this,"shape",o),o},checks:[]});return ln(e,n)}function tS(e,t){if(!Go(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 cn(this,"shape",s),s},checks:[]});return ln(e,o)}function rS(e,t){if(!Go(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 cn(this,"shape",n),n},checks:e._zod.def.checks};return ln(e,r)}function nS(e,t){const r=Qn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return cn(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ln(e,r)}function oS(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 cn(this,"shape",s),s},checks:[]});return ln(t,n)}function sS(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 cn(this,"shape",s),s},checks:[]});return ln(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 Bp(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 An(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 qc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ko(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Fp=(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})},Zc=Z("$ZodError",Fp),Ui=Z("$ZodError",Fp,{Parent:Error});function iS(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 aS(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 Vi=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=>An(c,s,kn())));throw Lp(a,o?.callee),a}return i.value},cS=Vi(Ui),Yi=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=>An(c,s,kn())));throw Lp(a,o?.callee),a}return i.value},lS=Yi(Ui),qi=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??Zc)(s.issues.map(i=>An(i,o,kn())))}:{success:!0,data:s.value}},uS=qi(Ui),Zi=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=>An(i,o,kn())))}:{success:!0,data:s.value}},dS=Zi(Ui),fS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vi(e)(t,r,o)},pS=e=>(t,r,n)=>Vi(e)(t,r,n),hS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,r,o)},mS=e=>async(t,r,n)=>Yi(e)(t,r,n),gS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return qi(e)(t,r,o)},vS=e=>(t,r,n)=>qi(e)(t,r,n),yS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Zi(e)(t,r,o)},bS=e=>async(t,r,n)=>Zi(e)(t,r,n),xS=/^[cC][^\s-]{8,}$/,_S=/^[0-9a-z]+$/,wS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,SS=/^[0-9a-vA-V]{20}$/,CS=/^[A-Za-z0-9]{27}$/,ES=/^[a-zA-Z0-9_-]{21}$/,DS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kS=/^([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})$/,Wp=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)$/,AS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,TS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function IS(){return new RegExp(TS,"u")}const MS=/^(?:(?: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])$/,PS=/^(([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})$/,OS=/^((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])$/,jS=/^(([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])$/,RS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hp=/^[A-Za-z0-9_-]*$/,NS=/^(?=.{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])?)*\.?$/,$S=/^\+(?:[0-9]){6,14}[0-9]$/,Up="(?:(?:\\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])))",LS=new RegExp(`^${Up}$`);function Vp(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 zS(e){return new RegExp(`^${Vp(e)}$`)}function BS(e){const t=Vp({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(`^${Up}T(?:${n})$`)}const FS=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},WS=/^\d+$/,HS=/^-?\d+(?:\.\d+)?/i,US=/true|false/i,VS=/^[^A-Z]*$/,YS=/^[^a-z]*$/,ir=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Yp={number:"number",bigint:"bigint",object:"date"},qp=Z("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const r=Yp[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})}}),Zp=Z("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const r=Yp[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})}}),qS=Z("$ZodCheckMultipleOf",(e,t)=>{ir.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):qw(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})}}),ZS=Z("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=Xw[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=WS)}),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})}}),GS=Z("$ZodCheckMaxLength",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Vc(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=qc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KS=Z("$ZodCheckMinLength",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Vc(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=qc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),QS=Z("$ZodCheckLengthEquals",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Vc(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=qc(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})}}),Gi=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;ir.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=()=>{})}),XS=Z("$ZodCheckRegex",(e,t)=>{Gi.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})}}),JS=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=VS),Gi.init(e,t)}),eC=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=YS),Gi.init(e,t)}),tC=Z("$ZodCheckIncludes",(e,t)=>{ir.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})}}),rC=Z("$ZodCheckStartsWith",(e,t)=>{ir.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})}}),nC=Z("$ZodCheckEndsWith",(e,t)=>{ir.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})}}),oC=Z("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class sC{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(`
155
+ */const R2=mi("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Fd=Symbol.for("constructDateFrom");function sc(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Fd in e?e[Fd](t):e instanceof Date?new e.constructor(t):new Date(t)}function an(e,t){return sc(t||e,e)}function Wd(e,t,r){const[n,o]=[+an(e.start,r?.in),+an(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+an(t.start,r?.in),+an(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function gi(e){"@babel/helpers - typeof";return gi=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},gi(e)}var N2=/^\s+/,$2=/\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=L2(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=Zd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Hd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Hd(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=Ud(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Ud(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 Vd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return W2(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:e1[Vd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Yd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=De(t);n="#"+Yd(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(Y2,arguments)},brighten:function(){return this._applyModification(q2,arguments)},darken:function(){return this._applyModification(Z2,arguments)},desaturate:function(){return this._applyModification(U2,arguments)},saturate:function(){return this._applyModification(H2,arguments)},greyscale:function(){return this._applyModification(V2,arguments)},spin:function(){return this._applyModification(G2,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(X2,arguments)},complement:function(){return this._applyCombination(K2,arguments)},monochromatic:function(){return this._applyCombination(J2,arguments)},splitcomplement:function(){return this._applyCombination(Q2,arguments)},triad:function(){return this._applyCombination(qd,[3])},tetrad:function(){return this._applyCombination(qd,[4])}},De.fromRatio=function(e,t){if(gi(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 L2(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=o1(e)),gi(e)=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=z2(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=F2(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=B2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Zd(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 z2(e,t,r){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(r,255)*255}}function Ud(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 B2(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 Hd(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 F2(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 Vd(e,t,r,n){var o=[Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(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 W2(e,t,r,n,o){var s=[Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(Math.round(r).toString(16)),Dr(Gd(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 Yd(e,t,r,n){var o=[Dr(Gd(n)),Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(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 U2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s-=t/100,r.s=vi(r.s),De(r)}function H2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s+=t/100,r.s=vi(r.s),De(r)}function V2(e){return De(e).desaturate(100)}function Y2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l+=t/100,r.l=vi(r.l),De(r)}function q2(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 Z2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l-=t/100,r.l=vi(r.l),De(r)}function G2(e,t){var r=De(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,De(r)}function K2(e){var t=De(e).toHsl();return t.h=(t.h+180)%360,De(t)}function qd(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 Q2(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 X2(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 J2(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=s1(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 ic=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"},e1=De.hexNames=t1(ic);function t1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Zd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _t(e,t){r1(e)&&(e="100%");var r=n1(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 vi(e){return Math.min(1,Math.max(0,e))}function dr(e){return parseInt(e,16)}function r1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function n1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Dr(e){return e.length==1?"0"+e:""+e}function Ao(e){return e<=1&&(e=e*100+"%"),e}function Gd(e){return Math.round(parseFloat(e)*255).toString(16)}function Kd(e){return dr(e)/255}var kr=(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!!kr.CSS_UNIT.exec(e)}function o1(e){e=e.replace(N2,"").replace($2,"").toLowerCase();var t=!1;if(ic[e])e=ic[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=kr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=kr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=kr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=kr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=kr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=kr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=kr.hex8.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),a:Kd(r[4]),format:t?"name":"hex8"}:(r=kr.hex6.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),format:t?"name":"hex"}:(r=kr.hex4.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),a:Kd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=kr.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 s1(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 Qd="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",i1="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",a1="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",Xd="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",Jd=v.createContext(void 0),c1=({children:e})=>{const[t,r]=v.useState(()=>({userEmail:localStorage.getItem("user_email")||null})),[n,o]=v.useState(()=>({userEmail:localStorage.getItem("user_outlook")||null})),s=v.useCallback(l=>{localStorage.setItem("user_email",l),r({userEmail:l})},[]),i=v.useCallback(l=>{localStorage.setItem("user_outlook",l),o({userEmail:l})},[]),a=v.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return u.jsx(Jd.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},ac=()=>{const e=v.useContext(Jd);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function ef(e,t){return function(){return e.apply(t,arguments)}}const{toString:l1}=Object.prototype,{getPrototypeOf:cc}=Object,{iterator:yi,toStringTag:tf}=Symbol,bi=(e=>t=>{const r=l1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ar=e=>(e=e.toLowerCase(),t=>bi(t)===e),xi=e=>t=>typeof t===e,{isArray:Yn}=Array,To=xi("undefined");function Io(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&nr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rf=Ar("ArrayBuffer");function u1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rf(e.buffer),t}const d1=xi("string"),nr=xi("function"),nf=xi("number"),Mo=e=>e!==null&&typeof e=="object",f1=e=>e===!0||e===!1,_i=e=>{if(bi(e)!=="object")return!1;const t=cc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(tf in e)&&!(yi in e)},p1=e=>{if(!Mo(e)||Io(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},h1=Ar("Date"),m1=Ar("File"),g1=Ar("Blob"),v1=Ar("FileList"),y1=e=>Mo(e)&&nr(e.pipe),b1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nr(e.append)&&((t=bi(e))==="formdata"||t==="object"&&nr(e.toString)&&e.toString()==="[object FormData]"))},x1=Ar("URLSearchParams"),[_1,w1,S1,C1]=["ReadableStream","Request","Response","Headers"].map(Ar),E1=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 of(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 bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sf=e=>!To(e)&&e!==bn;function lc(){const{caseless:e}=sf(this)&&this||{},t={},r=(n,o)=>{const s=e&&of(t,o)||o;_i(t[s])&&_i(n)?t[s]=lc(t[s],n):_i(n)?t[s]=lc({},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 D1=(e,t,r,{allOwnKeys:n}={})=>(Po(t,(o,s)=>{r&&nr(o)?e[s]=ef(o,r):e[s]=o},{allOwnKeys:n}),e),k1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),A1=(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)},T1=(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&&cc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},I1=(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},M1=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!nf(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},P1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&cc(Uint8Array)),O1=(e,t)=>{const n=(e&&e[yi]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},j1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},R1=Ar("HTMLFormElement"),N1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),af=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$1=Ar("RegExp"),cf=(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)},L1=e=>{cf(e,(t,r)=>{if(nr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(nr(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+"'")})}})},z1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Yn(e)?n(e):n(String(e).split(t)),r},B1=()=>{},F1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function W1(e){return!!(e&&nr(e.append)&&e[tf]==="FormData"&&e[yi])}const U1=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)},H1=Ar("AsyncFunction"),V1=e=>e&&(Mo(e)||nr(e))&&nr(e.then)&&nr(e.catch),lf=((e,t)=>e?setImmediate:t?((r,n)=>(bn.addEventListener("message",({source:o,data:s})=>{o===bn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),bn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",nr(bn.postMessage)),Y1=typeof queueMicrotask<"u"?queueMicrotask.bind(bn):typeof process<"u"&&process.nextTick||lf,z={isArray:Yn,isArrayBuffer:rf,isBuffer:Io,isFormData:b1,isArrayBufferView:u1,isString:d1,isNumber:nf,isBoolean:f1,isObject:Mo,isPlainObject:_i,isEmptyObject:p1,isReadableStream:_1,isRequest:w1,isResponse:S1,isHeaders:C1,isUndefined:To,isDate:h1,isFile:m1,isBlob:g1,isRegExp:$1,isFunction:nr,isStream:y1,isURLSearchParams:x1,isTypedArray:P1,isFileList:v1,forEach:Po,merge:lc,extend:D1,trim:E1,stripBOM:k1,inherits:A1,toFlatObject:T1,kindOf:bi,kindOfTest:Ar,endsWith:I1,toArray:M1,forEachEntry:O1,matchAll:j1,isHTMLForm:R1,hasOwnProperty:af,hasOwnProp:af,reduceDescriptors:cf,freezeMethods:L1,toObjectSet:z1,toCamelCase:N1,noop:B1,toFiniteNumber:F1,findKey:of,global:bn,isContextDefined:sf,isSpecCompliantForm:W1,toJSONObject:U1,isAsyncFn:H1,isThenable:V1,setImmediate:lf,asap:Y1,isIterable:e=>e!=null&&nr(e[yi])};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 uf=Le.prototype,df={};["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=>{df[e]={value:e}}),Object.defineProperties(Le,df),Object.defineProperty(uf,"isAxiosError",{value:!0}),Le.from=(e,t,r,n,o,s)=>{const i=Object.create(uf);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 q1=null;function uc(e){return z.isPlainObject(e)||z.isArray(e)}function ff(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function pf(e,t,r){return e?e.concat(t).map(function(o,s){return o=ff(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function Z1(e){return z.isArray(e)&&!e.some(uc)}const G1=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function wi(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(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new Le("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,p,b){let w=g;if(g&&!b&&typeof g=="object"){if(z.endsWith(p,"{}"))p=n?p:p.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&Z1(g)||(z.isFileList(g)||z.endsWith(p,"[]"))&&(w=z.toArray(g)))return p=ff(p),w.forEach(function(E,C){!(z.isUndefined(E)||E===null)&&t.append(i===!0?pf([p],C,s):i===null?p:p+"[]",l(E))}),!1}return uc(g)?!0:(t.append(pf(b,p,s),l(g)),!1)}const f=[],h=Object.assign(G1,{defaultVisitor:d,convertValue:l,isVisitable:uc});function y(g,p){if(!z.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(g),z.forEach(g,function(w,S){(!(z.isUndefined(w)||w===null)&&o.call(t,w,z.isString(S)?S.trim():S,p,h))===!0&&y(w,p?p.concat(S):[S])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return y(e),t}function hf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function dc(e,t){this._pairs=[],e&&wi(e,this,t)}const mf=dc.prototype;mf.append=function(t,r){this._pairs.push([t,r])},mf.toString=function(t){const r=t?function(n){return t.call(this,n,hf)}:hf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function K1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gf(e,t,r){if(!t)return e;const n=r&&r.encode||K1;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 dc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class vf{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 yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q1={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:dc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},fc=typeof window<"u"&&typeof document<"u",pc=typeof navigator=="object"&&navigator||void 0,X1=fc&&(!pc||["ReactNative","NativeScript","NS"].indexOf(pc.product)<0),J1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ex=fc&&window.location.href||"http://localhost",Xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fc,hasStandardBrowserEnv:X1,hasStandardBrowserWebWorkerEnv:J1,navigator:pc,origin:ex},Symbol.toStringTag,{value:"Module"})),...Q1};function tx(e,t){return wi(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 rx(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nx(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 bf(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]=nx(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(rx(n),o,r,0)}),r}return null}function ox(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:yf,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(bf(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 tx(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return wi(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),ox(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 sx=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"]),ix=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]&&sx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},xf=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function Si(e){return e===!1||e==null?e:z.isArray(e)?e.map(Si):String(e)}function ax(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 cx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function hc(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 lx(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function ux(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 or=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]=Si(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())&&!cx(t))i(ix(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 ax(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||hc(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||hc(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||hc(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]=Si(o),delete r[s];return}const a=t?lx(s):String(s).trim();a!==s&&delete r[s],r[a]=Si(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[xf]=this[xf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=jo(i);n[a]||(ux(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};or.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(or.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(or);function mc(e,t){const r=this||Oo,n=t||r,o=or.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 _f(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 wf(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 dx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fx(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 y=d&&l-d;return y?Math.round(h*1e3/y):void 0}}function px(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 Ci=(e,t,r=3)=>{let n=0;const o=fx(50,250);return px(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)},Sf=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Cf=e=>(...t)=>z.asap(()=>e(...t)),hx=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,mx=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 gx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vx(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ef(e,t,r){let n=!gx(t);return e&&(n||r==!1)?vx(e,t):t}const Df=e=>e instanceof or?{...e}:e;function xn(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(Df(l),Df(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 kf=e=>{const t=xn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=or.from(i),t.url=gf(Ef(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&&hx(t.url))){const l=o&&s&&mx.read(s);l&&i.set(o,l)}return t},yx=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=kf(e);let s=o.data;const i=or.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,d,f,h,y,g;function p(){y&&y(),g&&g(),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=or.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};wf(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 C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||yf;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),n(new Le(C,_.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(C,_){b.setRequestHeader(_,C)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([h,g]=Ci(l,!0),b.addEventListener("progress",h)),c&&b.upload&&([f,y]=Ci(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",y)),(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 S=dx(o.url);if(S&&Xt.protocols.indexOf(S)===-1){n(new Le("Unsupported protocol "+S+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)})},bx=(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}},xx=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},_x=async function*(e,t){for await(const r of wx(e))yield*xx(r,t)},wx=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()}},Af=(e,t,r,n)=>{const o=_x(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})},Ei=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Tf=Ei&&typeof ReadableStream=="function",Sx=Ei&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),If=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Cx=Tf&&If(()=>{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}),Mf=64*1024,gc=Tf&&If(()=>z.isReadableStream(new Response("").body)),Di={stream:gc&&(e=>e.body)};Ei&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Di[t]&&(Di[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 Ex=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 Sx(e)).byteLength},Dx=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??Ex(t)},vc={http:q1,xhr:yx,fetch:Ei&&(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}=kf(e);l=l?(l+"").toLowerCase():"text";let y=bx([o,s&&s.toAbortSignal()],i),g;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(c&&Cx&&r!=="get"&&r!=="head"&&(b=await Dx(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,T]=Sf(b,Ci(Cf(c)));n=Af(_.body,Mf,D,T)}}z.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:y,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let S=await fetch(g,h);const E=gc&&(l==="stream"||l==="response");if(gc&&(a||E&&p)){const _={};["status","statusText","headers"].forEach(M=>{_[M]=S[M]});const W=z.toFiniteNumber(S.headers.get("content-length")),[D,T]=a&&Sf(W,Ci(Cf(a),!0))||[];S=new Response(Af(S.body,Mf,D,()=>{T&&T(),p&&p()}),_)}l=l||"text";let C=await Di[z.findKey(Di,l)||"text"](S,e);return!E&&p&&p(),await new Promise((_,W)=>{wf(_,W,{data:C,headers:or.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:g})})}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,g),{cause:w.cause||w}):Le.from(w,w&&w.code,e,g)}})};z.forEach(vc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pf=e=>`- ${e}`,kx=e=>z.isFunction(e)||e===null||e===!1,Of={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,!kx(r)&&(n=vc[(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
+ `+s.map(Pf).join(`
159
+ `):" "+Pf(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:vc};function yc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qn(null,e)}function jf(e){return yc(e),e.headers=or.from(e.headers),e.data=mc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Of.getAdapter(e.adapter||Oo.adapter)(e).then(function(n){return yc(e),n.data=mc.call(e,e.transformResponse,n),n.headers=or.from(n.headers),n},function(n){return _f(n)||(yc(e),n&&n.response&&(n.response.data=mc.call(e,e.transformResponse,n.response),n.response.headers=or.from(n.response.headers))),Promise.reject(n)})}const Rf="1.11.0",ki={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ki[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Nf={};ki.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Rf+"] 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&&!Nf[i]&&(Nf[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}},ki.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Ax(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 Ai={assertOptions:Ax,validators:ki},Ur=Ai.validators;let _n=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vf,response:new vf}}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=xn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Ai.assertOptions(n,{silentJSONParsing:Ur.transitional(Ur.boolean),forcedJSONParsing:Ur.transitional(Ur.boolean),clarifyTimeoutError:Ur.transitional(Ur.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Ai.assertOptions(o,{encode:Ur.function,serialize:Ur.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ai.assertOptions(r,{baseUrl:Ur.spelling("baseURL"),withXsrfToken:Ur.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"],g=>{delete s[g]}),r.headers=or.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 g=[jf.bind(this),void 0];for(g.unshift(...a),g.push(...l),h=g.length,d=Promise.resolve(r);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let y=r;for(f=0;f<h;){const g=a[f++],p=a[f++];try{y=g(y)}catch(b){p.call(this,b);break}}try{d=jf.call(this,y)}catch(g){return Promise.reject(g)}for(f=0,h=l.length;f<h;)d=d.then(l[f++],l[f++]);return d}getUri(t){t=xn(this.defaults,t);const r=Ef(t.baseURL,t.url,t.allowAbsoluteUrls);return gf(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){_n.prototype[t]=function(r,n){return this.request(xn(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(xn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}_n.prototype[t]=r(),_n.prototype[t+"Form"]=r(!0)});let Tx=class u0{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 u0(function(o){t=o}),cancel:t}}};function Ix(e){return function(r){return e.apply(null,r)}}function Mx(e){return z.isObject(e)&&e.isAxiosError===!0}const bc={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(bc).forEach(([e,t])=>{bc[t]=e});function $f(e){const t=new _n(e),r=ef(_n.prototype.request,t);return z.extend(r,_n.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return $f(xn(e,o))},r}const Nt=$f(Oo);Nt.Axios=_n,Nt.CanceledError=qn,Nt.CancelToken=Tx,Nt.isCancel=_f,Nt.VERSION=Rf,Nt.toFormData=wi,Nt.AxiosError=Le,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=Ix,Nt.isAxiosError=Mx,Nt.mergeConfig=xn,Nt.AxiosHeaders=or,Nt.formToJSON=e=>bf(z.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=Of.getAdapter,Nt.HttpStatusCode=bc,Nt.default=Nt;const{Axios:YT,AxiosError:qT,CanceledError:ZT,isCancel:GT,CancelToken:KT,VERSION:QT,all:XT,Cancel:JT,isAxiosError:eI,spread:tI,toFormData:rI,AxiosHeaders:nI,HttpStatusCode:oI,formToJSON:sI,getAdapter:iI,mergeConfig:aI}=Nt,Lf={token:null},Px=e=>{Lf.token=e},wt=Nt.create({headers:{"Content-Type":"application/json"}});wt.interceptors.request.use(e=>{const t=Lf.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const zf=v.createContext(void 0),Ox=({config:e,children:t})=>(v.useEffect(()=>{e.getToken&&Px(e.getToken)},[e.getToken]),u.jsx(zf.Provider,{value:e,children:t})),xc=()=>{const e=v.useContext(zf);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Ti=()=>{const{calendarApiUrl:e}=xc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await wt.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 wt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await wt.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 wt.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 wt.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}}}},Bf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",jx=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=Ti(),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:be.syncButton,onClick:s,children:[u.jsx("div",{className:be.customCheckIcon,children:u.jsx("div",{className:be.uncheckedCircle})}),u.jsx("img",{src:Bf,width:18}),u.jsx("span",{children:"Google Calendar"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},_c=()=>{const{calendarApiUrl:e}=xc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await wt.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 wt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await wt.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 wt.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 wt.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}}}},Ff="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",Rx=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=_c(),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:be.syncButton,onClick:s,children:[u.jsx("div",{className:be.customCheckIcon,children:u.jsx("div",{className:be.uncheckedCircle})}),u.jsx("img",{src:Ff,width:20}),u.jsx("span",{children:"Outlook"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Wf="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 wn extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class wc extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Tr extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Nx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class $x extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Lx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Uf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class zx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class Hf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Ii{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 V;(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"})(V||(V={}));class Ro{constructor(){}log(t,r){}}Ro.instance=new Ro;const Bx="10.0.0";class Ft{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 Sn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${Fx(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function Fx(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 Sn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Vf(e,t,r,n,o,s){const i={},[a,c]=Zn();i[a]=c,e.log(V.Trace,`(${t} transport) sending data. ${No(o,s.logMessageContent)}.`);const l=Sn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:l,timeout:s.timeout,withCredentials:s.withCredentials});e.log(V.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function Wx(e){return e===void 0?new Mi(V.Information):e===null?Ro.instance:e.log!==void 0?e:new Mi(e)}class Ux{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 Mi{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${V[t]}: ${r}`;switch(t){case V.Critical:case V.Error:this.out.error(n);break;case V.Warning:this.out.warn(n);break;case V.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,Hx(Bx,Vx(),qx(),Yx())]}function Hx(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 Vx(){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 Yx(){if(Dt.isNode)return process.versions.node}function qx(){return Dt.isNode?"NodeJS":"Browser"}function Sc(e){return e.stack?e.stack:e.message?e.message:`${e}`}function Zx(){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 Gx extends Ii{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(Zx());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 Tr;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 Tr});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(V.Warning,"Timeout from HTTP request."),n=new wc},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Sn(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(V.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Yf(s,"text");throw new wn(c||s.statusText,s.status)}const a=await Yf(s,t.responseType);return new Hf(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 Yf(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 Kx extends Ii{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Tr):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&&(Sn(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 Tr)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new Hf(o.status,o.statusText,o.response||o.responseText)):n(new wn(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(V.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new wn(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(V.Warning,"Timeout from HTTP request."),n(new wc)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Qx extends Ii{constructor(t){if(super(),typeof fetch<"u"||Dt.isNode)this._httpClient=new Gx(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new Kx(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Tr):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 Xx{writeHandshakeRequest(t){return fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(Sn(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 Jx{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 Ux(this,t)}}class e_{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=()=>{};Sn(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 t_(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,Sn(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 t_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const r_=30*1e3,n_=15*1e3,o_=1e5;var bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(bt||(bt={}));class Cc{static create(t,r,n,o,s,i,a){return new Cc(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(V.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")},Ft.isRequired(t,"connection"),Ft.isRequired(r,"logger"),Ft.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??r_,this.keepAliveIntervalInMilliseconds=i??n_,this._statefulReconnectBufferSize=a??o_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new Xx,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(V.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(V.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=bt.Disconnected,this._logger.log(V.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(V.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(V.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 e_(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(V.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(V.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(V.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(V.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(V.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 Tr("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 Jx;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(V.Error,`Invoke client method threw error: ${Sc(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(V.Error,`Stream callback threw error: ${Sc(s)}`)}}break}case $e.Ping:break;case $e.Close:{this._logger.log(V.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(V.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(V.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(V.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(V.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(V.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(V.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(V.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(V.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(V.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(V.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(V.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Tr("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(V.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(V.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(V.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(V.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(V.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==bt.Reconnecting){this._logger.log(V.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(V.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(V.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=bt.Connected,this._logger.log(V.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(V.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(V.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==bt.Reconnecting){this._logger.log(V.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(V.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(V.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(V.Error,`Stream 'error' callback called with '${t}' threw error: ${Sc(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 s_=[0,2e3,1e4,3e4,null];class qf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:s_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Cn{}Cn.Authorization="Authorization",Cn.Cookie="Cookie";class i_ extends Ii{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[Cn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Cn.Authorization]&&delete t.headers[Cn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Ut;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Ut||(Ut={}));var Jt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Jt||(Jt={}));let a_=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 Zf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new a_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._url=t,this._logger.log(V.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(V.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(V.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new wn(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(V.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(V.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(V.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new wn(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(V.Trace,`(LongPolling transport) data received. ${No(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(V.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof wc?this._logger.log(V.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(V.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(V.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Vf(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(V.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(V.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 wn&&(s.statusCode===404?this._logger.log(V.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(V.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(V.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(V.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(V.Trace,t),this.onclose(this._closeError)}}}class c_{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 Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._logger.log(V.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(V.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(V.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?Vf(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 l_{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){Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._logger.log(V.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[Cn.Authorization]=`Bearer ${n}`),a&&(l[Cn.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(V.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(V.Information,`(WebSockets transport) ${d}.`)},i.onmessage=l=>{if(this._logger.log(V.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(V.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(V.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 Gf=100;class u_{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Ft.isRequired(t,"url"),this._logger=Wx(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 i_(r.httpClient||new Qx(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,Ft.isIn(t,Jt,"transferFormat"),this._logger.log(V.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(V.Error,r),await this._stopPromise,Promise.reject(new Tr(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(V.Error,r),Promise.reject(new Tr(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 Ec(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(V.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(V.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(V.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(V.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===Ut.WebSockets)this.transport=this._constructTransport(Ut.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 Tr("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<Gf);if(o===Gf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Zf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(V.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(V.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(V.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 Uf("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 wn&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(V.Error,a),Promise.reject(new Uf(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(V.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(V.Error,`Failed to start the transport '${l.transport}': ${f}`),c=void 0,i.push(new Lx(`${l.transport} failed: ${f}`,Ut[l.transport])),this._connectionState!=="Connecting"){const h="Failed to select transport before stop() was called.";return this._logger.log(V.Debug,h),Promise.reject(new Tr(h))}}}}return i.length>0?Promise.reject(new zx(`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 Ut.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new l_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Ut.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new c_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Ut.LongPolling:return new Zf(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=Ut[t.transport];if(s==null)return this._logger.log(V.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(d_(r,s))if(t.transferFormats.map(a=>Jt[a]).indexOf(n)>=0){if(s===Ut.WebSockets&&!this._options.WebSocket||s===Ut.ServerSentEvents&&!this._options.EventSource)return this._logger.log(V.Debug,`Skipping transport '${Ut[s]}' because it is not supported in your environment.'`),new Nx(`'${Ut[s]}' is not supported in your environment.`,s);this._logger.log(V.Debug,`Selecting transport '${Ut[s]}'.`);try{return this.features.reconnect=s===Ut.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(V.Debug,`Skipping transport '${Ut[s]}' because it does not support the requested transfer format '${Jt[n]}'.`),new Error(`'${Ut[s]}' does not support ${Jt[n]}.`);else return this._logger.log(V.Debug,`Skipping transport '${Ut[s]}' because it was disabled by the client.`),new $x(`'${Ut[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(V.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(V.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(V.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(V.Error,`Connection disconnected with error '${t}'.`):this._logger.log(V.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(V.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(V.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(V.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 d_(e,t){return!e||(t&e)!==0}class Ec{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Pi,this._transportResult=new Pi,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Pi),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 Pi;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):Ec._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 Pi{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const f_="json";class p_{constructor(){this.name=f_,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(V.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 h_={trace:V.Trace,debug:V.Debug,info:V.Information,information:V.Information,warn:V.Warning,warning:V.Warning,error:V.Error,critical:V.Critical,none:V.None};function m_(e){const t=h_[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class g_{configureLogging(t){if(Ft.isRequired(t,"logging"),v_(t))this.logger=t;else if(typeof t=="string"){const r=m_(t);this.logger=new Mi(r)}else this.logger=new Mi(t);return this}withUrl(t,r){return Ft.isRequired(t,"url"),Ft.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Ft.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 qf(t):this.reconnectPolicy=t:this.reconnectPolicy=new qf,this}withServerTimeout(t){return Ft.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Ft.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 u_(this.url,t);return Cc.create(r,this.logger||Ro.instance,this.protocol||new p_,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function v_(e){return e.log!==void 0}var $o={},Kf;function y_(){if(Kf)return $o;Kf=1;var e=ut();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(gt()),r=pt();return $o.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"),$o}var b_=y_();const x_=lt(b_);var Lo={},Qf;function __(){if(Qf)return Lo;Qf=1;var e=ut();Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;var t=e(gt()),r=pt();return Lo.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"),Lo}var w_=__();const Hr=lt(w_);function Dc(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function zo(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 Bo(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)?C_(a,f=>f.test(i)):S_(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 S_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function C_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function E_(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 D_(e,...t){const r=sc.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const k_={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"}},A_=(e,t,r)=>{let n;const o=k_[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},T_={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},I_={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},M_={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},P_={date:Dc({formats:T_,defaultWidth:"full"}),time:Dc({formats:I_,defaultWidth:"full"}),dateTime:Dc({formats:M_,defaultWidth:"full"})},O_={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"},j_={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"},R_=(e,t,r,n)=>t.getHours()!==1?j_[e]:O_[e],N_={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},$_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},L_={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"]},z_={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"]},B_={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"}},F_={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"}},W_={ordinalNumber:(e,t)=>Number(e)+"º",era:zo({values:N_,defaultWidth:"wide"}),quarter:zo({values:$_,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:zo({values:L_,defaultWidth:"wide"}),day:zo({values:z_,defaultWidth:"wide"}),dayPeriod:zo({values:B_,defaultWidth:"wide",formattingValues:F_,defaultFormattingWidth:"wide"})},U_=/^(\d+)(º)?/i,H_=/\d+/i,V_={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},Y_={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]},q_={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Z_={any:[/1/i,/2/i,/3/i,/4/i]},G_={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},K_={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]},Q_={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},X_={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]},J_={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},ew={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}},tw={ordinalNumber:E_({matchPattern:U_,parsePattern:H_,valueCallback:function(e){return parseInt(e,10)}}),era:Bo({matchPatterns:V_,defaultMatchWidth:"wide",parsePatterns:Y_,defaultParseWidth:"any"}),quarter:Bo({matchPatterns:q_,defaultMatchWidth:"wide",parsePatterns:Z_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bo({matchPatterns:G_,defaultMatchWidth:"wide",parsePatterns:K_,defaultParseWidth:"any"}),day:Bo({matchPatterns:Q_,defaultMatchWidth:"wide",parsePatterns:X_,defaultParseWidth:"any"}),dayPeriod:Bo({matchPatterns:J_,defaultMatchWidth:"any",parsePatterns:ew,defaultParseWidth:"any"})},rw={code:"es",formatDistance:A_,formatLong:P_,formatRelative:R_,localize:W_,match:tw,options:{weekStartsOn:1,firstWeekContainsDate:1}},Xf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFR3BMcHCAcHBwaGx4ZWp6aG14aG54Zm14aW15aG55aG15aW55aW56aW5591zvEAAAAA10Uk5TABAQIDBBYHCAnr7g7wYb6DAAAACqSURBVHjahZJLDgMhDEM9UL7Ju/91q8KgQhcdb5D8rFiJ0JNC6Qbeczzt6izV8PWjAbiNB4uH35IkpbaRYGBpT9mcVlemtnCTOiLA8BPk+/VPIkPTR/kGalAkdUgnSNAlOegEckwS2C8wOAEWN2D4BC8HH3Xge/naYJUXaJq6Wo+S2iy7HJKW1sbHSc6B0mU7SeOIf8++CJg5nHOvypLXoF0xdwfrJTx9mzdxpgqGKfcyxQAAAABJRU5ErkJggg==",nw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAMAAABZu7juAAAAPFBMVEUAAABobHhobnhpbnlobnhobXhpbnlpbnpobXhwcHNobHhlanlpbnlobnhobnpobXhmbXlocHhpbHZpbnlt0ET4AAAAE3RSTlMAIGDggL/f76AQQDDPsLCQcEBQZL6CzQAAALVJREFUSMft1MsOgyAQhWEGHQa82/P+71rDojhJ6dCNi9ZvZcivQUjGXWeTQHqFJvS1mgDMemkGQJV8AMB6iQHsb9K0RZ4ACCsCYOLoSccrDPH0AgWYAqm6vY9owuVAmgzq46aY84BGknM0S/nqm9Ef5tIZROXeGfyd3/lP5Kk9T+4gAGYrj68pxjiMn2sqI9iX6V0zhtOO8zO4r1k5B8F9NeBH9dsWr/ZmCLs+10VQ1S0Pd4UnLwhFRUE6UNsAAAAASUVORK5CYII=",ow=({notificacion:e,onAccept:t})=>{const{evento:r,tipo:n,leida:o}=e,s=n==="EventoCreado"||n==="EventoModificado",a={EventoCreado:{frase:"te ha invitado a:",colorTitulo:"#3c4043"},EventoModificado:{frase:"ha modificado el evento",colorTitulo:"#3c4043"},EventoCancelado:{frase:"ha cancelado el evento",colorTitulo:"#d32f2f"}}[n]||{frase:"te ha notificado sobre",colorTitulo:"#3c4043"},c=r?.fechaInicio?new Date(r.fechaInicio):new Date,l=r?.fechaFin?new Date(r.fechaFin):null,d=r?.nombreAnfitrion||"Usuario",f=e?.titulo||"Sin título",h=y=>y.split(" ").filter(g=>g).map(g=>g[0]).join("").toUpperCase().substring(0,2);return u.jsxs(m.Box,{sx:{p:2,mb:1,bgcolor:"white",borderRadius:"8px",border:"1px solid #e0e0e0",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",position:"relative",overflow:"hidden"},children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:1},children:[u.jsx(m.Avatar,{sx:{bgcolor:"#F5A623",width:34,height:34,fontSize:"14px",mr:1.5,fontWeight:"bold"},children:h(d)}),u.jsxs(m.Box,{children:[u.jsxs(m.Typography,{sx:{fontSize:"14px",color:"#5f6368",lineHeight:1.2},children:[d," ",a.frase]}),u.jsx(m.Typography,{sx:{fontSize:"14px",fontWeight:700,color:a.colorTitulo},children:f})]})]}),u.jsx(m.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:0},children:[u.jsx("img",{src:nw,width:20,alt:"cal",style:{marginRight:15,color:"black"}}),u.jsx(m.Typography,{sx:{fontSize:"14px",color:"#3c4043",textTransform:"capitalize"},children:x.format(c,"EEEE, dd 'de' MMMM",{locale:rw})})]}),u.jsx(m.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:s&&!o?2:0},children:[u.jsx("img",{src:Xf,width:20,alt:"watch",style:{marginRight:15}}),u.jsxs(m.Typography,{sx:{fontSize:"14px",color:"#3c4043"},children:[x.format(c,"h:mm a").toLowerCase(),l?` - ${x.format(l,"h:mm a").toLowerCase()}`:""]})]}),s&&!o&&u.jsxs(m.Grid,{container:!0,spacing:1,sx:{mt:1},children:[u.jsx(m.Grid,{item:!0,xs:6,children:u.jsx(m.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:u.jsx(x_,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"CONFIRMADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#1976D2",borderColor:"#1976D2",py:.8,px:1,whiteSpace:"nowrap"},children:"Asistiré"})}),u.jsx(m.Grid,{item:!0,xs:6,children:u.jsx(m.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:u.jsx(Hr,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"RECHAZADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#D32F2F",borderColor:"#D32F2F",py:.8,px:1,whiteSpace:"nowrap"},children:"Rechazar"})})]})]})},sw="http://localhost:5173/hubs/invitaciones/",iw=({userId:e,notifications:t,onAceppInvitacion:r})=>{const[n,o]=v.useState(t),[s,i]=v.useState(null);console.log("notifications",t),v.useEffect(()=>{o(t)},[t]);const a=v.useCallback(c=>{console.log("invitation",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:"",fechaFin:c.FechaFin}};o(d=>[l,...d])},[]);return v.useEffect(()=>{if(!e)return;const c=new g_().withUrl(sw+`?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(m.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:u.jsx(m.List,{disablePadding:!0,children:n.length===0?u.jsxs("div",{className:be.emptyStateContainer,children:[u.jsx("img",{src:Wf,alt:"Todo en orden",className:be.emptyStateImage}),u.jsx("h4",{className:be.emptyStateTitle,children:"Todo en orden aquí"}),u.jsx("p",{className:be.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):n.map(c=>u.jsx(ow,{notificacion:c,onAccept:r}))})})},aw=({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:y,onAceppInvitacion:g})=>{const{session:p,sessionoutlook:b}=ac(),{enqueueSnackbar:w}=bs.useSnackbar(),S=N=>{const le=new Date,de={start:x.startOfDay(le),end:x.endOfDay(le)},$={start:N.fechaInicio,end:N.fechaFin};return Wd(de,$)?"Hoy":x.isTomorrow(N.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(N.fechaInicio)},E={};t.forEach(N=>{const le=S(N);E[le]||(E[le]=[]),E[le].push(N)});const[C,_]=v.useState(!1),W=()=>{_(!C)},D=Ti(),T=_c(),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 T.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]=v.useState("events"),F=N=>{G(N)},[Y,se]=v.useState(!0),H=()=>{se(N=>!N)};return u.jsxs("div",{className:be.sidebarContainer,children:[u.jsxs("div",{className:be.leadsSection,children:[u.jsxs("div",{className:be.leadCard,children:[u.jsx("div",{className:be.leadIcon,children:u.jsx("img",{src:Qd})}),u.jsxs("div",{className:be.leadText,children:[u.jsx("div",{className:be.leadDays,children:"+30 días sin atender"}),u.jsxs("div",{className:be.leadCount,children:[r," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),u.jsxs("div",{className:be.leadCard,children:[u.jsx("div",{className:be.leadIcon,children:u.jsx("img",{src:Qd})}),u.jsxs("div",{className:be.leadText,children:[u.jsx("div",{className:be.leadDays,children:"+90 días sin atender"}),u.jsxs("div",{className:be.leadCount,children:[n," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),u.jsxs("div",{className:be.eventsSection,children:[u.jsxs("div",{className:be.tabsContainer,children:[u.jsx("button",{className:`${be.tabButton} ${U==="events"?be.activeTab:""}`,onClick:()=>F("events"),children:"Eventos"}),u.jsxs("button",{className:`${be.tabButton} ${U==="alerts"?be.activeTab:""}`,onClick:()=>F("alerts"),children:["Alertas",y>0&&u.jsx("span",{className:be.alertBadge,children:y>99?"99+":y})]})]}),u.jsxs("div",{className:be.eventsContainer,children:[U==="events"&&u.jsx(u.Fragment,{children:Object.keys(E).length>0?Object.entries(E).map(([N,le])=>u.jsxs("div",{className:`${be.eventGroup}`,children:[u.jsxs("div",{className:be.eventGroupDate,children:[u.jsx("img",{src:i1,width:15})," ",N]}),le.map(de=>{const $=De(de.color||"#ffcc00"),Q=$.toString(),Se=$.clone().darken(15).toString(),we=new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"2-digit",hour12:!0});return u.jsxs("div",{className:be.eventItem,style:{backgroundColor:Q,borderLeft:`4px solid ${Se}`,display:"flex",alignItems:"center",padding:"10px",marginBottom:"8px",borderRadius:"4px",cursor:"pointer"},onClick:()=>e(de),children:[u.jsxs("div",{className:be.eventDetails,style:{flex:1},children:[u.jsx("div",{className:be.eventTitle,style:{fontWeight:"500",fontSize:"12px",color:"#333"},children:de.titulo.length>32?`${de.titulo.substring(0,32)}...`:de.titulo}),de.nombreAnfitrion&&u.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"4px",color:"#555"},children:[u.jsx("img",{src:Xd,width:16,style:{marginRight:"6px",opacity:.7}}),u.jsx("span",{style:{fontSize:"13px"},children:de.nombreAnfitrion})]}),u.jsx("div",{className:be.eventTime,style:{fontSize:"12px",marginTop:"4px",opacity:.7},children:`${we.format(de.fechaInicio).toLowerCase()} - ${we.format(de.fechaFin).toLowerCase()}`})]}),de.link&&u.jsx("a",{onClick:he=>he.stopPropagation(),href:de.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",padding:"4px"},children:u.jsx("img",{src:a1,alt:"Video",width:20,style:{opacity:.8}})})]},de.eventoID)})]},N)):u.jsxs("div",{className:be.emptyStateContainer,children:[u.jsx("img",{src:Wf,alt:"Todo en orden",className:be.emptyStateImage}),u.jsx("h4",{className:be.emptyStateTitle,children:"Tu agenda está despejada"}),u.jsx("p",{className:be.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),u.jsxs("button",{className:be.addEventButton,onClick:i,children:[u.jsx("img",{src:Ld}),"Agregar evento"]})]})}),U==="alerts"&&u.jsx(m.Box,{children:u.jsx(iw,{userId:s,notifications:h,onAceppInvitacion:g})})]})]}),u.jsxs("div",{className:be.calendarsSection,children:[u.jsxs("button",{onClick:W,className:be.collapsibleHeader,children:[u.jsxs("div",{className:be.headerTitle,children:[u.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),u.jsx("span",{className:be.calendarCount,children:"1"})]}),u.jsx(j2,{className:`${be.chevronIcon} ${C?be.collapsed:""}`})]}),u.jsxs("div",{className:`${be.collapsibleContent} ${C?be.hidden:""}`,children:[u.jsxs("button",{className:`${be.calendarSelectButton} ${Y?be.calendarSelected:""}`,onClick:H,style:{"--calendar-color":"#1976D2"},children:[u.jsx("div",{className:be.customCheckIcon,children:u.jsx("div",{className:be.circularCheckbox,children:u.jsx(oc,{size:16,className:be.checkedIcon})})}),u.jsx(O2,{size:16,className:be.calendarIcon}),u.jsx("span",{className:be.calendarItemText,children:"Mi calendario"})]}),b.userEmail?u.jsxs("div",{className:be.syncButton,onClick:I,children:[u.jsx("div",{className:be.circularCheckbox,children:u.jsx(oc,{size:16,className:be.checkedIcon})}),u.jsx("img",{src:Ff,width:20}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):u.jsx(Rx,{disID:o,usrID:s}),p?.userEmail?u.jsxs("div",{className:be.syncButton,onClick:M,children:[u.jsx("div",{className:be.circularCheckbox,children:u.jsx(oc,{size:16,className:be.checkedIcon})}),u.jsx("img",{src:Bf,width:18}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):u.jsx(jx,{disID:o,usrID:s}),b?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:be.currentUserCalendarTitle,style:{marginTop:"10px"},children:b?.userEmail}),l?u.jsx(m.CircularProgress,{size:24}):c.length>0?u.jsx(m.List,{dense:!0,className:be.calendarsList,children:c.map(N=>u.jsx(m.ListItem,{secondaryAction:u.jsx(m.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(m.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:be.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:be.currentUserCalendarTitle,style:{marginTop:"10px"},children:p?.userEmail}),l?u.jsx(m.CircularProgress,{size:24}):a.length>0?u.jsx(m.List,{dense:!0,className:be.calendarsList,children:a.map(N=>u.jsx(m.ListItem,{secondaryAction:u.jsx(m.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(m.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:be.calendarItemText})},N.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},En={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 Fo={},Jf;function cw(){if(Jf)return Fo;Jf=1;var e=ut();Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=void 0,o(v);var t=e(gt()),r=pt();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 Fo.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"),Fo}var lw=cw();const uw=lt(lw);var Wo={},ep;function dw(){if(ep)return Wo;ep=1;var e=ut();Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0;var t=e(gt()),r=pt();return Wo.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"),Wo}var fw=dw();const pw=lt(fw),tp=46,hw=22,mw=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[En.dayCell,o?"":En.notCurrentMonth,En.CurrentDay].join(" ").trim(),l=v.useRef(null),[d,f]=v.useState(r.length),h=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});v.useLayoutEffect(()=>{const p=()=>{if(l.current){const b=l.current.clientHeight;let w=Math.floor(b/(tp+4));if(w<r.length){const S=Math.floor((b-hw)/(tp+4));w=Math.max(0,S)}f(w)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const y=r.slice(0,d===0?1:d),g=r.length-(d===0?1:d);return u.jsxs("div",{className:`${c} ${En.dayCellContainer}`,onClick:()=>s?.(t),style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[u.jsx("div",{className:n?En.dayNumber:En.dayNumberToday,children:e}),u.jsxs("div",{className:En.eventsList,ref:l,style:{flex:1,display:"flex",flexDirection:"column",gap:"4px",padding:"0 4px 4px 4px",marginTop:"4px",overflow:"hidden"},children:[y.map(p=>{const b=p.color||"#D7EBFB",w=p.isGoogleEvent||p.isOutlookEvent;return u.jsxs(m.Box,{onClick:S=>{S.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(uw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#4285F4"}}),p.isOutlookEvent&&u.jsx(pw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#0078D4"}}),u.jsx(m.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(m.Typography,{sx:{fontSize:"9px",color:"#70757a",mt:"auto",fontWeight:400},children:`${h.format(p.fechaInicio).toLowerCase()} - ${h.format(p.fechaFin).toLowerCase()}`})]},p.eventoID)}),g>0&&u.jsxs(m.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:["+",g," más"]})]})]})},rp={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},gw=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return u.jsx("div",{className:rp.weekDaysContainer,children:e.map(t=>u.jsx("div",{className:rp.weekDay,children:t},t))})},Oi={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function vw(e,t){const[r,n]=D_(e,t.start,t.end);return{start:r,end:n}}function yw(e,t){const{start:r,end:n}=vw(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(sc(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function bw(e,t){const r=t?.weekStartsOn,n=an(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 xw(e,t,r){const n=+an(e,r?.in),[o,s]=[+an(t.start,r?.in),+an(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const _w=({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=bw(i,{weekStartsOn:1}),l=yw({start:a,end:c}),d={},f=l.length/7,h=`${Oi.daysContainer} ${f===5?Oi.rows5:Oi.rows6}`;return t.forEach(y=>{const g=x.format(y.fechaInicio,"yyyy-MM-dd");d[g]||(d[g]=[]),d[g].push(y)}),u.jsxs("div",{className:Oi.calendarGridContainer,children:[u.jsx(gw,{}),u.jsx("div",{className:h,children:l.map(y=>{const g=t.filter(p=>xw(y,{start:x.startOfDay(p.fechaInicio),end:x.endOfDay(p.fechaFin)}));return u.jsx(mw,{dayNumber:y.getDate(),date:y,events:g,isToday:x.isToday(y),isCurrentMonth:x.isSameMonth(y,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},y.toISOString())})})]})},kc=()=>{const{calendarApiUrl:e}=xc(),t=async g=>{try{return(await wt.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${g}`)).data.map(b=>{const w=new Date(b.fechaInicio),S=new Date(b.fechaFin),E=b.solicitudRelacionada?.[0]?.nombreCliente??null;return{...b,fechaInicio:w,fechaFin:S,client:E}})}catch(p){return console.error("Error events:",p),[]}},r=async(g,p)=>{try{const b=await wt.post(`${e}/api/Calendario/v1/local/InsertarEvento/${p}`,g);return{...b.data,fechaInicio:new Date(b.data.fechaInicio),fechaFin:new Date(b.data.fechaFin)}}catch(b){throw console.log("Error creating event:",b),b}},n=async g=>{try{const p=await wt.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${g.eventoID}`,g);return{eventoID:p.data.eventoID,titulo:p.data.titulo,descripcion:p.data.descripcion,fechaInicio:new Date(p.data.fechaInicio),fechaFin:new Date(p.data.fechaFin),todoElDia:p.data.todoElDia,color:p.data.color,repetir:p.data.repetir,link:p.data.link,solID:p.data.solID,disID:p.data.disID,client:p.data.client,esOrganizador:p.data.esOrganizador}}catch(p){throw console.log("Error updating event:",p),p}},o=async g=>{try{const p=await wt.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${g}`),b=p.data[0].solicitudRelacionada?.[0]?.nombreCliente||null;return{...p.data[0],fechaInicio:p.data[0].fechaInicio,fechaFin:p.data[0].fechaFin,client:b}}catch(p){throw console.error(`Error fetching event with ID ${g}:`,p),p}},s=async g=>{try{await wt.post(`${e}/api/Calendario/v1/local/EliminarEvento/${g}`)}catch(p){throw console.log(`Error ID ${g}:`,p),p}},i=v.useCallback(async(g,p,b,w)=>{try{const S={masNombreBD:b,usrID:w,disID:p,nombreCliente:g},C=(await wt.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,S)).data?.data;return Array.isArray(C)?C.map(_=>({clienteID:_.clienteID,solID:_.solID,marca:_?.marca,modelo:_?.modelo,nombreCliente:_?.nombreCliente})):[]}catch(S){return console.error("Error clientes:",S),[]}},[e]),a=v.useCallback(async(g,p)=>{try{const b={disID:g,usrMail:p},S=(await wt.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,b)).data?.data;return Array.isArray(S)?S.map(E=>({usrID:E.usrID,usrNombre:E.usrNombre,usrMail:E?.usrMail,disID:E?.disID})):[]}catch(b){return console.error("Error usuarios:",b),[]}},[e]),c=async(g,p,b,w,S)=>{const E={tieneConflicto:!1,usrMail:""};try{const C={disID:g,usrMail:p,startDate:b,horaInicio:w,horaFin:S};return(await wt.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,C)).data?.data}catch(C){return console.error("Error al verificar conflicto:",C),E}},l=v.useCallback(async(g,p,b,w)=>{try{const S={disID:g,usrMail:p,startDate:b,DuracionEvento:w},C=(await wt.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,S)).data?.data;return Array.isArray(C)?C.map(_=>({Fecha:_.fecha,HoraInicio:_.horaInicio,HoraFin:_.horaFin})):[]}catch(S){return console.error("Error usuarios:",S),[]}},[e]),d=v.useCallback(async(g,p=!1)=>{try{const b=await wt.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${g}?soloNoLeidas=${p}`);return console.log("response.data",b.data),b.data}catch(b){return console.error("Error usuarios:",b),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:l,getNotificacionesXUsuario:d,UpdateStatusEvento:async(g,p,b)=>{try{const w={EventoID:g,UsuarioID:p,status:b};return(await wt.post(`${e}/api/Calendario/v1/local/ActualizarEstadoInvitacionAsync/`,w)).data}catch(w){return console.error("Error Actualizar estatus:",w),{}}},MarcarLeido:async(g,p)=>{try{return(await wt.post(`${e}/api/Notificaciones/v1/local/MarcarComoLeidaAsync/${g}?usuarioId=${p}&marcarComoLeida=true`)).data?.data}catch(b){return console.error("Error Actualizar estatus:",b),{}}},ReenviarNotificacion:async(g,p)=>{try{const b=await wt.post(`${e}/api/Calendario/v1/local/ReenviarNotificacion/${p}/${g}`);return console.log("reenviar",b),b.data?.data}catch(b){return console.error("Error Actualizar estatus:",b),{}}}}};var Uo={},np;function ww(){if(np)return Uo;np=1;var e=ut();Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=void 0;var t=e(gt()),r=pt();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 Sw=ww();const Ac=lt(Sw);var Ho=e=>e.type==="checkbox",Dn=e=>e instanceof Date,tr=e=>e==null;const op=e=>typeof e=="object";var $t=e=>!tr(e)&&!Array.isArray(e)&&op(e)&&!Dn(e),sp=e=>$t(e)&&e.target?Ho(e.target)?e.target.checked:e.target.value:e,Cw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ip=(e,t)=>e.has(Cw(t)),Ew=e=>{const t=e.constructor&&e.constructor.prototype;return $t(t)&&t.hasOwnProperty("isPrototypeOf")},Tc=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ht(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(!(Tc&&(e instanceof Blob||n))&&(r||$t(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Ew(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ht(e[o]));else return e;return t}var ji=e=>/^\w*$/.test(e),Lt=e=>e===void 0,Ic=e=>Array.isArray(e)?e.filter(Boolean):[],Mc=e=>Ic(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pe=(e,t,r)=>{if(!t||!$t(e))return r;const n=(ji(t)?[t]:Mc(t)).reduce((o,s)=>tr(o)?o:o[s],e);return Lt(n)||n===e?Lt(e[t])?r:e[t]:n},pr=e=>typeof e=="boolean",at=(e,t,r)=>{let n=-1;const o=ji(t)?[t]:Mc(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=$t(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const Ri={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ir={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"},Pc=v.createContext(null);Pc.displayName="HookFormContext";const Oc=()=>v.useContext(Pc),Dw=e=>{const{children:t,...r}=e;return v.createElement(Pc.Provider,{value:r},t)};var ap=(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]!==Ir.all&&(t._proxyFormState[i]=!n||Ir.all),r&&(r[i]=!0),e[i]}});return o};const jc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function kw(e){const t=Oc(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[i,a]=v.useState(r._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return jc(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:l=>{!n&&a({...r._formState,...l})}}),[o,n,s]),v.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),v.useMemo(()=>ap(i,r,c.current,!1),[i,r])}var Vr=e=>typeof e=="string",cp=(e,t,r,n,o)=>Vr(e)?(n&&t.watch.add(e),pe(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),pe(r,s))):(n&&(t.watchAll=!0),r),Rc=e=>tr(e)||!op(e);function Xr(e,t,r=new WeakSet){if(Rc(e)||Rc(t))return e===t;if(Dn(e)&&Dn(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(Dn(i)&&Dn(a)||$t(i)&&$t(a)||Array.isArray(i)&&Array.isArray(a)?!Xr(i,a,r):i!==a)return!1}}return!0}function lp(e){const t=Oc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=v.useRef(o),l=v.useRef(a),d=v.useRef(void 0);l.current=a;const f=v.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,y]=v.useState(l.current?l.current(f):f);return jc(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:g=>{if(!s){const p=cp(n,r._names,g.values||r._formValues,!1,c.current);if(l.current){const b=l.current(p);Xr(b,d.current)||(y(b),d.current=b)}else y(p)}}}),[r,s,n,i]),v.useEffect(()=>r._removeUnmounted()),h}function Aw(e){const t=Oc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=ip(o._names.array,r),c=v.useMemo(()=>pe(o._formValues,r,pe(o._defaultValues,r,i)),[o,r,i]),l=lp({control:o,name:r,defaultValue:c,exact:!0}),d=kw({control:o,name:r,exact:!0}),f=v.useRef(e),h=v.useRef(o.register(r,{...e.rules,value:l,...pr(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const y=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!pe(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!pe(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!pe(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!pe(d.validatingFields,r)},error:{enumerable:!0,get:()=>pe(d.errors,r)}}),[d,r]),g=v.useCallback(S=>h.current.onChange({target:{value:sp(S),name:r},type:Ri.CHANGE}),[r]),p=v.useCallback(()=>h.current.onBlur({target:{value:pe(o._formValues,r),name:r},type:Ri.BLUR}),[r,o._formValues]),b=v.useCallback(S=>{const E=pe(o._fields,r);E&&S&&(E._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:C=>S.setCustomValidity(C),reportValidity:()=>S.reportValidity()})},[o._fields,r]),w=v.useMemo(()=>({name:r,value:l,...pr(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:g,onBlur:p,ref:b}),[r,n,d.disabled,g,p,b,l]);return v.useEffect(()=>{const S=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...pr(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(C,_)=>{const W=pe(o._fields,C);W&&W._f&&(W._f.mount=_)};if(E(r,!0),S){const C=Ht(pe(o._options.defaultValues,r));at(o._defaultValues,r,C),Lt(pe(o._formValues,r))&&at(o._formValues,r,C)}return!a&&o.register(r),()=>{(a?S&&!o._state.action:S)?o.unregister(r):E(r,!1)}},[r,o,a,s]),v.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),v.useMemo(()=>({field:w,formState:d,fieldState:y}),[w,d,y])}const hr=e=>e.render(Aw(e));var Nc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Vo=e=>Array.isArray(e)?e:[e],up=()=>{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=[]}}},sr=e=>$t(e)&&!Object.keys(e).length,$c=e=>e.type==="file",Mr=e=>typeof e=="function",Ni=e=>{if(!Tc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dp=e=>e.type==="select-multiple",Lc=e=>e.type==="radio",Tw=e=>Lc(e)||Ho(e),zc=e=>Ni(e)&&e.isConnected;function Iw(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Lt(e)?n++:e[t[n++]];return e}function Mw(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function Wt(e,t){const r=Array.isArray(t)?t:ji(t)?[t]:Mc(t),n=r.length===1?e:Iw(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&($t(n)&&sr(n)||Array.isArray(n)&&Mw(n))&&Wt(e,r.slice(0,-1)),e}var fp=e=>{for(const t in e)if(Mr(e[t]))return!0;return!1};function $i(e,t={}){const r=Array.isArray(e);if($t(e)||r)for(const n in e)Array.isArray(e[n])||$t(e[n])&&!fp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},$i(e[n],t[n])):tr(e[n])||(t[n]=!0);return t}function pp(e,t,r){const n=Array.isArray(e);if($t(e)||n)for(const o in e)Array.isArray(e[o])||$t(e[o])&&!fp(e[o])?Lt(t)||Rc(r[o])?r[o]=Array.isArray(e[o])?$i(e[o],[]):{...$i(e[o])}:pp(e[o],tr(t)?{}:t[o],r[o]):r[o]=!Xr(e[o],t[o]);return r}var Yo=(e,t)=>pp(e,t,$i(t));const hp={value:!1,isValid:!1},mp={value:!0,isValid:!0};var gp=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&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?mp:{value:e[0].value,isValid:!0}:mp:hp}return hp},vp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Lt(e)?e:t?e===""?NaN:e&&+e:r&&Vr(e)?new Date(e):n?n(e):e;const yp={isValid:!1,value:null};var bp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,yp):yp;function xp(e){const t=e.ref;return $c(t)?t.files:Lc(t)?bp(e.refs).value:dp(t)?[...t.selectedOptions].map(({value:r})=>r):Ho(t)?gp(e.refs).value:vp(Lt(t.value)?e.ref.value:t.value,e)}var Pw=(e,t,r,n)=>{const o={};for(const s of e){const i=pe(t,s);i&&at(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Li=e=>e instanceof RegExp,qo=e=>Lt(e)?e:Li(e)?e.source:$t(e)?Li(e.value)?e.value.source:e.value:e,_p=e=>({isOnSubmit:!e||e===Ir.onSubmit,isOnBlur:e===Ir.onBlur,isOnChange:e===Ir.onChange,isOnAll:e===Ir.all,isOnTouch:e===Ir.onTouched});const wp="AsyncFunction";var Ow=e=>!!e&&!!e.validate&&!!(Mr(e.validate)&&e.validate.constructor.name===wp||$t(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===wp)),jw=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Sp=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Zo=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=pe(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(Zo(a,t))break}else if($t(a)&&Zo(a,t))break}}};function Cp(e,t,r){const n=pe(e,r);if(n||ji(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=pe(t,s),a=pe(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 Rw=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return sr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Ir.all))},Nw=(e,t,r)=>!e||!t||e===t||Vo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),$w=(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,Lw=(e,t)=>!Ic(pe(e,t)).length&&Wt(e,t),zw=(e,t,r)=>{const n=Vo(pe(e,r));return at(n,"root",t[r]),at(e,r,n),e},zi=e=>Vr(e);function Ep(e,t,r="validate"){if(zi(e)||Array.isArray(e)&&e.every(zi)||pr(e)&&!e)return{type:r,message:zi(e)?e:"",ref:t}}var Gn=e=>$t(e)&&!Li(e)?e:{value:e,message:""},Dp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:l,minLength:d,min:f,max:h,pattern:y,validate:g,name:p,valueAsNumber:b,mount:w}=e._f,S=pe(r,p);if(!w||t.has(p))return{};const E=a?a[0]:i,C=G=>{o&&E.reportValidity&&(E.setCustomValidity(pr(G)?"":G||""),E.reportValidity())},_={},W=Lc(i),D=Ho(i),T=W||D,M=(b||$c(i))&&Lt(i.value)&&Lt(S)||Ni(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,I=Nc.bind(null,p,n,_),U=(G,F,Y,se=Qr.maxLength,H=Qr.minLength)=>{const N=G?F:Y;_[p]={type:G?se:H,message:N,ref:i,...I(G?se:H,N)}};if(s?!Array.isArray(S)||!S.length:c&&(!T&&(M||tr(S))||pr(S)&&!S||D&&!gp(a).isValid||W&&!bp(a).isValid)){const{value:G,message:F}=zi(c)?{value:!!c,message:c}:Gn(c);if(G&&(_[p]={type:Qr.required,message:F,ref:E,...I(Qr.required,F)},!n))return C(F),_}if(!M&&(!tr(f)||!tr(h))){let G,F;const Y=Gn(h),se=Gn(f);if(!tr(S)&&!isNaN(S)){const H=i.valueAsNumber||S&&+S;tr(Y.value)||(G=H>Y.value),tr(se.value)||(F=H<se.value)}else{const H=i.valueAsDate||new Date(S),N=$=>new Date(new Date().toDateString()+" "+$),le=i.type=="time",de=i.type=="week";Vr(Y.value)&&S&&(G=le?N(S)>N(Y.value):de?S>Y.value:H>new Date(Y.value)),Vr(se.value)&&S&&(F=le?N(S)<N(se.value):de?S<se.value:H<new Date(se.value))}if((G||F)&&(U(!!G,Y.message,se.message,Qr.max,Qr.min),!n))return C(_[p].message),_}if((l||d)&&!M&&(Vr(S)||s&&Array.isArray(S))){const G=Gn(l),F=Gn(d),Y=!tr(G.value)&&S.length>+G.value,se=!tr(F.value)&&S.length<+F.value;if((Y||se)&&(U(Y,G.message,F.message),!n))return C(_[p].message),_}if(y&&!M&&Vr(S)){const{value:G,message:F}=Gn(y);if(Li(G)&&!S.match(G)&&(_[p]={type:Qr.pattern,message:F,ref:i,...I(Qr.pattern,F)},!n))return C(F),_}if(g){if(Mr(g)){const G=await g(S,r),F=Ep(G,E);if(F&&(_[p]={...F,...I(Qr.validate,F.message)},!n))return C(F.message),_}else if($t(g)){let G={};for(const F in g){if(!sr(G)&&!n)break;const Y=Ep(await g[F](S,r),E,F);Y&&(G={...Y,...I(F,Y.message)},C(Y.message),n&&(_[p]=G))}if(!sr(G)&&(_[p]={ref:E,...G},!n))return _}}return C(!0),_};const Bw={mode:Ir.onSubmit,reValidateMode:Ir.onChange,shouldFocusError:!0};function Fw(e={}){let t={...Bw,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Mr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=$t(t.defaultValues)||$t(t.values)?Ht(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Ht(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:up(),state:up()},y=t.criteriaMode===Ir.all,g=k=>P=>{clearTimeout(l),l=setTimeout(k,P)},p=async k=>{if(!t.disabled&&(d.isValid||f.isValid||k)){const P=t.resolver?sr((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?at(r.validatingFields,B,P):Wt(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!sr(r.validatingFields)}))},w=(k,P=[],B,ce,ie=!0,O=!0)=>{if(ce&&B&&!t.disabled){if(i.action=!0,O&&Array.isArray(pe(n,k))){const oe=B(pe(n,k),ce.argA,ce.argB);ie&&at(n,k,oe)}if(O&&Array.isArray(pe(r.errors,k))){const oe=B(pe(r.errors,k),ce.argA,ce.argB);ie&&at(r.errors,k,oe),Lw(r.errors,k)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(pe(r.touchedFields,k))){const oe=B(pe(r.touchedFields,k),ce.argA,ce.argB);ie&&at(r.touchedFields,k,oe)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Yo(o,s)),h.state.next({name:k,isDirty:U(k,P),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else at(s,k,P)},S=(k,P)=>{at(r.errors,k,P),h.state.next({errors:r.errors})},E=k=>{r.errors=k,h.state.next({errors:r.errors,isValid:!1})},C=(k,P,B,ce)=>{const ie=pe(n,k);if(ie){const O=pe(s,k,Lt(B)?pe(o,k):B);Lt(O)||ce&&ce.defaultChecked||P?at(s,k,P?O:xp(ie._f)):Y(k,O),i.mount&&p()}},_=(k,P,B,ce,ie)=>{let O=!1,oe=!1;const Ee={name:k};if(!t.disabled){if(!B||ce){(d.isDirty||f.isDirty)&&(oe=r.isDirty,r.isDirty=Ee.isDirty=U(),O=oe!==Ee.isDirty);const Ne=Xr(pe(o,k),P);oe=!!pe(r.dirtyFields,k),Ne?Wt(r.dirtyFields,k):at(r.dirtyFields,k,!0),Ee.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&oe!==!Ne}if(B){const Ne=pe(r.touchedFields,k);Ne||(at(r.touchedFields,k,B),Ee.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&Ne!==B)}O&&ie&&h.state.next(Ee)}return O?Ee:{}},W=(k,P,B,ce)=>{const ie=pe(r.errors,k),O=(d.isValid||f.isValid)&&pr(P)&&r.isValid!==P;if(t.delayError&&B?(c=g(()=>S(k,B)),c(t.delayError)):(clearTimeout(l),c=null,B?at(r.errors,k,B):Wt(r.errors,k)),(B?!Xr(ie,B):ie)||!sr(ce)||O){const oe={...ce,...O&&pr(P)?{isValid:P}:{},errors:r.errors,name:k};r={...r,...oe},h.state.next(oe)}},D=async k=>{b(k,!0);const P=await t.resolver(s,t.context,Pw(k||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(k),P},T=async k=>{const{errors:P}=await D(k);if(k)for(const B of k){const ce=pe(P,B);ce?at(r.errors,B,ce):Wt(r.errors,B)}else r.errors=P;return P},M=async(k,P,B={valid:!0})=>{for(const ce in k){const ie=k[ce];if(ie){const{_f:O,...oe}=ie;if(O){const Ee=a.array.has(O.name),Ne=ie._f&&Ow(ie._f);Ne&&d.validatingFields&&b([ce],!0);const R=await Dp(ie,a.disabled,s,y,t.shouldUseNativeValidation&&!P,Ee);if(Ne&&d.validatingFields&&b([ce]),R[O.name]&&(B.valid=!1,P))break;!P&&(pe(R,O.name)?Ee?zw(r.errors,R,O.name):at(r.errors,O.name,R[O.name]):Wt(r.errors,O.name))}!sr(oe)&&await M(oe,P,B)}}return B.valid},I=()=>{for(const k of a.unMount){const P=pe(n,k);P&&(P._f.refs?P._f.refs.every(B=>!zc(B)):!zc(P._f.ref))&&J(k)}a.unMount=new Set},U=(k,P)=>!t.disabled&&(k&&P&&at(s,k,P),!Xr($(),o)),G=(k,P,B)=>cp(k,a,{...i.mount?s:Lt(P)?o:Vr(k)?{[k]:P}:P},B,P),F=k=>Ic(pe(i.mount?s:o,k,t.shouldUnregister?pe(o,k,[]):[])),Y=(k,P,B={})=>{const ce=pe(n,k);let ie=P;if(ce){const O=ce._f;O&&(!O.disabled&&at(s,k,vp(P,O)),ie=Ni(O.ref)&&tr(P)?"":P,dp(O.ref)?[...O.ref.options].forEach(oe=>oe.selected=ie.includes(oe.value)):O.refs?Ho(O.ref)?O.refs.forEach(oe=>{(!oe.defaultChecked||!oe.disabled)&&(Array.isArray(ie)?oe.checked=!!ie.find(Ee=>Ee===oe.value):oe.checked=ie===oe.value||!!ie)}):O.refs.forEach(oe=>oe.checked=oe.value===ie):$c(O.ref)?O.ref.value="":(O.ref.value=ie,O.ref.type||h.state.next({name:k,values:Ht(s)})))}(B.shouldDirty||B.shouldTouch)&&_(k,ie,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&de(k)},se=(k,P,B)=>{for(const ce in P){if(!P.hasOwnProperty(ce))return;const ie=P[ce],O=k+"."+ce,oe=pe(n,O);(a.array.has(k)||$t(ie)||oe&&!oe._f)&&!Dn(ie)?se(O,ie,B):Y(O,ie,B)}},H=(k,P,B={})=>{const ce=pe(n,k),ie=a.array.has(k),O=Ht(P);at(s,k,O),ie?(h.array.next({name:k,values:Ht(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&B.shouldDirty&&h.state.next({name:k,dirtyFields:Yo(o,s),isDirty:U(k,O)})):ce&&!ce._f&&!tr(O)?se(k,O,B):Y(k,O,B),Sp(k,a)&&h.state.next({...r,name:k}),h.state.next({name:i.mount?k:void 0,values:Ht(s)})},N=async k=>{i.mount=!0;const P=k.target;let B=P.name,ce=!0;const ie=pe(n,B),O=Ne=>{ce=Number.isNaN(Ne)||Dn(Ne)&&isNaN(Ne.getTime())||Xr(Ne,pe(s,B,Ne))},oe=_p(t.mode),Ee=_p(t.reValidateMode);if(ie){let Ne,R;const re=P.type?xp(ie._f):sp(k),xe=k.type===Ri.BLUR||k.type===Ri.FOCUS_OUT,Ge=!jw(ie._f)&&!t.resolver&&!pe(r.errors,B)&&!ie._f.deps||$w(xe,pe(r.touchedFields,B),r.isSubmitted,Ee,oe),At=Sp(B,a,xe);at(s,B,re),xe?(!P||!P.readOnly)&&(ie._f.onBlur&&ie._f.onBlur(k),c&&c(0)):ie._f.onChange&&ie._f.onChange(k);const q=_(B,re,xe),fe=!sr(q)||At;if(!xe&&h.state.next({name:B,type:k.type,values:Ht(s)}),Ge)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?xe&&p():xe||p()),fe&&h.state.next({name:B,...At?{}:q});if(!xe&&At&&h.state.next({...r}),t.resolver){const{errors:ke}=await D([B]);if(O(re),ce){const Oe=Cp(r.errors,n,B),je=Cp(ke,n,Oe.name||B);Ne=je.error,B=je.name,R=sr(ke)}}else b([B],!0),Ne=(await Dp(ie,a.disabled,s,y,t.shouldUseNativeValidation))[B],b([B]),O(re),ce&&(Ne?R=!1:(d.isValid||f.isValid)&&(R=await M(n,!0)));ce&&(ie._f.deps&&de(ie._f.deps),W(B,R,Ne,q))}},le=(k,P)=>{if(pe(r.errors,P)&&k.focus)return k.focus(),1},de=async(k,P={})=>{let B,ce;const ie=Vo(k);if(t.resolver){const O=await T(Lt(k)?k:ie);B=sr(O),ce=k?!ie.some(oe=>pe(O,oe)):B}else k?(ce=(await Promise.all(ie.map(async O=>{const oe=pe(n,O);return await M(oe&&oe._f?{[O]:oe}:oe)}))).every(Boolean),!(!ce&&!r.isValid)&&p()):ce=B=await M(n);return h.state.next({...!Vr(k)||(d.isValid||f.isValid)&&B!==r.isValid?{}:{name:k},...t.resolver||!k?{isValid:B}:{},errors:r.errors}),P.shouldFocus&&!ce&&Zo(n,le,k?ie:a.mount),ce},$=k=>{const P={...i.mount?s:o};return Lt(k)?P:Vr(k)?pe(P,k):k.map(B=>pe(P,B))},Q=(k,P)=>({invalid:!!pe((P||r).errors,k),isDirty:!!pe((P||r).dirtyFields,k),error:pe((P||r).errors,k),isValidating:!!pe(r.validatingFields,k),isTouched:!!pe((P||r).touchedFields,k)}),Se=k=>{k&&Vo(k).forEach(P=>Wt(r.errors,P)),h.state.next({errors:k?r.errors:{}})},we=(k,P,B)=>{const ce=(pe(n,k,{_f:{}})._f||{}).ref,ie=pe(r.errors,k)||{},{ref:O,message:oe,type:Ee,...Ne}=ie;at(r.errors,k,{...Ne,...P,ref:ce}),h.state.next({name:k,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&ce&&ce.focus&&ce.focus()},he=(k,P)=>Mr(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=>{Nw(k.name,P.name,k.exact)&&Rw(P,k.formState||d,Ve,k.reRenderRoot)&&k.callback({values:{...s},...r,...P,defaultValues:o})}}).unsubscribe,ue=k=>(i.mount=!0,f={...f,...k.formState},ae({...k,formState:f})),J=(k,P={})=>{for(const B of k?Vo(k):a.mount)a.mount.delete(B),a.array.delete(B),P.keepValue||(Wt(n,B),Wt(s,B)),!P.keepError&&Wt(r.errors,B),!P.keepDirty&&Wt(r.dirtyFields,B),!P.keepTouched&&Wt(r.touchedFields,B),!P.keepIsValidating&&Wt(r.validatingFields,B),!t.shouldUnregister&&!P.keepDefaultValue&&Wt(o,B);h.state.next({values:Ht(s)}),h.state.next({...r,...P.keepDirty?{isDirty:U()}:{}}),!P.keepIsValid&&p()},Ce=({disabled:k,name:P})=>{(pr(k)&&i.mount||k||a.disabled.has(P))&&(k?a.disabled.add(P):a.disabled.delete(P))},me=(k,P={})=>{let B=pe(n,k);const ce=pr(P.disabled)||pr(t.disabled);return at(n,k,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),B?Ce({disabled:pr(P.disabled)?P.disabled:t.disabled,name:k}):C(k,!0,P.value),{...ce?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:qo(P.min),max:qo(P.max),minLength:qo(P.minLength),maxLength:qo(P.maxLength),pattern:qo(P.pattern)}:{},name:k,onChange:N,onBlur:N,ref:ie=>{if(ie){me(k,P),B=pe(n,k);const O=Lt(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,oe=Tw(O),Ee=B._f.refs||[];if(oe?Ee.find(Ne=>Ne===O):O===B._f.ref)return;at(n,k,{_f:{...B._f,...oe?{refs:[...Ee.filter(zc),O,...Array.isArray(pe(o,k))?[{}]:[]],ref:{type:O.type,name:k}}:{ref:O}}}),C(k,!1,void 0,O)}else B=pe(n,k,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(ip(a.array,k)&&i.action)&&a.unMount.add(k)}}},ee=()=>t.shouldFocusError&&Zo(n,le,a.mount),Me=k=>{pr(k)&&(h.state.next({disabled:k}),Zo(n,(P,B)=>{const ce=pe(n,B);ce&&(P.disabled=ce._f.disabled||k,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(ie=>{ie.disabled=ce._f.disabled||k}))},0,!1))},j=(k,P)=>async B=>{let ce;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ie=Ht(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:oe}=await D();r.errors=O,ie=Ht(oe)}else await M(n);if(a.disabled.size)for(const O of a.disabled)Wt(ie,O);if(Wt(r.errors,"root"),sr(r.errors)){h.state.next({errors:{}});try{await k(ie,B)}catch(O){ce=O}}else P&&await P({...r.errors},B),ee(),setTimeout(ee);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:sr(r.errors)&&!ce,submitCount:r.submitCount+1,errors:r.errors}),ce)throw ce},Fe=(k,P={})=>{pe(n,k)&&(Lt(P.defaultValue)?H(k,Ht(pe(o,k))):(H(k,P.defaultValue),at(o,k,Ht(P.defaultValue))),P.keepTouched||Wt(r.touchedFields,k),P.keepDirty||(Wt(r.dirtyFields,k),r.isDirty=P.defaultValue?U(k,Ht(pe(o,k))):U()),P.keepError||(Wt(r.errors,k),d.isValid&&p()),h.state.next({...r}))},Ke=(k,P={})=>{const B=k?Ht(k):o,ce=Ht(B),ie=sr(k),O=ie?o:ce;if(P.keepDefaultValues||(o=B),!P.keepValues){if(P.keepDirtyValues){const oe=new Set([...a.mount,...Object.keys(Yo(o,s))]);for(const Ee of Array.from(oe))pe(r.dirtyFields,Ee)?at(O,Ee,pe(s,Ee)):H(Ee,pe(O,Ee))}else{if(Tc&&Lt(k))for(const oe of a.mount){const Ee=pe(n,oe);if(Ee&&Ee._f){const Ne=Array.isArray(Ee._f.refs)?Ee._f.refs[0]:Ee._f.ref;if(Ni(Ne)){const R=Ne.closest("form");if(R){R.reset();break}}}}if(P.keepFieldsRef)for(const oe of a.mount)H(oe,pe(O,oe));else n={}}s=t.shouldUnregister?P.keepDefaultValues?Ht(o):{}:Ht(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:ie?!1:P.keepDirty?r.isDirty:!!(P.keepDefaultValues&&!Xr(k,o)),isSubmitted:P.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ie?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Yo(o,s):r.dirtyFields:P.keepDefaultValues&&k?Yo(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)=>Ke(Mr(k)?k(s):k,P),Be=(k,P={})=>{const B=pe(n,k),ce=B&&B._f;if(ce){const ie=ce.refs?ce.refs[0]:ce.ref;ie.focus&&(ie.focus(),P.shouldSelect&&Mr(ie.select)&&ie.select())}},Ve=k=>{r={...r,...k}},ht={control:{register:me,unregister:J,getFieldState:Q,handleSubmit:j,setError:we,_subscribe:ae,_runSchema:D,_focusError:ee,_getWatch:G,_getDirty:U,_setValid:p,_setFieldArray:w,_setDisabledField:Ce,_setErrors:E,_getFieldArray:F,_reset:Ke,_resetDefaultValues:()=>Mr(t.defaultValues)&&t.defaultValues().then(k=>{Ze(k,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Me,_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:ue,trigger:de,register:me,handleSubmit:j,watch:he,setValue:H,getValues:$,reset:Ze,resetField:Fe,clearErrors:Se,unregister:J,setError:we,setFocus:Be,getFieldState:Q};return{...ht,formControl:ht}}function kp(e={}){const t=v.useRef(void 0),r=v.useRef(void 0),[n,o]=v.useState({isDirty:!1,isValidating:!1,isLoading:Mr(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:Mr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Mr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Fw(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,jc(()=>{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]),v.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),v.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),v.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),v.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),v.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),v.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]),v.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=ap(n,s),t.current}const Ap=(e,t,r)=>{if(e&&"reportValidity"in e){const n=pe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Bc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Ap(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Ap(o,r,e))}},Tp=(e,t)=>{t.shouldUseNativeValidation&&Bc(e,t);const r={};for(const n in e){const o=pe(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(Ww(t.names||Object.keys(e),n)){const i=Object.assign({},pe(r,n));at(i,"root",s),at(r,n,i)}else at(r,n,s)}return r},Ww=(e,t)=>{const r=Ip(t);return e.some(n=>Ip(n).match(`^${r}\\.\\d+`))};function Ip(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 Mp extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Pp={};function kn(e){return Pp}function Uw(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 Fc(e,t){return typeof t=="bigint"?t.toString():t}function Wc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Uc(e){return e==null}function Hc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Hw(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 Op=Symbol("evaluating");function vt(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Op)return n===void 0&&(n=Op,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Vw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cn(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 jp(e){return JSON.stringify(e)}const Rp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Bi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Yw=Wc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Go(e){if(Bi(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Bi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Np(e){return Go(e)?{...e}:e}const qw=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ln(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 Zw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Gw={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 Kw(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 cn(this,"shape",o),o},checks:[]});return ln(e,n)}function Qw(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 cn(this,"shape",o),o},checks:[]});return ln(e,n)}function Xw(e,t){if(!Go(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 cn(this,"shape",s),s},checks:[]});return ln(e,o)}function Jw(e,t){if(!Go(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 cn(this,"shape",n),n},checks:e._zod.def.checks};return ln(e,r)}function eS(e,t){const r=Qn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return cn(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ln(e,r)}function tS(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 cn(this,"shape",s),s},checks:[]});return ln(t,n)}function rS(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 cn(this,"shape",s),s},checks:[]});return ln(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 $p(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Fi(e){return typeof e=="string"?e:e?.message}function An(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Fi(e.inst?._zod.def?.error?.(e))??Fi(t?.error?.(e))??Fi(r.customError?.(e))??Fi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Vc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ko(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Lp=(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,Fc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Yc=Z("$ZodError",Lp),Wi=Z("$ZodError",Lp,{Parent:Error});function nS(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 oS(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 Ui=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=>An(c,s,kn())));throw Rp(a,o?.callee),a}return i.value},sS=Ui(Wi),Hi=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=>An(c,s,kn())));throw Rp(a,o?.callee),a}return i.value},iS=Hi(Wi),Vi=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??Yc)(s.issues.map(i=>An(i,o,kn())))}:{success:!0,data:s.value}},aS=Vi(Wi),Yi=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=>An(i,o,kn())))}:{success:!0,data:s.value}},cS=Yi(Wi),lS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ui(e)(t,r,o)},uS=e=>(t,r,n)=>Ui(e)(t,r,n),dS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Hi(e)(t,r,o)},fS=e=>async(t,r,n)=>Hi(e)(t,r,n),pS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vi(e)(t,r,o)},hS=e=>(t,r,n)=>Vi(e)(t,r,n),mS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,r,o)},gS=e=>async(t,r,n)=>Yi(e)(t,r,n),vS=/^[cC][^\s-]{8,}$/,yS=/^[0-9a-z]+$/,bS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xS=/^[0-9a-vA-V]{20}$/,_S=/^[A-Za-z0-9]{27}$/,wS=/^[a-zA-Z0-9_-]{21}$/,SS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CS=/^([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})$/,zp=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)$/,ES=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function kS(){return new RegExp(DS,"u")}const AS=/^(?:(?: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])$/,TS=/^(([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})$/,IS=/^((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])$/,MS=/^(([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])$/,PS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bp=/^[A-Za-z0-9_-]*$/,OS=/^(?=.{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])?)*\.?$/,jS=/^\+(?:[0-9]){6,14}[0-9]$/,Fp="(?:(?:\\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])))",RS=new RegExp(`^${Fp}$`);function Wp(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 NS(e){return new RegExp(`^${Wp(e)}$`)}function $S(e){const t=Wp({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(`^${Fp}T(?:${n})$`)}const LS=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},zS=/^\d+$/,BS=/^-?\d+(?:\.\d+)?/i,FS=/true|false/i,WS=/^[^A-Z]*$/,US=/^[^a-z]*$/,ir=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Up={number:"number",bigint:"bigint",object:"date"},Hp=Z("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const r=Up[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})}}),Vp=Z("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const r=Up[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})}}),HS=Z("$ZodCheckMultipleOf",(e,t)=>{ir.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):Hw(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})}}),VS=Z("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=Gw[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})}}),YS=Z("$ZodCheckMaxLength",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Uc(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=Vc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qS=Z("$ZodCheckMinLength",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Uc(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=Vc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ZS=Z("$ZodCheckLengthEquals",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Uc(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=Vc(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})}}),qi=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;ir.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=()=>{})}),GS=Z("$ZodCheckRegex",(e,t)=>{qi.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})}}),KS=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=WS),qi.init(e,t)}),QS=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=US),qi.init(e,t)}),XS=Z("$ZodCheckIncludes",(e,t)=>{ir.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})}}),JS=Z("$ZodCheckStartsWith",(e,t)=>{ir.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})}}),eC=Z("$ZodCheckEndsWith",(e,t)=>{ir.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})}}),tC=Z("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class rC{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 iC={major:4,minor:1,patch:5},Pt=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=iC;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,y=f._zod.check(i);if(y instanceof Promise&&c?.async===!1)throw new Kn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,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=uS(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return dS(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),Gc=Z("$ZodString",(e,t)=>{Pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??FS(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}}),St=Z("$ZodStringFormat",(e,t)=>{Gi.init(e,t),Gc.init(e,t)}),aC=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kS),St.init(e,t)}),cC=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=Wp(n))}else t.pattern??(t.pattern=Wp());St.init(e,t)}),lC=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=AS),St.init(e,t)}),uC=Z("$ZodURL",(e,t)=>{St.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:NS.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})}}}),dC=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=IS()),St.init(e,t)}),fC=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ES),St.init(e,t)}),pC=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xS),St.init(e,t)}),hC=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_S),St.init(e,t)}),mC=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=wS),St.init(e,t)}),gC=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=SS),St.init(e,t)}),vC=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=CS),St.init(e,t)}),yC=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=BS(t)),St.init(e,t)}),bC=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=LS),St.init(e,t)}),xC=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=zS(t)),St.init(e,t)}),_C=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=DS),St.init(e,t)}),wC=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=MS),St.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),SC=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=PS),St.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})}}}),CC=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=OS),St.init(e,t)}),EC=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=jS),St.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 Gp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const DC=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=RS),St.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Gp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function kC(e){if(!Hp.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Gp(r)}const AC=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Hp),St.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{kC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),TC=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$S),St.init(e,t)});function IC(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 MC=Z("$ZodJWT",(e,t)=>{St.init(e,t),e._zod.check=r=>{IC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Kp=Z("$ZodNumber",(e,t)=>{Pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??HS,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}}),PC=Z("$ZodNumber",(e,t)=>{ZS.init(e,t),Kp.init(e,t)}),OC=Z("$ZodBoolean",(e,t)=>{Pt.init(e,t),e._zod.pattern=US,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}}),jC=Z("$ZodUnknown",(e,t)=>{Pt.init(e,t),e._zod.parse=r=>r}),RC=Z("$ZodNever",(e,t)=>{Pt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Qp(e,t,r){e.issues.length&&t.issues.push(...Bp(r,e.issues)),t.value[r]=e.value}const NC=Z("$ZodArray",(e,t)=>{Pt.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=>Qp(u,r,i))):Qp(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Ki(e,t,r,n){e.issues.length&&t.issues.push(...Bp(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Xp(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=Qw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Jp(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=>Ki(h,r,d,t))):Ki(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 $C=Z("$ZodObject",(e,t)=>{Pt.init(e,t);const r=Uc(()=>Xp(t));vt(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=Wi,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 y=d[f]._zod.run({value:c[f],issues:[]},a);y instanceof Promise?u.push(y.then(g=>Ki(g,i,f,c))):Ki(y,i,f,c)}return o?Jp(u,c,i,a,r.value,e):u.length?Promise.all(u).then(()=>i):i}}),LC=Z("$ZodObjectJIT",(e,t)=>{$C.init(e,t);const r=e._zod.parse,n=Uc(()=>Xp(t)),o=h=>{const y=new sC(["shape","payload","ctx"]),g=n.value,p=E=>{const C=$p(E);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const E of g.keys)b[E]=`key_${w++}`;y.write("const newResult = {}");for(const E of g.keys){const C=b[E],_=$p(E);y.write(`const ${C} = ${p(E)};`),y.write(`
162
+ `))}}const nC={major:4,minor:1,patch:5},Pt=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nC;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,y=f._zod.check(i);if(y instanceof Promise&&c?.async===!1)throw new Kn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,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=aS(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return cS(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),qc=Z("$ZodString",(e,t)=>{Pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??LS(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}}),St=Z("$ZodStringFormat",(e,t)=>{qi.init(e,t),qc.init(e,t)}),oC=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=CS),St.init(e,t)}),sC=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=zp(n))}else t.pattern??(t.pattern=zp());St.init(e,t)}),iC=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ES),St.init(e,t)}),aC=Z("$ZodURL",(e,t)=>{St.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:OS.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})}}}),cC=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=kS()),St.init(e,t)}),lC=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=wS),St.init(e,t)}),uC=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vS),St.init(e,t)}),dC=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=yS),St.init(e,t)}),fC=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=bS),St.init(e,t)}),pC=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=xS),St.init(e,t)}),hC=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=_S),St.init(e,t)}),mC=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$S(t)),St.init(e,t)}),gC=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=RS),St.init(e,t)}),vC=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=NS(t)),St.init(e,t)}),yC=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=SS),St.init(e,t)}),bC=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=AS),St.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),xC=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=TS),St.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})}}}),_C=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=IS),St.init(e,t)}),wC=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=MS),St.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 Yp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const SC=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=PS),St.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Yp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function CC(e){if(!Bp.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Yp(r)}const EC=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Bp),St.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{CC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),DC=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=jS),St.init(e,t)});function kC(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 AC=Z("$ZodJWT",(e,t)=>{St.init(e,t),e._zod.check=r=>{kC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),qp=Z("$ZodNumber",(e,t)=>{Pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??BS,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}}),TC=Z("$ZodNumber",(e,t)=>{VS.init(e,t),qp.init(e,t)}),IC=Z("$ZodBoolean",(e,t)=>{Pt.init(e,t),e._zod.pattern=FS,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}}),MC=Z("$ZodUnknown",(e,t)=>{Pt.init(e,t),e._zod.parse=r=>r}),PC=Z("$ZodNever",(e,t)=>{Pt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Zp(e,t,r){e.issues.length&&t.issues.push(...$p(r,e.issues)),t.value[r]=e.value}const OC=Z("$ZodArray",(e,t)=>{Pt.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=>Zp(l,r,i))):Zp(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Zi(e,t,r,n){e.issues.length&&t.issues.push(...$p(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Gp(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=Zw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Kp(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=>Zi(h,r,d,t))):Zi(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 jC=Z("$ZodObject",(e,t)=>{Pt.init(e,t);const r=Wc(()=>Gp(t));vt(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=Bi,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 y=d[f]._zod.run({value:c[f],issues:[]},a);y instanceof Promise?l.push(y.then(g=>Zi(g,i,f,c))):Zi(y,i,f,c)}return o?Kp(l,c,i,a,r.value,e):l.length?Promise.all(l).then(()=>i):i}}),RC=Z("$ZodObjectJIT",(e,t)=>{jC.init(e,t);const r=e._zod.parse,n=Wc(()=>Gp(t)),o=h=>{const y=new rC(["shape","payload","ctx"]),g=n.value,p=E=>{const C=jp(E);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const E of g.keys)b[E]=`key_${w++}`;y.write("const newResult = {}");for(const E of g.keys){const C=b[E],_=jp(E);y.write(`const ${C} = ${p(E)};`),y.write(`
163
163
  if (${C}.issues.length) {
164
164
  payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
165
165
  ...iss,
@@ -174,7 +174,7 @@ const theme2 = createTheme({ palette: {
174
174
  } else {
175
175
  newResult[${_}] = ${C}.value;
176
176
  }
177
- `)}y.write("payload.value = newResult;"),y.write("return payload;");const S=y.compile();return(E,C)=>S(h,E,C)};let s;const i=Wi,a=!Rp.jitless,u=a&&Gw.value,d=t.catchall;let f;e._zod.parse=(h,y)=>{f??(f=n.value);const g=h.value;return i(g)?a&&u&&y?.async===!1&&y.jitless!==!0?(s||(s=o(t.shape)),h=s(h,y),d?Jp([],g,h,y,f,e):h):r(h,y):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function eh(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=>An(i,n,kn())))}),t)}const zC=Z("$ZodUnion",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),vt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),vt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),vt(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=>Yc(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=>eh(c,o,e,s)):eh(a,o,e,s)}}),BC=Z("$ZodIntersection",(e,t)=>{Pt.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])=>th(r,c,u)):th(r,s,i)}});function Kc(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(Go(e)&&Go(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=Kc(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=Kc(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 th(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=Kc(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 FC=Z("$ZodEnum",(e,t)=>{Pt.init(e,t);const r=Yw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Kw.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}}),WC=Z("$ZodLiteral",(e,t)=>{if(Pt.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}}),HC=Z("$ZodTransform",(e,t)=>{Pt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jp(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 rh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const UC=Z("$ZodOptional",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",vt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),vt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Yc(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=>rh(s,r.value)):rh(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),VC=Z("$ZodNullable",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(e._zod,"optout",()=>t.innerType._zod.optout),vt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Yc(r.source)}|null)$`):void 0}),vt(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)}),YC=Z("$ZodDefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",vt(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=>nh(s,t)):nh(o,t)}});function nh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const qC=Z("$ZodPrefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",vt(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))}),ZC=Z("$ZodNonOptional",(e,t)=>{Pt.init(e,t),vt(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=>oh(s,e)):oh(o,e)}});function oh(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 GC=Z("$ZodCatch",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(e._zod,"optout",()=>t.innerType._zod.optout),vt(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=>An(i,n,kn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>An(s,n,kn()))},input:r.value}),r.issues=[]),r)}}),KC=Z("$ZodPipe",(e,t)=>{Pt.init(e,t),vt(e._zod,"values",()=>t.in._zod.values),vt(e._zod,"optin",()=>t.in._zod.optin),vt(e._zod,"optout",()=>t.out._zod.optout),vt(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=>Qi(i,t.in,n)):Qi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Qi(s,t.out,n)):Qi(o,t.out,n)}});function Qi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const QC=Z("$ZodReadonly",(e,t)=>{Pt.init(e,t),vt(e._zod,"propValues",()=>t.innerType._zod.propValues),vt(e._zod,"values",()=>t.innerType._zod.values),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(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(sh):sh(o)}});function sh(e){return e.value=Object.freeze(e.value),e}const XC=Z("$ZodCustom",(e,t)=>{ir.init(e,t),Pt.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=>ih(s,r,n,e));ih(o,r,n,e)}});function ih(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(Ko(o))}}class JC{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 eE(){return new JC}const Xi=eE();function tE(e,t){return new e({type:"string",...Ae(t)})}function rE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ae(t)})}function ah(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ae(t)})}function nE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ae(t)})}function oE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ae(t)})}function sE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ae(t)})}function iE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ae(t)})}function aE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ae(t)})}function cE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ae(t)})}function lE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ae(t)})}function uE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ae(t)})}function dE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ae(t)})}function fE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ae(t)})}function pE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ae(t)})}function hE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ae(t)})}function mE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ae(t)})}function gE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ae(t)})}function vE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ae(t)})}function yE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ae(t)})}function bE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ae(t)})}function xE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ae(t)})}function _E(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ae(t)})}function wE(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ae(t)})}function SE(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ae(t)})}function CE(e,t){return new e({type:"string",format:"date",check:"string_format",...Ae(t)})}function EE(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ae(t)})}function DE(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ae(t)})}function kE(e,t){return new e({type:"number",checks:[],...Ae(t)})}function AE(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ae(t)})}function TE(e,t){return new e({type:"boolean",...Ae(t)})}function IE(e){return new e({type:"unknown"})}function ME(e,t){return new e({type:"never",...Ae(t)})}function ch(e,t){return new qp({check:"less_than",...Ae(t),value:e,inclusive:!1})}function Qc(e,t){return new qp({check:"less_than",...Ae(t),value:e,inclusive:!0})}function lh(e,t){return new Zp({check:"greater_than",...Ae(t),value:e,inclusive:!1})}function Xc(e,t){return new Zp({check:"greater_than",...Ae(t),value:e,inclusive:!0})}function uh(e,t){return new qS({check:"multiple_of",...Ae(t),value:e})}function dh(e,t){return new GS({check:"max_length",...Ae(t),maximum:e})}function Ji(e,t){return new KS({check:"min_length",...Ae(t),minimum:e})}function fh(e,t){return new QS({check:"length_equals",...Ae(t),length:e})}function PE(e,t){return new XS({check:"string_format",format:"regex",...Ae(t),pattern:e})}function OE(e){return new JS({check:"string_format",format:"lowercase",...Ae(e)})}function jE(e){return new eC({check:"string_format",format:"uppercase",...Ae(e)})}function RE(e,t){return new tC({check:"string_format",format:"includes",...Ae(t),includes:e})}function NE(e,t){return new rC({check:"string_format",format:"starts_with",...Ae(t),prefix:e})}function $E(e,t){return new nC({check:"string_format",format:"ends_with",...Ae(t),suffix:e})}function Qo(e){return new oC({check:"overwrite",tx:e})}function LE(e){return Qo(t=>t.normalize(e))}function zE(){return Qo(e=>e.trim())}function BE(){return Qo(e=>e.toLowerCase())}function FE(){return Qo(e=>e.toUpperCase())}function WE(e,t,r){return new e({type:"array",element:t,...Ae(r)})}function HE(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ae(r)})}function UE(e){const t=VE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ko(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(Ko(o))}},e(r.value,r)));return t}function VE(e,t){const r=new ir({check:"custom",...Ae(t)});return r._zod.check=e,r}function ph(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function YE(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]=Lc(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function qE(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]=Lc(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function ZE(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(ph(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Wc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Pp(YE(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(ph(function(){return Promise.resolve((r.mode==="sync"?cS:lS)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Wc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Zc})(i))return{values:{},errors:Pp(qE(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 GE=Z("ZodISODateTime",(e,t)=>{yC.init(e,t),kt.init(e,t)});function KE(e){return SE(GE,e)}const QE=Z("ZodISODate",(e,t)=>{bC.init(e,t),kt.init(e,t)});function XE(e){return CE(QE,e)}const JE=Z("ZodISOTime",(e,t)=>{xC.init(e,t),kt.init(e,t)});function eD(e){return EE(JE,e)}const tD=Z("ZodISODuration",(e,t)=>{_C.init(e,t),kt.init(e,t)});function rD(e){return DE(tD,e)}const xr=Z("ZodError",(e,t)=>{Zc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>aS(e,r)},flatten:{value:r=>iS(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}),nD=Vi(xr),oD=Yi(xr),sD=qi(xr),iD=Zi(xr),aD=fS(xr),cD=pS(xr),lD=hS(xr),uD=mS(xr),dD=gS(xr),fD=vS(xr),pD=yS(xr),hD=bS(xr),zt=Z("ZodType",(e,t)=>(Pt.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)=>ln(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>nD(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>sD(e,r,n),e.parseAsync=async(r,n)=>oD(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>iD(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>aD(e,r,n),e.decode=(r,n)=>cD(e,r,n),e.encodeAsync=async(r,n)=>lD(e,r,n),e.decodeAsync=async(r,n)=>uD(e,r,n),e.safeEncode=(r,n)=>dD(e,r,n),e.safeDecode=(r,n)=>fD(e,r,n),e.safeEncodeAsync=async(r,n)=>pD(e,r,n),e.safeDecodeAsync=async(r,n)=>hD(e,r,n),e.refine=(r,n)=>e.check(ik(r,n)),e.superRefine=r=>e.check(ak(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>Sh(e),e.nullable=()=>Ch(e),e.nullish=()=>Sh(Ch(e)),e.nonoptional=r=>JD(e,r),e.array=()=>bh(e),e.or=r=>FD([e,r]),e.and=r=>HD(e,r),e.transform=r=>Dh(e,qD(r)),e.default=r=>KD(e,r),e.prefault=r=>XD(e,r),e.catch=r=>tk(e,r),e.pipe=r=>Dh(e,r),e.readonly=()=>ok(e),e.describe=r=>{const n=e.clone();return Xi.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Xi.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Xi.get(e);const n=e.clone();return Xi.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),hh=Z("_ZodString",(e,t)=>{Gc.init(e,t),zt.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(PE(...n)),e.includes=(...n)=>e.check(RE(...n)),e.startsWith=(...n)=>e.check(NE(...n)),e.endsWith=(...n)=>e.check($E(...n)),e.min=(...n)=>e.check(Ji(...n)),e.max=(...n)=>e.check(dh(...n)),e.length=(...n)=>e.check(fh(...n)),e.nonempty=(...n)=>e.check(Ji(1,...n)),e.lowercase=n=>e.check(OE(n)),e.uppercase=n=>e.check(jE(n)),e.trim=()=>e.check(zE()),e.normalize=(...n)=>e.check(LE(...n)),e.toLowerCase=()=>e.check(BE()),e.toUpperCase=()=>e.check(FE())}),mD=Z("ZodString",(e,t)=>{Gc.init(e,t),hh.init(e,t),e.email=r=>e.check(rE(gD,r)),e.url=r=>e.check(aE(vD,r)),e.jwt=r=>e.check(wE(PD,r)),e.emoji=r=>e.check(cE(yD,r)),e.guid=r=>e.check(ah(mh,r)),e.uuid=r=>e.check(nE(ea,r)),e.uuidv4=r=>e.check(oE(ea,r)),e.uuidv6=r=>e.check(sE(ea,r)),e.uuidv7=r=>e.check(iE(ea,r)),e.nanoid=r=>e.check(lE(bD,r)),e.guid=r=>e.check(ah(mh,r)),e.cuid=r=>e.check(uE(xD,r)),e.cuid2=r=>e.check(dE(_D,r)),e.ulid=r=>e.check(fE(wD,r)),e.base64=r=>e.check(bE(TD,r)),e.base64url=r=>e.check(xE(ID,r)),e.xid=r=>e.check(pE(SD,r)),e.ksuid=r=>e.check(hE(CD,r)),e.ipv4=r=>e.check(mE(ED,r)),e.ipv6=r=>e.check(gE(DD,r)),e.cidrv4=r=>e.check(vE(kD,r)),e.cidrv6=r=>e.check(yE(AD,r)),e.e164=r=>e.check(_E(MD,r)),e.datetime=r=>e.check(KE(r)),e.date=r=>e.check(XE(r)),e.time=r=>e.check(eD(r)),e.duration=r=>e.check(rD(r))});function _r(e){return tE(mD,e)}const kt=Z("ZodStringFormat",(e,t)=>{St.init(e,t),hh.init(e,t)}),gD=Z("ZodEmail",(e,t)=>{lC.init(e,t),kt.init(e,t)}),mh=Z("ZodGUID",(e,t)=>{aC.init(e,t),kt.init(e,t)}),ea=Z("ZodUUID",(e,t)=>{cC.init(e,t),kt.init(e,t)}),vD=Z("ZodURL",(e,t)=>{uC.init(e,t),kt.init(e,t)}),yD=Z("ZodEmoji",(e,t)=>{dC.init(e,t),kt.init(e,t)}),bD=Z("ZodNanoID",(e,t)=>{fC.init(e,t),kt.init(e,t)}),xD=Z("ZodCUID",(e,t)=>{pC.init(e,t),kt.init(e,t)}),_D=Z("ZodCUID2",(e,t)=>{hC.init(e,t),kt.init(e,t)}),wD=Z("ZodULID",(e,t)=>{mC.init(e,t),kt.init(e,t)}),SD=Z("ZodXID",(e,t)=>{gC.init(e,t),kt.init(e,t)}),CD=Z("ZodKSUID",(e,t)=>{vC.init(e,t),kt.init(e,t)}),ED=Z("ZodIPv4",(e,t)=>{wC.init(e,t),kt.init(e,t)}),DD=Z("ZodIPv6",(e,t)=>{SC.init(e,t),kt.init(e,t)}),kD=Z("ZodCIDRv4",(e,t)=>{CC.init(e,t),kt.init(e,t)}),AD=Z("ZodCIDRv6",(e,t)=>{EC.init(e,t),kt.init(e,t)}),TD=Z("ZodBase64",(e,t)=>{DC.init(e,t),kt.init(e,t)}),ID=Z("ZodBase64URL",(e,t)=>{AC.init(e,t),kt.init(e,t)}),MD=Z("ZodE164",(e,t)=>{TC.init(e,t),kt.init(e,t)}),PD=Z("ZodJWT",(e,t)=>{MC.init(e,t),kt.init(e,t)}),gh=Z("ZodNumber",(e,t)=>{Kp.init(e,t),zt.init(e,t),e.gt=(n,o)=>e.check(lh(n,o)),e.gte=(n,o)=>e.check(Xc(n,o)),e.min=(n,o)=>e.check(Xc(n,o)),e.lt=(n,o)=>e.check(ch(n,o)),e.lte=(n,o)=>e.check(Qc(n,o)),e.max=(n,o)=>e.check(Qc(n,o)),e.int=n=>e.check(vh(n)),e.safe=n=>e.check(vh(n)),e.positive=n=>e.check(lh(0,n)),e.nonnegative=n=>e.check(Xc(0,n)),e.negative=n=>e.check(ch(0,n)),e.nonpositive=n=>e.check(Qc(0,n)),e.multipleOf=(n,o)=>e.check(uh(n,o)),e.step=(n,o)=>e.check(uh(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 ta(e){return kE(gh,e)}const OD=Z("ZodNumberFormat",(e,t)=>{PC.init(e,t),gh.init(e,t)});function vh(e){return AE(OD,e)}const jD=Z("ZodBoolean",(e,t)=>{OC.init(e,t),zt.init(e,t)});function ra(e){return TE(jD,e)}const RD=Z("ZodUnknown",(e,t)=>{jC.init(e,t),zt.init(e,t)});function yh(){return IE(RD)}const ND=Z("ZodNever",(e,t)=>{RC.init(e,t),zt.init(e,t)});function $D(e){return ME(ND,e)}const LD=Z("ZodArray",(e,t)=>{NC.init(e,t),zt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Ji(r,n)),e.nonempty=r=>e.check(Ji(1,r)),e.max=(r,n)=>e.check(dh(r,n)),e.length=(r,n)=>e.check(fh(r,n)),e.unwrap=()=>e.element});function bh(e,t){return WE(LD,e,t)}const zD=Z("ZodObject",(e,t)=>{LC.init(e,t),zt.init(e,t),vt(e,"shape",()=>t.shape),e.keyof=()=>_h(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yh()}),e.loose=()=>e.clone({...e._zod.def,catchall:yh()}),e.strict=()=>e.clone({...e._zod.def,catchall:$D()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>tS(e,r),e.safeExtend=r=>rS(e,r),e.merge=r=>nS(e,r),e.pick=r=>Jw(e,r),e.omit=r=>eS(e,r),e.partial=(...r)=>oS(wh,e,r[0]),e.required=(...r)=>sS(Eh,e,r[0])});function xh(e,t){const r={type:"object",get shape(){return cn(this,"shape",e?Zw(e):{}),this.shape},...Ae(t)};return new zD(r)}const BD=Z("ZodUnion",(e,t)=>{zC.init(e,t),zt.init(e,t),e.options=t.options});function FD(e,t){return new BD({type:"union",options:e,...Ae(t)})}const WD=Z("ZodIntersection",(e,t)=>{BC.init(e,t),zt.init(e,t)});function HD(e,t){return new WD({type:"intersection",left:e,right:t})}const Jc=Z("ZodEnum",(e,t)=>{FC.init(e,t),zt.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 Jc({...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 Jc({...t,checks:[],...Ae(o),entries:s})}});function _h(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Jc({type:"enum",entries:r,...Ae(t)})}const UD=Z("ZodLiteral",(e,t)=>{WC.init(e,t),zt.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 VD(e,t){return new UD({type:"literal",values:Array.isArray(e)?e:[e],...Ae(t)})}const YD=Z("ZodTransform",(e,t)=>{HC.init(e,t),zt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jp(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ko(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(Ko(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function qD(e){return new YD({type:"transform",transform:e})}const wh=Z("ZodOptional",(e,t)=>{UC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sh(e){return new wh({type:"optional",innerType:e})}const ZD=Z("ZodNullable",(e,t)=>{VC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ch(e){return new ZD({type:"nullable",innerType:e})}const GD=Z("ZodDefault",(e,t)=>{YC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function KD(e,t){return new GD({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zp(t)}})}const QD=Z("ZodPrefault",(e,t)=>{qC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function XD(e,t){return new QD({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zp(t)}})}const Eh=Z("ZodNonOptional",(e,t)=>{ZC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function JD(e,t){return new Eh({type:"nonoptional",innerType:e,...Ae(t)})}const ek=Z("ZodCatch",(e,t)=>{GC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tk(e,t){return new ek({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rk=Z("ZodPipe",(e,t)=>{KC.init(e,t),zt.init(e,t),e.in=t.in,e.out=t.out});function Dh(e,t){return new rk({type:"pipe",in:e,out:t})}const nk=Z("ZodReadonly",(e,t)=>{QC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ok(e){return new nk({type:"readonly",innerType:e})}const sk=Z("ZodCustom",(e,t)=>{XC.init(e,t),zt.init(e,t)});function ik(e,t={}){return HE(sk,e,t)}function ak(e){return UE(e)}const kh=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,Ah=(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},ck=xh({UsuarioID:ta().nullable().optional(),disID:ta().nullable().optional(),EsOrganizador:ra().default(!1),Correo:_r().email("Formato de correo inválido"),StatusInvitacion:_h(["PENDIENTE","CONFIRMADA","RECHAZADA"]).default("PENDIENTE")}),lk=xh({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(kh,{message:"Formato inválido"}),horaFin:_r().min(1,"La hora fin es requerida.").regex(kh,{message:"Formato inválido"}),todoElDia:ra(),fechaFin:_r().optional(),showEndDate:ra().optional(),horaInicio2:_r().optional(),TodoElDia2:ra().optional(),client:_r().nullable().optional(),repetir:_r().optional(),link:_r().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(VD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:_r().optional(),invitados:bh(ck).optional().default([]),color:_r().optional(),solID:ta().nullable().optional(),disID:ta().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=Ah(e.fechaInicio,e.horaInicio),r=Ah(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"]}),Th=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"})),uk="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",dk=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"})))),Ih="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",fk=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"})))),pk="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",hk=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 Xo={},Mh;function mk(){if(Mh)return Xo;Mh=1;var e=rt();Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=void 0;var t=e(ht()),r=lt();return Xo.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"),Xo}var gk=mk();const Ph=tt(gk);var Jo={},Oh;function vk(){if(Oh)return Jo;Oh=1;var e=rt();Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var t=e(ht()),r=lt();return Jo.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"),Jo}var yk=vk();const bk=tt(yk);var es={},jh;function xk(){if(jh)return es;jh=1;var e=rt();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(ht()),r=lt();return es.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"),es}var _k=xk();const wk=tt(_k),Rh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAElBMVEUAAABpbXlpbXlobXhpbnppbnkdzkEGAAAABXRSTlMAgJ5Y75poDcUAAAA3SURBVBjTYyANiBog2IyhSBzRQGQJASSJIGQJBSIkTBESCA5CGcIAoqUEGDAdiukFBhE4hzAAAK+MB7AghHQFAAAAAElFTkSuQmCC";var ts={},Nh;function Sk(){if(Nh)return ts;Nh=1;var e=rt();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(ht()),r=lt();return ts.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"),ts}var Ck=Sk();const Ek=tt(Ck),Dk=e=>{const t=["#A17B4B","#7B5BE4","#F9A825","#4A90E2","#5CC85C","#FDD835","#E53935","#B0BEC5"],r=e.charCodeAt(0)%t.length;return t[r]},kk=(e,t,r,n)=>{if(t)return l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#1976D2"},children:[l.jsx(Ek,{sx:{fontSize:16,mr:.5}}),l.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return l.jsx(m.Typography,{variant:"caption",sx:{color:"#999",fontStyle:"italic",fontWeight:600},children:"Pendiente"});case"RECHAZADA":return l.jsx(m.Button,{onClick:()=>n(r),variant:"outlined",size:"small",sx:{fontWeight:600,borderRadius:"8px",textTransform:"none",fontSize:"11px",px:1,py:0},children:"Reenviar"});case"CONFIRMADA":return l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#00A86B"},children:[l.jsx(Jf,{sx:{fontSize:16,mr:.5}}),l.jsx(m.Typography,{variant:"caption",sx:{fontWeight:600},children:"Asistiré"})]});default:return null}};function Ak({open:e,handleClose:t,guests:r,onReenviar:n}){const o=r.filter(u=>u.estatus==="CONFIRMADA"||u.isHost),s=r.filter(u=>u.estatus==="PENDIENTE"&&!u.isHost),i=r.filter(u=>u.estatus==="RECHAZADA"&&!u.isHost),a=u=>l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",py:1},children:[l.jsxs(m.Box,{sx:{position:"relative",mr:2},children:[l.jsx(m.Avatar,{sx:{bgcolor:Dk(u.iniciales),width:32,height:32,fontSize:"12px",color:"#fff"},children:u.iniciales}),u.estatus==="PENDIENTE"&&l.jsx(m.Box,{sx:{position:"absolute",bottom:-2,right:-4,bgcolor:"#fff",borderRadius:"50%",display:"flex"},children:l.jsx(Ic,{sx:{fontSize:14,color:"#546E7A"}})})]}),l.jsx(m.Typography,{variant:"body2",sx:{flexGrow:1,fontWeight:500,color:"#333"},children:u.nombre}),kk(u.estatus,u.isHost,u.usrID,n)]},u.nombre),c=({title:u,count:d,badgeColor:f})=>l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mt:2,mb:1},children:[l.jsx(m.Typography,{variant:"subtitle2",sx:{fontWeight:800,color:"#333",fontSize:"13px"},children:u}),f&&l.jsx(m.Box,{sx:{ml:1,bgcolor:f,color:"#fff",borderRadius:"50%",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:d})]});return l.jsxs(m.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{border:"solid 0.1 px",height:"100%"}},children:[l.jsxs(m.Box,{sx:{p:"16px 8px"},children:[l.jsx(m.Typography,{variant:"subtitle1",sx:{fontWeight:800,ml:1,color:"#333333"},children:"Lista de invitados"}),l.jsx(m.Button,{onClick:t,startIcon:l.jsx("img",{src:Rh,width:20}),sx:{textTransform:"none",color:"#666",fontSize:"16px",p:0,minWidth:0,ml:.5,"&:hover":{bgcolor:"transparent"}},children:"Volver al evento"}),l.jsx(m.IconButton,{onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Ur,{})})]}),l.jsx(m.Divider,{sx:{backgroundColor:"black"}}),l.jsxs(m.DialogContent,{sx:{p:2},children:[s.length>0&&l.jsxs(m.Box,{sx:{mb:3},children:[l.jsx(c,{title:"Invitados",count:s.length}),s.map(a)]}),o.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(m.Divider,{sx:{my:1,backgroundColor:"black"}}),l.jsxs(m.Box,{sx:{mb:3},children:[l.jsx(c,{title:"Confirmados",count:o.length,badgeColor:"#1976D2"}),o.map(a)]})]}),i.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(m.Divider,{sx:{my:1,backgroundColor:"black"}}),l.jsxs(m.Box,{children:[l.jsx(c,{title:"No asistirán",count:i.length,badgeColor:"#1976D2"}),i.map(a)]})]})]})]})}const Tk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FFEB3B","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Ik({guests:e,onReenviar:t}){const[r,n]=v.useState(!1),o=()=>n(!0),s=()=>n(!1);return l.jsxs(l.Fragment,{children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee",width:"100%"},children:[l.jsx(m.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((i,a)=>l.jsx(m.Tooltip,{title:i.nombre,arrow:!0,placement:"top",children:l.jsx(m.Box,{children:l.jsx(m.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},invisible:i.estatus!=="PENDIENTE",sx:{backgroundColor:"white"},badgeContent:l.jsx(m.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:tp})}),children:l.jsx(m.Avatar,{sx:{bgcolor:Tk(i.iniciales)},children:i.iniciales})})})},a))}),l.jsx(m.Box,{sx:{flexGrow:1}}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"#1976D2",transition:"opacity 0.2s","&:hover":{opacity:.7}},onClick:o,children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:"bold",fontSize:"14px"},children:"Ver invitados"}),l.jsx(wk,{sx:{fontSize:18,ml:.5}})]})]}),l.jsx(Ak,{open:r,handleClose:s,guests:e,onReenviar:t})]})}var rs={},$h;function Mk(){if($h)return rs;$h=1;var e=rt();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(ht()),r=lt();return rs.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"),rs}var Pk=Mk();const Ok=tt(Pk);var ns={},Lh;function jk(){if(Lh)return ns;Lh=1;var e=rt();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(ht()),r=lt();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),ns}var Rk=jk();const Nk=tt(Rk),$k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAADlQTFRFR3BMIHDPJHDUJHDVJXHWJHDVJHHWJHDUI3DUJXHWJXDUJHHUJXHW////c6Tlr8vwiLLp1eT3Nn3ZZnh0KAAAAAx0Uk5TABBAgN+bxCBc7zBwfOSOGgAAAKJJREFUeNp1klsOxSAIREerohb72v9iryFXsSQ9P+BMwiQgJpQ4ZBjIOwrcySAHZetS4Y6UOK3Mb7ZhRGOkYSRjFAg+sSXlNcDGBH5xnI9UB6O3dkhDSEY/pQmAl+Y6n1XnDJA0rd2P6Boex4z7mnrHQ6evOu8oNneE7Dyci5VAQA5sKZF0iSt+rt1AH4cKWC9VNKFiQvX/GTbU6vCGIpddnz/knxPCFgg8/wAAAABJRU5ErkJggg==",Lk=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),zh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},Bh=e=>e.split(":").slice(0,2).join(":"),zk=({slot:e,onClick:t})=>l.jsxs(m.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #000000",textAlign:"center",transition:"0.2s",backgroundColor:"#fff","&:hover":{transform:"translateY(-3px)",boxShadow:"0px 4px 12px rgba(0,0,0,0.1)",borderColor:"#1976d2"}},children:[l.jsx(m.Box,{sx:{bgcolor:"#333",color:"white",py:.5},children:l.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold",textTransform:"capitalize"},children:Lk(e.Fecha)})}),l.jsxs(m.Box,{sx:{py:1.5},children:[l.jsx(m.Typography,{sx:{fontSize:"12px"},children:zh(e.HoraInicio)}),l.jsxs(m.Typography,{sx:{fontSize:"12px"},children:["a ",zh(e.HoraFin)]})]})]});function Bk({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const[o,s]=v.useState(16),a=r.slice(0,o).reduce((d,f)=>{const h=f.Fecha;return d[h]||(d[h]=[]),d[h].push(f),d},{}),c=Object.keys(a),u=d=>{const f={...d,HoraInicio:Bh(d.HoraInicio),HoraFin:Bh(d.HoraFin)};n(f),t()};return l.jsxs(m.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{borderRadius:"16px"}},children:[l.jsxs(m.Box,{sx:{p:2.5,display:"flex",flexDirection:"column",gap:.5},children:[l.jsx(m.Typography,{variant:"h6",sx:{fontWeight:800,fontSize:"1.1rem"},children:"Selecciona un nuevo horario"}),l.jsx(m.Box,{children:l.jsx(m.Button,{startIcon:l.jsx("img",{src:Rh,width:20}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0,fontSize:"1rem","&:hover":{backgroundColor:"transparent",color:"#000"}},children:"Volver al evento"})})]}),l.jsx(m.Divider,{}),l.jsx(m.DialogContent,{sx:{px:3,py:3,backgroundColor:"#f9f9f9"},children:c.length===0?l.jsx(m.Typography,{variant:"body2",color:"text.secondary",align:"center",children:"No hay horarios alternativos disponibles en este momento."}):l.jsxs(l.Fragment,{children:[c.map((d,f)=>l.jsxs(m.Box,{sx:{mb:3},children:[l.jsxs(m.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:f===0?"#1976d2":"text.primary",fontSize:"0.9rem"},children:[f===0?"Mismo día ":"Próximas fechas",f===0&&l.jsx("img",{src:$k,width:15,style:{marginLeft:5}})]}),l.jsx(m.Grid,{container:!0,spacing:2,children:a[d].map((h,y)=>l.jsx(m.Grid,{item:!0,xs:6,sm:3,children:l.jsx(zk,{slot:h,onClick:()=>u(h)})},`${d}-${y}`))})]},d)),r.length>o&&l.jsx(m.Box,{sx:{display:"flex",justifyContent:"center",mt:2},children:l.jsx(m.Button,{onClick:()=>s(d=>d+12),startIcon:l.jsx(Nk,{}),sx:{textTransform:"none",fontWeight:"bold",color:"#1976d2","&:hover":{backgroundColor:"transparent",textDecoration:"underline"}},children:"Mostrar más horarios disponibles"})})]})})]})}const Fk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAIVBMVEVHcExAR1ZAR1NARlVAR1VARlVAR1VARlVARlRARlRAR1ZiwDFVAAAACnRSTlMA5BvHaqI5kH9QLGWfKwAAAQlJREFUeNrd1luqwzAMBNDRw7I7+1/whd4mFa6tBPrX82uJGYMJwc+JLqQ1xU2dLx23NB5EgWjPtAe2Rp4Py8tLmuddeBK/KuRQMgusvDsAwkPRKgU4J14uBIwTw4K8G/GDFncQ6L0FrxYCn1TKhIU4D4UTwZIf8Z2ThjW1/9OoG2XqvTvmiI5LxsRwTRtPTbER3eTJHOcDN8fGkNxagfAxPLChxkyaohTCxEJRU2EeBxDe21NftsrzDuiQup+nwzivn41tQECNC5ZDHrmPCpdEVx+YluaLDONB0bnVcZAUwELgJQUYCzZXMihLOr0Lh7PkmBlLbbFQEsx44fsFY8kwU2PB9Ef+Lv4AL2kmcGZOH2MAAAAASUVORK5CYII=",Wk=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]=v.useState(null),[s,i]=v.useState(""),a=(u,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(u,d)=>{i(d),r(d)};return l.jsx(m.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(m.TextField,{...u,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...u.InputProps,startAdornment:l.jsx(m.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:l.jsx("img",{src:Fk,color:"action",width:20})}),disableUnderline:!0}}),renderOption:(u,d)=>v.createElement(m.Box,{component:"li",...u,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},l.jsx(m.Avatar,{sx:{bgcolor:Wk(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),l.jsx(m.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var os={},Fh;function Uk(){if(Fh)return os;Fh=1;var e=rt();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(ht()),r=lt();return os.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"),os}var Vk=Uk();const Yk=tt(Vk);var ss={},Wh;function qk(){if(Wh)return ss;Wh=1;var e=rt();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(ht()),r=lt();return ss.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"),ss}var Zk=qk();const el=tt(Zk),Gk=e=>e.tieneConflicto?{icon:l.jsx(el,{sx:{fontSize:18,color:"#d32f2f"}}),fillColor:"#FFF5F5",iconColor:"#d32f2f",textColor:"#333333",variant:"filled"}:{icon:l.jsx(Yk,{sx:{fontSize:20,color:"#1a73e8"}}),fillColor:"#eaedf2",iconColor:"#1a73e8",textColor:"#000000",variant:"filled"},Kk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FDD835","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Qk({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(m.Box,{sx:{p:1},children:[l.jsx(m.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=Gk(i),u=Kk(i.iniciales);return l.jsx(m.Chip,{label:l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[l.jsx(m.Typography,{variant:"body2",sx:{color:c.textColor,ml:.5,mr:1,fontSize:"13px",fontWeight:400},children:s(i?.nombre)}),l.jsx(m.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"center",ml:"auto",margin:"5px"},children:c.icon})]}),avatar:l.jsx(m.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(m.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:.5},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#E53935"},children:[l.jsx(el,{sx:{mr:1,fontSize:22}}),l.jsxs(m.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(m.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 Xk(e,t){const[r,n]=v.useState(e);return v.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const Jk={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"},Hh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],e3=()=>{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},Uh=[],eo=e3(),is=(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},t3=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c,onReenviar:u})=>{const[d,f]=v.useState(!1),[h,y]=v.useState(!1),g=x.format(new Date,"yyyy-MM-dd"),[p,b]=v.useState(""),[w,S]=v.useState([]),[E,C]=v.useState(!1),_=Tc(),[W,D]=v.useState([]),[T,M]=v.useState(""),[I,H]=v.useState(Uh),[G,F]=v.useState(!1),[Y,se]=v.useState(""),[U,N]=v.useState(!1),[le,de]=v.useState([]),[$,Q]=v.useState([]),we=Xk(Y,300),_e=I.filter(q=>q.tieneConflicto).length,{control:he,handleSubmit:ae,reset:ue,formState:{errors:J,isValid:Se},watch:me,setValue:ee}=Ip({resolver:ZE(lk),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"}),Ie=me("fechaInicio"),j=me("fechaFin"),Fe=me("todoElDia");v.useEffect(()=>{if(p.trim()===""||!i||!c||!a){S([]),D([]),ee("solID",null),C(!1),M("");return}C(!0);const q=setTimeout(()=>{_.getClients(p,c,a,i).then(fe=>{if(C(!1),fe){const Me=fe.map(Ne=>Ne.solID);D([...new Set(Me)])}else D([]);const De=Array.from(new Map(fe.map(Me=>[Me.nombreCliente,Me])).values());if(De.length>0)S(De),M("");else if(s?.client&&s.solID!==null){const Me=[{solID:s.solID,nombreCliente:s.client}];S(Me),M("Sin resultados")}else S([]),M("Sin resultados")}).catch(fe=>{console.error("Error al buscar clientes:",fe),C(!1)})},500);return()=>clearTimeout(q)},[p,i,c,a]),v.useEffect(()=>{if(Ie&&j){const q=new Date(Ie),fe=new Date(j);(q===fe||q>fe)&&ee("fechaFin",Ie)}},[Ie,j,ee]),v.useEffect(()=>{Ie&&ee("fechaFin",Ie)},[Ie]),v.useEffect(()=>{ee("showEndDate",d)},[d,ee]),v.useEffect(()=>{if(s){const q=x.format(s.fechaInicio,"yyyy-MM-dd")===x.format(s.fechaFin,"yyyy-MM-dd");if(f(!q),ee("titulo",s?.titulo),ee("fechaInicio",x.format(s.fechaInicio,"yyyy-MM-dd")),ee("fechaFin",x.format(s.fechaFin,"yyyy-MM-dd")),ee("horaInicio",x.format(s.fechaInicio,"HH:mm")),ee("horaFin",x.format(s.fechaFin,"HH:mm")),ee("horaInicio2",x.format(s.fechaFin,"HH:mm")),ee("descripcion",s.descripcion),ee("link",s.link),ee("repetir","false"),ee("color",s.color),ee("todoElDia",s.todoElDia),ee("solID",s.solID),ee("client",s.client),console.log("initialEvent",s),s.invitados&&s.invitados.length>0){const fe=(s?.invitados||[]).map(De=>{const Me=De.usrNombre?.trim()||"",Ne=Me.split(/\s+/),re=Ne.length>1?(Ne[0][0]+Ne[1][0]).toUpperCase():Me.substring(0,2).toUpperCase();return{nombre:De.usrNombre||"Sin nombre",correo:De.correo||"",iniciales:re||"--",usrID:De.usuarioID??null,isHost:De.esOrganizador||!1,estatus:De.statusInvitacion,tieneConflicto:!1,disID:De.disID}});H(fe)}else H(Uh);s.solID?y(!0):y(!1)}else{const q=o||new Date,fe=new Date,De=new Date(q.getFullYear(),q.getMonth(),q.getDate(),fe.getHours(),fe.getMinutes()),Me=x.addHours(De,1);ue({titulo:"",fechaInicio:x.format(De,"yyyy-MM-dd"),horaInicio:x.format(De,"HH:mm"),fechaFin:x.format(Me,"yyyy-MM-dd"),horaFin:x.format(Me,"HH:mm"),horaInicio2:x.format(Me,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Hh[0],solID:null}),f(!1),y(!1)}},[s,e,o]);const Ke=q=>({UsuarioID:q.usrID??null,Correo:q.correo,EsOrganizador:q.usrID==i,StatusInvitacion:q.estatus,disID:c??null}),Ze=ae(q=>{const fe=I.map(Me=>Ke(Me)),De={...q,invitados:fe};r(De,s?.eventoID),t(),ue(),f(!1)},q=>{console.log("Errores de validación:",q)});v.useEffect(()=>{Fe&&(ee("horaInicio","00:00"),ee("horaFin","23:59"))},[Fe,ee,me]);const Be=()=>{const q=me("fechaInicio");if(q){const fe=new Date(`${q}T00:00:00`),De=x.addDays(fe,1);ee("fechaFin",x.format(De,"yyyy-MM-dd"))}f(!0)},Ve=me("fechaInicio"),et=me("horaInicio"),mt=me("fechaFin"),k=me("horaFin"),[P,B]=v.useState(null),[ce,ie]=v.useState(null);v.useEffect(()=>{(P===null||P!==et)&&B(et)},[et,P]),v.useEffect(()=>{(ce===null||ce!==k)&&ie(k??"")},[k,ce]);const O=me("todoElDia");v.useEffect(()=>{if(O||!et||!k||!Ve||!mt)return;const q=is(Ve,et),fe=is(mt,k);if(!q||!fe||!x.isValid(q)||!x.isValid(fe))return;const De=x.isSameDay(q,fe),Me=De&&(x.isAfter(q,fe)||q.getTime()===fe.getTime()),Ne=x.isBefore(fe,q)&&!De;(Me||Ne)&&(ee("horaFin",""),ie(""))},[et,Ve]);const oe=v.useMemo(()=>{if(!et||!Ve)return eo;const q=is(Ve,et),fe=is(mt,"00:00");return!q||!fe||!x.isValid(q)||!x.isValid(fe)||x.isBefore(fe,q)&&!x.isSameDay(fe,q)?eo:x.isSameDay(q,fe)?eo.filter(De=>{const Me=is(mt,De);return Me&&x.isAfter(Me,q)}):(x.isAfter(fe,q),eo)},[et,Ve,mt]),Ce=v.useMemo(()=>eo,[]),Re=async q=>{const fe=I.some(Vt=>Vt.correo===q.correo);if(N(!0),fe)return;const De=c,Me=q.correo,Ne=q.usrID,re=Ve,Ee=et,Oe=k;if(!De||!Me||!re||!Ee||!Oe){H(Vt=>[...Vt,{...q,status:"pending",isHost:!1,hasConflict:!1,usrID:Ne,name:q.nombre}]);return}let Pe;try{Pe=await _.VerificarConflicto(De,Me,re,Ee+":00",Oe+":00")}catch{Pe={tieneConflicto:!1,usrMail:q.correo}}const wr=Array.isArray(Pe)?Pe[0]:Pe,ar={...q,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(wr.tieneConflicto).toLowerCase()==="true"};if(ar.tieneConflicto){const Vt=await _.getDisponibilidadUsuario(c,Me,re,"60");de(Vt)}H(Vt=>[...Vt,ar])},R=q=>{H(fe=>fe.filter(De=>De.nombre!==q))},te=()=>{F(!1)},xe=q=>{const Me=(q.usrNombre??"").split(" ").map(Ne=>Ne.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:q.usrNombre??"",correo:q.usrMail??"",iniciales:Me,usrID:q.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};v.useEffect(()=>{we.length>2&&c?(async()=>{const De=(await _.getUsuariosInvitados(c,we)).map(xe).filter(Me=>Me.usrID!==i&&!I.some(Ne=>Ne.correo===Me.correo));Q(De)})():Q([])},[we,I]);const Ge=q=>{se(q)},At=q=>{const{Fecha:fe,HoraInicio:De,HoraFin:Me}=q,Ne=re=>re.split(":").slice(0,2).join(":");ee("fechaInicio",fe),ee("fechaFin",fe),ee("horaInicio",Ne(De)),ee("horaFin",Ne(Me)),f(!1),te(),console.log("Formulario actualizado con sugerencia:",{Fecha:fe,HoraInicio:De,HoraFin:Me})};return l.jsx(l.Fragment,{children:l.jsx(m.Modal,{open:e,onClose:t,children:l.jsx("form",{onSubmit:Ze,children:l.jsxs(m.Box,{sx:Jk,children:[l.jsx(m.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Ur,{})}),l.jsx(m.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?l.jsxs(l.Fragment,{children:[l.jsx(bk,{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:he,render:({field:q})=>l.jsx(m.TextField,{...q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!J.titulo,helperText:J.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 ${d?"mb-1":"mb-2"}`,children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"fechaInicio",control:he,render:({field:q})=>l.jsx(m.TextField,{fullWidth:!0,...q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!J.fechaInicio,helperText:J.fechaInicio?.message})})}),d?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:he,render:({field:q})=>l.jsx(m.TextField,{...q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:Ie||g},error:!!J.fechaFin,helperText:J.fechaFin?.message})})}),!s&&l.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:l.jsx(m.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:l.jsx(Th,{})})})]}):l.jsx("div",{className:"col-md-8"})]}),d&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12 d-flex justify-content-center",children:l.jsx(Ph,{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:he,render:({field:{onChange:q,value:fe,...De}})=>l.jsx(m.Autocomplete,{freeSolo:!0,options:Ce,value:fe||"",onChange:(Me,Ne)=>q(Ne||""),onInputChange:(Me,Ne)=>q(Ne),renderInput:Me=>l.jsx(m.TextField,{...Me,...De,size:"small",error:!!J.horaInicio,helperText:J.horaInicio?.message,InputProps:{...Me.InputProps,endAdornment:l.jsx(m.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Ic,{})})}}),disabled:O})})}),!d&&l.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:J.horaInicio?"5px":"0px"},children:l.jsx(Ph,{sx:{color:"#757575"}})}),d&&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:he,render:({field:{onChange:q,value:fe,...De}})=>l.jsx(m.Autocomplete,{freeSolo:!0,options:oe,value:fe||"",onChange:(Me,Ne)=>q(Ne||""),onInputChange:(Me,Ne)=>q(Ne),renderInput:Me=>l.jsx(m.TextField,{...Me,...De,size:"small",error:!!J.horaFin,helperText:J.horaFin?.message,InputProps:{...Me.InputProps,endAdornment:l.jsx(m.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Ic,{})})}}),disabled:O})})}),!d&&l.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:l.jsx(hr,{name:"todoElDia",control:he,render:({field:q})=>l.jsx(m.FormControlLabel,{control:l.jsx(m.Checkbox,{checked:q.value,onChange:fe=>q.onChange(fe.target.checked)}),label:l.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!d&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(m.Button,{onClick:Be,size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(fk,{}),"  Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&l.jsx("div",{className:"row mb-2",children:l.jsxs("div",{className:"col-12",children:[!h&&l.jsxs(m.Button,{onClick:()=>y(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(hk,{}),"  Vincular cliente"]}),h&&l.jsxs("div",{className:"row g-2",children:[l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"client",control:he,render:({field:q})=>l.jsx(m.Autocomplete,{options:w,loading:E,loadingText:"Buscando coincidencias...",getOptionLabel:fe=>fe.nombreCliente?.trim()||"",value:w.find(fe=>fe.nombreCliente===q.value)||(q.value&&typeof q.value=="string"?{solID:-1,nombreCliente:q.value}:null),noOptionsText:T,onInputChange:(fe,De)=>{b(De)},onChange:(fe,De)=>{q.onChange(De?De.nombreCliente:"")},renderInput:fe=>l.jsx(m.TextField,{...fe,placeholder:"Buscar cliente...",size:"small",InputProps:{...fe.InputProps,startAdornment:l.jsx("img",{src:ef,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:l.jsxs(l.Fragment,{children:[E?l.jsx(m.CircularProgress,{color:"inherit",size:20}):null,fe.InputProps.endAdornment]})}})})})}),l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"solID",control:he,render:({field:q})=>l.jsx(m.Autocomplete,{options:W,noOptionsText:"Sin resultados",getOptionLabel:fe=>fe.toString(),value:q.value??null,onChange:(fe,De)=>q.onChange(De),renderInput:fe=>l.jsx(m.TextField,{...fe,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!w.length})})}),l.jsx("div",{className:"col-2 d-flex align-items-center",children:l.jsx(m.IconButton,{onClick:()=>y(!1),sx:{fontSize:18},children:l.jsx(Th,{})})})]})]})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"link",control:he,render:({field:q})=>l.jsx(m.TextField,{...q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!J.link,helperText:J.link?.message,InputProps:{startAdornment:l.jsx("img",{src:uk,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:he,render:({field:q})=>l.jsx(m.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:pk,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:Re,availableSuggestions:$,onInputTextChange:Ge})})}),U&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(Qk,{guests:I,conflictCount:_e,onViewSuggestions:()=>F(!0),onDeleteGuest:R})})}),s?.invitados&&s?.invitados?.length>0&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(m.Box,{children:l.jsx(Ik,{guests:I,onReenviar:u})})})}),l.jsx(Bk,{open:G,handleClose:te,suggestions:le,onSelectSlot:At}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[l.jsx(dk,{}),Hh.map(q=>l.jsx(hr,{name:"color",control:he,render:({field:fe})=>l.jsx(m.IconButton,{onClick:()=>fe.onChange(q),sx:{width:24,height:24,borderRadius:"50%",bgcolor:q,border:fe.value===q?"2px solid":"none",borderColor:fe.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(m.Button,{onClick:n,variant:"outlined",startIcon:l.jsx("img",{src:Ih,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(m.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(m.Button,{onClick:Ze,variant:"contained",disabled:!Se,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"})]})})]})})})})},r3={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"},n3=({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(m.Modal,{open:e,onClose:t,children:l.jsxs(m.Box,{sx:r3,children:[l.jsxs(m.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[l.jsxs(m.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),l.jsx(m.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{})})]}),l.jsx(m.Divider,{}),l.jsx(m.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return l.jsx(m.ListItem,{disablePadding:!0,sx:{mb:1},children:l.jsx(m.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(m.Box,{sx:{flexGrow:1},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[l.jsx(m.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),l.jsx(m.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),l.jsx(m.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 as={},Vh;function o3(){if(Vh)return as;Vh=1;var e=rt();Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var t=e(ht()),r=lt();return as.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"),as}var s3=o3();const i3=tt(s3);var cs={},Yh;function a3(){if(Yh)return cs;Yh=1;var e=rt();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(ht()),r=lt();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-6h2zm0-8h-2V7h2z"}),"Info"),cs}var c3=a3();const l3=tt(c3),u3="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",d3="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==",tl=v.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=_s.useSnackbar(),s={success:{color:"#fff",icon:l.jsx("img",{width:25,src:u3,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:l.jsx(i3,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:l.jsx(l3,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:l.jsx("img",{src:Ih,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})},rechazar:{color:"#fff",icon:l.jsx("img",{src:d3,width:30,style:{borderRadius:"50%",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return l.jsx(_s.SnackbarContent,{ref:n,children:l.jsxs(m.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(m.Box,{sx:{mr:1.5},children:i.icon}),l.jsx(m.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),l.jsx(m.IconButton,{size:"small",onClick:()=>o(e),children:l.jsx(Ur,{fontSize:"small"})})]})})}),qh=v.createContext(void 0),f3=({children:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState([]),[s,i]=v.useState(!1);return l.jsx(qh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},p3=()=>{const e=v.useContext(qh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},h3=(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(m3(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 m3(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 g3(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 v3=(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(g3(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}},Zh="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",y3="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",b3=({open:e,onClose:t,onConfirm:r,title:n,description:o,icon:s,confirmText:i,confirmColor:a="#d32f2f",loading:c=!1})=>l.jsxs(m.Dialog,{open:e,onClose:t,PaperProps:{sx:{borderRadius:"15px",p:1,maxWidth:"400px"}},children:[l.jsx(m.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:l.jsx(m.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{fontSize:"small"})})}),l.jsxs(m.DialogContent,{sx:{textAlign:"center",pt:0},children:[l.jsx(m.Box,{sx:{mb:2,display:"flex",justifyContent:"center"},children:s}),l.jsx(m.Typography,{variant:"h6",sx:{fontWeight:"bold",mb:2},children:n}),l.jsx(m.Typography,{variant:"body2",sx:{color:"#555",mb:4,px:2},children:o}),l.jsxs(m.Box,{sx:{display:"flex",gap:2,justifyContent:"center",mb:2},children:[l.jsx(m.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none",borderRadius:"8px",px:4,borderColor:"#1976D2",color:"#1976D2"},children:"Regresar"}),l.jsxs(m.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:y3,width:15,style:{marginRight:6,marginBottom:2}}),c?"Procesando...":i]})]})]})]}),x3=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=v.useState(new Date),[a,c]=v.useState([]),[u,d]=v.useState(!1),[f,h]=v.useState(null),[y,g]=v.useState(!1),[p,b]=v.useState(null),[w,S]=v.useState([]),{enqueueSnackbar:E}=_s.useSnackbar(),C=Tc(),_=Mi(),W=Sc(),[D,T]=v.useState(!1),[M,I]=v.useState([]),[H,G]=v.useState(null),{session:F,sessionoutlook:Y}=lc(),{googleEvents:se,setGoogleEvents:U,outlookEvents:N,setOutlookEvents:le}=p3(),[de,$]=v.useState([]),[Q,we]=v.useState([]),[_e,he]=v.useState([]),[ae,ue]=v.useState(!1),[J,Se]=v.useState([]),[me,ee]=v.useState(),Ie=(re,Ee)=>{I(re),G(Ee),T(!0)},j=async()=>{if(e===void 0)return;const re=await C.getNotificacionesXUsuario(e,!1);Se(re)};v.useEffect(()=>{const re=new Date,Ee=x.startOfDay(re),Oe=x.endOfDay(x.addDays(Ee,6)),Pe={start:Ee,end:Oe},wr=a.filter(ar=>{const Vt={start:ar.fechaInicio,end:ar.fechaFin};return Ud(Vt,Pe)}).sort((ar,Vt)=>ar.fechaInicio.getTime()-Vt.fechaInicio.getTime());S(wr)},[a]),v.useEffect(()=>{const re=async()=>{try{if(e){const Oe=await C.getEventsByUser(e);j(),c(Oe)}}catch(Oe){console.log("Error al cargar eventos locales:",Oe)}};re();const Ee=setInterval(re,4e3);return()=>clearInterval(Ee)},[e]),v.useEffect(()=>{if(!n||!e)return;const re=[...a];if(se.length>0&&F?.userEmail){const Ee=se.map(Oe=>h3(Oe,n,e));re.push(...Ee)}if(N.length>0&&Y?.userEmail){const Ee=N.map(Oe=>v3(Oe,n,e));re.push(...Ee)}$(re)},[a,se,N,n,e,F?.userEmail,Y?.userEmail]);const Fe=async re=>{try{if(re?.isGoogleEvent||re.isOutlookEvent)h(re),d(!0);else{const Ee=await C.getEventById(re.eventoID);h(Ee),d(!0)}}catch(Ee){console.error(Ee)}},Ke=()=>{d(!1),h(null)},Ze=async(re,Ee)=>{let Oe,Pe;re.todoElDia?(Oe=new Date(`${re.fechaInicio}T${re.horaInicio}`),Pe=new Date(`${re.fechaInicio}T${re.horaFin}`)):(Oe=new Date(`${re.fechaInicio}T${re.horaInicio}`),Pe=re.fechaFin&&re.horaFin?new Date(`${re.fechaFin}T${re.horaFin}`):new Date(`${re.fechaInicio}T${re.horaFin}`));const wr=x.format(Oe,"yyyy-MM-dd HH:mm:ss.SSS"),ar=x.format(Pe,"yyyy-MM-dd HH:mm:ss.SSS");if(Ee){const Jr={...re,eventoID:Ee,fechaInicio:wr,fechaFin:ar,solID:re.solID??null,disID:n??null,client:re.client,invitados:re.invitados.map(Ye=>({usrNombre:Ye.nombre||Ye.usrNombre,Correo:Ye.correo||Ye.Correo,EsOrganizador:Ye.isHost||Ye.EsOrganizador,StatusInvitacion:Ye.StatusInvitacion,UsuarioID:Ye.usrID||Ye.UsuarioID,disID:Ye.disID||n}))};try{const Ye=await C.updateEvent(Jr);var Vt=a.map(Sr=>Sr.eventoID===Ye.eventoID?Ye:Sr);c(Vt),E("El evento se ha actualizado correctamente.",{variant:"success"}),Ke()}catch{E("Error al actualizar Evento",{variant:"error"})}}else{const Jr={...re,fechaInicio:wr,fechaFin:ar,todoElDia:re.todoElDia,solID:re.solID??null,disID:n??null,client:re.client,invitados:re.invitados.map(Ye=>({usrNombre:Ye.nombre||Ye.usrNombre,Correo:Ye.correo||Ye.Correo,EsOrganizador:Ye.isHost||Ye.EsOrganizador,StatusInvitacion:Ye.StatusInvitacion,UsuarioID:Ye.usrID||Ye.UsuarioID,disID:Ye.disID||n}))};try{const Ye=await C.createEvent(Jr,e);c(Sr=>[...Sr,Ye]),E("El evento se ha creado con éxito",{variant:"success"}),Ke()}catch{E("Error al guardar Evento",{variant:"error"})}}if(e){const Jr=await C.getEventsByUser(e);c(Jr)}},Be=()=>{i(re=>new Date(re.getFullYear(),re.getMonth()-1,1))},Ve=()=>{i(re=>new Date(re.getFullYear(),re.getMonth()+1,1))},et=()=>{fe("ELIMINAR")},mt=()=>{fe("RECHAZAR")},k=()=>{b(new Date),d(!0)},P=re=>{re&&i(re)},B=re=>{b(re),d(!0),h(null)},ce=async()=>{if(f)try{await C.deleteEvent(f.eventoID),c(a.filter(re=>re.eventoID!==f.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(re,Ee)=>l.jsx(tl,{id:re,message:String(Ee),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{Ke(),De()}},ie=async()=>{if(!(!F?.userEmail||!n)){ue(!0);try{const Ee=(await _.getGoogleCalendars(F.userEmail,n)).map(Pe=>({...Pe,selected:!0}));we(Ee);const Oe=Ee.map(Pe=>Pe.id);Re(Oe)}catch(re){console.error("Error Google Cals:",re)}finally{ue(!1)}}},O=async re=>{const Ee=Q.map(Pe=>Pe.id===re?{...Pe,selected:!Pe.selected}:Pe);we(Ee);const Oe=Ee.filter(Pe=>Pe.selected).map(Pe=>Pe.id);Re(Oe)},oe=async()=>{if(!(!Y?.userEmail||!n)){ue(!0);try{const Ee=(await W.getOutlookCalendars(Y.userEmail,n)).map(Pe=>({...Pe,selected:!0}));he(Ee);const Oe=Ee.map(Pe=>Pe.id);R(Oe)}catch(re){console.error("Error Outlook Cals:",re)}finally{ue(!1)}}},Ce=async re=>{const Ee=_e.map(Pe=>Pe.id===re?{...Pe,selected:!Pe.selected}:Pe);he(Ee);const Oe=Ee.filter(Pe=>Pe.selected).map(Pe=>Pe.id);R(Oe)};v.useEffect(()=>{ie()},[F?.userEmail,n]),v.useEffect(()=>{oe()},[Y?.userEmail,n]);const Re=async re=>{if(!F?.userEmail||!n)return;const Ee=re||Q.filter(Oe=>Oe.selected).map(Oe=>Oe.id);try{const Oe={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F.userEmail,calendarIds:Ee},Pe=await _.getGoogleEventsByMonth(Oe);U(Pe)}catch(Oe){console.error("Error al obtener eventos de Google:",Oe)}},R=async re=>{if(!Y?.userEmail||!n)return;const Ee=re||_e.filter(Oe=>Oe.selected).map(Oe=>Oe.id);try{const Oe={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Y.userEmail,calendarIds:Ee},Pe=await W.getOutlookEventsByMonth(Oe);le(Pe)}catch(Oe){console.error("Error al obtener eventos de Outlook:",Oe)}};if(n===void 0||e===void 0)return l.jsx("div",{children:"Cargando configuración de usuario..."});const te=async(re,Ee)=>{await C.UpdateStatusEvento(re.evento.eventoID,e,Ee)&&(await C.MarcarLeido(re.notificacionID,e),E(re?.evento?.titulo+" fue agregado a tu calendario",{variant:"success"}))},xe=async()=>{me&&C.UpdateStatusEvento(me.evento.eventoID,e,"RECHAZADA")&&(await C.MarcarLeido(me.notificacionID,e),await C.MarcarLeido(me.notificacionID,e),E("Haz rechazado la Invitación a "+me?.evento?.titulo,{content:(Ee,Oe)=>l.jsx(tl,{id:Ee,message:String(Oe),variant:"rechazar"})}),De())},Ge=async(re,Ee)=>{try{if(!e)return;ee(re),Ee=="RECHAZADA"?(mt(),console.log("noti",re)):te(re,Ee)}catch{E("Error al procesar la invitación",{variant:"error"})}},At=async re=>{try{if(!f)return;(await C.ReenviarNotificacion(f?.eventoID,re)).Message&&E("Invitacion enviada con exito",{variant:"success"})}catch(Ee){console.error("Error al conectar con la API",Ee)}},[q,fe]=v.useState(null),De=()=>fe(null),Me={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:me?.evento?.nombreAnfitrion})," a ",l.jsx("strong",{children:me?.evento?.titulo})]}),icon:l.jsx("img",{src:Zh}),action:()=>me&&xe()},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:Zh}),action:()=>ce()},DESVINCULAR:{title:"Desvincular Outlook",confirmText:"Desvincular",description:"Si desvinculas tu cuenta, perderás acceso a todos los eventos sincronizados.",icon:"",action:()=>ce}},Ne=q?Me[q]:null;return l.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[l.jsx(fy,{header:l.jsx(M2,{currentDate:s,onPrevMonth:Be,onNextMonth:Ve,onAddEvent:k,onDateChange:P}),sidebar:l.jsx(uw,{onEventClick:Fe,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:k,googleCalendars:Q,outlookCalendars:_e,isLoadingCalendars:ae,onToggleGoogle:O,onToggleOutlook:Ce,notifications:J,unreadCount:J?.filter(re=>!re.leida).length,onAceppInvitacion:Ge}),mainContent:l.jsx(Cw,{onSeeMoreClick:Ie,currentDate:s,events:de,onDayClick:B,onEventClick:Fe})}),u&&l.jsx(t3,{isVisible:u,onClose:Ke,onSave:Ze,onDelete:et,selectedDate:p,initialEvent:f,userId:e,masNombreBD:o,disId:n,onReenviar:At}),l.jsx(n3,{isOpen:D,onClose:()=>T(!1),events:M,date:H,onEventClick:Fe}),Ne&&l.jsx(b3,{open:!!q,onClose:De,onConfirm:()=>{Ne.action()},title:Ne.title,description:Ne.description,icon:Ne.icon,confirmText:Ne.confirmText})]})},_3="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",w3="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 rl(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function S3(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 nl(e,t,r=!0){return typeof e=="function"?e(t):e??r}function C3(e){return e.replace(/[^\d]/g,"")}function E3(e,t){return t}var ls={},Gh;function D3(){if(Gh)return ls;Gh=1;var e=rt();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(ht()),r=lt();return ls.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"),ls}var k3=D3();const A3=tt(k3);var us={},Kh;function T3(){if(Kh)return us;Kh=1;var e=rt();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(ht()),r=lt();return us.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"),us}var I3=T3();const M3=tt(I3);var ds={},Qh;function P3(){if(Qh)return ds;Qh=1;var e=rt();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(ht()),r=lt();return ds.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"),ds}var O3=P3();const j3=tt(O3);var fs={},Xh;function R3(){if(Xh)return fs;Xh=1;var e=rt();Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t=e(ht()),r=lt();return fs.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"),fs}var N3=R3();const $3=tt(N3);function Jh(e){return e==="right"?"end":e==="center"?"center":"start"}function e0(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 L3=1060,ol=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function z3({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=L3,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((g,p)=>g+c(p.width),0),h=Math.max(d.length-1,0)*16;return f+h+32}return l.jsx(m.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:l.jsxs(m.Box,{children:[l.jsx(m.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(m.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[h,y]=K.useState(!!d.initiallyOpen),g=f%2===1,p=o?o(d):t,b=Math.max(n,u(p));return l.jsxs(m.Box,{children:[l.jsxs(m.Box,{sx:{display:"grid",gridTemplateColumns:r.map(w=>typeof w=="number"?`${w}px`:w).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:g?"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:()=>y(w=>!w),children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[l.jsx(m.IconButton,{size:"small",disableRipple:!0,children:h?l.jsx($3,{}):l.jsx(j3,{})}),l.jsx(m.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),l.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:ol(d,"En Proceso")}),l.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:ol(d,"Finalizadas")}),l.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:ol(d,"Último seg.")})]}),l.jsx(m.Collapse,{in:h,unmountOnExit:!0,children:l.jsxs(m.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[l.jsx(m.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:e0(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(m.Typography,{sx:{justifySelf:Jh(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,S)=>l.jsx(m.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:e0(p),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:S%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,C)=>{const _=E.accessor?E.accessor(w,S):E.field?w[E.field]:null;return l.jsx(m.Box,{sx:{justifySelf:Jh(E.align),textAlign:E.align??"left",minWidth:0,overflow:"hidden",maxWidth:"100%"},children:typeof _=="string"||typeof _=="number"?l.jsx(m.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??C)})},w.id??S))]})})]},d.id)})]})})}var ps={},t0;function B3(){if(t0)return ps;t0=1;var e=rt();Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var t=e(ht()),r=lt();return ps.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"),ps}var F3=B3();const W3=tt(F3),H3=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",U3=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},V3=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var hs={},r0;function Y3(){if(r0)return hs;r0=1;var e=rt();Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=void 0;var t=e(ht()),r=lt();return hs.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"),hs}var q3=Y3();const Z3=tt(q3),sl=({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 ms={},n0;function G3(){if(n0)return ms;n0=1;var e=rt();Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var t=e(ht()),r=lt();return ms.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),ms}var K3=G3();const o0=tt(K3),Q3=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"}},X3=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}},J3=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}},eA=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 tA(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 rA(e){return e.replace(/<br\s*\/?>/gi,`
177
+ `)}y.write("payload.value = newResult;"),y.write("return payload;");const S=y.compile();return(E,C)=>S(h,E,C)};let s;const i=Bi,a=!Pp.jitless,l=a&&Yw.value,d=t.catchall;let f;e._zod.parse=(h,y)=>{f??(f=n.value);const g=h.value;return i(g)?a&&l&&y?.async===!1&&y.jitless!==!0?(s||(s=o(t.shape)),h=s(h,y),d?Kp([],g,h,y,f,e):h):r(h,y):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function Qp(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=>An(i,n,kn())))}),t)}const NC=Z("$ZodUnion",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),vt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),vt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),vt(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=>Hc(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=>Qp(c,o,e,s)):Qp(a,o,e,s)}}),$C=Z("$ZodIntersection",(e,t)=>{Pt.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])=>Xp(r,c,l)):Xp(r,s,i)}});function Zc(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(Go(e)&&Go(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=Zc(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=Zc(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 Xp(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=Zc(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 LC=Z("$ZodEnum",(e,t)=>{Pt.init(e,t);const r=Uw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>qw.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(Pt.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}}),BC=Z("$ZodTransform",(e,t)=>{Pt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Mp(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 Jp(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const FC=Z("$ZodOptional",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",vt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),vt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Hc(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=>Jp(s,r.value)):Jp(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),WC=Z("$ZodNullable",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(e._zod,"optout",()=>t.innerType._zod.optout),vt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Hc(r.source)}|null)$`):void 0}),vt(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)}),UC=Z("$ZodDefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",vt(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=>eh(s,t)):eh(o,t)}});function eh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const HC=Z("$ZodPrefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",vt(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))}),VC=Z("$ZodNonOptional",(e,t)=>{Pt.init(e,t),vt(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=>th(s,e)):th(o,e)}});function th(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 YC=Z("$ZodCatch",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(e._zod,"optout",()=>t.innerType._zod.optout),vt(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=>An(i,n,kn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>An(s,n,kn()))},input:r.value}),r.issues=[]),r)}}),qC=Z("$ZodPipe",(e,t)=>{Pt.init(e,t),vt(e._zod,"values",()=>t.in._zod.values),vt(e._zod,"optin",()=>t.in._zod.optin),vt(e._zod,"optout",()=>t.out._zod.optout),vt(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=>Gi(i,t.in,n)):Gi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Gi(s,t.out,n)):Gi(o,t.out,n)}});function Gi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const ZC=Z("$ZodReadonly",(e,t)=>{Pt.init(e,t),vt(e._zod,"propValues",()=>t.innerType._zod.propValues),vt(e._zod,"values",()=>t.innerType._zod.values),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(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(rh):rh(o)}});function rh(e){return e.value=Object.freeze(e.value),e}const GC=Z("$ZodCustom",(e,t)=>{ir.init(e,t),Pt.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=>nh(s,r,n,e));nh(o,r,n,e)}});function nh(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(Ko(o))}}class KC{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 QC(){return new KC}const Ki=QC();function XC(e,t){return new e({type:"string",...Ae(t)})}function JC(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ae(t)})}function oh(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ae(t)})}function eE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ae(t)})}function tE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ae(t)})}function rE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ae(t)})}function nE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ae(t)})}function oE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ae(t)})}function sE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ae(t)})}function iE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ae(t)})}function aE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ae(t)})}function cE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ae(t)})}function lE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ae(t)})}function uE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ae(t)})}function dE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ae(t)})}function fE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ae(t)})}function pE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ae(t)})}function hE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ae(t)})}function mE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ae(t)})}function gE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ae(t)})}function vE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ae(t)})}function yE(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ae(t)})}function bE(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ae(t)})}function xE(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ae(t)})}function _E(e,t){return new e({type:"string",format:"date",check:"string_format",...Ae(t)})}function wE(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ae(t)})}function SE(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ae(t)})}function CE(e,t){return new e({type:"number",checks:[],...Ae(t)})}function EE(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ae(t)})}function DE(e,t){return new e({type:"boolean",...Ae(t)})}function kE(e){return new e({type:"unknown"})}function AE(e,t){return new e({type:"never",...Ae(t)})}function sh(e,t){return new Hp({check:"less_than",...Ae(t),value:e,inclusive:!1})}function Gc(e,t){return new Hp({check:"less_than",...Ae(t),value:e,inclusive:!0})}function ih(e,t){return new Vp({check:"greater_than",...Ae(t),value:e,inclusive:!1})}function Kc(e,t){return new Vp({check:"greater_than",...Ae(t),value:e,inclusive:!0})}function ah(e,t){return new HS({check:"multiple_of",...Ae(t),value:e})}function ch(e,t){return new YS({check:"max_length",...Ae(t),maximum:e})}function Qi(e,t){return new qS({check:"min_length",...Ae(t),minimum:e})}function lh(e,t){return new ZS({check:"length_equals",...Ae(t),length:e})}function TE(e,t){return new GS({check:"string_format",format:"regex",...Ae(t),pattern:e})}function IE(e){return new KS({check:"string_format",format:"lowercase",...Ae(e)})}function ME(e){return new QS({check:"string_format",format:"uppercase",...Ae(e)})}function PE(e,t){return new XS({check:"string_format",format:"includes",...Ae(t),includes:e})}function OE(e,t){return new JS({check:"string_format",format:"starts_with",...Ae(t),prefix:e})}function jE(e,t){return new eC({check:"string_format",format:"ends_with",...Ae(t),suffix:e})}function Qo(e){return new tC({check:"overwrite",tx:e})}function RE(e){return Qo(t=>t.normalize(e))}function NE(){return Qo(e=>e.trim())}function $E(){return Qo(e=>e.toLowerCase())}function LE(){return Qo(e=>e.toUpperCase())}function zE(e,t,r){return new e({type:"array",element:t,...Ae(r)})}function BE(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ae(r)})}function FE(e){const t=WE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ko(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(Ko(o))}},e(r.value,r)));return t}function WE(e,t){const r=new ir({check:"custom",...Ae(t)});return r._zod.check=e,r}function uh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function UE(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]=Nc(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function HE(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]=Nc(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function VE(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(uh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Bc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Tp(UE(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(uh(function(){return Promise.resolve((r.mode==="sync"?sS:iS)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Bc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Yc})(i))return{values:{},errors:Tp(HE(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 YE=Z("ZodISODateTime",(e,t)=>{mC.init(e,t),kt.init(e,t)});function qE(e){return xE(YE,e)}const ZE=Z("ZodISODate",(e,t)=>{gC.init(e,t),kt.init(e,t)});function GE(e){return _E(ZE,e)}const KE=Z("ZodISOTime",(e,t)=>{vC.init(e,t),kt.init(e,t)});function QE(e){return wE(KE,e)}const XE=Z("ZodISODuration",(e,t)=>{yC.init(e,t),kt.init(e,t)});function JE(e){return SE(XE,e)}const xr=Z("ZodError",(e,t)=>{Yc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>oS(e,r)},flatten:{value:r=>nS(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Fc,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Fc,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),eD=Ui(xr),tD=Hi(xr),rD=Vi(xr),nD=Yi(xr),oD=lS(xr),sD=uS(xr),iD=dS(xr),aD=fS(xr),cD=pS(xr),lD=hS(xr),uD=mS(xr),dD=gS(xr),zt=Z("ZodType",(e,t)=>(Pt.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)=>ln(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>eD(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>rD(e,r,n),e.parseAsync=async(r,n)=>tD(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>nD(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>oD(e,r,n),e.decode=(r,n)=>sD(e,r,n),e.encodeAsync=async(r,n)=>iD(e,r,n),e.decodeAsync=async(r,n)=>aD(e,r,n),e.safeEncode=(r,n)=>cD(e,r,n),e.safeDecode=(r,n)=>lD(e,r,n),e.safeEncodeAsync=async(r,n)=>uD(e,r,n),e.safeDecodeAsync=async(r,n)=>dD(e,r,n),e.refine=(r,n)=>e.check(nk(r,n)),e.superRefine=r=>e.check(ok(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>xh(e),e.nullable=()=>_h(e),e.nullish=()=>xh(_h(e)),e.nonoptional=r=>KD(e,r),e.array=()=>gh(e),e.or=r=>LD([e,r]),e.and=r=>BD(e,r),e.transform=r=>Sh(e,HD(r)),e.default=r=>qD(e,r),e.prefault=r=>GD(e,r),e.catch=r=>XD(e,r),e.pipe=r=>Sh(e,r),e.readonly=()=>tk(e),e.describe=r=>{const n=e.clone();return Ki.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Ki.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ki.get(e);const n=e.clone();return Ki.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),dh=Z("_ZodString",(e,t)=>{qc.init(e,t),zt.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(TE(...n)),e.includes=(...n)=>e.check(PE(...n)),e.startsWith=(...n)=>e.check(OE(...n)),e.endsWith=(...n)=>e.check(jE(...n)),e.min=(...n)=>e.check(Qi(...n)),e.max=(...n)=>e.check(ch(...n)),e.length=(...n)=>e.check(lh(...n)),e.nonempty=(...n)=>e.check(Qi(1,...n)),e.lowercase=n=>e.check(IE(n)),e.uppercase=n=>e.check(ME(n)),e.trim=()=>e.check(NE()),e.normalize=(...n)=>e.check(RE(...n)),e.toLowerCase=()=>e.check($E()),e.toUpperCase=()=>e.check(LE())}),fD=Z("ZodString",(e,t)=>{qc.init(e,t),dh.init(e,t),e.email=r=>e.check(JC(pD,r)),e.url=r=>e.check(oE(hD,r)),e.jwt=r=>e.check(bE(TD,r)),e.emoji=r=>e.check(sE(mD,r)),e.guid=r=>e.check(oh(fh,r)),e.uuid=r=>e.check(eE(Xi,r)),e.uuidv4=r=>e.check(tE(Xi,r)),e.uuidv6=r=>e.check(rE(Xi,r)),e.uuidv7=r=>e.check(nE(Xi,r)),e.nanoid=r=>e.check(iE(gD,r)),e.guid=r=>e.check(oh(fh,r)),e.cuid=r=>e.check(aE(vD,r)),e.cuid2=r=>e.check(cE(yD,r)),e.ulid=r=>e.check(lE(bD,r)),e.base64=r=>e.check(gE(DD,r)),e.base64url=r=>e.check(vE(kD,r)),e.xid=r=>e.check(uE(xD,r)),e.ksuid=r=>e.check(dE(_D,r)),e.ipv4=r=>e.check(fE(wD,r)),e.ipv6=r=>e.check(pE(SD,r)),e.cidrv4=r=>e.check(hE(CD,r)),e.cidrv6=r=>e.check(mE(ED,r)),e.e164=r=>e.check(yE(AD,r)),e.datetime=r=>e.check(qE(r)),e.date=r=>e.check(GE(r)),e.time=r=>e.check(QE(r)),e.duration=r=>e.check(JE(r))});function _r(e){return XC(fD,e)}const kt=Z("ZodStringFormat",(e,t)=>{St.init(e,t),dh.init(e,t)}),pD=Z("ZodEmail",(e,t)=>{iC.init(e,t),kt.init(e,t)}),fh=Z("ZodGUID",(e,t)=>{oC.init(e,t),kt.init(e,t)}),Xi=Z("ZodUUID",(e,t)=>{sC.init(e,t),kt.init(e,t)}),hD=Z("ZodURL",(e,t)=>{aC.init(e,t),kt.init(e,t)}),mD=Z("ZodEmoji",(e,t)=>{cC.init(e,t),kt.init(e,t)}),gD=Z("ZodNanoID",(e,t)=>{lC.init(e,t),kt.init(e,t)}),vD=Z("ZodCUID",(e,t)=>{uC.init(e,t),kt.init(e,t)}),yD=Z("ZodCUID2",(e,t)=>{dC.init(e,t),kt.init(e,t)}),bD=Z("ZodULID",(e,t)=>{fC.init(e,t),kt.init(e,t)}),xD=Z("ZodXID",(e,t)=>{pC.init(e,t),kt.init(e,t)}),_D=Z("ZodKSUID",(e,t)=>{hC.init(e,t),kt.init(e,t)}),wD=Z("ZodIPv4",(e,t)=>{bC.init(e,t),kt.init(e,t)}),SD=Z("ZodIPv6",(e,t)=>{xC.init(e,t),kt.init(e,t)}),CD=Z("ZodCIDRv4",(e,t)=>{_C.init(e,t),kt.init(e,t)}),ED=Z("ZodCIDRv6",(e,t)=>{wC.init(e,t),kt.init(e,t)}),DD=Z("ZodBase64",(e,t)=>{SC.init(e,t),kt.init(e,t)}),kD=Z("ZodBase64URL",(e,t)=>{EC.init(e,t),kt.init(e,t)}),AD=Z("ZodE164",(e,t)=>{DC.init(e,t),kt.init(e,t)}),TD=Z("ZodJWT",(e,t)=>{AC.init(e,t),kt.init(e,t)}),ph=Z("ZodNumber",(e,t)=>{qp.init(e,t),zt.init(e,t),e.gt=(n,o)=>e.check(ih(n,o)),e.gte=(n,o)=>e.check(Kc(n,o)),e.min=(n,o)=>e.check(Kc(n,o)),e.lt=(n,o)=>e.check(sh(n,o)),e.lte=(n,o)=>e.check(Gc(n,o)),e.max=(n,o)=>e.check(Gc(n,o)),e.int=n=>e.check(hh(n)),e.safe=n=>e.check(hh(n)),e.positive=n=>e.check(ih(0,n)),e.nonnegative=n=>e.check(Kc(0,n)),e.negative=n=>e.check(sh(0,n)),e.nonpositive=n=>e.check(Gc(0,n)),e.multipleOf=(n,o)=>e.check(ah(n,o)),e.step=(n,o)=>e.check(ah(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 Ji(e){return CE(ph,e)}const ID=Z("ZodNumberFormat",(e,t)=>{TC.init(e,t),ph.init(e,t)});function hh(e){return EE(ID,e)}const MD=Z("ZodBoolean",(e,t)=>{IC.init(e,t),zt.init(e,t)});function ea(e){return DE(MD,e)}const PD=Z("ZodUnknown",(e,t)=>{MC.init(e,t),zt.init(e,t)});function mh(){return kE(PD)}const OD=Z("ZodNever",(e,t)=>{PC.init(e,t),zt.init(e,t)});function jD(e){return AE(OD,e)}const RD=Z("ZodArray",(e,t)=>{OC.init(e,t),zt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Qi(r,n)),e.nonempty=r=>e.check(Qi(1,r)),e.max=(r,n)=>e.check(ch(r,n)),e.length=(r,n)=>e.check(lh(r,n)),e.unwrap=()=>e.element});function gh(e,t){return zE(RD,e,t)}const ND=Z("ZodObject",(e,t)=>{RC.init(e,t),zt.init(e,t),vt(e,"shape",()=>t.shape),e.keyof=()=>yh(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mh()}),e.loose=()=>e.clone({...e._zod.def,catchall:mh()}),e.strict=()=>e.clone({...e._zod.def,catchall:jD()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Xw(e,r),e.safeExtend=r=>Jw(e,r),e.merge=r=>eS(e,r),e.pick=r=>Kw(e,r),e.omit=r=>Qw(e,r),e.partial=(...r)=>tS(bh,e,r[0]),e.required=(...r)=>rS(wh,e,r[0])});function vh(e,t){const r={type:"object",get shape(){return cn(this,"shape",e?Vw(e):{}),this.shape},...Ae(t)};return new ND(r)}const $D=Z("ZodUnion",(e,t)=>{NC.init(e,t),zt.init(e,t),e.options=t.options});function LD(e,t){return new $D({type:"union",options:e,...Ae(t)})}const zD=Z("ZodIntersection",(e,t)=>{$C.init(e,t),zt.init(e,t)});function BD(e,t){return new zD({type:"intersection",left:e,right:t})}const Qc=Z("ZodEnum",(e,t)=>{LC.init(e,t),zt.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 Qc({...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 Qc({...t,checks:[],...Ae(o),entries:s})}});function yh(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Qc({type:"enum",entries:r,...Ae(t)})}const FD=Z("ZodLiteral",(e,t)=>{zC.init(e,t),zt.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 WD(e,t){return new FD({type:"literal",values:Array.isArray(e)?e:[e],...Ae(t)})}const UD=Z("ZodTransform",(e,t)=>{BC.init(e,t),zt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Mp(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ko(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(Ko(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function HD(e){return new UD({type:"transform",transform:e})}const bh=Z("ZodOptional",(e,t)=>{FC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xh(e){return new bh({type:"optional",innerType:e})}const VD=Z("ZodNullable",(e,t)=>{WC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function _h(e){return new VD({type:"nullable",innerType:e})}const YD=Z("ZodDefault",(e,t)=>{UC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qD(e,t){return new YD({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Np(t)}})}const ZD=Z("ZodPrefault",(e,t)=>{HC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function GD(e,t){return new ZD({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Np(t)}})}const wh=Z("ZodNonOptional",(e,t)=>{VC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function KD(e,t){return new wh({type:"nonoptional",innerType:e,...Ae(t)})}const QD=Z("ZodCatch",(e,t)=>{YC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function XD(e,t){return new QD({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const JD=Z("ZodPipe",(e,t)=>{qC.init(e,t),zt.init(e,t),e.in=t.in,e.out=t.out});function Sh(e,t){return new JD({type:"pipe",in:e,out:t})}const ek=Z("ZodReadonly",(e,t)=>{ZC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tk(e){return new ek({type:"readonly",innerType:e})}const rk=Z("ZodCustom",(e,t)=>{GC.init(e,t),zt.init(e,t)});function nk(e,t={}){return BE(rk,e,t)}function ok(e){return FE(e)}const Ch=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,Eh=(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},sk=vh({UsuarioID:Ji().nullable().optional(),disID:Ji().nullable().optional(),EsOrganizador:ea().default(!1),Correo:_r().email("Formato de correo inválido"),StatusInvitacion:yh(["PENDIENTE","CONFIRMADA","RECHAZADA"]).default("PENDIENTE")}),ik=vh({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(Ch,{message:"Formato inválido"}),horaFin:_r().min(1,"La hora fin es requerida.").regex(Ch,{message:"Formato inválido"}),todoElDia:ea(),fechaFin:_r().optional(),showEndDate:ea().optional(),horaInicio2:_r().optional(),TodoElDia2:ea().optional(),client:_r().nullable().optional(),repetir:_r().optional(),link:_r().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(WD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:_r().optional(),invitados:gh(sk).optional().default([]),color:_r().optional(),solID:Ji().nullable().optional(),disID:Ji().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=Eh(e.fechaInicio,e.horaInicio),r=Eh(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"]}),Dh=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"})),ak="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",ck=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"})))),kh="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",lk=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"})))),uk="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",dk=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 Xo={},Ah;function fk(){if(Ah)return Xo;Ah=1;var e=ut();Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=void 0;var t=e(gt()),r=pt();return Xo.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"),Xo}var pk=fk();const Th=lt(pk);var Jo={},Ih;function hk(){if(Ih)return Jo;Ih=1;var e=ut();Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var t=e(gt()),r=pt();return Jo.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"),Jo}var mk=hk();const gk=lt(mk),Mh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAElBMVEUAAABpbXlpbXlobXhpbnppbnkdzkEGAAAABXRSTlMAgJ5Y75poDcUAAAA3SURBVBjTYyANiBog2IyhSBzRQGQJASSJIGQJBSIkTBESCA5CGcIAoqUEGDAdiukFBhE4hzAAAK+MB7AghHQFAAAAAElFTkSuQmCC",Ph="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAADlQTFRFR3BMIHDPJHDUJHDVJXHWJHDVJHHWJHDUI3DUJXHWJXDUJHHUJXHW////c6Tlr8vwiLLp1eT3Nn3ZZnh0KAAAAAx0Uk5TABBAgN+bxCBc7zBwfOSOGgAAAKJJREFUeNp1klsOxSAIREerohb72v9iryFXsSQ9P+BMwiQgJpQ4ZBjIOwrcySAHZetS4Y6UOK3Mb7ZhRGOkYSRjFAg+sSXlNcDGBH5xnI9UB6O3dkhDSEY/pQmAl+Y6n1XnDJA0rd2P6Boex4z7mnrHQ6evOu8oNneE7Dyci5VAQA5sKZF0iSt+rt1AH4cKWC9VNKFiQvX/GTbU6vCGIpddnz/knxPCFgg8/wAAAABJRU5ErkJggg==",vk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAGFBMVEUAAAAAfFQAflYAfVYAfVUAfFQAcFAAfVbb6xt6AAAAB3RSTlMAIN98m0wQyLlfvgAAAE1JREFUGNNjoAgwmiJxhMoDEBLq5QZIEkUCSBKKeCXYYBJgMQeEBHN5CUIHa3m5A8Io8/ISiAREHRAAJWBSSHYwgyXgUjAJsIGGpPkcAJCLE29yhAT7AAAAAElFTkSuQmCC",yk=e=>{const t=["#A17B4B","#7B5BE4","#F9A825","#4A90E2","#5CC85C","#FDD835","#E53935","#B0BEC5"],r=e.charCodeAt(0)%t.length;return t[r]},bk=(e,t,r,n,o)=>{if(t)return u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#1976D2"},children:[u.jsx("img",{src:Ph,width:15,style:{marginRight:"5px"}}),u.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return u.jsx(m.Typography,{variant:"caption",sx:{color:"#999",fontStyle:"italic",fontWeight:600},children:"Pendiente"});case"RECHAZADA":return u.jsx(m.Button,{onClick:()=>{n(r),o()},variant:"outlined",size:"small",sx:{fontWeight:600,borderRadius:"8px",textTransform:"none",fontSize:"11px",px:1,py:0},children:"Reenviar"});case"CONFIRMADA":return u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#00A86B"},children:[u.jsx("img",{src:vk,width:15,style:{marginRight:"5px"}}),u.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Asistiré"})]});default:return null}};function xk({open:e,handleClose:t,guests:r,onReenviar:n}){const o=r.filter(l=>l.estatus==="CONFIRMADA"||l.isHost),s=r.filter(l=>l.estatus==="PENDIENTE"&&!l.isHost),i=r.filter(l=>l.estatus==="RECHAZADA"&&!l.isHost),a=l=>u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",py:1},children:[u.jsxs(m.Box,{sx:{position:"relative",mr:2},children:[u.jsx(m.Avatar,{sx:{bgcolor:yk(l.iniciales),width:32,height:32,fontSize:"12px",color:"#fff"},children:l.iniciales}),l.estatus==="PENDIENTE"&&u.jsx(m.Box,{sx:{position:"absolute",bottom:-2,right:-4,bgcolor:"#fff",borderRadius:"50%",display:"flex"},children:u.jsx(Ac,{sx:{fontSize:14,color:"#546E7A"}})})]}),u.jsx(m.Typography,{variant:"body2",sx:{flexGrow:1,fontWeight:500,color:"#333"},children:l.nombre}),bk(l.estatus,l.isHost,l.usrID,n,t)]},l.nombre),c=({title:l,count:d,badgeColor:f})=>u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mt:2,mb:1},children:[u.jsx(m.Typography,{variant:"subtitle2",sx:{fontWeight:800,color:"#333",fontSize:"13px"},children:l}),f&&u.jsx(m.Box,{sx:{ml:1,bgcolor:f,color:"#fff",borderRadius:"50%",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:d})]});return u.jsxs(m.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{border:"solid 0.1 px",height:"100%"}},children:[u.jsxs(m.Box,{sx:{p:"16px 8px"},children:[u.jsx(m.Typography,{variant:"subtitle1",sx:{fontWeight:800,ml:1,color:"#333333"},children:"Lista de invitados"}),u.jsx(m.Button,{onClick:t,startIcon:u.jsx("img",{src:Mh,width:20}),sx:{textTransform:"none",color:"#666",fontSize:"16px",p:0,minWidth:0,ml:.5,"&:hover":{bgcolor:"transparent"}},children:"Volver al evento"}),u.jsx(m.IconButton,{onClick:t,sx:{position:"absolute",right:8,top:12},children:u.jsx(Hr,{})})]}),u.jsx(m.Divider,{sx:{backgroundColor:"black"}}),u.jsxs(m.DialogContent,{sx:{p:2},children:[s.length>0&&u.jsxs(m.Box,{sx:{mb:3},children:[u.jsx(c,{title:"Invitados",count:s.length}),s.map(a)]}),o.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(m.Divider,{sx:{my:1,backgroundColor:"black"}}),u.jsxs(m.Box,{sx:{mb:3},children:[u.jsx(c,{title:"Confirmados",count:o.length,badgeColor:"#1976D2"}),o.map(a)]})]}),i.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(m.Divider,{sx:{my:1,backgroundColor:"black"}}),u.jsxs(m.Box,{children:[u.jsx(c,{title:"No asistirán",count:i.length,badgeColor:"#1976D2"}),i.map(a)]})]})]})]})}const _k=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FFEB3B","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function wk({guests:e,onReenviar:t}){const[r,n]=v.useState(!1),o=()=>n(!0),s=()=>n(!1);return u.jsxs(u.Fragment,{children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee",width:"100%"},children:[u.jsx(m.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((i,a)=>u.jsx(m.Tooltip,{title:i.nombre,arrow:!0,placement:"top",children:u.jsx(m.Box,{children:u.jsx(m.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},invisible:i.estatus!=="PENDIENTE",sx:{backgroundColor:"white"},badgeContent:u.jsx(m.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:Xf})}),children:u.jsx(m.Avatar,{sx:{bgcolor:_k(i.iniciales)},children:i.iniciales})})})},a))}),u.jsx(m.Box,{sx:{flexGrow:1}}),u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"#1976D2",transition:"opacity 0.2s","&:hover":{opacity:.7}},onClick:o,children:[u.jsx(m.Typography,{variant:"body2",sx:{fontWeight:"bold",fontSize:"14px"},children:"Ver invitados"}),u.jsx(gk,{sx:{fontSize:18,ml:.5}})]})]}),u.jsx(xk,{open:r,handleClose:s,guests:e,onReenviar:t})]})}var es={},Oh;function Sk(){if(Oh)return es;Oh=1;var e=ut();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(gt()),r=pt();return es.default=(0,t.default)((0,r.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),es}var Ck=Sk();const Ek=lt(Ck),Dk=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),jh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},Rh=e=>e.split(":").slice(0,2).join(":"),kk=({slot:e,onClick:t})=>u.jsxs(m.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #000000",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(m.Box,{sx:{bgcolor:"#333",color:"white",py:.5},children:u.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold",textTransform:"capitalize"},children:Dk(e.Fecha)})}),u.jsxs(m.Box,{sx:{py:1.5},children:[u.jsx(m.Typography,{sx:{fontSize:"12px"},children:jh(e.HoraInicio)}),u.jsxs(m.Typography,{sx:{fontSize:"12px"},children:["a ",jh(e.HoraFin)]})]})]});function Ak({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const[o,s]=v.useState(16),a=r.slice(0,o).reduce((d,f)=>{const h=f.Fecha;return d[h]||(d[h]=[]),d[h].push(f),d},{}),c=Object.keys(a),l=d=>{const f={...d,HoraInicio:Rh(d.HoraInicio),HoraFin:Rh(d.HoraFin)};n(f),t()};return u.jsxs(m.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{borderRadius:"16px"}},children:[u.jsxs(m.Box,{sx:{p:2.5,display:"flex",flexDirection:"column",gap:.5},children:[u.jsx(m.Typography,{variant:"h6",sx:{fontWeight:800,fontSize:"1.1rem"},children:"Selecciona un nuevo horario"}),u.jsx(m.Box,{children:u.jsx(m.Button,{startIcon:u.jsx("img",{src:Mh,width:20}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0,fontSize:"1rem","&:hover":{backgroundColor:"transparent",color:"#000"}},children:"Volver al evento"})})]}),u.jsx(m.Divider,{}),u.jsx(m.DialogContent,{sx:{px:3,py:3,backgroundColor:"#f9f9f9"},children:c.length===0?u.jsx(m.Typography,{variant:"body2",color:"text.secondary",align:"center",children:"No hay horarios alternativos disponibles en este momento."}):u.jsxs(u.Fragment,{children:[c.map((d,f)=>u.jsxs(m.Box,{sx:{mb:3},children:[u.jsxs(m.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:f===0?"#1976d2":"text.primary",fontSize:"0.9rem"},children:[f===0?"Mismo día ":"Próximas fechas",f===0&&u.jsx("img",{src:Ph,width:15,style:{marginLeft:5}})]}),u.jsx(m.Grid,{container:!0,spacing:2,children:a[d].map((h,y)=>u.jsx(m.Grid,{item:!0,xs:6,sm:3,children:u.jsx(kk,{slot:h,onClick:()=>l(h)})},`${d}-${y}`))})]},d)),r.length>o&&u.jsx(m.Box,{sx:{display:"flex",justifyContent:"center",mt:2},children:u.jsx(m.Button,{onClick:()=>s(d=>d+12),startIcon:u.jsx(Ek,{}),sx:{textTransform:"none",fontWeight:"bold",color:"#1976d2","&:hover":{backgroundColor:"transparent",textDecoration:"underline"}},children:"Mostrar más horarios disponibles"})})]})})]})}const Tk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAIVBMVEVHcExAR1ZAR1NARlVAR1VARlVAR1VARlVARlRARlRAR1ZiwDFVAAAACnRSTlMA5BvHaqI5kH9QLGWfKwAAAQlJREFUeNrd1luqwzAMBNDRw7I7+1/whd4mFa6tBPrX82uJGYMJwc+JLqQ1xU2dLx23NB5EgWjPtAe2Rp4Py8tLmuddeBK/KuRQMgusvDsAwkPRKgU4J14uBIwTw4K8G/GDFncQ6L0FrxYCn1TKhIU4D4UTwZIf8Z2ThjW1/9OoG2XqvTvmiI5LxsRwTRtPTbER3eTJHOcDN8fGkNxagfAxPLChxkyaohTCxEJRU2EeBxDe21NftsrzDuiQup+nwzivn41tQECNC5ZDHrmPCpdEVx+YluaLDONB0bnVcZAUwELgJQUYCzZXMihLOr0Lh7PkmBlLbbFQEsx44fsFY8kwU2PB9Ef+Lv4AL2kmcGZOH2MAAAAASUVORK5CYII=",Ik=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Mk({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=v.useState(null),[s,i]=v.useState(""),a=(l,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(l,d)=>{i(d),r(d)};return u.jsx(m.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(m.TextField,{...l,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...l.InputProps,startAdornment:u.jsx(m.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:u.jsx("img",{src:Tk,color:"action",width:20})}),disableUnderline:!0}}),renderOption:(l,d)=>v.createElement(m.Box,{component:"li",...l,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},u.jsx(m.Avatar,{sx:{bgcolor:Ik(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),u.jsx(m.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var ts={},Nh;function Pk(){if(Nh)return ts;Nh=1;var e=ut();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(gt()),r=pt();return ts.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"),ts}var Ok=Pk();const jk=lt(Ok);var rs={},$h;function Rk(){if($h)return rs;$h=1;var e=ut();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(gt()),r=pt();return rs.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"),rs}var Nk=Rk();const Xc=lt(Nk),$k=e=>e.tieneConflicto?{icon:u.jsx(Xc,{sx:{fontSize:18,color:"#d32f2f"}}),fillColor:"#FFF5F5",iconColor:"#d32f2f",textColor:"#333333",variant:"filled"}:{icon:u.jsx(jk,{sx:{fontSize:20,color:"#1a73e8"}}),fillColor:"#eaedf2",iconColor:"#1a73e8",textColor:"#000000",variant:"filled"},Lk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FDD835","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function zk({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(m.Box,{sx:{p:1},children:[u.jsx(m.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=$k(i),l=Lk(i.iniciales);return u.jsx(m.Chip,{label:u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[u.jsx(m.Typography,{variant:"body2",sx:{color:c.textColor,ml:.5,mr:1,fontSize:"13px",fontWeight:400},children:s(i?.nombre)}),u.jsx(m.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"center",ml:"auto",margin:"5px"},children:c.icon})]}),avatar:u.jsx(m.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(m.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:.5},children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#E53935"},children:[u.jsx(Xc,{sx:{mr:1,fontSize:22}}),u.jsxs(m.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(m.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 Bk(e,t){const[r,n]=v.useState(e);return v.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const Fk={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"},Lh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],Wk=()=>{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},zh=[],eo=Wk(),ns=(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},Uk=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c,onReenviar:l})=>{const[d,f]=v.useState(!1),[h,y]=v.useState(!1),g=x.format(new Date,"yyyy-MM-dd"),[p,b]=v.useState(""),[w,S]=v.useState([]),[E,C]=v.useState(!1),_=kc(),[W,D]=v.useState([]),[T,M]=v.useState(""),[I,U]=v.useState(zh),[G,F]=v.useState(!1),[Y,se]=v.useState(""),[H,N]=v.useState(!1),[le,de]=v.useState([]),[$,Q]=v.useState([]),Se=Bk(Y,300),we=I.filter(q=>q.tieneConflicto).length,{control:he,handleSubmit:ae,reset:ue,formState:{errors:J,isValid:Ce},watch:me,setValue:ee}=kp({resolver:VE(ik),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"}),Me=me("fechaInicio"),j=me("fechaFin"),Fe=me("todoElDia");v.useEffect(()=>{if(p.trim()===""||!i||!c||!a){S([]),D([]),ee("solID",null),C(!1),M("");return}C(!0);const q=setTimeout(()=>{_.getClients(p,c,a,i).then(fe=>{if(C(!1),fe){const Oe=fe.map(je=>je.solID);D([...new Set(Oe)])}else D([]);const ke=Array.from(new Map(fe.map(Oe=>[Oe.nombreCliente,Oe])).values());if(ke.length>0)S(ke),M("");else if(s?.client&&s.solID!==null){const Oe=[{solID:s.solID,nombreCliente:s.client}];S(Oe),M("Sin resultados")}else S([]),M("Sin resultados")}).catch(fe=>{console.error("Error al buscar clientes:",fe),C(!1)})},500);return()=>clearTimeout(q)},[p,i,c,a]),v.useEffect(()=>{if(Me&&j){const q=new Date(Me),fe=new Date(j);(q===fe||q>fe)&&ee("fechaFin",Me)}},[Me,j,ee]),v.useEffect(()=>{Me&&ee("fechaFin",Me)},[Me]),v.useEffect(()=>{ee("showEndDate",d)},[d,ee]),v.useEffect(()=>{if(s){const q=x.format(s.fechaInicio,"yyyy-MM-dd")===x.format(s.fechaFin,"yyyy-MM-dd");if(f(!q),ee("titulo",s?.titulo),ee("fechaInicio",x.format(s.fechaInicio,"yyyy-MM-dd")),ee("fechaFin",x.format(s.fechaFin,"yyyy-MM-dd")),ee("horaInicio",x.format(s.fechaInicio,"HH:mm")),ee("horaFin",x.format(s.fechaFin,"HH:mm")),ee("horaInicio2",x.format(s.fechaFin,"HH:mm")),ee("descripcion",s.descripcion),ee("link",s.link),ee("repetir","false"),ee("color",s.color),ee("todoElDia",s.todoElDia),ee("solID",s.solID),ee("client",s.client),console.log("initialEvent",s),s.invitados&&s.invitados.length>0){const fe=(s?.invitados||[]).map(je=>{const te=je.usrNombre?.trim()||"",_e=te.split(/\s+/),Ie=_e.length>1?(_e[0][0]+_e[1][0]).toUpperCase():te.substring(0,2).toUpperCase();return{nombre:je.usrNombre||"Sin nombre",correo:je.correo||"",iniciales:Ie||"--",usrID:je.usuarioID??null,isHost:je.esOrganizador||!1,estatus:je.statusInvitacion,tieneConflicto:!1,disID:je.disID}}),ke=localStorage.getItem("nombreAnfitrion")||"Anfitrión",Oe={nombre:ke,correo:"",iniciales:ke.substring(0,2).toUpperCase(),usrID:i??0,isHost:!0,estatus:"CONFIRMADA",tieneConflicto:!1};U([Oe,...fe])}else U(zh);s.solID?y(!0):y(!1)}else{const q=o||new Date,fe=new Date,ke=new Date(q.getFullYear(),q.getMonth(),q.getDate(),fe.getHours(),fe.getMinutes()),Oe=x.addHours(ke,1);ue({titulo:"",fechaInicio:x.format(ke,"yyyy-MM-dd"),horaInicio:x.format(ke,"HH:mm"),fechaFin:x.format(Oe,"yyyy-MM-dd"),horaFin:x.format(Oe,"HH:mm"),horaInicio2:x.format(Oe,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Lh[0],solID:null}),f(!1),y(!1)}},[s,e,o]);const Ke=q=>({UsuarioID:q.usrID??null,Correo:q.correo,EsOrganizador:q.usrID==i,StatusInvitacion:q.estatus,disID:c??null}),Ze=ae(q=>{const fe=I.map(Oe=>Ke(Oe)),ke={...q,invitados:fe};r(ke,s?.eventoID),t(),ue(),f(!1)},q=>{console.log("Errores de validación:",q)});v.useEffect(()=>{Fe&&(ee("horaInicio","00:00"),ee("horaFin","23:59"))},[Fe,ee,me]);const Be=()=>{const q=me("fechaInicio");if(q){const fe=new Date(`${q}T00:00:00`),ke=x.addDays(fe,1);ee("fechaFin",x.format(ke,"yyyy-MM-dd"))}f(!0)},Ve=me("fechaInicio"),et=me("horaInicio"),ht=me("fechaFin"),k=me("horaFin"),[P,B]=v.useState(null),[ce,ie]=v.useState(null);v.useEffect(()=>{(P===null||P!==et)&&B(et)},[et,P]),v.useEffect(()=>{(ce===null||ce!==k)&&ie(k??"")},[k,ce]);const O=me("todoElDia");v.useEffect(()=>{if(O||!et||!k||!Ve||!ht)return;const q=ns(Ve,et),fe=ns(ht,k);if(!q||!fe||!x.isValid(q)||!x.isValid(fe))return;const ke=x.isSameDay(q,fe),Oe=ke&&(x.isAfter(q,fe)||q.getTime()===fe.getTime()),je=x.isBefore(fe,q)&&!ke;(Oe||je)&&(ee("horaFin",""),ie(""))},[et,Ve]);const oe=v.useMemo(()=>{if(!et||!Ve)return eo;const q=ns(Ve,et),fe=ns(ht,"00:00");return!q||!fe||!x.isValid(q)||!x.isValid(fe)||x.isBefore(fe,q)&&!x.isSameDay(fe,q)?eo:x.isSameDay(q,fe)?eo.filter(ke=>{const Oe=ns(ht,ke);return Oe&&x.isAfter(Oe,q)}):(x.isAfter(fe,q),eo)},[et,Ve,ht]),Ee=v.useMemo(()=>eo,[]),Ne=async q=>{const fe=I.some(Vt=>Vt.correo===q.correo);if(N(!0),fe)return;const ke=c,Oe=q.correo,je=q.usrID,te=Ve,_e=et,Ie=k;if(!ke||!Oe||!te||!_e||!Ie){U(Vt=>[...Vt,{...q,status:"pending",isHost:!1,hasConflict:!1,usrID:je,name:q.nombre}]);return}let Pe;try{Pe=await _.VerificarConflicto(ke,Oe,te,_e+":00",Ie+":00")}catch{Pe={tieneConflicto:!1,usrMail:q.correo}}const wr=Array.isArray(Pe)?Pe[0]:Pe,ar={...q,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(wr.tieneConflicto).toLowerCase()==="true"};if(ar.tieneConflicto){const Vt=await _.getDisponibilidadUsuario(c,Oe,te,"60");de(Vt)}U(Vt=>[...Vt,ar])},R=q=>{U(fe=>fe.filter(ke=>ke.nombre!==q))},re=()=>{F(!1)},xe=q=>{const Oe=(q.usrNombre??"").split(" ").map(je=>je.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:q.usrNombre??"",correo:q.usrMail??"",iniciales:Oe,usrID:q.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};v.useEffect(()=>{Se.length>2&&c?(async()=>{const ke=(await _.getUsuariosInvitados(c,Se)).map(xe).filter(Oe=>Oe.usrID!==i&&!I.some(je=>je.correo===Oe.correo));Q(ke)})():Q([])},[Se,I]);const Ge=q=>{se(q)},At=q=>{const{Fecha:fe,HoraInicio:ke,HoraFin:Oe}=q,je=te=>te.split(":").slice(0,2).join(":");ee("fechaInicio",fe),ee("fechaFin",fe),ee("horaInicio",je(ke)),ee("horaFin",je(Oe)),f(!1),re(),console.log("Formulario actualizado con sugerencia:",{Fecha:fe,HoraInicio:ke,HoraFin:Oe})};return u.jsx(u.Fragment,{children:u.jsx(m.Modal,{open:e,onClose:t,children:u.jsx("form",{onSubmit:Ze,children:u.jsxs(m.Box,{sx:Fk,children:[u.jsx(m.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:u.jsx(Hr,{})}),u.jsx(m.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent||!s?.esOrganizador?u.jsx(u.Fragment,{children: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:he,render:({field:q})=>u.jsx(m.TextField,{...q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!J.titulo,helperText:J.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 ${d?"mb-1":"mb-2"}`,children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(hr,{name:"fechaInicio",control:he,render:({field:q})=>u.jsx(m.TextField,{fullWidth:!0,...q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!J.fechaInicio,helperText:J.fechaInicio?.message})})}),d?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:he,render:({field:q})=>u.jsx(m.TextField,{...q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:Me||g},error:!!J.fechaFin,helperText:J.fechaFin?.message})})}),!s&&u.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:u.jsx(m.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:u.jsx(Dh,{})})})]}):u.jsx("div",{className:"col-md-8"})]}),d&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12 d-flex justify-content-center",children:u.jsx(Th,{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:he,render:({field:{onChange:q,value:fe,...ke}})=>u.jsx(m.Autocomplete,{freeSolo:!0,options:Ee,value:fe||"",onChange:(Oe,je)=>q(je||""),onInputChange:(Oe,je)=>q(je),renderInput:Oe=>u.jsx(m.TextField,{...Oe,...ke,size:"small",error:!!J.horaInicio,helperText:J.horaInicio?.message,InputProps:{...Oe.InputProps,endAdornment:u.jsx(m.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(Ac,{})})}}),disabled:O})})}),!d&&u.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:J.horaInicio?"5px":"0px"},children:u.jsx(Th,{sx:{color:"#757575"}})}),d&&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:he,render:({field:{onChange:q,value:fe,...ke}})=>u.jsx(m.Autocomplete,{freeSolo:!0,options:oe,value:fe||"",onChange:(Oe,je)=>q(je||""),onInputChange:(Oe,je)=>q(je),renderInput:Oe=>u.jsx(m.TextField,{...Oe,...ke,size:"small",error:!!J.horaFin,helperText:J.horaFin?.message,InputProps:{...Oe.InputProps,endAdornment:u.jsx(m.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(Ac,{})})}}),disabled:O})})}),!d&&u.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:u.jsx(hr,{name:"todoElDia",control:he,render:({field:q})=>u.jsx(m.FormControlLabel,{control:u.jsx(m.Checkbox,{checked:q.value,onChange:fe=>q.onChange(fe.target.checked)}),label:u.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!d&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(m.Button,{onClick:Be,size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(lk,{}),"  Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&u.jsx("div",{className:"row mb-2",children:u.jsxs("div",{className:"col-12",children:[!h&&u.jsxs(m.Button,{onClick:()=>y(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(dk,{}),"  Vincular cliente"]}),h&&u.jsxs("div",{className:"row g-2",children:[u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(hr,{name:"client",control:he,render:({field:q})=>u.jsx(m.Autocomplete,{options:w,loading:E,loadingText:"Buscando coincidencias...",getOptionLabel:fe=>fe.nombreCliente?.trim()||"",value:w.find(fe=>fe.nombreCliente===q.value)||(q.value&&typeof q.value=="string"?{solID:-1,nombreCliente:q.value}:null),noOptionsText:T,onInputChange:(fe,ke)=>{b(ke)},onChange:(fe,ke)=>{q.onChange(ke?ke.nombreCliente:"")},renderInput:fe=>u.jsx(m.TextField,{...fe,placeholder:"Buscar cliente...",size:"small",InputProps:{...fe.InputProps,startAdornment:u.jsx("img",{src:Xd,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:u.jsxs(u.Fragment,{children:[E?u.jsx(m.CircularProgress,{color:"inherit",size:20}):null,fe.InputProps.endAdornment]})}})})})}),u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(hr,{name:"solID",control:he,render:({field:q})=>u.jsx(m.Autocomplete,{options:W,noOptionsText:"Sin resultados",getOptionLabel:fe=>fe.toString(),value:q.value??null,onChange:(fe,ke)=>q.onChange(ke),renderInput:fe=>u.jsx(m.TextField,{...fe,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!w.length})})}),u.jsx("div",{className:"col-2 d-flex align-items-center",children:u.jsx(m.IconButton,{onClick:()=>y(!1),sx:{fontSize:18},children:u.jsx(Dh,{})})})]})]})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(hr,{name:"link",control:he,render:({field:q})=>u.jsx(m.TextField,{...q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!J.link,helperText:J.link?.message,InputProps:{startAdornment:u.jsx("img",{src:ak,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:he,render:({field:q})=>u.jsx(m.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:uk,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(Mk,{onSelectGuest:Ne,availableSuggestions:$,onInputTextChange:Ge})})}),H&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(zk,{guests:I,conflictCount:we,onViewSuggestions:()=>F(!0),onDeleteGuest:R})})}),s?.invitados&&s?.invitados?.length>0&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(m.Box,{children:u.jsx(wk,{guests:I,onReenviar:l})})})}),u.jsx(Ak,{open:G,handleClose:re,suggestions:le,onSelectSlot:At}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[u.jsx(ck,{}),Lh.map(q=>u.jsx(hr,{name:"color",control:he,render:({field:fe})=>u.jsx(m.IconButton,{onClick:()=>fe.onChange(q),sx:{width:24,height:24,borderRadius:"50%",bgcolor:q,border:fe.value===q?"2px solid":"none",borderColor:fe.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(m.Button,{onClick:n,variant:"outlined",startIcon:u.jsx("img",{src:kh,width:15}),hidden:!s?.esOrganizador,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(m.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(m.Button,{onClick:Ze,variant:"contained",disabled:!Ce,hidden:!s?.esOrganizador,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"})]})})]})})})})},Hk={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"},Vk=({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(m.Modal,{open:e,onClose:t,children:u.jsxs(m.Box,{sx:Hk,children:[u.jsxs(m.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[u.jsxs(m.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),u.jsx(m.IconButton,{onClick:t,size:"small",children:u.jsx(Hr,{})})]}),u.jsx(m.Divider,{}),u.jsx(m.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return u.jsx(m.ListItem,{disablePadding:!0,sx:{mb:1},children:u.jsx(m.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(m.Box,{sx:{flexGrow:1},children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[u.jsx(m.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),u.jsx(m.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),u.jsx(m.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 os={},Bh;function Yk(){if(Bh)return os;Bh=1;var e=ut();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(gt()),r=pt();return os.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"),os}var qk=Yk();const Zk=lt(qk);var ss={},Fh;function Gk(){if(Fh)return ss;Fh=1;var e=ut();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(gt()),r=pt();return ss.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"),ss}var Kk=Gk();const Qk=lt(Kk),Xk="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",Jk="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==",Jc=v.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=bs.useSnackbar(),s={success:{color:"#fff",icon:u.jsx("img",{width:25,src:Xk,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:u.jsx(Zk,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:u.jsx(Qk,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:u.jsx("img",{src:kh,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})},rechazar:{color:"#fff",icon:u.jsx("img",{src:Jk,width:30,style:{borderRadius:"50%",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return u.jsx(bs.SnackbarContent,{ref:n,children:u.jsxs(m.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(m.Box,{sx:{mr:1.5},children:i.icon}),u.jsx(m.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),u.jsx(m.IconButton,{size:"small",onClick:()=>o(e),children:u.jsx(Hr,{fontSize:"small"})})]})})}),Wh=v.createContext(void 0),eA=({children:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState([]),[s,i]=v.useState(!1);return u.jsx(Wh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},tA=()=>{const e=v.useContext(Wh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},rA=(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(nA(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 nA(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 oA(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 sA=(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(oA(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}},Uh="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",iA="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",aA=({open:e,onClose:t,onConfirm:r,title:n,description:o,icon:s,confirmText:i,confirmColor:a="#d32f2f",loading:c=!1})=>u.jsxs(m.Dialog,{open:e,onClose:t,PaperProps:{sx:{borderRadius:"15px",p:1,maxWidth:"400px"}},children:[u.jsx(m.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:u.jsx(m.IconButton,{onClick:t,size:"small",children:u.jsx(Hr,{fontSize:"small"})})}),u.jsxs(m.DialogContent,{sx:{textAlign:"center",pt:0},children:[u.jsx(m.Box,{sx:{mb:2,display:"flex",justifyContent:"center"},children:s}),u.jsx(m.Typography,{variant:"h6",sx:{fontWeight:"bold",mb:2},children:n}),u.jsx(m.Typography,{variant:"body2",sx:{color:"#555",mb:4,px:2},children:o}),u.jsxs(m.Box,{sx:{display:"flex",gap:2,justifyContent:"center",mb:2},children:[u.jsx(m.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none",borderRadius:"8px",px:4,borderColor:"#1976D2",color:"#1976D2"},children:"Regresar"}),u.jsxs(m.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:iA,width:15,style:{marginRight:6,marginBottom:2}}),c?"Procesando...":i]})]})]})]}),cA=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=v.useState(new Date),[a,c]=v.useState([]),[l,d]=v.useState(!1),[f,h]=v.useState(null),[y,g]=v.useState(!1),[p,b]=v.useState(null),[w,S]=v.useState([]),{enqueueSnackbar:E}=bs.useSnackbar(),C=kc(),_=Ti(),W=_c(),[D,T]=v.useState(!1),[M,I]=v.useState([]),[U,G]=v.useState(null),{session:F,sessionoutlook:Y}=ac(),{googleEvents:se,setGoogleEvents:H,outlookEvents:N,setOutlookEvents:le}=tA(),[de,$]=v.useState([]),[Q,Se]=v.useState([]),[we,he]=v.useState([]),[ae,ue]=v.useState(!1),[J,Ce]=v.useState([]),[me,ee]=v.useState(),Me=(te,_e)=>{I(te),G(_e),T(!0)},j=async()=>{if(e===void 0)return;const te=await C.getNotificacionesXUsuario(e,!1),_e=te[0].evento.nombreAnfitrion;localStorage.setItem("nombreAnfitrion",_e),Ce(te)};v.useEffect(()=>{const te=new Date,_e=x.startOfDay(te),Ie=x.endOfDay(x.addDays(_e,6)),Pe={start:_e,end:Ie},wr=a.filter(ar=>{const Vt={start:ar.fechaInicio,end:ar.fechaFin};return Wd(Vt,Pe)}).sort((ar,Vt)=>ar.fechaInicio.getTime()-Vt.fechaInicio.getTime());S(wr)},[a]),v.useEffect(()=>{const te=async()=>{try{if(e){const Ie=await C.getEventsByUser(e);j(),c(Ie)}}catch(Ie){console.log("Error al cargar eventos locales:",Ie)}};te();const _e=setInterval(te,4e3);return()=>clearInterval(_e)},[e]),v.useEffect(()=>{if(!n||!e)return;const te=[...a];if(se.length>0&&F?.userEmail){const _e=se.map(Ie=>rA(Ie,n,e));te.push(..._e)}if(N.length>0&&Y?.userEmail){const _e=N.map(Ie=>sA(Ie,n,e));te.push(..._e)}$(te)},[a,se,N,n,e,F?.userEmail,Y?.userEmail]);const Fe=async te=>{try{if(te?.isGoogleEvent||te.isOutlookEvent)h(te),d(!0);else{const _e=await C.getEventById(te.eventoID);h(_e),d(!0)}}catch(_e){console.error(_e)}},Ke=()=>{d(!1),h(null)},Ze=async(te,_e)=>{let Ie,Pe;te.todoElDia?(Ie=new Date(`${te.fechaInicio}T${te.horaInicio}`),Pe=new Date(`${te.fechaInicio}T${te.horaFin}`)):(Ie=new Date(`${te.fechaInicio}T${te.horaInicio}`),Pe=te.fechaFin&&te.horaFin?new Date(`${te.fechaFin}T${te.horaFin}`):new Date(`${te.fechaInicio}T${te.horaFin}`));const wr=x.format(Ie,"yyyy-MM-dd HH:mm:ss.SSS"),ar=x.format(Pe,"yyyy-MM-dd HH:mm:ss.SSS");if(_e){const Jr={...te,eventoID:_e,fechaInicio:wr,fechaFin:ar,solID:te.solID??null,disID:n??null,client:te.client,invitados:te.invitados.map(Ye=>({usrNombre:Ye.nombre||Ye.usrNombre,Correo:Ye.correo||Ye.Correo,EsOrganizador:Ye.isHost||Ye.EsOrganizador,StatusInvitacion:Ye.StatusInvitacion,UsuarioID:Ye.usrID||Ye.UsuarioID,disID:Ye.disID||n}))};try{const Ye=await C.updateEvent(Jr);var Vt=a.map(Sr=>Sr.eventoID===Ye.eventoID?Ye:Sr);c(Vt),E("El evento se ha actualizado correctamente.",{variant:"success"}),Ke()}catch{E("Error al actualizar Evento",{variant:"error"})}}else{const Jr={...te,fechaInicio:wr,fechaFin:ar,todoElDia:te.todoElDia,solID:te.solID??null,disID:n??null,client:te.client,invitados:te.invitados.map(Ye=>({usrNombre:Ye.nombre||Ye.usrNombre,Correo:Ye.correo||Ye.Correo,EsOrganizador:Ye.isHost||Ye.EsOrganizador,StatusInvitacion:Ye.StatusInvitacion,UsuarioID:Ye.usrID||Ye.UsuarioID,disID:Ye.disID||n}))};try{const Ye=await C.createEvent(Jr,e);c(Sr=>[...Sr,Ye]),E("El evento se ha creado con éxito",{variant:"success"}),Ke()}catch{E("Error al guardar Evento",{variant:"error"})}}if(e){const Jr=await C.getEventsByUser(e);c(Jr)}},Be=()=>{i(te=>new Date(te.getFullYear(),te.getMonth()-1,1))},Ve=()=>{i(te=>new Date(te.getFullYear(),te.getMonth()+1,1))},et=()=>{fe("ELIMINAR")},ht=()=>{fe("RECHAZAR")},k=()=>{b(new Date),d(!0)},P=te=>{te&&i(te)},B=te=>{b(te),d(!0),h(null)},ce=async()=>{if(f)try{await C.deleteEvent(f.eventoID),c(a.filter(te=>te.eventoID!==f.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(te,_e)=>u.jsx(Jc,{id:te,message:String(_e),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{Ke(),ke()}},ie=async()=>{if(!(!F?.userEmail||!n)){ue(!0);try{const _e=(await _.getGoogleCalendars(F.userEmail,n)).map(Pe=>({...Pe,selected:!0}));Se(_e);const Ie=_e.map(Pe=>Pe.id);Ne(Ie)}catch(te){console.error("Error Google Cals:",te)}finally{ue(!1)}}},O=async te=>{const _e=Q.map(Pe=>Pe.id===te?{...Pe,selected:!Pe.selected}:Pe);Se(_e);const Ie=_e.filter(Pe=>Pe.selected).map(Pe=>Pe.id);Ne(Ie)},oe=async()=>{if(!(!Y?.userEmail||!n)){ue(!0);try{const _e=(await W.getOutlookCalendars(Y.userEmail,n)).map(Pe=>({...Pe,selected:!0}));he(_e);const Ie=_e.map(Pe=>Pe.id);R(Ie)}catch(te){console.error("Error Outlook Cals:",te)}finally{ue(!1)}}},Ee=async te=>{const _e=we.map(Pe=>Pe.id===te?{...Pe,selected:!Pe.selected}:Pe);he(_e);const Ie=_e.filter(Pe=>Pe.selected).map(Pe=>Pe.id);R(Ie)};v.useEffect(()=>{ie()},[F?.userEmail,n]),v.useEffect(()=>{oe()},[Y?.userEmail,n]);const Ne=async te=>{if(!F?.userEmail||!n)return;const _e=te||Q.filter(Ie=>Ie.selected).map(Ie=>Ie.id);try{const Ie={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F.userEmail,calendarIds:_e},Pe=await _.getGoogleEventsByMonth(Ie);H(Pe)}catch(Ie){console.error("Error al obtener eventos de Google:",Ie)}},R=async te=>{if(!Y?.userEmail||!n)return;const _e=te||we.filter(Ie=>Ie.selected).map(Ie=>Ie.id);try{const Ie={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Y.userEmail,calendarIds:_e},Pe=await W.getOutlookEventsByMonth(Ie);le(Pe)}catch(Ie){console.error("Error al obtener eventos de Outlook:",Ie)}};if(n===void 0||e===void 0)return u.jsx("div",{children:"Cargando configuración de usuario..."});const re=async(te,_e)=>{await C.UpdateStatusEvento(te.evento.eventoID,e,_e)&&(await C.MarcarLeido(te.notificacionID,e),E(te?.evento?.titulo+" fue agregado a tu calendario",{variant:"success"}))},xe=async()=>{me&&C.UpdateStatusEvento(me.evento.eventoID,e,"RECHAZADA")&&(await C.MarcarLeido(me.notificacionID,e),await C.MarcarLeido(me.notificacionID,e),E("Haz rechazado la Invitación a "+me?.evento?.titulo,{content:(_e,Ie)=>u.jsx(Jc,{id:_e,message:String(Ie),variant:"rechazar"})}),ke())},Ge=async(te,_e)=>{try{if(!e)return;ee(te),_e=="RECHAZADA"?(ht(),console.log("noti",te)):re(te,_e)}catch{E("Error al procesar la invitación",{variant:"error"})}},At=async te=>{try{if(!f)return;await C.ReenviarNotificacion(f?.eventoID,te),E("Invitación enviada con éxito",{variant:"success"})}catch(_e){console.error("Error al conectar con la API",_e)}},[q,fe]=v.useState(null),ke=()=>fe(null),Oe={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:me?.evento?.nombreAnfitrion})," a ",u.jsx("strong",{children:me?.evento?.titulo})]}),icon:u.jsx("img",{src:Uh}),action:()=>me&&xe()},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:Uh}),action:()=>ce()},DESVINCULAR:{title:"Desvincular Outlook",confirmText:"Desvincular",description:"Si desvinculas tu cuenta, perderás acceso a todos los eventos sincronizados.",icon:"",action:()=>ce}},je=q?Oe[q]:null;return u.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[u.jsx(cy,{header:u.jsx(k2,{currentDate:s,onPrevMonth:Be,onNextMonth:Ve,onAddEvent:k,onDateChange:P}),sidebar:u.jsx(aw,{onEventClick:Fe,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:k,googleCalendars:Q,outlookCalendars:we,isLoadingCalendars:ae,onToggleGoogle:O,onToggleOutlook:Ee,notifications:J,unreadCount:J?.filter(te=>!te.leida).length,onAceppInvitacion:Ge}),mainContent:u.jsx(_w,{onSeeMoreClick:Me,currentDate:s,events:de,onDayClick:B,onEventClick:Fe})}),l&&u.jsx(Uk,{isVisible:l,onClose:Ke,onSave:Ze,onDelete:et,selectedDate:p,initialEvent:f,userId:e,masNombreBD:o,disId:n,onReenviar:At}),u.jsx(Vk,{isOpen:D,onClose:()=>T(!1),events:M,date:U,onEventClick:Fe}),je&&u.jsx(aA,{open:!!q,onClose:ke,onConfirm:()=>{je.action()},title:je.title,description:je.description,icon:je.icon,confirmText:je.confirmText})]})},lA="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",uA="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 el(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function dA(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 tl(e,t,r=!0){return typeof e=="function"?e(t):e??r}function fA(e){return e.replace(/[^\d]/g,"")}function pA(e,t){return t}var is={},Hh;function hA(){if(Hh)return is;Hh=1;var e=ut();Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var t=e(gt()),r=pt();return is.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"),is}var mA=hA();const gA=lt(mA);var as={},Vh;function vA(){if(Vh)return as;Vh=1;var e=ut();Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var t=e(gt()),r=pt();return as.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"),as}var yA=vA();const bA=lt(yA);var cs={},Yh;function xA(){if(Yh)return cs;Yh=1;var e=ut();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(gt()),r=pt();return cs.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"),cs}var _A=xA();const wA=lt(_A);var ls={},qh;function SA(){if(qh)return ls;qh=1;var e=ut();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(gt()),r=pt();return ls.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"),ls}var CA=SA();const EA=lt(CA);function Zh(e){return e==="right"?"end":e==="center"?"center":"start"}function Gh(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 DA=1060,rl=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function kA({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=DA,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((g,p)=>g+c(p.width),0),h=Math.max(d.length-1,0)*16;return f+h+32}return u.jsx(m.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:u.jsxs(m.Box,{children:[u.jsx(m.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(m.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[h,y]=K.useState(!!d.initiallyOpen),g=f%2===1,p=o?o(d):t,b=Math.max(n,l(p));return u.jsxs(m.Box,{children:[u.jsxs(m.Box,{sx:{display:"grid",gridTemplateColumns:r.map(w=>typeof w=="number"?`${w}px`:w).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:g?"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:()=>y(w=>!w),children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[u.jsx(m.IconButton,{size:"small",disableRipple:!0,children:h?u.jsx(EA,{}):u.jsx(wA,{})}),u.jsx(m.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),u.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:rl(d,"En Proceso")}),u.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:rl(d,"Finalizadas")}),u.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:rl(d,"Último seg.")})]}),u.jsx(m.Collapse,{in:h,unmountOnExit:!0,children:u.jsxs(m.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[u.jsx(m.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:Gh(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(m.Typography,{sx:{justifySelf:Zh(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,S)=>u.jsx(m.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:Gh(p),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:S%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,C)=>{const _=E.accessor?E.accessor(w,S):E.field?w[E.field]:null;return u.jsx(m.Box,{sx:{justifySelf:Zh(E.align),textAlign:E.align??"left",minWidth:0,overflow:"hidden",maxWidth:"100%"},children:typeof _=="string"||typeof _=="number"?u.jsx(m.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??C)})},w.id??S))]})})]},d.id)})]})})}var us={},Kh;function AA(){if(Kh)return us;Kh=1;var e=ut();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(gt()),r=pt();return us.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"),us}var TA=AA();const IA=lt(TA),MA=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",PA=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},OA=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var ds={},Qh;function jA(){if(Qh)return ds;Qh=1;var e=ut();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(gt()),r=pt();return ds.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"),ds}var RA=jA();const NA=lt(RA),nl=({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 fs={},Xh;function $A(){if(Xh)return fs;Xh=1;var e=ut();Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t=e(gt()),r=pt();return fs.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),fs}var LA=$A();const Jh=lt(LA);var ps={},e0;function zA(){if(e0)return ps;e0=1;var e=ut();Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var t=e(gt()),r=pt();return ps.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"),ps}var BA=zA();const FA=lt(BA),WA=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"}},UA=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}},HA=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}},VA=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 YA(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 qA(e){return e.replace(/<br\s*\/?>/gi,`
178
178
  `).replace(/\r\n/g,`
179
179
  `).replace(/\r/g,`
180
- `)}const nA={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"]},oA={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"]},sA={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function iA(e,t){switch(e){case"pruebas":return J3(t)??"—";case"servicio":return eA(t)??"—";case"nuevos":case"seminuevos":default:return X3(t)??"—"}}function aA({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:y=[],solicitudesPrueba:g=[],solicitudesServicio:p=[],solicitudesSeminuevos:b=[],onCreateSolicitud:w,isCrmMode:S=!1,onSolicitudBaseUrl:E,onIframeClose:C,reloadInfo:_,idAdminSistemas:W}){if(!r)return null;const D=3,[T,M]=v.useState(null),I=!!T,[H,G]=v.useState(!1),[F,Y]=v.useState(null),[se,U]=v.useState(c??[]),[N,le]=v.useState(null),de=v.useMemo(()=>[...u].sort((L,X)=>new Date(X.FechaAsignacion).getTime()-new Date(L.FechaAsignacion).getTime()),[u]);v.useEffect(()=>{c&&c.length&&U(c)},[c]);const $=c?.length?c:se,Q=o?.title??(L=>L?.Nombre||L?.name||"Sin título"),we=o?.infoItems??[],_e=L=>L.nombreAsesor?.trim()||(L.Email?L.Email:"Sistema"),he=L=>{const X=L||"",ye=X.split(" ").filter(Boolean);return ye.length>=2?(ye[0][0]+ye[1][0]).toUpperCase():(X[0]||"?").toUpperCase()},ae=L=>L?.SolID??L?.solID??L?.SolId??L?.SOLID??null,ue=v.useMemo(()=>{const L=$??[];return Array.isArray(L?.[0])?L.flat():L},[$]),J=v.useMemo(()=>{const L=ue;return!N||F==null?L:L.filter(X=>{const ye=ae(X);return ye!=null&&String(ye)===String(F)})},[ue,N,F]),Se=v.useMemo(()=>[...J].sort((L,X)=>new Date(X.fecAlta).getTime()-new Date(L.fecAlta).getTime()),[J]),[me,ee]=v.useState(!1),Ie=v.useMemo(()=>me?Se:Se.slice(0,D),[me,Se]),j=Math.max(Se.length-D,0),Fe=L=>String(L??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),Ke=(L,X)=>Fe(JSON.stringify(L)).includes(Fe(X)),Ze=(L,X)=>f?f(L,X):Ke(L,X),Be=(L,X)=>{const ye=Fe(X).split(/\s+/).filter(Boolean);return ye.length?ye.every(Te=>Ze(L,Te)):!0},[Ve,et]=v.useState(""),[mt,k]=v.useState([]);v.useMemo(()=>i??[],[i]),v.useMemo(()=>{const L=Ve.trim();return L?(i??[]).filter(X=>Be(X,L)):i??[]},[i,Ve]);const P=m.useTheme(),B=m.useMediaQuery(P.breakpoints.down("md")),[ce,ie]=v.useState(""),[O,oe]=v.useState(!0),[Ce,Re]=v.useState(!1),R=new Date().toISOString().slice(0,10),te=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[xe,Ge]=v.useState(te),[At,q]=v.useState(R),[fe,De]=v.useState(null),Me=!!fe,[Ne,re]=v.useState("En Proceso"),[Ee,Oe]=v.useState("Todos"),[Pe,wr]=v.useState("Todos"),ar=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],Vt=["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"],Jr=()=>{ie(""),oe(!1),Re(!1),Ge(te),q(R),re("Todos"),Oe("Todos"),wr("Todos")},Ye=v.useMemo(()=>(ce??"").trim()!==""||Ne!=="Todos"||Ee!=="Todos"||O||Ce||Pe!=="Todos",[ce,Ne,Ee,O,Ce,Pe]);function Sr(L){if(!L)return"";const X=new Date(L);if(isNaN(X.getTime()))return"";const ye=String(X.getDate()).padStart(2,"0"),Te=String(X.getMonth()+1).padStart(2,"0"),Tt=String(X.getFullYear()).slice(-2);return`${ye}/${Te}/${Tt}`}function oa(L){const X=L?new Date(L):null;return X&&!isNaN(X.getTime())?X:null}function ll(L,X){let ye=null;for(const Te of L){const Tt=oa(X(Te));if(Tt){const Ct=Tt.getTime();(ye===null||Ct>ye)&&(ye=Ct)}}return ye?new Date(ye):null}function bs(L){const X=ll(L,ye=>ye.UltimoSeguimiento||ye.FechaCita);return X?Sr(X.toISOString()):"—"}function xs(L){const X=(L??"").toLowerCase().trim();return X==="sin venta"||X==="con venta"||X==="rechazada"||X==="rechazadas"}function sa(L){return L.filter(X=>xs(X.EstatusDescripcion)).length}function ia(L){return L.filter(X=>!xs(X.EstatusDescripcion)).length}const ul=({progress:L,color:X})=>{if(!L)return l.jsx(sl,{current:0,total:0,color:X});const ye=L.split("/").map(Number);if(ye.length!==2||ye.some(Ct=>Number.isNaN(Ct)))return l.jsx(sl,{current:0,total:0,color:X});const[Te,Tt]=ye;return l.jsx(sl,{current:Te,total:Tt,color:X})};function aa(L){return[{key:"fecha",header:"Fecha",accessor:X=>Sr(X.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:X=>l.jsx(m.Tooltip,{title:X.Vehiculo??"",placement:"top",arrow:!0,children:l.jsx(m.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(m.Typography,{sx:{fontWeight:800,fontSize:13},children:iA(L,X.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:X=>{const{bg:ye,color:Te}=Q3(X.NivelInteres);return l.jsx(m.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:ye,color:Te,fontSize:12,fontWeight:X.NivelInteres?800:500},children:X.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:X=>{const ye=(X.Asesor??"").trim(),Te=dl=>{if(!dl)return"";const MA=dl[0]?.toUpperCase()??"",PA=dl[1]?.toLowerCase()??"";return`${MA}${PA}`};if(!ye)return l.jsx(m.Tooltip,{title:"",placement:"top",children:l.jsx(m.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const Tt=ye.split(/\s+/),Ct=Tt[0]??"",Or=Tt[1]??"",Cr=Te(Ct),Tn=Te(Or),IA=`${Cr}${Tn}`||"—";return l.jsx(m.Tooltip,{title:ye,placement:"top",children:l.jsx(m.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:IA})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:X=>X.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:X=>l.jsx(m.Tooltip,{title:X.Actividad??"",placement:"top",arrow:!0,children:l.jsxs(m.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(m.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(ul,{progress:X.Avance,color:X.Color}),width:200,align:"left"}]}function A(L){const ye=aa(L).slice(1);return[{key:"fecha",header:"Fecha",accessor:Te=>Sr(Te.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Te=>Sr(Te.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Te=>Te.HoraCita??"—",width:110},...ye]}function ne(L){const X=L.kind;switch(X){case"pruebas":case"servicio":return A(X);case"nuevos":case"seminuevos":default:return aa(X)}}function ve(L,X,ye,Te){return{id:L,kind:ye,title:X,metrics:[{label:"En Proceso",value:ia(Te)},{label:"Finalizadas",value:sa(Te)},{label:"Último seg.",value:bs(Te)}],rows:Te,initiallyOpen:!1}}const je=[ve("n-1","Cotización de nuevos","nuevos",y),ve("p-1","Prueba de Manejo","pruebas",g),ve("s-1","Cita de Servicio","servicio",p),ve("sn-1","Cotización para Seminuevos","seminuevos",b)],Qe=v.useMemo(()=>{const L=(ce??"").trim().toLowerCase(),X=(ye,Te)=>{if(L&&!(ye.Vehiculo??"").toLowerCase().includes(L))return!1;const Tt=Ce?ye.FechaCita:ye.Fecha;if(O&&Tt){const Ct=oa(Tt??"");if(!Ct)return!1;const Or=xe?new Date(`${xe}T00:00:00`):null,Cr=At?new Date(`${At}T00:00:00`):null;if(Cr&&Cr.setDate(Cr.getDate()+1),Or&&Ct<Or||Cr&&Ct>=Cr)return!1}if(Ne!=="Todos"){const Ct=(ye.EstatusDescripcion??"").toLowerCase();if(!(nA[Ne]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}if(Ee!=="Todos"){const Ct=(ye.Actividad??"").toLowerCase();if(!(oA[Ee]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}if(Pe!=="Todos"){const Ct=(ye.NivelInteres??"").toLowerCase();if(!(sA[Pe]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}return!0};return je.map(ye=>{const Te=(ye.rows??[]).filter(Ct=>X(Ct,ye.kind)),Tt=[{label:"En Proceso",value:ia(Te)},{label:"Finalizadas",value:sa(Te)},{label:"Último seg.",value:bs(Te)}];return{...ye,rows:Te,metrics:Tt}})},[je,ce,O,xe,At,Ce,Ne,Ee,Pe]),dt={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},qe=(L,X)=>{const ye=L.SolID;if(!ye)return;const Te=X.kind,Tt=dt[Te]??"cotizaciones",Ct=h?`https://qa2.crm.netcar.com.mx/netcar/${Tt}/${ye}`:`https://crmxs.netcar.com.mx/netcar/${Tt}/${ye}`,Or=E?.({row:L,section:X,slug:Tt,solId:ye,baseUrl:Ct});if(!S){const Cr=Or??Ct;Y(ye),le(Cr),G(!0)}},We=()=>{C?.(r),Y(null),le(null),G(!1)},Yt=v.useRef(!1),gt=v.useRef(null),Ot=v.useCallback(()=>{if(!Yt.current){Yt.current=!0;return}gt.current&&window.clearTimeout(gt.current),gt.current=window.setTimeout(()=>{_?.(r)},500)},[_,r]);return v.useEffect(()=>{Yt.current=!1,gt.current&&window.clearTimeout(gt.current)},[N,F]),l.jsx(m.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(m.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[l.jsxs(m.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(m.Box,{children:[l.jsx(m.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:l.jsxs(m.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[l.jsx(m.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:l.jsx(m.Box,{sx:{flex:1,minWidth:0,pr:1},children:l.jsxs(m.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[Q(r)," ",l.jsx(m.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(Z3,{sx:{fontSize:"1em"}})})]})})}),we.map((L,X)=>l.jsxs(m.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(m.Typography,{variant:"body2",sx:{color:L.inLink?"#336BE1":"#070C10"},style:{},children:L.value(r)})]},X))]})}),l.jsx(m.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map((L,X)=>{const ye=L.label?.toLowerCase().startsWith("asesor");return l.jsxs(m.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsx(m.Box,{sx:{width:"50%"},children:l.jsx(m.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:L.label})}),l.jsxs(m.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[l.jsx("div",{children:L?.avatar?L.avatar(r):null}),l.jsx(m.Typography,{variant:"body2",color:"textPrimary",children:L?.value(r)}),ye&&!W&&l.jsx(m.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:l.jsx(m.IconButton,{size:"small",onClick:Te=>M(Te.currentTarget),sx:{ml:.5},disableRipple:!0,children:l.jsx(W3,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},X)})}),l.jsx(m.Divider,{sx:{my:2}})]}),l.jsx(m.Box,{px:2.5,pb:.5,children:l.jsxs(m.Typography,{children:[l.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!N&&" por solicitud",":"]})}),l.jsxs(m.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:[Ie.length===0&&l.jsx(m.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),l.jsxs(m.Box,{children:[Ie?.map((L,X)=>{const ye=_e(L),Te=rA(L.comentario||"");return l.jsxs(m.Box,{sx:{pb:1.5},children:[l.jsxs(m.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[l.jsx(m.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:L.tipo||"Evento"}),l.jsx(m.Chip,{size:"small",label:L.auto!=null?`${L.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Te?l.jsx(m.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Te}):null,l.jsxs(m.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[L?.ImgAsesor!=null?l.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:he(ye),src:L?.ImgAsesor}):l.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:he(ye)}),l.jsxs(m.Stack,{spacing:0,children:[l.jsx(m.Typography,{variant:"body2",fontWeight:600,children:ye}),l.jsx(m.Typography,{variant:"caption",color:"text.secondary",children:tA(L.fecAlta)})]})]}),X<Ie.length-1&&l.jsx(m.Divider,{sx:{mt:1.25}})]},L.segID??X)}),Se.length>D&&l.jsx(m.Box,{sx:{mt:1},children:l.jsx(m.Button,{onClick:()=>ee(L=>!L),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:me?"Ver menos":`Ver más (${j})`})})]})]}),l.jsx(m.Menu,{anchorEl:T,open:I,onClose:()=>M(null),TransitionComponent:m.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(m.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[l.jsx(m.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(m.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[de.length===0&&l.jsx(m.Box,{sx:{px:1.5,py:1},children:l.jsx(m.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),de.map((L,X)=>{const ye=U3(L),Te=H3(L.FechaBaja??L.FechaAsignacion);return l.jsx(m.Box,{sx:{px:1,py:.75},children:l.jsxs(m.Stack,{direction:"row",alignItems:"center",spacing:1,children:[l.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:L?.ImgAsesor??void 0,children:V3(ye)}),l.jsx(m.Box,{sx:{flex:1,minWidth:0},children:l.jsx(m.Typography,{variant:"body2",noWrap:!0,children:ye})}),l.jsx(m.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Te})]})},X)})]})]})})]}),H?l.jsxs(m.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[l.jsx(m.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:l.jsx(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:l.jsx(m.Button,{onClick:We,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:l.jsx(Ok,{fontSize:"medium"})})})}),N&&l.jsx("iframe",{src:N,width:"100%",height:"100%",onLoad:Ot,style:{border:0}})]}):l.jsxs(m.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[l.jsx(m.Box,{sx:{mt:{xs:1.5,md:3}},children:l.jsxs(m.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[l.jsx(m.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),l.jsxs(m.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[l.jsxs(m.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[l.jsx(m.TextField,{size:"small",placeholder:"Buscar por vehículo",value:ce,onChange:L=>ie(L.target.value),InputProps:{endAdornment:l.jsx(M3,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),l.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[l.jsxs(m.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[l.jsx(m.FormControlLabel,{label:l.jsx(m.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:l.jsx(m.Checkbox,{checked:O,onChange:L=>oe(L.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),l.jsx(m.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),l.jsxs(m.Stack,{direction:"row",spacing:1,children:[l.jsx(m.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:xe,onChange:L=>Ge(L.target.value),disabled:!O,sx:{width:170}}),l.jsx(m.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:At,onChange:L=>q(L.target.value),disabled:!O,sx:{width:170}})]})]}),l.jsx(m.IconButton,{onClick:L=>De(L.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:l.jsx(A3,{})}),Ye&&l.jsx(m.Button,{variant:"outlined",onClick:Jr,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),l.jsx(m.Tooltip,{title:Ye&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!Ye,children:l.jsx("span",{children:l.jsxs(m.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(o0,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!Ye&&"Crear Solicitud"]})})})]}),l.jsx(z3,{sections:Qe,detailColumns:[],getDetailColumns:ne,onRowClick:qe})]})]})}),l.jsx(m.Menu,{anchorEl:fe,open:Me,onClose:()=>De(null),TransitionComponent:m.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(m.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[l.jsx(m.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),l.jsxs(m.Box,{children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),l.jsx(m.RadioGroup,{value:Ne,onChange:L=>re(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(m.FormControlLabel,{value:L,control:l.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(m.Box,{children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),l.jsx(m.RadioGroup,{value:Ee,onChange:(L,X)=>Oe(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Vt].map(L=>l.jsx(m.FormControlLabel,{value:L,sx:{alignItems:"start"},control:l.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(m.Box,{children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),l.jsx(m.RadioGroup,{value:Pe,onChange:(L,X)=>wr(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...ar].map(L=>l.jsx(m.FormControlLabel,{value:L,control:l.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]})]})})]})]})})}const s0={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function i0(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??{},y=u.icons??{},g=u.className??"d-flex flex-row gap-2 align-items-center ",p=u.tooltip??{},b=y.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=nl(d.whatsapp,I,!0),G=nl(d.email,I,!0),F=nl(d.view,I,!0),Y=h.phone?.(I),se=h.email?.(I),U=de=>{if(de.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(I);if(!Y)return;const $=h.countryCode??"52",Q=C3(String(Y));typeof window<"u"&&window.open(`https://wa.me/${$}${Q}`,"_blank")},N=de=>{if(de.stopPropagation(),f.onEmail)return f.onEmail(I);se&&typeof window<"u"&&(window.location.href=`mailto:${se}`)},le=de=>{de.stopPropagation(),f.onView&&f.onView(I)};return l.jsxs("div",{className:g,children:[H&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:U,style:{width:24,height:24},children:l.jsx("img",{src:_3,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:w3,alt:"Email"})}),F&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:le,style:{width:24,height:24},children:b})]})}),width:120}},S=Object.values(w).filter(I=>!!I),E=(e??[]).filter(I=>!!I?.key),C=new Map;for(const I of S)C.set(String(I.key),I);for(const I of E)C.set(String(I.key),I);const _=[...S.map(I=>String(I.key)),...E.map(I=>String(I.key))],W=Array.from(new Set(o.map(I=>String(I)).filter(I=>C.has(I)))),D=_.filter(I=>!W.includes(I)),T=[...W,...D],M="acciones";if(C.has(M)){const I=T.filter(H=>H!==M);T.splice(0,T.length,...I,M)}return T.map(I=>C.get(I))}function cA(e){const{rows:t,columns:r,clientSort:n=!0,urlsQA:o=!0,defaultSort:s,minWidth:i=1100,rowKey:a=E3,haveOpenDetailFor:c=!0,defaults:u,detailConfig:d,normalTable:f,onRowClick:h,activityHistory:y,advisorHistory:g,forceOpenDetailFor:p,closeDetailFor:b,onRequestEdit:w,searchFilter:S,solicitudesNuevos:E,solicitudesPrueba:C,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:T,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:H,idAdminSistemas:G=!1}=e,[F,Y]=v.useState(s??null),[se,U]=v.useState({open:!1,customer:null}),[N,le]=v.useState([]),de=ae=>{U({open:!0,customer:ae})},$=ae=>{c&&(h?.(ae),U({open:!0,customer:ae}))},Q=()=>{U({open:!1,customer:null}),b?.()},we=v.useMemo(()=>u?i0(r??[],u):i0(r??[],{fields:{},order:[]}),[r,u]),_e=v.useMemo(()=>{if(!n||!F)return t;const ae=we.find(J=>J.key===F.key);if(!ae)return t;const ue=[...t];return ue.sort((J,Se)=>{const me=rl(ae,J,0),ee=rl(ae,Se,0),Ie=S3(me,ee);return F.direction==="asc"?Ie:-Ie}),ue},[t,we,F,n]),he=v.useMemo(()=>{const ae=d?.getCustomerId;return ue=>{const J=ae?.(ue)??ue?.Id_cliente??ue?.CliID??ue?.id??ue?.ID??ue?.Id??"";return String(J)}},[d]);return v.useEffect(()=>{if(!se.open||!se.customer)return;const ae=he(se.customer);if(!ae)return;const ue=(t??[]).find(J=>he(J)===ae);ue&&ue!==se.customer&&U(J=>({...J,customer:ue}))},[t,se.open,se.customer,he]),v.useEffect(()=>{p&&de(p)},[p]),l.jsxs("div",{children:[l.jsx("div",{className:`${s0.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:l.jsx("div",{className:`${s0.tableResponsive} table-responsive`,children:l.jsxs("table",{className:"table table-hover align-middle mb-0",children:[l.jsx("thead",{children:l.jsx("tr",{children:we.map(ae=>l.jsx("th",{style:{fontWeight:600,width:ae.width,paddingTop:"20px",paddingBottom:"20px",textAlign:ae.align??"left"},children:ae.header},ae.key))})}),l.jsx("tbody",{children:_e.map((ae,ue)=>l.jsx("tr",{onClick:()=>$?.(ae),role:"button",tabIndex:0,onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&$?.(ae)},style:{cursor:"pointer"},children:we.map((J,Se)=>{const me=J.Component?l.jsx(J.Component,{row:ae,index:ue}):J.cell?J.cell(ae,ue):(()=>{const ee=rl(J,ae,ue);return ee==null||ee===""?"":String(ee)})();return l.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:J.align??"left"},children:me},`${String(J.key)}-${Se}`)})},a(ae,ue)))})]})})}),se.open&&l.jsx(aA,{open:se.open,onClose:Q,customer:se.customer,fields:d?.dynamicFields,header:d?.header,normalTable:f,history:y,advisorHistory:g,urlsQA:o,onRequestEdit:ae=>{Q(),w?.(ae)},searchFilter:S,solicitudesNuevos:E,solicitudesPrueba:C,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:T,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:H,idAdminSistemas:G})]})}const a0=K.forwardRef(({sx:e,...t},r)=>l.jsx(m.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}}));a0.displayName="SoftInput";function lA({message:e}){return e?l.jsxs(m.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(el,{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 uA(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function il(e,t){const r=uA(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 c0={"& .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%"},dA={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function al({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return l.jsxs(m.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[l.jsx(m.FormLabel,{sx:dA,children:e}),n,l.jsx(lA,{message:t||r})]})}function fA(e,t){const{register:r,formState:{errors:n}}=t,o={...il(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=C=>e.onlyNumbers?(C.match(a)??[]).join(""):e.onlyLetters?(C.match(i)??[]).join(""):C,d=(C,_)=>c.has(C)||_?!0:e.onlyNumbers?/^[0-9]$/.test(C):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(C):!0,f=n[e.name]?.message,h=r(e.name,o),y=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,g=C=>{d(C.key,C.ctrlKey||C.metaKey)||C.preventDefault()},p=C=>{const _=C.data??null;_!=null&&(e.onlyNumbers&&/[^0-9]/.test(_)&&C.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(_)&&C.preventDefault())},b=C=>{const _=C.clipboardData.getData("text"),W=u(_);if(W!==_){C.preventDefault();const D=C.target,T=D.selectionStart??D.value.length,M=D.selectionEnd??D.value.length;D.setRangeText(W,T,M,"end"),D.dispatchEvent(new Event("input",{bubbles:!0}))}},w=C=>{const _=u(C.target.value);_!==C.target.value&&(C.target.value=_),y&&C.target.value.length>y&&(C.target.value=C.target.value.slice(0,y)),h.onChange(C)},S={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:y,onKeyDown:g,onBeforeInput:p,onPaste:b,onInvalid:C=>C.preventDefault()},E=e.onlyNumbers||s?"text":e.type??"text";return l.jsx(al,{label:e.label,errorMsg:f,helperText:e.helperText,sx:c0,children:l.jsx(a0,{placeholder:e.placeholder,type:E,inputProps:S,...h,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function pA(e,t){const{control:r}=t,n=!!e.multiple;return l.jsx(hr,{name:e.name,control:r,rules:il(e,{isArray:n}),render:({field:o,fieldState:s})=>l.jsx(al,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:c0,children:l.jsxs(m.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(m.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>l.jsx(m.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function hA(e,t){return l.jsx(hr,{name:e.name,control:t.control,rules:il(e),render:({field:r,fieldState:n})=>l.jsx(al,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:l.jsx(m.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>l.jsx(m.FormControlLabel,{value:o.value,control:l.jsx(m.Radio,{}),label:o.label},String(o.value)))})})})}function l0(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return fA(e,t);case"select":return pA(e,t);case"radio":return hA(e,t);default:return null}}function mA(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]=v.useState(1),[d,f]=v.useState(t),{currentItems:h,totalPages:y,showingFrom:g,showingTo:p,totalItems:b}=v.useMemo(()=>{const E=a.length,C=d==="Todos"?1/0:Number(d),_=C===1/0?1:Math.max(1,Math.ceil(E/C)),W=Math.min(c,_),D=C===1/0?E:W*C,T=C===1/0?0:D-C;return{currentItems:C===1/0?a:a.slice(T,D),totalPages:_,showingFrom:E===0?0:T+1,showingTo:C===1/0?E:Math.min(D,E),totalItems:E}},[a,c,d]),w=E=>{const C=Math.max(1,Math.min(E,y||1));u(C),n?.(C),s?.()};return{currentItems:h,totalPages:y,showingFrom:g,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 gs={},u0;function gA(){if(u0)return gs;u0=1;var e=rt();Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=void 0;var t=e(ht()),r=lt();return gs.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"),gs}var vA=gA();const yA=tt(vA);var vs={},d0;function bA(){if(d0)return vs;d0=1;var e=rt();Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=void 0;var t=e(ht()),r=lt();return vs.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"),vs}var xA=bA();const _A=tt(xA),wA=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const u=m.useTheme(),d=m.useMediaQuery(u.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const g=d?0:2,p=[],b=1,w=t,S=Math.max(b+1,e-g),E=Math.min(w-1,e+g);p.push(b),S>b+1&&p.push("...");for(let C=S;C<=E;C++)C>=b+1&&C<=w-1&&p.push(C);return E<w-1&&p.push("..."),p.push(w),p},h=g=>{const p=g.target.value;o(p)},y=Math.max(1,t);return l.jsxs(m.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(m.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[l.jsx(m.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:l.jsx(yA,{fontSize:"large"})}),f().map((g,p)=>g==="..."?l.jsx(m.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${p}`):l.jsx(m.Button,{onClick:()=>r(g),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===g?"primary.main":"transparent",fontWeight:e===g?700:400,color:e===g?"#fff":"#5C6372","&:hover":{backgroundColor:e===g?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:g},`p-${g}`)),l.jsx(m.IconButton,{onClick:()=>r(e+1),disabled:e>=y,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:l.jsx(_A,{fontSize:"large"})})]}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[l.jsx(m.Typography,{variant:"body2",children:"Mostrar"}),l.jsx(m.FormControl,{size:"small",sx:{minWidth:72},children:l.jsx(m.Select,{value:n,onChange:h,renderValue:g=>g==="Todos"?"Todos":String(g),children:s.map(g=>l.jsx(m.MenuItem,{value:g,children:g==="Todos"?"Todos":g},String(g)))})}),l.jsx(m.Typography,{variant:"body2",children:"por página"})]})]})};function SA(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:y,onSelectedChange:g,onSubmitAddData:p,initialSelectedIds:b=[],showAutosPanel:w}=e,S=Ip({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});v.useEffect(()=>{i&&S.reset(i)},[i,S]);const[E,C]=v.useState(""),[_,W]=v.useState(b),D=Array.isArray(y)&&!!g,T=D?y:_,M=O=>{const oe=typeof O=="function"?O(T):O;D?g(oe):W(oe)},I=v.useCallback(O=>f?f(O):O?.IdAuto,[f]),H=v.useMemo(()=>{const O=new Map;return(u??[]).forEach((oe,Ce)=>O.set(I(oe),Ce)),O},[u,I]),G=v.useRef(new Set),F=v.useMemo(()=>{const O=new Map;return(u??[]).forEach(oe=>O.set(f?f(oe):oe?.IdAuto,oe)),O},[u,f]),Y=v.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),se=fp({control:S.control,name:Y}),U=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=v.useMemo(()=>Y.length?se?.every(U)??!1:!0,[se,Y]),{handleSubmit:le,formState:{isSubmitting:de,isDirty:$,isValid:Q}}=S,we=d??((O,oe)=>JSON.stringify(O).toLowerCase().includes(oe.toLowerCase())),_e=v.useMemo(()=>E.trim()?u?.filter(O=>we(O,E)):u,[u,E,we]),he=v.useMemo(()=>{if(!_e)return _e;const O=G.current,oe=[..._e];return oe.sort((Ce,Re)=>{const R=O.has(I(Ce))?0:1,te=O.has(I(Re))?0:1;if(R!==te)return R-te;const xe=H.get(I(Ce))??0,Ge=H.get(I(Re))??0;return xe-Ge}),oe},[_e,H,I]),{currentItems:ae,totalPages:ue,showingFrom:J,showingTo:Se,totalItems:me,currentPage:ee,itemsPerPage:Ie,perPageOptions:j,goTo:Fe,setItemsPerPage:Ke}=mA(he,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[E],scrollTop:()=>{}}),Ze=O=>{const oe=F.get(O)??null;M([O]),p?.({items:oe})},Be=O=>T.includes(O),Ve=async O=>{try{await o?.(O),S.reset(S.getValues())}catch(oe){console.error("Error al enviar AddCliente:",oe)}},et=v.useMemo(()=>{const O=new Map;return(n??[]).forEach(oe=>O.set(String(oe.name),oe)),O},[n]),mt=(O,oe)=>{const Ce=et.get(String(O));if(!Ce)return null;const Re={xs:12,...Ce.grid,...oe||{}};return l.jsx(m.Grid,{item:!0,...Re,children:Ce.render?Ce.render(S):l0(Ce,S)},`fld-${String(O)}`)},k=w??(e.haveId?"edit":"new"),P=k!=="onlyCars",B=k==="new"||k==="onlyCars",ce=T?.length>0,ie=k==="onlyCars"?ce:e.haveId?N&&$||ce:N&&ce;return l.jsx(m.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(Tw,{...S,children:l.jsxs(m.Box,{component:"form",noValidate:!0,onSubmit:le(Ve),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[P&&l.jsxs(m.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(m.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[l.jsx(m.Typography,{fontWeight:700,fontSize:20,children:r.title}),l.jsxs(m.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[l.jsx(m.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),l.jsx(m.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,oe)=>l.jsx(m.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((Ce,Re)=>{const R=typeof Ce=="string"?{name:Ce}:Ce;return R.hidden?.(S)?null:mt(R.name,R.grid)})},`row-${oe}`)):l.jsx(m.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,oe)=>{const Ce=O.grid??{xs:12,md:12};return l.jsx(m.Grid,{item:!0,...Ce,children:O.render?O.render(S):l0(O,S)},`${String(O.name)}-${oe}`)})})})]})]}),l.jsx(m.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(m.Box,{display:"flex",alignItems:"center",children:l.jsx(m.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:l.jsx(m.Button,{type:"submit",variant:"contained",disabled:de||!ie,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(m.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:l.jsx(m.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:l.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[l.jsxs(m.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(m.TextField,{value:E,onChange:O=>C(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:l.jsx(m.InputAdornment,{position:"start",children:l.jsx(z2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),l.jsx(m.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:l.jsx(m.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:l.jsx(Ur,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&l.jsx(m.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:l.jsx(m.Box,{display:"flex",gap:1.5,width:"100%",children:l.jsxs(m.Button,{type:"submit",variant:"contained",disabled:de||!ie,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[l.jsx(o0,{sx:{color:de||!ie?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),l.jsx(m.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(m.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:l.jsxs(m.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ae?.map((O,oe)=>{const Ce=f?f(O):oe,Re=Be(Ce);return l.jsx(m.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:l.jsx(m.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:l.jsx(m.ListItemButton,{onClick:()=>Ze(Ce),disableRipple:!0,sx:{padding:0},children:l.jsx(m.ListItemText,{disableTypography:!0,primary:h?h({item:O,selected:Re,toggle:()=>Ze(Ce),index:oe}):null})})})},`${String(Ce)}`)}),!ae?.length&&l.jsx(m.Box,{p:3,children:l.jsxs(m.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",E,"”."]})})]})})}),l.jsx(m.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:l.jsx(wA,{currentPage:ee,totalPages:ue,onPageChange:Fe,itemsPerPage:Ie,onItemsPerPageChange:Ke,itemsPerPageOptions:j,showingFrom:J,showingTo:Se,totalItems:me})})]})})})]})})})}var ys={},f0;function CA(){if(f0)return ys;f0=1;var e=rt();Object.defineProperty(ys,"__esModule",{value:!0}),ys.default=void 0;var t=e(ht()),r=lt();return ys.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"),ys}var EA=CA();const DA=tt(EA),cl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,na=/[,\s;]+/g,un=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),dn=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),p0=(e,t)=>t?e.filter(r=>un(r)!==un(t)):e,kA=(e,t)=>e.filter(r=>!t.some(n=>un(n)===un(r)));function Pr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function AA(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function TA({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:y}){const g=v.useRef(null),[p,b]=v.useState("idle"),w=v.useRef(e);v.useEffect(()=>{const R=w.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),w.current=e},[e]),v.useEffect(()=>{if(p==="entering"){const xe=setTimeout(()=>b("idle"),320);return()=>clearTimeout(xe)}if(p==="exiting"){const xe=setTimeout(()=>b("idle"),220);return()=>clearTimeout(xe)}},[p]);const[S,E]=v.useState(""),[C,_]=v.useState(!1),[W,D]=v.useState(!1),[T,M]=v.useState(!1),[I,H]=v.useState(""),[G,F]=v.useState([]),Y=T?G:r.selectedIds,se=()=>{F([...r.selectedIds]),H(""),M(!0)},U=()=>{M(!1),F([])},N=()=>{const R=new Set(et.map((xe,Ge)=>String(Pr(xe,Ge,h.id)))),te=G.filter(xe=>R.has(String(xe)));n({...r,selectedIds:te}),M(!1)},le=(R,te)=>un(R??"")===un(te??"");function de(R,te,xe,Ge,At){const q=te?R.some(De=>le(De,te)):!1,fe=xe.length>0?xe.some(De=>R.some(Me=>le(Me,De))):!1;Ge(q),At(fe)}const $=R=>{const te=typeof R=="function"?R(r.recipients):R;n({...r,recipients:te}),de(te,ae,J,_,D)},Q=R=>n({...r,message:R}),we=R=>n({...r,attachments:[...r.attachments,...R]}),_e=R=>n({...r,attachments:r.attachments.filter(te=>te.name!==R)}),he=R=>{if(T)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]})}},ae=v.useMemo(()=>(s?.Correo??"").trim(),[s]),ue=v.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),J=v.useMemo(()=>ue.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ue]),Se=v.useRef(!1);v.useEffect(()=>{if(e&&!Se.current){let R=[];C&&ae&&(R=dn(R,[ae])),W&&J.length&&(R=dn(R,J)),$(te=>dn(te,R)),de(r.recipients,ae,J,_,D),E(""),Se.current=!0}e||(Se.current=!1)},[e,C,W,ae,J]);const me=R=>{const te=ue.find(xe=>un(xe.EmailAsesor??"")===un(R));if(te){if(te.ImgAsesor)return l.jsx(m.Avatar,{src:te.ImgAsesor,alt:te.NombreAsesor});const xe=(te.NombreAsesor||"").trim(),Ge=(te.ApellidosAsesor||"").trim();return l.jsx(m.Avatar,{children:`${xe[0]??""}${Ge[0]??""}`.toUpperCase()})}return l.jsx(m.Avatar,{children:R[0]?.toUpperCase()})},ee=()=>{const R=S.trim();if(!R)return;const xe=R.split(na).filter(Boolean).filter(Ge=>cl.test(Ge));xe.length>0&&$(Ge=>dn(Ge,xe)),E("")},Ie=R=>{_(R),$(te=>R&&ae?dn(te,[ae]):p0(te,ae))},j=R=>{D(R),$(te=>R?dn(te,J):kA(te,J))},Fe=R=>{const te=Array.from(R.target.files||[]);we(te.map(xe=>({name:xe.name,size:xe.size,file:xe}))),R.target.value=""},Ke=Y[0],Ze=v.useMemo(()=>!i||Ke===void 0?void 0:i.find((te,xe)=>String(Pr(te,xe,h.id))===String(Ke)),[i,Ke,h.id]),Be=v.useMemo(()=>{if(!(!Ze||!h.distributorId))return Pr(Ze,0,h.distributorId)},[Ze,h.distributorId]);console.log("lockedDisId",Be);const Ve=v.useMemo(()=>Ze?(h.distributorTitle?Pr(Ze,0,h.distributorTitle):void 0)??(Be!=null?String(Be):void 0):void 0,[Ze,h.distributorTitle,Be]),et=v.useMemo(()=>{const R=i??[];return Be==null||!h.distributorId?R:R.filter((te,xe)=>Pr(te,xe,h.distributorId)==Be)},[i,Be,h.distributorId]),mt=v.useMemo(()=>{if(!I.trim())return et;const R=I.toLowerCase();return et.filter(te=>(c??[]).some(xe=>String(te?.[xe]??"").toLowerCase().includes(R)))},[et,I,c]),k=v.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((te,xe)=>{R.set(String(Pr(te,xe,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(S.trim()){const q=S.split(na).filter(fe=>cl.test(fe));R=dn(R,q),$(R),E("")}const te=C?ae:"",xe=ue.find(q=>q?.Activo&&q?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:C,toAdvisor:W,tipoInt:C&&W?2:1,correoCliente:te,correoAsesor:W?xe:"",disIdLocked:Be}),t?.()},ce=v.useMemo(()=>{const te=S.split(na).filter(Boolean).some(xe=>cl.test(xe));return r.recipients.length>0||te},[r.recipients,S]),ie=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,oe=ce&&ie&&O,Ce=m.useTheme(),Re=m.useMediaQuery(Ce.breakpoints.down("sm"));return l.jsxs(m.Drawer,{anchor:Re?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!Re}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:Re?"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(m.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[l.jsxs(m.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[l.jsxs(m.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(m.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),l.jsx(m.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{})})]}),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(m.Chip,{avatar:me(R),label:R,onDelete:()=>$(te=>p0(te,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),l.jsx("input",{type:"text",value:S,onChange:R=>E(R.target.value),onKeyDown:R=>{const te=R.key;te==="Enter"||te===","||te===";"||te===" "||te==="Tab"?(R.preventDefault(),ee()):te==="Backspace"&&!S&&r.recipients.length&&$(Ge=>Ge.slice(0,-1))},onBlur:ee,onPaste:R=>{const xe=R.clipboardData.getData("text").split(na).filter(Boolean);xe.length>1&&(R.preventDefault(),$(Ge=>dn(Ge,xe)),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(m.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[l.jsx(m.FormControlLabel,{control:l.jsx(m.Checkbox,{checked:C,onChange:R=>Ie(R.target.checked),size:"small"}),label:"Cliente"}),ue.length!==0&&l.jsx(m.FormControlLabel,{control:l.jsx(m.Checkbox,{checked:W,onChange:R=>j(R.target.checked),size:"small"}),label:`Asesor${ue.length>1?"es":""}`})]})]}),l.jsx(m.Divider,{}),l.jsxs(m.Box,{p:2,children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:se,children:[l.jsx(m.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Ve!=null&&l.jsx(m.Chip,{size:"small",label:`Distribuidora: ${Ve}`})]}),k.length>0?l.jsx(m.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:k.map((R,te)=>{const xe=Pr(R,te,h.id),Ge=Pr(R,te,h.title)??"",At=Pr(R,te,h.image),q=AA(f,At);return l.jsx(m.Chip,{onDelete:()=>P(xe),label:l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(m.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:q?l.jsx("img",{src:q,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("img",{src:y,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(xe))})}):l.jsx(m.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),l.jsx(m.Divider,{}),l.jsxs(m.Box,{sx:{p:2},children:[l.jsx(m.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(m.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>l.jsxs(m.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[l.jsx(m.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(m.Tooltip,{title:"Quitar",children:l.jsx(m.IconButton,{edge:"end",onClick:()=>_e(R.name),size:"small",children:l.jsx(Ur,{fontSize:"small"})})})]},R.name))})]}),l.jsxs(m.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:g,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:Fe}),l.jsx(m.Button,{startIcon:l.jsx(DA,{}),variant:"text",onClick:()=>g.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),l.jsx(m.Box,{sx:{flex:1}}),l.jsx(m.Button,{variant:"contained",onClick:B,disabled:!oe,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),l.jsxs(m.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:Re,open:T,onClose:U,children:[l.jsxs(m.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",l.jsx(m.IconButton,{onClick:U,size:"small",children:l.jsx(Ur,{})})]}),l.jsxs(m.DialogContent,{children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(m.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:I,onChange:R=>H(R.target.value),sx:{mb:2}}),Ve!=null&&l.jsx(m.Chip,{size:"small",label:`Distribuidora: ${Ve}`})]}),l.jsxs(m.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",mt.length,")"]}),l.jsxs(m.List,{sx:{p:0},children:[mt.map((R,te)=>{const xe=Pr(R,te,h.id),Ge=Y.includes(String(xe))||Y.includes(xe),At=Be==null||Pr(R,te,h.distributorId)==Be;return l.jsx(m.ListItem,{disableGutters:!0,sx:{p:0,opacity:At?1:.5},children:l.jsx(m.Box,{onClick:()=>At&&he(xe),sx:{cursor:At?"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(xe))}),mt.length===0&&l.jsx(m.Box,{p:2,children:l.jsx(m.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),l.jsxs(m.DialogActions,{sx:{px:3,pb:2},children:[l.jsx(m.Button,{variant:"text",onClick:U,sx:{color:"#5C6372"},children:"Cancelar"}),l.jsx(m.Button,{variant:"contained",onClick:N,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}jt.AddCliente=SA,jt.ApiProvider=$x,jt.AuthProvider=f1,jt.Clientes=cA,jt.CustomSnackbar=tl,jt.EventsProvider=f3,jt.ModalCorreo=TA,jt.MyCalendar=x3,jt.useAuth=lc,jt.useAuthRepository=Mi,jt.useEventRepository=Tc,Object.defineProperty(jt,Symbol.toStringTag,{value:"Module"})}));
180
+ `)}const ZA={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"]},GA={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"]},KA={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function QA(e,t){switch(e){case"pruebas":return HA(t)??"—";case"servicio":return VA(t)??"—";case"nuevos":case"seminuevos":default:return UA(t)??"—"}}function XA({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:y=[],solicitudesPrueba:g=[],solicitudesServicio:p=[],solicitudesSeminuevos:b=[],onCreateSolicitud:w,isCrmMode:S=!1,onSolicitudBaseUrl:E,onIframeClose:C,reloadInfo:_,idAdminSistemas:W}){if(!r)return null;const D=3,[T,M]=v.useState(null),I=!!T,[U,G]=v.useState(!1),[F,Y]=v.useState(null),[se,H]=v.useState(c??[]),[N,le]=v.useState(null),de=v.useMemo(()=>[...l].sort((L,X)=>new Date(X.FechaAsignacion).getTime()-new Date(L.FechaAsignacion).getTime()),[l]);v.useEffect(()=>{c&&c.length&&H(c)},[c]);const $=c?.length?c:se,Q=o?.title??(L=>L?.Nombre||L?.name||"Sin título"),Se=o?.infoItems??[],we=L=>L.nombreAsesor?.trim()||(L.Email?L.Email:"Sistema"),he=L=>{const X=L||"",ye=X.split(" ").filter(Boolean);return ye.length>=2?(ye[0][0]+ye[1][0]).toUpperCase():(X[0]||"?").toUpperCase()},ae=L=>L?.SolID??L?.solID??L?.SolId??L?.SOLID??null,ue=v.useMemo(()=>{const L=$??[];return Array.isArray(L?.[0])?L.flat():L},[$]),J=v.useMemo(()=>{const L=ue;return!N||F==null?L:L.filter(X=>{const ye=ae(X);return ye!=null&&String(ye)===String(F)})},[ue,N,F]),Ce=v.useMemo(()=>[...J].sort((L,X)=>new Date(X.fecAlta).getTime()-new Date(L.fecAlta).getTime()),[J]),[me,ee]=v.useState(!1),Me=v.useMemo(()=>me?Ce:Ce.slice(0,D),[me,Ce]),j=Math.max(Ce.length-D,0),Fe=L=>String(L??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),Ke=(L,X)=>Fe(JSON.stringify(L)).includes(Fe(X)),Ze=(L,X)=>f?f(L,X):Ke(L,X),Be=(L,X)=>{const ye=Fe(X).split(/\s+/).filter(Boolean);return ye.length?ye.every(Te=>Ze(L,Te)):!0},[Ve,et]=v.useState(""),[ht,k]=v.useState([]);v.useMemo(()=>i??[],[i]),v.useMemo(()=>{const L=Ve.trim();return L?(i??[]).filter(X=>Be(X,L)):i??[]},[i,Ve]);const P=m.useTheme(),B=m.useMediaQuery(P.breakpoints.down("md")),[ce,ie]=v.useState(""),[O,oe]=v.useState(!0),[Ee,Ne]=v.useState(!1),R=new Date().toISOString().slice(0,10),re=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[xe,Ge]=v.useState(re),[At,q]=v.useState(R),[fe,ke]=v.useState(null),Oe=!!fe,[je,te]=v.useState("En Proceso"),[_e,Ie]=v.useState("Todos"),[Pe,wr]=v.useState("Todos"),ar=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],Vt=["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"],Jr=()=>{ie(""),oe(!1),Ne(!1),Ge(re),q(R),te("Todos"),Ie("Todos"),wr("Todos")},Ye=v.useMemo(()=>(ce??"").trim()!==""||je!=="Todos"||_e!=="Todos"||O||Ee||Pe!=="Todos",[ce,je,_e,O,Ee,Pe]);function Sr(L){if(!L)return"";const X=new Date(L);if(isNaN(X.getTime()))return"";const ye=String(X.getDate()).padStart(2,"0"),Te=String(X.getMonth()+1).padStart(2,"0"),Tt=String(X.getFullYear()).slice(-2);return`${ye}/${Te}/${Tt}`}function ra(L){const X=L?new Date(L):null;return X&&!isNaN(X.getTime())?X:null}function al(L,X){let ye=null;for(const Te of L){const Tt=ra(X(Te));if(Tt){const Ct=Tt.getTime();(ye===null||Ct>ye)&&(ye=Ct)}}return ye?new Date(ye):null}function vs(L){const X=al(L,ye=>ye.UltimoSeguimiento||ye.FechaCita);return X?Sr(X.toISOString()):"—"}function ys(L){const X=(L??"").toLowerCase().trim();return X==="sin venta"||X==="con venta"||X==="rechazada"||X==="rechazadas"}function na(L){return L.filter(X=>ys(X.EstatusDescripcion)).length}function oa(L){return L.filter(X=>!ys(X.EstatusDescripcion)).length}const cl=({progress:L,color:X})=>{if(!L)return u.jsx(nl,{current:0,total:0,color:X});const ye=L.split("/").map(Number);if(ye.length!==2||ye.some(Ct=>Number.isNaN(Ct)))return u.jsx(nl,{current:0,total:0,color:X});const[Te,Tt]=ye;return u.jsx(nl,{current:Te,total:Tt,color:X})};function sa(L){return[{key:"fecha",header:"Fecha",accessor:X=>Sr(X.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:X=>u.jsx(m.Tooltip,{title:X.Vehiculo??"",placement:"top",arrow:!0,children:u.jsx(m.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=>u.jsx(m.Typography,{sx:{fontWeight:800,fontSize:13},children:QA(L,X.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:X=>{const{bg:ye,color:Te}=WA(X.NivelInteres);return u.jsx(m.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:ye,color:Te,fontSize:12,fontWeight:X.NivelInteres?800:500},children:X.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:X=>{const ye=(X.Asesor??"").trim(),Te=ll=>{if(!ll)return"";const w3=ll[0]?.toUpperCase()??"",S3=ll[1]?.toLowerCase()??"";return`${w3}${S3}`};if(!ye)return u.jsx(m.Tooltip,{title:"",placement:"top",children:u.jsx(m.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const Tt=ye.split(/\s+/),Ct=Tt[0]??"",Or=Tt[1]??"",Cr=Te(Ct),Tn=Te(Or),_3=`${Cr}${Tn}`||"—";return u.jsx(m.Tooltip,{title:ye,placement:"top",children:u.jsx(m.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:_3})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:X=>X.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:X=>u.jsx(m.Tooltip,{title:X.Actividad??"",placement:"top",arrow:!0,children:u.jsxs(m.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[X.Icon&&u.jsx("span",{style:{color:"#fff",backgroundColor:X.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:u.jsx("i",{className:X.Icon})}),u.jsx(m.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=>u.jsx(cl,{progress:X.Avance,color:X.Color}),width:200,align:"left"}]}function A(L){const ye=sa(L).slice(1);return[{key:"fecha",header:"Fecha",accessor:Te=>Sr(Te.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Te=>Sr(Te.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Te=>Te.HoraCita??"—",width:110},...ye]}function ne(L){const X=L.kind;switch(X){case"pruebas":case"servicio":return A(X);case"nuevos":case"seminuevos":default:return sa(X)}}function ve(L,X,ye,Te){return{id:L,kind:ye,title:X,metrics:[{label:"En Proceso",value:oa(Te)},{label:"Finalizadas",value:na(Te)},{label:"Último seg.",value:vs(Te)}],rows:Te,initiallyOpen:!1}}const Re=[ve("n-1","Cotización de nuevos","nuevos",y),ve("p-1","Prueba de Manejo","pruebas",g),ve("s-1","Cita de Servicio","servicio",p),ve("sn-1","Cotización para Seminuevos","seminuevos",b)],Qe=v.useMemo(()=>{const L=(ce??"").trim().toLowerCase(),X=(ye,Te)=>{if(L&&!(ye.Vehiculo??"").toLowerCase().includes(L))return!1;const Tt=Ee?ye.FechaCita:ye.Fecha;if(O&&Tt){const Ct=ra(Tt??"");if(!Ct)return!1;const Or=xe?new Date(`${xe}T00:00:00`):null,Cr=At?new Date(`${At}T00:00:00`):null;if(Cr&&Cr.setDate(Cr.getDate()+1),Or&&Ct<Or||Cr&&Ct>=Cr)return!1}if(je!=="Todos"){const Ct=(ye.EstatusDescripcion??"").toLowerCase();if(!(ZA[je]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}if(_e!=="Todos"){const Ct=(ye.Actividad??"").toLowerCase();if(!(GA[_e]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}if(Pe!=="Todos"){const Ct=(ye.NivelInteres??"").toLowerCase();if(!(KA[Pe]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}return!0};return Re.map(ye=>{const Te=(ye.rows??[]).filter(Ct=>X(Ct,ye.kind)),Tt=[{label:"En Proceso",value:oa(Te)},{label:"Finalizadas",value:na(Te)},{label:"Último seg.",value:vs(Te)}];return{...ye,rows:Te,metrics:Tt}})},[Re,ce,O,xe,At,Ee,je,_e,Pe]),ct={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},qe=(L,X)=>{const ye=L.SolID;if(!ye)return;const Te=X.kind,Tt=ct[Te]??"cotizaciones",Ct=h?`https://qa2.crm.netcar.com.mx/netcar/${Tt}/${ye}`:`https://crmxs.netcar.com.mx/netcar/${Tt}/${ye}`,Or=E?.({row:L,section:X,slug:Tt,solId:ye,baseUrl:Ct});if(!S){const Cr=Or??Ct;Y(ye),le(Cr),G(!0)}},We=()=>{C?.(r),Y(null),le(null),G(!1)},Yt=v.useRef(!1),mt=v.useRef(null),Ot=v.useCallback(()=>{if(!Yt.current){Yt.current=!0;return}mt.current&&window.clearTimeout(mt.current),mt.current=window.setTimeout(()=>{_?.(r)},500)},[_,r]);return v.useEffect(()=>{Yt.current=!1,mt.current&&window.clearTimeout(mt.current)},[N,F]),u.jsx(m.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(m.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[u.jsxs(m.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(m.Box,{children:[u.jsx(m.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:u.jsxs(m.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[u.jsx(m.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:u.jsx(m.Box,{sx:{flex:1,minWidth:0,pr:1},children:u.jsxs(m.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[Q(r)," ",u.jsx(m.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(NA,{sx:{fontSize:"1em"}})})]})})}),Se.map((L,X)=>u.jsxs(m.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(m.Typography,{variant:"body2",sx:{color:L.inLink?"#336BE1":"#070C10"},style:{},children:L.value(r)})]},X))]})}),u.jsx(m.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map((L,X)=>{const ye=L.label?.toLowerCase().startsWith("asesor");return u.jsxs(m.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsx(m.Box,{sx:{width:"50%"},children:u.jsx(m.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:L.label})}),u.jsxs(m.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[u.jsx("div",{children:L?.avatar?L.avatar(r):null}),u.jsx(m.Typography,{variant:"body2",color:"textPrimary",children:L?.value(r)}),ye&&!W&&u.jsx(m.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:u.jsx(m.IconButton,{size:"small",onClick:Te=>M(Te.currentTarget),sx:{ml:.5},disableRipple:!0,children:u.jsx(IA,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},X)})}),u.jsx(m.Divider,{sx:{my:2}})]}),u.jsx(m.Box,{px:2.5,pb:.5,children:u.jsxs(m.Typography,{children:[u.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!N&&" por solicitud",":"]})}),u.jsxs(m.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:[Me.length===0&&u.jsx(m.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),u.jsxs(m.Box,{children:[Me?.map((L,X)=>{const ye=we(L),Te=qA(L.comentario||"");return u.jsxs(m.Box,{sx:{pb:1.5},children:[u.jsxs(m.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[u.jsx(m.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:L.tipo||"Evento"}),u.jsx(m.Chip,{size:"small",label:L.auto!=null?`${L.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Te?u.jsx(m.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Te}):null,u.jsxs(m.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[L?.ImgAsesor!=null?u.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:he(ye),src:L?.ImgAsesor}):u.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:he(ye)}),u.jsxs(m.Stack,{spacing:0,children:[u.jsx(m.Typography,{variant:"body2",fontWeight:600,children:ye}),u.jsx(m.Typography,{variant:"caption",color:"text.secondary",children:YA(L.fecAlta)})]})]}),X<Me.length-1&&u.jsx(m.Divider,{sx:{mt:1.25}})]},L.segID??X)}),Ce.length>D&&u.jsx(m.Box,{sx:{mt:1},children:u.jsx(m.Button,{onClick:()=>ee(L=>!L),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:me?"Ver menos":`Ver más (${j})`})})]})]}),u.jsx(m.Menu,{anchorEl:T,open:I,onClose:()=>M(null),TransitionComponent:m.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(m.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[u.jsx(m.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(m.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[de.length===0&&u.jsx(m.Box,{sx:{px:1.5,py:1},children:u.jsx(m.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),de.map((L,X)=>{const ye=PA(L),Te=MA(L.FechaBaja??L.FechaAsignacion);return u.jsx(m.Box,{sx:{px:1,py:.75},children:u.jsxs(m.Stack,{direction:"row",alignItems:"center",spacing:1,children:[u.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:L?.ImgAsesor??void 0,children:OA(ye)}),u.jsx(m.Box,{sx:{flex:1,minWidth:0},children:u.jsx(m.Typography,{variant:"body2",noWrap:!0,children:ye})}),u.jsx(m.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Te})]})},X)})]})]})})]}),U?u.jsxs(m.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[u.jsx(m.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:u.jsx(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:u.jsx(m.Button,{onClick:We,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:u.jsx(FA,{fontSize:"medium"})})})}),N&&u.jsx("iframe",{src:N,width:"100%",height:"100%",onLoad:Ot,style:{border:0}})]}):u.jsxs(m.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[u.jsx(m.Box,{sx:{mt:{xs:1.5,md:3}},children:u.jsxs(m.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[u.jsx(m.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),u.jsxs(m.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[u.jsxs(m.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[u.jsx(m.TextField,{size:"small",placeholder:"Buscar por vehículo",value:ce,onChange:L=>ie(L.target.value),InputProps:{endAdornment:u.jsx(bA,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),u.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[u.jsxs(m.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[u.jsx(m.FormControlLabel,{label:u.jsx(m.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:u.jsx(m.Checkbox,{checked:O,onChange:L=>oe(L.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),u.jsx(m.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),u.jsxs(m.Stack,{direction:"row",spacing:1,children:[u.jsx(m.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:xe,onChange:L=>Ge(L.target.value),disabled:!O,sx:{width:170}}),u.jsx(m.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:At,onChange:L=>q(L.target.value),disabled:!O,sx:{width:170}})]})]}),u.jsx(m.IconButton,{onClick:L=>ke(L.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:u.jsx(gA,{})}),Ye&&u.jsx(m.Button,{variant:"outlined",onClick:Jr,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),u.jsx(m.Tooltip,{title:Ye&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!Ye,children:u.jsx("span",{children:u.jsxs(m.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(Jh,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!Ye&&"Crear Solicitud"]})})})]}),u.jsx(kA,{sections:Qe,detailColumns:[],getDetailColumns:ne,onRowClick:qe})]})]})}),u.jsx(m.Menu,{anchorEl:fe,open:Oe,onClose:()=>ke(null),TransitionComponent:m.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(m.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[u.jsx(m.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),u.jsxs(m.Box,{children:[u.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),u.jsx(m.RadioGroup,{value:je,onChange:L=>te(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(m.FormControlLabel,{value:L,control:u.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),u.jsxs(m.Box,{children:[u.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),u.jsx(m.RadioGroup,{value:_e,onChange:(L,X)=>Ie(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Vt].map(L=>u.jsx(m.FormControlLabel,{value:L,sx:{alignItems:"start"},control:u.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),u.jsxs(m.Box,{children:[u.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),u.jsx(m.RadioGroup,{value:Pe,onChange:(L,X)=>wr(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...ar].map(L=>u.jsx(m.FormControlLabel,{value:L,control:u.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]})]})})]})]})})}const t0={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function r0(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??{},y=l.icons??{},g=l.className??"d-flex flex-row gap-2 align-items-center ",p=l.tooltip??{},b=y.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=tl(d.whatsapp,I,!0),G=tl(d.email,I,!0),F=tl(d.view,I,!0),Y=h.phone?.(I),se=h.email?.(I),H=de=>{if(de.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(I);if(!Y)return;const $=h.countryCode??"52",Q=fA(String(Y));typeof window<"u"&&window.open(`https://wa.me/${$}${Q}`,"_blank")},N=de=>{if(de.stopPropagation(),f.onEmail)return f.onEmail(I);se&&typeof window<"u"&&(window.location.href=`mailto:${se}`)},le=de=>{de.stopPropagation(),f.onView&&f.onView(I)};return u.jsxs("div",{className:g,children:[U&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:H,style:{width:24,height:24},children:u.jsx("img",{src:lA,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:uA,alt:"Email"})}),F&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:le,style:{width:24,height:24},children:b})]})}),width:120}},S=Object.values(w).filter(I=>!!I),E=(e??[]).filter(I=>!!I?.key),C=new Map;for(const I of S)C.set(String(I.key),I);for(const I of E)C.set(String(I.key),I);const _=[...S.map(I=>String(I.key)),...E.map(I=>String(I.key))],W=Array.from(new Set(o.map(I=>String(I)).filter(I=>C.has(I)))),D=_.filter(I=>!W.includes(I)),T=[...W,...D],M="acciones";if(C.has(M)){const I=T.filter(U=>U!==M);T.splice(0,T.length,...I,M)}return T.map(I=>C.get(I))}function JA(e){const{rows:t,columns:r,clientSort:n=!0,urlsQA:o=!0,defaultSort:s,minWidth:i=1100,rowKey:a=pA,haveOpenDetailFor:c=!0,defaults:l,detailConfig:d,normalTable:f,onRowClick:h,activityHistory:y,advisorHistory:g,forceOpenDetailFor:p,closeDetailFor:b,onRequestEdit:w,searchFilter:S,solicitudesNuevos:E,solicitudesPrueba:C,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:T,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:U,idAdminSistemas:G=!1}=e,[F,Y]=v.useState(s??null),[se,H]=v.useState({open:!1,customer:null}),[N,le]=v.useState([]),de=ae=>{H({open:!0,customer:ae})},$=ae=>{c&&(h?.(ae),H({open:!0,customer:ae}))},Q=()=>{H({open:!1,customer:null}),b?.()},Se=v.useMemo(()=>l?r0(r??[],l):r0(r??[],{fields:{},order:[]}),[r,l]),we=v.useMemo(()=>{if(!n||!F)return t;const ae=Se.find(J=>J.key===F.key);if(!ae)return t;const ue=[...t];return ue.sort((J,Ce)=>{const me=el(ae,J,0),ee=el(ae,Ce,0),Me=dA(me,ee);return F.direction==="asc"?Me:-Me}),ue},[t,Se,F,n]),he=v.useMemo(()=>{const ae=d?.getCustomerId;return ue=>{const J=ae?.(ue)??ue?.Id_cliente??ue?.CliID??ue?.id??ue?.ID??ue?.Id??"";return String(J)}},[d]);return v.useEffect(()=>{if(!se.open||!se.customer)return;const ae=he(se.customer);if(!ae)return;const ue=(t??[]).find(J=>he(J)===ae);ue&&ue!==se.customer&&H(J=>({...J,customer:ue}))},[t,se.open,se.customer,he]),v.useEffect(()=>{p&&de(p)},[p]),u.jsxs("div",{children:[u.jsx("div",{className:`${t0.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:u.jsx("div",{className:`${t0.tableResponsive} table-responsive`,children:u.jsxs("table",{className:"table table-hover align-middle mb-0",children:[u.jsx("thead",{children:u.jsx("tr",{children:Se.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:we.map((ae,ue)=>u.jsx("tr",{onClick:()=>$?.(ae),role:"button",tabIndex:0,onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&$?.(ae)},style:{cursor:"pointer"},children:Se.map((J,Ce)=>{const me=J.Component?u.jsx(J.Component,{row:ae,index:ue}):J.cell?J.cell(ae,ue):(()=>{const ee=el(J,ae,ue);return ee==null||ee===""?"":String(ee)})();return u.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:J.align??"left"},children:me},`${String(J.key)}-${Ce}`)})},a(ae,ue)))})]})})}),se.open&&u.jsx(XA,{open:se.open,onClose:Q,customer:se.customer,fields:d?.dynamicFields,header:d?.header,normalTable:f,history:y,advisorHistory:g,urlsQA:o,onRequestEdit:ae=>{Q(),w?.(ae)},searchFilter:S,solicitudesNuevos:E,solicitudesPrueba:C,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:T,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:U,idAdminSistemas:G})]})}const n0=K.forwardRef(({sx:e,...t},r)=>u.jsx(m.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}}));n0.displayName="SoftInput";function e3({message:e}){return e?u.jsxs(m.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(Xc,{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 t3(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function ol(e,t){const r=t3(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 o0={"& .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%"},r3={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function sl({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return u.jsxs(m.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[u.jsx(m.FormLabel,{sx:r3,children:e}),n,u.jsx(e3,{message:t||r})]})}function n3(e,t){const{register:r,formState:{errors:n}}=t,o={...ol(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=C=>e.onlyNumbers?(C.match(a)??[]).join(""):e.onlyLetters?(C.match(i)??[]).join(""):C,d=(C,_)=>c.has(C)||_?!0:e.onlyNumbers?/^[0-9]$/.test(C):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(C):!0,f=n[e.name]?.message,h=r(e.name,o),y=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,g=C=>{d(C.key,C.ctrlKey||C.metaKey)||C.preventDefault()},p=C=>{const _=C.data??null;_!=null&&(e.onlyNumbers&&/[^0-9]/.test(_)&&C.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(_)&&C.preventDefault())},b=C=>{const _=C.clipboardData.getData("text"),W=l(_);if(W!==_){C.preventDefault();const D=C.target,T=D.selectionStart??D.value.length,M=D.selectionEnd??D.value.length;D.setRangeText(W,T,M,"end"),D.dispatchEvent(new Event("input",{bubbles:!0}))}},w=C=>{const _=l(C.target.value);_!==C.target.value&&(C.target.value=_),y&&C.target.value.length>y&&(C.target.value=C.target.value.slice(0,y)),h.onChange(C)},S={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:y,onKeyDown:g,onBeforeInput:p,onPaste:b,onInvalid:C=>C.preventDefault()},E=e.onlyNumbers||s?"text":e.type??"text";return u.jsx(sl,{label:e.label,errorMsg:f,helperText:e.helperText,sx:o0,children:u.jsx(n0,{placeholder:e.placeholder,type:E,inputProps:S,...h,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function o3(e,t){const{control:r}=t,n=!!e.multiple;return u.jsx(hr,{name:e.name,control:r,rules:ol(e,{isArray:n}),render:({field:o,fieldState:s})=>u.jsx(sl,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:o0,children:u.jsxs(m.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(m.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>u.jsx(m.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function s3(e,t){return u.jsx(hr,{name:e.name,control:t.control,rules:ol(e),render:({field:r,fieldState:n})=>u.jsx(sl,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:u.jsx(m.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>u.jsx(m.FormControlLabel,{value:o.value,control:u.jsx(m.Radio,{}),label:o.label},String(o.value)))})})})}function s0(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return n3(e,t);case"select":return o3(e,t);case"radio":return s3(e,t);default:return null}}function i3(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]=v.useState(1),[d,f]=v.useState(t),{currentItems:h,totalPages:y,showingFrom:g,showingTo:p,totalItems:b}=v.useMemo(()=>{const E=a.length,C=d==="Todos"?1/0:Number(d),_=C===1/0?1:Math.max(1,Math.ceil(E/C)),W=Math.min(c,_),D=C===1/0?E:W*C,T=C===1/0?0:D-C;return{currentItems:C===1/0?a:a.slice(T,D),totalPages:_,showingFrom:E===0?0:T+1,showingTo:C===1/0?E:Math.min(D,E),totalItems:E}},[a,c,d]),w=E=>{const C=Math.max(1,Math.min(E,y||1));l(C),n?.(C),s?.()};return{currentItems:h,totalPages:y,showingFrom:g,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 hs={},i0;function a3(){if(i0)return hs;i0=1;var e=ut();Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=void 0;var t=e(gt()),r=pt();return hs.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"),hs}var c3=a3();const l3=lt(c3);var ms={},a0;function u3(){if(a0)return ms;a0=1;var e=ut();Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var t=e(gt()),r=pt();return ms.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"),ms}var d3=u3();const f3=lt(d3),p3=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const l=m.useTheme(),d=m.useMediaQuery(l.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const g=d?0:2,p=[],b=1,w=t,S=Math.max(b+1,e-g),E=Math.min(w-1,e+g);p.push(b),S>b+1&&p.push("...");for(let C=S;C<=E;C++)C>=b+1&&C<=w-1&&p.push(C);return E<w-1&&p.push("..."),p.push(w),p},h=g=>{const p=g.target.value;o(p)},y=Math.max(1,t);return u.jsxs(m.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(m.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[u.jsx(m.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:u.jsx(l3,{fontSize:"large"})}),f().map((g,p)=>g==="..."?u.jsx(m.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${p}`):u.jsx(m.Button,{onClick:()=>r(g),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===g?"primary.main":"transparent",fontWeight:e===g?700:400,color:e===g?"#fff":"#5C6372","&:hover":{backgroundColor:e===g?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:g},`p-${g}`)),u.jsx(m.IconButton,{onClick:()=>r(e+1),disabled:e>=y,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:u.jsx(f3,{fontSize:"large"})})]}),u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[u.jsx(m.Typography,{variant:"body2",children:"Mostrar"}),u.jsx(m.FormControl,{size:"small",sx:{minWidth:72},children:u.jsx(m.Select,{value:n,onChange:h,renderValue:g=>g==="Todos"?"Todos":String(g),children:s.map(g=>u.jsx(m.MenuItem,{value:g,children:g==="Todos"?"Todos":g},String(g)))})}),u.jsx(m.Typography,{variant:"body2",children:"por página"})]})]})};function h3(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:y,onSelectedChange:g,onSubmitAddData:p,initialSelectedIds:b=[],showAutosPanel:w}=e,S=kp({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});v.useEffect(()=>{i&&S.reset(i)},[i,S]);const[E,C]=v.useState(""),[_,W]=v.useState(b),D=Array.isArray(y)&&!!g,T=D?y:_,M=O=>{const oe=typeof O=="function"?O(T):O;D?g(oe):W(oe)},I=v.useCallback(O=>f?f(O):O?.IdAuto,[f]),U=v.useMemo(()=>{const O=new Map;return(l??[]).forEach((oe,Ee)=>O.set(I(oe),Ee)),O},[l,I]),G=v.useRef(new Set),F=v.useMemo(()=>{const O=new Map;return(l??[]).forEach(oe=>O.set(f?f(oe):oe?.IdAuto,oe)),O},[l,f]),Y=v.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),se=lp({control:S.control,name:Y}),H=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=v.useMemo(()=>Y.length?se?.every(H)??!1:!0,[se,Y]),{handleSubmit:le,formState:{isSubmitting:de,isDirty:$,isValid:Q}}=S,Se=d??((O,oe)=>JSON.stringify(O).toLowerCase().includes(oe.toLowerCase())),we=v.useMemo(()=>E.trim()?l?.filter(O=>Se(O,E)):l,[l,E,Se]),he=v.useMemo(()=>{if(!we)return we;const O=G.current,oe=[...we];return oe.sort((Ee,Ne)=>{const R=O.has(I(Ee))?0:1,re=O.has(I(Ne))?0:1;if(R!==re)return R-re;const xe=U.get(I(Ee))??0,Ge=U.get(I(Ne))??0;return xe-Ge}),oe},[we,U,I]),{currentItems:ae,totalPages:ue,showingFrom:J,showingTo:Ce,totalItems:me,currentPage:ee,itemsPerPage:Me,perPageOptions:j,goTo:Fe,setItemsPerPage:Ke}=i3(he,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[E],scrollTop:()=>{}}),Ze=O=>{const oe=F.get(O)??null;M([O]),p?.({items:oe})},Be=O=>T.includes(O),Ve=async O=>{try{await o?.(O),S.reset(S.getValues())}catch(oe){console.error("Error al enviar AddCliente:",oe)}},et=v.useMemo(()=>{const O=new Map;return(n??[]).forEach(oe=>O.set(String(oe.name),oe)),O},[n]),ht=(O,oe)=>{const Ee=et.get(String(O));if(!Ee)return null;const Ne={xs:12,...Ee.grid,...oe||{}};return u.jsx(m.Grid,{item:!0,...Ne,children:Ee.render?Ee.render(S):s0(Ee,S)},`fld-${String(O)}`)},k=w??(e.haveId?"edit":"new"),P=k!=="onlyCars",B=k==="new"||k==="onlyCars",ce=T?.length>0,ie=k==="onlyCars"?ce:e.haveId?N&&$||ce:N&&ce;return u.jsx(m.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(Dw,{...S,children:u.jsxs(m.Box,{component:"form",noValidate:!0,onSubmit:le(Ve),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[P&&u.jsxs(m.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(m.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[u.jsx(m.Typography,{fontWeight:700,fontSize:20,children:r.title}),u.jsxs(m.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[u.jsx(m.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),u.jsx(m.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,oe)=>u.jsx(m.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((Ee,Ne)=>{const R=typeof Ee=="string"?{name:Ee}:Ee;return R.hidden?.(S)?null:ht(R.name,R.grid)})},`row-${oe}`)):u.jsx(m.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,oe)=>{const Ee=O.grid??{xs:12,md:12};return u.jsx(m.Grid,{item:!0,...Ee,children:O.render?O.render(S):s0(O,S)},`${String(O.name)}-${oe}`)})})})]})]}),u.jsx(m.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(m.Box,{display:"flex",alignItems:"center",children:u.jsx(m.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:u.jsx(m.Button,{type:"submit",variant:"contained",disabled:de||!ie,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(m.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:u.jsx(m.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:u.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[u.jsxs(m.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(m.TextField,{value:E,onChange:O=>C(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:u.jsx(m.InputAdornment,{position:"start",children:u.jsx(R2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),u.jsx(m.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:u.jsx(m.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:u.jsx(Hr,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&u.jsx(m.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:u.jsx(m.Box,{display:"flex",gap:1.5,width:"100%",children:u.jsxs(m.Button,{type:"submit",variant:"contained",disabled:de||!ie,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[u.jsx(Jh,{sx:{color:de||!ie?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),u.jsx(m.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(m.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:u.jsxs(m.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ae?.map((O,oe)=>{const Ee=f?f(O):oe,Ne=Be(Ee);return u.jsx(m.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:u.jsx(m.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:u.jsx(m.ListItemButton,{onClick:()=>Ze(Ee),disableRipple:!0,sx:{padding:0},children:u.jsx(m.ListItemText,{disableTypography:!0,primary:h?h({item:O,selected:Ne,toggle:()=>Ze(Ee),index:oe}):null})})})},`${String(Ee)}`)}),!ae?.length&&u.jsx(m.Box,{p:3,children:u.jsxs(m.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",E,"”."]})})]})})}),u.jsx(m.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:u.jsx(p3,{currentPage:ee,totalPages:ue,onPageChange:Fe,itemsPerPage:Me,onItemsPerPageChange:Ke,itemsPerPageOptions:j,showingFrom:J,showingTo:Ce,totalItems:me})})]})})})]})})})}var gs={},c0;function m3(){if(c0)return gs;c0=1;var e=ut();Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=void 0;var t=e(gt()),r=pt();return gs.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"),gs}var g3=m3();const v3=lt(g3),il=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,ta=/[,\s;]+/g,un=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),dn=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),l0=(e,t)=>t?e.filter(r=>un(r)!==un(t)):e,y3=(e,t)=>e.filter(r=>!t.some(n=>un(n)===un(r)));function Pr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function b3(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function x3({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:y}){const g=v.useRef(null),[p,b]=v.useState("idle"),w=v.useRef(e);v.useEffect(()=>{const R=w.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),w.current=e},[e]),v.useEffect(()=>{if(p==="entering"){const xe=setTimeout(()=>b("idle"),320);return()=>clearTimeout(xe)}if(p==="exiting"){const xe=setTimeout(()=>b("idle"),220);return()=>clearTimeout(xe)}},[p]);const[S,E]=v.useState(""),[C,_]=v.useState(!1),[W,D]=v.useState(!1),[T,M]=v.useState(!1),[I,U]=v.useState(""),[G,F]=v.useState([]),Y=T?G:r.selectedIds,se=()=>{F([...r.selectedIds]),U(""),M(!0)},H=()=>{M(!1),F([])},N=()=>{const R=new Set(et.map((xe,Ge)=>String(Pr(xe,Ge,h.id)))),re=G.filter(xe=>R.has(String(xe)));n({...r,selectedIds:re}),M(!1)},le=(R,re)=>un(R??"")===un(re??"");function de(R,re,xe,Ge,At){const q=re?R.some(ke=>le(ke,re)):!1,fe=xe.length>0?xe.some(ke=>R.some(Oe=>le(Oe,ke))):!1;Ge(q),At(fe)}const $=R=>{const re=typeof R=="function"?R(r.recipients):R;n({...r,recipients:re}),de(re,ae,J,_,D)},Q=R=>n({...r,message:R}),Se=R=>n({...r,attachments:[...r.attachments,...R]}),we=R=>n({...r,attachments:r.attachments.filter(re=>re.name!==R)}),he=R=>{if(T)if(l){const re=new Set(G);re.has(R)?re.delete(R):re.add(R),F(Array.from(re))}else{const re=G.includes(R);F(re?[]:[R])}else if(l){const re=new Set(r.selectedIds);re.has(R)?re.delete(R):re.add(R),n({...r,selectedIds:Array.from(re)})}else{const re=r.selectedIds.includes(R);n({...r,selectedIds:re?[]:[R]})}},ae=v.useMemo(()=>(s?.Correo??"").trim(),[s]),ue=v.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),J=v.useMemo(()=>ue.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ue]),Ce=v.useRef(!1);v.useEffect(()=>{if(e&&!Ce.current){let R=[];C&&ae&&(R=dn(R,[ae])),W&&J.length&&(R=dn(R,J)),$(re=>dn(re,R)),de(r.recipients,ae,J,_,D),E(""),Ce.current=!0}e||(Ce.current=!1)},[e,C,W,ae,J]);const me=R=>{const re=ue.find(xe=>un(xe.EmailAsesor??"")===un(R));if(re){if(re.ImgAsesor)return u.jsx(m.Avatar,{src:re.ImgAsesor,alt:re.NombreAsesor});const xe=(re.NombreAsesor||"").trim(),Ge=(re.ApellidosAsesor||"").trim();return u.jsx(m.Avatar,{children:`${xe[0]??""}${Ge[0]??""}`.toUpperCase()})}return u.jsx(m.Avatar,{children:R[0]?.toUpperCase()})},ee=()=>{const R=S.trim();if(!R)return;const xe=R.split(ta).filter(Boolean).filter(Ge=>il.test(Ge));xe.length>0&&$(Ge=>dn(Ge,xe)),E("")},Me=R=>{_(R),$(re=>R&&ae?dn(re,[ae]):l0(re,ae))},j=R=>{D(R),$(re=>R?dn(re,J):y3(re,J))},Fe=R=>{const re=Array.from(R.target.files||[]);Se(re.map(xe=>({name:xe.name,size:xe.size,file:xe}))),R.target.value=""},Ke=Y[0],Ze=v.useMemo(()=>!i||Ke===void 0?void 0:i.find((re,xe)=>String(Pr(re,xe,h.id))===String(Ke)),[i,Ke,h.id]),Be=v.useMemo(()=>{if(!(!Ze||!h.distributorId))return Pr(Ze,0,h.distributorId)},[Ze,h.distributorId]);console.log("lockedDisId",Be);const Ve=v.useMemo(()=>Ze?(h.distributorTitle?Pr(Ze,0,h.distributorTitle):void 0)??(Be!=null?String(Be):void 0):void 0,[Ze,h.distributorTitle,Be]),et=v.useMemo(()=>{const R=i??[];return Be==null||!h.distributorId?R:R.filter((re,xe)=>Pr(re,xe,h.distributorId)==Be)},[i,Be,h.distributorId]),ht=v.useMemo(()=>{if(!I.trim())return et;const R=I.toLowerCase();return et.filter(re=>(c??[]).some(xe=>String(re?.[xe]??"").toLowerCase().includes(R)))},[et,I,c]),k=v.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((re,xe)=>{R.set(String(Pr(re,xe,h.id)),re)}),r.selectedIds.map(re=>R.get(String(re))).filter(Boolean)},[i,r.selectedIds,h.id]),P=R=>n({...r,selectedIds:r.selectedIds.filter(re=>String(re)!==String(R))}),B=()=>{let R=r.recipients;if(S.trim()){const q=S.split(ta).filter(fe=>il.test(fe));R=dn(R,q),$(R),E("")}const re=C?ae:"",xe=ue.find(q=>q?.Activo&&q?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:C,toAdvisor:W,tipoInt:C&&W?2:1,correoCliente:re,correoAsesor:W?xe:"",disIdLocked:Be}),t?.()},ce=v.useMemo(()=>{const re=S.split(ta).filter(Boolean).some(xe=>il.test(xe));return r.recipients.length>0||re},[r.recipients,S]),ie=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,oe=ce&&ie&&O,Ee=m.useTheme(),Ne=m.useMediaQuery(Ee.breakpoints.down("sm"));return u.jsxs(m.Drawer,{anchor:Ne?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!Ne}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:Ne?"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(m.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[u.jsxs(m.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[u.jsxs(m.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(m.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),u.jsx(m.IconButton,{onClick:t,size:"small",children:u.jsx(Hr,{})})]}),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(m.Chip,{avatar:me(R),label:R,onDelete:()=>$(re=>l0(re,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),u.jsx("input",{type:"text",value:S,onChange:R=>E(R.target.value),onKeyDown:R=>{const re=R.key;re==="Enter"||re===","||re===";"||re===" "||re==="Tab"?(R.preventDefault(),ee()):re==="Backspace"&&!S&&r.recipients.length&&$(Ge=>Ge.slice(0,-1))},onBlur:ee,onPaste:R=>{const xe=R.clipboardData.getData("text").split(ta).filter(Boolean);xe.length>1&&(R.preventDefault(),$(Ge=>dn(Ge,xe)),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(m.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[u.jsx(m.FormControlLabel,{control:u.jsx(m.Checkbox,{checked:C,onChange:R=>Me(R.target.checked),size:"small"}),label:"Cliente"}),ue.length!==0&&u.jsx(m.FormControlLabel,{control:u.jsx(m.Checkbox,{checked:W,onChange:R=>j(R.target.checked),size:"small"}),label:`Asesor${ue.length>1?"es":""}`})]})]}),u.jsx(m.Divider,{}),u.jsxs(m.Box,{p:2,children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:se,children:[u.jsx(m.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Ve!=null&&u.jsx(m.Chip,{size:"small",label:`Distribuidora: ${Ve}`})]}),k.length>0?u.jsx(m.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:k.map((R,re)=>{const xe=Pr(R,re,h.id),Ge=Pr(R,re,h.title)??"",At=Pr(R,re,h.image),q=b3(f,At);return u.jsx(m.Chip,{onDelete:()=>P(xe),label:u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(m.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:q?u.jsx("img",{src:q,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}}):u.jsx("img",{src:y,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(xe))})}):u.jsx(m.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),u.jsx(m.Divider,{}),u.jsxs(m.Box,{sx:{p:2},children:[u.jsx(m.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(m.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>u.jsxs(m.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[u.jsx(m.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(m.Tooltip,{title:"Quitar",children:u.jsx(m.IconButton,{edge:"end",onClick:()=>we(R.name),size:"small",children:u.jsx(Hr,{fontSize:"small"})})})]},R.name))})]}),u.jsxs(m.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:g,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:Fe}),u.jsx(m.Button,{startIcon:u.jsx(v3,{}),variant:"text",onClick:()=>g.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),u.jsx(m.Box,{sx:{flex:1}}),u.jsx(m.Button,{variant:"contained",onClick:B,disabled:!oe,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),u.jsxs(m.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:Ne,open:T,onClose:H,children:[u.jsxs(m.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",u.jsx(m.IconButton,{onClick:H,size:"small",children:u.jsx(Hr,{})})]}),u.jsxs(m.DialogContent,{children:[u.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(m.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:I,onChange:R=>U(R.target.value),sx:{mb:2}}),Ve!=null&&u.jsx(m.Chip,{size:"small",label:`Distribuidora: ${Ve}`})]}),u.jsxs(m.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",ht.length,")"]}),u.jsxs(m.List,{sx:{p:0},children:[ht.map((R,re)=>{const xe=Pr(R,re,h.id),Ge=Y.includes(String(xe))||Y.includes(xe),At=Be==null||Pr(R,re,h.distributorId)==Be;return u.jsx(m.ListItem,{disableGutters:!0,sx:{p:0,opacity:At?1:.5},children:u.jsx(m.Box,{onClick:()=>At&&he(xe),sx:{cursor:At?"pointer":"not-allowed",p:.5,backgroundColor:Ge?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(R,re):u.jsx("pre",{style:{margin:0},children:JSON.stringify(R,null,2)})})},String(xe))}),ht.length===0&&u.jsx(m.Box,{p:2,children:u.jsx(m.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),u.jsxs(m.DialogActions,{sx:{px:3,pb:2},children:[u.jsx(m.Button,{variant:"text",onClick:H,sx:{color:"#5C6372"},children:"Cancelar"}),u.jsx(m.Button,{variant:"contained",onClick:N,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}jt.AddCliente=h3,jt.ApiProvider=Ox,jt.AuthProvider=c1,jt.Clientes=JA,jt.CustomSnackbar=Jc,jt.EventsProvider=eA,jt.ModalCorreo=x3,jt.MyCalendar=cA,jt.useAuth=ac,jt.useAuthRepository=Ti,jt.useEventRepository=kc,Object.defineProperty(jt,Symbol.toStringTag,{value:"Module"})}));