@tealca/core-components 1.0.7 → 1.0.9

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.
@@ -0,0 +1,89 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),I=require("classnames"),mn=require("react-dom");function ah(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 Gc=ah(mn);function qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fs={exports:{}},On={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var go;function oh(){if(go)return On;go=1;var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,d){var f,h={},p=null,v=null;d!==void 0&&(p=""+d),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)n.call(u,f)&&!i.hasOwnProperty(f)&&(h[f]=u[f]);if(l&&l.defaultProps)for(f in u=l.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:t,type:l,key:p,ref:v,props:h,_owner:s.current}}return On.Fragment=r,On.jsx=a,On.jsxs=a,On}var jn={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var mo;function lh(){return mo||(mo=1,process.env.NODE_ENV!=="production"&&(function(){var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),g=Symbol.iterator,b="@@iterator";function y(S){if(S===null||typeof S!="object")return null;var A=g&&S[g]||S[b];return typeof A=="function"?A:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(S){{for(var A=arguments.length,W=new Array(A>1?A-1:0),ie=1;ie<A;ie++)W[ie-1]=arguments[ie];O("error",S,W)}}function O(S,A,W){{var ie=w.ReactDebugCurrentFrame,je=ie.getStackAddendum();je!==""&&(A+="%s",W=W.concat([je]));var Pe=W.map(function(Se){return String(Se)});Pe.unshift("Warning: "+A),Function.prototype.apply.call(console[S],console,Pe)}}var k=!1,m=!1,x=!1,L=!1,T=!1,C;C=Symbol.for("react.module.reference");function D(S){return!!(typeof S=="string"||typeof S=="function"||S===n||S===i||T||S===s||S===d||S===f||L||S===v||k||m||x||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===a||S.$$typeof===l||S.$$typeof===u||S.$$typeof===C||S.getModuleId!==void 0))}function P(S,A,W){var ie=S.displayName;if(ie)return ie;var je=A.displayName||A.name||"";return je!==""?W+"("+je+")":W}function B(S){return S.displayName||"Context"}function z(S){if(S==null)return null;if(typeof S.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case l:var A=S;return B(A)+".Consumer";case a:var W=S;return B(W._context)+".Provider";case u:return P(S,S.render,"ForwardRef");case h:var ie=S.displayName||null;return ie!==null?ie:z(S.type)||"Memo";case p:{var je=S,Pe=je._payload,Se=je._init;try{return z(Se(Pe))}catch{return null}}}return null}var Y=Object.assign,q=0,U,re,ee,ce,ae,ne,se;function Z(){}Z.__reactDisabledLog=!0;function de(){{if(q===0){U=console.log,re=console.info,ee=console.warn,ce=console.error,ae=console.group,ne=console.groupCollapsed,se=console.groupEnd;var S={configurable:!0,enumerable:!0,value:Z,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}q++}}function N(){{if(q--,q===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},S,{value:U}),info:Y({},S,{value:re}),warn:Y({},S,{value:ee}),error:Y({},S,{value:ce}),group:Y({},S,{value:ae}),groupCollapsed:Y({},S,{value:ne}),groupEnd:Y({},S,{value:se})})}q<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ke=w.ReactCurrentDispatcher,we;function te(S,A,W){{if(we===void 0)try{throw Error()}catch(je){var ie=je.stack.trim().match(/\n( *(at )?)/);we=ie&&ie[1]||""}return`
18
+ `+we+S}}var Te=!1,K;{var pe=typeof WeakMap=="function"?WeakMap:Map;K=new pe}function V(S,A){if(!S||Te)return"";{var W=K.get(S);if(W!==void 0)return W}var ie;Te=!0;var je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pe;Pe=ke.current,ke.current=null,de();try{if(A){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(nt){ie=nt}Reflect.construct(S,[],Se)}else{try{Se.call()}catch(nt){ie=nt}S.call(Se.prototype)}}else{try{throw Error()}catch(nt){ie=nt}S()}}catch(nt){if(nt&&ie&&typeof nt.stack=="string"){for(var xe=nt.stack.split(`
19
+ `),tt=ie.stack.split(`
20
+ `),Ue=xe.length-1,Ve=tt.length-1;Ue>=1&&Ve>=0&&xe[Ue]!==tt[Ve];)Ve--;for(;Ue>=1&&Ve>=0;Ue--,Ve--)if(xe[Ue]!==tt[Ve]){if(Ue!==1||Ve!==1)do if(Ue--,Ve--,Ve<0||xe[Ue]!==tt[Ve]){var ht=`
21
+ `+xe[Ue].replace(" at new "," at ");return S.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",S.displayName)),typeof S=="function"&&K.set(S,ht),ht}while(Ue>=1&&Ve>=0);break}}}finally{Te=!1,ke.current=Pe,N(),Error.prepareStackTrace=je}var Qr=S?S.displayName||S.name:"",Cr=Qr?te(Qr):"";return typeof S=="function"&&K.set(S,Cr),Cr}function qe(S,A,W){return V(S,!1)}function rt(S){var A=S.prototype;return!!(A&&A.isReactComponent)}function me(S,A,W){if(S==null)return"";if(typeof S=="function")return V(S,rt(S));if(typeof S=="string")return te(S);switch(S){case d:return te("Suspense");case f:return te("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case u:return qe(S.render);case h:return me(S.type,A,W);case p:{var ie=S,je=ie._payload,Pe=ie._init;try{return me(Pe(je),A,W)}catch{}}}return""}var jt=Object.prototype.hasOwnProperty,Ft={},xr=w.ReactDebugCurrentFrame;function lt(S){if(S){var A=S._owner,W=me(S.type,S._source,A?A.type:null);xr.setExtraStackFrame(W)}else xr.setExtraStackFrame(null)}function Gr(S,A,W,ie,je){{var Pe=Function.call.bind(jt);for(var Se in S)if(Pe(S,Se)){var xe=void 0;try{if(typeof S[Se]!="function"){var tt=Error((ie||"React class")+": "+W+" type `"+Se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[Se]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw tt.name="Invariant Violation",tt}xe=S[Se](A,Se,ie,W,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ue){xe=Ue}xe&&!(xe instanceof Error)&&(lt(je),E("%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).",ie||"React class",W,Se,typeof xe),lt(null)),xe instanceof Error&&!(xe.message in Ft)&&(Ft[xe.message]=!0,lt(je),E("Failed %s type: %s",W,xe.message),lt(null))}}}var tr=Array.isArray;function j(S){return tr(S)}function F(S){{var A=typeof Symbol=="function"&&Symbol.toStringTag,W=A&&S[Symbol.toStringTag]||S.constructor.name||"Object";return W}}function G(S){try{return J(S),!1}catch{return!0}}function J(S){return""+S}function le(S){if(G(S))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",F(S)),J(S)}var ge=w.ReactCurrentOwner,$e={key:!0,ref:!0,__self:!0,__source:!0},Ze,$t;function Mt(S){if(jt.call(S,"ref")){var A=Object.getOwnPropertyDescriptor(S,"ref").get;if(A&&A.isReactWarning)return!1}return S.ref!==void 0}function qr(S){if(jt.call(S,"key")){var A=Object.getOwnPropertyDescriptor(S,"key").get;if(A&&A.isReactWarning)return!1}return S.key!==void 0}function rr(S,A){typeof S.ref=="string"&&ge.current}function br(S,A){{var W=function(){Ze||(Ze=!0,E("%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)",A))};W.isReactWarning=!0,Object.defineProperty(S,"key",{get:W,configurable:!0})}}function nr(S,A){{var W=function(){$t||($t=!0,E("%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)",A))};W.isReactWarning=!0,Object.defineProperty(S,"ref",{get:W,configurable:!0})}}var cs=function(S,A,W,ie,je,Pe,Se){var xe={$$typeof:t,type:S,key:A,ref:W,props:Se,_owner:Pe};return xe._store={},Object.defineProperty(xe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(xe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(xe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.freeze&&(Object.freeze(xe.props),Object.freeze(xe)),xe};function Zr(S,A,W,ie,je){{var Pe,Se={},xe=null,tt=null;W!==void 0&&(le(W),xe=""+W),qr(A)&&(le(A.key),xe=""+A.key),Mt(A)&&(tt=A.ref,rr(A,je));for(Pe in A)jt.call(A,Pe)&&!$e.hasOwnProperty(Pe)&&(Se[Pe]=A[Pe]);if(S&&S.defaultProps){var Ue=S.defaultProps;for(Pe in Ue)Se[Pe]===void 0&&(Se[Pe]=Ue[Pe])}if(xe||tt){var Ve=typeof S=="function"?S.displayName||S.name||"Unknown":S;xe&&br(Se,Ve),tt&&nr(Se,Ve)}return cs(S,xe,tt,je,ie,ge.current,Se)}}var Kr=w.ReactCurrentOwner,wr=w.ReactDebugCurrentFrame;function Ut(S){if(S){var A=S._owner,W=me(S.type,S._source,A?A.type:null);wr.setExtraStackFrame(W)}else wr.setExtraStackFrame(null)}var Jr;Jr=!1;function Xr(S){return typeof S=="object"&&S!==null&&S.$$typeof===t}function Sr(){{if(Kr.current){var S=z(Kr.current.type);if(S)return`
22
+
23
+ Check the render method of \``+S+"`."}return""}}function us(S){return""}var Er={};function ds(S){{var A=Sr();if(!A){var W=typeof S=="string"?S:S.displayName||S.name;W&&(A=`
24
+
25
+ Check the top-level render call using <`+W+">.")}return A}}function kr(S,A){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var W=ds(A);if(Er[W])return;Er[W]=!0;var ie="";S&&S._owner&&S._owner!==Kr.current&&(ie=" It was passed a child from "+z(S._owner.type)+"."),Ut(S),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',W,ie),Ut(null)}}function Cn(S,A){{if(typeof S!="object")return;if(j(S))for(var W=0;W<S.length;W++){var ie=S[W];Xr(ie)&&kr(ie,A)}else if(Xr(S))S._store&&(S._store.validated=!0);else if(S){var je=y(S);if(typeof je=="function"&&je!==S.entries)for(var Pe=je.call(S),Se;!(Se=Pe.next()).done;)Xr(Se.value)&&kr(Se.value,A)}}}function Li(S){{var A=S.type;if(A==null||typeof A=="string")return;var W;if(typeof A=="function")W=A.propTypes;else if(typeof A=="object"&&(A.$$typeof===u||A.$$typeof===h))W=A.propTypes;else return;if(W){var ie=z(A);Gr(W,S.props,"prop",ie,S)}else if(A.PropTypes!==void 0&&!Jr){Jr=!0;var je=z(A);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",je||"Unknown")}typeof A.getDefaultProps=="function"&&!A.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Lr(S){{for(var A=Object.keys(S.props),W=0;W<A.length;W++){var ie=A[W];if(ie!=="children"&&ie!=="key"){Ut(S),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),Ut(null);break}}S.ref!==null&&(Ut(S),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ut(null))}}var oe={};function po(S,A,W,ie,je,Pe){{var Se=D(S);if(!Se){var xe="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(xe+=" 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 tt=us();tt?xe+=tt:xe+=Sr();var Ue;S===null?Ue="null":j(S)?Ue="array":S!==void 0&&S.$$typeof===t?(Ue="<"+(z(S.type)||"Unknown")+" />",xe=" Did you accidentally export a JSX literal instead of a component?"):Ue=typeof S,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ue,xe)}var Ve=Zr(S,A,W,je,Pe);if(Ve==null)return Ve;if(Se){var ht=A.children;if(ht!==void 0)if(ie)if(j(ht)){for(var Qr=0;Qr<ht.length;Qr++)Cn(ht[Qr],S);Object.freeze&&Object.freeze(ht)}else E("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 Cn(ht,S)}if(jt.call(A,"key")){var Cr=z(S),nt=Object.keys(A).filter(function(ih){return ih!=="key"}),Ci=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!oe[Cr+Ci]){var sh=nt.length>0?"{"+nt.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,Ci,Cr,sh,Cr),oe[Cr+Ci]=!0}}return S===n?Lr(Ve):Li(Ve),Ve}}function eh(S,A,W){return po(S,A,W,!0)}function th(S,A,W){return po(S,A,W,!1)}var rh=th,nh=eh;jn.Fragment=n,jn.jsx=rh,jn.jsxs=nh})()),jn}var vo;function ch(){return vo||(vo=1,process.env.NODE_ENV==="production"?fs.exports=oh():fs.exports=lh()),fs.exports}var o=ch(),Oi,yo;function uh(){if(yo)return Oi;yo=1;function e(w){this._maxSize=w,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(w){return this._values[w]},e.prototype.set=function(w,E){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=E};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,l=new e(a),u=new e(a),d=new e(a);Oi={Cache:e,split:h,normalizePath:f,setter:function(w){var E=f(w);return u.get(w)||u.set(w,function(k,m){for(var x=0,L=E.length,T=k;x<L-1;){var C=E[x];if(C==="__proto__"||C==="constructor"||C==="prototype")return k;T=T[E[x++]]}T[E[x]]=m})},getter:function(w,E){var O=f(w);return d.get(w)||d.set(w,function(m){for(var x=0,L=O.length;x<L;)if(m!=null||!E)m=m[O[x++]];else return;return m})},join:function(w){return w.reduce(function(E,O){return E+(v(O)||r.test(O)?"["+O+"]":(E?".":"")+O)},"")},forEach:function(w,E,O){p(Array.isArray(w)?w:h(w),E,O)}};function f(w){return l.get(w)||l.set(w,h(w).map(function(E){return E.replace(i,"$2")}))}function h(w){return w.match(t)||[""]}function p(w,E,O){var k=w.length,m,x,L,T;for(x=0;x<k;x++)m=w[x],m&&(y(m)&&(m='"'+m+'"'),T=v(m),L=!T&&/^\d+$/.test(m),E.call(O,m,T,L,x,w))}function v(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function g(w){return w.match(n)&&!w.match(r)}function b(w){return s.test(w)}function y(w){return!v(w)&&(g(w)||b(w))}return Oi}var Ar=uh(),ji,xo;function dh(){if(xo)return ji;xo=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=f=>f.match(e)||[],r=f=>f[0].toUpperCase()+f.slice(1),n=(f,h)=>t(f).join(h).toLowerCase(),s=f=>t(f).reduce((h,p)=>`${h}${h?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return ji={words:t,upperFirst:r,camelCase:s,pascalCase:f=>r(s(f)),snakeCase:f=>n(f,"_"),kebabCase:f=>n(f,"-"),sentenceCase:f=>r(n(f," ")),titleCase:f=>t(f).map(r).join(" ")},ji}var Mi=dh(),hs={exports:{}},bo;function fh(){if(bo)return hs.exports;bo=1,hs.exports=function(s){return e(t(s),s)},hs.exports.array=e;function e(s,i){var a=s.length,l=new Array(a),u={},d=a,f=r(i),h=n(s);for(i.forEach(function(v){if(!h.has(v[0])||!h.has(v[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)u[d]||p(s[d],d,new Set);return l;function p(v,g,b){if(b.has(v)){var y;try{y=", node was:"+JSON.stringify(v)}catch{y=""}throw new Error("Cyclic dependency"+y)}if(!h.has(v))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(v));if(!u[g]){u[g]=!0;var w=f.get(v)||new Set;if(w=Array.from(w),g=w.length){b.add(v);do{var E=w[--g];p(E,h.get(E),b)}while(g);b.delete(v)}l[--a]=v}}}function t(s){for(var i=new Set,a=0,l=s.length;a<l;a++){var u=s[a];i.add(u[0]),i.add(u[1])}return Array.from(i)}function r(s){for(var i=new Map,a=0,l=s.length;a<l;a++){var u=s[a];i.has(u[0])||i.set(u[0],new Set),i.has(u[1])||i.set(u[1],new Set),i.get(u[0]).add(u[1])}return i}function n(s){for(var i=new Map,a=0,l=s.length;a<l;a++)i.set(s[a],a);return i}return hs.exports}var hh=fh();const ph=qc(hh),gh=Object.prototype.toString,mh=Error.prototype.toString,vh=RegExp.prototype.toString,yh=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",xh=/^Symbol\((.*)\)(.*)$/;function bh(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function wo(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return bh(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return yh.call(e).replace(xh,"Symbol($1)");const n=gh.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+mh.call(e)+"]":n==="RegExp"?vh.call(e):null}function fr(e,t){let r=wo(e,t);return r!==null?r:JSON.stringify(e,function(n,s){let i=wo(this[n],t);return i!==null?i:s},2)}function Zc(e){return e==null?[]:[].concat(e)}let Kc,Jc,Xc,wh=/\$\{\s*(\w+)\s*\}/g;Kc=Symbol.toStringTag;class So{constructor(t,r,n,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Kc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=s,this.errors=[],this.inner=[],Zc(t).forEach(i=>{if(Je.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Jc=Symbol.hasInstance;Xc=Symbol.toStringTag;class Je extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(wh,(s,i)=>fr(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,s,i){const a=new So(t,r,n,s);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Xc]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Je)}static[Jc](t){return So[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Tt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const s=n!=null&&n!==r?` (cast from the value \`${fr(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${fr(r,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${fr(r,!0)}\``+s}},st={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},sr={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Ki={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Sh={isValue:"${path} field must be ${value}"},ks={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Eh={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},kh={notType:e=>{const{path:t,value:r,spec:n}=e,s=n.types.length;if(Array.isArray(r)){if(r.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${r.length} for value: \`${fr(r,!0)}\``;if(r.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${r.length} for value: \`${fr(r,!0)}\``}return Je.formatError(Tt.notType,e)}};Object.assign(Object.create(null),{mixed:Tt,string:st,number:sr,date:Ki,object:ks,array:Eh,boolean:Sh,tuple:kh});const wa=e=>e&&e.__isYupSchema__;class Ns{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:s,otherwise:i}=r,a=typeof n=="function"?n:(...l)=>l.every(u=>u===n);return new Ns(t,(l,u)=>{var d;let f=a(...l)?s:i;return(d=f?.(u))!=null?d:u})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r?.value,r?.parent,r?.context)),s=this.fn(n,t,r);if(s===void 0||s===t)return t;if(!wa(s))throw new TypeError("conditions must return a schema object");return s.resolve(r)}}const ps={context:"$",value:"."};class zr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ps.context,this.isValue=this.key[0]===ps.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?ps.context:this.isValue?ps.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Ar.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let s=this.isContext?n:this.isValue?t:r;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,r){return this.getValue(t,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}zr.prototype.__isYupRef=!0;const Ht=e=>e==null;function en(e){function t({value:r,path:n="",options:s,originalValue:i,schema:a},l,u){const{name:d,test:f,params:h,message:p,skipAbsent:v}=e;let{parent:g,context:b,abortEarly:y=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=s;const E={value:r,parent:g,context:b};function O(P={}){const B=Qc(Object.assign({value:r,originalValue:i,label:a.spec.label,path:P.path||n,spec:a.spec,disableStackTrace:P.disableStackTrace||w},h,P.params),E),z=new Je(Je.formatError(P.message||p,B),r,B.path,P.type||d,B.disableStackTrace);return z.params=B,z}const k=y?l:u;let m={path:n,parent:g,type:d,from:s.from,createError:O,resolve(P){return eu(P,E)},options:s,originalValue:i,schema:a};const x=P=>{Je.isError(P)?k(P):P?u(null):k(O())},L=P=>{Je.isError(P)?k(P):l(P)};if(v&&Ht(r))return x(!0);let C;try{var D;if(C=f.call(m,r,m),typeof((D=C)==null?void 0:D.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${m.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(C).then(x,L)}}catch(P){L(P);return}x(C)}return t.OPTIONS=e,t}function Qc(e,t){if(!e)return e;for(const r of Object.keys(e))e[r]=eu(e[r],t);return e}function eu(e,t){return zr.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Lh(e,t,r,n=r){let s,i,a;return t?(Ar.forEach(t,(l,u,d)=>{let f=u?l.slice(1,l.length-1):l;e=e.resolve({context:n,parent:s,value:r});let h=e.type==="tuple",p=d?parseInt(f,10):0;if(e.innerType||h){if(h&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);s=r,r=r&&r[p],e=h?e.spec.types[p]:e.innerType}if(!d){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);s=r,r=r&&r[f],e=e.fields[f]}i=f,a=u?"["+l+"]":"."+l}),{schema:e,parent:s,parentPath:i}):{parent:s,parentPath:t,schema:e}}class Ps extends Set{describe(){const t=[];for(const r of this.values())t.push(zr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Ps(this.values())}merge(t,r){const n=this.clone();return t.forEach(s=>n.add(s)),r.forEach(s=>n.delete(s)),n}}function nn(e,t=new Map){if(wa(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=nn(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,s]of e.entries())r.set(n,nn(s,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(nn(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,s]of Object.entries(e))r[n]=nn(s,t)}else throw Error(`Unable to clone ${e}`);return r}function Ch(e){if(!(e!=null&&e.length))return;const t=[];let r="",n=!1,s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(a==="["&&!s){r&&(t.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(a==="]"&&!s){r&&(/^\d+$/.test(r)?t.push(r):t.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(a==='"'){s=!s;continue}if(a==="."&&!n&&!s){r&&(t.push(r),r="");continue}r+=a}return r&&t.push(...r.split(".").filter(Boolean)),t}function Oh(e,t){const r=t?`${t}.${e.path}`:e.path;return e.errors.map(n=>({message:n,path:Ch(r)}))}function tu(e,t){var r;if(!((r=e.inner)!=null&&r.length)&&e.errors.length)return Oh(e,t);const n=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(s=>tu(s,n))}class xt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ps,this._blacklist=new Ps,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Tt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t?.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=nn(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const s=Object.assign({},r.spec,n.spec);return n.spec=s,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((s,i)=>i.resolve(s,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,s,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({},r,{value:t})),s=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(s&&Ht(i))return i;let a=fr(t),l=fr(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
31
+
32
+ attempted value: ${a}
33
+ `+(l!==a?`result of cast: ${l}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((s,i)=>i.call(this,s,t,this,r),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,s){let{path:i,originalValue:a=t,strict:l=this.spec.strict}=r,u=t;l||(u=this._cast(u,Object.assign({assert:!1},r)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:i,value:u,originalValue:a,options:r,tests:d},n,f=>{if(f.length)return s(f,u);this.runTests({path:i,value:u,originalValue:a,options:r,tests:this.tests},n,s)})}runTests(t,r,n){let s=!1,{tests:i,value:a,originalValue:l,path:u,options:d}=t,f=b=>{s||(s=!0,r(b,a))},h=b=>{s||(s=!0,n(b,a))},p=i.length,v=[];if(!p)return h([]);let g={value:a,originalValue:l,path:u,options:d,schema:this};for(let b=0;b<i.length;b++){const y=i[b];y(g,f,function(E){E&&(Array.isArray(E)?v.push(...E):v.push(E)),--p<=0&&h(v)})}}asNestedTest({key:t,index:r,parent:n,parentPath:s,originalParent:i,options:a}){const l=t??r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof l=="number";let d=n[l];const f=Object.assign({},a,{strict:!0,parent:n,value:d,originalValue:i[l],key:void 0,[u?"index":"key"]:l,path:u||l.includes(".")?`${s||""}[${u?l:`"${l}"`}]`:(s?`${s}.`:"")+t});return(h,p,v)=>this.resolve(f)._validate(d,f,p,v)}validate(t,r){var n;let s=this.resolve(Object.assign({},r,{value:t})),i=(n=r?.disableStackTrace)!=null?n:s.spec.disableStackTrace;return new Promise((a,l)=>s._validate(t,r,(u,d)=>{Je.isError(u)&&(u.value=d),l(u)},(u,d)=>{u.length?l(new Je(u,d,void 0,void 0,i)):a(d)}))}validateSync(t,r){var n;let s=this.resolve(Object.assign({},r,{value:t})),i,a=(n=r?.disableStackTrace)!=null?n:s.spec.disableStackTrace;return s._validate(t,Object.assign({},r,{sync:!0}),(l,u)=>{throw Je.isError(l)&&(l.value=u),l},(l,u)=>{if(l.length)throw new Je(l,t,void 0,void 0,a);i=u}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Je.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Je.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):nn(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=en({message:r,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=en({message:r,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Tt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Tt.notNull){return this.nullability(!1,t)}required(t=Tt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Tt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),s=en(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(a=>!(a.OPTIONS.name===r.name&&(i||a.OPTIONS.test===s.OPTIONS.test))),n.tests.push(s),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),s=Zc(t).map(i=>new zr(i));return s.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new Ns(s,r):Ns.fromOptions(s,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=en({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Tt.oneOf){let n=this.clone();return t.forEach(s=>{n._whitelist.add(s),n._blacklist.delete(s)}),n.internalTests.whiteList=en({message:r,name:"oneOf",skipAbsent:!0,test(s){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(s)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),n}notOneOf(t,r=Tt.notOneOf){let n=this.clone();return t.forEach(s=>{n._blacklist.add(s),n._whitelist.delete(s)}),n.internalTests.blacklist=en({message:r,name:"notOneOf",test(s){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(s)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:s,optional:i,nullable:a}=r.spec;return{meta:s,label:n,optional:i,nullable:a,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((u,d,f)=>f.findIndex(h=>h.OPTIONS.name===u.OPTIONS.name)===d).map(u=>{const d=u.OPTIONS.params&&t?Qc(Object.assign({},u.OPTIONS.params),t):u.OPTIONS.params;return{name:u.OPTIONS.name,params:d}})}}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(s){if(s instanceof Je)return{issues:tu(s)};throw s}}}}}xt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])xt.prototype[`${e}At`]=function(t,r,n={}){const{parent:s,parentPath:i,schema:a}=Lh(this,t,r,n.context);return a[e](s&&s[i],Object.assign({},n,{parent:s,path:t}))};for(const e of["equals","is"])xt.prototype[e]=xt.prototype.oneOf;for(const e of["not","nope"])xt.prototype[e]=xt.prototype.notOneOf;const jh=()=>!0;function pr(e){return new ru(e)}class ru extends xt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:jh},t))}}pr.prototype=ru.prototype;const Mh=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _h(e){const t=Ji(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Ji(e){var t,r;const n=Mh.exec(e);return n?{year:zt(n[1]),month:zt(n[2],1)-1,day:zt(n[3],1),hour:zt(n[4]),minute:zt(n[5]),second:zt(n[6]),millisecond:n[7]?zt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:zt(n[10]),minuteOffset:zt(n[11])}:null}function zt(e,t=0){return Number(e)||t}let Th=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Nh=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ph=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Dh="^\\d{4}-\\d{2}-\\d{2}",Ah="\\d{2}:\\d{2}:\\d{2}",Rh="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ih=new RegExp(`${Dh}T${Ah}(\\.\\d+)?${Rh}$`),Fh=e=>Ht(e)||e===e.trim(),$h={}.toString();function Pt(){return new nu}class nu extends xt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r)=>{if(!this.spec.coerce||this.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===$h?t:n})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Tt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=st.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=st.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=st.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,s,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:s,name:i}=r:s=r),this.test({name:i||"matches",message:s||st.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&n||a.search(t)!==-1})}email(t=st.email){return this.matches(Th,{name:"email",message:t,excludeEmptyString:!0})}url(t=st.url){return this.matches(Nh,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=st.uuid){return this.matches(Ph,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,s;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:s=void 0}=t:r=t),this.matches(Ih,{name:"datetime",message:r||st.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||st.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const a=Ji(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||st.datetime_precision,params:{precision:s},skipAbsent:!0,test:i=>{if(!i||s==null)return!0;const a=Ji(i);return a?a.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=st.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Fh})}lowercase(t=st.lowercase){return this.transform(r=>Ht(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ht(r)||r===r.toLowerCase()})}uppercase(t=st.uppercase){return this.transform(r=>Ht(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ht(r)||r===r.toUpperCase()})}}Pt.prototype=nu.prototype;let Uh=e=>e!=+e;function St(){return new su}class su extends xt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Uh(t)}}),this.withMutation(()=>{this.transform((t,r)=>{if(!this.spec.coerce)return t;let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)||n===null?n:parseFloat(n)})})}min(t,r=sr.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=sr.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=sr.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=sr.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=sr.positive){return this.moreThan(0,t)}negative(t=sr.negative){return this.lessThan(0,t)}integer(t=sr.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ht(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(s=>Ht(s)?s:Math[t](s))}}St.prototype=su.prototype;let zh=new Date(""),Bh=e=>Object.prototype.toString.call(e)==="[object Date]";class Sa extends xt{constructor(){super({type:"date",check(t){return Bh(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r)=>!this.spec.coerce||this.isType(t)||t===null?t:(t=_h(t),isNaN(t)?Sa.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(zr.isRef(t))n=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=s}return n}min(t,r=Ki.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(n)}})}max(t,r=Ki.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(n)}})}}Sa.INVALID_DATE=zh;function Vh(e,t=[]){let r=[],n=new Set,s=new Set(t.map(([a,l])=>`${a}-${l}`));function i(a,l){let u=Ar.split(a)[0];n.add(u),s.has(`${l}-${u}`)||r.push([l,u])}for(const a of Object.keys(e)){let l=e[a];n.add(a),zr.isRef(l)&&l.isSibling?i(l.path,a):wa(l)&&"deps"in l&&l.deps.forEach(u=>i(u,a))}return ph.array(Array.from(n),r).reverse()}function Eo(e,t){let r=1/0;return e.some((n,s)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=s,!0}),r}function iu(e){return(t,r)=>Eo(e,t)-Eo(e,r)}const Yh=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ls(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ls(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ls(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ls)}):"optional"in e?e.optional():e}const Wh=(e,t)=>{const r=[...Ar.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),s=Ar.getter(Ar.join(r),!0)(e);return!!(s&&n in s)};let ko=e=>Object.prototype.toString.call(e)==="[object Object]";function Lo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Hh=iu([]);function gr(e){return new au(e)}class au extends xt{constructor(t){super({type:"object",check(r){return ko(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Hh,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let s=super._cast(t,r);if(s===void 0)return this.getDefault(r);if(!this._typeCheck(s))return s;let i=this.fields,a=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(s).filter(h=>!this._nodes.includes(h))),u={},d=Object.assign({},r,{parent:u,__validating:r.__validating||!1}),f=!1;for(const h of l){let p=i[h],v=h in s,g=s[h];if(p){let b;d.path=(r.path?`${r.path}.`:"")+h,p=p.resolve({value:g,context:r.context,parent:u});let y=p instanceof xt?p.spec:void 0,w=y?.strict;if(y!=null&&y.strip){f=f||h in s;continue}b=!r.__validating||!w?p.cast(g,d):g,b!==void 0&&(u[h]=b)}else v&&!a&&(u[h]=g);(v!==h in u||u[h]!==g)&&(f=!0)}return f?u:s}_validate(t,r={},n,s){let{from:i=[],originalValue:a=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:a},...i],r.__validating=!0,r.originalValue=a,super._validate(t,r,n,(u,d)=>{if(!l||!ko(d)){s(u,d);return}a=a||d;let f=[];for(let h of this._nodes){let p=this.fields[h];!p||zr.isRef(p)||f.push(p.asNestedTest({options:r,key:h,parent:d,parentPath:r.path,originalParent:a}))}this.runTests({tests:f,value:d,originalValue:a,options:r},n,h=>{s(h.sort(this._sortErrors).concat(u),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[s,i]of Object.entries(this.fields)){const a=n[s];n[s]=a===void 0?i:a}return r.withMutation(s=>s.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var s;const i=this.fields[n];let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(a):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Vh(t,r),n._sortErrors=iu(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let s=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),s=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),s)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ls(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,s])=>t.includes(n)&&t.includes(s)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let s=Ar.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return Wh(i,t)&&(a=Object.assign({},i),n||delete a[t],a[r]=s(i)),a})}json(){return this.transform(Yh)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||ks.exact,test(r){if(r==null)return!0;const n=Lo(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=ks.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(s){if(s==null)return!0;const i=Lo(this.schema,s);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=ks.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const s of Object.keys(r))n[t(s)]=r[s];return n})}camelCase(){return this.transformKeys(Mi.camelCase)}snakeCase(){return this.transformKeys(Mi.snakeCase)}constantCase(){return this.transformKeys(t=>Mi.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,a]of Object.entries(r.fields)){var s;let l=t;(s=l)!=null&&s.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.fields[i]=a.describe(l)}return n}}gr.prototype=au.prototype;const ou=({children:e,active:t,className:r,duration:n=500})=>{const s=c.useRef(null),[i,a]=c.useState(t?"auto":"0px");return c.useEffect(()=>{const l=s.current;if(l)if(t){a(`${l.scrollHeight}px`);const u=setTimeout(()=>{a("auto")},n);return()=>clearTimeout(u)}else i==="auto"?(a(`${l.scrollHeight}px`),setTimeout(()=>{a("0px")},10)):a("0px")},[t,n]),o.jsx("div",{className:I("transition-all overflow-hidden",r),style:{height:i,transitionDuration:`${n}ms`},"aria-hidden":!t,ref:s,children:e})},dn=({className:e,color:t="default",children:r,...n})=>{const s={primary:"bg-indigo-600 text-white dark:bg-indigo-500",success:"bg-green-600 text-white dark:bg-green-700",warning:"bg-yellow-400 text-gray-900 dark:bg-yellow-500 dark:text-gray-900",danger:"bg-red-600 text-white dark:bg-red-500",default:"bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-100"};return o.jsx("div",{className:I("inline-block truncate px-3 py-1 rounded-full text-xs font-semibold select-none",s[t],e),...n,children:r})},Ea=({children:e,className:t,disabled:r,...n})=>o.jsx("button",{className:I("inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-semibold shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 border-2 cursor-pointer",t,r?"pointer-events-none opacity-50":""),...n,children:e}),ei=({label:e,id:t,checked:r,onChangeChecked:n,disabled:s,className:i,...a})=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{...a,type:"checkbox",id:t,checked:r,disabled:s,onChange:l=>n(l.target.checked),className:I("h-4 w-4 text-indigo-600 border-gray-300 rounded focus:ring-indigo-500 dark:text-indigo-400 dark:border-gray-600",s?"pointer-events-none":"cursor-pointer",i)}),o.jsx("label",{htmlFor:t,className:I("text-xs font-medium text-gray-800 cursor-pointer dark:text-gray-200",s&&"opacity-70"),children:o.jsx("p",{children:e})})]});var lu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Co=c.createContext&&c.createContext(lu),Gh=["attr","size","title"];function qh(e,t){if(e==null)return{};var r=Zh(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Zh(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ds.apply(this,arguments)}function Oo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function As(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oo(Object(r),!0).forEach(function(n){Kh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kh(e,t,r){return t=Jh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jh(e){var t=Xh(e,"string");return typeof t=="symbol"?t:t+""}function Xh(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cu(e){return e&&e.map((t,r)=>c.createElement(t.tag,As({key:r},t.attr),cu(t.child)))}function X(e){return t=>c.createElement(Qh,Ds({attr:As({},e.attr)},t),cu(e.child))}function Qh(e){var t=r=>{var{attr:n,size:s,title:i}=e,a=qh(e,Gh),l=s||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),c.createElement("svg",Ds({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:u,style:As(As({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&c.createElement("title",null,i),e.children)};return Co!==void 0?c.createElement(Co.Consumer,null,r=>t(r)):t(lu)}function ep(e){return X({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{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 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function tp(e){return X({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"},child:[]}]})(e)}function rp(e){return X({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 5h2v3h10V5h2v5h2V5c0-1.1-.9-2-2-2h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h6v-2H5V5zm7-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z"},child:[]},{tag:"path",attr:{d:"M21 11.5 15.51 17l-3.01-3-1.5 1.5 4.51 4.5 6.99-7z"},child:[]}]})(e)}function uu(e){return X({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m12 2-5.5 9h11L12 2zm0 3.84L13.93 9h-3.87L12 5.84zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5zM3 21.5h8v-8H3v8zm2-6h4v4H5v-4z"},child:[]}]})(e)}function du(e){return X({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5 1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"},child:[]}]})(e)}function fu(e){return X({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z",opacity:".87"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"},child:[]}]})(e)}const Rn=({title:e,description:t,wrapperClassName:r})=>o.jsxs("div",{className:I("flex items-center py-2 px-3 bg-red-100 text-red-700 border border-red-700 rounded text-sm",r),role:"alert",children:[o.jsx(ep,{className:"min-w-6 min-h-6 mr-2"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:e}),o.jsx("p",{children:t})]})]});function Bn(e){"@babel/helpers - typeof";return Bn=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},Bn(e)}function np(e,t){if(Bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sp(e){var t=np(e,"string");return Bn(t)=="symbol"?t:t+""}function _(e,t,r){return(t=sp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _i,jo;function ip(){if(jo)return _i;jo=1;var e=process.env.NODE_ENV,t=function(n,s,i,a,l,u,d,f){if(e!=="production"&&s===void 0)throw new Error("invariant requires an error message argument");if(!n){var h;if(s===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[i,a,l,u,d,f],v=0;h=new Error(s.replace(/%s/g,function(){return p[v++]})),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return _i=t,_i}var ap=ip(),Ge=hu(ap),he=c.createContext(null);function op(){Ge(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var e=c.useContext(he);return Ge(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}function lp(e,t,r){return Object.keys(e).reduce(function(s,i){return t(s,e[i],i)},r)}function cp(e,t){Object.keys(e).forEach(r=>t(e[r],r))}function up(e,t,r,n){var s={},i=(a,l)=>{var u=r[l];u!==t[l]&&(s[l]=u,a(n,u))};return cp(e,i),s}function dp(e,t,r){var n=lp(r,function(i,a,l){return typeof e[l]=="function"&&i.push(google.maps.event.addListener(t,a,e[l])),i},[]);return n}function fp(e){google.maps.event.removeListener(e)}function ye(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];e.forEach(fp)}function ve(e){var{updaterMap:t,eventMap:r,prevProps:n,nextProps:s,instance:i}=e,a=dp(s,i,r);return up(t,n,s,i),a}var Mo={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},_o={extraMapTypes(e,t){t.forEach(function(n,s){e.mapTypes.set(String(s),n)})},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};function hp(e){var{children:t,options:r,id:n,mapContainerStyle:s,mapContainerClassName:i,center:a,onClick:l,onDblClick:u,onDrag:d,onDragEnd:f,onDragStart:h,onMouseMove:p,onMouseOut:v,onMouseOver:g,onMouseDown:b,onMouseUp:y,onRightClick:w,onCenterChanged:E,onLoad:O,onUnmount:k}=e,[m,x]=c.useState(null),L=c.useRef(null),[T,C]=c.useState(null),[D,P]=c.useState(null),[B,z]=c.useState(null),[Y,q]=c.useState(null),[U,re]=c.useState(null),[ee,ce]=c.useState(null),[ae,ne]=c.useState(null),[se,Z]=c.useState(null),[de,N]=c.useState(null),[ke,we]=c.useState(null),[te,Te]=c.useState(null),[K,pe]=c.useState(null);return c.useEffect(()=>{r&&m!==null&&m.setOptions(r)},[m,r]),c.useEffect(()=>{m!==null&&typeof a<"u"&&m.setCenter(a)},[m,a]),c.useEffect(()=>{m&&u&&(D!==null&&google.maps.event.removeListener(D),P(google.maps.event.addListener(m,"dblclick",u)))},[u]),c.useEffect(()=>{m&&f&&(B!==null&&google.maps.event.removeListener(B),z(google.maps.event.addListener(m,"dragend",f)))},[f]),c.useEffect(()=>{m&&h&&(Y!==null&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(m,"dragstart",h)))},[h]),c.useEffect(()=>{m&&b&&(U!==null&&google.maps.event.removeListener(U),re(google.maps.event.addListener(m,"mousedown",b)))},[b]),c.useEffect(()=>{m&&p&&(ee!==null&&google.maps.event.removeListener(ee),ce(google.maps.event.addListener(m,"mousemove",p)))},[p]),c.useEffect(()=>{m&&v&&(ae!==null&&google.maps.event.removeListener(ae),ne(google.maps.event.addListener(m,"mouseout",v)))},[v]),c.useEffect(()=>{m&&g&&(se!==null&&google.maps.event.removeListener(se),Z(google.maps.event.addListener(m,"mouseover",g)))},[g]),c.useEffect(()=>{m&&y&&(de!==null&&google.maps.event.removeListener(de),N(google.maps.event.addListener(m,"mouseup",y)))},[y]),c.useEffect(()=>{m&&w&&(ke!==null&&google.maps.event.removeListener(ke),we(google.maps.event.addListener(m,"rightclick",w)))},[w]),c.useEffect(()=>{m&&l&&(te!==null&&google.maps.event.removeListener(te),Te(google.maps.event.addListener(m,"click",l)))},[l]),c.useEffect(()=>{m&&d&&(K!==null&&google.maps.event.removeListener(K),pe(google.maps.event.addListener(m,"drag",d)))},[d]),c.useEffect(()=>{m&&E&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(m,"center_changed",E)))},[l]),c.useEffect(()=>{var V=L.current===null?null:new google.maps.Map(L.current,r);return x(V),V!==null&&O&&O(V),()=>{V!==null&&k&&k(V)}},[]),o.jsx("div",{id:n,ref:L,style:s,className:i,children:o.jsx(he.Provider,{value:m,children:m!==null?t:null})})}c.memo(hp);let pu=class extends c.PureComponent{constructor(){super(...arguments),_(this,"state",{map:null}),_(this,"registeredEvents",[]),_(this,"mapRef",null),_(this,"getInstance",()=>this.mapRef===null?null:new google.maps.Map(this.mapRef,this.props.options)),_(this,"panTo",t=>{var r=this.getInstance();r&&r.panTo(t)}),_(this,"setMapCallback",()=>{this.state.map!==null&&this.props.onLoad&&this.props.onLoad(this.state.map)}),_(this,"getRef",t=>{this.mapRef=t})}componentDidMount(){var t=this.getInstance();this.registeredEvents=ve({updaterMap:_o,eventMap:Mo,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{map:t}},this.setMapCallback)}componentDidUpdate(t){this.state.map!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:_o,eventMap:Mo,prevProps:t,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),ye(this.registeredEvents))}render(){return o.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:o.jsx(he.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})}};function To(e,t,r,n,s,i,a){try{var l=e[i](a),u=l.value}catch(d){return void r(d)}l.done?t(u):Promise.resolve(u).then(n,s)}function gu(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var i=e.apply(t,r);function a(u){To(i,n,s,a,l,"next",u)}function l(u){To(i,n,s,a,l,"throw",u)}a(void 0)})}}function mu(e){var{googleMapsApiKey:t,googleMapsClientId:r,version:n="weekly",language:s,region:i,libraries:a,channel:l,mapIds:u,authReferrerPolicy:d,apiUrl:f="https://maps.googleapis.com"}=e,h=[];return Ge(t&&r||!(t&&r),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),t?h.push("key=".concat(t)):r&&h.push("client=".concat(r)),n&&h.push("v=".concat(n)),s&&h.push("language=".concat(s)),i&&h.push("region=".concat(i)),a&&a.length&&h.push("libraries=".concat(a.sort().join(","))),l&&h.push("channel=".concat(l)),u&&u.length&&h.push("map_ids=".concat(u.join(","))),d&&h.push("auth_referrer_policy=".concat(d)),h.push("loading=async"),h.push("callback=initMap"),"".concat(f,"/maps/api/js?").concat(h.join("&"))}var or=typeof document<"u";function vu(e){var{url:t,id:r,nonce:n}=e;return or?new Promise(function(i,a){var l=document.getElementById(r),u=window;if(l){var d=l.getAttribute("data-state");if(l.src===t&&d!=="error"){if(d==="ready")return i(r);var f=u.initMap,h=l.onerror;u.initMap=function(){f&&f(),i(r)},l.onerror=function(v){h&&h(v),a(v)};return}else l.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=t,p.id=r,p.async=!0,p.nonce=n||"",p.onerror=function(g){p.setAttribute("data-state","error"),a(g)},u.initMap=function(){p.setAttribute("data-state","ready"),i(r)},document.head.appendChild(p)}).catch(s=>{throw console.error("injectScript error: ",s),s}):Promise.reject(new Error("document is undefined"))}function No(e){var t=e.href;return t&&(t.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:e.tagName.toLowerCase()==="style"&&e.styleSheet&&e.styleSheet.cssText&&e.styleSheet.cssText.replace(`\r
34
+ `,"").indexOf(".gm-style")===0?(e.styleSheet.cssText="",!0):e.tagName.toLowerCase()==="style"&&e.innerHTML&&e.innerHTML.replace(`\r
35
+ `,"").indexOf(".gm-style")===0?(e.innerHTML="",!0):e.tagName.toLowerCase()==="style"&&!e.styleSheet&&!e.innerHTML}function ka(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(s,i){return No(s)||Reflect.apply(t,e,[s,i]),s};var r=e.appendChild.bind(e);e.appendChild=function(s){return No(s)||Reflect.apply(r,e,[s]),s}}}var Mn=!1;function yu(){return o.jsx("div",{children:"Loading..."})}var Vn={id:"script-loader",version:"weekly"};class pp extends c.PureComponent{constructor(){super(...arguments),_(this,"check",null),_(this,"state",{loaded:!1}),_(this,"cleanupCallback",()=>{delete window.google.maps,this.injectScript()}),_(this,"isCleaningUp",gu(function*(){function t(r){if(!Mn)r();else if(or)var n=window.setInterval(function(){Mn||(window.clearInterval(n),r())},1)}return new Promise(t)})),_(this,"cleanup",()=>{Mn=!0;var t=document.getElementById(this.props.id);t&&t.parentNode&&t.parentNode.removeChild(t),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(n){return typeof n.src=="string"&&n.src.includes("maps.googleapis")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(n){return n.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(n){return n.innerText!==void 0&&n.innerText.length>0&&n.innerText.includes(".gm-")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)})}),_(this,"injectScript",()=>{this.props.preventGoogleFontsLoading&&ka(),Ge(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);var t={id:this.props.id,nonce:this.props.nonce,url:mu(this.props)};vu(t).then(()=>{this.props.onLoad&&this.props.onLoad(),this.setState(function(){return{loaded:!0}})}).catch(r=>{this.props.onError&&this.props.onError(r),console.error(`
36
+ There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",`) to <LoadScript />
37
+ Otherwise it is a Network issue.
38
+ `))})}),_(this,"getRef",t=>{this.check=t})}componentDidMount(){if(or){if(window.google&&window.google.maps&&!Mn){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}}componentDidUpdate(t){this.props.libraries!==t.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),or&&t.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))}componentWillUnmount(){if(or){this.cleanup();var t=()=>{this.check||(delete window.google,Mn=!1)};window.setTimeout(t,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:this.getRef}),this.state.loaded?this.props.children:this.props.loadingElement||o.jsx(yu,{})]})}}_(pp,"defaultProps",Vn);function gp(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function La(e,t){if(e==null)return{};var r,n,s=gp(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var Po;function mp(e){var{id:t=Vn.id,version:r=Vn.version,nonce:n,googleMapsApiKey:s,googleMapsClientId:i,language:a,region:l,libraries:u,preventGoogleFontsLoading:d,channel:f,mapIds:h,authReferrerPolicy:p,apiUrl:v="https://maps.googleapis.com"}=e,g=c.useRef(!1),[b,y]=c.useState(!1),[w,E]=c.useState(void 0);c.useEffect(function(){return g.current=!0,()=>{g.current=!1}},[]),c.useEffect(function(){or&&d&&ka()},[d]),c.useEffect(function(){b&&Ge(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[b]);var O=mu({version:r,googleMapsApiKey:s,googleMapsClientId:i,language:a,region:l,libraries:u,channel:f,mapIds:h,authReferrerPolicy:p,apiUrl:v});c.useEffect(function(){if(!or)return;function x(){g.current&&(y(!0),Po=O)}if(window.google&&window.google.maps&&Po===O){x();return}vu({id:t,url:O,nonce:n}).then(x).catch(function(T){g.current&&E(T),console.warn(`
39
+ There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(i||"-",`)
40
+ Otherwise it is a Network issue.
41
+ `)),console.error(T)})},[t,O,n]);var k=c.useRef(void 0);return c.useEffect(function(){k.current&&u!==k.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),k.current=u},[u]),{isLoaded:b,loadError:w,url:O}}var vp=["loadingElement","onLoad","onError","onUnmount","children"],yp=o.jsx(yu,{});function xp(e){var{loadingElement:t,onLoad:r,onError:n,onUnmount:s,children:i}=e,a=La(e,vp),{isLoaded:l,loadError:u}=mp(a);return c.useEffect(function(){l&&typeof r=="function"&&r()},[l,r]),c.useEffect(function(){u&&typeof n=="function"&&n(u)},[u,n]),c.useEffect(function(){return()=>{s&&s()}},[s]),l?i:t||yp}c.memo(xp);function bp(e,t,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function l(f){try{d(n.next(f))}catch(h){a(h)}}function u(f){try{d(n.throw(f))}catch(h){a(h)}}function d(f){f.done?i(f.value):s(f.value).then(l,u)}d((n=n.apply(e,[])).next())})}function wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sp=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},Ep=wp(Sp),Do="__googleMapsScriptId",sn;(function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"})(sn||(sn={}));class Tr{constructor(t){var{apiKey:r,authReferrerPolicy:n,channel:s,client:i,id:a=Do,language:l,libraries:u=[],mapIds:d,nonce:f,region:h,retries:p=3,url:v="https://maps.googleapis.com/maps/api/js",version:g}=t;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=r,this.authReferrerPolicy=n,this.channel=s,this.client=i,this.id=a||Do,this.language=l,this.libraries=u,this.mapIds=d,this.nonce=f,this.region=h,this.retries=p,this.url=v,this.version=g,Tr.instance){if(!Ep(this.options,Tr.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(Tr.instance.options)));return Tr.instance}Tr.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?sn.FAILURE:this.done?sn.SUCCESS:this.loading?sn.LOADING:sn.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){var t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+="&key=".concat(this.apiKey)),this.channel&&(t+="&channel=".concat(this.channel)),this.client&&(t+="&client=".concat(this.client)),this.libraries.length>0&&(t+="&libraries=".concat(this.libraries.join(","))),this.language&&(t+="&language=".concat(this.language)),this.region&&(t+="&region=".concat(this.region)),this.version&&(t+="&v=".concat(this.version)),this.mapIds&&(t+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(t+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),t}deleteScript(){var t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((t,r)=>{this.loadCallback(n=>{n?r(n.error):t(window.google)})})}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,r;if(document.getElementById(this.id)){this.callback();return}var n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach(i=>!n[i]&&delete n[i]),!((r=(t=window?.google)===null||t===void 0?void 0:t.maps)===null||r===void 0)&&r.importLibrary||(i=>{var a,l,u,d="The Google Maps JavaScript API",f="google",h="importLibrary",p="__ib__",v=document,g=window;g=g[f]||(g[f]={});var b=g.maps||(g.maps={}),y=new Set,w=new URLSearchParams,E=()=>a||(a=new Promise((O,k)=>bp(this,void 0,void 0,function*(){var m;yield l=v.createElement("script"),l.id=this.id,w.set("libraries",[...y]+"");for(u in i)w.set(u.replace(/[A-Z]/g,x=>"_"+x[0].toLowerCase()),i[u]);w.set("callback",f+".maps."+p),l.src=this.url+"?"+w,b[p]=O,l.onerror=()=>a=k(Error(d+" could not load.")),l.nonce=this.nonce||((m=v.querySelector("script[nonce]"))===null||m===void 0?void 0:m.nonce)||"",v.head.append(l)})));b[h]?console.warn(d+" only loads once. Ignoring:",i):b[h]=function(O){for(var k=arguments.length,m=new Array(k>1?k-1:0),x=1;x<k;x++)m[x-1]=arguments[x];return y.add(O)&&E().then(()=>b[h](O,...m))}})(n);var s=this.libraries.map(i=>this.importLibrary(i));s.length||s.push(this.importLibrary("core")),Promise.all(s).then(()=>this.callback(),i=>{var a=new ErrorEvent("error",{error:i});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){var r=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(r," ms.")),setTimeout(()=>{this.deleteScript(),this.setScript()},r)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(t=>{t(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}}var kp=["maps"];function Ca(e){var{id:t=Vn.id,version:r=Vn.version,nonce:n,googleMapsApiKey:s,language:i,region:a,libraries:l=kp,preventGoogleFontsLoading:u,mapIds:d,authReferrerPolicy:f}=e,h=c.useRef(!1),[p,v]=c.useState(!1),[g,b]=c.useState(void 0);c.useEffect(function(){return h.current=!0,()=>{h.current=!1}},[]);var y=c.useMemo(()=>new Tr({id:t,apiKey:s,version:r,libraries:l,language:i||"en",region:a||"US",mapIds:d||[],nonce:n||"",authReferrerPolicy:f||"origin"}),[t,s,r,l,i,a,d,n,f]);c.useEffect(function(){p||y.load().then(()=>{h.current&&v(!0)}).catch(O=>{b(O)})},[]),c.useEffect(()=>{or&&u&&ka()},[u]);var w=c.useRef();return c.useEffect(()=>{w.current&&l!==w.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),w.current=l},[l]),{isLoaded:p,loadError:g}}function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ao(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ro={},Io={options(e,t){e.setOptions(t)}};function Lp(e){var{options:t,onLoad:r,onUnmount:n}=e,s=c.useContext(he),[i,a]=c.useState(null);return c.useEffect(()=>{i!==null&&i.setMap(s)},[s]),c.useEffect(()=>{t&&i!==null&&i.setOptions(t)},[i,t]),c.useEffect(()=>{var l=new google.maps.TrafficLayer(Rs(Rs({},t),{},{map:s}));return a(l),r&&r(l),()=>{i!==null&&(n&&n(i),i.setMap(null))}},[]),null}c.memo(Lp);class Cp extends c.PureComponent{constructor(){super(...arguments),_(this,"state",{trafficLayer:null}),_(this,"setTrafficLayerCallback",()=>{this.state.trafficLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)}),_(this,"registeredEvents",[])}componentDidMount(){var t=new google.maps.TrafficLayer(Rs(Rs({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:Io,eventMap:Ro,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{trafficLayer:t}},this.setTrafficLayerCallback)}componentDidUpdate(t){this.state.trafficLayer!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Io,eventMap:Ro,prevProps:t,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),ye(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}_(Cp,"contextType",he);function Op(e){var{onLoad:t,onUnmount:r}=e,n=c.useContext(he),[s,i]=c.useState(null);return c.useEffect(()=>{s!==null&&s.setMap(n)},[n]),c.useEffect(()=>{var a=new google.maps.BicyclingLayer;return i(a),a.setMap(n),t&&t(a),()=>{a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(Op);class jp extends c.PureComponent{constructor(){super(...arguments),_(this,"state",{bicyclingLayer:null}),_(this,"setBicyclingLayerCallback",()=>{this.state.bicyclingLayer!==null&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))})}componentDidMount(){var t=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:t}),this.setBicyclingLayerCallback)}componentWillUnmount(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}_(jp,"contextType",he);function Mp(e){var{onLoad:t,onUnmount:r}=e,n=c.useContext(he),[s,i]=c.useState(null);return c.useEffect(()=>{s!==null&&s.setMap(n)},[n]),c.useEffect(()=>{var a=new google.maps.TransitLayer;return i(a),a.setMap(n),t&&t(a),()=>{s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(Mp);class _p extends c.PureComponent{constructor(){super(...arguments),_(this,"state",{transitLayer:null}),_(this,"setTransitLayerCallback",()=>{this.state.transitLayer!==null&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))})}componentDidMount(){var t=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:t}},this.setTransitLayerCallback)}componentWillUnmount(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}_(_p,"contextType",he);function Fo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Is(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fo(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $o={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Uo={drawingMode(e,t){e.setDrawingMode(t)},options(e,t){e.setOptions(t)}};function Tp(e){var{options:t,drawingMode:r,onCircleComplete:n,onMarkerComplete:s,onOverlayComplete:i,onPolygonComplete:a,onPolylineComplete:l,onRectangleComplete:u,onLoad:d,onUnmount:f}=e,h=c.useContext(he),[p,v]=c.useState(null),[g,b]=c.useState(null),[y,w]=c.useState(null),[E,O]=c.useState(null),[k,m]=c.useState(null),[x,L]=c.useState(null),[T,C]=c.useState(null);return c.useEffect(()=>{p!==null&&p.setMap(h)},[h]),c.useEffect(()=>{t&&p!==null&&p.setOptions(t)},[p,t]),c.useEffect(()=>{p!==null&&p.setDrawingMode(r??null)},[p,r]),c.useEffect(()=>{p&&n&&(g!==null&&google.maps.event.removeListener(g),b(google.maps.event.addListener(p,"circlecomplete",n)))},[p,n]),c.useEffect(()=>{p&&s&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(p,"markercomplete",s)))},[p,s]),c.useEffect(()=>{p&&i&&(E!==null&&google.maps.event.removeListener(E),O(google.maps.event.addListener(p,"overlaycomplete",i)))},[p,i]),c.useEffect(()=>{p&&a&&(k!==null&&google.maps.event.removeListener(k),m(google.maps.event.addListener(p,"polygoncomplete",a)))},[p,a]),c.useEffect(()=>{p&&l&&(x!==null&&google.maps.event.removeListener(x),L(google.maps.event.addListener(p,"polylinecomplete",l)))},[p,l]),c.useEffect(()=>{p&&u&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(p,"rectanglecomplete",u)))},[p,u]),c.useEffect(()=>{Ge(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var D=new google.maps.drawing.DrawingManager(Is(Is({},t),{},{map:h}));return r&&D.setDrawingMode(r),n&&b(google.maps.event.addListener(D,"circlecomplete",n)),s&&w(google.maps.event.addListener(D,"markercomplete",s)),i&&O(google.maps.event.addListener(D,"overlaycomplete",i)),a&&m(google.maps.event.addListener(D,"polygoncomplete",a)),l&&L(google.maps.event.addListener(D,"polylinecomplete",l)),u&&C(google.maps.event.addListener(D,"rectanglecomplete",u)),v(D),d&&d(D),()=>{p!==null&&(g&&google.maps.event.removeListener(g),y&&google.maps.event.removeListener(y),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),f&&f(p),p.setMap(null))}},[]),null}c.memo(Tp);class Np extends c.PureComponent{constructor(t){super(t),_(this,"registeredEvents",[]),_(this,"state",{drawingManager:null}),_(this,"setDrawingManagerCallback",()=>{this.state.drawingManager!==null&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)}),Ge(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var t=new google.maps.drawing.DrawingManager(Is(Is({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:Uo,eventMap:$o,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{drawingManager:t}},this.setDrawingManagerCallback)}componentDidUpdate(t){this.state.drawingManager!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Uo,eventMap:$o,prevProps:t,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),ye(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}_(Np,"contextType",he);function zo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zo(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Bo={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Vo={animation(e,t){e.setAnimation(t)},clickable(e,t){e.setClickable(t)},cursor(e,t){e.setCursor(t)},draggable(e,t){e.setDraggable(t)},icon(e,t){e.setIcon(t)},label(e,t){e.setLabel(t)},map(e,t){e.setMap(t)},opacity(e,t){e.setOpacity(t)},options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},shape(e,t){e.setShape(t)},title(e,t){e.setTitle(t)},visible(e,t){e.setVisible(t)},zIndex(e,t){e.setZIndex(t)}},Fs={};function Pp(e){var{position:t,options:r,clusterer:n,noClustererRedraw:s,children:i,draggable:a,visible:l,animation:u,clickable:d,cursor:f,icon:h,label:p,opacity:v,shape:g,title:b,zIndex:y,onClick:w,onDblClick:E,onDrag:O,onDragEnd:k,onDragStart:m,onMouseOut:x,onMouseOver:L,onMouseUp:T,onMouseDown:C,onRightClick:D,onClickableChanged:P,onCursorChanged:B,onAnimationChanged:z,onDraggableChanged:Y,onFlatChanged:q,onIconChanged:U,onPositionChanged:re,onShapeChanged:ee,onTitleChanged:ce,onVisibleChanged:ae,onZindexChanged:ne,onLoad:se,onUnmount:Z}=e,de=c.useContext(he),[N,ke]=c.useState(null),[we,te]=c.useState(null),[Te,K]=c.useState(null),[pe,V]=c.useState(null),[qe,rt]=c.useState(null),[me,jt]=c.useState(null),[Ft,xr]=c.useState(null),[lt,Gr]=c.useState(null),[tr,j]=c.useState(null),[F,G]=c.useState(null),[J,le]=c.useState(null),[ge,$e]=c.useState(null),[Ze,$t]=c.useState(null),[Mt,qr]=c.useState(null),[rr,br]=c.useState(null),[nr,cs]=c.useState(null),[Zr,Kr]=c.useState(null),[wr,Ut]=c.useState(null),[Jr,Xr]=c.useState(null),[Sr,us]=c.useState(null),[Er,ds]=c.useState(null),[kr,Cn]=c.useState(null);c.useEffect(()=>{N!==null&&N.setMap(de)},[de]),c.useEffect(()=>{typeof r<"u"&&N!==null&&N.setOptions(r)},[N,r]),c.useEffect(()=>{typeof a<"u"&&N!==null&&N.setDraggable(a)},[N,a]),c.useEffect(()=>{t&&N!==null&&N.setPosition(t)},[N,t]),c.useEffect(()=>{typeof l<"u"&&N!==null&&N.setVisible(l)},[N,l]),c.useEffect(()=>{N?.setAnimation(u)},[N,u]),c.useEffect(()=>{N&&d!==void 0&&N.setClickable(d)},[N,d]),c.useEffect(()=>{N&&f!==void 0&&N.setCursor(f)},[N,f]),c.useEffect(()=>{N&&h!==void 0&&N.setIcon(h)},[N,h]),c.useEffect(()=>{N&&p!==void 0&&N.setLabel(p)},[N,p]),c.useEffect(()=>{N&&v!==void 0&&N.setOpacity(v)},[N,v]),c.useEffect(()=>{N&&g!==void 0&&N.setShape(g)},[N,g]),c.useEffect(()=>{N&&b!==void 0&&N.setTitle(b)},[N,b]),c.useEffect(()=>{N&&y!==void 0&&N.setZIndex(y)},[N,y]),c.useEffect(()=>{N&&E&&(we!==null&&google.maps.event.removeListener(we),te(google.maps.event.addListener(N,"dblclick",E)))},[E]),c.useEffect(()=>{N&&k&&(Te!==null&&google.maps.event.removeListener(Te),K(google.maps.event.addListener(N,"dragend",k)))},[k]),c.useEffect(()=>{N&&m&&(pe!==null&&google.maps.event.removeListener(pe),V(google.maps.event.addListener(N,"dragstart",m)))},[m]),c.useEffect(()=>{N&&C&&(qe!==null&&google.maps.event.removeListener(qe),rt(google.maps.event.addListener(N,"mousedown",C)))},[C]),c.useEffect(()=>{N&&x&&(me!==null&&google.maps.event.removeListener(me),jt(google.maps.event.addListener(N,"mouseout",x)))},[x]),c.useEffect(()=>{N&&L&&(Ft!==null&&google.maps.event.removeListener(Ft),xr(google.maps.event.addListener(N,"mouseover",L)))},[L]),c.useEffect(()=>{N&&T&&(lt!==null&&google.maps.event.removeListener(lt),Gr(google.maps.event.addListener(N,"mouseup",T)))},[T]),c.useEffect(()=>{N&&D&&(tr!==null&&google.maps.event.removeListener(tr),j(google.maps.event.addListener(N,"rightclick",D)))},[D]),c.useEffect(()=>{N&&w&&(F!==null&&google.maps.event.removeListener(F),G(google.maps.event.addListener(N,"click",w)))},[w]),c.useEffect(()=>{N&&O&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(N,"drag",O)))},[O]),c.useEffect(()=>{N&&P&&(ge!==null&&google.maps.event.removeListener(ge),$e(google.maps.event.addListener(N,"clickable_changed",P)))},[P]),c.useEffect(()=>{N&&B&&(Ze!==null&&google.maps.event.removeListener(Ze),$t(google.maps.event.addListener(N,"cursor_changed",B)))},[B]),c.useEffect(()=>{N&&z&&(Mt!==null&&google.maps.event.removeListener(Mt),qr(google.maps.event.addListener(N,"animation_changed",z)))},[z]),c.useEffect(()=>{N&&Y&&(rr!==null&&google.maps.event.removeListener(rr),br(google.maps.event.addListener(N,"draggable_changed",Y)))},[Y]),c.useEffect(()=>{N&&q&&(nr!==null&&google.maps.event.removeListener(nr),cs(google.maps.event.addListener(N,"flat_changed",q)))},[q]),c.useEffect(()=>{N&&U&&(Zr!==null&&google.maps.event.removeListener(Zr),Kr(google.maps.event.addListener(N,"icon_changed",U)))},[U]),c.useEffect(()=>{N&&re&&(wr!==null&&google.maps.event.removeListener(wr),Ut(google.maps.event.addListener(N,"position_changed",re)))},[re]),c.useEffect(()=>{N&&ee&&(Jr!==null&&google.maps.event.removeListener(Jr),Xr(google.maps.event.addListener(N,"shape_changed",ee)))},[ee]),c.useEffect(()=>{N&&ce&&(Sr!==null&&google.maps.event.removeListener(Sr),us(google.maps.event.addListener(N,"title_changed",ce)))},[ce]),c.useEffect(()=>{N&&ae&&(Er!==null&&google.maps.event.removeListener(Er),ds(google.maps.event.addListener(N,"visible_changed",ae)))},[ae]),c.useEffect(()=>{N&&ne&&(kr!==null&&google.maps.event.removeListener(kr),Cn(google.maps.event.addListener(N,"zindex_changed",ne)))},[ne]),c.useEffect(()=>{var Lr=on(on(on({},r||Fs),n?Fs:{map:de}),{},{position:t}),oe=new google.maps.Marker(Lr);return n?n.addMarker(oe,!!s):oe.setMap(de),t&&oe.setPosition(t),typeof l<"u"&&oe.setVisible(l),typeof a<"u"&&oe.setDraggable(a),typeof d<"u"&&oe.setClickable(d),typeof f=="string"&&oe.setCursor(f),h&&oe.setIcon(h),typeof p<"u"&&oe.setLabel(p),typeof v<"u"&&oe.setOpacity(v),g&&oe.setShape(g),typeof b=="string"&&oe.setTitle(b),typeof y=="number"&&oe.setZIndex(y),E&&te(google.maps.event.addListener(oe,"dblclick",E)),k&&K(google.maps.event.addListener(oe,"dragend",k)),m&&V(google.maps.event.addListener(oe,"dragstart",m)),C&&rt(google.maps.event.addListener(oe,"mousedown",C)),x&&jt(google.maps.event.addListener(oe,"mouseout",x)),L&&xr(google.maps.event.addListener(oe,"mouseover",L)),T&&Gr(google.maps.event.addListener(oe,"mouseup",T)),D&&j(google.maps.event.addListener(oe,"rightclick",D)),w&&G(google.maps.event.addListener(oe,"click",w)),O&&le(google.maps.event.addListener(oe,"drag",O)),P&&$e(google.maps.event.addListener(oe,"clickable_changed",P)),B&&$t(google.maps.event.addListener(oe,"cursor_changed",B)),z&&qr(google.maps.event.addListener(oe,"animation_changed",z)),Y&&br(google.maps.event.addListener(oe,"draggable_changed",Y)),q&&cs(google.maps.event.addListener(oe,"flat_changed",q)),U&&Kr(google.maps.event.addListener(oe,"icon_changed",U)),re&&Ut(google.maps.event.addListener(oe,"position_changed",re)),ee&&Xr(google.maps.event.addListener(oe,"shape_changed",ee)),ce&&us(google.maps.event.addListener(oe,"title_changed",ce)),ae&&ds(google.maps.event.addListener(oe,"visible_changed",ae)),ne&&Cn(google.maps.event.addListener(oe,"zindex_changed",ne)),ke(oe),se&&se(oe),()=>{we!==null&&google.maps.event.removeListener(we),Te!==null&&google.maps.event.removeListener(Te),pe!==null&&google.maps.event.removeListener(pe),qe!==null&&google.maps.event.removeListener(qe),me!==null&&google.maps.event.removeListener(me),Ft!==null&&google.maps.event.removeListener(Ft),lt!==null&&google.maps.event.removeListener(lt),tr!==null&&google.maps.event.removeListener(tr),F!==null&&google.maps.event.removeListener(F),ge!==null&&google.maps.event.removeListener(ge),Ze!==null&&google.maps.event.removeListener(Ze),Mt!==null&&google.maps.event.removeListener(Mt),rr!==null&&google.maps.event.removeListener(rr),nr!==null&&google.maps.event.removeListener(nr),Zr!==null&&google.maps.event.removeListener(Zr),wr!==null&&google.maps.event.removeListener(wr),Sr!==null&&google.maps.event.removeListener(Sr),Er!==null&&google.maps.event.removeListener(Er),kr!==null&&google.maps.event.removeListener(kr),Z&&Z(oe),n?n.removeMarker(oe,!!s):oe&&oe.setMap(null)}},[]);var Li=c.useMemo(()=>i?c.Children.map(i,Lr=>{if(!c.isValidElement(Lr))return Lr;var oe=Lr;return c.cloneElement(oe,{anchor:N})}):null,[i,N]);return o.jsx(o.Fragment,{children:Li})||null}var xu=c.memo(Pp);class Dp extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[])}componentDidMount(){var t=this;return gu(function*(){var r=on(on(on({},t.props.options||Fs),t.props.clusterer?Fs:{map:t.context}),{},{position:t.props.position});t.marker=new google.maps.Marker(r),t.props.clusterer?t.props.clusterer.addMarker(t.marker,!!t.props.noClustererRedraw):t.marker.setMap(t.context),t.registeredEvents=ve({updaterMap:Vo,eventMap:Bo,prevProps:{},nextProps:t.props,instance:t.marker}),t.props.onLoad&&t.props.onLoad(t.marker)})()}componentDidUpdate(t){this.marker&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Vo,eventMap:Bo,prevProps:t,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ye(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){var t=this.props.children?c.Children.map(this.props.children,r=>{if(!c.isValidElement(r))return r;var n=r;return c.cloneElement(n,{anchor:this.marker})}):null;return t||null}}_(Dp,"contextType",he);var Ap=(function(){function e(t,r){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=r,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(t){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var r=this.cluster.getClusterer();if(google.maps.event.trigger(r,"click",this.cluster),google.maps.event.trigger(r,"clusterclick",this.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),s=this.cluster.getBounds(),i=r.getMap();i!==null&&"fitBounds"in i&&i.fitBounds(s),this.timeOut=window.setTimeout(function(){var a=r.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(s);var l=a.getZoom()||0;n!==null&&l>n&&a.setZoom(n+1)}},100)}t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var t;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(t=this.getPanes())===null||t===void 0||t.overlayMouseTarget.appendChild(this.div);var r=this.getMap();r!==null&&(this.boundsChangedListener=google.maps.event.addListener(r,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var t=this.getPosFromLatLng(this.center);this.div.style.top=t!==null?"".concat(t.y,"px"):"0",this.div.style.left=t!==null?"".concat(t.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var t,r,n,s,i,a;if(this.div&&this.center){var l=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),d=parseInt(((t=u[0])===null||t===void 0?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((r=u[1])===null||r===void 0?void 0:r.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=l,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(d,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(d+this.width,"px, -").concat(f+this.height,", -").concat(d,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((n=this.sums)===null||n===void 0)&&n.text&&(v.innerText="".concat((s=this.sums)===null||s===void 0?void 0:s.text)),!((i=this.sums)===null||i===void 0)&&i.html&&(v.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(v),this.div.title=l,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(t){this.sums=t;var r=this.cluster.getClusterer().getStyles(),n=r[Math.min(r.length-1,Math.max(0,t.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},e.prototype.setCenter=function(t){this.center=t},e.prototype.getPosFromLatLng=function(t){var r=this.getProjection().fromLatLngToDivPixel(t);return r!==null&&(r.x-=this.anchorIcon[1],r.y-=this.anchorIcon[0]),r},e})(),Rp=(function(){function e(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new Ap(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),r=this.getMarkers(),n=0,s=r;n<s.length;n++){var i=s[n],a=i.getPosition();a&&t.extend(a)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){var r;if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var n=t.getPosition();if(n){var s=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(s-1)+n.lat())/s,(this.center.lng()*(s-1)+n.lng())/s),this.calculateBounds()}}}else{var n=t.getPosition();n&&(this.center=n,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var i=this.markers.length,a=this.markerClusterer.getMaxZoom(),l=(r=this.map)===null||r===void 0?void 0:r.getZoom();if(a!==null&&typeof l<"u"&&l>a)t.getMap()!==this.map&&t.setMap(this.map);else if(i<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(i===this.minClusterSize)for(var u=0,d=this.markers;u<d.length;u++){var f=d[u];f.setMap(null)}else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(this.bounds!==null){var r=t.getPosition();if(r)return this.bounds.contains(r)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t,r=this.markers.length,n=this.markerClusterer.getMaxZoom(),s=(t=this.map)===null||t===void 0?void 0:t.getZoom();if(n!==null&&typeof s<"u"&&s>n){this.clusterIcon.hide();return}if(r<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var r=0;r<this.markers.length;r++)if(t===this.markers[r])return!0;return!1},e})();function Ip(e,t){var r=e.length,n=r.toString().length,s=Math.min(n,t);return{text:r.toString(),index:s,title:""}}var Fp=2e3,$p=500,Up="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",zp="png",Bp=[53,56,66,78,90],Vp="cluster",bu=(function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(e,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,n.zoomOnClick!==void 0&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,n.averageCenter!==void 0&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,n.ignoreHidden!==void 0&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,n.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||Up,this.imageExtension=n.imageExtension||zp,this.imageSizes=n.imageSizes||Bp,this.calculator=n.calculator||Ip,this.batchSize=n.batchSize||Fp,this.batchSizeIE=n.batchSizeIE||$p,this.clusterClass=n.clusterClass||Vp,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(t)}return e.prototype.onZoomChanged=function(){var t,r;this.resetViewport(!1),(((t=this.getMap())===null||t===void 0?void 0:t.getZoom())===(this.get("minZoom")||0)||((r=this.getMap())===null||r===void 0?void 0:r.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},e.prototype.onIdle=function(){this.redraw()},e.prototype.onAdd=function(){var t=this.getMap();this.activeMap=t,this.ready=!0,this.repaint(),t!==null&&(this.listeners=[google.maps.event.addListener(t,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(t,"idle",this.onIdle)])},e.prototype.onRemove=function(){for(var t=0,r=this.markers;t<r.length;t++){var n=r[t];n.getMap()!==this.activeMap&&n.setMap(this.activeMap)}for(var s=0,i=this.clusters;s<i.length;s++){var a=i[s];a.remove()}this.clusters=[];for(var l=0,u=this.listeners;l<u.length;l++){var d=u[l];google.maps.event.removeListener(d)}this.listeners=[],this.activeMap=null,this.ready=!1},e.prototype.draw=function(){},e.prototype.getMap=function(){return null},e.prototype.getPanes=function(){return null},e.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},e.prototype.setMap=function(){},e.prototype.addListener=function(){return{remove:function(){}}},e.prototype.bindTo=function(){},e.prototype.get=function(){},e.prototype.notify=function(){},e.prototype.set=function(){},e.prototype.setValues=function(){},e.prototype.unbind=function(){},e.prototype.unbindAll=function(){},e.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:"".concat(this.imagePath+(t+1),".").concat(this.imageExtension),height:this.imageSizes[t]||0,width:this.imageSizes[t]||0})},e.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),r=new google.maps.LatLngBounds,n=0,s=t;n<s.length;n++){var i=s[n],a=i.getPosition();a&&r.extend(a)}var l=this.getMap();l!==null&&"fitBounds"in l&&l.fitBounds(r)},e.prototype.getGridSize=function(){return this.gridSize},e.prototype.setGridSize=function(t){this.gridSize=t},e.prototype.getMinimumClusterSize=function(){return this.minClusterSize},e.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},e.prototype.getMaxZoom=function(){return this.maxZoom},e.prototype.setMaxZoom=function(t){this.maxZoom=t},e.prototype.getStyles=function(){return this.styles},e.prototype.setStyles=function(t){this.styles=t},e.prototype.getTitle=function(){return this.title},e.prototype.setTitle=function(t){this.title=t},e.prototype.getZoomOnClick=function(){return this.zoomOnClick},e.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},e.prototype.getAverageCenter=function(){return this.averageCenter},e.prototype.setAverageCenter=function(t){this.averageCenter=t},e.prototype.getIgnoreHidden=function(){return this.ignoreHidden},e.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},e.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},e.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},e.prototype.getImageExtension=function(){return this.imageExtension},e.prototype.setImageExtension=function(t){this.imageExtension=t},e.prototype.getImagePath=function(){return this.imagePath},e.prototype.setImagePath=function(t){this.imagePath=t},e.prototype.getImageSizes=function(){return this.imageSizes},e.prototype.setImageSizes=function(t){this.imageSizes=t},e.prototype.getCalculator=function(){return this.calculator},e.prototype.setCalculator=function(t){this.calculator=t},e.prototype.getBatchSizeIE=function(){return this.batchSizeIE},e.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},e.prototype.getClusterClass=function(){return this.clusterClass},e.prototype.setClusterClass=function(t){this.clusterClass=t},e.prototype.getMarkers=function(){return this.markers},e.prototype.getTotalMarkers=function(){return this.markers.length},e.prototype.getClusters=function(){return this.clusters},e.prototype.getTotalClusters=function(){return this.clusters.length},e.prototype.addMarker=function(t,r){this.pushMarkerTo(t),r||this.redraw()},e.prototype.addMarkers=function(t,r){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];s&&this.pushMarkerTo(s)}r||this.redraw()},e.prototype.pushMarkerTo=function(t){var r=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",function(){r.ready&&(t.isAdded=!1,r.repaint())}),t.isAdded=!1,this.markers.push(t)},e.prototype.removeMarker_=function(t){var r=-1;if(this.markers.indexOf)r=this.markers.indexOf(t);else for(var n=0;n<this.markers.length;n++)if(t===this.markers[n]){r=n;break}return r===-1?!1:(t.setMap(null),this.markers.splice(r,1),!0)},e.prototype.removeMarker=function(t,r){var n=this.removeMarker_(t);return!r&&n&&this.repaint(),n},e.prototype.removeMarkers=function(t,r){for(var n=!1,s=0,i=t;s<i.length;s++){var a=i[s];n=n||this.removeMarker_(a)}return!r&&n&&this.repaint(),n},e.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},e.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var n=0,s=t;n<s.length;n++){var i=s[n];i.remove()}},0)},e.prototype.getExtendedBounds=function(t){var r=this.getProjection(),n=r.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));n!==null&&(n.x+=this.gridSize,n.y-=this.gridSize);var s=r.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));if(s!==null&&(s.x-=this.gridSize,s.y+=this.gridSize),n!==null){var i=r.fromDivPixelToLatLng(n);i!==null&&t.extend(i)}if(s!==null){var a=r.fromDivPixelToLatLng(s);a!==null&&t.extend(a)}return t},e.prototype.redraw=function(){this.createClusters(0)},e.prototype.resetViewport=function(t){for(var r=0,n=this.clusters;r<n.length;r++){var s=n[r];s.remove()}this.clusters=[];for(var i=0,a=this.markers;i<a.length;i++){var l=a[i];l.isAdded=!1,t&&l.setMap(null)}},e.prototype.distanceBetweenPoints=function(t,r){var n=6371,s=(r.lat()-t.lat())*Math.PI/180,i=(r.lng()-t.lng())*Math.PI/180,a=Math.sin(s/2)*Math.sin(s/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(r.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return n*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},e.prototype.isMarkerInBounds=function(t,r){var n=t.getPosition();return n?r.contains(n):!1},e.prototype.addToClosestCluster=function(t){for(var r,n=4e4,s=null,i=0,a=this.clusters;i<a.length;i++){var l=a[i];r=l;var u=r.getCenter(),d=t.getPosition();if(u&&d){var f=this.distanceBetweenPoints(u,d);f<n&&(n=f,s=r)}}s&&s.isMarkerInClusterBounds(t)?s.addMarker(t):(r=new Rp(this),r.addMarker(t),this.clusters.push(r))},e.prototype.createClusters=function(t){var r=this;if(this.ready){t===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var n=this.getMap(),s=n!==null&&("getBounds"in n)?n.getBounds():null,i=n?.getZoom()||0,a=i>3?new google.maps.LatLngBounds(s?.getSouthWest(),s?.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),l=this.getExtendedBounds(a),u=Math.min(t+this.batchSize,this.markers.length),d=t;d<u;d++){var f=this.markers[d];f&&!f.isAdded&&this.isMarkerInBounds(f,l)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){r.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,p=this.clusters;h<p.length;h++){var v=p[h];v.updateIcon()}}}},e.prototype.extend=function(t,r){return(function(s){for(var i in s.prototype){var a=i;this.prototype[a]=s.prototype[a]}return this}).apply(t,[r])},e})();function Yo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Yp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yo(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Le={averageCenter(e,t){e.setAverageCenter(t)},batchSizeIE(e,t){e.setBatchSizeIE(t)},calculator(e,t){e.setCalculator(t)},clusterClass(e,t){e.setClusterClass(t)},enableRetinaIcons(e,t){e.setEnableRetinaIcons(t)},gridSize(e,t){e.setGridSize(t)},ignoreHidden(e,t){e.setIgnoreHidden(t)},imageExtension(e,t){e.setImageExtension(t)},imagePath(e,t){e.setImagePath(t)},imageSizes(e,t){e.setImageSizes(t)},maxZoom(e,t){e.setMaxZoom(t)},minimumClusterSize(e,t){e.setMinimumClusterSize(t)},styles(e,t){e.setStyles(t)},title(e,t){e.setTitle(t)},zoomOnClick(e,t){e.setZoomOnClick(t)}},Wp={};function Hp(e){var{children:t,options:r,averageCenter:n,batchSizeIE:s,calculator:i,clusterClass:a,enableRetinaIcons:l,gridSize:u,ignoreHidden:d,imageExtension:f,imagePath:h,imageSizes:p,maxZoom:v,minimumClusterSize:g,styles:b,title:y,zoomOnClick:w,onClick:E,onClusteringBegin:O,onClusteringEnd:k,onMouseOver:m,onMouseOut:x,onLoad:L,onUnmount:T}=e,[C,D]=c.useState(null),P=c.useContext(he),[B,z]=c.useState(null),[Y,q]=c.useState(null),[U,re]=c.useState(null),[ee,ce]=c.useState(null),[ae,ne]=c.useState(null);return c.useEffect(()=>{C&&x&&(ee!==null&&google.maps.event.removeListener(ee),ce(google.maps.event.addListener(C,gt.onMouseOut,x)))},[x]),c.useEffect(()=>{C&&m&&(ae!==null&&google.maps.event.removeListener(ae),ne(google.maps.event.addListener(C,gt.onMouseOver,m)))},[m]),c.useEffect(()=>{C&&E&&(B!==null&&google.maps.event.removeListener(B),z(google.maps.event.addListener(C,gt.onClick,E)))},[E]),c.useEffect(()=>{C&&O&&(Y!==null&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(C,gt.onClusteringBegin,O)))},[O]),c.useEffect(()=>{C&&k&&(U!==null&&google.maps.event.removeListener(U),q(google.maps.event.addListener(C,gt.onClusteringEnd,k)))},[k]),c.useEffect(()=>{typeof n<"u"&&C!==null&&Le.averageCenter(C,n)},[C,n]),c.useEffect(()=>{typeof s<"u"&&C!==null&&Le.batchSizeIE(C,s)},[C,s]),c.useEffect(()=>{typeof i<"u"&&C!==null&&Le.calculator(C,i)},[C,i]),c.useEffect(()=>{typeof a<"u"&&C!==null&&Le.clusterClass(C,a)},[C,a]),c.useEffect(()=>{typeof l<"u"&&C!==null&&Le.enableRetinaIcons(C,l)},[C,l]),c.useEffect(()=>{typeof u<"u"&&C!==null&&Le.gridSize(C,u)},[C,u]),c.useEffect(()=>{typeof d<"u"&&C!==null&&Le.ignoreHidden(C,d)},[C,d]),c.useEffect(()=>{typeof f<"u"&&C!==null&&Le.imageExtension(C,f)},[C,f]),c.useEffect(()=>{typeof h<"u"&&C!==null&&Le.imagePath(C,h)},[C,h]),c.useEffect(()=>{typeof p<"u"&&C!==null&&Le.imageSizes(C,p)},[C,p]),c.useEffect(()=>{typeof v<"u"&&C!==null&&Le.maxZoom(C,v)},[C,v]),c.useEffect(()=>{typeof g<"u"&&C!==null&&Le.minimumClusterSize(C,g)},[C,g]),c.useEffect(()=>{typeof b<"u"&&C!==null&&Le.styles(C,b)},[C,b]),c.useEffect(()=>{typeof y<"u"&&C!==null&&Le.title(C,y)},[C,y]),c.useEffect(()=>{typeof w<"u"&&C!==null&&Le.zoomOnClick(C,w)},[C,w]),c.useEffect(()=>{if(P){var se=Yp({},r||Wp),Z=new bu(P,[],se);return n&&Le.averageCenter(Z,n),s&&Le.batchSizeIE(Z,s),i&&Le.calculator(Z,i),a&&Le.clusterClass(Z,a),l&&Le.enableRetinaIcons(Z,l),u&&Le.gridSize(Z,u),d&&Le.ignoreHidden(Z,d),f&&Le.imageExtension(Z,f),h&&Le.imagePath(Z,h),p&&Le.imageSizes(Z,p),v&&Le.maxZoom(Z,v),g&&Le.minimumClusterSize(Z,g),b&&Le.styles(Z,b),y&&Le.title(Z,y),w&&Le.zoomOnClick(Z,w),x&&ce(google.maps.event.addListener(Z,gt.onMouseOut,x)),m&&ne(google.maps.event.addListener(Z,gt.onMouseOver,m)),E&&z(google.maps.event.addListener(Z,gt.onClick,E)),O&&q(google.maps.event.addListener(Z,gt.onClusteringBegin,O)),k&&re(google.maps.event.addListener(Z,gt.onClusteringEnd,k)),D(Z),L&&L(Z),()=>{ee!==null&&google.maps.event.removeListener(ee),ae!==null&&google.maps.event.removeListener(ae),B!==null&&google.maps.event.removeListener(B),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),T&&T(Z)}}},[]),C!==null&&t(C)||null}c.memo(Hp);class Gp extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{markerClusterer:null}),_(this,"setClustererCallback",()=>{this.state.markerClusterer!==null&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)})}componentDidMount(){if(this.context){var t=new bu(this.context,[],this.props.options);this.registeredEvents=ve({updaterMap:Le,eventMap:gt,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({markerClusterer:t}),this.setClustererCallback)}}componentDidUpdate(t){this.state.markerClusterer&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Le,eventMap:gt,prevProps:t,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),ye(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null}}_(Gp,"contextType",he);function Wo(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}var wu=(function(){function e(t){t===void 0&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",t.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),typeof t.visible>"u"&&(typeof t.isHidden>"u"?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var t=this,r=function(f){f.returnValue=!1,f.preventDefault&&f.preventDefault(),t.enableEventPropagation||Wo(f)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var n=this.getPanes();if(n!==null&&n[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var s=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-s.left-s.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,l=i;a<l.length;a++){var u=l[a];this.eventListeners.push(google.maps.event.addListener(this.div,u,Wo))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){t.div&&(t.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",r),google.maps.event.trigger(this,"domready")}},e.prototype.getCloseBoxImg=function(){var t="";return this.closeBoxURL!==""&&(t='<img alt=""',t+=' aria-hidden="true"',t+=" src='"+this.closeBoxURL+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin+";",t+="'>"),t},e.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},e.prototype.closeClickHandler=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},e.prototype.getCloseClickHandler=function(){return this.closeClickHandler},e.prototype.panBox=function(t){if(this.div&&!t){var r=this.getMap();if(r instanceof google.maps.Map){var n=0,s=0,i=r.getBounds();i&&!i.contains(this.position)&&r.setCenter(this.position);var a=r.getDiv(),l=a.offsetWidth,u=a.offsetHeight,d=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,p=this.div.offsetHeight,v=this.infoBoxClearance.width,g=this.infoBoxClearance.height,b=this.getProjection(),y=b.fromLatLngToContainerPixel(this.position);y!==null&&(y.x<-d+v?n=y.x+d-v:y.x+h+d+v>l&&(n=y.x+h+d+v-l),this.alignBottom?y.y<-f+g+p?s=y.y+f-g-p:y.y+f+g>u&&(s=y.y+f+g-u):y.y<-f+g?s=y.y+f-g:y.y+p+f+g>u&&(s=y.y+p+f+g-u)),n===0&&s===0||r.panBy(n,s)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var t=this.boxStyle;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.div.style[r]=t[r]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+n*100+')"',this.div.style.filter="alpha(opacity="+n*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var t={top:0,bottom:0,left:0,right:0};if(!this.div)return t;if(document.defaultView){var r=this.div.ownerDocument,n=r&&r.defaultView?r.defaultView.getComputedStyle(this.div,""):null;n&&(t.top=parseInt(n.borderTopWidth||"",10)||0,t.bottom=parseInt(n.borderBottomWidth||"",10)||0,t.left=parseInt(n.borderLeftWidth||"",10)||0,t.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var s=this.div.currentStyle;s&&(t.top=parseInt(s.borderTopWidth||"",10)||0,t.bottom=parseInt(s.borderBottomWidth||"",10)||0,t.left=parseInt(s.borderLeftWidth||"",10)||0,t.right=parseInt(s.borderRightWidth||"",10)||0)}return t},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var t=this.getProjection(),r=t.fromLatLngToDivPixel(this.position);r!==null&&(this.div.style.left=r.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(r.y+this.pixelOffset.height)+"px":this.div.style.top=r.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(t){t===void 0&&(t={}),typeof t.boxClass<"u"&&(this.boxClass=t.boxClass,this.setBoxStyle()),typeof t.boxStyle<"u"&&(this.boxStyle=t.boxStyle,this.setBoxStyle()),typeof t.content<"u"&&this.setContent(t.content),typeof t.disableAutoPan<"u"&&(this.disableAutoPan=t.disableAutoPan),typeof t.maxWidth<"u"&&(this.maxWidth=t.maxWidth),typeof t.pixelOffset<"u"&&(this.pixelOffset=t.pixelOffset),typeof t.alignBottom<"u"&&(this.alignBottom=t.alignBottom),typeof t.position<"u"&&this.setPosition(t.position),typeof t.zIndex<"u"&&this.setZIndex(t.zIndex),typeof t.closeBoxMargin<"u"&&(this.closeBoxMargin=t.closeBoxMargin),typeof t.closeBoxURL<"u"&&(this.closeBoxURL=t.closeBoxURL),typeof t.infoBoxClearance<"u"&&(this.infoBoxClearance=t.infoBoxClearance),typeof t.isHidden<"u"&&(this.isHidden=t.isHidden),typeof t.visible<"u"&&(this.isHidden=!t.visible),typeof t.enableEventPropagation<"u"&&(this.enableEventPropagation=t.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(t){this.content=t,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof t=="string"?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof t=="string"?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(t){this.position=t,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(t){this.isHidden=!t,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(t){this.zIndex=t,this.div&&(this.div.style.zIndex=t+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var t=this.getMap();return typeof t>"u"||t===null?!1:!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(t,r){var n=this;r&&(this.position=r.getPosition(),this.moveListener=google.maps.event.addListener(r,"position_changed",function(){var s=r.getPosition();n.setPosition(s)}),this.mapListener=google.maps.event.addListener(r,"map_changed",function(){n.setMap(r.map)})),this.setMap(t),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var t=0,r=this.eventListeners;t<r.length;t++){var n=r[t];google.maps.event.removeListener(n)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},e.prototype.extend=function(t,r){return(function(s){for(var i in s.prototype)Object.prototype.hasOwnProperty.call(this,i)||(this.prototype[i]=s.prototype[i]);return this}).apply(t,[r])},e})(),qp=["position"],Zp=["position"];function Ho(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function $s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ho(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ho(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Go={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},qo={options(e,t){e.setOptions(t)},position(e,t){t instanceof google.maps.LatLng?e.setPosition(t):e.setPosition(new google.maps.LatLng(t.lat,t.lng))},visible(e,t){e.setVisible(t)},zIndex(e,t){e.setZIndex(t)}},Kp={};function Jp(e){var{children:t,anchor:r,options:n,position:s,zIndex:i,onCloseClick:a,onDomReady:l,onContentChanged:u,onPositionChanged:d,onZindexChanged:f,onLoad:h,onUnmount:p}=e,v=c.useContext(he),[g,b]=c.useState(null),[y,w]=c.useState(null),[E,O]=c.useState(null),[k,m]=c.useState(null),[x,L]=c.useState(null),[T,C]=c.useState(null),D=c.useRef(null);return c.useEffect(()=>{v&&g!==null&&(g.close(),r?g.open(v,r):g.getPosition()&&g.open(v))},[v,g,r]),c.useEffect(()=>{n&&g!==null&&g.setOptions(n)},[g,n]),c.useEffect(()=>{if(s&&g!==null){var P=s instanceof google.maps.LatLng?s:new google.maps.LatLng(s.lat,s.lng);g.setPosition(P)}},[s]),c.useEffect(()=>{typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),c.useEffect(()=>{g&&a&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(g,"closeclick",a)))},[a]),c.useEffect(()=>{g&&l&&(E!==null&&google.maps.event.removeListener(E),O(google.maps.event.addListener(g,"domready",l)))},[l]),c.useEffect(()=>{g&&u&&(k!==null&&google.maps.event.removeListener(k),m(google.maps.event.addListener(g,"content_changed",u)))},[u]),c.useEffect(()=>{g&&d&&(x!==null&&google.maps.event.removeListener(x),L(google.maps.event.addListener(g,"position_changed",d)))},[d]),c.useEffect(()=>{g&&f&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(()=>{if(v){var P=n||Kp,{position:B}=P,z=La(P,qp),Y;B&&!(B instanceof google.maps.LatLng)&&(Y=new google.maps.LatLng(B.lat,B.lng));var q=new wu($s($s({},z),Y?{position:Y}:{}));D.current=document.createElement("div"),b(q),a&&w(google.maps.event.addListener(q,"closeclick",a)),l&&O(google.maps.event.addListener(q,"domready",l)),u&&m(google.maps.event.addListener(q,"content_changed",u)),d&&L(google.maps.event.addListener(q,"position_changed",d)),f&&C(google.maps.event.addListener(q,"zindex_changed",f)),q.setContent(D.current),r?q.open(v,r):q.getPosition()?q.open(v):Ge(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(q)}return()=>{g!==null&&(y&&google.maps.event.removeListener(y),k&&google.maps.event.removeListener(k),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),p&&p(g),g.close())}},[]),D.current?mn.createPortal(c.Children.only(t),D.current):null}c.memo(Jp);class Xp extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"containerElement",null),_(this,"state",{infoBox:null}),_(this,"open",(t,r)=>{r?this.context!==null&&t.open(this.context,r):t.getPosition()?this.context!==null&&t.open(this.context):Ge(!1,"You must provide either an anchor or a position prop for <InfoBox>.")}),_(this,"setInfoBoxCallback",()=>{this.state.infoBox!==null&&this.containerElement!==null&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))})}componentDidMount(){var t=this.props.options||{},{position:r}=t,n=La(t,Zp),s;r&&!(r instanceof google.maps.LatLng)&&(s=new google.maps.LatLng(r.lat,r.lng));var i=new wu($s($s({},n),s?{position:s}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ve({updaterMap:qo,eventMap:Go,prevProps:{},nextProps:this.props,instance:i}),this.setState({infoBox:i},this.setInfoBoxCallback)}componentDidUpdate(t){var{infoBox:r}=this.state;r!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:qo,eventMap:Go,prevProps:t,nextProps:this.props,instance:r}))}componentWillUnmount(){var{onUnmount:t}=this.props,{infoBox:r}=this.state;r!==null&&(t&&t(r),ye(this.registeredEvents),r.close())}render(){return this.containerElement?mn.createPortal(c.Children.only(this.props.children),this.containerElement):null}}_(Xp,"contextType",he);var Ti,Zo;function Qp(){return Zo||(Zo=1,Ti=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ti}var eg=Qp(),Ko=hu(eg),Jo=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ni=1,_n=8;class Oa{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[r,n]=new Uint8Array(t,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");var s=n>>4;if(s!==Ni)throw new Error("Got v".concat(s," data when expected v").concat(Ni,"."));var i=Jo[n&15];if(!i)throw new Error("Unrecognized array type.");var[a]=new Uint16Array(t,2,1),[l]=new Uint32Array(t,4,1);return new Oa(l,a,i,t)}constructor(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:64,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float64Array,s=arguments.length>3?arguments[3]:void 0;if(isNaN(t)||t<0)throw new Error("Unpexpected numItems value: ".concat(t,"."));this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;var i=Jo.indexOf(this.ArrayType),a=t*2*this.ArrayType.BYTES_PER_ELEMENT,l=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(i<0)throw new Error("Unexpected typed array class: ".concat(n,"."));s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,_n,t),this.coords=new this.ArrayType(this.data,_n+l+u,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(_n+a+l+u),this.ids=new this.IndexArrayType(this.data,_n,t),this.coords=new this.ArrayType(this.data,_n+l+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ni<<4)+i]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=t)}add(t,r){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=r,n}finish(){var t=this._pos>>1;if(t!==this.numItems)throw new Error("Added ".concat(t," items when expected ").concat(this.numItems,"."));return Xi(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,n,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:i,coords:a,nodeSize:l}=this,u=[0,i.length-1,0],d=[];u.length;){var f=u.pop()||0,h=u.pop()||0,p=u.pop()||0;if(h-p<=l){for(var v=p;v<=h;v++){var g=a[2*v],b=a[2*v+1];g>=t&&g<=n&&b>=r&&b<=s&&d.push(i[v])}continue}var y=p+h>>1,w=a[2*y],E=a[2*y+1];w>=t&&w<=n&&E>=r&&E<=s&&d.push(i[y]),(f===0?t<=w:r<=E)&&(u.push(p),u.push(y-1),u.push(1-f)),(f===0?n>=w:s>=E)&&(u.push(y+1),u.push(h),u.push(1-f))}return d}within(t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:i,nodeSize:a}=this,l=[0,s.length-1,0],u=[],d=n*n;l.length;){var f=l.pop()||0,h=l.pop()||0,p=l.pop()||0;if(h-p<=a){for(var v=p;v<=h;v++)Xo(i[2*v],i[2*v+1],t,r)<=d&&u.push(s[v]);continue}var g=p+h>>1,b=i[2*g],y=i[2*g+1];Xo(b,y,t,r)<=d&&u.push(s[g]),(f===0?t-n<=b:r-n<=y)&&(l.push(p),l.push(g-1),l.push(1-f)),(f===0?t+n>=b:r+n>=y)&&(l.push(g+1),l.push(h),l.push(1-f))}return u}}function Xi(e,t,r,n,s,i){if(!(s-n<=r)){var a=n+s>>1;Su(e,t,a,n,s,i),Xi(e,t,r,n,a-1,1-i),Xi(e,t,r,a+1,s,1-i)}}function Su(e,t,r,n,s,i){for(;s>n;){if(s-n>600){var a=s-n+1,l=r-n+1,u=Math.log(a),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(a-d)/a)*(l-a/2<0?-1:1),h=Math.max(n,Math.floor(r-l*d/a+f)),p=Math.min(s,Math.floor(r+(a-l)*d/a+f));Su(e,t,r,h,p,i)}var v=t[2*r+i],g=n,b=s;for(Tn(e,t,n,r),t[2*s+i]>v&&Tn(e,t,n,s);g<b;){for(Tn(e,t,g,b),g++,b--;t[2*g+i]<v;)g++;for(;t[2*b+i]>v;)b--}t[2*n+i]===v?Tn(e,t,n,b):(b++,Tn(e,t,b,s)),b<=r&&(n=b+1),r<=b&&(s=b-1)}}function Tn(e,t,r,n){Pi(e,r,n),Pi(t,2*r,2*n),Pi(t,2*r+1,2*n+1)}function Pi(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Xo(e,t,r,n){var s=e-r,i=t-n;return s*s+i*i}var tg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Qo=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),Or=2,ar=3,Di=4,ir=5,Eu=6;class rg{constructor(t){this.options=Object.assign(Object.create(tg),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){var{log:r,minZoom:n,maxZoom:s}=this.options;r&&console.time("total time");var i="prepare ".concat(t.length," points");r&&console.time(i),this.points=t;for(var a=[],l=0;l<t.length;l++){var u=t[l];if(u.geometry){var[d,f]=u.geometry.coordinates,h=Qo(gs(d)),p=Qo(ms(f));a.push(h,p,1/0,l,-1,1),this.options.reduce&&a.push(0)}}var v=this.trees[s+1]=this._createTree(a);r&&console.timeEnd(i);for(var g=s;g>=n;g--){var b=+Date.now();v=this.trees[g]=this._createTree(this._cluster(v,g)),r&&console.log("z%d: %d clusters in %dms",g,v.numItems,+Date.now()-b)}return r&&console.timeEnd("total time"),this}getClusters(t,r){var n=((t[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,t[1])),i=t[2]===180?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var l=this.getClusters([n,s,180,a],r),u=this.getClusters([-180,s,i,a],r);return l.concat(u)}var d=this.trees[this._limitZoom(r)],f=d.range(gs(n),ms(a),gs(i),ms(s)),h=d.data,p=[];for(var v of f){var g=this.stride*v;p.push(h[g+ir]>1?el(h,g,this.clusterProps):this.points[h[g+ar]])}return p}getChildren(t){var r=this._getOriginId(t),n=this._getOriginZoom(t),s="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(s);var a=i.data;if(r*this.stride>=a.length)throw new Error(s);var l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=a[r*this.stride],d=a[r*this.stride+1],f=i.within(u,d,l),h=[];for(var p of f){var v=p*this.stride;a[v+Di]===t&&h.push(a[v+ir]>1?el(a,v,this.clusterProps):this.points[a[v+ar]])}if(h.length===0)throw new Error(s);return h}getLeaves(t,r,n){r=r||10,n=n||0;var s=[];return this._appendLeaves(s,t,r,n,0),s}getTile(t,r,n){var s=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:a,radius:l}=this.options,u=l/a,d=(n-u)/i,f=(n+1+u)/i,h={features:[]};return this._addTileFeatures(s.range((r-u)/i,d,(r+1+u)/i,f),s.data,r,n,i,h),r===0&&this._addTileFeatures(s.range(1-u/i,d,1,f),s.data,i,n,i,h),r===i-1&&this._addTileFeatures(s.range(0,d,u/i,f),s.data,-1,n,i,h),h.features.length?h:null}getClusterExpansionZoom(t){for(var r=this._getOriginZoom(t)-1;r<=this.options.maxZoom;){var n=this.getChildren(t);if(r++,n.length!==1)break;t=n[0].properties.cluster_id}return r}_appendLeaves(t,r,n,s,i){var a=this.getChildren(r);for(var l of a){var u=l.properties;if(u&&u.cluster?i+u.point_count<=s?i+=u.point_count:i=this._appendLeaves(t,u.cluster_id,n,s,i):i<s?i++:t.push(l),t.length===n)break}return i}_createTree(t){for(var r=new Oa(t.length/this.stride|0,this.options.nodeSize,Float32Array),n=0;n<t.length;n+=this.stride)r.add(t[n],t[n+1]);return r.finish(),r.data=t,r}_addTileFeatures(t,r,n,s,i,a){for(var l of t){var u=l*this.stride,d=r[u+ir]>1,f=void 0,h=void 0,p=void 0;if(d)f=ku(r,u,this.clusterProps),h=r[u],p=r[u+1];else{var v=this.points[r[u+ar]];f=v.properties;var[g,b]=v.geometry.coordinates;h=gs(g),p=ms(b)}var y={type:1,geometry:[[Math.round(this.options.extent*(h*i-n)),Math.round(this.options.extent*(p*i-s))]],tags:f},w=void 0;d||this.options.generateId?w=r[u+ar]:w=this.points[r[u+ar]].id,w!==void 0&&(y.id=w),a.features.push(y)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,r){for(var{radius:n,extent:s,reduce:i,minPoints:a}=this.options,l=n/(s*Math.pow(2,r)),u=t.data,d=[],f=this.stride,h=0;h<u.length;h+=f)if(!(u[h+Or]<=r)){u[h+Or]=r;var p=u[h],v=u[h+1],g=t.within(u[h],u[h+1],l),b=u[h+ir],y=b;for(var w of g){var E=w*f;u[E+Or]>r&&(y+=u[E+ir])}if(y>b&&y>=a){var O=p*b,k=v*b,m=void 0,x=-1,L=((h/f|0)<<5)+(r+1)+this.points.length;for(var T of g){var C=T*f;if(!(u[C+Or]<=r)){u[C+Or]=r;var D=u[C+ir];O+=u[C]*D,k+=u[C+1]*D,u[C+Di]=L,i&&(m||(m=this._map(u,h,!0),x=this.clusterProps.length,this.clusterProps.push(m)),i(m,this._map(u,C)))}}u[h+Di]=L,d.push(O/y,k/y,1/0,L,-1,y),i&&d.push(x)}else{for(var P=0;P<f;P++)d.push(u[h+P]);if(y>1)for(var B of g){var z=B*f;if(!(u[z+Or]<=r)){u[z+Or]=r;for(var Y=0;Y<f;Y++)d.push(u[z+Y])}}}}return d}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,r,n){if(t[r+ir]>1){var s=this.clusterProps[t[r+Eu]];return n?Object.assign({},s):s}var i=this.points[t[r+ar]].properties,a=this.options.map(i);return n&&a===i?Object.assign({},a):a}}function el(e,t,r){return{type:"Feature",id:e[t+ar],properties:ku(e,t,r),geometry:{type:"Point",coordinates:[ng(e[t]),sg(e[t+1])]}}}function ku(e,t,r){var n=e[t+ir],s=n>=1e4?"".concat(Math.round(n/1e3),"k"):n>=1e3?"".concat(Math.round(n/100)/10,"k"):n,i=e[t+Eu],a=i===-1?{}:Object.assign({},r[i]);return Object.assign(a,{cluster:!0,cluster_id:e[t+ar],point_count:n,point_count_abbreviated:s})}function gs(e){return e/360+.5}function ms(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function ng(e){return(e-.5)*360}function sg(e){var t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}/*! *****************************************************************************
42
+ Copyright (c) Microsoft Corporation.
43
+
44
+ Permission to use, copy, modify, and/or distribute this software for any
45
+ purpose with or without fee is hereby granted.
46
+
47
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
48
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
49
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
50
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
51
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
52
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
53
+ PERFORMANCE OF THIS SOFTWARE.
54
+ ***************************************************************************** */function ig(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}class ut{static isAdvancedMarkerAvailable(t){return google.maps.marker&&t.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,r){this.isAdvancedMarker(t)?t.map=r:t.setMap(r)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return this.isAdvancedMarker(t)?!0:t.getVisible()}}class Qi{constructor(t){var{markers:r,position:n}=t;this.markers=r,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(!(this.markers.length===0&&!this._position)){var t=new google.maps.LatLngBounds(this._position,this._position);for(var r of this.markers)t.extend(ut.getPosition(r));return t}}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>ut.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(ut.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class ag{constructor(t){var{maxZoom:r=16}=t;this.maxZoom=r}noop(t){var{markers:r}=t;return og(r)}}var og=e=>{var t=e.map(r=>new Qi({position:ut.getPosition(r),markers:[r]}));return t};class lg extends ag{constructor(t){var{maxZoom:r,radius:n=60}=t,s=ig(t,["maxZoom","radius"]);super({maxZoom:r}),this.state={zoom:-1},this.superCluster=new rg(Object.assign({maxZoom:this.maxZoom,radius:n},s))}calculate(t){var r=!1,n={zoom:t.map.getZoom()};if(!Ko(t.markers,this.markers)){r=!0,this.markers=[...t.markers];var s=this.markers.map(i=>{var a=ut.getPosition(i),l=[a.lng(),a.lat()];return{type:"Feature",geometry:{type:"Point",coordinates:l},properties:{marker:i}}});this.superCluster.load(s)}return r||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(r=!Ko(this.state,n)),this.state=n,r&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:r}}cluster(t){var{map:r}=t;return this.superCluster.getClusters([-180,-90,180,90],Math.round(r.getZoom())).map(n=>this.transformCluster(n))}transformCluster(t){var{geometry:{coordinates:[r,n]},properties:s}=t;if(s.cluster)return new Qi({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map(a=>a.properties.marker),position:{lat:n,lng:r}});var i=s.marker;return new Qi({markers:[i],position:ut.getPosition(i)})}}class cg{constructor(t,r){this.markers={sum:t.length};var n=r.map(i=>i.count),s=n.reduce((i,a)=>i+a,0);this.clusters={count:r.length,markers:{mean:s/r.length,sum:s,min:Math.min(...n),max:Math.max(...n)}}}}class ug{render(t,r,n){var{count:s,position:i}=t,a=s>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff",l='<svg fill="'.concat(a,`" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
55
+ <circle cx="120" cy="120" opacity=".6" r="70" />
56
+ <circle cx="120" cy="120" opacity=".3" r="90" />
57
+ <circle cx="120" cy="120" opacity=".2" r="110" />
58
+ <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">`).concat(s,`</text>
59
+ </svg>`),u="Cluster of ".concat(s," markers"),d=Number(google.maps.Marker.MAX_ZINDEX)+s;if(ut.isAdvancedMarkerAvailable(n)){var f=new DOMParser,h=f.parseFromString(l,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");var p={map:n,position:i,zIndex:d,title:u,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}var v={position:i,zIndex:d,title:u,icon:{url:"data:image/svg+xml;base64,".concat(btoa(l)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(v)}}function dg(e,t){for(var r in t.prototype)e.prototype[r]=t.prototype[r]}class ja{constructor(){dg(ja,google.maps.OverlayView)}}var In;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"})(In||(In={}));var fg=(e,t,r)=>{r.fitBounds(t.bounds)};class hg extends ja{constructor(t){var{map:r,markers:n=[],algorithmOptions:s={},algorithm:i=new lg(s),renderer:a=new ug,onClusterClick:l=fg}=t;super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=l,r&&this.setMap(r)}addMarker(t,r){this.markers.includes(t)||(this.markers.push(t),r||this.render())}addMarkers(t,r){t.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(t,r){var n=this.markers.indexOf(t);return n===-1?!1:(ut.setMap(t,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(t,r){var n=!1;return t.forEach(s=>{n=this.removeMarker(s,!0)||n}),n&&!r&&this.render(),n}clearMarkers(t){this.markers.length=0,t||this.render()}render(){var t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,In.CLUSTERING_BEGIN,this);var{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(n||n==null){var s=new Set;for(var i of r)i.markers.length==1&&s.add(i.markers[0]);var a=[];for(var l of this.clusters)l.marker!=null&&(l.markers.length==1?s.has(l.marker)||ut.setMap(l.marker,null):a.push(l.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>a.forEach(u=>ut.setMap(u,null)))}google.maps.event.trigger(this,In.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>ut.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){var t=new cg(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,t,r),n.markers.forEach(s=>ut.setMap(s,null)),this.onClusterClick&&n.marker.addListener("click",s=>{google.maps.event.trigger(this,In.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})),ut.setMap(n.marker,r)})}}function tl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function rl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pg(e){var t=op(),[r,n]=c.useState(null);return c.useEffect(()=>{if(t&&r===null){var s=new hg(rl(rl({},e),{},{map:t}));n(s)}},[t]),r}function gg(e){var{children:t,options:r}=e,n=pg(r);return n!==null?t(n):null}c.memo(gg);var nl={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},sl={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};function mg(e){var{children:t,anchor:r,options:n,position:s,zIndex:i,onCloseClick:a,onDomReady:l,onContentChanged:u,onPositionChanged:d,onZindexChanged:f,onLoad:h,onUnmount:p}=e,v=c.useContext(he),[g,b]=c.useState(null),[y,w]=c.useState(null),[E,O]=c.useState(null),[k,m]=c.useState(null),[x,L]=c.useState(null),[T,C]=c.useState(null),D=c.useRef(null);return c.useEffect(()=>{g!==null&&(g.close(),r?g.open(v,r):g.getPosition()&&g.open(v))},[v,g,r]),c.useEffect(()=>{n&&g!==null&&g.setOptions(n)},[g,n]),c.useEffect(()=>{s&&g!==null&&g.setPosition(s)},[s]),c.useEffect(()=>{typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),c.useEffect(()=>{g&&a&&(y!==null&&google.maps.event.removeListener(y),w(google.maps.event.addListener(g,"closeclick",a)))},[a]),c.useEffect(()=>{g&&l&&(E!==null&&google.maps.event.removeListener(E),O(google.maps.event.addListener(g,"domready",l)))},[l]),c.useEffect(()=>{g&&u&&(k!==null&&google.maps.event.removeListener(k),m(google.maps.event.addListener(g,"content_changed",u)))},[u]),c.useEffect(()=>{g&&d&&(x!==null&&google.maps.event.removeListener(x),L(google.maps.event.addListener(g,"position_changed",d)))},[d]),c.useEffect(()=>{g&&f&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(()=>{var P=new google.maps.InfoWindow(n);return b(P),D.current=document.createElement("div"),a&&w(google.maps.event.addListener(P,"closeclick",a)),l&&O(google.maps.event.addListener(P,"domready",l)),u&&m(google.maps.event.addListener(P,"content_changed",u)),d&&L(google.maps.event.addListener(P,"position_changed",d)),f&&C(google.maps.event.addListener(P,"zindex_changed",f)),P.setContent(D.current),s&&P.setPosition(s),i&&P.setZIndex(i),r?P.open(v,r):P.getPosition()?P.open(v):Ge(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(P),()=>{y&&google.maps.event.removeListener(y),k&&google.maps.event.removeListener(k),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),T&&google.maps.event.removeListener(T),p&&p(P),P.close()}},[]),D.current?mn.createPortal(c.Children.only(t),D.current):null}c.memo(mg);class vg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"containerElement",null),_(this,"state",{infoWindow:null}),_(this,"open",(t,r)=>{r?t.open(this.context,r):t.getPosition()?t.open(this.context):Ge(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")}),_(this,"setInfoWindowCallback",()=>{this.state.infoWindow!==null&&this.containerElement!==null&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))})}componentDidMount(){var t=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=ve({updaterMap:sl,eventMap:nl,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({infoWindow:t}),this.setInfoWindowCallback)}componentDidUpdate(t){this.state.infoWindow!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:sl,eventMap:nl,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){this.state.infoWindow!==null&&(ye(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?mn.createPortal(c.Children.only(this.props.children),this.containerElement):null}}_(vg,"contextType",he);function il(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Us(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?il(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):il(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var al={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ol={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},visible(e,t){e.setVisible(t)}},yg={};function xg(e){var{options:t,draggable:r,editable:n,visible:s,path:i,onDblClick:a,onDragEnd:l,onDragStart:u,onMouseDown:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseUp:v,onRightClick:g,onClick:b,onDrag:y,onLoad:w,onUnmount:E}=e,O=c.useContext(he),[k,m]=c.useState(null),[x,L]=c.useState(null),[T,C]=c.useState(null),[D,P]=c.useState(null),[B,z]=c.useState(null),[Y,q]=c.useState(null),[U,re]=c.useState(null),[ee,ce]=c.useState(null),[ae,ne]=c.useState(null),[se,Z]=c.useState(null),[de,N]=c.useState(null),[ke,we]=c.useState(null);return c.useEffect(()=>{k!==null&&k.setMap(O)},[O]),c.useEffect(()=>{typeof t<"u"&&k!==null&&k.setOptions(t)},[k,t]),c.useEffect(()=>{typeof r<"u"&&k!==null&&k.setDraggable(r)},[k,r]),c.useEffect(()=>{typeof n<"u"&&k!==null&&k.setEditable(n)},[k,n]),c.useEffect(()=>{typeof s<"u"&&k!==null&&k.setVisible(s)},[k,s]),c.useEffect(()=>{typeof i<"u"&&k!==null&&k.setPath(i)},[k,i]),c.useEffect(()=>{k&&a&&(x!==null&&google.maps.event.removeListener(x),L(google.maps.event.addListener(k,"dblclick",a)))},[a]),c.useEffect(()=>{k&&l&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(k,"dragend",l)))},[l]),c.useEffect(()=>{k&&u&&(D!==null&&google.maps.event.removeListener(D),P(google.maps.event.addListener(k,"dragstart",u)))},[u]),c.useEffect(()=>{k&&d&&(B!==null&&google.maps.event.removeListener(B),z(google.maps.event.addListener(k,"mousedown",d)))},[d]),c.useEffect(()=>{k&&f&&(Y!==null&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(k,"mousemove",f)))},[f]),c.useEffect(()=>{k&&h&&(U!==null&&google.maps.event.removeListener(U),re(google.maps.event.addListener(k,"mouseout",h)))},[h]),c.useEffect(()=>{k&&p&&(ee!==null&&google.maps.event.removeListener(ee),ce(google.maps.event.addListener(k,"mouseover",p)))},[p]),c.useEffect(()=>{k&&v&&(ae!==null&&google.maps.event.removeListener(ae),ne(google.maps.event.addListener(k,"mouseup",v)))},[v]),c.useEffect(()=>{k&&g&&(se!==null&&google.maps.event.removeListener(se),Z(google.maps.event.addListener(k,"rightclick",g)))},[g]),c.useEffect(()=>{k&&b&&(de!==null&&google.maps.event.removeListener(de),N(google.maps.event.addListener(k,"click",b)))},[b]),c.useEffect(()=>{k&&y&&(ke!==null&&google.maps.event.removeListener(ke),we(google.maps.event.addListener(k,"drag",y)))},[y]),c.useEffect(()=>{var te=new google.maps.Polyline(Us(Us({},t||yg),{},{map:O}));return i&&te.setPath(i),typeof s<"u"&&te.setVisible(s),typeof n<"u"&&te.setEditable(n),typeof r<"u"&&te.setDraggable(r),a&&L(google.maps.event.addListener(te,"dblclick",a)),l&&C(google.maps.event.addListener(te,"dragend",l)),u&&P(google.maps.event.addListener(te,"dragstart",u)),d&&z(google.maps.event.addListener(te,"mousedown",d)),f&&q(google.maps.event.addListener(te,"mousemove",f)),h&&re(google.maps.event.addListener(te,"mouseout",h)),p&&ce(google.maps.event.addListener(te,"mouseover",p)),v&&ne(google.maps.event.addListener(te,"mouseup",v)),g&&Z(google.maps.event.addListener(te,"rightclick",g)),b&&N(google.maps.event.addListener(te,"click",b)),y&&we(google.maps.event.addListener(te,"drag",y)),m(te),w&&w(te),()=>{x!==null&&google.maps.event.removeListener(x),T!==null&&google.maps.event.removeListener(T),D!==null&&google.maps.event.removeListener(D),B!==null&&google.maps.event.removeListener(B),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),ee!==null&&google.maps.event.removeListener(ee),ae!==null&&google.maps.event.removeListener(ae),se!==null&&google.maps.event.removeListener(se),de!==null&&google.maps.event.removeListener(de),E&&E(te),te.setMap(null)}},[]),null}c.memo(xg);class bg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{polyline:null}),_(this,"setPolylineCallback",()=>{this.state.polyline!==null&&this.props.onLoad&&this.props.onLoad(this.state.polyline)})}componentDidMount(){var t=new google.maps.Polyline(Us(Us({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:ol,eventMap:al,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{polyline:t}},this.setPolylineCallback)}componentDidUpdate(t){this.state.polyline!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:ol,eventMap:al,prevProps:t,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),ye(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}_(bg,"contextType",he);function ll(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ll(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ll(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ul={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},dl={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},paths(e,t){e.setPaths(t)},visible(e,t){e.setVisible(t)}};function wg(e){var{options:t,draggable:r,editable:n,visible:s,path:i,paths:a,onDblClick:l,onDragEnd:u,onDragStart:d,onMouseDown:f,onMouseMove:h,onMouseOut:p,onMouseOver:v,onMouseUp:g,onRightClick:b,onClick:y,onDrag:w,onLoad:E,onUnmount:O,onEdit:k}=e,m=c.useContext(he),[x,L]=c.useState(null),[T,C]=c.useState(null),[D,P]=c.useState(null),[B,z]=c.useState(null),[Y,q]=c.useState(null),[U,re]=c.useState(null),[ee,ce]=c.useState(null),[ae,ne]=c.useState(null),[se,Z]=c.useState(null),[de,N]=c.useState(null),[ke,we]=c.useState(null),[te,Te]=c.useState(null);return c.useEffect(()=>{x!==null&&x.setMap(m)},[m]),c.useEffect(()=>{typeof t<"u"&&x!==null&&x.setOptions(t)},[x,t]),c.useEffect(()=>{typeof r<"u"&&x!==null&&x.setDraggable(r)},[x,r]),c.useEffect(()=>{typeof n<"u"&&x!==null&&x.setEditable(n)},[x,n]),c.useEffect(()=>{typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),c.useEffect(()=>{typeof i<"u"&&x!==null&&x.setPath(i)},[x,i]),c.useEffect(()=>{typeof a<"u"&&x!==null&&x.setPaths(a)},[x,a]),c.useEffect(()=>{x&&typeof l=="function"&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(x,"dblclick",l)))},[l]),c.useEffect(()=>{x&&(google.maps.event.addListener(x.getPath(),"insert_at",()=>{k?.(x)}),google.maps.event.addListener(x.getPath(),"set_at",()=>{k?.(x)}),google.maps.event.addListener(x.getPath(),"remove_at",()=>{k?.(x)}))},[x,k]),c.useEffect(()=>{x&&typeof u=="function"&&(D!==null&&google.maps.event.removeListener(D),P(google.maps.event.addListener(x,"dragend",u)))},[u]),c.useEffect(()=>{x&&typeof d=="function"&&(B!==null&&google.maps.event.removeListener(B),z(google.maps.event.addListener(x,"dragstart",d)))},[d]),c.useEffect(()=>{x&&typeof f=="function"&&(Y!==null&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(x,"mousedown",f)))},[f]),c.useEffect(()=>{x&&typeof h=="function"&&(U!==null&&google.maps.event.removeListener(U),re(google.maps.event.addListener(x,"mousemove",h)))},[h]),c.useEffect(()=>{x&&typeof p=="function"&&(ee!==null&&google.maps.event.removeListener(ee),ce(google.maps.event.addListener(x,"mouseout",p)))},[p]),c.useEffect(()=>{x&&typeof v=="function"&&(ae!==null&&google.maps.event.removeListener(ae),ne(google.maps.event.addListener(x,"mouseover",v)))},[v]),c.useEffect(()=>{x&&typeof g=="function"&&(se!==null&&google.maps.event.removeListener(se),Z(google.maps.event.addListener(x,"mouseup",g)))},[g]),c.useEffect(()=>{x&&typeof b=="function"&&(de!==null&&google.maps.event.removeListener(de),N(google.maps.event.addListener(x,"rightclick",b)))},[b]),c.useEffect(()=>{x&&typeof y=="function"&&(ke!==null&&google.maps.event.removeListener(ke),we(google.maps.event.addListener(x,"click",y)))},[y]),c.useEffect(()=>{x&&typeof w=="function"&&(te!==null&&google.maps.event.removeListener(te),Te(google.maps.event.addListener(x,"drag",w)))},[w]),c.useEffect(()=>{var K=new google.maps.Polygon(cl(cl({},t),{},{map:m}));return i&&K.setPath(i),a&&K.setPaths(a),typeof s<"u"&&K.setVisible(s),typeof n<"u"&&K.setEditable(n),typeof r<"u"&&K.setDraggable(r),l&&C(google.maps.event.addListener(K,"dblclick",l)),u&&P(google.maps.event.addListener(K,"dragend",u)),d&&z(google.maps.event.addListener(K,"dragstart",d)),f&&q(google.maps.event.addListener(K,"mousedown",f)),h&&re(google.maps.event.addListener(K,"mousemove",h)),p&&ce(google.maps.event.addListener(K,"mouseout",p)),v&&ne(google.maps.event.addListener(K,"mouseover",v)),g&&Z(google.maps.event.addListener(K,"mouseup",g)),b&&N(google.maps.event.addListener(K,"rightclick",b)),y&&we(google.maps.event.addListener(K,"click",y)),w&&Te(google.maps.event.addListener(K,"drag",w)),L(K),E&&E(K),()=>{T!==null&&google.maps.event.removeListener(T),D!==null&&google.maps.event.removeListener(D),B!==null&&google.maps.event.removeListener(B),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),ee!==null&&google.maps.event.removeListener(ee),ae!==null&&google.maps.event.removeListener(ae),se!==null&&google.maps.event.removeListener(se),de!==null&&google.maps.event.removeListener(de),ke!==null&&google.maps.event.removeListener(ke),O&&O(K),K.setMap(null)}},[]),null}c.memo(wg);class Sg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[])}componentDidMount(){var t=this.props.options||{};this.polygon=new google.maps.Polygon(t),this.polygon.setMap(this.context),this.registeredEvents=ve({updaterMap:dl,eventMap:ul,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(t){this.polygon&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:dl,eventMap:ul,prevProps:t,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),ye(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}_(Sg,"contextType",he);function fl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hl={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},pl={bounds(e,t){e.setBounds(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},visible(e,t){e.setVisible(t)}};function Eg(e){var{options:t,bounds:r,draggable:n,editable:s,visible:i,onDblClick:a,onDragEnd:l,onDragStart:u,onMouseDown:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseUp:v,onRightClick:g,onClick:b,onDrag:y,onBoundsChanged:w,onLoad:E,onUnmount:O}=e,k=c.useContext(he),[m,x]=c.useState(null),[L,T]=c.useState(null),[C,D]=c.useState(null),[P,B]=c.useState(null),[z,Y]=c.useState(null),[q,U]=c.useState(null),[re,ee]=c.useState(null),[ce,ae]=c.useState(null),[ne,se]=c.useState(null),[Z,de]=c.useState(null),[N,ke]=c.useState(null),[we,te]=c.useState(null),[Te,K]=c.useState(null);return c.useEffect(()=>{m!==null&&m.setMap(k)},[k]),c.useEffect(()=>{typeof t<"u"&&m!==null&&m.setOptions(t)},[m,t]),c.useEffect(()=>{typeof n<"u"&&m!==null&&m.setDraggable(n)},[m,n]),c.useEffect(()=>{typeof s<"u"&&m!==null&&m.setEditable(s)},[m,s]),c.useEffect(()=>{typeof i<"u"&&m!==null&&m.setVisible(i)},[m,i]),c.useEffect(()=>{typeof r<"u"&&m!==null&&m.setBounds(r)},[m,r]),c.useEffect(()=>{m&&a&&(L!==null&&google.maps.event.removeListener(L),T(google.maps.event.addListener(m,"dblclick",a)))},[a]),c.useEffect(()=>{m&&l&&(C!==null&&google.maps.event.removeListener(C),D(google.maps.event.addListener(m,"dragend",l)))},[l]),c.useEffect(()=>{m&&u&&(P!==null&&google.maps.event.removeListener(P),B(google.maps.event.addListener(m,"dragstart",u)))},[u]),c.useEffect(()=>{m&&d&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mousedown",d)))},[d]),c.useEffect(()=>{m&&f&&(q!==null&&google.maps.event.removeListener(q),U(google.maps.event.addListener(m,"mousemove",f)))},[f]),c.useEffect(()=>{m&&h&&(re!==null&&google.maps.event.removeListener(re),ee(google.maps.event.addListener(m,"mouseout",h)))},[h]),c.useEffect(()=>{m&&p&&(ce!==null&&google.maps.event.removeListener(ce),ae(google.maps.event.addListener(m,"mouseover",p)))},[p]),c.useEffect(()=>{m&&v&&(ne!==null&&google.maps.event.removeListener(ne),se(google.maps.event.addListener(m,"mouseup",v)))},[v]),c.useEffect(()=>{m&&g&&(Z!==null&&google.maps.event.removeListener(Z),de(google.maps.event.addListener(m,"rightclick",g)))},[g]),c.useEffect(()=>{m&&b&&(N!==null&&google.maps.event.removeListener(N),ke(google.maps.event.addListener(m,"click",b)))},[b]),c.useEffect(()=>{m&&y&&(we!==null&&google.maps.event.removeListener(we),te(google.maps.event.addListener(m,"drag",y)))},[y]),c.useEffect(()=>{m&&w&&(Te!==null&&google.maps.event.removeListener(Te),K(google.maps.event.addListener(m,"bounds_changed",w)))},[w]),c.useEffect(()=>{var pe=new google.maps.Rectangle(zs(zs({},t),{},{map:k}));return typeof i<"u"&&pe.setVisible(i),typeof s<"u"&&pe.setEditable(s),typeof n<"u"&&pe.setDraggable(n),typeof r<"u"&&pe.setBounds(r),a&&T(google.maps.event.addListener(pe,"dblclick",a)),l&&D(google.maps.event.addListener(pe,"dragend",l)),u&&B(google.maps.event.addListener(pe,"dragstart",u)),d&&Y(google.maps.event.addListener(pe,"mousedown",d)),f&&U(google.maps.event.addListener(pe,"mousemove",f)),h&&ee(google.maps.event.addListener(pe,"mouseout",h)),p&&ae(google.maps.event.addListener(pe,"mouseover",p)),v&&se(google.maps.event.addListener(pe,"mouseup",v)),g&&de(google.maps.event.addListener(pe,"rightclick",g)),b&&ke(google.maps.event.addListener(pe,"click",b)),y&&te(google.maps.event.addListener(pe,"drag",y)),w&&K(google.maps.event.addListener(pe,"bounds_changed",w)),x(pe),E&&E(pe),()=>{L!==null&&google.maps.event.removeListener(L),C!==null&&google.maps.event.removeListener(C),P!==null&&google.maps.event.removeListener(P),z!==null&&google.maps.event.removeListener(z),q!==null&&google.maps.event.removeListener(q),re!==null&&google.maps.event.removeListener(re),ce!==null&&google.maps.event.removeListener(ce),ne!==null&&google.maps.event.removeListener(ne),Z!==null&&google.maps.event.removeListener(Z),N!==null&&google.maps.event.removeListener(N),we!==null&&google.maps.event.removeListener(we),Te!==null&&google.maps.event.removeListener(Te),O&&O(pe),pe.setMap(null)}},[]),null}c.memo(Eg);class kg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{rectangle:null}),_(this,"setRectangleCallback",()=>{this.state.rectangle!==null&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)})}componentDidMount(){var t=new google.maps.Rectangle(zs(zs({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:pl,eventMap:hl,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{rectangle:t}},this.setRectangleCallback)}componentDidUpdate(t){this.state.rectangle!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:pl,eventMap:hl,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),ye(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}_(kg,"contextType",he);function gl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Bs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ml={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},vl={center(e,t){e.setCenter(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},radius(e,t){e.setRadius(t)},visible(e,t){e.setVisible(t)}},Lg={};function Cg(e){var{options:t,center:r,radius:n,draggable:s,editable:i,visible:a,onDblClick:l,onDragEnd:u,onDragStart:d,onMouseDown:f,onMouseMove:h,onMouseOut:p,onMouseOver:v,onMouseUp:g,onRightClick:b,onClick:y,onDrag:w,onCenterChanged:E,onRadiusChanged:O,onLoad:k,onUnmount:m}=e,x=c.useContext(he),[L,T]=c.useState(null),[C,D]=c.useState(null),[P,B]=c.useState(null),[z,Y]=c.useState(null),[q,U]=c.useState(null),[re,ee]=c.useState(null),[ce,ae]=c.useState(null),[ne,se]=c.useState(null),[Z,de]=c.useState(null),[N,ke]=c.useState(null),[we,te]=c.useState(null),[Te,K]=c.useState(null),[pe,V]=c.useState(null),[qe,rt]=c.useState(null);return c.useEffect(()=>{L!==null&&L.setMap(x)},[x]),c.useEffect(()=>{typeof t<"u"&&L!==null&&L.setOptions(t)},[L,t]),c.useEffect(()=>{typeof s<"u"&&L!==null&&L.setDraggable(s)},[L,s]),c.useEffect(()=>{typeof i<"u"&&L!==null&&L.setEditable(i)},[L,i]),c.useEffect(()=>{typeof a<"u"&&L!==null&&L.setVisible(a)},[L,a]),c.useEffect(()=>{typeof n=="number"&&L!==null&&L.setRadius(n)},[L,n]),c.useEffect(()=>{typeof r<"u"&&L!==null&&L.setCenter(r)},[L,r]),c.useEffect(()=>{L&&l&&(C!==null&&google.maps.event.removeListener(C),D(google.maps.event.addListener(L,"dblclick",l)))},[l]),c.useEffect(()=>{L&&u&&(P!==null&&google.maps.event.removeListener(P),B(google.maps.event.addListener(L,"dragend",u)))},[u]),c.useEffect(()=>{L&&d&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(L,"dragstart",d)))},[d]),c.useEffect(()=>{L&&f&&(q!==null&&google.maps.event.removeListener(q),U(google.maps.event.addListener(L,"mousedown",f)))},[f]),c.useEffect(()=>{L&&h&&(re!==null&&google.maps.event.removeListener(re),ee(google.maps.event.addListener(L,"mousemove",h)))},[h]),c.useEffect(()=>{L&&p&&(ce!==null&&google.maps.event.removeListener(ce),ae(google.maps.event.addListener(L,"mouseout",p)))},[p]),c.useEffect(()=>{L&&v&&(ne!==null&&google.maps.event.removeListener(ne),se(google.maps.event.addListener(L,"mouseover",v)))},[v]),c.useEffect(()=>{L&&g&&(Z!==null&&google.maps.event.removeListener(Z),de(google.maps.event.addListener(L,"mouseup",g)))},[g]),c.useEffect(()=>{L&&b&&(N!==null&&google.maps.event.removeListener(N),ke(google.maps.event.addListener(L,"rightclick",b)))},[b]),c.useEffect(()=>{L&&y&&(we!==null&&google.maps.event.removeListener(we),te(google.maps.event.addListener(L,"click",y)))},[y]),c.useEffect(()=>{L&&w&&(Te!==null&&google.maps.event.removeListener(Te),K(google.maps.event.addListener(L,"drag",w)))},[w]),c.useEffect(()=>{L&&E&&(pe!==null&&google.maps.event.removeListener(pe),V(google.maps.event.addListener(L,"center_changed",E)))},[y]),c.useEffect(()=>{L&&O&&(qe!==null&&google.maps.event.removeListener(qe),rt(google.maps.event.addListener(L,"radius_changed",O)))},[O]),c.useEffect(()=>{var me=new google.maps.Circle(Bs(Bs({},t||Lg),{},{map:x}));return typeof n=="number"&&me.setRadius(n),typeof r<"u"&&me.setCenter(r),typeof n=="number"&&me.setRadius(n),typeof a<"u"&&me.setVisible(a),typeof i<"u"&&me.setEditable(i),typeof s<"u"&&me.setDraggable(s),l&&D(google.maps.event.addListener(me,"dblclick",l)),u&&B(google.maps.event.addListener(me,"dragend",u)),d&&Y(google.maps.event.addListener(me,"dragstart",d)),f&&U(google.maps.event.addListener(me,"mousedown",f)),h&&ee(google.maps.event.addListener(me,"mousemove",h)),p&&ae(google.maps.event.addListener(me,"mouseout",p)),v&&se(google.maps.event.addListener(me,"mouseover",v)),g&&de(google.maps.event.addListener(me,"mouseup",g)),b&&ke(google.maps.event.addListener(me,"rightclick",b)),y&&te(google.maps.event.addListener(me,"click",y)),w&&K(google.maps.event.addListener(me,"drag",w)),E&&V(google.maps.event.addListener(me,"center_changed",E)),O&&rt(google.maps.event.addListener(me,"radius_changed",O)),T(me),k&&k(me),()=>{C!==null&&google.maps.event.removeListener(C),P!==null&&google.maps.event.removeListener(P),z!==null&&google.maps.event.removeListener(z),q!==null&&google.maps.event.removeListener(q),re!==null&&google.maps.event.removeListener(re),ce!==null&&google.maps.event.removeListener(ce),ne!==null&&google.maps.event.removeListener(ne),Z!==null&&google.maps.event.removeListener(Z),N!==null&&google.maps.event.removeListener(N),we!==null&&google.maps.event.removeListener(we),pe!==null&&google.maps.event.removeListener(pe),qe!==null&&google.maps.event.removeListener(qe),m&&m(me),me.setMap(null)}},[]),null}c.memo(Cg);class Og extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{circle:null}),_(this,"setCircleCallback",()=>{this.state.circle!==null&&this.props.onLoad&&this.props.onLoad(this.state.circle)})}componentDidMount(){var t=new google.maps.Circle(Bs(Bs({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:vl,eventMap:ml,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{circle:t}},this.setCircleCallback)}componentDidUpdate(t){this.state.circle!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:vl,eventMap:ml,prevProps:t,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){if(this.state.circle!==null){var t;this.props.onUnmount&&this.props.onUnmount(this.state.circle),ye(this.registeredEvents),(t=this.state.circle)===null||t===void 0||t.setMap(null)}}render(){return null}}_(Og,"contextType",he);function yl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Vs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xl={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},bl={add(e,t){e.add(t)},addgeojson(e,t,r){e.addGeoJson(t,r)},contains(e,t){e.contains(t)},foreach(e,t){e.forEach(t)},loadgeojson(e,t,r,n){e.loadGeoJson(t,r,n)},overridestyle(e,t,r){e.overrideStyle(t,r)},remove(e,t){e.remove(t)},revertstyle(e,t){e.revertStyle(t)},controlposition(e,t){e.setControlPosition(t)},controls(e,t){e.setControls(t)},drawingmode(e,t){e.setDrawingMode(t)},map(e,t){e.setMap(t)},style(e,t){e.setStyle(t)},togeojson(e,t){e.toGeoJson(t)}};function jg(e){var{options:t,onClick:r,onDblClick:n,onMouseDown:s,onMouseMove:i,onMouseOut:a,onMouseOver:l,onMouseUp:u,onRightClick:d,onAddFeature:f,onRemoveFeature:h,onRemoveProperty:p,onSetGeometry:v,onSetProperty:g,onLoad:b,onUnmount:y}=e,w=c.useContext(he),[E,O]=c.useState(null),[k,m]=c.useState(null),[x,L]=c.useState(null),[T,C]=c.useState(null),[D,P]=c.useState(null),[B,z]=c.useState(null),[Y,q]=c.useState(null),[U,re]=c.useState(null),[ee,ce]=c.useState(null),[ae,ne]=c.useState(null),[se,Z]=c.useState(null),[de,N]=c.useState(null),[ke,we]=c.useState(null),[te,Te]=c.useState(null);return c.useEffect(()=>{E!==null&&E.setMap(w)},[w]),c.useEffect(()=>{E&&n&&(k!==null&&google.maps.event.removeListener(k),m(google.maps.event.addListener(E,"dblclick",n)))},[n]),c.useEffect(()=>{E&&s&&(x!==null&&google.maps.event.removeListener(x),L(google.maps.event.addListener(E,"mousedown",s)))},[s]),c.useEffect(()=>{E&&i&&(T!==null&&google.maps.event.removeListener(T),C(google.maps.event.addListener(E,"mousemove",i)))},[i]),c.useEffect(()=>{E&&a&&(D!==null&&google.maps.event.removeListener(D),P(google.maps.event.addListener(E,"mouseout",a)))},[a]),c.useEffect(()=>{E&&l&&(B!==null&&google.maps.event.removeListener(B),z(google.maps.event.addListener(E,"mouseover",l)))},[l]),c.useEffect(()=>{E&&u&&(Y!==null&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(E,"mouseup",u)))},[u]),c.useEffect(()=>{E&&d&&(U!==null&&google.maps.event.removeListener(U),re(google.maps.event.addListener(E,"rightclick",d)))},[d]),c.useEffect(()=>{E&&r&&(ee!==null&&google.maps.event.removeListener(ee),ce(google.maps.event.addListener(E,"click",r)))},[r]),c.useEffect(()=>{E&&f&&(ae!==null&&google.maps.event.removeListener(ae),ne(google.maps.event.addListener(E,"addfeature",f)))},[f]),c.useEffect(()=>{E&&h&&(se!==null&&google.maps.event.removeListener(se),Z(google.maps.event.addListener(E,"removefeature",h)))},[h]),c.useEffect(()=>{E&&p&&(de!==null&&google.maps.event.removeListener(de),N(google.maps.event.addListener(E,"removeproperty",p)))},[p]),c.useEffect(()=>{E&&v&&(ke!==null&&google.maps.event.removeListener(ke),we(google.maps.event.addListener(E,"setgeometry",v)))},[v]),c.useEffect(()=>{E&&g&&(te!==null&&google.maps.event.removeListener(te),Te(google.maps.event.addListener(E,"setproperty",g)))},[g]),c.useEffect(()=>{if(w!==null){var K=new google.maps.Data(Vs(Vs({},t),{},{map:w}));n&&m(google.maps.event.addListener(K,"dblclick",n)),s&&L(google.maps.event.addListener(K,"mousedown",s)),i&&C(google.maps.event.addListener(K,"mousemove",i)),a&&P(google.maps.event.addListener(K,"mouseout",a)),l&&z(google.maps.event.addListener(K,"mouseover",l)),u&&q(google.maps.event.addListener(K,"mouseup",u)),d&&re(google.maps.event.addListener(K,"rightclick",d)),r&&ce(google.maps.event.addListener(K,"click",r)),f&&ne(google.maps.event.addListener(K,"addfeature",f)),h&&Z(google.maps.event.addListener(K,"removefeature",h)),p&&N(google.maps.event.addListener(K,"removeproperty",p)),v&&we(google.maps.event.addListener(K,"setgeometry",v)),g&&Te(google.maps.event.addListener(K,"setproperty",g)),O(K),b&&b(K)}return()=>{E&&(k!==null&&google.maps.event.removeListener(k),x!==null&&google.maps.event.removeListener(x),T!==null&&google.maps.event.removeListener(T),D!==null&&google.maps.event.removeListener(D),B!==null&&google.maps.event.removeListener(B),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),ee!==null&&google.maps.event.removeListener(ee),ae!==null&&google.maps.event.removeListener(ae),se!==null&&google.maps.event.removeListener(se),de!==null&&google.maps.event.removeListener(de),ke!==null&&google.maps.event.removeListener(ke),te!==null&&google.maps.event.removeListener(te),y&&y(E),E.setMap(null))}},[]),null}c.memo(jg);class Mg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{data:null}),_(this,"setDataCallback",()=>{this.state.data!==null&&this.props.onLoad&&this.props.onLoad(this.state.data)})}componentDidMount(){if(this.context!==null){var t=new google.maps.Data(Vs(Vs({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:bl,eventMap:xl,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({data:t}),this.setDataCallback)}}componentDidUpdate(t){this.state.data!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:bl,eventMap:xl,prevProps:t,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),ye(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}_(Mg,"contextType",he);function wl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Sl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var El={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},kl={options(e,t){e.setOptions(t)},url(e,t){e.setUrl(t)},zIndex(e,t){e.setZIndex(t)}};class _g extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{kmlLayer:null}),_(this,"setKmlLayerCallback",()=>{this.state.kmlLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)})}componentDidMount(){var t=new google.maps.KmlLayer(Sl(Sl({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:kl,eventMap:El,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{kmlLayer:t}},this.setKmlLayerCallback)}componentDidUpdate(t){this.state.kmlLayer!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:kl,eventMap:El,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),ye(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}_(_g,"contextType",he);function Lu(e,t){return typeof t=="function"?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function Tg(e,t){return new t(e.lat,e.lng)}function Ng(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function Pg(e,t,r){return e instanceof t?e:r(e,t)}function Dg(e,t,r){return e instanceof t?e:r(e,t)}function Ag(e,t,r){var n=e&&e.fromLatLngToDivPixel(r.getNorthEast()),s=e&&e.fromLatLngToDivPixel(r.getSouthWest());return n&&s?{left:"".concat(s.x+t.x,"px"),top:"".concat(n.y+t.y,"px"),width:"".concat(n.x-s.x-t.x,"px"),height:"".concat(s.y-n.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}function Rg(e,t,r){var n=e&&e.fromLatLngToDivPixel(r);if(n){var{x:s,y:i}=n;return{left:"".concat(s+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Cu(e,t,r,n){return r!==void 0?Ag(e,t,Dg(r,google.maps.LatLngBounds,Ng)):Rg(e,t,Pg(n,google.maps.LatLng,Tg))}function Ig(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.height&&e.height===t.height}function Ll(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Fg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ll(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ll(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $g(e,t,r,n,s){class i extends google.maps.OverlayView{constructor(l,u,d,f){super(),this.container=l,this.pane=u,this.position=d,this.bounds=f}onAdd(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u?.appendChild(this.container)}draw(){var l=this.getProjection(),u=Fg({},this.container?Lu(this.container,s):{x:0,y:0}),d=Cu(l,u,this.bounds,this.position);for(var[f,h]of Object.entries(d))this.container.style[f]=h}onRemove(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)}}return new i(e,t,r,n)}function Cl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ug(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ol(e){if(!e)return"";var t=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng);return t+""}function jl(e){if(!e)return"";var t=e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west));return t+""}function zg(e){var{position:t,bounds:r,mapPaneName:n,zIndex:s,onLoad:i,onUnmount:a,getPixelPositionOffset:l,children:u}=e,d=c.useContext(he),f=c.useMemo(()=>{var p=document.createElement("div");return p.style.position="absolute",p},[]),h=c.useMemo(()=>$g(f,n,t,r,l),[f,n,t,r]);return c.useEffect(()=>(i?.(h),h?.setMap(d),()=>{a?.(h),h?.setMap(null)}),[d,h]),c.useEffect(()=>{f.style.zIndex="".concat(s)},[s,f]),Gc.createPortal(u,f)}c.memo(zg);class vn extends c.PureComponent{constructor(t){super(t),_(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),_(this,"updatePane",()=>{var n=this.props.mapPaneName,s=this.overlayView.getPanes();Ge(!!n,"OverlayView requires props.mapPaneName but got %s",n),s?this.setState({paneEl:s[n]}):this.setState({paneEl:null})}),_(this,"onAdd",()=>{var n,s;this.updatePane(),(n=(s=this.props).onLoad)===null||n===void 0||n.call(s,this.overlayView)}),_(this,"onPositionElement",()=>{var n=this.overlayView.getProjection(),s=Ug({x:0,y:0},this.containerRef.current?Lu(this.containerRef.current,this.props.getPixelPositionOffset):{}),i=Cu(n,s,this.props.bounds,this.props.position);if(!Ig(i,{left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height})){var a,l,u,d;this.setState({containerStyle:{top:(a=i.top)!==null&&a!==void 0?a:0,left:(l=i.left)!==null&&l!==void 0?l:0,width:(u=i.width)!==null&&u!==void 0?u:0,height:(d=i.height)!==null&&d!==void 0?d:0,position:"absolute"}})}}),_(this,"draw",()=>{this.onPositionElement()}),_(this,"onRemove",()=>{var n,s;this.setState(()=>({paneEl:null})),(n=(s=this.props).onUnmount)===null||n===void 0||n.call(s,this.overlayView)}),this.containerRef=c.createRef();var r=new google.maps.OverlayView;r.onAdd=this.onAdd,r.draw=this.draw,r.onRemove=this.onRemove,this.overlayView=r}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(t){var r=Ol(t.position),n=Ol(this.props.position),s=jl(t.bounds),i=jl(this.props.bounds);(r!==n||s!==i)&&this.overlayView.draw(),t.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var t=this.state.paneEl;return t?Gc.createPortal(o.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),t):null}}_(vn,"FLOAT_PANE","floatPane");_(vn,"MAP_PANE","mapPane");_(vn,"MARKER_LAYER","markerLayer");_(vn,"OVERLAY_LAYER","overlayLayer");_(vn,"OVERLAY_MOUSE_TARGET","overlayMouseTarget");_(vn,"contextType",he);function Bg(){}function Ml(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function _l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ml(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ml(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tl={onDblClick:"dblclick",onClick:"click"},Nl={opacity(e,t){e.setOpacity(t)}};function Vg(e){var{url:t,bounds:r,options:n,visible:s}=e,i=c.useContext(he),a=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east)),l=c.useMemo(()=>new google.maps.GroundOverlay(t,a,n),[]);return c.useEffect(()=>{l!==null&&l.setMap(i)},[i]),c.useEffect(()=>{typeof t<"u"&&l!==null&&(l.set("url",t),l.setMap(i))},[l,t]),c.useEffect(()=>{typeof s<"u"&&l!==null&&l.setOpacity(s?1:0)},[l,s]),c.useEffect(()=>{var u=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east));typeof r<"u"&&l!==null&&(l.set("bounds",u),l.setMap(i))},[l,r]),null}c.memo(Vg);class Ou extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{groundOverlay:null}),_(this,"setGroundOverlayCallback",()=>{this.state.groundOverlay!==null&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)})}componentDidMount(){Ge(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,_l(_l({},this.props.options),{},{map:this.context}));this.registeredEvents=ve({updaterMap:Nl,eventMap:Tl,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{groundOverlay:t}},this.setGroundOverlayCallback)}componentDidUpdate(t){this.state.groundOverlay!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Nl,eventMap:Tl,prevProps:t,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}_(Ou,"defaultProps",{onLoad:Bg});_(Ou,"contextType",he);function Pl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ys(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pl(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Dl={},Al={data(e,t){e.setData(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)}};function Yg(e){var{data:t,onLoad:r,onUnmount:n,options:s}=e,i=c.useContext(he),[a,l]=c.useState(null);return c.useEffect(()=>{google.maps.visualization||Ge(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(()=>{Ge(!!t,"data property is required in HeatmapLayer %s",t)},[t]),c.useEffect(()=>{a!==null&&a.setMap(i)},[i]),c.useEffect(()=>{s&&a!==null&&a.setOptions(s)},[a,s]),c.useEffect(()=>{var u=new google.maps.visualization.HeatmapLayer(Ys(Ys({},s),{},{data:t,map:i}));return l(u),r&&r(u),()=>{a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(Yg);class Wg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{heatmapLayer:null}),_(this,"setHeatmapLayerCallback",()=>{this.state.heatmapLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)})}componentDidMount(){Ge(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ge(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var t=new google.maps.visualization.HeatmapLayer(Ys(Ys({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=ve({updaterMap:Al,eventMap:Dl,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{heatmapLayer:t}},this.setHeatmapLayerCallback)}componentDidUpdate(t){ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Al,eventMap:Dl,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),ye(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}_(Wg,"contextType",he);var Rl={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Il={register(e,t,r){e.registerPanoProvider(t,r)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class Hg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{streetViewPanorama:null}),_(this,"setStreetViewPanoramaCallback",()=>{this.state.streetViewPanorama!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)})}componentDidMount(){var t,r,n=(t=(r=this.context)===null||r===void 0?void 0:r.getStreetView())!==null&&t!==void 0?t:null;this.registeredEvents=ve({updaterMap:Il,eventMap:Rl,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({streetViewPanorama:n}),this.setStreetViewPanoramaCallback)}componentDidUpdate(t){this.state.streetViewPanorama!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Il,eventMap:Rl,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),ye(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}_(Hg,"contextType",he);class Gg extends c.PureComponent{constructor(){super(...arguments),_(this,"state",{streetViewService:null}),_(this,"setStreetViewServiceCallback",()=>{this.state.streetViewService!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)})}componentDidMount(){var t=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:t}},this.setStreetViewServiceCallback)}componentWillUnmount(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}_(Gg,"contextType",he);var Fl={onDirectionsChanged:"directions_changed"},$l={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class qg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"state",{directionsRenderer:null}),_(this,"setDirectionsRendererCallback",()=>{this.state.directionsRenderer!==null&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))})}componentDidMount(){var t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ve({updaterMap:$l,eventMap:Fl,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{directionsRenderer:t}},this.setDirectionsRendererCallback)}componentDidUpdate(t){this.state.directionsRenderer!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:$l,eventMap:Fl,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),ye(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}_(qg,"contextType",he);var Ul={onPlacesChanged:"places_changed"},zl={bounds(e,t){e.setBounds(t)}};class Zg extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"containerElement",c.createRef()),_(this,"state",{searchBox:null}),_(this,"setSearchBoxCallback",()=>{this.state.searchBox!==null&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)})}componentDidMount(){if(Ge(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var t=this.containerElement.current.querySelector("input");if(t!==null){var r=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=ve({updaterMap:zl,eventMap:Ul,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}}componentDidUpdate(t){this.state.searchBox!==null&&(ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:zl,eventMap:Ul,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),ye(this.registeredEvents))}render(){return o.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})}}_(Zg,"contextType",he);var Bl={onPlaceChanged:"place_changed"},Vl={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class ju extends c.PureComponent{constructor(){super(...arguments),_(this,"registeredEvents",[]),_(this,"containerElement",c.createRef()),_(this,"state",{autocomplete:null}),_(this,"setAutocompleteCallback",()=>{this.state.autocomplete!==null&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)})}componentDidMount(){var t;Ge(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(t=this.containerElement.current)===null||t===void 0?void 0:t.querySelector("input");if(r){var n=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ve({updaterMap:Vl,eventMap:Bl,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({autocomplete:n}),this.setAutocompleteCallback)}}componentDidUpdate(t){ye(this.registeredEvents),this.registeredEvents=ve({updaterMap:Vl,eventMap:Bl,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){this.state.autocomplete!==null&&ye(this.registeredEvents)}render(){return o.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})}}_(ju,"defaultProps",{className:""});_(ju,"contextType",he);const dt=({children:e,className:t,...r})=>o.jsx(Ea,{className:I("bg-indigo-600 border-indigo-600 hover:bg-indigo-500 text-white focus-visible:outline-indigo-500 active:bg-indigo-700 transition-all duration-150 dark:bg-indigo-700 dark:border-indigo-700 dark:hover:bg-indigo-600 dark:text-gray-100 dark:active:bg-indigo-800",t),...r,children:e});function Mu(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"},child:[]}]})(e)}function Kg(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(e)}function Jg(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 16 12 12 8 16"},child:[]},{tag:"line",attr:{x1:"12",y1:"12",x2:"12",y2:"21"},child:[]},{tag:"path",attr:{d:"M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"},child:[]},{tag:"polyline",attr:{points:"16 16 12 12 8 16"},child:[]}]})(e)}function _u(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"17 8 12 3 7 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"},child:[]}]})(e)}const Ye=({children:e,className:t,...r})=>o.jsx("a",{className:I("text-indigo-600 hover:underline hover:text-indigo-500 cursor-pointer transition-all duration-150 dark:text-indigo-400 dark:hover:text-indigo-300",t),...r,children:e}),vs=["#00559e","#e11d48","#f59e42","#22c55e","#a21caf","#fbbf24","#0ea5e9","#64748b"],Tu=({coordinates:e,wrapperClassName:t})=>{const{isLoaded:r,loadError:n}=Ca({googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",libraries:["places"]}),[s,i]=c.useState([]),[a,l]=c.useState({lat:0,lng:0}),u=c.useRef(null),d=c.useCallback(()=>{if(!(!u.current||e.length===0))if(e.length===1)l(e[0]),u.current.setZoom(16);else{const h=new window.google.maps.LatLngBounds;e.forEach(p=>h.extend(p)),u.current.fitBounds(h)}},[e]),f=h=>encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='32' height='48' viewBox='0 0 32 48' fill='none'><path d='M16 0C7.163 0 0 7.163 0 16c0 11.046 16 32 16 32s16-20.954 16-32C32 7.163 24.837 0 16 0z' fill='${h}'/><circle cx='16' cy='16' r='7' fill='white'/></svg>`);return c.useEffect(()=>{d()},[d]),c.useEffect(()=>{if(!r||e.length===0)return;const h=new window.google.maps.Geocoder;Promise.all(e.map(p=>new Promise(v=>{h.geocode({location:p},(g,b)=>{b===window.google.maps.GeocoderStatus.OK&&g&&g[0]?v(g[0].formatted_address):v("")})}))).then(i)},[r,e]),n?o.jsx("div",{children:"Error loading Google Maps."}):r?o.jsxs("div",{className:I("relative flex flex-1 flex-col w-full h-full gap-2",t),children:[o.jsx(pu,{mapContainerStyle:{height:"100%",width:"100%"},zoom:16,center:a,onLoad:h=>{u.current=h,setTimeout(()=>d(),300)},options:{disableDefaultUI:!0,draggable:!0,zoomControl:!0,scrollwheel:!0,disableDoubleClickZoom:!0},children:e.map((h,p)=>{const v=vs[p%vs.length];return o.jsx(xu,{position:h,icon:{url:`data:image/svg+xml;charset=UTF-8,${f(v)}`,scaledSize:new window.google.maps.Size(32,48),anchor:new window.google.maps.Point(16,48)}},p)})}),o.jsx(dt,{type:"button",className:I("absolute top-2 right-2",!r&&"hidden"),onClick:d,children:"Centrar"}),e.length>0&&o.jsx("div",{className:"mt-2 space-y-1",children:e.map((h,p)=>o.jsxs("div",{className:"text-xs",children:[o.jsxs(Ye,{onClick:()=>{if(!u.current)return null;l(h),u.current.setZoom(16)},children:[o.jsx(Mu,{color:vs[p%vs.length],className:"w-4 h-4 mr-2 inline"}),o.jsxs("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:[h.name||`Punto ${p+1}`,":"]})]}),s[p]&&o.jsx("span",{className:"ml-2 text-gray-500",children:s[p]})]},p))})]}):o.jsx("div",{className:"flex flex-col items-center justify-center w-full h-64",children:"Loading map..."})};function Xg(e){return X({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const ti=({className:e,wrapperClassName:t})=>o.jsx("div",{className:I("px-4 py-2 flex justify-center items-center text-indigo-600 dark:text-indigo-400",t),children:o.jsx(Xg,{className:I("animate-spin h-5 w-5",e)})}),Ws=({open:e,onClose:t,className:r,children:n})=>{const s=c.useRef(null),[i,a]=c.useState(e),[l,u]=c.useState(!1);return c.useEffect(()=>{if(e)a(!0),setTimeout(()=>u(!0),10);else if(i){u(!1);const d=setTimeout(()=>a(!1),250);return()=>clearTimeout(d)}},[e,i]),c.useEffect(()=>{if(!i)return;const d=h=>{s.current&&!s.current.contains(h.target)&&t?.()},f=h=>{h.key==="Escape"&&t?.()};return document.addEventListener("mousedown",d),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",f)}},[i,t]),i?mn.createPortal(o.jsx("div",{className:I("fixed inset-0 z-[1100] flex items-center justify-center transition-colors duration-250",l?"bg-black/50":"bg-black/0"),style:{},role:"dialog","aria-modal":"true",children:o.jsxs("div",{ref:s,className:I("bg-white dark:bg-gray-800 dark:text-gray-100 shadow-2xl rounded-lg p-6 min-w-[320px] max-w-[90vw] max-h-[90vh] overflow-auto transition-all duration-250 relative scale-100",l?"opacity-100":"opacity-0 pointer-events-none",r),style:{transitionProperty:"opacity, transform"},children:[o.jsx("button",{type:"button","aria-label":"Cerrar",onClick:t,className:"absolute top-2 right-2 text-gray-500 hover:text-indigo-600 dark:text-gray-400 dark:hover:text-indigo-400 text-lg font-bold bg-transparent border-none p-1 cursor-pointer",style:{lineHeight:1},children:"✕"}),n]})}),document.body):null},Nu=({open:e,anchorEl:t,onClose:r,className:n,children:s,placement:i="bottom"})=>{const a=c.useRef(null),[l,u]=c.useState({}),[d,f]=c.useState(!1);return c.useEffect(()=>{if(!e||!t)return;const h=a.current;if(!h)return;const p=t.getBoundingClientRect();let v=0,g=0;switch(i){case"top":v=p.top-h.offsetHeight,g=p.left;break;case"bottom":v=p.bottom,g=p.left;break;case"left":v=p.top,g=p.left-h.offsetWidth;break;case"right":v=p.top,g=p.right;break;default:v=p.bottom,g=p.left;break}u({position:"absolute",top:`${v+window.scrollY}px`,left:`${g+window.scrollX}px`,zIndex:1e3,visibility:"visible",opacity:1}),f(!0)},[e,t,i]),c.useEffect(()=>{if(!e)return;const h=p=>{a.current&&!a.current.contains(p.target)&&t&&!t.contains(p.target)&&r?.()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[e,r,t]),e?o.jsx("div",{ref:a,className:I("bg-white dark:bg-gray-800 dark:text-gray-100 shadow-[0_0_15px_3px_rgba(0,0,0,0.3)] rounded p-4 min-w-[180px]",n),style:d?l:{position:"absolute",visibility:"hidden",opacity:0,left:0,top:0},role:"dialog","aria-modal":"true",children:s}):null},Qg=({options:e,selected:t,onSelect:r,anchorEl:n,open:s,onClose:i,className:a,renderOption:l})=>o.jsx(Nu,{open:s,anchorEl:n,onClose:i,className:I("!p-0 !border-0",a),children:o.jsx("ul",{className:"min-w-[180px] py-1",children:e.map(u=>o.jsxs("li",{onClick:()=>{r(u),i()},className:I("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white flex items-center gap-2 dark:hover:bg-indigo-700 dark:hover:text-gray-100",t?.id===u.id?"bg-indigo-100 text-indigo-700 dark:bg-indigo-800 dark:text-indigo-200":"bg-white text-gray-800 dark:bg-gray-800 dark:text-gray-100"),children:[u.icon&&o.jsx("span",{children:u.icon}),l?l(u):u.label]},u.id))})}),Yn=({children:e,className:t,...r})=>o.jsx(Ea,{className:I("bg-transparent hover:bg-gray-400/10 focus-visible:outline-indigo-500 text-indigo-600 active:bg-gray-400/20 transition-all duration-150 dark:text-indigo-300 dark:hover:bg-gray-700/30 dark:active:bg-gray-700/50",t),...r,children:e}),fn=({className:e,wrapperClassName:t,vertical:r=!1,...n})=>o.jsx("div",{className:I("flex justify-center items-center w-full",t),...n,children:o.jsx("div",{className:I(r?"h-8 w-px bg-gray-300 dark:bg-gray-700":"h-px w-full bg-gray-300 dark:bg-gray-700",e)})}),em=({className:e,disabled:t,checked:r,...n})=>o.jsxs("label",{className:I("inline-flex items-center cursor-pointer",t?"pointer-events-none opacity-50":"",e),children:[o.jsx("input",{type:"checkbox",className:"sr-only",disabled:t,checked:r,...n}),o.jsx("span",{className:I("w-10 h-6 flex items-center bg-gray-300 rounded-full p-1 transition-colors dark:bg-gray-700",r?"bg-indigo-600 dark:bg-indigo-500":"",t?"bg-gray-200 dark:bg-gray-800":""),children:o.jsx("span",{className:I("bg-white dark:bg-gray-100 w-4 h-4 rounded-full shadow-md transform transition-transform",r?"translate-x-4":"translate-x-0")})})]}),ri=({className:e,wrapperClassName:t,children:r,...n})=>o.jsx("div",{className:I("border border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",t),children:o.jsx("div",{className:"max-h-80 max-w-full overflow-auto",children:o.jsx("table",{className:I("divide-y table-auto w-full",e),...n,children:r})})});function tm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0 1 44-44h94.12a24.55 24.55 0 0 1 17.49 7.36l109.15 111a25.4 25.4 0 0 1 7.24 17.77z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M200 128v108a28.34 28.34 0 0 0 28 28h108"},child:[]},{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M176 128V76a44.26 44.26 0 0 1 44-44h94a24.83 24.83 0 0 1 17.61 7.36l109.15 111A25.09 25.09 0 0 1 448 168v172c0 24.3-19.05 44-42.95 44H344"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M312 32v108a28.34 28.34 0 0 0 28 28h108"},child:[]}]})(e)}function rm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95z"},child:[]},{tag:"path",attr:{d:"M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(e)}const Pu=({title:e,description:t,wrapperClassName:r})=>o.jsxs("div",{className:I("flex items-center py-2 px-3 bg-yellow-100 text-gray-900 border border-yellow-600 rounded text-sm",r),role:"alert",children:[o.jsx(rm,{className:"min-w-6 min-h-6 mr-2 text-yellow-600"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:e}),o.jsx("p",{children:t})]})]});function nm(e){return X({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"},child:[]}]})(e)}function sm(e){return X({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z"},child:[]}]})(e)}function im(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(e)}function Ma(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(e)}function am(e){return X({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(e)}function om(e){return X({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(e)}function Du(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(e)}function lm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"},child:[]}]})(e)}function cm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"},child:[]}]})(e)}function um(e){return X({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(e)}function dm(e){return X({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function fm(e){return X({attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"},child:[]}]})(e)}function hm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"},child:[]}]})(e)}function pm(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function gm(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function mm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function vm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(e)}function ym(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function xm(e){return X({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function bm(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function Au(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"},child:[]}]})(e)}function wm(e){return X({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"},child:[]}]})(e)}function Sm(e){return X({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"},child:[]}]})(e)}function Ru(e){return X({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z"},child:[]}]})(e)}const ea="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='200px'%20height='200px'%20viewBox='0%200%20200%20200'%20enable-background='new%200%200%20200%20200'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M162.966,141.076v-8.912h3.775v-11.155l-3.775,5.578v-11.313h13.111v25.803%20H162.966z%20M89.717,115.715L90,115.273h12.957v25.803h-13.24V133.3h3.776v-11.152l-3.776,5.575V115.715L89.717,115.715z%20M162.966,115.273v11.313l-3.773,5.577h3.773v8.912h-3.112l-3.604-2.817l-2.479,2.817h-23.546v-3.044l-4.619,3.044h-19.942v-25.803%20h10.59v18.479h13.971v-18.479h24.447l-5.069,8h-9.128l-0.111,10.479h9.463l12.396-18.479H162.966z%20M24.247,123.169l4.913-8.007%20h53.517l-4.959,8.007H66.34v2.02h9.351l-3.153,5.633H66.34v3.154h11.716l11.66-18.261v12.008l-3.774,5.577h3.774v7.776h-2.422%20l-3.492-2.366l-3.026,2.366H54.961v-17.907h-7.179l-0.148,17.907H37.158l0.227-17.907H24.247z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20d='M101.053,82.351l15.748-11.884l-5.014-17.082%20c3.354-1.359,4.345,0.157,2.977,4.547c3.469-0.267,6.195-6.255,5.171-10.346c-1.325-4.377-4.858-7.866-9.623-8.219l-9.259,0.062%20v6.779c2.376,0,4.314,1.956,4.314,4.35c0,2.395-1.939,4.348-4.314,4.348V82.351L101.053,82.351z%20M101.053,53.517v-5.642%20c1.454,0.071,2.617,1.312,2.617,2.82C103.67,52.206,102.506,53.446,101.053,53.517z%20M83.734,70.31l16.455,12.693l0.864-0.652%20V54.906c-2.373,0-4.31-1.953-4.31-4.348c0-2.393,1.937-4.35,4.31-4.35v-6.779l-1.177,0.007c-4.51-0.016-7.176,1.915-7.992,5.798%20L83.734,70.31L83.734,70.31z%20M101.053,47.875v5.642c-0.043,0.002-0.088,0.003-0.135,0.003c-1.514,0-2.749-1.267-2.749-2.825%20c0-1.555,1.234-2.823,2.749-2.823C100.965,47.872,101.01,47.874,101.053,47.875z'/%3e%3cpolygon%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20points='100.32,85.407%20100.264,85.361%20100.034,85.18%2082.726,71.518%202.82,47.879%208.305,55.905%2023.35,60.579%2025.57,63.654%2041.296,68.782%2042.864,70.662%2059.111,75.42%2058.971,76.008%2014.297,64.672%2019.863,72.759%2034.43,76.36%2036.511,79.037%2052.234,82.967%2053.26,84.678%2065.91,88.096%2066.756,88.998%2024.822,79.892%2029.117,85.911%2044.202,89.633%2045.398,91.516%2061.122,94.251%2061.977,96.471%2072.919,98.18%2072.919,99.035%2034.566,93.849%2037.872,98.77%2052.405,100.744%2053.945,102.283%2067.277,104.333%2068.815,106.555%2078.31,106.535%2078.31,107.677%2043.983,107.507%2047.736,113.052%20100.319,113.052%20100.32,113.052%20152.902,113.052%20156.659,107.507%20122.327,107.677%20122.327,106.535%20131.826,106.555%20133.365,104.333%20146.695,102.283%20148.235,100.744%20162.767,98.77%20166.074,93.849%20127.721,99.035%20127.721,98.18%20138.663,96.471%20139.516,94.251%20155.241,91.516%20156.438,89.633%20171.522,85.911%20175.818,79.892%20133.885,88.998%20134.73,88.096%20147.381,84.678%20148.405,82.967%20164.131,79.037%20166.21,76.36%20180.779,72.759%20186.34,64.672%20141.67,76.008%20141.53,75.42%20157.777,70.662%20159.342,68.782%20175.068,63.654%20177.289,60.579%20192.334,55.905%20197.82,47.879%20117.914,71.518%20100.377,85.361%20'/%3e%3cpolygon%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20points='86.882,143.313%20113.444,143.313%2099.961,160.474%20'/%3e%3c/g%3e%3c/svg%3e",ni=c.createContext(null),_a=c.createContext({user:null,store:null,availableStores:[],isAuthenticated:!1,login:()=>{},logout:()=>{}}),Em=({menuItems:e,activeItemId:t,className:r,onSelectStore:n})=>{const s=c.useContext(ni),{isAuthenticated:i,user:a,store:l,availableStores:u,logout:d}=c.useContext(_a),[f,h]=c.useState(!1),[p,v]=c.useState(!1),[g,b]=c.useState("main"),y=()=>{h(!1)},w=O=>{n&&n(O),v(!1)},E=I("fixed inset-y-0 left-0 z-50 flex flex-col w-72 h-screen bg-white dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800 transition-transform duration-300 ease-in-out md:translate-x-0 md:relative md:inset-auto shadow-xl md:shadow-none",{"translate-x-0":f,"-translate-x-full":!f},r);return c.useEffect(()=>{if(!p){const O=setTimeout(()=>b("main"),200);return()=>clearTimeout(O)}},[p]),o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"fixed top-4 left-4 z-50 p-2 text-gray-600 bg-white rounded-md shadow-md md:hidden dark:bg-gray-800 dark:text-gray-200",onClick:()=>h(!f),"aria-label":"Toggle Menu",children:o.jsx(sm,{size:24})}),f&&o.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>h(!1)}),p&&o.jsx("div",{className:"fixed inset-0 z-40 cursor-default",onClick:()=>v(!1)}),o.jsxs("aside",{className:E,children:[o.jsx("button",{className:"absolute top-4 right-4 p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 md:hidden",onClick:()=>h(!1),"aria-label":"Close Menu",children:o.jsx(nm,{size:24})}),o.jsxs("div",{className:"flex items-center gap-3 px-6 pt-6 pb-3 flex-shrink-0",children:[o.jsx("div",{className:"inline-flex items-center justify-center p-1 bg-white/80 backdrop-blur-sm rounded-xl shadow-elegant",children:o.jsx("img",{src:ea,alt:"App logo",loading:"lazy",className:"w-16 h-16 object-cover"})}),o.jsxs("span",{className:"font-semibold text-gray-800 dark:text-gray-400 mt-1",children:[s?.applicationName," ",o.jsx("span",{className:"font-normal",children:s?.applicationVersion})]})]}),o.jsx("nav",{className:"flex-1 overflow-y-auto px-4 py-2 custom-scrollbar",children:o.jsx("ul",{className:"space-y-1",children:e.map(O=>{const k=t===O.id;return o.jsx("li",{children:o.jsxs(Ye,{href:O.href,onClick:y,className:I("group flex items-center w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors duration-200",{"bg-blue-50 text-blue-700 dark:bg-blue-900/20 dark:text-blue-400":k,"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-100":!k}),children:[o.jsx(O.icon,{className:I("mr-3 flex-shrink-0 h-5 w-5",{"text-blue-600 dark:text-blue-400":k,"text-gray-400 group-hover:text-gray-600 dark:text-gray-500 dark:group-hover:text-gray-300":!k}),"aria-hidden":"true"}),o.jsx("span",{className:"truncate",children:O.label})]})},O.id)})})}),o.jsx("div",{className:"relative flex-shrink-0 border-t border-gray-200 dark:border-gray-800",children:i&&a?o.jsxs(o.Fragment,{children:[p&&o.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 z-50 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-100 dark:border-gray-700 overflow-hidden animate-in fade-in slide-in-from-bottom-2 duration-200",children:g==="main"?o.jsxs("div",{className:"py-1",children:[o.jsxs(Ye,{href:"/profile",className:"flex items-center w-full px-4 py-3 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[o.jsx(bm,{className:"mr-3 text-gray-400"}),"Mi Perfil"]}),o.jsxs("button",{className:"flex cursor-pointer items-center justify-between w-full px-4 py-3 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors text-left",onClick:O=>{O.stopPropagation(),b("stores")},children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx(cm,{className:"mr-3 text-gray-400"}),"Cambiar Tienda"]}),o.jsx(om,{className:"text-xs text-gray-400"})]}),o.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1"}),o.jsxs("button",{onClick:d,className:"flex cursor-pointer items-center w-full px-4 py-3 text-sm text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors text-left",children:[o.jsx(ym,{className:"mr-3"}),"Cerrar Sesión"]})]}):o.jsxs("div",{className:"flex flex-col max-h-80",children:[o.jsxs("div",{onClick:O=>{O.stopPropagation(),b("main")},className:"cursor-pointer flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors text-left",children:[o.jsx("div",{className:"mr-2 text-gray-500",children:o.jsx(am,{className:"text-sm"})}),o.jsx("span",{className:"text-sm font-semibold text-gray-800 dark:text-white",children:"Seleccionar Tienda"})]}),o.jsx("div",{className:"overflow-y-auto custom-scrollbar p-1",children:u&&u.length>0?u.map(O=>o.jsxs("button",{onClick:()=>w(O),className:I("w-full text-left px-4 py-2.5 text-sm rounded-md transition-colors flex items-center justify-between",{"bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400 font-medium":l?.code===O.code,"text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer":l?.code!==O.code}),children:[o.jsxs("span",{children:[O.code," - ",O.commercialName]}),l?.code===O.code&&o.jsx(im,{className:"text-xs"})]},O.code)):o.jsx("div",{className:"px-4 py-3 text-xs text-gray-400 text-center",children:"No hay tiendas disponibles."})})]})}),o.jsxs("div",{className:I("group flex items-center py-6 px-4 cursor-pointer transition-colors duration-200",{"bg-gray-100 dark:bg-gray-800":p,"hover:bg-gray-50 dark:hover:bg-gray-800/50":!p}),onClick:()=>v(!p),children:[o.jsx("div",{className:"inline-flex items-center justify-center h-10 w-10 rounded-full bg-blue-600 text-white font-bold text-sm shadow-sm group-hover:scale-110 transition-transform",children:km(a.userName,a.userLastName)}),o.jsxs("div",{className:"ml-3 flex-1 min-w-0",children:[o.jsxs("p",{className:"text-sm font-bold text-gray-900 dark:text-white truncate",children:[a.userName," ",a.userLastName]}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:["Store ",l?.code||"N/A"]})]})]})]}):o.jsxs("div",{className:"p-4 flex flex-col gap-3",children:[o.jsxs(dt,{children:[o.jsx(vm,{className:"mr-2"}),"Login"]}),o.jsxs(Yn,{children:[o.jsx(xm,{className:"mr-2"}),"Register"]})]})})]})]})};function km(e,t){const r=e?e.charAt(0).toUpperCase():"",n=t?t.charAt(0).toUpperCase():"";return`${r}${n}`}const vr=({label:e,id:t,required:r,error:n,className:s,children:i})=>o.jsxs("div",{className:I("flex w-full flex-col",s),children:[o.jsx("div",{className:"flex flex-1 justify-between",children:o.jsxs("label",{htmlFor:t,className:I("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:[e," ",r&&o.jsx("span",{className:"text-red-500",children:"*"})]})}),i,o.jsx("span",{className:"text-xs text-red-500",children:n})]}),yn=(e,t)=>I("focus block bg-white dark:bg-gray-800 w-full rounded-xl border-0 text-gray-800 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:focus:ring-indigo-400 sm:text-sm sm:leading-6 peer h-10",!!t&&"ring-red-500 dark:ring-red-500",e&&"!bg-gray-400/30 !text-gray-500 dark:!bg-gray-400/30 dark:!text-gray-400");function Lm(e){const{id:t,label:r,options:n,selected:s,onSelectOption:i,wrapperClassName:a,required:l,disabled:u,...d}=e,f=h=>{const p=s.some(v=>v.id===h.id);i(p?s.filter(v=>v.id!==h.id):[...s,h])};return o.jsx(vr,{label:r,id:t,required:l,children:o.jsx("div",{className:I("flex flex-col gap-3",a,{"pointer-events-none opacity-50":u}),children:n.map(h=>o.jsx(ei,{id:`${t}-${h.id}`,label:h.label,checked:s.some(p=>p.id===h.id),onChangeChecked:()=>f(h),disabled:u,...d},h.id))})})}const Cm=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,...l})=>o.jsx(vr,{label:e,id:t,required:r,error:n,className:i,children:o.jsx("div",{className:"relative flex flex-1 items-center cursor-pointer",children:o.jsx("input",{...l,id:t,required:r,type:"date",disabled:a,className:I(yn(a),"truncate w-full",s)})})}),Om=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,onChange:l,...u})=>{const d=c.useRef(null),[f,h]=c.useState(""),p=v=>{v.target.files&&v.target.files.length>0?h(v.target.files[0].name):h(""),l&&l(v)};return o.jsx(vr,{label:e,id:t,required:r,error:n,className:i,children:o.jsxs("div",{className:"relative flex flex-1 items-center",children:[o.jsx("input",{...u,id:t,required:r,type:"file",disabled:a,ref:d,onChange:p,className:"hidden"}),o.jsxs("button",{type:"button",disabled:a,className:I(yn(a,n),"flex items-center justify-between gap-2 px-3 cursor-pointer",s),onClick:()=>d.current?.click(),children:[!!f&&o.jsx("span",{className:"dark:text-gray-100",children:f}),!f&&o.jsx("span",{className:"text-gray-400 dark:text-gray-400",children:"Select file"}),o.jsx(_u,{className:"text-indigo-600 dark:text-indigo-400",size:20})]})]})})},jm=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,onChange:l,...u})=>{const d=c.useRef(null),[f,h]=c.useState(""),[p,v]=c.useState(!1),g=y=>{y.target.files&&y.target.files.length>0?h(y.target.files[0].name):h(""),l&&l(y)},b=y=>{if(y.preventDefault(),v(!1),a)return;const w=y.dataTransfer.files;if(w&&w.length>0&&(h(w[0].name),d.current)){const E=new DataTransfer;E.items.add(w[0]),d.current.files=E.files;const O=new Event("change",{bubbles:!0});d.current.dispatchEvent(O)}};return o.jsxs(vr,{label:e,id:t,required:r,error:n,className:i,children:[o.jsxs("div",{className:I("relative flex flex-col flex-1 items-center transition border-2 border-dashed rounded-xl p-4",p?"border-indigo-600 bg-indigo-50 dark:bg-indigo-900":"border-gray-300 bg-white dark:border-gray-700 dark:bg-gray-800"),onDragOver:y=>{y.preventDefault(),a||v(!0)},onDragLeave:y=>{y.preventDefault(),v(!1)},onDrop:b,onClick:()=>!a&&d.current?.click(),style:{cursor:a?"not-allowed":"pointer",minHeight:56},children:[o.jsx("input",{...u,id:t,required:r,type:"file",disabled:a,ref:d,onChange:g,className:"hidden"}),o.jsx(Jg,{className:"text-indigo-600 dark:text-indigo-400",size:60}),!!f&&o.jsx("span",{className:"text-sm text-gray-800 dark:text-gray-100",children:f}),!f&&o.jsx("span",{className:"text-gray-400 dark:text-gray-400 text-sm",children:"Drag & drop a file here, or click to select"})]}),o.jsxs("button",{type:"button",disabled:a,className:I(yn(a,n),"flex items-center justify-between gap-2 px-3 cursor-pointer mt-2",s),onClick:()=>d.current?.click(),children:[!!f&&o.jsx("span",{className:"dark:text-gray-100",children:f}),!f&&o.jsx("span",{className:"text-gray-400 dark:text-gray-400",children:"Select File"}),o.jsx(_u,{className:"text-indigo-600 dark:text-indigo-400",size:20})]})]})},Xe=c.forwardRef(({label:e,id:t,type:r,required:n,error:s,className:i,wrapperClassName:a,disabled:l,...u},d)=>{const[f,h]=c.useState(r);return o.jsx(vr,{label:e,id:t,required:n,error:s,className:a,children:o.jsxs("div",{className:"relative flex flex-1 items-center",children:[o.jsx("input",{...u,ref:d,id:t,required:n,type:f,disabled:l,className:I(yn(l,s),"truncate",r==="password"&&"pr-8",i)}),r==="password"&&f==="password"&&o.jsx(dm,{type:"button",onClick:()=>h("text"),className:"absolute cursor-pointer text-indigo-600 dark:text-indigo-400 h-5 w-5 right-2"}),r==="password"&&f==="text"&&o.jsx(um,{type:"button",onClick:()=>h("password"),className:"absolute cursor-pointer text-indigo-600 dark:text-indigo-400 h-5 w-5 right-2"})]})})});function Mm(e,t){const{label:r,id:n,required:s,error:i,className:a,wrapperClassName:l,options:u,selected:d,onSelectOption:f,renderOption:h,filterFn:p,emptyMessage:v="No options found",disabled:g,footerOption:b,loading:y,icon:w=null,searchText:E,setSearchText:O,...k}=e,[m,x]=c.useState(!1),[L,T]=c.useState(""),C=c.useRef(null),D=c.useMemo(()=>E!==void 0?E:L,[E,L]),P=c.useCallback(U=>(O!==void 0?O:T)(U),[O]),B=U=>o.jsx("p",{children:U.label}),z=c.useCallback((U,re)=>re.toLowerCase().split(" ").filter(Boolean).every(ce=>U.label.toLowerCase().includes(ce)),[]),Y=U=>{f(U),P(U.label),x(!1)},q=c.useMemo(()=>{const U=p||z;return u.filter(re=>U(re,D))},[u,D,p,z]);return c.useEffect(()=>{function U(re){C.current&&!C.current.contains(re.target)&&(x(!1),d&&P(d.label))}return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[C,d,P]),c.useEffect(()=>{m||P(d?.label??"")},[m,d,P]),o.jsxs("div",{className:I("relative",l),ref:C,children:[o.jsx(Xe,{...k,id:n,ref:t,label:r,error:!m&&i,required:s,value:D,onChange:U=>{P(U.target.value),x(!0)},onFocus:()=>{P(""),x(!0)},disabled:g,className:I("pr-8",g?"pointer-events-none":"cursor-pointer",d&&"text-gray-900",a)}),o.jsxs("div",{onClick:()=>{g||(P(m&&d?.label||""),x(!m))},className:I("absolute right-0 flex items-center pr-2 text-gray-400",g?"pointer-events-none":"cursor-pointer",r?"top-10":"top-4"),children:[!w&&(m?o.jsx(Du,{}):o.jsx(Ma,{})),w]}),m&&o.jsxs("ul",{className:I("absolute z-10 min-w-full mt-1 text-xs text-gray-800 rounded-md shadow-lg max-h-56 overflow-auto dark:bg-gray-800 dark:text-gray-100",g&&"pointer-events-none opacity-50"),children:[y&&o.jsx(ti,{className:"h-7 w-7"}),!y&&q.length>0&&q.map((U,re)=>o.jsx("li",{onClick:()=>Y(U),className:I("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",U.id!==d?.id&&re%2===0?"bg-white dark:bg-gray-700":"bg-gray-100 dark:bg-gray-800",U.id===d?.id&&"border-indigo-600 border-2 dark:border-indigo-400",re==0&&"rounded-t-md",re==q.length-1&&"rounded-b-md"),children:(h||B)(U)},U.id)),!y&&q.length===0&&o.jsx("li",{className:"px-4 py-2 truncate text-gray-500 italic bg-white dark:bg-gray-800 dark:text-gray-400",children:v}),b&&o.jsx("div",{className:"sticky bottom-0 bg-white dark:bg-gray-800 border-t border-gray-300 dark:border-gray-700",children:o.jsx("li",{onClick:()=>Y(b),className:"px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",children:(h||B)(b)},b.id)})]})]})}const yt=c.forwardRef(Mm),Yl={lat:10.48801,lng:-66.87919},_m=["places"],Iu=({label:e,disabled:t,wrapperClassName:r,onSelectLocation:n,initialCoordinates:s,...i})=>{const{isLoaded:a,loadError:l}=Ca({googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",libraries:_m}),[u,d]=c.useState(s||Yl),[f,h]=c.useState(s||Yl),[p,v]=c.useState(""),[g,b]=c.useState([]),[y,w]=c.useState(null),E=c.useRef(null),O=c.useRef(null),k=c.useRef(null),m=c.useRef(null),x=c.useCallback(C=>{!O.current||!C.value.place_id||O.current.getDetails({placeId:C.value.place_id,fields:["geometry"],sessionToken:m.current??void 0},(D,P)=>{if(P===window.google.maps.places.PlacesServiceStatus.OK&&D?.geometry?.location){const B={lat:D.geometry.location.lat(),lng:D.geometry.location.lng()};h(B),d(B),v(C.label),w(C),b([])}m.current=null})},[]),L=c.useCallback(()=>{!k.current||!O.current||k.current.geocode({location:f},(C,D)=>{if(D!==window.google.maps.GeocoderStatus.OK||!C){console.error("Geocode was not successful for the following reason: "+D);return}const P=C.find(B=>B.types.includes("route")||B.types.includes("intersection"))??C[0];P?.place_id&&O.current?.getDetails({placeId:P.place_id},(B,z)=>{z===window.google.maps.places.PlacesServiceStatus.OK&&B&&n?.(B)})})},[f,n]),T=c.useCallback(C=>{C.latLng&&(h({lat:C.latLng.lat(),lng:C.latLng.lng()}),v(""),w(null))},[]);return c.useEffect(()=>{a&&(k.current=new window.google.maps.Geocoder,E.current=new window.google.maps.places.AutocompleteService,O.current=new window.google.maps.places.PlacesService(document.createElement("div")))},[a]),c.useEffect(()=>{if(!a||!p||t||p===y?.label){b([]);return}m.current||(m.current=new window.google.maps.places.AutocompleteSessionToken),E.current?.getPlacePredictions({input:p,sessionToken:m.current},C=>{if(C&&Array.isArray(C)){const D=C.map(P=>({id:P.place_id,label:P.description,value:P}));b(D)}else b([])})},[p,a,t,y]),c.useEffect(()=>{s&&(h(s),d(s))},[s]),l?o.jsx("div",{children:"Error al cargar Google Maps. Por favor, revisa la API Key y la conexión."}):a?o.jsxs("div",{className:I("flex flex-1 flex-col w-full h-full gap-2",r),children:[o.jsx(yt,{...i,label:e,options:g,selected:y,onSelectOption:x,searchText:p,setSearchText:C=>{C||(m.current=null),v(C)},disabled:t}),o.jsx(pu,{mapContainerStyle:{height:"100%",width:"100%"},zoom:16,center:u,onClick:T,children:o.jsx(xu,{position:f})}),o.jsx("div",{className:"flex justify-end mt-2",children:o.jsx(dt,{onClick:L,disabled:t,children:"Seleccionar"})})]}):o.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-64",children:["Cargando mapa...",o.jsx(ti,{className:"w-8 h-8 text-indigo-600"})]})},Fu=c.forwardRef(({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,value:l,onChange:u,...d},f)=>{const h=()=>{if(u){const v=parseInt(String(l??"0"),10),g=(isNaN(v)?0:v)+1,b={target:{value:String(g),name:d.name,type:"number",step:"1"}};u(b)}},p=()=>{if(u){const v=parseInt(String(l??"0"),10),g=(isNaN(v)?0:v)-1,b={target:{value:String(g),name:d.name,type:"number",step:"1"}};u(b)}};return o.jsx(vr,{label:e,id:t,required:r,error:n,className:i,children:o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("div",{children:o.jsx(dt,{type:"button",disabled:a,onClick:p,className:"h-10 rounded-r-none",children:o.jsx(pm,{className:"h-3 w-3"})})}),o.jsx("div",{className:"relative flex flex-1 items-center",children:o.jsx("input",{...d,ref:f,id:t,required:r,type:"number",step:"1",disabled:a,value:l,onChange:u,className:I(yn(a,n),"!rounded-none truncate",s)})}),o.jsx("div",{children:o.jsx(dt,{type:"button",disabled:a,onClick:h,className:"h-10 rounded-l-none",children:o.jsx(gm,{className:"h-3 w-3"})})})]})})});function Tm(e){return X({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M124,175a8,8,0,0,0,7.94,0c2.45-1.41,60-35,60-94.95A64,64,0,0,0,64,80C64,140,121.58,173.54,124,175ZM128,56a24,24,0,1,1-24,24A24,24,0,0,1,128,56ZM240,184c0,31.18-57.71,48-112,48S16,215.18,16,184c0-14.59,13.22-27.51,37.23-36.37a8,8,0,0,1,5.54,15C42.26,168.74,32,176.92,32,184c0,13.36,36.52,32,96,32s96-18.64,96-32c0-7.08-10.26-15.26-26.77-21.36a8,8,0,0,1,5.54-15C226.78,156.49,240,169.41,240,184Z"},child:[]}]})(e)}function Nm(e){return X({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M112,80a16,16,0,1,1,16,16A16,16,0,0,1,112,80ZM64,80a64,64,0,0,1,128,0c0,59.95-57.58,93.54-60,94.95a8,8,0,0,1-7.94,0C121.58,173.54,64,140,64,80Zm16,0c0,42.2,35.84,70.21,48,78.5,12.15-8.28,48-36.3,48-78.5a48,48,0,0,0-96,0Zm122.77,67.63a8,8,0,0,0-5.54,15C213.74,168.74,224,176.92,224,184c0,13.36-36.52,32-96,32s-96-18.64-96-32c0-7.08,10.26-15.26,26.77-21.36a8,8,0,0,0-5.54-15C29.22,156.49,16,169.41,16,184c0,31.18,57.71,48,112,48s112-16.82,112-48C240,169.41,226.78,156.49,202.77,147.63Z"},child:[]}]})(e)}const Pm=["places"],Dm=({label:e,onSelectLocation:t,disabled:r,...n})=>{const{isLoaded:s,loadError:i}=Ca({googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",libraries:Pm}),[a,l]=c.useState(""),[u,d]=c.useState(!1),[f,h]=c.useState(null),[p,v]=c.useState(null),[g,b]=c.useState([]),y=c.useRef(null),w=c.useRef(null),E=c.useRef(null),O=m=>{!w.current||!m.value.place_id||w.current.getDetails({placeId:m.id},(x,L)=>{L===window.google.maps.places.PlacesServiceStatus.OK&&x&&(h(m),v(x),t(x)),E.current=null})},k=m=>{const x={place_id:m.place_id??"",description:m.formatted_address||m.name||"",types:m.types??[],matched_substrings:[],structured_formatting:{main_text:m.name||"",secondary_text:m.formatted_address||"",main_text_matched_substrings:[]},terms:[]};h({id:x.place_id,label:x.description,value:x}),l(x.description),t(m),v(m),d(!1)};return c.useEffect(()=>{s&&(y.current=new window.google.maps.places.AutocompleteService,w.current=new window.google.maps.places.PlacesService(document.createElement("div")))},[s]),c.useEffect(()=>{if(!s||!a||r||a===f?.label){b([]);return}E.current||(E.current=new window.google.maps.places.AutocompleteSessionToken),y.current?.getPlacePredictions({input:a,sessionToken:E.current},m=>{if(m&&Array.isArray(m)){const x=m.map(L=>({id:L.place_id,label:L.description,value:L}));b(x)}else b([])})},[a,r,f,s]),i?o.jsx("div",{children:"Error al cargar Google Maps. Por favor, revisa la API Key y la conexión."}):o.jsxs(o.Fragment,{children:[o.jsx(yt,{...n,label:e,options:g,selected:f,onSelectOption:O,searchText:a,setSearchText:m=>{m||(E.current=null),l(m)},disabled:r,icon:o.jsxs("span",{className:"relative group",onClick:()=>d(!0),children:[o.jsx(Nm,{className:"w-5 h-5 text-indigo-600 block group-hover:hidden transition-all"}),o.jsx(Tm,{className:"w-5 h-5 text-indigo-600 hidden group-hover:block transition-all"})]})}),o.jsx(Ws,{open:u,onClose:()=>d(!1),children:o.jsx("div",{className:"h-96 w-96",children:o.jsx(Iu,{label:"Buscar en Google Maps",onSelectLocation:k,initialCoordinates:p?{lat:p.geometry?.location?.lat()||0,lng:p.geometry?.location?.lng()||0}:void 0})})})]})};function Hs(e){const{id:t,label:r,options:n,selected:s,onSelectOption:i,wrapperClassName:a,required:l,disabled:u,...d}=e;return o.jsx(vr,{label:r,id:t,required:l,children:o.jsx("div",{className:I("flex flex-col gap-3",a,{"pointer-events-none opacity-50":u}),children:n.map(f=>o.jsxs("div",{className:"flex items-center gap-2",onClick:()=>i(f),children:[o.jsx("input",{...d,type:"radio",id:`${t}-${f.id}`,name:r,value:f.id,checked:s?.id===f.id,onChange:()=>i(f),className:"h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 cursor-pointer"}),o.jsx("label",{htmlFor:`${t}-${f.id}`,className:"text-xs font-medium text-gray-800 dark:text-gray-300 cursor-pointer",children:o.jsx("p",{children:f.label})})]},f.id))})})}function Am(e){const{label:t,id:r,required:n,error:s,wrapperClassName:i,groupedOptions:a,selected:l,onSelectOption:u,renderOption:d,filterFn:f,emptyMessage:h="No hay resultados",disabled:p,footerOption:v,...g}=e,[b,y]=c.useState(!1),[w,E]=c.useState(l?.label||""),O=c.useRef(null);c.useEffect(()=>{function T(C){O.current&&!O.current.contains(C.target)&&(y(!1),l&&E(l.label))}return document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[O,l]);const k=T=>o.jsx("p",{children:T.label}),m=c.useCallback((T,C)=>C.toLowerCase().split(" ").filter(Boolean).every(P=>T.label.toLowerCase().includes(P)),[]),x=T=>{u(T),E(T.label),y(!1)},L=c.useMemo(()=>{const T=f||m;return a.map(D=>({...D,options:D.options.filter(P=>T(P,w))})).filter(D=>D.options.length>0||D.loading)},[a,w,f,m]);return o.jsxs("div",{className:I("relative",i),ref:O,children:[o.jsx(Xe,{...g,id:r,label:t,error:s,required:n,value:w,onChange:T=>{E(T.target.value),y(!0)},onFocus:()=>{E(""),y(!0)},disabled:p,className:I("cursor-pointer",l&&"text-gray-900")}),o.jsx("div",{onClick:()=>y(!b),className:"absolute inset-y-12 right-0 flex items-center pr-2 cursor-pointer text-gray-400",children:b?o.jsx(Du,{}):o.jsx(Ma,{})}),b&&o.jsxs("ul",{className:I("absolute z-10 w-full mt-1 text-xs text-gray-800 bg-white border border-gray-300 rounded-md shadow-lg max-h-56 overflow-auto dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",p&&"pointer-events-none opacity-50"),children:[L.length>0&&L.map(T=>o.jsxs("div",{children:[o.jsx("li",{className:"px-4 py-2 font-bold text-gray-900 sticky top-0 bg-gray-200 dark:bg-gray-900 dark:text-gray-100",children:T.title}),T.loading&&o.jsx("div",{className:"flex justify-center py-2",children:o.jsx(ti,{className:"h-7 w-7"})}),!T.loading&&T.options.map((C,D)=>o.jsx("li",{onClick:()=>x(C),className:I("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",D%2===0?"bg-white dark:bg-gray-700":"bg-gray-100 dark:bg-gray-800"),children:(d||k)(C)},C.id))]},T.title)),L.length===0&&o.jsx("li",{className:"px-4 py-2 text-gray-500 italic bg-white dark:bg-gray-800 dark:text-gray-400",children:h}),v&&o.jsx("div",{className:"sticky bottom-0 bg-white dark:bg-gray-800 border-t border-gray-300 dark:border-gray-700",children:o.jsx("li",{onClick:()=>x(v),className:"px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",children:(d||k)(v)},v.id)})]})]})}const Rm=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,...l})=>o.jsx(vr,{label:e,id:t,required:r,error:n,className:i,children:o.jsx("div",{className:"relative flex flex-1 items-center",children:o.jsx("textarea",{...l,id:t,required:r,disabled:a,className:I(yn(a,n),s)})})}),Ai=236,Wl=["412","424","414","426","416","422"],Ri={HEIGHT:30,WIDTH:23,LENGTH:1},Im=[15,39],Fm=[24,49];var $m=function(t){return Um(t)&&!zm(t)};function Um(e){return!!e&&typeof e=="object"}function zm(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ym(e)}var Bm=typeof Symbol=="function"&&Symbol.for,Vm=Bm?Symbol.for("react.element"):60103;function Ym(e){return e.$$typeof===Vm}function Wm(e){return Array.isArray(e)?[]:{}}function Gs(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wn(Wm(e),e,t):e}function Hm(e,t,r){return e.concat(t).map(function(n){return Gs(n,r)})}function Gm(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(s){n[s]=Gs(e[s],r)}),Object.keys(t).forEach(function(s){!r.isMergeableObject(t[s])||!e[s]?n[s]=Gs(t[s],r):n[s]=Wn(e[s],t[s],r)}),n}function Wn(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Hm,r.isMergeableObject=r.isMergeableObject||$m;var n=Array.isArray(t),s=Array.isArray(e),i=n===s;return i?n?r.arrayMerge(e,t,r):Gm(e,t,r):Gs(t,r)}Wn.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,s){return Wn(n,s,r)},{})};var ta=Wn,$u=typeof global=="object"&&global&&global.Object===Object&&global,qm=typeof self=="object"&&self&&self.Object===Object&&self,At=$u||qm||Function("return this")(),mr=At.Symbol,Uu=Object.prototype,Zm=Uu.hasOwnProperty,Km=Uu.toString,Nn=mr?mr.toStringTag:void 0;function Jm(e){var t=Zm.call(e,Nn),r=e[Nn];try{e[Nn]=void 0;var n=!0}catch{}var s=Km.call(e);return n&&(t?e[Nn]=r:delete e[Nn]),s}var Xm=Object.prototype,Qm=Xm.toString;function e0(e){return Qm.call(e)}var t0="[object Null]",r0="[object Undefined]",Hl=mr?mr.toStringTag:void 0;function Br(e){return e==null?e===void 0?r0:t0:Hl&&Hl in Object(e)?Jm(e):e0(e)}function zu(e,t){return function(r){return e(t(r))}}var Ta=zu(Object.getPrototypeOf,Object);function Vr(e){return e!=null&&typeof e=="object"}var n0="[object Object]",s0=Function.prototype,i0=Object.prototype,Bu=s0.toString,a0=i0.hasOwnProperty,o0=Bu.call(Object);function Gl(e){if(!Vr(e)||Br(e)!=n0)return!1;var t=Ta(e);if(t===null)return!0;var r=a0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Bu.call(r)==o0}function l0(){this.__data__=[],this.size=0}function Vu(e,t){return e===t||e!==e&&t!==t}function si(e,t){for(var r=e.length;r--;)if(Vu(e[r][0],t))return r;return-1}var c0=Array.prototype,u0=c0.splice;function d0(e){var t=this.__data__,r=si(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():u0.call(t,r,1),--this.size,!0}function f0(e){var t=this.__data__,r=si(t,e);return r<0?void 0:t[r][1]}function h0(e){return si(this.__data__,e)>-1}function p0(e,t){var r=this.__data__,n=si(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Xt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xt.prototype.clear=l0;Xt.prototype.delete=d0;Xt.prototype.get=f0;Xt.prototype.has=h0;Xt.prototype.set=p0;function g0(){this.__data__=new Xt,this.size=0}function m0(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function v0(e){return this.__data__.get(e)}function y0(e){return this.__data__.has(e)}function Xn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var x0="[object AsyncFunction]",b0="[object Function]",w0="[object GeneratorFunction]",S0="[object Proxy]";function Yu(e){if(!Xn(e))return!1;var t=Br(e);return t==b0||t==w0||t==x0||t==S0}var Ii=At["__core-js_shared__"],ql=(function(){var e=/[^.]+$/.exec(Ii&&Ii.keys&&Ii.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function E0(e){return!!ql&&ql in e}var k0=Function.prototype,L0=k0.toString;function Yr(e){if(e!=null){try{return L0.call(e)}catch{}try{return e+""}catch{}}return""}var C0=/[\\^$.*+?()[\]{}|]/g,O0=/^\[object .+?Constructor\]$/,j0=Function.prototype,M0=Object.prototype,_0=j0.toString,T0=M0.hasOwnProperty,N0=RegExp("^"+_0.call(T0).replace(C0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function P0(e){if(!Xn(e)||E0(e))return!1;var t=Yu(e)?N0:O0;return t.test(Yr(e))}function D0(e,t){return e?.[t]}function Wr(e,t){var r=D0(e,t);return P0(r)?r:void 0}var Hn=Wr(At,"Map"),Gn=Wr(Object,"create");function A0(){this.__data__=Gn?Gn(null):{},this.size=0}function R0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var I0="__lodash_hash_undefined__",F0=Object.prototype,$0=F0.hasOwnProperty;function U0(e){var t=this.__data__;if(Gn){var r=t[e];return r===I0?void 0:r}return $0.call(t,e)?t[e]:void 0}var z0=Object.prototype,B0=z0.hasOwnProperty;function V0(e){var t=this.__data__;return Gn?t[e]!==void 0:B0.call(t,e)}var Y0="__lodash_hash_undefined__";function W0(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gn&&t===void 0?Y0:t,this}function $r(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$r.prototype.clear=A0;$r.prototype.delete=R0;$r.prototype.get=U0;$r.prototype.has=V0;$r.prototype.set=W0;function H0(){this.size=0,this.__data__={hash:new $r,map:new(Hn||Xt),string:new $r}}function G0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ii(e,t){var r=e.__data__;return G0(t)?r[typeof t=="string"?"string":"hash"]:r.map}function q0(e){var t=ii(this,e).delete(e);return this.size-=t?1:0,t}function Z0(e){return ii(this,e).get(e)}function K0(e){return ii(this,e).has(e)}function J0(e,t){var r=ii(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function yr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yr.prototype.clear=H0;yr.prototype.delete=q0;yr.prototype.get=Z0;yr.prototype.has=K0;yr.prototype.set=J0;var X0=200;function Q0(e,t){var r=this.__data__;if(r instanceof Xt){var n=r.__data__;if(!Hn||n.length<X0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new yr(n)}return r.set(e,t),this.size=r.size,this}function xn(e){var t=this.__data__=new Xt(e);this.size=t.size}xn.prototype.clear=g0;xn.prototype.delete=m0;xn.prototype.get=v0;xn.prototype.has=y0;xn.prototype.set=Q0;function ev(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Zl=(function(){try{var e=Wr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Wu(e,t,r){t=="__proto__"&&Zl?Zl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var tv=Object.prototype,rv=tv.hasOwnProperty;function Hu(e,t,r){var n=e[t];(!(rv.call(e,t)&&Vu(n,r))||r===void 0&&!(t in e))&&Wu(e,t,r)}function ai(e,t,r,n){var s=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=void 0;u===void 0&&(u=e[l]),s?Wu(r,l,u):Hu(r,l,u)}return r}function nv(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var sv="[object Arguments]";function Kl(e){return Vr(e)&&Br(e)==sv}var Gu=Object.prototype,iv=Gu.hasOwnProperty,av=Gu.propertyIsEnumerable,ov=Kl((function(){return arguments})())?Kl:function(e){return Vr(e)&&iv.call(e,"callee")&&!av.call(e,"callee")},Qn=Array.isArray;function lv(){return!1}var qu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jl=qu&&typeof module=="object"&&module&&!module.nodeType&&module,cv=Jl&&Jl.exports===qu,Xl=cv?At.Buffer:void 0,uv=Xl?Xl.isBuffer:void 0,Zu=uv||lv,dv=9007199254740991,fv=/^(?:0|[1-9]\d*)$/;function hv(e,t){var r=typeof e;return t=t??dv,!!t&&(r=="number"||r!="symbol"&&fv.test(e))&&e>-1&&e%1==0&&e<t}var pv=9007199254740991;function Ku(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pv}var gv="[object Arguments]",mv="[object Array]",vv="[object Boolean]",yv="[object Date]",xv="[object Error]",bv="[object Function]",wv="[object Map]",Sv="[object Number]",Ev="[object Object]",kv="[object RegExp]",Lv="[object Set]",Cv="[object String]",Ov="[object WeakMap]",jv="[object ArrayBuffer]",Mv="[object DataView]",_v="[object Float32Array]",Tv="[object Float64Array]",Nv="[object Int8Array]",Pv="[object Int16Array]",Dv="[object Int32Array]",Av="[object Uint8Array]",Rv="[object Uint8ClampedArray]",Iv="[object Uint16Array]",Fv="[object Uint32Array]",Ae={};Ae[_v]=Ae[Tv]=Ae[Nv]=Ae[Pv]=Ae[Dv]=Ae[Av]=Ae[Rv]=Ae[Iv]=Ae[Fv]=!0;Ae[gv]=Ae[mv]=Ae[jv]=Ae[vv]=Ae[Mv]=Ae[yv]=Ae[xv]=Ae[bv]=Ae[wv]=Ae[Sv]=Ae[Ev]=Ae[kv]=Ae[Lv]=Ae[Cv]=Ae[Ov]=!1;function $v(e){return Vr(e)&&Ku(e.length)&&!!Ae[Br(e)]}function Na(e){return function(t){return e(t)}}var Ju=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fn=Ju&&typeof module=="object"&&module&&!module.nodeType&&module,Uv=Fn&&Fn.exports===Ju,Fi=Uv&&$u.process,hn=(function(){try{var e=Fn&&Fn.require&&Fn.require("util").types;return e||Fi&&Fi.binding&&Fi.binding("util")}catch{}})(),Ql=hn&&hn.isTypedArray,zv=Ql?Na(Ql):$v,Bv=Object.prototype,Vv=Bv.hasOwnProperty;function Xu(e,t){var r=Qn(e),n=!r&&ov(e),s=!r&&!n&&Zu(e),i=!r&&!n&&!s&&zv(e),a=r||n||s||i,l=a?nv(e.length,String):[],u=l.length;for(var d in e)(t||Vv.call(e,d))&&!(a&&(d=="length"||s&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||hv(d,u)))&&l.push(d);return l}var Yv=Object.prototype;function Pa(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Yv;return e===r}var Wv=zu(Object.keys,Object),Hv=Object.prototype,Gv=Hv.hasOwnProperty;function qv(e){if(!Pa(e))return Wv(e);var t=[];for(var r in Object(e))Gv.call(e,r)&&r!="constructor"&&t.push(r);return t}function Qu(e){return e!=null&&Ku(e.length)&&!Yu(e)}function Da(e){return Qu(e)?Xu(e):qv(e)}function Zv(e,t){return e&&ai(t,Da(t),e)}function Kv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Jv=Object.prototype,Xv=Jv.hasOwnProperty;function Qv(e){if(!Xn(e))return Kv(e);var t=Pa(e),r=[];for(var n in e)n=="constructor"&&(t||!Xv.call(e,n))||r.push(n);return r}function Aa(e){return Qu(e)?Xu(e,!0):Qv(e)}function ey(e,t){return e&&ai(t,Aa(t),e)}var ed=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ec=ed&&typeof module=="object"&&module&&!module.nodeType&&module,ty=ec&&ec.exports===ed,tc=ty?At.Buffer:void 0,rc=tc?tc.allocUnsafe:void 0;function ry(e,t){if(t)return e.slice();var r=e.length,n=rc?rc(r):new e.constructor(r);return e.copy(n),n}function td(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function ny(e,t){for(var r=-1,n=e==null?0:e.length,s=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[s++]=a)}return i}function rd(){return[]}var sy=Object.prototype,iy=sy.propertyIsEnumerable,nc=Object.getOwnPropertySymbols,Ra=nc?function(e){return e==null?[]:(e=Object(e),ny(nc(e),function(t){return iy.call(e,t)}))}:rd;function ay(e,t){return ai(e,Ra(e),t)}function nd(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var oy=Object.getOwnPropertySymbols,sd=oy?function(e){for(var t=[];e;)nd(t,Ra(e)),e=Ta(e);return t}:rd;function ly(e,t){return ai(e,sd(e),t)}function id(e,t,r){var n=t(e);return Qn(e)?n:nd(n,r(e))}function cy(e){return id(e,Da,Ra)}function uy(e){return id(e,Aa,sd)}var ra=Wr(At,"DataView"),na=Wr(At,"Promise"),sa=Wr(At,"Set"),ia=Wr(At,"WeakMap"),sc="[object Map]",dy="[object Object]",ic="[object Promise]",ac="[object Set]",oc="[object WeakMap]",lc="[object DataView]",fy=Yr(ra),hy=Yr(Hn),py=Yr(na),gy=Yr(sa),my=Yr(ia),Yt=Br;(ra&&Yt(new ra(new ArrayBuffer(1)))!=lc||Hn&&Yt(new Hn)!=sc||na&&Yt(na.resolve())!=ic||sa&&Yt(new sa)!=ac||ia&&Yt(new ia)!=oc)&&(Yt=function(e){var t=Br(e),r=t==dy?e.constructor:void 0,n=r?Yr(r):"";if(n)switch(n){case fy:return lc;case hy:return sc;case py:return ic;case gy:return ac;case my:return oc}return t});var vy=Object.prototype,yy=vy.hasOwnProperty;function xy(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&yy.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var cc=At.Uint8Array;function Ia(e){var t=new e.constructor(e.byteLength);return new cc(t).set(new cc(e)),t}function by(e,t){var r=t?Ia(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var wy=/\w*$/;function Sy(e){var t=new e.constructor(e.source,wy.exec(e));return t.lastIndex=e.lastIndex,t}var uc=mr?mr.prototype:void 0,dc=uc?uc.valueOf:void 0;function Ey(e){return dc?Object(dc.call(e)):{}}function ky(e,t){var r=t?Ia(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Ly="[object Boolean]",Cy="[object Date]",Oy="[object Map]",jy="[object Number]",My="[object RegExp]",_y="[object Set]",Ty="[object String]",Ny="[object Symbol]",Py="[object ArrayBuffer]",Dy="[object DataView]",Ay="[object Float32Array]",Ry="[object Float64Array]",Iy="[object Int8Array]",Fy="[object Int16Array]",$y="[object Int32Array]",Uy="[object Uint8Array]",zy="[object Uint8ClampedArray]",By="[object Uint16Array]",Vy="[object Uint32Array]";function Yy(e,t,r){var n=e.constructor;switch(t){case Py:return Ia(e);case Ly:case Cy:return new n(+e);case Dy:return by(e,r);case Ay:case Ry:case Iy:case Fy:case $y:case Uy:case zy:case By:case Vy:return ky(e,r);case Oy:return new n;case jy:case Ty:return new n(e);case My:return Sy(e);case _y:return new n;case Ny:return Ey(e)}}var fc=Object.create,Wy=(function(){function e(){}return function(t){if(!Xn(t))return{};if(fc)return fc(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Hy(e){return typeof e.constructor=="function"&&!Pa(e)?Wy(Ta(e)):{}}var Gy="[object Map]";function qy(e){return Vr(e)&&Yt(e)==Gy}var hc=hn&&hn.isMap,Zy=hc?Na(hc):qy,Ky="[object Set]";function Jy(e){return Vr(e)&&Yt(e)==Ky}var pc=hn&&hn.isSet,Xy=pc?Na(pc):Jy,Qy=1,ex=2,tx=4,ad="[object Arguments]",rx="[object Array]",nx="[object Boolean]",sx="[object Date]",ix="[object Error]",od="[object Function]",ax="[object GeneratorFunction]",ox="[object Map]",lx="[object Number]",ld="[object Object]",cx="[object RegExp]",ux="[object Set]",dx="[object String]",fx="[object Symbol]",hx="[object WeakMap]",px="[object ArrayBuffer]",gx="[object DataView]",mx="[object Float32Array]",vx="[object Float64Array]",yx="[object Int8Array]",xx="[object Int16Array]",bx="[object Int32Array]",wx="[object Uint8Array]",Sx="[object Uint8ClampedArray]",Ex="[object Uint16Array]",kx="[object Uint32Array]",De={};De[ad]=De[rx]=De[px]=De[gx]=De[nx]=De[sx]=De[mx]=De[vx]=De[yx]=De[xx]=De[bx]=De[ox]=De[lx]=De[ld]=De[cx]=De[ux]=De[dx]=De[fx]=De[wx]=De[Sx]=De[Ex]=De[kx]=!0;De[ix]=De[od]=De[hx]=!1;function $n(e,t,r,n,s,i){var a,l=t&Qy,u=t&ex,d=t&tx;if(a!==void 0)return a;if(!Xn(e))return e;var f=Qn(e);if(f){if(a=xy(e),!l)return td(e,a)}else{var h=Yt(e),p=h==od||h==ax;if(Zu(e))return ry(e,l);if(h==ld||h==ad||p&&!s){if(a=u||p?{}:Hy(e),!l)return u?ly(e,ey(a,e)):ay(e,Zv(a,e))}else{if(!De[h])return s?e:{};a=Yy(e,h,l)}}i||(i=new xn);var v=i.get(e);if(v)return v;i.set(e,a),Xy(e)?e.forEach(function(y){a.add($n(y,t,r,y,e,i))}):Zy(e)&&e.forEach(function(y,w){a.set(w,$n(y,t,r,w,e,i))});var g=d?u?uy:cy:u?Aa:Da,b=f?void 0:g(e);return ev(b||e,function(y,w){b&&(w=y,y=e[w]),Hu(a,w,$n(y,t,r,w,e,i))}),a}var Lx=1,Cx=4;function ys(e){return $n(e,Lx|Cx)}var $i,gc;function Ox(){if(gc)return $i;gc=1;var e=Array.isArray,t=Object.keys,r=Object.prototype.hasOwnProperty,n=typeof Element<"u";function s(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){var l=e(i),u=e(a),d,f,h;if(l&&u){if(f=i.length,f!=a.length)return!1;for(d=f;d--!==0;)if(!s(i[d],a[d]))return!1;return!0}if(l!=u)return!1;var p=i instanceof Date,v=a instanceof Date;if(p!=v)return!1;if(p&&v)return i.getTime()==a.getTime();var g=i instanceof RegExp,b=a instanceof RegExp;if(g!=b)return!1;if(g&&b)return i.toString()==a.toString();var y=t(i);if(f=y.length,f!==t(a).length)return!1;for(d=f;d--!==0;)if(!r.call(a,y[d]))return!1;if(n&&i instanceof Element&&a instanceof Element)return i===a;for(d=f;d--!==0;)if(h=y[d],!(h==="_owner"&&i.$$typeof)&&!s(i[h],a[h]))return!1;return!0}return i!==i&&a!==a}return $i=function(a,l){try{return s(a,l)}catch(u){if(u.message&&u.message.match(/stack|recursion/i)||u.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",u.name,u.message),!1;throw u}},$i}var jx=Ox();const _r=qc(jx);var Mx=process.env.NODE_ENV==="production";function lr(e,t){if(!Mx){var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}var _x=4;function mc(e){return $n(e,_x)}function cd(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var Tx="[object Symbol]";function Fa(e){return typeof e=="symbol"||Vr(e)&&Br(e)==Tx}var Nx="Expected a function";function $a(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Nx);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],i=r.cache;if(i.has(s))return i.get(s);var a=e.apply(this,n);return r.cache=i.set(s,a)||i,a};return r.cache=new($a.Cache||yr),r}$a.Cache=yr;var Px=500;function Dx(e){var t=$a(e,function(n){return r.size===Px&&r.clear(),n}),r=t.cache;return t}var Ax=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rx=/\\(\\)?/g,Ix=Dx(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ax,function(r,n,s,i){t.push(s?i.replace(Rx,"$1"):n||r)}),t});function Fx(e){if(typeof e=="string"||Fa(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var vc=mr?mr.prototype:void 0,yc=vc?vc.toString:void 0;function ud(e){if(typeof e=="string")return e;if(Qn(e))return cd(e,ud)+"";if(Fa(e))return yc?yc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $x(e){return e==null?"":ud(e)}function dd(e){return Qn(e)?cd(e,Fx):Fa(e)?[e]:td(Ix($x(e)))}var xs={exports:{}},Me={};/** @license React v16.13.1
60
+ * react-is.production.min.js
61
+ *
62
+ * Copyright (c) Facebook, Inc. and its affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */var xc;function Ux(){if(xc)return Me;xc=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,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function O(m){if(typeof m=="object"&&m!==null){var x=m.$$typeof;switch(x){case t:switch(m=m.type,m){case u:case d:case n:case i:case s:case h:return m;default:switch(m=m&&m.$$typeof,m){case l:case f:case g:case v:case a:return m;default:return x}}case r:return x}}}function k(m){return O(m)===d}return Me.AsyncMode=u,Me.ConcurrentMode=d,Me.ContextConsumer=l,Me.ContextProvider=a,Me.Element=t,Me.ForwardRef=f,Me.Fragment=n,Me.Lazy=g,Me.Memo=v,Me.Portal=r,Me.Profiler=i,Me.StrictMode=s,Me.Suspense=h,Me.isAsyncMode=function(m){return k(m)||O(m)===u},Me.isConcurrentMode=k,Me.isContextConsumer=function(m){return O(m)===l},Me.isContextProvider=function(m){return O(m)===a},Me.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Me.isForwardRef=function(m){return O(m)===f},Me.isFragment=function(m){return O(m)===n},Me.isLazy=function(m){return O(m)===g},Me.isMemo=function(m){return O(m)===v},Me.isPortal=function(m){return O(m)===r},Me.isProfiler=function(m){return O(m)===i},Me.isStrictMode=function(m){return O(m)===s},Me.isSuspense=function(m){return O(m)===h},Me.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===d||m===i||m===s||m===h||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===g||m.$$typeof===v||m.$$typeof===a||m.$$typeof===l||m.$$typeof===f||m.$$typeof===y||m.$$typeof===w||m.$$typeof===E||m.$$typeof===b)},Me.typeOf=O,Me}var _e={};/** @license React v16.13.1
67
+ * react-is.development.js
68
+ *
69
+ * Copyright (c) Facebook, Inc. and its affiliates.
70
+ *
71
+ * This source code is licensed under the MIT license found in the
72
+ * LICENSE file in the root directory of this source tree.
73
+ */var bc;function zx(){return bc||(bc=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,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function O(V){return typeof V=="string"||typeof V=="function"||V===n||V===d||V===i||V===s||V===h||V===p||typeof V=="object"&&V!==null&&(V.$$typeof===g||V.$$typeof===v||V.$$typeof===a||V.$$typeof===l||V.$$typeof===f||V.$$typeof===y||V.$$typeof===w||V.$$typeof===E||V.$$typeof===b)}function k(V){if(typeof V=="object"&&V!==null){var qe=V.$$typeof;switch(qe){case t:var rt=V.type;switch(rt){case u:case d:case n:case i:case s:case h:return rt;default:var me=rt&&rt.$$typeof;switch(me){case l:case f:case g:case v:case a:return me;default:return qe}}case r:return qe}}}var m=u,x=d,L=l,T=a,C=t,D=f,P=n,B=g,z=v,Y=r,q=i,U=s,re=h,ee=!1;function ce(V){return ee||(ee=!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.")),ae(V)||k(V)===u}function ae(V){return k(V)===d}function ne(V){return k(V)===l}function se(V){return k(V)===a}function Z(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function de(V){return k(V)===f}function N(V){return k(V)===n}function ke(V){return k(V)===g}function we(V){return k(V)===v}function te(V){return k(V)===r}function Te(V){return k(V)===i}function K(V){return k(V)===s}function pe(V){return k(V)===h}_e.AsyncMode=m,_e.ConcurrentMode=x,_e.ContextConsumer=L,_e.ContextProvider=T,_e.Element=C,_e.ForwardRef=D,_e.Fragment=P,_e.Lazy=B,_e.Memo=z,_e.Portal=Y,_e.Profiler=q,_e.StrictMode=U,_e.Suspense=re,_e.isAsyncMode=ce,_e.isConcurrentMode=ae,_e.isContextConsumer=ne,_e.isContextProvider=se,_e.isElement=Z,_e.isForwardRef=de,_e.isFragment=N,_e.isLazy=ke,_e.isMemo=we,_e.isPortal=te,_e.isProfiler=Te,_e.isStrictMode=K,_e.isSuspense=pe,_e.isValidElementType=O,_e.typeOf=k})()),_e}var wc;function Bx(){return wc||(wc=1,process.env.NODE_ENV==="production"?xs.exports=Ux():xs.exports=zx()),xs.exports}var Ui,Sc;function Vx(){if(Sc)return Ui;Sc=1;var e=Bx(),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},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=n,i[e.Memo]=s;function a(g){return e.isMemo(g)?s:i[g.$$typeof]||t}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;function v(g,b,y){if(typeof b!="string"){if(p){var w=h(b);w&&w!==p&&v(g,w,y)}var E=u(b);d&&(E=E.concat(d(b)));for(var O=a(g),k=a(b),m=0;m<E.length;++m){var x=E[m];if(!r[x]&&!(y&&y[x])&&!(k&&k[x])&&!(O&&O[x])){var L=f(b,x);try{l(g,x,L)}catch{}}}}return g}return Ui=v,Ui}Vx();function Ke(){return Ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ke.apply(this,arguments)}function fd(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var oi=c.createContext(void 0);oi.displayName="FormikContext";var Yx=oi.Provider;oi.Consumer;function Wx(){var e=c.useContext(oi);return e||(process.env.NODE_ENV!=="production"?lr(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):lr()),e}var mt=function(t){return typeof t=="function"},li=function(t){return t!==null&&typeof t=="object"},Hx=function(t){return String(Math.floor(Number(t)))===t},zi=function(t){return Object.prototype.toString.call(t)==="[object String]"},Gx=function(t){return c.Children.count(t)===0},Bi=function(t){return li(t)&&mt(t.then)};function qx(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ct(e,t,r,n){n===void 0&&(n=0);for(var s=dd(t);e&&n<s.length;)e=e[s[n++]];return n!==s.length&&!e||e===void 0?r:e}function Rr(e,t,r){for(var n=mc(e),s=n,i=0,a=dd(t);i<a.length-1;i++){var l=a[i],u=ct(e,a.slice(0,i+1));if(u&&(li(u)||Array.isArray(u)))s=s[l]=mc(u);else{var d=a[i+1];s=s[l]=Hx(d)&&Number(d)>=0?[]:{}}}return(i===0?e:s)[a[i]]===r?e:(r===void 0?delete s[a[i]]:s[a[i]]=r,i===0&&r===void 0&&delete n[a[i]],n)}function hd(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var s=0,i=Object.keys(e);s<i.length;s++){var a=i[s],l=e[a];li(l)?r.get(l)||(r.set(l,!0),n[a]=Array.isArray(l)?[]:{},hd(l,t,r,n[a])):n[a]=t}return n}function Zx(e,t){switch(t.type){case"SET_VALUES":return Ke({},e,{values:t.payload});case"SET_TOUCHED":return Ke({},e,{touched:t.payload});case"SET_ERRORS":return _r(e.errors,t.payload)?e:Ke({},e,{errors:t.payload});case"SET_STATUS":return Ke({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ke({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ke({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ke({},e,{values:Rr(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ke({},e,{touched:Rr(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ke({},e,{errors:Rr(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ke({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ke({},e,{touched:hd(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ke({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ke({},e,{isSubmitting:!1});default:return e}}var jr={},bs={};function Kx(e){var t=e.validateOnChange,r=t===void 0?!0:t,n=e.validateOnBlur,s=n===void 0?!0:n,i=e.validateOnMount,a=i===void 0?!1:i,l=e.isInitialValid,u=e.enableReinitialize,d=u===void 0?!1:u,f=e.onSubmit,h=fd(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=Ke({validateOnChange:r,validateOnBlur:s,validateOnMount:a,onSubmit:f},h),v=c.useRef(p.initialValues),g=c.useRef(p.initialErrors||jr),b=c.useRef(p.initialTouched||bs),y=c.useRef(p.initialStatus),w=c.useRef(!1),E=c.useRef({});process.env.NODE_ENV!=="production"&&c.useEffect(function(){typeof l>"u"||(process.env.NODE_ENV!=="production"?lr(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):lr())},[]),c.useEffect(function(){return w.current=!0,function(){w.current=!1}},[]);var O=c.useState(0),k=O[1],m=c.useRef({values:ys(p.initialValues),errors:ys(p.initialErrors)||jr,touched:ys(p.initialTouched)||bs,status:ys(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),x=m.current,L=c.useCallback(function(j){var F=m.current;m.current=Zx(F,j),F!==m.current&&k(function(G){return G+1})},[]),T=c.useCallback(function(j,F){return new Promise(function(G,J){var le=p.validate(j,F);le==null?G(jr):Bi(le)?le.then(function(ge){G(ge||jr)},function(ge){process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",ge),J(ge)}):G(le)})},[p.validate]),C=c.useCallback(function(j,F){var G=p.validationSchema,J=mt(G)?G(F):G,le=F&&J.validateAt?J.validateAt(F,j):Xx(j,J);return new Promise(function(ge,$e){le.then(function(){ge(jr)},function(Ze){Ze.name==="ValidationError"?ge(Jx(Ze)):(process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",Ze),$e(Ze))})})},[p.validationSchema]),D=c.useCallback(function(j,F){return new Promise(function(G){return G(E.current[j].validate(F))})},[]),P=c.useCallback(function(j){var F=Object.keys(E.current).filter(function(J){return mt(E.current[J].validate)}),G=F.length>0?F.map(function(J){return D(J,ct(j,J))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(G).then(function(J){return J.reduce(function(le,ge,$e){return ge==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ge&&(le=Rr(le,F[$e],ge)),le},{})})},[D]),B=c.useCallback(function(j){return Promise.all([P(j),p.validationSchema?C(j):{},p.validate?T(j):{}]).then(function(F){var G=F[0],J=F[1],le=F[2],ge=ta.all([G,J,le],{arrayMerge:Qx});return ge})},[p.validate,p.validationSchema,P,T,C]),z=pt(function(j){return j===void 0&&(j=x.values),L({type:"SET_ISVALIDATING",payload:!0}),B(j).then(function(F){return w.current&&(L({type:"SET_ISVALIDATING",payload:!1}),L({type:"SET_ERRORS",payload:F})),F})});c.useEffect(function(){a&&w.current===!0&&_r(v.current,p.initialValues)&&z(v.current)},[a,z]);var Y=c.useCallback(function(j){var F=j&&j.values?j.values:v.current,G=j&&j.errors?j.errors:g.current?g.current:p.initialErrors||{},J=j&&j.touched?j.touched:b.current?b.current:p.initialTouched||{},le=j&&j.status?j.status:y.current?y.current:p.initialStatus;v.current=F,g.current=G,b.current=J,y.current=le;var ge=function(){L({type:"RESET_FORM",payload:{isSubmitting:!!j&&!!j.isSubmitting,errors:G,touched:J,status:le,values:F,isValidating:!!j&&!!j.isValidating,submitCount:j&&j.submitCount&&typeof j.submitCount=="number"?j.submitCount:0}})};if(p.onReset){var $e=p.onReset(x.values,qe);Bi($e)?$e.then(ge):ge()}else ge()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);c.useEffect(function(){w.current===!0&&!_r(v.current,p.initialValues)&&d&&(v.current=p.initialValues,Y(),a&&z(v.current))},[d,p.initialValues,Y,a,z]),c.useEffect(function(){d&&w.current===!0&&!_r(g.current,p.initialErrors)&&(g.current=p.initialErrors||jr,L({type:"SET_ERRORS",payload:p.initialErrors||jr}))},[d,p.initialErrors]),c.useEffect(function(){d&&w.current===!0&&!_r(b.current,p.initialTouched)&&(b.current=p.initialTouched||bs,L({type:"SET_TOUCHED",payload:p.initialTouched||bs}))},[d,p.initialTouched]),c.useEffect(function(){d&&w.current===!0&&!_r(y.current,p.initialStatus)&&(y.current=p.initialStatus,L({type:"SET_STATUS",payload:p.initialStatus}))},[d,p.initialStatus,p.initialTouched]);var q=pt(function(j){if(E.current[j]&&mt(E.current[j].validate)){var F=ct(x.values,j),G=E.current[j].validate(F);return Bi(G)?(L({type:"SET_ISVALIDATING",payload:!0}),G.then(function(J){return J}).then(function(J){L({type:"SET_FIELD_ERROR",payload:{field:j,value:J}}),L({type:"SET_ISVALIDATING",payload:!1})})):(L({type:"SET_FIELD_ERROR",payload:{field:j,value:G}}),Promise.resolve(G))}else if(p.validationSchema)return L({type:"SET_ISVALIDATING",payload:!0}),C(x.values,j).then(function(J){return J}).then(function(J){L({type:"SET_FIELD_ERROR",payload:{field:j,value:ct(J,j)}}),L({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),U=c.useCallback(function(j,F){var G=F.validate;E.current[j]={validate:G}},[]),re=c.useCallback(function(j){delete E.current[j]},[]),ee=pt(function(j,F){L({type:"SET_TOUCHED",payload:j});var G=F===void 0?s:F;return G?z(x.values):Promise.resolve()}),ce=c.useCallback(function(j){L({type:"SET_ERRORS",payload:j})},[]),ae=pt(function(j,F){var G=mt(j)?j(x.values):j;L({type:"SET_VALUES",payload:G});var J=F===void 0?r:F;return J?z(G):Promise.resolve()}),ne=c.useCallback(function(j,F){L({type:"SET_FIELD_ERROR",payload:{field:j,value:F}})},[]),se=pt(function(j,F,G){L({type:"SET_FIELD_VALUE",payload:{field:j,value:F}});var J=G===void 0?r:G;return J?z(Rr(x.values,j,F)):Promise.resolve()}),Z=c.useCallback(function(j,F){var G=F,J=j,le;if(!zi(j)){j.persist&&j.persist();var ge=j.target?j.target:j.currentTarget,$e=ge.type,Ze=ge.name,$t=ge.id,Mt=ge.value,qr=ge.checked,rr=ge.outerHTML,br=ge.options,nr=ge.multiple;G=F||Ze||$t,!G&&process.env.NODE_ENV!=="production"&&Ec({htmlContent:rr,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),J=/number|range/.test($e)?(le=parseFloat(Mt),isNaN(le)?"":le):/checkbox/.test($e)?t1(ct(x.values,G),qr,Mt):br&&nr?e1(br):Mt}G&&se(G,J)},[se,x.values]),de=pt(function(j){if(zi(j))return function(F){return Z(F,j)};Z(j)}),N=pt(function(j,F,G){F===void 0&&(F=!0),L({type:"SET_FIELD_TOUCHED",payload:{field:j,value:F}});var J=G===void 0?s:G;return J?z(x.values):Promise.resolve()}),ke=c.useCallback(function(j,F){j.persist&&j.persist();var G=j.target,J=G.name,le=G.id,ge=G.outerHTML,$e=F||J||le;!$e&&process.env.NODE_ENV!=="production"&&Ec({htmlContent:ge,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),N($e,!0)},[N]),we=pt(function(j){if(zi(j))return function(F){return ke(F,j)};ke(j)}),te=c.useCallback(function(j){mt(j)?L({type:"SET_FORMIK_STATE",payload:j}):L({type:"SET_FORMIK_STATE",payload:function(){return j}})},[]),Te=c.useCallback(function(j){L({type:"SET_STATUS",payload:j})},[]),K=c.useCallback(function(j){L({type:"SET_ISSUBMITTING",payload:j})},[]),pe=pt(function(){return L({type:"SUBMIT_ATTEMPT"}),z().then(function(j){var F=j instanceof Error,G=!F&&Object.keys(j).length===0;if(G){var J;try{if(J=rt(),J===void 0)return}catch(le){throw le}return Promise.resolve(J).then(function(le){return w.current&&L({type:"SUBMIT_SUCCESS"}),le}).catch(function(le){if(w.current)throw L({type:"SUBMIT_FAILURE"}),le})}else if(w.current&&(L({type:"SUBMIT_FAILURE"}),F))throw j})}),V=pt(function(j){if(j&&j.preventDefault&&mt(j.preventDefault)&&j.preventDefault(),j&&j.stopPropagation&&mt(j.stopPropagation)&&j.stopPropagation(),process.env.NODE_ENV!=="production"&&typeof document<"u"){var F=qx();F!==null&&F instanceof HTMLButtonElement&&(F.attributes&&F.attributes.getNamedItem("type")||(process.env.NODE_ENV!=="production"?lr(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):lr()))}pe().catch(function(G){console.warn("Warning: An unhandled error was caught from submitForm()",G)})}),qe={resetForm:Y,validateForm:z,validateField:q,setErrors:ce,setFieldError:ne,setFieldTouched:N,setFieldValue:se,setStatus:Te,setSubmitting:K,setTouched:ee,setValues:ae,setFormikState:te,submitForm:pe},rt=pt(function(){return f(x.values,qe)}),me=pt(function(j){j&&j.preventDefault&&mt(j.preventDefault)&&j.preventDefault(),j&&j.stopPropagation&&mt(j.stopPropagation)&&j.stopPropagation(),Y()}),jt=c.useCallback(function(j){return{value:ct(x.values,j),error:ct(x.errors,j),touched:!!ct(x.touched,j),initialValue:ct(v.current,j),initialTouched:!!ct(b.current,j),initialError:ct(g.current,j)}},[x.errors,x.touched,x.values]),Ft=c.useCallback(function(j){return{setValue:function(G,J){return se(j,G,J)},setTouched:function(G,J){return N(j,G,J)},setError:function(G){return ne(j,G)}}},[se,N,ne]),xr=c.useCallback(function(j){var F=li(j),G=F?j.name:j,J=ct(x.values,G),le={name:G,value:J,onChange:de,onBlur:we};if(F){var ge=j.type,$e=j.value,Ze=j.as,$t=j.multiple;ge==="checkbox"?$e===void 0?le.checked=!!J:(le.checked=!!(Array.isArray(J)&&~J.indexOf($e)),le.value=$e):ge==="radio"?(le.checked=J===$e,le.value=$e):Ze==="select"&&$t&&(le.value=le.value||[],le.multiple=!0)}return le},[we,de,x.values]),lt=c.useMemo(function(){return!_r(v.current,x.values)},[v.current,x.values]),Gr=c.useMemo(function(){return typeof l<"u"?lt?x.errors&&Object.keys(x.errors).length===0:l!==!1&&mt(l)?l(p):l:x.errors&&Object.keys(x.errors).length===0},[l,lt,x.errors,p]),tr=Ke({},x,{initialValues:v.current,initialErrors:g.current,initialTouched:b.current,initialStatus:y.current,handleBlur:we,handleChange:de,handleReset:me,handleSubmit:V,resetForm:Y,setErrors:ce,setFormikState:te,setFieldTouched:N,setFieldValue:se,setFieldError:ne,setStatus:Te,setSubmitting:K,setTouched:ee,setValues:ae,submitForm:pe,validateForm:z,validateField:q,isValid:Gr,dirty:lt,unregisterField:re,registerField:U,getFieldProps:xr,getFieldMeta:jt,getFieldHelpers:Ft,validateOnBlur:s,validateOnChange:r,validateOnMount:a});return tr}function es(e){var t=Kx(e),r=e.component,n=e.children,s=e.render,i=e.innerRef;return c.useImperativeHandle(i,function(){return t}),process.env.NODE_ENV!=="production"&&c.useEffect(function(){e.render&&(process.env.NODE_ENV!=="production"?lr(!1,"<Formik render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>"):lr())},[]),c.createElement(Yx,{value:t},r?c.createElement(r,t):s?s(t):n?mt(n)?n(t):Gx(n)?null:c.Children.only(n):null)}function Ec(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+`
74
+ Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+r+`
75
+ `)}function Jx(e){var t={};if(e.inner){if(e.inner.length===0)return Rr(t,e.path,e.message);for(var s=e.inner,r=Array.isArray(s),n=0,s=r?s:s[Symbol.iterator]();;){var i;if(r){if(n>=s.length)break;i=s[n++]}else{if(n=s.next(),n.done)break;i=n.value}var a=i;ct(t,a.path)||(t=Rr(t,a.path,a.message))}}return t}function Xx(e,t,r,n){r===void 0&&(r=!1);var s=aa(e);return t[r?"validateSync":"validate"](s,{abortEarly:!1,context:s})}function aa(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(s){return Array.isArray(s)===!0||Gl(s)?aa(s):s!==""?s:void 0}):Gl(e[n])?t[n]=aa(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function Qx(e,t,r){var n=e.slice();return t.forEach(function(i,a){if(typeof n[a]>"u"){var l=r.clone!==!1,u=l&&r.isMergeableObject(i);n[a]=u?ta(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[a]=ta(e[a],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function e1(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function t1(e,t,r){if(typeof e=="boolean")return!!t;var n=[],s=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),s=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!s?n.concat(r):s?n.slice(0,i).concat(n.slice(i+1)):n}var r1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?c.useLayoutEffect:c.useEffect;function pt(e){var t=c.useRef(e);return r1(function(){t.current=e}),c.useCallback(function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return t.current.apply(void 0,n)},[])}var n1=c.forwardRef(function(e,t){var r=e.action,n=fd(e,["action"]),s=r??"#",i=Wx(),a=i.handleReset,l=i.handleSubmit;return c.createElement("form",Ke({onSubmit:l,ref:t,onReset:a,action:s},n))});n1.displayName="Form";function s1(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function oa(e){if(Array.isArray(e))return e.map(oa);if(e!==null&&typeof e=="object"){const t={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=s1(r);t[n]=oa(e[r])}return t}return e}function pd(e,t){return function(){return e.apply(t,arguments)}}const{toString:i1}=Object.prototype,{getPrototypeOf:Ua}=Object,{iterator:ci,toStringTag:gd}=Symbol,ui=(e=>t=>{const r=i1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ct=e=>(e=e.toLowerCase(),t=>ui(t)===e),di=e=>t=>typeof t===e,{isArray:bn}=Array,pn=di("undefined");function ts(e){return e!==null&&!pn(e)&&e.constructor!==null&&!pn(e.constructor)&&at(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const md=Ct("ArrayBuffer");function a1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&md(e.buffer),t}const o1=di("string"),at=di("function"),vd=di("number"),rs=e=>e!==null&&typeof e=="object",l1=e=>e===!0||e===!1,Cs=e=>{if(ui(e)!=="object")return!1;const t=Ua(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(gd in e)&&!(ci in e)},c1=e=>{if(!rs(e)||ts(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},u1=Ct("Date"),d1=Ct("File"),f1=Ct("Blob"),h1=Ct("FileList"),p1=e=>rs(e)&&at(e.pipe),g1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||at(e.append)&&((t=ui(e))==="formdata"||t==="object"&&at(e.toString)&&e.toString()==="[object FormData]"))},m1=Ct("URLSearchParams"),[v1,y1,x1,b1]=["ReadableStream","Request","Response","Headers"].map(Ct),w1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ns(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),bn(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(ts(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let l;for(n=0;n<a;n++)l=i[n],t.call(null,e[l],l,e)}}function yd(e,t){if(ts(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const Pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xd=e=>!pn(e)&&e!==Pr;function la(){const{caseless:e,skipUndefined:t}=xd(this)&&this||{},r={},n=(s,i)=>{const a=e&&yd(r,i)||i;Cs(r[a])&&Cs(s)?r[a]=la(r[a],s):Cs(s)?r[a]=la({},s):bn(s)?r[a]=s.slice():(!t||!pn(s))&&(r[a]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&ns(arguments[s],n);return r}const S1=(e,t,r,{allOwnKeys:n}={})=>(ns(t,(s,i)=>{r&&at(s)?e[i]=pd(s,r):e[i]=s},{allOwnKeys:n}),e),E1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),k1=(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)},L1=(e,t,r,n)=>{let s,i,a;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!n||n(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=r!==!1&&Ua(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},C1=(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},O1=e=>{if(!e)return null;if(bn(e))return e;let t=e.length;if(!vd(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},j1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ua(Uint8Array)),M1=(e,t)=>{const n=(e&&e[ci]).call(e);let s;for(;(s=n.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},_1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},T1=Ct("HTMLFormElement"),N1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),kc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),P1=Ct("RegExp"),bd=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ns(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(n[i]=a||s)}),Object.defineProperties(e,n)},D1=e=>{bd(e,(t,r)=>{if(at(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(at(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+"'")})}})},A1=(e,t)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return bn(e)?n(e):n(String(e).split(t)),r},R1=()=>{},I1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function F1(e){return!!(e&&at(e.append)&&e[gd]==="FormData"&&e[ci])}const $1=e=>{const t=new Array(10),r=(n,s)=>{if(rs(n)){if(t.indexOf(n)>=0)return;if(ts(n))return n;if(!("toJSON"in n)){t[s]=n;const i=bn(n)?[]:{};return ns(n,(a,l)=>{const u=r(a,s+1);!pn(u)&&(i[l]=u)}),t[s]=void 0,i}}return n};return r(e,0)},U1=Ct("AsyncFunction"),z1=e=>e&&(rs(e)||at(e))&&at(e.then)&&at(e.catch),wd=((e,t)=>e?setImmediate:t?((r,n)=>(Pr.addEventListener("message",({source:s,data:i})=>{s===Pr&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Pr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",at(Pr.postMessage)),B1=typeof queueMicrotask<"u"?queueMicrotask.bind(Pr):typeof process<"u"&&process.nextTick||wd,V1=e=>e!=null&&at(e[ci]),M={isArray:bn,isArrayBuffer:md,isBuffer:ts,isFormData:g1,isArrayBufferView:a1,isString:o1,isNumber:vd,isBoolean:l1,isObject:rs,isPlainObject:Cs,isEmptyObject:c1,isReadableStream:v1,isRequest:y1,isResponse:x1,isHeaders:b1,isUndefined:pn,isDate:u1,isFile:d1,isBlob:f1,isRegExp:P1,isFunction:at,isStream:p1,isURLSearchParams:m1,isTypedArray:j1,isFileList:h1,forEach:ns,merge:la,extend:S1,trim:w1,stripBOM:E1,inherits:k1,toFlatObject:L1,kindOf:ui,kindOfTest:Ct,endsWith:C1,toArray:O1,forEachEntry:M1,matchAll:_1,isHTMLForm:T1,hasOwnProperty:kc,hasOwnProp:kc,reduceDescriptors:bd,freezeMethods:D1,toObjectSet:A1,toCamelCase:N1,noop:R1,toFiniteNumber:I1,findKey:yd,global:Pr,isContextDefined:xd,isSpecCompliantForm:F1,toJSONObject:$1,isAsyncFn:U1,isThenable:z1,setImmediate:wd,asap:B1,isIterable:V1};function ue(e,t,r,n,s){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),s&&(this.response=s,this.status=s.status?s.status:null)}M.inherits(ue,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:M.toJSONObject(this.config),code:this.code,status:this.status}}});const Sd=ue.prototype,Ed={};["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=>{Ed[e]={value:e}});Object.defineProperties(ue,Ed);Object.defineProperty(Sd,"isAxiosError",{value:!0});ue.from=(e,t,r,n,s,i)=>{const a=Object.create(Sd);M.toFlatObject(e,a,function(f){return f!==Error.prototype},d=>d!=="isAxiosError");const l=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return ue.call(a,l,u,r,n,s),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const Y1=null;function ca(e){return M.isPlainObject(e)||M.isArray(e)}function kd(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function Lc(e,t,r){return e?e.concat(t).map(function(s,i){return s=kd(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function W1(e){return M.isArray(e)&&!e.some(ca)}const H1=M.toFlatObject(M,{},null,function(t){return/^is[A-Z]/.test(t)});function fi(e,t,r){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!M.isUndefined(y[b])});const n=r.metaTokens,s=r.visitor||f,i=r.dots,a=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(s))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(M.isDate(g))return g.toISOString();if(M.isBoolean(g))return g.toString();if(!u&&M.isBlob(g))throw new ue("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(g)||M.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,b,y){let w=g;if(g&&!y&&typeof g=="object"){if(M.endsWith(b,"{}"))b=n?b:b.slice(0,-2),g=JSON.stringify(g);else if(M.isArray(g)&&W1(g)||(M.isFileList(g)||M.endsWith(b,"[]"))&&(w=M.toArray(g)))return b=kd(b),w.forEach(function(O,k){!(M.isUndefined(O)||O===null)&&t.append(a===!0?Lc([b],k,i):a===null?b:b+"[]",d(O))}),!1}return ca(g)?!0:(t.append(Lc(y,b,i),d(g)),!1)}const h=[],p=Object.assign(H1,{defaultVisitor:f,convertValue:d,isVisitable:ca});function v(g,b){if(!M.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+b.join("."));h.push(g),M.forEach(g,function(w,E){(!(M.isUndefined(w)||w===null)&&s.call(t,w,M.isString(E)?E.trim():E,b,p))===!0&&v(w,b?b.concat(E):[E])}),h.pop()}}if(!M.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Cc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function za(e,t){this._pairs=[],e&&fi(e,this,t)}const Ld=za.prototype;Ld.append=function(t,r){this._pairs.push([t,r])};Ld.toString=function(t){const r=t?function(n){return t.call(this,n,Cc)}:Cc;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function G1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Cd(e,t,r){if(!t)return e;const n=r&&r.encode||G1;M.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(t,r):i=M.isURLSearchParams(t)?t.toString():new za(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Oc{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){M.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Od={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},q1=typeof URLSearchParams<"u"?URLSearchParams:za,Z1=typeof FormData<"u"?FormData:null,K1=typeof Blob<"u"?Blob:null,J1={isBrowser:!0,classes:{URLSearchParams:q1,FormData:Z1,Blob:K1},protocols:["http","https","file","blob","url","data"]},Ba=typeof window<"u"&&typeof document<"u",ua=typeof navigator=="object"&&navigator||void 0,X1=Ba&&(!ua||["ReactNative","NativeScript","NS"].indexOf(ua.product)<0),Q1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eb=Ba&&window.location.href||"http://localhost",tb=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ba,hasStandardBrowserEnv:X1,hasStandardBrowserWebWorkerEnv:Q1,navigator:ua,origin:eb},Symbol.toStringTag,{value:"Module"})),Qe={...tb,...J1};function rb(e,t){return fi(e,new Qe.classes.URLSearchParams,{visitor:function(r,n,s,i){return Qe.isNode&&M.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function nb(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function sb(e){const t={},r=Object.keys(e);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}function jd(e){function t(r,n,s,i){let a=r[i++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),u=i>=r.length;return a=!a&&M.isArray(s)?s.length:a,u?(M.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!l):((!s[a]||!M.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],i)&&M.isArray(s[a])&&(s[a]=sb(s[a])),!l)}if(M.isFormData(e)&&M.isFunction(e.entries)){const r={};return M.forEachEntry(e,(n,s)=>{t(nb(n),s,r,0)}),r}return null}function ib(e,t,r){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ss={transitional:Od,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=M.isObject(t);if(i&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return s?JSON.stringify(jd(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t)||M.isReadableStream(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return rb(t,this.formSerializer).toString();if((l=M.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return fi(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),ib(t)):t}],transformResponse:[function(t){const r=this.transitional||ss.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(M.isResponse(t)||M.isReadableStream(t))return t;if(t&&M.isString(t)&&(n&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(l){if(a)throw l.name==="SyntaxError"?ue.from(l,ue.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{ss.headers[e]={}});const ab=M.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"]),ob=e=>{const t={};let r,n,s;return e&&e.split(`
76
+ `).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||t[r]&&ab[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},jc=Symbol("internals");function Pn(e){return e&&String(e).trim().toLowerCase()}function Os(e){return e===!1||e==null?e:M.isArray(e)?e.map(Os):String(e)}function lb(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 cb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vi(e,t,r,n,s){if(M.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!M.isString(t)){if(M.isString(n))return t.indexOf(n)!==-1;if(M.isRegExp(n))return n.test(t)}}function ub(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function db(e,t){const r=M.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,i,a){return this[n].call(this,t,s,i,a)},configurable:!0})})}let ot=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function i(l,u,d){const f=Pn(u);if(!f)throw new Error("header name must be a non-empty string");const h=M.findKey(s,f);(!h||s[h]===void 0||d===!0||d===void 0&&s[h]!==!1)&&(s[h||u]=Os(l))}const a=(l,u)=>M.forEach(l,(d,f)=>i(d,f,u));if(M.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(M.isString(t)&&(t=t.trim())&&!cb(t))a(ob(t),r);else if(M.isObject(t)&&M.isIterable(t)){let l={},u,d;for(const f of t){if(!M.isArray(f))throw TypeError("Object iterator must return a key-value pair");l[d=f[0]]=(u=l[d])?M.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}a(l,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=Pn(t),t){const n=M.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return lb(s);if(M.isFunction(r))return r.call(this,s,n);if(M.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Pn(t),t){const n=M.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Vi(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function i(a){if(a=Pn(a),a){const l=M.findKey(n,a);l&&(!r||Vi(n,n[l],l,r))&&(delete n[l],s=!0)}}return M.isArray(t)?t.forEach(i):i(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!t||Vi(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const r=this,n={};return M.forEach(this,(s,i)=>{const a=M.findKey(n,i);if(a){r[a]=Os(s),delete r[i];return}const l=t?ub(i):String(i).trim();l!==i&&delete r[i],r[l]=Os(s),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return M.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&M.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(`
77
+ `)}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(s=>n.set(s)),n}static accessor(t){const n=(this[jc]=this[jc]={accessors:{}}).accessors,s=this.prototype;function i(a){const l=Pn(a);n[l]||(db(s,a),n[l]=!0)}return M.isArray(t)?t.forEach(i):i(t),this}};ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.reduceDescriptors(ot.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});M.freezeMethods(ot);function Yi(e,t){const r=this||ss,n=t||r,s=ot.from(n.headers);let i=n.data;return M.forEach(e,function(l){i=l.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Md(e){return!!(e&&e.__CANCEL__)}function wn(e,t,r){ue.call(this,e??"canceled",ue.ERR_CANCELED,t,r),this.name="CanceledError"}M.inherits(wn,ue,{__CANCEL__:!0});function _d(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ue("Request failed with status code "+r.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function fb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function hb(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),f=n[i];a||(a=d),r[s]=u,n[s]=d;let h=i,p=0;for(;h!==s;)p+=r[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-a<t)return;const v=f&&d-f;return v?Math.round(p*1e3/v):void 0}}function pb(e,t){let r=0,n=1e3/t,s,i;const a=(d,f=Date.now())=>{r=f,s=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const f=Date.now(),h=f-r;h>=n?a(d,f):(s=d,i||(i=setTimeout(()=>{i=null,a(s)},n-h)))},()=>s&&a(s)]}const qs=(e,t,r=3)=>{let n=0;const s=hb(50,250);return pb(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,u=a-n,d=s(u),f=a<=l;n=a;const h={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&f?(l-a)/d:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},r)},Mc=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},_c=e=>(...t)=>M.asap(()=>e(...t)),gb=Qe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Qe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Qe.origin),Qe.navigator&&/(msie|trident)/i.test(Qe.navigator.userAgent)):()=>!0,mb=Qe.hasStandardBrowserEnv?{write(e,t,r,n,s,i,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];M.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),M.isString(n)&&l.push(`path=${n}`),M.isString(s)&&l.push(`domain=${s}`),i===!0&&l.push("secure"),M.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function vb(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Td(e,t,r){let n=!vb(t);return e&&(n||r==!1)?yb(e,t):t}const Tc=e=>e instanceof ot?{...e}:e;function Ur(e,t){t=t||{};const r={};function n(d,f,h,p){return M.isPlainObject(d)&&M.isPlainObject(f)?M.merge.call({caseless:p},d,f):M.isPlainObject(f)?M.merge({},f):M.isArray(f)?f.slice():f}function s(d,f,h,p){if(M.isUndefined(f)){if(!M.isUndefined(d))return n(void 0,d,h,p)}else return n(d,f,h,p)}function i(d,f){if(!M.isUndefined(f))return n(void 0,f)}function a(d,f){if(M.isUndefined(f)){if(!M.isUndefined(d))return n(void 0,d)}else return n(void 0,f)}function l(d,f,h){if(h in t)return n(d,f);if(h in e)return n(void 0,d)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(d,f,h)=>s(Tc(d),Tc(f),h,!0)};return M.forEach(Object.keys({...e,...t}),function(f){const h=u[f]||s,p=h(e[f],t[f],f);M.isUndefined(p)&&h!==l||(r[f]=p)}),r}const Nd=e=>{const t=Ur({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:l}=t;if(t.headers=a=ot.from(a),t.url=Cd(Td(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),M.isFormData(r)){if(Qe.hasStandardBrowserEnv||Qe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(M.isFunction(r.getHeaders)){const u=r.getHeaders(),d=["content-type","content-length"];Object.entries(u).forEach(([f,h])=>{d.includes(f.toLowerCase())&&a.set(f,h)})}}if(Qe.hasStandardBrowserEnv&&(n&&M.isFunction(n)&&(n=n(t)),n||n!==!1&&gb(t.url))){const u=s&&i&&mb.read(i);u&&a.set(s,u)}return t},xb=typeof XMLHttpRequest<"u",bb=xb&&function(e){return new Promise(function(r,n){const s=Nd(e);let i=s.data;const a=ot.from(s.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=s,f,h,p,v,g;function b(){v&&v(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function w(){if(!y)return;const O=ot.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),m={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:e,request:y};_d(function(L){r(L),b()},function(L){n(L),b()},m),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(n(new ue("Request aborted",ue.ECONNABORTED,e,y)),y=null)},y.onerror=function(k){const m=k&&k.message?k.message:"Network Error",x=new ue(m,ue.ERR_NETWORK,e,y);x.event=k||null,n(x),y=null},y.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const m=s.transitional||Od;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),n(new ue(k,m.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&M.forEach(a.toJSON(),function(k,m){y.setRequestHeader(m,k)}),M.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),l&&l!=="json"&&(y.responseType=s.responseType),d&&([p,g]=qs(d,!0),y.addEventListener("progress",p)),u&&y.upload&&([h,v]=qs(u),y.upload.addEventListener("progress",h),y.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(f=O=>{y&&(n(!O||O.type?new wn(null,e,y):O),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const E=fb(s.url);if(E&&Qe.protocols.indexOf(E)===-1){n(new ue("Unsupported protocol "+E+":",ue.ERR_BAD_REQUEST,e));return}y.send(i||null)})},wb=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const i=function(d){if(!s){s=!0,l();const f=d instanceof Error?d:this.reason;n.abort(f instanceof ue?f:new wn(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,i(new ue(`timeout ${t} of ms exceeded`,ue.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:u}=n;return u.unsubscribe=()=>M.asap(l),u}},Sb=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Eb=async function*(e,t){for await(const r of kb(e))yield*Sb(r,t)},kb=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()}},Nc=(e,t,r,n)=>{const s=Eb(e,t);let i=0,a,l=u=>{a||(a=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:d,value:f}=await s.next();if(d){l(),u.close();return}let h=f.byteLength;if(r){let p=i+=h;r(p)}u.enqueue(new Uint8Array(f))}catch(d){throw l(d),d}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},Pc=64*1024,{isFunction:ws}=M,Lb=(({Request:e,Response:t})=>({Request:e,Response:t}))(M.global),{ReadableStream:Dc,TextEncoder:Ac}=M.global,Rc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Cb=e=>{e=M.merge.call({skipUndefined:!0},Lb,e);const{fetch:t,Request:r,Response:n}=e,s=t?ws(t):typeof fetch=="function",i=ws(r),a=ws(n);if(!s)return!1;const l=s&&ws(Dc),u=s&&(typeof Ac=="function"?(g=>b=>g.encode(b))(new Ac):async g=>new Uint8Array(await new r(g).arrayBuffer())),d=i&&l&&Rc(()=>{let g=!1;const b=new r(Qe.origin,{body:new Dc,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!b}),f=a&&l&&Rc(()=>M.isReadableStream(new n("").body)),h={stream:f&&(g=>g.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!h[g]&&(h[g]=(b,y)=>{let w=b&&b[g];if(w)return w.call(b);throw new ue(`Response type '${g}' is not supported`,ue.ERR_NOT_SUPPORT,y)})});const p=async g=>{if(g==null)return 0;if(M.isBlob(g))return g.size;if(M.isSpecCompliantForm(g))return(await new r(Qe.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(M.isArrayBufferView(g)||M.isArrayBuffer(g))return g.byteLength;if(M.isURLSearchParams(g)&&(g=g+""),M.isString(g))return(await u(g)).byteLength},v=async(g,b)=>{const y=M.toFiniteNumber(g.getContentLength());return y??p(b)};return async g=>{let{url:b,method:y,data:w,signal:E,cancelToken:O,timeout:k,onDownloadProgress:m,onUploadProgress:x,responseType:L,headers:T,withCredentials:C="same-origin",fetchOptions:D}=Nd(g),P=t||fetch;L=L?(L+"").toLowerCase():"text";let B=wb([E,O&&O.toAbortSignal()],k),z=null;const Y=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let q;try{if(x&&d&&y!=="get"&&y!=="head"&&(q=await v(T,w))!==0){let ne=new r(b,{method:"POST",body:w,duplex:"half"}),se;if(M.isFormData(w)&&(se=ne.headers.get("content-type"))&&T.setContentType(se),ne.body){const[Z,de]=Mc(q,qs(_c(x)));w=Nc(ne.body,Pc,Z,de)}}M.isString(C)||(C=C?"include":"omit");const U=i&&"credentials"in r.prototype,re={...D,signal:B,method:y.toUpperCase(),headers:T.normalize().toJSON(),body:w,duplex:"half",credentials:U?C:void 0};z=i&&new r(b,re);let ee=await(i?P(z,D):P(b,re));const ce=f&&(L==="stream"||L==="response");if(f&&(m||ce&&Y)){const ne={};["status","statusText","headers"].forEach(N=>{ne[N]=ee[N]});const se=M.toFiniteNumber(ee.headers.get("content-length")),[Z,de]=m&&Mc(se,qs(_c(m),!0))||[];ee=new n(Nc(ee.body,Pc,Z,()=>{de&&de(),Y&&Y()}),ne)}L=L||"text";let ae=await h[M.findKey(h,L)||"text"](ee,g);return!ce&&Y&&Y(),await new Promise((ne,se)=>{_d(ne,se,{data:ae,headers:ot.from(ee.headers),status:ee.status,statusText:ee.statusText,config:g,request:z})})}catch(U){throw Y&&Y(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,g,z),{cause:U.cause||U}):ue.from(U,U&&U.code,g,z)}}},Ob=new Map,Pd=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,i=[n,s,r];let a=i.length,l=a,u,d,f=Ob;for(;l--;)u=i[l],d=f.get(u),d===void 0&&f.set(u,d=l?new Map:Cb(t)),f=d;return d};Pd();const Va={http:Y1,xhr:bb,fetch:{get:Pd}};M.forEach(Va,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ic=e=>`- ${e}`,jb=e=>M.isFunction(e)||e===null||e===!1;function Mb(e,t){e=M.isArray(e)?e:[e];const{length:r}=e;let n,s;const i={};for(let a=0;a<r;a++){n=e[a];let l;if(s=n,!jb(n)&&(s=Va[(l=String(n)).toLowerCase()],s===void 0))throw new ue(`Unknown adapter '${l}'`);if(s&&(M.isFunction(s)||(s=s.get(t))))break;i[l||"#"+a]=s}if(!s){const a=Object.entries(i).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?a.length>1?`since :
78
+ `+a.map(Ic).join(`
79
+ `):" "+Ic(a[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}const Dd={getAdapter:Mb,adapters:Va};function Wi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wn(null,e)}function Fc(e){return Wi(e),e.headers=ot.from(e.headers),e.data=Yi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dd.getAdapter(e.adapter||ss.adapter,e)(e).then(function(n){return Wi(e),n.data=Yi.call(e,e.transformResponse,n),n.headers=ot.from(n.headers),n},function(n){return Md(n)||(Wi(e),n&&n.response&&(n.response.data=Yi.call(e,e.transformResponse,n.response),n.response.headers=ot.from(n.response.headers))),Promise.reject(n)})}const Ad="1.13.2",hi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $c={};hi.transitional=function(t,r,n){function s(i,a){return"[Axios v"+Ad+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,l)=>{if(t===!1)throw new ue(s(a," has been removed"+(r?" in "+r:"")),ue.ERR_DEPRECATED);return r&&!$c[a]&&($c[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,l):!0}};hi.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function _b(e,t,r){if(typeof e!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],a=t[i];if(a){const l=e[i],u=l===void 0||a(l,i,e);if(u!==!0)throw new ue("option "+i+" must be "+u,ue.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ue("Unknown option "+i,ue.ERR_BAD_OPTION)}}const js={assertOptions:_b,validators:hi},_t=js.validators;let Ir=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Oc,response:new Oc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
80
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ur(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&js.assertOptions(n,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),s!=null&&(M.isFunction(s)?r.paramsSerializer={serialize:s}:js.assertOptions(s,{encode:_t.function,serialize:_t.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),js.assertOptions(r,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&M.merge(i.common,i[r.method]);i&&M.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=ot.concat(a,i);const l=[];let u=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(u=u&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let f,h=0,p;if(!u){const g=[Fc.bind(this),void 0];for(g.unshift(...l),g.push(...d),p=g.length,f=Promise.resolve(r);h<p;)f=f.then(g[h++],g[h++]);return f}p=l.length;let v=r;for(;h<p;){const g=l[h++],b=l[h++];try{v=g(v)}catch(y){b.call(this,y);break}}try{f=Fc.call(this,v)}catch(g){return Promise.reject(g)}for(h=0,p=d.length;h<p;)f=f.then(d[h++],d[h++]);return f}getUri(t){t=Ur(this.defaults,t);const r=Td(t.baseURL,t.url,t.allowAbsoluteUrls);return Cd(r,t.params,t.paramsSerializer)}};M.forEach(["delete","get","head","options"],function(t){Ir.prototype[t]=function(r,n){return this.request(Ur(n||{},{method:t,url:r,data:(n||{}).data}))}});M.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,l){return this.request(Ur(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Ir.prototype[t]=r(),Ir.prototype[t+"Form"]=r(!0)});let Tb=class Rd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(l=>{n.subscribe(l),i=l}).then(s);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,l){n.reason||(n.reason=new wn(i,a,l),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 Rd(function(s){t=s}),cancel:t}}};function Nb(e){return function(r){return e.apply(null,r)}}function Pb(e){return M.isObject(e)&&e.isAxiosError===!0}const da={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(da).forEach(([e,t])=>{da[t]=e});function Id(e){const t=new Ir(e),r=pd(Ir.prototype.request,t);return M.extend(r,Ir.prototype,t,{allOwnKeys:!0}),M.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Id(Ur(e,s))},r}const Be=Id(ss);Be.Axios=Ir;Be.CanceledError=wn;Be.CancelToken=Tb;Be.isCancel=Md;Be.VERSION=Ad;Be.toFormData=fi;Be.AxiosError=ue;Be.Cancel=Be.CanceledError;Be.all=function(t){return Promise.all(t)};Be.spread=Nb;Be.isAxiosError=Pb;Be.mergeConfig=Ur;Be.AxiosHeaders=ot;Be.formToJSON=e=>jd(M.isHTMLForm(e)?new FormData(e):e);Be.getAdapter=Dd.getAdapter;Be.HttpStatusCode=da;Be.default=Be;const{Axios:vE,AxiosError:yE,CanceledError:xE,isCancel:bE,CancelToken:wE,VERSION:SE,all:EE,Cancel:kE,isAxiosError:LE,spread:CE,toFormData:OE,AxiosHeaders:jE,HttpStatusCode:ME,formToJSON:_E,getAdapter:TE,mergeConfig:NE}=Be,Sn=Be.create({baseURL:"http://localhost:8000/api",headers:{"Content-Type":"application/json"}});Sn.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));Sn.interceptors.response.use(e=>(e.data&&(e.data=oa(e.data)),e),e=>Promise.reject(e));async function Fd(e){const t=`/application/${e}`;try{return(await Sn.get(t)).data}catch(r){return{code:"1",error:!0,message:"There was an error trying to retrieve the application",data:null,error_data:{error:`${r}`}}}}async function $d(e,t){let r="/tax-identification-type";e&&(r+=`?countryID=${e}`),t&&(r+=`&statusID=${t}`);try{return(await Sn.get(r)).data}catch(n){return{code:"1",error:!0,message:"There was an error trying to retrieve the tax identification types",data:null,error_data:{error:`${n}`}}}}async function Ud(){const e="/country";try{return(await Sn.get(e)).data}catch(t){return{code:"1",error:!0,message:"There was an error trying to retrieve the tax countries",data:null,error_data:{error:`${t}`}}}}async function zd(e){const t=`/category?type=${e}`;try{return(await Sn.get(t)).data}catch(r){return{code:"1",error:!0,message:"There was an error trying to retrieve the categories",data:null,error_data:{error:`${r}`}}}}const Db={fullName:"",email:"",address:"",taxIdentificationType:null,identificationNumber:"",phone:{country:null,phonePrefix:null,phoneNumber:""},phone2:{country:null,phonePrefix:null,phoneNumber:""}},Ab=gr({country:pr().nullable().required("El país es requerido"),phonePrefix:pr().nullable().required("El prefijo telefónico es requerido"),phoneNumber:Pt().required("El número de teléfono es requerido")}),Rb=gr({country:pr().nullable().defined(),phonePrefix:pr().nullable().defined().when("country",{is:e=>!!e,then:e=>e.required("El prefijo telefónico es requerido")}),phoneNumber:Pt().ensure().when("country",{is:e=>!!e,then:e=>e.required("El número de teléfono es requerido")})}),Ib=gr({fullName:Pt().required("El nombre completo es requerido"),email:Pt().email("El correo electrónico no es válido").required("El correo electrónico es requerido"),address:Pt().required("La dirección es requerida"),taxIdentificationType:pr().nullable().required("El tipo de identificación es requerido"),identificationNumber:Pt().required("El número de identificación es requerido"),phone:Ab,phone2:Rb}),Fb=({initiallyShowSecondPhone:e=!1,showFixedPrefix1:t=!1,showFixedPrefix2:r=!1,formik:n,onCancel:s})=>{const{values:i,touched:a,errors:l,handleChange:u,handleBlur:d,handleSubmit:f,setFieldValue:h}=n,[p,v]=c.useState([]),[g,b]=c.useState(e),[y,w]=c.useState([]),E=c.useMemo(()=>{const x=i.taxIdentificationType?.value.abbreviationName,L=Wl.map(T=>({id:T,label:`0${T}`,value:T}));return(["J-","G-"].includes(x??"")||t)&&L.push({id:"",label:"FIJO",value:""}),L},[i.taxIdentificationType?.value.abbreviationName,t]),O=c.useMemo(()=>{const x=i.taxIdentificationType?.value.abbreviationName,L=Wl.map(T=>({id:T,label:`0${T}`,value:T}));return(["J-","G-"].includes(x??"")||r)&&L.push({id:"",label:"FIJO",value:""}),L},[i.taxIdentificationType?.value.abbreviationName,r]),k=c.useCallback(()=>{b(!0);const x=p.find(T=>T.value.countryId===Ai)??p[0]??null,L=O[0]??null;h("phone2",{country:x,phonePrefix:L,phoneNumber:""})},[p,O,h]),m=()=>{b(!1),h("phone2",{country:null,phonePrefix:null,phoneNumber:""})};return c.useEffect(()=>{(async()=>{const L=await $d(Ai,1);if(L.error||!L.data)return;const T=L.data.filter(C=>!!C.abbreviationName);if(w(T.map(C=>({id:C.taxIdentificationTypeId.toString(),label:C.abbreviationName,value:C}))),!i.taxIdentificationType){const C=T.find(D=>D.taxIdentificationTypeId===1)??T[0]??null;h("taxIdentificationType",{id:C.taxIdentificationTypeId.toString(),label:C.abbreviationName,value:C})}})()},[]),c.useEffect(()=>{(async()=>{const L=await Ud();if(L.error||!L.data)return;const T=L.data.filter(C=>!!C.countryPhoneAccessCode);if(v(T.map(C=>({id:C.countryId.toString(),label:C.countryPhoneAccessCode??"",value:C}))),!i.phone.country){const C=T.find(D=>D.countryId===Ai)??T[0]??null;h("phone.country",{id:C.countryId.toString(),label:C.countryPhoneAccessCode,value:C})}})()},[]),c.useEffect(()=>{if(!i.phone.phonePrefix){const x=E[0];h("phone.phonePrefix",x)}},[E]),o.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4",children:[o.jsx("div",{children:o.jsx(Xe,{id:"fullName",name:"fullName",label:"Nombre completo",placeholder:"Nombre completo",autoComplete:"name",value:n.values.fullName,onChange:u,onBlur:d,error:a.fullName&&l.fullName,required:!0})}),o.jsx("div",{children:o.jsx(Xe,{id:"email",name:"email",label:"Correo electrónico",placeholder:"example@example.com",autoComplete:"email",value:i.email,onChange:u,onBlur:d,error:a.email&&l.email,required:!0})})]}),o.jsx("div",{children:o.jsx(Xe,{id:"address",name:"address",label:"Dirección fiscal",placeholder:"Dirección",autoComplete:"address",value:i.address,onChange:u,onBlur:d,error:a.address&&l.address,required:!0})}),o.jsxs("div",{children:[o.jsxs("div",{className:I("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:["Cédula / RIF ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsxs("div",{className:"flex",children:[o.jsx(yt,{id:"taxIdentificationType",name:"taxIdentificationType",label:"",options:y,selected:i.taxIdentificationType,onSelectOption:x=>h("taxIdentificationType",x),onBlur:d,className:"!rounded-r-none",wrapperClassName:"w-20 rounded-r-none",renderOption:x=>o.jsxs("p",{className:"truncate",children:[x.value.taxIdentificationTypeName," (",x.label,")"]})}),o.jsx(Xe,{id:"identificationNumber",name:"identificationNumber",label:"",placeholder:"Número de Cédula / RIF",value:i.identificationNumber,onChange:u,onBlur:d,error:a.identificationNumber&&l.identificationNumber,className:"!rounded-l-none"})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200",children:["Teléfono ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsxs("div",{className:"flex",children:[o.jsx(yt,{id:"phone.country",name:"phone.country",label:"",placeholder:"País",options:p,selected:i.phone.country,onSelectOption:x=>h("phone.country",x),onBlur:d,className:"!rounded-r-none !w-24",filterFn:(x,L)=>L.toLowerCase().split(" ").filter(Boolean).every(C=>x.label.toLowerCase().includes(C)||x.value.countryName.toLowerCase().includes(C)),renderOption:x=>o.jsxs("p",{className:"truncate",children:[x.value.countryName," (",x.label,")"]})}),o.jsx(yt,{id:"phone.phonePrefix",name:"phone.phonePrefix",label:"",placeholder:"Prefijo",options:E,selected:i.phone.phonePrefix,onSelectOption:x=>h("phone.phonePrefix",x),onBlur:d,className:"!rounded-none !w-20"}),o.jsx(Xe,{id:"phone.phoneNumber",name:"phone.phoneNumber",label:"",placeholder:"Número de Teléfono",value:i.phone.phoneNumber,onChange:u,onBlur:d,error:a.phone?.phoneNumber&&l.phone?.phoneNumber,className:"!rounded-l-none"})]})]}),g&&o.jsxs("div",{children:[o.jsx("div",{className:I("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:"Segundo Teléfono"}),o.jsxs("div",{className:"flex",children:[o.jsx(yt,{id:"phone2.country",name:"phone2.country",label:"",placeholder:"País",options:p,selected:i.phone2.country,onSelectOption:x=>h("phone2.country",x),onBlur:d,className:"!rounded-r-none !w-24",filterFn:(x,L)=>L.toLowerCase().split(" ").filter(Boolean).every(C=>x.label.toLowerCase().includes(C)||x.value.countryName.toLowerCase().includes(C)),renderOption:x=>o.jsxs("p",{className:"truncate",children:[x.value.countryName," (",x.label,")"]})}),o.jsx(yt,{id:"phone2.phonePrefix",name:"phone2.phonePrefix",label:"",options:O,selected:i.phone2.phonePrefix,onSelectOption:x=>h("phone2.phonePrefix",x),onBlur:d,className:"!rounded-none !w-20"}),o.jsx(Xe,{id:"phone2.phoneNumber",name:"phone2.phoneNumber",label:"",placeholder:"Número de Teléfono",value:i.phone2.phoneNumber,onChange:u,onBlur:d,error:a.phone2?.phoneNumber&&l?.phone2?.phoneNumber,className:"!rounded-l-none"})]})]}),o.jsxs("div",{className:"flex w-full justify-end text-end text-sm",children:[!g&&o.jsx(Ye,{onClick:k,children:"+ Agregar teléfono adicional"}),g&&o.jsx(Ye,{onClick:m,children:"Eliminar teléfono adicional"})]}),o.jsxs("div",{className:"w-full flex flex-col-reverse gap-4 md:flex-row items-center justify-between",children:[o.jsx("div",{className:"w-full md:w-32",children:s&&o.jsx(Yn,{className:"w-full md:w-32",onClick:()=>s(n),children:"Cancelar"})}),o.jsx(dt,{className:"w-full md:w-32",type:"submit",onClick:()=>f(),children:"Guardar"})]})]})},fa=({initialValues:e,onSubmit:t,onCancel:r})=>o.jsx(es,{initialValues:e??Db,validationSchema:Ib,onSubmit:t,children:n=>o.jsx(Fb,{formik:n,onCancel:r,initiallyShowSecondPhone:!!e?.phone2.phoneNumber})}),Bd=({appName:e,appDescription:t,appVersion:r,wrapperClassName:n,children:s})=>o.jsxs("div",{className:I("flex font-inter",n),children:[o.jsx("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden",children:o.jsx("div",{className:"relative z-10 flex flex-col justify-center items-center w-full p-12 text-white bg-gradient-to-b from-indigo-700 via-indigo-600 to-indigo-500 dark:bg-gradient-to-b dark:from-indigo-900 dark:via-indigo-800 dark:to-indigo-700",children:o.jsxs("div",{className:"max-w-md space-y-6 text-center",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-24 h-24 bg-white backdrop-blur-sm rounded-3xl shadow-elegant mb-14",children:o.jsx("img",{src:ea,alt:"App logo",loading:"lazy","aria-label":"App logo",className:"w-20 h-20 object-cover"})}),o.jsx("h1",{className:"text-5xl font-bold tracking-tight leading-7","aria-label":e,children:e}),o.jsx("p",{className:"text-white/90 font-light dark:text-white/80","aria-label":t,children:t})]})})}),o.jsx("div",{className:"flex-1 flex items-center justify-center p-8 bg-gray-100 dark:bg-gray-900",children:o.jsxs("div",{className:"w-full max-w-md space-y-8",children:[o.jsxs("div",{className:"lg:hidden text-center mb-8",children:[o.jsx("div",{className:"inline-flex items-center justify-center bg-white rounded-2xl shadow-glow p-1",children:o.jsx("img",{src:ea,alt:"App logo",loading:"lazy","aria-label":"App logo",className:"w-28 h-28 object-cover"})}),o.jsx("h2",{className:"text-xl lg:text-3xl font-bold text-gray-900 dark:text-gray-100 leading-0","aria-label":e,children:e})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-xl p-8 lg:p-12 backdrop-blur-sm border border-border/50 dark:border-gray-800 hover:shadow-2xl transition-shadow duration-300",children:[s,o.jsx("div",{className:"mt-14 text-center text-sm text-gray-700 dark:text-gray-300",children:o.jsxs("p",{"aria-label":`Versión ${r}`,children:["v",r]})})]})]})})]}),$b=gr({email:Pt().required("El correo electrónico es obligatorio").email("Ingresa un correo electrónico válido")}),Ub=({appName:e,appDescription:t,appVersion:r,wrapperClassName:n,onSubmit:s,onBack:i,sent:a=!1})=>o.jsxs(Bd,{appName:e,appDescription:t,appVersion:r,wrapperClassName:n,children:[o.jsx("div",{className:"space-y-2 text-center lg:text-left",children:o.jsx("h1",{className:"text-lg lg:text-2xl font-bold tracking-tight text-foreground text-gray-900 dark:text-gray-100",children:"Reestablecer contraseña"})}),a?o.jsxs("div",{className:"mt-10 space-y-6 text-center",children:[o.jsx("p",{className:"text-base text-gray-700 dark:text-gray-200",children:"Si el correo electrónico existe en la aplicación, se le ha enviado un email con las instrucciones de restablecimiento"}),o.jsx("div",{className:"text-center",children:o.jsx(Ye,{onClick:i,className:"text-sm font-medium dark:text-indigo-300",children:"Regresar"})})]}):o.jsx(es,{initialValues:{email:""},validationSchema:$b,onSubmit:({email:l})=>{s(l)},children:({values:l,touched:u,errors:d,handleChange:f,handleSubmit:h})=>o.jsxs("form",{onSubmit:h,className:"space-y-6 mt-10",noValidate:!0,children:[o.jsx("div",{className:"space-y-4",children:o.jsx("div",{className:"space-y-2",children:o.jsx(Xe,{required:!0,id:"email",name:"email",type:"text",label:"Correo electrónico",placeholder:"mi_correo@email.com",autoComplete:"email",value:l.email,error:u.email&&d.email,onChange:f})})}),o.jsx(dt,{type:"submit",className:"w-full h-12",children:"Enviar"}),o.jsx("div",{className:"text-center",children:o.jsx(Ye,{onClick:i,className:"text-sm font-medium dark:text-indigo-300",children:"Regresar"})})]})})]}),zb=gr({email:Pt().required("El correo electrónico es obligatorio").email("Ingresa un correo electrónico válido"),password:Pt().required("La contraseña es obligatoria").min(6,"La contraseña debe tener al menos 6 caracteres")}),Bb=({wrapperClassName:e,onSubmit:t,onForgotPassword:r})=>{const n=c.useContext(ni);return o.jsxs(Bd,{appName:n?.applicationName??"",appDescription:n?.applicationDescription??"",appVersion:n?.applicationVersion??"",wrapperClassName:e,children:[o.jsx("div",{className:"space-y-2 text-center lg:text-left",children:o.jsx("h1",{className:"text-lg lg:text-2xl font-bold tracking-tight text-foreground text-gray-900 dark:text-gray-100",children:"Inicia sesión con tu cuenta"})}),o.jsx(es,{initialValues:{email:"",password:""},validationSchema:zb,onSubmit:({email:s,password:i})=>{t(s,i)},children:({values:s,touched:i,errors:a,handleChange:l,handleSubmit:u})=>o.jsxs("form",{onSubmit:u,className:"space-y-6 mt-6",noValidate:!0,children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"space-y-2",children:o.jsx(Xe,{required:!0,id:"email",name:"email",type:"text",label:"Correo electrónico o username",placeholder:"mi_correo@email.com",autoComplete:"email",value:s.email,error:i.email&&a.email,onChange:l})}),o.jsx("div",{className:"space-y-2",children:o.jsx("div",{className:"relative",children:o.jsx(Xe,{required:!0,id:"password",name:"password",type:"password",label:"Contraseña",placeholder:"•••••••••••••",value:s.password,error:i.password&&a.password,onChange:l})})})]}),o.jsx(dt,{type:"submit",className:"w-full h-12",children:"Iniciar sesión"}),o.jsx("div",{className:"text-center",children:o.jsx(Ye,{onClick:r,className:"text-sm font-medium",children:"Olvidé mi contraseña"})})]})})]})};function Vb(e){return X({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M160 0c17.7 0 32 14.3 32 32l0 35.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11l0 33.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.9c-.4-.1-.9-.1-1.3-.2l-.2 0s0 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7s0 0 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11L128 32c0-17.7 14.3-32 32-32z"},child:[]}]})(e)}function Yb(e){return X({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"},child:[]}]})(e)}function Wb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"},child:[]},{tag:"path",attr:{d:"M12 18V6"},child:[]}]})(e)}function Hb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},child:[]}]})(e)}function Gb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"},child:[]},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"},child:[]}]})(e)}function qb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"},child:[]}]})(e)}function gn(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"},child:[]},{tag:"path",attr:{d:"M12 22V12"},child:[]},{tag:"path",attr:{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7"},child:[]},{tag:"path",attr:{d:"m7.5 4.27 9 5.15"},child:[]}]})(e)}function Vd(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},child:[]},{tag:"path",attr:{d:"m15 5 4 4"},child:[]}]})(e)}function Zb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Kb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"},child:[]},{tag:"path",attr:{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"},child:[]},{tag:"rect",attr:{x:"6",y:"14",width:"12",height:"8",rx:"1"},child:[]}]})(e)}function Jb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"},child:[]},{tag:"path",attr:{d:"m14.5 12.5 2-2"},child:[]},{tag:"path",attr:{d:"m11.5 9.5 2-2"},child:[]},{tag:"path",attr:{d:"m8.5 6.5 2-2"},child:[]},{tag:"path",attr:{d:"m17.5 15.5 2-2"},child:[]}]})(e)}function Xb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7"},child:[]},{tag:"path",attr:{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"},child:[]},{tag:"path",attr:{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4"},child:[]},{tag:"path",attr:{d:"M2 7h20"},child:[]},{tag:"path",attr:{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7"},child:[]}]})(e)}function Qb(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"10",cy:"7",r:"4"},child:[]},{tag:"path",attr:{d:"M10.3 15H7a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"17",cy:"17",r:"3"},child:[]},{tag:"path",attr:{d:"m21 21-1.9-1.9"},child:[]}]})(e)}function e2(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"5",r:"3"},child:[]},{tag:"path",attr:{d:"M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z"},child:[]}]})(e)}//! moment.js
81
+ //! version : 2.30.1
82
+ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
83
+ //! license : MIT
84
+ //! momentjs.com
85
+ var Yd;function $(){return Yd.apply(null,arguments)}function t2(e){Yd=e}function kt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Fr(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ya(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Ce(e,t))return!1;return!0}function it(e){return e===void 0}function Jt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function is(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Wd(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function cr(e,t){for(var r in t)Ce(t,r)&&(e[r]=t[r]);return Ce(t,"toString")&&(e.toString=t.toString),Ce(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Rt(e,t,r,n){return gf(e,t,r,n,!0).utc()}function r2(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function fe(e){return e._pf==null&&(e._pf=r2()),e._pf}var ha;Array.prototype.some?ha=Array.prototype.some:ha=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Wa(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=fe(e),r=ha.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function pi(e){var t=Rt(NaN);return e!=null?cr(fe(t),e):fe(t).userInvalidated=!0,t}var Uc=$.momentProperties=[],Hi=!1;function Ha(e,t){var r,n,s,i=Uc.length;if(it(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),it(t._i)||(e._i=t._i),it(t._f)||(e._f=t._f),it(t._l)||(e._l=t._l),it(t._strict)||(e._strict=t._strict),it(t._tzm)||(e._tzm=t._tzm),it(t._isUTC)||(e._isUTC=t._isUTC),it(t._offset)||(e._offset=t._offset),it(t._pf)||(e._pf=fe(t)),it(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)n=Uc[r],s=t[n],it(s)||(e[n]=s);return e}function as(e){Ha(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Hi===!1&&(Hi=!0,$.updateOffset(this),Hi=!1)}function Lt(e){return e instanceof as||e!=null&&e._isAMomentObject!=null}function Hd(e){$.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function bt(e,t){var r=!0;return cr(function(){if($.deprecationHandler!=null&&$.deprecationHandler(null,e),r){var n=[],s,i,a,l=arguments.length;for(i=0;i<l;i++){if(s="",typeof arguments[i]=="object"){s+=`
86
+ [`+i+"] ";for(a in arguments[0])Ce(arguments[0],a)&&(s+=a+": "+arguments[0][a]+", ");s=s.slice(0,-2)}else s=arguments[i];n.push(s)}Hd(e+`
87
+ Arguments: `+Array.prototype.slice.call(n).join("")+`
88
+ `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var zc={};function Gd(e,t){$.deprecationHandler!=null&&$.deprecationHandler(e,t),zc[e]||(Hd(t),zc[e]=!0)}$.suppressDeprecationWarnings=!1;$.deprecationHandler=null;function It(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function n2(e){var t,r;for(r in e)Ce(e,r)&&(t=e[r],It(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function pa(e,t){var r=cr({},e),n;for(n in t)Ce(t,n)&&(Fr(e[n])&&Fr(t[n])?(r[n]={},cr(r[n],e[n]),cr(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)Ce(e,n)&&!Ce(t,n)&&Fr(e[n])&&(r[n]=cr({},r[n]));return r}function Ga(e){e!=null&&this.set(e)}var ga;Object.keys?ga=Object.keys:ga=function(e){var t,r=[];for(t in e)Ce(e,t)&&r.push(t);return r};var s2={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function i2(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return It(n)?n.call(t,r):n}function Dt(e,t,r){var n=""+Math.abs(e),s=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var qa=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ss=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Gi={},ln={};function Q(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(ln[e]=s),t&&(ln[t[0]]=function(){return Dt(s.apply(this,arguments),t[1],t[2])}),r&&(ln[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function a2(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function o2(e){var t=e.match(qa),r,n;for(r=0,n=t.length;r<n;r++)ln[t[r]]?t[r]=ln[t[r]]:t[r]=a2(t[r]);return function(s){var i="",a;for(a=0;a<n;a++)i+=It(t[a])?t[a].call(s,e):t[a];return i}}function Ms(e,t){return e.isValid()?(t=qd(t,e.localeData()),Gi[t]=Gi[t]||o2(t),Gi[t](e)):e.localeData().invalidDate()}function qd(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(Ss.lastIndex=0;r>=0&&Ss.test(e);)e=e.replace(Ss,n),Ss.lastIndex=0,r-=1;return e}var l2={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function c2(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(qa).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var u2="Invalid date";function d2(){return this._invalidDate}var f2="%d",h2=/\d{1,2}/;function p2(e){return this._ordinal.replace("%d",e)}var g2={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function m2(e,t,r,n){var s=this._relativeTime[r];return It(s)?s(e,t,r,n):s.replace(/%d/i,e)}function v2(e,t){var r=this._relativeTime[e>0?"future":"past"];return It(r)?r(t):r.replace(/%s/i,t)}var Bc={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function wt(e){return typeof e=="string"?Bc[e]||Bc[e.toLowerCase()]:void 0}function Za(e){var t={},r,n;for(n in e)Ce(e,n)&&(r=wt(n),r&&(t[r]=e[n]));return t}var y2={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function x2(e){var t=[],r;for(r in e)Ce(e,r)&&t.push({unit:r,priority:y2[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var Zd=/\d/,ft=/\d\d/,Kd=/\d{3}/,Ka=/\d{4}/,gi=/[+-]?\d{6}/,Ie=/\d\d?/,Jd=/\d\d\d\d?/,Xd=/\d\d\d\d\d\d?/,mi=/\d{1,3}/,Ja=/\d{1,4}/,vi=/[+-]?\d{1,6}/,En=/\d+/,yi=/[+-]?\d+/,b2=/Z|[+-]\d\d:?\d\d/gi,xi=/Z|[+-]\d\d(?::?\d\d)?/gi,w2=/[+-]?\d+(\.\d{1,3})?/,os=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,kn=/^[1-9]\d?/,Xa=/^([1-9]\d|\d)/,Zs;Zs={};function H(e,t,r){Zs[e]=It(t)?t:function(n,s){return n&&r?r:t}}function S2(e,t){return Ce(Zs,e)?Zs[e](t._strict,t._locale):new RegExp(E2(e))}function E2(e){return Zt(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function Zt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function vt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function be(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=vt(t)),r}var ma={};function Ne(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),Jt(t)&&(n=function(i,a){a[t]=be(i)}),s=e.length,r=0;r<s;r++)ma[e[r]]=n}function ls(e,t){Ne(e,function(r,n,s,i){s._w=s._w||{},t(r,s._w,s,i)})}function k2(e,t,r){t!=null&&Ce(ma,e)&&ma[e](t,r._a,r,e)}function bi(e){return e%4===0&&e%100!==0||e%400===0}var et=0,Gt=1,Nt=2,We=3,Et=4,qt=5,Dr=6,L2=7,C2=8;Q("Y",0,0,function(){var e=this.year();return e<=9999?Dt(e,4):"+"+e});Q(0,["YY",2],0,function(){return this.year()%100});Q(0,["YYYY",4],0,"year");Q(0,["YYYYY",5],0,"year");Q(0,["YYYYYY",6,!0],0,"year");H("Y",yi);H("YY",Ie,ft);H("YYYY",Ja,Ka);H("YYYYY",vi,gi);H("YYYYYY",vi,gi);Ne(["YYYYY","YYYYYY"],et);Ne("YYYY",function(e,t){t[et]=e.length===2?$.parseTwoDigitYear(e):be(e)});Ne("YY",function(e,t){t[et]=$.parseTwoDigitYear(e)});Ne("Y",function(e,t){t[et]=parseInt(e,10)});function Un(e){return bi(e)?366:365}$.parseTwoDigitYear=function(e){return be(e)+(be(e)>68?1900:2e3)};var Qd=Ln("FullYear",!0);function O2(){return bi(this.year())}function Ln(e,t){return function(r){return r!=null?(ef(this,e,r),$.updateOffset(this,t),this):qn(this,e)}}function qn(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function ef(e,t,r){var n,s,i,a,l;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,a=e.month(),l=e.date(),l=l===29&&a===1&&!bi(i)?28:l,s?n.setUTCFullYear(i,a,l):n.setFullYear(i,a,l)}}function j2(e){return e=wt(e),It(this[e])?this[e]():this}function M2(e,t){if(typeof e=="object"){e=Za(e);var r=x2(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=wt(e),It(this[e]))return this[e](t);return this}function _2(e,t){return(e%t+t)%t}var ze;Array.prototype.indexOf?ze=Array.prototype.indexOf:ze=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Qa(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=_2(t,12);return e+=(t-r)/12,r===1?bi(e)?29:28:31-r%7%2}Q("M",["MM",2],"Mo",function(){return this.month()+1});Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Q("MMMM",0,0,function(e){return this.localeData().months(this,e)});H("M",Ie,kn);H("MM",Ie,ft);H("MMM",function(e,t){return t.monthsShortRegex(e)});H("MMMM",function(e,t){return t.monthsRegex(e)});Ne(["M","MM"],function(e,t){t[Gt]=be(e)-1});Ne(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[Gt]=s:fe(r).invalidMonth=e});var T2="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),rf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,N2=os,P2=os;function D2(e,t){return e?kt(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||rf).test(t)?"format":"standalone"][e.month()]:kt(this._months)?this._months:this._months.standalone}function A2(e,t){return e?kt(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[rf.test(t)?"format":"standalone"][e.month()]:kt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function R2(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=Rt([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(s=ze.call(this._shortMonthsParse,a),s!==-1?s:null):(s=ze.call(this._longMonthsParse,a),s!==-1?s:null):t==="MMM"?(s=ze.call(this._shortMonthsParse,a),s!==-1?s:(s=ze.call(this._longMonthsParse,a),s!==-1?s:null)):(s=ze.call(this._longMonthsParse,a),s!==-1?s:(s=ze.call(this._shortMonthsParse,a),s!==-1?s:null))}function I2(e,t,r){var n,s,i;if(this._monthsParseExact)return R2.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Rt([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function nf(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=be(t);else if(t=e.localeData().monthsParse(t),!Jt(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Qa(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function sf(e){return e!=null?(nf(this,e),$.updateOffset(this,!0),this):qn(this,"Month")}function F2(){return Qa(this.year(),this.month())}function $2(e){return this._monthsParseExact?(Ce(this,"_monthsRegex")||af.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ce(this,"_monthsShortRegex")||(this._monthsShortRegex=N2),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function U2(e){return this._monthsParseExact?(Ce(this,"_monthsRegex")||af.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ce(this,"_monthsRegex")||(this._monthsRegex=P2),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function af(){function e(u,d){return d.length-u.length}var t=[],r=[],n=[],s,i,a,l;for(s=0;s<12;s++)i=Rt([2e3,s]),a=Zt(this.monthsShort(i,"")),l=Zt(this.months(i,"")),t.push(a),r.push(l),n.push(l),n.push(a);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function z2(e,t,r,n,s,i,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,s,i,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,s,i,a),l}function Zn(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ks(e,t,r){var n=7+t-r,s=(7+Zn(e,0,n).getUTCDay()-t)%7;return-s+n-1}function of(e,t,r,n,s){var i=(7+r-n)%7,a=Ks(e,n,s),l=1+7*(t-1)+i+a,u,d;return l<=0?(u=e-1,d=Un(u)+l):l>Un(e)?(u=e+1,d=l-Un(e)):(u=e,d=l),{year:u,dayOfYear:d}}function Kn(e,t,r){var n=Ks(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,a;return s<1?(a=e.year()-1,i=s+Kt(a,t,r)):s>Kt(e.year(),t,r)?(i=s-Kt(e.year(),t,r),a=e.year()+1):(a=e.year(),i=s),{week:i,year:a}}function Kt(e,t,r){var n=Ks(e,t,r),s=Ks(e+1,t,r);return(Un(e)-n+s)/7}Q("w",["ww",2],"wo","week");Q("W",["WW",2],"Wo","isoWeek");H("w",Ie,kn);H("ww",Ie,ft);H("W",Ie,kn);H("WW",Ie,ft);ls(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=be(e)});function B2(e){return Kn(e,this._week.dow,this._week.doy).week}var V2={dow:0,doy:6};function Y2(){return this._week.dow}function W2(){return this._week.doy}function H2(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function G2(e){var t=Kn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Q("d",0,"do","day");Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Q("e",0,0,"weekday");Q("E",0,0,"isoWeekday");H("d",Ie);H("e",Ie);H("E",Ie);H("dd",function(e,t){return t.weekdaysMinRegex(e)});H("ddd",function(e,t){return t.weekdaysShortRegex(e)});H("dddd",function(e,t){return t.weekdaysRegex(e)});ls(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:fe(r).invalidWeekday=e});ls(["d","e","E"],function(e,t,r,n){t[n]=be(e)});function q2(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Z2(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function eo(e,t){return e.slice(t,7).concat(e.slice(0,t))}var K2="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),J2="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),X2=os,Q2=os,ew=os;function tw(e,t){var r=kt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?eo(r,this._week.dow):e?r[e.day()]:r}function rw(e){return e===!0?eo(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function nw(e){return e===!0?eo(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function sw(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=Rt([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=ze.call(this._weekdaysParse,a),s!==-1?s:null):t==="ddd"?(s=ze.call(this._shortWeekdaysParse,a),s!==-1?s:null):(s=ze.call(this._minWeekdaysParse,a),s!==-1?s:null):t==="dddd"?(s=ze.call(this._weekdaysParse,a),s!==-1||(s=ze.call(this._shortWeekdaysParse,a),s!==-1)?s:(s=ze.call(this._minWeekdaysParse,a),s!==-1?s:null)):t==="ddd"?(s=ze.call(this._shortWeekdaysParse,a),s!==-1||(s=ze.call(this._weekdaysParse,a),s!==-1)?s:(s=ze.call(this._minWeekdaysParse,a),s!==-1?s:null)):(s=ze.call(this._minWeekdaysParse,a),s!==-1||(s=ze.call(this._weekdaysParse,a),s!==-1)?s:(s=ze.call(this._shortWeekdaysParse,a),s!==-1?s:null))}function iw(e,t,r){var n,s,i;if(this._weekdaysParseExact)return sw.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Rt([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function aw(e){if(!this.isValid())return e!=null?this:NaN;var t=qn(this,"Day");return e!=null?(e=q2(e,this.localeData()),this.add(e-t,"d")):t}function ow(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function lw(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Z2(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function cw(e){return this._weekdaysParseExact?(Ce(this,"_weekdaysRegex")||to.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ce(this,"_weekdaysRegex")||(this._weekdaysRegex=X2),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function uw(e){return this._weekdaysParseExact?(Ce(this,"_weekdaysRegex")||to.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ce(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Q2),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function dw(e){return this._weekdaysParseExact?(Ce(this,"_weekdaysRegex")||to.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ce(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ew),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function to(){function e(f,h){return h.length-f.length}var t=[],r=[],n=[],s=[],i,a,l,u,d;for(i=0;i<7;i++)a=Rt([2e3,1]).day(i),l=Zt(this.weekdaysMin(a,"")),u=Zt(this.weekdaysShort(a,"")),d=Zt(this.weekdays(a,"")),t.push(l),r.push(u),n.push(d),s.push(l),s.push(u),s.push(d);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ro(){return this.hours()%12||12}function fw(){return this.hours()||24}Q("H",["HH",2],0,"hour");Q("h",["hh",2],0,ro);Q("k",["kk",2],0,fw);Q("hmm",0,0,function(){return""+ro.apply(this)+Dt(this.minutes(),2)});Q("hmmss",0,0,function(){return""+ro.apply(this)+Dt(this.minutes(),2)+Dt(this.seconds(),2)});Q("Hmm",0,0,function(){return""+this.hours()+Dt(this.minutes(),2)});Q("Hmmss",0,0,function(){return""+this.hours()+Dt(this.minutes(),2)+Dt(this.seconds(),2)});function cf(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}cf("a",!0);cf("A",!1);function uf(e,t){return t._meridiemParse}H("a",uf);H("A",uf);H("H",Ie,Xa);H("h",Ie,kn);H("k",Ie,kn);H("HH",Ie,ft);H("hh",Ie,ft);H("kk",Ie,ft);H("hmm",Jd);H("hmmss",Xd);H("Hmm",Jd);H("Hmmss",Xd);Ne(["H","HH"],We);Ne(["k","kk"],function(e,t,r){var n=be(e);t[We]=n===24?0:n});Ne(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});Ne(["h","hh"],function(e,t,r){t[We]=be(e),fe(r).bigHour=!0});Ne("hmm",function(e,t,r){var n=e.length-2;t[We]=be(e.substr(0,n)),t[Et]=be(e.substr(n)),fe(r).bigHour=!0});Ne("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[We]=be(e.substr(0,n)),t[Et]=be(e.substr(n,2)),t[qt]=be(e.substr(s)),fe(r).bigHour=!0});Ne("Hmm",function(e,t,r){var n=e.length-2;t[We]=be(e.substr(0,n)),t[Et]=be(e.substr(n))});Ne("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[We]=be(e.substr(0,n)),t[Et]=be(e.substr(n,2)),t[qt]=be(e.substr(s))});function hw(e){return(e+"").toLowerCase().charAt(0)==="p"}var pw=/[ap]\.?m?\.?/i,gw=Ln("Hours",!0);function mw(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var df={calendar:s2,longDateFormat:l2,invalidDate:u2,ordinal:f2,dayOfMonthOrdinalParse:h2,relativeTime:g2,months:T2,monthsShort:tf,week:V2,weekdays:K2,weekdaysMin:J2,weekdaysShort:lf,meridiemParse:pw},Fe={},Dn={},Jn;function vw(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function Vc(e){return e&&e.toLowerCase().replace("_","-")}function yw(e){for(var t=0,r,n,s,i;t<e.length;){for(i=Vc(e[t]).split("-"),r=i.length,n=Vc(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=wi(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&vw(i,n)>=r-1)break;r--}t++}return Jn}function xw(e){return!!(e&&e.match("^[^/\\\\]*$"))}function wi(e){var t=null,r;if(Fe[e]===void 0&&typeof module<"u"&&module&&module.exports&&xw(e))try{t=Jn._abbr,r=require,r("./locale/"+e),hr(t)}catch{Fe[e]=null}return Fe[e]}function hr(e,t){var r;return e&&(it(t)?r=Qt(e):r=no(e,t),r?Jn=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Jn._abbr}function no(e,t){if(t!==null){var r,n=df;if(t.abbr=e,Fe[e]!=null)Gd("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Fe[e]._config;else if(t.parentLocale!=null)if(Fe[t.parentLocale]!=null)n=Fe[t.parentLocale]._config;else if(r=wi(t.parentLocale),r!=null)n=r._config;else return Dn[t.parentLocale]||(Dn[t.parentLocale]=[]),Dn[t.parentLocale].push({name:e,config:t}),null;return Fe[e]=new Ga(pa(n,t)),Dn[e]&&Dn[e].forEach(function(s){no(s.name,s.config)}),hr(e),Fe[e]}else return delete Fe[e],null}function bw(e,t){if(t!=null){var r,n,s=df;Fe[e]!=null&&Fe[e].parentLocale!=null?Fe[e].set(pa(Fe[e]._config,t)):(n=wi(e),n!=null&&(s=n._config),t=pa(s,t),n==null&&(t.abbr=e),r=new Ga(t),r.parentLocale=Fe[e],Fe[e]=r),hr(e)}else Fe[e]!=null&&(Fe[e].parentLocale!=null?(Fe[e]=Fe[e].parentLocale,e===hr()&&hr(e)):Fe[e]!=null&&delete Fe[e]);return Fe[e]}function Qt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jn;if(!kt(e)){if(t=wi(e),t)return t;e=[e]}return yw(e)}function ww(){return ga(Fe)}function so(e){var t,r=e._a;return r&&fe(e).overflow===-2&&(t=r[Gt]<0||r[Gt]>11?Gt:r[Nt]<1||r[Nt]>Qa(r[et],r[Gt])?Nt:r[We]<0||r[We]>24||r[We]===24&&(r[Et]!==0||r[qt]!==0||r[Dr]!==0)?We:r[Et]<0||r[Et]>59?Et:r[qt]<0||r[qt]>59?qt:r[Dr]<0||r[Dr]>999?Dr:-1,fe(e)._overflowDayOfYear&&(t<et||t>Nt)&&(t=Nt),fe(e)._overflowWeeks&&t===-1&&(t=L2),fe(e)._overflowWeekday&&t===-1&&(t=C2),fe(e).overflow=t),e}var Sw=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ew=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kw=/Z|[+-]\d\d(?::?\d\d)?/,Es=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],qi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Lw=/^\/?Date\((-?\d+)/i,Cw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ow={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ff(e){var t,r,n=e._i,s=Sw.exec(n)||Ew.exec(n),i,a,l,u,d=Es.length,f=qi.length;if(s){for(fe(e).iso=!0,t=0,r=d;t<r;t++)if(Es[t][1].exec(s[1])){a=Es[t][0],i=Es[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(s[3]){for(t=0,r=f;t<r;t++)if(qi[t][1].exec(s[3])){l=(s[2]||" ")+qi[t][0];break}if(l==null){e._isValid=!1;return}}if(!i&&l!=null){e._isValid=!1;return}if(s[4])if(kw.exec(s[4]))u="Z";else{e._isValid=!1;return}e._f=a+(l||"")+(u||""),ao(e)}else e._isValid=!1}function jw(e,t,r,n,s,i){var a=[Mw(e),tf.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return i&&a.push(parseInt(i,10)),a}function Mw(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function _w(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Tw(e,t,r){if(e){var n=lf.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return fe(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Nw(e,t,r){if(e)return Ow[e];if(t)return 0;var n=parseInt(r,10),s=n%100,i=(n-s)/100;return i*60+s}function hf(e){var t=Cw.exec(_w(e._i)),r;if(t){if(r=jw(t[4],t[3],t[2],t[5],t[6],t[7]),!Tw(t[1],r,e))return;e._a=r,e._tzm=Nw(t[8],t[9],t[10]),e._d=Zn.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),fe(e).rfc2822=!0}else e._isValid=!1}function Pw(e){var t=Lw.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(ff(e),e._isValid===!1)delete e._isValid;else return;if(hf(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:$.createFromInputFallback(e)}$.createFromInputFallback=bt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function rn(e,t,r){return e??t??r}function Dw(e){var t=new Date($.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function io(e){var t,r,n=[],s,i,a;if(!e._d){for(s=Dw(e),e._w&&e._a[Nt]==null&&e._a[Gt]==null&&Aw(e),e._dayOfYear!=null&&(a=rn(e._a[et],s[et]),(e._dayOfYear>Un(a)||e._dayOfYear===0)&&(fe(e)._overflowDayOfYear=!0),r=Zn(a,0,e._dayOfYear),e._a[Gt]=r.getUTCMonth(),e._a[Nt]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[We]===24&&e._a[Et]===0&&e._a[qt]===0&&e._a[Dr]===0&&(e._nextDay=!0,e._a[We]=0),e._d=(e._useUTC?Zn:z2).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[We]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(fe(e).weekdayMismatch=!0)}}function Aw(e){var t,r,n,s,i,a,l,u,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,a=4,r=rn(t.GG,e._a[et],Kn(Re(),1,4).year),n=rn(t.W,1),s=rn(t.E,1),(s<1||s>7)&&(u=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,d=Kn(Re(),i,a),r=rn(t.gg,e._a[et],d.year),n=rn(t.w,d.week),t.d!=null?(s=t.d,(s<0||s>6)&&(u=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(u=!0)):s=i),n<1||n>Kt(r,i,a)?fe(e)._overflowWeeks=!0:u!=null?fe(e)._overflowWeekday=!0:(l=of(r,n,s,i,a),e._a[et]=l.year,e._dayOfYear=l.dayOfYear)}$.ISO_8601=function(){};$.RFC_2822=function(){};function ao(e){if(e._f===$.ISO_8601){ff(e);return}if(e._f===$.RFC_2822){hf(e);return}e._a=[],fe(e).empty=!0;var t=""+e._i,r,n,s,i,a,l=t.length,u=0,d,f;for(s=qd(e._f,e._locale).match(qa)||[],f=s.length,r=0;r<f;r++)i=s[r],n=(t.match(S2(i,e))||[])[0],n&&(a=t.substr(0,t.indexOf(n)),a.length>0&&fe(e).unusedInput.push(a),t=t.slice(t.indexOf(n)+n.length),u+=n.length),ln[i]?(n?fe(e).empty=!1:fe(e).unusedTokens.push(i),k2(i,n,e)):e._strict&&!n&&fe(e).unusedTokens.push(i);fe(e).charsLeftOver=l-u,t.length>0&&fe(e).unusedInput.push(t),e._a[We]<=12&&fe(e).bigHour===!0&&e._a[We]>0&&(fe(e).bigHour=void 0),fe(e).parsedDateParts=e._a.slice(0),fe(e).meridiem=e._meridiem,e._a[We]=Rw(e._locale,e._a[We],e._meridiem),d=fe(e).era,d!==null&&(e._a[et]=e._locale.erasConvertYear(d,e._a[et])),io(e),so(e)}function Rw(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Iw(e){var t,r,n,s,i,a,l=!1,u=e._f.length;if(u===0){fe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<u;s++)i=0,a=!1,t=Ha({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],ao(t),Wa(t)&&(a=!0),i+=fe(t).charsLeftOver,i+=fe(t).unusedTokens.length*10,fe(t).score=i,l?i<n&&(n=i,r=t):(n==null||i<n||a)&&(n=i,r=t,a&&(l=!0));cr(e,r||t)}function Fw(e){if(!e._d){var t=Za(e._i),r=t.day===void 0?t.date:t.day;e._a=Wd([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),io(e)}}function $w(e){var t=new as(so(pf(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function pf(e){var t=e._i,r=e._f;return e._locale=e._locale||Qt(e._l),t===null||r===void 0&&t===""?pi({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Lt(t)?new as(so(t)):(is(t)?e._d=t:kt(r)?Iw(e):r?ao(e):Uw(e),Wa(e)||(e._d=null),e))}function Uw(e){var t=e._i;it(t)?e._d=new Date($.now()):is(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pw(e):kt(t)?(e._a=Wd(t.slice(0),function(r){return parseInt(r,10)}),io(e)):Fr(t)?Fw(e):Jt(t)?e._d=new Date(t):$.createFromInputFallback(e)}function gf(e,t,r,n,s){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Fr(e)&&Ya(e)||kt(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=s,i._l=r,i._i=e,i._f=t,i._strict=n,$w(i)}function Re(e,t,r,n){return gf(e,t,r,n,!1)}var zw=bt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Re.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:pi()}),Bw=bt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Re.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:pi()});function mf(e,t){var r,n;if(t.length===1&&kt(t[0])&&(t=t[0]),!t.length)return Re();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Vw(){var e=[].slice.call(arguments,0);return mf("isBefore",e)}function Yw(){var e=[].slice.call(arguments,0);return mf("isAfter",e)}var Ww=function(){return Date.now?Date.now():+new Date},An=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Hw(e){var t,r=!1,n,s=An.length;for(t in e)if(Ce(e,t)&&!(ze.call(An,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[An[n]]){if(r)return!1;parseFloat(e[An[n]])!==be(e[An[n]])&&(r=!0)}return!0}function Gw(){return this._isValid}function qw(){return Ot(NaN)}function Si(e){var t=Za(e),r=t.year||0,n=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,u=t.minute||0,d=t.second||0,f=t.millisecond||0;this._isValid=Hw(t),this._milliseconds=+f+d*1e3+u*6e4+l*1e3*60*60,this._days=+a+i*7,this._months=+s+n*3+r*12,this._data={},this._locale=Qt(),this._bubble()}function _s(e){return e instanceof Si}function va(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Zw(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0,a;for(a=0;a<n;a++)be(e[a])!==be(t[a])&&i++;return i+s}function vf(e,t){Q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Dt(~~(r/60),2)+t+Dt(~~r%60,2)})}vf("Z",":");vf("ZZ","");H("Z",xi);H("ZZ",xi);Ne(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=oo(xi,e)});var Kw=/([\+\-]|\d\d)/gi;function oo(e,t){var r=(t||"").match(e),n,s,i;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(Kw)||["-",0,0],i=+(s[1]*60)+be(s[2]),i===0?0:s[0]==="+"?i:-i)}function lo(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(Lt(e)||is(e)?e.valueOf():Re(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),$.updateOffset(r,!1),r):Re(e).local()}function ya(e){return-Math.round(e._d.getTimezoneOffset())}$.updateOffset=function(){};function Jw(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=oo(xi,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=ya(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?bf(this,Ot(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,$.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:ya(this)}function Xw(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Qw(e){return this.utcOffset(0,e)}function eS(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ya(this),"m")),this}function tS(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=oo(b2,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function rS(e){return this.isValid()?(e=e?Re(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function nS(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function sS(){if(!it(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ha(e,this),e=pf(e),e._a?(t=e._isUTC?Rt(e._a):Re(e._a),this._isDSTShifted=this.isValid()&&Zw(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function iS(){return this.isValid()?!this._isUTC:!1}function aS(){return this.isValid()?this._isUTC:!1}function yf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var oS=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,lS=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ot(e,t){var r=e,n=null,s,i,a;return _s(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Jt(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=oS.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:be(n[Nt])*s,h:be(n[We])*s,m:be(n[Et])*s,s:be(n[qt])*s,ms:be(va(n[Dr]*1e3))*s}):(n=lS.exec(e))?(s=n[1]==="-"?-1:1,r={y:Mr(n[2],s),M:Mr(n[3],s),w:Mr(n[4],s),d:Mr(n[5],s),h:Mr(n[6],s),m:Mr(n[7],s),s:Mr(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(a=cS(Re(r.from),Re(r.to)),r={},r.ms=a.milliseconds,r.M=a.months),i=new Si(r),_s(e)&&Ce(e,"_locale")&&(i._locale=e._locale),_s(e)&&Ce(e,"_isValid")&&(i._isValid=e._isValid),i}Ot.fn=Si.prototype;Ot.invalid=qw;function Mr(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Yc(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function cS(e,t){var r;return e.isValid()&&t.isValid()?(t=lo(t,e),e.isBefore(t)?r=Yc(e,t):(r=Yc(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function xf(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(Gd(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),s=Ot(r,n),bf(this,s,e),this}}function bf(e,t,r,n){var s=t._milliseconds,i=va(t._days),a=va(t._months);e.isValid()&&(n=n??!0,a&&nf(e,qn(e,"Month")+a*r),i&&ef(e,"Date",qn(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&$.updateOffset(e,i||a))}var uS=xf(1,"add"),dS=xf(-1,"subtract");function wf(e){return typeof e=="string"||e instanceof String}function fS(e){return Lt(e)||is(e)||wf(e)||Jt(e)||pS(e)||hS(e)||e===null||e===void 0}function hS(e){var t=Fr(e)&&!Ya(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,i,a=n.length;for(s=0;s<a;s+=1)i=n[s],r=r||Ce(e,i);return t&&r}function pS(e){var t=kt(e),r=!1;return t&&(r=e.filter(function(n){return!Jt(n)&&wf(e)}).length===0),t&&r}function gS(e){var t=Fr(e)&&!Ya(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,i;for(s=0;s<n.length;s+=1)i=n[s],r=r||Ce(e,i);return t&&r}function mS(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function vS(e,t){arguments.length===1&&(arguments[0]?fS(arguments[0])?(e=arguments[0],t=void 0):gS(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Re(),n=lo(r,this).startOf("day"),s=$.calendarFormat(this,n)||"sameElse",i=t&&(It(t[s])?t[s].call(this,r):t[s]);return this.format(i||this.localeData().calendar(s,this,Re(r)))}function yS(){return new as(this)}function xS(e,t){var r=Lt(e)?e:Re(e);return this.isValid()&&r.isValid()?(t=wt(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function bS(e,t){var r=Lt(e)?e:Re(e);return this.isValid()&&r.isValid()?(t=wt(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function wS(e,t,r,n){var s=Lt(e)?e:Re(e),i=Lt(t)?t:Re(t);return this.isValid()&&s.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function SS(e,t){var r=Lt(e)?e:Re(e),n;return this.isValid()&&r.isValid()?(t=wt(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function ES(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function kS(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function LS(e,t,r){var n,s,i;if(!this.isValid())return NaN;if(n=lo(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=wt(t),t){case"year":i=Ts(this,n)/12;break;case"month":i=Ts(this,n);break;case"quarter":i=Ts(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-s)/864e5;break;case"week":i=(this-n-s)/6048e5;break;default:i=this-n}return r?i:vt(i)}function Ts(e,t){if(e.date()<t.date())return-Ts(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,i;return t-n<0?(s=e.clone().add(r-1,"months"),i=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),i=(t-n)/(s-n)),-(r+i)||0}$.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";$.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function CS(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function OS(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Ms(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):It(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ms(r,"Z")):Ms(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function jS(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+s+i)}function MS(e){e||(e=this.isUtc()?$.defaultFormatUtc:$.defaultFormat);var t=Ms(this,e);return this.localeData().postformat(t)}function _S(e,t){return this.isValid()&&(Lt(e)&&e.isValid()||Re(e).isValid())?Ot({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function TS(e){return this.from(Re(),e)}function NS(e,t){return this.isValid()&&(Lt(e)&&e.isValid()||Re(e).isValid())?Ot({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function PS(e){return this.to(Re(),e)}function Sf(e){var t;return e===void 0?this._locale._abbr:(t=Qt(e),t!=null&&(this._locale=t),this)}var Ef=bt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function kf(){return this._locale}var Js=1e3,cn=60*Js,Xs=60*cn,Lf=(365*400+97)*24*Xs;function un(e,t){return(e%t+t)%t}function Cf(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Lf:new Date(e,t,r).valueOf()}function Of(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Lf:Date.UTC(e,t,r)}function DS(e){var t,r;if(e=wt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Of:Cf,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*cn),Xs);break;case"minute":t=this._d.valueOf(),t-=un(t,cn);break;case"second":t=this._d.valueOf(),t-=un(t,Js);break}return this._d.setTime(t),$.updateOffset(this,!0),this}function AS(e){var t,r;if(e=wt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Of:Cf,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Xs-un(t+(this._isUTC?0:this.utcOffset()*cn),Xs)-1;break;case"minute":t=this._d.valueOf(),t+=cn-un(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=Js-un(t,Js)-1;break}return this._d.setTime(t),$.updateOffset(this,!0),this}function RS(){return this._d.valueOf()-(this._offset||0)*6e4}function IS(){return Math.floor(this.valueOf()/1e3)}function FS(){return new Date(this.valueOf())}function $S(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function US(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function zS(){return this.isValid()?this.toISOString():null}function BS(){return Wa(this)}function VS(){return cr({},fe(this))}function YS(){return fe(this).overflow}function WS(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Q("N",0,0,"eraAbbr");Q("NN",0,0,"eraAbbr");Q("NNN",0,0,"eraAbbr");Q("NNNN",0,0,"eraName");Q("NNNNN",0,0,"eraNarrow");Q("y",["y",1],"yo","eraYear");Q("y",["yy",2],0,"eraYear");Q("y",["yyy",3],0,"eraYear");Q("y",["yyyy",4],0,"eraYear");H("N",co);H("NN",co);H("NNN",co);H("NNNN",r4);H("NNNNN",n4);Ne(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?fe(r).era=s:fe(r).invalidEra=e});H("y",En);H("yy",En);H("yyy",En);H("yyyy",En);H("yo",s4);Ne(["y","yy","yyy","yyyy"],et);Ne(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[et]=r._locale.eraYearOrdinalParse(e,s):t[et]=parseInt(e,10)});function HS(e,t){var r,n,s,i=this._eras||Qt("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":s=$(i[r].since).startOf("day"),i[r].since=s.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":s=$(i[r].until).startOf("day").valueOf(),i[r].until=s.valueOf();break}}return i}function GS(e,t,r){var n,s,i=this.eras(),a,l,u;for(e=e.toUpperCase(),n=0,s=i.length;n<s;++n)if(a=i[n].name.toUpperCase(),l=i[n].abbr.toUpperCase(),u=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return i[n];break;case"NNNN":if(a===e)return i[n];break;case"NNNNN":if(u===e)return i[n];break}else if([a,l,u].indexOf(e)>=0)return i[n]}function qS(e,t){var r=e.since<=e.until?1:-1;return t===void 0?$(e.since).year():$(e.since).year()+(t-e.offset)*r}function ZS(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function KS(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function JS(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function XS(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-$(s[e].since).year())*r+s[e].offset;return this.year()}function QS(e){return Ce(this,"_erasNameRegex")||uo.call(this),e?this._erasNameRegex:this._erasRegex}function e4(e){return Ce(this,"_erasAbbrRegex")||uo.call(this),e?this._erasAbbrRegex:this._erasRegex}function t4(e){return Ce(this,"_erasNarrowRegex")||uo.call(this),e?this._erasNarrowRegex:this._erasRegex}function co(e,t){return t.erasAbbrRegex(e)}function r4(e,t){return t.erasNameRegex(e)}function n4(e,t){return t.erasNarrowRegex(e)}function s4(e,t){return t._eraYearOrdinalRegex||En}function uo(){var e=[],t=[],r=[],n=[],s,i,a,l,u,d=this.eras();for(s=0,i=d.length;s<i;++s)a=Zt(d[s].name),l=Zt(d[s].abbr),u=Zt(d[s].narrow),t.push(a),e.push(l),r.push(u),n.push(a),n.push(l),n.push(u);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Q(0,["gg",2],0,function(){return this.weekYear()%100});Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ei(e,t){Q(0,[e,e.length],0,t)}Ei("gggg","weekYear");Ei("ggggg","weekYear");Ei("GGGG","isoWeekYear");Ei("GGGGG","isoWeekYear");H("G",yi);H("g",yi);H("GG",Ie,ft);H("gg",Ie,ft);H("GGGG",Ja,Ka);H("gggg",Ja,Ka);H("GGGGG",vi,gi);H("ggggg",vi,gi);ls(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=be(e)});ls(["gg","GG"],function(e,t,r,n){t[n]=$.parseTwoDigitYear(e)});function i4(e){return jf.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function a4(e){return jf.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function o4(){return Kt(this.year(),1,4)}function l4(){return Kt(this.isoWeekYear(),1,4)}function c4(){var e=this.localeData()._week;return Kt(this.year(),e.dow,e.doy)}function u4(){var e=this.localeData()._week;return Kt(this.weekYear(),e.dow,e.doy)}function jf(e,t,r,n,s){var i;return e==null?Kn(this,n,s).year:(i=Kt(e,n,s),t>i&&(t=i),d4.call(this,e,t,r,n,s))}function d4(e,t,r,n,s){var i=of(e,t,r,n,s),a=Zn(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Q("Q",0,"Qo","quarter");H("Q",Zd);Ne("Q",function(e,t){t[Gt]=(be(e)-1)*3});function f4(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("D",["DD",2],"Do","date");H("D",Ie,kn);H("DD",Ie,ft);H("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Ne(["D","DD"],Nt);Ne("Do",function(e,t){t[Nt]=be(e.match(Ie)[0])});var Mf=Ln("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear");H("DDD",mi);H("DDDD",Kd);Ne(["DDD","DDDD"],function(e,t,r){r._dayOfYear=be(e)});function h4(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Q("m",["mm",2],0,"minute");H("m",Ie,Xa);H("mm",Ie,ft);Ne(["m","mm"],Et);var p4=Ln("Minutes",!1);Q("s",["ss",2],0,"second");H("s",Ie,Xa);H("ss",Ie,ft);Ne(["s","ss"],qt);var g4=Ln("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)});Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Q(0,["SSS",3],0,"millisecond");Q(0,["SSSS",4],0,function(){return this.millisecond()*10});Q(0,["SSSSS",5],0,function(){return this.millisecond()*100});Q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});H("S",mi,Zd);H("SS",mi,ft);H("SSS",mi,Kd);var ur,_f;for(ur="SSSS";ur.length<=9;ur+="S")H(ur,En);function m4(e,t){t[Dr]=be(("0."+e)*1e3)}for(ur="S";ur.length<=9;ur+="S")Ne(ur,m4);_f=Ln("Milliseconds",!1);Q("z",0,0,"zoneAbbr");Q("zz",0,0,"zoneName");function v4(){return this._isUTC?"UTC":""}function y4(){return this._isUTC?"Coordinated Universal Time":""}var R=as.prototype;R.add=uS;R.calendar=vS;R.clone=yS;R.diff=LS;R.endOf=AS;R.format=MS;R.from=_S;R.fromNow=TS;R.to=NS;R.toNow=PS;R.get=j2;R.invalidAt=YS;R.isAfter=xS;R.isBefore=bS;R.isBetween=wS;R.isSame=SS;R.isSameOrAfter=ES;R.isSameOrBefore=kS;R.isValid=BS;R.lang=Ef;R.locale=Sf;R.localeData=kf;R.max=Bw;R.min=zw;R.parsingFlags=VS;R.set=M2;R.startOf=DS;R.subtract=dS;R.toArray=$S;R.toObject=US;R.toDate=FS;R.toISOString=OS;R.inspect=jS;typeof Symbol<"u"&&Symbol.for!=null&&(R[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});R.toJSON=zS;R.toString=CS;R.unix=IS;R.valueOf=RS;R.creationData=WS;R.eraName=ZS;R.eraNarrow=KS;R.eraAbbr=JS;R.eraYear=XS;R.year=Qd;R.isLeapYear=O2;R.weekYear=i4;R.isoWeekYear=a4;R.quarter=R.quarters=f4;R.month=sf;R.daysInMonth=F2;R.week=R.weeks=H2;R.isoWeek=R.isoWeeks=G2;R.weeksInYear=c4;R.weeksInWeekYear=u4;R.isoWeeksInYear=o4;R.isoWeeksInISOWeekYear=l4;R.date=Mf;R.day=R.days=aw;R.weekday=ow;R.isoWeekday=lw;R.dayOfYear=h4;R.hour=R.hours=gw;R.minute=R.minutes=p4;R.second=R.seconds=g4;R.millisecond=R.milliseconds=_f;R.utcOffset=Jw;R.utc=Qw;R.local=eS;R.parseZone=tS;R.hasAlignedHourOffset=rS;R.isDST=nS;R.isLocal=iS;R.isUtcOffset=aS;R.isUtc=yf;R.isUTC=yf;R.zoneAbbr=v4;R.zoneName=y4;R.dates=bt("dates accessor is deprecated. Use date instead.",Mf);R.months=bt("months accessor is deprecated. Use month instead",sf);R.years=bt("years accessor is deprecated. Use year instead",Qd);R.zone=bt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Xw);R.isDSTShifted=bt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",sS);function x4(e){return Re(e*1e3)}function b4(){return Re.apply(null,arguments).parseZone()}function Tf(e){return e}var Oe=Ga.prototype;Oe.calendar=i2;Oe.longDateFormat=c2;Oe.invalidDate=d2;Oe.ordinal=p2;Oe.preparse=Tf;Oe.postformat=Tf;Oe.relativeTime=m2;Oe.pastFuture=v2;Oe.set=n2;Oe.eras=HS;Oe.erasParse=GS;Oe.erasConvertYear=qS;Oe.erasAbbrRegex=e4;Oe.erasNameRegex=QS;Oe.erasNarrowRegex=t4;Oe.months=D2;Oe.monthsShort=A2;Oe.monthsParse=I2;Oe.monthsRegex=U2;Oe.monthsShortRegex=$2;Oe.week=B2;Oe.firstDayOfYear=W2;Oe.firstDayOfWeek=Y2;Oe.weekdays=tw;Oe.weekdaysMin=nw;Oe.weekdaysShort=rw;Oe.weekdaysParse=iw;Oe.weekdaysRegex=cw;Oe.weekdaysShortRegex=uw;Oe.weekdaysMinRegex=dw;Oe.isPM=hw;Oe.meridiem=mw;function Qs(e,t,r,n){var s=Qt(),i=Rt().set(n,t);return s[r](i,e)}function Nf(e,t,r){if(Jt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Qs(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Qs(e,n,r,"month");return s}function fo(e,t,r,n){typeof e=="boolean"?(Jt(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Jt(t)&&(r=t,t=void 0),t=t||"");var s=Qt(),i=e?s._week.dow:0,a,l=[];if(r!=null)return Qs(t,(r+i)%7,n,"day");for(a=0;a<7;a++)l[a]=Qs(t,(a+i)%7,n,"day");return l}function w4(e,t){return Nf(e,t,"months")}function S4(e,t){return Nf(e,t,"monthsShort")}function E4(e,t,r){return fo(e,t,r,"weekdays")}function k4(e,t,r){return fo(e,t,r,"weekdaysShort")}function L4(e,t,r){return fo(e,t,r,"weekdaysMin")}hr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=be(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});$.lang=bt("moment.lang is deprecated. Use moment.locale instead.",hr);$.langData=bt("moment.langData is deprecated. Use moment.localeData instead.",Qt);var Bt=Math.abs;function C4(){var e=this._data;return this._milliseconds=Bt(this._milliseconds),this._days=Bt(this._days),this._months=Bt(this._months),e.milliseconds=Bt(e.milliseconds),e.seconds=Bt(e.seconds),e.minutes=Bt(e.minutes),e.hours=Bt(e.hours),e.months=Bt(e.months),e.years=Bt(e.years),this}function Pf(e,t,r,n){var s=Ot(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function O4(e,t){return Pf(this,e,t,1)}function j4(e,t){return Pf(this,e,t,-1)}function Wc(e){return e<0?Math.floor(e):Math.ceil(e)}function M4(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,a,l,u;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Wc(xa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=vt(e/1e3),n.seconds=s%60,i=vt(s/60),n.minutes=i%60,a=vt(i/60),n.hours=a%24,t+=vt(a/24),u=vt(Df(t)),r+=u,t-=Wc(xa(u)),l=vt(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function Df(e){return e*4800/146097}function xa(e){return e*146097/4800}function _4(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=wt(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Df(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(xa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function er(e){return function(){return this.as(e)}}var Af=er("ms"),T4=er("s"),N4=er("m"),P4=er("h"),D4=er("d"),A4=er("w"),R4=er("M"),I4=er("Q"),F4=er("y"),$4=Af;function U4(){return Ot(this)}function z4(e){return e=wt(e),this.isValid()?this[e+"s"]():NaN}function Hr(e){return function(){return this.isValid()?this._data[e]:NaN}}var B4=Hr("milliseconds"),V4=Hr("seconds"),Y4=Hr("minutes"),W4=Hr("hours"),H4=Hr("days"),G4=Hr("months"),q4=Hr("years");function Z4(){return vt(this.days()/7)}var Vt=Math.round,an={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function K4(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function J4(e,t,r,n){var s=Ot(e).abs(),i=Vt(s.as("s")),a=Vt(s.as("m")),l=Vt(s.as("h")),u=Vt(s.as("d")),d=Vt(s.as("M")),f=Vt(s.as("w")),h=Vt(s.as("y")),p=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||a<=1&&["m"]||a<r.m&&["mm",a]||l<=1&&["h"]||l<r.h&&["hh",l]||u<=1&&["d"]||u<r.d&&["dd",u];return r.w!=null&&(p=p||f<=1&&["w"]||f<r.w&&["ww",f]),p=p||d<=1&&["M"]||d<r.M&&["MM",d]||h<=1&&["y"]||["yy",h],p[2]=t,p[3]=+e>0,p[4]=n,K4.apply(null,p)}function X4(e){return e===void 0?Vt:typeof e=="function"?(Vt=e,!0):!1}function Q4(e,t){return an[e]===void 0?!1:t===void 0?an[e]:(an[e]=t,e==="s"&&(an.ss=t-1),!0)}function eE(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=an,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},an,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=J4(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var Zi=Math.abs;function tn(e){return(e>0)-(e<0)||+e}function ki(){if(!this.isValid())return this.localeData().invalidDate();var e=Zi(this._milliseconds)/1e3,t=Zi(this._days),r=Zi(this._months),n,s,i,a,l=this.asSeconds(),u,d,f,h;return l?(n=vt(e/60),s=vt(n/60),e%=60,n%=60,i=vt(r/12),r%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=l<0?"-":"",d=tn(this._months)!==tn(l)?"-":"",f=tn(this._days)!==tn(l)?"-":"",h=tn(this._milliseconds)!==tn(l)?"-":"",u+"P"+(i?d+i+"Y":"")+(r?d+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?h+s+"H":"")+(n?h+n+"M":"")+(e?h+a+"S":"")):"P0D"}var Ee=Si.prototype;Ee.isValid=Gw;Ee.abs=C4;Ee.add=O4;Ee.subtract=j4;Ee.as=_4;Ee.asMilliseconds=Af;Ee.asSeconds=T4;Ee.asMinutes=N4;Ee.asHours=P4;Ee.asDays=D4;Ee.asWeeks=A4;Ee.asMonths=R4;Ee.asQuarters=I4;Ee.asYears=F4;Ee.valueOf=$4;Ee._bubble=M4;Ee.clone=U4;Ee.get=z4;Ee.milliseconds=B4;Ee.seconds=V4;Ee.minutes=Y4;Ee.hours=W4;Ee.days=H4;Ee.weeks=Z4;Ee.months=G4;Ee.years=q4;Ee.humanize=eE;Ee.toISOString=ki;Ee.toString=ki;Ee.toJSON=ki;Ee.locale=Sf;Ee.localeData=kf;Ee.toIsoString=bt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ki);Ee.lang=Ef;Q("X",0,0,"unix");Q("x",0,0,"valueOf");H("x",yi);H("X",w2);Ne("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});Ne("x",function(e,t,r){r._d=new Date(be(e))});//! moment.js
89
+ $.version="2.30.1";t2(Re);$.fn=R;$.min=Vw;$.max=Yw;$.now=Ww;$.utc=Rt;$.unix=x4;$.months=w4;$.isDate=is;$.locale=hr;$.invalid=pi;$.duration=Ot;$.isMoment=Lt;$.weekdays=E4;$.parseZone=b4;$.localeData=Qt;$.isDuration=_s;$.monthsShort=S4;$.weekdaysMin=L4;$.defineLocale=no;$.updateLocale=bw;$.locales=ww;$.weekdaysShort=k4;$.normalizeUnits=wt;$.relativeTimeRounding=X4;$.relativeTimeThreshold=Q4;$.calendarFormat=mS;$.prototype=R;$.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Wt=(e=>(e[e.STANDARD=60]="STANDARD",e[e.DOCUMENT=61]="DOCUMENT",e[e.INTERNATIONAL_DOCUMENT=62]="INTERNATIONAL_DOCUMENT",e[e.INTERNATIONAL_STANDARD=63]="INTERNATIONAL_STANDARD",e[e.ECONOMIC=64]="ECONOMIC",e[e.SAVER=70]="SAVER",e[e.NATIONAL_LOCKER=81]="NATIONAL_LOCKER",e[e.INTERNAL_MAIL=99]="INTERNAL_MAIL",e))(Wt||{}),Rf=(e=>(e[e.ANULLED=6]="ANULLED",e[e.PAID=10]="PAID",e[e.PENDING=11]="PENDING",e[e.PARTIAL_PAID=20]="PARTIAL_PAID",e[e.TO_ISSUE=59]="TO_ISSUE",e[e.ISSUED=60]="ISSUED",e))(Rf||{}),zn=(e=>(e[e.INVOICE=2]="INVOICE",e[e.CREDIT_NOTE=4]="CREDIT_NOTE",e[e.ORDER=6]="ORDER",e))(zn||{}),ho=(e=>(e[e.CASH=1]="CASH",e[e.COD=2]="COD",e[e.CREDIT=3]="CREDIT",e[e.BOXOFFICE_CREDIT=4]="BOXOFFICE_CREDIT",e[e.DEST_BOXOFFICE_CREDIT=5]="DEST_BOXOFFICE_CREDIT",e[e.EXEMPT=6]="EXEMPT",e))(ho||{}),If=(e=>(e[e.INTERNATIONAL=1]="INTERNATIONAL",e[e.NATIONAL=2]="NATIONAL",e))(If||{}),He=(e=>(e[e.OFFICE=10]="OFFICE",e[e.HOME=20]="HOME",e[e.INTERNATIONAL=21]="INTERNATIONAL",e))(He||{}),dr=(e=>(e[e.PERSON=0]="PERSON",e[e.BOX_ACCOUNT=1]="BOX_ACCOUNT",e))(dr||{});const Ff={shipper:null,consigneeType:{id:"0",value:0,label:"Persona"},consignee:null,boxAccount:null,pickupType:{id:He.OFFICE.toString(),value:{deliveryTypeID:He.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},originStore:null,originAddress:null,deliveryType:{id:He.OFFICE.toString(),value:{deliveryTypeID:He.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},destinationStore:null,destinationAddress:null};var Nr=(e=>(e[e.ACTIVE=1]="ACTIVE",e[e.ANNULLED=3]="ANNULLED",e[e.DRAFT=5]="DRAFT",e[e.REPLACED=55]="REPLACED",e[e.DELIVERED=30]="DELIVERED",e))(Nr||{});const $f=({invoice:e,onClick:t})=>{const r=c.useMemo(()=>{switch(e.type){case zn.INVOICE:return"Factura:";case zn.CREDIT_NOTE:return"Nota de Crédito:";case zn.ORDER:return"Orden:"}},[e.type]);return o.jsxs("div",{className:"border cursor-pointer border-gray-300 dark:border-gray-700 rounded-lg p-4 hover:shadow-md transition-all text-gray-800 dark:text-gray-200 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 duration-100",onClick:t,children:[o.jsxs("div",{className:"flex items-center justify-between mb-3 gap-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Sm,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400"}),o.jsxs("span",{className:"font-semibold text-sm text-card-foreground dark:text-gray-200",children:[r," ",o.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-bold",children:e.invoiceNumber})]})]}),o.jsx(dn,{color:"primary",children:e.statusName})]}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[o.jsxs("div",{className:"col-span-3 md:col-span-2",children:[o.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[o.jsx(Ru,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),o.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Cliente"})]}),o.jsx("p",{className:"text-sm font-bold text-card-foreground dark:text-gray-100",children:e.accountFullName}),o.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mt-0.5 text-gray-600 dark:text-gray-400",children:[o.jsx(Au,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:$(e.invoiceDate).format("DD/MM/YYYY, hh:mm A")})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[o.jsx(Vb,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),o.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Total"})]}),o.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]}),o.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Con IVA"})]}),e.balanceAmount>=0&&o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[o.jsx(gn,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),o.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Por Cobrar"})]}),o.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(e.balanceAmount,0).toFixed(2)]}),o.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Saldo pendiente"})]}),e.balanceAmount<0&&o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[o.jsx(gn,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),o.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Reintegrar"})]}),o.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(-e.balanceAmount,0).toFixed(2)]}),o.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Monto a devolver"})]})]})]})};function tE(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M19 12v7a1.78 1.78 0 0 1 -3.1 1.4a1.65 1.65 0 0 0 -2.6 0a1.65 1.65 0 0 1 -2.6 0a1.65 1.65 0 0 0 -2.6 0a1.78 1.78 0 0 1 -3.1 -1.4v-14a2 2 0 0 1 2 -2h7l5 5v4.25"},child:[]}]})(e)}function rE(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.916 11.707a3 3 0 1 0 -2.916 2.293"},child:[]},{tag:"path",attr:{d:"M11.991 21.485a1.994 1.994 0 0 1 -1.404 -.585l-4.244 -4.243a8 8 0 1 1 13.651 -5.351"},child:[]},{tag:"path",attr:{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M20.2 20.2l1.8 1.8"},child:[]}]})(e)}function nE(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M10 20h-6"},child:[]},{tag:"path",attr:{d:"M14 20h6"},child:[]},{tag:"path",attr:{d:"M12 15l-2 -2h-3a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-3l-2 2z"},child:[]},{tag:"path",attr:{d:"M12 6v2"},child:[]},{tag:"path",attr:{d:"M12 11v.01"},child:[]}]})(e)}const Uf=({invoices:e,onInvoiceClick:t,wrapperClassName:r})=>o.jsx("div",{className:I("w-full mx-auto",r),children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(tE,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-lg font-bold",children:"Facturas"})]})}),o.jsx("div",{className:"p-2 md:p-4 space-y-4",children:e.map(n=>o.jsx($f,{invoice:n,onClick:()=>t?.(n)},n.invoiceID))})]})}),sE={category:null,weight:null,height:null,width:null,length:null,quantity:1},iE=({serviceId:e,categoryTypeId:t,formik:r,warningSchema:n})=>{const{values:s,touched:i,errors:a,handleChange:l,handleBlur:u,handleSubmit:d,setFieldValue:f}=r,[h,p]=c.useState(null),[v,g]=c.useState(null),[b,y]=c.useState([]),[w,E]=c.useState(""),[O,k]=c.useState({}),m=c.useMemo(()=>a,[a]);return c.useEffect(()=>{(async()=>{const L=await zd(t);L.error||!L.data||(y(L.data.map(T=>({id:T.categoryId.toString(),label:T.categoryName,value:T}))),g(L.data.find(T=>Fm.includes(T.categoryId))??null),p(L.data.find(T=>Im.includes(T.categoryId))??null))})()},[t]),c.useEffect(()=>{h&&(e===Wt.DOCUMENT||e===Wt.INTERNATIONAL_DOCUMENT)?(E(h.categoryName),f("category",{id:h.categoryId.toString(),label:h.categoryName,value:h}),f("height",Ri.HEIGHT),f("width",Ri.WIDTH),f("length",Ri.LENGTH)):(E(""),f("category",null),f("height",""),f("width",""),f("length",""))},[e,h,f]),c.useEffect(()=>{(async(L,T)=>{try{return await L.validate(T,{abortEarly:!1}),{}}catch(C){if(C instanceof Je){const D={};return C.inner.forEach(P=>{P.path&&(D[P.path]=P.message)}),D}return{}}})(n,s).then(L=>{k(L)})},[s,n]),o.jsx("div",{className:"w-full max-w-2xl",children:o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"space-y-2",children:o.jsx(yt,{label:"Categoría",id:"category",name:"category",placeholder:"Seleccione una categoría",options:b,selected:s.category,searchText:w,disabled:e===Wt.DOCUMENT,error:i.category&&a.category,onSelectOption:x=>f("category",x),onBlur:u,setSearchText:E,footerOption:v?{label:v.categoryName,id:v.categoryId.toString(),value:v}:void 0})}),o.jsxs("div",{className:I("space-y-2",{hidden:e===Wt.DOCUMENT}),children:[o.jsx("h4",{className:"text-gray-700 dark:text-white",children:"Dimensiones en cm."}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[o.jsx("div",{className:"space-y-2",children:o.jsx(Xe,{label:"Altura",id:"height",name:"height",type:"number",step:"0.01",placeholder:"0.00",value:s.height??"",onChange:l,onBlur:u,error:i.height&&a.height})}),o.jsx("div",{className:"space-y-2",children:o.jsx(Xe,{label:"Ancho",id:"width",name:"width",type:"number",step:"0.01",placeholder:"0.00",value:s.width??"",onChange:l,onBlur:u,error:i.width&&a.width})}),o.jsx("div",{className:"space-y-2",children:o.jsx(Xe,{label:"Largo",id:"length",name:"length",type:"number",step:"0.01",placeholder:"0.00",value:s.length??"",onChange:l,onBlur:u,error:i.length&&a.length})})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsx("div",{className:"space-y-2",children:o.jsx(Xe,{label:"Peso (kg)",id:"weight",name:"weight",type:"number",step:"0.01",placeholder:"0.00",value:s.weight??"",onChange:l,onBlur:u,error:i.weight&&a.weight})}),o.jsx("div",{className:"space-y-2",children:o.jsx(Fu,{label:"Cantidad",id:"quantity",name:"quantity",min:"1",value:s.quantity,disabled:e===Wt.DOCUMENT,onChange:l,onBlur:u,error:i.quantity&&a.quantity})})]}),o.jsxs("div",{className:"flex flex-col gap-2",children:[O.totalWeightWarn&&o.jsx(Pu,{description:O.totalWeightWarn}),m.totalWeightError&&o.jsx(Rn,{description:m.totalWeightError}),m.minVolumeError&&o.jsx(Rn,{description:m.minVolumeError}),m.maxVolumeError&&o.jsx(Rn,{description:m.maxVolumeError}),m.densityError&&o.jsx(Rn,{description:m.densityError})]}),o.jsx(dt,{type:"submit",className:"w-full",onClick:()=>d(),children:"+ Agregar"})]})})},aE=({serviceId:e,categoryTypeId:t,totalWeight:r,validationConfig:n,onSubmit:s})=>{const i=c.useMemo(()=>{const{minWeight:l=0,minVolume:u,maxVolume:d,minDensity:f,maxDensity:h,maxDocumentWeight:p=1/0,maxTotalWeight:v=1/0}=n??{};let{maxWeight:g=1/0}=n??{};return(e===Wt.DOCUMENT||e===Wt.INTERNATIONAL_DOCUMENT)&&(g=p),gr({category:pr().nullable().required("La categoría es requerida"),weight:St().typeError("Debe ser un número").required("El peso es requerido").test({name:"min-weight",exclusive:!1,test:b=>b==null||b>=l,message:`El peso mínimo es ${l.toFixed(2)}kg`}).test({name:"max-weight",exclusive:!1,test:b=>b==null||b<=g,message:`El peso máximo es ${g.toFixed(2)}kg`}),height:St().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("La altura es requerida"),width:St().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El ancho es requerido"),length:St().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El largo es requerido"),quantity:St().typeError("Debe ser un número").integer("Debe ser un número entero").min(1,"Debe ser al menos 1").required("La cantidad es requerida")}).test({name:"total-weight-check-global",test:function(b){const{weight:y,quantity:w}=b;if(y===null||r===void 0)return!0;const E=y*w,O=r+E;return v!==void 0&&O>v?this.createError({path:"totalWeightError",message:`El peso total (${O.toFixed(2)}kg) excede el máximo (${v.toFixed(2)}kg)`}):!0}}).test({name:"volume-check",test:function(b){const{height:y,width:w,length:E}=b;if(y===null||w===null||E===null)return!0;const O=y*w*E;return u!==void 0&&O<u?this.createError({path:"minVolumeError",message:`El volumen (${O.toFixed(2)}cm³) es menor al mínimo (${u.toFixed(2)}cm³)`}):d!==void 0&&O>d?this.createError({path:"maxVolumeError",message:`El volumen (${O.toFixed(2)}cm³) es mayor al máximo (${d.toFixed(2)}cm³)`}):!0}}).test({name:"density-check",test:function(b){const{height:y,width:w,length:E,weight:O}=b;if(y===null||w===null||E===null||O===null)return!0;const k=y*w*E;if(k===0)return!0;const m=O/k;return f!==void 0&&m<f||h!==void 0&&m>h?this.createError({path:"densityError",message:"Las medidas son inválidas, por favor revíselas y corríjalas"}):!0}})},[n,r,e]),a=c.useMemo(()=>{const{maxTotalWeightWarn:l=1/0}=n??{};return gr({category:pr().nullable().required(),weight:St().required(),height:St().required(),width:St().required(),length:St().required(),quantity:St().required()}).test({name:"total-weight-check-global-warn",test:function(u){const{weight:d,quantity:f}=u;if(!d||!f||r===void 0)return!0;const h=d*f,p=r+h;return l!==void 0&&p>l?this.createError({path:"totalWeightWarn",message:`El peso total (${p.toFixed(2)}kg) excede el recomendado (${l.toFixed(2)}kg)`}):!0}})},[n,r]);return o.jsx(es,{initialValues:sE,validationSchema:i,onSubmit:s,children:l=>o.jsx(iE,{serviceId:e,categoryTypeId:t,formik:l,warningSchema:a})})},zf=({parcel:e,index:t,checked:r,editable:n,editing:s,disabledActions:i,onChangeChecked:a,onPrintParcel:l,onDuplicate:u,onEdit:d})=>o.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",s&&"border-2 border-indigo-600 dark:border-indigo-400",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[o.jsxs("td",{className:"text-muted-foreground px-3 sm:px-4 font-bold",children:[n&&o.jsx(ei,{label:"",id:`parcel-${e.pieceNumber}-checkbox`,checked:r,disabled:i,onChangeChecked:a}),!n&&e.pieceNumber]}),o.jsxs("td",{className:"sm:hidden px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[o.jsxs("p",{children:[e.weight.toFixed(2)," kg"]}),o.jsxs("p",{children:[e.length,"x",e.width,"x",e.height," cm"]}),o.jsx("p",{className:"font-normal",children:e.contentDescription})]}),o.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.weight.toFixed(2)," kg"]}),o.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.length,"x",e.width,"x",e.height," cm"]}),o.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.contentDescription}),o.jsxs("td",{className:"text-right px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[n&&!i&&o.jsxs("div",{className:"flex gap-2 items-cetner justify-end",children:[o.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:u,children:o.jsx(Hb,{className:"h-4 w-4"})}),o.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:d,children:o.jsx(Vd,{className:"h-4 w-4"})})]}),!n&&!i&&o.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-8 w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Imprimir",onClick:l,children:o.jsx(Kb,{className:"h-4 w-4"})}),s&&o.jsx("span",{className:"italic",children:"Editando"})]})]}),Bf=({parcels:e,totalPhysicalWeight:t,totalDimensionalWeight:r,totalChargedWeight:n,totalVolume:s,dimensionalFactor:i,editingParcel:a,editable:l,onPrintParcel:u,onDelete:d,onDuplicate:f,onSelectEdit:h,onCancelEdit:p,onPrintShipment:v,wrapperClassName:g})=>{const[b,y]=c.useState([]),w=c.useMemo(()=>b.every(k=>k),[b]),E=(k,m)=>{y(x=>[...x.slice(0,m),k,...x.slice(m+1)])},O=()=>{y(w?Array.from({length:e.length},()=>!1):Array.from({length:e.length},()=>!0))};return c.useEffect(()=>{y(Array.from({length:e.length},()=>!1))},[e.length,a]),o.jsx("div",{className:I("w-full mx-auto",g),children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(gn,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-xl font-bold",children:"Piezas"})]})}),o.jsxs("div",{className:"p-4",children:[o.jsxs(ri,{children:[o.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:o.jsxs("tr",{className:"border-b-2",children:[o.jsxs("th",{className:"w-16 font-bold text-xs uppercase tracking-wider text-left px-3 sm:px-4 py-2",children:[l&&o.jsx(ei,{label:"",id:"parcel-table-all-checked-checkbox",checked:w,disabled:!!a,onChangeChecked:O}),!l&&"#"]}),o.jsx("th",{className:"sm:hidden text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(lm,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Pieza"})]})}),o.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(e2,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Peso"})]})}),o.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Jb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Dimensiones"})]})}),o.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uu,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Categoría"})]})}),o.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:o.jsxs("div",{className:"flex items-center w-full justify-end gap-2",children:[o.jsx(qb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{className:"hidden sm:inline-block",children:"Acciones"})]})})]})}),o.jsx("tbody",{children:e.map((k,m)=>o.jsx(zf,{parcel:k,index:m,editing:a?.pieceNumber===k.pieceNumber,checked:b[m],disabledActions:!!a,onChangeChecked:x=>E(x,m),onPrintParcel:()=>u?.(k),onDuplicate:()=>f?.(k),onEdit:()=>h?.(k),editable:l},k.pieceNumber))})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between text-xs mt-4",children:[o.jsxs("div",{className:"flex flex-col sm:block w-full sm:w-fit justify-center items-center",children:[!l&&v&&o.jsxs(dt,{className:"w-full md:w-36",onClick:v,children:[o.jsx(mm,{className:"w-4 h-4 inline mr-2"}),"Imprimir Guía"]}),l&&!a&&o.jsxs(Yn,{className:"!w-full my-2 sm:my-0",disabled:b.every(k=>!k),onClick:()=>d?.(e.filter((k,m)=>b[m])),children:[o.jsx(Kg,{className:"mr-2 w-4 h-4"}),"Eliminar"]}),!!a&&o.jsxs(Yn,{onClick:p,children:[o.jsx(fu,{className:"mr-2 w-5 h-5"}),"Cancelar Edición"]})]}),o.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[o.jsxs("div",{className:"flex items-center justify-between gap-12",children:[o.jsx("span",{className:"text-muted-foreground font-semibold",children:"Peso por facturar"}),o.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:[n.toFixed(2)," kg"]})]}),o.jsx(fn,{}),o.jsxs("div",{className:"flex items-center justify-between gap-12",children:[o.jsx("span",{className:"text-muted-foreground",children:"Peso físico"}),o.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[t.toFixed(2)," kg"]})]}),o.jsxs("div",{className:"flex items-center justify-between gap-12",children:[o.jsx("span",{className:"text-muted-foreground",children:"Peso volumétrico"}),o.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[r.toFixed(2)," kg"]})]}),o.jsxs("div",{className:"flex items-center justify-between gap-12",children:[o.jsx("span",{className:"text-muted-foreground",children:"Volumen"}),o.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[s.toFixed(2)," cm",o.jsx("sup",{children:"3"})]})]}),o.jsxs("div",{className:"flex items-center justify-between gap-12",children:[o.jsx("span",{className:"text-muted-foreground",children:"Factor volumétrico"}),o.jsx("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:i.toFixed(2)})]})]})]})]})]})})},ba=({isShipper:e=!1,account:t,store:r,deliveryType:n,isAccountBillTo:s,address:i})=>{const a=c.useMemo(()=>n===He.HOME&&e?"Recolecta":n===He.HOME&&!e?"A Domicilio":"En Tienda",[e,n]);return o.jsxs("div",{children:[o.jsxs("div",{className:"mb-2 flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-600/10 dark:bg-indigo-900 p-2",children:o.jsx(Ru,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-300"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e?"Remitente":"Destinatario"}),s&&o.jsx(dn,{color:"primary",children:"Cuenta a facturar"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{children:o.jsx("p",{className:"text-lg font-bold text-div-foreground text-gray-900 dark:text-gray-200",children:t.fullName})}),o.jsx(fn,{className:"my-2"}),o.jsxs("div",{className:"space-y-1.5 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[o.jsx(Yb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsxs("span",{className:"font-mono",children:[t.taxIdentificationType,"-",t.identificationNumber]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[o.jsx(tp,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:t.email})]}),o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[o.jsx(Zb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:t.phone})]}),o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[o.jsx(du,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:a})]}),o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[o.jsx(Xb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsxs("span",{children:[r.code," - ",r.commercialName]})]}),i&&n===He.HOME&&o.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[o.jsx(Gb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:i.addressLine1})]})]})]})]})},Vf=({shipment:e,wrapperClassName:t})=>{const r=c.useMemo(()=>{const n={lat:e.originAddress.latitude,lng:e.originAddress.longitude,name:`Origen (${e.pickupType.deliveryTypeID===He.OFFICE?"En Tienda":"Recolecta"})`},s={lat:e.destinationAddress.latitude,lng:e.destinationAddress.longitude,name:`Destino (${e.deliveryType.deliveryTypeID===He.OFFICE?"En Tienda":"A Domicilio"})`};return[n,s]},[e]);return o.jsx("div",{className:I("w-full mx-auto",t),children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg w-full h-full flex flex-col",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(Mu,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-xl font-bold",children:"Ruta"})]})}),o.jsxs("div",{className:"flex flex-col p-4 w-full h-full flex-1 gap-2",children:[o.jsx("div",{className:"w-full h-full",children:o.jsx(Tu,{coordinates:r})}),o.jsxs("p",{className:"text-xs text-gray-800 dark:text-gray-300",children:["Ubicación actual:"," ",o.jsxs("span",{className:"font-semibold",children:[e.lastKnowStoreLocation.code," -"," ",e.lastKnowStoreLocation.commercialName]})]}),o.jsx("div",{className:"flex items-center justify-center w-full text-center",children:o.jsx(Ye,{children:"Agregar recargo por entrega a domicilio"})})]})]})})},Yf=[{id:He.OFFICE.toString(),label:"Tienda",value:{deliveryTypeID:He.OFFICE,deliveryTypeName:"Tienda"}},{id:He.HOME.toString(),label:"A Domicilio",value:{deliveryTypeID:He.HOME,deliveryTypeName:"A Domicilio"}}],oE=[...Yf,{id:He.INTERNATIONAL.toString(),label:"Internacional",value:{deliveryTypeID:He.INTERNATIONAL,deliveryTypeName:"Internacional"}}],Wf=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,{store:a}=c.useContext(_a),l=d=>{i("pickupType",d),d.value.deliveryTypeID===He.OFFICE?(i("originStore",a),i("originAddress",a?.address??null)):(i("originStore",null),i("originAddress",null))},u=d=>{i("deliveryType",d),i("destinationStore",null),i("destinationAddress",null)};return o.jsx("div",{className:"w-full mx-auto",children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(rE,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-lg font-bold",children:"Direcciones"})]})}),o.jsxs("div",{className:"flex flex-col w-full gap-4 p-4",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[o.jsxs("p",{children:["Origen ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("div",{className:"mb-1",children:o.jsx(Hs,{id:"pickupType",name:"pickupType",label:"",options:Yf,selected:t.pickupType,onSelectOption:l,onBlur:s,wrapperClassName:"flex-row"})})]}),o.jsx("div",{className:"w-full",children:t.pickupType?.value.deliveryTypeID===He.OFFICE&&o.jsx(yt,{disabled:!0,label:"",id:"originStore",name:"originStore",placeholder:"Seleccione una tienda",options:[],selected:t.originStore,searchText:t.originStore?.value.commercialName,error:r.originStore&&n.originStore,onSelectOption:()=>{},onBlur:s})})]}),o.jsx("div",{className:"flex-1",children:o.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[o.jsxs("p",{children:["Destino ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("div",{className:"mb-1",children:o.jsx(Hs,{id:"deliveryType",name:"deliveryType",label:"",options:oE,selected:t.deliveryType,onSelectOption:u,onBlur:s,wrapperClassName:"flex-row"})})]})})]})]})})},Hf=({user:e,date:t,observation:r,wrapperClassName:n})=>o.jsxs("div",{className:I("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",n),children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:o.jsx(rp,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-lg font-bold",children:"Entrega"})]}),o.jsxs("div",{className:"space-y-0.5",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Usuario: "}),o.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Fecha: "}),o.jsx("span",{className:"text-sm text-muted-foreground",children:$(t).format("DD/MM/YYYY, hh:mm A")})]}),o.jsxs("div",{children:[o.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Observaciones:"," "]}),o.jsx("span",{className:"text-sm text-muted-foreground",children:r||"—"})]})]})]}),lE=e=>{switch(e){case Nr.ACTIVE:return"primary";case Nr.ANNULLED:return"danger";case Nr.DELIVERED:return"success";case Nr.DRAFT:return"warning";case Nr.REPLACED:default:return"default"}},Gf=({shipment:e,onSubstituteForClick:t,onSubstitutedByClick:r})=>o.jsx("div",{className:"bg-gradient-subtle",children:o.jsxs("div",{className:"mx-auto max-w-6xl",children:[o.jsx("div",{className:"mb-6 overflow-hidden border-none shadow-lg",children:o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:o.jsxs("div",{className:"flex relative items-start justify-between",children:[o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:o.jsx(gn,{className:"h-8 w-8"})}),o.jsxs("div",{children:[o.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),o.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.shipmentNumber}),o.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",$(e.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]}),o.jsxs("p",{className:I("text-sm",!e.substituteFor&&"hidden"),children:["Sustituto de:"," ",o.jsx(Ye,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:t,children:e.substituteFor})]}),o.jsxs("p",{className:I("text-sm",!e.substitutedBy&&"hidden"),children:["Sustituido por:"," ",o.jsx(Ye,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:r,children:e.substitutedBy})]})]})]}),o.jsx(dn,{color:lE(e.status.id),className:"!text-base absolute top-0 right-0",children:e.status.name})]})})}),o.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[o.jsx("div",{className:"lg:col-span-2",children:o.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[o.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:o.jsx(ba,{isShipper:!0,account:e.shipper,store:e.originStore,deliveryType:e.pickupType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.shipper.id,address:e.originAddress})}),o.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:o.jsx(ba,{account:e.consignee,store:e.destinationStore,deliveryType:e.deliveryType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.consignee.id,address:e.destinationAddress})})]})}),o.jsx("div",{className:"lg:col-span-1",children:o.jsxs("div",{className:"sticky top-8 border-none shadow-lg bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-400 rounded-b-lg",children:[o.jsx("div",{className:"bg-indigo-600 text-gray-100 dark:bg-indigo-700 p-4",children:o.jsxs("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[o.jsx(gn,{className:"h-5 w-5"}),"Resumen"]})}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"gap-2 mb-2",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Servicio"}),o.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.service.serviceShortName})]}),o.jsxs("div",{className:"gap-2 mb-2",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Modalidad de Pago"}),o.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.paymentMode.paymentModeName})]}),e.paymentMode.paymentModeID===ho.CREDIT&&o.jsxs("div",{className:"gap-2",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"Crédito de"}),o.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.billTo.fullName})]}),o.jsx(fn,{className:"my-4"}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:"Con impuestos"}),o.jsxs("span",{className:"text-lg font-bold text-indigo-600 dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:"Nº de piezas"}),o.jsx("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.totalPieces})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:"Peso por facturar"}),o.jsxs("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:[e.totalChargedWeight.toFixed(2)," Kg"]})]})]})]})]})})]})]})}),qf=({item:e,index:t})=>o.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[o.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:[o.jsx("p",{children:e.itemDescription}),o.jsx("p",{className:"sm:hidden font-normal",children:e.itemDetails})]}),o.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.itemDetails}),o.jsxs("td",{className:"px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold text-right text-sm",children:[e.subTotalAmount<0&&"-","$",Math.abs(e.subTotalAmount).toFixed(2)]})]}),Zf=({items:e,subTotalAmount:t,vatAmount:r,postalTaxAmount:n,totalAmount:s,wrapperClassName:i})=>o.jsx("div",{className:I("w-full mx-auto",i),children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(hm,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-xl font-bold",children:"Items"})]})}),o.jsxs("div",{className:"p-4",children:[o.jsxs(ri,{children:[o.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:o.jsxs("tr",{className:"border-b-2",children:[o.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uu,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Servicio"})]})}),o.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(fm,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Detalles"})]})}),o.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Wb,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Costo"})]})})]})}),o.jsx("tbody",{children:e.map((a,l)=>o.jsx(qf,{item:a,index:l},a.itemID))})]}),o.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-end text-sm mt-4",children:o.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[o.jsxs("div",{className:"flex items-center justify-between gap-16",children:[o.jsx("span",{className:"text-muted-foreground font-semibold uppercase",children:"Subtotal"}),o.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",t.toFixed(2)]})]}),o.jsx(fn,{}),o.jsxs("div",{className:"flex items-center justify-between gap-16",children:[o.jsx("span",{className:"text-muted-foreground",children:"IVA (16%)"}),o.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",r.toFixed(2)]})]}),o.jsxs("div",{className:"flex items-center justify-between gap-16",children:[o.jsx("span",{className:"text-muted-foreground",children:"Franqueo Postal"}),o.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",n.toFixed(2)]})]}),o.jsx(fn,{}),o.jsxs("div",{className:"flex items-center justify-between gap-16",children:[o.jsx("span",{className:"font-bold text-muted-foreground uppercase",children:"Total"}),o.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",s.toFixed(2)]})]})]})})]})]})}),Kf=({tracking:e,index:t})=>o.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[o.jsx("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:$(e.date).format("DD/MM/YYYY, hh:mm A")}),o.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[o.jsx("p",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:e.description}),o.jsx("p",{className:"font-normal",children:e.details})]})]}),Jf=({trackings:e,onPublicAppClick:t,wrapperClassName:r})=>o.jsx("div",{className:I("w-full mx-auto",r),children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(du,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-xl font-bold",children:"Tracking"})]})}),o.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[o.jsx("p",{className:I(!t&&"hidden"),children:o.jsx(Ye,{onClick:t,children:"Ver guía en Tealca Consultas"})}),o.jsxs(ri,{children:[o.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:o.jsxs("tr",{className:"border-b-2",children:[o.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Au,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Fecha"})]})}),o.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(nE,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),o.jsx("span",{children:"Evento"})]})})]})}),o.jsx("tbody",{children:e.map((n,s)=>o.jsx(Kf,{tracking:n,index:s},n.trackingID))})]})]})]})}),Xf=({showPOD:e,showInvoice:t,isPhysicalLiability:r,isPhysicalPOD:n,invoiceNumber:s,onShowLiabilityWaiver:i,onDownloadLiabilityWaiver:a,onShowPOD:l,onDownloadPOD:u,onShowInvoiceAttachments:d,wrapperClassName:f})=>o.jsxs("div",{className:I("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",f),children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:o.jsx(tm,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-lg font-bold",children:"Documentos Digitales"})]}),o.jsxs("div",{className:"space-y-0.5",children:[o.jsxs("div",{children:[o.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Declaración Jurada:"," "]}),o.jsx("span",{className:I("ml-3 text-sm text-muted-foreground",!r&&"hidden"),children:"Llenada en el documento físico"}),o.jsx("p",{className:"ml-4",children:o.jsx(Ye,{onClick:i,className:I("text-sm text-muted-foreground",r&&"hidden"),children:"Ver Declaración Jurada"})}),o.jsx("p",{className:"ml-4",children:o.jsx(Ye,{onClick:a,className:I("text-sm text-muted-foreground",r&&"hidden"),children:"Descargar Declaración Jurada"})})]}),o.jsxs("div",{className:I(!e&&"hidden"),children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"POD: "}),o.jsx("span",{className:I("ml-3 text-sm text-muted-foreground",!n&&"hidden"),children:"Llenada en el documento físico"}),o.jsx("p",{className:"ml-4",children:o.jsx(Ye,{onClick:l,className:I("text-sm text-muted-foreground",n&&"hidden"),children:"Ver POD"})}),o.jsx("p",{className:"ml-4",children:o.jsx(Ye,{onClick:u,className:I("text-sm text-muted-foreground",n&&"hidden"),children:"Descargar POD"})})]}),o.jsxs("div",{className:I(!t&&"hidden"),children:[o.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Factura de la mercancia:"," "]}),o.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:o.jsx("span",{children:s})}),o.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:o.jsx(Ye,{onClick:d,children:"Ver Adjuntos"})})]})]})]}),cE=({shipment:e,trackings:t,showLiabilityWaiver:r,showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:l,onSubstituteForClick:u,onSubstitutedByClick:d,onInvoiceClick:f,onPublicAppClick:h,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:v,onShowPOD:g,onDownloadPOD:b,onShowInvoiceAttachments:y,onPrintParcel:w,onPrintShipment:E,onEdit:O,onCancel:k,onDeliver:m})=>{const[x,L]=c.useState(!1);return o.jsxs("div",{className:"flex flex-col gap-8",children:[o.jsx(Gf,{shipment:e,onSubstituteForClick:u,onSubstitutedByClick:d}),o.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 shadow-sm overflow-hidden",children:[o.jsxs("div",{className:"w-full flex items-center justify-between p-5 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 text-xl font-bold text-gray-800 dark:text-gray-200",onClick:()=>L(!x),children:[o.jsx("span",{children:"Detalles"}),o.jsx(Ma,{className:I("ml-2 transition-transform duration-1000 text-gray-500 dark:text-gray-300",x?"rotate-180":"rotate-0"),"aria-label":x?"Colapsar":"Expandir"})]}),o.jsx(ou,{active:x,duration:1e3,children:o.jsxs("div",{className:"flex flex-col p-2 md:p-4 lg:p-6 gap-14 pb-16",children:[e.invoices.length>0&&o.jsx(Uf,{invoices:e.invoices,onInvoiceClick:f}),e.parcels.length>0&&o.jsx(Bf,{parcels:e.parcels,totalPhysicalWeight:e.totalPhysicalWeight,totalDimensionalWeight:e.totalDimensionalWeight,totalChargedWeight:e.totalChargedWeight,totalVolume:e.totalVolume,dimensionalFactor:e.dimensionalFactor,onPrintParcel:w,onPrintShipment:E}),e.items.length>0&&o.jsx(Zf,{items:e.items,subTotalAmount:e.subTotalAmount,vatAmount:e.vatAmount,postalTaxAmount:e.postalTaxAmount,totalAmount:e.totalAmount}),t.length>0&&o.jsx(Jf,{trackings:t,onPublicAppClick:h}),o.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.deliveryDate&&e.deliveryUser&&o.jsx(Hf,{user:e.deliveryUser,date:e.deliveryDate,observation:e.deliveryObservation}),r&&o.jsx(Xf,{showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:l,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:v,onShowPOD:g,onDownloadPOD:b,onShowInvoiceAttachments:y})]}),o.jsx(Vf,{shipment:e,wrapperClassName:"h-[30rem]"})]})})]}),o.jsx("div",{className:"mt-2 md:mt-6 w-full flex flex-col gap-4 md:gap-0",children:o.jsxs("div",{className:"w-full flex flex-col-reverse md:flex-row justify-between items-center gap-4",children:[o.jsx("div",{className:"flex flex-col-reverse md:flex-row gap-4 items-center w-full",children:k&&o.jsxs(Ye,{onClick:k,children:[o.jsx(fu,{className:"w-5 h-5 inline mr-1 mb-0.5"}),"Anular"]})}),o.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center w-full md:w-fit",children:[O&&o.jsxs(dt,{className:"w-full md:w-36",onClick:O,children:[o.jsx(Vd,{className:"w-4 h-4 inline mr-2"}),"Editar"]}),m&&o.jsxs(dt,{className:"w-full md:w-36",onClick:m,children:[o.jsx(wm,{className:"w-4 h-4 inline mr-2"}),"Entregar"]})]})]})})]})},Hc={id:"",label:"Crear nuevo",value:null},uE=[{id:dr.PERSON.toString(),label:"Persona",value:dr.PERSON},{id:dr.BOX_ACCOUNT.toString(),label:"Casillero",value:dr.BOX_ACCOUNT}],Qf=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,[a,l]=c.useState(!1),[u,d]=c.useState(!1),[f,h]=c.useState(""),[p,v]=c.useState(""),g=w=>{if(w.value===null){l(!0);return}i("shipper",w),i("consigneeType",{id:dr.PERSON.toString(),label:"Persona",value:dr.PERSON}),i("consignee",null)},b=w=>{i("consigneeType",w),i("consignee",null)},y=w=>{if(w.value===null){d(!0);return}i("consignee",w)};return o.jsx("div",{className:"w-full mx-auto",children:o.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:o.jsx(Qb,{className:"w-5 h-5"})}),o.jsx("h1",{className:"text-lg font-bold",children:"Partes Involucradas"})]})}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4 p-4 md:h-28",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx(yt,{required:!0,label:"Remitente",id:"shipper",name:"shipper",placeholder:"Seleccione un remitente",options:[],selected:t.shipper,searchText:f,error:r.shipper&&n.shipper,onSelectOption:g,onBlur:s,setSearchText:h,footerOption:Hc}),o.jsxs(Ws,{open:a,onClose:()=>l(!1),children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),o.jsx(fa,{onSubmit:()=>{},onCancel:w=>{l(!1),w.resetForm()}})]})]}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[o.jsxs("p",{children:["Destinatario ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("div",{className:"mb-1",children:o.jsx(Hs,{id:"consigneeType",name:"consigneeType",label:"",options:uE,selected:t.consigneeType,disabled:!t.shipper,onSelectOption:b,onBlur:s,wrapperClassName:"flex-row"})})]}),o.jsx("div",{className:"w-full",children:o.jsx(yt,{label:"",id:"consignee",name:"consignee",placeholder:"Seleccione un destinatario",options:[],selected:t.consignee,disabled:!t.shipper,searchText:p,error:r.consignee&&n.consignee,onSelectOption:y,onBlur:s,setSearchText:v,footerOption:Hc})}),o.jsxs(Ws,{open:u,onClose:()=>d(!1),children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),o.jsx(fa,{onSubmit:()=>{},onCancel:w=>{d(!1),w.resetForm()}})]})]})]})]})})},dE=({formik:e})=>o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(Qf,{formik:e}),o.jsx(Wf,{formik:e})]}),fE=({index:e,shipment:t})=>o.jsxs("div",{className:"flex flex-col gap-8 w-full",children:[o.jsx("div",{className:"overflow-hidden border-none shadow-lg",children:o.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:o.jsx("div",{className:"flex relative items-start justify-between",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:o.jsx(gn,{className:"h-8 w-8"})}),t&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),o.jsxs("h1",{className:"text-3xl font-bold tracking-tight",children:[t.shipmentNumber," ",o.jsx("span",{className:"font-normal italic",children:"(Edición)"})]}),o.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",$(t.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]})]}),o.jsx(dn,{color:"default",className:"!text-base absolute top-0 right-0",children:t.status.name})]}),!t&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Guía Número"}),o.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.toString().padStart(3,"0")})]}),o.jsx(dn,{color:"primary",className:"!text-base absolute top-0 right-0",children:"Nueva Guía"})]})]})})})}),o.jsx(es,{initialValues:Ff,onSubmit:()=>{},children:r=>o.jsx(dE,{formik:r})})]}),hE=({children:e,applicationId:t})=>{const[r,n]=c.useState(null);return c.useEffect(()=>{(async()=>{const i=await Fd(t);if(i.error||!i.data){console.error(i.message);return}n(i.data)})()},[t]),o.jsx(ni.Provider,{value:r,children:e})};exports.AccountForm=fa;exports.AnimatedCollapse=ou;exports.AppContext=ni;exports.AppProvider=hE;exports.AuthContext=_a;exports.Badge=dn;exports.Button=Ea;exports.CategoryTypeID=If;exports.Checkbox=ei;exports.ConsigneeType=dr;exports.DeliveryTypeID=He;exports.ErrorCard=Rn;exports.ForgotPassword=Ub;exports.GoogleMap=Tu;exports.InputCheckboxSelect=Lm;exports.InputDate=Cm;exports.InputFile=Om;exports.InputFileDrop=jm;exports.InputGoogleMap=Iu;exports.InputInteger=Fu;exports.InputLocationSelect=Dm;exports.InputRadioSelect=Hs;exports.InputSelect=yt;exports.InputSelectGrouped=Am;exports.InputText=Xe;exports.InputTextArea=Rm;exports.InvoiceStatus=Rf;exports.InvoiceSummary=$f;exports.InvoiceSummaryList=Uf;exports.InvoiceType=zn;exports.Link=Ye;exports.LoadingSpinner=ti;exports.Login=Bb;exports.Modal=Ws;exports.ParcelForm=aE;exports.ParcelRow=zf;exports.ParcelTable=Bf;exports.PaymentModeID=ho;exports.Popover=Nu;exports.PopoverMenu=Qg;exports.PrimaryButton=dt;exports.SecondaryButton=Yn;exports.Separator=fn;exports.ServiceID=Wt;exports.ShipmentAccountSummary=ba;exports.ShipmentAddresses=Vf;exports.ShipmentAddressesForm=Wf;exports.ShipmentDeliveryData=Hf;exports.ShipmentDetails=cE;exports.ShipmentDocument=Xf;exports.ShipmentForm=fE;exports.ShipmentItemRow=qf;exports.ShipmentItemTable=Zf;exports.ShipmentPartiesForm=Qf;exports.ShipmentStatusID=Nr;exports.ShipmentSummary=Gf;exports.SideMenu=Em;exports.Switch=em;exports.Table=ri;exports.TrackingRow=Kf;exports.TrackingTable=Jf;exports.WarningCard=Pu;exports.getApplication=Fd;exports.getCategories=zd;exports.getCountries=Ud;exports.getTaxIdentificationTypes=$d;exports.shipmentInitialValues=Ff;