@arkyn/components 1.3.108 → 1.3.110
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +12318 -4286
- package/dist/bundle.umd.cjs +38 -23
- package/dist/components/GoogleSearchPlaces/index.js +1 -1
- package/dist/components/RichText/components/BlockButton/intex.d.ts +10 -0
- package/dist/components/RichText/components/BlockButton/intex.d.ts.map +1 -0
- package/dist/components/RichText/components/BlockButton/intex.js +18 -0
- package/dist/components/RichText/components/Element/index.d.ts +5 -0
- package/dist/components/RichText/components/Element/index.d.ts.map +1 -0
- package/dist/components/RichText/components/Element/index.js +22 -0
- package/dist/components/RichText/components/Leaf/index.d.ts +3 -0
- package/dist/components/RichText/components/Leaf/index.d.ts.map +1 -0
- package/dist/components/RichText/components/Leaf/index.js +14 -0
- package/dist/components/RichText/components/MarkButton/index.d.ts +10 -0
- package/dist/components/RichText/components/MarkButton/index.d.ts.map +1 -0
- package/dist/components/RichText/components/MarkButton/index.js +16 -0
- package/dist/components/RichText/components/Toolbar/index.d.ts +8 -0
- package/dist/components/RichText/components/Toolbar/index.d.ts.map +1 -0
- package/dist/components/RichText/components/Toolbar/index.js +6 -0
- package/dist/components/RichText/functions/serialize.d.ts +3 -0
- package/dist/components/RichText/functions/serialize.d.ts.map +1 -0
- package/dist/components/RichText/functions/serialize.js +48 -0
- package/dist/components/RichText/functions/toggleBlock.d.ts +5 -0
- package/dist/components/RichText/functions/toggleBlock.d.ts.map +1 -0
- package/dist/components/RichText/functions/toggleBlock.js +33 -0
- package/dist/components/RichText/functions/toggleMark.d.ts +5 -0
- package/dist/components/RichText/functions/toggleMark.d.ts.map +1 -0
- package/dist/components/RichText/functions/toggleMark.js +10 -0
- package/dist/components/RichText/helpers/isBlockActive.d.ts +5 -0
- package/dist/components/RichText/helpers/isBlockActive.d.ts.map +1 -0
- package/dist/components/RichText/helpers/isBlockActive.js +15 -0
- package/dist/components/RichText/helpers/isMarkActive.d.ts +5 -0
- package/dist/components/RichText/helpers/isMarkActive.d.ts.map +1 -0
- package/dist/components/RichText/helpers/isMarkActive.js +6 -0
- package/dist/components/RichText/index.d.ts +12 -0
- package/dist/components/RichText/index.d.ts.map +1 -0
- package/dist/components/RichText/index.js +46 -0
- package/dist/components/RichText/template/HOTKEYS.d.ts +7 -0
- package/dist/components/RichText/template/HOTKEYS.d.ts.map +1 -0
- package/dist/components/RichText/template/HOTKEYS.js +7 -0
- package/dist/components/RichText/template/INITIAL_VALUE.d.ts +4 -0
- package/dist/components/RichText/template/INITIAL_VALUE.d.ts.map +1 -0
- package/dist/components/RichText/template/INITIAL_VALUE.js +7 -0
- package/dist/components/RichText/template/LIST_TYPES.d.ts +3 -0
- package/dist/components/RichText/template/LIST_TYPES.d.ts.map +1 -0
- package/dist/components/RichText/template/LIST_TYPES.js +2 -0
- package/dist/components/RichText/template/TEXT_ALIGN_TYPES.d.ts +3 -0
- package/dist/components/RichText/template/TEXT_ALIGN_TYPES.d.ts.map +1 -0
- package/dist/components/RichText/template/TEXT_ALIGN_TYPES.js +2 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/style.css +1 -1
- package/package.json +5 -1
- package/src/components/GoogleSearchPlaces/index.tsx +1 -1
- package/src/components/RichText/components/BlockButton/intex.tsx +41 -0
- package/src/components/RichText/components/BlockButton/styles.css +29 -0
- package/src/components/RichText/components/Element/index.tsx +57 -0
- package/src/components/RichText/components/Element/styles.css +23 -0
- package/src/components/RichText/components/Leaf/index.tsx +12 -0
- package/src/components/RichText/components/MarkButton/index.tsx +38 -0
- package/src/components/RichText/components/MarkButton/styles.css +41 -0
- package/src/components/RichText/components/Toolbar/index.tsx +12 -0
- package/src/components/RichText/components/Toolbar/styles.css +14 -0
- package/src/components/RichText/defineType.d.ts +38 -0
- package/src/components/RichText/functions/serialize.ts +54 -0
- package/src/components/RichText/functions/toggleBlock.ts +46 -0
- package/src/components/RichText/functions/toggleMark.ts +13 -0
- package/src/components/RichText/helpers/isBlockActive.ts +27 -0
- package/src/components/RichText/helpers/isMarkActive.ts +9 -0
- package/src/components/RichText/index.tsx +131 -0
- package/src/components/RichText/styles.css +25 -0
- package/src/components/RichText/template/HOTKEYS.ts +14 -0
- package/src/components/RichText/template/INITIAL_VALUE.ts +10 -0
- package/src/components/RichText/template/LIST_TYPES.ts +3 -0
- package/src/components/RichText/template/TEXT_ALIGN_TYPES.ts +3 -0
- package/src/index.ts +3 -2
- package/tsconfig.json +8 -0
package/dist/bundle.umd.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(
|
1
|
+
(function(he,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("lucide-react"),require("react-dom"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-dom","@remix-run/react","@react-input/mask","framer-motion"],l):(he=typeof globalThis<"u"?globalThis:he||self,l(he["@arkyn/components"]={},he.e$2,he.lucideReact,he.ReactDOM,he.react,he.mask,he.framerMotion))})(this,function(he,l,Se,Wt,Dn,Lc,nn){"use strict";function Sc(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ja=Sc(Wt);var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function si(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ui={exports:{}},Tn={};/**
|
2
2
|
* @license React
|
3
3
|
* react-jsx-runtime.production.min.js
|
4
4
|
*
|
@@ -6,7 +6,7 @@
|
|
6
6
|
*
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/var
|
9
|
+
*/var Na;function Ac(){if(Na)return Tn;Na=1;var t=l,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,c){var f,h={},p=null,g=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(g=u.ref);for(f in u)r.call(u,f)&&!a.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:e,type:s,key:p,ref:g,props:h,_owner:i.current}}return Tn.Fragment=n,Tn.jsx=o,Tn.jsxs=o,Tn}var Rn={};/**
|
10
10
|
* @license React
|
11
11
|
* react-jsx-runtime.development.js
|
12
12
|
*
|
@@ -14,22 +14,22 @@
|
|
14
14
|
*
|
15
15
|
* This source code is licensed under the MIT license found in the
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
17
|
-
*/var
|
18
|
-
`+
|
19
|
-
`),
|
20
|
-
`),
|
21
|
-
`+
|
17
|
+
*/var za;function Oc(){return za||(za=1,process.env.NODE_ENV!=="production"&&function(){var t=l,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),C=Symbol.iterator,v="@@iterator";function d(L){if(L===null||typeof L!="object")return null;var te=C&&L[C]||L[v];return typeof te=="function"?te:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function B(L){{for(var te=arguments.length,oe=new Array(te>1?te-1:0),De=1;De<te;De++)oe[De-1]=arguments[De];w("error",L,oe)}}function w(L,te,oe){{var De=D.ReactDebugCurrentFrame,Ie=De.getStackAddendum();Ie!==""&&(te+="%s",oe=oe.concat([Ie]));var _e=oe.map(function(ke){return String(ke)});_e.unshift("Warning: "+te),Function.prototype.apply.call(console[L],console,_e)}}var O=!1,b=!1,E=!1,S=!1,F=!1,V;V=Symbol.for("react.module.reference");function P(L){return!!(typeof L=="string"||typeof L=="function"||L===r||L===a||F||L===i||L===c||L===f||S||L===g||O||b||E||typeof L=="object"&&L!==null&&(L.$$typeof===p||L.$$typeof===h||L.$$typeof===o||L.$$typeof===s||L.$$typeof===u||L.$$typeof===V||L.getModuleId!==void 0))}function z(L,te,oe){var De=L.displayName;if(De)return De;var Ie=te.displayName||te.name||"";return Ie!==""?oe+"("+Ie+")":oe}function R(L){return L.displayName||"Context"}function j(L){if(L==null)return null;if(typeof L.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof L=="object")switch(L.$$typeof){case s:var te=L;return R(te)+".Consumer";case o:var oe=L;return R(oe._context)+".Provider";case u:return z(L,L.render,"ForwardRef");case h:var De=L.displayName||null;return De!==null?De:j(L.type)||"Memo";case p:{var Ie=L,_e=Ie._payload,ke=Ie._init;try{return j(ke(_e))}catch{return null}}}return null}var I=Object.assign,N=0,X,_,$,re,k,T,Z;function H(){}H.__reactDisabledLog=!0;function Q(){{if(N===0){X=console.log,_=console.info,$=console.warn,re=console.error,k=console.group,T=console.groupCollapsed,Z=console.groupEnd;var L={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}N++}}function K(){{if(N--,N===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},L,{value:X}),info:I({},L,{value:_}),warn:I({},L,{value:$}),error:I({},L,{value:re}),group:I({},L,{value:k}),groupCollapsed:I({},L,{value:T}),groupEnd:I({},L,{value:Z})})}N<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=D.ReactCurrentDispatcher,U;function W(L,te,oe){{if(U===void 0)try{throw Error()}catch(Ie){var De=Ie.stack.trim().match(/\n( *(at )?)/);U=De&&De[1]||""}return`
|
18
|
+
`+U+L}}var M=!1,J;{var ne=typeof WeakMap=="function"?WeakMap:Map;J=new ne}function G(L,te){if(!L||M)return"";{var oe=J.get(L);if(oe!==void 0)return oe}var De;M=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _e;_e=y.current,y.current=null,Q();try{if(te){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(it){De=it}Reflect.construct(L,[],ke)}else{try{ke.call()}catch(it){De=it}L.call(ke.prototype)}}else{try{throw Error()}catch(it){De=it}L()}}catch(it){if(it&&De&&typeof it.stack=="string"){for(var Oe=it.stack.split(`
|
19
|
+
`),rt=De.stack.split(`
|
20
|
+
`),Ke=Oe.length-1,$e=rt.length-1;Ke>=1&&$e>=0&&Oe[Ke]!==rt[$e];)$e--;for(;Ke>=1&&$e>=0;Ke--,$e--)if(Oe[Ke]!==rt[$e]){if(Ke!==1||$e!==1)do if(Ke--,$e--,$e<0||Oe[Ke]!==rt[$e]){var ct=`
|
21
|
+
`+Oe[Ke].replace(" at new "," at ");return L.displayName&&ct.includes("<anonymous>")&&(ct=ct.replace("<anonymous>",L.displayName)),typeof L=="function"&&J.set(L,ct),ct}while(Ke>=1&&$e>=0);break}}}finally{M=!1,y.current=_e,K(),Error.prepareStackTrace=Ie}var zt=L?L.displayName||L.name:"",_t=zt?W(zt):"";return typeof L=="function"&&J.set(L,_t),_t}function ue(L,te,oe){return G(L,!1)}function ae(L){var te=L.prototype;return!!(te&&te.isReactComponent)}function de(L,te,oe){if(L==null)return"";if(typeof L=="function")return G(L,ae(L));if(typeof L=="string")return W(L);switch(L){case c:return W("Suspense");case f:return W("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case u:return ue(L.render);case h:return de(L.type,te,oe);case p:{var De=L,Ie=De._payload,_e=De._init;try{return de(_e(Ie),te,oe)}catch{}}}return""}var pe=Object.prototype.hasOwnProperty,Ce={},ye=D.ReactDebugCurrentFrame;function ge(L){if(L){var te=L._owner,oe=de(L.type,L._source,te?te.type:null);ye.setExtraStackFrame(oe)}else ye.setExtraStackFrame(null)}function ve(L,te,oe,De,Ie){{var _e=Function.call.bind(pe);for(var ke in L)if(_e(L,ke)){var Oe=void 0;try{if(typeof L[ke]!="function"){var rt=Error((De||"React class")+": "+oe+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw rt.name="Invariant Violation",rt}Oe=L[ke](te,ke,De,oe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ke){Oe=Ke}Oe&&!(Oe instanceof Error)&&(ge(Ie),B("%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).",De||"React class",oe,ke,typeof Oe),ge(null)),Oe instanceof Error&&!(Oe.message in Ce)&&(Ce[Oe.message]=!0,ge(Ie),B("Failed %s type: %s",oe,Oe.message),ge(null))}}}var je=Array.isArray;function se(L){return je(L)}function Ne(L){{var te=typeof Symbol=="function"&&Symbol.toStringTag,oe=te&&L[Symbol.toStringTag]||L.constructor.name||"Object";return oe}}function fe(L){try{return we(L),!1}catch{return!0}}function we(L){return""+L}function Me(L){if(fe(L))return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(L)),we(L)}var He=D.ReactCurrentOwner,qe={key:!0,ref:!0,__self:!0,__source:!0},Ee,ut,at;at={};function At(L){if(pe.call(L,"ref")){var te=Object.getOwnPropertyDescriptor(L,"ref").get;if(te&&te.isReactWarning)return!1}return L.ref!==void 0}function ht(L){if(pe.call(L,"key")){var te=Object.getOwnPropertyDescriptor(L,"key").get;if(te&&te.isReactWarning)return!1}return L.key!==void 0}function wt(L,te){if(typeof L.ref=="string"&&He.current&&te&&He.current.stateNode!==te){var oe=j(He.current.type);at[oe]||(B('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',j(He.current.type),L.ref),at[oe]=!0)}}function Tt(L,te){{var oe=function(){Ee||(Ee=!0,B("%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)",te))};oe.isReactWarning=!0,Object.defineProperty(L,"key",{get:oe,configurable:!0})}}function vt(L,te){{var oe=function(){ut||(ut=!0,B("%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)",te))};oe.isReactWarning=!0,Object.defineProperty(L,"ref",{get:oe,configurable:!0})}}var tn=function(L,te,oe,De,Ie,_e,ke){var Oe={$$typeof:e,type:L,key:te,ref:oe,props:ke,_owner:_e};return Oe._store={},Object.defineProperty(Oe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Oe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:De}),Object.defineProperty(Oe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(Oe.props),Object.freeze(Oe)),Oe};function be(L,te,oe,De,Ie){{var _e,ke={},Oe=null,rt=null;oe!==void 0&&(Me(oe),Oe=""+oe),ht(te)&&(Me(te.key),Oe=""+te.key),At(te)&&(rt=te.ref,wt(te,Ie));for(_e in te)pe.call(te,_e)&&!qe.hasOwnProperty(_e)&&(ke[_e]=te[_e]);if(L&&L.defaultProps){var Ke=L.defaultProps;for(_e in Ke)ke[_e]===void 0&&(ke[_e]=Ke[_e])}if(Oe||rt){var $e=typeof L=="function"?L.displayName||L.name||"Unknown":L;Oe&&Tt(ke,$e),rt&&vt(ke,$e)}return tn(L,Oe,rt,Ie,De,He.current,ke)}}var Te=D.ReactCurrentOwner,Re=D.ReactDebugCurrentFrame;function nt(L){if(L){var te=L._owner,oe=de(L.type,L._source,te?te.type:null);Re.setExtraStackFrame(oe)}else Re.setExtraStackFrame(null)}var ot;ot=!1;function Ot(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function yn(){{if(Te.current){var L=j(Te.current.type);if(L)return`
|
22
22
|
|
23
|
-
Check the render method of \``+
|
23
|
+
Check the render method of \``+L+"`."}return""}}function Fn(L){{if(L!==void 0){var te=L.fileName.replace(/^.*[\\\/]/,""),oe=L.lineNumber;return`
|
24
24
|
|
25
|
-
Check your code at `+
|
25
|
+
Check your code at `+te+":"+oe+"."}return""}}var sr={};function ri(L){{var te=yn();if(!te){var oe=typeof L=="string"?L:L.displayName||L.name;oe&&(te=`
|
26
26
|
|
27
|
-
Check the top-level render call using <`+
|
27
|
+
Check the top-level render call using <`+oe+">.")}return te}}function Cn(L,te){{if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var oe=ri(te);if(sr[oe])return;sr[oe]=!0;var De="";L&&L._owner&&L._owner!==Te.current&&(De=" It was passed a child from "+j(L._owner.type)+"."),nt(L),B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,De),nt(null)}}function ur(L,te){{if(typeof L!="object")return;if(se(L))for(var oe=0;oe<L.length;oe++){var De=L[oe];Ot(De)&&Cn(De,te)}else if(Ot(L))L._store&&(L._store.validated=!0);else if(L){var Ie=d(L);if(typeof Ie=="function"&&Ie!==L.entries)for(var _e=Ie.call(L),ke;!(ke=_e.next()).done;)Ot(ke.value)&&Cn(ke.value,te)}}}function ii(L){{var te=L.type;if(te==null||typeof te=="string")return;var oe;if(typeof te=="function")oe=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===h))oe=te.propTypes;else return;if(oe){var De=j(te);ve(oe,L.props,"prop",De,L)}else if(te.PropTypes!==void 0&&!ot){ot=!0;var Ie=j(te);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pn(L){{for(var te=Object.keys(L.props),oe=0;oe<te.length;oe++){var De=te[oe];if(De!=="children"&&De!=="key"){nt(L),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),nt(null);break}}L.ref!==null&&(nt(L),B("Invalid attribute `ref` supplied to `React.Fragment`."),nt(null))}}var lr={};function cr(L,te,oe,De,Ie,_e){{var ke=P(L);if(!ke){var Oe="";(L===void 0||typeof L=="object"&&L!==null&&Object.keys(L).length===0)&&(Oe+=" 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 rt=Fn(Ie);rt?Oe+=rt:Oe+=yn();var Ke;L===null?Ke="null":se(L)?Ke="array":L!==void 0&&L.$$typeof===e?(Ke="<"+(j(L.type)||"Unknown")+" />",Oe=" Did you accidentally export a JSX literal instead of a component?"):Ke=typeof L,B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ke,Oe)}var $e=be(L,te,oe,Ie,_e);if($e==null)return $e;if(ke){var ct=te.children;if(ct!==void 0)if(De)if(se(ct)){for(var zt=0;zt<ct.length;zt++)ur(ct[zt],L);Object.freeze&&Object.freeze(ct)}else B("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 ur(ct,L)}if(pe.call(te,"key")){var _t=j(L),it=Object.keys(te).filter(function(jD){return jD!=="key"}),Be=it.length>0?"{key: someKey, "+it.join(": ..., ")+": ...}":"{key: someKey}";if(!lr[_t+Be]){var ID=it.length>0?"{"+it.join(": ..., ")+": ...}":"{}";B(`A props object containing a "key" prop is being spread into JSX:
|
28
28
|
let props = %s;
|
29
29
|
<%s {...props} />
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
31
31
|
let props = %s;
|
32
|
-
<%s key={someKey} {...props} />`,
|
32
|
+
<%s key={someKey} {...props} />`,Be,_t,ID,_t),lr[_t+Be]=!0}}return L===r?Pn($e):ii($e),$e}}function Mn(L,te,oe){return cr(L,te,oe,!0)}function ai(L,te,oe){return cr(L,te,oe,!1)}var oi=ai,kn=Mn;Rn.Fragment=r,Rn.jsx=oi,Rn.jsxs=kn}()),Rn}process.env.NODE_ENV==="production"?ui.exports=Ac():ui.exports=Oc();var x=ui.exports;function _a(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const Wa=l.createContext({});function Fc(){return l.useContext(Wa)}function Pc(t){const{schema:e,children:n,className:r,...i}=t,s=!(c=>{let f=!1;const h=p=>{Array.isArray(p)?p.forEach(h):p&&typeof p=="object"&&"type"in p&&(p.type===_a?f=!0:p.props&&p.props.children&&h(p.props.children))};return h(c),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${s} ${r}`;return x.jsx(Wa.Provider,{value:t,children:x.jsx("div",{className:u.trim(),...i,children:n})})}function Mc(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function kc(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Tc(t){const{className:e,...n}=t,{schema:r}=Fc(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(Se.CheckCircle2,{className:i,...n});case"danger":return x.jsx(Se.XCircle,{className:i,...n});case"warning":return x.jsx(Se.AlertTriangle,{className:i,...n});case"info":return x.jsx(Se.Info,{className:i,...n})}}function fr(t,e){return e?x.jsx(e,{size:t,strokeWidth:2.5}):x.jsx(x.Fragment,{})}function Ua(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function Rc(t,e,n){return t>=n?[]:Ua(t,t+e)}function Ic(t,e){return t<=1?[]:Ua(t-1-e,t-1)}function jc(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function Nc(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:a,className:o="",children:s,...u}=t,f={md:12,lg:14}[r],h=`arkynBadge ${e} ${n} ${r} ${o}`;return x.jsxs("div",{className:h.trim(),...u,children:[fr(f,i),s,fr(f,i)]})}function zc(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return x.jsx("div",{className:r.trim(),...n})}function _c(t){const{className:e,orientation:n="horizontal",...r}=t,i=`arkynDivider ${n} ${e}`;return x.jsx("div",{className:i.trim(),...r})}/*! *****************************************************************************
|
33
33
|
Copyright (c) Microsoft Corporation.
|
34
34
|
|
35
35
|
Permission to use, copy, modify, and/or distribute this software for any
|
@@ -42,15 +42,15 @@ React keys must be passed directly to JSX without using spread:
|
|
42
42
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
43
43
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
44
44
|
PERFORMANCE OF THIS SOFTWARE.
|
45
|
-
***************************************************************************** */var
|
45
|
+
***************************************************************************** */var li=function(t,e){return li=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},li(t,e)};function Ve(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");li(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var me=function(){return me=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},me.apply(this,arguments)};function ci(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Wc(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(f){try{c(r.next(f))}catch(h){o(h)}}function u(f){try{c(r.throw(f))}catch(h){o(h)}}function c(f){f.done?a(f.value):i(f.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function Uc(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(f){return u([c,f])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(f){c=[6,f],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ha(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hc=process.env.NODE_ENV,Vc=function(t,e,n,r,i,a,o,s){if(Hc!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var u;if(e===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],f=0;u=new Error(e.replace(/%s/g,function(){return c[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},qc=Vc,tt=Ha(qc),Le=l.createContext(null);function Zc(){tt(!!l.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=l.useContext(Le);return tt(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Gc(t,e,n){return Object.keys(t).reduce(function(i,a){return e(i,t[a],a)},n)}function Yc(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Kc(t,e,n,r){var i={},a=function(o,s){var u=n[s];u!==e[s]&&(i[s]=u,o(r,u))};return Yc(t,a),i}function Xc(t,e,n){var r=Gc(n,function(a,o,s){return typeof t[s]=="function"&&a.push(google.maps.event.addListener(e,o,t[s])),a},[]);return r}function Jc(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach(Jc)}function Fe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,a=t.instance,o=Xc(i,a,n);return Kc(e,r,i,a),o}var Va={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"},qa={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function Qc(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,a=t.mapContainerClassName,o=t.center,s=t.onClick,u=t.onDblClick,c=t.onDrag,f=t.onDragEnd,h=t.onDragStart,p=t.onMouseMove,g=t.onMouseOut,C=t.onMouseOver,v=t.onMouseDown,d=t.onMouseUp,D=t.onRightClick,B=t.onCenterChanged,w=t.onLoad,O=t.onUnmount,b=l.useState(null),E=b[0],S=b[1],F=l.useRef(null),V=l.useState(null),P=V[0],z=V[1],R=l.useState(null),j=R[0],I=R[1],N=l.useState(null),X=N[0],_=N[1],$=l.useState(null),re=$[0],k=$[1],T=l.useState(null),Z=T[0],H=T[1],Q=l.useState(null),K=Q[0],y=Q[1],U=l.useState(null),W=U[0],M=U[1],J=l.useState(null),ne=J[0],G=J[1],ue=l.useState(null),ae=ue[0],de=ue[1],pe=l.useState(null),Ce=pe[0],ye=pe[1],ge=l.useState(null),ve=ge[0],je=ge[1],se=l.useState(null),Ne=se[0],fe=se[1];return l.useEffect(function(){n&&E!==null&&E.setOptions(n)},[E,n]),l.useEffect(function(){E!==null&&typeof o<"u"&&E.setCenter(o)},[E,o]),l.useEffect(function(){E&&u&&(j!==null&&google.maps.event.removeListener(j),I(google.maps.event.addListener(E,"dblclick",u)))},[u]),l.useEffect(function(){E&&f&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(E,"dragend",f)))},[f]),l.useEffect(function(){E&&h&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(E,"dragstart",h)))},[h]),l.useEffect(function(){E&&v&&(Z!==null&&google.maps.event.removeListener(Z),H(google.maps.event.addListener(E,"mousedown",v)))},[v]),l.useEffect(function(){E&&p&&(K!==null&&google.maps.event.removeListener(K),y(google.maps.event.addListener(E,"mousemove",p)))},[p]),l.useEffect(function(){E&&g&&(W!==null&&google.maps.event.removeListener(W),M(google.maps.event.addListener(E,"mouseout",g)))},[g]),l.useEffect(function(){E&&C&&(ne!==null&&google.maps.event.removeListener(ne),G(google.maps.event.addListener(E,"mouseover",C)))},[C]),l.useEffect(function(){E&&d&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(E,"mouseup",d)))},[d]),l.useEffect(function(){E&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(E,"rightclick",D)))},[D]),l.useEffect(function(){E&&s&&(ve!==null&&google.maps.event.removeListener(ve),je(google.maps.event.addListener(E,"click",s)))},[s]),l.useEffect(function(){E&&c&&(Ne!==null&&google.maps.event.removeListener(Ne),fe(google.maps.event.addListener(E,"drag",c)))},[c]),l.useEffect(function(){E&&B&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(E,"center_changed",B)))},[s]),l.useEffect(function(){var we=F.current===null?null:new google.maps.Map(F.current,n);return S(we),we!==null&&w&&w(we),function(){we!==null&&O&&O(we)}},[]),x.jsx("div",{id:r,ref:F,style:i,className:a,children:x.jsx(Le.Provider,{value:E,children:E!==null?e:null})})}l.memo(Qc);var $c=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=Fe({updaterMap:qa,eventMap:Va,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:qa,eventMap:Va,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:x.jsx(Le.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(l.PureComponent),rn=typeof document<"u";function Za(t){var e=t.url,n=t.id,r=t.nonce;return rn?new Promise(function(a,o){var s=document.getElementById(n),u=window;if(s){var c=s.getAttribute("data-state");if(s.src===e&&c!=="error"){if(c==="ready")return a(n);var f=u.initMap,h=s.onerror;u.initMap=function(){f&&f(),a(n)},s.onerror=function(g){h&&h(g),o(g)};return}else s.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(C){p.setAttribute("data-state","error"),o(C)},u.initMap=function(){p.setAttribute("data-state","ready"),a(n)},document.head.appendChild(p)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function Ga(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
|
46
46
|
`,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
|
47
|
-
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function
|
47
|
+
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Ya(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,a){return Ga(i)||Reflect.apply(e,t,[i,a]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Ga(i)||Reflect.apply(n,t,[i]),i}}}function Ka(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,a=t.language,o=t.region,s=t.libraries,u=t.channel,c=t.mapIds,f=t.authReferrerPolicy,h=[];return tt(e&&n||!(e&&n),"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."),e?h.push("key=".concat(e)):n&&h.push("client=".concat(n)),i&&h.push("v=".concat(i)),a&&h.push("language=".concat(a)),o&&h.push("region=".concat(o)),s&&s.length&&h.push("libraries=".concat(s.sort().join(","))),u&&h.push("channel=".concat(u)),c&&c.length&&h.push("map_ids=".concat(c.join(","))),f&&h.push("auth_referrer_policy=".concat(f)),h.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(h.join("&"))}var In=!1;function Xa(){return x.jsx("div",{children:"Loading..."})}var fi={id:"script-loader",version:"weekly"},ef=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=l.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return Wc(n,void 0,void 0,function(){function r(i){if(!In)i();else if(rn)var a=window.setInterval(function(){In||(window.clearInterval(a),i())},1)}return Uc(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){In=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(a){return typeof a.src=="string"&&a.src.includes("maps.googleapis")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(a){return a.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(a){return a.innerText!==void 0&&a.innerText.length>0&&a.innerText.includes(".gm-")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&Ya(),tt(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:Ka(n.props)};Za(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
|
48
48
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
|
49
49
|
Otherwise it is a Network issue.
|
50
|
-
`))})},n}return e.prototype.componentDidMount=function(){if(
|
51
|
-
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(
|
50
|
+
`))})},n}return e.prototype.componentDidMount=function(){if(rn){if(window.google&&window.google.maps&&!In){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)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.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"),rn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(rn){this.cleanup();var r=function(){n.check.current||(delete window.google,In=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||x.jsx(Xa,{})]})},e.defaultProps=fi,e}(l.PureComponent),Ja;function tf(t){var e=t.id,n=e===void 0?fi.id:e,r=t.version,i=r===void 0?fi.version:r,a=t.nonce,o=t.googleMapsApiKey,s=t.googleMapsClientId,u=t.language,c=t.region,f=t.libraries,h=t.preventGoogleFontsLoading,p=t.channel,g=t.mapIds,C=t.authReferrerPolicy,v=l.useRef(!1),d=l.useState(!1),D=d[0],B=d[1],w=l.useState(void 0),O=w[0],b=w[1];l.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),l.useEffect(function(){rn&&h&&Ya()},[h]),l.useEffect(function(){D&&tt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var E=Ka({version:i,googleMapsApiKey:o,googleMapsClientId:s,language:u,region:c,libraries:f,channel:p,mapIds:g,authReferrerPolicy:C});l.useEffect(function(){if(!rn)return;function V(){v.current&&(B(!0),Ja=E)}if(window.google&&window.google.maps&&Ja===E){V();return}Za({id:n,url:E,nonce:a}).then(V).catch(function(z){v.current&&b(z),console.warn(`
|
51
|
+
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(o||"-",") or Client ID (").concat(s||"-",`)
|
52
52
|
Otherwise it is a Network issue.
|
53
|
-
`)),console.error(z)})},[n,b,s]);var S=i.useRef();return i.useEffect(function(){S.current&&f!==S.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"),S.current=f},[f]),{isLoaded:x,loadError:I,url:b}}var ss=y.jsx(bo,{});function as(t){var e=t.loadingElement,n=t.onLoad,o=t.onError,r=t.onUnmount,s=t.children,a=Cn(t,["loadingElement","onLoad","onError","onUnmount","children"]),l=is(a),u=l.isLoaded,c=l.loadError;return i.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),i.useEffect(function(){c&&typeof o=="function"&&o(c)},[c,o]),i.useEffect(function(){return function(){r&&r()}},[r]),u?s:e||ss}i.memo(as);var Co;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Co||(Co={}));var xo={},Eo={options:function(t,e){t.setOptions(e)}};function ls(t){var e=t.options,n=t.onLoad,o=t.onUnmount,r=i.useContext(ue),s=i.useState(null),a=s[0],l=s[1];return i.useEffect(function(){a!==null&&a.setMap(r)},[r]),i.useEffect(function(){e&&a!==null&&a.setOptions(e)},[a,e]),i.useEffect(function(){var u=new google.maps.TrafficLayer(ee(ee({},e||{}),{map:r}));return l(u),n&&n(u),function(){a!==null&&(o&&o(a),a.setMap(null))}},[]),null}i.memo(ls),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Eo,eventMap:xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Eo,eventMap:xo,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),pe(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);function us(t){var e=t.onLoad,n=t.onUnmount,o=i.useContext(ue),r=i.useState(null),s=r[0],a=r[1];return i.useEffect(function(){s!==null&&s.setMap(o)},[o]),i.useEffect(function(){var l=new google.maps.BicyclingLayer;return a(l),l.setMap(o),e&&e(l),function(){l!==null&&(n&&n(l),l.setMap(null))}},[]),null}i.memo(us),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);function cs(t){var e=t.onLoad,n=t.onUnmount,o=i.useContext(ue),r=i.useState(null),s=r[0],a=r[1];return i.useEffect(function(){s!==null&&s.setMap(o)},[o]),i.useEffect(function(){var l=new google.maps.TransitLayer;return a(l),l.setMap(o),e&&e(l),function(){s!==null&&(n&&n(s),s.setMap(null))}},[]),null}i.memo(cs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var wo={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},So={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function ds(t){var e=t.options,n=t.drawingMode,o=t.onCircleComplete,r=t.onMarkerComplete,s=t.onOverlayComplete,a=t.onPolygonComplete,l=t.onPolylineComplete,u=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,p=i.useContext(ue),d=i.useState(null),h=d[0],E=d[1],m=i.useState(null),C=m[0],x=m[1],P=i.useState(null),w=P[0],I=P[1],v=i.useState(null),b=v[0],S=v[1],T=i.useState(null),U=T[0],O=T[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1];return i.useEffect(function(){h!==null&&h.setMap(p)},[p]),i.useEffect(function(){e&&h!==null&&h.setOptions(e)},[h,e]),i.useEffect(function(){h!==null&&h.setDrawingMode(n??null)},[h,n]),i.useEffect(function(){h&&o&&(C!==null&&google.maps.event.removeListener(C),x(google.maps.event.addListener(h,"circlecomplete",o)))},[h,o]),i.useEffect(function(){h&&r&&(w!==null&&google.maps.event.removeListener(w),I(google.maps.event.addListener(h,"markercomplete",r)))},[h,r]),i.useEffect(function(){h&&s&&(b!==null&&google.maps.event.removeListener(b),S(google.maps.event.addListener(h,"overlaycomplete",s)))},[h,s]),i.useEffect(function(){h&&a&&(U!==null&&google.maps.event.removeListener(U),O(google.maps.event.addListener(h,"polygoncomplete",a)))},[h,a]),i.useEffect(function(){h&&l&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(h,"polylinecomplete",l)))},[h,l]),i.useEffect(function(){h&&u&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(h,"rectanglecomplete",u)))},[h,u]),i.useEffect(function(){$e(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var $=new google.maps.drawing.DrawingManager(ee(ee({},e||{}),{map:p}));return n&&$.setDrawingMode(n),o&&x(google.maps.event.addListener($,"circlecomplete",o)),r&&I(google.maps.event.addListener($,"markercomplete",r)),s&&S(google.maps.event.addListener($,"overlaycomplete",s)),a&&O(google.maps.event.addListener($,"polygoncomplete",a)),l&&A(google.maps.event.addListener($,"polylinecomplete",l)),u&&H(google.maps.event.addListener($,"rectanglecomplete",u)),E($),c&&c($),function(){h!==null&&(C&&google.maps.event.removeListener(C),w&&google.maps.event.removeListener(w),b&&google.maps.event.removeListener(b),U&&google.maps.event.removeListener(U),X&&google.maps.event.removeListener(X),V&&google.maps.event.removeListener(V),f&&f(h),h.setMap(null))}},[]),null}i.memo(ds),function(t){Pe(e,t);function e(n){var o=t.call(this,n)||this;return o.registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){o.state.drawingManager!==null&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},$e(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),o}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:So,eventMap:wo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:So,eventMap:wo,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),pe(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var ko={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"},Mo={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Yt={};function fs(t){var e=t.position,n=t.options,o=t.clusterer,r=t.noClustererRedraw,s=t.children,a=t.draggable,l=t.visible,u=t.animation,c=t.clickable,f=t.cursor,p=t.icon,d=t.label,h=t.opacity,E=t.shape,m=t.title,C=t.zIndex,x=t.onClick,P=t.onDblClick,w=t.onDrag,I=t.onDragEnd,v=t.onDragStart,b=t.onMouseOut,S=t.onMouseOver,T=t.onMouseUp,U=t.onMouseDown,O=t.onRightClick,z=t.onClickableChanged,X=t.onCursorChanged,A=t.onAnimationChanged,F=t.onDraggableChanged,V=t.onFlatChanged,H=t.onIconChanged,$=t.onPositionChanged,W=t.onShapeChanged,Q=t.onTitleChanged,M=t.onVisibleChanged,k=t.onZindexChanged,D=t.onLoad,_=t.onUnmount,B=i.useContext(ue),G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1],re=i.useState(null),Ne=re[0],ae=re[1],Ae=i.useState(null),te=Ae[0],We=Ae[1],Xe=i.useState(null),Be=Xe[0],tt=Xe[1],ve=i.useState(null),nt=ve[0],dt=ve[1],yt=i.useState(null),ot=yt[0],Et=yt[1],ft=i.useState(null),Ye=ft[0],wt=ft[1],ie=i.useState(null),ye=ie[0],xe=ie[1],ze=i.useState(null),He=ze[0],Je=ze[1],bt=i.useState(null),St=bt[0],Ft=bt[1],gn=i.useState(null),Lt=gn[0],Ht=gn[1],mn=i.useState(null),kt=mn[0],Wt=mn[1],Vt=i.useState(null),Mt=Vt[0],vn=Vt[1],yn=i.useState(null),Pt=yn[0],g=yn[1],N=i.useState(null),Z=N[0],ne=N[1],be=i.useState(null),Ee=be[0],ge=be[1],de=i.useState(null),Ue=de[0],Ie=de[1],De=i.useState(null),Ve=De[0],rt=De[1];i.useEffect(function(){L!==null&&L.setMap(B)},[B]),i.useEffect(function(){typeof n<"u"&&L!==null&&L.setOptions(n)},[L,n]),i.useEffect(function(){typeof a<"u"&&L!==null&&L.setDraggable(a)},[L,a]),i.useEffect(function(){e&&L!==null&&L.setPosition(e)},[L,e]),i.useEffect(function(){typeof l<"u"&&L!==null&&L.setVisible(l)},[L,l]),i.useEffect(function(){L==null||L.setAnimation(u)},[L,u]),i.useEffect(function(){L&&c!==void 0&&L.setClickable(c)},[L,c]),i.useEffect(function(){L&&f!==void 0&&L.setCursor(f)},[L,f]),i.useEffect(function(){L&&p!==void 0&&L.setIcon(p)},[L,p]),i.useEffect(function(){L&&d!==void 0&&L.setLabel(d)},[L,d]),i.useEffect(function(){L&&h!==void 0&&L.setOpacity(h)},[L,h]),i.useEffect(function(){L&&E!==void 0&&L.setShape(E)},[L,E]),i.useEffect(function(){L&&m!==void 0&&L.setTitle(m)},[L,m]),i.useEffect(function(){L&&C!==void 0&&L.setZIndex(C)},[L,C]),i.useEffect(function(){L&&P&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(L,"dblclick",P)))},[P]),i.useEffect(function(){L&&I&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(L,"dragend",I)))},[I]),i.useEffect(function(){L&&v&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(L,"dragstart",v)))},[v]),i.useEffect(function(){L&&U&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(L,"mousedown",U)))},[U]),i.useEffect(function(){L&&b&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(L,"mouseout",b)))},[b]),i.useEffect(function(){L&&S&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(L,"mouseover",S)))},[S]),i.useEffect(function(){L&&T&&(Be!==null&&google.maps.event.removeListener(Be),tt(google.maps.event.addListener(L,"mouseup",T)))},[T]),i.useEffect(function(){L&&O&&(nt!==null&&google.maps.event.removeListener(nt),dt(google.maps.event.addListener(L,"rightclick",O)))},[O]),i.useEffect(function(){L&&x&&(ot!==null&&google.maps.event.removeListener(ot),Et(google.maps.event.addListener(L,"click",x)))},[x]),i.useEffect(function(){L&&w&&(Ye!==null&&google.maps.event.removeListener(Ye),wt(google.maps.event.addListener(L,"drag",w)))},[w]),i.useEffect(function(){L&&z&&(ye!==null&&google.maps.event.removeListener(ye),xe(google.maps.event.addListener(L,"clickable_changed",z)))},[z]),i.useEffect(function(){L&&X&&(He!==null&&google.maps.event.removeListener(He),Je(google.maps.event.addListener(L,"cursor_changed",X)))},[X]),i.useEffect(function(){L&&A&&(St!==null&&google.maps.event.removeListener(St),Ft(google.maps.event.addListener(L,"animation_changed",A)))},[A]),i.useEffect(function(){L&&F&&(Lt!==null&&google.maps.event.removeListener(Lt),Ht(google.maps.event.addListener(L,"draggable_changed",F)))},[F]),i.useEffect(function(){L&&V&&(kt!==null&&google.maps.event.removeListener(kt),Wt(google.maps.event.addListener(L,"flat_changed",V)))},[V]),i.useEffect(function(){L&&H&&(Mt!==null&&google.maps.event.removeListener(Mt),vn(google.maps.event.addListener(L,"icon_changed",H)))},[H]),i.useEffect(function(){L&&$&&(Pt!==null&&google.maps.event.removeListener(Pt),g(google.maps.event.addListener(L,"position_changed",$)))},[$]),i.useEffect(function(){L&&W&&(Z!==null&&google.maps.event.removeListener(Z),ne(google.maps.event.addListener(L,"shape_changed",W)))},[W]),i.useEffect(function(){L&&Q&&(Ee!==null&&google.maps.event.removeListener(Ee),ge(google.maps.event.addListener(L,"title_changed",Q)))},[Q]),i.useEffect(function(){L&&M&&(Ue!==null&&google.maps.event.removeListener(Ue),Ie(google.maps.event.addListener(L,"visible_changed",M)))},[M]),i.useEffect(function(){L&&k&&(Ve!==null&&google.maps.event.removeListener(Ve),rt(google.maps.event.addListener(L,"zindex_changed",k)))},[k]),i.useEffect(function(){var Fe=ee(ee(ee({},n||Yt),o?Yt:{map:B}),{position:e}),se=new google.maps.Marker(Fe);return o?o.addMarker(se,!!r):se.setMap(B),e&&se.setPosition(e),typeof l<"u"&&se.setVisible(l),typeof a<"u"&&se.setDraggable(a),typeof c<"u"&&se.setClickable(c),typeof f=="string"&&se.setCursor(f),p&&se.setIcon(p),typeof d<"u"&&se.setLabel(d),typeof h<"u"&&se.setOpacity(h),E&&se.setShape(E),typeof m=="string"&&se.setTitle(m),typeof C=="number"&&se.setZIndex(C),P&&Y(google.maps.event.addListener(se,"dblclick",P)),I&&ce(google.maps.event.addListener(se,"dragend",I)),v&&he(google.maps.event.addListener(se,"dragstart",v)),U&&le(google.maps.event.addListener(se,"mousedown",U)),b&&ae(google.maps.event.addListener(se,"mouseout",b)),S&&We(google.maps.event.addListener(se,"mouseover",S)),T&&tt(google.maps.event.addListener(se,"mouseup",T)),O&&dt(google.maps.event.addListener(se,"rightclick",O)),x&&Et(google.maps.event.addListener(se,"click",x)),w&&wt(google.maps.event.addListener(se,"drag",w)),z&&xe(google.maps.event.addListener(se,"clickable_changed",z)),X&&Je(google.maps.event.addListener(se,"cursor_changed",X)),A&&Ft(google.maps.event.addListener(se,"animation_changed",A)),F&&Ht(google.maps.event.addListener(se,"draggable_changed",F)),V&&Wt(google.maps.event.addListener(se,"flat_changed",V)),H&&vn(google.maps.event.addListener(se,"icon_changed",H)),$&&g(google.maps.event.addListener(se,"position_changed",$)),W&&ne(google.maps.event.addListener(se,"shape_changed",W)),Q&&ge(google.maps.event.addListener(se,"title_changed",Q)),M&&Ie(google.maps.event.addListener(se,"visible_changed",M)),k&&rt(google.maps.event.addListener(se,"zindex_changed",k)),q(se),D&&D(se),function(){R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),Me!==null&&google.maps.event.removeListener(Me),Ne!==null&&google.maps.event.removeListener(Ne),te!==null&&google.maps.event.removeListener(te),Be!==null&&google.maps.event.removeListener(Be),nt!==null&&google.maps.event.removeListener(nt),ot!==null&&google.maps.event.removeListener(ot),ye!==null&&google.maps.event.removeListener(ye),He!==null&&google.maps.event.removeListener(He),St!==null&&google.maps.event.removeListener(St),Lt!==null&&google.maps.event.removeListener(Lt),kt!==null&&google.maps.event.removeListener(kt),Mt!==null&&google.maps.event.removeListener(Mt),Pt!==null&&google.maps.event.removeListener(Pt),Ee!==null&&google.maps.event.removeListener(Ee),Ue!==null&&google.maps.event.removeListener(Ue),Ve!==null&&google.maps.event.removeListener(Ve),_&&_(se),o?o.removeMarker(se,!!r):se&&se.setMap(null)}},[]);var it=i.useMemo(function(){return s?i.Children.map(s,function(Fe){if(!i.isValidElement(Fe))return Fe;var se=Fe;return i.cloneElement(se,{anchor:L})}):null},[s,L]);return y.jsx(y.Fragment,{children:it})||null}i.memo(fs);var ps=function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=ee(ee(ee({},this.props.options||Yt),this.props.clusterer?Yt:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=fe({updaterMap:Mo,eventMap:ko,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Mo,eventMap:ko,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),pe(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,o=null;return this.props.children&&(o=i.Children.map(this.props.children,function(r){if(!i.isValidElement(r))return r;var s=r;return i.cloneElement(s,{anchor:n.marker})})),o||null},e.contextType=ue,e}(i.PureComponent),hs=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,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(e.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 t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var o=n.getMaxZoom(),r=this.cluster.getBounds(),s=n.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(r),this.timeOut=window.setTimeout(function(){var a=n.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(r);var l=a.getZoom()||0;o!==null&&l>o&&a.setZoom(o+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"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))},t.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)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,o,r,s,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(" "),c=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(p!==null?"".concat(p.y,"px"):"0","; left: ").concat(p!==null?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var d=document.createElement("img");d.alt=l,d.src=this.url,d.width=this.width,d.height=this.height,d.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(d.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var h=document.createElement("div");h.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")),!((o=this.sums)===null||o===void 0)&&o.text&&(h.innerText="".concat((r=this.sums)===null||r===void 0?void 0:r.text)),!((s=this.sums)===null||s===void 0)&&s.html&&(h.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(d),this.div.appendChild(h),this.div.title=l,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),o=n[Math.min(n.length-1,Math.max(0,e.index-1))];o&&(this.url=o.url,this.height=o.height,this.width=o.width,o.className&&(this.className="".concat(this.clusterClassName," ").concat(o.className)),this.anchorText=o.anchorText||[0,0],this.anchorIcon=o.anchorIcon||[this.height/2,this.width/2],this.textColor=o.textColor||"black",this.textSize=o.textSize||11,this.textDecoration=o.textDecoration||"none",this.fontWeight=o.fontWeight||"bold",this.fontStyle=o.fontStyle||"normal",this.fontFamily=o.fontFamily||"Arial,sans-serif",this.backgroundPosition=o.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),gs=function(){function t(e){this.markerClusterer=e,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 hs(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 t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),o=0,r=n;o<r.length;o++){var s=r[o],a=s.getPosition();a&&e.extend(a)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var o=e.getPosition();if(o){var r=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(r-1)+o.lat())/r,(this.center.lng()*(r-1)+o.lng())/r),this.calculateBounds()}}}else{var o=e.getPosition();o&&(this.center=o,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var s=this.markers.length,a=this.markerClusterer.getMaxZoom(),l=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(a!==null&&typeof l<"u"&&l>a)e.getMap()!==this.map&&e.setMap(this.map);else if(s<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(s===this.minClusterSize)for(var u=0,c=this.markers;u<c.length;u++){var f=c[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,o=this.markerClusterer.getMaxZoom(),r=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(o!==null&&typeof r<"u"&&r>o){this.clusterIcon.hide();return}if(n<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()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function ms(t,e){var n=t.length,o=n.toString().length,r=Math.min(o,e);return{text:n.toString(),index:r,title:""}}var vs=2e3,ys=500,bs="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Ls="png",Cs=[53,56,66,78,90],xs="cluster",Po=function(){function t(e,n,o){n===void 0&&(n=[]),o===void 0&&(o={}),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(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,o.zoomOnClick!==void 0&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,o.averageCenter!==void 0&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,o.ignoreHidden!==void 0&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,o.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||bs,this.imageExtension=o.imageExtension||Ls,this.imageSizes=o.imageSizes||Cs,this.calculator=o.calculator||ms,this.batchSize=o.batchSize||vs,this.batchSizeIE=o.batchSizeIE||ys,this.clusterClass=o.clusterClass||xs,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var o=n[e];o.getMap()!==this.activeMap&&o.setMap(this.activeMap)}for(var r=0,s=this.clusters;r<s.length;r++){var a=s[r];a.remove()}this.clusters=[];for(var l=0,u=this.listeners;l<u.length;l++){var c=u[l];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.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}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,o=0,r=e;o<r.length;o++){var s=r[o],a=s.getPosition();a&&n.extend(a)}var l=this.getMap();l!==null&&"fitBounds"in l&&l.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var r=e[o];r&&this.pushMarkerTo(r)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var o=0;o<this.markers.length;o++)if(e===this.markers[o]){n=o;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var o=this.removeMarker_(e);return!n&&o&&this.repaint(),o},t.prototype.removeMarkers=function(e,n){for(var o=!1,r=0,s=e;r<s.length;r++){var a=s[r];o=o||this.removeMarker_(a)}return!n&&o&&this.repaint(),o},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var o=0,r=e;o<r.length;o++){var s=r[o];s.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),o=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));o!==null&&(o.x+=this.gridSize,o.y-=this.gridSize);var r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(r!==null&&(r.x-=this.gridSize,r.y+=this.gridSize),o!==null){var s=n.fromDivPixelToLatLng(o);s!==null&&e.extend(s)}if(r!==null){var a=n.fromDivPixelToLatLng(r);a!==null&&e.extend(a)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,o=this.clusters;n<o.length;n++){var r=o[n];r.remove()}this.clusters=[];for(var s=0,a=this.markers;s<a.length;s++){var l=a[s];l.isAdded=!1,e&&l.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var o=6371,r=(n.lat()-e.lat())*Math.PI/180,s=(n.lng()-e.lng())*Math.PI/180,a=Math.sin(r/2)*Math.sin(r/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return o*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},t.prototype.isMarkerInBounds=function(e,n){var o=e.getPosition();return o?n.contains(o):!1},t.prototype.addToClosestCluster=function(e){for(var n,o=4e4,r=null,s=0,a=this.clusters;s<a.length;s++){var l=a[s];n=l;var u=n.getCenter(),c=e.getPosition();if(u&&c){var f=this.distanceBetweenPoints(u,c);f<o&&(o=f,r=n)}}r&&r.isMarkerInClusterBounds(e)?r.addMarker(e):(n=new gs(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var o=this.getMap(),r=o!==null&&("getBounds"in o)?o.getBounds():null,s=(o==null?void 0:o.getZoom())||0,a=s>3?new google.maps.LatLngBounds(r==null?void 0:r.getSouthWest(),r==null?void 0:r.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(e+this.batchSize,this.markers.length),c=e;c<u;c++){var f=this.markers[c];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(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var p=0,d=this.clusters;p<d.length;p++){var h=d[p];h.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(r){for(var s in r.prototype){var a=s;this.prototype[a]=r.prototype[a]}return this}).apply(e,[n])},t}(),qe={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Le={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Es={};function ws(t){var e=t.children,n=t.options,o=t.averageCenter,r=t.batchSizeIE,s=t.calculator,a=t.clusterClass,l=t.enableRetinaIcons,u=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,p=t.imagePath,d=t.imageSizes,h=t.maxZoom,E=t.minimumClusterSize,m=t.styles,C=t.title,x=t.zoomOnClick,P=t.onClick,w=t.onClusteringBegin,I=t.onClusteringEnd,v=t.onMouseOver,b=t.onMouseOut,S=t.onLoad,T=t.onUnmount,U=i.useState(null),O=U[0],z=U[1],X=i.useContext(ue),A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=Q[0],k=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1];return i.useEffect(function(){O&&b&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(O,qe.onMouseOut,b)))},[b]),i.useEffect(function(){O&&v&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(O,qe.onMouseOver,v)))},[v]),i.useEffect(function(){O&&P&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(O,qe.onClick,P)))},[P]),i.useEffect(function(){O&&w&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(O,qe.onClusteringBegin,w)))},[w]),i.useEffect(function(){O&&I&&(M!==null&&google.maps.event.removeListener(M),W(google.maps.event.addListener(O,qe.onClusteringEnd,I)))},[I]),i.useEffect(function(){typeof o<"u"&&O!==null&&Le.averageCenter(O,o)},[O,o]),i.useEffect(function(){typeof r<"u"&&O!==null&&Le.batchSizeIE(O,r)},[O,r]),i.useEffect(function(){typeof s<"u"&&O!==null&&Le.calculator(O,s)},[O,s]),i.useEffect(function(){typeof a<"u"&&O!==null&&Le.clusterClass(O,a)},[O,a]),i.useEffect(function(){typeof l<"u"&&O!==null&&Le.enableRetinaIcons(O,l)},[O,l]),i.useEffect(function(){typeof u<"u"&&O!==null&&Le.gridSize(O,u)},[O,u]),i.useEffect(function(){typeof c<"u"&&O!==null&&Le.ignoreHidden(O,c)},[O,c]),i.useEffect(function(){typeof f<"u"&&O!==null&&Le.imageExtension(O,f)},[O,f]),i.useEffect(function(){typeof p<"u"&&O!==null&&Le.imagePath(O,p)},[O,p]),i.useEffect(function(){typeof d<"u"&&O!==null&&Le.imageSizes(O,d)},[O,d]),i.useEffect(function(){typeof h<"u"&&O!==null&&Le.maxZoom(O,h)},[O,h]),i.useEffect(function(){typeof E<"u"&&O!==null&&Le.minimumClusterSize(O,E)},[O,E]),i.useEffect(function(){typeof m<"u"&&O!==null&&Le.styles(O,m)},[O,m]),i.useEffect(function(){typeof C<"u"&&O!==null&&Le.title(O,C)},[O,C]),i.useEffect(function(){typeof x<"u"&&O!==null&&Le.zoomOnClick(O,x)},[O,x]),i.useEffect(function(){if(X){var K=ee({},n||Es),R=new Po(X,[],K);return o&&Le.averageCenter(R,o),r&&Le.batchSizeIE(R,r),s&&Le.calculator(R,s),a&&Le.clusterClass(R,a),l&&Le.enableRetinaIcons(R,l),u&&Le.gridSize(R,u),c&&Le.ignoreHidden(R,c),f&&Le.imageExtension(R,f),p&&Le.imagePath(R,p),d&&Le.imageSizes(R,d),h&&Le.maxZoom(R,h),E&&Le.minimumClusterSize(R,E),m&&Le.styles(R,m),C&&Le.title(R,C),x&&Le.zoomOnClick(R,x),b&&B(google.maps.event.addListener(R,qe.onMouseOut,b)),v&&q(google.maps.event.addListener(R,qe.onMouseOver,v)),P&&V(google.maps.event.addListener(R,qe.onClick,P)),w&&W(google.maps.event.addListener(R,qe.onClusteringBegin,w)),I&&k(google.maps.event.addListener(R,qe.onClusteringEnd,I)),z(R),S&&S(R),function(){_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),M!==null&&google.maps.event.removeListener(M),T&&T(R)}}},[]),O!==null&&e(O)||null}i.memo(ws),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new Po(this.context,[],this.props.options);this.registeredEvents=fe({updaterMap:Le,eventMap:qe,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Le,eventMap:qe,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),pe(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=ue,e}(i.PureComponent);function To(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var Oo=function(){function t(e){e===void 0&&(e={}),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(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||To(c)};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 o=this.getPanes();if(o!==null&&o[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 r=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-r.left-r.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var s=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,l=s;a<l.length;a++){var u=l[a];this.eventListeners.push(google.maps.event.addListener(this.div,u,To))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var o=0,r=0,s=n.getBounds();s&&!s.contains(this.position)&&n.setCenter(this.position);var a=n.getDiv(),l=a.offsetWidth,u=a.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,p=this.div.offsetWidth,d=this.div.offsetHeight,h=this.infoBoxClearance.width,E=this.infoBoxClearance.height,m=this.getProjection(),C=m.fromLatLngToContainerPixel(this.position);C!==null&&(C.x<-c+h?o=C.x+c-h:C.x+p+c+h>l&&(o=C.x+p+c+h-l),this.alignBottom?C.y<-f+E+d?r=C.y+f-E-d:C.y+f+E>u&&(r=C.y+f+E-u):C.y<-f+E?r=C.y+f-E:C.y+d+f+E>u&&(r=C.y+d+f+E-u)),o===0&&r===0||n.panBy(o,r)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var o=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+o*100+')"',this.div.style.filter="alpha(opacity="+o*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")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,o=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;o&&(e.top=parseInt(o.borderTopWidth||"",10)||0,e.bottom=parseInt(o.borderBottomWidth||"",10)||0,e.left=parseInt(o.borderLeftWidth||"",10)||0,e.right=parseInt(o.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var r=this.div.currentStyle;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var o=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var r=n.getPosition();o.setPosition(r)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){o.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var o=n[e];google.maps.event.removeListener(o)}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)},t.prototype.extend=function(e,n){return(function(r){for(var s in r.prototype)Object.prototype.hasOwnProperty.call(this,s)||(this.prototype[s]=r.prototype[s]);return this}).apply(e,[n])},t}(),Io={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},_o={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Ss={};function ks(t){var e=t.children,n=t.anchor,o=t.options,r=t.position,s=t.zIndex,a=t.onCloseClick,l=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,d=t.onUnmount,h=i.useContext(ue),E=i.useState(null),m=E[0],C=E[1],x=i.useState(null),P=x[0],w=x[1],I=i.useState(null),v=I[0],b=I[1],S=i.useState(null),T=S[0],U=S[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useRef(null);return i.useEffect(function(){h&&m!==null&&(m.close(),n?m.open(h,n):m.getPosition()&&m.open(h))},[h,m,n]),i.useEffect(function(){o&&m!==null&&m.setOptions(o)},[m,o]),i.useEffect(function(){if(r&&m!==null){var $=r instanceof google.maps.LatLng?r:new google.maps.LatLng(r.lat,r.lng);m.setPosition($)}},[r]),i.useEffect(function(){typeof s=="number"&&m!==null&&m.setZIndex(s)},[s]),i.useEffect(function(){m&&a&&(P!==null&&google.maps.event.removeListener(P),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(v!==null&&google.maps.event.removeListener(v),b(google.maps.event.addListener(m,"domready",l)))},[l]),i.useEffect(function(){m&&u&&(T!==null&&google.maps.event.removeListener(T),U(google.maps.event.addListener(m,"content_changed",u)))},[u]),i.useEffect(function(){m&&c&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(m,"position_changed",c)))},[c]),i.useEffect(function(){m&&f&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),i.useEffect(function(){if(h){var $=o||Ss,W=$.position,Q=Cn($,["position"]),M=void 0;W&&!(W instanceof google.maps.LatLng)&&(M=new google.maps.LatLng(W.lat,W.lng));var k=new Oo(ee(ee({},Q),M?{position:M}:{}));H.current=document.createElement("div"),C(k),a&&w(google.maps.event.addListener(k,"closeclick",a)),l&&b(google.maps.event.addListener(k,"domready",l)),u&&U(google.maps.event.addListener(k,"content_changed",u)),c&&X(google.maps.event.addListener(k,"position_changed",c)),f&&V(google.maps.event.addListener(k,"zindex_changed",f)),k.setContent(H.current),n?k.open(h,n):k.getPosition()?k.open(h):$e(!1,"You must provide either an anchor or a position prop for <InfoBox>."),p&&p(k)}return function(){m!==null&&(P&&google.maps.event.removeListener(P),T&&google.maps.event.removeListener(T),v&&google.maps.event.removeListener(v),z&&google.maps.event.removeListener(z),F&&google.maps.event.removeListener(F),d&&d(m),m.close())}},[]),H.current?pt.createPortal(i.Children.only(e),H.current):null}i.memo(ks),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(o,r){r?n.context!==null&&o.open(n.context,r):o.getPosition()?n.context!==null&&o.open(n.context):$e(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},o=n.position,r=Cn(n,["position"]),s;o&&!(o instanceof google.maps.LatLng)&&(s=new google.maps.LatLng(o.lat,o.lng));var a=new Oo(ee(ee({},r),s?{position:s}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:_o,eventMap:Io,prevProps:{},nextProps:this.props,instance:a}),this.setState({infoBox:a},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var o=this.state.infoBox;o!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:_o,eventMap:Io,prevProps:n,nextProps:this.props,instance:o}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,o=this.state.infoBox;o!==null&&(n&&n(o),pe(this.registeredEvents),o.close())},e.prototype.render=function(){return this.containerElement?pt.createPortal(i.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(i.PureComponent);var Ms=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(e)){if(o=e.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var a=s[r];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n},Ro=fo(Ms);const Do=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],En=1,_t=8;class wn{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,o]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const r=o>>4;if(r!==En)throw new Error(`Got v${r} data when expected v${En}.`);const s=Do[o&15];if(!s)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,2,1),[l]=new Uint32Array(e,4,1);return new wn(l,a,s,e)}constructor(e,n=64,o=Float64Array,r){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=o,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=Do.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${o}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,_t,e),this.coords=new this.ArrayType(this.data,_t+l+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(_t+a+l+u),this.ids=new this.IndexArrayType(this.data,_t,e),this.coords=new this.ArrayType(this.data,_t+l+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(En<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=e,this.coords[this._pos++]=n,o}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Sn(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,o,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:a,nodeSize:l}=this,u=[0,s.length-1,0],c=[];for(;u.length;){const f=u.pop()||0,p=u.pop()||0,d=u.pop()||0;if(p-d<=l){for(let C=d;C<=p;C++){const x=a[2*C],P=a[2*C+1];x>=e&&x<=o&&P>=n&&P<=r&&c.push(s[C])}continue}const h=d+p>>1,E=a[2*h],m=a[2*h+1];E>=e&&E<=o&&m>=n&&m<=r&&c.push(s[h]),(f===0?e<=E:n<=m)&&(u.push(d),u.push(h-1),u.push(1-f)),(f===0?o>=E:r>=m)&&(u.push(h+1),u.push(p),u.push(1-f))}return c}within(e,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:s,nodeSize:a}=this,l=[0,r.length-1,0],u=[],c=o*o;for(;l.length;){const f=l.pop()||0,p=l.pop()||0,d=l.pop()||0;if(p-d<=a){for(let C=d;C<=p;C++)No(s[2*C],s[2*C+1],e,n)<=c&&u.push(r[C]);continue}const h=d+p>>1,E=s[2*h],m=s[2*h+1];No(E,m,e,n)<=c&&u.push(r[h]),(f===0?e-o<=E:n-o<=m)&&(l.push(d),l.push(h-1),l.push(1-f)),(f===0?e+o>=E:n+o>=m)&&(l.push(h+1),l.push(p),l.push(1-f))}return u}}function Sn(t,e,n,o,r,s){if(r-o<=n)return;const a=o+r>>1;jo(t,e,a,o,r,s),Sn(t,e,n,o,a-1,1-s),Sn(t,e,n,a+1,r,1-s)}function jo(t,e,n,o,r,s){for(;r>o;){if(r-o>600){const c=r-o+1,f=n-o+1,p=Math.log(c),d=.5*Math.exp(2*p/3),h=.5*Math.sqrt(p*d*(c-d)/c)*(f-c/2<0?-1:1),E=Math.max(o,Math.floor(n-f*d/c+h)),m=Math.min(r,Math.floor(n+(c-f)*d/c+h));jo(t,e,n,E,m,s)}const a=e[2*n+s];let l=o,u=r;for(Rt(t,e,o,n),e[2*r+s]>a&&Rt(t,e,o,r);l<u;){for(Rt(t,e,l,u),l++,u--;e[2*l+s]<a;)l++;for(;e[2*u+s]>a;)u--}e[2*o+s]===a?Rt(t,e,o,u):(u++,Rt(t,e,u,r)),u<=n&&(o=u+1),n<=u&&(r=u-1)}}function Rt(t,e,n,o){kn(t,n,o),kn(e,2*n,2*o),kn(e,2*n+1,2*o+1)}function kn(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function No(t,e,n,o){const r=t-n,s=e-o;return r*r+s*s}const Ps={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Bo=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mt=2,st=3,Mn=4,at=5,$o=6;class Ts{constructor(e){this.options=Object.assign(Object.create(Ps),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:o,maxZoom:r}=this.options;n&&console.time("total time");const s=`prepare ${e.length} points`;n&&console.time(s),this.points=e;const a=[];for(let u=0;u<e.length;u++){const c=e[u];if(!c.geometry)continue;const[f,p]=c.geometry.coordinates,d=Bo(qt(f)),h=Bo(Kt(p));a.push(d,h,1/0,u,-1,1),this.options.reduce&&a.push(0)}let l=this.trees[r+1]=this._createTree(a);n&&console.timeEnd(s);for(let u=r;u>=o;u--){const c=+Date.now();l=this.trees[u]=this._createTree(this._cluster(l,u)),n&&console.log("z%d: %d clusters in %dms",u,l.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let o=((e[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)o=-180,s=180;else if(o>s){const p=this.getClusters([o,r,180,a],n),d=this.getClusters([-180,r,s,a],n);return p.concat(d)}const l=this.trees[this._limitZoom(n)],u=l.range(qt(o),Kt(a),qt(s),Kt(r)),c=l.data,f=[];for(const p of u){const d=this.stride*p;f.push(c[d+at]>1?Ao(c,d,this.clusterProps):this.points[c[d+st]])}return f}getChildren(e){const n=this._getOriginId(e),o=this._getOriginZoom(e),r="No cluster with the specified id.",s=this.trees[o];if(!s)throw new Error(r);const a=s.data;if(n*this.stride>=a.length)throw new Error(r);const l=this.options.radius/(this.options.extent*Math.pow(2,o-1)),u=a[n*this.stride],c=a[n*this.stride+1],f=s.within(u,c,l),p=[];for(const d of f){const h=d*this.stride;a[h+Mn]===e&&p.push(a[h+at]>1?Ao(a,h,this.clusterProps):this.points[a[h+st]])}if(p.length===0)throw new Error(r);return p}getLeaves(e,n,o){n=n||10,o=o||0;const r=[];return this._appendLeaves(r,e,n,o,0),r}getTile(e,n,o){const r=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:a,radius:l}=this.options,u=l/a,c=(o-u)/s,f=(o+1+u)/s,p={features:[]};return this._addTileFeatures(r.range((n-u)/s,c,(n+1+u)/s,f),r.data,n,o,s,p),n===0&&this._addTileFeatures(r.range(1-u/s,c,1,f),r.data,s,o,s,p),n===s-1&&this._addTileFeatures(r.range(0,c,u/s,f),r.data,-1,o,s,p),p.features.length?p:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const o=this.getChildren(e);if(n++,o.length!==1)break;e=o[0].properties.cluster_id}return n}_appendLeaves(e,n,o,r,s){const a=this.getChildren(n);for(const l of a){const u=l.properties;if(u&&u.cluster?s+u.point_count<=r?s+=u.point_count:s=this._appendLeaves(e,u.cluster_id,o,r,s):s<r?s++:e.push(l),e.length===o)break}return s}_createTree(e){const n=new wn(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let o=0;o<e.length;o+=this.stride)n.add(e[o],e[o+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,o,r,s,a){for(const l of e){const u=l*this.stride,c=n[u+at]>1;let f,p,d;if(c)f=zo(n,u,this.clusterProps),p=n[u],d=n[u+1];else{const m=this.points[n[u+st]];f=m.properties;const[C,x]=m.geometry.coordinates;p=qt(C),d=Kt(x)}const h={type:1,geometry:[[Math.round(this.options.extent*(p*s-o)),Math.round(this.options.extent*(d*s-r))]],tags:f};let E;c||this.options.generateId?E=n[u+st]:E=this.points[n[u+st]].id,E!==void 0&&(h.id=E),a.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:o,extent:r,reduce:s,minPoints:a}=this.options,l=o/(r*Math.pow(2,n)),u=e.data,c=[],f=this.stride;for(let p=0;p<u.length;p+=f){if(u[p+mt]<=n)continue;u[p+mt]=n;const d=u[p],h=u[p+1],E=e.within(u[p],u[p+1],l),m=u[p+at];let C=m;for(const x of E){const P=x*f;u[P+mt]>n&&(C+=u[P+at])}if(C>m&&C>=a){let x=d*m,P=h*m,w,I=-1;const v=((p/f|0)<<5)+(n+1)+this.points.length;for(const b of E){const S=b*f;if(u[S+mt]<=n)continue;u[S+mt]=n;const T=u[S+at];x+=u[S]*T,P+=u[S+1]*T,u[S+Mn]=v,s&&(w||(w=this._map(u,p,!0),I=this.clusterProps.length,this.clusterProps.push(w)),s(w,this._map(u,S)))}u[p+Mn]=v,c.push(x/C,P/C,1/0,v,-1,C),s&&c.push(I)}else{for(let x=0;x<f;x++)c.push(u[p+x]);if(C>1)for(const x of E){const P=x*f;if(!(u[P+mt]<=n)){u[P+mt]=n;for(let w=0;w<f;w++)c.push(u[P+w])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,o){if(e[n+at]>1){const a=this.clusterProps[e[n+$o]];return o?Object.assign({},a):a}const r=this.points[e[n+st]].properties,s=this.options.map(r);return o&&s===r?Object.assign({},s):s}}function Ao(t,e,n){return{type:"Feature",id:t[e+st],properties:zo(t,e,n),geometry:{type:"Point",coordinates:[Os(t[e]),Is(t[e+1])]}}}function zo(t,e,n){const o=t[e+at],r=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?`${Math.round(o/100)/10}k`:o,s=t[e+$o],a=s===-1?{}:Object.assign({},n[s]);return Object.assign(a,{cluster:!0,cluster_id:t[e+st],point_count:o,point_count_abbreviated:r})}function qt(t){return t/360+.5}function Kt(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Os(t){return(t-.5)*360}function Is(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
53
|
+
`)),console.error(z)})},[n,E,a]);var S=l.useRef();return l.useEffect(function(){S.current&&f!==S.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"),S.current=f},[f]),{isLoaded:D,loadError:O,url:E}}var nf=x.jsx(Xa,{});function rf(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,a=t.children,o=ci(t,["loadingElement","onLoad","onError","onUnmount","children"]),s=tf(o),u=s.isLoaded,c=s.loadError;return l.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),l.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),l.useEffect(function(){return function(){i&&i()}},[i]),u?a:e||nf}l.memo(rf);var Qa;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Qa||(Qa={}));var $a={},eo={options:function(t,e){t.setOptions(e)}};function af(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=l.useContext(Le),a=l.useState(null),o=a[0],s=a[1];return l.useEffect(function(){o!==null&&o.setMap(i)},[i]),l.useEffect(function(){e&&o!==null&&o.setOptions(e)},[o,e]),l.useEffect(function(){var u=new google.maps.TrafficLayer(me(me({},e||{}),{map:i}));return s(u),n&&n(u),function(){o!==null&&(r&&r(o),o.setMap(null))}},[]),null}l.memo(af),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:eo,eventMap:$a,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:eo,eventMap:$a,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Pe(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);function of(t){var e=t.onLoad,n=t.onUnmount,r=l.useContext(Le),i=l.useState(null),a=i[0],o=i[1];return l.useEffect(function(){a!==null&&a.setMap(r)},[r]),l.useEffect(function(){var s=new google.maps.BicyclingLayer;return o(s),s.setMap(r),e&&e(s),function(){s!==null&&(n&&n(s),s.setMap(null))}},[]),null}l.memo(of),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);function sf(t){var e=t.onLoad,n=t.onUnmount,r=l.useContext(Le),i=l.useState(null),a=i[0],o=i[1];return l.useEffect(function(){a!==null&&a.setMap(r)},[r]),l.useEffect(function(){var s=new google.maps.TransitLayer;return o(s),s.setMap(r),e&&e(s),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}l.memo(sf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var to={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},no={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function uf(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,a=t.onOverlayComplete,o=t.onPolygonComplete,s=t.onPolylineComplete,u=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,h=l.useContext(Le),p=l.useState(null),g=p[0],C=p[1],v=l.useState(null),d=v[0],D=v[1],B=l.useState(null),w=B[0],O=B[1],b=l.useState(null),E=b[0],S=b[1],F=l.useState(null),V=F[0],P=F[1],z=l.useState(null),R=z[0],j=z[1],I=l.useState(null),N=I[0],X=I[1];return l.useEffect(function(){g!==null&&g.setMap(h)},[h]),l.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),l.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),l.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),l.useEffect(function(){g&&i&&(w!==null&&google.maps.event.removeListener(w),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),l.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),S(google.maps.event.addListener(g,"overlaycomplete",a)))},[g,a]),l.useEffect(function(){g&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(g,"polygoncomplete",o)))},[g,o]),l.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),j(google.maps.event.addListener(g,"polylinecomplete",s)))},[g,s]),l.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),X(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),l.useEffect(function(){tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var _=new google.maps.drawing.DrawingManager(me(me({},e||{}),{map:h}));return n&&_.setDrawingMode(n),r&&D(google.maps.event.addListener(_,"circlecomplete",r)),i&&O(google.maps.event.addListener(_,"markercomplete",i)),a&&S(google.maps.event.addListener(_,"overlaycomplete",a)),o&&P(google.maps.event.addListener(_,"polygoncomplete",o)),s&&j(google.maps.event.addListener(_,"polylinecomplete",s)),u&&X(google.maps.event.addListener(_,"rectanglecomplete",u)),C(_),c&&c(_),function(){g!==null&&(d&&google.maps.event.removeListener(d),w&&google.maps.event.removeListener(w),E&&google.maps.event.removeListener(E),V&&google.maps.event.removeListener(V),R&&google.maps.event.removeListener(R),N&&google.maps.event.removeListener(N),f&&f(g),g.setMap(null))}},[]),null}l.memo(uf),function(t){Ve(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:no,eventMap:to,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:no,eventMap:to,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Pe(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var ro={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"},io={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},dr={};function lf(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,a=t.children,o=t.draggable,s=t.visible,u=t.animation,c=t.clickable,f=t.cursor,h=t.icon,p=t.label,g=t.opacity,C=t.shape,v=t.title,d=t.zIndex,D=t.onClick,B=t.onDblClick,w=t.onDrag,O=t.onDragEnd,b=t.onDragStart,E=t.onMouseOut,S=t.onMouseOver,F=t.onMouseUp,V=t.onMouseDown,P=t.onRightClick,z=t.onClickableChanged,R=t.onCursorChanged,j=t.onAnimationChanged,I=t.onDraggableChanged,N=t.onFlatChanged,X=t.onIconChanged,_=t.onPositionChanged,$=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,T=t.onZindexChanged,Z=t.onLoad,H=t.onUnmount,Q=l.useContext(Le),K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ae=l.useState(null),de=ae[0],pe=ae[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1],ve=l.useState(null),je=ve[0],se=ve[1],Ne=l.useState(null),fe=Ne[0],we=Ne[1],Me=l.useState(null),He=Me[0],qe=Me[1],Ee=l.useState(null),ut=Ee[0],at=Ee[1],At=l.useState(null),ht=At[0],wt=At[1],Tt=l.useState(null),vt=Tt[0],tn=Tt[1],be=l.useState(null),Te=be[0],Re=be[1],nt=l.useState(null),ot=nt[0],Ot=nt[1],yn=l.useState(null),Fn=yn[0],sr=yn[1],ri=l.useState(null),Cn=ri[0],ur=ri[1],ii=l.useState(null),Pn=ii[0],lr=ii[1],cr=l.useState(null),Mn=cr[0],ai=cr[1],oi=l.useState(null),kn=oi[0],L=oi[1],te=l.useState(null),oe=te[0],De=te[1],Ie=l.useState(null),_e=Ie[0],ke=Ie[1],Oe=l.useState(null),rt=Oe[0],Ke=Oe[1],$e=l.useState(null),ct=$e[0],zt=$e[1];l.useEffect(function(){y!==null&&y.setMap(Q)},[Q]),l.useEffect(function(){typeof n<"u"&&y!==null&&y.setOptions(n)},[y,n]),l.useEffect(function(){typeof o<"u"&&y!==null&&y.setDraggable(o)},[y,o]),l.useEffect(function(){e&&y!==null&&y.setPosition(e)},[y,e]),l.useEffect(function(){typeof s<"u"&&y!==null&&y.setVisible(s)},[y,s]),l.useEffect(function(){y==null||y.setAnimation(u)},[y,u]),l.useEffect(function(){y&&c!==void 0&&y.setClickable(c)},[y,c]),l.useEffect(function(){y&&f!==void 0&&y.setCursor(f)},[y,f]),l.useEffect(function(){y&&h!==void 0&&y.setIcon(h)},[y,h]),l.useEffect(function(){y&&p!==void 0&&y.setLabel(p)},[y,p]),l.useEffect(function(){y&&g!==void 0&&y.setOpacity(g)},[y,g]),l.useEffect(function(){y&&C!==void 0&&y.setShape(C)},[y,C]),l.useEffect(function(){y&&v!==void 0&&y.setTitle(v)},[y,v]),l.useEffect(function(){y&&d!==void 0&&y.setZIndex(d)},[y,d]),l.useEffect(function(){y&&B&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(y,"dblclick",B)))},[B]),l.useEffect(function(){y&&O&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(y,"dragend",O)))},[O]),l.useEffect(function(){y&&b&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(y,"dragstart",b)))},[b]),l.useEffect(function(){y&&V&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(y,"mousedown",V)))},[V]),l.useEffect(function(){y&&E&&(je!==null&&google.maps.event.removeListener(je),se(google.maps.event.addListener(y,"mouseout",E)))},[E]),l.useEffect(function(){y&&S&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(y,"mouseover",S)))},[S]),l.useEffect(function(){y&&F&&(He!==null&&google.maps.event.removeListener(He),qe(google.maps.event.addListener(y,"mouseup",F)))},[F]),l.useEffect(function(){y&&P&&(ut!==null&&google.maps.event.removeListener(ut),at(google.maps.event.addListener(y,"rightclick",P)))},[P]),l.useEffect(function(){y&&D&&(ht!==null&&google.maps.event.removeListener(ht),wt(google.maps.event.addListener(y,"click",D)))},[D]),l.useEffect(function(){y&&w&&(vt!==null&&google.maps.event.removeListener(vt),tn(google.maps.event.addListener(y,"drag",w)))},[w]),l.useEffect(function(){y&&z&&(Te!==null&&google.maps.event.removeListener(Te),Re(google.maps.event.addListener(y,"clickable_changed",z)))},[z]),l.useEffect(function(){y&&R&&(ot!==null&&google.maps.event.removeListener(ot),Ot(google.maps.event.addListener(y,"cursor_changed",R)))},[R]),l.useEffect(function(){y&&j&&(Fn!==null&&google.maps.event.removeListener(Fn),sr(google.maps.event.addListener(y,"animation_changed",j)))},[j]),l.useEffect(function(){y&&I&&(Cn!==null&&google.maps.event.removeListener(Cn),ur(google.maps.event.addListener(y,"draggable_changed",I)))},[I]),l.useEffect(function(){y&&N&&(Pn!==null&&google.maps.event.removeListener(Pn),lr(google.maps.event.addListener(y,"flat_changed",N)))},[N]),l.useEffect(function(){y&&X&&(Mn!==null&&google.maps.event.removeListener(Mn),ai(google.maps.event.addListener(y,"icon_changed",X)))},[X]),l.useEffect(function(){y&&_&&(kn!==null&&google.maps.event.removeListener(kn),L(google.maps.event.addListener(y,"position_changed",_)))},[_]),l.useEffect(function(){y&&$&&(oe!==null&&google.maps.event.removeListener(oe),De(google.maps.event.addListener(y,"shape_changed",$)))},[$]),l.useEffect(function(){y&&re&&(_e!==null&&google.maps.event.removeListener(_e),ke(google.maps.event.addListener(y,"title_changed",re)))},[re]),l.useEffect(function(){y&&k&&(rt!==null&&google.maps.event.removeListener(rt),Ke(google.maps.event.addListener(y,"visible_changed",k)))},[k]),l.useEffect(function(){y&&T&&(ct!==null&&google.maps.event.removeListener(ct),zt(google.maps.event.addListener(y,"zindex_changed",T)))},[T]),l.useEffect(function(){var it=me(me(me({},n||dr),r?dr:{map:Q}),{position:e}),Be=new google.maps.Marker(it);return r?r.addMarker(Be,!!i):Be.setMap(Q),e&&Be.setPosition(e),typeof s<"u"&&Be.setVisible(s),typeof o<"u"&&Be.setDraggable(o),typeof c<"u"&&Be.setClickable(c),typeof f=="string"&&Be.setCursor(f),h&&Be.setIcon(h),typeof p<"u"&&Be.setLabel(p),typeof g<"u"&&Be.setOpacity(g),C&&Be.setShape(C),typeof v=="string"&&Be.setTitle(v),typeof d=="number"&&Be.setZIndex(d),B&&J(google.maps.event.addListener(Be,"dblclick",B)),O&&ue(google.maps.event.addListener(Be,"dragend",O)),b&&pe(google.maps.event.addListener(Be,"dragstart",b)),V&&ge(google.maps.event.addListener(Be,"mousedown",V)),E&&se(google.maps.event.addListener(Be,"mouseout",E)),S&&we(google.maps.event.addListener(Be,"mouseover",S)),F&&qe(google.maps.event.addListener(Be,"mouseup",F)),P&&at(google.maps.event.addListener(Be,"rightclick",P)),D&&wt(google.maps.event.addListener(Be,"click",D)),w&&tn(google.maps.event.addListener(Be,"drag",w)),z&&Re(google.maps.event.addListener(Be,"clickable_changed",z)),R&&Ot(google.maps.event.addListener(Be,"cursor_changed",R)),j&&sr(google.maps.event.addListener(Be,"animation_changed",j)),I&&ur(google.maps.event.addListener(Be,"draggable_changed",I)),N&&lr(google.maps.event.addListener(Be,"flat_changed",N)),X&&ai(google.maps.event.addListener(Be,"icon_changed",X)),_&&L(google.maps.event.addListener(Be,"position_changed",_)),$&&De(google.maps.event.addListener(Be,"shape_changed",$)),re&&ke(google.maps.event.addListener(Be,"title_changed",re)),k&&Ke(google.maps.event.addListener(Be,"visible_changed",k)),T&&zt(google.maps.event.addListener(Be,"zindex_changed",T)),U(Be),Z&&Z(Be),function(){M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),je!==null&&google.maps.event.removeListener(je),fe!==null&&google.maps.event.removeListener(fe),He!==null&&google.maps.event.removeListener(He),ut!==null&&google.maps.event.removeListener(ut),ht!==null&&google.maps.event.removeListener(ht),Te!==null&&google.maps.event.removeListener(Te),ot!==null&&google.maps.event.removeListener(ot),Fn!==null&&google.maps.event.removeListener(Fn),Cn!==null&&google.maps.event.removeListener(Cn),Pn!==null&&google.maps.event.removeListener(Pn),Mn!==null&&google.maps.event.removeListener(Mn),kn!==null&&google.maps.event.removeListener(kn),_e!==null&&google.maps.event.removeListener(_e),rt!==null&&google.maps.event.removeListener(rt),ct!==null&&google.maps.event.removeListener(ct),H&&H(Be),r?r.removeMarker(Be,!!i):Be&&Be.setMap(null)}},[]);var _t=l.useMemo(function(){return a?l.Children.map(a,function(it){if(!l.isValidElement(it))return it;var Be=it;return l.cloneElement(Be,{anchor:y})}):null},[a,y]);return x.jsx(x.Fragment,{children:_t})||null}l.memo(lf);var cf=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=me(me(me({},this.props.options||dr),this.props.clusterer?dr:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=Fe({updaterMap:io,eventMap:ro,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:io,eventMap:ro,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Pe(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=l.Children.map(this.props.children,function(i){if(!l.isValidElement(i))return i;var a=i;return l.cloneElement(a,{anchor:n.marker})})),r||null},e.contextType=Le,e}(l.PureComponent),ff=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,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(e.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 t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),a=n.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(i),this.timeOut=window.setTimeout(function(){var o=n.getMap();if(o!==null){"fitBounds"in o&&o.fitBounds(i);var s=o.getZoom()||0;r!==null&&s>r&&o.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"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))},t.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)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,a,o;if(this.div&&this.center){var s=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),c=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.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=s,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var g=document.createElement("div");g.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")),!((r=this.sums)===null||r===void 0)&&r.text&&(g.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((a=this.sums)===null||a===void 0)&&a.html&&(g.innerHTML="".concat((o=this.sums)===null||o===void 0?void 0:o.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(g),this.div.title=s,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),df=function(){function t(e){this.markerClusterer=e,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 ff(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 t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var a=i[r],o=a.getPosition();o&&e.extend(o)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var a=this.markers.length,o=this.markerClusterer.getMaxZoom(),s=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(o!==null&&typeof s<"u"&&s>o)e.getMap()!==this.map&&e.setMap(this.map);else if(a<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(a===this.minClusterSize)for(var u=0,c=this.markers;u<c.length;u++){var f=c[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<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()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function pf(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var hf=2e3,vf=500,gf="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",mf="png",yf=[53,56,66,78,90],Cf="cluster",ao=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),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(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||gf,this.imageExtension=r.imageExtension||mf,this.imageSizes=r.imageSizes||yf,this.calculator=r.calculator||pf,this.batchSize=r.batchSize||hf,this.batchSizeIE=r.batchSizeIE||vf,this.clusterClass=r.clusterClass||Cf,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,a=this.clusters;i<a.length;i++){var o=a[i];o.remove()}this.clusters=[];for(var s=0,u=this.listeners;s<u.length;s++){var c=u[s];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.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}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var a=i[r],o=a.getPosition();o&&n.extend(o)}var s=this.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,a=e;i<a.length;i++){var o=a[i];r=r||this.removeMarker_(o)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var a=i[r];a.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var a=n.fromDivPixelToLatLng(r);a!==null&&e.extend(a)}if(i!==null){var o=n.fromDivPixelToLatLng(i);o!==null&&e.extend(o)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var a=0,o=this.markers;a<o.length;a++){var s=o[a];s.isAdded=!1,e&&s.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,a=(n.lng()-e.lng())*Math.PI/180,o=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(a/2)*Math.sin(a/2);return r*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,a=0,o=this.clusters;a<o.length;a++){var s=o[a];n=s;var u=n.getCenter(),c=e.getPosition();if(u&&c){var f=this.distanceBetweenPoints(u,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new df(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,a=(r==null?void 0:r.getZoom())||0,o=a>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(o),u=Math.min(e+this.batchSize,this.markers.length),c=e;c<u;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,s)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.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 g=p[h];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype){var o=a;this.prototype[o]=i.prototype[o]}return this}).apply(e,[n])},t}(),Bt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ze={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Df={};function bf(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,a=t.calculator,o=t.clusterClass,s=t.enableRetinaIcons,u=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,h=t.imagePath,p=t.imageSizes,g=t.maxZoom,C=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,B=t.onClick,w=t.onClusteringBegin,O=t.onClusteringEnd,b=t.onMouseOver,E=t.onMouseOut,S=t.onLoad,F=t.onUnmount,V=l.useState(null),P=V[0],z=V[1],R=l.useContext(Le),j=l.useState(null),I=j[0],N=j[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),k=re[0],T=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1];return l.useEffect(function(){P&&E&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(P,Bt.onMouseOut,E)))},[E]),l.useEffect(function(){P&&b&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(P,Bt.onMouseOver,b)))},[b]),l.useEffect(function(){P&&B&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(P,Bt.onClick,B)))},[B]),l.useEffect(function(){P&&w&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(P,Bt.onClusteringBegin,w)))},[w]),l.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),$(google.maps.event.addListener(P,Bt.onClusteringEnd,O)))},[O]),l.useEffect(function(){typeof r<"u"&&P!==null&&ze.averageCenter(P,r)},[P,r]),l.useEffect(function(){typeof i<"u"&&P!==null&&ze.batchSizeIE(P,i)},[P,i]),l.useEffect(function(){typeof a<"u"&&P!==null&&ze.calculator(P,a)},[P,a]),l.useEffect(function(){typeof o<"u"&&P!==null&&ze.clusterClass(P,o)},[P,o]),l.useEffect(function(){typeof s<"u"&&P!==null&&ze.enableRetinaIcons(P,s)},[P,s]),l.useEffect(function(){typeof u<"u"&&P!==null&&ze.gridSize(P,u)},[P,u]),l.useEffect(function(){typeof c<"u"&&P!==null&&ze.ignoreHidden(P,c)},[P,c]),l.useEffect(function(){typeof f<"u"&&P!==null&&ze.imageExtension(P,f)},[P,f]),l.useEffect(function(){typeof h<"u"&&P!==null&&ze.imagePath(P,h)},[P,h]),l.useEffect(function(){typeof p<"u"&&P!==null&&ze.imageSizes(P,p)},[P,p]),l.useEffect(function(){typeof g<"u"&&P!==null&&ze.maxZoom(P,g)},[P,g]),l.useEffect(function(){typeof C<"u"&&P!==null&&ze.minimumClusterSize(P,C)},[P,C]),l.useEffect(function(){typeof v<"u"&&P!==null&&ze.styles(P,v)},[P,v]),l.useEffect(function(){typeof d<"u"&&P!==null&&ze.title(P,d)},[P,d]),l.useEffect(function(){typeof D<"u"&&P!==null&&ze.zoomOnClick(P,D)},[P,D]),l.useEffect(function(){if(R){var W=me({},n||Df),M=new ao(R,[],W);return r&&ze.averageCenter(M,r),i&&ze.batchSizeIE(M,i),a&&ze.calculator(M,a),o&&ze.clusterClass(M,o),s&&ze.enableRetinaIcons(M,s),u&&ze.gridSize(M,u),c&&ze.ignoreHidden(M,c),f&&ze.imageExtension(M,f),h&&ze.imagePath(M,h),p&&ze.imageSizes(M,p),g&&ze.maxZoom(M,g),C&&ze.minimumClusterSize(M,C),v&&ze.styles(M,v),d&&ze.title(M,d),D&&ze.zoomOnClick(M,D),E&&Q(google.maps.event.addListener(M,Bt.onMouseOut,E)),b&&U(google.maps.event.addListener(M,Bt.onMouseOver,b)),B&&N(google.maps.event.addListener(M,Bt.onClick,B)),w&&$(google.maps.event.addListener(M,Bt.onClusteringBegin,w)),O&&T(google.maps.event.addListener(M,Bt.onClusteringEnd,O)),z(M),S&&S(M),function(){H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),I!==null&&google.maps.event.removeListener(I),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),F&&F(M)}}},[]),P!==null&&e(P)||null}l.memo(bf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new ao(this.context,[],this.props.options);this.registeredEvents=Fe({updaterMap:ze,eventMap:Bt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:ze,eventMap:Bt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Pe(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=Le,e}(l.PureComponent);function oo(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var so=function(){function t(e){e===void 0&&(e={}),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(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||oo(c)};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 r=this.getPanes();if(r!==null&&r[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 i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var a=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0,s=a;o<s.length;o++){var u=s[o];this.eventListeners.push(google.maps.event.addListener(this.div,u,oo))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,a=n.getBounds();a&&!a.contains(this.position)&&n.setCenter(this.position);var o=n.getDiv(),s=o.offsetWidth,u=o.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,p=this.div.offsetHeight,g=this.infoBoxClearance.width,C=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-c+g?r=d.x+c-g:d.x+h+c+g>s&&(r=d.x+h+c+g-s),this.alignBottom?d.y<-f+C+p?i=d.y+f-C-p:d.y+f+C>u&&(i=d.y+f+C-u):d.y<-f+C?i=d.y+f-C:d.y+p+f+C>u&&(i=d.y+p+f+C-u)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*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")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}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)},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype)Object.prototype.hasOwnProperty.call(this,a)||(this.prototype[a]=i.prototype[a]);return this}).apply(e,[n])},t}(),uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},lo={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Ef={};function wf(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=l.useContext(Le),C=l.useState(null),v=C[0],d=C[1],D=l.useState(null),B=D[0],w=D[1],O=l.useState(null),b=O[0],E=O[1],S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],j=l.useState(null),I=j[0],N=j[1],X=l.useRef(null);return l.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),l.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),l.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),l.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),l.useEffect(function(){v&&o&&(B!==null&&google.maps.event.removeListener(B),w(google.maps.event.addListener(v,"closeclick",o)))},[o]),l.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),E(google.maps.event.addListener(v,"domready",s)))},[s]),l.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),l.useEffect(function(){v&&c&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(v,"position_changed",c)))},[c]),l.useEffect(function(){v&&f&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),l.useEffect(function(){if(g){var _=r||Ef,$=_.position,re=ci(_,["position"]),k=void 0;$&&!($ instanceof google.maps.LatLng)&&(k=new google.maps.LatLng($.lat,$.lng));var T=new so(me(me({},re),k?{position:k}:{}));X.current=document.createElement("div"),d(T),o&&w(google.maps.event.addListener(T,"closeclick",o)),s&&E(google.maps.event.addListener(T,"domready",s)),u&&V(google.maps.event.addListener(T,"content_changed",u)),c&&R(google.maps.event.addListener(T,"position_changed",c)),f&&N(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(X.current),n?T.open(g,n):T.getPosition()?T.open(g):tt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(T)}return function(){v!==null&&(B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),b&&google.maps.event.removeListener(b),z&&google.maps.event.removeListener(z),I&&google.maps.event.removeListener(I),p&&p(v),v.close())}},[]),X.current?Wt.createPortal(l.Children.only(e),X.current):null}l.memo(wf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):tt(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ci(n,["position"]),a;r&&!(r instanceof google.maps.LatLng)&&(a=new google.maps.LatLng(r.lat,r.lng));var o=new so(me(me({},i),a?{position:a}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Fe({updaterMap:lo,eventMap:uo,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:lo,eventMap:uo,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Pe(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Wt.createPortal(l.Children.only(this.props.children),this.containerElement):null},e.contextType=Le,e}(l.PureComponent);var Bf=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n},co=Ha(Bf);const fo=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],di=1,jn=8;class pi{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==di)throw new Error(`Got v${i} data when expected v${di}.`);const a=fo[r&15];if(!a)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new pi(s,o,a,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const a=fo.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-s%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,jn,e),this.coords=new this.ArrayType(this.data,jn+s+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(jn+o+s+u),this.ids=new this.IndexArrayType(this.data,jn,e),this.coords=new this.ArrayType(this.data,jn+s+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(di<<4)+a]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return hi(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:a,coords:o,nodeSize:s}=this,u=[0,a.length-1,0],c=[];for(;u.length;){const f=u.pop()||0,h=u.pop()||0,p=u.pop()||0;if(h-p<=s){for(let d=p;d<=h;d++){const D=o[2*d],B=o[2*d+1];D>=e&&D<=r&&B>=n&&B<=i&&c.push(a[d])}continue}const g=p+h>>1,C=o[2*g],v=o[2*g+1];C>=e&&C<=r&&v>=n&&v<=i&&c.push(a[g]),(f===0?e<=C:n<=v)&&(u.push(p),u.push(g-1),u.push(1-f)),(f===0?r>=C:i>=v)&&(u.push(g+1),u.push(h),u.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],u=[],c=r*r;for(;s.length;){const f=s.pop()||0,h=s.pop()||0,p=s.pop()||0;if(h-p<=o){for(let d=p;d<=h;d++)ho(a[2*d],a[2*d+1],e,n)<=c&&u.push(i[d]);continue}const g=p+h>>1,C=a[2*g],v=a[2*g+1];ho(C,v,e,n)<=c&&u.push(i[g]),(f===0?e-r<=C:n-r<=v)&&(s.push(p),s.push(g-1),s.push(1-f)),(f===0?e+r>=C:n+r>=v)&&(s.push(g+1),s.push(h),s.push(1-f))}return u}}function hi(t,e,n,r,i,a){if(i-r<=n)return;const o=r+i>>1;po(t,e,o,r,i,a),hi(t,e,n,r,o-1,1-a),hi(t,e,n,o+1,i,1-a)}function po(t,e,n,r,i,a){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,h=Math.log(c),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(c-p)/c)*(f-c/2<0?-1:1),C=Math.max(r,Math.floor(n-f*p/c+g)),v=Math.min(i,Math.floor(n+(c-f)*p/c+g));po(t,e,n,C,v,a)}const o=e[2*n+a];let s=r,u=i;for(Nn(t,e,r,n),e[2*i+a]>o&&Nn(t,e,r,i);s<u;){for(Nn(t,e,s,u),s++,u--;e[2*s+a]<o;)s++;for(;e[2*u+a]>o;)u--}e[2*r+a]===o?Nn(t,e,r,u):(u++,Nn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Nn(t,e,n,r){vi(t,n,r),vi(e,2*n,2*r),vi(e,2*n+1,2*r+1)}function vi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ho(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}const xf={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},vo=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),an=2,Ht=3,gi=4,Vt=5,go=6;class Lf{constructor(e){this.options=Object.assign(Object.create(xf),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const a=`prepare ${e.length} points`;n&&console.time(a),this.points=e;const o=[];for(let u=0;u<e.length;u++){const c=e[u];if(!c.geometry)continue;const[f,h]=c.geometry.coordinates,p=vo(pr(f)),g=vo(hr(h));o.push(p,g,1/0,u,-1,1),this.options.reduce&&o.push(0)}let s=this.trees[i+1]=this._createTree(o);n&&console.timeEnd(a);for(let u=i;u>=r;u--){const c=+Date.now();s=this.trees[u]=this._createTree(this._cluster(s,u)),n&&console.log("z%d: %d clusters in %dms",u,s.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let a=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){const h=this.getClusters([r,i,180,o],n),p=this.getClusters([-180,i,a,o],n);return h.concat(p)}const s=this.trees[this._limitZoom(n)],u=s.range(pr(r),hr(o),pr(a),hr(i)),c=s.data,f=[];for(const h of u){const p=this.stride*h;f.push(c[p+Vt]>1?mo(c,p,this.clusterProps):this.points[c[p+Ht]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(i);const o=a.data;if(n*this.stride>=o.length)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=o[n*this.stride],c=o[n*this.stride+1],f=a.within(u,c,s),h=[];for(const p of f){const g=p*this.stride;o[g+gi]===e&&h.push(o[g+Vt]>1?mo(o,g,this.clusterProps):this.points[o[g+Ht]])}if(h.length===0)throw new Error(i);return h}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:o,radius:s}=this.options,u=s/o,c=(r-u)/a,f=(r+1+u)/a,h={features:[]};return this._addTileFeatures(i.range((n-u)/a,c,(n+1+u)/a,f),i.data,n,r,a,h),n===0&&this._addTileFeatures(i.range(1-u/a,c,1,f),i.data,a,r,a,h),n===a-1&&this._addTileFeatures(i.range(0,c,u/a,f),i.data,-1,r,a,h),h.features.length?h:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,a){const o=this.getChildren(n);for(const s of o){const u=s.properties;if(u&&u.cluster?a+u.point_count<=i?a+=u.point_count:a=this._appendLeaves(e,u.cluster_id,r,i,a):a<i?a++:e.push(s),e.length===r)break}return a}_createTree(e){const n=new pi(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,a,o){for(const s of e){const u=s*this.stride,c=n[u+Vt]>1;let f,h,p;if(c)f=yo(n,u,this.clusterProps),h=n[u],p=n[u+1];else{const v=this.points[n[u+Ht]];f=v.properties;const[d,D]=v.geometry.coordinates;h=pr(d),p=hr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(h*a-r)),Math.round(this.options.extent*(p*a-i))]],tags:f};let C;c||this.options.generateId?C=n[u+Ht]:C=this.points[n[u+Ht]].id,C!==void 0&&(g.id=C),o.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:a,minPoints:o}=this.options,s=r/(i*Math.pow(2,n)),u=e.data,c=[],f=this.stride;for(let h=0;h<u.length;h+=f){if(u[h+an]<=n)continue;u[h+an]=n;const p=u[h],g=u[h+1],C=e.within(u[h],u[h+1],s),v=u[h+Vt];let d=v;for(const D of C){const B=D*f;u[B+an]>n&&(d+=u[B+Vt])}if(d>v&&d>=o){let D=p*v,B=g*v,w,O=-1;const b=((h/f|0)<<5)+(n+1)+this.points.length;for(const E of C){const S=E*f;if(u[S+an]<=n)continue;u[S+an]=n;const F=u[S+Vt];D+=u[S]*F,B+=u[S+1]*F,u[S+gi]=b,a&&(w||(w=this._map(u,h,!0),O=this.clusterProps.length,this.clusterProps.push(w)),a(w,this._map(u,S)))}u[h+gi]=b,c.push(D/d,B/d,1/0,b,-1,d),a&&c.push(O)}else{for(let D=0;D<f;D++)c.push(u[h+D]);if(d>1)for(const D of C){const B=D*f;if(!(u[B+an]<=n)){u[B+an]=n;for(let w=0;w<f;w++)c.push(u[B+w])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Vt]>1){const o=this.clusterProps[e[n+go]];return r?Object.assign({},o):o}const i=this.points[e[n+Ht]].properties,a=this.options.map(i);return r&&a===i?Object.assign({},a):a}}function mo(t,e,n){return{type:"Feature",id:t[e+Ht],properties:yo(t,e,n),geometry:{type:"Point",coordinates:[Sf(t[e]),Af(t[e+1])]}}}function yo(t,e,n){const r=t[e+Vt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,a=t[e+go],o=a===-1?{}:Object.assign({},n[a]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Ht],point_count:r,point_count_abbreviated:i})}function pr(t){return t/360+.5}function hr(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Sf(t){return(t-.5)*360}function Af(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
54
54
|
Copyright (c) Microsoft Corporation.
|
55
55
|
|
56
56
|
Permission to use, copy, modify, and/or distribute this software for any
|
@@ -63,29 +63,44 @@ React keys must be passed directly to JSX without using spread:
|
|
63
63
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
64
64
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
65
65
|
PERFORMANCE OF THIS SOFTWARE.
|
66
|
-
***************************************************************************** */function
|
66
|
+
***************************************************************************** */function Of(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class yt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class mi{constructor({markers:e,position:n}){this.markers=e,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)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(yt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>yt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(yt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Ff{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Pf(e)}}const Pf=t=>t.map(n=>new mi({position:yt.getPosition(n),markers:[n]}));class Mf extends Ff{constructor(e){var{maxZoom:n,radius:r=60}=e,i=Of(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new Lf(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!co(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(a=>{const o=yt.getPosition(a);return{type:"Feature",geometry:{type:"Point",coordinates:[o.lng(),o.lat()]},properties:{marker:a}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!co(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new mi({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(a=>a.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new mi({markers:[i],position:yt.getPosition(i)})}}class kf{constructor(e,n){this.markers={sum:e.length};const r=n.map(a=>a.count),i=r.reduce((a,o)=>a+o,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class Tf{render({count:e,position:n},r,i){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
67
67
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
68
68
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
69
69
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
70
70
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
71
|
-
</svg>`,l=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Ze.isAdvancedMarkerAvailable(r)){const p=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const d={map:r,position:n,zIndex:u,title:l,content:p};return new google.maps.marker.AdvancedMarkerElement(d)}const c={position:n,zIndex:u,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function $s(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Tn{constructor(){$s(Tn,google.maps.OverlayView)}}var Dt;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Dt||(Dt={}));const As=(t,e,n)=>{n.fitBounds(e.bounds)};class zs extends Tn{constructor({map:e,markers:n=[],algorithmOptions:o={},algorithm:r=new js(o),renderer:s=new Bs,onClusterClick:a=As}){super(),this.markers=[...n],this.clusters=[],this.algorithm=r,this.renderer=s,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(o=>{this.addMarker(o,!0)}),n||this.render()}removeMarker(e,n){const o=this.markers.indexOf(e);return o===-1?!1:(Ze.setMap(e,null),this.markers.splice(o,1),n||this.render(),!0)}removeMarkers(e,n){let o=!1;return e.forEach(r=>{o=this.removeMarker(r,!0)||o}),o&&!n&&this.render(),o}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Dt.CLUSTERING_BEGIN,this);const{clusters:n,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||o==null){const r=new Set;for(const a of n)a.markers.length==1&&r.add(a.markers[0]);const s=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?r.has(a.marker)||Ze.setMap(a.marker,null):s.push(a.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(a=>Ze.setMap(a,null)))}google.maps.event.trigger(this,Dt.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(e=>Ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Ns(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(o=>{o.markers.length===1?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,n),o.markers.forEach(r=>Ze.setMap(r,null)),this.onClusterClick&&o.marker.addListener("click",r=>{google.maps.event.trigger(this,Dt.CLUSTER_CLICK,o),this.onClusterClick(r,o,n)})),Ze.setMap(o.marker,n)})}}function Us(t){var e=Ki(),n=i.useState(null),o=n[0],r=n[1];return i.useEffect(function(){if(e&&o===null){var s=new zs(ee(ee({},t),{map:e}));r(s)}},[e]),o}function Fs(t){var e=t.children,n=t.options,o=Us(n);return o!==null?e(o):null}i.memo(Fs);var Uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Fo={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Hs(t){var e=t.children,n=t.anchor,o=t.options,r=t.position,s=t.zIndex,a=t.onCloseClick,l=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,d=t.onUnmount,h=i.useContext(ue),E=i.useState(null),m=E[0],C=E[1],x=i.useState(null),P=x[0],w=x[1],I=i.useState(null),v=I[0],b=I[1],S=i.useState(null),T=S[0],U=S[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useRef(null);return i.useEffect(function(){m!==null&&(m.close(),n?m.open(h,n):m.getPosition()&&m.open(h))},[h,m,n]),i.useEffect(function(){o&&m!==null&&m.setOptions(o)},[m,o]),i.useEffect(function(){r&&m!==null&&m.setPosition(r)},[r]),i.useEffect(function(){typeof s=="number"&&m!==null&&m.setZIndex(s)},[s]),i.useEffect(function(){m&&a&&(P!==null&&google.maps.event.removeListener(P),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(v!==null&&google.maps.event.removeListener(v),b(google.maps.event.addListener(m,"domready",l)))},[l]),i.useEffect(function(){m&&u&&(T!==null&&google.maps.event.removeListener(T),U(google.maps.event.addListener(m,"content_changed",u)))},[u]),i.useEffect(function(){m&&c&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(m,"position_changed",c)))},[c]),i.useEffect(function(){m&&f&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),i.useEffect(function(){var $=new google.maps.InfoWindow(ee({},o||{}));return C($),H.current=document.createElement("div"),a&&w(google.maps.event.addListener($,"closeclick",a)),l&&b(google.maps.event.addListener($,"domready",l)),u&&U(google.maps.event.addListener($,"content_changed",u)),c&&X(google.maps.event.addListener($,"position_changed",c)),f&&V(google.maps.event.addListener($,"zindex_changed",f)),$.setContent(H.current),r&&$.setPosition(r),s&&$.setZIndex(s),n?$.open(h,n):$.getPosition()?$.open(h):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p($),function(){P&&google.maps.event.removeListener(P),T&&google.maps.event.removeListener(T),v&&google.maps.event.removeListener(v),z&&google.maps.event.removeListener(z),F&&google.maps.event.removeListener(F),d&&d($),$.close()}},[]),H.current?pt.createPortal(i.Children.only(e),H.current):null}i.memo(Hs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(o,r){r?o.open(n.context,r):o.getPosition()?o.open(n.context):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:Fo,eventMap:Uo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Fo,eventMap:Uo,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?pt.createPortal(i.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(i.PureComponent);var Ho={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Ws={};function Vs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onLoad,P=t.onUnmount,w=i.useContext(ue),I=i.useState(null),v=I[0],b=I[1],S=i.useState(null),T=S[0],U=S[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=Q[0],k=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1];return i.useEffect(function(){v!==null&&v.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&v!==null&&v.setOptions(e)},[v,e]),i.useEffect(function(){typeof n<"u"&&v!==null&&v.setDraggable(n)},[v,n]),i.useEffect(function(){typeof o<"u"&&v!==null&&v.setEditable(o)},[v,o]),i.useEffect(function(){typeof r<"u"&&v!==null&&v.setVisible(r)},[v,r]),i.useEffect(function(){typeof s<"u"&&v!==null&&v.setPath(s)},[v,s]),i.useEffect(function(){v&&a&&(T!==null&&google.maps.event.removeListener(T),U(google.maps.event.addListener(v,"dblclick",a)))},[a]),i.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(v,"dragend",l)))},[l]),i.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"dragstart",u)))},[u]),i.useEffect(function(){v&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(v,"mousedown",c)))},[c]),i.useEffect(function(){v&&f&&(M!==null&&google.maps.event.removeListener(M),k(google.maps.event.addListener(v,"mousemove",f)))},[f]),i.useEffect(function(){v&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(v,"mouseout",p)))},[p]),i.useEffect(function(){v&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(v,"mouseover",d)))},[d]),i.useEffect(function(){v&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(v,"mouseup",h)))},[h]),i.useEffect(function(){v&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(v,"rightclick",E)))},[E]),i.useEffect(function(){v&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(v,"click",m)))},[m]),i.useEffect(function(){v&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(v,"drag",C)))},[C]),i.useEffect(function(){var re=new google.maps.Polyline(ee(ee({},e||Ws),{map:w}));return s&&re.setPath(s),typeof r<"u"&&re.setVisible(r),typeof o<"u"&&re.setEditable(o),typeof n<"u"&&re.setDraggable(n),a&&U(google.maps.event.addListener(re,"dblclick",a)),l&&X(google.maps.event.addListener(re,"dragend",l)),u&&V(google.maps.event.addListener(re,"dragstart",u)),c&&W(google.maps.event.addListener(re,"mousedown",c)),f&&k(google.maps.event.addListener(re,"mousemove",f)),p&&B(google.maps.event.addListener(re,"mouseout",p)),d&&q(google.maps.event.addListener(re,"mouseover",d)),h&&Y(google.maps.event.addListener(re,"mouseup",h)),E&&ce(google.maps.event.addListener(re,"rightclick",E)),m&&he(google.maps.event.addListener(re,"click",m)),C&&le(google.maps.event.addListener(re,"drag",C)),b(re),x&&x(re),function(){T!==null&&google.maps.event.removeListener(T),z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),P&&P(re),re.setMap(null)}},[]),null}i.memo(Vs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Vo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Zs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.paths,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,P=t.onLoad,w=t.onUnmount,I=t.onEdit,v=i.useContext(ue),b=i.useState(null),S=b[0],T=b[1],U=i.useState(null),O=U[0],z=U[1],X=i.useState(null),A=X[0],F=X[1],V=i.useState(null),H=V[0],$=V[1],W=i.useState(null),Q=W[0],M=W[1],k=i.useState(null),D=k[0],_=k[1],B=i.useState(null),G=B[0],L=B[1],q=i.useState(null),K=q[0],R=q[1],Y=i.useState(null),oe=Y[0],j=Y[1],ce=i.useState(null),Ce=ce[0],me=ce[1],he=i.useState(null),Te=he[0],Me=he[1],le=i.useState(null),re=le[0],Ne=le[1];return i.useEffect(function(){S!==null&&S.setMap(v)},[v]),i.useEffect(function(){typeof e<"u"&&S!==null&&S.setOptions(e)},[S,e]),i.useEffect(function(){typeof n<"u"&&S!==null&&S.setDraggable(n)},[S,n]),i.useEffect(function(){typeof o<"u"&&S!==null&&S.setEditable(o)},[S,o]),i.useEffect(function(){typeof r<"u"&&S!==null&&S.setVisible(r)},[S,r]),i.useEffect(function(){typeof s<"u"&&S!==null&&S.setPath(s)},[S,s]),i.useEffect(function(){typeof a<"u"&&S!==null&&S.setPaths(a)},[S,a]),i.useEffect(function(){S&&l&&(O!==null&&google.maps.event.removeListener(O),z(google.maps.event.addListener(S,"dblclick",l)))},[l]),i.useEffect(function(){S&&(google.maps.event.addListener(S.getPath(),"insert_at",function(){I==null||I(S)}),google.maps.event.addListener(S.getPath(),"set_at",function(){I==null||I(S)}))},[S,I]),i.useEffect(function(){S&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(S,"dragend",u)))},[u]),i.useEffect(function(){S&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(S,"dragstart",c)))},[c]),i.useEffect(function(){S&&f&&(Q!==null&&google.maps.event.removeListener(Q),M(google.maps.event.addListener(S,"mousedown",f)))},[f]),i.useEffect(function(){S&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(S,"mousemove",p)))},[p]),i.useEffect(function(){S&&d&&(G!==null&&google.maps.event.removeListener(G),L(google.maps.event.addListener(S,"mouseout",d)))},[d]),i.useEffect(function(){S&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(S,"mouseover",h)))},[h]),i.useEffect(function(){S&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(S,"mouseup",E)))},[E]),i.useEffect(function(){S&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(S,"rightclick",m)))},[m]),i.useEffect(function(){S&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(S,"click",C)))},[C]),i.useEffect(function(){S&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(S,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:v}));return s&&ae.setPath(s),a&&ae.setPaths(a),typeof r<"u"&&ae.setVisible(r),typeof o<"u"&&ae.setEditable(o),typeof n<"u"&&ae.setDraggable(n),l&&z(google.maps.event.addListener(ae,"dblclick",l)),u&&F(google.maps.event.addListener(ae,"dragend",u)),c&&$(google.maps.event.addListener(ae,"dragstart",c)),f&&M(google.maps.event.addListener(ae,"mousedown",f)),p&&_(google.maps.event.addListener(ae,"mousemove",p)),d&&L(google.maps.event.addListener(ae,"mouseout",d)),h&&R(google.maps.event.addListener(ae,"mouseover",h)),E&&j(google.maps.event.addListener(ae,"mouseup",E)),m&&me(google.maps.event.addListener(ae,"rightclick",m)),C&&Me(google.maps.event.addListener(ae,"click",C)),x&&Ne(google.maps.event.addListener(ae,"drag",x)),T(ae),P&&P(ae),function(){O!==null&&google.maps.event.removeListener(O),A!==null&&google.maps.event.removeListener(A),H!==null&&google.maps.event.removeListener(H),Q!==null&&google.maps.event.removeListener(Q),D!==null&&google.maps.event.removeListener(D),G!==null&&google.maps.event.removeListener(G),K!==null&&google.maps.event.removeListener(K),oe!==null&&google.maps.event.removeListener(oe),Ce!==null&&google.maps.event.removeListener(Ce),Te!==null&&google.maps.event.removeListener(Te),w&&w(ae),ae.setMap(null)}},[]),null}i.memo(Zs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Go={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"},Yo={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Gs(t){var e=t.options,n=t.bounds,o=t.draggable,r=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onBoundsChanged,P=t.onLoad,w=t.onUnmount,I=i.useContext(ue),v=i.useState(null),b=v[0],S=v[1],T=i.useState(null),U=T[0],O=T[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],M=i.useState(null),k=M[0],D=M[1],_=i.useState(null),B=_[0],G=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),Y=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){b!==null&&b.setMap(I)},[I]),i.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),i.useEffect(function(){typeof o<"u"&&b!==null&&b.setDraggable(o)},[b,o]),i.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),i.useEffect(function(){typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),i.useEffect(function(){typeof n<"u"&&b!==null&&b.setBounds(n)},[b,n]),i.useEffect(function(){b&&a&&(U!==null&&google.maps.event.removeListener(U),O(google.maps.event.addListener(b,"dblclick",a)))},[a]),i.useEffect(function(){b&&l&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(b,"dragend",l)))},[l]),i.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(b,"dragstart",u)))},[u]),i.useEffect(function(){b&&c&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(b,"mousedown",c)))},[c]),i.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(b,"mousemove",f)))},[f]),i.useEffect(function(){b&&p&&(B!==null&&google.maps.event.removeListener(B),G(google.maps.event.addListener(b,"mouseout",p)))},[p]),i.useEffect(function(){b&&d&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(b,"mouseover",d)))},[d]),i.useEffect(function(){b&&h&&(Y!==null&&google.maps.event.removeListener(Y),oe(google.maps.event.addListener(b,"mouseup",h)))},[h]),i.useEffect(function(){b&&E&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(b,"rightclick",E)))},[E]),i.useEffect(function(){b&&m&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(b,"click",m)))},[m]),i.useEffect(function(){b&&C&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(b,"drag",C)))},[C]),i.useEffect(function(){b&&x&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(b,"bounds_changed",x)))},[x]),i.useEffect(function(){var te=new google.maps.Rectangle(ee(ee({},e||{}),{map:I}));return typeof s<"u"&&te.setVisible(s),typeof r<"u"&&te.setEditable(r),typeof o<"u"&&te.setDraggable(o),typeof n<"u"&&te.setBounds(n),a&&O(google.maps.event.addListener(te,"dblclick",a)),l&&A(google.maps.event.addListener(te,"dragend",l)),u&&H(google.maps.event.addListener(te,"dragstart",u)),c&&Q(google.maps.event.addListener(te,"mousedown",c)),f&&D(google.maps.event.addListener(te,"mousemove",f)),p&&G(google.maps.event.addListener(te,"mouseout",p)),d&&K(google.maps.event.addListener(te,"mouseover",d)),h&&oe(google.maps.event.addListener(te,"mouseup",h)),E&&Ce(google.maps.event.addListener(te,"rightclick",E)),m&&Te(google.maps.event.addListener(te,"click",m)),C&&re(google.maps.event.addListener(te,"drag",C)),x&&Ae(google.maps.event.addListener(te,"bounds_changed",x)),S(te),P&&P(te),function(){U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),k!==null&&google.maps.event.removeListener(k),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),Y!==null&&google.maps.event.removeListener(Y),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),w&&w(te),te.setMap(null)}},[]),null}i.memo(Gs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var qo={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"},Ko={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Ys={};function qs(t){var e=t.options,n=t.center,o=t.radius,r=t.draggable,s=t.editable,a=t.visible,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,P=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,v=t.onUnmount,b=i.useContext(ue),S=i.useState(null),T=S[0],U=S[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=Q[0],k=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1],re=i.useState(null),Ne=re[0],ae=re[1],Ae=i.useState(null),te=Ae[0],We=Ae[1],Xe=i.useState(null),Be=Xe[0],tt=Xe[1];return i.useEffect(function(){T!==null&&T.setMap(b)},[b]),i.useEffect(function(){typeof e<"u"&&T!==null&&T.setOptions(e)},[T,e]),i.useEffect(function(){typeof r<"u"&&T!==null&&T.setDraggable(r)},[T,r]),i.useEffect(function(){typeof s<"u"&&T!==null&&T.setEditable(s)},[T,s]),i.useEffect(function(){typeof a<"u"&&T!==null&&T.setVisible(a)},[T,a]),i.useEffect(function(){typeof o=="number"&&T!==null&&T.setRadius(o)},[T,o]),i.useEffect(function(){typeof n<"u"&&T!==null&&T.setCenter(n)},[T,n]),i.useEffect(function(){T&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(T,"dblclick",l)))},[l]),i.useEffect(function(){T&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(T,"dragend",u)))},[u]),i.useEffect(function(){T&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(T,"dragstart",c)))},[c]),i.useEffect(function(){T&&f&&(M!==null&&google.maps.event.removeListener(M),k(google.maps.event.addListener(T,"mousedown",f)))},[f]),i.useEffect(function(){T&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(T,"mousemove",p)))},[p]),i.useEffect(function(){T&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(T,"mouseout",d)))},[d]),i.useEffect(function(){T&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(T,"mouseover",h)))},[h]),i.useEffect(function(){T&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(T,"mouseup",E)))},[E]),i.useEffect(function(){T&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(T,"rightclick",m)))},[m]),i.useEffect(function(){T&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(T,"click",C)))},[C]),i.useEffect(function(){T&&x&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(T,"drag",x)))},[x]),i.useEffect(function(){T&&P&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(T,"center_changed",P)))},[C]),i.useEffect(function(){T&&w&&(Be!==null&&google.maps.event.removeListener(Be),tt(google.maps.event.addListener(T,"radius_changed",w)))},[w]),i.useEffect(function(){var ve=new google.maps.Circle(ee(ee({},e||Ys),{map:b}));return typeof o=="number"&&ve.setRadius(o),typeof n<"u"&&ve.setCenter(n),typeof o=="number"&&ve.setRadius(o),typeof a<"u"&&ve.setVisible(a),typeof s<"u"&&ve.setEditable(s),typeof r<"u"&&ve.setDraggable(r),l&&X(google.maps.event.addListener(ve,"dblclick",l)),u&&V(google.maps.event.addListener(ve,"dragend",u)),c&&W(google.maps.event.addListener(ve,"dragstart",c)),f&&k(google.maps.event.addListener(ve,"mousedown",f)),p&&B(google.maps.event.addListener(ve,"mousemove",p)),d&&q(google.maps.event.addListener(ve,"mouseout",d)),h&&Y(google.maps.event.addListener(ve,"mouseover",h)),E&&ce(google.maps.event.addListener(ve,"mouseup",E)),m&&he(google.maps.event.addListener(ve,"rightclick",m)),C&&le(google.maps.event.addListener(ve,"click",C)),x&&ae(google.maps.event.addListener(ve,"drag",x)),P&&We(google.maps.event.addListener(ve,"center_changed",P)),w&&tt(google.maps.event.addListener(ve,"radius_changed",w)),U(ve),I&&I(ve),function(){z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),Me!==null&&google.maps.event.removeListener(Me),te!==null&&google.maps.event.removeListener(te),Be!==null&&google.maps.event.removeListener(Be),v&&v(ve),ve.setMap(null)}},[]),null}i.memo(qs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Xo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Jo={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Ks(t){var e=t.options,n=t.onClick,o=t.onDblClick,r=t.onMouseDown,s=t.onMouseMove,a=t.onMouseOut,l=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,d=t.onRemoveProperty,h=t.onSetGeometry,E=t.onSetProperty,m=t.onLoad,C=t.onUnmount,x=i.useContext(ue),P=i.useState(null),w=P[0],I=P[1],v=i.useState(null),b=v[0],S=v[1],T=i.useState(null),U=T[0],O=T[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],M=i.useState(null),k=M[0],D=M[1],_=i.useState(null),B=_[0],G=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),Y=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){w!==null&&w.setMap(x)},[x]),i.useEffect(function(){w&&o&&(b!==null&&google.maps.event.removeListener(b),S(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),O(google.maps.event.addListener(w,"mousedown",r)))},[r]),i.useEffect(function(){w&&s&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(w,"mousemove",s)))},[s]),i.useEffect(function(){w&&a&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(w,"mouseout",a)))},[a]),i.useEffect(function(){w&&l&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(w,"mouseover",l)))},[l]),i.useEffect(function(){w&&u&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(w,"mouseup",u)))},[u]),i.useEffect(function(){w&&c&&(B!==null&&google.maps.event.removeListener(B),G(google.maps.event.addListener(w,"rightclick",c)))},[c]),i.useEffect(function(){w&&n&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(w,"click",n)))},[n]),i.useEffect(function(){w&&f&&(Y!==null&&google.maps.event.removeListener(Y),oe(google.maps.event.addListener(w,"addfeature",f)))},[f]),i.useEffect(function(){w&&p&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(w,"removefeature",p)))},[p]),i.useEffect(function(){w&&d&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(w,"removeproperty",d)))},[d]),i.useEffect(function(){w&&h&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(w,"setgeometry",h)))},[h]),i.useEffect(function(){w&&E&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(w,"setproperty",E)))},[E]),i.useEffect(function(){if(x!==null){var te=new google.maps.Data(ee(ee({},e||{}),{map:x}));o&&S(google.maps.event.addListener(te,"dblclick",o)),r&&O(google.maps.event.addListener(te,"mousedown",r)),s&&A(google.maps.event.addListener(te,"mousemove",s)),a&&H(google.maps.event.addListener(te,"mouseout",a)),l&&Q(google.maps.event.addListener(te,"mouseover",l)),u&&D(google.maps.event.addListener(te,"mouseup",u)),c&&G(google.maps.event.addListener(te,"rightclick",c)),n&&K(google.maps.event.addListener(te,"click",n)),f&&oe(google.maps.event.addListener(te,"addfeature",f)),p&&Ce(google.maps.event.addListener(te,"removefeature",p)),d&&Te(google.maps.event.addListener(te,"removeproperty",d)),h&&re(google.maps.event.addListener(te,"setgeometry",h)),E&&Ae(google.maps.event.addListener(te,"setproperty",E)),I(te),m&&m(te)}return function(){w&&(b!==null&&google.maps.event.removeListener(b),U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),k!==null&&google.maps.event.removeListener(k),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),Y!==null&&google.maps.event.removeListener(Y),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),C&&C(w),w.setMap(null))}},[]),null}i.memo(Ks),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Qo={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},er={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent);function tr(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Xs(t,e){return new e(t.lat,t.lng)}function Js(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Qs(t,e,n){return t instanceof e?t:n(t,e)}function ea(t,e,n){return t instanceof e?t:n(t,e)}function ta(t,e,n){var o=t&&t.fromLatLngToDivPixel(n.getNorthEast()),r=t&&t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:"".concat(r.x+e.x,"px"),top:"".concat(o.y+e.y,"px"),width:"".concat(o.x-r.x-e.x,"px"),height:"".concat(r.y-o.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function na(t,e,n){var o=t&&t.fromLatLngToDivPixel(n);if(o){var r=o.x,s=o.y;return{left:"".concat(r+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function nr(t,e,n,o){return n!==void 0?ta(t,e,ea(n,google.maps.LatLngBounds,Js)):na(t,e,Qs(o,google.maps.LatLng,Xs))}function oa(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function ra(t,e,n,o,r){var s=function(a){Pe(l,a);function l(u,c,f,p){var d=a.call(this)||this;return d.container=u,d.pane=c,d.position=f,d.bounds=p,d}return l.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},l.prototype.draw=function(){for(var u=this.getProjection(),c=ee({},this.container?tr(this.container,r):{x:0,y:0}),f=nr(u,c,this.bounds,this.position),p=0,d=Object.entries(f);p<d.length;p++){var h=d[p],E=h[0],m=h[1];this.container.style[E]=m}},l.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},l}(google.maps.OverlayView);return new s(t,e,n,o)}function or(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rr(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function ia(t){var e=t.position,n=t.bounds,o=t.mapPaneName,r=t.zIndex,s=t.onLoad,a=t.onUnmount,l=t.getPixelPositionOffset,u=t.children,c=i.useContext(ue),f=i.useMemo(function(){var d=document.createElement("div");return d.style.position="absolute",d},[]),p=i.useMemo(function(){return ra(f,o,e,n,l)},[f,o,e,n]);return i.useEffect(function(){return s==null||s(p),p==null||p.setMap(c),function(){a==null||a(p),p==null||p.setMap(null)}},[c,p]),i.useEffect(function(){f.style.zIndex="".concat(r)},[r,f]),io.createPortal(u,f)}i.memo(ia),function(t){Pe(e,t);function e(n){var o=t.call(this,n)||this;o.state={paneEl:null,containerStyle:{position:"absolute"}},o.updatePane=function(){var s=o.props.mapPaneName,a=o.overlayView.getPanes();$e(!!s,"OverlayView requires props.mapPaneName but got %s",s),a?o.setState({paneEl:a[s]}):o.setState({paneEl:null})},o.onAdd=function(){var s,a;o.updatePane(),(a=(s=o.props).onLoad)===null||a===void 0||a.call(s,o.overlayView)},o.onPositionElement=function(){var s=o.overlayView.getProjection(),a=ee({x:0,y:0},o.containerRef.current?tr(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=nr(s,a,o.props.bounds,o.props.position),u=o.state.containerStyle,c=u.left,f=u.top,p=u.width,d=u.height;oa(l,{left:c,top:f,width:p,height:d})||o.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},o.draw=function(){o.onPositionElement()},o.onRemove=function(){var s,a;o.setState(function(){return{paneEl:null}}),(a=(s=o.props).onUnmount)===null||a===void 0||a.call(s,o.overlayView)},o.containerRef=i.createRef();var r=new google.maps.OverlayView;return r.onAdd=o.onAdd,r.draw=o.draw,r.onRemove=o.onRemove,o.overlayView=r,o}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var o=or(n.position),r=or(this.props.position),s=rr(n.bounds),a=rr(this.props.bounds);(o!==r||s!==a)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?io.createPortal(y.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:i.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e}(i.PureComponent);function sa(){}var ir={onDblClick:"dblclick",onClick:"click"},sr={opacity:function(t,e){t.setOpacity(e)}};function aa(t){var e=t.url,n=t.bounds,o=t.options,r=t.visible,s=i.useContext(ue),a=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),l=i.useMemo(function(){var u=new google.maps.GroundOverlay(e,a,ee({},o));return u},[]);return i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){typeof e<"u"&&l!==null&&(l.set("url",e),l.setMap(s))},[l,e]),i.useEffect(function(){typeof r<"u"&&l!==null&&l.setOpacity(r?1:0)},[l,r]),i.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&l!==null&&(l.set("bounds",u),l.setMap(s))},[l,n]),null}i.memo(aa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){$e(!!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 n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:sr,eventMap:ir,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:sr,eventMap:ir,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:sa},e.contextType=ue,e}(i.PureComponent);var ar={},lr={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function la(t){var e=t.data,n=t.onLoad,o=t.onUnmount,r=t.options,s=i.useContext(ue),a=i.useState(null),l=a[0],u=a[1];return i.useEffect(function(){google.maps.visualization||$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),i.useEffect(function(){$e(!!e,"data property is required in HeatmapLayer %s",e)},[e]),i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){r&&l!==null&&l.setOptions(r)},[l,r]),i.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},r||{}),{data:e,map:s}));return u(c),n&&n(c),function(){l!==null&&(o&&o(l),l.setMap(null))}},[]),null}i.memo(la),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),$e(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var ur={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cr={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,o,r=(o=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&o!==void 0?o:null;this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{streetViewPanorama:r}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(i.PureComponent);var dr={onDirectionsChanged:"directions_changed"},fr={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return y.jsx(y.Fragment,{})},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(i.PureComponent);var pr={onPlacesChanged:"places_changed"},hr={bounds:function(t,e){t.setBounds(e)}},ua=function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if($e(!!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 n=this.containerElement.current.querySelector("input");if(n!==null){var o=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{searchBox:o}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),pe(this.registeredEvents))},e.prototype.render=function(){return y.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e}(i.PureComponent),gr={onPlaceChanged:"place_changed"},mr={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;$e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var o=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(o){var r=new google.maps.places.Autocomplete(o,this.props.options);this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{autocomplete:r}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&pe(this.registeredEvents)},e.prototype.render=function(){return y.jsx("div",{ref:this.containerElement,className:this.props.className,children:i.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(i.PureComponent);function ca({coordinates:t,zoom:e=18,draggable:n=!1,className:o,...r}){return t?y.jsx("div",{className:"arkynGoogleMapPinned "+o,...r,children:y.jsx(os,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:y.jsx(ps,{draggable:n,position:t})})}):y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+o,...r,children:y.jsx(ke.MapPinned,{})})}function da(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return y.jsx("aside",{className:o.trim(),...n})}function fa(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:o,...r}=t,s=`arkynTableBody ${n}`,a=i.Children.count(o)===0;return y.jsx("tbody",{className:s.trim(),...r,children:a?y.jsx("tr",{className:"arkynTableBodyEmptyLine",children:y.jsx("td",{colSpan:100,children:y.jsx("div",{children:e})})}):o})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return y.jsx("caption",{className:r.trim(),...o,children:y.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function ha(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return y.jsx("div",{className:r.trim(),...o,children:y.jsx("table",{children:e})})}function ga(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return y.jsxs("tfoot",{className:r.trim(),...o,children:[y.jsx("tr",{className:"spacingRow"}),y.jsx("tr",{children:y.jsx("th",{colSpan:100,children:y.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ma(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return y.jsxs("thead",{className:r.trim(),...o,children:[y.jsx("tr",{children:n}),y.jsx("tr",{className:"spacingRow"})]})}function va(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",loadingText:r,size:s="md",leftIcon:a,rightIcon:l,disabled:u,className:c="",children:f,...p}=t,h={xs:12,sm:16,md:20,lg:24}[s],C=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${o} ${n} ${s} ${r?"loadingTextTrue":"loadingTextFalse"} ${c}`;return y.jsxs("button",{className:C,disabled:u||e,...p,children:[y.jsxs("div",{className:"arkynButtonSpinner",children:[y.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),y.jsxs("div",{className:"arkynButtonContent",children:[Gt(h,a),f,Gt(h,l)]})]})}const vr=i.createContext({});function ya(t){var p,d;const e=Ct.useActionData(),{children:n,className:o,id:r,...s}=t,a=i.useRef(null),l=((p=a.current)==null?void 0:p.name)||"",u=((d=e==null?void 0:e.fieldErrors)==null?void 0:d[l])||null,c=i.useId(),f=`arkynFormController ${o}`;return y.jsx(vr.Provider,{value:{error:u,id:c,inputRef:a},children:y.jsx("section",{id:r||l||void 0,className:f.trim(),...s,children:n})})}function Ke(){return i.useContext(vr)}function ba(t){const{name:e,className:n="",size:o="md",isError:r,defaultChecked:s=!1,checked:a=null,onCheck:l,value:u,...c}=t,{id:f,inputRef:p,error:d}=Ke(),h=r||!!d,[E,m]=i.useState(s||!1),C=typeof a=="boolean"?a:E,w=`arkynCheckbox ${o} ${h?"errorTrue":"errorFalse"} ${C?"checkedTrue":"checkedFalse"} ${n}`;function I(){const v=E;m(!v),l&&l(v?"":u||"checked")}return y.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[y.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),y.jsx(ke.Check,{})]})}function La(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?y.jsx("strong",{className:r.trim(),...o,children:e}):s?y.jsx("strong",{className:r.trim(),...o,children:s}):y.jsx(y.Fragment,{})}function Ca(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return y.jsx("label",{className:a.trim(),htmlFor:r,...o})}function xa(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",size:r="md",icon:s,disabled:a,className:l="",...u}=t,c={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${o} ${n} ${r} ${e?"loadingTrue":"loadingFalse"} ${l}`;return y.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[y.jsx("div",{className:"arkynIconButtonSpinner",children:y.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),y.jsx("div",{className:"arkynIconButtonContent",children:y.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return y.jsx(y.Fragment,{});if(typeof t=="string")return y.jsx("p",{className:n,children:t});const o=t;return y.jsx("p",{className:n,children:y.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function yr(t,e){let n="",o=0;return Array.from(t).forEach((r,s)=>{e[s+o].match(/[0-9]/)||(n+=e[s+o],o++),n+=r}),n}function br(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Lr=On(In.CNPJ).length;function Ea(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,defaultValue:d,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:P,...w}=t;function I(F){let V=On(F);const H=br(V);if(!(V.length>Lr))return V=yr(V,In[H]),V}const v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||h||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:I(d||""),disabled:p,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:P,loadingPosition:v,iconSize:A,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...w}}function wa(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:P,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:S,onChange:T,value:U,defaultValue:O,...z}=Ea({...t,id:s,isError:u},e),[X,A]=i.useState(O),F=P&&!x,V=b&&!x,H=C==="left"&&x,$=C==="right"&&x;function W(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(D){let _=On(D.target.value);const B=br(_);_.length>Lr||(_=yr(_,In[B]),D.target.value=_,A(_),T&&T(D))}function M(D){n(!0),I&&I(D)}function k(D){n(!1),v&&v(D)}return y.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&S,F&&y.jsx(P,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:M,onChange:Q,onBlur:k,...z}),V&&y.jsx(b,{size:m,strokeWidth:2.5}),$&&S,E]})}const Sa=3,ka=(t="pt-BR",e,n="BRL",o=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(o?Sa:0),Xt=2,Cr=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Cr(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Cr(e)/10**Xt},xr=(t,e,n)=>{if(!e)return[0,""];const o=_n(e),r=ka(t,o,n);return[o,r]};function Ma(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x=1e9,locale:P="pt-BR",currency:w="BRL",...I}=t,v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,locale:P,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:v,iconSize:A,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}function Pa(t){const[e,n]=i.useState(!1),[o,r]=i.useState("0"),s=i.useRef(null),{inputRef:a,id:l,error:u}=Ke(),c=a||s,f=t.isError||!!u,{disabled:p,title:d,style:h,className:E,prefix:m,sufix:C,iconSize:x,loadingPosition:P,isLoading:w,LeftIcon:I,readOnly:v,onFocus:b,onBlur:S,RightIcon:T,Spinner:U,value:O,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Ma({...t,id:l,isError:f},e),Q=I&&!w,M=T&&!w,k=P==="left"&&w,D=P==="right"&&w;function _(){p||!(c!=null&&c.current)||(n(!0),c.current.focus())}function B(R){n(!0),b&&b(R)}function G(R){n(!1),S&&S(R)}const L=R=>{const[Y,oe]=xr(V,R,F);return!z||Y<=z?(r(oe),[Y,oe]):[_n(o),o]},q=R=>{R.preventDefault();const[Y,oe]=L(R.target.value);X(R,String(Y),String(oe))},K=R=>A&&A(R,R.key,R.key);return i.useEffect(()=>{const R=O||+$||void 0,[,Y]=xr(V,R,F);r(Y)},[F,$,O]),y.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,k&&U,Q&&y.jsx(I,{size:x,strokeWidth:2.5}),y.jsx("input",{value:o,onChange:q,onBlur:G,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:v,...W}),y.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,M&&y.jsx(T,{size:x,strokeWidth:2.5}),C]})}function Ta(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,showMask:P=!1,type:w,...I}=t,v=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:v,iconSize:A,showMask:P,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Oa=i.forwardRef((t,e)=>y.jsx("input",{ref:e,...t}));function Ia(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:P,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:S,...T}=Ta({...t,id:s,isError:u},e),U=P&&!x,O=b&&!x,z=C==="left"&&x,X=C==="right"&&x;function A(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function F(H){n(!0),I&&I(H)}function V(H){n(!1),v&&v(H)}return y.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&S,U&&y.jsx(P,{size:m,strokeWidth:2.5}),y.jsx(Oi.InputMask,{component:Oa,ref:l,onFocus:F,onBlur:V,disabled:c,...T}),O&&y.jsx(b,{size:m,strokeWidth:2.5}),X&&S,E]})}function _a(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,...P}=t,w=f?"right":"left",U=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,z={md:20,lg:20}[r];return{isLoading:n,className:U,prefix:lt(l,z,"prefix"),sufix:lt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:w,iconSize:z,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...P}}function Ra(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:P,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,type:S,Spinner:T,...U}=_a({...t,id:s,isError:u},e),O=P&&!x,z=b&&!x,X=C==="left"&&x,A=C==="right"&&x;function F(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function V($){n(!0),I&&I($)}function H($){n(!1),v&&v($)}return S==="hidden"?y.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):y.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&T,O&&y.jsx(P,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:S,...U}),z&&y.jsx(b,{size:m,strokeWidth:2.5}),A&&T,E]})}function Er(t){return t.type==="currency"?y.jsx(Pa,{...t}):t.type==="masked"?y.jsx(Ia,{...t}):t.type==="cpf-cnpj"?y.jsx(wa,{...t}):y.jsx(Ra,{...t})}const wr=i.createContext({});function Da(){return i.useContext(wr)}function ja(t){const{defaultValue:e,name:n,value:o,onChange:r,size:s="md",className:a="",...l}=t,[u,c]=i.useState(e||""),{inputRef:f,id:p}=Ke();function d(E){c(E),r&&r(E)}const h=`arkynRadioGroup ${s} ${a}`;return y.jsxs(wr.Provider,{value:{onChange:d,value:o||u,size:s},children:[y.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),y.jsx("div",{className:h.trim(),...l})]})}function Na(t){const{value:e,size:n,disabled:o,children:r,className:s="",...a}=t,{onChange:l,size:u,value:c}=Da(),{error:f}=Ke(),m=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${o?"disabledTrue":"disabledFalse"} ${s}`;return y.jsxs("label",{className:m.trim(),children:[y.jsx("button",{type:"button",disabled:o,onClick:()=>l(e),onFocus:()=>l(e),...a}),r]})}function Ba(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,leftIcon:u,disabled:c,readOnly:f,onFocus:p,onBlur:d,title:h,style:E,closeOnSelect:m=!0,...C}=t,v=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,S={md:20,lg:20}[r];return{isLoading:n,className:v,prefix:Ui(l,S,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:S,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:S,strokeWidth:2.5}),...C}}function $a(t){var D;const[e,n]=i.useState(!1),{inputRef:o,id:r,error:s}=Ke(),a=i.useRef(null),l=o||a,u=t.isError||!!s,{disabled:c,title:f,style:p,className:d,prefix:h,iconSize:E,isLoading:m,LeftIcon:C,value:x=null,defaultValue:P="",onFocus:w,onBlur:I,Spinner:v,name:b,placeholder:S,onSelect:T,options:U,optionMaxHeight:O,closeOnSelect:z,...X}=Ba({...t,id:r,isError:u},e),[A,F]=i.useState(P);function V(){c||!(l!=null&&l.current)||e||(n(!0),l.current.focus())}function H(_){e||(n(!0),w&&w(_))}function $(){n(!1),I&&l.current&&l.current.blur()}function W(_){const{label:B,value:G}=_;F(A!==G?G:""),T&&T({label:B,value:G}),z&&$()}const Q=typeof x=="string"?x:A,M=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",k=()=>{if(!e&&M)return!0;if(!e&&!M)return!1;if(e&&M)return!0;if(e&&!M)return!1};return y.jsxs(y.Fragment,{children:[y.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${k()}`,children:[h,C&&y.jsx(C,{size:E,strokeWidth:2.5}),y.jsx("input",{disabled:c,readOnly:!0,placeholder:M||S,onFocus:H,...X}),y.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&y.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:O},children:[U.map(({label:_,value:B})=>y.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",y.jsx(ke.Check,{})]},B)),U.length<=0&&y.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&y.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&v]}),e&&y.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function Aa(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,unCheckedValue:s="",name:a,className:l="",onCheck:u,...c}=t,[f,p]=i.useState(n),{id:d,inputRef:h}=Ke(),E=typeof o=="boolean"?o:f;function m(){p(!f),u&&u(E?s:r||"checked")}const x=`arkynSwitch ${E?"checkedTrue":"checkedFalse"} ${e} ${l}`;return y.jsx("button",{type:"button",onClick:m,className:x,...c,children:y.jsx("input",{id:d,type:"hidden",name:a,ref:h,onClick:m,value:E?r||"checked":s})})}function za(t){const{variant:e="solid",size:n="md",className:o,disabled:r=!1,readOnly:s=!1,onFocus:a,onBlur:l,title:u,style:c,...f}=t,[p,d]=i.useState(!1),{inputRef:h,id:E,error:m}=Ke(),C=i.useRef(null),x=h||C,w=t.isError||!!m?"errorTrue":"errorFalse",b=`arkynTextarea ${e} ${n} ${r||s?"opacityTrue":"opacityFalse"} ${w} ${p?"focusedTrue":"focusedFalse"} ${o}`;function S(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function T(O){d(!0),a&&a(O)}function U(O){d(!1),l&&l(O)}return y.jsx("section",{title:u,style:c,onClick:S,className:b,children:y.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:T,onBlur:U,...f})})}function Ua({onChange:t,onPlaceChanged:e,options:n,...o}){const[r,s]=i.useState(null),a=u=>s(u),l=()=>{var h,E,m,C;const c=r.getPlaces()[0],f=c==null?void 0:c.address_components;function p(x){const P=f.find(w=>w.types[0]===x);return P?P.long_name:""}function d(x){const P=f.find(w=>w.types[0]===x);return P?P.short_name:""}if(c){const x=p("route"),P=p("streetNumber"),w=p("sublocality_level_1"),I=p("administrative_area_level_2"),v=p("administrative_area_level_1"),b=d("administrative_area_level_1"),S=p("postal_code"),T=(E=(h=c.geometry)==null?void 0:h.location)==null?void 0:E.lat(),U=(C=(m=c.geometry)==null?void 0:m.location)==null?void 0:C.lng();e&&e({street:x,city:I,state:v,district:w,cep:S,streetNumber:P,stateShortName:b,coordinates:{lat:T,lng:U}})}};return y.jsx(ua,{onLoad:a,onPlacesChanged:l,options:n,children:y.jsx(Er,{type:"text",onChange:u=>t(u.target.value),...o})})}function Fa(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return y.jsx("nav",{className:o,...n})}function Ha(t){const{pathname:e}=Ct.useLocation(),{className:n="",disabled:o=!1,children:r,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${n}`;return o?y.jsxs("p",{className:u,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):y.jsxs(Ct.Link,{to:s,className:u,...a,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function Sr(t=""){const e=Ct.useLocation(),n=new URLSearchParams(e.search),o=t?`${t}:`:"",r=s=>{Object.entries(s).forEach(([a,l])=>{l===void 0?n.delete(`${o}${a}`):n.set(`${o}${a}`,String(l))})};return{getParam:s=>n.get(`${o}${s}`),getScopedSearch:s=>{r(s);let a=n.toString();return a&&(a="?"+a),a}}}function Wa(t){const{scope:e,totalCountRegisters:n,perPageKey:o="per_page",pageKey:r="page",siblingsCount:s=2,...a}=t,l=Ct.useNavigate(),{getParam:u,getScopedSearch:c}=Sr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=zi(f,s),E=Ai(f,s,d);function m(C){l(c({page:C}))}return y.jsxs("div",{className:"arkynPagination",...a,children:[y.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:y.jsx(ke.ChevronLeft,{})}),f>1+s&&y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),y.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&y.jsxs(y.Fragment,{children:[f+1+s<d&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})}),y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),y.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:y.jsx(ke.ChevronRight,{})})]})}const Rn=i.createContext({});function Va(){if(!Rn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Rn)}function Za(t){const{children:e,onClick:n,defaultActive:o,className:r,...s}=t,[a,l]=i.useState(o||""),[u,c]=i.useState(!0),f=i.useRef(null),p=`arkynTabContainer ${r||""}`,[d,h]=i.useState({width:"0px",left:"0px",transition:"none"}),E=(C,x)=>{const P=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${P.width}px`,left:`${P.left-w.left}px`})};i.useEffect(()=>{const C=f.current;if(!C)return;let x=null;x=C.querySelector("button.active"),x&&E(x)},[]);const m=C=>{const x=C.target;x&&(l(x.value),x.classList.add("active"),E(x,!0),n&&n(x.value))};return y.jsxs("nav",{ref:f,className:p.trim(),...s,children:[y.jsx(Rn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),y.jsx("div",{className:"activeLine",style:d})]})}function Ga(t){const{children:e,className:n="",onClick:o,...r}=t,{value:s,showInitialTab:a,handleTabClick:l}=Va(),u=s===r.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===r.value&&a?"showBorderBottom":""} ${u} ${n}`;function p(d){l(d),o&&o(d)}return y.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const kr=i.createContext({});function Ya(t){const{isVisibled:e,makeInvisible:n,orientation:o="left",children:r,className:s,...a}=t,l=o==="left"?"-100%":"100%",c=`arkynDrawerContainer ${o} ${e?"visibleTrue":"visibleFalse"} ${s}`;return y.jsx(kr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:c.trim(),...a,children:[y.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.jsx(ht.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${l})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${l})`},children:r})]})})})}function qa(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(kr),a=`arkynDrawerHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:y.jsx(ke.X,{size:24})})]})}const Mr=i.createContext({});function Ka(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return y.jsx(Mr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:l.trim(),...s,children:[y.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.jsx(ht.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function Xa(t){const{alignment:e="right",className:n,...o}=t,r=`arkynModalFooter ${e} ${n}`;return y.jsx("footer",{className:r.trim(),...o})}function Ja(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Mr),a=`arkynModalHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:y.jsx(ke.X,{size:24})})]})}function Qa(t){const{children:e,button:n,closeOnClick:o,orientation:r="bottomLeft"}=t,[s,a]=i.useState(!1),u=`arkynPopover ${r} ${s?"visibleTrue":"visibleFalse"}`;function c(){s||a(!0)}return y.jsxs("div",{className:u,onClick:c,children:[n,y.jsx(ht.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>o&&a(!1),className:"arkynPopoverContent",children:e}),s&&y.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Pr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return y.jsx(ke.Info,{});case"success":return y.jsx(ke.CheckCircle2,{});case"danger":return y.jsx(ke.XCircle,{});case"warning":return y.jsx(ke.AlertCircle,{});default:return y.jsx(ke.Info,{})}}return y.jsxs("aside",{className:s,children:[y.jsxs("div",{children:[y.jsx("div",{className:"bg"}),y.jsx(a,{})]}),y.jsxs("p",{children:[y.jsx("strong",{title:n,children:n}),y.jsx("span",{children:e})]})]})}function el(t){const{text:e,size:n="lg",children:o,orientation:r="top",className:s="",...a}=t,l=`arkynTooltip ${n} ${r} ${s}`;return y.jsxs("div",{className:l.trim(),...a,children:[o,y.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},Dn={},jt={},Nt={},Tr="Expected a function",Or=NaN,tl="[object Symbol]",nl=/^\s+|\s+$/g,ol=/^[-+]0x[0-9a-f]+$/i,rl=/^0b[01]+$/i,il=/^0o[0-7]+$/i,sl=parseInt,al=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,ll=typeof self=="object"&&self&&self.Object===Object&&self,ul=al||ll||Function("return this")(),cl=Object.prototype,dl=cl.toString,fl=Math.max,pl=Math.min,jn=function(){return ul.Date.now()};function hl(t,e,n){var o,r,s,a,l,u,c=0,f=!1,p=!1,d=!0;if(typeof t!="function")throw new TypeError(Tr);e=Ir(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?fl(Ir(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var S=o,T=r;return o=r=void 0,c=b,a=t.apply(T,S),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var S=b-u,T=b-c,U=e-S;return p?pl(U,s-T):U}function C(b){var S=b-u,T=b-c;return u===void 0||S>=e||S<0||p&&T>=s}function x(){var b=jn();if(C(b))return P(b);l=setTimeout(x,m(b))}function P(b){return l=void 0,d&&o?h(b):(o=r=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,o=u=r=l=void 0}function I(){return l===void 0?a:P(jn())}function v(){var b=jn(),S=C(b);if(o=arguments,r=this,u=b,S){if(l===void 0)return E(u);if(p)return l=setTimeout(x,e),h(u)}return l===void 0&&(l=setTimeout(x,e)),a}return v.cancel=w,v.flush=I,v}function gl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Tr);return Jt(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),hl(t,e,{leading:o,maxWait:e,trailing:r})}function Jt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ml(t){return!!t&&typeof t=="object"}function vl(t){return typeof t=="symbol"||ml(t)&&dl.call(t)==tl}function Ir(t){if(typeof t=="number")return t;if(vl(t))return Or;if(Jt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Jt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(nl,"");var n=rl.test(t);return n||il.test(t)?sl(t.slice(2),n?2:8):ol.test(t)?Or:+t}var yl=gl,Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.addPassiveEventListener=function(e,n,o){var r=o.name;r||(r=n,console.warn("Listener must be a named function.")),Qt.has(n)||Qt.set(n,new Set);var s=Qt.get(n);if(!s.has(r)){var a=function(){var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,u)}catch{}return l}();e.addEventListener(n,o,a?{passive:!0}:!1),s.add(r)}},Bt.removePassiveEventListener=function(e,n,o){e.removeEventListener(n,o),Qt.get(n).delete(o.name||n)};var Qt=new Map;Object.defineProperty(Nt,"__esModule",{value:!0});var bl=yl,Ll=xl(bl),Cl=Bt;function xl(t){return t&&t.__esModule?t:{default:t}}var El=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,Ll.default)(e,n)},_e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var o=El(function(r){_e.scrollHandler(e)},n);_e.scrollSpyContainers.push(e),(0,Cl.addPassiveEventListener)(e,"scroll",o)}},isMounted:function(e){return _e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(o){return o(_e.currentPositionX(e),_e.currentPositionY(e))})},addStateHandler:function(e){_e.spySetState.push(e)},addSpyHandler:function(e,n){var o=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(n)];o.spyCallbacks||(o.spyCallbacks=[]),o.spyCallbacks.push(e),e(_e.currentPositionX(n),_e.currentPositionY(n))},updateStates:function(){_e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){_e.scrollSpyContainers.forEach(function(o){return o.spyCallbacks&&o.spyCallbacks.length&&o.spyCallbacks.indexOf(n)>-1&&o.spyCallbacks.splice(o.spyCallbacks.indexOf(n),1)}),_e.spySetState&&_e.spySetState.length&&_e.spySetState.indexOf(e)>-1&&_e.spySetState.splice(_e.spySetState.indexOf(e),1),document.removeEventListener("scroll",_e.scrollHandler)},update:function(){return _e.scrollSpyContainers.forEach(function(e){return _e.scrollHandler(e)})}};Nt.default=_e;var xt={},$t={};Object.defineProperty($t,"__esModule",{value:!0});var wl=function(e,n){var o=e.indexOf("#")===0?e.substring(1):e,r=o?"#"+o:"",s=window&&window.location,a=r?s.pathname+s.search+r:s.pathname+s.search;n?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},Sl=function(){return window.location.hash.replace(/^#/,"")},kl=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},Ml=function(e){return getComputedStyle(e).position!=="static"},Nn=function(e,n){for(var o=e.offsetTop,r=e.offsetParent;r&&!n(r);)o+=r.offsetTop,r=r.offsetParent;return{offsetTop:o,offsetParent:r}},Pl=function(e,n,o){if(o)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Ml(e)){if(n.offsetParent!==e){var r=function(f){return f===e||f===document},s=Nn(n,r),a=s.offsetTop,l=s.offsetParent;if(l!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return Nn(n,u).offsetTop-Nn(e,u).offsetTop};$t.default={updateHash:wl,getHash:Sl,filterElementInContainer:kl,scrollOffset:Pl};var en={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var $n={};Object.defineProperty($n,"__esModule",{value:!0});var Tl=Bt,Ol=["mousedown","mousewheel","touchmove","keydown"];$n.default={subscribe:function(e){return typeof document<"u"&&Ol.forEach(function(n){return(0,Tl.addPassiveEventListener)(document,n,e)})}};var At={};Object.defineProperty(At,"__esModule",{value:!0});var An={registered:{},scrollEvent:{register:function(e,n){An.registered[e]=n},remove:function(e){An.registered[e]=null}}};At.default=An,Object.defineProperty(en,"__esModule",{value:!0});var Il=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_l=$t;tn(_l);var Rl=Bn,_r=tn(Rl),Dl=$n,jl=tn(Dl),Nl=At,Qe=tn(Nl);function tn(t){return t&&t.__esModule?t:{default:t}}var Rr=function(e){return _r.default[e.smooth]||_r.default.defaultEasing},Bl=function(e){return typeof e=="function"?e:function(){return e}},$l=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},zn=function(){return $l()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Dr=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},jr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},Nr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},Al=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var o=document.body,r=document.documentElement;return Math.max(o.scrollWidth,o.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)},zl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var o=document.body,r=document.documentElement;return Math.max(o.scrollHeight,o.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)},Ul=function t(e,n,o){var r=n.data;if(!n.ignoreCancelEvents&&r.cancel){Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPositionY);return}if(r.delta=Math.round(r.targetPosition-r.startPosition),r.start===null&&(r.start=o),r.progress=o-r.start,r.percent=r.progress>=r.duration?1:e(r.progress/r.duration),r.currentPosition=r.startPosition+Math.ceil(r.delta*r.percent),r.containerElement&&r.containerElement!==document&&r.containerElement!==document.body?n.horizontal?r.containerElement.scrollLeft=r.currentPosition:r.containerElement.scrollTop=r.currentPosition:n.horizontal?window.scrollTo(r.currentPosition,0):window.scrollTo(0,r.currentPosition),r.percent<1){var s=t.bind(null,e,n);zn.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Un=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},zt=function(e,n,o,r){n.data=n.data||Dr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(jl.default.subscribe(s),Un(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?jr(n):Nr(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Qe.default.registered.end&&Qe.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=Bl(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=o,n.data.target=r;var a=Rr(n),l=Ul.bind(null,a,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},nn=function(e){return e=Il({},e),e.data=e.data||Dr(),e.absolute=!0,e},Fl=function(e){zt(0,nn(e))},Hl=function(e,n){zt(e,nn(n))},Wl=function(e){e=nn(e),Un(e),zt(e.horizontal?Al(e):zl(e),e)},Vl=function(e,n){n=nn(n),Un(n);var o=n.horizontal?jr(n):Nr(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:Rr,scrollToTop:Fl,scrollToBottom:Wl,scrollTo:Hl,scrollMore:Vl},Object.defineProperty(xt,"__esModule",{value:!0});var Zl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Gl=$t,Yl=Fn(Gl),ql=en,Kl=Fn(ql),Xl=At,on=Fn(Xl);function Fn(t){return t&&t.__esModule?t:{default:t}}var rn={},Br=void 0;xt.default={unmount:function(){rn={}},register:function(e,n){rn[e]=n},unregister:function(e){delete rn[e]},get:function(e){return rn[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return Br=e},getActiveLink:function(){return Br},scrollTo:function(e,n){var o=this.get(e);if(!o){console.warn("target Element not found");return}n=Zl({},n,{absolute:!1});var r=n.containerId,s=n.container,a=void 0;r?a=document.getElementById(r):s&&s.nodeType?a=s:a=document,n.absolute=!0;var l=n.horizontal,u=Yl.default.scrollOffset(a,o,l)+(n.offset||0);if(!n.smooth){on.default.registered.begin&&on.default.registered.begin(e,o),a===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,on.default.registered.end&&on.default.registered.end(e,o);return}Kl.default.animateTopScroll(u,n,e,o)}};var Hn={exports:{}},sn={exports:{}},we={};/** @license React v16.13.1
|
71
|
+
</svg>`,s=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(yt.isAdvancedMarkerAvailable(i)){const h=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:u,title:s,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}const c={position:n,zIndex:u,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Rf(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class yi{constructor(){Rf(yi,google.maps.OverlayView)}}var zn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(zn||(zn={}));const If=(t,e,n)=>{n.fitBounds(e.bounds)};class jf extends yi{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Mf(r),renderer:a=new Tf,onClusterClick:o=If}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(yt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,zn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const a=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||yt.setMap(o.marker,null):a.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>a.forEach(o=>yt.setMap(o,null)))}google.maps.event.trigger(this,zn.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(e=>yt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new kf(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>yt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,zn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),yt.setMap(r.marker,n)})}}function Nf(t){var e=Zc(),n=l.useState(null),r=n[0],i=n[1];return l.useEffect(function(){if(e&&r===null){var a=new jf(me(me({},t),{map:e}));i(a)}},[e]),r}function zf(t){var e=t.children,n=t.options,r=Nf(n);return r!==null?e(r):null}l.memo(zf);var Co={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Do={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function _f(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=l.useContext(Le),C=l.useState(null),v=C[0],d=C[1],D=l.useState(null),B=D[0],w=D[1],O=l.useState(null),b=O[0],E=O[1],S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],j=l.useState(null),I=j[0],N=j[1],X=l.useRef(null);return l.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),l.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),l.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),l.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),l.useEffect(function(){v&&o&&(B!==null&&google.maps.event.removeListener(B),w(google.maps.event.addListener(v,"closeclick",o)))},[o]),l.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),E(google.maps.event.addListener(v,"domready",s)))},[s]),l.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),l.useEffect(function(){v&&c&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(v,"position_changed",c)))},[c]),l.useEffect(function(){v&&f&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),l.useEffect(function(){var _=new google.maps.InfoWindow(me({},r||{}));return d(_),X.current=document.createElement("div"),o&&w(google.maps.event.addListener(_,"closeclick",o)),s&&E(google.maps.event.addListener(_,"domready",s)),u&&V(google.maps.event.addListener(_,"content_changed",u)),c&&R(google.maps.event.addListener(_,"position_changed",c)),f&&N(google.maps.event.addListener(_,"zindex_changed",f)),_.setContent(X.current),i&&_.setPosition(i),a&&_.setZIndex(a),n?_.open(g,n):_.getPosition()?_.open(g):tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),b&&google.maps.event.removeListener(b),z&&google.maps.event.removeListener(z),I&&google.maps.event.removeListener(I),p&&p(_),_.close()}},[]),X.current?Wt.createPortal(l.Children.only(e),X.current):null}l.memo(_f),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(me({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Fe({updaterMap:Do,eventMap:Co,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Do,eventMap:Co,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Wt.createPortal(l.Children.only(this.props.children),this.containerElement):null},e.contextType=Le,e}(l.PureComponent);var bo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Eo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Wf={};function Uf(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,C=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,w=l.useContext(Le),O=l.useState(null),b=O[0],E=O[1],S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],j=l.useState(null),I=j[0],N=j[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),k=re[0],T=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ae=l.useState(null),de=ae[0],pe=ae[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1];return l.useEffect(function(){b!==null&&b.setMap(w)},[w]),l.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),l.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),l.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),l.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),l.useEffect(function(){typeof a<"u"&&b!==null&&b.setPath(a)},[b,a]),l.useEffect(function(){b&&o&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(b,"dblclick",o)))},[o]),l.useEffect(function(){b&&s&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(b,"dragend",s)))},[s]),l.useEffect(function(){b&&u&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),l.useEffect(function(){b&&c&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(b,"mousedown",c)))},[c]),l.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(b,"mousemove",f)))},[f]),l.useEffect(function(){b&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(b,"mouseout",h)))},[h]),l.useEffect(function(){b&&p&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(b,"mouseover",p)))},[p]),l.useEffect(function(){b&&g&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(b,"mouseup",g)))},[g]),l.useEffect(function(){b&&C&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(b,"rightclick",C)))},[C]),l.useEffect(function(){b&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(b,"click",v)))},[v]),l.useEffect(function(){b&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(b,"drag",d)))},[d]),l.useEffect(function(){var ve=new google.maps.Polyline(me(me({},e||Wf),{map:w}));return a&&ve.setPath(a),typeof i<"u"&&ve.setVisible(i),typeof r<"u"&&ve.setEditable(r),typeof n<"u"&&ve.setDraggable(n),o&&V(google.maps.event.addListener(ve,"dblclick",o)),s&&R(google.maps.event.addListener(ve,"dragend",s)),u&&N(google.maps.event.addListener(ve,"dragstart",u)),c&&$(google.maps.event.addListener(ve,"mousedown",c)),f&&T(google.maps.event.addListener(ve,"mousemove",f)),h&&Q(google.maps.event.addListener(ve,"mouseout",h)),p&&U(google.maps.event.addListener(ve,"mouseover",p)),g&&J(google.maps.event.addListener(ve,"mouseup",g)),C&&ue(google.maps.event.addListener(ve,"rightclick",C)),v&&pe(google.maps.event.addListener(ve,"click",v)),d&&ge(google.maps.event.addListener(ve,"drag",d)),E(ve),D&&D(ve),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),I!==null&&google.maps.event.removeListener(I),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),B&&B(ve),ve.setMap(null)}},[]),null}l.memo(Uf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Eo,eventMap:bo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Eo,eventMap:bo,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var wo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Bo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Hf(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.paths,s=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,C=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,w=t.onUnmount,O=t.onEdit,b=l.useContext(Le),E=l.useState(null),S=E[0],F=E[1],V=l.useState(null),P=V[0],z=V[1],R=l.useState(null),j=R[0],I=R[1],N=l.useState(null),X=N[0],_=N[1],$=l.useState(null),re=$[0],k=$[1],T=l.useState(null),Z=T[0],H=T[1],Q=l.useState(null),K=Q[0],y=Q[1],U=l.useState(null),W=U[0],M=U[1],J=l.useState(null),ne=J[0],G=J[1],ue=l.useState(null),ae=ue[0],de=ue[1],pe=l.useState(null),Ce=pe[0],ye=pe[1],ge=l.useState(null),ve=ge[0],je=ge[1];return l.useEffect(function(){S!==null&&S.setMap(b)},[b]),l.useEffect(function(){typeof e<"u"&&S!==null&&S.setOptions(e)},[S,e]),l.useEffect(function(){typeof n<"u"&&S!==null&&S.setDraggable(n)},[S,n]),l.useEffect(function(){typeof r<"u"&&S!==null&&S.setEditable(r)},[S,r]),l.useEffect(function(){typeof i<"u"&&S!==null&&S.setVisible(i)},[S,i]),l.useEffect(function(){typeof a<"u"&&S!==null&&S.setPath(a)},[S,a]),l.useEffect(function(){typeof o<"u"&&S!==null&&S.setPaths(o)},[S,o]),l.useEffect(function(){S&&s&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(S,"dblclick",s)))},[s]),l.useEffect(function(){S&&(google.maps.event.addListener(S.getPath(),"insert_at",function(){O==null||O(S)}),google.maps.event.addListener(S.getPath(),"set_at",function(){O==null||O(S)}))},[S,O]),l.useEffect(function(){S&&u&&(j!==null&&google.maps.event.removeListener(j),I(google.maps.event.addListener(S,"dragend",u)))},[u]),l.useEffect(function(){S&&c&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(S,"dragstart",c)))},[c]),l.useEffect(function(){S&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(S,"mousedown",f)))},[f]),l.useEffect(function(){S&&h&&(Z!==null&&google.maps.event.removeListener(Z),H(google.maps.event.addListener(S,"mousemove",h)))},[h]),l.useEffect(function(){S&&p&&(K!==null&&google.maps.event.removeListener(K),y(google.maps.event.addListener(S,"mouseout",p)))},[p]),l.useEffect(function(){S&&g&&(W!==null&&google.maps.event.removeListener(W),M(google.maps.event.addListener(S,"mouseover",g)))},[g]),l.useEffect(function(){S&&C&&(ne!==null&&google.maps.event.removeListener(ne),G(google.maps.event.addListener(S,"mouseup",C)))},[C]),l.useEffect(function(){S&&v&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(S,"rightclick",v)))},[v]),l.useEffect(function(){S&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(S,"click",d)))},[d]),l.useEffect(function(){S&&D&&(ve!==null&&google.maps.event.removeListener(ve),je(google.maps.event.addListener(S,"drag",D)))},[D]),l.useEffect(function(){var se=new google.maps.Polygon(me(me({},e||{}),{map:b}));return a&&se.setPath(a),o&&se.setPaths(o),typeof i<"u"&&se.setVisible(i),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&z(google.maps.event.addListener(se,"dblclick",s)),u&&I(google.maps.event.addListener(se,"dragend",u)),c&&_(google.maps.event.addListener(se,"dragstart",c)),f&&k(google.maps.event.addListener(se,"mousedown",f)),h&&H(google.maps.event.addListener(se,"mousemove",h)),p&&y(google.maps.event.addListener(se,"mouseout",p)),g&&M(google.maps.event.addListener(se,"mouseover",g)),C&&G(google.maps.event.addListener(se,"mouseup",C)),v&&de(google.maps.event.addListener(se,"rightclick",v)),d&&ye(google.maps.event.addListener(se,"click",d)),D&&je(google.maps.event.addListener(se,"drag",D)),F(se),B&&B(se),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),X!==null&&google.maps.event.removeListener(X),re!==null&&google.maps.event.removeListener(re),Z!==null&&google.maps.event.removeListener(Z),K!==null&&google.maps.event.removeListener(K),W!==null&&google.maps.event.removeListener(W),ne!==null&&google.maps.event.removeListener(ne),ae!==null&&google.maps.event.removeListener(ae),Ce!==null&&google.maps.event.removeListener(Ce),w&&w(se),se.setMap(null)}},[]),null}l.memo(Hf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Bo,eventMap:wo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Bo,eventMap:wo,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var xo={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"},Lo={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Vf(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,a=t.visible,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,C=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,w=t.onUnmount,O=l.useContext(Le),b=l.useState(null),E=b[0],S=b[1],F=l.useState(null),V=F[0],P=F[1],z=l.useState(null),R=z[0],j=z[1],I=l.useState(null),N=I[0],X=I[1],_=l.useState(null),$=_[0],re=_[1],k=l.useState(null),T=k[0],Z=k[1],H=l.useState(null),Q=H[0],K=H[1],y=l.useState(null),U=y[0],W=y[1],M=l.useState(null),J=M[0],ne=M[1],G=l.useState(null),ue=G[0],ae=G[1],de=l.useState(null),pe=de[0],Ce=de[1],ye=l.useState(null),ge=ye[0],ve=ye[1],je=l.useState(null),se=je[0],Ne=je[1];return l.useEffect(function(){E!==null&&E.setMap(O)},[O]),l.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),l.useEffect(function(){typeof r<"u"&&E!==null&&E.setDraggable(r)},[E,r]),l.useEffect(function(){typeof i<"u"&&E!==null&&E.setEditable(i)},[E,i]),l.useEffect(function(){typeof a<"u"&&E!==null&&E.setVisible(a)},[E,a]),l.useEffect(function(){typeof n<"u"&&E!==null&&E.setBounds(n)},[E,n]),l.useEffect(function(){E&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(E,"dblclick",o)))},[o]),l.useEffect(function(){E&&s&&(R!==null&&google.maps.event.removeListener(R),j(google.maps.event.addListener(E,"dragend",s)))},[s]),l.useEffect(function(){E&&u&&(N!==null&&google.maps.event.removeListener(N),X(google.maps.event.addListener(E,"dragstart",u)))},[u]),l.useEffect(function(){E&&c&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(E,"mousedown",c)))},[c]),l.useEffect(function(){E&&f&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(E,"mousemove",f)))},[f]),l.useEffect(function(){E&&h&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(E,"mouseout",h)))},[h]),l.useEffect(function(){E&&p&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(E,"mouseover",p)))},[p]),l.useEffect(function(){E&&g&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(E,"mouseup",g)))},[g]),l.useEffect(function(){E&&C&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(E,"rightclick",C)))},[C]),l.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(E,"click",v)))},[v]),l.useEffect(function(){E&&d&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(E,"drag",d)))},[d]),l.useEffect(function(){E&&D&&(se!==null&&google.maps.event.removeListener(se),Ne(google.maps.event.addListener(E,"bounds_changed",D)))},[D]),l.useEffect(function(){var fe=new google.maps.Rectangle(me(me({},e||{}),{map:O}));return typeof a<"u"&&fe.setVisible(a),typeof i<"u"&&fe.setEditable(i),typeof r<"u"&&fe.setDraggable(r),typeof n<"u"&&fe.setBounds(n),o&&P(google.maps.event.addListener(fe,"dblclick",o)),s&&j(google.maps.event.addListener(fe,"dragend",s)),u&&X(google.maps.event.addListener(fe,"dragstart",u)),c&&re(google.maps.event.addListener(fe,"mousedown",c)),f&&Z(google.maps.event.addListener(fe,"mousemove",f)),h&&K(google.maps.event.addListener(fe,"mouseout",h)),p&&W(google.maps.event.addListener(fe,"mouseover",p)),g&&ne(google.maps.event.addListener(fe,"mouseup",g)),C&&ae(google.maps.event.addListener(fe,"rightclick",C)),v&&Ce(google.maps.event.addListener(fe,"click",v)),d&&ve(google.maps.event.addListener(fe,"drag",d)),D&&Ne(google.maps.event.addListener(fe,"bounds_changed",D)),S(fe),B&&B(fe),function(){V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),T!==null&&google.maps.event.removeListener(T),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),w&&w(fe),fe.setMap(null)}},[]),null}l.memo(Vf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Lo,eventMap:xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Lo,eventMap:xo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var So={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"},Ao={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},qf={};function Zf(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,a=t.editable,o=t.visible,s=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,C=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,w=t.onRadiusChanged,O=t.onLoad,b=t.onUnmount,E=l.useContext(Le),S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],j=l.useState(null),I=j[0],N=j[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),k=re[0],T=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ae=l.useState(null),de=ae[0],pe=ae[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1],ve=l.useState(null),je=ve[0],se=ve[1],Ne=l.useState(null),fe=Ne[0],we=Ne[1],Me=l.useState(null),He=Me[0],qe=Me[1];return l.useEffect(function(){F!==null&&F.setMap(E)},[E]),l.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),l.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),l.useEffect(function(){typeof a<"u"&&F!==null&&F.setEditable(a)},[F,a]),l.useEffect(function(){typeof o<"u"&&F!==null&&F.setVisible(o)},[F,o]),l.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),l.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),l.useEffect(function(){F&&s&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(F,"dblclick",s)))},[s]),l.useEffect(function(){F&&u&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(F,"dragend",u)))},[u]),l.useEffect(function(){F&&c&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(F,"dragstart",c)))},[c]),l.useEffect(function(){F&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(F,"mousedown",f)))},[f]),l.useEffect(function(){F&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(F,"mousemove",h)))},[h]),l.useEffect(function(){F&&p&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(F,"mouseout",p)))},[p]),l.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(F,"mouseover",g)))},[g]),l.useEffect(function(){F&&C&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(F,"mouseup",C)))},[C]),l.useEffect(function(){F&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(F,"rightclick",v)))},[v]),l.useEffect(function(){F&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(F,"click",d)))},[d]),l.useEffect(function(){F&&D&&(je!==null&&google.maps.event.removeListener(je),se(google.maps.event.addListener(F,"drag",D)))},[D]),l.useEffect(function(){F&&B&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),l.useEffect(function(){F&&w&&(He!==null&&google.maps.event.removeListener(He),qe(google.maps.event.addListener(F,"radius_changed",w)))},[w]),l.useEffect(function(){var Ee=new google.maps.Circle(me(me({},e||qf),{map:E}));return typeof r=="number"&&Ee.setRadius(r),typeof n<"u"&&Ee.setCenter(n),typeof r=="number"&&Ee.setRadius(r),typeof o<"u"&&Ee.setVisible(o),typeof a<"u"&&Ee.setEditable(a),typeof i<"u"&&Ee.setDraggable(i),s&&R(google.maps.event.addListener(Ee,"dblclick",s)),u&&N(google.maps.event.addListener(Ee,"dragend",u)),c&&$(google.maps.event.addListener(Ee,"dragstart",c)),f&&T(google.maps.event.addListener(Ee,"mousedown",f)),h&&Q(google.maps.event.addListener(Ee,"mousemove",h)),p&&U(google.maps.event.addListener(Ee,"mouseout",p)),g&&J(google.maps.event.addListener(Ee,"mouseover",g)),C&&ue(google.maps.event.addListener(Ee,"mouseup",C)),v&&pe(google.maps.event.addListener(Ee,"rightclick",v)),d&&ge(google.maps.event.addListener(Ee,"click",d)),D&&se(google.maps.event.addListener(Ee,"drag",D)),B&&we(google.maps.event.addListener(Ee,"center_changed",B)),w&&qe(google.maps.event.addListener(Ee,"radius_changed",w)),V(Ee),O&&O(Ee),function(){z!==null&&google.maps.event.removeListener(z),I!==null&&google.maps.event.removeListener(I),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),fe!==null&&google.maps.event.removeListener(fe),He!==null&&google.maps.event.removeListener(He),b&&b(Ee),Ee.setMap(null)}},[]),null}l.memo(Zf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Ao,eventMap:So,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Ao,eventMap:So,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Oo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Fo={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Gf(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,a=t.onMouseMove,o=t.onMouseOut,s=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,h=t.onRemoveFeature,p=t.onRemoveProperty,g=t.onSetGeometry,C=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=l.useContext(Le),B=l.useState(null),w=B[0],O=B[1],b=l.useState(null),E=b[0],S=b[1],F=l.useState(null),V=F[0],P=F[1],z=l.useState(null),R=z[0],j=z[1],I=l.useState(null),N=I[0],X=I[1],_=l.useState(null),$=_[0],re=_[1],k=l.useState(null),T=k[0],Z=k[1],H=l.useState(null),Q=H[0],K=H[1],y=l.useState(null),U=y[0],W=y[1],M=l.useState(null),J=M[0],ne=M[1],G=l.useState(null),ue=G[0],ae=G[1],de=l.useState(null),pe=de[0],Ce=de[1],ye=l.useState(null),ge=ye[0],ve=ye[1],je=l.useState(null),se=je[0],Ne=je[1];return l.useEffect(function(){w!==null&&w.setMap(D)},[D]),l.useEffect(function(){w&&r&&(E!==null&&google.maps.event.removeListener(E),S(google.maps.event.addListener(w,"dblclick",r)))},[r]),l.useEffect(function(){w&&i&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(w,"mousedown",i)))},[i]),l.useEffect(function(){w&&a&&(R!==null&&google.maps.event.removeListener(R),j(google.maps.event.addListener(w,"mousemove",a)))},[a]),l.useEffect(function(){w&&o&&(N!==null&&google.maps.event.removeListener(N),X(google.maps.event.addListener(w,"mouseout",o)))},[o]),l.useEffect(function(){w&&s&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(w,"mouseover",s)))},[s]),l.useEffect(function(){w&&u&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(w,"mouseup",u)))},[u]),l.useEffect(function(){w&&c&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(w,"rightclick",c)))},[c]),l.useEffect(function(){w&&n&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(w,"click",n)))},[n]),l.useEffect(function(){w&&f&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(w,"addfeature",f)))},[f]),l.useEffect(function(){w&&h&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(w,"removefeature",h)))},[h]),l.useEffect(function(){w&&p&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(w,"removeproperty",p)))},[p]),l.useEffect(function(){w&&g&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(w,"setgeometry",g)))},[g]),l.useEffect(function(){w&&C&&(se!==null&&google.maps.event.removeListener(se),Ne(google.maps.event.addListener(w,"setproperty",C)))},[C]),l.useEffect(function(){if(D!==null){var fe=new google.maps.Data(me(me({},e||{}),{map:D}));r&&S(google.maps.event.addListener(fe,"dblclick",r)),i&&P(google.maps.event.addListener(fe,"mousedown",i)),a&&j(google.maps.event.addListener(fe,"mousemove",a)),o&&X(google.maps.event.addListener(fe,"mouseout",o)),s&&re(google.maps.event.addListener(fe,"mouseover",s)),u&&Z(google.maps.event.addListener(fe,"mouseup",u)),c&&K(google.maps.event.addListener(fe,"rightclick",c)),n&&W(google.maps.event.addListener(fe,"click",n)),f&&ne(google.maps.event.addListener(fe,"addfeature",f)),h&&ae(google.maps.event.addListener(fe,"removefeature",h)),p&&Ce(google.maps.event.addListener(fe,"removeproperty",p)),g&&ve(google.maps.event.addListener(fe,"setgeometry",g)),C&&Ne(google.maps.event.addListener(fe,"setproperty",C)),O(fe),v&&v(fe)}return function(){w&&(E!==null&&google.maps.event.removeListener(E),V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),T!==null&&google.maps.event.removeListener(T),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),d&&d(w),w.setMap(null))}},[]),null}l.memo(Gf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Fo,eventMap:Oo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Fo,eventMap:Oo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Po={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Mo={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(me(me({},this.props.options),{map:this.context}));this.registeredEvents=Fe({updaterMap:Mo,eventMap:Po,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Mo,eventMap:Po,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e})(l.PureComponent);function ko(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Yf(t,e){return new e(t.lat,t.lng)}function Kf(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Xf(t,e,n){return t instanceof e?t:n(t,e)}function Jf(t,e,n){return t instanceof e?t:n(t,e)}function Qf(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function $f(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,a=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(a+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function To(t,e,n,r){return n!==void 0?Qf(t,e,Jf(n,google.maps.LatLngBounds,Kf)):$f(t,e,Xf(r,google.maps.LatLng,Yf))}function ed(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function td(t,e,n,r,i){var a=function(o){Ve(s,o);function s(u,c,f,h){var p=o.call(this)||this;return p.container=u,p.pane=c,p.position=f,p.bounds=h,p}return s.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},s.prototype.draw=function(){for(var u=this.getProjection(),c=me({},this.container?ko(this.container,i):{x:0,y:0}),f=To(u,c,this.bounds,this.position),h=0,p=Object.entries(f);h<p.length;h++){var g=p[h],C=g[0],v=g[1];this.container.style[C]=v}},s.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},s}(google.maps.OverlayView);return new a(t,e,n,r)}function Ro(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Io(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function nd(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,a=t.onLoad,o=t.onUnmount,s=t.getPixelPositionOffset,u=t.children,c=l.useContext(Le),f=l.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),h=l.useMemo(function(){return td(f,r,e,n,s)},[f,r,e,n]);return l.useEffect(function(){return a==null||a(h),h==null||h.setMap(c),function(){o==null||o(h),h==null||h.setMap(null)}},[c,h]),l.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),ja.createPortal(u,f)}l.memo(nd),function(t){Ve(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var a=r.props.mapPaneName,o=r.overlayView.getPanes();tt(!!a,"OverlayView requires props.mapPaneName but got %s",a),o?r.setState({paneEl:o[a]}):r.setState({paneEl:null})},r.onAdd=function(){var a,o;r.updatePane(),(o=(a=r.props).onLoad)===null||o===void 0||o.call(a,r.overlayView)},r.onPositionElement=function(){var a=r.overlayView.getProjection(),o=me({x:0,y:0},r.containerRef.current?ko(r.containerRef.current,r.props.getPixelPositionOffset):{}),s=To(a,o,r.props.bounds,r.props.position),u=r.state.containerStyle,c=u.left,f=u.top,h=u.width,p=u.height;ed(s,{left:c,top:f,width:h,height:p})||r.setState({containerStyle:{top:s.top||0,left:s.left||0,width:s.width||0,height:s.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var a,o;r.setState(function(){return{paneEl:null}}),(o=(a=r.props).onUnmount)===null||o===void 0||o.call(a,r.overlayView)},r.containerRef=l.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=Ro(n.position),i=Ro(this.props.position),a=Io(n.bounds),o=Io(this.props.bounds);(r!==i||a!==o)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?ja.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:l.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Le,e}(l.PureComponent);function rd(){}var jo={onDblClick:"dblclick",onClick:"click"},No={opacity:function(t,e){t.setOpacity(e)}};function id(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,a=l.useContext(Le),o=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),s=l.useMemo(function(){var u=new google.maps.GroundOverlay(e,o,me({},r));return u},[]);return l.useEffect(function(){s!==null&&s.setMap(a)},[a]),l.useEffect(function(){typeof e<"u"&&s!==null&&(s.set("url",e),s.setMap(a))},[s,e]),l.useEffect(function(){typeof i<"u"&&s!==null&&s.setOpacity(i?1:0)},[s,i]),l.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&s!==null&&(s.set("bounds",u),s.setMap(a))},[s,n]),null}l.memo(id),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){tt(!!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 n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,me(me({},this.props.options),{map:this.context}));this.registeredEvents=Fe({updaterMap:No,eventMap:jo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:No,eventMap:jo,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:rd},e.contextType=Le,e}(l.PureComponent);var zo={},_o={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function ad(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,a=l.useContext(Le),o=l.useState(null),s=o[0],u=o[1];return l.useEffect(function(){google.maps.visualization||tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),l.useEffect(function(){tt(!!e,"data property is required in HeatmapLayer %s",e)},[e]),l.useEffect(function(){s!==null&&s.setMap(a)},[a]),l.useEffect(function(){i&&s!==null&&s.setOptions(i)},[s,i]),l.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(me(me({},i||{}),{data:e,map:a}));return u(c),n&&n(c),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}l.memo(ad),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),tt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(me(me({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Fe({updaterMap:_o,eventMap:zo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:_o,eventMap:zo,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Wo={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Uo={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Fe({updaterMap:Uo,eventMap:Wo,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Uo,eventMap:Wo,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Le,e})(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(l.PureComponent);var Ho={onDirectionsChanged:"directions_changed"},Vo={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Fe({updaterMap:Vo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Vo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=Le,e})(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(l.PureComponent);var qo={onPlacesChanged:"places_changed"},Zo={bounds:function(t,e){t.setBounds(e)}},od=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=l.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(tt(!!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 n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Fe({updaterMap:Zo,eventMap:qo,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Zo,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:l.Children.only(this.props.children)})},e.contextType=Le,e}(l.PureComponent),Go={onPlaceChanged:"place_changed"},Yo={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=l.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Fe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:l.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Le,e})(l.PureComponent);function sd({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx($c,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(cf,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function ud(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function ld(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,a=`arkynTableBody ${n}`,o=l.Children.count(r)===0;return x.jsx("tbody",{className:a.trim(),...i,children:o?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function cd(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return x.jsx("caption",{className:i.trim(),...r,children:x.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function fd(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return x.jsx("div",{className:i.trim(),...r,children:x.jsx("table",{children:e})})}function dd(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return x.jsxs("tfoot",{className:i.trim(),...r,children:[x.jsx("tr",{className:"spacingRow"}),x.jsx("tr",{children:x.jsx("th",{colSpan:100,children:x.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function pd(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return x.jsxs("thead",{className:i.trim(),...r,children:[x.jsx("tr",{children:n}),x.jsx("tr",{className:"spacingRow"})]})}function hd(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:a="md",leftIcon:o,rightIcon:s,disabled:u,className:c="",children:f,...h}=t,g={xs:12,sm:16,md:20,lg:24}[a],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${a} ${i?"loadingTextTrue":"loadingTextFalse"} ${c}`;return x.jsxs("button",{className:d,disabled:u||e,...h,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Se.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[fr(g,o),f,fr(g,s)]})]})}const Ko=l.createContext({});function vd(t){var h,p;const e=Dn.useActionData(),{children:n,className:r,id:i,...a}=t,o=l.useRef(null),s=((h=o.current)==null?void 0:h.name)||"",u=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[s])||null,c=l.useId(),f=`arkynFormController ${r}`;return x.jsx(Ko.Provider,{value:{error:u,id:c,inputRef:o},children:x.jsx("section",{id:i||s||void 0,className:f.trim(),...a,children:n})})}function Ct(){return l.useContext(Ko)}function gd(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:a=!1,checked:o=null,onCheck:s,value:u,...c}=t,{id:f,inputRef:h,error:p}=Ct(),g=i||!!p,[C,v]=l.useState(a||!1),d=typeof o=="boolean"?o:C,w=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const b=C;v(!b),s&&s(b?"":u||"checked")}return x.jsxs("button",{id:f,type:"button",className:w,onClick:O,...c,children:[x.jsx("input",{type:"hidden",name:e,ref:h,value:d?u||"checked":""}),x.jsx(Se.Check,{})]})}function md(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:a}=Ct();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):a?x.jsx("strong",{className:i.trim(),...r,children:a}):x.jsx(x.Fragment,{})}function yd(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=Ct(),o=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:o.trim(),htmlFor:i,...r})}function qt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function Ci(t){return t&&t.replace(/[^0-9]/g,"")}function Xo(t,e){let n="",r=0;return Array.from(t).forEach((i,a)=>{e[a+r].match(/[0-9]/)||(n+=e[a+r],r++),n+=i}),n}function Jo(t){return t.length>11?"CNPJ":"CPF"}const Di={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Qo=Ci(Di.CNPJ).length;function Cd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,defaultValue:p,readOnly:g,onFocus:C,onBlur:v,title:d,style:D,onChange:B,...w}=t;function O(I){let N=Ci(I);const X=Jo(N);if(!(N.length>Qo))return N=Xo(N,Di[X]),N}const b=f?"right":"left",z=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:qt(s,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:O(p||""),disabled:h,readOnly:g,onFocus:C,onBlur:v,title:d,style:D,onChange:B,loadingPosition:b,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...w}}function Dd(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:i,id:a,error:o}=Ct(),s=i||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:g,sufix:C,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:w,onFocus:O,onBlur:b,RightIcon:E,Spinner:S,onChange:F,value:V,defaultValue:P,...z}=Cd({...t,id:a,isError:u},e),[R,j]=l.useState(P),I=B&&!D,N=E&&!D,X=d==="left"&&D,_=d==="right"&&D;function $(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function re(Z){let H=Ci(Z.target.value);const Q=Jo(H);H.length>Qo||(H=Xo(H,Di[Q]),Z.target.value=H,j(H),F&&F(Z))}function k(Z){n(!0),O&&O(Z)}function T(Z){n(!1),b&&b(Z)}return x.jsxs("section",{title:f,style:h,onClick:$,className:p,children:[g,X&&S,I&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:c||D,readOnly:w,ref:s,value:V||R,onFocus:k,onChange:re,onBlur:T,...z}),N&&x.jsx(E,{size:v,strokeWidth:2.5}),_&&S,C]})}const bd=3,Ed=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?bd:0),vr=2,$o=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),bi=t=>{let e=t;return typeof t=="string"?(e=$o(t),e%1!==0&&(e=e.toFixed(vr))):e=Number.isInteger(t)?Number(t)*10**vr:t.toFixed(vr),$o(e)/10**vr},es=(t,e,n)=>{if(!e)return[0,""];const r=bi(e),i=Ed(t,r,n);return[r,i]};function wd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:w="BRL",...O}=t,b=f?"right":"left",z=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:qt(s,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,locale:B,currency:w,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,max:D,loadingPosition:b,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}function Bd(t){const[e,n]=l.useState(!1),[r,i]=l.useState("0"),a=l.useRef(null),{inputRef:o,id:s,error:u}=Ct(),c=o||a,f=t.isError||!!u,{disabled:h,title:p,style:g,className:C,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:w,LeftIcon:O,readOnly:b,onFocus:E,onBlur:S,RightIcon:F,Spinner:V,value:P,max:z,onChangeValue:R,onKeyPress:j,currency:I,locale:N,name:X,defaultValue:_,...$}=wd({...t,id:s,isError:f},e),re=O&&!w,k=F&&!w,T=B==="left"&&w,Z=B==="right"&&w;function H(){h||!(c!=null&&c.current)||(n(!0),c.current.focus())}function Q(M){n(!0),E&&E(M)}function K(M){n(!1),S&&S(M)}const y=M=>{const[J,ne]=es(N,M,I);return!z||J<=z?(i(ne),[J,ne]):[bi(r),r]},U=M=>{M.preventDefault();const[J,ne]=y(M.target.value);R(M,String(J),String(ne))},W=M=>j&&j(M,M.key,M.key);return l.useEffect(()=>{const M=P||+_||void 0,[,J]=es(N,M,I);i(J)},[I,_,P]),x.jsxs("section",{title:p,style:g,onClick:H,className:C,children:[v,T&&V,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:U,onBlur:K,onFocus:Q,onKeyUp:W,disabled:h||w,readOnly:b,...$}),x.jsx("input",{type:"hidden",ref:c,name:X,value:bi(r)}),Z&&V,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function xd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,showMask:B=!1,type:w,...O}=t,b=f?"right":"left",z=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:qt(s,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,loadingPosition:b,iconSize:j,showMask:B,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}const Ld=l.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function Sd(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:i,id:a,error:o}=Ct(),s=i||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:g,sufix:C,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:w,onFocus:O,onBlur:b,RightIcon:E,Spinner:S,...F}=xd({...t,id:a,isError:u},e),V=B&&!D,P=E&&!D,z=d==="left"&&D,R=d==="right"&&D;function j(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function I(X){n(!0),O&&O(X)}function N(X){n(!1),b&&b(X)}return x.jsxs("section",{title:f,style:h,onClick:j,className:p,children:[g,z&&S,V&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Lc.InputMask,{component:Ld,ref:s,onFocus:I,onBlur:N,disabled:c,...F}),P&&x.jsx(E,{size:v,strokeWidth:2.5}),R&&S,C]})}function Ad(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,...B}=t,w=f?"right":"left",V=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,z={md:20,lg:20}[i];return{isLoading:n,className:V,prefix:qt(s,z,"prefix"),sufix:qt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,loadingPosition:w,iconSize:z,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Od(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:i,id:a,error:o}=Ct(),s=i||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:g,sufix:C,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:w,onFocus:O,onBlur:b,RightIcon:E,type:S,Spinner:F,...V}=Ad({...t,id:a,isError:u},e),P=B&&!D,z=E&&!D,R=d==="left"&&D,j=d==="right"&&D;function I(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function N(_){n(!0),O&&O(_)}function X(_){n(!1),b&&b(_)}return S==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:s,...V}):x.jsxs("section",{title:f,style:h,onClick:I,className:p,children:[g,R&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:c||D,readOnly:w,ref:s,onFocus:N,onBlur:X,type:S,...V}),z&&x.jsx(E,{size:v,strokeWidth:2.5}),j&&F,C]})}function ts(t){return t.type==="currency"?x.jsx(Bd,{...t}):t.type==="masked"?x.jsx(Sd,{...t}):t.type==="cpf-cnpj"?x.jsx(Dd,{...t}):x.jsx(Od,{...t})}function Fd({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,a]=l.useState(null),o=u=>a(u),s=()=>{var g,C,v,d;const c=i.getPlaces()[0],f=c==null?void 0:c.address_components;function h(D){const B=f.find(w=>w.types[0]===D);return B?B.long_name:""}function p(D){const B=f.find(w=>w.types[0]===D);return B?B.short_name:""}if(c){const D=h("route"),B=h("street_number"),w=h("sublocality_level_1"),O=h("administrative_area_level_2"),b=h("administrative_area_level_1"),E=p("administrative_area_level_1"),S=h("postal_code"),F=(C=(g=c.geometry)==null?void 0:g.location)==null?void 0:C.lat(),V=(d=(v=c.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:b,district:w,cep:S,streetNumber:B,stateShortName:E,coordinates:{lat:F,lng:V}})}};return x.jsx(od,{onLoad:o,onPlacesChanged:s,options:n,children:x.jsx(ts,{type:"text",onChange:u=>t(u.target.value),...r})})}function Pd(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:a,disabled:o,className:s="",...u}=t,c={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${s}`;return x.jsxs("button",{disabled:o||e,className:h.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Se.Loader2,{size:c[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(a,{size:c[i],strokeWidth:2.5})})]})}const ns=l.createContext({});function Md(){return l.useContext(ns)}function kd(t){const{defaultValue:e,name:n,value:r,onChange:i,size:a="md",className:o="",...s}=t,[u,c]=l.useState(e||""),{inputRef:f,id:h}=Ct();function p(C){c(C),i&&i(C)}const g=`arkynRadioGroup ${a} ${o}`;return x.jsxs(ns.Provider,{value:{onChange:p,value:r||u,size:a},children:[x.jsx("input",{style:{display:"none"},type:"text",id:h,readOnly:!0,name:n,ref:f,value:r||u}),x.jsx("div",{className:g.trim(),...s})]})}function Td(t){const{value:e,size:n,disabled:r,children:i,className:a="",...o}=t,{onChange:s,size:u,value:c}=Md(),{error:f}=Ct(),v=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${a}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>s(e),onFocus:()=>s(e),...o}),i]})}var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});for(var Rd=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ei={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},rs={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Rd?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},wi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},gr=1;gr<20;gr++)wi["f"+gr]=111+gr;function mr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(o){return is(o,e)}),i=function(s){return r.some(function(u){return as(u,s)})},a=n==null?i:i(n);return a}function Id(t,e){return mr(t,e)}function jd(t,e){return mr(t,{byKey:!0},e)}function is(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in Ei)r[Ei[o]]=!1;var s=!0,u=!1,c=void 0;try{for(var f=i[Symbol.iterator](),h;!(s=(h=f.next()).done);s=!0){var p=h.value,g=p.endsWith("?")&&p.length>1;g&&(p=p.slice(0,-1));var C=Bi(p),v=Ei[C];if(p.length>1&&!v&&!rs[p]&&!wi[C])throw new TypeError('Unknown modifier: "'+p+'"');(a===1||!v)&&(n?r.key=C:r.which=os(p)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,c=d}finally{try{!s&&f.return&&f.return()}finally{if(u)throw c}}return r}function as(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function os(t){t=Bi(t);var e=wi[t]||t.toUpperCase().charCodeAt(0);return e}function Bi(t){return t=t.toLowerCase(),t=rs[t]||t,t}var Nd=Rt.default=mr,xi=Rt.isHotkey=mr;Rt.isCodeHotkey=Id,Rt.isKeyHotkey=jd,Rt.parseHotkey=is,Rt.compareHotkey=as,Rt.toKeyCode=os,Rt.toKeyName=Bi;/*!
|
72
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
73
|
+
*
|
74
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
75
|
+
* Released under the MIT License.
|
76
|
+
*/function ss(t){return Object.prototype.toString.call(t)==="[object Object]"}function lt(t){var e,n;return ss(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(ss(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var us=Symbol.for("immer-nothing"),ls=Symbol.for("immer-draftable"),Dt=Symbol.for("immer-state"),zd=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function gt(t,...e){if(process.env.NODE_ENV!=="production"){const n=zd[t],r=typeof n=="function"?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var bn=Object.getPrototypeOf;function on(t){return!!t&&!!t[Dt]}function sn(t){var e;return t?cs(t)||Array.isArray(t)||!!t[ls]||!!((e=t.constructor)!=null&&e[ls])||Dr(t)||br(t):!1}var _d=Object.prototype.constructor.toString();function cs(t){if(!t||typeof t!="object")return!1;const e=bn(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===_d}function yr(t,e){Cr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Cr(t){const e=t[Dt];return e?e.type_:Array.isArray(t)?1:Dr(t)?2:br(t)?3:0}function Li(t,e){return Cr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function fs(t,e,n){const r=Cr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Wd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Dr(t){return t instanceof Map}function br(t){return t instanceof Set}function un(t){return t.copy_||t.base_}function Si(t,e){if(Dr(t))return new Map(t);if(br(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=cs(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Dt];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(bn(t),r)}else{const r=bn(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Ai(t,e=!1){return Er(t)||on(t)||!sn(t)||(Cr(t)>1&&(t.set=t.add=t.clear=t.delete=Ud),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Ai(r,!0))),t}function Ud(){gt(2)}function Er(t){return Object.isFrozen(t)}var Hd={};function ln(t){const e=Hd[t];return e||gt(0,t),e}var _n;function ds(){return _n}function Vd(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ps(t,e){e&&(ln("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Oi(t){Fi(t),t.drafts_.forEach(qd),t.drafts_=null}function Fi(t){t===_n&&(_n=t.parent_)}function hs(t){return _n=Vd(_n,t)}function qd(t){const e=t[Dt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function vs(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Dt].modified_&&(Oi(e),gt(4)),sn(t)&&(t=wr(e,t),e.parent_||Br(e,t)),e.patches_&&ln("Patches").generateReplacementPatches_(n[Dt].base_,t,e.patches_,e.inversePatches_)):t=wr(e,n,[]),Oi(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==us?t:void 0}function wr(t,e,n){if(Er(e))return e;const r=e[Dt];if(!r)return yr(e,(i,a)=>gs(t,r,e,i,a,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Br(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,o=!1;r.type_===3&&(a=new Set(i),i.clear(),o=!0),yr(a,(s,u)=>gs(t,r,i,s,u,n,o)),Br(t,i,!1),n&&t.patches_&&ln("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function gs(t,e,n,r,i,a,o){if(process.env.NODE_ENV!=="production"&&i===n&>(5),on(i)){const s=a&&e&&e.type_!==3&&!Li(e.assigned_,r)?a.concat(r):void 0,u=wr(t,i,s);if(fs(n,r,u),on(u))t.canAutoFreeze_=!1;else return}else o&&n.add(i);if(sn(i)&&!Er(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;wr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Br(t,i)}}function Br(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ai(e,n)}function Zd(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:ds(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Pi;n&&(i=[r],a=Wn);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var Pi={get(t,e){if(e===Dt)return t;const n=un(t);if(!Li(n,e))return Gd(t,n,e);const r=n[e];return t.finalized_||!sn(r)?r:r===Mi(t.base_,e)?(Ti(t),t.copy_[e]=Ri(r,t)):r},has(t,e){return e in un(t)},ownKeys(t){return Reflect.ownKeys(un(t))},set(t,e,n){const r=ms(un(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Mi(un(t),e),a=i==null?void 0:i[Dt];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(Wd(n,i)&&(n!==void 0||Li(t.base_,e)))return!0;Ti(t),ki(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Mi(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Ti(t),ki(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=un(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){gt(11)},getPrototypeOf(t){return bn(t.base_)},setPrototypeOf(){gt(12)}},Wn={};yr(Pi,(t,e)=>{Wn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Wn.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&>(13),Wn.set.call(this,t,e,void 0)},Wn.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&>(14),Pi.set.call(this,t[0],e,n,t[0])};function Mi(t,e){const n=t[Dt];return(n?un(n):t)[e]}function Gd(t,e,n){var i;const r=ms(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function ms(t,e){if(!(e in t))return;let n=bn(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=bn(n)}}function ki(t){t.modified_||(t.modified_=!0,t.parent_&&ki(t.parent_))}function Ti(t){t.copy_||(t.copy_=Si(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Yd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const a=n;n=e;const o=this;return function(u=a,...c){return o.produce(u,f=>n.call(this,f,...c))}}typeof n!="function"&>(6),r!==void 0&&typeof r!="function"&>(7);let i;if(sn(e)){const a=hs(this),o=Ri(e,void 0);let s=!0;try{i=n(o),s=!1}finally{s?Oi(a):Fi(a)}return ps(a,r),vs(i,a)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===us&&(i=void 0),this.autoFreeze_&&Ai(i,!0),r){const a=[],o=[];ln("Patches").generateReplacementPatches_(e,i,a,o),r(a,o)}return i}else gt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let r,i;return[this.produce(e,n,(o,s)=>{r=o,i=s}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){sn(t)||gt(8),on(t)&&(t=Kd(t));const e=hs(this),n=Ri(t,void 0);return n[Dt].isManual_=!0,Fi(e),n}finishDraft(t,e){const n=t&&t[Dt];(!n||!n.isManual_)&>(9);const{scope_:r}=n;return ps(r,e),vs(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=ln("Patches").applyPatches_;return on(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Ri(t,e){const n=Dr(t)?ln("MapSet").proxyMap_(t,e):br(t)?ln("MapSet").proxySet_(t,e):Zd(t,e);return(e?e.scope_:ds()).drafts_.push(n),n}function Kd(t){return on(t)||gt(10,t),ys(t)}function ys(t){if(!sn(t)||Er(t))return t;const e=t[Dt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Si(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Si(t,!0);return yr(n,(r,i)=>{fs(n,r,ys(i))}),e&&(e.finalized_=!1),n}var bt=new Yd,Ii=bt.produce;bt.produceWithPatches.bind(bt),bt.setAutoFreeze.bind(bt),bt.setUseStrictShallowCopy.bind(bt),bt.applyPatches.bind(bt);var Cs=bt.createDraft.bind(bt),Ds=bt.finishDraft.bind(bt),Xd={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=A.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Jd={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=Ae.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Qd={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=q.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},xr=new WeakMap,Lr=new WeakMap,Un=new WeakMap,bs=new WeakMap,Es=new WeakMap,ws=new WeakMap,Bs=new WeakMap,A={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=A.levels(t,e);return n?r=r.slice(1):r=r.slice(0,-1),r},common(t,e){for(var n=[],r=0;r<t.length&&r<e.length;r++){var i=t[r],a=e[r];if(i!==a)break;n.push(i)}return n},compare(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return A.equals(r,i)&&a>o},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return A.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return A.equals(r,i)&&a<o},equals(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return A.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&A.compare(t,e)===0},isBefore(t,e){return A.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&A.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&A.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&A.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&A.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&A.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],i=0;i<=t.length;i++)r.push(t.slice(0,i));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!A.isAncestor(e,t)&&!A.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var r=[...t],{affinity:i="forward"}=n;if(t.length===0)return r;switch(e.type){case"insert_node":{var{path:a}=e;(A.equals(a,r)||A.endsBefore(a,r)||A.isAncestor(a,r))&&(r[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if(A.equals(o,r)||A.isAncestor(o,r))return null;A.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;A.equals(s,r)||A.endsBefore(s,r)?r[s.length-1]-=1:A.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break}case"split_node":{var{path:c,position:f}=e;if(A.equals(c,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else A.endsBefore(c,r)?r[c.length-1]+=1:A.isAncestor(c,r)&&t[c.length]>=f&&(r[c.length-1]+=1,r[c.length]-=f);break}case"move_node":{var{path:h,newPath:p}=e;if(A.equals(h,p))return r;if(A.isAncestor(h,r)||A.equals(h,r)){var g=p.slice();return A.endsBefore(h,p)&&h.length<p.length&&(g[h.length-1]-=1),g.concat(r.slice(h.length))}else A.isSibling(h,p)&&(A.isAncestor(p,r)||A.equals(p,r))?A.endsBefore(h,r)?r[h.length-1]-=1:r[h.length-1]+=1:A.endsBefore(p,r)||A.equals(p,r)||A.isAncestor(p,r)?(A.endsBefore(h,r)&&(r[h.length-1]-=1),r[p.length-1]+=1):A.endsBefore(h,r)&&(A.equals(p,r)&&(r[p.length-1]+=1),r[h.length-1]-=1);break}}return r}};function Hn(t){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hn(t)}function $d(t,e){if(Hn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Hn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ep(t){var e=$d(t,"string");return Hn(e)==="symbol"?e:String(e)}function ft(t,e,n){return e=ep(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var tp=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,a=ie.parent(t,r),o=r[r.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,u]of q.points(e))e[u]=Ae.transform(s,n);break}case"insert_text":{var{path:c,offset:f,text:h}=n;if(h.length===0)break;var p=ie.leaf(t,c),g=p.text.slice(0,f),C=p.text.slice(f);if(p.text=g+h+C,e)for(var[v,d]of q.points(e))e[d]=Ae.transform(v,n);break}case"merge_node":{var{path:D}=n,B=ie.get(t,D),w=A.previous(D),O=ie.get(t,w),b=ie.parent(t,D),E=D[D.length-1];if(ce.isText(B)&&ce.isText(O))O.text+=B.text;else if(!ce.isText(B)&&!ce.isText(O))O.children.push(...B.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(st.stringify(B)," ").concat(st.stringify(O)));if(b.children.splice(E,1),e)for(var[S,F]of q.points(e))e[F]=Ae.transform(S,n);break}case"move_node":{var{path:V,newPath:P}=n;if(A.isAncestor(V,P))throw new Error("Cannot move a path [".concat(V,"] to new path [").concat(P,"] because the destination is inside itself."));var z=ie.get(t,V),R=ie.parent(t,V),j=V[V.length-1];R.children.splice(j,1);var I=A.transform(V,n),N=ie.get(t,A.parent(I)),X=I[I.length-1];if(N.children.splice(X,0,z),e)for(var[_,$]of q.points(e))e[$]=Ae.transform(_,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],T=ie.parent(t,re);if(T.children.splice(k,1),e)for(var[Z,H]of q.points(e)){var Q=Ae.transform(Z,n);if(e!=null&&Q!=null)e[H]=Q;else{var K=void 0,y=void 0;for(var[U,W]of ie.texts(t))if(A.compare(W,re)===-1)K=[U,W];else{y=[U,W];break}var M=!1;K&&y&&(A.equals(y[1],re)?M=!A.hasPrevious(y[1]):M=A.common(K[1],re).length<A.common(y[1],re).length),K&&!M?(Z.path=K[1],Z.offset=K[0].text.length):y?(Z.path=y[1],Z.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:ne,text:G}=n;if(G.length===0)break;var ue=ie.leaf(t,J),ae=ue.text.slice(0,ne),de=ue.text.slice(ne+G.length);if(ue.text=ae+de,e)for(var[pe,Ce]of q.points(e))e[Ce]=Ae.transform(pe,n);break}case"set_node":{var{path:ye,properties:ge,newProperties:ve}=n;if(ye.length===0)throw new Error("Cannot set properties on the root node!");var je=ie.get(t,ye);for(var se in ve){if(se==="children"||se==="text")throw new Error('Cannot set the "'.concat(se,'" property of nodes!'));var Ne=ve[se];Ne==null?delete je[se]:je[se]=Ne}for(var fe in ge)ve.hasOwnProperty(fe)||delete je[fe];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!q.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(st.stringify(we)," when there is no current selection."));e=Vn({},we)}for(var Me in we){var He=we[Me];if(He==null){if(Me==="anchor"||Me==="focus")throw new Error('Cannot remove the "'.concat(Me,'" selection property'));delete e[Me]}else e[Me]=He}}break}case"split_node":{var{path:qe,position:Ee,properties:ut}=n;if(qe.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(qe,"] because the root node cannot be split."));var at=ie.get(t,qe),At=ie.parent(t,qe),ht=qe[qe.length-1],wt;if(ce.isText(at)){var Tt=at.text.slice(0,Ee),vt=at.text.slice(Ee);at.text=Tt,wt=Vn(Vn({},ut),{},{text:vt})}else{var tn=at.children.slice(0,Ee),be=at.children.slice(Ee);at.children=tn,wt=Vn(Vn({},ut),{},{children:be})}if(At.children.splice(ht+1,0,wt),e)for(var[Te,Re]of q.points(e))e[Re]=Ae.transform(Te,n);break}}return e},np={transform(t,e){t.children=Cs(t.children);var n=t.selection&&Cs(t.selection);try{n=tp(t,n,e)}finally{t.children=Ds(t.children),n?t.selection=on(n)?Ds(n):n:t.selection=null}}},rp={insertNodes(t,e,n){t.insertNodes(e,n)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,n){t.setNodes(e,n)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,n){t.unsetNodes(e,n)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,n){t.wrapNodes(e,n)}},ip={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,n){t.setPoint(e,n)},setSelection(t,e){t.setSelection(e)}},Ls=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(lt(r)&<(i)){if(!Ls(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==i[a])return!1}else if(r!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function ap(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function It(t,e){if(t==null)return{};var n=ap(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var op=["anchor","focus"];function Ss(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ss(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ss(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return q.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return Ae.equals(t.anchor,e.anchor)&&Ae.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[n,r]=q.edges(t),[i,a]=q.edges(e);return Ae.isBefore(n,i)&&Ae.isAfter(r,a)}var[o,s]=q.edges(t),u=!1,c=!1;return Ae.isPoint(e)?(u=Ae.compare(e,o)>=0,c=Ae.compare(e,s)<=0):(u=A.compare(e,o.path)>=0,c=A.compare(e,s.path)<=0),u&&c},intersection(t,e){var n=It(t,op),[r,i]=q.edges(t),[a,o]=q.edges(e),s=Ae.isBefore(r,a)?a:r,u=Ae.isBefore(i,o)?i:o;return Ae.isBefore(u,s)?null:sp({anchor:s,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Ae.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Ae.equals(e,n)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return lt(t)&&Ae.isPoint(t.anchor)&&Ae.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ii(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,a,o;if(i==="inward"){var s=q.isCollapsed(r);q.isForward(r)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?q.isForward(r)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=Ae.transform(r.anchor,e,{affinity:a}),c=Ae.transform(r.focus,e,{affinity:o});if(!u||!c)return null;r.anchor=u,r.focus=c})}},As=t=>lt(t)&&ie.isNodeList(t.children)&&!m.isEditor(t),le={isAncestor(t){return lt(t)&&ie.isNodeList(t.children)},isElement:As,isElementList(t){return Array.isArray(t)&&t.every(e=>le.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return As(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},up=["children"],lp=["text"],Os=new WeakMap,ie={ancestor(t,e){var n=ie.get(t,e);if(ce.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(st.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of A.ancestors(e,n)){var i=ie.ancestor(t,r),a=[i,r];yield a}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(st.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(st.stringify(t)));return n},children(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,i=ie.ancestor(t,e),{children:a}=i,o=r?a.length-1:0;r?o>=0:o<a.length;){var s=ie.child(i,o),u=e.concat(o);yield[s,u],o=r?o-1:o+1}}()},common(t,e,n){var r=A.common(e,n),i=ie.get(t,r);return[i,r]},descendant(t,e){var n=ie.get(t,e);if(m.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(st.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))r.length!==0&&(yield[n,r])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))le.isElement(n)&&(yield[n,r])}()},extractProps(t){if(le.isAncestor(t)){var e=It(t,up);return e}else{var e=It(t,lp);return e}},first(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ce.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(st.stringify(t)));var n=Ii({children:t.children},r=>{var[i,a]=q.edges(e),o=ie.nodes(r,{reverse:!0,pass:p=>{var[,g]=p;return!q.includes(e,g)}});for(var[,s]of o){if(!q.includes(e,s)){var u=ie.parent(r,s),c=s[s.length-1];u.children.splice(c,1)}if(A.equals(s,a.path)){var f=ie.leaf(r,s);f.text=f.text.slice(0,a.offset)}if(A.equals(s,i.path)){var h=ie.leaf(r,s);h.text=h.text.slice(i.offset)}}m.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(st.stringify(t)));n=n.children[i]}return n},has(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode(t){return ce.isText(t)||le.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Os.get(t);if(e!==void 0)return e;var n=t.every(r=>ie.isNode(r));return Os.set(t,n),n},last(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(t,e){var n=ie.get(t,e);if(!ce.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(st.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of A.levels(e,n)){var i=ie.get(t,r);yield[i,r]}}()},matches(t,e){return le.isElement(t)&&le.isElementProps(e)&&le.matches(t,e)||ce.isText(t)&&ce.isTextProps(e)&&ce.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],u=t;!(a&&(r?A.isBefore(s,a):A.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,s])===!1)){o.add(u);var c=r?u.children.length-1:0;A.isAncestor(s,i)&&(c=i[s.length]),s=s.concat(c),u=ie.get(t,s);continue}if(s.length===0)break;if(!r){var f=A.next(s);if(ie.has(t,f)){s=f,u=ie.get(t,s);continue}}if(r&&s[s.length-1]!==0){var h=A.previous(s);s=h,u=ie.get(t,s);continue}s=A.parent(s),u=ie.get(t,s),o.add(u)}}()},parent(t,e){var n=A.parent(e),r=ie.get(t,n);if(ce.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return ce.isText(t)?t.text:t.children.map(ie.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function Fs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zt={isNodeOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!lt(t))return!1;switch(t.type){case"insert_node":return A.isPath(t.path)&&ie.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&A.isPath(t.path);case"merge_node":return typeof t.position=="number"&&A.isPath(t.path)&<(t.properties);case"move_node":return A.isPath(t.path)&&A.isPath(t.newPath);case"remove_node":return A.isPath(t.path)&&ie.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&A.isPath(t.path);case"set_node":return A.isPath(t.path)&<(t.properties)&<(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||lt(t.properties)&<(t.newProperties);case"split_node":return A.isPath(t.path)&&typeof t.position=="number"&<(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Zt.isOperation(e))},isSelectionOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ze(Ze({},t),{},{type:"remove_node"});case"insert_text":return Ze(Ze({},t),{},{type:"remove_text"});case"merge_node":return Ze(Ze({},t),{},{type:"split_node",path:A.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(A.equals(e,n))return t;if(A.isSibling(n,e))return Ze(Ze({},t),{},{path:e,newPath:n});var r=A.transform(n,t),i=A.transform(A.next(n),t);return Ze(Ze({},t),{},{path:r,newPath:i})}case"remove_node":return Ze(Ze({},t),{},{type:"insert_node"});case"remove_text":return Ze(Ze({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return Ze(Ze({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?Ze(Ze({},t),{},{properties:u,newProperties:null}):u==null?Ze(Ze({},t),{},{properties:null,newProperties:s}):Ze(Ze({},t),{},{properties:u,newProperties:s})}case"split_node":return Ze(Ze({},t),{},{type:"merge_node",path:A.next(t.path)})}}},Ps=new WeakMap,cp=t=>{var e=Ps.get(t);if(e!==void 0)return e;if(!lt(t))return!1;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||lt(t.marks))&&(t.selection===null||q.isRange(t.selection))&&ie.isNodeList(t.children)&&Zt.isOperationList(t.operations);return Ps.set(t,n),n},m={above(t,e){return t.above(e)},addMark(t,e,n){t.addMark(e,n)},after(t,e,n){return t.after(e,n)},before(t,e,n){return t.before(e,n)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,n){t.insertFragment(e,n)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,n){return t.isEdge(e,n)},isEditor(t){return cp(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,n){return t.isEnd(e,n)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,n){return t.isStart(e,n)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,n){return t.leaf(e,n)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,n){return t.node(e,n)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,n){return t.parent(e,n)},path(t,e,n){return t.path(e,n)},pathRef(t,e,n){return t.pathRef(e,n)},pathRefs(t){return t.pathRefs()},point(t,e,n){return t.point(e,n)},pointRef(t,e,n){return t.pointRef(e,n)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,n){return t.range(e,n)},rangeRef(t,e,n){return t.rangeRef(e,n)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,n){return t.string(e,n)},unhangRange(t,e,n){return t.unhangRange(e,n)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,n)=>t.shouldMergeNodesRemovePrevNode(e,n)},fp={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(A.isPath)}};function Ms(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ks(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ms(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ms(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ae={compare(t,e){var n=A.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Ae.compare(t,e)===1},isBefore(t,e){return Ae.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&A.equals(t.path,e.path)},isPoint(t){return lt(t)&&typeof t.offset=="number"&&A.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ii(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:a,offset:o}=r;switch(e.type){case"insert_node":case"move_node":{r.path=A.transform(a,e,n);break}case"insert_text":{A.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{A.equals(e.path,a)&&(r.offset+=e.position),r.path=A.transform(a,e,n);break}case"remove_text":{A.equals(e.path,a)&&e.offset<=o&&(r.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if(A.equals(e.path,a)||A.isAncestor(e.path,a))return null;r.path=A.transform(a,e,n);break}case"split_node":{if(A.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(r.offset-=e.position,r.path=A.transform(a,e,ks(ks({},n),{},{affinity:"forward"})))}else r.path=A.transform(a,e,n);break}}})}},Ts=void 0,st={setScrubber(t){Ts=t},stringify(t){return JSON.stringify(t,Ts)}},dp=["text"],pp=["anchor","focus"];function Rs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ce={equals(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(a){var o=It(a,dp);return o}return Ls(r?i(t):t,r?i(e):e)},isText(t){return lt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ce.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[jt({},t)];for(var r of e){var i=It(r,pp),[a,o]=q.edges(r),s=[],u=0,c=a.offset,f=o.offset;for(var h of n){var{length:p}=h.text,g=u;if(u+=p,c<=g&&u<=f){Object.assign(h,i),s.push(h);continue}if(c!==f&&(c===u||f===g)||c>u||f<g||f===g&&g!==0){s.push(h);continue}var C=h,v=void 0,d=void 0;if(f<u){var D=f-g;d=jt(jt({},C),{},{text:C.text.slice(D)}),C=jt(jt({},C),{},{text:C.text.slice(0,D)})}if(c>g){var B=c-g;v=jt(jt({},C),{},{text:C.text.slice(0,B)}),C=jt(jt({},C),{},{text:C.text.slice(B)})}Object.assign(C,i),v&&s.push(v),s.push(C),d&&s.push(d)}n=s}return n}},ji=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],En=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},Ni=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?Cp(e):e,a=xe.None,o=xe.None,s=0,u=null,c=null;for(var f of i){var h=f.codePointAt(0);if(!h)break;var p=Pp(f,h);if([a,o]=r?[o,p]:[p,a],wn(a,xe.ZWJ)&&wn(o,xe.ExtPict)&&(r?u=Is(e.substring(0,s)):u=Is(e.substring(0,e.length-s)),!u)||wn(a,xe.RI)&&wn(o,xe.RI)&&(c!==null?c=!c:r?c=!0:c=Ip(e.substring(0,e.length-s)),!c)||a!==xe.None&&o!==xe.None&&kp(a,o))break;s+=f.length}return s||1},hp=/\s/,vp=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,gp=/['\u2018\u2019]/,mp=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var a=Ni(e,n),[o,s]=zi(e,a,n);if(yp(o,s,n))i=!0,r+=a;else if(!i)r+=a;else break;e=s}return r},zi=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},yp=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(hp.test(e))return!1;if(gp.test(e)){var i=Ni(n,r),[a,o]=zi(n,i,r);if(t(a,o,r))return!0}return!vp.test(e)},Cp=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(bp(i.charCodeAt(0))){var a=e.charAt(n-r-1);if(Dp(a.charCodeAt(0))){yield a+i,r++;continue}}yield i}},Dp=t=>t>=55296&&t<=56319,bp=t=>t>=56320&&t<=57343,xe;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(xe||(xe={}));var Ep=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,wp=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Bp=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,xp=/^[\u1100-\u115F\uA960-\uA97C]$/,Lp=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Sp=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Ap=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Op=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Fp=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Pp=(t,e)=>{var n=xe.Any;return t.search(Ep)!==-1&&(n|=xe.Extend),e===8205&&(n|=xe.ZWJ),e>=127462&&e<=127487&&(n|=xe.RI),t.search(wp)!==-1&&(n|=xe.Prepend),t.search(Bp)!==-1&&(n|=xe.SpacingMark),t.search(xp)!==-1&&(n|=xe.L),t.search(Lp)!==-1&&(n|=xe.V),t.search(Sp)!==-1&&(n|=xe.T),t.search(Ap)!==-1&&(n|=xe.LV),t.search(Op)!==-1&&(n|=xe.LVT),t.search(Fp)!==-1&&(n|=xe.ExtPict),n};function wn(t,e){return(t&e)!==0}var Mp=[[xe.L,xe.L|xe.V|xe.LV|xe.LVT],[xe.LV|xe.V,xe.V|xe.T],[xe.LVT|xe.T,xe.T],[xe.Any,xe.Extend|xe.ZWJ],[xe.Any,xe.SpacingMark],[xe.Prepend,xe.Any],[xe.ZWJ,xe.ExtPict],[xe.RI,xe.RI]];function kp(t,e){return Mp.findIndex(n=>wn(t,n[0])&&wn(e,n[1]))===-1}var Tp=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Is=t=>t.search(Tp)!==-1,Rp=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Ip=t=>{var e=t.match(Rp);if(e===null)return!1;var n=e[0].length/2;return n%2===1},jp={delete(t,e){t.delete(e)},insertFragment(t,e,n){t.insertFragment(e,n)},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:i=ji(t)}=n;if(A.isPath(i)&&(i=m.range(t,i)),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var a=q.end(i);if(!r&&m.void(t,{at:a}))return;var o=q.start(i),s=m.pointRef(t,o),u=m.pointRef(t,a);ee.delete(t,{at:i,voids:r});var c=s.unref(),f=u.unref();i=c||f,ee.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:h,offset:p}=i;e.length>0&&t.apply({type:"insert_text",path:h,offset:p,text:e})}})}};function js(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?js(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):js(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ee=Sr(Sr(Sr(Sr({},np),rp),ip),jp),Ar=new WeakMap,Np=t=>Ar.get(t)||!1,zp=(t,e,n)=>{var r=Ar.get(t)||!1;Ar.set(t,!0);try{e(),n()}finally{Ar.set(t,r)}};function Ns(t,e,n){var r=xr.get(t)||[],i=Lr.get(t)||new Set,a,o,s=h=>{if(h){var p=h.join(",");o.has(p)||(o.add(p),a.push(h))}};if(n){a=[],o=new Set;for(var u of r){var c=n(u);s(c)}}else a=r,o=i;for(var f of e)s(f);xr.set(t,a),Lr.set(t,o)}var _p=(t,e)=>{for(var n of m.pathRefs(t))Xd.transform(n,e);for(var r of m.pointRefs(t))Jd.transform(r,e);for(var i of m.rangeRefs(t))Qd.transform(i,e);if(!Np(t)){var a=A.operationCanTransformPath(e)?o=>A.transform(o,e):void 0;Ns(t,t.getDirtyPaths(e),a)}ee.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Un.get(t)||(Un.set(t,!0),Promise.resolve().then(()=>{Un.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},Wp=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return A.levels(n)}case"insert_node":{var{node:r,path:i}=e,a=A.levels(i),o=ce.isText(r)?[]:Array.from(ie.nodes(r),P=>{var[,z]=P;return i.concat(z)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=A.ancestors(s),c=A.previous(s);return[...u,c]}case"move_node":{var{path:f,newPath:h}=e;if(A.equals(f,h))return[];var p=[],g=[];for(var C of A.ancestors(f)){var v=A.transform(C,e);p.push(v)}for(var d of A.ancestors(h)){var D=A.transform(d,e);g.push(D)}var B=g[g.length-1],w=h[h.length-1],O=B.concat(w);return[...p,...g,O]}case"remove_node":{var{path:b}=e,E=A.ancestors(b);return[...E]}case"split_node":{var{path:S}=e,F=A.levels(S),V=A.next(S);return[...F,V]}default:return[]}},Up=t=>{var{selection:e}=t;return e?ie.fragment(t,e):[]},Hp=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(le.isElement(n)&&n.children.length===0){var i={text:""};ee.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var a=m.isEditor(n)?!1:le.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),o=0,s=0;s<n.children.length;s++,o++){var u=ie.get(t,r);if(!ce.isText(u)){var c=u.children[o],f=u.children[o-1],h=s===n.children.length-1,p=ce.isText(c)||le.isElement(c)&&t.isInline(c);if(p!==a)ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--;else if(le.isElement(c)){if(t.isInline(c)){if(f==null||!ce.isText(f)){var g={text:""};ee.insertNodes(t,g,{at:r.concat(o),voids:!0}),o++}else if(h){var C={text:""};ee.insertNodes(t,C,{at:r.concat(o+1),voids:!0}),o++}}}else{if(!ce.isText(c)&&!("children"in c)){var v=c;v.children=[]}f!=null&&ce.isText(f)&&(ce.equals(c,f,{loose:!0})?(ee.mergeNodes(t,{at:r.concat(o),voids:!0}),o--):f.text===""?(ee.removeNodes(t,{at:r.concat(o-1),voids:!0}),o--):c.text===""&&(ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--))}}}}},Vp=(t,e)=>{var{iteration:n,initialDirtyPathsLength:r}=e,i=r*42;if(n>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},qp=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:a=e.selection,match:o}=n;if(a){var s=m.path(e,a),u=i==="lowest";for(var[c,f]of m.levels(e,{at:s,voids:r,match:o,reverse:u}))if(!ce.isText(c)){if(q.isRange(a)){if(A.isAncestor(f,a.anchor.path)&&A.isAncestor(f,a.focus.path))return[c,f]}else if(!A.equals(s,f))return[c,f]}}};function zs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _s(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zp=(t,e,n)=>{var{selection:r}=t;if(r){var i=(h,p)=>{if(!ce.isText(h))return!1;var[g,C]=m.parent(t,p);return!t.isVoid(g)||t.markableVoid(g)},a=q.isExpanded(r),o=!1;if(!a){var[s,u]=m.node(t,r);if(s&&i(s,u)){var[c]=m.parent(t,u);o=c&&t.markableVoid(c)}}if(a||o)ee.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var f=_s(_s({},m.marks(t)||{}),{},{[e]:n});t.marks=f,Un.get(t)||t.onChange()}}};function Ws(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Us(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ws(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gp=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),a=m.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=r,u=0,c;for(var f of m.positions(e,Us(Us({},r),{},{at:o}))){if(u>s)break;u!==0&&(c=f),u++}return c};function Hs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Yp=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),a=m.point(e,n,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=r,u=0,c;for(var f of m.positions(e,Vs(Vs({},r),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(c=f),u++}return c},Kp=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e,reverse:!0})},Xp=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e})},Jp=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&q.isExpanded(r)&&ee.delete(e,{reverse:n==="backward"})},Qp=(t,e)=>[m.start(t,e),m.end(t,e)];function qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var $p=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Zs(Zs({},n),{},{match:r=>le.isElement(r)&&m.isElementReadOnly(e,r)}))},eh=(t,e)=>m.point(t,e,{edge:"end"}),th=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},nh=(t,e)=>{var n=m.range(t,e);return ie.fragment(t,n)};function Gs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ys(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ys(Ys({},n),{},{match:r=>le.isElement(r)&&m.isVoid(e,r)}))},ih=(t,e)=>e.children.some(n=>le.isElement(n)&&m.isBlock(t,n)),ah=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),oh=(t,e)=>ie.has(t,e),sh=(t,e)=>e.children.every(n=>ce.isText(n)),uh=t=>{ee.splitNodes(t,{always:!0})},lh=(t,e,n)=>{ee.insertNodes(t,e,n)},ch=t=>{ee.splitNodes(t,{always:!0})};function Ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ks(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var dh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=fh({text:n},a);ee.insertNodes(e,o,{at:r.at,voids:r.voids})}else ee.insertText(e,n,r);e.marks=null}},ph=(t,e)=>!t.isInline(e),hh=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),vh=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},gh=(t,e,n)=>{var r=m.end(t,n);return Ae.equals(e,r)},mh=t=>{var e=bs.get(t);return e===void 0?!0:e},yh=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Ae.equals(e,r)},Ch=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},Dh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.leaf(e,i);return[a,i]};function bh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,reverse:r=!1,voids:i=!1}=e,{match:a}=e;if(a==null&&(a=()=>!0),!!n){var o=[],s=m.path(t,n);for(var[u,c]of ie.levels(t,s))if(a(u,c)&&(o.push([u,c]),!i&&le.isElement(u)&&m.isVoid(t,u)))break;r&&o.reverse(),yield*o}}()}var Eh=["text"],wh=["text"],Bh=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:a}=r;if(n)return n;if(q.isExpanded(r)){var o=m.isEnd(e,i,i.path);if(o){var s=m.after(e,i);s&&(i=s)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:a}});if(u){var[c]=u,f=It(c,Eh);return f}else return{}}var{path:h}=i,[p]=m.leaf(e,h);if(i.offset===0){var g=m.previous(e,{at:h,match:ce.isText}),C=m.above(e,{match:O=>le.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!C){var v=m.above(e,{match:O=>le.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,B]=v;A.isAncestor(B,D)&&(p=d)}}}var w=It(p,wh);return w},xh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.after(e,o,{voids:i});if(s){var[,u]=m.last(e,[]),c=[s.path,u];if(A.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if(A.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{at:c,match:a,mode:r,voids:i});return h}}},Lh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.get(e,i);return[a,i]};function Sh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,mode:r="all",universal:i=!1,reverse:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var c,f;if(fp.isSpan(n))c=n[0],f=n[1];else{var h=m.path(t,n,{edge:"start"}),p=m.path(t,n,{edge:"end"});c=a?p:h,f=a?h:p}var g=ie.nodes(t,{reverse:a,from:c,to:f,pass:O=>{var[b]=O;return le.isElement(b)?!!(!o&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||s&&!m.isSelectable(t,b)):!1}}),C=[],v;for(var[d,D]of g)if(!(s&&le.isElement(d)&&!m.isSelectable(t,d))){var B=v&&A.compare(D,v[1])===0;if(!(r==="highest"&&B)){if(!u(d,D)){if(i&&!B&&ce.isText(d))return;continue}if(r==="lowest"&&B){v=[d,D];continue}var w=r==="lowest"?v:[d,D];w&&(i?C.push(w):yield w),v=[d,D]}}r==="lowest"&&v&&(i?C.push(v):yield v),i&&(yield*C)}}()}var Ah=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,a=f=>xr.get(f)||[],o=f=>Lr.get(f)||new Set,s=f=>{var h=a(f).pop(),p=h.join(",");return o(f).delete(p),h};if(m.isNormalizing(e)){if(r){var u=Array.from(ie.nodes(e),f=>{var[,h]=f;return h}),c=new Set(u.map(f=>f.join(",")));xr.set(e,u),Lr.set(e,c)}a(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of a(e))if(ie.has(e,f)){var h=m.node(e,f),[p,g]=h;le.isElement(p)&&p.children.length===0&&e.normalizeNode(h,{operation:i})}for(var C=a(e),v=C.length,d=0;C.length!==0;){if(!e.shouldNormalize({dirtyPaths:C,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=s(e);if(ie.has(e,D)){var B=m.node(e,D);e.normalizeNode(B,{operation:i})}d++,C=a(e)}})}},Oh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=A.parent(i),o=m.node(e,a);return o},Fh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pathRefs(e);return u.delete(a),a.current=null,s}},o=m.pathRefs(e);return o.add(a),a},Ph=t=>{var e=Es.get(t);return e||(e=new Set,Es.set(t,e)),e},Mh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=r;if(A.isPath(n)){if(a==="start"){var[,o]=ie.first(e,n);n=o}else if(a==="end"){var[,s]=ie.last(e,n);n=s}}return q.isRange(n)&&(a==="start"?n=q.start(n):a==="end"?n=q.end(n):n=A.common(n.anchor.path,n.focus.path)),Ae.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},kh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pointRefs(e);return u.delete(a),a.current=null,s}},o=m.pointRefs(e);return o.add(a),a},Th=t=>{var e=ws.get(t);return e||(e=new Set,ws.set(t,e)),e},Rh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(A.isPath(n)){var a;if(i==="end"){var[,o]=ie.last(e,n);a=o}else{var[,s]=ie.first(e,n);a=s}var u=ie.get(e,a);if(!ce.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(n,"] because it has no ").concat(i," text node."));return{path:a,offset:i==="end"?u.text.length:0}}if(q.isRange(n)){var[c,f]=q.edges(n);return i==="start"?c:f}return n};function Ih(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,unit:r="offset",reverse:i=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e;if(!n)return;var s=m.range(t,n),[u,c]=q.edges(s),f=i?c:u,h=!1,p="",g=0,C=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:a,ignoreNonSelectable:o})){if(le.isElement(d)){if(!a&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var B=A.isAncestor(D,c.path)?c:m.end(t,D),w=A.isAncestor(D,u.path)?u:m.start(t,D);p=m.string(t,{anchor:w,focus:B},{voids:a}),h=!0}}if(ce.isText(d)){var O=A.equals(D,f.path);for(O?(C=i?f.offset:d.text.length-f.offset,v=f.offset):(C=d.text.length,v=i?C:0),(O||h||r==="offset")&&(yield{path:D,offset:v},h=!1);;){if(g===0){if(p==="")break;g=b(p,r,i),p=zi(p,g,i)[1]}if(v=i?v-g:v+g,C=C-g,C<0){g=-C;break}g=0,yield{path:D,offset:v}}}}function b(E,S,F){return S==="character"?Ni(E,F):S==="word"?mp(E,F):S==="line"||S==="block"?E.length:1}}()}var jh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.before(e,o,{voids:i});if(s){var[,u]=m.first(e,[]),c=[s.path,u];if(A.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if(A.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{reverse:!0,at:c,match:a,mode:r,voids:i});return h}}},Nh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.rangeRefs(e);return u.delete(a),a.current=null,s}},o=m.rangeRefs(e);return o.add(a),a},zh=t=>{var e=Bs.get(t);return e||(e=new Set,Bs.set(t,e)),e},_h=(t,e,n)=>{if(q.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function Xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Uh=(t,e)=>{var{selection:n}=t;if(n){var r=(f,h)=>{if(!ce.isText(f))return!1;var[p,g]=m.parent(t,h);return!t.isVoid(p)||t.markableVoid(p)},i=q.isExpanded(n),a=!1;if(!i){var[o,s]=m.node(t,n);if(o&&r(o,s)){var[u]=m.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ee.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var c=Wh({},m.marks(t)||{});delete c[e],t.marks=c,Un.get(t)||t.onChange()}}},Hh=(t,e)=>{bs.set(t,e)},Vh=(t,e)=>m.point(t,e,{edge:"start"}),qh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,a=m.range(e,n),[o,s]=q.edges(a),u="";for(var[c,f]of m.nodes(e,{at:a,match:ce.isText,voids:i})){var h=c.text;A.equals(f,s.path)&&(h=h.slice(0,s.offset)),A.equals(f,o.path)&&(h=h.slice(o.offset)),u+=h}return u},Zh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[a,o]=q.edges(n);if(a.offset!==0||o.offset!==0||q.isCollapsed(n)||A.hasPrevious(o.path))return n;var s=m.above(e,{at:o,match:C=>le.isElement(C)&&m.isBlock(e,C),voids:i}),u=s?s[1]:[],c=m.start(e,a),f={anchor:c,focus:o},h=!0;for(var[p,g]of m.nodes(e,{at:f,match:ce.isText,reverse:!0,voids:i})){if(h){h=!1;continue}if(p.text!==""||A.isBefore(g,u)){o={path:g,offset:p.text.length};break}}return{anchor:a,focus:o}},Gh=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Yh=(t,e,n)=>{var[r,i]=e;return le.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},Kh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=n,{at:c=e.selection,hanging:f=!1}=n;if(c){var h=!1;if(q.isRange(c)&&q.isCollapsed(c)&&(h=!0,c=c.anchor),Ae.isPoint(c)){var p=m.void(e,{at:c,mode:"highest"});if(!u&&p){var[,g]=p;c=g}else{var C={unit:o,distance:s},v=a?m.before(e,c,C)||m.start(e,[]):m.after(e,c,C)||m.end(e,[]);c={anchor:c,focus:v},f=!0}}if(A.isPath(c)){ee.removeNodes(e,{at:c,voids:u});return}if(!q.isCollapsed(c)){if(!f){var[,d]=q.edges(c),D=m.end(e,[]);Ae.equals(d,D)||(c=m.unhangRange(e,c,{voids:u}))}var[B,w]=q.edges(c),O=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:B,voids:u}),b=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:w,voids:u}),E=O&&b&&!A.equals(O[1],b[1]),S=A.equals(B.path,w.path),F=u?null:(r=m.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:B,mode:"highest"}),V=u?null:(i=m.void(e,{at:w,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:w,mode:"highest"});if(F){var P=m.before(e,B);P&&O&&A.isAncestor(O[1],P.path)&&(B=P)}if(V){var z=m.after(e,w);z&&b&&A.isAncestor(b[1],z.path)&&(w=z)}var R=[],j;for(var I of m.nodes(e,{at:c,voids:u})){var[N,X]=I;j&&A.compare(X,j)===0||(!u&&le.isElement(N)&&(m.isVoid(e,N)||m.isElementReadOnly(e,N))||!A.isCommon(X,B.path)&&!A.isCommon(X,w.path))&&(R.push(I),j=X)}var _=Array.from(R,ae=>{var[,de]=ae;return m.pathRef(e,de)}),$=m.pointRef(e,B),re=m.pointRef(e,w),k="";if(!S&&!F){var T=$.current,[Z]=m.leaf(e,T),{path:H}=T,{offset:Q}=B,K=Z.text.slice(Q);K.length>0&&(e.apply({type:"remove_text",path:H,offset:Q,text:K}),k=K)}if(_.reverse().map(ae=>ae.unref()).filter(ae=>ae!==null).forEach(ae=>ee.removeNodes(e,{at:ae,voids:u})),!V){var y=re.current,[U]=m.leaf(e,y),{path:W}=y,M=S?B.offset:0,J=U.text.slice(M,w.offset);J.length>0&&(e.apply({type:"remove_text",path:W,offset:M,text:J}),k=J)}!S&&E&&re.current&&$.current&&ee.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),h&&a&&o==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&ee.insertText(e,k.slice(0,k.length-s));var ne=$.unref(),G=re.unref(),ue=a?ne||G:G||ne;n.at==null&&ue&&ee.select(e,ue)}}})},Xh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=r,{at:o=ji(e),batchDirty:s=!0}=r;if(n.length){if(q.isRange(o))if(i||(o=m.unhangRange(e,o,{voids:a})),q.isCollapsed(o))o=o.anchor;else{var[,u]=q.edges(o);if(!a&&m.void(e,{at:u}))return;var c=m.pointRef(e,u);ee.delete(e,{at:o}),o=c.unref()}else A.isPath(o)&&(o=m.start(e,o));if(!(!a&&m.void(e,{at:o}))){var f=m.above(e,{at:o,match:K=>le.isElement(K)&&m.isInline(e,K),mode:"highest",voids:a});if(f){var[,h]=f;if(m.isEnd(e,o,h)){var p=m.after(e,h);o=p}else if(m.isStart(e,o,h)){var g=m.before(e,h);o=g}}var C=m.above(e,{match:K=>le.isElement(K)&&m.isBlock(e,K),at:o,voids:a}),[,v]=C,d=m.isStart(e,o,v),D=m.isEnd(e,o,v),B=d&&D,w=!d||d&&D,O=!D,[,b]=ie.first({children:n},[]),[,E]=ie.last({children:n},[]),S=[],F=K=>{var[y,U]=K,W=U.length===0;return W?!1:B?!0:!(w&&A.isAncestor(U,b)&&le.isElement(y)&&!e.isVoid(y)&&!e.isInline(y)||O&&A.isAncestor(U,E)&&le.isElement(y)&&!e.isVoid(y)&&!e.isInline(y))};for(var V of ie.nodes({children:n},{pass:F}))F(V)&&S.push(V);var P=[],z=[],R=[],j=!0,I=!1;for(var[N]of S)le.isElement(N)&&!e.isInline(N)?(j=!1,I=!0,z.push(N)):j?P.push(N):R.push(N);var[X]=m.nodes(e,{at:o,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a}),[,_]=X,$=m.isStart(e,o,_),re=m.isEnd(e,o,_),k=m.pathRef(e,D&&!R.length?A.next(v):v),T=m.pathRef(e,re?A.next(_):_);ee.splitNodes(e,{at:o,match:K=>I?le.isElement(K)&&m.isBlock(e,K):ce.isText(K)||m.isInline(e,K),mode:I?"lowest":"highest",always:I&&(!d||P.length>0)&&(!D||R.length>0),voids:a});var Z=m.pathRef(e,!$||$&&re?A.next(_):_);if(ee.insertNodes(e,P,{at:Z.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),B&&!P.length&&z.length&&!R.length&&ee.delete(e,{at:v,voids:a}),ee.insertNodes(e,z,{at:k.current,match:K=>le.isElement(K)&&m.isBlock(e,K),mode:"lowest",voids:a,batchDirty:s}),ee.insertNodes(e,R,{at:T.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),!r.at){var H;if(R.length>0&&T.current?H=A.previous(T.current):z.length>0&&k.current?H=A.previous(k.current):Z.current&&(H=A.previous(Z.current)),H){var Q=m.end(e,H);ee.select(e,Q)}}Z.unref(),k.unref(),T.unref()}}})},Jh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:i}=e;if(i){if(r==="anchor")ee.select(e,i.anchor);else if(r==="focus")ee.select(e,i.focus);else if(r==="start"){var[a]=q.edges(i);ee.select(e,a)}else if(r==="end"){var[,o]=q.edges(i);ee.select(e,o)}}else return},Qh=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},$h=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:a="character",reverse:o=!1}=n,{edge:s=null}=n;if(r){s==="start"&&(s=q.isBackward(r)?"focus":"anchor"),s==="end"&&(s=q.isBackward(r)?"anchor":"focus");var{anchor:u,focus:c}=r,f={distance:i,unit:a,ignoreNonSelectable:!0},h={};if(s==null||s==="anchor"){var p=o?m.before(e,u,f):m.after(e,u,f);p&&(h.anchor=p)}if(s==null||s==="focus"){var g=o?m.before(e,c,f):m.after(e,c,f);g&&(h.focus=g)}ee.setSelection(e,h)}},ev=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){ee.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(st.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function Js(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Js(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var tv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=r;if(i){a==="start"&&(a=q.isBackward(i)?"focus":"anchor"),a==="end"&&(a=q.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ee.setSelection(e,{[a==="anchor"?"anchor":"focus"]:Qs(Qs({},u),n)})}},nv=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var a in e)(a==="anchor"&&e.anchor!=null&&!Ae.equals(e.anchor,n.anchor)||a==="focus"&&e.focus!=null&&!Ae.equals(e.focus,n.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==n[a])&&(r[a]=n[a],i[a]=e[a]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},rv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=r,{at:u,match:c,select:f}=r;if(ie.isNode(n)&&(n=[n]),n.length!==0){var[h]=n;if(u||(u=ji(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:a})),q.isCollapsed(u))u=u.anchor;else{var[,p]=q.edges(u),g=m.pointRef(e,p);ee.delete(e,{at:u}),u=g.unref()}if(Ae.isPoint(u)){c==null&&(ce.isText(h)?c=P=>ce.isText(P):e.isInline(h)?c=P=>ce.isText(P)||m.isInline(e,P):c=P=>le.isElement(P)&&m.isBlock(e,P));var[C]=m.nodes(e,{at:u.path,match:c,mode:o,voids:a});if(C){var[,v]=C,d=m.pathRef(e,v),D=m.isEnd(e,u,v);ee.splitNodes(e,{at:u,match:c,mode:o,voids:a});var B=d.unref();u=D?A.next(B):B}else return}var w=A.parent(u),O=u[u.length-1];if(!(!a&&m.void(e,{at:w}))){if(s){var b=[],E=A.levels(w);zp(e,()=>{var P=function(){var j=w.concat(O);O++;var I={type:"insert_node",path:j,node:z};e.apply(I),u=A.next(u),b.push(I),ce.isText?E.push(...Array.from(ie.nodes(z),N=>{var[,X]=N;return j.concat(X)})):E.push(j)};for(var z of n)P()},()=>{Ns(e,E,P=>{var z=P;for(var R of b)if(A.operationCanTransformPath(R)&&(z=A.transform(z,R),!z))return null;return z})})}else for(var S of n){var F=w.concat(O);O++,e.apply({type:"insert_node",path:F,node:S}),u=A.next(u)}if(u=A.previous(u),f){var V=m.end(e,u);V&&ee.select(e,V)}}}})},iv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:i="lowest",voids:a=!1}=n,{match:o}=n;if(o==null&&(o=A.isPath(r)?En(e,r):O=>le.isElement(O)&&m.isBlock(e,O)),!!r){var s=m.nodes(e,{at:r,match:o,mode:i,voids:a}),u=Array.from(s,O=>{var[,b]=O;return m.pathRef(e,b)});for(var c of u){var f=c.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var h=m.node(e,A.parent(f)),[p,g]=h,C=f[f.length-1],{length:v}=p.children;if(v===1){var d=A.next(g);ee.moveNodes(e,{at:f,to:d,voids:a}),ee.removeNodes(e,{at:g,voids:a})}else if(C===0)ee.moveNodes(e,{at:f,to:g,voids:a});else if(C===v-1){var D=A.next(g);ee.moveNodes(e,{at:f,to:D,voids:a})}else{var B=A.next(f),w=A.next(g);ee.splitNodes(e,{at:B,voids:a}),ee.moveNodes(e,{at:f,to:w,voids:a})}}}})},av=["text"],ov=["children"],$s=(t,e)=>{if(le.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?$s(t,n.children[0]):!1}else return!m.isEditor(e)},sv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=n;if(i){if(r==null)if(A.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>le.isElement(P)&&m.isBlock(e,P);if(!a&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:o})),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var[,c]=q.edges(i),f=m.pointRef(e,c);ee.delete(e,{at:i}),i=f.unref(),n.at==null&&ee.select(e,i)}var[h]=m.nodes(e,{at:i,match:r,voids:o,mode:s}),p=m.previous(e,{at:i,match:r,voids:o,mode:s});if(!(!h||!p)){var[g,C]=h,[v,d]=p;if(!(C.length===0||d.length===0)){var D=A.next(d),B=A.common(C,d),w=A.isSibling(C,d),O=Array.from(m.levels(e,{at:C}),P=>{var[z]=P;return z}).slice(B.length).slice(0,-1),b=m.above(e,{at:C,mode:"highest",match:P=>O.includes(P)&&$s(e,P)}),E=b&&m.pathRef(e,b[1]),S,F;if(ce.isText(g)&&ce.isText(v)){var V=It(g,av);F=v.text.length,S=V}else if(le.isElement(g)&&le.isElement(v)){var V=It(g,ov);F=v.children.length,S=V}else throw new Error("Cannot merge the node at path [".concat(C,"] with the previous sibling because it is not the same kind: ").concat(st.stringify(g)," ").concat(st.stringify(v)));w||ee.moveNodes(e,{at:C,to:D,voids:o}),E&&ee.removeNodes(e,{at:E.current,voids:o}),m.shouldMergeNodesRemovePrevNode(e,p,h)?ee.removeNodes(e,{at:d,voids:o}):e.apply({type:"merge_node",path:D,position:F,properties:S}),E&&E.unref()}}}})},uv=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(r){o==null&&(o=A.isPath(r)?En(t,r):g=>le.isElement(g)&&m.isBlock(t,g));var s=m.pathRef(t,n),u=m.nodes(t,{at:r,match:o,mode:i,voids:a}),c=Array.from(u,g=>{var[,C]=g;return m.pathRef(t,C)});for(var f of c){var h=f.unref(),p=s.current;h.length!==0&&t.apply({type:"move_node",path:h,newPath:p}),s.current&&A.isSibling(p,h)&&A.isAfter(p,h)&&(s.current=A.next(s.current))}s.unref()}})},lv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:a="lowest"}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=A.isPath(o)?En(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),!r&&q.isRange(o)&&(o=m.unhangRange(e,o,{voids:i}));var u=m.nodes(e,{at:o,match:s,mode:a,voids:i}),c=Array.from(u,g=>{var[,C]=g;return m.pathRef(e,C)});for(var f of c){var h=f.unref();if(h){var[p]=m.node(e,h);e.apply({type:"remove_node",path:h,node:p})}}}})},cv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=r,{hanging:u=!1,mode:c="lowest",split:f=!1,voids:h=!1}=r;if(a){if(i==null&&(i=A.isPath(a)?En(e,a):F=>le.isElement(F)&&m.isBlock(e,F)),!u&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:h})),f&&q.isRange(a)){if(q.isCollapsed(a)&&m.leaf(e,a.anchor)[0].text.length>0)return;var p=m.rangeRef(e,a,{affinity:"inward"}),[g,C]=q.edges(a),v=c==="lowest"?"lowest":"highest",d=m.isEnd(e,C,C.path);ee.splitNodes(e,{at:C,match:i,mode:v,voids:h,always:!d});var D=m.isStart(e,g,g.path);ee.splitNodes(e,{at:g,match:i,mode:v,voids:h,always:!D}),a=p.unref(),r.at==null&&ee.select(e,a)}o||(o=(F,V)=>F!==V);for(var[B,w]of m.nodes(e,{at:a,match:i,mode:c,voids:h})){var O={},b={};if(w.length!==0){var E=!1;for(var S in n)S==="children"||S==="text"||o(n[S],B[S])&&(E=!0,B.hasOwnProperty(S)&&(O[S]=B[S]),s?n[S]!=null&&(b[S]=s(B[S],n[S])):n[S]!=null&&(b[S]=n[S]));E&&e.apply({type:"set_node",path:w,properties:O,newProperties:b})}}}})},fv=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,n]=q.edges(e),r=m.pointRef(t,n);return ee.delete(t,{at:e}),r.unref()},dv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection,height:s=0,always:u=!1}=n;if(a==null&&(a=re=>le.isElement(re)&&m.isBlock(e,re)),q.isRange(o)&&(o=fv(e,o)),A.isPath(o)){var c=o,f=m.point(e,c),[h]=m.parent(e,c);a=re=>re===h,s=f.path.length-c.length+1,o=f,u=!0}if(o){var p=m.pointRef(e,o,{affinity:"backward"}),g;try{var[C]=m.nodes(e,{at:o,match:a,mode:r,voids:i});if(!C)return;var v=m.void(e,{at:o,mode:"highest"}),d=0;if(!i&&v){var[D,B]=v;if(le.isElement(D)&&e.isInline(D)){var w=m.after(e,B);if(!w){var O={text:""},b=A.next(B);ee.insertNodes(e,O,{at:b,voids:i}),w=m.point(e,b)}o=w,u=!0}var E=o.path.length-B.length;s=E+1,u=!0}g=m.pointRef(e,o);var S=o.path.length-s,[,F]=C,V=o.path.slice(0,S),P=s===0?o.offset:o.path[S]+d;for(var[z,R]of m.levels(e,{at:V,reverse:!0,voids:i})){var j=!1;if(R.length<F.length||R.length===0||!i&&le.isElement(z)&&m.isVoid(e,z))break;var I=p.current,N=m.isEnd(e,I,R);if(u||!p||!m.isEdge(e,I,R)){j=!0;var X=ie.extractProps(z);e.apply({type:"split_node",path:R,position:P,properties:X})}P=R[R.length-1]+(j||N?1:0)}if(n.at==null){var _=g.current||m.end(e,[]);ee.select(e,_)}}finally{var $;p.unref(),($=g)===null||$===void 0||$.unref()}}})},pv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var a of n)i[a]=null;ee.setNodes(e,i,r)},hv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:a=!1}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=A.isPath(o)?En(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),A.isPath(o)&&(o=m.range(e,o));var u=q.isRange(o)?m.rangeRef(e,o):null,c=m.nodes(e,{at:o,match:s,mode:r,voids:a}),f=Array.from(c,g=>{var[,C]=g;return m.pathRef(e,C)}).reverse(),h=function(){var C=p.unref(),[v]=m.node(e,C),d=m.range(e,C);i&&u&&(d=q.intersection(u.current,d)),ee.liftNodes(e,{at:d,match:D=>le.isAncestor(v)&&v.children.includes(D),voids:a})};for(var p of f)h();u&&u.unref()}})};function eu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var vv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=r,{match:s,at:u=e.selection}=r;if(u){if(s==null&&(A.isPath(u)?s=En(e,u):e.isInline(n)?s=d=>le.isElement(d)&&m.isInline(e,d)||ce.isText(d):s=d=>le.isElement(d)&&m.isBlock(e,d)),a&&q.isRange(u)){var[c,f]=q.edges(u),h=m.rangeRef(e,u,{affinity:"inward"});ee.splitNodes(e,{at:f,match:s,voids:o}),ee.splitNodes(e,{at:c,match:s,voids:o}),u=h.unref(),r.at==null&&ee.select(e,u)}var p=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>le.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:o})),g=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,v)):u;if(!D)return 0;var B=Array.from(m.nodes(e,{at:D,match:s,mode:i,voids:o}));if(B.length>0){var[w]=B,O=B[B.length-1],[,b]=w,[,E]=O;if(b.length===0&&E.length===0)return 0;var S=A.equals(b,E)?A.parent(b):A.common(b,E),F=m.range(e,b,E),V=m.node(e,S),[P]=V,z=S.length+1,R=A.next(E.slice(0,z)),j=tu(tu({},n),{},{children:[]});ee.insertNodes(e,j,{at:R,voids:o}),ee.moveNodes(e,{at:F,match:I=>le.isAncestor(P)&&P.children.includes(I),to:R.concat(0),voids:o})}},C;for(var[,v]of p)C=g()}})},gv=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _p(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zp(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kp(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xp(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jp(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Up(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return uh(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ch(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xh(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lh(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dh(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hp(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uh(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wp(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vp(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qp(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gp(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yp(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jh(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kh(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qh(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qp(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $p(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eh(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return th(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nh(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bh(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ih(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ah(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return oh(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sh(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rv(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ph(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hh(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vh(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gh(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mh(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yh(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ch(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dh(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bh(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return iv(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sv(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $h(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return uv(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xh(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lh(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sh(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ah(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Oh(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mh(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fh(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ph(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rh(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kh(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Th(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ih(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jh(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _h(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nh(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zh(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lv(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ev(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cv(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hh(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tv(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nv(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dv(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vh(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qh(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zh(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pv(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hv(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rh(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gh(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vv(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yh(t,...r)}};return t},mv={isHistory(t){return lt(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Zt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Zt.isOperationList(t.undos[0].operations))}},_i=new WeakMap,qn=new WeakMap,cn={isHistoryEditor(t){return mv.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return qn.get(t)},isSaving(t){return _i.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=cn.isMerging(t);qn.set(t,!0),e(),qn.set(t,n)},withoutMerging(t,e){var n=cn.isMerging(t);qn.set(t,!1),e(),qn.set(t,n)},withoutSaving(t,e){var n=cn.isSaving(t);_i.set(t,!1),e(),_i.set(t,n)}},yv=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:i}=r;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&ee.setSelection(e,a.selectionBefore),cn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var o of a.operations)e.apply(o)})}),r.redos.pop(),e.writeHistory("undos",a)}},e.undo=()=>{var{history:r}=e,{undos:i}=r;if(i.length>0){var a=i[i.length-1];cn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var o=a.operations.map(Zt.inverse).reverse();for(var s of o)e.apply(s);a.selectionBefore&&ee.setSelection(e,a.selectionBefore)})}),e.writeHistory("redos",a),r.undos.pop()}},e.apply=r=>{var{operations:i,history:a}=e,{undos:o}=a,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],c=cn.isSaving(e),f=cn.isMerging(e);if(c==null&&(c=Dv(r)),c){if(f==null&&(s==null?f=!1:i.length!==0?f=!0:f=Cv(r,u)),s&&f)s.operations.push(r);else{var h={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;o.length>100;)o.shift();a.redos=[]}n(r)},e.writeHistory=(r,i)=>{e.history[r].push(i)},e},Cv=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&A.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&A.equals(t.path,e.path)),Dv=(t,e)=>t.type!=="set_selection",bv=Bv,nu="֑-߿יִ-﷽ﹰ-ﻼ",ru="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Ev=new RegExp("^[^"+ru+"]*["+nu+"]"),wv=new RegExp("^[^"+nu+"]*["+ru+"]");function Bv(t){return t=String(t||""),Ev.test(t)?"rtl":wv.test(t)?"ltr":"neutral"}const iu=si(bv);function xv(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Wi=xv,Lv=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,Sv=Lv,Av=Sv,Ov=typeof self=="object"&&self&&self.Object===Object&&self,Fv=Av||Ov||Function("return this")(),au=Fv,Pv=au,Mv=function(){return Pv.Date.now()},kv=Mv,Tv=/\s/;function Rv(t){for(var e=t.length;e--&&Tv.test(t.charAt(e)););return e}var Iv=Rv,jv=Iv,Nv=/^\s+/;function zv(t){return t&&t.slice(0,jv(t)+1).replace(Nv,"")}var _v=zv,Wv=au,Uv=Wv.Symbol,ou=Uv,su=ou,uu=Object.prototype,Hv=uu.hasOwnProperty,Vv=uu.toString,Zn=su?su.toStringTag:void 0;function qv(t){var e=Hv.call(t,Zn),n=t[Zn];try{t[Zn]=void 0;var r=!0}catch{}var i=Vv.call(t);return r&&(e?t[Zn]=n:delete t[Zn]),i}var Zv=qv,Gv=Object.prototype,Yv=Gv.toString;function Kv(t){return Yv.call(t)}var Xv=Kv,lu=ou,Jv=Zv,Qv=Xv,$v="[object Null]",eg="[object Undefined]",cu=lu?lu.toStringTag:void 0;function tg(t){return t==null?t===void 0?eg:$v:cu&&cu in Object(t)?Jv(t):Qv(t)}var ng=tg;function rg(t){return t!=null&&typeof t=="object"}var ig=rg,ag=ng,og=ig,sg="[object Symbol]";function ug(t){return typeof t=="symbol"||og(t)&&ag(t)==sg}var lg=ug,cg=_v,fu=Wi,fg=lg,du=NaN,dg=/^[-+]0x[0-9a-f]+$/i,pg=/^0b[01]+$/i,hg=/^0o[0-7]+$/i,vg=parseInt;function gg(t){if(typeof t=="number")return t;if(fg(t))return du;if(fu(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=fu(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cg(t);var n=pg.test(t);return n||hg.test(t)?vg(t.slice(2),n?2:8):dg.test(t)?du:+t}var mg=gg,yg=Wi,Ui=kv,pu=mg,Cg="Expected a function",Dg=Math.max,bg=Math.min;function Eg(t,e,n){var r,i,a,o,s,u,c=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Cg);e=pu(e)||0,yg(n)&&(f=!!n.leading,h="maxWait"in n,a=h?Dg(pu(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(E){var S=r,F=i;return r=i=void 0,c=E,o=t.apply(F,S),o}function C(E){return c=E,s=setTimeout(D,e),f?g(E):o}function v(E){var S=E-u,F=E-c,V=e-S;return h?bg(V,a-F):V}function d(E){var S=E-u,F=E-c;return u===void 0||S>=e||S<0||h&&F>=a}function D(){var E=Ui();if(d(E))return B(E);s=setTimeout(D,v(E))}function B(E){return s=void 0,p&&r?g(E):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),c=0,r=u=i=s=void 0}function O(){return s===void 0?o:B(Ui())}function b(){var E=Ui(),S=d(E);if(r=arguments,i=this,u=E,S){if(s===void 0)return C(u);if(h)return clearTimeout(s),s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=w,b.flush=O,b}var hu=Eg;const wg=si(hu);var Bg=hu,xg=Wi,Lg="Expected a function";function Sg(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Lg);return xg(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Bg(t,e,{leading:r,maxWait:e,trailing:i})}var Ag=Sg;const Og=si(Ag),vu=t=>typeof t=="object"&&t!=null&&t.nodeType===1,gu=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Hi=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return gu(n.overflowY,e)||gu(n.overflowX,e)||(r=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},Or=(t,e,n,r,i,a,o,s)=>a<t&&o>e||a>t&&o<e?0:a<=t&&s<=n||o>=e&&s>=n?a-t-r:o>e&&s<n||a<t&&s>n?o-e+i:0,Fg=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},mu=(t,e)=>{var n,r,i,a;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:u,boundary:c,skipOverflowHiddenElements:f}=e,h=typeof c=="function"?c:X=>X!==c;if(!vu(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,g=[];let C=t;for(;vu(C)&&h(C);){if(C=Fg(C),C===p){g.push(C);break}C!=null&&C===document.body&&Hi(C)&&!Hi(document.documentElement)||C!=null&&Hi(C,f)&&g.push(C)}const v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:D,scrollY:B}=window,{height:w,width:O,top:b,right:E,bottom:S,left:F}=t.getBoundingClientRect(),{top:V,right:P,bottom:z,left:R}=(X=>{const _=window.getComputedStyle(X);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(t);let j=s==="start"||s==="nearest"?b-V:s==="end"?S+z:b+w/2-V+z,I=u==="center"?F+O/2-R+P:u==="end"?E+P:F-R;const N=[];for(let X=0;X<g.length;X++){const _=g[X],{height:$,width:re,top:k,right:T,bottom:Z,left:H}=_.getBoundingClientRect();if(o==="if-needed"&&b>=0&&F>=0&&S<=d&&E<=v&&b>=k&&S<=Z&&F>=H&&E<=T)return N;const Q=getComputedStyle(_),K=parseInt(Q.borderLeftWidth,10),y=parseInt(Q.borderTopWidth,10),U=parseInt(Q.borderRightWidth,10),W=parseInt(Q.borderBottomWidth,10);let M=0,J=0;const ne="offsetWidth"in _?_.offsetWidth-_.clientWidth-K-U:0,G="offsetHeight"in _?_.offsetHeight-_.clientHeight-y-W:0,ue="offsetWidth"in _?_.offsetWidth===0?0:re/_.offsetWidth:0,ae="offsetHeight"in _?_.offsetHeight===0?0:$/_.offsetHeight:0;if(p===_)M=s==="start"?j:s==="end"?j-d:s==="nearest"?Or(B,B+d,d,y,W,B+j,B+j+w,w):j-d/2,J=u==="start"?I:u==="center"?I-v/2:u==="end"?I-v:Or(D,D+v,v,K,U,D+I,D+I+O,O),M=Math.max(0,M+B),J=Math.max(0,J+D);else{M=s==="start"?j-k-y:s==="end"?j-Z+W+G:s==="nearest"?Or(k,Z,$,y,W+G,j,j+w,w):j-(k+$/2)+G/2,J=u==="start"?I-H-K:u==="center"?I-(H+re/2)+ne/2:u==="end"?I-T+U+ne:Or(H,T,re,K,U+ne,I,I+O,O);const{scrollLeft:de,scrollTop:pe}=_;M=ae===0?0:Math.max(0,Math.min(pe+M/ae,_.scrollHeight-$/ae+G)),J=ue===0?0:Math.max(0,Math.min(de+J/ue,_.scrollWidth-re/ue+ne)),j+=pe-M,I+=de-J}N.push({el:_,top:M,left:J})}return N},Pg=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function Mg(t,e){if(!t.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(mu(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:a,left:o}of mu(t,Pg(e))){const s=a-n.top+n.bottom,u=o-n.left+n.right;i.scroll({top:s,left:u,behavior:r})}}var fn=[],kg=function(){return fn.some(function(t){return t.activeTargets.length>0})},Tg=function(){return fn.some(function(t){return t.skippedTargets.length>0})},yu="ResizeObserver loop completed with undelivered notifications.",Rg=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:yu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=yu),window.dispatchEvent(t)},Gn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Gn||(Gn={}));var dn=function(t){return Object.freeze(t)},Ig=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,dn(this)}return t}(),Cu=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,c=e.height;return{x:n,y:r,top:i,right:a,bottom:o,left:s,width:u,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Vi=function(t){return t instanceof SVGElement&&"getBBox"in t},Du=function(t){if(Vi(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},bu=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},jg=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Yn=typeof window<"u"?window:{},Fr=new WeakMap,Eu=/auto|scroll/,Ng=/^tb|vertical/,zg=/msie|trident/i.test(Yn.navigator&&Yn.navigator.userAgent),Ft=function(t){return parseFloat(t||"0")},Bn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Ig((n?e:t)||0,(n?t:e)||0)},wu=dn({devicePixelContentBoxSize:Bn(),borderBoxSize:Bn(),contentBoxSize:Bn(),contentRect:new Cu(0,0,0,0)}),Bu=function(t,e){if(e===void 0&&(e=!1),Fr.has(t)&&!e)return Fr.get(t);if(Du(t))return Fr.set(t,wu),wu;var n=getComputedStyle(t),r=Vi(t)&&t.ownerSVGElement&&t.getBBox(),i=!zg&&n.boxSizing==="border-box",a=Ng.test(n.writingMode||""),o=!r&&Eu.test(n.overflowY||""),s=!r&&Eu.test(n.overflowX||""),u=r?0:Ft(n.paddingTop),c=r?0:Ft(n.paddingRight),f=r?0:Ft(n.paddingBottom),h=r?0:Ft(n.paddingLeft),p=r?0:Ft(n.borderTopWidth),g=r?0:Ft(n.borderRightWidth),C=r?0:Ft(n.borderBottomWidth),v=r?0:Ft(n.borderLeftWidth),d=h+c,D=u+f,B=v+g,w=p+C,O=s?t.offsetHeight-w-t.clientHeight:0,b=o?t.offsetWidth-B-t.clientWidth:0,E=i?d+B:0,S=i?D+w:0,F=r?r.width:Ft(n.width)-E-b,V=r?r.height:Ft(n.height)-S-O,P=F+d+b+B,z=V+D+O+w,R=dn({devicePixelContentBoxSize:Bn(Math.round(F*devicePixelRatio),Math.round(V*devicePixelRatio),a),borderBoxSize:Bn(P,z,a),contentBoxSize:Bn(F,V,a),contentRect:new Cu(h,u,F,V)});return Fr.set(t,R),R},xu=function(t,e,n){var r=Bu(t,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case Gn.DEVICE_PIXEL_CONTENT_BOX:return o;case Gn.BORDER_BOX:return i;default:return a}},_g=function(){function t(e){var n=Bu(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=dn([n.borderBoxSize]),this.contentBoxSize=dn([n.contentBoxSize]),this.devicePixelContentBoxSize=dn([n.devicePixelContentBoxSize])}return t}(),Lu=function(t){if(Du(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Wg=function(){var t=1/0,e=[];fn.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(c){var f=new _g(c.target),h=Lu(c.target);s.push(f),c.lastReportedSize=xu(c.target,c.observedBox),h<t&&(t=h)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Su=function(t){fn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Lu(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Ug=function(){var t=0;for(Su(t);kg();)t=Wg(),Su(t);return Tg()&&Rg(),t>0},qi,Au=[],Hg=function(){return Au.splice(0).forEach(function(t){return t()})},Vg=function(t){if(!qi){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Hg()}).observe(n,r),qi=function(){n.textContent="".concat(e?e--:e++)}}Au.push(t),qi()},qg=function(t){Vg(function(){requestAnimationFrame(t)})},Pr=0,Zg=function(){return!!Pr},Gg=250,Yg={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ou=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fu=function(t){return t===void 0&&(t=0),Date.now()+t},Zi=!1,Kg=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Gg),!Zi){Zi=!0;var r=Fu(e);qg(function(){var i=!1;try{i=Ug()}finally{if(Zi=!1,e=r-Fu(),!Zg())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Yg)};document.body?n():Yn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ou.forEach(function(n){return Yn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Ou.forEach(function(n){return Yn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Gi=new Kg,Pu=function(t){!Pr&&t>0&&Gi.start(),Pr+=t,!Pr&&Gi.stop()},Xg=function(t){return!Vi(t)&&!jg(t)&&getComputedStyle(t).display==="inline"},Jg=function(){function t(e,n){this.target=e,this.observedBox=n||Gn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=xu(this.target,this.observedBox,!0);return Xg(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Qg=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Mr=new WeakMap,Mu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},kr=function(){function t(){}return t.connect=function(e,n){var r=new Qg(e,n);Mr.set(e,r)},t.observe=function(e,n,r){var i=Mr.get(e),a=i.observationTargets.length===0;Mu(i.observationTargets,n)<0&&(a&&fn.push(i),i.observationTargets.push(new Jg(n,r&&r.box)),Pu(1),Gi.schedule())},t.unobserve=function(e,n){var r=Mr.get(e),i=Mu(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&fn.splice(fn.indexOf(r),1),r.observationTargets.splice(i,1),Pu(-1))},t.disconnect=function(e){var n=this,r=Mr.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),$g=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");kr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!bu(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");kr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!bu(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");kr.unobserve(this,e)},t.prototype.disconnect=function(){kr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function em(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function xn(t,e){if(t==null)return{};var n=em(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Kn(t){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(t)}function tm(t,e){if(Kn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Kn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nm(t){var e=tm(t,"string");return Kn(e)==="symbol"?e:String(e)}function xt(t,e,n){return e=nm(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yi=l.createContext(null),Gt=()=>{var t=l.useContext(Yi);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Ki,Xi,ku=parseInt(l.version.split(".")[0],10),Tu=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Ru=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),dt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Ln=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),pn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),rm=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Iu=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),im=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),am=dt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),om=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),sm=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),um=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Tr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Ki=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Ki!==void 0&&Ki[1]&&parseInt((Xi=navigator.userAgent.match(/Version\/(\d+)/))===null||Xi===void 0?void 0:Xi[1],10)<17);var Yt=(!im||!am)&&!rm&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Ji=new WeakMap,Qi=new WeakMap,ju=new WeakMap,Rr=new WeakMap,$i=new WeakMap,Xn=new WeakMap,hn=new WeakMap,Ir=new WeakMap,jr=new WeakMap,ea=new WeakMap,Kt=new WeakMap,vn=new WeakMap,Jn=new WeakMap,ta=new WeakMap,na=new WeakMap,St=new WeakMap,Nt=new WeakMap,mt=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,Nu=new WeakMap,Sn=Symbol("placeholder"),zu=Symbol("mark-placeholder"),_u=globalThis.Node,lm=globalThis.Text,ra=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,cm=t=>Qt(t)&&t.nodeType===8,Lt=t=>Qt(t)&&t.nodeType===1,Qt=t=>{var e=ra(t);return!!e&&t instanceof e.Node},ia=t=>{var e=t&&t.anchorNode&&ra(t.anchorNode);return!!e&&t instanceof e.Selection},Wu=t=>Qt(t)&&t.nodeType===3,fm=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,dm=t=>{var[e,n]=t;if(Lt(e)&&e.childNodes.length){var r=n===e.childNodes.length,i=r?n-1:n;for([e,i]=Uu(e,i,r?"backward":"forward"),r=i<n;Lt(e)&&e.childNodes.length;){var a=r?e.childNodes.length-1:0;e=hm(e,a,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},pm=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Uu=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],a=e,o=!1,s=!1;(cm(i)||Lt(i)&&i.childNodes.length===0||Lt(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=r.length){o=!0,a=e-1,n="backward";continue}if(a<0){s=!0,a=e+1,n="forward";continue}i=r[a],e=a,a+=n==="forward"?1:-1}return[i,e]},hm=(t,e,n)=>{var[r]=Uu(t,e,n);return r},Hu=t=>{var e="";if(Wu(t)&&t.nodeValue)return t.nodeValue;if(Lt(t)){for(var n of Array.from(t.childNodes))e+=Hu(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
|
77
|
+
`)}return e},vm=/data-slate-fragment="(.+?)"/m,gm=t=>{var e=t.getData("text/html"),[,n]=e.match(vm)||[];return n},Qn=t=>t.getSelection!=null?t.getSelection():document.getSelection(),aa=(t,e,n)=>{var{target:r}=e;if(Lt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=Y.getWindow(t);if(i.contains(r))return Y.hasDOMNode(t,r,{editable:!0});var a=n.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var c of s)if(c===r||c.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!a||a===e?!1:aa(t,a,n)},mm=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},Vu=(t,e)=>!!(t.compareDocumentPosition(e)&_u.DOCUMENT_POSITION_PRECEDING),ym=(t,e)=>!!(t.compareDocumentPosition(e)&_u.DOCUMENT_POSITION_FOLLOWING),Cm=0;class Dm{constructor(){xt(this,"id",void 0),this.id="".concat(Cm++)}}var Y={androidPendingDiffs:t=>mt.get(t),androidScheduleFlush:t=>{var e;(e=na.get(t))===null||e===void 0||e()},blur:t=>{var e=Y.toDOMNode(t,t),n=Y.findDocumentOrShadowRoot(t);Kt.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Y.findDocumentOrShadowRoot(t),r=Qn(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&ee.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Y.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:i}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var a=Y.toSlateNode(t,e.target),o=Y.findPath(t,a);if(le.isElement(a)&&m.isVoid(t,a)){var s=i.getBoundingClientRect(),u=t.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,c=m.point(t,o,{edge:u?"start":"end"}),f=u?m.before(t,c):m.after(t,c);if(f){var h=m.range(t,f);return h}}var p,{document:g}=Y.getWindow(t);if(g.caretRangeFromPoint)p=g.caretRangeFromPoint(n,r);else{var C=g.caretPositionFromPoint(n,r);C&&(p=g.createRange(),p.setStart(C.offsetNode,C.offset),p.setEnd(C.offsetNode,C.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var v=Y.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!1});return v},findKey:(t,e)=>{var n=Ir.get(e);return n||(n=new Dm,Ir.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var i=Qi.get(r);if(i==null){if(m.isEditor(r))return n;break}var a=Ji.get(r);if(a==null)break;n.unshift(a),r=i}throw new Error("Unable to find the path for Slate node: ".concat(st.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Kt.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Y.focus(e,{retries:n.retries-1})},10);return}var r=Y.toDOMNode(e,e),i=Y.findDocumentOrShadowRoot(e);if(i.activeElement!==r){if(e.selection&&i instanceof Document){var a=Qn(i),o=Y.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(o)}e.selection||ee.select(e,m.start(e,[])),Kt.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=ju.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=r,a=Y.toDOMNode(e,e),o;try{o=Lt(n)?n:n.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===a&&(!i||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===a||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Qt(e)&&Y.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Y.hasEditableTarget(t,e)||Y.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Qt(e)&&Y.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!vn.get(t),isFocused:t=>!!Kt.get(t),isReadOnly:t=>!!ea.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(ea.get(t))return!1;var n=Y.hasTarget(t,e)&&Y.toSlateNode(t,e);return le.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=jr.get(t),r=m.isEditor(e)?Rr.get(t):n==null?void 0:n.get(Y.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(st.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Y.toDOMNode(t,n),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",o=Array.from(r.querySelectorAll(a)),s=0,u=0;u<o.length;u++){var c=o[u],f=c.childNodes[0];if(!(f==null||f.textContent==null)){var{length:h}=f.textContent,p=c.getAttribute("data-slate-length"),g=p==null?h:parseInt(p,10),C=s+g,v=o[u+1];if(e.offset===C&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var d,D=v.childNodes[0];i=[D instanceof lm?D:v,(d=v.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=C){var B=Math.min(h,Math.max(0,e.offset-s));i=[f,B];break}s=C}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(st.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,i=q.isBackward(e),a=Y.toDOMPoint(t,n),o=q.isCollapsed(e)?a:Y.toDOMPoint(t,r),s=Y.getWindow(t),u=s.document.createRange(),[c,f]=i?o:a,[h,p]=i?a:o,g=Lt(c)?c:c.parentElement,C=!!g.getAttribute("data-slate-zero-width"),v=Lt(h)?h:h.parentElement,d=!!v.getAttribute("data-slate-zero-width");return u.setStart(c,C?1:f),u.setEnd(h,d?1:p),u},toSlateNode:(t,e)=>{var n=Lt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Xn.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:i,searchDirection:a="backward"}=n,[o,s]=r?e:dm(e),u=o.parentNode,c=null,f=0;if(u){var h,p,g=Y.toDOMNode(t,t),C=u.closest('[data-slate-void="true"]'),v=C&&g.contains(C)?C:null,d=u.closest('[contenteditable="false"]'),D=d&&g.contains(d)?d:null,B=u.closest("[data-slate-leaf]"),w=null;if(B){if(c=B.closest('[data-slate-node="text"]'),c){var O=Y.getWindow(t),b=O.document.createRange();b.setStart(c,0),b.setEnd(o,s);var E=b.cloneContents(),S=[...Array.prototype.slice.call(E.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(E.querySelectorAll("[contenteditable=false]"))];S.forEach(H=>{if(dt&&!r&&H.hasAttribute("data-slate-zero-width")&&H.textContent.length>0&&H.textContext!=="\uFEFF"){H.textContent.startsWith("\uFEFF")&&(H.textContent=H.textContent.slice(1));return}H.parentNode.removeChild(H)}),f=E.textContent.length,w=c}}else if(v){for(var F=v.querySelectorAll("[data-slate-leaf]"),V=0;V<F.length;V++){var P=F[V];if(Y.hasDOMNode(t,P)){B=P;break}}B?(c=B.closest('[data-slate-node="text"]'),w=B,f=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})):f=1}else if(D){var z=H=>H?H.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],R=D.closest('[data-slate-node="element"]');if(a==="forward"){var j,I=[...z(R),...z(R==null?void 0:R.nextElementSibling)];B=(j=I.find(H=>ym(D,H)))!==null&&j!==void 0?j:null}else{var N,X=[...z(R==null?void 0:R.previousElementSibling),...z(R)];B=(N=X.findLast(H=>Vu(D,H)))!==null&&N!==void 0?N:null}B&&(c=B.closest('[data-slate-node="text"]'),w=B,a==="forward"?f=0:(f=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})))}w&&f===w.textContent.length&&dt&&w.getAttribute("data-slate-zero-width")==="z"&&(h=w.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Ln&&(p=w.textContent)!==null&&p!==void 0&&p.endsWith(`
|
78
|
+
|
79
|
+
`))&&f--}if(dt&&!c&&!r){var _=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(_&&Y.hasDOMNode(t,_,{editable:!0})){var $=Y.toSlateNode(t,_),{path:re,offset:k}=m.start(t,Y.findPath(t,$));return _.querySelector("[data-slate-leaf]")||(k=s),{path:re,offset:k}}}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var T=Y.toSlateNode(t,c),Z=Y.findPath(t,T);return{path:Z,offset:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:a}=n,o=ia(e)?e.anchorNode:e.startContainer,s,u,c,f,h;if(o)if(ia(e)){if(Ln&&e.rangeCount>1){c=e.focusNode;var p=e.getRangeAt(0),g=e.getRangeAt(e.rangeCount-1);if(c instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement){let E=function(S){return S.childElementCount>0?E(S.children[0]):S};var C=p.startContainer,v=g.startContainer,d=E(C.children[p.startOffset]),D=E(v.children[g.startOffset]);f=0,D.childNodes.length>0?s=D.childNodes[0]:s=D,d.childNodes.length>0?c=d.childNodes[0]:c=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else p.startContainer===c?(s=g.endContainer,u=g.endOffset,f=p.startOffset):(s=p.startContainer,u=p.endOffset,f=g.startOffset)}else s=e.anchorNode,u=e.anchorOffset,c=e.focusNode,f=e.focusOffset;Iu&&pm(s)||Ln?h=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:h=e.isCollapsed}else s=e.startContainer,u=e.startOffset,c=e.endContainer,f=e.endOffset,h=e.collapsed;if(s==null||c==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Ln&&(r=c.textContent)!==null&&r!==void 0&&r.endsWith(`
|
80
|
+
|
81
|
+
`)&&f===c.textContent.length&&f--;var B=Y.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!B)return null;var w=Vu(s,c)||s===c&&f<u,O=h?B:Y.toSlatePoint(t,[c,f],{exactMatch:i,suppressThrow:a,searchDirection:w?"forward":"backward"});if(!O)return null;var b={anchor:B,focus:O};return q.isExpanded(b)&&q.isForward(b)&&Lt(c)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function bm(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var i=ie.get(t,n);if(!ce.isText(i))return!1;if(r.start!==i.text.length||r.text.length===0)return i.text.slice(r.start,r.start+r.text.length)===r.text;var a=A.next(n);if(!m.hasPath(t,a))return!1;var o=ie.get(t,a);return ce.isText(o)&&o.text.startsWith(r.text)}function qu(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((i,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function Em(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return n}function wm(t,e,n){for(var r=Math.min(t.length,e.length,n),i=0;i<r;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return r}function Zu(t,e){var{start:n,end:r,text:i}=e,a=t.slice(n,r),o=Em(a,i),s=Math.min(a.length-o,i.length-o),u=wm(a,i,s),c={start:n+o,end:r-u,text:i.slice(o,i.length-u)};return c.start===c.end&&c.text.length===0?null:c}function Bm(t,e,n){var r=Math.min(e.start,n.start),i=Math.max(0,Math.min(e.start+e.text.length,n.end)-n.start),a=qu(t,e,n),o=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-i),s=a.slice(r,o),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Zu(t,{start:r,end:u,text:s})}function xm(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function oa(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var i=ie.get(t,n);if(!ce.isText(i))return null;var a=m.above(t,{match:s=>le.isElement(s)&&m.isBlock(t,s),at:n});if(!a)return null;for(;r>i.text.length;){var o=m.next(t,{at:n,match:ce.isText});if(!o||!A.isDescendant(o[1],a[1]))return null;r-=i.text.length,i=o[0],n=o[1]}return{path:n,offset:r}}function Gu(t,e){var n=oa(t,e.anchor);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var r=oa(t,e.focus);return r?{anchor:n,focus:r}:null}function sa(t,e,n){var r=mt.get(t),i=r==null?void 0:r.find(f=>{var{path:h}=f;return A.equals(h,e.path)});if(!i||e.offset<=i.diff.start)return Ae.transform(e,n,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=Ae.transform(o,n,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},c=Ae.transform(u,n,{affinity:"backward"});return c?n.type==="split_node"&&A.equals(n.path,e.path)&&u.offset<n.position&&a.start<n.position?c:{path:c.path,offset:c.offset+a.text.length-a.end+a.start}:null}function Yu(t,e,n){var r=sa(t,e.anchor,n);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var i=sa(t,e.focus,n);return i?{anchor:r,focus:i}:null}function Lm(t,e){var{path:n,diff:r,id:i}=t;switch(e.type){case"insert_text":return!A.equals(e.path,n)||e.offset>=r.end?t:e.offset<=r.start?{diff:{start:e.text.length+r.start,end:e.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+e.text.length,text:r.text},id:i,path:n};case"remove_text":return!A.equals(e.path,n)||e.offset>=r.end?t:e.offset+e.text.length<=r.start?{diff:{start:r.start-e.text.length,end:r.end-e.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-e.text.length,text:r.text},id:i,path:n};case"split_node":return!A.equals(e.path,n)||e.position>=r.end?{diff:r,id:i,path:A.transform(n,e,{affinity:"backward"})}:e.position>r.start?{diff:{start:r.start,end:Math.min(e.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-e.position,end:r.end-e.position,text:r.text},id:i,path:A.transform(n,e,{affinity:"forward"})};case"merge_node":return A.equals(e.path,n)?{diff:{start:r.start+e.position,end:r.end+e.position,text:r.text},id:i,path:A.transform(n,e)}:{diff:r,id:i,path:A.transform(n,e)}}var a=A.transform(n,e);return a?{diff:r,path:a,id:i}:null}function Ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ku(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ku(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Sm=25,Am=200,Om=function(){},Fm=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function Pm(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,a=null,o=null,s=null,u=0,c=!1,f=()=>{var R=Jt.get(e);if(Jt.delete(e),R){var{selection:j}=e,I=Gu(e,R);I&&(!j||!q.equals(I,j))&&ee.select(e,I)}},h=()=>{var R=Xt.get(e);if(Xt.delete(e),!!R){if(R.at){var j=Ae.isPoint(R.at)?oa(e,R.at):Gu(e,R.at);if(!j)return;var I=m.range(e,j);(!e.selection||!q.equals(e.selection,I))&&ee.select(e,j)}R.run()}},p=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!O()&&!w()){f();return}i||(i=!0,setTimeout(()=>i=!1)),w()&&(i="action");var R=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),Om("flush",Xt.get(e),mt.get(e));for(var j=O(),I;I=(N=mt.get(e))===null||N===void 0?void 0:N[0];){var N,X,_=St.get(e);_!==void 0&&(St.delete(e),e.marks=_),_&&c===!1&&(c=null);var $=xm(I);(!e.selection||!q.equals(e.selection,$))&&ee.select(e,$),I.diff.text?m.insertText(e,I.diff.text):m.deleteFragment(e),mt.set(e,(X=mt.get(e))===null||X===void 0?void 0:X.filter(T=>{var{id:Z}=T;return Z!==I.id})),bm(e,I)||(j=!1,Xt.delete(e),Nt.delete(e),i="action",Jt.delete(e),n.cancel(),r.cancel(),R==null||R.unref())}var re=R==null?void 0:R.unref();if(re&&!Jt.get(e)&&(!e.selection||!q.equals(re,e.selection))&&ee.select(e,re),w()){h();return}j&&n(),n.flush(),r.flush(),f();var k=Nt.get(e);Nt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=R=>{a&&clearTimeout(a),a=setTimeout(()=>{vn.set(e,!1),p()},Sm)},C=R=>{vn.set(e,!0),a&&(clearTimeout(a),a=null)},v=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,I=$i.get(e);if(I){if(O()||j){I.style.display="none";return}I.style.removeProperty("display")}},d=(R,j)=>{var I,N=(I=mt.get(e))!==null&&I!==void 0?I:[];mt.set(e,N);var X=ie.leaf(e,R),_=N.findIndex(k=>A.equals(k.path,R));if(_<0){var $=Zu(X.text,j);$&&N.push({path:R,diff:j,id:u++}),v();return}var re=Bm(X.text,N[_].diff,j);if(!re){N.splice(_,1),v();return}N[_]=Nr(Nr({},N[_]),{},{diff:re})},D=function(j){var{at:I}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};c=!1,Jt.delete(e),n.cancel(),r.cancel(),w()&&p(),Xt.set(e,{at:I,run:j}),s=setTimeout(p)},B=R=>{var j;o&&(clearTimeout(o),o=null);var{inputType:I}=R,N=null,X=R.dataTransfer||R.data||void 0;c!==!1&&I!=="insertText"&&I!=="insertCompositionText"&&(c=!1);var[_]=R.getTargetRanges();_&&(N=Y.toSlateRange(e,_,{exactMatch:!1,suppressThrow:!0}));var $=Y.getWindow(e),re=$.getSelection();if(!N&&re&&(_=re,N=Y.toSlateRange(e,re,{exactMatch:!1,suppressThrow:!0})),N=(j=N)!==null&&j!==void 0?j:e.selection,!!N){var k=!0;if(I.startsWith("delete")){if(q.isExpanded(N)){var[T,Z]=q.edges(N),H=ie.leaf(e,T.path);if(H.text.length===T.offset&&Z.offset===0){var Q=m.next(e,{at:T.path,match:ce.isText});Q&&A.equals(Q[1],Z.path)&&(N={anchor:Z,focus:Z})}}var K=I.endsWith("Backward")?"backward":"forward",[y,U]=q.edges(N),[W,M]=m.leaf(e,y.path),J={text:"",start:y.offset,end:U.offset},ne=mt.get(e),G=ne==null?void 0:ne.find(qe=>A.equals(qe.path,M)),ue=G?[G.diff,J]:[J],ae=qu(W.text,...ue);if(ae.length===0&&(k=!1),q.isExpanded(N)){if(k&&A.equals(N.anchor.path,N.focus.path)){var de={path:N.anchor.path,offset:y.offset},pe=m.range(e,de,de);return S(pe),d(N.anchor.path,{text:"",end:U.offset,start:y.offset})}return D(()=>m.deleteFragment(e,{direction:K}),{at:N})}}switch(I){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:N});case"deleteContent":case"deleteContentForward":{var{anchor:Ce}=N;if(k&&q.isCollapsed(N)){var ye=ie.leaf(e,Ce.path);if(Ce.offset<ye.text.length)return d(Ce.path,{text:"",start:Ce.offset,end:Ce.offset+1})}return D(()=>m.deleteForward(e),{at:N})}case"deleteContentBackward":{var ge,{anchor:ve}=N,je=ia(_)?_.isCollapsed:!!((ge=_)!==null&&ge!==void 0&&ge.collapsed);return k&&je&&q.isCollapsed(N)&&ve.offset>0?d(ve.path,{text:"",start:ve.offset-1,end:ve.offset}):D(()=>m.deleteBackward(e),{at:N})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:N});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:N});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:N});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:N});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:N});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:N});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:N});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:N});case"insertParagraph":return D(()=>m.insertBreak(e),{at:N});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(Fm(X))return D(()=>Y.insertData(e,X),{at:N});var se=X??"";if(St.get(e)&&(se=se.replace("\uFEFF","")),I==="insertText"&&/.*\n.*\n$/.test(se)&&(se=se.slice(0,-1)),se.includes(`
|
82
|
+
`))return D(()=>{var qe=se.split(`
|
83
|
+
`);qe.forEach((Ee,ut)=>{Ee&&m.insertText(e,Ee),ut!==qe.length-1&&m.insertSoftBreak(e)})},{at:N});if(A.equals(N.anchor.path,N.focus.path)){var[Ne,fe]=q.edges(N),we={start:Ne.offset,end:fe.offset,text:se};if(se&&c&&I==="insertCompositionText"){var Me=c.start+c.text.search(/\S|$/),He=we.start+we.text.search(/\S|$/);He===Me+1&&we.end===c.start+c.text.length?(we.start-=1,c=null,P()):c=!1}else I==="insertText"?c===null?c=we:c&&q.isCollapsed(N)&&c.end+c.text.length===Ne.offset?c=Nr(Nr({},c),{},{text:c.text+se}):c=!1:c=!1;if(k){d(Ne.path,we);return}}return D(()=>m.insertText(e,se),{at:N})}}}},w=()=>!!Xt.get(e),O=()=>{var R;return!!((R=mt.get(e))!==null&&R!==void 0&&R.length)},b=()=>w()||O(),E=()=>i,S=R=>{Jt.set(e,R),o&&(clearTimeout(o),o=null);var{selection:j}=e;if(R){var I=!j||!A.equals(j.anchor.path,R.anchor.path),N=!j||!A.equals(j.anchor.path.slice(0,-1),R.anchor.path.slice(0,-1));(I&&c||N)&&(c=!1),(I||O())&&(o=setTimeout(p,Am))}},F=()=>{(w()||!O())&&p()},V=R=>{O()||(v(!0),setTimeout(v))},P=()=>{w()||(s=setTimeout(p))},z=R=>{if(!(O()||w())&&R.some(I=>aa(e,I,R))){var j;(j=Nu.get(e))===null||j===void 0||j()}};return{flush:p,scheduleFlush:P,hasPendingDiffs:O,hasPendingAction:w,hasPendingChanges:b,isFlushing:E,handleUserSelect:S,handleCompositionEnd:g,handleCompositionStart:C,handleDOMBeforeInput:B,handleKeyDown:V,handleDomMutations:z,handleInput:F}}function Mm(){var t=l.useRef(!1);return l.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var $n=Tr?l.useLayoutEffect:l.useEffect;function km(t,e,n){var[r]=l.useState(()=>new MutationObserver(e));$n(()=>{r.takeRecords()}),l.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(t.current,n),()=>r.disconnect()},[r,t,n])}var Tm=["node"];function Xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Rm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xu(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Im={subtree:!0,childList:!0,characterData:!0},jm=dt?t=>{var{node:e}=t,n=xn(t,Tm);if(!dt)return null;var r=Gt(),i=Mm(),[a]=l.useState(()=>Pm(Rm({editor:r},n)));return km(e,a.handleDomMutations,Im),na.set(r,a.scheduleFlush),i&&a.flush(),a}:()=>null,Nm=["anchor","focus"],zm=["anchor","focus"],_m=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),Ju=(t,e)=>{var n=xn(t,Nm),r=xn(e,zm);return t[Sn]===e[Sn]&&_m(n,r)},Wm=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(!q.equals(r,i)||!Ju(r,i))return!1}return!0},Um=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!Ju(r,i))return!1}return!0};function Qu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qu(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Vm=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,a=Gt(),o=Y.findPath(a,i),s=A.parent(o),u=!!n[zu];return a.isVoid(r)?l.createElement(ua,{length:ie.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!a.isInline(r)&&m.string(a,s)===""?l.createElement(ua,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?l.createElement(ua,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
|
84
|
+
`?l.createElement($u,{isTrailing:!0,text:n.text}):l.createElement($u,{text:n.text})},$u=t=>{var{text:e,isTrailing:n=!1}=t,r=l.useRef(null),i=()=>"".concat(e??"").concat(n?`
|
85
|
+
`:""),[a]=l.useState(i);return $n(()=>{var o=i();r.current&&r.current.textContent!==o&&(r.current.textContent=o)}),l.createElement(qm,{ref:r},a)},qm=l.memo(l.forwardRef((t,e)=>l.createElement("span",{"data-slate-string":!0,ref:e},t.children))),ua=t=>{var{length:e=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=t,i={"data-slate-zero-width":n?"n":"z","data-slate-length":e};return r&&(i["data-slate-mark-placeholder"]=!0),l.createElement("span",Hm({},i),!(dt||Tu)||!n?"\uFEFF":null,n?l.createElement("br",null):null)};function el(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?el(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):el(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zm=dt?300:0;function Gm(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function nl(t){t.current&&(clearTimeout(t.current),t.current=null)}var Ym=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:a,renderLeaf:o=B=>l.createElement(Xm,tl({},B))}=t,s=Gt(),u=l.useRef(null),c=l.useRef(null),[f,h]=l.useState(!1),p=l.useRef(null),g=l.useCallback(B=>{if(Gm(u,B==null),B==null){var w;$i.delete(s),(w=e.onPlaceholderResize)===null||w===void 0||w.call(e,null)}else{if($i.set(s,B),!u.current){var O=window.ResizeObserver||$g;u.current=new O(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,B)})}u.current.observe(B),c.current=B}},[c,e,s]),C=l.createElement(Vm,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[Sn];if(l.useEffect(()=>(v?p.current||(p.current=setTimeout(()=>{h(!0),p.current=null},Zm)):(nl(p),h(!1)),()=>nl(p)),[v,h]),v&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:pn?"inherit":void 0},contentEditable:!1,ref:g}};C=l.createElement(l.Fragment,null,a(d),C)}var D={"data-slate-leaf":!0};return o({attributes:D,children:C,leaf:e,text:r})},Km=l.memo(Ym,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ce.equals(e.leaf,t.leaf)&&e.leaf[Sn]===t.leaf[Sn]),Xm=t=>{var{attributes:e,children:n}=t;return l.createElement("span",tl({},e),n)},Jm=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=Gt(),u=l.useRef(null),c=ce.decorations(o,e),f=Y.findKey(s,o),h=[],p=0;p<c.length;p++){var g=c[p];h.push(l.createElement(Km,{isLast:n&&p===c.length-1,key:"".concat(f.id,"-").concat(p),renderPlaceholder:i,leaf:g,text:o,parent:r,renderLeaf:a}))}var C=l.useCallback(v=>{var d=jr.get(s);v?(d==null||d.set(f,v),hn.set(o,v),Xn.set(v,o)):(d==null||d.delete(f),hn.delete(o),u.current&&Xn.delete(u.current)),u.current=v},[u,s,f,o]);return l.createElement("span",{"data-slate-node":"text",ref:C},h)},rl=l.memo(Jm,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&Um(e.decorations,t.decorations));function il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function la(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?il(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):il(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Qm=t=>{var{decorations:e,element:n,renderElement:r=B=>l.createElement(e0,la({},B)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=Gt(),u=r0(),c=s.isInline(n),f=Y.findKey(s,n),h=l.useCallback(B=>{var w=jr.get(s);B?(w==null||w.set(f,B),hn.set(n,B),Xn.set(B,n)):(w==null||w.delete(f),hn.delete(n))},[s,f,n]),p=ol({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}),g={"data-slate-node":"element",ref:h};if(c&&(g["data-slate-inline"]=!0),!c&&m.hasInlines(s,n)){var C=ie.string(n),v=iu(C);v==="rtl"&&(g.dir=v)}if(m.isVoid(s,n)){g["data-slate-void"]=!0,!u&&c&&(g.contentEditable=!1);var d=c?"span":"div",[[D]]=ie.texts(n);p=l.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},l.createElement(rl,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),Ji.set(D,0),Qi.set(D,n)}return r({attributes:g,children:p,element:n})},$m=l.memo(Qm,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&Wm(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),e0=t=>{var{attributes:e,children:n,element:r}=t,i=Gt(),a=i.isInline(r)?"span":"div";return l.createElement(a,la(la({},e),{},{style:{position:"relative"}}),n)},al=l.createContext(()=>[]),t0=()=>l.useContext(al),n0=l.createContext(!1),ol=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=t0(),u=Gt(),c=Y.findPath(u,n),f=[],h=le.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),p=0;p<n.children.length;p++){var g=c.concat(p),C=n.children[p],v=Y.findKey(u,C),d=m.range(u,g),D=o&&q.intersection(d,o),B=s([C,g]);for(var w of e){var O=q.intersection(w,d);O&&B.push(O)}le.isElement(C)?f.push(l.createElement(n0.Provider,{key:"provider-".concat(v.id),value:!!D},l.createElement($m,{decorations:B,element:C,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:D}))):f.push(l.createElement(rl,{decorations:B,key:v.id,isLast:h&&p===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:a,text:C})),Ji.set(C,p),Qi.set(C,n)}return f},sl=l.createContext(!1),r0=()=>l.useContext(sl),ul=l.createContext(null),ca=()=>{var t=l.useContext(ul);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function i0(){var t=Gt(),e=l.useRef(!1),n=l.useRef(0),r=l.useCallback(()=>{if(!e.current){e.current=!0;var i=Y.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return l.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var a0=3,o0={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},s0={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},u0={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ge=t=>{var e=o0[t],n=s0[t],r=u0[t],i=e&&xi(e),a=n&&xi(n),o=r&&xi(r);return s=>!!(i&&i(s)||Ru&&a&&a(s)||!Ru&&o&&o(s))},Xe={isBold:Ge("bold"),isCompose:Ge("compose"),isMoveBackward:Ge("moveBackward"),isMoveForward:Ge("moveForward"),isDeleteBackward:Ge("deleteBackward"),isDeleteForward:Ge("deleteForward"),isDeleteLineBackward:Ge("deleteLineBackward"),isDeleteLineForward:Ge("deleteLineForward"),isDeleteWordBackward:Ge("deleteWordBackward"),isDeleteWordForward:Ge("deleteWordForward"),isExtendBackward:Ge("extendBackward"),isExtendForward:Ge("extendForward"),isExtendLineBackward:Ge("extendLineBackward"),isExtendLineForward:Ge("extendLineForward"),isItalic:Ge("italic"),isMoveLineBackward:Ge("moveLineBackward"),isMoveLineForward:Ge("moveLineForward"),isMoveWordBackward:Ge("moveWordBackward"),isMoveWordForward:Ge("moveWordForward"),isRedo:Ge("redo"),isSoftBreak:Ge("insertSoftBreak"),isSplitBlock:Ge("splitBlock"),isTransposeCharacter:Ge("transposeCharacter"),isUndo:Ge("undo")},l0=(t,e)=>{var n=[],r=()=>{n=[]},i=o=>{if(e.current){var s=o.filter(u=>aa(t,u,o));n.push(...s)}};function a(){n.length>0&&(n.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),r())}return{registerMutations:i,restoreDOM:a,clear:r}},c0={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class ll extends l.Component{constructor(){super(...arguments),xt(this,"context",null),xt(this,"manager",null),xt(this,"mutationObserver",null)}observe(){var e,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(n.current,c0)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=l0(n,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,n,r,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}xt(ll,"contextType",Yi);var f0=dt?ll:t=>{var{children:e}=t;return l.createElement(l.Fragment,null,e)},d0=l.createContext(!1),p0=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],h0=["text"];function cl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var v0=t=>l.createElement(l.Fragment,null,ol(t)),g0=l.forwardRef((t,e)=>{var n=l.useCallback(y=>l.createElement(m0,Pt({},y)),[]),{autoFocus:r,decorate:i=y0,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:c,renderPlaceholder:f=n,scrollSelectionIntoView:h=C0,style:p={},as:g="div",disableDefaultStyles:C=!1}=t,v=xn(t,p0),d=ca(),[D,B]=l.useState(!1),w=l.useRef(null),O=l.useRef([]),[b,E]=l.useState(),S=l.useRef(!1),{onUserInput:F,receivedUserInput:V}=i0(),[,P]=l.useReducer(y=>y+1,0);Nu.set(d,P),ea.set(d,s);var z=l.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);l.useEffect(()=>{w.current&&r&&w.current.focus()},[r]);var R=l.useRef(),j=l.useMemo(()=>Og(()=>{var y=Y.toDOMNode(d,d),U=y.getRootNode();if(!S.current&&pn&&U instanceof ShadowRoot){S.current=!0;var W=mm();W?document.execCommand("indent"):ee.deselect(d),S.current=!1;return}var M=R.current;if((dt||!Y.isComposing(d))&&(!z.isUpdatingSelection||M!=null&&M.isFlushing())&&!z.isDraggingInternally){var J=Y.findDocumentOrShadowRoot(d),{activeElement:ne}=J,G=Y.toDOMNode(d,d),ue=Qn(J);if(ne===G?(z.latestElement=ne,Kt.set(d,!0)):Kt.delete(d),!ue)return ee.deselect(d);var{anchorNode:ae,focusNode:de}=ue,pe=Y.hasEditableTarget(d,ae)||Y.isTargetInsideNonReadonlyVoid(d,ae),Ce=Y.hasTarget(d,de);if(pe&&Ce){var ye=Y.toSlateRange(d,ue,{exactMatch:!1,suppressThrow:!0});ye&&(!Y.isComposing(d)&&!(M!=null&&M.hasPendingChanges())&&!(M!=null&&M.isFlushing())?ee.select(d,ye):M==null||M.handleUserSelect(ye))}s&&(!pe||!Ce)&&ee.deselect(d)}},100),[d,s,z]),I=l.useMemo(()=>wg(j,0),[j]);R.current=jm({node:w,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:I}),$n(()=>{var y,U,W;w.current&&(W=ra(w.current))?(ju.set(d,W),Rr.set(d,w.current),hn.set(d,w.current),Xn.set(w.current,d)):hn.delete(d);var{selection:M}=d,J=Y.findDocumentOrShadowRoot(d),ne=Qn(J);if(!(!ne||!Y.isFocused(d)||(y=R.current)!==null&&y!==void 0&&y.hasPendingAction())){var G=pe=>{var Ce=ne.type!=="None";if(!(!M&&!Ce)){var ye=ne.focusNode,ge;if(Ln&&ne.rangeCount>1){var ve=ne.getRangeAt(0),je=ne.getRangeAt(ne.rangeCount-1);ve.startContainer===ye?ge=je.endContainer:ge=ve.startContainer}else ge=ne.anchorNode;var se=Rr.get(d),Ne=!1;if(se.contains(ge)&&se.contains(ye)&&(Ne=!0),Ce&&Ne&&M&&!pe){var fe=Y.toSlateRange(d,ne,{exactMatch:!0,suppressThrow:!0});if(fe&&q.equals(fe,M)){var we;if(!z.hasMarkPlaceholder||(we=ge)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(M&&!Y.hasRange(d,M)){d.selection=Y.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!0});return}z.isUpdatingSelection=!0;var Me=M&&Y.toDOMRange(d,M);return Me?(Y.isComposing(d)&&!dt?ne.collapseToEnd():q.isBackward(M)?ne.setBaseAndExtent(Me.endContainer,Me.endOffset,Me.startContainer,Me.startOffset):ne.setBaseAndExtent(Me.startContainer,Me.startOffset,Me.endContainer,Me.endOffset),h(d,Me)):ne.removeAllRanges(),Me}};ne.rangeCount<=1&&G();var ue=((U=R.current)===null||U===void 0?void 0:U.isFlushing())==="action";if(!dt||!ue){setTimeout(()=>{z.isUpdatingSelection=!1});return}var ae=null,de=requestAnimationFrame(()=>{if(ue){var pe=Ce=>{try{var ye=Y.toDOMNode(d,d);ye.focus(),G(Ce)}catch{}};pe(),ae=setTimeout(()=>{pe(!0),z.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(de),ae&&clearTimeout(ae)}}});var N=l.useCallback(y=>{var U=Y.toDOMNode(d,d),W=U.getRootNode();if(S!=null&&S.current&&pn&&W instanceof ShadowRoot){var M=y.getTargetRanges(),J=M[0],ne=new window.Range;ne.setStart(J.startContainer,J.startOffset),ne.setEnd(J.endContainer,J.endOffset);var G=Y.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!1});ee.select(d,G),y.preventDefault(),y.stopImmediatePropagation();return}if(F(),!s&&Y.hasEditableTarget(d,y.target)&&!D0(y,a)){var ue;if(R.current)return R.current.handleDOMBeforeInput(y);I.flush(),j.flush();var{selection:ae}=d,{inputType:de}=y,pe=y.dataTransfer||y.data||void 0,Ce=de==="insertCompositionText"||de==="deleteCompositionText";if(Ce&&Y.isComposing(d))return;var ye=!1;if(de==="insertText"&&ae&&q.isCollapsed(ae)&&y.data&&y.data.length===1&&/[a-z ]/i.test(y.data)&&ae.anchor.offset!==0){var ge,ve;ye=!0,d.marks&&(ye=!1);var{anchor:je}=ae,[se,Ne]=Y.toDOMPoint(d,je),fe=(ge=se.parentElement)===null||ge===void 0?void 0:ge.closest("a"),we=Y.getWindow(d);if(ye&&fe&&Y.hasDOMNode(d,fe)){var Me,He=we==null?void 0:we.document.createTreeWalker(fe,NodeFilter.SHOW_TEXT).lastChild();He===se&&((Me=He.textContent)===null||Me===void 0?void 0:Me.length)===Ne&&(ye=!1)}if(ye&&se.parentElement&&(we==null||(ve=we.getComputedStyle(se.parentElement))===null||ve===void 0?void 0:ve.whiteSpace)==="pre"){var qe=m.above(d,{at:je.path,match:wt=>le.isElement(wt)&&m.isBlock(d,wt)});qe&&ie.string(qe[0]).includes(" ")&&(ye=!1)}}if(!de.startsWith("delete")||de.startsWith("deleteBy")){var[Ee]=y.getTargetRanges();if(Ee){var ut=Y.toSlateRange(d,Ee,{exactMatch:!1,suppressThrow:!1});if(!ae||!q.equals(ae,ut)){ye=!1;var at=!Ce&&d.selection&&m.rangeRef(d,d.selection);ee.select(d,ut),at&&Jn.set(d,at)}}}if(Ce)return;if(ye||y.preventDefault(),ae&&q.isExpanded(ae)&&de.startsWith("delete")){var At=de.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:At});return}switch(de){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{de==="insertFromComposition"&&Y.isComposing(d)&&(B(!1),vn.set(d,!1)),(pe==null?void 0:pe.constructor.name)==="DataTransfer"?Y.insertData(d,pe):typeof pe=="string"&&(ye?O.current.push(()=>m.insertText(d,pe)):m.insertText(d,pe));break}}var ht=(ue=Jn.get(d))===null||ue===void 0?void 0:ue.unref();Jn.delete(d),ht&&(!d.selection||!q.equals(d.selection,ht))&&ee.select(d,ht)}},[d,j,F,a,s,I]),X=l.useCallback(y=>{y==null?(j.cancel(),I.cancel(),Rr.delete(d),hn.delete(d),w.current&&Yt&&w.current.removeEventListener("beforeinput",N)):Yt&&y.addEventListener("beforeinput",N),w.current=y,typeof e=="function"?e(y):e&&(e.current=y)},[j,I,d,N,e]);$n(()=>{var y=Y.getWindow(d);y.document.addEventListener("selectionchange",I);var U=()=>{z.isDraggingInternally=!1};return y.document.addEventListener("dragend",U),y.document.addEventListener("drop",U),()=>{y.document.removeEventListener("selectionchange",I),y.document.removeEventListener("dragend",U),y.document.removeEventListener("drop",U)}},[I,z]);var _=i([d,[]]),$=o&&d.children.length===1&&Array.from(ie.texts(d)).length===1&&ie.string(d)===""&&!D,re=l.useCallback(y=>{if(y&&$){var U;E((U=y.getBoundingClientRect())===null||U===void 0?void 0:U.height)}else E(void 0)},[$]);if($){var k=m.start(d,[]);_.push({[Sn]:!0,placeholder:o,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:T}=d;if(z.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&T){var{anchor:Z}=d.selection,H=ie.leaf(d,Z.path),Q=xn(H,h0);if(!ce.equals(H,T,{loose:!0})){z.hasMarkPlaceholder=!0;var K=Object.fromEntries(Object.keys(Q).map(y=>[y,null]));_.push(Pt(Pt(Pt({[zu]:!0},K),T),{},{anchor:Z,focus:Z}))}}return l.useEffect(()=>{setTimeout(()=>{var{selection:y}=d;if(y){var{anchor:U}=y,W=ie.leaf(d,U.path);if(T&&!ce.equals(W,T,{loose:!0})){St.set(d,T);return}}St.delete(d)})}),l.createElement(sl.Provider,{value:s},l.createElement(d0.Provider,{value:D},l.createElement(al.Provider,{value:i},l.createElement(f0,{node:w,receivedUserInput:V},l.createElement(g,Pt(Pt({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},v),{},{spellCheck:Yt||!Tr?v.spellCheck:!1,autoCorrect:Yt||!Tr?v.autoCorrect:"false",autoCapitalize:Yt||!Tr?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:Pt(Pt({},C?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),p),onBeforeInput:l.useCallback(y=>{if(!Yt&&!s&&!pt(y,v.onBeforeInput)&&Y.hasSelectableTarget(d,y.target)&&(y.preventDefault(),!Y.isComposing(d))){var U=y.data;m.insertText(d,U)}},[v.onBeforeInput,d,s]),onInput:l.useCallback(y=>{if(!pt(y,v.onInput)){if(R.current){R.current.handleInput();return}for(var U of O.current)U();O.current=[]}},[v.onInput]),onBlur:l.useCallback(y=>{if(!(s||z.isUpdatingSelection||!Y.hasSelectableTarget(d,y.target)||pt(y,v.onBlur))){var U=Y.findDocumentOrShadowRoot(d);if(z.latestElement!==U.activeElement){var{relatedTarget:W}=y,M=Y.toDOMNode(d,d);if(W!==M&&!(Lt(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&Qt(W)&&Y.hasDOMNode(d,W)){var J=Y.toSlateNode(d,W);if(le.isElement(J)&&!d.isVoid(J))return}if(pn){var ne=Qn(U);ne==null||ne.removeAllRanges()}Kt.delete(d)}}}},[s,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:l.useCallback(y=>{if(Y.hasTarget(d,y.target)&&!pt(y,v.onClick)&&Qt(y.target)){var U=Y.toSlateNode(d,y.target),W=Y.findPath(d,U);if(!m.hasPath(d,W)||ie.get(d,W)!==U)return;if(y.detail===a0&&W.length>=1){var M=W;if(!(le.isElement(U)&&m.isBlock(d,U))){var J,ne=m.above(d,{match:ye=>le.isElement(ye)&&m.isBlock(d,ye),at:W});M=(J=ne==null?void 0:ne[1])!==null&&J!==void 0?J:W.slice(0,1)}var G=m.range(d,M);ee.select(d,G);return}if(s)return;var ue=m.start(d,W),ae=m.end(d,W),de=m.void(d,{at:ue}),pe=m.void(d,{at:ae});if(de&&pe&&A.equals(de[1],pe[1])){var Ce=m.range(d,ue);ee.select(d,Ce)}}},[d,v.onClick,s]),onCompositionEnd:l.useCallback(y=>{if(Y.hasSelectableTarget(d,y.target)){var U;if(Y.isComposing(d)&&Promise.resolve().then(()=>{B(!1),vn.set(d,!1)}),(U=R.current)===null||U===void 0||U.handleCompositionEnd(y),pt(y,v.onCompositionEnd)||dt)return;if(!pn&&!om&&!Tu&&!um&&!sm&&y.data){var W=St.get(d);St.delete(d),W!==void 0&&(Nt.set(d,d.marks),d.marks=W),m.insertText(d,y.data);var M=Nt.get(d);Nt.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:l.useCallback(y=>{Y.hasSelectableTarget(d,y.target)&&!pt(y,v.onCompositionUpdate)&&(Y.isComposing(d)||(B(!0),vn.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:l.useCallback(y=>{if(Y.hasSelectableTarget(d,y.target)){var U;if((U=R.current)===null||U===void 0||U.handleCompositionStart(y),pt(y,v.onCompositionStart)||dt)return;B(!0);var{selection:W}=d;if(W&&q.isExpanded(W)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:l.useCallback(y=>{Y.hasSelectableTarget(d,y.target)&&!pt(y,v.onCopy)&&!fl(y)&&(y.preventDefault(),Y.setFragmentData(d,y.clipboardData,"copy"))},[v.onCopy,d]),onCut:l.useCallback(y=>{if(!s&&Y.hasSelectableTarget(d,y.target)&&!pt(y,v.onCut)&&!fl(y)){y.preventDefault(),Y.setFragmentData(d,y.clipboardData,"cut");var{selection:U}=d;if(U)if(q.isExpanded(U))m.deleteFragment(d);else{var W=ie.parent(d,U.anchor.path);m.isVoid(d,W)&&ee.delete(d)}}},[s,d,v.onCut]),onDragOver:l.useCallback(y=>{if(Y.hasTarget(d,y.target)&&!pt(y,v.onDragOver)){var U=Y.toSlateNode(d,y.target);le.isElement(U)&&m.isVoid(d,U)&&y.preventDefault()}},[v.onDragOver,d]),onDragStart:l.useCallback(y=>{if(!s&&Y.hasTarget(d,y.target)&&!pt(y,v.onDragStart)){var U=Y.toSlateNode(d,y.target),W=Y.findPath(d,U),M=le.isElement(U)&&m.isVoid(d,U)||m.void(d,{at:W,voids:!0});if(M){var J=m.range(d,W);ee.select(d,J)}z.isDraggingInternally=!0,Y.setFragmentData(d,y.dataTransfer,"drag")}},[s,d,v.onDragStart,z]),onDrop:l.useCallback(y=>{if(!s&&Y.hasTarget(d,y.target)&&!pt(y,v.onDrop)){y.preventDefault();var U=d.selection,W=Y.findEventRange(d,y),M=y.dataTransfer;ee.select(d,W),z.isDraggingInternally&&U&&!q.equals(U,W)&&!m.void(d,{at:W,voids:!0})&&ee.delete(d,{at:U}),Y.insertData(d,M),Y.isFocused(d)||Y.focus(d)}},[s,d,v.onDrop,z]),onDragEnd:l.useCallback(y=>{!s&&z.isDraggingInternally&&v.onDragEnd&&Y.hasTarget(d,y.target)&&v.onDragEnd(y)},[s,z,v,d]),onFocus:l.useCallback(y=>{if(!s&&!z.isUpdatingSelection&&Y.hasEditableTarget(d,y.target)&&!pt(y,v.onFocus)){var U=Y.toDOMNode(d,d),W=Y.findDocumentOrShadowRoot(d);if(z.latestElement=W.activeElement,Ln&&y.target!==U){U.focus();return}Kt.set(d,!0)}},[s,z,d,v.onFocus]),onKeyDown:l.useCallback(y=>{if(!s&&Y.hasEditableTarget(d,y.target)){var U;(U=R.current)===null||U===void 0||U.handleKeyDown(y);var{nativeEvent:W}=y;if(Y.isComposing(d)&&W.isComposing===!1&&(vn.set(d,!1),B(!1)),pt(y,v.onKeyDown)||Y.isComposing(d))return;var{selection:M}=d,J=d.children[M!==null?M.focus.path[0]:0],ne=iu(ie.string(J))==="rtl";if(Xe.isRedo(W)){y.preventDefault();var G=d;typeof G.redo=="function"&&G.redo();return}if(Xe.isUndo(W)){y.preventDefault();var ue=d;typeof ue.undo=="function"&&ue.undo();return}if(Xe.isMoveLineBackward(W)){y.preventDefault(),ee.move(d,{unit:"line",reverse:!0});return}if(Xe.isMoveLineForward(W)){y.preventDefault(),ee.move(d,{unit:"line"});return}if(Xe.isExtendLineBackward(W)){y.preventDefault(),ee.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Xe.isExtendLineForward(W)){y.preventDefault(),ee.move(d,{unit:"line",edge:"focus"});return}if(Xe.isMoveBackward(W)){y.preventDefault(),M&&q.isCollapsed(M)?ee.move(d,{reverse:!ne}):ee.collapse(d,{edge:ne?"end":"start"});return}if(Xe.isMoveForward(W)){y.preventDefault(),M&&q.isCollapsed(M)?ee.move(d,{reverse:ne}):ee.collapse(d,{edge:ne?"start":"end"});return}if(Xe.isMoveWordBackward(W)){y.preventDefault(),M&&q.isExpanded(M)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:!ne});return}if(Xe.isMoveWordForward(W)){y.preventDefault(),M&&q.isExpanded(M)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:ne});return}if(Yt){if((Iu||pn)&&M&&(Xe.isDeleteBackward(W)||Xe.isDeleteForward(W))&&q.isCollapsed(M)){var ae=ie.parent(d,M.anchor.path);if(le.isElement(ae)&&m.isVoid(d,ae)&&(m.isInline(d,ae)||m.isBlock(d,ae))){y.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Xe.isBold(W)||Xe.isItalic(W)||Xe.isTransposeCharacter(W)){y.preventDefault();return}if(Xe.isSoftBreak(W)){y.preventDefault(),m.insertSoftBreak(d);return}if(Xe.isSplitBlock(W)){y.preventDefault(),m.insertBreak(d);return}if(Xe.isDeleteBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Xe.isDeleteForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Xe.isDeleteLineBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Xe.isDeleteLineForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Xe.isDeleteWordBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Xe.isDeleteWordForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[s,d,v.onKeyDown]),onPaste:l.useCallback(y=>{!s&&Y.hasEditableTarget(d,y.target)&&!pt(y,v.onPaste)&&(!Yt||fm(y.nativeEvent)||pn)&&(y.preventDefault(),Y.insertData(d,y.clipboardData))},[s,d,v.onPaste])}),l.createElement(v0,{decorations:_,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:c,selection:d.selection}))))))}),m0=t=>{var{attributes:e,children:n}=t;return l.createElement("span",Pt({},e),n,dt&&l.createElement("br",null))},y0=()=>[],C0=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),Mg(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},pt=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},fl=t=>Qt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),D0=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},b0=l.createContext(!1),E0=l.createContext({});function w0(t){var e=l.useRef([]).current,n=l.useRef({editor:t}).current,r=l.useCallback(a=>{n.editor=a,e.forEach(o=>o(a))},[e,n]),i=l.useMemo(()=>({getSlate:()=>n.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var B0=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],x0=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=xn(t,B0),[u,c]=l.useState(()=>{if(!ie.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(st.stringify(o)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(st.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:h}=w0(e),p=l.useCallback(v=>{var d;switch(r&&r(e.children),v==null||(d=v.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}c(D=>({v:D.v+1,editor:e})),h(e)},[e,h,r,i,a]);l.useEffect(()=>(ta.set(e,p),()=>{ta.set(e,()=>{})}),[e,p]);var[g,C]=l.useState(Y.isFocused(e));return l.useEffect(()=>{C(Y.isFocused(e))},[e]),$n(()=>{var v=()=>C(Y.isFocused(e));return ku>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),l.createElement(E0.Provider,{value:f},l.createElement(ul.Provider,{value:u},l.createElement(Yi.Provider,{value:u.editor},l.createElement(b0.Provider,{value:g},n))))},dl=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},pl=(t,e,n)=>{var r=Y.toDOMRange(t,e).getBoundingClientRect(),i=Y.toDOMRange(t,n).getBoundingClientRect();return dl(r,i)&&dl(i,r)},L0=(t,e)=>{var n=m.range(t,q.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,a=r.length,o=Math.floor(a/2);if(pl(t,m.range(t,r[i]),n))return m.range(t,r[i],n);if(r.length<2)return m.range(t,r[r.length-1],n);for(;o!==r.length&&o!==i;)pl(t,m.range(t,r[o]),n)?a=o:i=o,o=Math.floor((i+a)/2);return m.range(t,r[a],n)};function hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var S0=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=r;return jr.set(r,new WeakMap),r.addMark=(c,f)=>{var h,p;(h=na.get(r))===null||h===void 0||h(),!St.get(r)&&(p=mt.get(r))!==null&&p!==void 0&&p.length&&St.set(r,null),Nt.delete(r),s(c,f)},r.removeMark=c=>{var f;!St.get(r)&&(f=mt.get(r))!==null&&f!==void 0&&f.length&&St.set(r,null),Nt.delete(r),u(c)},r.deleteBackward=c=>{if(c!=="line")return o(c);if(r.selection&&q.isCollapsed(r.selection)){var f=m.above(r,{match:C=>le.isElement(C)&&m.isBlock(r,C),at:r.selection});if(f){var[,h]=f,p=m.range(r,h,r.selection.anchor),g=L0(r,p);q.isCollapsed(g)||ee.delete(r,{at:g})}}},r.apply=c=>{var f=[],h=[],p=mt.get(r);if(p!=null&&p.length){var g=p.map(I=>Lm(I,c)).filter(Boolean);mt.set(r,g)}var C=Jt.get(r);C&&Jt.set(r,Yu(r,C,c));var v=Xt.get(r);if(v!=null&&v.at){var d=Ae.isPoint(v==null?void 0:v.at)?sa(r,v.at,c):Yu(r,v.at,c);Xt.set(r,d?vl(vl({},v),{},{at:d}):null)}switch(c.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...An(r,c.path));break}case"set_selection":{var D;(D=Jn.get(r))===null||D===void 0||D.unref(),Jn.delete(r);break}case"insert_node":case"remove_node":{f.push(...An(r,A.parent(c.path)));break}case"merge_node":{var B=A.previous(c.path);f.push(...An(r,B));break}case"move_node":{var w=A.common(A.parent(c.path),A.parent(c.newPath));f.push(...An(r,w));var O;A.isBefore(c.path,c.newPath)?(f.push(...An(r,A.parent(c.path))),O=c.newPath):(f.push(...An(r,A.parent(c.newPath))),O=c.path);var b=ie.get(e,A.parent(O)),E=Y.findKey(r,b),S=m.pathRef(r,A.parent(O));h.push([S,E]);break}}i(c);for(var[F,V]of f){var[P]=m.node(r,F);Ir.set(P,V)}for(var[z,R]of h)if(z.current){var[j]=m.node(r,z.current);Ir.set(j,R)}},r.setFragmentData=c=>{var{selection:f}=r;if(f){var[h,p]=q.edges(f),g=m.void(r,{at:h.path}),C=m.void(r,{at:p.path});if(!(q.isCollapsed(f)&&!g)){var v=Y.toDOMRange(r,f),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),C){var[B]=C,w=v.cloneRange(),O=Y.toDOMNode(r,B);w.setEndAfter(O),d=w.cloneContents()}if(g&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(P=>{var z=P.getAttribute("data-slate-zero-width")==="n";P.textContent=z?`
|
86
|
+
`:""}),Wu(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var E=r.getFragment(),S=JSON.stringify(E),F=window.btoa(encodeURIComponent(S));D.setAttribute("data-slate-fragment",F),c.setData("application/".concat(n),F);var V=d.ownerDocument.createElement("div");return V.appendChild(d),V.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(V),c.setData("text/html",V.innerHTML),c.setData("text/plain",Hu(V)),d.ownerDocument.body.removeChild(V),c}}},r.insertData=c=>{r.insertFragmentData(c)||r.insertTextData(c)},r.insertFragmentData=c=>{var f=c.getData("application/".concat(n))||gm(c);if(f){var h=decodeURIComponent(window.atob(f)),p=JSON.parse(h);return r.insertFragment(p),!0}return!1},r.insertTextData=c=>{var f=c.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),p=!1;for(var g of h)p&&ee.splitNodes(r,{always:!0}),r.insertText(g),p=!0;return!0}return!1},r.onChange=c=>{var f=ku<18?Wt.unstable_batchedUpdates:h=>h();f(()=>{var h=ta.get(r);h&&h(c),a(c)})},r},An=(t,e)=>{var n=[];for(var[r,i]of m.levels(t,{at:e})){var a=Y.findKey(t,r);n.push([i,a])}return n};function gl(t,e,n="type"){const{selection:r}=t;if(!r)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,r),match:a=>!m.isEditor(a)&&le.isElement(a)&&a[n]===e}));return!!i}const ml=["listItem","numberedList"],zr=["left","center","right","justify"];function A0(t,e){const n=zr.includes(e)?"align":"type",r=gl(t,e,n),i=ml.includes(e);ee.unwrapNodes(t,{match:o=>!m.isEditor(o)&&le.isElement(o)&&ml.includes(o.type)&&!zr.includes(e),split:!0});let a;if(zr.includes(e)?a={align:r?void 0:e}:a={type:r?"paragraph":i?"listItem":e},ee.setNodes(t,a),!r&&i){const o={type:e,children:[]};ee.wrapNodes(t,o)}}function gn({format:t,icon:e}){const n=ca(),r=zr.includes(t)?"align":"type",a=gl(n,t,r)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),A0(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+a,onMouseDown:o,children:x.jsx(e,{})})}function O0({attributes:t,children:e,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return x.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...t,children:e});case"bulletedList":return x.jsx("ul",{className:"arkynElementBulletList",style:r,...t,children:e});case"headingOne":return x.jsx("h1",{className:"arkynElementHeadingOne",style:r,...t,children:e});case"headingTwo":return x.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...t,children:e});case"listItem":return x.jsx("li",{className:"arkynElementListItem",style:r,...t,children:e});case"numberedList":return x.jsx("ol",{className:"arkynElementNumberedList",style:r,...t,children:e});default:return x.jsx("p",{className:"arkynElementParagraph",style:r,...t,children:e})}}function F0({attributes:t,children:e,leaf:n}){return n.bold&&(e=x.jsx("strong",{children:e})),n.code&&(e=x.jsx("code",{children:e})),n.italic&&(e=x.jsx("em",{children:e})),n.underline&&(e=x.jsx("u",{children:e})),x.jsx("span",{...t,children:e})}function yl(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function Cl(t,e){yl(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function _r({format:t,icon:e}){const n=ca(),i=yl(n,t)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),Cl(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:a,children:x.jsx(e,{})})}function P0({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const Dl={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},M0=[{type:"paragraph",children:[{text:""}]}];function k0({name:t,defaultValue:e,onValueChange:n,onChange:r,isError:i}){const[a,o]=l.useState([]),[s,u]=l.useState(!1),{id:c,inputRef:f,error:h}=Ct(),p=l.useRef(null),g=f||p,C=i||!!h,v=l.useMemo(()=>yv(S0(gv())),[]),d=l.useCallback(F0,[]),D=l.useCallback(O0,[]);function B(E){o(E),r&&r(E),n&&n(JSON.stringify(E))}const b=`arkynRichText ${C?"errorTrue":"errorFalse"} ${s?"focusTrue":"focusFalse"}`;return x.jsxs(x0,{editor:v,initialValue:e?JSON.parse(e):M0,onChange:B,onValueChange:B,children:[x.jsxs("div",{className:b,children:[x.jsxs(P0,{children:[x.jsx(gn,{format:"headingOne",icon:Se.Heading1}),x.jsx(gn,{format:"headingTwo",icon:Se.Heading2}),x.jsx(gn,{format:"blockQuote",icon:Se.Quote}),x.jsx(_r,{format:"bold",icon:Se.Bold}),x.jsx(_r,{format:"italic",icon:Se.Italic}),x.jsx(_r,{format:"underline",icon:Se.Underline}),x.jsx(_r,{format:"code",icon:Se.Code}),x.jsx(gn,{format:"left",icon:Se.AlignLeft}),x.jsx(gn,{format:"right",icon:Se.AlignRight}),x.jsx(gn,{format:"center",icon:Se.AlignCenter}),x.jsx(gn,{format:"justify",icon:Se.AlignJustify})]}),x.jsx(g0,{className:"editorContainer",renderElement:D,renderLeaf:d,spellCheck:!0,autoFocus:!0,id:c,onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:E=>{for(const S in Dl)if(Nd(S,E)){E.preventDefault();const F=Dl[S];Cl(v,F)}}})]}),x.jsx("input",{ref:g,type:"hidden",name:t,value:JSON.stringify(a)})]})}function T0(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,leftIcon:u,disabled:c,readOnly:f,onFocus:h,onBlur:p,title:g,style:C,closeOnSelect:v=!0,...d}=t,b=`arkyn_select ${s?"hasPrefix":""} ${o} ${i} ${c||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,S={md:20,lg:20}[i];return{isLoading:n,className:b,prefix:jc(s,S,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:h,onBlur:p,title:g,closeOnSelect:v,style:C,iconSize:S,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:S,strokeWidth:2.5}),...d}}function R0(t){var Z;const[e,n]=l.useState(!1),{inputRef:r,id:i,error:a}=Ct(),o=l.useRef(null),s=r||o,u=t.isError||!!a,{disabled:c,title:f,style:h,className:p,prefix:g,iconSize:C,isLoading:v,LeftIcon:d,value:D=null,defaultValue:B="",onFocus:w,onBlur:O,Spinner:b,name:E,placeholder:S,onSelect:F,options:V,optionMaxHeight:P,closeOnSelect:z,...R}=T0({...t,id:i,isError:u},e),[j,I]=l.useState(B);function N(){c||!(s!=null&&s.current)||e||(n(!0),s.current.focus())}function X(H){e||(n(!0),w&&w(H))}function _(){n(!1),O&&s.current&&s.current.blur()}function $(H){const{label:Q,value:K}=H;I(j!==K?K:""),F&&F({label:Q,value:K}),z&&_()}const re=typeof D=="string"?D:j,k=((Z=V.find(H=>H.value===re))==null?void 0:Z.label)||"",T=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return x.jsxs(x.Fragment,{children:[x.jsxs("section",{title:f,style:h,onClick:N,className:`${p} placeholder_dark_${T()}`,children:[g,d&&x.jsx(d,{size:C,strokeWidth:2.5}),x.jsx("input",{disabled:c,readOnly:!0,placeholder:k||S,onFocus:X,...R}),x.jsx("input",{type:"hidden",ref:s,name:E,value:re||"",readOnly:!0}),e&&x.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[V.map(({label:H,value:Q})=>x.jsxs("div",{onClick:()=>$({label:H,value:Q}),className:re===Q?"arkyn_select_option active":"arkyn_select_option",children:[H," ",x.jsx(Se.Check,{})]},Q)),V.length<=0&&x.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&x.jsx(Se.ChevronDown,{className:"arkyn_select_arrow",size:C,strokeWidth:2.5}),v&&b]}),e&&x.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function I0(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:a="",name:o,className:s="",onCheck:u,...c}=t,[f,h]=l.useState(n),{id:p,inputRef:g}=Ct(),C=typeof r=="boolean"?r:f;function v(){h(!f),u&&u(C?a:i||"checked")}const D=`arkynSwitch ${C?"checkedTrue":"checkedFalse"} ${e} ${s}`;return x.jsx("button",{type:"button",onClick:v,className:D,...c,children:x.jsx("input",{id:p,type:"hidden",name:o,ref:g,onClick:v,value:C?i||"checked":a})})}function j0(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:a=!1,onFocus:o,onBlur:s,title:u,style:c,...f}=t,[h,p]=l.useState(!1),{inputRef:g,id:C,error:v}=Ct(),d=l.useRef(null),D=g||d,w=t.isError||!!v?"errorTrue":"errorFalse",E=`arkynTextarea ${e} ${n} ${i||a?"opacityTrue":"opacityFalse"} ${w} ${h?"focusedTrue":"focusedFalse"} ${r}`;function S(){i||!(D!=null&&D.current)||(p(!0),D.current.focus())}function F(P){p(!0),o&&o(P)}function V(P){p(!1),s&&s(P)}return x.jsx("section",{title:u,style:c,onClick:S,className:E,children:x.jsx("textarea",{id:C,disabled:i,readOnly:a,ref:D,onFocus:F,onBlur:V,...f})})}function N0(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function z0(t){const{pathname:e}=Dn.useLocation(),{className:n="",disabled:r=!1,children:i,to:a,...o}=t,u=`arkynBreadcrumbLink ${e===a?"active":"inactive"} ${n}`;return r?x.jsxs("p",{className:u,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]}):x.jsxs(Dn.Link,{to:a,className:u,...o,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function bl(t=""){const e=Dn.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=a=>{Object.entries(a).forEach(([o,s])=>{s===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(s))})};return{getParam:a=>n.get(`${r}${a}`),getScopedSearch:a=>{i(a);let o=n.toString();return o&&(o="?"+o),o}}}function _0(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:a=2,...o}=t,s=Dn.useNavigate(),{getParam:u,getScopedSearch:c}=bl(e),f=Number(u(i))||1,h=Number(u(r))||20,p=Math.ceil(n/h),g=Ic(f,a),C=Rc(f,a,p);function v(d){s(c({page:d}))}return x.jsxs("div",{className:"arkynPagination",...o,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>v(f-1),children:x.jsx(Se.ChevronLeft,{})}),f>1+a&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),f>2+a&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})})]}),g.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),x.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),C.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),f+a<p&&x.jsxs(x.Fragment,{children:[f+1+a<p&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})}),x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(p),children:p})]}),x.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=p,onClick:()=>v(f+1),children:x.jsx(Se.ChevronRight,{})})]})}const fa=l.createContext({});function W0(){if(!fa)throw new Error("useTabContext must be used within a TabProvider");return l.useContext(fa)}function U0(t){const{children:e,onClick:n,defaultActive:r,className:i,...a}=t,[o,s]=l.useState(r||""),[u,c]=l.useState(!0),f=l.useRef(null),h=`arkynTabContainer ${i||""}`,[p,g]=l.useState({width:"0px",left:"0px",transition:"none"}),C=(d,D)=>{const B=d.getBoundingClientRect(),w=f.current.getBoundingClientRect(),O=D?void 0:"none";c(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-w.left}px`})};l.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.active"),D&&C(D)},[]);const v=d=>{const D=d.target;D&&(s(D.value),D.classList.add("active"),C(D,!0),n&&n(D.value))};return x.jsxs("nav",{ref:f,className:h.trim(),...a,children:[x.jsx(fa.Provider,{value:{handleTabClick:v,showInitialTab:u,value:o},children:e}),x.jsx("div",{className:"activeLine",style:p})]})}function H0(t){const{children:e,className:n="",onClick:r,...i}=t,{value:a,showInitialTab:o,handleTabClick:s}=W0(),u=a===i.value&&a?"activeTrue":"activeFalse",f=`arkynTabButton ${a===i.value&&o?"showBorderBottom":""} ${u} ${n}`;function h(p){s(p),r&&r(p)}return x.jsx("button",{onClick:h,className:f.trim(),...i,children:e})}const El=l.createContext({});function V0(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:a,...o}=t,s=r==="left"?"-100%":"100%",c=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${a}`;return x.jsx(El.Provider,{value:{makeInvisible:n},children:x.jsx(nn.AnimatePresence,{children:e&&x.jsxs("aside",{className:c.trim(),...o,children:[x.jsx(nn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(nn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${s})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${s})`},children:i})]})})})}function q0(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=l.useContext(El),o=`arkynDrawerHeader ${n}`;return x.jsxs("header",{className:o.trim(),...i,children:[r,e&&x.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:a,"aria-label":"Close drawer",children:x.jsx(Se.X,{size:24})})]})}const wl=l.createContext({});function Z0(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...a}=t,s=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(wl.Provider,{value:{makeInvisible:n},children:x.jsx(nn.AnimatePresence,{children:e&&x.jsxs("aside",{className:s.trim(),...a,children:[x.jsx(nn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(nn.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function G0(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function Y0(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=l.useContext(wl),o=`arkynModalHeader ${n}`;return x.jsxs("header",{className:o.trim(),...i,children:[r,e&&x.jsx("button",{type:"button",onClick:a,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:x.jsx(Se.X,{size:24})})]})}function K0(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[a,o]=l.useState(!1),u=`arkynPopover ${i} ${a?"visibleTrue":"visibleFalse"}`;function c(){a||o(!0)}return x.jsxs("div",{className:u,onClick:c,children:[n,x.jsx(nn.motion.div,{style:{visibility:a?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:a?1:0},exit:{opacity:0},onClick:()=>r&&o(!1),className:"arkynPopoverContent",children:e}),a&&x.jsx("div",{onClick:()=>o(!1),className:"arkynPopoverOverlay"})]})}function Bl(t){const{message:e,title:n,type:r,size:i="lg"}=t,a=`arkynToast ${r} ${i}`;function o(){switch(r){case"info":return x.jsx(Se.Info,{});case"success":return x.jsx(Se.CheckCircle2,{});case"danger":return x.jsx(Se.XCircle,{});case"warning":return x.jsx(Se.AlertCircle,{});default:return x.jsx(Se.Info,{})}}return x.jsxs("aside",{className:a,children:[x.jsxs("div",{children:[x.jsx("div",{className:"bg"}),x.jsx(o,{})]}),x.jsxs("p",{children:[x.jsx("strong",{title:n,children:n}),x.jsx("span",{children:e})]})]})}function X0(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:a="",...o}=t,s=`arkynTooltip ${n} ${i} ${a}`;return x.jsxs("div",{className:s.trim(),...o,children:[r,x.jsx("div",{className:"arkynTooltipText",children:e})]})}var et={},da={},er={},tr={},xl="Expected a function",Ll=NaN,J0="[object Symbol]",Q0=/^\s+|\s+$/g,$0=/^[-+]0x[0-9a-f]+$/i,ey=/^0b[01]+$/i,ty=/^0o[0-7]+$/i,ny=parseInt,ry=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,iy=typeof self=="object"&&self&&self.Object===Object&&self,ay=ry||iy||Function("return this")(),oy=Object.prototype,sy=oy.toString,uy=Math.max,ly=Math.min,pa=function(){return ay.Date.now()};function cy(t,e,n){var r,i,a,o,s,u,c=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(xl);e=Sl(e)||0,Wr(n)&&(f=!!n.leading,h="maxWait"in n,a=h?uy(Sl(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(E){var S=r,F=i;return r=i=void 0,c=E,o=t.apply(F,S),o}function C(E){return c=E,s=setTimeout(D,e),f?g(E):o}function v(E){var S=E-u,F=E-c,V=e-S;return h?ly(V,a-F):V}function d(E){var S=E-u,F=E-c;return u===void 0||S>=e||S<0||h&&F>=a}function D(){var E=pa();if(d(E))return B(E);s=setTimeout(D,v(E))}function B(E){return s=void 0,p&&r?g(E):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),c=0,r=u=i=s=void 0}function O(){return s===void 0?o:B(pa())}function b(){var E=pa(),S=d(E);if(r=arguments,i=this,u=E,S){if(s===void 0)return C(u);if(h)return s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=w,b.flush=O,b}function fy(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(xl);return Wr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),cy(t,e,{leading:r,maxWait:e,trailing:i})}function Wr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function dy(t){return!!t&&typeof t=="object"}function py(t){return typeof t=="symbol"||dy(t)&&sy.call(t)==J0}function Sl(t){if(typeof t=="number")return t;if(py(t))return Ll;if(Wr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Wr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Q0,"");var n=ey.test(t);return n||ty.test(t)?ny(t.slice(2),n?2:8):$0.test(t)?Ll:+t}var hy=fy,nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),Ur.has(n)||Ur.set(n,new Set);var a=Ur.get(n);if(!a.has(i)){var o=function(){var s=!1;try{var u=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,u)}catch{}return s}();e.addEventListener(n,r,o?{passive:!0}:!1),a.add(i)}},nr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),Ur.get(n).delete(r.name||n)};var Ur=new Map;Object.defineProperty(tr,"__esModule",{value:!0});var vy=hy,gy=yy(vy),my=nr;function yy(t){return t&&t.__esModule?t:{default:t}}var Cy=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,gy.default)(e,n)},Je={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=Cy(function(i){Je.scrollHandler(e)},n);Je.scrollSpyContainers.push(e),(0,my.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return Je.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=Je.scrollSpyContainers[Je.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r(Je.currentPositionX(e),Je.currentPositionY(e))})},addStateHandler:function(e){Je.spySetState.push(e)},addSpyHandler:function(e,n){var r=Je.scrollSpyContainers[Je.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e(Je.currentPositionX(n),Je.currentPositionY(n))},updateStates:function(){Je.spySetState.forEach(function(e){return e()})},unmount:function(e,n){Je.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Je.spySetState&&Je.spySetState.length&&Je.spySetState.indexOf(e)>-1&&Je.spySetState.splice(Je.spySetState.indexOf(e),1),document.removeEventListener("scroll",Je.scrollHandler)},update:function(){return Je.scrollSpyContainers.forEach(function(e){return Je.scrollHandler(e)})}};tr.default=Je;var On={},rr={};Object.defineProperty(rr,"__esModule",{value:!0});var Dy=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",a=window&&window.location,o=i?a.pathname+a.search+i:a.pathname+a.search;n?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},by=function(){return window.location.hash.replace(/^#/,"")},Ey=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},wy=function(e){return getComputedStyle(e).position!=="static"},ha=function(e,n){for(var r=e.offsetTop,i=e.offsetParent;i&&!n(i);)r+=i.offsetTop,i=i.offsetParent;return{offsetTop:r,offsetParent:i}},By=function(e,n,r){if(r)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(wy(e)){if(n.offsetParent!==e){var i=function(f){return f===e||f===document},a=ha(n,i),o=a.offsetTop,s=a.offsetParent;if(s!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return ha(n,u).offsetTop-ha(e,u).offsetTop};rr.default={updateHash:Dy,getHash:by,filterElementInContainer:Ey,scrollOffset:By};var Hr={},va={};Object.defineProperty(va,"__esModule",{value:!0}),va.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var ga={};Object.defineProperty(ga,"__esModule",{value:!0});var xy=nr,Ly=["mousedown","mousewheel","touchmove","keydown"];ga.default={subscribe:function(e){return typeof document<"u"&&Ly.forEach(function(n){return(0,xy.addPassiveEventListener)(document,n,e)})}};var ir={};Object.defineProperty(ir,"__esModule",{value:!0});var ma={registered:{},scrollEvent:{register:function(e,n){ma.registered[e]=n},remove:function(e){ma.registered[e]=null}}};ir.default=ma,Object.defineProperty(Hr,"__esModule",{value:!0});var Sy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ay=rr;Vr(Ay);var Oy=va,Al=Vr(Oy),Fy=ga,Py=Vr(Fy),My=ir,Mt=Vr(My);function Vr(t){return t&&t.__esModule?t:{default:t}}var Ol=function(e){return Al.default[e.smooth]||Al.default.defaultEasing},ky=function(e){return typeof e=="function"?e:function(){return e}},Ty=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},ya=function(){return Ty()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Fl=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},Pl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},Ml=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},Ry=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,i=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},Iy=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,i=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},jy=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=r),i.progress=r-i.start,i.percent=i.progress>=i.duration?1:e(i.progress/i.duration),i.currentPosition=i.startPosition+Math.ceil(i.delta*i.percent),i.containerElement&&i.containerElement!==document&&i.containerElement!==document.body?n.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:n.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var a=t.bind(null,e,n);ya.call(window,a);return}Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPosition)},Ca=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},ar=function(e,n,r,i){n.data=n.data||Fl(),window.clearTimeout(n.data.delayTimeout);var a=function(){n.data.cancel=!0};if(Py.default.subscribe(a),Ca(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Pl(n):Ml(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Mt.default.registered.end&&Mt.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=ky(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=r,n.data.target=i;var o=Ol(n),s=jy.bind(null,o,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),ya.call(window,s)},n.delay);return}Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),ya.call(window,s)},qr=function(e){return e=Sy({},e),e.data=e.data||Fl(),e.absolute=!0,e},Ny=function(e){ar(0,qr(e))},zy=function(e,n){ar(e,qr(n))},_y=function(e){e=qr(e),Ca(e),ar(e.horizontal?Ry(e):Iy(e),e)},Wy=function(e,n){n=qr(n),Ca(n);var r=n.horizontal?Pl(n):Ml(n);ar(e+r,n)};Hr.default={animateTopScroll:ar,getAnimationType:Ol,scrollToTop:Ny,scrollToBottom:_y,scrollTo:zy,scrollMore:Wy},Object.defineProperty(On,"__esModule",{value:!0});var Uy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Hy=rr,Vy=Da(Hy),qy=Hr,Zy=Da(qy),Gy=ir,Zr=Da(Gy);function Da(t){return t&&t.__esModule?t:{default:t}}var Gr={},kl=void 0;On.default={unmount:function(){Gr={}},register:function(e,n){Gr[e]=n},unregister:function(e){delete Gr[e]},get:function(e){return Gr[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return kl=e},getActiveLink:function(){return kl},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=Uy({},n,{absolute:!1});var i=n.containerId,a=n.container,o=void 0;i?o=document.getElementById(i):a&&a.nodeType?o=a:o=document,n.absolute=!0;var s=n.horizontal,u=Vy.default.scrollOffset(o,r,s)+(n.offset||0);if(!n.smooth){Zr.default.registered.begin&&Zr.default.registered.begin(e,r),o===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):o.scrollTop=u,Zr.default.registered.end&&Zr.default.registered.end(e,r);return}Zy.default.animateTopScroll(u,n,e,r)}};var ba={exports:{}},Yr={exports:{}},We={};/** @license React v16.13.1
|
72
87
|
* react-is.production.min.js
|
73
88
|
*
|
74
89
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
75
90
|
*
|
76
91
|
* This source code is licensed under the MIT license found in the
|
77
92
|
* LICENSE file in the root directory of this source tree.
|
78
|
-
*/var
|
93
|
+
*/var Tl;function Yy(){if(Tl)return We;Tl=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case e:switch(b=b.type,b){case u:case c:case r:case a:case i:case h:return b;default:switch(b=b&&b.$$typeof,b){case s:case f:case C:case g:case o:return b;default:return E}}case n:return E}}}function O(b){return w(b)===c}return We.AsyncMode=u,We.ConcurrentMode=c,We.ContextConsumer=s,We.ContextProvider=o,We.Element=e,We.ForwardRef=f,We.Fragment=r,We.Lazy=C,We.Memo=g,We.Portal=n,We.Profiler=a,We.StrictMode=i,We.Suspense=h,We.isAsyncMode=function(b){return O(b)||w(b)===u},We.isConcurrentMode=O,We.isContextConsumer=function(b){return w(b)===s},We.isContextProvider=function(b){return w(b)===o},We.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},We.isForwardRef=function(b){return w(b)===f},We.isFragment=function(b){return w(b)===r},We.isLazy=function(b){return w(b)===C},We.isMemo=function(b){return w(b)===g},We.isPortal=function(b){return w(b)===n},We.isProfiler=function(b){return w(b)===a},We.isStrictMode=function(b){return w(b)===i},We.isSuspense=function(b){return w(b)===h},We.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===c||b===a||b===i||b===h||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===C||b.$$typeof===g||b.$$typeof===o||b.$$typeof===s||b.$$typeof===f||b.$$typeof===d||b.$$typeof===D||b.$$typeof===B||b.$$typeof===v)},We.typeOf=w,We}var Ue={};/** @license React v16.13.1
|
79
94
|
* react-is.development.js
|
80
95
|
*
|
81
96
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
82
97
|
*
|
83
98
|
* This source code is licensed under the MIT license found in the
|
84
99
|
* LICENSE file in the root directory of this source tree.
|
85
|
-
*/var
|
100
|
+
*/var Rl;function Ky(){return Rl||(Rl=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function w(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===a||G===i||G===h||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===C||G.$$typeof===g||G.$$typeof===o||G.$$typeof===s||G.$$typeof===f||G.$$typeof===d||G.$$typeof===D||G.$$typeof===B||G.$$typeof===v)}function O(G){if(typeof G=="object"&&G!==null){var ue=G.$$typeof;switch(ue){case e:var ae=G.type;switch(ae){case u:case c:case r:case a:case i:case h:return ae;default:var de=ae&&ae.$$typeof;switch(de){case s:case f:case C:case g:case o:return de;default:return ue}}case n:return ue}}}var b=u,E=c,S=s,F=o,V=e,P=f,z=r,R=C,j=g,I=n,N=a,X=i,_=h,$=!1;function re(G){return $||($=!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.")),k(G)||O(G)===u}function k(G){return O(G)===c}function T(G){return O(G)===s}function Z(G){return O(G)===o}function H(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function Q(G){return O(G)===f}function K(G){return O(G)===r}function y(G){return O(G)===C}function U(G){return O(G)===g}function W(G){return O(G)===n}function M(G){return O(G)===a}function J(G){return O(G)===i}function ne(G){return O(G)===h}Ue.AsyncMode=b,Ue.ConcurrentMode=E,Ue.ContextConsumer=S,Ue.ContextProvider=F,Ue.Element=V,Ue.ForwardRef=P,Ue.Fragment=z,Ue.Lazy=R,Ue.Memo=j,Ue.Portal=I,Ue.Profiler=N,Ue.StrictMode=X,Ue.Suspense=_,Ue.isAsyncMode=re,Ue.isConcurrentMode=k,Ue.isContextConsumer=T,Ue.isContextProvider=Z,Ue.isElement=H,Ue.isForwardRef=Q,Ue.isFragment=K,Ue.isLazy=y,Ue.isMemo=U,Ue.isPortal=W,Ue.isProfiler=M,Ue.isStrictMode=J,Ue.isSuspense=ne,Ue.isValidElementType=w,Ue.typeOf=O}()),Ue}var Il;function jl(){return Il||(Il=1,process.env.NODE_ENV==="production"?Yr.exports=Yy():Yr.exports=Ky()),Yr.exports}/*
|
86
101
|
object-assign
|
87
102
|
(c) Sindre Sorhus
|
88
103
|
@license MIT
|
89
|
-
*/var
|
90
|
-
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var j=oe(q,Y,B,G,L+"."+Y,n);if(j)return j}return null}return C(k)}function F(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(F);if(M===null||l(M))return!0;var k=p(M);if(k){var D=k.call(M),_;if(k!==M.entries){for(;!(_=D.next()).done;)if(!F(_.value))return!1}else for(;!(_=D.next()).done;){var B=_.value;if(B&&!F(B[1]))return!1}}else return!1;return!0;default:return!1}}function V(M,k){return M==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function H(M){var k=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":V(k,M)?"symbol":k}function $(M){if(typeof M>"u"||M===null)return""+M;var k=H(M);if(k==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return k}function W(M){var k=$(M);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function Q(M){return!M.constructor||!M.constructor.name?d:M.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},qn}var Kn,Yr;function ou(){if(Yr)return Kn;Yr=1;var t=Zn();function e(){}function n(){}return n.resetWarningCache=e,Kn=function(){function o(a,l,u,c,f,p){if(p!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}o.isRequired=o;function r(){return o}var s={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Kn}if(process.env.NODE_ENV!=="production"){var ru=Ur(),iu=!0;Hn.exports=nu()(ru.isElement,iu)}else Hn.exports=ou()();var an=Hn.exports,ln={};Object.defineProperty(ln,"__esModule",{value:!0});var su=$t,Xn=au(su);function au(t){return t&&t.__esModule?t:{default:t}}var lu={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var o=this.scroller,r=o.get(e);if(r&&(n||e!==o.getActiveLink())){var s=this.containers[e]||document;o.scrollTo(e,{container:s})}},getHash:function(){return Xn.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Xn.default.getHash()!==e&&Xn.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};ln.default=lu,Object.defineProperty(jt,"__esModule",{value:!0});var un=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},uu=function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),cu=i,qr=Ut(cu),du=Nt,cn=Ut(du),fu=xt,pu=Ut(fu),hu=an,Oe=Ut(hu),gu=ln,ut=Ut(gu);function Ut(t){return t&&t.__esModule?t:{default:t}}function mu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function yu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Kr={to:Oe.default.string.isRequired,containerId:Oe.default.string,container:Oe.default.object,activeClass:Oe.default.string,activeStyle:Oe.default.object,spy:Oe.default.bool,horizontal:Oe.default.bool,smooth:Oe.default.oneOfType([Oe.default.bool,Oe.default.string]),offset:Oe.default.number,delay:Oe.default.number,isDynamic:Oe.default.bool,onClick:Oe.default.func,duration:Oe.default.oneOfType([Oe.default.number,Oe.default.func]),absolute:Oe.default.bool,onSetActive:Oe.default.func,onSetInactive:Oe.default.func,ignoreCancelEvents:Oe.default.bool,hashSpy:Oe.default.bool,saveHashHistory:Oe.default.bool,spyThrottle:Oe.default.number};jt.default=function(t,e){var n=e||pu.default,o=function(s){yu(a,s);function a(l){mu(this,a);var u=vu(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,l));return r.call(u),u.state={active:!1},u}return uu(a,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,c=this.props.container;return u&&!c?document.getElementById(u):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();cn.default.isMounted(u)||cn.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(ut.default.isMounted()||ut.default.mount(n),ut.default.mapContainer(this.props.to,u)),cn.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){cn.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var c={};this.state&&this.state.active?c=un({},this.props.style,this.props.activeStyle):c=un({},this.props.style);var f=un({},this.props);for(var p in Kr)f.hasOwnProperty(p)&&delete f[p];return f.className=u,f.style=c,f.onClick=this.handleClick,qr.default.createElement(t,f)}}]),a}(qr.default.PureComponent),r=function(){var a=this;this.scrollTo=function(l,u){n.scrollTo(l,un({},a.state,u))},this.handleClick=function(l){a.props.onClick&&a.props.onClick(l),l.stopPropagation&&l.stopPropagation(),l.preventDefault&&l.preventDefault(),a.scrollTo(a.props.to,a.props)},this.spyHandler=function(l,u){var c=a.getScrollSpyContainer();if(!(ut.default.isMounted()&&!ut.default.isInitialized())){var f=a.props.horizontal,p=a.props.to,d=null,h=void 0,E=void 0;if(f){var m=0,C=0,x=0;if(c.getBoundingClientRect){var P=c.getBoundingClientRect();x=P.left}if(!d||a.props.isDynamic){if(d=n.get(p),!d)return;var w=d.getBoundingClientRect();m=w.left-x+l,C=m+w.width}var I=l-a.props.offset;h=I>=Math.floor(m)&&I<Math.floor(C),E=I<Math.floor(m)||I>=Math.floor(C)}else{var v=0,b=0,S=0;if(c.getBoundingClientRect){var T=c.getBoundingClientRect();S=T.top}if(!d||a.props.isDynamic){if(d=n.get(p),!d)return;var U=d.getBoundingClientRect();v=U.top-S+u,b=v+U.height}var O=u-a.props.offset;h=O>=Math.floor(v)&&O<Math.floor(b),E=O<Math.floor(v)||O>=Math.floor(b)}var z=n.getActiveLink();if(E){if(p===z&&n.setActiveLink(void 0),a.props.hashSpy&&ut.default.getHash()===p){var X=a.props.saveHashHistory,A=X===void 0?!1:X;ut.default.changeHash("",A)}a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive(p,d))}if(h&&(z!==p||a.state.active===!1)){n.setActiveLink(p);var F=a.props.saveHashHistory,V=F===void 0?!1:F;a.props.hashSpy&&ut.default.changeHash(p,V),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(p,d))}}}};return o.propTypes=Kr,o.defaultProps={offset:0},o},Object.defineProperty(Dn,"__esModule",{value:!0});var bu=i,Xr=Jr(bu),Lu=jt,Cu=Jr(Lu);function Jr(t){return t&&t.__esModule?t:{default:t}}function xu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Eu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wu=function(t){Eu(e,t);function e(){var n,o,r,s;xu(this,e);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return s=(o=(r=Qr(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(l))),r),r.render=function(){return Xr.default.createElement("a",r.props,r.props.children)},o),Qr(r,s)}return e}(Xr.default.Component);Dn.default=(0,Cu.default)(wu);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});var Su=function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),ku=i,ei=ti(ku),Mu=jt,Pu=ti(Mu);function ti(t){return t&&t.__esModule?t:{default:t}}function Tu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ou(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Iu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _u=function(t){Iu(e,t);function e(){return Tu(this,e),Ou(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Su(e,[{key:"render",value:function(){return ei.default.createElement("button",this.props,this.props.children)}}]),e}(ei.default.Component);Jn.default=(0,Pu.default)(_u);var Qn={},dn={};Object.defineProperty(dn,"__esModule",{value:!0});var Ru=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Du=function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),ju=i,ni=fn(ju),Nu=pt;fn(Nu);var Bu=xt,oi=fn(Bu),$u=an,ri=fn($u);function fn(t){return t&&t.__esModule?t:{default:t}}function Au(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Uu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}dn.default=function(t){var e=function(n){Uu(o,n);function o(r){Au(this,o);var s=zu(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,r));return s.childBindings={domNode:null},s}return Du(o,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(s){this.props.name!==s.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;oi.default.unregister(this.props.name)}},{key:"registerElems",value:function(s){oi.default.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return ni.default.createElement(t,Ru({},this.props,{parentBindings:this.childBindings}))}}]),o}(ni.default.Component);return e.propTypes={name:ri.default.string,id:ri.default.string},e},Object.defineProperty(Qn,"__esModule",{value:!0});var ii=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Fu=function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),Hu=i,si=eo(Hu),Wu=dn,Vu=eo(Wu),Zu=an,ai=eo(Zu);function eo(t){return t&&t.__esModule?t:{default:t}}function Gu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function qu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var li=function(t){qu(e,t);function e(){return Gu(this,e),Yu(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Fu(e,[{key:"render",value:function(){var o=this,r=ii({},this.props);return delete r.name,r.parentBindings&&delete r.parentBindings,si.default.createElement("div",ii({},r,{ref:function(a){o.props.parentBindings.domNode=a}}),this.props.children)}}]),e}(si.default.Component);li.propTypes={name:ai.default.string,id:ai.default.string},Qn.default=(0,Vu.default)(li);var to=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ui=function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();function ci(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function di(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fi(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var pn=i,vt=Nt,no=xt,Re=an,ct=ln,pi={to:Re.string.isRequired,containerId:Re.string,container:Re.object,activeClass:Re.string,spy:Re.bool,smooth:Re.oneOfType([Re.bool,Re.string]),offset:Re.number,delay:Re.number,isDynamic:Re.bool,onClick:Re.func,duration:Re.oneOfType([Re.number,Re.func]),absolute:Re.bool,onSetActive:Re.func,onSetInactive:Re.func,ignoreCancelEvents:Re.bool,hashSpy:Re.bool,spyThrottle:Re.number},Ku={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var o=n||no,r=function(a){fi(l,a);function l(u){ci(this,l);var c=di(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,u));return s.call(c),c.state={active:!1},c}return ui(l,[{key:"getScrollSpyContainer",value:function(){var c=this.props.containerId,f=this.props.container;return c?document.getElementById(c):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var c=this.getScrollSpyContainer();vt.isMounted(c)||vt.mount(c,this.props.spyThrottle),this.props.hashSpy&&(ct.isMounted()||ct.mount(o),ct.mapContainer(this.props.to,c)),this.props.spy&&vt.addStateHandler(this.stateHandler),vt.addSpyHandler(this.spyHandler,c),this.setState({container:c})}}},{key:"componentWillUnmount",value:function(){vt.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var c="";this.state&&this.state.active?c=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():c=this.props.className;var f=to({},this.props);for(var p in pi)f.hasOwnProperty(p)&&delete f[p];return f.className=c,f.onClick=this.handleClick,pn.createElement(e,f)}}]),l}(pn.Component),s=function(){var l=this;this.scrollTo=function(u,c){o.scrollTo(u,to({},l.state,c))},this.handleClick=function(u){l.props.onClick&&l.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),l.scrollTo(l.props.to,l.props)},this.stateHandler=function(){o.getActiveLink()!==l.props.to&&(l.state!==null&&l.state.active&&l.props.onSetInactive&&l.props.onSetInactive(),l.setState({active:!1}))},this.spyHandler=function(u){var c=l.getScrollSpyContainer();if(!(ct.isMounted()&&!ct.isInitialized())){var f=l.props.to,p=null,d=0,h=0,E=0;if(c.getBoundingClientRect){var m=c.getBoundingClientRect();E=m.top}if(!p||l.props.isDynamic){if(p=o.get(f),!p)return;var C=p.getBoundingClientRect();d=C.top-E+u,h=d+C.height}var x=u-l.props.offset,P=x>=Math.floor(d)&&x<Math.floor(h),w=x<Math.floor(d)||x>=Math.floor(h),I=o.getActiveLink();if(w)return f===I&&o.setActiveLink(void 0),l.props.hashSpy&&ct.getHash()===f&&ct.changeHash(),l.props.spy&&l.state.active&&(l.setState({active:!1}),l.props.onSetInactive&&l.props.onSetInactive()),vt.updateStates();if(P&&I!==f)return o.setActiveLink(f),l.props.hashSpy&&ct.changeHash(f),l.props.spy&&(l.setState({active:!0}),l.props.onSetActive&&l.props.onSetActive(f)),vt.updateStates()}}};return r.propTypes=pi,r.defaultProps={offset:0},r},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(o){fi(r,o);function r(s){ci(this,r);var a=di(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,s));return a.childBindings={domNode:null},a}return ui(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;no.unregister(this.props.name)}},{key:"registerElems",value:function(a){no.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return pn.createElement(e,to({},this.props,{parentBindings:this.childBindings}))}}]),r}(pn.Component);return n.propTypes={name:Re.string,id:Re.string},n}},Xu=Ku;Object.defineProperty(je,"__esModule",{value:!0}),je.Helpers=je.ScrollElement=je.ScrollLink=wi=je.animateScroll=je.scrollSpy=je.Events=je.scroller=je.Element=je.Button=je.Link=void 0;var Ju=Dn,hi=et(Ju),Qu=Jn,gi=et(Qu),ec=Qn,mi=et(ec),tc=xt,vi=et(tc),nc=At,yi=et(nc),oc=Nt,bi=et(oc),rc=en,Li=et(rc),ic=jt,Ci=et(ic),sc=dn,xi=et(sc),ac=Xu,Ei=et(ac);function et(t){return t&&t.__esModule?t:{default:t}}je.Link=hi.default,je.Button=gi.default,je.Element=mi.default,je.scroller=vi.default,je.Events=yi.default,je.scrollSpy=bi.default;var wi=je.animateScroll=Li.default;je.ScrollLink=Ci.default,je.ScrollElement=xi.default,je.Helpers=Ei.default,je.default={Link:hi.default,Button:gi.default,Element:mi.default,scroller:vi.default,Events:yi.default,scrollSpy:bi.default,animateScroll:Li.default,ScrollLink:Ci.default,ScrollElement:xi.default,Helpers:Ei.default};const oo=i.createContext({}),Si=i.createContext({});function ki(){const t=i.useContext(Si);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function Mi(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="info"||t.type==="success"||t.type==="danger"||t.type==="warning")}function lc(){const t=Ct.useActionData(),{closeModal:e}=i.useContext(oo),{showToast:n}=ki();i.useEffect(()=>{const o=t==null?void 0:t.closeModalKey;o&&e(o)},[t]),i.useEffect(()=>{const o=t==null?void 0:t.toast,r=t==null?void 0:t.message;Mi(o)&&n(o),!Mi(o)&&r&&n({message:r,title:"Atenção!",type:"warning"})},[t]),i.useEffect(()=>{var o,r;if(typeof((o=t==null?void 0:t.data)==null?void 0:o.scrollTo)=="string"){const s=document.getElementById((r=t==null?void 0:t.data)==null?void 0:r.scrollTo);s&&wi.scrollTo(s.offsetTop-200)}},[t])}const Pi=i.createContext({});function uc(t){const e=i.useContext(Pi);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:o,openDrawer:r,closeDrawer:s}=e,a=o(t),l=n(t);return{drawerIsOpen:a,drawerData:l,openDrawer:f=>r(t,f),closeDrawer:()=>s(t)}}else return e}function cc(t){const e=i.useContext(oo);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:o,openModal:r,closeModal:s}=e,a=o(t),l=n(t);return{modalIsOpen:a,modalData:l,openModal:f=>r(t,f),closeModal:()=>s(t)}}else return e}function dc({googleMapsApiKey:t,children:e,...n}){return y.jsx(rs,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function fc(t){const{children:e=!1}=t,[n,o]=i.useState([]);function r(u){return!!n.some(c=>c.key===u)}function s(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function a(u,c){const f=r(u);o(f?p=>[...p.filter(h=>h.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function l(u){o(n.filter(c=>c.key!==u))}return y.jsx(Pi.Provider,{value:{drawerIsOpen:r,drawerData:s,openDrawer:a,closeDrawer:l},children:e})}function pc(t){const{children:e=!1}=t,[n,o]=i.useState([]);function r(u){return!!n.some(c=>c.key===u)}function s(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function a(u,c){const f=r(u);o(f?p=>[...p.filter(h=>h.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function l(u){o(n.filter(c=>c.key!==u))}return y.jsx(oo.Provider,{value:{modalIsOpen:r,modalData:s,openModal:a,closeModal:l},children:e})}var hc=t=>{switch(t){case"success":return vc;case"info":return bc;case"warning":return yc;case"error":return Lc;default:return null}},gc=Array(12).fill(0),mc=({visible:t})=>i.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},i.createElement("div",{className:"sonner-spinner"},gc.map((e,n)=>i.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),vc=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),yc=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),bc=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Lc=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Cc=()=>{let[t,e]=i.useState(document.hidden);return i.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},ro=1,xc=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...o}=t,r=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:ro++,s=this.toasts.find(l=>l.id===r),a=t.dismissible===void 0?!0:t.dismissible;return s?this.toasts=this.toasts.map(l=>l.id===r?(this.publish({...l,...t,id:r,title:n}),{...l,...t,id:r,dismissible:a,title:n}):l):this.addToast({title:n,...o,dismissible:a,id:r}),r},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let o=t instanceof Promise?t:t(),r=n!==void 0;return o.then(async s=>{if(wc(s)&&!s.ok){r=!1;let a=typeof e.error=="function"?await e.error(`HTTP error! status: ${s.status}`):e.error,l=typeof e.description=="function"?await e.description(`HTTP error! status: ${s.status}`):e.description;this.create({id:n,type:"error",message:a,description:l})}else if(e.success!==void 0){r=!1;let a=typeof e.success=="function"?await e.success(s):e.success,l=typeof e.description=="function"?await e.description(s):e.description;this.create({id:n,type:"success",message:a,description:l})}}).catch(async s=>{if(e.error!==void 0){r=!1;let a=typeof e.error=="function"?await e.error(s):e.error,l=typeof e.description=="function"?await e.description(s):e.description;this.create({id:n,type:"error",message:a,description:l})}}).finally(()=>{var s;r&&(this.dismiss(n),n=void 0),(s=e.finally)==null||s.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||ro++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},Ge=new xc,Ec=(t,e)=>{let n=(e==null?void 0:e.id)||ro++;return Ge.addToast({title:t,...e,id:n}),n},wc=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Sc=Ec,kc=()=>Ge.toasts,Mc=Object.assign(Sc,{success:Ge.success,info:Ge.info,warning:Ge.warning,error:Ge.error,custom:Ge.custom,message:Ge.message,promise:Ge.promise,dismiss:Ge.dismiss,loading:Ge.loading},{getHistory:kc});function Pc(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}Pc(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
91
|
-
`);function hn(t){return t.label!==void 0}var Tc=3,Oc="32px",Ic=4e3,_c=356,Rc=14,Dc=20,jc=200;function Nc(...t){return t.filter(Boolean).join(" ")}var Bc=t=>{var e,n,o,r,s,a,l,u,c,f;let{invert:p,toast:d,unstyled:h,interacting:E,setHeights:m,visibleToasts:C,heights:x,index:P,toasts:w,expanded:I,removeToast:v,defaultRichColors:b,closeButton:S,style:T,cancelButtonStyle:U,actionButtonStyle:O,className:z="",descriptionClassName:X="",duration:A,position:F,gap:V,loadingIcon:H,expandByDefault:$,classNames:W,icons:Q,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:k,cn:D}=t,[_,B]=i.useState(!1),[G,L]=i.useState(!1),[q,K]=i.useState(!1),[R,Y]=i.useState(!1),[oe,j]=i.useState(0),[ce,Ce]=i.useState(0),me=i.useRef(null),he=i.useRef(null),Te=P===0,Me=P+1<=C,le=d.type,re=d.dismissible!==!1,Ne=d.className||"",ae=d.descriptionClassName||"",Ae=i.useMemo(()=>x.findIndex(ie=>ie.toastId===d.id)||0,[x,d.id]),te=i.useMemo(()=>{var ie;return(ie=d.closeButton)!=null?ie:S},[d.closeButton,S]),We=i.useMemo(()=>d.duration||A||Ic,[d.duration,A]),Xe=i.useRef(0),Be=i.useRef(0),tt=i.useRef(0),ve=i.useRef(null),[nt,dt]=F.split("-"),yt=i.useMemo(()=>x.reduce((ie,ye,xe)=>xe>=Ae?ie:ie+ye.height,0),[x,Ae]),ot=Cc(),Et=d.invert||p,ft=le==="loading";Be.current=i.useMemo(()=>Ae*V+yt,[Ae,yt]),i.useEffect(()=>{B(!0)},[]),i.useLayoutEffect(()=>{if(!_)return;let ie=he.current,ye=ie.style.height;ie.style.height="auto";let xe=ie.getBoundingClientRect().height;ie.style.height=ye,Ce(xe),m(ze=>ze.find(He=>He.toastId===d.id)?ze.map(He=>He.toastId===d.id?{...He,height:xe}:He):[{toastId:d.id,height:xe,position:d.position},...ze])},[_,d.title,d.description,m,d.id]);let Ye=i.useCallback(()=>{L(!0),j(Be.current),m(ie=>ie.filter(ye=>ye.toastId!==d.id)),setTimeout(()=>{v(d)},jc)},[d,v,m,Be]);i.useEffect(()=>{if(d.promise&&le==="loading"||d.duration===1/0||d.type==="loading")return;let ie,ye=We;return I||E||k&&ot?(()=>{if(tt.current<Xe.current){let xe=new Date().getTime()-Xe.current;ye=ye-xe}tt.current=new Date().getTime()})():ye!==1/0&&(Xe.current=new Date().getTime(),ie=setTimeout(()=>{var xe;(xe=d.onAutoClose)==null||xe.call(d,d),Ye()},ye)),()=>clearTimeout(ie)},[I,E,$,d,We,Ye,d.promise,le,k,ot]),i.useEffect(()=>{let ie=he.current;if(ie){let ye=ie.getBoundingClientRect().height;return Ce(ye),m(xe=>[{toastId:d.id,height:ye,position:d.position},...xe]),()=>m(xe=>xe.filter(ze=>ze.toastId!==d.id))}},[m,d.id]),i.useEffect(()=>{d.delete&&Ye()},[Ye,d.delete]);function wt(){return Q!=null&&Q.loading?i.createElement("div",{className:"sonner-loader","data-visible":le==="loading"},Q.loading):H?i.createElement("div",{className:"sonner-loader","data-visible":le==="loading"},H):i.createElement(mc,{visible:le==="loading"})}return i.createElement("li",{"aria-live":d.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:he,className:D(z,Ne,W==null?void 0:W.toast,(e=d==null?void 0:d.classNames)==null?void 0:e.toast,W==null?void 0:W.default,W==null?void 0:W[le],(n=d==null?void 0:d.classNames)==null?void 0:n[le]),"data-sonner-toast":"","data-rich-colors":(o=d.richColors)!=null?o:b,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":_,"data-promise":!!d.promise,"data-removed":G,"data-visible":Me,"data-y-position":nt,"data-x-position":dt,"data-index":P,"data-front":Te,"data-swiping":q,"data-dismissible":re,"data-type":le,"data-invert":Et,"data-swipe-out":R,"data-expanded":!!(I||$&&_),style:{"--index":P,"--toasts-before":P,"--z-index":w.length-P,"--offset":`${G?oe:Be.current}px`,"--initial-height":$?"auto":`${ce}px`,...T,...d.style},onPointerDown:ie=>{ft||!re||(me.current=new Date,j(Be.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(K(!0),ve.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,ye,xe,ze;if(R||!re)return;ve.current=null;let He=Number(((ie=he.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Je=new Date().getTime()-((ye=me.current)==null?void 0:ye.getTime()),bt=Math.abs(He)/Je;if(Math.abs(He)>=Dc||bt>.11){j(Be.current),(xe=d.onDismiss)==null||xe.call(d,d),Ye(),Y(!0);return}(ze=he.current)==null||ze.style.setProperty("--swipe-amount","0px"),K(!1)},onPointerMove:ie=>{var ye;if(!ve.current||!re)return;let xe=ie.clientY-ve.current.y,ze=ie.clientX-ve.current.x,He=(nt==="top"?Math.min:Math.max)(0,xe),Je=ie.pointerType==="touch"?10:2;Math.abs(He)>Je?(ye=he.current)==null||ye.style.setProperty("--swipe-amount",`${xe}px`):Math.abs(ze)>Je&&(ve.current=null)}},te&&!d.jsx?i.createElement("button",{"aria-label":M,"data-disabled":ft,"data-close-button":!0,onClick:ft||!re?()=>{}:()=>{var ie;Ye(),(ie=d.onDismiss)==null||ie.call(d,d)},className:D(W==null?void 0:W.closeButton,(r=d==null?void 0:d.classNames)==null?void 0:r.closeButton)},i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,d.jsx||i.isValidElement(d.title)?d.jsx||d.title:i.createElement(i.Fragment,null,le||d.icon||d.promise?i.createElement("div",{"data-icon":"",className:D(W==null?void 0:W.icon,(s=d==null?void 0:d.classNames)==null?void 0:s.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||wt():null,d.type!=="loading"?d.icon||(Q==null?void 0:Q[le])||hc(le):null):null,i.createElement("div",{"data-content":"",className:D(W==null?void 0:W.content,(a=d==null?void 0:d.classNames)==null?void 0:a.content)},i.createElement("div",{"data-title":"",className:D(W==null?void 0:W.title,(l=d==null?void 0:d.classNames)==null?void 0:l.title)},d.title),d.description?i.createElement("div",{"data-description":"",className:D(X,ae,W==null?void 0:W.description,(u=d==null?void 0:d.classNames)==null?void 0:u.description)},d.description):null),i.isValidElement(d.cancel)?d.cancel:d.cancel&&hn(d.cancel)?i.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||U,onClick:ie=>{var ye,xe;hn(d.cancel)&&re&&((xe=(ye=d.cancel).onClick)==null||xe.call(ye,ie),Ye())},className:D(W==null?void 0:W.cancelButton,(c=d==null?void 0:d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,i.isValidElement(d.action)?d.action:d.action&&hn(d.action)?i.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||O,onClick:ie=>{var ye,xe;hn(d.action)&&(ie.defaultPrevented||((xe=(ye=d.action).onClick)==null||xe.call(ye,ie),Ye()))},className:D(W==null?void 0:W.actionButton,(f=d==null?void 0:d.classNames)==null?void 0:f.actionButton)},d.action.label):null))};function Ti(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var $c=t=>{let{invert:e,position:n="bottom-right",hotkey:o=["altKey","KeyT"],expand:r,closeButton:s,className:a,offset:l,theme:u="light",richColors:c,duration:f,style:p,visibleToasts:d=Tc,toastOptions:h,dir:E=Ti(),gap:m=Rc,loadingIcon:C,icons:x,containerAriaLabel:P="Notifications",pauseWhenPageIsHidden:w,cn:I=Nc}=t,[v,b]=i.useState([]),S=i.useMemo(()=>Array.from(new Set([n].concat(v.filter(k=>k.position).map(k=>k.position)))),[v,n]),[T,U]=i.useState([]),[O,z]=i.useState(!1),[X,A]=i.useState(!1),[F,V]=i.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=i.useRef(null),$=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=i.useRef(null),Q=i.useRef(!1),M=i.useCallback(k=>{var D;(D=v.find(_=>_.id===k.id))!=null&&D.delete||Ge.dismiss(k.id),b(_=>_.filter(({id:B})=>B!==k.id))},[v]);return i.useEffect(()=>Ge.subscribe(k=>{if(k.dismiss){b(D=>D.map(_=>_.id===k.id?{..._,delete:!0}:_));return}setTimeout(()=>{pt.flushSync(()=>{b(D=>{let _=D.findIndex(B=>B.id===k.id);return _!==-1?[...D.slice(0,_),{...D[_],...k},...D.slice(_+1)]:[k,...D]})})})}),[]),i.useEffect(()=>{if(u!=="system"){V(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:k})=>{V(k?"dark":"light")})},[u]),i.useEffect(()=>{v.length<=1&&z(!1)},[v]),i.useEffect(()=>{let k=D=>{var _,B;o.every(G=>D[G]||D.code===G)&&(z(!0),(_=H.current)==null||_.focus()),D.code==="Escape"&&(document.activeElement===H.current||(B=H.current)!=null&&B.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[o]),i.useEffect(()=>{if(H.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,Q.current=!1)}},[H.current]),v.length?i.createElement("section",{"aria-label":`${P} ${$}`,tabIndex:-1},S.map((k,D)=>{var _;let[B,G]=k.split("-");return i.createElement("ol",{key:k,dir:E==="auto"?Ti():E,tabIndex:-1,ref:H,className:a,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":B,"data-x-position":G,style:{"--front-toast-height":`${((_=T[0])==null?void 0:_.height)||0}px`,"--offset":typeof l=="number"?`${l}px`:l||Oc,"--width":`${_c}px`,"--gap":`${m}px`,...p},onBlur:L=>{Q.current&&!L.currentTarget.contains(L.relatedTarget)&&(Q.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:L=>{L.target instanceof HTMLElement&&L.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,W.current=L.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{X||z(!1)},onPointerDown:L=>{L.target instanceof HTMLElement&&L.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},v.filter(L=>!L.position&&D===0||L.position===k).map((L,q)=>{var K,R;return i.createElement(Bc,{key:L.id,icons:x,index:q,toast:L,defaultRichColors:c,duration:(K=h==null?void 0:h.duration)!=null?K:f,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:e,visibleToasts:d,closeButton:(R=h==null?void 0:h.closeButton)!=null?R:s,interacting:X,position:k,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:M,toasts:v.filter(Y=>Y.position==L.position),heights:T.filter(Y=>Y.position==L.position),setHeights:U,expandByDefault:r,gap:m,loadingIcon:C,expanded:O,pauseWhenPageIsHidden:w,cn:I})}))})):null};function Ac({children:t}){function e(n){Mc.custom(o=>y.jsx(Pr,{...n}))}return y.jsxs(Si.Provider,{value:{showToast:e},children:[y.jsx($c,{}),t]})}J.AlertContainer=ji,J.AlertContent=Ni,J.AlertDescription=Bi,J.AlertIcon=$i,J.AlertTitle=lo,J.Badge=Fi,J.BreadcrumbContainer=Fa,J.BreadcrumbLink=Ha,J.Button=va,J.Card=Hi,J.Checkbox=ba,J.Divider=Wi,J.DrawerContainer=Ya,J.DrawerHeader=qa,J.DrawerProvider=fc,J.FormController=ya,J.FormError=La,J.FormLabel=Ca,J.GoogleMap=ca,J.GoogleProvider=dc,J.GoogleSearchPlaces=Ua,J.IconButton=xa,J.Input=Er,J.ModalContainer=Ka,J.ModalFooter=Xa,J.ModalHeader=Ja,J.ModalProvider=pc,J.Pagination=Wa,J.Popover=Qa,J.RadioBox=Na,J.RadioGroup=ja,J.Select=$a,J.Skeleton=da,J.Switch=Aa,J.TabButton=Ga,J.TabContainer=Za,J.TableBody=fa,J.TableCaption=pa,J.TableContainer=ha,J.TableFooter=ga,J.TableHeader=ma,J.Textarea=za,J.Toast=Pr,J.ToastProvider=Ac,J.Tooltip=el,J.useAutomation=lc,J.useDrawer=uc,J.useModal=cc,J.useScopedParams=Sr,J.useToast=ki,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
104
|
+
*/var Ea,Nl;function Xy(){if(Nl)return Ea;Nl=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ea=i()?Object.assign:function(a,o){for(var s,u=r(a),c,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)e.call(s,h)&&(u[h]=s[h]);if(t){c=t(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u},Ea}var wa,zl;function Ba(){if(zl)return wa;zl=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wa=t,wa}var xa,_l;function Wl(){return _l||(_l=1,xa=Function.call.bind(Object.prototype.hasOwnProperty)),xa}var La,Ul;function Jy(){if(Ul)return La;Ul=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Ba(),n={},r=Wl();t=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var h;try{if(typeof a[f]!="function"){var p=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=a[f](o,f,u,s,null,e)}catch(C){h=C}if(h&&!(h instanceof Error)&&t((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=c?c():"";t("Failed "+s+" type: "+h.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},La=i,La}var Sa,Hl;function Qy(){if(Hl)return Sa;Hl=1;var t=jl(),e=Xy(),n=Ba(),r=Wl(),i=Jy(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Sa=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(k){var T=k&&(c&&k[c]||k[f]);if(typeof T=="function")return T}var p="<<anonymous>>",g={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:B(),arrayOf:w,element:O(),elementType:b(),instanceOf:E,node:P(),objectOf:F,oneOf:S,oneOfType:V,shape:R,exact:j};function C(k,T){return k===T?k!==0||1/k===1/T:k!==k&&T!==T}function v(k,T){this.message=k,this.data=T&&typeof T=="object"?T:{},this.stack=""}v.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var T={},Z=0;function H(K,y,U,W,M,J,ne){if(W=W||p,J=J||U,ne!==n){if(u){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+U;!T[ue]&&Z<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),T[ue]=!0,Z++)}}return y[U]==null?K?y[U]===null?new v("The "+M+" `"+J+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new v("The "+M+" `"+J+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(y,U,W,M,J)}var Q=H.bind(null,!1);return Q.isRequired=H.bind(null,!0),Q}function D(k){function T(Z,H,Q,K,y,U){var W=Z[H],M=X(W);if(M!==k){var J=_(W);return new v("Invalid "+K+" `"+y+"` of type "+("`"+J+"` supplied to `"+Q+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(T)}function B(){return d(o)}function w(k){function T(Z,H,Q,K,y){if(typeof k!="function")return new v("Property `"+y+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var U=Z[H];if(!Array.isArray(U)){var W=X(U);return new v("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var M=0;M<U.length;M++){var J=k(U,M,Q,K,y+"["+M+"]",n);if(J instanceof Error)return J}return null}return d(T)}function O(){function k(T,Z,H,Q,K){var y=T[Z];if(!s(y)){var U=X(y);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return d(k)}function b(){function k(T,Z,H,Q,K){var y=T[Z];if(!t.isValidElementType(y)){var U=X(y);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return d(k)}function E(k){function T(Z,H,Q,K,y){if(!(Z[H]instanceof k)){var U=k.name||p,W=re(Z[H]);return new v("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+U+"`."))}return null}return d(T)}function S(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function T(Z,H,Q,K,y){for(var U=Z[H],W=0;W<k.length;W++)if(C(U,k[W]))return null;var M=JSON.stringify(k,function(ne,G){var ue=_(G);return ue==="symbol"?String(G):G});return new v("Invalid "+K+" `"+y+"` of value `"+String(U)+"` "+("supplied to `"+Q+"`, expected one of "+M+"."))}return d(T)}function F(k){function T(Z,H,Q,K,y){if(typeof k!="function")return new v("Property `"+y+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var U=Z[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var M in U)if(r(U,M)){var J=k(U,M,Q,K,y+"."+M,n);if(J instanceof Error)return J}return null}return d(T)}function V(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var T=0;T<k.length;T++){var Z=k[T];if(typeof Z!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Z)+" at index "+T+"."),o}function H(Q,K,y,U,W){for(var M=[],J=0;J<k.length;J++){var ne=k[J],G=ne(Q,K,y,U,W,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&M.push(G.data.expectedType)}var ue=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new v("Invalid "+U+" `"+W+"` supplied to "+("`"+y+"`"+ue+"."))}return d(H)}function P(){function k(T,Z,H,Q,K){return I(T[Z])?null:new v("Invalid "+Q+" `"+K+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return d(k)}function z(k,T,Z,H,Q){return new v((k||"React class")+": "+T+" type `"+Z+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function R(k){function T(Z,H,Q,K,y){var U=Z[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+y+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var M in k){var J=k[M];if(typeof J!="function")return z(Q,K,y,M,_(J));var ne=J(U,M,Q,K,y+"."+M,n);if(ne)return ne}return null}return d(T)}function j(k){function T(Z,H,Q,K,y){var U=Z[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+y+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var M=e({},Z[H],k);for(var J in M){var ne=k[J];if(r(k,J)&&typeof ne!="function")return z(Q,K,y,J,_(ne));if(!ne)return new v("Invalid "+K+" `"+y+"` key `"+J+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[H],null," ")+`
|
105
|
+
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var G=ne(U,J,Q,K,y+"."+J,n);if(G)return G}return null}return d(T)}function I(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(I);if(k===null||s(k))return!0;var T=h(k);if(T){var Z=T.call(k),H;if(T!==k.entries){for(;!(H=Z.next()).done;)if(!I(H.value))return!1}else for(;!(H=Z.next()).done;){var Q=H.value;if(Q&&!I(Q[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,T){return k==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function X(k){var T=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(T,k)?"symbol":T}function _(k){if(typeof k>"u"||k===null)return""+k;var T=X(k);if(T==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return T}function $(k){var T=_(k);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function re(k){return!k.constructor||!k.constructor.name?p:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Sa}var Aa,Vl;function $y(){if(Vl)return Aa;Vl=1;var t=Ba();function e(){}function n(){}return n.resetWarningCache=e,Aa=function(){function r(o,s,u,c,f,h){if(h!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return a.PropTypes=a,a},Aa}if(process.env.NODE_ENV!=="production"){var eC=jl(),tC=!0;ba.exports=Qy()(eC.isElement,tC)}else ba.exports=$y()();var Kr=ba.exports,Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});var nC=rr,Oa=rC(nC);function rC(t){return t&&t.__esModule?t:{default:t}}var iC={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var r=this.scroller,i=r.get(e);if(i&&(n||e!==r.getActiveLink())){var a=this.containers[e]||document;r.scrollTo(e,{container:a})}},getHash:function(){return Oa.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Oa.default.getHash()!==e&&Oa.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Xr.default=iC,Object.defineProperty(er,"__esModule",{value:!0});var Jr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},aC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),oC=l,ql=or(oC),sC=tr,Qr=or(sC),uC=On,lC=or(uC),cC=Kr,Ye=or(cC),fC=Xr,$t=or(fC);function or(t){return t&&t.__esModule?t:{default:t}}function dC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function hC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Zl={to:Ye.default.string.isRequired,containerId:Ye.default.string,container:Ye.default.object,activeClass:Ye.default.string,activeStyle:Ye.default.object,spy:Ye.default.bool,horizontal:Ye.default.bool,smooth:Ye.default.oneOfType([Ye.default.bool,Ye.default.string]),offset:Ye.default.number,delay:Ye.default.number,isDynamic:Ye.default.bool,onClick:Ye.default.func,duration:Ye.default.oneOfType([Ye.default.number,Ye.default.func]),absolute:Ye.default.bool,onSetActive:Ye.default.func,onSetInactive:Ye.default.func,ignoreCancelEvents:Ye.default.bool,hashSpy:Ye.default.bool,saveHashHistory:Ye.default.bool,spyThrottle:Ye.default.number};er.default=function(t,e){var n=e||lC.default,r=function(a){hC(o,a);function o(s){dC(this,o);var u=pC(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,s));return i.call(u),u.state={active:!1},u}return aC(o,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,c=this.props.container;return u&&!c?document.getElementById(u):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();Qr.default.isMounted(u)||Qr.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&($t.default.isMounted()||$t.default.mount(n),$t.default.mapContainer(this.props.to,u)),Qr.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){Qr.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var c={};this.state&&this.state.active?c=Jr({},this.props.style,this.props.activeStyle):c=Jr({},this.props.style);var f=Jr({},this.props);for(var h in Zl)f.hasOwnProperty(h)&&delete f[h];return f.className=u,f.style=c,f.onClick=this.handleClick,ql.default.createElement(t,f)}}]),o}(ql.default.PureComponent),i=function(){var o=this;this.scrollTo=function(s,u){n.scrollTo(s,Jr({},o.state,u))},this.handleClick=function(s){o.props.onClick&&o.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),o.scrollTo(o.props.to,o.props)},this.spyHandler=function(s,u){var c=o.getScrollSpyContainer();if(!($t.default.isMounted()&&!$t.default.isInitialized())){var f=o.props.horizontal,h=o.props.to,p=null,g=void 0,C=void 0;if(f){var v=0,d=0,D=0;if(c.getBoundingClientRect){var B=c.getBoundingClientRect();D=B.left}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var w=p.getBoundingClientRect();v=w.left-D+s,d=v+w.width}var O=s-o.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),C=O<Math.floor(v)||O>=Math.floor(d)}else{var b=0,E=0,S=0;if(c.getBoundingClientRect){var F=c.getBoundingClientRect();S=F.top}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var V=p.getBoundingClientRect();b=V.top-S+u,E=b+V.height}var P=u-o.props.offset;g=P>=Math.floor(b)&&P<Math.floor(E),C=P<Math.floor(b)||P>=Math.floor(E)}var z=n.getActiveLink();if(C){if(h===z&&n.setActiveLink(void 0),o.props.hashSpy&&$t.default.getHash()===h){var R=o.props.saveHashHistory,j=R===void 0?!1:R;$t.default.changeHash("",j)}o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive(h,p))}if(g&&(z!==h||o.state.active===!1)){n.setActiveLink(h);var I=o.props.saveHashHistory,N=I===void 0?!1:I;o.props.hashSpy&&$t.default.changeHash(h,N),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(h,p))}}}};return r.propTypes=Zl,r.defaultProps={offset:0},r},Object.defineProperty(da,"__esModule",{value:!0});var vC=l,Gl=Yl(vC),gC=er,mC=Yl(gC);function Yl(t){return t&&t.__esModule?t:{default:t}}function yC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kl(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function CC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var DC=function(t){CC(e,t);function e(){var n,r,i,a;yC(this,e);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return a=(r=(i=Kl(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(s))),i),i.render=function(){return Gl.default.createElement("a",i.props,i.props.children)},r),Kl(i,a)}return e}(Gl.default.Component);da.default=(0,mC.default)(DC);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});var bC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),EC=l,Xl=Jl(EC),wC=er,BC=Jl(wC);function Jl(t){return t&&t.__esModule?t:{default:t}}function xC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function LC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function SC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var AC=function(t){SC(e,t);function e(){return xC(this,e),LC(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return bC(e,[{key:"render",value:function(){return Xl.default.createElement("button",this.props,this.props.children)}}]),e}(Xl.default.Component);Fa.default=(0,BC.default)(AC);var Pa={},$r={};Object.defineProperty($r,"__esModule",{value:!0});var OC=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},FC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),PC=l,Ql=ei(PC),MC=Wt;ei(MC);var kC=On,$l=ei(kC),TC=Kr,ec=ei(TC);function ei(t){return t&&t.__esModule?t:{default:t}}function RC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function jC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}$r.default=function(t){var e=function(n){jC(r,n);function r(i){RC(this,r);var a=IC(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return a.childBindings={domNode:null},a}return FC(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;$l.default.unregister(this.props.name)}},{key:"registerElems",value:function(a){$l.default.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return Ql.default.createElement(t,OC({},this.props,{parentBindings:this.childBindings}))}}]),r}(Ql.default.Component);return e.propTypes={name:ec.default.string,id:ec.default.string},e},Object.defineProperty(Pa,"__esModule",{value:!0});var tc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},NC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),zC=l,nc=Ma(zC),_C=$r,WC=Ma(_C),UC=Kr,rc=Ma(UC);function Ma(t){return t&&t.__esModule?t:{default:t}}function HC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function qC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ic=function(t){qC(e,t);function e(){return HC(this,e),VC(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return NC(e,[{key:"render",value:function(){var r=this,i=tc({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,nc.default.createElement("div",tc({},i,{ref:function(o){r.props.parentBindings.domNode=o}}),this.props.children)}}]),e}(nc.default.Component);ic.propTypes={name:rc.default.string,id:rc.default.string},Pa.default=(0,WC.default)(ic);var ka=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ac=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function oc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function uc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ti=l,mn=tr,Ta=On,Qe=Kr,en=Xr,lc={to:Qe.string.isRequired,containerId:Qe.string,container:Qe.object,activeClass:Qe.string,spy:Qe.bool,smooth:Qe.oneOfType([Qe.bool,Qe.string]),offset:Qe.number,delay:Qe.number,isDynamic:Qe.bool,onClick:Qe.func,duration:Qe.oneOfType([Qe.number,Qe.func]),absolute:Qe.bool,onSetActive:Qe.func,onSetInactive:Qe.func,ignoreCancelEvents:Qe.bool,hashSpy:Qe.bool,spyThrottle:Qe.number},ZC={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||Ta,i=function(o){uc(s,o);function s(u){oc(this,s);var c=sc(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u));return a.call(c),c.state={active:!1},c}return ac(s,[{key:"getScrollSpyContainer",value:function(){var c=this.props.containerId,f=this.props.container;return c?document.getElementById(c):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var c=this.getScrollSpyContainer();mn.isMounted(c)||mn.mount(c,this.props.spyThrottle),this.props.hashSpy&&(en.isMounted()||en.mount(r),en.mapContainer(this.props.to,c)),this.props.spy&&mn.addStateHandler(this.stateHandler),mn.addSpyHandler(this.spyHandler,c),this.setState({container:c})}}},{key:"componentWillUnmount",value:function(){mn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var c="";this.state&&this.state.active?c=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():c=this.props.className;var f=ka({},this.props);for(var h in lc)f.hasOwnProperty(h)&&delete f[h];return f.className=c,f.onClick=this.handleClick,ti.createElement(e,f)}}]),s}(ti.Component),a=function(){var s=this;this.scrollTo=function(u,c){r.scrollTo(u,ka({},s.state,c))},this.handleClick=function(u){s.props.onClick&&s.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),s.scrollTo(s.props.to,s.props)},this.stateHandler=function(){r.getActiveLink()!==s.props.to&&(s.state!==null&&s.state.active&&s.props.onSetInactive&&s.props.onSetInactive(),s.setState({active:!1}))},this.spyHandler=function(u){var c=s.getScrollSpyContainer();if(!(en.isMounted()&&!en.isInitialized())){var f=s.props.to,h=null,p=0,g=0,C=0;if(c.getBoundingClientRect){var v=c.getBoundingClientRect();C=v.top}if(!h||s.props.isDynamic){if(h=r.get(f),!h)return;var d=h.getBoundingClientRect();p=d.top-C+u,g=p+d.height}var D=u-s.props.offset,B=D>=Math.floor(p)&&D<Math.floor(g),w=D<Math.floor(p)||D>=Math.floor(g),O=r.getActiveLink();if(w)return f===O&&r.setActiveLink(void 0),s.props.hashSpy&&en.getHash()===f&&en.changeHash(),s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive()),mn.updateStates();if(B&&O!==f)return r.setActiveLink(f),s.props.hashSpy&&en.changeHash(f),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(f)),mn.updateStates()}}};return i.propTypes=lc,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){uc(i,r);function i(a){oc(this,i);var o=sc(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a));return o.childBindings={domNode:null},o}return ac(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(o){this.props.name!==o.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Ta.unregister(this.props.name)}},{key:"registerElems",value:function(o){Ta.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return ti.createElement(e,ka({},this.props,{parentBindings:this.childBindings}))}}]),i}(ti.Component);return n.propTypes={name:Qe.string,id:Qe.string},n}},GC=ZC;Object.defineProperty(et,"__esModule",{value:!0}),et.Helpers=et.ScrollElement=et.ScrollLink=Dc=et.animateScroll=et.scrollSpy=et.Events=et.scroller=et.Element=et.Button=et.Link=void 0;var YC=da,cc=kt(YC),KC=Fa,fc=kt(KC),XC=Pa,dc=kt(XC),JC=On,pc=kt(JC),QC=ir,hc=kt(QC),$C=tr,vc=kt($C),eD=Hr,gc=kt(eD),tD=er,mc=kt(tD),nD=$r,yc=kt(nD),rD=GC,Cc=kt(rD);function kt(t){return t&&t.__esModule?t:{default:t}}et.Link=cc.default,et.Button=fc.default,et.Element=dc.default,et.scroller=pc.default,et.Events=hc.default,et.scrollSpy=vc.default;var Dc=et.animateScroll=gc.default;et.ScrollLink=mc.default,et.ScrollElement=yc.default,et.Helpers=Cc.default,et.default={Link:cc.default,Button:fc.default,Element:dc.default,scroller:pc.default,Events:hc.default,scrollSpy:vc.default,animateScroll:gc.default,ScrollLink:mc.default,ScrollElement:yc.default,Helpers:Cc.default};const Ra=l.createContext({}),bc=l.createContext({});function Ec(){const t=l.useContext(bc);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function wc(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="info"||t.type==="success"||t.type==="danger"||t.type==="warning")}function iD(){const t=Dn.useActionData(),{closeModal:e}=l.useContext(Ra),{showToast:n}=Ec();l.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),l.useEffect(()=>{const r=t==null?void 0:t.toast,i=t==null?void 0:t.message;wc(r)&&n(r),!wc(r)&&i&&n({message:i,title:"Atenção!",type:"warning"})},[t]),l.useEffect(()=>{var r,i;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const a=document.getElementById((i=t==null?void 0:t.data)==null?void 0:i.scrollTo);a&&Dc.scrollTo(a.offsetTop-200)}},[t])}const Bc=l.createContext({});function aD(t){const e=l.useContext(Bc);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:r,openDrawer:i,closeDrawer:a}=e,o=r(t),s=n(t);return{drawerIsOpen:o,drawerData:s,openDrawer:f=>i(t,f),closeDrawer:()=>a(t)}}else return e}function oD(t){const e=l.useContext(Ra);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:r,openModal:i,closeModal:a}=e,o=r(t),s=n(t);return{modalIsOpen:o,modalData:s,openModal:f=>i(t,f),closeModal:()=>a(t)}}else return e}function sD(t){const{children:e=!1}=t,[n,r]=l.useState([]);function i(u){return!!n.some(c=>c.key===u)}function a(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function o(u,c){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function s(u){r(n.filter(c=>c.key!==u))}return x.jsx(Bc.Provider,{value:{drawerIsOpen:i,drawerData:a,openDrawer:o,closeDrawer:s},children:e})}function uD({googleMapsApiKey:t,children:e,...n}){return x.jsx(ef,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function lD(t){const{children:e=!1}=t,[n,r]=l.useState([]);function i(u){return!!n.some(c=>c.key===u)}function a(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function o(u,c){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function s(u){r(n.filter(c=>c.key!==u))}return x.jsx(Ra.Provider,{value:{modalIsOpen:i,modalData:a,openModal:o,closeModal:s},children:e})}var cD=t=>{switch(t){case"success":return pD;case"info":return vD;case"warning":return hD;case"error":return gD;default:return null}},fD=Array(12).fill(0),dD=({visible:t})=>l.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},l.createElement("div",{className:"sonner-spinner"},fD.map((e,n)=>l.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),pD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),vD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mD=()=>{let[t,e]=l.useState(document.hidden);return l.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Ia=1,yD=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Ia++,a=this.toasts.find(s=>s.id===i),o=t.dismissible===void 0?!0:t.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...t,id:i,title:n}),{...s,...t,id:i,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0;return r.then(async a=>{if(DD(a)&&!a.ok){i=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,s=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:n,type:"error",message:o,description:s})}else if(e.success!==void 0){i=!1;let o=typeof e.success=="function"?await e.success(a):e.success,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"success",message:o,description:s})}}).catch(async a=>{if(e.error!==void 0){i=!1;let o=typeof e.error=="function"?await e.error(a):e.error,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"error",message:o,description:s})}}).finally(()=>{var a;i&&(this.dismiss(n),n=void 0),(a=e.finally)==null||a.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Ia++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},Et=new yD,CD=(t,e)=>{let n=(e==null?void 0:e.id)||Ia++;return Et.addToast({title:t,...e,id:n}),n},DD=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",bD=CD,ED=()=>Et.toasts,wD=Object.assign(bD,{success:Et.success,info:Et.info,warning:Et.warning,error:Et.error,custom:Et.custom,message:Et.message,promise:Et.promise,dismiss:Et.dismiss,loading:Et.loading},{getHistory:ED});function BD(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}BD(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
106
|
+
`);function ni(t){return t.label!==void 0}var xD=3,LD="32px",SD=4e3,AD=356,OD=14,FD=20,PD=200;function MD(...t){return t.filter(Boolean).join(" ")}var kD=t=>{var e,n,r,i,a,o,s,u,c,f;let{invert:h,toast:p,unstyled:g,interacting:C,setHeights:v,visibleToasts:d,heights:D,index:B,toasts:w,expanded:O,removeToast:b,defaultRichColors:E,closeButton:S,style:F,cancelButtonStyle:V,actionButtonStyle:P,className:z="",descriptionClassName:R="",duration:j,position:I,gap:N,loadingIcon:X,expandByDefault:_,classNames:$,icons:re,closeButtonAriaLabel:k="Close toast",pauseWhenPageIsHidden:T,cn:Z}=t,[H,Q]=l.useState(!1),[K,y]=l.useState(!1),[U,W]=l.useState(!1),[M,J]=l.useState(!1),[ne,G]=l.useState(0),[ue,ae]=l.useState(0),de=l.useRef(null),pe=l.useRef(null),Ce=B===0,ye=B+1<=d,ge=p.type,ve=p.dismissible!==!1,je=p.className||"",se=p.descriptionClassName||"",Ne=l.useMemo(()=>D.findIndex(be=>be.toastId===p.id)||0,[D,p.id]),fe=l.useMemo(()=>{var be;return(be=p.closeButton)!=null?be:S},[p.closeButton,S]),we=l.useMemo(()=>p.duration||j||SD,[p.duration,j]),Me=l.useRef(0),He=l.useRef(0),qe=l.useRef(0),Ee=l.useRef(null),[ut,at]=I.split("-"),At=l.useMemo(()=>D.reduce((be,Te,Re)=>Re>=Ne?be:be+Te.height,0),[D,Ne]),ht=mD(),wt=p.invert||h,Tt=ge==="loading";He.current=l.useMemo(()=>Ne*N+At,[Ne,At]),l.useEffect(()=>{Q(!0)},[]),l.useLayoutEffect(()=>{if(!H)return;let be=pe.current,Te=be.style.height;be.style.height="auto";let Re=be.getBoundingClientRect().height;be.style.height=Te,ae(Re),v(nt=>nt.find(ot=>ot.toastId===p.id)?nt.map(ot=>ot.toastId===p.id?{...ot,height:Re}:ot):[{toastId:p.id,height:Re,position:p.position},...nt])},[H,p.title,p.description,v,p.id]);let vt=l.useCallback(()=>{y(!0),G(He.current),v(be=>be.filter(Te=>Te.toastId!==p.id)),setTimeout(()=>{b(p)},PD)},[p,b,v,He]);l.useEffect(()=>{if(p.promise&&ge==="loading"||p.duration===1/0||p.type==="loading")return;let be,Te=we;return O||C||T&&ht?(()=>{if(qe.current<Me.current){let Re=new Date().getTime()-Me.current;Te=Te-Re}qe.current=new Date().getTime()})():Te!==1/0&&(Me.current=new Date().getTime(),be=setTimeout(()=>{var Re;(Re=p.onAutoClose)==null||Re.call(p,p),vt()},Te)),()=>clearTimeout(be)},[O,C,_,p,we,vt,p.promise,ge,T,ht]),l.useEffect(()=>{let be=pe.current;if(be){let Te=be.getBoundingClientRect().height;return ae(Te),v(Re=>[{toastId:p.id,height:Te,position:p.position},...Re]),()=>v(Re=>Re.filter(nt=>nt.toastId!==p.id))}},[v,p.id]),l.useEffect(()=>{p.delete&&vt()},[vt,p.delete]);function tn(){return re!=null&&re.loading?l.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},re.loading):X?l.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},X):l.createElement(dD,{visible:ge==="loading"})}return l.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pe,className:Z(z,je,$==null?void 0:$.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,$==null?void 0:$.default,$==null?void 0:$[ge],(n=p==null?void 0:p.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":H,"data-promise":!!p.promise,"data-removed":K,"data-visible":ye,"data-y-position":ut,"data-x-position":at,"data-index":B,"data-front":Ce,"data-swiping":U,"data-dismissible":ve,"data-type":ge,"data-invert":wt,"data-swipe-out":M,"data-expanded":!!(O||_&&H),style:{"--index":B,"--toasts-before":B,"--z-index":w.length-B,"--offset":`${K?ne:He.current}px`,"--initial-height":_?"auto":`${ue}px`,...F,...p.style},onPointerDown:be=>{Tt||!ve||(de.current=new Date,G(He.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(W(!0),Ee.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Te,Re,nt;if(M||!ve)return;Ee.current=null;let ot=Number(((be=pe.current)==null?void 0:be.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ot=new Date().getTime()-((Te=de.current)==null?void 0:Te.getTime()),yn=Math.abs(ot)/Ot;if(Math.abs(ot)>=FD||yn>.11){G(He.current),(Re=p.onDismiss)==null||Re.call(p,p),vt(),J(!0);return}(nt=pe.current)==null||nt.style.setProperty("--swipe-amount","0px"),W(!1)},onPointerMove:be=>{var Te;if(!Ee.current||!ve)return;let Re=be.clientY-Ee.current.y,nt=be.clientX-Ee.current.x,ot=(ut==="top"?Math.min:Math.max)(0,Re),Ot=be.pointerType==="touch"?10:2;Math.abs(ot)>Ot?(Te=pe.current)==null||Te.style.setProperty("--swipe-amount",`${Re}px`):Math.abs(nt)>Ot&&(Ee.current=null)}},fe&&!p.jsx?l.createElement("button",{"aria-label":k,"data-disabled":Tt,"data-close-button":!0,onClick:Tt||!ve?()=>{}:()=>{var be;vt(),(be=p.onDismiss)==null||be.call(p,p)},className:Z($==null?void 0:$.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},l.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||l.isValidElement(p.title)?p.jsx||p.title:l.createElement(l.Fragment,null,ge||p.icon||p.promise?l.createElement("div",{"data-icon":"",className:Z($==null?void 0:$.icon,(a=p==null?void 0:p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tn():null,p.type!=="loading"?p.icon||(re==null?void 0:re[ge])||cD(ge):null):null,l.createElement("div",{"data-content":"",className:Z($==null?void 0:$.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},l.createElement("div",{"data-title":"",className:Z($==null?void 0:$.title,(s=p==null?void 0:p.classNames)==null?void 0:s.title)},p.title),p.description?l.createElement("div",{"data-description":"",className:Z(R,se,$==null?void 0:$.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},p.description):null),l.isValidElement(p.cancel)?p.cancel:p.cancel&&ni(p.cancel)?l.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||V,onClick:be=>{var Te,Re;ni(p.cancel)&&ve&&((Re=(Te=p.cancel).onClick)==null||Re.call(Te,be),vt())},className:Z($==null?void 0:$.cancelButton,(c=p==null?void 0:p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,l.isValidElement(p.action)?p.action:p.action&&ni(p.action)?l.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:be=>{var Te,Re;ni(p.action)&&(be.defaultPrevented||((Re=(Te=p.action).onClick)==null||Re.call(Te,be),vt()))},className:Z($==null?void 0:$.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function xc(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var TD=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:s,theme:u="light",richColors:c,duration:f,style:h,visibleToasts:p=xD,toastOptions:g,dir:C=xc(),gap:v=OD,loadingIcon:d,icons:D,containerAriaLabel:B="Notifications",pauseWhenPageIsHidden:w,cn:O=MD}=t,[b,E]=l.useState([]),S=l.useMemo(()=>Array.from(new Set([n].concat(b.filter(T=>T.position).map(T=>T.position)))),[b,n]),[F,V]=l.useState([]),[P,z]=l.useState(!1),[R,j]=l.useState(!1),[I,N]=l.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=l.useRef(null),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=l.useRef(null),re=l.useRef(!1),k=l.useCallback(T=>{var Z;(Z=b.find(H=>H.id===T.id))!=null&&Z.delete||Et.dismiss(T.id),E(H=>H.filter(({id:Q})=>Q!==T.id))},[b]);return l.useEffect(()=>Et.subscribe(T=>{if(T.dismiss){E(Z=>Z.map(H=>H.id===T.id?{...H,delete:!0}:H));return}setTimeout(()=>{Wt.flushSync(()=>{E(Z=>{let H=Z.findIndex(Q=>Q.id===T.id);return H!==-1?[...Z.slice(0,H),{...Z[H],...T},...Z.slice(H+1)]:[T,...Z]})})})}),[]),l.useEffect(()=>{if(u!=="system"){N(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?N("dark"):N("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:T})=>{N(T?"dark":"light")})},[u]),l.useEffect(()=>{b.length<=1&&z(!1)},[b]),l.useEffect(()=>{let T=Z=>{var H,Q;r.every(K=>Z[K]||Z.code===K)&&(z(!0),(H=X.current)==null||H.focus()),Z.code==="Escape"&&(document.activeElement===X.current||(Q=X.current)!=null&&Q.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),l.useEffect(()=>{if(X.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[X.current]),b.length?l.createElement("section",{"aria-label":`${B} ${_}`,tabIndex:-1},S.map((T,Z)=>{var H;let[Q,K]=T.split("-");return l.createElement("ol",{key:T,dir:C==="auto"?xc():C,tabIndex:-1,ref:X,className:o,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":Q,"data-x-position":K,style:{"--front-toast-height":`${((H=F[0])==null?void 0:H.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||LD,"--width":`${AD}px`,"--gap":`${v}px`,...h},onBlur:y=>{re.current&&!y.currentTarget.contains(y.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=y.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{R||z(!1)},onPointerDown:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},b.filter(y=>!y.position&&Z===0||y.position===T).map((y,U)=>{var W,M;return l.createElement(kD,{key:y.id,icons:D,index:U,toast:y,defaultRichColors:c,duration:(W=g==null?void 0:g.duration)!=null?W:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:e,visibleToasts:p,closeButton:(M=g==null?void 0:g.closeButton)!=null?M:a,interacting:R,position:T,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:k,toasts:b.filter(J=>J.position==y.position),heights:F.filter(J=>J.position==y.position),setHeights:V,expandByDefault:i,gap:v,loadingIcon:d,expanded:P,pauseWhenPageIsHidden:w,cn:O})}))})):null};function RD({children:t}){function e(n){wD.custom(r=>x.jsx(Bl,{...n}))}return x.jsxs(bc.Provider,{value:{showToast:e},children:[x.jsx(TD,{}),t]})}he.AlertContainer=Pc,he.AlertContent=Mc,he.AlertDescription=kc,he.AlertIcon=Tc,he.AlertTitle=_a,he.Badge=Nc,he.BreadcrumbContainer=N0,he.BreadcrumbLink=z0,he.Button=hd,he.Card=zc,he.Checkbox=gd,he.Divider=_c,he.DrawerContainer=V0,he.DrawerHeader=q0,he.DrawerProvider=sD,he.FormController=vd,he.FormError=md,he.FormLabel=yd,he.GoogleMap=sd,he.GoogleProvider=uD,he.GoogleSearchPlaces=Fd,he.IconButton=Pd,he.Input=ts,he.ModalContainer=Z0,he.ModalFooter=G0,he.ModalHeader=Y0,he.ModalProvider=lD,he.Pagination=_0,he.Popover=K0,he.RadioBox=Td,he.RadioGroup=kd,he.RichText=k0,he.Select=R0,he.Skeleton=ud,he.Switch=I0,he.TabButton=H0,he.TabContainer=U0,he.TableBody=ld,he.TableCaption=cd,he.TableContainer=fd,he.TableFooter=dd,he.TableHeader=pd,he.Textarea=j0,he.Toast=Bl,he.ToastProvider=RD,he.Tooltip=X0,he.useAutomation=iD,he.useDrawer=aD,he.useModal=oD,he.useScopedParams=bl,he.useToast=Ec,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
|